From 4314576441e199fd606a8864ea623715dd08d791 Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Tue, 23 Oct 2018 17:38:44 +0200 Subject: [PATCH 001/375] Make create() use std::string instead of Name --- nestkernel/nest.cpp | 2 +- nestkernel/nest.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index e1188aeece..6fdf0b5a6a 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -171,7 +171,7 @@ get_connection_status( const ConnectionDatum& conn ) } GIDCollectionPTR -create( const Name& model_name, const index n_nodes ) +create( const std::string model_name, const index n_nodes ) { if ( n_nodes == 0 ) { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 8f943aa5de..57f8c3e62a 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -70,7 +70,7 @@ void set_connection_status( const ConnectionDatum& conn, const DictionaryDatum& dict ); DictionaryDatum get_connection_status( const ConnectionDatum& conn ); -GIDCollectionPTR create( const Name& model_name, const index n ); +GIDCollectionPTR create( const std::string model_name, const index n ); void connect( GIDCollectionPTR sources, GIDCollectionPTR targets, From b19633d96495db4ac6cc06c666fc27e5f433380a Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Sun, 11 Nov 2018 19:43:24 +0100 Subject: [PATCH 002/375] First attempt at SLI-less PyNEST. This removes the initialization of SLI from PyNEST and replaces it with the direct initializalization of the NEST kernel. This unfinished revision only makes the Create command available. --- pynest/CMakeLists.txt | 2 +- pynest/nest/__init__.py | 140 ++----------------------------- pynest/nest/lib/hl_api_helper.py | 103 ----------------------- pynest/pynestkernel.pxd | 48 +++++++---- pynest/pynestkernel.pyx | 136 +++++++++++++++++++----------- pynest/pynestkernel_aux.h | 67 +++++++++++++++ pynest/pynestkernel_aux.h~ | 70 ++++++++++++++++ 7 files changed, 262 insertions(+), 304 deletions(-) create mode 100644 pynest/pynestkernel_aux.h create mode 100644 pynest/pynestkernel_aux.h~ diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt index 6464dc6e2d..132d58588b 100644 --- a/pynest/CMakeLists.txt +++ b/pynest/CMakeLists.txt @@ -61,7 +61,7 @@ if ( HAVE_PYTHON ) target_include_directories( pynestkernel PRIVATE ${PROJECT_BINARY_DIR}/libnestutil ${PROJECT_SOURCE_DIR}/libnestutil - ${PROJECT_SOURCE_DIR}/nest + ${PROJECT_SOURCE_DIR}/pynest ${PROJECT_SOURCE_DIR}/nestkernel ${PROJECT_SOURCE_DIR}/librandom ${PROJECT_SOURCE_DIR}/sli diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py index 3fded261de..f742c6f721 100644 --- a/pynest/nest/__init__.py +++ b/pynest/nest/__init__.py @@ -67,114 +67,11 @@ # RTLD_NOW (OSX) sys.setdlopenflags(ctypes.RTLD_GLOBAL) -from . import pynestkernel as _kernel # noqa -from .lib import hl_api_helper as hl_api # noqa +from . import pynestkernel as _kernel engine = _kernel.NESTEngine() - -sli_push = hl_api.sps = engine.push -sli_pop = hl_api.spp = engine.pop -hl_api.kernel = _kernel - initialized = False - -def catching_sli_run(cmd): - """Send a command string to the NEST kernel to be executed, catch - SLI errors and re-raise them in Python. - - Parameters - ---------- - cmd : str - The SLI command to be executed. - Raises - ------ - NESTError - SLI errors are bubbled to the Python API as NESTErrors. - """ - - if sys.version_info >= (3, ): - def encode(s): - return s - - def decode(s): - return s - else: - def encode(s): - return s.encode('utf-8') - - def decode(s): - return s.decode('utf-8') - - engine.run('{%s} runprotected' % decode(cmd)) - if not sli_pop(): - errorname = sli_pop() - message = sli_pop() - commandname = sli_pop() - engine.run('clear') - errorstring = '%s in %s%s' % (errorname, commandname, message) - raise _kernel.NESTError(encode(errorstring)) - -sli_run = hl_api.sr = catching_sli_run - - -def sli_func(s, *args, **kwargs): - """Convenience function for executing an SLI command s with - arguments args. - - This executes the SLI sequence: - ``sli_push(args); sli_run(s); y=sli_pop()`` - - Parameters - ---------- - s : str - Function to call - *args - Arbitrary number of arguments to pass to the SLI function - **kwargs - namespace : str - The sli code is executed in the given SLI namespace. - litconv : bool - Convert string args beginning with / to literals. - - Returns - ------- - The function may have multiple return values. The number of return values - is determined by the SLI function that was called. - - Examples - -------- - r,q = sli_func('dup rollu add',2,3) - r = sli_func('add',2,3) - r = sli_func('add pop',2,3) - l = sli_func('CreateLayer', {...}, namespace='topology') - """ - - # check for namespace - slifun = 'sli_func' # version not converting to literals - if 'namespace' in kwargs: - s = kwargs['namespace'] + ' using ' + s + ' endusing' - elif 'litconv' in kwargs: - if kwargs['litconv']: - slifun = 'sli_func_litconv' - elif len(kwargs) > 0: - _kernel.NESTError( - "'namespace' and 'litconv' are the only valid keyword arguments.") - - sli_push(args) # push array of arguments on SLI stack - sli_push(s) # push command string - sli_run(slifun) # SLI support code to execute s on args - r = sli_pop() # return value is an array - - if len(r) == 1: # 1 return value is no tuple - return r[0] - - if len(r) != 0: - return r - -hl_api.sli_func = sli_func - - def init(argv): """Initializes NEST. @@ -194,29 +91,9 @@ def init(argv): raise _kernel.NESTError("NEST already initialized.") return - quiet = False - - # Some commandline arguments of NEST and Python have the same - # name, but different meaning. To avoid unintended behavior, we - # handle NEST's arguments here and pass it a modified copy, while - # we leave the original list unchanged for further use by the user - # or other modules. - nest_argv = argv[:] - - if "--quiet" in nest_argv: - quiet = True - nest_argv.remove("--quiet") - if "--debug" in nest_argv: - nest_argv.remove("--debug") - if "--sli-debug" in nest_argv: - nest_argv.remove("--sli-debug") - nest_argv.append("--debug") - - initialized = engine.init(nest_argv, __path__[0]) + initialized = engine.init(argv) if initialized: - if not quiet: - engine.run("pywelcome") # Dirty hack to get tab-completion for models in IPython. try: @@ -226,7 +103,7 @@ def init(argv): else: try: import keyword - keyword.kwlist += Models() + # keyword.kwlist += Models() except ImportError: pass @@ -239,14 +116,9 @@ def test(): from . import tests import unittest - debug = hl_api.get_debug() - hl_api.set_debug(True) - runner = unittest.TextTestRunner(verbosity=2) runner.run(tests.suite()) - hl_api.set_debug(debug) - from .pynestkernel import * # noqa from .lib.hl_api_helper import * # noqa @@ -254,9 +126,9 @@ def test(): # directory and import the content of all Python files therein into # the global namespace. This makes the API functions of PyNEST itself # and those of extra modules available to the user. -for name in os.listdir(os.path.join(os.path.dirname(__file__), "lib")): - if name.endswith(".py") and not name.startswith('__'): - exec("from .lib.{0} import *".format(name[:-3])) +#for name in os.listdir(os.path.join(os.path.dirname(__file__), "lib")): +# if name.endswith(".py") and not name.startswith('__'): +# exec("from .lib.{0} import *".format(name[:-3])) if 'DELAY_PYNEST_INIT' not in os.environ: init(sys.argv) diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py index a518b845e4..fb86cbbd04 100644 --- a/pynest/nest/lib/hl_api_helper.py +++ b/pynest/nest/lib/hl_api_helper.py @@ -172,107 +172,6 @@ def is_string(obj): """ return isinstance(obj, uni_str) -__debug = False - - -def get_debug(): - """Return the current value of the debug flag of the high-level API. - - Returns - ------- - bool: - current value of the debug flag - """ - - global __debug - return __debug - - -def set_debug(dbg=True): - """Set the debug flag of the high-level API. - - Parameters - ---------- - dbg : bool, optional - Value to set the debug flag to - """ - - global __debug - __debug = dbg - - -def stack_checker(f): - """Decorator to add stack checks to functions using PyNEST's - low-level API. - - This decorator works only on functions. See - check_stack() for the generic version for functions and - classes. - - Parameters - ---------- - f : function - Function to decorate - - Returns - ------- - function: - Decorated function - - Raises - ------ - kernel.NESTError - """ - - @functools.wraps(f) - def stack_checker_func(*args, **kwargs): - if not get_debug(): - return f(*args, **kwargs) - else: - sr('count') - stackload_before = spp() - result = f(*args, **kwargs) - sr('count') - num_leftover_elements = spp() - stackload_before - if num_leftover_elements != 0: - eargs = (f.__name__, num_leftover_elements) - etext = "Function '%s' left %i elements on the stack." - raise kernel.NESTError(etext % eargs) - return result - - return stack_checker_func - - -def check_stack(thing): - """Convenience wrapper for applying the stack_checker decorator to - all class methods of the given class, or to a given function. - - If the object cannot be decorated, it is returned unchanged. - - Parameters - ---------- - thing : function or class - Description - - Returns - ------- - function or class - Decorated function or class - - Raises - ------ - ValueError - """ - - if inspect.isfunction(thing): - return stack_checker(thing) - elif inspect.isclass(thing): - for name, mtd in inspect.getmembers(thing, predicate=inspect.ismethod): - if name.startswith("test_"): - setattr(thing, name, stack_checker(mtd)) - return thing - else: - raise ValueError("unable to decorate {0}".format(thing)) def is_iterable(seq): @@ -573,7 +472,6 @@ def show_help_with_pager(hlpobj, pager=None): 'in your home directory.'.format(pager)) -@check_stack def get_verbosity(): """Return verbosity level of NEST's messages. @@ -589,7 +487,6 @@ def get_verbosity(): return spp() -@check_stack def set_verbosity(level): """Change verbosity level for NEST's messages. diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 3789004b30..03036c54eb 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -71,13 +71,10 @@ cdef extern from "topology_parameter.h" namespace "nest": cppclass ParameterDatum: ParameterDatum(const ParameterDatum&) -cdef extern from "gid_collection.h": - cppclass GIDCollectionDatum: - GIDCollectionDatum(const GIDCollectionDatum&) - - cppclass GIDCollectionIteratorDatum: - GIDCollectionIteratorDatum(const GIDCollectionIteratorDatum&) - +cdef extern from "gid_collection.h" namespace "nest": + cppclass GIDCollectionPTR: + GIDCollectionPTR() + cdef extern from "connection_id.h" namespace "nest": cppclass ConnectionID: ConnectionID(long, long, long, long) except + @@ -93,6 +90,15 @@ cdef extern from "nest_datums.h": long get_synapse_model_id() long get_port() + cppclass GIDCollectionDatum: + GIDCollectionDatum() + GIDCollectionDatum(const GIDCollectionDatum&) + GIDCollectionDatum(const GIDCollectionPTR&) + + cppclass GIDCollectionIteratorDatum: + GIDCollectionIteratorDatum(const GIDCollectionIteratorDatum&) + + cdef extern from "arraydatum.h": cppclass ArrayDatum: ArrayDatum() except + @@ -135,15 +141,27 @@ cdef extern from "tokenstack.h": # Supposed to be used only through the addr_tok macro Token* top() -cdef extern from "interpret.h": - cppclass SLIInterpreter: - SLIInterpreter() except + - int execute(const string&) except + - TokenStack OStack +cdef extern from "mpi_manager.h" namespace "nest": + cppclass MPIManager: + void mpi_finalize( int exitcode ) except + + +cdef extern from "kernel_manager.h" namespace "nest": + KernelManager& kernel() + cppclass KernelManager: + KernelManager() + void destroy_kernel_manager() + MPIManager mpi_manager + +cdef extern from "nest.h" namespace "nest": + void init_nest( int* argc, char** argv[] ) + GIDCollectionPTR create( const string model_name, const long n ) + +cdef extern from "pynestkernel_aux.h": + CYTHON_isConnectionGenerator( x ) + CYTHON_unpackConnectionGeneratorDatum( PyObject* obj ) + CYTHON_DEREF( x ) + CYTHON_ADDR( x ) -cdef extern from "neststartup.h": - int neststartup(int*, char***, SLIInterpreter&, string) except + - void nestshutdown(int) except + cdef extern from *: diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 8ba021f977..834450c131 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -156,23 +156,12 @@ cdef class SLILiteral(object): cdef class NESTEngine(object): - cdef SLIInterpreter* pEngine - - def __cinit__(self): - - self.pEngine = NULL - def __dealloc__(self): - nestshutdown( 0 ) - - del self.pEngine + kernel().mpi_manager.mpi_finalize( 0 ); + kernel().destroy_kernel_manager(); - self.pEngine = NULL - - def init(self, argv, modulepath): - if self.pEngine is not NULL: - raise NESTError("engine already initialized") + def init(self, argv): cdef int argc = len(argv) if argc <= 0: @@ -194,14 +183,14 @@ cdef class NESTEngine(object): for i, argvi in enumerate(argv_bytes): argv_chars[i] = argvi # c-string ref extracted - self.pEngine = new SLIInterpreter() - modulepath_bytes = modulepath.encode() + init_nest(&argc, &argv_chars) + + # PyNEST-NG + # nest::kernel().model_manager.get_modeldict() + # nest::kernel().model_manager.get_synapsedict() + # nest::kernel().connection_manager.get_connruledict() + # nest::kernel().sp_manager.get_growthcurvedict() - neststartup(&argc, - &argv_chars, - deref(self.pEngine), - modulepath_bytes) - # If using MPI, argv might now have changed, so rebuild it del argv[:] # Convert back from utf8 char* to utf8 str in both python2 & 3 @@ -211,36 +200,6 @@ cdef class NESTEngine(object): return True - def run(self, cmd): - - if self.pEngine is NULL: - raise NESTError("engine uninitialized") - cdef string cmd_bytes - cmd_bytes = cmd.encode('utf-8') - self.pEngine.execute(cmd_bytes) - - def push(self, obj): - - if self.pEngine is NULL: - raise NESTError("engine uninitialized") - self.pEngine.OStack.push(python_object_to_datum(obj)) - - def pop(self): - - if self.pEngine is NULL: - raise NESTError("engine uninitialized") - - if self.pEngine.OStack.empty(): - raise NESTError("interpreter stack is empty") - - cdef Datum* dat = (addr_tok(self.pEngine.OStack.top())).datum() - - ret = sli_datum_to_object(dat) - - self.pEngine.OStack.pop() - - return ret - cdef inline Datum* python_object_to_datum(obj) except NULL: @@ -502,3 +461,78 @@ cdef inline object sli_vector_to_object(sli_vector_ptr_t dat, vector_value_t _ = return numpy.array([], dtype=ret_dtype) else: return arr + + + + + +################################################################################ +#### #### +#### PyNEST HL API #### +#### #### +################################################################################ + +from nest.lib.hl_api_helper import model_deprecation_warning, warnings + +def Create(string model, long n=1, params=None): + """Create n instances of type model. + + Parameters + ---------- + model : str + Name of the model to create + n : int, optional + Number of instances to create + params : TYPE, optional + Parameters for the new nodes. A single dictionary or a list of + dictionaries with size n. If omitted, the model's defaults are used. + + Returns + ------- + GIDCollection: + Object representing global IDs of created nodes + """ + + model_deprecation_warning(model) + + cdef GIDCollectionPTR gids = create(model, n) + cdef GIDCollectionDatum* gids_ = new GIDCollectionDatum(gids) + + datum = SLIDatum() + ( datum)._set_datum( new GIDCollectionDatum(gids), SLI_TYPE_GIDCOLLECTION.decode()) + + return datum +# +# if isinstance(params, dict): +# // same parameters for all nodes +# else: +# for i, node in enumerate(gids): +# SetStatus(node, params[i]) +# + + ### gids.set(params) +### +### if isinstance(params, dict): +### cmd = "/%s 3 1 roll exch Create" % model +####### sps(params) +### else: +### cmd = "/%s exch Create" % model +### +####### sps(n) +####### sr(cmd) +### +####### gids = spp() +### +### if params is not None and not isinstance(params, dict): +### try: +####### SetStatus(gids, params) +### pass +### except: +### warnings.warn( +### "SetStatus() call failed, but nodes have already been " + +### "created! The GIDs of the new nodes are: {0}.".format(gids)) +### raise +# datum = SLIDatum() +# ( datum)._set_datum( new GIDCollectionDatum(deref( gids)), SLI_TYPE_GIDCOLLECTION.decode()) +# +# return datum diff --git a/pynest/pynestkernel_aux.h b/pynest/pynestkernel_aux.h new file mode 100644 index 0000000000..4ba7dcfbab --- /dev/null +++ b/pynest/pynestkernel_aux.h @@ -0,0 +1,67 @@ +/* + * pynestkernel_aux.h + * + * This file is part of NEST. + * + * Copyright (C) 2004 The NEST Initiative + * + * NEST is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * NEST is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NEST. If not, see . + * + */ + +#ifndef PYNESTKERNEL_AUX_H +#define PYNESTKERNEL_AUX_H + +// Generated includes: +#include "config.h" + +#if defined( HAVE_LIBNEUROSIM ) + +// External includes: +#include + +// Includes from conngen: +#include "conngenmodule.h" + +// Includes from sli: +#include "datum.h" + +#define CYTHON_isConnectionGenerator( x ) PNS::isConnectionGenerator( x ) + +Datum* +CYTHON_unpackConnectionGeneratorDatum( PyObject* obj ) +{ + Datum* ret = NULL; + ConnectionGenerator* cg = NULL; + + cg = PNS::unpackConnectionGenerator( obj ); + if ( cg != NULL ) + { + ret = static_cast< Datum* >( new nest::ConnectionGeneratorDatum( cg ) ); + } + + return ret; +} + +#else // #if defined( HAVE_LIBNEUROSIM ) + +#define CYTHON_isConnectionGenerator( x ) 0 +#define CYTHON_unpackConnectionGeneratorDatum( x ) NULL + +#endif // #if defined( HAVE_LIBNEUROSIM ) + +#define CYTHON_DEREF( x ) ( *x ) +#define CYTHON_ADDR( x ) ( &x ) + +#endif // #ifndef PYNESTKERNEL_AUX_H diff --git a/pynest/pynestkernel_aux.h~ b/pynest/pynestkernel_aux.h~ new file mode 100644 index 0000000000..e8f8c1eb76 --- /dev/null +++ b/pynest/pynestkernel_aux.h~ @@ -0,0 +1,70 @@ +/* + * pynestkernel_aux.h + * + * This file is part of NEST. + * + * Copyright (C) 2004 The NEST Initiative + * + * NEST is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * NEST is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NEST. If not, see . + * + */ + +#ifndef PYNESTKERNEL_AUX_H +#define PYNESTKERNEL_AUX_H + +// Generated includes: +#include "config.h" + +#if defined( HAVE_LIBNEUROSIM ) + +// External includes: +#include + +// Includes from conngen: +#include "conngenmodule.h" + +// Includes from sli: +#include "datum.h" + +#define CYTHON_isConnectionGenerator( x ) PNS::isConnectionGenerator( x ) + +Datum* +CYTHON_unpackConnectionGeneratorDatum( PyObject* obj ) +{ + Datum* ret = NULL; + ConnectionGenerator* cg = NULL; + + cg = PNS::unpackConnectionGenerator( obj ); + if ( cg != NULL ) + { + ret = static_cast< Datum* >( new nest::ConnectionGeneratorDatum( cg ) ); + } + + return ret; +} +//Datum* CYTHON_unpackConnectionGeneratorDatum( PyObject* ); + +#else // #if defined( HAVE_LIBNEUROSIM ) + +#define CYTHON_isConnectionGenerator( x ) 0 +#define CYTHON_unpackConnectionGeneratorDatum( x ) NULL + +#endif // #if defined( HAVE_LIBNEUROSIM ) + +#define CYTHON_DEREF( x ) ( *x ) +#define CYTHON_ADDR( x ) ( &x ) + + + +#endif // #ifndef PYNESTKERNEL_AUX_H From 3bf09587f07014e94422cc301f512cf1d09fbdc2 Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Mon, 8 Nov 2021 16:14:00 +0100 Subject: [PATCH 003/375] Temporarily replace uncallable code by pass --- pynest/pynestkernel.pyx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index ce968a0d0a..ea48730a67 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -160,11 +160,13 @@ cdef class NESTEngine(object): kernel().destroy_kernel_manager(); def set_communicator(self, comm): + pass # extract mpi_comm from mpi4py - if nest_has_mpi4py(): - c_set_communicator(comm) - else: - raise NESTError("set_communicator: NEST not compiled with MPI4PY") + # TODO-PYNEST-NG: enable again after moving pertaining functions + #if nest_has_mpi4py(): + # c_set_communicator(comm) + #else: + # raise NESTError("set_communicator: NEST not compiled with MPI4PY") def init(self, argv): From fee65a5871b0409812859eee3b8a1a7561bfd55c Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Mon, 8 Nov 2021 16:27:14 +0100 Subject: [PATCH 004/375] Minimal Create function for new PyNEST LL-API --- pynest/pynestkernel.pyx | 70 ++--------------------------------------- 1 file changed, 3 insertions(+), 67 deletions(-) diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index ea48730a67..ce51298c6e 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -589,77 +589,13 @@ cdef inline object sli_vector_to_object(sli_vector_ptr_t dat, vector_value_t _ = return arr - - - ################################################################################ #### #### -#### PyNEST HL API #### +#### PyNEST LL API #### #### #### ################################################################################ -from nest.lib.hl_api_helper import model_deprecation_warning, warnings - -def Create(string model, long n=1, params=None): - """Create n instances of type model. - - Parameters - ---------- - model : str - Name of the model to create - n : int, optional - Number of instances to create - params : TYPE, optional - Parameters for the new nodes. A single dictionary or a list of - dictionaries with size n. If omitted, the model's defaults are used. - - Returns - ------- - NodeCollection: - Object representing global IDs of created nodes - """ - - model_deprecation_warning(model) - +def llapi_create(string model, long n=1): cdef NodeCollectionPTR gids = create(model, n) - cdef NodeCollectionDatum* gids_ = new NodeCollectionDatum(gids) - - datum = SLIDatum() - ( datum)._set_datum( new NodeCollectionDatum(gids), SLI_TYPE_NODECOLLECTION.decode()) + return NodeCollection(gids) - return datum - -# -# if isinstance(params, dict): -# // same parameters for all nodes -# else: -# for i, node in enumerate(gids): -# SetStatus(node, params[i]) -# - - ### gids.set(params) -### -### if isinstance(params, dict): -### cmd = "/%s 3 1 roll exch Create" % model -####### sps(params) -### else: -### cmd = "/%s exch Create" % model -### -####### sps(n) -####### sr(cmd) -### -####### gids = spp() -### -### if params is not None and not isinstance(params, dict): -### try: -####### SetStatus(gids, params) -### pass -### except: -### warnings.warn( -### "SetStatus() call failed, but nodes have already been " + -### "created! The GIDs of the new nodes are: {0}.".format(gids)) -### raise -# datum = SLIDatum() -# ( datum)._set_datum( new NodeCollectionDatum(deref( gids)), SLI_TYPE_NODECOLLECTION.decode()) -# -# return datum From 6bfef59b4d18ca69554574374deed9fcae313ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 10 Nov 2021 15:12:19 +0100 Subject: [PATCH 005/375] Create nodes and print NodeCollection works --- nestkernel/CMakeLists.txt | 1 + nestkernel/nest.cpp | 17 + nestkernel/nest.h | 2 + pynest/nest/__init__.py | 572 +++++++++++++------------- pynest/nest/lib/hl_api_nodes.py | 11 +- pynest/nest/lib/hl_api_simulation.py | 2 + pynest/nest/lib/hl_api_types.py | 11 +- pynest/nest/ll_api.py | 287 +------------ pynest/nest/logic/hl_api_logic.py | 1 - pynest/nest/math/hl_api_math.py | 1 - pynest/nest/spatial/hl_api_spatial.py | 1 - pynest/pynestkernel.pxd | 12 +- pynest/pynestkernel.pyx | 20 +- 13 files changed, 355 insertions(+), 583 deletions(-) diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt index 916fd92bf2..a310d5fe0d 100644 --- a/nestkernel/CMakeLists.txt +++ b/nestkernel/CMakeLists.txt @@ -72,6 +72,7 @@ set ( nestkernel_sources music_rate_in_handler.h music_rate_in_handler.cpp music_manager.cpp music_manager.h nest.h nest_impl.h nest.cpp + ../models/iaf_psc_alpha.h ../models/iaf_psc_alpha.cpp synaptic_element.h synaptic_element.cpp growth_curve.h growth_curve.cpp growth_curve_factory.h diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index d0f15f3479..db3255111d 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -31,6 +31,13 @@ #include "mpi_manager_impl.h" #include "parameter.h" +#include "../models/iaf_psc_alpha.h" + +#include "model_manager.h" +#include "model_manager_impl.h" +#include "genericmodel_impl.h" + + // Includes from sli: #include "sliexceptions.h" #include "token.h" @@ -44,6 +51,7 @@ init_nest( int* argc, char** argv[] ) KernelManager::create_kernel_manager(); kernel().mpi_manager.init_mpi( argc, argv ); kernel().initialize(); + kernel().model_manager.register_node_model< iaf_psc_alpha >( "iaf_psc_alpha" ); } void @@ -80,6 +88,15 @@ print_nodes_to_stream( std::ostream& ostr ) kernel().node_manager.print( ostr ); } +std::string +pprint_to_string( NodeCollectionPTR nc ) +{ + std::stringstream stream; + nc->print_me( stream ); + return stream.str(); +} + + RngPtr get_rank_synced_rng() { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index eff18b2247..995f8ef18b 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -94,6 +94,8 @@ void register_secondary_connection_model( const std::string& name, void print_nodes_to_stream( std::ostream& out = std::cout ); +std::string pprint_to_string( NodeCollectionPTR nc ); + RngPtr get_rank_synced_rng(); RngPtr get_vp_synced_rng( thread tid ); RngPtr get_vp_specific_rng( thread tid ); diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py index eac6e020a4..614365b0fd 100644 --- a/pynest/nest/__init__.py +++ b/pynest/nest/__init__.py @@ -42,7 +42,7 @@ # instance later on. Use `.copy()` to prevent pollution with other variables _original_module_attrs = globals().copy() -from .ll_api import KernelAttribute # noqa +# from .ll_api import KernelAttribute # noqa TODO-PYNEST-NG: Enable again when it works without SLI import sys # noqa import types # noqa import importlib # noqa @@ -101,11 +101,13 @@ class NestModule(types.ModuleType): from . import spatial_distributions # noqa from . import logic # noqa - __version__ = ll_api.sli_func("statusdict /version get") + # __version__ = ll_api.sli_func("statusdict /version get") + __version__ = "NO SLI" # Lazy load the `spatial` module to avoid circular imports. spatial = _lazy_module_property("spatial") + # TODO-PYNEST-NG: Enable again when KernelAttribute works without SLI # Define the kernel attributes. # # FORMATTING NOTES: @@ -115,289 +117,289 @@ class NestModule(types.ModuleType): # * Do not end docstrings with punctuation. A `.` or `,` is added by the # formatting logic. - kernel_status = KernelAttribute( - "dict", "Get the complete kernel status", readonly=True - ) - resolution = KernelAttribute( - "float", "The resolution of the simulation (in ms)", default=0.1 - ) - biological_time = KernelAttribute( - "float", "The current simulation time (in ms)" - ) - to_do = KernelAttribute( - "int", "The number of steps yet to be simulated", readonly=True - ) - max_delay = KernelAttribute( - "float", "The maximum delay in the network", default=0.1 - ) - min_delay = KernelAttribute( - "float", "The minimum delay in the network", default=0.1 - ) - ms_per_tic = KernelAttribute( - "float", "The number of milliseconds per tic", default=0.001 - ) - tics_per_ms = KernelAttribute( - "float", "The number of tics per millisecond", default=1000.0 - ) - tics_per_step = KernelAttribute( - "int", "The number of tics per simulation time step", default=100 - ) - T_max = KernelAttribute( - "float", "The largest representable time value", readonly=True - ) - T_min = KernelAttribute( - "float", "The smallest representable time value", readonly=True - ) - rng_types = KernelAttribute( - "list[str]", - "List of available random number generator types", - readonly=True, - ) - rng_type = KernelAttribute( - "str", - "Name of random number generator type used by NEST", - default="mt19937_64", - ) - rng_seed = KernelAttribute( - "int", - ( - "Seed value used as base for seeding NEST random number generators " - + r"(:math:`1 \leq s\leq 2^{32}-1`)" - ), - default=143202461, - ) - total_num_virtual_procs = KernelAttribute( - "int", "The total number of virtual processes", default=1 - ) - local_num_threads = KernelAttribute( - "int", "The local number of threads", default=1 - ) - num_processes = KernelAttribute( - "int", "The number of MPI processes", readonly=True - ) - off_grid_spiking = KernelAttribute( - "bool", - "Whether to transmit precise spike times in MPI communication", - readonly=True, - ) - adaptive_spike_buffers = KernelAttribute( - "bool", - "Whether MPI buffers for communication of spikes resize on the fly", - default=True, - ) - adaptive_target_buffers = KernelAttribute( - "bool", - "Whether MPI buffers for communication of connections resize on the fly", - default=True, - ) - buffer_size_secondary_events = KernelAttribute( - "int", - ( - "Size of MPI buffers for communicating secondary events " - + "(in bytes, per MPI rank, for developers)" - ), - readonly=True, - ) - buffer_size_spike_data = KernelAttribute( - "int", - "Total size of MPI buffer for communication of spikes", - default=2, - ) - buffer_size_target_data = KernelAttribute( - "int", - "Total size of MPI buffer for communication of connections", - default=2, - ) - growth_factor_buffer_spike_data = KernelAttribute( - "float", - ( - "If MPI buffers for communication of spikes resize on the fly, " - + "grow them by this factor each round" - ), - default=1.5, - ) - growth_factor_buffer_target_data = KernelAttribute( - "float", - ( - "If MPI buffers for communication of connections resize on the " - + "fly, grow them by this factor each round" - ), - default=1.5, - ) - max_buffer_size_spike_data = KernelAttribute( - "int", - "Maximal size of MPI buffers for communication of spikes", - default=8388608, - ) - max_buffer_size_target_data = KernelAttribute( - "int", - "Maximal size of MPI buffers for communication of connections", - default=16777216, - ) - use_wfr = KernelAttribute( - "bool", "Whether to use waveform relaxation method", default=True - ) - wfr_comm_interval = KernelAttribute( - "float", - "Desired waveform relaxation communication interval", - default=1.0, - ) - wfr_tol = KernelAttribute( - "float", - "Convergence tolerance of waveform relaxation method", - default=0.0001, - ) - wfr_max_iterations = KernelAttribute( - "int", - "Maximal number of iterations used for waveform relaxation", - default=15, - ) - wfr_interpolation_order = KernelAttribute( - "int", - "Interpolation order of polynomial used in wfr iterations", - default=3 - ) - max_num_syn_models = KernelAttribute( - "int", "Maximal number of synapse models supported", readonly=True - ) - sort_connections_by_source = KernelAttribute( - "bool", - ( - "Whether to sort connections by their source; increases" - + " construction time of presynaptic data structures, decreases" - + " simulation time if the average number of outgoing connections" - + " per neuron is smaller than the total number of threads" - ), - default=True, - ) - structural_plasticity_synapses = KernelAttribute( - "dict", - ( - "Defines all synapses which are plastic for the structural" - + " plasticity algorithm. Each entry in the dictionary is composed" - + " of a synapse model, the presynaptic element and the" - + " postsynaptic element" - ), - ) - structural_plasticity_update_interval = KernelAttribute( - "int", - ( - "Defines the time interval in ms at which the structural plasticity" - + " manager will make changes in the structure of the network (" - + " creation and deletion of plastic synapses)" - ), - default=10000.0, - ) - use_compressed_spikes = KernelAttribute( - "bool", - ( - "Whether to use spike compression; if a neuron has targets on" - + " multiple threads of a process, this switch makes sure that only" - + " a single packet is sent to the process instead of one packet" - + " per target thread; requires" - + " ``nest.sort_connections_by_source = True``" - ), - default=True, - ) - data_path = KernelAttribute( - "str", - "A path, where all data is written to, defaults to current directory", - ) - data_prefix = KernelAttribute("str", "A common prefix for all data files") - overwrite_files = KernelAttribute( - "bool", "Whether to overwrite existing data files", default=False - ) - print_time = KernelAttribute( - "bool", - "Whether to print progress information during the simulation", - default=False, - ) - network_size = KernelAttribute( - "int", "The number of nodes in the network", readonly=True - ) - num_connections = KernelAttribute( - "int", - "The number of connections in the network", - readonly=True, - localonly=True, - ) - local_spike_counter = KernelAttribute( - "int", - ( - "Number of spikes fired by neurons on a given MPI rank during the" - + " most recent call to :py:func:`.Simulate`. Only spikes from" - + " \"normal\" neurons are counted, not spikes generated by devices" - + " such as ``poisson_generator``" - ), - readonly=True, - ) - recording_backends = KernelAttribute( - "dict[str, dict]", - ( - "Dict of backends for recording devices. Each recording backend can" - + " have a set of global parameters that can be modified through" - + " this attribute by passing a dictionary with the name of the" - + " recording backend as key and a dictionary with the global" - + " parameters to be overwritten as value.\n\n" - + "Example\n" - + "~~~~~~~\n\n" - + "Please note that NEST must be compiled with SionLIB for the" - + " ``sionlib`` backend to be available.\n\n" - + ".. code-block:: python\n\n" - + " nest.recording_backends = dict(sionlib=dict(buffer_size=1024))" - + "\n\n" - + ".. seealso:: The valid global parameters are listed in the" - + " documentation of each recording backend" - ), - ) - dict_miss_is_error = KernelAttribute( - "bool", - "Whether missed dictionary entries are treated as errors", - default=True, - ) - keep_source_table = KernelAttribute( - "bool", - "Whether to keep source table after connection setup is complete", - default=True, - ) - min_update_time = KernelAttribute( - "float", - "Shortest wall-clock time measured so far for a full update step [seconds]", - readonly=True, - ) - max_update_time = KernelAttribute( - "float", - "Longest wall-clock time measured so far for a full update step [seconds]", - readonly=True, - ) - update_time_limit = KernelAttribute( - "float", - ( - "Maximum wall-clock time for one full update step [seconds]." - + " This can be used to terminate simulations that slow down" - + " significantly. Simulations may still get stuck if the slowdown" - + " occurs within a single update step" - ), - default=float("+inf"), - ) - - _kernel_attr_names = set( - k for k, v in vars().items() if isinstance(v, KernelAttribute) - ) - _readonly_kernel_attrs = set( - k for k, v in vars().items() if isinstance(v, KernelAttribute) and v._readonly - ) - - def set(self, **kwargs): - return self.SetKernelStatus(kwargs) - - def get(self, *args): - if len(args) == 0: - return self.GetKernelStatus() - if len(args) == 1: - return self.GetKernelStatus(args[0]) - else: - return self.GetKernelStatus(args) + # kernel_status = KernelAttribute( + # "dict", "Get the complete kernel status", readonly=True + # ) + # resolution = KernelAttribute( + # "float", "The resolution of the simulation (in ms)", default=0.1 + # ) + # biological_time = KernelAttribute( + # "float", "The current simulation time (in ms)" + # ) + # to_do = KernelAttribute( + # "int", "The number of steps yet to be simulated", readonly=True + # ) + # max_delay = KernelAttribute( + # "float", "The maximum delay in the network", default=0.1 + # ) + # min_delay = KernelAttribute( + # "float", "The minimum delay in the network", default=0.1 + # ) + # ms_per_tic = KernelAttribute( + # "float", "The number of milliseconds per tic", default=0.001 + # ) + # tics_per_ms = KernelAttribute( + # "float", "The number of tics per millisecond", default=1000.0 + # ) + # tics_per_step = KernelAttribute( + # "int", "The number of tics per simulation time step", default=100 + # ) + # T_max = KernelAttribute( + # "float", "The largest representable time value", readonly=True + # ) + # T_min = KernelAttribute( + # "float", "The smallest representable time value", readonly=True + # ) + # rng_types = KernelAttribute( + # "list[str]", + # "List of available random number generator types", + # readonly=True, + # ) + # rng_type = KernelAttribute( + # "str", + # "Name of random number generator type used by NEST", + # default="mt19937_64", + # ) + # rng_seed = KernelAttribute( + # "int", + # ( + # "Seed value used as base for seeding NEST random number generators " + # + r"(:math:`1 \leq s\leq 2^{32}-1`)" + # ), + # default=143202461, + # ) + # total_num_virtual_procs = KernelAttribute( + # "int", "The total number of virtual processes", default=1 + # ) + # local_num_threads = KernelAttribute( + # "int", "The local number of threads", default=1 + # ) + # num_processes = KernelAttribute( + # "int", "The number of MPI processes", readonly=True + # ) + # off_grid_spiking = KernelAttribute( + # "bool", + # "Whether to transmit precise spike times in MPI communication", + # readonly=True, + # ) + # adaptive_spike_buffers = KernelAttribute( + # "bool", + # "Whether MPI buffers for communication of spikes resize on the fly", + # default=True, + # ) + # adaptive_target_buffers = KernelAttribute( + # "bool", + # "Whether MPI buffers for communication of connections resize on the fly", + # default=True, + # ) + # buffer_size_secondary_events = KernelAttribute( + # "int", + # ( + # "Size of MPI buffers for communicating secondary events " + # + "(in bytes, per MPI rank, for developers)" + # ), + # readonly=True, + # ) + # buffer_size_spike_data = KernelAttribute( + # "int", + # "Total size of MPI buffer for communication of spikes", + # default=2, + # ) + # buffer_size_target_data = KernelAttribute( + # "int", + # "Total size of MPI buffer for communication of connections", + # default=2, + # ) + # growth_factor_buffer_spike_data = KernelAttribute( + # "float", + # ( + # "If MPI buffers for communication of spikes resize on the fly, " + # + "grow them by this factor each round" + # ), + # default=1.5, + # ) + # growth_factor_buffer_target_data = KernelAttribute( + # "float", + # ( + # "If MPI buffers for communication of connections resize on the " + # + "fly, grow them by this factor each round" + # ), + # default=1.5, + # ) + # max_buffer_size_spike_data = KernelAttribute( + # "int", + # "Maximal size of MPI buffers for communication of spikes", + # default=8388608, + # ) + # max_buffer_size_target_data = KernelAttribute( + # "int", + # "Maximal size of MPI buffers for communication of connections", + # default=16777216, + # ) + # use_wfr = KernelAttribute( + # "bool", "Whether to use waveform relaxation method", default=True + # ) + # wfr_comm_interval = KernelAttribute( + # "float", + # "Desired waveform relaxation communication interval", + # default=1.0, + # ) + # wfr_tol = KernelAttribute( + # "float", + # "Convergence tolerance of waveform relaxation method", + # default=0.0001, + # ) + # wfr_max_iterations = KernelAttribute( + # "int", + # "Maximal number of iterations used for waveform relaxation", + # default=15, + # ) + # wfr_interpolation_order = KernelAttribute( + # "int", + # "Interpolation order of polynomial used in wfr iterations", + # default=3 + # ) + # max_num_syn_models = KernelAttribute( + # "int", "Maximal number of synapse models supported", readonly=True + # ) + # sort_connections_by_source = KernelAttribute( + # "bool", + # ( + # "Whether to sort connections by their source; increases" + # + " construction time of presynaptic data structures, decreases" + # + " simulation time if the average number of outgoing connections" + # + " per neuron is smaller than the total number of threads" + # ), + # default=True, + # ) + # structural_plasticity_synapses = KernelAttribute( + # "dict", + # ( + # "Defines all synapses which are plastic for the structural" + # + " plasticity algorithm. Each entry in the dictionary is composed" + # + " of a synapse model, the presynaptic element and the" + # + " postsynaptic element" + # ), + # ) + # structural_plasticity_update_interval = KernelAttribute( + # "int", + # ( + # "Defines the time interval in ms at which the structural plasticity" + # + " manager will make changes in the structure of the network (" + # + " creation and deletion of plastic synapses)" + # ), + # default=10000.0, + # ) + # use_compressed_spikes = KernelAttribute( + # "bool", + # ( + # "Whether to use spike compression; if a neuron has targets on" + # + " multiple threads of a process, this switch makes sure that only" + # + " a single packet is sent to the process instead of one packet" + # + " per target thread; requires" + # + " ``nest.sort_connections_by_source = True``" + # ), + # default=True, + # ) + # data_path = KernelAttribute( + # "str", + # "A path, where all data is written to, defaults to current directory", + # ) + # data_prefix = KernelAttribute("str", "A common prefix for all data files") + # overwrite_files = KernelAttribute( + # "bool", "Whether to overwrite existing data files", default=False + # ) + # print_time = KernelAttribute( + # "bool", + # "Whether to print progress information during the simulation", + # default=False, + # ) + # network_size = KernelAttribute( + # "int", "The number of nodes in the network", readonly=True + # ) + # num_connections = KernelAttribute( + # "int", + # "The number of connections in the network", + # readonly=True, + # localonly=True, + # ) + # local_spike_counter = KernelAttribute( + # "int", + # ( + # "Number of spikes fired by neurons on a given MPI rank during the" + # + " most recent call to :py:func:`.Simulate`. Only spikes from" + # + " \"normal\" neurons are counted, not spikes generated by devices" + # + " such as ``poisson_generator``" + # ), + # readonly=True, + # ) + # recording_backends = KernelAttribute( + # "dict[str, dict]", + # ( + # "Dict of backends for recording devices. Each recording backend can" + # + " have a set of global parameters that can be modified through" + # + " this attribute by passing a dictionary with the name of the" + # + " recording backend as key and a dictionary with the global" + # + " parameters to be overwritten as value.\n\n" + # + "Example\n" + # + "~~~~~~~\n\n" + # + "Please note that NEST must be compiled with SionLIB for the" + # + " ``sionlib`` backend to be available.\n\n" + # + ".. code-block:: python\n\n" + # + " nest.recording_backends = dict(sionlib=dict(buffer_size=1024))" + # + "\n\n" + # + ".. seealso:: The valid global parameters are listed in the" + # + " documentation of each recording backend" + # ), + # ) + # dict_miss_is_error = KernelAttribute( + # "bool", + # "Whether missed dictionary entries are treated as errors", + # default=True, + # ) + # keep_source_table = KernelAttribute( + # "bool", + # "Whether to keep source table after connection setup is complete", + # default=True, + # ) + # min_update_time = KernelAttribute( + # "float", + # "Shortest wall-clock time measured so far for a full update step [seconds]", + # readonly=True, + # ) + # max_update_time = KernelAttribute( + # "float", + # "Longest wall-clock time measured so far for a full update step [seconds]", + # readonly=True, + # ) + # update_time_limit = KernelAttribute( + # "float", + # ( + # "Maximum wall-clock time for one full update step [seconds]." + # + " This can be used to terminate simulations that slow down" + # + " significantly. Simulations may still get stuck if the slowdown" + # + " occurs within a single update step" + # ), + # default=float("+inf"), + # ) + + # _kernel_attr_names = set( + # k for k, v in vars().items() if isinstance(v, KernelAttribute) + # ) + # _readonly_kernel_attrs = set( + # k for k, v in vars().items() if isinstance(v, KernelAttribute) and v._readonly + # ) + + # def set(self, **kwargs): + # return self.SetKernelStatus(kwargs) + + # def get(self, *args): + # if len(args) == 0: + # return self.GetKernelStatus() + # if len(args) == 1: + # return self.GetKernelStatus(args[0]) + # else: + # return self.GetKernelStatus(args) def __dir__(self): return list(set(vars(self).keys()) | set(self.__all__)) diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index e8a1ebf9a2..823c454284 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -119,16 +119,7 @@ def Create(model, n=1, params=None, positions=None): if isinstance(params, dict) and params: # if params is a dict and not empty iterable_or_parameter_in_params = any(is_iterable(v) or isinstance(v, Parameter) for k, v in params.items()) - if not iterable_or_parameter_in_params: - cmd = "/%s 3 1 roll exch Create" % model - sps(params) - else: - cmd = "/%s exch Create" % model - - sps(n) - sr(cmd) - - node_ids = spp() + node_ids = kernel.llapi_create(model.encode('utf8'), n) if params is not None and iterable_or_parameter_in_params: try: diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index a46a1d623d..f311f570ed 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -26,6 +26,8 @@ from contextlib import contextmanager import warnings +from .. import pynestkernel as kernel + from ..ll_api import * from .hl_api_helper import * from .hl_api_parallel_computing import Rank diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index ca4560edc3..44e72e5f91 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -187,16 +187,13 @@ class NodeCollection(object): def __init__(self, data=None): if data is None: data = [] - if isinstance(data, kernel.SLIDatum): - if data.dtype != "nodecollectiontype": - raise TypeError("Need NodeCollection Datum.") + if isinstance(data, kernel.NodeCollectionObject): self._datum = data else: # Data from user, must be converted to datum # Data can be anything that can be converted to a NodeCollection, # such as list, tuple, etc. - nc = sli_func('cvnodecollection', data) - self._datum = nc._datum + nc = kernel.make_nodecollection(data) # TODO-PYNEST-NG: implement def __iter__(self): return NodeCollectionIterator(self) @@ -284,10 +281,10 @@ def __len__(self): return sli_func('size', self._datum) def __str__(self): - return sli_func('pcvs', self._datum) + return kernel.llapi_to_string(self._datum).decode('utf8') def __repr__(self): - return sli_func('pcvs', self._datum) + return self.__str__() def get(self, *params, **kwargs): """ diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py index 88330d50f6..4ab0619581 100644 --- a/pynest/nest/ll_api.py +++ b/pynest/nest/ll_api.py @@ -52,273 +52,22 @@ 'check_stack', 'connect_arrays', 'set_communicator', - 'get_debug', - 'set_debug', - 'sli_func', - 'sli_pop', - 'sli_push', - 'sli_run', - 'spp', - 'sps', - 'sr', - 'stack_checker', 'take_array_index', - 'KernelAttribute', + # 'KernelAttribute', TODO-PYNEST-NG: Enable again when it works without SLI ] engine = kernel.NESTEngine() -sli_push = sps = engine.push -sli_pop = spp = engine.pop take_array_index = engine.take_array_index connect_arrays = engine.connect_arrays -def catching_sli_run(cmd): - """Send a command string to the NEST kernel to be executed, catch - SLI errors and re-raise them in Python. - - Parameters - ---------- - cmd : str - The SLI command to be executed. - Raises - ------ - kernel.NESTError - SLI errors are bubbled to the Python API as NESTErrors. - """ - - if sys.version_info >= (3, ): - def encode(s): - return s - - def decode(s): - return s - else: - def encode(s): - return s.encode('utf-8') - - def decode(s): - return s.decode('utf-8') - - engine.run('{%s} runprotected' % decode(cmd)) - if not sli_pop(): - errorname = sli_pop() - message = sli_pop() - commandname = sli_pop() - engine.run('clear') - - exceptionCls = getattr(kernel.NESTErrors, errorname) - raise exceptionCls(commandname, message) - - -sli_run = sr = catching_sli_run - - -def sli_func(s, *args, **kwargs): - """Convenience function for executing an SLI command s with - arguments args. - - This executes the SLI sequence: - ``sli_push(args); sli_run(s); y=sli_pop()`` - - Parameters - ---------- - s : str - Function to call - *args - Arbitrary number of arguments to pass to the SLI function - **kwargs - namespace : str - The sli code is executed in the given SLI namespace. - litconv : bool - Convert string args beginning with / to literals. - - Returns - ------- - The function may have multiple return values. The number of return values - is determined by the SLI function that was called. - - Examples - -------- - r,q = sli_func('dup rollu add',2,3) - r = sli_func('add',2,3) - r = sli_func('add pop',2,3) - """ - - # check for namespace - slifun = 'sli_func' # version not converting to literals - if 'namespace' in kwargs: - s = kwargs['namespace'] + ' using ' + s + ' endusing' - elif 'litconv' in kwargs: - if kwargs['litconv']: - slifun = 'sli_func_litconv' - elif len(kwargs) > 0: - raise kernel.NESTErrors.PyNESTError( - "'namespace' and 'litconv' are the only valid keyword arguments.") - - sli_push(args) # push array of arguments on SLI stack - sli_push(s) # push command string - sli_run(slifun) # SLI support code to execute s on args - r = sli_pop() # return value is an array - - if len(r) == 1: # 1 return value is no tuple - return r[0] - - if len(r) != 0: - return r - - -__debug = False - - -def get_debug(): - """Return the current value of the debug flag of the low-level API. - - Returns - ------- - bool: - current value of the debug flag - """ - - return __debug - - -def set_debug(dbg=True): - """Set the debug flag of the low-level API. - - Parameters - ---------- - dbg : bool, optional - Value to set the debug flag to - """ - - global __debug - __debug = dbg - - -def stack_checker(f): - """Decorator to add stack checks to functions using PyNEST's - low-level API. - - This decorator works only on functions. See - check_stack() for the generic version for functions and - classes. - - Parameters - ---------- - f : function - Function to decorate - - Returns - ------- - function: - Decorated function - - Raises - ------ - kernel.NESTError - """ - - @functools.wraps(f) - def stack_checker_func(*args, **kwargs): - if not get_debug(): - return f(*args, **kwargs) - else: - sr('count') - stackload_before = spp() - result = f(*args, **kwargs) - sr('count') - num_leftover_elements = spp() - stackload_before - if num_leftover_elements != 0: - eargs = (f.__name__, num_leftover_elements) - etext = "Function '%s' left %i elements on the stack." - raise kernel.NESTError(etext % eargs) - return result - - return stack_checker_func - - -def check_stack(thing): - """Convenience wrapper for applying the stack_checker decorator to - all class methods of the given class, or to a given function. - - If the object cannot be decorated, it is returned unchanged. - - Parameters - ---------- - thing : function or class - Description - - Returns - ------- - function or class - Decorated function or class - - Raises - ------ - ValueError - """ - - if inspect.isfunction(thing): - return stack_checker(thing) - elif inspect.isclass(thing): - for name, mtd in inspect.getmembers(thing, predicate=inspect.ismethod): - if name.startswith("test_"): - setattr(thing, name, stack_checker(mtd)) - return thing - else: - raise ValueError("unable to decorate {0}".format(thing)) - - -class KernelAttribute: - """ - Descriptor that dispatches attribute access to the nest kernel. - """ - def __init__(self, typehint, description, readonly=False, default=None, localonly=False): - self._readonly = readonly - self._localonly = localonly - self._default = default - - readonly = readonly and "**read only**" - localonly = localonly and "**local only**" - - self.__doc__ = ( - description - + ("." if default is None else f", defaults to ``{default}``.") - + ("\n\n" if readonly or localonly else "") - + ", ".join(c for c in (readonly, localonly) if c) - + f"\n\n:type: {typehint}" - ) - - def __set_name__(self, cls, name): - self._name = name - self._full_status = name == "kernel_status" - - @stack_checker - def __get__(self, instance, cls=None): - if instance is None: - return self - - sr('GetKernelStatus') - status_root = spp() - - if self._full_status: - return status_root - else: - return status_root[self._name] - - @stack_checker - def __set__(self, instance, value): - if self._readonly: - msg = f"`{self._name}` is a read only kernel attribute." - raise AttributeError(msg) - sps({self._name: value}) - sr('SetKernelStatus') +initialized = False -initialized = False +def check_stack(thing): # # TODO-PYNEST-NG: remove + return thing def set_communicator(comm): @@ -384,24 +133,26 @@ def init(argv): nest_argv.append("--debug") path = os.path.dirname(__file__) - initialized = engine.init(nest_argv, path) + initialized = engine.init(nest_argv) if initialized: if not quiet: - engine.run("pywelcome") + print('NEST initialized successfully!') # TODO-PYNEST-NG: Implement welcome in Python + # engine.run("pywelcome") + # TODO-PYNEST-NG: Enable again when it works without SLI # Dirty hack to get tab-completion for models in IPython. - try: - __IPYTHON__ - except NameError: - pass - else: - try: - import keyword - from .lib.hl_api_models import Models # noqa - keyword.kwlist += Models() - except ImportError: - pass + # try: + # __IPYTHON__ + # except NameError: + # pass + # else: + # try: + # import keyword + # from .lib.hl_api_models import Models # noqa + # keyword.kwlist += Models() + # except ImportError: + # pass else: raise kernel.NESTErrors.PyNESTError("Initialization of NEST failed.") diff --git a/pynest/nest/logic/hl_api_logic.py b/pynest/nest/logic/hl_api_logic.py index 38811e80ca..2f22b5a41e 100644 --- a/pynest/nest/logic/hl_api_logic.py +++ b/pynest/nest/logic/hl_api_logic.py @@ -19,7 +19,6 @@ # You should have received a copy of the GNU General Public License # along with NEST. If not, see . -from ..ll_api import sli_func from ..lib.hl_api_types import CreateParameter __all__ = [ diff --git a/pynest/nest/math/hl_api_math.py b/pynest/nest/math/hl_api_math.py index 554d46b177..682d7f574b 100644 --- a/pynest/nest/math/hl_api_math.py +++ b/pynest/nest/math/hl_api_math.py @@ -19,7 +19,6 @@ # You should have received a copy of the GNU General Public License # along with NEST. If not, see . -from ..ll_api import sli_func __all__ = [ 'exp', diff --git a/pynest/nest/spatial/hl_api_spatial.py b/pynest/nest/spatial/hl_api_spatial.py index b660c96bfe..cd018d86e8 100644 --- a/pynest/nest/spatial/hl_api_spatial.py +++ b/pynest/nest/spatial/hl_api_spatial.py @@ -21,7 +21,6 @@ import numpy as np from ..lib.hl_api_types import CreateParameter, Parameter -from ..ll_api import sli_func __all__ = [ 'distance', diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 5f605fd184..92ee3dfefd 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -70,9 +70,11 @@ cdef extern from "parameter.h": cppclass ParameterDatum: ParameterDatum(const ParameterDatum&) -cdef extern from "node_collection.h": +cdef extern from "node_collection.h" namespace "nest": cppclass NodeCollectionPTR: NodeCollectionPTR() + +cdef extern from "node_collection.h": cppclass NodeCollectionDatum: NodeCollectionDatum(const NodeCollectionDatum&) @@ -94,11 +96,6 @@ cdef extern from "nest_datums.h": long get_synapse_model_id() long get_port() - cppclass NodeCollectionDatum: - NodeCollectionDatum() - NodeCollectionDatum(const NodeCollectionDatum&) - NodeCollectionDatum(const NodeCollectionPTR&) - cppclass NodeCollectionIteratorDatum: NodeCollectionIteratorDatum(const NodeCollectionIteratorDatum&) @@ -159,6 +156,7 @@ cdef extern from "kernel_manager.h" namespace "nest": cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) NodeCollectionPTR create( const string model_name, const long n ) + string pprint_to_string( NodeCollectionPTR nc ) cdef extern from "pynestkernel_aux.h": CYTHON_isConnectionGenerator( x ) @@ -166,7 +164,7 @@ cdef extern from "pynestkernel_aux.h": CYTHON_DEREF( x ) CYTHON_ADDR( x ) -# TODO-PYNEST-NG: Move these from neststartup to mpimanager +# TODO-PYNEST-NG: Move these from neststartup to mpimanager # cdef extern from "neststartup.h": # cbool nest_has_mpi4py() # void c_set_communicator "set_communicator" (object) with gil diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index ce51298c6e..d77385faa9 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -81,6 +81,17 @@ except ImportError: pass +cdef class NodeCollectionObject(object): + + cdef NodeCollectionPTR thisptr + + def __repr__(self): + return "" + + cdef _set_nc(self, NodeCollectionPTR nc): + self.thisptr = nc + + cdef class SLIDatum(object): cdef Datum* thisptr @@ -588,14 +599,17 @@ cdef inline object sli_vector_to_object(sli_vector_ptr_t dat, vector_value_t _ = else: return arr - ################################################################################ #### #### #### PyNEST LL API #### #### #### ################################################################################ -def llapi_create(string model, long n=1): +def llapi_create(string model, long n): cdef NodeCollectionPTR gids = create(model, n) - return NodeCollection(gids) + obj = NodeCollectionObject() + obj._set_nc(gids) + return nest.NodeCollection(obj) +def llapi_to_string(NodeCollectionObject nc): + return pprint_to_string(nc.thisptr) From a2323914e6310e57ce7d9163070deb3ae93c3297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 22 Dec 2021 13:11:42 +0100 Subject: [PATCH 006/375] Added first implementation of C++ dictionary To replace DictionaryDatum. --- libnestutil/CMakeLists.txt | 1 + libnestutil/dictionary.h | 76 ++++++++++++++++++++++++++++ nestkernel/nest.cpp | 9 ++-- nestkernel/nest.h | 3 +- nestkernel/nestmodule.cpp | 4 +- pynest/nest/lib/hl_api_simulation.py | 3 +- pynest/pynestkernel.pxd | 26 ++++++++++ pynest/pynestkernel.pyx | 31 ++++++++++++ 8 files changed, 145 insertions(+), 8 deletions(-) create mode 100644 libnestutil/dictionary.h diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt index 067c64150f..d2e77a5291 100644 --- a/libnestutil/CMakeLists.txt +++ b/libnestutil/CMakeLists.txt @@ -20,6 +20,7 @@ set( nestutil_sources beta_normalization_factor.h block_vector.h + dictionary.h dict_util.h enum_bitfield.h iterator_pair.h diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h new file mode 100644 index 0000000000..fe8b9cda22 --- /dev/null +++ b/libnestutil/dictionary.h @@ -0,0 +1,76 @@ +/* + * dictionary.h + * + * This file is part of NEST. + * + * Copyright (C) 2004 The NEST Initiative + * + * NEST is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * NEST is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NEST. If not, see . + * + */ + +#ifndef DICTIONARY_H_ +#define DICTIONARY_H_ + +#include +#include +#include +#include + +using dictionary = std::map< std::string, boost::any >; + +// int +inline bool +is_int( const boost::any& operand ) +{ + return operand.type() == typeid( int ); +} + +// double +inline bool +is_double( const boost::any& operand ) +{ + return operand.type() == typeid( double ); +} + +// string +inline bool +is_string( const boost::any& operand ) +{ + return operand.type() == typeid( std::string ); +} + +// vector of ints +inline bool +is_int_vector( const boost::any& operand ) +{ + return operand.type() == typeid( std::vector< int > ); +} + +// vector of doubles +inline bool +is_double_vector( const boost::any& operand ) +{ + return operand.type() == typeid( std::vector< double > ); +} + +// dict +inline bool +is_dict( const boost::any& operand ) +{ + return operand.type() == typeid( dictionary ); +} + + +#endif /* DICTIONARY_H_ */ diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index db3255111d..c51c882d1b 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -123,13 +123,16 @@ set_kernel_status( const DictionaryDatum& dict ) ALL_ENTRIES_ACCESSED( *dict, "SetKernelStatus", "Unread dictionary entries: " ); } -DictionaryDatum +dictionary get_kernel_status() { assert( kernel().is_initialized() ); - DictionaryDatum d( new Dictionary ); - kernel().get_status( d ); + dictionary d; + + d[ "test_first" ] = 42; + + // kernel().get_status( d ); return d; } diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 995f8ef18b..97e513fd7d 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -29,6 +29,7 @@ // Includes from libnestutil: #include "enum_bitfield.h" #include "logging.h" +#include "dictionary.h" // Includes from nestkernel: #include "nest_datums.h" @@ -101,7 +102,7 @@ RngPtr get_vp_synced_rng( thread tid ); RngPtr get_vp_specific_rng( thread tid ); void set_kernel_status( const DictionaryDatum& dict ); -DictionaryDatum get_kernel_status(); +dictionary get_kernel_status(); void set_node_status( const index node_id, const DictionaryDatum& dict ); DictionaryDatum get_node_status( const index node_id ); diff --git a/nestkernel/nestmodule.cpp b/nestkernel/nestmodule.cpp index 2cd6b51ef5..49cb51866c 100644 --- a/nestkernel/nestmodule.cpp +++ b/nestkernel/nestmodule.cpp @@ -598,9 +598,9 @@ NestModule::GetMetadata_gFunction::execute( SLIInterpreter* i ) const void NestModule::GetKernelStatus_Function::execute( SLIInterpreter* i ) const { - DictionaryDatum dict = get_kernel_status(); + // DictionaryDatum dict = get_kernel_status(); - i->OStack.push( dict ); + // i->OStack.push( dict ); i->EStack.pop(); } diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index f311f570ed..f223a12d0a 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -281,8 +281,7 @@ def GetKernelStatus(keys=None): """ - sr('GetKernelStatus') - status_root = spp() + status_root = kernel.llapi_get_kernel_status() if keys is None: return status_root diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 92ee3dfefd..4518c52114 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -23,6 +23,7 @@ from libcpp cimport bool as cbool from libcpp.string cimport string from libcpp.vector cimport vector +from libcpp.utility cimport pair from cpython.ref cimport PyObject @@ -142,6 +143,30 @@ cdef extern from "tokenstack.h": # Supposed to be used only through the addr_tok macro Token* top() +cdef extern from "dictionary.h" namespace "boost": + cppclass any: + any() + T any_cast[T](any& operand) + +cdef extern from "dictionary.h": + cppclass dictionary: + dictionary() + # ctypedef key_type + # ctypedef mapped_type + cppclass const_iterator: + pair[string, any]& operator*() + const_iterator operator++() + bint operator==(const const_iterator&) + bint operator!=(const const_iterator&) + const_iterator begin() + const_iterator end() + cbool is_int(const any&) + cbool is_double(const any&) + cbool is_string(const any&) + cbool is_int_vector(const any&) + cbool is_double_vector(const any&) + cbool is_dict(const any&) + cdef extern from "mpi_manager.h" namespace "nest": cppclass MPIManager: void mpi_finalize( int exitcode ) except + @@ -157,6 +182,7 @@ cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) NodeCollectionPTR create( const string model_name, const long n ) string pprint_to_string( NodeCollectionPTR nc ) + dictionary get_kernel_status() cdef extern from "pynestkernel_aux.h": CYTHON_isConnectionGenerator( x ) diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index d77385faa9..c695d1773c 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -605,6 +605,19 @@ cdef inline object sli_vector_to_object(sli_vector_ptr_t dat, vector_value_t _ = #### #### ################################################################################ +cdef object any_to_pyobj(any operand): + if is_int(operand): + return any_cast[int](operand) + +cdef object dictionary_to_pydict(dictionary cdict): + cdef tmp = {} + + cdef dictionary.const_iterator it = cdict.begin() + while it != cdict.end(): + tmp[deref(it).first.decode('utf8')] = any_to_pyobj(deref(it).second) + inc(it) + return tmp + def llapi_create(string model, long n): cdef NodeCollectionPTR gids = create(model, n) obj = NodeCollectionObject() @@ -613,3 +626,21 @@ def llapi_create(string model, long n): def llapi_to_string(NodeCollectionObject nc): return pprint_to_string(nc.thisptr) + +def llapi_get_kernel_status(): + cdef dictionary cdict = get_kernel_status() + + # for d in dict: + # print(d) + + return dictionary_to_pydict(cdict) + + # cdef dictionary.const_iterator it = dict.begin() + # while it != dict.end(): + # print(deref(it).first) + # print(any_to_pyobj(deref(it).second)) + # inc(it) + + # return dict + # return dictionary + # return sli_dict_to_object( get_kernel_status()) From 4ec5dad6b5e9e9827f15d5743f34f5e5b2b3e76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 22 Dec 2021 13:17:10 +0100 Subject: [PATCH 007/375] Updated managers' get_status() to use dictionary A reduced GetKernelStatus() works. IOManager still needs to be updated when the nested get_status() functions of nodes are updated. --- libnestutil/CMakeLists.txt | 2 +- libnestutil/CMakeLists.txt.orig | 60 -- libnestutil/dictionary.cpp | 107 +++ libnestutil/dictionary.h | 54 +- nestkernel/connection_manager.cpp | 16 +- nestkernel/connection_manager.h | 2 +- nestkernel/event_delivery_manager.cpp | 16 +- nestkernel/event_delivery_manager.h | 2 +- nestkernel/io_manager.cpp | 28 +- nestkernel/io_manager.h | 2 +- nestkernel/kernel_manager.cpp | 2 +- nestkernel/kernel_manager.h | 2 +- nestkernel/logging_manager.cpp | 4 +- nestkernel/logging_manager.h | 2 +- nestkernel/manager_interface.h | 3 +- nestkernel/model_manager.cpp | 5 +- nestkernel/model_manager.h | 2 +- nestkernel/modelrange_manager.h | 2 +- nestkernel/mpi_manager.cpp | 24 +- nestkernel/mpi_manager.cpp.orig | 1132 ------------------------- nestkernel/mpi_manager.h | 2 +- nestkernel/mpi_manager.h.orig | 855 ------------------- nestkernel/music_manager.cpp | 2 +- nestkernel/music_manager.h | 2 +- nestkernel/nest.cpp | 2 + nestkernel/node_manager.cpp | 6 +- nestkernel/node_manager.h | 2 +- nestkernel/random_manager.cpp | 10 +- nestkernel/random_manager.h | 2 +- nestkernel/simulation_manager.cpp | 57 +- nestkernel/simulation_manager.h | 2 +- nestkernel/sp_manager.cpp | 24 +- nestkernel/sp_manager.h | 2 +- nestkernel/vp_manager.cpp | 6 +- nestkernel/vp_manager.h | 2 +- pynest/pynestkernel.pxd | 5 + pynest/pynestkernel.pyx | 34 +- 37 files changed, 265 insertions(+), 2217 deletions(-) delete mode 100644 libnestutil/CMakeLists.txt.orig create mode 100644 libnestutil/dictionary.cpp delete mode 100644 nestkernel/mpi_manager.cpp.orig delete mode 100644 nestkernel/mpi_manager.h.orig diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt index d2e77a5291..3b7029f980 100644 --- a/libnestutil/CMakeLists.txt +++ b/libnestutil/CMakeLists.txt @@ -20,7 +20,7 @@ set( nestutil_sources beta_normalization_factor.h block_vector.h - dictionary.h + dictionary.h dictionary.cpp dict_util.h enum_bitfield.h iterator_pair.h diff --git a/libnestutil/CMakeLists.txt.orig b/libnestutil/CMakeLists.txt.orig deleted file mode 100644 index 09ea16b0bf..0000000000 --- a/libnestutil/CMakeLists.txt.orig +++ /dev/null @@ -1,60 +0,0 @@ -# libnestutil/CMakeLists.txt -# -# This file is part of NEST. -# -# Copyright (C) 2004 The NEST Initiative -# -# NEST is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# NEST is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with NEST. If not, see . - -set( nestutil_sources - beta_normalization_factor.h - block_vector.h -<<<<<<< HEAD -======= - compose.hpp - dict_util.h ->>>>>>> master - enum_bitfield.h - iterator_pair.h - lockptr.h - logging_event.h logging_event.cpp - logging.h - numerics.h numerics.cpp - propagator_stability.h propagator_stability.cpp - regula_falsi.h - sort.h - stopwatch.h stopwatch.cpp - streamers.h - string_utils.h - vector_util.h - ) - -add_library( nestutil ${nestutil_sources} ) - -target_link_libraries( nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS} ) - -target_include_directories( nestutil PRIVATE - ${PROJECT_BINARY_DIR}/libnestutil - ${Boost_INCLUDE_DIRS} - ) - -install( TARGETS nestutil - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) - -FILTER_HEADERS("${nestutil_sources}" install_headers ) -install( FILES ${install_headers} ${PROJECT_BINARY_DIR}/libnestutil/config.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp new file mode 100644 index 0000000000..da4da039ca --- /dev/null +++ b/libnestutil/dictionary.cpp @@ -0,0 +1,107 @@ +/* + * dictionary.cpp + * + * This file is part of NEST. + * + * Copyright (C) 2004 The NEST Initiative + * + * NEST is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * NEST is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NEST. If not, see . + * + */ + +#include +#include +#include +#include +#include + +#include "dictionary.h" + + +// debug +std::string +debug_type( const boost::any& operand ) +{ + return operand.type().name(); +} + +// int +bool +is_int( const boost::any& operand ) +{ + return operand.type() == typeid( int ); +} + +// long +bool +is_long( const boost::any& operand ) +{ + return operand.type() == typeid( long ); +} + +bool +is_size_t( const boost::any& operand ) +{ + return operand.type() == typeid( size_t ); +} + + +// double +bool +is_double( const boost::any& operand ) +{ + return operand.type() == typeid( double ); +} + +// bool +bool +is_bool( const boost::any& operand ) +{ + return operand.type() == typeid( bool ); +} + +// string +bool +is_string( const boost::any& operand ) +{ + return operand.type() == typeid( std::string ); +} + +// vector of ints +bool +is_int_vector( const boost::any& operand ) +{ + return operand.type() == typeid( std::vector< int > ); +} + +// vector of doubles +bool +is_double_vector( const boost::any& operand ) +{ + return operand.type() == typeid( std::vector< double > ); +} + +// vector of strings +bool +is_string_vector( const boost::any& operand ) +{ + return operand.type() == typeid( std::vector< std::string > ); +} + +// dict +bool +is_dict( const boost::any& operand ) +{ + return operand.type() == typeid( dictionary ); +} diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index fe8b9cda22..66eaea982d 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -30,47 +30,17 @@ using dictionary = std::map< std::string, boost::any >; -// int -inline bool -is_int( const boost::any& operand ) -{ - return operand.type() == typeid( int ); -} - -// double -inline bool -is_double( const boost::any& operand ) -{ - return operand.type() == typeid( double ); -} - -// string -inline bool -is_string( const boost::any& operand ) -{ - return operand.type() == typeid( std::string ); -} - -// vector of ints -inline bool -is_int_vector( const boost::any& operand ) -{ - return operand.type() == typeid( std::vector< int > ); -} - -// vector of doubles -inline bool -is_double_vector( const boost::any& operand ) -{ - return operand.type() == typeid( std::vector< double > ); -} - -// dict -inline bool -is_dict( const boost::any& operand ) -{ - return operand.type() == typeid( dictionary ); -} - +std::string debug_type( const boost::any& operand ); + +bool is_int( const boost::any& operand ); +bool is_long( const boost::any& operand ); +bool is_size_t( const boost::any& operand ); +bool is_double( const boost::any& operand ); +bool is_bool( const boost::any& operand ); +bool is_string( const boost::any& operand ); +bool is_int_vector( const boost::any& operand ); +bool is_double_vector( const boost::any& operand ); +bool is_string_vector( const boost::any& operand ); +bool is_dict( const boost::any& operand ); #endif /* DICTIONARY_H_ */ diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 2c56a2b7b3..044947132d 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -183,19 +183,19 @@ nest::ConnectionManager::get_delay_checker() } void -nest::ConnectionManager::get_status( DictionaryDatum& dict ) +nest::ConnectionManager::get_status( dictionary& dict ) { update_delay_extrema_(); - def< double >( dict, names::min_delay, Time( Time::step( min_delay_ ) ).get_ms() ); - def< double >( dict, names::max_delay, Time( Time::step( max_delay_ ) ).get_ms() ); + dict[ names::min_delay.toString() ] = Time( Time::step( min_delay_ ) ).get_ms(); + dict[ names::max_delay.toString() ] = Time( Time::step( max_delay_ ) ).get_ms(); const size_t n = get_num_connections(); - def< long >( dict, names::num_connections, n ); - def< bool >( dict, names::keep_source_table, keep_source_table_ ); - def< bool >( dict, names::sort_connections_by_source, sort_connections_by_source_ ); - def< bool >( dict, names::use_compressed_spikes, use_compressed_spikes_ ); + dict[ names::num_connections.toString() ] = n; + dict[ names::keep_source_table.toString() ] = keep_source_table_; + dict[ names::sort_connections_by_source.toString() ] = sort_connections_by_source_; + dict[ names::use_compressed_spikes.toString() ] = use_compressed_spikes_; - def< double >( dict, names::time_construction_connect, sw_construction_connect.elapsed() ); + dict[ names::time_construction_connect.toString() ] = sw_construction_connect.elapsed(); } DictionaryDatum diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h index ed479cd092..46f6831c52 100644 --- a/nestkernel/connection_manager.h +++ b/nestkernel/connection_manager.h @@ -82,7 +82,7 @@ class ConnectionManager : public ManagerInterface virtual void finalize(); virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); DictionaryDatum& get_connruledict(); diff --git a/nestkernel/event_delivery_manager.cpp b/nestkernel/event_delivery_manager.cpp index 0d0f4aa5e4..6a11a09681 100644 --- a/nestkernel/event_delivery_manager.cpp +++ b/nestkernel/event_delivery_manager.cpp @@ -125,17 +125,17 @@ EventDeliveryManager::set_status( const DictionaryDatum& dict ) } void -EventDeliveryManager::get_status( DictionaryDatum& dict ) +EventDeliveryManager::get_status( dictionary& dict ) { - def< bool >( dict, names::off_grid_spiking, off_grid_spiking_ ); - def< unsigned long >( - dict, names::local_spike_counter, std::accumulate( local_spike_counter_.begin(), local_spike_counter_.end(), 0 ) ); + dict[ names::off_grid_spiking.toString() ] = off_grid_spiking_; + dict[ names::local_spike_counter.toString() ] = + std::accumulate( local_spike_counter_.begin(), local_spike_counter_.end(), 0 ); #ifdef TIMER_DETAILED - def< double >( dict, names::time_collocate_spike_data, sw_collocate_spike_data_.elapsed() ); - def< double >( dict, names::time_communicate_spike_data, sw_communicate_spike_data_.elapsed() ); - def< double >( dict, names::time_deliver_spike_data, sw_deliver_spike_data_.elapsed() ); - def< double >( dict, names::time_communicate_target_data, sw_communicate_target_data_.elapsed() ); + dict[ names::time_collocate_spike_data.toString() ] = sw_collocate_spike_data_.elapsed(); + dict[ names::time_communicate_spike_data.toString() ] = sw_communicate_spike_data_.elapsed(); + dict[ names::time_deliver_spike_data.toString() ] = sw_deliver_spike_data_.elapsed(); + dict[ names::time_communicate_target_data.toString() ] = sw_communicate_target_data_.elapsed(); #endif } diff --git a/nestkernel/event_delivery_manager.h b/nestkernel/event_delivery_manager.h index bb92a0679e..3274fd9456 100644 --- a/nestkernel/event_delivery_manager.h +++ b/nestkernel/event_delivery_manager.h @@ -63,7 +63,7 @@ class EventDeliveryManager : public ManagerInterface virtual void finalize(); virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); /** * Standard routine for sending events. This method decides if diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp index bbbc0280bb..3926f140c3 100644 --- a/nestkernel/io_manager.cpp +++ b/nestkernel/io_manager.cpp @@ -201,20 +201,22 @@ IOManager::set_status( const DictionaryDatum& d ) } void -IOManager::get_status( DictionaryDatum& d ) +IOManager::get_status( dictionary& d ) { - ( *d )[ names::data_path ] = data_path_; - ( *d )[ names::data_prefix ] = data_prefix_; - ( *d )[ names::overwrite_files ] = overwrite_files_; - - DictionaryDatum recording_backends( new Dictionary ); - for ( const auto& it : recording_backends_ ) - { - DictionaryDatum recording_backend_status( new Dictionary ); - it.second->get_status( recording_backend_status ); - ( *recording_backends )[ it.first ] = recording_backend_status; - } - ( *d )[ names::recording_backends ] = recording_backends; + d[ names::data_path.toString() ] = data_path_; + d[ names::data_prefix.toString() ] = data_prefix_; + d[ names::overwrite_files.toString() ] = overwrite_files_; + + // TODO-PYNEST-NG: dict implement get_status() for recording backends with dictionary. + + // DictionaryDatum recording_backends( new Dictionary ); + // for ( const auto& it : recording_backends_ ) + // { + // DictionaryDatum recording_backend_status( new Dictionary ); + // it.second->get_status( recording_backend_status ); + // ( *recording_backends )[ it.first ] = recording_backend_status; + // } + // ( *d )[ names::recording_backends ] = recording_backends; } void diff --git a/nestkernel/io_manager.h b/nestkernel/io_manager.h index 2c32cc0440..c4b4fee87b 100644 --- a/nestkernel/io_manager.h +++ b/nestkernel/io_manager.h @@ -48,7 +48,7 @@ class IOManager : public ManagerInterface void change_num_threads( thread ) override; void set_status( const DictionaryDatum& ) override; // set parameters - void get_status( DictionaryDatum& ) override; // get parameters + void get_status( dictionary& ) override; // get parameters IOManager(); // Construct only by meta-manager ~IOManager() override; diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp index 020f0fb12e..19fefc95ff 100644 --- a/nestkernel/kernel_manager.cpp +++ b/nestkernel/kernel_manager.cpp @@ -166,7 +166,7 @@ nest::KernelManager::set_status( const DictionaryDatum& dict ) } void -nest::KernelManager::get_status( DictionaryDatum& dict ) +nest::KernelManager::get_status( dictionary& dict ) { assert( is_initialized() ); diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h index 17f0c9b826..eff3b78b45 100644 --- a/nestkernel/kernel_manager.h +++ b/nestkernel/kernel_manager.h @@ -169,7 +169,7 @@ class KernelManager void cleanup(); void set_status( const DictionaryDatum& ); - void get_status( DictionaryDatum& ); + void get_status( dictionary& ); //! Returns true if kernel is initialized bool is_initialized() const; diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp index 7ee54d3978..320abd39b9 100644 --- a/nestkernel/logging_manager.cpp +++ b/nestkernel/logging_manager.cpp @@ -59,9 +59,9 @@ nest::LoggingManager::set_status( const DictionaryDatum& dict ) } void -nest::LoggingManager::get_status( DictionaryDatum& dict ) +nest::LoggingManager::get_status( dictionary& dict ) { - ( *dict )[ names::dict_miss_is_error ] = dict_miss_is_error_; + dict[ names::dict_miss_is_error.toString() ] = dict_miss_is_error_; } diff --git a/nestkernel/logging_manager.h b/nestkernel/logging_manager.h index ccdb266ada..01abed4099 100644 --- a/nestkernel/logging_manager.h +++ b/nestkernel/logging_manager.h @@ -53,7 +53,7 @@ class LoggingManager : public ManagerInterface virtual void finalize(); virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); /** * Register a logging client. diff --git a/nestkernel/manager_interface.h b/nestkernel/manager_interface.h index 9ce6688cd5..1ba07de93c 100644 --- a/nestkernel/manager_interface.h +++ b/nestkernel/manager_interface.h @@ -28,6 +28,7 @@ // Includes from sli: #include "dictdatum.h" +#include "dictionary.h" namespace nest { @@ -101,7 +102,7 @@ class ManagerInterface virtual void change_num_threads( thread ){}; virtual void set_status( const DictionaryDatum& ) = 0; - virtual void get_status( DictionaryDatum& ) = 0; + virtual void get_status( dictionary& ) = 0; virtual void prepare(){}; virtual void cleanup(){}; diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index 047980dd0c..d1e57bde45 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -29,6 +29,7 @@ // Includes from libnestutil: #include "compose.hpp" +#include "dictionary.h" // Includes from nestkernel: #include "connector_model_impl.h" @@ -172,10 +173,10 @@ ModelManager::set_status( const DictionaryDatum& ) } void -ModelManager::get_status( DictionaryDatum& dict ) +ModelManager::get_status( dictionary& dict ) { // syn_ids start at 0, so the maximal number of syn models is MAX_SYN_ID + 1 - def< int >( dict, names::max_num_syn_models, MAX_SYN_ID + 1 ); + dict[ names::max_num_syn_models.toString() ] = MAX_SYN_ID + 1; } index diff --git a/nestkernel/model_manager.h b/nestkernel/model_manager.h index 2de15b7ca3..bacfb93f69 100644 --- a/nestkernel/model_manager.h +++ b/nestkernel/model_manager.h @@ -76,7 +76,7 @@ class ModelManager : public ManagerInterface /** * */ - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); /** * diff --git a/nestkernel/modelrange_manager.h b/nestkernel/modelrange_manager.h index b9ce6c245b..b831aafc43 100644 --- a/nestkernel/modelrange_manager.h +++ b/nestkernel/modelrange_manager.h @@ -53,7 +53,7 @@ class ModelRangeManager : public ManagerInterface { } virtual void - get_status( DictionaryDatum& ) + get_status( dictionary& ) { } diff --git a/nestkernel/mpi_manager.cpp b/nestkernel/mpi_manager.cpp index d9e9528ef3..01ccf55f49 100644 --- a/nestkernel/mpi_manager.cpp +++ b/nestkernel/mpi_manager.cpp @@ -224,19 +224,19 @@ nest::MPIManager::set_status( const DictionaryDatum& dict ) } void -nest::MPIManager::get_status( DictionaryDatum& dict ) +nest::MPIManager::get_status( dictionary& dict ) { - def< long >( dict, names::num_processes, num_processes_ ); - def< bool >( dict, names::adaptive_spike_buffers, adaptive_spike_buffers_ ); - def< bool >( dict, names::adaptive_target_buffers, adaptive_target_buffers_ ); - def< size_t >( dict, names::buffer_size_target_data, buffer_size_target_data_ ); - def< size_t >( dict, names::buffer_size_spike_data, buffer_size_spike_data_ ); - def< size_t >( dict, names::send_buffer_size_secondary_events, get_send_buffer_size_secondary_events_in_int() ); - def< size_t >( dict, names::recv_buffer_size_secondary_events, get_recv_buffer_size_secondary_events_in_int() ); - def< size_t >( dict, names::max_buffer_size_spike_data, max_buffer_size_spike_data_ ); - def< size_t >( dict, names::max_buffer_size_target_data, max_buffer_size_target_data_ ); - def< double >( dict, names::growth_factor_buffer_spike_data, growth_factor_buffer_spike_data_ ); - def< double >( dict, names::growth_factor_buffer_target_data, growth_factor_buffer_target_data_ ); + dict[ names::num_processes.toString() ] = num_processes_; + dict[ names::adaptive_spike_buffers.toString() ] = adaptive_spike_buffers_; + dict[ names::adaptive_target_buffers.toString() ] = adaptive_target_buffers_; + dict[ names::buffer_size_target_data.toString() ] = buffer_size_target_data_; + dict[ names::buffer_size_spike_data.toString() ] = buffer_size_spike_data_; + dict[ names::send_buffer_size_secondary_events.toString() ] = get_send_buffer_size_secondary_events_in_int(); + dict[ names::recv_buffer_size_secondary_events.toString() ] = get_recv_buffer_size_secondary_events_in_int(); + dict[ names::max_buffer_size_spike_data.toString() ] = max_buffer_size_spike_data_; + dict[ names::max_buffer_size_target_data.toString() ] = max_buffer_size_target_data_; + dict[ names::growth_factor_buffer_spike_data.toString() ] = growth_factor_buffer_spike_data_; + dict[ names::growth_factor_buffer_target_data.toString() ] = growth_factor_buffer_target_data_; } #ifdef HAVE_MPI diff --git a/nestkernel/mpi_manager.cpp.orig b/nestkernel/mpi_manager.cpp.orig deleted file mode 100644 index 6c077d8c5c..0000000000 --- a/nestkernel/mpi_manager.cpp.orig +++ /dev/null @@ -1,1132 +0,0 @@ -/* - * mpi_manager.cpp - * - * This file is part of NEST. - * - * Copyright (C) 2004 The NEST Initiative - * - * NEST is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * NEST is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NEST. If not, see . - * - */ - -#include "mpi_manager.h" - -// C++ includes: -#include -#include - -// Includes from libnestutil: -#include "compose.hpp" -#include "logging.h" -#include "stopwatch.h" - -// Includes from nestkernel: -#include "kernel_manager.h" -#include "mpi_manager_impl.h" -#include "nest_types.h" - -// Includes from sli: -#include "dictutils.h" - -#ifdef HAVE_MPI - -template <> -MPI_Datatype MPI_Type< int >::type = MPI_INT; -template <> -MPI_Datatype MPI_Type< double >::type = MPI_DOUBLE; -template <> -MPI_Datatype MPI_Type< long >::type = MPI_LONG; -template <> -MPI_Datatype MPI_Type< unsigned int >::type = MPI_INT; -template <> -MPI_Datatype MPI_Type< unsigned long >::type = MPI_UNSIGNED_LONG; - -#endif /* #ifdef HAVE_MPI */ - -nest::MPIManager::MPIManager() - : num_processes_( 1 ) - , rank_( 0 ) - , send_buffer_size_( 0 ) - , recv_buffer_size_( 0 ) - , use_mpi_( false ) - , buffer_size_target_data_( 1 ) - , buffer_size_spike_data_( 1 ) - , max_buffer_size_target_data_( 16777216 ) - , max_buffer_size_spike_data_( 8388608 ) - , adaptive_target_buffers_( true ) - , adaptive_spike_buffers_( true ) - , growth_factor_buffer_spike_data_( 1.5 ) - , growth_factor_buffer_target_data_( 1.5 ) - , shrink_factor_buffer_spike_data_( 1.1 ) - , send_recv_count_spike_data_per_rank_( 0 ) - , send_recv_count_target_data_per_rank_( 0 ) -#ifdef HAVE_MPI - , comm_step_( std::vector< int >() ) - , COMM_OVERFLOW_ERROR( std::numeric_limits< unsigned int >::max() ) - , comm( 0 ) - , MPI_OFFGRID_SPIKE( 0 ) -#endif -{ -} - -#ifndef HAVE_MPI - -void -nest::MPIManager::init_mpi( int*, char*** ) -{ - // if ! HAVE_MPI, initialize process entries for 1 rank - // use 2 processes entries (need at least two - // entries per process to use flag of first entry as validity and - // last entry to communicate end of communication) - kernel().mpi_manager.set_buffer_size_target_data( 2 ); - kernel().mpi_manager.set_buffer_size_spike_data( 2 ); - - recv_counts_secondary_events_in_int_per_rank_.resize( 1, 0 ); - recv_displacements_secondary_events_in_int_per_rank_.resize( 1, 0 ); - send_counts_secondary_events_in_int_per_rank_.resize( 1, 0 ); - send_displacements_secondary_events_in_int_per_rank_.resize( 1, 0 ); -} - -#else /* HAVE_MPI */ - -void -nest::MPIManager::set_communicator( MPI_Comm global_comm ) -{ - comm = global_comm; - MPI_Comm_size( comm, &num_processes_ ); - MPI_Comm_rank( comm, &rank_ ); - recv_buffer_size_ = send_buffer_size_ * get_num_processes(); - - // use at least 2 * number of processes entries (need at least two - // entries per process to use flag of first entry as validity and - // last entry to communicate end of communication) - kernel().mpi_manager.set_buffer_size_target_data( 2 * kernel().mpi_manager.get_num_processes() ); - kernel().mpi_manager.set_buffer_size_spike_data( 2 * kernel().mpi_manager.get_num_processes() ); -} - -void -nest::MPIManager::init_mpi( int* argc, char** argv[] ) -{ - int init; - MPI_Initialized( &init ); - - if ( init == 0 ) - { -#ifdef HAVE_MUSIC - kernel().music_manager.init_music( argc, argv ); - // get a communicator from MUSIC - set_communicator( static_cast< MPI_Comm >( kernel().music_manager.communicator() ) ); -#else /* #ifdef HAVE_MUSIC */ - int provided_thread_level; - MPI_Init_thread( argc, argv, MPI_THREAD_FUNNELED, &provided_thread_level ); - set_communicator( MPI_COMM_WORLD ); -#endif /* #ifdef HAVE_MUSIC */ - } - else - { -#ifdef HAVE_MUSIC - LOG( M_ERROR, - "MPIManager::init_mpi()", - "When compiled with MUSIC, NEST must be initialized before any other modules that call MPI_Init(). " - "Calling MPI_Abort()." ); - comm = MPI_COMM_WORLD; - mpi_abort( 1 ); -#else - set_communicator( MPI_COMM_WORLD ); -#endif - } - - recv_counts_secondary_events_in_int_per_rank_.resize( get_num_processes(), 0 ); - recv_displacements_secondary_events_in_int_per_rank_.resize( get_num_processes(), 0 ); - send_counts_secondary_events_in_int_per_rank_.resize( get_num_processes(), 0 ); - send_displacements_secondary_events_in_int_per_rank_.resize( get_num_processes(), 0 ); - - // create off-grid-spike type for MPI communication - // creating derived datatype - OffGridSpike::assert_datatype_compatibility_(); - MPI_Datatype source_types[ 2 ]; - int blockcounts[ 2 ]; - MPI_Aint offsets[ 2 ]; - MPI_Aint start_address, address; - OffGridSpike ogs( 0, 0.0 ); - - // OffGridSpike.node_id - offsets[ 0 ] = 0; - source_types[ 0 ] = MPI_DOUBLE; - blockcounts[ 0 ] = 1; - - // OffGridSpike.offset - MPI_Get_address( &( ogs.node_id_ ), &start_address ); - MPI_Get_address( &( ogs.offset_ ), &address ); - offsets[ 1 ] = address - start_address; - source_types[ 1 ] = MPI_DOUBLE; - blockcounts[ 1 ] = 1; - - // generate and commit struct - MPI_Type_create_struct( 2, blockcounts, offsets, source_types, &MPI_OFFGRID_SPIKE ); - MPI_Type_commit( &MPI_OFFGRID_SPIKE ); - - use_mpi_ = true; -} - -#endif /* #ifdef HAVE_MPI */ - -void -nest::MPIManager::initialize() -{ -} - -void -nest::MPIManager::finalize() -{ -} - -void -nest::MPIManager::set_status( const DictionaryDatum& dict ) -{ - updateValue< bool >( dict, names::adaptive_target_buffers, adaptive_target_buffers_ ); - updateValue< bool >( dict, names::adaptive_spike_buffers, adaptive_spike_buffers_ ); - - long new_buffer_size_target_data = buffer_size_target_data_; - updateValue< long >( dict, names::buffer_size_target_data, new_buffer_size_target_data ); - if ( new_buffer_size_target_data != static_cast< long >( buffer_size_target_data_ ) - and new_buffer_size_target_data < static_cast< long >( max_buffer_size_target_data_ ) ) - { - set_buffer_size_target_data( new_buffer_size_target_data ); - } - - long new_buffer_size_spike_data = buffer_size_spike_data_; - updateValue< long >( dict, names::buffer_size_spike_data, new_buffer_size_spike_data ); - if ( new_buffer_size_spike_data != static_cast< long >( buffer_size_spike_data_ ) - and new_buffer_size_spike_data < static_cast< long >( max_buffer_size_spike_data_ ) ) - { - set_buffer_size_spike_data( new_buffer_size_spike_data ); - } - - updateValue< double >( dict, names::growth_factor_buffer_spike_data, growth_factor_buffer_spike_data_ ); - updateValue< double >( dict, names::growth_factor_buffer_target_data, growth_factor_buffer_target_data_ ); - - updateValue< long >( dict, names::max_buffer_size_target_data, max_buffer_size_target_data_ ); - updateValue< long >( dict, names::max_buffer_size_spike_data, max_buffer_size_spike_data_ ); - - updateValue< double >( dict, names::shrink_factor_buffer_spike_data, shrink_factor_buffer_spike_data_ ); -} - -void -nest::MPIManager::get_status( DictionaryDatum& dict ) -{ - def< long >( dict, names::num_processes, num_processes_ ); - def< bool >( dict, names::adaptive_spike_buffers, adaptive_spike_buffers_ ); - def< bool >( dict, names::adaptive_target_buffers, adaptive_target_buffers_ ); - def< size_t >( dict, names::buffer_size_target_data, buffer_size_target_data_ ); - def< size_t >( dict, names::buffer_size_spike_data, buffer_size_spike_data_ ); - def< size_t >( dict, names::send_buffer_size_secondary_events, get_send_buffer_size_secondary_events_in_int() ); - def< size_t >( dict, names::recv_buffer_size_secondary_events, get_recv_buffer_size_secondary_events_in_int() ); - def< size_t >( dict, names::max_buffer_size_spike_data, max_buffer_size_spike_data_ ); - def< size_t >( dict, names::max_buffer_size_target_data, max_buffer_size_target_data_ ); - def< double >( dict, names::growth_factor_buffer_spike_data, growth_factor_buffer_spike_data_ ); - def< double >( dict, names::growth_factor_buffer_target_data, growth_factor_buffer_target_data_ ); -} - -#ifdef HAVE_MPI - -void -nest::MPIManager::mpi_finalize( int exitcode ) -{ - MPI_Type_free( &MPI_OFFGRID_SPIKE ); - - int finalized; - MPI_Finalized( &finalized ); - - int initialized; - MPI_Initialized( &initialized ); - - if ( finalized == 0 and initialized == 1 ) - { - if ( exitcode == 0 ) - { - kernel().music_manager.music_finalize(); // calls MPI_Finalize() - } - else - { - LOG( M_INFO, "MPIManager::finalize()", "Calling MPI_Abort() due to errors in the script." ); - mpi_abort( exitcode ); - } - } -} - -#else /* #ifdef HAVE_MPI */ - -void -nest::MPIManager::mpi_finalize( int ) -{ -} - -#endif /* #ifdef HAVE_MPI */ - -#ifdef HAVE_MPI - -void -nest::MPIManager::mpi_abort( int exitcode ) -{ - MPI_Abort( comm, exitcode ); -} - - -std::string -nest::MPIManager::get_processor_name() -{ - char name[ 1024 ]; - int len; - MPI_Get_processor_name( name, &len ); - name[ len ] = '\0'; - return name; -} - -void -nest::MPIManager::communicate( std::vector< long >& local_nodes, std::vector< long >& global_nodes ) -{ - size_t np = get_num_processes(); - // Get size of buffers - std::vector< int > num_nodes_per_rank( np ); - num_nodes_per_rank[ get_rank() ] = local_nodes.size(); - communicate( num_nodes_per_rank ); - - size_t num_globals = std::accumulate( num_nodes_per_rank.begin(), num_nodes_per_rank.end(), 0 ); - global_nodes.resize( num_globals, 0L ); - - // Set up displacements vector. Entry i specifies the displacement (relative - // to recv_buffer ) at which to place the incoming data from process i - std::vector< int > displacements( np, 0 ); - for ( size_t i = 1; i < np; ++i ) - { - displacements.at( i ) = displacements.at( i - 1 ) + num_nodes_per_rank.at( i - 1 ); - } - - MPI_Allgatherv( &local_nodes[ 0 ], - local_nodes.size(), - MPI_Type< long >::type, - &global_nodes[ 0 ], - &num_nodes_per_rank[ 0 ], - &displacements[ 0 ], - MPI_Type< long >::type, - comm ); -} - -void -nest::MPIManager::communicate( std::vector< unsigned int >& send_buffer, - std::vector< unsigned int >& recv_buffer, - std::vector< int >& displacements ) -{ - displacements.resize( num_processes_, 0 ); - if ( get_num_processes() == 1 ) // purely thread-based - { - displacements[ 0 ] = 0; - if ( static_cast< unsigned int >( recv_buffer_size_ ) < send_buffer.size() ) - { - recv_buffer_size_ = send_buffer_size_ = send_buffer.size(); - recv_buffer.resize( recv_buffer_size_ ); - } - recv_buffer.swap( send_buffer ); - } - else - { - communicate_Allgather( send_buffer, recv_buffer, displacements ); - } -} - -void -nest::MPIManager::communicate_Allgather( std::vector< unsigned int >& send_buffer, - std::vector< unsigned int >& recv_buffer, - std::vector< int >& displacements ) -{ - std::vector< int > recv_counts( get_num_processes(), send_buffer_size_ ); - - // attempt Allgather - if ( send_buffer.size() == static_cast< unsigned int >( send_buffer_size_ ) ) - { - MPI_Allgather( - &send_buffer[ 0 ], send_buffer_size_, MPI_UNSIGNED, &recv_buffer[ 0 ], send_buffer_size_, MPI_UNSIGNED, comm ); - } - else - { - // DEC cxx required 0U literal, HEP 2007-03-26 - std::vector< unsigned int > overflow_buffer( send_buffer_size_, 0U ); - overflow_buffer[ 0 ] = COMM_OVERFLOW_ERROR; - overflow_buffer[ 1 ] = send_buffer.size(); - MPI_Allgather( &overflow_buffer[ 0 ], - send_buffer_size_, - MPI_UNSIGNED, - &recv_buffer[ 0 ], - send_buffer_size_, - MPI_UNSIGNED, - comm ); - } - // check for overflow condition - int disp = 0; - unsigned int max_recv_count = send_buffer_size_; - bool overflow = false; - for ( int pid = 0; pid < get_num_processes(); ++pid ) - { - unsigned int block_disp = pid * send_buffer_size_; - displacements[ pid ] = disp; - if ( recv_buffer[ block_disp ] == COMM_OVERFLOW_ERROR ) - { - overflow = true; - recv_counts[ pid ] = recv_buffer[ block_disp + 1 ]; - if ( static_cast< unsigned int >( recv_counts[ pid ] ) > max_recv_count ) - { - max_recv_count = recv_counts[ pid ]; - } - } - disp += recv_counts[ pid ]; - } - - // do Allgatherv if necessary - if ( overflow ) - { - recv_buffer.resize( disp, 0 ); - MPI_Allgatherv( &send_buffer[ 0 ], - send_buffer.size(), - MPI_UNSIGNED, - &recv_buffer[ 0 ], - &recv_counts[ 0 ], - &displacements[ 0 ], - MPI_UNSIGNED, - comm ); - send_buffer_size_ = max_recv_count; - recv_buffer_size_ = send_buffer_size_ * get_num_processes(); - } -} - -template < typename T > -void -nest::MPIManager::communicate_Allgather( std::vector< T >& send_buffer, - std::vector< T >& recv_buffer, - std::vector< int >& displacements ) -{ - std::vector< int > recv_counts( get_num_processes(), send_buffer_size_ ); - - // attempt Allgather - if ( send_buffer.size() == static_cast< unsigned int >( send_buffer_size_ ) ) - { - MPI_Allgather( &send_buffer[ 0 ], - send_buffer_size_, - MPI_Type< T >::type, - &recv_buffer[ 0 ], - send_buffer_size_, - MPI_Type< T >::type, - comm ); - } - else - { - // DEC cxx required 0U literal, HEP 2007-03-26 - std::vector< unsigned int > overflow_buffer( send_buffer_size_, 0U ); - overflow_buffer[ 0 ] = COMM_OVERFLOW_ERROR; - overflow_buffer[ 1 ] = send_buffer.size(); - MPI_Allgather( &overflow_buffer[ 0 ], - send_buffer_size_, - MPI_Type< T >::type, - &recv_buffer[ 0 ], - send_buffer_size_, - MPI_Type< T >::type, - comm ); - } - // check for overflow condition - int disp = 0; - unsigned int max_recv_count = send_buffer_size_; - bool overflow = false; - for ( int pid = 0; pid < get_num_processes(); ++pid ) - { - unsigned int block_disp = pid * send_buffer_size_; - displacements[ pid ] = disp; - if ( recv_buffer[ block_disp ] == COMM_OVERFLOW_ERROR ) - { - overflow = true; - recv_counts[ pid ] = recv_buffer[ block_disp + 1 ]; - if ( static_cast< unsigned int >( recv_counts[ pid ] ) > max_recv_count ) - { - max_recv_count = recv_counts[ pid ]; - } - } - disp += recv_counts[ pid ]; - } - - // do Allgatherv if necessary - if ( overflow ) - { - recv_buffer.resize( disp, 0 ); - MPI_Allgatherv( &send_buffer[ 0 ], - send_buffer.size(), - MPI_Type< T >::type, - &recv_buffer[ 0 ], - &recv_counts[ 0 ], - &displacements[ 0 ], - MPI_Type< T >::type, - comm ); - send_buffer_size_ = max_recv_count; - recv_buffer_size_ = send_buffer_size_ * get_num_processes(); - } -} - -void -nest::MPIManager::communicate( std::vector< OffGridSpike >& send_buffer, - std::vector< OffGridSpike >& recv_buffer, - std::vector< int >& displacements ) -{ - displacements.resize( num_processes_, 0 ); - if ( get_num_processes() == 1 ) // purely thread-based - { - displacements[ 0 ] = 0; - if ( static_cast< unsigned int >( recv_buffer_size_ ) < send_buffer.size() ) - { - recv_buffer_size_ = send_buffer_size_ = send_buffer.size(); - recv_buffer.resize( recv_buffer_size_ ); - } - recv_buffer.swap( send_buffer ); - } - else - { - communicate_Allgather( send_buffer, recv_buffer, displacements ); - } -} - -void -nest::MPIManager::communicate_Allgather( std::vector< OffGridSpike >& send_buffer, - std::vector< OffGridSpike >& recv_buffer, - std::vector< int >& displacements ) -{ - std::vector< int > recv_counts( get_num_processes(), send_buffer_size_ ); - // attempt Allgather - if ( send_buffer.size() == static_cast< unsigned int >( send_buffer_size_ ) ) - { - MPI_Allgather( &send_buffer[ 0 ], - send_buffer_size_, - MPI_OFFGRID_SPIKE, - &recv_buffer[ 0 ], - send_buffer_size_, - MPI_OFFGRID_SPIKE, - comm ); - } - else - { - std::vector< OffGridSpike > overflow_buffer( send_buffer_size_ ); - overflow_buffer[ 0 ] = OffGridSpike( COMM_OVERFLOW_ERROR, 0.0 ); - overflow_buffer[ 1 ] = OffGridSpike( send_buffer.size(), 0.0 ); - MPI_Allgather( &overflow_buffer[ 0 ], - send_buffer_size_, - MPI_OFFGRID_SPIKE, - &recv_buffer[ 0 ], - send_buffer_size_, - MPI_OFFGRID_SPIKE, - comm ); - } - - // check for overflow condition - int disp = 0; - unsigned int max_recv_count = send_buffer_size_; - bool overflow = false; - for ( int pid = 0; pid < get_num_processes(); ++pid ) - { - unsigned int block_disp = pid * send_buffer_size_; - displacements[ pid ] = disp; - if ( ( recv_buffer[ block_disp ] ).get_node_id() == COMM_OVERFLOW_ERROR ) - { - overflow = true; - recv_counts[ pid ] = ( recv_buffer[ block_disp + 1 ] ).get_node_id(); - if ( static_cast< unsigned int >( recv_counts[ pid ] ) > max_recv_count ) - { - max_recv_count = recv_counts[ pid ]; - } - } - disp += recv_counts[ pid ]; - } - - // do Allgatherv if necessary - if ( overflow ) - { - recv_buffer.resize( disp ); - MPI_Allgatherv( &send_buffer[ 0 ], - send_buffer.size(), - MPI_OFFGRID_SPIKE, - &recv_buffer[ 0 ], - &recv_counts[ 0 ], - &displacements[ 0 ], - MPI_OFFGRID_SPIKE, - comm ); - send_buffer_size_ = max_recv_count; - recv_buffer_size_ = send_buffer_size_ * get_num_processes(); - } -} - -void -nest::MPIManager::communicate( std::vector< double >& send_buffer, - std::vector< double >& recv_buffer, - std::vector< int >& displacements ) -{ - // get size of buffers - std::vector< int > n_nodes( get_num_processes() ); - n_nodes[ get_rank() ] = send_buffer.size(); - communicate( n_nodes ); - // Set up displacements vector. - displacements.resize( get_num_processes(), 0 ); - for ( int i = 1; i < get_num_processes(); ++i ) - { - displacements.at( i ) = displacements.at( i - 1 ) + n_nodes.at( i - 1 ); - } - - // Calculate total number of node data items to be gathered. - size_t n_globals = std::accumulate( n_nodes.begin(), n_nodes.end(), 0 ); - - if ( n_globals != 0 ) - { - recv_buffer.resize( n_globals, 0.0 ); - communicate_Allgatherv( send_buffer, recv_buffer, displacements, n_nodes ); - } - else - { - recv_buffer.clear(); - } -} - -void -nest::MPIManager::communicate( std::vector< unsigned long >& send_buffer, - std::vector< unsigned long >& recv_buffer, - std::vector< int >& displacements ) -{ - // get size of buffers - std::vector< int > n_nodes( num_processes_ ); - n_nodes[ rank_ ] = send_buffer.size(); - communicate( n_nodes ); - // Set up displacements vector. - displacements.resize( num_processes_, 0 ); - for ( int i = 1; i < num_processes_; ++i ) - { - displacements.at( i ) = displacements.at( i - 1 ) + n_nodes.at( i - 1 ); - } - - // Calculate total number of node data items to be gathered. - size_t n_globals = std::accumulate( n_nodes.begin(), n_nodes.end(), 0 ); - - if ( n_globals != 0 ) - { - recv_buffer.resize( n_globals, 0.0 ); - communicate_Allgatherv( send_buffer, recv_buffer, displacements, n_nodes ); - } - else - { - recv_buffer.clear(); - } -} - -void -nest::MPIManager::communicate( std::vector< int >& send_buffer, - std::vector< int >& recv_buffer, - std::vector< int >& displacements ) -{ - // get size of buffers - std::vector< int > n_nodes( num_processes_ ); - n_nodes[ rank_ ] = send_buffer.size(); - communicate( n_nodes ); - // Set up displacements vector. - displacements.resize( num_processes_, 0 ); - for ( int i = 1; i < num_processes_; ++i ) - { - displacements.at( i ) = displacements.at( i - 1 ) + n_nodes.at( i - 1 ); - } - - // Calculate total number of node data items to be gathered. - size_t n_globals = std::accumulate( n_nodes.begin(), n_nodes.end(), 0 ); - - if ( n_globals != 0 ) - { - recv_buffer.resize( n_globals, 0.0 ); - communicate_Allgatherv( send_buffer, recv_buffer, displacements, n_nodes ); - } - else - { - recv_buffer.clear(); - } -} - -void -nest::MPIManager::communicate( double send_val, std::vector< double >& recv_buffer ) -{ - recv_buffer.resize( get_num_processes() ); - MPI_Allgather( &send_val, 1, MPI_DOUBLE, &recv_buffer[ 0 ], 1, MPI_DOUBLE, comm ); -} - - -/** - * communicate function for sending set-up information - */ -void -nest::MPIManager::communicate( std::vector< int >& buffer ) -{ - communicate_Allgather( buffer ); -} - -void -nest::MPIManager::communicate( std::vector< long >& buffer ) -{ - communicate_Allgather( buffer ); -} - -void -nest::MPIManager::communicate_Allgather( std::vector< int >& buffer ) -{ - // avoid aliasing, see http://www.mpi-forum.org/docs/mpi-11-html/node10.html - int my_val = buffer[ get_rank() ]; - MPI_Allgather( &my_val, 1, MPI_INT, &buffer[ 0 ], 1, MPI_INT, comm ); -} - -/* - * Sum across all rank - */ -void -nest::MPIManager::communicate_Allreduce_sum_in_place( double buffer ) -{ - MPI_Allreduce( MPI_IN_PLACE, &buffer, 1, MPI_Type< double >::type, MPI_SUM, comm ); -} - -void -nest::MPIManager::communicate_Allreduce_sum_in_place( std::vector< double >& buffer ) -{ - MPI_Allreduce( MPI_IN_PLACE, &buffer[ 0 ], buffer.size(), MPI_Type< double >::type, MPI_SUM, comm ); -} - -void -nest::MPIManager::communicate_Allreduce_sum_in_place( std::vector< int >& buffer ) -{ - MPI_Allreduce( MPI_IN_PLACE, &buffer[ 0 ], buffer.size(), MPI_Type< int >::type, MPI_SUM, comm ); -} - -void -nest::MPIManager::communicate_Allreduce_sum( std::vector< double >& send_buffer, std::vector< double >& recv_buffer ) -{ - assert( recv_buffer.size() == send_buffer.size() ); - MPI_Allreduce( &send_buffer[ 0 ], &recv_buffer[ 0 ], send_buffer.size(), MPI_Type< double >::type, MPI_SUM, comm ); -} - -void -<<<<<<< HEAD -nest::MPIManager::communicate_Allreduce_max_in_place( std::vector< long >& buffer ) -{ - MPI_Allreduce( MPI_IN_PLACE, &buffer[ 0 ], 1, MPI_LONG, MPI_MAX, comm ); -} - -double -nest::MPIManager::min_cross_ranks( double value ) -{ - MPI_Allreduce( MPI_IN_PLACE, &value, 1, MPI_DOUBLE, MPI_MIN, comm ); - return value; -} - -double -nest::MPIManager::max_cross_ranks( double value ) -{ - MPI_Allreduce( MPI_IN_PLACE, &value, 1, MPI_DOUBLE, MPI_MAX, comm ); - return value; -} - -void -======= ->>>>>>> master -nest::MPIManager::communicate_Allgather( std::vector< long >& buffer ) -{ - // avoid aliasing, see http://www.mpi-forum.org/docs/mpi-11-html/node10.html - long my_val = buffer[ get_rank() ]; - MPI_Allgather( &my_val, 1, MPI_LONG, &buffer[ 0 ], 1, MPI_LONG, comm ); -} - -void -nest::MPIManager::communicate_Alltoall_( void* send_buffer, void* recv_buffer, const unsigned int send_recv_count ) -{ - MPI_Alltoall( send_buffer, send_recv_count, MPI_UNSIGNED, recv_buffer, send_recv_count, MPI_UNSIGNED, comm ); -} - -void -nest::MPIManager::communicate_Alltoallv_( void* send_buffer, - const int* send_counts, - const int* send_displacements, - void* recv_buffer, - const int* recv_counts, - const int* recv_displacements ) -{ - MPI_Alltoallv( send_buffer, - send_counts, - send_displacements, - MPI_UNSIGNED, - recv_buffer, - recv_counts, - recv_displacements, - MPI_UNSIGNED, - comm ); -} - -void -nest::MPIManager::communicate_recv_counts_secondary_events() -{ - - communicate_Alltoall( - recv_counts_secondary_events_in_int_per_rank_, send_counts_secondary_events_in_int_per_rank_, 1 ); - - std::partial_sum( send_counts_secondary_events_in_int_per_rank_.begin(), - send_counts_secondary_events_in_int_per_rank_.end() - 1, - send_displacements_secondary_events_in_int_per_rank_.begin() + 1 ); -} - -/** - * Ensure all processes have reached the same stage by waiting until all - * processes have sent a dummy message to process 0. - */ -void -nest::MPIManager::synchronize() -{ - MPI_Barrier( comm ); -} - - -// any_true: takes a single bool, exchanges with all other processes, -// and returns "true" if one or more processes provide "true" -bool -nest::MPIManager::any_true( const bool my_bool ) -{ - if ( get_num_processes() == 1 ) - { - return my_bool; - } - - // since there is no MPI_BOOL we first convert to int - int my_int = my_bool; - - std::vector< int > all_int( get_num_processes() ); - MPI_Allgather( &my_int, 1, MPI_INT, &all_int[ 0 ], 1, MPI_INT, comm ); - // check if any MPI process sent a "true" - for ( unsigned int i = 0; i < all_int.size(); ++i ) - { - if ( all_int[ i ] != 0 ) - { - return true; - } - } - - return false; -} - -// average communication time for a packet size of num_bytes using Allgather -double -nest::MPIManager::time_communicate( int num_bytes, int samples ) -{ - if ( get_num_processes() == 1 ) - { - return 0.0; - } - unsigned int packet_length = num_bytes / sizeof( unsigned int ); - if ( packet_length < 1 ) - { - packet_length = 1; - } - std::vector< unsigned int > test_send_buffer( packet_length ); - std::vector< unsigned int > test_recv_buffer( packet_length * get_num_processes() ); - // start time measurement here - Stopwatch foo; - foo.start(); - for ( int i = 0; i < samples; ++i ) - { - MPI_Allgather( - &test_send_buffer[ 0 ], packet_length, MPI_UNSIGNED, &test_recv_buffer[ 0 ], packet_length, MPI_UNSIGNED, comm ); - } - // finish time measurement here - foo.stop(); - return foo.elapsed() / samples; -} - -// average communication time for a packet size of num_bytes using Allgatherv -double -nest::MPIManager::time_communicatev( int num_bytes, int samples ) -{ - if ( get_num_processes() == 1 ) - { - return 0.0; - } - unsigned int packet_length = num_bytes / sizeof( unsigned int ); - if ( packet_length < 1 ) - { - packet_length = 1; - } - std::vector< unsigned int > test_send_buffer( packet_length ); - std::vector< unsigned int > test_recv_buffer( packet_length * get_num_processes() ); - std::vector< int > n_nodes( get_num_processes(), packet_length ); - std::vector< int > displacements( get_num_processes(), 0 ); - - for ( int i = 1; i < get_num_processes(); ++i ) - { - displacements.at( i ) = displacements.at( i - 1 ) + n_nodes.at( i - 1 ); - } - - // start time measurement here - Stopwatch foo; - foo.start(); - for ( int i = 0; i < samples; ++i ) - { - communicate_Allgatherv( test_send_buffer, test_recv_buffer, displacements, n_nodes ); - } - - // finish time measurement here - foo.stop(); - return foo.elapsed() / samples; -} - -// average communication time for a packet size of num_bytes -double -nest::MPIManager::time_communicate_offgrid( int num_bytes, int samples ) -{ - if ( get_num_processes() == 1 ) - { - return 0.0; - } - unsigned int packet_length = num_bytes / sizeof( OffGridSpike ); - if ( packet_length < 1 ) - { - packet_length = 1; - } - std::vector< OffGridSpike > test_send_buffer( packet_length ); - std::vector< OffGridSpike > test_recv_buffer( packet_length * get_num_processes() ); - // start time measurement here - Stopwatch foo; - foo.start(); - for ( int i = 0; i < samples; ++i ) - { - MPI_Allgather( &test_send_buffer[ 0 ], - packet_length, - MPI_OFFGRID_SPIKE, - &test_recv_buffer[ 0 ], - packet_length, - MPI_OFFGRID_SPIKE, - comm ); - } - // finish time measurement here - foo.stop(); - return foo.elapsed() / samples; -} - -// average communication time for a packet size of num_bytes using Alltoall -double -nest::MPIManager::time_communicate_alltoall( int num_bytes, int samples ) -{ - if ( get_num_processes() == 1 ) - { - return 0.0; - } - unsigned int packet_length = num_bytes / sizeof( unsigned int ); // this size should be sent to each process - unsigned int total_packet_length = packet_length * get_num_processes(); // total size of send and receive buffers - if ( total_packet_length < 1 ) - { - total_packet_length = 1; - } - std::vector< unsigned int > test_send_buffer( total_packet_length ); - std::vector< unsigned int > test_recv_buffer( total_packet_length ); - // start time measurement here - Stopwatch foo; - foo.start(); - for ( int i = 0; i < samples; ++i ) - { - MPI_Alltoall( - &test_send_buffer[ 0 ], packet_length, MPI_UNSIGNED, &test_recv_buffer[ 0 ], packet_length, MPI_UNSIGNED, comm ); - } - // finish time measurement here - foo.stop(); - return foo.elapsed() / samples; -} - -// average communication time for a packet size of num_bytes using Alltoallv -double -nest::MPIManager::time_communicate_alltoallv( int num_bytes, int samples ) -{ - if ( get_num_processes() == 1 ) - { - return 0.0; - } - unsigned int packet_length = num_bytes / sizeof( unsigned int ); // this size should be sent to each process - unsigned int total_packet_length = packet_length * get_num_processes(); // total size of send and receive buffers - if ( total_packet_length < 1 ) - { - total_packet_length = 1; - } - std::vector< unsigned int > test_send_buffer( total_packet_length ); - std::vector< unsigned int > test_recv_buffer( total_packet_length ); - std::vector< int > n_nodes( get_num_processes(), packet_length ); - std::vector< int > displacements( get_num_processes(), 0 ); - - for ( int i = 1; i < get_num_processes(); ++i ) - { - displacements.at( i ) = displacements.at( i - 1 ) + n_nodes.at( i - 1 ); - } - - // start time measurement here - Stopwatch foo; - foo.start(); - for ( int i = 0; i < samples; ++i ) - { - MPI_Alltoallv( &test_send_buffer[ 0 ], - &n_nodes[ 0 ], - &displacements[ 0 ], - MPI_UNSIGNED, - &test_recv_buffer[ 0 ], - &n_nodes[ 0 ], - &displacements[ 0 ], - MPI_UNSIGNED, - comm ); - } - // finish time measurement here - foo.stop(); - return foo.elapsed() / samples; -} - -#else /* #ifdef HAVE_MPI */ - -/** - * communicate (on-grid) if compiled without MPI - */ -void -nest::MPIManager::communicate( std::vector< unsigned int >& send_buffer, - std::vector< unsigned int >& recv_buffer, - std::vector< int >& displacements ) -{ - displacements.resize( num_processes_, 0 ); - displacements[ 0 ] = 0; - if ( static_cast< size_t >( recv_buffer_size_ ) < send_buffer.size() ) - { - recv_buffer_size_ = send_buffer_size_ = send_buffer.size(); - recv_buffer.resize( recv_buffer_size_ ); - } - recv_buffer.swap( send_buffer ); -} - -/** - * communicate (off-grid) if compiled without MPI - */ -void -nest::MPIManager::communicate( std::vector< OffGridSpike >& send_buffer, - std::vector< OffGridSpike >& recv_buffer, - std::vector< int >& displacements ) -{ - displacements.resize( num_processes_, 0 ); - displacements[ 0 ] = 0; - if ( static_cast< size_t >( recv_buffer_size_ ) < send_buffer.size() ) - { - recv_buffer_size_ = send_buffer_size_ = send_buffer.size(); - recv_buffer.resize( recv_buffer_size_ ); - } - recv_buffer.swap( send_buffer ); -} - -void -nest::MPIManager::communicate( std::vector< double >& send_buffer, - std::vector< double >& recv_buffer, - std::vector< int >& displacements ) -{ - displacements.resize( num_processes_, 0 ); - displacements[ 0 ] = 0; - recv_buffer.swap( send_buffer ); -} - -void -nest::MPIManager::communicate( std::vector< unsigned long >& send_buffer, - std::vector< unsigned long >& recv_buffer, - std::vector< int >& displacements ) -{ - displacements.resize( num_processes_, 0 ); - displacements[ 0 ] = 0; - recv_buffer.swap( send_buffer ); -} - -void -nest::MPIManager::communicate( std::vector< int >& send_buffer, - std::vector< int >& recv_buffer, - std::vector< int >& displacements ) -{ - displacements.resize( num_processes_, 0 ); - displacements[ 0 ] = 0; - recv_buffer.swap( send_buffer ); -} - -void -nest::MPIManager::communicate( double send_val, std::vector< double >& recv_buffer ) -{ - recv_buffer.resize( 1 ); - recv_buffer[ 0 ] = send_val; -} - -void -nest::MPIManager::communicate( std::vector< long >&, std::vector< long >& ) -{ -} - -void -nest::MPIManager::communicate_Allreduce_sum_in_place( double ) -{ -} - -void -nest::MPIManager::communicate_Allreduce_sum_in_place( std::vector< double >& ) -{ -} - -void -nest::MPIManager::communicate_Allreduce_sum_in_place( std::vector< int >& ) -{ -} - -void -nest::MPIManager::communicate_Allreduce_sum( std::vector< double >& send_buffer, std::vector< double >& recv_buffer ) -{ - recv_buffer.swap( send_buffer ); -} - -void -<<<<<<< HEAD -nest::MPIManager::communicate_Allreduce_max_in_place( std::vector< long >& ) -{ - // Null operator for ranks == 1 - // Max already is the input -} - -double -nest::MPIManager::min_cross_ranks( double value ) -{ - return value; -} - -double -nest::MPIManager::max_cross_ranks( double value ) -{ - return value; -} - -void -======= ->>>>>>> master -nest::MPIManager::communicate_recv_counts_secondary_events() -{ - // since we only have one process, the send count is equal to the recv count - send_counts_secondary_events_in_int_per_rank_ = recv_counts_secondary_events_in_int_per_rank_; - - // since we only have one process, the send displacement is zero - assert( send_displacements_secondary_events_in_int_per_rank_.size() == 1 ); - send_displacements_secondary_events_in_int_per_rank_[ 0 ] = 0; -} - -#endif /* #ifdef HAVE_MPI */ diff --git a/nestkernel/mpi_manager.h b/nestkernel/mpi_manager.h index 0add96dfe9..5bbe001956 100644 --- a/nestkernel/mpi_manager.h +++ b/nestkernel/mpi_manager.h @@ -69,7 +69,7 @@ class MPIManager : public ManagerInterface virtual void finalize(); virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); void init_mpi( int* argc, char** argv[] ); #ifdef HAVE_MPI diff --git a/nestkernel/mpi_manager.h.orig b/nestkernel/mpi_manager.h.orig deleted file mode 100644 index 2113fa6d50..0000000000 --- a/nestkernel/mpi_manager.h.orig +++ /dev/null @@ -1,855 +0,0 @@ -/* - * mpi_manager.h - * - * This file is part of NEST. - * - * Copyright (C) 2004 The NEST Initiative - * - * NEST is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * NEST is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NEST. If not, see . - * - */ - -#ifndef MPI_MANAGER_H -#define MPI_MANAGER_H - -// Generated includes: -#include "config.h" - -// C includes: -#include -#ifdef HAVE_MPI -#include -#endif - -// C++ includes: -#include -#include -#include -#include -#include -#include - -// Includes from libnestutil: -#include "manager_interface.h" - -// Includes from nestkernel: -#include "nest_types.h" -#include "spike_data.h" -#include "target_data.h" - -// Includes from sli: -#include "dictdatum.h" - -namespace nest -{ - -class MPIManager : public ManagerInterface -{ -public: - // forward declaration of internal classes - class OffGridSpike; - - MPIManager(); - ~MPIManager() - { - } - - virtual void initialize(); - virtual void finalize(); - - virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); - - void init_mpi( int* argc, char** argv[] ); -#ifdef HAVE_MPI - void set_communicator( MPI_Comm ); - - MPI_Comm - get_communicator() - { - return comm; - }; -#endif - - /** - * Return the number of processes used during simulation. - * This functions returns the number of processes. - * Since each process has the same number of threads, the total number - * of threads is given by get_num_threads()*get_num_processes(). - */ - thread get_num_processes() const; - - /** - * Set the number of processes state variable. - * This is used by dryrun_mode. - */ - void set_num_processes( thread n_procs ); - - /** - * Get rank of MPI process - */ - thread get_rank() const; - - /** - * Return the process id for a given virtual process. The real process' id - * of a virtual process is defined by the relation: p = (vp mod P), where - * P is the total number of processes. - */ - thread get_process_id_of_vp( const thread vp ) const; - - /* - * Return the process id of the node with the specified node ID. - */ - thread get_process_id_of_node_id( const index node_id ) const; - - /** - * Finalize MPI communication (needs to be separate from MPIManager::finalize - * when compiled with MUSIC since spikes can arrive and handlers called here) - */ - void mpi_finalize( int exitcode ); - - /** - * If MPI is available, this method calls MPI_Abort with the exitcode. - */ - void mpi_abort( int exitcode ); - - /* - * gather all send_buffer vectors on other mpi process to recv_buffer - * vector - */ - void communicate( std::vector< long >& send_buffer, std::vector< long >& recv_buffer ); - - void communicate( std::vector< unsigned int >& send_buffer, - std::vector< unsigned int >& recv_buffer, - std::vector< int >& displacements ); - - void communicate( std::vector< OffGridSpike >& send_buffer, - std::vector< OffGridSpike >& recv_buffer, - std::vector< int >& displacements ); - - void communicate( std::vector< double >& send_buffer, - std::vector< double >& recv_buffer, - std::vector< int >& displacements ); - - void communicate( std::vector< unsigned long >& send_buffer, - std::vector< unsigned long >& recv_buffer, - std::vector< int >& displacements ); - - void - communicate( std::vector< int >& send_buffer, std::vector< int >& recv_buffer, std::vector< int >& displacements ); - - void communicate( double, std::vector< double >& ); - void communicate( std::vector< int >& ); - void communicate( std::vector< long >& ); - - /* - * Sum across all rank - */ - void communicate_Allreduce_sum_in_place( double buffer ); - void communicate_Allreduce_sum_in_place( std::vector< double >& buffer ); - void communicate_Allreduce_sum_in_place( std::vector< int >& buffer ); - void communicate_Allreduce_sum( std::vector< double >& send_buffer, std::vector< double >& recv_buffer ); - -<<<<<<< HEAD - /* - * Maximum across all ranks - */ - void communicate_Allreduce_max_in_place( std::vector< long >& buffer ); - - /** - * Minimum across all ranks. - * - * @param value value on calling rank - * @return minimum value across all ranks - */ - double min_cross_ranks( double value ); - - /** - * Maximum across all ranks. - * - * @param value value on calling rank - * @return maximum value across all ranks - */ - double max_cross_ranks( double value ); - - -======= ->>>>>>> master - std::string get_processor_name(); - - bool is_mpi_used(); - - /** - * Returns total size of MPI buffer for communication of connections. - */ - size_t get_buffer_size_target_data() const; - - /** - * Returns size of MPI buffer for connections divided by number of processes. - */ - unsigned int get_send_recv_count_target_data_per_rank() const; - - /** - * Returns total size of MPI buffer for communication of spikes. - */ - size_t get_buffer_size_spike_data() const; - - /** - * Returns size of MPI buffer for spikes divided by number of processes. - */ - unsigned int get_send_recv_count_spike_data_per_rank() const; - - /** - * Returns total size of MPI send buffer for communication of secondary events. - */ - size_t get_send_buffer_size_secondary_events_in_int() const; - - /** - * Returns total size of MPI recv buffer for communication of secondary events. - */ - size_t get_recv_buffer_size_secondary_events_in_int() const; - -#ifdef HAVE_MPI - - void communicate_Alltoall_( void* send_buffer, void* recv_buffer, const unsigned int send_recv_count ); - - void communicate_Alltoallv_( void* send_buffer, - const int* send_counts, - const int* send_displacements, - void* recv_buffer, - const int* recv_counts, - const int* recv_displacements ); - -#endif // HAVE_MPI - - template < class D > - void communicate_Alltoall( std::vector< D >& send_buffer, - std::vector< D >& recv_buffer, - const unsigned int send_recv_count ); - template < class D > - void communicate_target_data_Alltoall( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ); - template < class D > - void communicate_spike_data_Alltoall( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ); - template < class D > - void communicate_off_grid_spike_data_Alltoall( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ); - template < class D > - void communicate_secondary_events_Alltoallv( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ); - - void synchronize(); - - bool any_true( const bool ); - - /** - * Benchmark communication time of different MPI methods - * - * The methods `time_communicate*` can be used to benchmark the timing - * of different MPI communication methods. - */ - double time_communicate( int num_bytes, int samples = 1000 ); - double time_communicatev( int num_bytes, int samples = 1000 ); - double time_communicate_offgrid( int num_bytes, int samples = 1000 ); - double time_communicate_alltoall( int num_bytes, int samples = 1000 ); - double time_communicate_alltoallv( int num_bytes, int samples = 1000 ); - - void set_buffer_size_target_data( size_t buffer_size ); - void set_buffer_size_spike_data( size_t buffer_size ); - - /** - * Increases the size of the MPI buffer for communication of connections if it - * needs to be increased. Returns whether the size was changed. - */ - bool increase_buffer_size_target_data(); - - /** - * Increases the size of the MPI buffer for communication of spikes if it - * needs to be increased. Returns whether the size was changed. - */ - bool increase_buffer_size_spike_data(); - - /** - * Decreases the size of the MPI buffer for communication of spikes if it - * can be decreased. - */ - void decrease_buffer_size_spike_data(); - - /** - * Returns whether MPI buffers for communication of connections are adaptive. - */ - bool adaptive_target_buffers() const; - - /** - * Returns whether MPI buffers for communication of spikes are adaptive. - */ - bool adaptive_spike_buffers() const; - - /** - * Sets the recvcounts parameter of Alltoallv for communication of - * secondary events, i.e., the number of elements (in ints) to recv - * from the corresponding rank. - */ - void set_recv_counts_secondary_events_in_int_per_rank( const std::vector< int >& recv_counts_in_int_per_rank ); - - /** - * Returns the recvcounts parameter of Alltoallv for communication of - * secondary events, i.e., the number of elements (in ints) to recv - * from `source_rank`. - */ - size_t get_recv_count_secondary_events_in_int( const size_t source_rank ) const; - - /** - * Returns the rdispls parameter of Alltoallv for communication of - * secondary events, i.e., the offset in the MPI buffer where - * elements from `source_rank` are written. - */ - size_t get_recv_displacement_secondary_events_in_int( const size_t source_rank ) const; - - /** - * Returns the number of elements (in ints) to be sent to `target_rank`. - */ - size_t get_send_count_secondary_events_in_int( const size_t target_rank ) const; - - /** - * Returns the send displacement of elements (in ints) to be sent to rank `target_rank`. - */ - size_t get_send_displacement_secondary_events_in_int( const size_t target_rank ) const; - - /** - * Returns where the done marker is located in the MPI send buffer for `target_rank`. - */ - size_t get_done_marker_position_in_secondary_events_send_buffer( const size_t target_rank ) const; - - /** - * Returns where the done marker is located in the MPI recv buffer for `source_rank`. - */ - size_t get_done_marker_position_in_secondary_events_recv_buffer( const size_t source_rank ) const; - - void communicate_recv_counts_secondary_events(); - -private: - int num_processes_; //!< number of MPI processes - int rank_; //!< rank of the MPI process - int send_buffer_size_; //!< expected size of send buffer - int recv_buffer_size_; //!< size of receive buffer - bool use_mpi_; //!< whether MPI is used - size_t buffer_size_target_data_; //!< total size of MPI buffer for - // communication of connections - - size_t buffer_size_spike_data_; //!< total size of MPI buffer for - // communication of spikes - - size_t max_buffer_size_target_data_; //!< maximal size of MPI buffer for - // communication of connections - - size_t max_buffer_size_spike_data_; //!< maximal size of MPI buffer for - // communication of spikes - - bool adaptive_target_buffers_; //!< whether MPI buffers for communication of - // connections resize on the fly - - bool adaptive_spike_buffers_; //!< whether MPI buffers for communication of - // spikes resize on the fly - - double growth_factor_buffer_spike_data_; - double growth_factor_buffer_target_data_; - - double shrink_factor_buffer_spike_data_; - - unsigned int send_recv_count_spike_data_per_rank_; - unsigned int send_recv_count_target_data_per_rank_; - - std::vector< int > recv_counts_secondary_events_in_int_per_rank_; //!< how many secondary elements (in ints) will be - //!< received from each rank - std::vector< int > - send_counts_secondary_events_in_int_per_rank_; //!< how many secondary elements (in ints) will be sent to each rank - - std::vector< int > recv_displacements_secondary_events_in_int_per_rank_; //!< offset in the MPI receive buffer (in - //!< ints) at which elements received from each - //!< rank will be written - - std::vector< int > send_displacements_secondary_events_in_int_per_rank_; //!< offset in the MPI send buffer (in ints) -//!< from which elements send to each rank will -//!< be read - -#ifdef HAVE_MPI - //! array containing communication partner for each step. - std::vector< int > comm_step_; - unsigned int COMM_OVERFLOW_ERROR; - - //! Variable to hold the MPI communicator to use (the datatype matters). - MPI_Comm comm; - MPI_Datatype MPI_OFFGRID_SPIKE; - - void communicate_Allgather( std::vector< unsigned int >& send_buffer, - std::vector< unsigned int >& recv_buffer, - std::vector< int >& displacements ); - - void communicate_Allgather( std::vector< OffGridSpike >& send_buffer, - std::vector< OffGridSpike >& recv_buffer, - std::vector< int >& displacements ); - - void communicate_Allgather( std::vector< int >& ); - void communicate_Allgather( std::vector< long >& ); - - template < typename T > - void communicate_Allgatherv( std::vector< T >& send_buffer, - std::vector< T >& recv_buffer, - std::vector< int >& displacements, - std::vector< int >& recv_counts ); - - template < typename T > - void communicate_Allgather( std::vector< T >& send_buffer, - std::vector< T >& recv_buffer, - std::vector< int >& displacements ); - -#endif /* #ifdef HAVE_MPI */ - -public: - /** - * Combined storage of node ID and offset information for off-grid spikes. - * - * @note This class actually stores the node ID as @c double internally. - * This is done so that the user-defined MPI type MPI_OFFGRID_SPIKE, - * which we use to communicate off-grid spikes, is homogeneous. - * Otherwise, OpenMPI spends extreme amounts of time on packing - * and unpacking the data, see #458. - */ - class OffGridSpike - { - friend void MPIManager::init_mpi( int*, char*** ); - - public: - //! We defined this type explicitly, so that the assert function below - //! always tests the correct type. - typedef unsigned int node_id_external_type; - - OffGridSpike() - : node_id_( 0 ) - , offset_( 0.0 ) - { - } - OffGridSpike( node_id_external_type node_idv, double offsetv ) - : node_id_( node_idv ) - , offset_( offsetv ) - { - } - - unsigned int - get_node_id() const - { - return static_cast< node_id_external_type >( node_id_ ); - } - void - set_node_id( node_id_external_type node_id ) - { - node_id_ = static_cast< double >( node_id ); - } - double - get_offset() const - { - return offset_; - } - - private: - double node_id_; //!< node ID of neuron that spiked - double offset_; //!< offset of spike from grid - - //! This function asserts that doubles can hold node IDs without loss - static void - assert_datatype_compatibility_() - { - assert( std::numeric_limits< double >::digits > std::numeric_limits< node_id_external_type >::digits ); - - // the next one is doubling up, better be safe than sorry - const node_id_external_type maxnode_id = std::numeric_limits< node_id_external_type >::max(); - OffGridSpike ogs( maxnode_id, 0.0 ); - assert( maxnode_id == ogs.get_node_id() ); - } - }; -}; - -inline void -MPIManager::set_recv_counts_secondary_events_in_int_per_rank( const std::vector< int >& recv_counts_in_int_per_rank ) -{ - recv_counts_secondary_events_in_int_per_rank_ = recv_counts_in_int_per_rank; - - std::partial_sum( recv_counts_secondary_events_in_int_per_rank_.begin(), - recv_counts_secondary_events_in_int_per_rank_.end() - 1, - recv_displacements_secondary_events_in_int_per_rank_.begin() + 1 ); -} - -inline size_t -MPIManager::get_recv_count_secondary_events_in_int( const size_t source_rank ) const -{ - return recv_counts_secondary_events_in_int_per_rank_[ source_rank ]; -} - -inline size_t -MPIManager::get_recv_displacement_secondary_events_in_int( const size_t source_rank ) const -{ - return recv_displacements_secondary_events_in_int_per_rank_[ source_rank ]; -} - -inline size_t -MPIManager::get_send_count_secondary_events_in_int( const size_t target_rank ) const -{ - return send_counts_secondary_events_in_int_per_rank_[ target_rank ]; -} - -inline size_t -MPIManager::get_send_displacement_secondary_events_in_int( const size_t target_rank ) const -{ - return send_displacements_secondary_events_in_int_per_rank_[ target_rank ]; -} - -inline size_t -MPIManager::get_done_marker_position_in_secondary_events_send_buffer( const size_t target_rank ) const -{ - return get_send_displacement_secondary_events_in_int( target_rank ) - + get_send_count_secondary_events_in_int( target_rank ) - 1; -} - -inline size_t -MPIManager::get_done_marker_position_in_secondary_events_recv_buffer( const size_t source_rank ) const -{ - return get_recv_displacement_secondary_events_in_int( source_rank ) - + get_recv_count_secondary_events_in_int( source_rank ) - 1; -} - -inline thread -MPIManager::get_num_processes() const -{ - return num_processes_; -} - -inline void -MPIManager::set_num_processes( thread n_procs ) -{ - num_processes_ = n_procs; -} - -inline thread -MPIManager::get_rank() const -{ - return rank_; -} - -inline bool -MPIManager::is_mpi_used() -{ - return use_mpi_; -} - -inline size_t -MPIManager::get_buffer_size_target_data() const -{ - return buffer_size_target_data_; -} - -inline unsigned int -MPIManager::get_send_recv_count_target_data_per_rank() const -{ - return send_recv_count_target_data_per_rank_; -} - -inline size_t -MPIManager::get_buffer_size_spike_data() const -{ - return buffer_size_spike_data_; -} - -inline unsigned int -MPIManager::get_send_recv_count_spike_data_per_rank() const -{ - return send_recv_count_spike_data_per_rank_; -} - -inline size_t -MPIManager::get_send_buffer_size_secondary_events_in_int() const -{ - return send_displacements_secondary_events_in_int_per_rank_[ send_displacements_secondary_events_in_int_per_rank_ - .size() - 1 ] - + send_counts_secondary_events_in_int_per_rank_[ send_counts_secondary_events_in_int_per_rank_.size() - 1 ]; -} - -inline size_t -MPIManager::get_recv_buffer_size_secondary_events_in_int() const -{ - return recv_displacements_secondary_events_in_int_per_rank_[ recv_displacements_secondary_events_in_int_per_rank_ - .size() - 1 ] - + recv_counts_secondary_events_in_int_per_rank_[ recv_counts_secondary_events_in_int_per_rank_.size() - 1 ]; -} - -inline void -MPIManager::set_buffer_size_target_data( const size_t buffer_size ) -{ - assert( buffer_size >= static_cast< size_t >( 2 * get_num_processes() ) ); - if ( buffer_size <= max_buffer_size_target_data_ ) - { - buffer_size_target_data_ = buffer_size; - } - else - { - buffer_size_target_data_ = max_buffer_size_target_data_; - } - send_recv_count_target_data_per_rank_ = static_cast< size_t >( - floor( static_cast< double >( get_buffer_size_target_data() ) / static_cast< double >( get_num_processes() ) ) ); - - assert( send_recv_count_target_data_per_rank_ * get_num_processes() <= get_buffer_size_target_data() ); -} - -inline void -MPIManager::set_buffer_size_spike_data( const size_t buffer_size ) -{ - assert( buffer_size >= static_cast< size_t >( 2 * get_num_processes() ) ); - if ( buffer_size <= max_buffer_size_spike_data_ ) - { - buffer_size_spike_data_ = buffer_size; - } - else - { - buffer_size_spike_data_ = max_buffer_size_spike_data_; - } - - send_recv_count_spike_data_per_rank_ = floor( get_buffer_size_spike_data() / get_num_processes() ); - - assert( send_recv_count_spike_data_per_rank_ * get_num_processes() <= get_buffer_size_spike_data() ); -} - -inline bool -MPIManager::increase_buffer_size_target_data() -{ - assert( adaptive_target_buffers_ ); - if ( buffer_size_target_data_ >= max_buffer_size_target_data_ ) - { - return false; - } - else - { - if ( buffer_size_target_data_ * growth_factor_buffer_target_data_ < max_buffer_size_target_data_ ) - { - // this also adjusts send_recv_count_target_data_per_rank_ - set_buffer_size_target_data( - static_cast< size_t >( floor( buffer_size_target_data_ * growth_factor_buffer_target_data_ ) ) ); - } - else - { - // this also adjusts send_recv_count_target_data_per_rank_ - set_buffer_size_target_data( max_buffer_size_target_data_ ); - } - return true; - } -} - -inline bool -MPIManager::increase_buffer_size_spike_data() -{ - assert( adaptive_spike_buffers_ ); - if ( buffer_size_spike_data_ >= max_buffer_size_spike_data_ ) - { - return false; - } - else - { - if ( buffer_size_spike_data_ * growth_factor_buffer_spike_data_ < max_buffer_size_spike_data_ ) - { - set_buffer_size_spike_data( floor( buffer_size_spike_data_ * growth_factor_buffer_spike_data_ ) ); - } - else - { - set_buffer_size_spike_data( max_buffer_size_spike_data_ ); - } - return true; - } -} - -inline void -MPIManager::decrease_buffer_size_spike_data() -{ - assert( adaptive_spike_buffers_ ); - // the minimum is set to 4.0 * get_num_processes() to differentiate the initial size - if ( buffer_size_spike_data_ / shrink_factor_buffer_spike_data_ > 4.0 * get_num_processes() ) - { - set_buffer_size_spike_data( floor( buffer_size_spike_data_ / shrink_factor_buffer_spike_data_ ) ); - } -} - -inline bool -MPIManager::adaptive_target_buffers() const -{ - return adaptive_target_buffers_; -} - -inline bool -MPIManager::adaptive_spike_buffers() const -{ - return adaptive_spike_buffers_; -} - -#ifndef HAVE_MPI -inline std::string -MPIManager::get_processor_name() -{ - char name[ 1024 ]; - name[ 1023 ] = '\0'; - gethostname( name, 1023 ); - return name; -} - -inline void -MPIManager::mpi_abort( int ) -{ -} - -inline void -MPIManager::communicate( std::vector< int >& ) -{ -} - -inline void -MPIManager::communicate( std::vector< long >& ) -{ -} - -inline void -MPIManager::synchronize() -{ -} - -inline void -test_link( int, int ) -{ -} - -inline void -test_links() -{ -} - -inline bool -MPIManager::any_true( const bool my_bool ) -{ - return my_bool; -} - -inline double -MPIManager::time_communicate( int, int ) -{ - return 0.0; -} - -inline double -MPIManager::time_communicatev( int, int ) -{ - return 0.0; -} - -inline double -MPIManager::time_communicate_offgrid( int, int ) -{ - return 0.0; -} - -inline double -MPIManager::time_communicate_alltoall( int, int ) -{ - return 0.0; -} - -inline double -MPIManager::time_communicate_alltoallv( int, int ) -{ - return 0.0; -} - -#endif /* HAVE_MPI */ - -#ifdef HAVE_MPI -template < class D > -void -MPIManager::communicate_Alltoall( std::vector< D >& send_buffer, - std::vector< D >& recv_buffer, - const unsigned int send_recv_count ) -{ - void* send_buffer_int = static_cast< void* >( &send_buffer[ 0 ] ); - void* recv_buffer_int = static_cast< void* >( &recv_buffer[ 0 ] ); - - communicate_Alltoall_( send_buffer_int, recv_buffer_int, send_recv_count ); -} - -template < class D > -void -MPIManager::communicate_secondary_events_Alltoallv( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ) -{ - void* send_buffer_int = static_cast< void* >( &send_buffer[ 0 ] ); - void* recv_buffer_int = static_cast< void* >( &recv_buffer[ 0 ] ); - - communicate_Alltoallv_( send_buffer_int, - &send_counts_secondary_events_in_int_per_rank_[ 0 ], - &send_displacements_secondary_events_in_int_per_rank_[ 0 ], - recv_buffer_int, - &recv_counts_secondary_events_in_int_per_rank_[ 0 ], - &recv_displacements_secondary_events_in_int_per_rank_[ 0 ] ); -} - -#else // HAVE_MPI -template < class D > -void -MPIManager::MPIManager::communicate_Alltoall( std::vector< D >& send_buffer, - std::vector< D >& recv_buffer, - const unsigned int ) -{ - recv_buffer.swap( send_buffer ); -} - -template < class D > -void -MPIManager::communicate_secondary_events_Alltoallv( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ) -{ - recv_buffer.swap( send_buffer ); -} - -#endif // HAVE_MPI - -template < class D > -void -MPIManager::communicate_target_data_Alltoall( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ) -{ - const size_t send_recv_count_target_data_in_int_per_rank = - sizeof( TargetData ) / sizeof( unsigned int ) * send_recv_count_target_data_per_rank_; - - communicate_Alltoall( send_buffer, recv_buffer, send_recv_count_target_data_in_int_per_rank ); -} - -template < class D > -void -MPIManager::communicate_spike_data_Alltoall( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ) -{ - const size_t send_recv_count_spike_data_in_int_per_rank = - sizeof( SpikeData ) / sizeof( unsigned int ) * send_recv_count_spike_data_per_rank_; - - communicate_Alltoall( send_buffer, recv_buffer, send_recv_count_spike_data_in_int_per_rank ); -} - -template < class D > -void -MPIManager::communicate_off_grid_spike_data_Alltoall( std::vector< D >& send_buffer, std::vector< D >& recv_buffer ) -{ - const size_t send_recv_count_off_grid_spike_data_in_int_per_rank = - sizeof( OffGridSpikeData ) / sizeof( unsigned int ) * send_recv_count_spike_data_per_rank_; - - communicate_Alltoall( send_buffer, recv_buffer, send_recv_count_off_grid_spike_data_in_int_per_rank ); -} -} - -#endif /* MPI_MANAGER_H */ diff --git a/nestkernel/music_manager.cpp b/nestkernel/music_manager.cpp index 58787985e7..35367c65de 100644 --- a/nestkernel/music_manager.cpp +++ b/nestkernel/music_manager.cpp @@ -78,7 +78,7 @@ MUSICManager::set_status( const DictionaryDatum& ) } void -MUSICManager::get_status( DictionaryDatum& ) +MUSICManager::get_status( dictionary& ) { } diff --git a/nestkernel/music_manager.h b/nestkernel/music_manager.h index ee38eb13e6..0daeb314c3 100644 --- a/nestkernel/music_manager.h +++ b/nestkernel/music_manager.h @@ -80,7 +80,7 @@ class MUSICManager : public ManagerInterface virtual void finalize(); // called from meta-manger to reinit virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); MUSICManager(); diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index c51c882d1b..203a15f0aa 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -130,6 +130,8 @@ get_kernel_status() dictionary d; + kernel().get_status( d ); + d[ "test_first" ] = 42; // kernel().get_status( d ); diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp index bc855a21c4..d9112e9ba5 100644 --- a/nestkernel/node_manager.cpp +++ b/nestkernel/node_manager.cpp @@ -792,10 +792,10 @@ NodeManager::set_status( index node_id, const DictionaryDatum& d ) } void -NodeManager::get_status( DictionaryDatum& d ) +NodeManager::get_status( dictionary& d ) { - def< long >( d, names::network_size, size() ); - def< double >( d, names::time_construction_create, sw_construction_create_.elapsed() ); + d[ names::network_size.toString() ] = size(); + d[ names::time_construction_create.toString() ] = sw_construction_create_.elapsed(); } void diff --git a/nestkernel/node_manager.h b/nestkernel/node_manager.h index 8d3c909111..86da75c265 100644 --- a/nestkernel/node_manager.h +++ b/nestkernel/node_manager.h @@ -56,7 +56,7 @@ class NodeManager : public ManagerInterface virtual void finalize(); virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); /** * Get properties of a node. The specified node must exist. diff --git a/nestkernel/random_manager.cpp b/nestkernel/random_manager.cpp index 669da29aaa..12570367ba 100644 --- a/nestkernel/random_manager.cpp +++ b/nestkernel/random_manager.cpp @@ -125,17 +125,17 @@ nest::RandomManager::reset_rngs_() } void -nest::RandomManager::get_status( DictionaryDatum& d ) +nest::RandomManager::get_status( dictionary& d ) { - ArrayDatum rng_types; + std::vector< std::string > rng_types; for ( auto rng = rng_types_.begin(); rng != rng_types_.end(); ++rng ) { rng_types.push_back( rng->first ); } - def< ArrayDatum >( d, names::rng_types, rng_types ); - def< long >( d, names::rng_seed, base_seed_ ); - def< std::string >( d, names::rng_type, current_rng_type_ ); + d[ names::rng_types.toString() ] = rng_types; + d[ names::rng_seed.toString() ] = static_cast< long >( base_seed_ ); // casting to avoid checking for exotic types + d[ names::rng_type.toString() ] = current_rng_type_; } void diff --git a/nestkernel/random_manager.h b/nestkernel/random_manager.h index cdf2ed0bea..94ff37413c 100644 --- a/nestkernel/random_manager.h +++ b/nestkernel/random_manager.h @@ -60,7 +60,7 @@ class RandomManager : public ManagerInterface virtual void finalize(); virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); /** * Get rank-synchronized random number generator. diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp index 400bd38637..10ac1a7471 100644 --- a/nestkernel/simulation_manager.cpp +++ b/nestkernel/simulation_manager.cpp @@ -412,36 +412,37 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) } void -nest::SimulationManager::get_status( DictionaryDatum& d ) +nest::SimulationManager::get_status( dictionary& d ) { - def< double >( d, names::ms_per_tic, Time::get_ms_per_tic() ); - def< double >( d, names::tics_per_ms, Time::get_tics_per_ms() ); - def< long >( d, names::tics_per_step, Time::get_tics_per_step() ); - def< double >( d, names::resolution, Time::get_resolution().get_ms() ); - - def< double >( d, names::T_min, Time::min().get_ms() ); - def< double >( d, names::T_max, Time::max().get_ms() ); - - def< double >( d, names::biological_time, get_time().get_ms() ); - def< long >( d, names::to_do, to_do_ ); - def< bool >( d, names::print_time, print_time_ ); - - def< bool >( d, names::use_wfr, use_wfr_ ); - def< double >( d, names::wfr_comm_interval, wfr_comm_interval_ ); - def< double >( d, names::wfr_tol, wfr_tol_ ); - def< long >( d, names::wfr_max_iterations, wfr_max_iterations_ ); - def< long >( d, names::wfr_interpolation_order, wfr_interpolation_order_ ); - - def< double >( d, names::update_time_limit, update_time_limit_ ); - def< double >( d, names::min_update_time, min_update_time_ ); - def< double >( d, names::max_update_time, max_update_time_ ); - - def< double >( d, names::time_simulate, sw_simulate_.elapsed() ); - def< double >( d, names::time_communicate_prepare, sw_communicate_prepare_.elapsed() ); + d[ names::ms_per_tic.toString() ] = Time::get_ms_per_tic(); + d[ names::tics_per_ms.toString() ] = Time::get_tics_per_ms(); + d[ names::tics_per_step.toString() ] = + static_cast< size_t >( Time::get_tics_per_step() ); // casting to avoid extra checks of any types + d[ names::resolution.toString() ] = Time::get_resolution().get_ms(); + + d[ names::T_min.toString() ] = Time::min().get_ms(); + d[ names::T_max.toString() ] = Time::max().get_ms(); + + d[ names::biological_time.toString() ] = get_time().get_ms(); + d[ names::to_do.toString() ] = static_cast< long >( to_do_ ); // casting to avoid extra checks of any types + d[ names::print_time.toString() ] = print_time_; + + d[ names::use_wfr.toString() ] = use_wfr_; + d[ names::wfr_comm_interval.toString() ] = wfr_comm_interval_; + d[ names::wfr_tol.toString() ] = wfr_tol_; + d[ names::wfr_max_iterations.toString() ] = wfr_max_iterations_; + d[ names::wfr_interpolation_order.toString() ] = wfr_interpolation_order_; + + d[ names::update_time_limit.toString() ] = update_time_limit_; + d[ names::min_update_time.toString() ] = min_update_time_; + d[ names::max_update_time.toString() ] = max_update_time_; + + d[ names::time_simulate.toString() ] = sw_simulate_.elapsed(); + d[ names::time_communicate_prepare.toString() ] = sw_communicate_prepare_.elapsed(); #ifdef TIMER_DETAILED - def< double >( d, names::time_gather_spike_data, sw_gather_spike_data_.elapsed() ); - def< double >( d, names::time_update, sw_update_.elapsed() ); - def< double >( d, names::time_gather_target_data, sw_gather_target_data_.elapsed() ); + d[ names::time_gather_spike_data.toString() ] = sw_gather_spike_data_.elapsed(); + d[ names::time_update.toString() ] = sw_update_.elapsed(); + d[ names::time_gather_target_data.toString() ] = sw_gather_target_data_.elapsed(); #endif } diff --git a/nestkernel/simulation_manager.h b/nestkernel/simulation_manager.h index 8b24c2372a..1196b5e7b2 100644 --- a/nestkernel/simulation_manager.h +++ b/nestkernel/simulation_manager.h @@ -53,7 +53,7 @@ class SimulationManager : public ManagerInterface virtual void finalize(); virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); /** check for errors in time before run diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp index ec01551cf1..f41134e888 100644 --- a/nestkernel/sp_manager.cpp +++ b/nestkernel/sp_manager.cpp @@ -91,25 +91,25 @@ SPManager::finalize() * Methods to retrieve data regarding structural plasticity variables */ void -SPManager::get_status( DictionaryDatum& d ) +SPManager::get_status( dictionary& d ) { - DictionaryDatum sp_synapses = DictionaryDatum( new Dictionary() ); - DictionaryDatum sp_synapse; - def< DictionaryDatum >( d, names::structural_plasticity_synapses, sp_synapses ); + dictionary sp_synapses; + for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ ) { - sp_synapse = DictionaryDatum( new Dictionary() ); - def< std::string >( sp_synapse, names::pre_synaptic_element, ( *i )->get_pre_synaptic_element_name() ); - def< std::string >( sp_synapse, names::post_synaptic_element, ( *i )->get_post_synaptic_element_name() ); - def< std::string >( sp_synapse, - names::synapse_model, - kernel().model_manager.get_synapse_prototype( ( *i )->get_synapse_model(), 0 ).get_name() ); + dictionary sp_synapse; + // DictionaryDatum sp_synapse = DictionaryDatum( new Dictionary() ); + sp_synapse[ names::pre_synaptic_element.toString() ] = ( *i )->get_pre_synaptic_element_name(); + sp_synapse[ names::post_synaptic_element.toString() ] = ( *i )->get_post_synaptic_element_name(); + sp_synapse[ names::synapse_model.toString() ] = + kernel().model_manager.get_synapse_prototype( ( *i )->get_synapse_model(), 0 ).get_name(); std::stringstream syn_name; syn_name << "syn" << ( sp_conn_builders_.end() - i ); - def< DictionaryDatum >( sp_synapses, syn_name.str(), sp_synapse ); + sp_synapses[ syn_name.str() ] = sp_synapse; } - def< double >( d, names::structural_plasticity_update_interval, structural_plasticity_update_interval_ ); + d[ names::structural_plasticity_synapses.toString() ] = sp_synapses; + d[ names::structural_plasticity_update_interval.toString() ] = structural_plasticity_update_interval_; } /** diff --git a/nestkernel/sp_manager.h b/nestkernel/sp_manager.h index d281cc1524..069cd21f08 100644 --- a/nestkernel/sp_manager.h +++ b/nestkernel/sp_manager.h @@ -69,7 +69,7 @@ class SPManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); virtual void set_status( const DictionaryDatum& ); DictionaryDatum& get_growthcurvedict(); diff --git a/nestkernel/vp_manager.cpp b/nestkernel/vp_manager.cpp index 5738bf62da..a8da0469aa 100644 --- a/nestkernel/vp_manager.cpp +++ b/nestkernel/vp_manager.cpp @@ -193,10 +193,10 @@ nest::VPManager::set_status( const DictionaryDatum& d ) } void -nest::VPManager::get_status( DictionaryDatum& d ) +nest::VPManager::get_status( dictionary& d ) { - def< long >( d, names::local_num_threads, get_num_threads() ); - def< long >( d, names::total_num_virtual_procs, get_num_virtual_processes() ); + d[ names::local_num_threads.toString() ] = get_num_threads(); + d[ names::total_num_virtual_procs.toString() ] = get_num_virtual_processes(); } void diff --git a/nestkernel/vp_manager.h b/nestkernel/vp_manager.h index 381e8d767d..1e99ddcaf4 100644 --- a/nestkernel/vp_manager.h +++ b/nestkernel/vp_manager.h @@ -60,7 +60,7 @@ class VPManager : public ManagerInterface virtual void finalize(); virtual void set_status( const DictionaryDatum& ); - virtual void get_status( DictionaryDatum& ); + virtual void get_status( dictionary& ); /** * Gets ID of local thread. diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 4518c52114..22ce6818e6 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -160,11 +160,16 @@ cdef extern from "dictionary.h": bint operator!=(const const_iterator&) const_iterator begin() const_iterator end() + string debug_type(const any&) cbool is_int(const any&) + cbool is_long(const any&) + cbool is_size_t(const any&) cbool is_double(const any&) + cbool is_bool(const any&) cbool is_string(const any&) cbool is_int_vector(const any&) cbool is_double_vector(const any&) + cbool is_string_vector(const any&) cbool is_dict(const any&) cdef extern from "mpi_manager.h" namespace "nest": diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index c695d1773c..476c3c6664 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -608,6 +608,24 @@ cdef inline object sli_vector_to_object(sli_vector_ptr_t dat, vector_value_t _ = cdef object any_to_pyobj(any operand): if is_int(operand): return any_cast[int](operand) + if is_long(operand): + return any_cast[long](operand) + if is_size_t(operand): + return any_cast[size_t](operand) + if is_double(operand): + return any_cast[double](operand) + if is_bool(operand): + return any_cast[cbool](operand) + if is_string(operand): + return any_cast[string](operand) + if is_int_vector(operand): + return any_cast[vector[int]](operand) + if is_double_vector(operand): + return any_cast[vector[double]](operand) + if is_string_vector(operand): + return any_cast[vector[string]](operand) + if is_dict(operand): + return dictionary_to_pydict(any_cast[dictionary](operand)) cdef object dictionary_to_pydict(dictionary cdict): cdef tmp = {} @@ -615,6 +633,8 @@ cdef object dictionary_to_pydict(dictionary cdict): cdef dictionary.const_iterator it = cdict.begin() while it != cdict.end(): tmp[deref(it).first.decode('utf8')] = any_to_pyobj(deref(it).second) + if tmp[deref(it).first.decode('utf8')] is None: + print('Could not convert: ' + deref(it).first.decode('utf8') + ' of type ' + debug_type(deref(it).second).decode('utf8')) inc(it) return tmp @@ -629,18 +649,4 @@ def llapi_to_string(NodeCollectionObject nc): def llapi_get_kernel_status(): cdef dictionary cdict = get_kernel_status() - - # for d in dict: - # print(d) - return dictionary_to_pydict(cdict) - - # cdef dictionary.const_iterator it = dict.begin() - # while it != dict.end(): - # print(deref(it).first) - # print(any_to_pyobj(deref(it).second)) - # inc(it) - - # return dict - # return dictionary - # return sli_dict_to_object( get_kernel_status()) From 9ce2acbe63c8b5f481b7e5cb7421424a9750f1c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 19 Jan 2022 09:02:07 +0100 Subject: [PATCH 008/375] Replaced DictionaryDatum with dictionary in recording backends --- nestkernel/io_manager.cpp | 18 ++++++++---------- nestkernel/recording_backend.h | 4 +++- nestkernel/recording_backend_ascii.cpp | 2 +- nestkernel/recording_backend_ascii.h | 2 +- nestkernel/recording_backend_memory.cpp | 2 +- nestkernel/recording_backend_memory.h | 2 +- nestkernel/recording_backend_mpi.cpp | 2 +- nestkernel/recording_backend_mpi.h | 2 +- nestkernel/recording_backend_screen.cpp | 2 +- nestkernel/recording_backend_screen.h | 2 +- nestkernel/recording_backend_sionlib.cpp | 16 ++++++++-------- nestkernel/recording_backend_sionlib.h | 4 ++-- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp index 3926f140c3..792d05f364 100644 --- a/nestkernel/io_manager.cpp +++ b/nestkernel/io_manager.cpp @@ -207,16 +207,14 @@ IOManager::get_status( dictionary& d ) d[ names::data_prefix.toString() ] = data_prefix_; d[ names::overwrite_files.toString() ] = overwrite_files_; - // TODO-PYNEST-NG: dict implement get_status() for recording backends with dictionary. - - // DictionaryDatum recording_backends( new Dictionary ); - // for ( const auto& it : recording_backends_ ) - // { - // DictionaryDatum recording_backend_status( new Dictionary ); - // it.second->get_status( recording_backend_status ); - // ( *recording_backends )[ it.first ] = recording_backend_status; - // } - // ( *d )[ names::recording_backends ] = recording_backends; + dictionary recording_backends; + for ( const auto& it : recording_backends_ ) + { + dictionary recording_backend_status; + it.second->get_status( recording_backend_status ); + recording_backends[ it.first.toString() ] = recording_backend_status; + } + d[ names::recording_backends.toString() ] = recording_backends; } void diff --git a/nestkernel/recording_backend.h b/nestkernel/recording_backend.h index 6554402629..382b7a6a0b 100644 --- a/nestkernel/recording_backend.h +++ b/nestkernel/recording_backend.h @@ -30,6 +30,8 @@ #include "dictdatum.h" #include "name.h" +#include "dictionary.h" + namespace nest { @@ -268,7 +270,7 @@ class RecordingBackend * * @ingroup NESTio */ - virtual void get_status( DictionaryDatum& params ) const = 0; + virtual void get_status( dictionary& params ) const = 0; /** * Check if the given per-device properties are valid and usable by diff --git a/nestkernel/recording_backend_ascii.cpp b/nestkernel/recording_backend_ascii.cpp index 9e4ecfc371..70ba43f6ac 100644 --- a/nestkernel/recording_backend_ascii.cpp +++ b/nestkernel/recording_backend_ascii.cpp @@ -187,7 +187,7 @@ nest::RecordingBackendASCII::set_status( const DictionaryDatum& ) } void -nest::RecordingBackendASCII::get_status( DictionaryDatum& ) const +nest::RecordingBackendASCII::get_status( dictionary& ) const { // nothing to do } diff --git a/nestkernel/recording_backend_ascii.h b/nestkernel/recording_backend_ascii.h index 40193b7f8e..efe969cc9e 100644 --- a/nestkernel/recording_backend_ascii.h +++ b/nestkernel/recording_backend_ascii.h @@ -183,7 +183,7 @@ class RecordingBackendASCII : public RecordingBackend void write( const RecordingDevice&, const Event&, const std::vector< double >&, const std::vector< long >& ) override; void set_status( const DictionaryDatum& ) override; - void get_status( DictionaryDatum& ) const override; + void get_status( dictionary& ) const override; void check_device_status( const DictionaryDatum& ) const override; void get_device_defaults( DictionaryDatum& ) const override; diff --git a/nestkernel/recording_backend_memory.cpp b/nestkernel/recording_backend_memory.cpp index 6ff762603f..236134b1d7 100644 --- a/nestkernel/recording_backend_memory.cpp +++ b/nestkernel/recording_backend_memory.cpp @@ -152,7 +152,7 @@ nest::RecordingBackendMemory::post_step_hook() } void -nest::RecordingBackendMemory::get_status( lockPTRDatum< Dictionary, &SLIInterpreter::Dictionarytype >& ) const +nest::RecordingBackendMemory::get_status( dictionary& ) const { // nothing to do } diff --git a/nestkernel/recording_backend_memory.h b/nestkernel/recording_backend_memory.h index 9f07bbc5b8..0557a36ce3 100644 --- a/nestkernel/recording_backend_memory.h +++ b/nestkernel/recording_backend_memory.h @@ -140,7 +140,7 @@ class RecordingBackendMemory : public RecordingBackend void set_status( const DictionaryDatum& ) override; - void get_status( DictionaryDatum& ) const override; + void get_status( dictionary& ) const override; void check_device_status( const DictionaryDatum& ) const override; void get_device_defaults( DictionaryDatum& ) const override; diff --git a/nestkernel/recording_backend_mpi.cpp b/nestkernel/recording_backend_mpi.cpp index 8bd2309f09..18a2b8cee6 100644 --- a/nestkernel/recording_backend_mpi.cpp +++ b/nestkernel/recording_backend_mpi.cpp @@ -343,7 +343,7 @@ nest::RecordingBackendMPI::write( const RecordingDevice& device, * Parameter extraction and manipulation functions * ---------------------------------------------------------------- */ void -nest::RecordingBackendMPI::get_status( DictionaryDatum& ) const +nest::RecordingBackendMPI::get_status( dictionary& ) const { // nothing to do } diff --git a/nestkernel/recording_backend_mpi.h b/nestkernel/recording_backend_mpi.h index d18f61be99..b431293231 100644 --- a/nestkernel/recording_backend_mpi.h +++ b/nestkernel/recording_backend_mpi.h @@ -120,7 +120,7 @@ class RecordingBackendMPI : public RecordingBackend void set_status( const DictionaryDatum& ) override; - void get_status( DictionaryDatum& ) const override; + void get_status( dictionary& ) const override; void pre_run_hook() override; diff --git a/nestkernel/recording_backend_screen.cpp b/nestkernel/recording_backend_screen.cpp index 71b9657731..6f1742c9dc 100644 --- a/nestkernel/recording_backend_screen.cpp +++ b/nestkernel/recording_backend_screen.cpp @@ -159,7 +159,7 @@ nest::RecordingBackendScreen::set_status( const DictionaryDatum& ) } void -nest::RecordingBackendScreen::get_status( DictionaryDatum& ) const +nest::RecordingBackendScreen::get_status( dictionary& ) const { // nothing to do } diff --git a/nestkernel/recording_backend_screen.h b/nestkernel/recording_backend_screen.h index 4843210b86..da2e89df62 100644 --- a/nestkernel/recording_backend_screen.h +++ b/nestkernel/recording_backend_screen.h @@ -115,7 +115,7 @@ class RecordingBackendScreen : public RecordingBackend void set_status( const DictionaryDatum& ) override; - void get_status( DictionaryDatum& ) const override; + void get_status( dictionary& ) const override; void check_device_status( const DictionaryDatum& ) const override; void get_device_defaults( DictionaryDatum& ) const override; diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp index 2e1883e462..de2b51802d 100644 --- a/nestkernel/recording_backend_sionlib.cpp +++ b/nestkernel/recording_backend_sionlib.cpp @@ -619,13 +619,13 @@ nest::RecordingBackendSIONlib::Parameters_::Parameters_() } void -nest::RecordingBackendSIONlib::Parameters_::get( const RecordingBackendSIONlib&, DictionaryDatum& d ) const +nest::RecordingBackendSIONlib::Parameters_::get( const RecordingBackendSIONlib&, dictionary& d ) const { - ( *d )[ names::filename ] = filename_; - ( *d )[ names::buffer_size ] = buffer_size_; - ( *d )[ names::sion_chunksize ] = sion_chunksize_; - ( *d )[ names::sion_collective ] = sion_collective_; - ( *d )[ names::sion_n_files ] = sion_n_files_; + d[ names::filename.toString() ] = filename_; + d[ names::buffer_size.toString() ] = buffer_size_; + d[ names::sion_chunksize.toString() ] = sion_chunksize_; + d[ names::sion_collective.toString() ] = sion_collective_; + d[ names::sion_n_files.toString() ] = sion_n_files_; } void @@ -649,11 +649,11 @@ nest::RecordingBackendSIONlib::set_status( const DictionaryDatum& d ) } void -nest::RecordingBackendSIONlib::get_status( DictionaryDatum& d ) const +nest::RecordingBackendSIONlib::get_status( dictionary& d ) const { P_.get( *this, d ); - ( *d )[ names::filename ] = filename_; + d[ names::filename.toString() ] = filename_; } void diff --git a/nestkernel/recording_backend_sionlib.h b/nestkernel/recording_backend_sionlib.h index 4bca86ce17..1735af02e9 100644 --- a/nestkernel/recording_backend_sionlib.h +++ b/nestkernel/recording_backend_sionlib.h @@ -225,7 +225,7 @@ class RecordingBackendSIONlib : public RecordingBackend void set_status( const DictionaryDatum& ) override; - void get_status( DictionaryDatum& ) const override; + void get_status( dictionary& ) const override; void pre_run_hook() override; @@ -356,7 +356,7 @@ class RecordingBackendSIONlib : public RecordingBackend Parameters_(); - void get( const RecordingBackendSIONlib&, DictionaryDatum& ) const; + void get( const RecordingBackendSIONlib&, dictionary& ) const; void set( const RecordingBackendSIONlib&, const DictionaryDatum& ); }; From f6c7232e589ef8d06054b152fa07ba324667c822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 25 Jan 2022 11:21:59 +0100 Subject: [PATCH 009/375] Implemented Connect() --- libnestutil/CMakeLists.txt | 4 + libnestutil/dict_util.h | 55 +- libnestutil/dictionary.cpp | 212 +++++ libnestutil/dictionary.h | 55 +- models/ac_generator.cpp | 36 +- models/ac_generator.h | 16 +- models/aeif_cond_alpha.cpp | 100 +- models/aeif_cond_alpha.h | 18 +- models/aeif_cond_alpha_multisynapse.cpp | 86 +- models/aeif_cond_alpha_multisynapse.h | 16 +- models/aeif_cond_beta_multisynapse.cpp | 90 +- models/aeif_cond_beta_multisynapse.h | 16 +- models/aeif_cond_exp.cpp | 92 +- models/aeif_cond_exp.h | 18 +- models/aeif_psc_alpha.cpp | 92 +- models/aeif_psc_alpha.h | 18 +- models/aeif_psc_delta.cpp | 72 +- models/aeif_psc_delta.h | 18 +- models/aeif_psc_delta_clopath.cpp | 126 +-- models/aeif_psc_delta_clopath.h | 18 +- models/aeif_psc_exp.cpp | 84 +- models/aeif_psc_exp.h | 18 +- models/amat2_psc_exp.cpp | 84 +- models/amat2_psc_exp.h | 18 +- models/bernoulli_synapse.h | 18 +- models/binary_neuron.h | 34 +- models/clopath_synapse.h | 30 +- models/cont_delay_synapse.h | 6 +- models/cont_delay_synapse_impl.h | 18 +- models/correlation_detector.cpp | 34 +- models/correlation_detector.h | 16 +- models/correlomatrix_detector.cpp | 34 +- models/correlomatrix_detector.h | 16 +- models/correlospinmatrix_detector.cpp | 30 +- models/correlospinmatrix_detector.h | 16 +- models/dc_generator.cpp | 12 +- models/dc_generator.h | 14 +- models/diffusion_connection.h | 24 +- models/erfc_neuron.cpp | 12 +- models/erfc_neuron.h | 4 +- models/gamma_sup_generator.cpp | 24 +- models/gamma_sup_generator.h | 12 +- models/gap_junction.h | 16 +- models/gauss_rate.cpp | 16 +- models/gauss_rate.h | 4 +- models/gif_cond_exp.cpp | 96 +- models/gif_cond_exp.h | 18 +- models/gif_cond_exp_multisynapse.cpp | 88 +- models/gif_cond_exp_multisynapse.h | 18 +- models/gif_pop_psc_exp.cpp | 92 +- models/gif_pop_psc_exp.h | 20 +- models/gif_psc_exp.cpp | 76 +- models/gif_psc_exp.h | 18 +- models/gif_psc_exp_multisynapse.cpp | 80 +- models/gif_psc_exp_multisynapse.h | 18 +- models/ginzburg_neuron.cpp | 20 +- models/ginzburg_neuron.h | 4 +- models/glif_cond.cpp | 116 +-- models/glif_cond.h | 18 +- models/glif_psc.cpp | 112 +-- models/glif_psc.h | 18 +- models/hh_cond_beta_gap_traub.cpp | 88 +- models/hh_cond_beta_gap_traub.h | 20 +- models/hh_cond_exp_traub.cpp | 80 +- models/hh_cond_exp_traub.h | 20 +- models/hh_psc_alpha.cpp | 72 +- models/hh_psc_alpha.h | 18 +- models/hh_psc_alpha_clopath.cpp | 96 +- models/hh_psc_alpha_clopath.h | 18 +- models/hh_psc_alpha_gap.cpp | 80 +- models/hh_psc_alpha_gap.h | 18 +- models/ht_neuron.cpp | 208 ++--- models/ht_neuron.h | 12 +- models/ht_synapse.h | 26 +- models/iaf_chs_2007.cpp | 36 +- models/iaf_chs_2007.h | 18 +- models/iaf_chxk_2008.cpp | 64 +- models/iaf_chxk_2008.h | 18 +- models/iaf_cond_alpha.cpp | 72 +- models/iaf_cond_alpha.h | 18 +- models/iaf_cond_alpha_mc.cpp | 86 +- models/iaf_cond_alpha_mc.h | 40 +- models/iaf_cond_beta.cpp | 80 +- models/iaf_cond_beta.h | 18 +- models/iaf_cond_exp.cpp | 64 +- models/iaf_cond_exp.h | 18 +- models/iaf_cond_exp_sfa_rr.cpp | 98 +- models/iaf_cond_exp_sfa_rr.h | 18 +- models/iaf_psc_alpha.cpp | 52 +- models/iaf_psc_alpha.h | 18 +- models/iaf_psc_alpha_canon.cpp | 62 +- models/iaf_psc_alpha_canon.h | 18 +- models/iaf_psc_alpha_multisynapse.cpp | 57 +- models/iaf_psc_alpha_multisynapse.h | 16 +- models/iaf_psc_alpha_ps.cpp | 62 +- models/iaf_psc_alpha_ps.h | 18 +- models/iaf_psc_delta.cpp | 48 +- models/iaf_psc_delta.h | 18 +- models/iaf_psc_delta_ps.cpp | 48 +- models/iaf_psc_delta_ps.h | 18 +- models/iaf_psc_exp.cpp | 56 +- models/iaf_psc_exp.h | 18 +- models/iaf_psc_exp_htum.cpp | 52 +- models/iaf_psc_exp_htum.h | 18 +- models/iaf_psc_exp_multisynapse.cpp | 50 +- models/iaf_psc_exp_multisynapse.h | 16 +- models/iaf_psc_exp_ps.cpp | 62 +- models/iaf_psc_exp_ps.h | 18 +- models/iaf_psc_exp_ps_lossless.cpp | 71 +- models/iaf_psc_exp_ps_lossless.h | 18 +- models/inhomogeneous_poisson_generator.cpp | 27 +- models/inhomogeneous_poisson_generator.h | 12 +- models/izhikevich.cpp | 48 +- models/izhikevich.h | 18 +- models/jonke_synapse.h | 56 +- models/lin_rate.cpp | 24 +- models/lin_rate.h | 4 +- models/mat2_psc_exp.cpp | 72 +- models/mat2_psc_exp.h | 18 +- models/mcculloch_pitts_neuron.cpp | 8 +- models/mcculloch_pitts_neuron.h | 4 +- models/mip_generator.cpp | 19 +- models/mip_generator.h | 12 +- models/multimeter.cpp | 27 +- models/multimeter.h | 14 +- models/music_cont_in_proxy.cpp | 22 +- models/music_cont_in_proxy.h | 12 +- models/music_cont_out_proxy.cpp | 43 +- models/music_cont_out_proxy.h | 20 +- models/music_event_in_proxy.cpp | 22 +- models/music_event_in_proxy.h | 12 +- models/music_event_out_proxy.cpp | 24 +- models/music_event_out_proxy.h | 12 +- models/music_message_in_proxy.cpp | 20 +- models/music_message_in_proxy.h | 28 +- models/music_rate_in_proxy.cpp | 22 +- models/music_rate_in_proxy.h | 12 +- models/music_rate_out_proxy.cpp | 24 +- models/music_rate_out_proxy.h | 12 +- models/noise_generator.cpp | 47 +- models/noise_generator.h | 16 +- models/parrot_neuron.cpp | 6 +- models/parrot_neuron.h | 4 +- models/parrot_neuron_ps.cpp | 4 +- models/parrot_neuron_ps.h | 4 +- models/poisson_generator.cpp | 13 +- models/poisson_generator.h | 12 +- models/poisson_generator_ps.cpp | 19 +- models/poisson_generator_ps.h | 14 +- models/pp_cond_exp_mc_urbanczik.cpp | 94 +- models/pp_cond_exp_mc_urbanczik.h | 34 +- models/pp_pop_psc_delta.cpp | 50 +- models/pp_pop_psc_delta.h | 20 +- models/pp_psc_delta.cpp | 82 +- models/pp_psc_delta.h | 18 +- models/ppd_sup_generator.cpp | 37 +- models/ppd_sup_generator.h | 12 +- models/pulsepacket_generator.cpp | 25 +- models/pulsepacket_generator.h | 12 +- models/quantal_stp_synapse.h | 4 +- models/quantal_stp_synapse_impl.h | 44 +- models/rate_connection_delayed.h | 14 +- models/rate_connection_instantaneous.h | 16 +- models/rate_neuron_ipn.h | 18 +- models/rate_neuron_ipn_impl.h | 54 +- models/rate_neuron_opn.h | 18 +- models/rate_neuron_opn_impl.h | 44 +- models/rate_transformer_node.h | 18 +- models/rate_transformer_node_impl.h | 16 +- models/siegert_neuron.cpp | 40 +- models/siegert_neuron.h | 18 +- models/sigmoid_rate.cpp | 16 +- models/sigmoid_rate.h | 4 +- models/sigmoid_rate_gg_1998.cpp | 8 +- models/sigmoid_rate_gg_1998.h | 4 +- models/sinusoidal_gamma_generator.cpp | 45 +- models/sinusoidal_gamma_generator.h | 14 +- models/sinusoidal_poisson_generator.cpp | 45 +- models/sinusoidal_poisson_generator.h | 16 +- models/spike_dilutor.cpp | 8 +- models/spike_dilutor.h | 12 +- models/spike_generator.cpp | 43 +- models/spike_generator.h | 14 +- models/spike_recorder.cpp | 4 +- models/spike_recorder.h | 4 +- models/spin_detector.cpp | 4 +- models/spin_detector.h | 4 +- models/static_synapse.h | 14 +- models/static_synapse_hom_w.h | 10 +- models/stdp_dopamine_synapse.cpp | 42 +- models/stdp_dopamine_synapse.h | 36 +- models/stdp_nn_pre_centered_synapse.h | 38 +- models/stdp_nn_restr_synapse.h | 38 +- models/stdp_nn_symm_synapse.h | 38 +- models/stdp_pl_synapse_hom.cpp | 20 +- models/stdp_pl_synapse_hom.h | 22 +- models/stdp_synapse.h | 38 +- models/stdp_synapse_facetshw_hom.h | 8 +- models/stdp_synapse_facetshw_hom_impl.h | 114 +-- models/stdp_synapse_hom.cpp | 28 +- models/stdp_synapse_hom.h | 22 +- models/stdp_triplet_synapse.h | 48 +- models/step_current_generator.cpp | 23 +- models/step_current_generator.h | 14 +- models/step_rate_generator.cpp | 23 +- models/step_rate_generator.h | 14 +- models/tanh_rate.cpp | 12 +- models/tanh_rate.h | 4 +- models/threshold_lin_rate.cpp | 16 +- models/threshold_lin_rate.h | 4 +- models/tsodyks2_synapse.h | 36 +- models/tsodyks_synapse.h | 44 +- models/tsodyks_synapse_hom.cpp | 20 +- models/tsodyks_synapse_hom.h | 24 +- models/urbanczik_synapse.h | 30 +- models/vogels_sprekeler_synapse.h | 34 +- models/volume_transmitter.cpp | 8 +- models/volume_transmitter.h | 12 +- models/weight_recorder.cpp | 64 +- models/weight_recorder.h | 8 +- nest/neststartup.cpp | 6 +- nestkernel/CMakeLists.txt | 1 + nestkernel/archiving_node.cpp | 20 +- nestkernel/archiving_node.h | 4 +- nestkernel/clopath_archiving_node.cpp | 32 +- nestkernel/clopath_archiving_node.h | 4 +- nestkernel/common_properties_hom_w.h | 8 +- nestkernel/common_synapse_properties.cpp | 10 +- nestkernel/common_synapse_properties.h | 4 +- nestkernel/conn_builder.cpp | 162 ++-- nestkernel/conn_builder.h | 48 +- nestkernel/conn_builder_factory.h | 10 +- nestkernel/conn_parameter.cpp | 35 +- nestkernel/conn_parameter.h | 14 +- nestkernel/connection.h | 20 +- nestkernel/connection_creator.cpp | 140 +-- nestkernel/connection_creator.h | 6 +- nestkernel/connection_label.h | 14 +- nestkernel/connection_manager.cpp | 111 +-- nestkernel/connection_manager.h | 24 +- nestkernel/connector_base.h | 10 +- nestkernel/connector_model.h | 16 +- nestkernel/connector_model_impl.h | 28 +- nestkernel/delay_checker.cpp | 12 +- nestkernel/delay_checker.h | 6 +- nestkernel/device.cpp | 16 +- nestkernel/device.h | 12 +- nestkernel/event_delivery_manager.cpp | 4 +- nestkernel/event_delivery_manager.h | 2 +- nestkernel/free_layer.h | 51 +- nestkernel/generic_factory.h | 10 +- nestkernel/genericmodel.h | 12 +- nestkernel/grid_layer.h | 20 +- nestkernel/grid_mask.h | 6 +- nestkernel/io_manager.cpp | 36 +- nestkernel/io_manager.h | 16 +- nestkernel/kernel_manager.cpp | 2 +- nestkernel/kernel_manager.h | 2 +- nestkernel/layer.cpp | 39 +- nestkernel/layer.h | 10 +- nestkernel/layer_impl.h | 24 +- nestkernel/logging_manager.cpp | 4 +- nestkernel/logging_manager.h | 2 +- nestkernel/manager_interface.h | 2 +- nestkernel/mask.h | 50 +- nestkernel/model.cpp | 16 +- nestkernel/model.h | 8 +- nestkernel/model_manager.cpp | 73 +- nestkernel/model_manager.h | 50 +- nestkernel/model_manager_impl.h | 26 +- nestkernel/modelrange_manager.h | 2 +- nestkernel/mpi_manager.cpp | 20 +- nestkernel/mpi_manager.h | 2 +- nestkernel/music_manager.cpp | 2 +- nestkernel/music_manager.h | 2 +- nestkernel/nest.cpp | 206 ++++- nestkernel/nest.h | 45 +- nestkernel/nestmodule.cpp | 910 ++++++++++--------- nestkernel/nestmodule.h | 16 +- nestkernel/node.cpp | 30 +- nestkernel/node.h | 10 +- nestkernel/node_collection.h | 5 +- nestkernel/node_manager.cpp | 34 +- nestkernel/node_manager.h | 10 +- nestkernel/parameter.cpp | 71 +- nestkernel/parameter.h | 42 +- nestkernel/proxynode.cpp | 4 +- nestkernel/proxynode.h | 4 +- nestkernel/random_manager.cpp | 8 +- nestkernel/random_manager.h | 2 +- nestkernel/recording_backend.h | 10 +- nestkernel/recording_backend_ascii.cpp | 31 +- nestkernel/recording_backend_ascii.h | 14 +- nestkernel/recording_backend_memory.cpp | 26 +- nestkernel/recording_backend_memory.h | 14 +- nestkernel/recording_backend_mpi.cpp | 10 +- nestkernel/recording_backend_mpi.h | 10 +- nestkernel/recording_backend_screen.cpp | 22 +- nestkernel/recording_backend_screen.h | 14 +- nestkernel/recording_backend_sionlib.cpp | 14 +- nestkernel/recording_backend_sionlib.h | 10 +- nestkernel/recording_device.cpp | 64 +- nestkernel/recording_device.h | 14 +- nestkernel/simulation_manager.cpp | 22 +- nestkernel/simulation_manager.h | 2 +- nestkernel/sp_manager.cpp | 55 +- nestkernel/sp_manager.h | 12 +- nestkernel/sp_manager_impl.h | 4 +- nestkernel/spatial.cpp | 20 +- nestkernel/spatial.h | 14 +- nestkernel/stimulation_backend.h | 2 +- nestkernel/stimulation_backend_mpi.cpp | 2 +- nestkernel/stimulation_backend_mpi.h | 2 +- nestkernel/stimulation_device.cpp | 52 +- nestkernel/stimulation_device.h | 10 +- nestkernel/structural_plasticity_node.cpp | 83 +- nestkernel/structural_plasticity_node.h | 4 +- nestkernel/synaptic_element.cpp | 42 +- nestkernel/synaptic_element.h | 6 +- nestkernel/target_identifier.h | 12 +- nestkernel/target_table_devices.h | 16 +- nestkernel/target_table_devices_impl.h | 8 +- nestkernel/urbanczik_archiving_node.h | 4 +- nestkernel/urbanczik_archiving_node_impl.h | 4 +- nestkernel/vp_manager.cpp | 6 +- nestkernel/vp_manager.h | 2 +- pynest/nest/lib/hl_api_connection_helpers.py | 12 +- pynest/nest/lib/hl_api_connections.py | 11 +- pynest/nest/lib/hl_api_types.py | 2 +- pynest/pynestkernel.pxd | 7 + pynest/pynestkernel.pyx | 26 + sli/CMakeLists.txt | 16 +- testsuite/cpptests/CMakeLists.txt | 2 +- testsuite/cpptests/test_parameter.h | 10 +- 334 files changed, 5595 insertions(+), 5199 deletions(-) diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt index 3b7029f980..7f1a3a8eb4 100644 --- a/libnestutil/CMakeLists.txt +++ b/libnestutil/CMakeLists.txt @@ -42,7 +42,11 @@ add_library( nestutil ${nestutil_sources} ) target_link_libraries( nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS} ) target_include_directories( nestutil PRIVATE + ${PROJECT_SOURCE_DIR}/libnestutil ${PROJECT_BINARY_DIR}/libnestutil + ${PROJECT_SOURCE_DIR}/nestkernel + ${PROJECT_SOURCE_DIR}/sli + ${PROJECT_SOURCE_DIR}/thirdparty ${Boost_INCLUDE_DIRS} ) diff --git a/libnestutil/dict_util.h b/libnestutil/dict_util.h index eeb954b5f9..5fd613b662 100644 --- a/libnestutil/dict_util.h +++ b/libnestutil/dict_util.h @@ -28,6 +28,8 @@ #include "nest_datums.h" #include "vp_manager_impl.h" +#include "dictionary.h" + // Includes from sli: #include "dictdatum.h" #include "dictutils.h" @@ -36,32 +38,55 @@ namespace nest { -/** Update a variable from a dictionary entry if it exists, skip call if it - * doesn't. If the dictionary entry is a parameter, return value generated from - * the parameter parameter. - */ -template < typename FT, typename VT > +// /** Update a variable from a dictionary entry if it exists, skip call if it +// * doesn't. If the dictionary entry is a parameter, return value generated from +// * the parameter parameter. +// */ +// template < typename FT, typename VT > +// bool +// updateValueParam( DictionaryDatum const& d, Name const n, VT& value, nest::Node* node ) +// { +// const Token& t = d->lookup( n ); + +// ParameterDatum* pd = dynamic_cast< ParameterDatum* >( t.datum() ); +// if ( pd ) +// { +// if ( not node ) +// { +// throw BadParameter( "Cannot use Parameter with this model." ); +// } +// auto vp = kernel().vp_manager.node_id_to_vp( node->get_node_id() ); +// auto tid = kernel().vp_manager.vp_to_thread( vp ); +// auto rng = get_vp_specific_rng( tid ); +// value = pd->get()->value( rng, node ); +// return true; +// } +// else +// { +// return updateValue< FT >( d, n, value ); +// } +// } + +template < typename T > bool -updateValueParam( DictionaryDatum const& d, Name const n, VT& value, nest::Node* node ) +update_value_param( dictionary const& d, const std::string& key, T& value, nest::Node* node ) { - const Token& t = d->lookup( n ); - - ParameterDatum* pd = dynamic_cast< ParameterDatum* >( t.datum() ); - if ( pd ) + if ( is_parameter( d.at( key ) ) ) { if ( not node ) { throw BadParameter( "Cannot use Parameter with this model." ); } - auto vp = kernel().vp_manager.node_id_to_vp( node->get_node_id() ); - auto tid = kernel().vp_manager.vp_to_thread( vp ); - auto rng = get_vp_specific_rng( tid ); - value = pd->get()->value( rng, node ); + auto param = d.get< std::shared_ptr< Parameter > >( key ); + const auto vp = kernel().vp_manager.node_id_to_vp( node->get_node_id() ); + const auto tid = kernel().vp_manager.vp_to_thread( vp ); + const auto rng = get_vp_specific_rng( tid ); + value = param->value( rng, node ); return true; } else { - return updateValue< FT >( d, n, value ); + return d.update_value( key, value ); } } diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index da4da039ca..0c58078f1e 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -27,6 +27,8 @@ #include #include "dictionary.h" +#include "parameter.h" +#include "nest_datums.h" // debug @@ -92,6 +94,13 @@ is_double_vector( const boost::any& operand ) return operand.type() == typeid( std::vector< double > ); } +// vector of vector of doubles +bool +is_double_vector_vector( const boost::any& operand ) +{ + return operand.type() == typeid( std::vector< std::vector< double > > ); +} + // vector of strings bool is_string_vector( const boost::any& operand ) @@ -105,3 +114,206 @@ is_dict( const boost::any& operand ) { return operand.type() == typeid( dictionary ); } + +// parameter +bool +is_parameter( const boost::any& operand ) +{ + return operand.type() == typeid( std::shared_ptr< nest::Parameter > ); +} + +// NodeCollection +bool +is_nc( const boost::any& operand ) +{ + return operand.type() == typeid( NodeCollectionDatum ); +} + +bool +value_equal( const boost::any first, const boost::any second ) +{ + if ( is_int( first ) ) + { + if ( not is_int( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< int >( first ); + const auto other_value = boost::any_cast< int >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_long( first ) ) + { + if ( not is_long( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< long >( first ); + const auto other_value = boost::any_cast< long >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_size_t( first ) ) + { + if ( not is_size_t( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< size_t >( first ); + const auto other_value = boost::any_cast< size_t >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_double( first ) ) + { + if ( not is_double( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< double >( first ); + const auto other_value = boost::any_cast< double >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_bool( first ) ) + { + if ( not is_bool( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< bool >( first ); + const auto other_value = boost::any_cast< bool >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_string( first ) ) + { + if ( not is_string( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< std::string >( first ); + const auto other_value = boost::any_cast< std::string >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_int_vector( first ) ) + { + if ( not is_int_vector( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< std::vector< int > >( first ); + const auto other_value = boost::any_cast< std::vector< int > >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_double_vector( first ) ) + { + if ( not is_double_vector( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< std::vector< double > >( first ); + const auto other_value = boost::any_cast< std::vector< double > >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_double_vector_vector( first ) ) + { + if ( not is_double_vector_vector( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< std::vector< std::vector< double > > >( first ); + const auto other_value = boost::any_cast< std::vector< std::vector< double > > >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_string_vector( first ) ) + { + if ( not is_string_vector( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< std::vector< std::string > >( first ); + const auto other_value = boost::any_cast< std::vector< std::string > >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_dict( first ) ) + { + if ( not is_dict( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< dictionary >( first ); + const auto other_value = boost::any_cast< dictionary >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else if ( is_parameter( first ) ) + { + if ( not is_parameter( second ) ) + { + return false; + } + const auto this_value = boost::any_cast< std::shared_ptr< nest::Parameter > >( first ); + const auto other_value = boost::any_cast< std::shared_ptr< nest::Parameter > >( second ); + if ( this_value != other_value ) + { + return false; + } + } + else + { + // TODO-PYNEST-NG: raise error + assert( false ); + } + return true; +} + + +bool dictionary::operator==( const dictionary& other ) const +{ + // Iterate elements in the other dictionary + for ( auto& kv_pair : other ) + { + // Check if it exists in this dictionary + if ( not known( kv_pair.first ) ) + { + return false; + } + // Check for equality + const auto value = at( kv_pair.first ); + if ( not value_equal( value, kv_pair.second ) ) + { + return false; + } + } + // All elements are equal + return true; +} diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 66eaea982d..309ba52ab5 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -28,7 +28,9 @@ #include #include -using dictionary = std::map< std::string, boost::any >; +#include "sliexceptions.h" + +// using dictionary = std::map< std::string, boost::any >; std::string debug_type( const boost::any& operand ); @@ -40,7 +42,58 @@ bool is_bool( const boost::any& operand ); bool is_string( const boost::any& operand ); bool is_int_vector( const boost::any& operand ); bool is_double_vector( const boost::any& operand ); +bool is_double_vector_vector( const boost::any& operand ); bool is_string_vector( const boost::any& operand ); bool is_dict( const boost::any& operand ); +bool is_parameter( const boost::any& operand ); +bool is_nc( const boost::any& operand ); + +bool value_equal( const boost::any first, const boost::any second ); + +class dictionary : public std::map< std::string, boost::any > +{ +public: + template < typename T > + T + get( const std::string& key ) const + { + try + { + return boost::any_cast< T >( at( key ) ); + } + catch ( const boost::bad_any_cast& ) + { + std::string msg = std::string( "Failed to cast " ) + key + " from " + debug_type( at( key ) ) + " to type " + + std::string( typeid( T ).name() ); + std::cerr << msg << "\n"; + throw TypeMismatch( msg ); + } + } + + template < typename T > + bool + update_value( const std::string& key, T& value ) const + { + auto it = find( key ); + if ( it != end() ) + { + value = boost::any_cast< T >( it->second ); + return true; + } + return false; + } + + bool + known( const std::string& key ) const + { + return find( key ) != end(); + } + + bool operator==( const dictionary& other ) const; + bool operator!=( const dictionary& other ) const + { + return not( *this == other ); + } +}; #endif /* DICTIONARY_H_ */ diff --git a/models/ac_generator.cpp b/models/ac_generator.cpp index a78e3b6177..c7a4a09460 100644 --- a/models/ac_generator.cpp +++ b/models/ac_generator.cpp @@ -109,28 +109,28 @@ nest::ac_generator::Buffers_::Buffers_( const Buffers_&, ac_generator& n ) * ---------------------------------------------------------------- */ void -nest::ac_generator::Parameters_::get( DictionaryDatum& d ) const +nest::ac_generator::Parameters_::get( dictionary& d ) const { - ( *d )[ names::amplitude ] = amp_; - ( *d )[ names::offset ] = offset_; - ( *d )[ names::phase ] = phi_deg_; - ( *d )[ names::frequency ] = freq_; + d[ names::amplitude.toString() ] = amp_; + d[ names::offset.toString() ] = offset_; + d[ names::phase.toString() ] = phi_deg_; + d[ names::frequency.toString() ] = freq_; } void -nest::ac_generator::State_::get( DictionaryDatum& d ) const +nest::ac_generator::State_::get( dictionary& d ) const { - ( *d )[ names::y_0 ] = y_0_; - ( *d )[ names::y_1 ] = y_1_; + d[ names::y_0.toString() ] = y_0_; + d[ names::y_1.toString() ] = y_1_; } void -nest::ac_generator::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::ac_generator::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::amplitude, amp_, node ); - updateValueParam< double >( d, names::offset, offset_, node ); - updateValueParam< double >( d, names::frequency, freq_, node ); - updateValueParam< double >( d, names::phase, phi_deg_, node ); + update_value_param( d, names::amplitude.toString(), amp_, node ); + update_value_param( d, names::offset.toString(), offset_, node ); + update_value_param( d, names::frequency.toString(), freq_, node ); + update_value_param( d, names::phase.toString(), phi_deg_, node ); } @@ -249,11 +249,11 @@ nest::ac_generator::set_data_from_stimulation_backend( std::vector< double >& in throw BadParameterValue( "The size of the data for the ac_generator needs to be 4 [amplitude, offset, frequency, phase]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::amplitude ] = DoubleDatum( input_param[ 0 ] ); - ( *d )[ names::offset ] = DoubleDatum( input_param[ 1 ] ); - ( *d )[ names::frequency ] = DoubleDatum( input_param[ 2 ] ); - ( *d )[ names::phase ] = DoubleDatum( input_param[ 3 ] ); + dictionary d; + d[ names::amplitude.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::offset.toString() ] = DoubleDatum( input_param[ 1 ] ); + d[ names::frequency.toString() ] = DoubleDatum( input_param[ 2 ] ); + d[ names::phase.toString() ] = DoubleDatum( input_param[ 3 ] ); ptmp.set( d, this ); } diff --git a/models/ac_generator.h b/models/ac_generator.h index 8a06ce5f0d..10cdccbe73 100644 --- a/models/ac_generator.h +++ b/models/ac_generator.h @@ -126,8 +126,8 @@ class ac_generator : public StimulationDevice port handles_test_event( DataLoggingRequest&, rport ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; void set_data_from_stimulation_backend( std::vector< double >& input_param ) override; @@ -153,8 +153,8 @@ class ac_generator : public StimulationDevice Parameters_( const Parameters_& ); Parameters_& operator=( const Parameters_& p ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // ------------------------------------------------------------ @@ -168,7 +168,7 @@ class ac_generator : public StimulationDevice State_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary }; // ------------------------------------------------------------ @@ -237,17 +237,17 @@ ac_generator::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -ac_generator::get_status( DictionaryDatum& d ) const +ac_generator::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); StimulationDevice::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -ac_generator::set_status( const DictionaryDatum& d ) +ac_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/aeif_cond_alpha.cpp b/models/aeif_cond_alpha.cpp index fbc59d936c..f453c159da 100644 --- a/models/aeif_cond_alpha.cpp +++ b/models/aeif_cond_alpha.cpp @@ -182,52 +182,52 @@ nest::aeif_cond_alpha::State_& nest::aeif_cond_alpha::State_::operator=( const S * ---------------------------------------------------------------- */ void -nest::aeif_cond_alpha::Parameters_::get( DictionaryDatum& d ) const +nest::aeif_cond_alpha::Parameters_::get( dictionary& d ) const { - def< double >( d, names::C_m, C_m ); - def< double >( d, names::V_th, V_th ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::tau_syn_ex, tau_syn_ex ); - def< double >( d, names::tau_syn_in, tau_syn_in ); - def< double >( d, names::a, a ); - def< double >( d, names::b, b ); - def< double >( d, names::Delta_T, Delta_T ); - def< double >( d, names::tau_w, tau_w ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::V_peak, V_peak_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); + d[ names::C_m.toString() ] = C_m; + d[ names::V_th.toString() ] = V_th; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::tau_syn_ex.toString() ] = tau_syn_ex; + d[ names::tau_syn_in.toString() ] = tau_syn_in; + d[ names::a.toString() ] = a; + d[ names::b.toString() ] = b; + d[ names::Delta_T.toString() ] = Delta_T; + d[ names::tau_w.toString() ] = tau_w; + d[ names::I_e.toString() ] = I_e; + d[ names::V_peak.toString() ] = V_peak_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; } void -nest::aeif_cond_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::aeif_cond_alpha::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_peak, V_peak_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::E_ex, E_ex, node ); - updateValueParam< double >( d, names::E_in, E_in, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_peak.toString(), V_peak_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::E_ex.toString(), E_ex, node ); + update_value_param( d, names::E_in.toString(), E_in, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_syn_ex, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_syn_in, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_syn_in, node ); - updateValueParam< double >( d, names::a, a, node ); - updateValueParam< double >( d, names::b, b, node ); - updateValueParam< double >( d, names::Delta_T, Delta_T, node ); - updateValueParam< double >( d, names::tau_w, tau_w, node ); + update_value_param( d, names::a.toString(), a, node ); + update_value_param( d, names::b.toString(), b, node ); + update_value_param( d, names::Delta_T.toString(), Delta_T, node ); + update_value_param( d, names::tau_w.toString(), tau_w, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); if ( V_reset_ >= V_peak_ ) { @@ -280,25 +280,25 @@ nest::aeif_cond_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::aeif_cond_alpha::State_::get( DictionaryDatum& d ) const +nest::aeif_cond_alpha::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::g_ex, y_[ G_EXC ] ); - def< double >( d, names::dg_ex, y_[ DG_EXC ] ); - def< double >( d, names::g_in, y_[ G_INH ] ); - def< double >( d, names::dg_in, y_[ DG_INH ] ); - def< double >( d, names::w, y_[ W ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::g_ex.toString() ] = y_[ G_EXC ]; + d[ names::dg_ex.toString() ] = y_[ DG_EXC ]; + d[ names::g_in.toString() ] = y_[ G_INH ]; + d[ names::dg_in.toString() ] = y_[ DG_INH ]; + d[ names::w.toString() ] = y_[ W ]; } void -nest::aeif_cond_alpha::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::aeif_cond_alpha::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::g_ex, y_[ G_EXC ], node ); - updateValueParam< double >( d, names::dg_ex, y_[ DG_EXC ], node ); - updateValueParam< double >( d, names::g_in, y_[ G_INH ], node ); - updateValueParam< double >( d, names::dg_in, y_[ DG_INH ], node ); - updateValueParam< double >( d, names::w, y_[ W ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::g_ex.toString(), y_[ G_EXC ], node ); + update_value_param( d, names::dg_ex.toString(), y_[ DG_EXC ], node ); + update_value_param( d, names::g_in.toString(), y_[ G_INH ], node ); + update_value_param( d, names::dg_in.toString(), y_[ DG_INH ], node ); + update_value_param( d, names::w.toString(), y_[ W ], node ); if ( y_[ G_EXC ] < 0 || y_[ G_INH ] < 0 ) { throw BadProperty( "Conductances must not be negative." ); diff --git a/models/aeif_cond_alpha.h b/models/aeif_cond_alpha.h index 06877319da..2ae68d03f3 100644 --- a/models/aeif_cond_alpha.h +++ b/models/aeif_cond_alpha.h @@ -211,8 +211,8 @@ class aeif_cond_alpha : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -258,8 +258,8 @@ class aeif_cond_alpha : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -297,8 +297,8 @@ class aeif_cond_alpha : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -424,17 +424,17 @@ aeif_cond_alpha::handles_test_event( DataLoggingRequest& dlr, rport receptor_typ } inline void -aeif_cond_alpha::get_status( DictionaryDatum& d ) const +aeif_cond_alpha::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -aeif_cond_alpha::set_status( const DictionaryDatum& d ) +aeif_cond_alpha::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/aeif_cond_alpha_multisynapse.cpp b/models/aeif_cond_alpha_multisynapse.cpp index 1d98a059fb..7aba62a05b 100644 --- a/models/aeif_cond_alpha_multisynapse.cpp +++ b/models/aeif_cond_alpha_multisynapse.cpp @@ -179,44 +179,44 @@ aeif_cond_alpha_multisynapse::State_::State_( const Parameters_& p ) * ---------------------------------------------------------------- */ void -aeif_cond_alpha_multisynapse::Parameters_::get( DictionaryDatum& d ) const +aeif_cond_alpha_multisynapse::Parameters_::get( dictionary& d ) const { - def< double >( d, names::C_m, C_m ); - def< double >( d, names::V_th, V_th ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_reset, V_reset_ ); - def< size_t >( d, names::n_receptors, n_receptors() ); + d[ names::C_m.toString() ] = C_m; + d[ names::V_th.toString() ] = V_th; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::n_receptors.toString() ] = n_receptors(); ArrayDatum E_rev_ad( E_rev ); ArrayDatum tau_syn_ad( tau_syn ); - def< ArrayDatum >( d, names::E_rev, E_rev_ad ); - def< ArrayDatum >( d, names::tau_syn, tau_syn_ad ); - def< double >( d, names::a, a ); - def< double >( d, names::b, b ); - def< double >( d, names::Delta_T, Delta_T ); - def< double >( d, names::tau_w, tau_w ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::V_peak, V_peak_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); - def< bool >( d, names::has_connections, has_connections_ ); + d[ names::E_rev.toString() ] = E_rev_ad; + d[ names::tau_syn.toString() ] = tau_syn_ad; + d[ names::a.toString() ] = a; + d[ names::b.toString() ] = b; + d[ names::Delta_T.toString() ] = Delta_T; + d[ names::tau_w.toString() ] = tau_w; + d[ names::I_e.toString() ] = I_e; + d[ names::V_peak.toString() ] = V_peak_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::has_connections.toString() ] = has_connections_; } void -aeif_cond_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node ) +aeif_cond_alpha_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_peak, V_peak_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_peak.toString(), V_peak_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); const size_t old_n_receptors = n_receptors(); - bool Erev_flag = updateValue< std::vector< double > >( d, names::E_rev, E_rev ); - bool tau_flag = updateValue< std::vector< double > >( d, names::tau_syn, tau_syn ); + bool Erev_flag = d.update_value( names::E_rev.toString(), E_rev ); + bool tau_flag = d.update_value( names::tau_syn.toString(), tau_syn ); if ( Erev_flag || tau_flag ) { // receptor arrays have been modified if ( ( E_rev.size() != old_n_receptors || tau_syn.size() != old_n_receptors ) @@ -247,14 +247,14 @@ aeif_cond_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* } } - updateValueParam< double >( d, names::a, a, node ); - updateValueParam< double >( d, names::b, b, node ); - updateValueParam< double >( d, names::Delta_T, Delta_T, node ); - updateValueParam< double >( d, names::tau_w, tau_w, node ); + update_value_param( d, names::a.toString(), a, node ); + update_value_param( d, names::b.toString(), b, node ); + update_value_param( d, names::Delta_T.toString(), Delta_T, node ); + update_value_param( d, names::tau_w.toString(), tau_w, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); if ( V_peak_ < V_th ) { @@ -307,9 +307,9 @@ aeif_cond_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* } void -aeif_cond_alpha_multisynapse::State_::get( DictionaryDatum& d ) const +aeif_cond_alpha_multisynapse::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; std::vector< double >* dg = new std::vector< double >(); std::vector< double >* g = new std::vector< double >(); @@ -322,17 +322,17 @@ aeif_cond_alpha_multisynapse::State_::get( DictionaryDatum& d ) const g->push_back( y_[ State_::G + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] ); } - ( *d )[ names::dg ] = DoubleVectorDatum( dg ); - ( *d )[ names::g ] = DoubleVectorDatum( g ); + d[ names::dg.toString() ] = DoubleVectorDatum( dg ); + d[ names::g.toString() ] = DoubleVectorDatum( g ); - def< double >( d, names::w, y_[ W ] ); + d[ names::w.toString() ] = y_[ W ]; } void -aeif_cond_alpha_multisynapse::State_::set( const DictionaryDatum& d, Node* node ) +aeif_cond_alpha_multisynapse::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::w, y_[ W ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::w.toString(), y_[ W ], node ); } aeif_cond_alpha_multisynapse::Buffers_::Buffers_( aeif_cond_alpha_multisynapse& n ) @@ -616,7 +616,7 @@ aeif_cond_alpha_multisynapse::handle( DataLoggingRequest& e ) } void -aeif_cond_alpha_multisynapse::set_status( const DictionaryDatum& d ) +aeif_cond_alpha_multisynapse::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/aeif_cond_alpha_multisynapse.h b/models/aeif_cond_alpha_multisynapse.h index 64d5bc34bf..20c16562b5 100644 --- a/models/aeif_cond_alpha_multisynapse.h +++ b/models/aeif_cond_alpha_multisynapse.h @@ -201,8 +201,8 @@ class aeif_cond_alpha_multisynapse : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -246,8 +246,8 @@ class aeif_cond_alpha_multisynapse : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary //! Return the number of receptor ports inline size_t @@ -290,8 +290,8 @@ class aeif_cond_alpha_multisynapse : public ArchivingNode State_( const Parameters_& ); //!< Default initialization - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, Node* node ); }; // State_ @@ -419,13 +419,13 @@ aeif_cond_alpha_multisynapse::handles_test_event( DataLoggingRequest& dlr, rport } inline void -aeif_cond_alpha_multisynapse::get_status( DictionaryDatum& d ) const +aeif_cond_alpha_multisynapse::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } } // namespace diff --git a/models/aeif_cond_beta_multisynapse.cpp b/models/aeif_cond_beta_multisynapse.cpp index 9910bf6c0e..edc83f6b69 100644 --- a/models/aeif_cond_beta_multisynapse.cpp +++ b/models/aeif_cond_beta_multisynapse.cpp @@ -179,47 +179,47 @@ aeif_cond_beta_multisynapse::State_::State_( const Parameters_& p ) * ---------------------------------------------------------------- */ void -aeif_cond_beta_multisynapse::Parameters_::get( DictionaryDatum& d ) const +aeif_cond_beta_multisynapse::Parameters_::get( dictionary& d ) const { - def< double >( d, names::C_m, C_m ); - def< double >( d, names::V_th, V_th ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_reset, V_reset_ ); - def< size_t >( d, names::n_receptors, n_receptors() ); + d[ names::C_m.toString() ] = C_m; + d[ names::V_th.toString() ] = V_th; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::n_receptors.toString() ] = n_receptors(); ArrayDatum E_rev_ad( E_rev ); ArrayDatum tau_rise_ad( tau_rise ); ArrayDatum tau_decay_ad( tau_decay ); - def< ArrayDatum >( d, names::E_rev, E_rev_ad ); - def< ArrayDatum >( d, names::tau_rise, tau_rise_ad ); - def< ArrayDatum >( d, names::tau_decay, tau_decay_ad ); - def< double >( d, names::a, a ); - def< double >( d, names::b, b ); - def< double >( d, names::Delta_T, Delta_T ); - def< double >( d, names::tau_w, tau_w ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::V_peak, V_peak_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); - def< bool >( d, names::has_connections, has_connections_ ); + d[ names::E_rev.toString() ] = E_rev_ad; + d[ names::tau_rise.toString() ] = tau_rise_ad; + d[ names::tau_decay.toString() ] = tau_decay_ad; + d[ names::a.toString() ] = a; + d[ names::b.toString() ] = b; + d[ names::Delta_T.toString() ] = Delta_T; + d[ names::tau_w.toString() ] = tau_w; + d[ names::I_e.toString() ] = I_e; + d[ names::V_peak.toString() ] = V_peak_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::has_connections.toString() ] = has_connections_; } void -aeif_cond_beta_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node ) +aeif_cond_beta_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_peak, V_peak_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_peak.toString(), V_peak_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); const size_t old_n_receptors = n_receptors(); - bool Erev_flag = updateValue< std::vector< double > >( d, names::E_rev, E_rev ); - bool taur_flag = updateValue< std::vector< double > >( d, names::tau_rise, tau_rise ); - bool taud_flag = updateValue< std::vector< double > >( d, names::tau_decay, tau_decay ); + bool Erev_flag = d.update_value( names::E_rev.toString(), E_rev ); + bool taur_flag = d.update_value( names::tau_rise.toString(), tau_rise ); + bool taud_flag = d.update_value( names::tau_decay.toString(), tau_decay ); if ( Erev_flag || taur_flag || taud_flag ) { // receptor arrays have been modified if ( ( E_rev.size() != old_n_receptors || tau_rise.size() != old_n_receptors @@ -254,14 +254,14 @@ aeif_cond_beta_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* n } } - updateValueParam< double >( d, names::a, a, node ); - updateValueParam< double >( d, names::b, b, node ); - updateValueParam< double >( d, names::Delta_T, Delta_T, node ); - updateValueParam< double >( d, names::tau_w, tau_w, node ); + update_value_param( d, names::a.toString(), a, node ); + update_value_param( d, names::b.toString(), b, node ); + update_value_param( d, names::Delta_T.toString(), Delta_T, node ); + update_value_param( d, names::tau_w.toString(), tau_w, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); if ( V_peak_ < V_th ) { @@ -314,9 +314,9 @@ aeif_cond_beta_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* n } void -aeif_cond_beta_multisynapse::State_::get( DictionaryDatum& d ) const +aeif_cond_beta_multisynapse::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; std::vector< double >* dg = new std::vector< double >(); std::vector< double >* g = new std::vector< double >(); @@ -329,17 +329,17 @@ aeif_cond_beta_multisynapse::State_::get( DictionaryDatum& d ) const g->push_back( y_[ State_::G + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] ); } - ( *d )[ names::dg ] = DoubleVectorDatum( dg ); - ( *d )[ names::g ] = DoubleVectorDatum( g ); + d[ names::dg.toString() ] = DoubleVectorDatum( dg ); + d[ names::g.toString() ] = DoubleVectorDatum( g ); - def< double >( d, names::w, y_[ W ] ); + d[ names::w.toString() ] = y_[ W ]; } void -aeif_cond_beta_multisynapse::State_::set( const DictionaryDatum& d, Node* node ) +aeif_cond_beta_multisynapse::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::w, y_[ W ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::w.toString(), y_[ W ], node ); } aeif_cond_beta_multisynapse::Buffers_::Buffers_( aeif_cond_beta_multisynapse& n ) @@ -624,7 +624,7 @@ aeif_cond_beta_multisynapse::handle( DataLoggingRequest& e ) } void -aeif_cond_beta_multisynapse::set_status( const DictionaryDatum& d ) +aeif_cond_beta_multisynapse::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/aeif_cond_beta_multisynapse.h b/models/aeif_cond_beta_multisynapse.h index 2faa4982b5..ef0ab7534b 100644 --- a/models/aeif_cond_beta_multisynapse.h +++ b/models/aeif_cond_beta_multisynapse.h @@ -204,8 +204,8 @@ class aeif_cond_beta_multisynapse : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -249,8 +249,8 @@ class aeif_cond_beta_multisynapse : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary //! Return the number of receptor ports inline size_t @@ -293,8 +293,8 @@ class aeif_cond_beta_multisynapse : public ArchivingNode State_( const Parameters_& ); //!< Default initialization - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, Node* node ); }; // State_ @@ -423,13 +423,13 @@ aeif_cond_beta_multisynapse::handles_test_event( DataLoggingRequest& dlr, rport } inline void -aeif_cond_beta_multisynapse::get_status( DictionaryDatum& d ) const +aeif_cond_beta_multisynapse::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } } // namespace diff --git a/models/aeif_cond_exp.cpp b/models/aeif_cond_exp.cpp index 591b6dd0dc..828b3d166d 100644 --- a/models/aeif_cond_exp.cpp +++ b/models/aeif_cond_exp.cpp @@ -181,52 +181,52 @@ nest::aeif_cond_exp::State_& nest::aeif_cond_exp::State_::operator=( const State * ---------------------------------------------------------------- */ void -nest::aeif_cond_exp::Parameters_::get( DictionaryDatum& d ) const +nest::aeif_cond_exp::Parameters_::get( dictionary& d ) const { - def< double >( d, names::C_m, C_m ); - def< double >( d, names::V_th, V_th ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::tau_syn_ex, tau_syn_ex ); - def< double >( d, names::tau_syn_in, tau_syn_in ); - def< double >( d, names::a, a ); - def< double >( d, names::b, b ); - def< double >( d, names::Delta_T, Delta_T ); - def< double >( d, names::tau_w, tau_w ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::V_peak, V_peak_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); + d[ names::C_m.toString() ] = C_m; + d[ names::V_th.toString() ] = V_th; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::tau_syn_ex.toString() ] = tau_syn_ex; + d[ names::tau_syn_in.toString() ] = tau_syn_in; + d[ names::a.toString() ] = a; + d[ names::b.toString() ] = b; + d[ names::Delta_T.toString() ] = Delta_T; + d[ names::tau_w.toString() ] = tau_w; + d[ names::I_e.toString() ] = I_e; + d[ names::V_peak.toString() ] = V_peak_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; } void -nest::aeif_cond_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::aeif_cond_exp::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_peak, V_peak_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::E_ex, E_ex, node ); - updateValueParam< double >( d, names::E_in, E_in, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_peak.toString(), V_peak_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::E_ex.toString(), E_ex, node ); + update_value_param( d, names::E_in.toString(), E_in, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_syn_ex, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_syn_in, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_syn_in, node ); - updateValueParam< double >( d, names::a, a, node ); - updateValueParam< double >( d, names::b, b, node ); - updateValueParam< double >( d, names::Delta_T, Delta_T, node ); - updateValueParam< double >( d, names::tau_w, tau_w, node ); + update_value_param( d, names::a.toString(), a, node ); + update_value_param( d, names::b.toString(), b, node ); + update_value_param( d, names::Delta_T.toString(), Delta_T, node ); + update_value_param( d, names::tau_w.toString(), tau_w, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); if ( V_peak_ < V_th ) { @@ -279,21 +279,21 @@ nest::aeif_cond_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::aeif_cond_exp::State_::get( DictionaryDatum& d ) const +nest::aeif_cond_exp::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::g_ex, y_[ G_EXC ] ); - def< double >( d, names::g_in, y_[ G_INH ] ); - def< double >( d, names::w, y_[ W ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::g_ex.toString() ] = y_[ G_EXC ]; + d[ names::g_in.toString() ] = y_[ G_INH ]; + d[ names::w.toString() ] = y_[ W ]; } void -nest::aeif_cond_exp::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::aeif_cond_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::g_ex, y_[ G_EXC ], node ); - updateValueParam< double >( d, names::g_in, y_[ G_INH ], node ); - updateValueParam< double >( d, names::w, y_[ W ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::g_ex.toString(), y_[ G_EXC ], node ); + update_value_param( d, names::g_in.toString(), y_[ G_INH ], node ); + update_value_param( d, names::w.toString(), y_[ W ], node ); if ( y_[ G_EXC ] < 0 || y_[ G_INH ] < 0 ) { throw BadProperty( "Conductances must not be negative." ); diff --git a/models/aeif_cond_exp.h b/models/aeif_cond_exp.h index e01c826d25..a3eadda16a 100644 --- a/models/aeif_cond_exp.h +++ b/models/aeif_cond_exp.h @@ -211,8 +211,8 @@ class aeif_cond_exp : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -258,8 +258,8 @@ class aeif_cond_exp : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -295,8 +295,8 @@ class aeif_cond_exp : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -416,17 +416,17 @@ aeif_cond_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -aeif_cond_exp::get_status( DictionaryDatum& d ) const +aeif_cond_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -aeif_cond_exp::set_status( const DictionaryDatum& d ) +aeif_cond_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/aeif_psc_alpha.cpp b/models/aeif_psc_alpha.cpp index f14dd94094..1d9eb4d651 100644 --- a/models/aeif_psc_alpha.cpp +++ b/models/aeif_psc_alpha.cpp @@ -176,48 +176,48 @@ nest::aeif_psc_alpha::State_& nest::aeif_psc_alpha::State_::operator=( const Sta * ---------------------------------------------------------------- */ void -nest::aeif_psc_alpha::Parameters_::get( DictionaryDatum& d ) const +nest::aeif_psc_alpha::Parameters_::get( dictionary& d ) const { - def< double >( d, names::C_m, C_m ); - def< double >( d, names::V_th, V_th ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::tau_syn_ex, tau_syn_ex ); - def< double >( d, names::tau_syn_in, tau_syn_in ); - def< double >( d, names::a, a ); - def< double >( d, names::b, b ); - def< double >( d, names::Delta_T, Delta_T ); - def< double >( d, names::tau_w, tau_w ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::V_peak, V_peak_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); + d[ names::C_m.toString() ] = C_m; + d[ names::V_th.toString() ] = V_th; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::tau_syn_ex.toString() ] = tau_syn_ex; + d[ names::tau_syn_in.toString() ] = tau_syn_in; + d[ names::a.toString() ] = a; + d[ names::b.toString() ] = b; + d[ names::Delta_T.toString() ] = Delta_T; + d[ names::tau_w.toString() ] = tau_w; + d[ names::I_e.toString() ] = I_e; + d[ names::V_peak.toString() ] = V_peak_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; } void -nest::aeif_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::aeif_psc_alpha::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_peak, V_peak_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_peak.toString(), V_peak_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_syn_ex, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_syn_in, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_syn_in, node ); - updateValueParam< double >( d, names::a, a, node ); - updateValueParam< double >( d, names::b, b, node ); - updateValueParam< double >( d, names::Delta_T, Delta_T, node ); - updateValueParam< double >( d, names::tau_w, tau_w, node ); + update_value_param( d, names::a.toString(), a, node ); + update_value_param( d, names::b.toString(), b, node ); + update_value_param( d, names::Delta_T.toString(), Delta_T, node ); + update_value_param( d, names::tau_w.toString(), tau_w, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); if ( V_reset_ >= V_peak_ ) { @@ -270,25 +270,25 @@ nest::aeif_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::aeif_psc_alpha::State_::get( DictionaryDatum& d ) const +nest::aeif_psc_alpha::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::I_syn_ex, y_[ I_EXC ] ); - def< double >( d, names::dI_syn_ex, y_[ DI_EXC ] ); - def< double >( d, names::I_syn_in, y_[ I_INH ] ); - def< double >( d, names::dI_syn_in, y_[ DI_INH ] ); - def< double >( d, names::w, y_[ W ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::I_syn_ex.toString() ] = y_[ I_EXC ]; + d[ names::dI_syn_ex.toString() ] = y_[ DI_EXC ]; + d[ names::I_syn_in.toString() ] = y_[ I_INH ]; + d[ names::dI_syn_in.toString() ] = y_[ DI_INH ]; + d[ names::w.toString() ] = y_[ W ]; } void -nest::aeif_psc_alpha::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::aeif_psc_alpha::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::I_syn_ex, y_[ I_EXC ], node ); - updateValueParam< double >( d, names::dI_syn_ex, y_[ DI_EXC ], node ); - updateValueParam< double >( d, names::I_syn_in, y_[ I_INH ], node ); - updateValueParam< double >( d, names::dI_syn_in, y_[ DI_INH ], node ); - updateValueParam< double >( d, names::w, y_[ W ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::I_syn_ex.toString(), y_[ I_EXC ], node ); + update_value_param( d, names::dI_syn_ex.toString(), y_[ DI_EXC ], node ); + update_value_param( d, names::I_syn_in.toString(), y_[ I_INH ], node ); + update_value_param( d, names::dI_syn_in.toString(), y_[ DI_INH ], node ); + update_value_param( d, names::w.toString(), y_[ W ], node ); if ( y_[ I_EXC ] < 0 || y_[ I_INH ] < 0 ) { throw BadProperty( "Conductances must not be negative." ); diff --git a/models/aeif_psc_alpha.h b/models/aeif_psc_alpha.h index a83b08b834..439fb74d59 100644 --- a/models/aeif_psc_alpha.h +++ b/models/aeif_psc_alpha.h @@ -197,8 +197,8 @@ class aeif_psc_alpha : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -242,8 +242,8 @@ class aeif_psc_alpha : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -281,8 +281,8 @@ class aeif_psc_alpha : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -408,17 +408,17 @@ aeif_psc_alpha::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -aeif_psc_alpha::get_status( DictionaryDatum& d ) const +aeif_psc_alpha::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -aeif_psc_alpha::set_status( const DictionaryDatum& d ) +aeif_psc_alpha::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/aeif_psc_delta.cpp b/models/aeif_psc_delta.cpp index d50cfad1d0..34e0b3e3ef 100644 --- a/models/aeif_psc_delta.cpp +++ b/models/aeif_psc_delta.cpp @@ -167,44 +167,44 @@ nest::aeif_psc_delta::State_& nest::aeif_psc_delta::State_::operator=( const Sta * ---------------------------------------------------------------- */ void -nest::aeif_psc_delta::Parameters_::get( DictionaryDatum& d ) const +nest::aeif_psc_delta::Parameters_::get( dictionary& d ) const { - def< double >( d, names::C_m, C_m ); - def< double >( d, names::V_th, V_th ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::a, a ); - def< double >( d, names::b, b ); - def< double >( d, names::Delta_T, Delta_T ); - def< double >( d, names::tau_w, tau_w ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::V_peak, V_peak_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); - def< bool >( d, names::refractory_input, with_refr_input_ ); + d[ names::C_m.toString() ] = C_m; + d[ names::V_th.toString() ] = V_th; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::a.toString() ] = a; + d[ names::b.toString() ] = b; + d[ names::Delta_T.toString() ] = Delta_T; + d[ names::tau_w.toString() ] = tau_w; + d[ names::I_e.toString() ] = I_e; + d[ names::V_peak.toString() ] = V_peak_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::refractory_input.toString() ] = with_refr_input_; } void -nest::aeif_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::aeif_psc_delta::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_peak, V_peak_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_peak.toString(), V_peak_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::a, a, node ); - updateValueParam< double >( d, names::b, b, node ); - updateValueParam< double >( d, names::Delta_T, Delta_T, node ); - updateValueParam< double >( d, names::tau_w, tau_w, node ); + update_value_param( d, names::a.toString(), a, node ); + update_value_param( d, names::b.toString(), b, node ); + update_value_param( d, names::Delta_T.toString(), Delta_T, node ); + update_value_param( d, names::tau_w.toString(), tau_w, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); if ( V_reset_ >= V_peak_ ) { @@ -255,21 +255,21 @@ nest::aeif_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) throw BadProperty( "The gsl_error_tol must be strictly positive." ); } - updateValueParam< bool >( d, names::refractory_input, with_refr_input_, node ); + update_value_param( d, names::refractory_input.toString(), with_refr_input_, node ); } void -nest::aeif_psc_delta::State_::get( DictionaryDatum& d ) const +nest::aeif_psc_delta::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::w, y_[ W ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::w.toString() ] = y_[ W ]; } void -nest::aeif_psc_delta::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::aeif_psc_delta::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::w, y_[ W ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::w.toString(), y_[ W ], node ); } diff --git a/models/aeif_psc_delta.h b/models/aeif_psc_delta.h index 93fa120020..761a89ee93 100644 --- a/models/aeif_psc_delta.h +++ b/models/aeif_psc_delta.h @@ -192,8 +192,8 @@ class aeif_psc_delta : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -237,8 +237,8 @@ class aeif_psc_delta : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; public: @@ -277,8 +277,8 @@ class aeif_psc_delta : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -403,17 +403,17 @@ aeif_psc_delta::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -aeif_psc_delta::get_status( DictionaryDatum& d ) const +aeif_psc_delta::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -aeif_psc_delta::set_status( const DictionaryDatum& d ) +aeif_psc_delta::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/aeif_psc_delta_clopath.cpp b/models/aeif_psc_delta_clopath.cpp index 15b6291803..bdf7d56c9c 100644 --- a/models/aeif_psc_delta_clopath.cpp +++ b/models/aeif_psc_delta_clopath.cpp @@ -202,62 +202,62 @@ nest::aeif_psc_delta_clopath::State_& nest::aeif_psc_delta_clopath::State_::oper * ---------------------------------------------------------------- */ void -nest::aeif_psc_delta_clopath::Parameters_::get( DictionaryDatum& d ) const +nest::aeif_psc_delta_clopath::Parameters_::get( dictionary& d ) const { - def< double >( d, names::C_m, C_m ); - def< double >( d, names::V_th_max, V_th_max ); - def< double >( d, names::V_th_rest, V_th_rest ); - def< double >( d, names::tau_V_th, tau_V_th ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::a, a ); - def< double >( d, names::b, b ); - def< double >( d, names::I_sp, I_sp ); - def< double >( d, names::Delta_T, Delta_T ); - def< double >( d, names::tau_w, tau_w ); - def< double >( d, names::tau_z, tau_z ); - def< double >( d, names::tau_plus, tau_plus ); - def< double >( d, names::tau_minus, tau_minus ); - def< double >( d, names::tau_bar_bar, tau_bar_bar ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::V_peak, V_peak_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); - def< double >( d, names::V_clamp, V_clamp_ ); - def< double >( d, names::t_clamp, t_clamp_ ); + d[ names::C_m.toString() ] = C_m; + d[ names::V_th_max.toString() ] = V_th_max; + d[ names::V_th_rest.toString() ] = V_th_rest; + d[ names::tau_V_th.toString() ] = tau_V_th; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::a.toString() ] = a; + d[ names::b.toString() ] = b; + d[ names::I_sp.toString() ] = I_sp; + d[ names::Delta_T.toString() ] = Delta_T; + d[ names::tau_w.toString() ] = tau_w; + d[ names::tau_z.toString() ] = tau_z; + d[ names::tau_plus.toString() ] = tau_plus; + d[ names::tau_minus.toString() ] = tau_minus; + d[ names::tau_bar_bar.toString() ] = tau_bar_bar; + d[ names::I_e.toString() ] = I_e; + d[ names::V_peak.toString() ] = V_peak_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::V_clamp.toString() ] = V_clamp_; + d[ names::t_clamp.toString() ] = t_clamp_; } void -nest::aeif_psc_delta_clopath::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::aeif_psc_delta_clopath::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th_max, V_th_max, node ); - updateValueParam< double >( d, names::V_th_rest, V_th_rest, node ); - updateValueParam< double >( d, names::tau_V_th, tau_V_th, node ); - updateValueParam< double >( d, names::V_peak, V_peak_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); - - updateValueParam< double >( d, names::a, a, node ); - updateValueParam< double >( d, names::b, b, node ); - updateValueParam< double >( d, names::I_sp, I_sp, node ); - updateValueParam< double >( d, names::Delta_T, Delta_T, node ); - updateValueParam< double >( d, names::tau_w, tau_w, node ); - updateValueParam< double >( d, names::tau_z, tau_z, node ); - updateValueParam< double >( d, names::tau_plus, tau_plus, node ); - updateValueParam< double >( d, names::tau_minus, tau_minus, node ); - updateValueParam< double >( d, names::tau_bar_bar, tau_bar_bar, node ); - - updateValueParam< double >( d, names::I_e, I_e, node ); - - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); - - updateValueParam< double >( d, names::V_clamp, V_clamp_, node ); - updateValueParam< double >( d, names::t_clamp, t_clamp_, node ); + update_value_param( d, names::V_th_max.toString(), V_th_max, node ); + update_value_param( d, names::V_th_rest.toString(), V_th_rest, node ); + update_value_param( d, names::tau_V_th.toString(), tau_V_th, node ); + update_value_param( d, names::V_peak.toString(), V_peak_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); + + update_value_param( d, names::a.toString(), a, node ); + update_value_param( d, names::b.toString(), b, node ); + update_value_param( d, names::I_sp.toString(), I_sp, node ); + update_value_param( d, names::Delta_T.toString(), Delta_T, node ); + update_value_param( d, names::tau_w.toString(), tau_w, node ); + update_value_param( d, names::tau_z.toString(), tau_z, node ); + update_value_param( d, names::tau_plus.toString(), tau_plus, node ); + update_value_param( d, names::tau_minus.toString(), tau_minus, node ); + update_value_param( d, names::tau_bar_bar.toString(), tau_bar_bar, node ); + + update_value_param( d, names::I_e.toString(), I_e, node ); + + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + + update_value_param( d, names::V_clamp.toString(), V_clamp_, node ); + update_value_param( d, names::t_clamp.toString(), t_clamp_, node ); if ( V_reset_ >= V_peak_ ) { @@ -320,23 +320,23 @@ nest::aeif_psc_delta_clopath::Parameters_::set( const DictionaryDatum& d, Node* } void -nest::aeif_psc_delta_clopath::State_::get( DictionaryDatum& d ) const +nest::aeif_psc_delta_clopath::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::w, y_[ W ] ); - def< double >( d, names::u_bar_plus, y_[ U_BAR_PLUS ] ); - def< double >( d, names::u_bar_minus, y_[ U_BAR_MINUS ] ); - def< double >( d, names::u_bar_bar, y_[ U_BAR_BAR ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::w.toString() ] = y_[ W ]; + d[ names::u_bar_plus.toString() ] = y_[ U_BAR_PLUS ]; + d[ names::u_bar_minus.toString() ] = y_[ U_BAR_MINUS ]; + d[ names::u_bar_bar.toString() ] = y_[ U_BAR_BAR ]; } void -nest::aeif_psc_delta_clopath::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::aeif_psc_delta_clopath::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::w, y_[ W ], node ); - updateValueParam< double >( d, names::u_bar_plus, y_[ U_BAR_PLUS ], node ); - updateValueParam< double >( d, names::u_bar_minus, y_[ U_BAR_MINUS ], node ); - updateValueParam< double >( d, names::u_bar_bar, y_[ U_BAR_BAR ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::w.toString(), y_[ W ], node ); + update_value_param( d, names::u_bar_plus.toString(), y_[ U_BAR_PLUS ], node ); + update_value_param( d, names::u_bar_minus.toString(), y_[ U_BAR_MINUS ], node ); + update_value_param( d, names::u_bar_bar.toString(), y_[ U_BAR_BAR ], node ); } nest::aeif_psc_delta_clopath::Buffers_::Buffers_( aeif_psc_delta_clopath& n ) diff --git a/models/aeif_psc_delta_clopath.h b/models/aeif_psc_delta_clopath.h index 35490d7a90..fb9d0db482 100644 --- a/models/aeif_psc_delta_clopath.h +++ b/models/aeif_psc_delta_clopath.h @@ -222,8 +222,8 @@ class aeif_psc_delta_clopath : public ClopathArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -276,8 +276,8 @@ class aeif_psc_delta_clopath : public ClopathArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -317,8 +317,8 @@ class aeif_psc_delta_clopath : public ClopathArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -438,17 +438,17 @@ aeif_psc_delta_clopath::handles_test_event( DataLoggingRequest& dlr, rport recep } inline void -aeif_psc_delta_clopath::get_status( DictionaryDatum& d ) const +aeif_psc_delta_clopath::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ClopathArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -aeif_psc_delta_clopath::set_status( const DictionaryDatum& d ) +aeif_psc_delta_clopath::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/aeif_psc_exp.cpp b/models/aeif_psc_exp.cpp index 4d820db06d..158e9badbe 100644 --- a/models/aeif_psc_exp.cpp +++ b/models/aeif_psc_exp.cpp @@ -175,48 +175,48 @@ nest::aeif_psc_exp::State_& nest::aeif_psc_exp::State_::operator=( const State_& * ---------------------------------------------------------------- */ void -nest::aeif_psc_exp::Parameters_::get( DictionaryDatum& d ) const +nest::aeif_psc_exp::Parameters_::get( dictionary& d ) const { - def< double >( d, names::C_m, C_m ); - def< double >( d, names::V_th, V_th ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::tau_syn_ex, tau_syn_ex ); - def< double >( d, names::tau_syn_in, tau_syn_in ); - def< double >( d, names::a, a ); - def< double >( d, names::b, b ); - def< double >( d, names::Delta_T, Delta_T ); - def< double >( d, names::tau_w, tau_w ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::V_peak, V_peak_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); + d[ names::C_m.toString() ] = C_m; + d[ names::V_th.toString() ] = V_th; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::tau_syn_ex.toString() ] = tau_syn_ex; + d[ names::tau_syn_in.toString() ] = tau_syn_in; + d[ names::a.toString() ] = a; + d[ names::b.toString() ] = b; + d[ names::Delta_T.toString() ] = Delta_T; + d[ names::tau_w.toString() ] = tau_w; + d[ names::I_e.toString() ] = I_e; + d[ names::V_peak.toString() ] = V_peak_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; } void -nest::aeif_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::aeif_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_peak, V_peak_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_peak.toString(), V_peak_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_syn_ex, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_syn_in, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_syn_in, node ); - updateValueParam< double >( d, names::a, a, node ); - updateValueParam< double >( d, names::b, b, node ); - updateValueParam< double >( d, names::Delta_T, Delta_T, node ); - updateValueParam< double >( d, names::tau_w, tau_w, node ); + update_value_param( d, names::a.toString(), a, node ); + update_value_param( d, names::b.toString(), b, node ); + update_value_param( d, names::Delta_T.toString(), Delta_T, node ); + update_value_param( d, names::tau_w.toString(), tau_w, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); if ( V_reset_ >= V_peak_ ) { @@ -269,21 +269,21 @@ nest::aeif_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::aeif_psc_exp::State_::get( DictionaryDatum& d ) const +nest::aeif_psc_exp::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::I_syn_ex, y_[ I_EXC ] ); - def< double >( d, names::I_syn_in, y_[ I_INH ] ); - def< double >( d, names::w, y_[ W ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::I_syn_ex.toString() ] = y_[ I_EXC ]; + d[ names::I_syn_in.toString() ] = y_[ I_INH ]; + d[ names::w.toString() ] = y_[ W ]; } void -nest::aeif_psc_exp::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::aeif_psc_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::I_syn_ex, y_[ I_EXC ], node ); - updateValueParam< double >( d, names::I_syn_in, y_[ I_INH ], node ); - updateValueParam< double >( d, names::w, y_[ W ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::I_syn_ex.toString(), y_[ I_EXC ], node ); + update_value_param( d, names::I_syn_in.toString(), y_[ I_INH ], node ); + update_value_param( d, names::w.toString(), y_[ W ], node ); if ( y_[ I_EXC ] < 0 || y_[ I_INH ] < 0 ) { throw BadProperty( "Conductances must not be negative." ); diff --git a/models/aeif_psc_exp.h b/models/aeif_psc_exp.h index 9f5fb44c42..421ef228d8 100644 --- a/models/aeif_psc_exp.h +++ b/models/aeif_psc_exp.h @@ -199,8 +199,8 @@ class aeif_psc_exp : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -244,8 +244,8 @@ class aeif_psc_exp : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -281,8 +281,8 @@ class aeif_psc_exp : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -402,17 +402,17 @@ aeif_psc_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -aeif_psc_exp::get_status( DictionaryDatum& d ) const +aeif_psc_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -aeif_psc_exp::set_status( const DictionaryDatum& d ) +aeif_psc_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/amat2_psc_exp.cpp b/models/amat2_psc_exp.cpp index 2a5246f5bf..76158efa91 100644 --- a/models/amat2_psc_exp.cpp +++ b/models/amat2_psc_exp.cpp @@ -107,47 +107,47 @@ nest::amat2_psc_exp::State_::State_() * ---------------------------------------------------------------- */ void -nest::amat2_psc_exp::Parameters_::get( DictionaryDatum& d ) const +nest::amat2_psc_exp::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); // Resting potential - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::C_m, C_ ); - def< double >( d, names::tau_m, Tau_ ); - def< double >( d, names::tau_syn_ex, tau_ex_ ); - def< double >( d, names::tau_syn_in, tau_in_ ); - def< double >( d, names::t_ref, tau_ref_ ); - def< double >( d, names::tau_1, tau_1_ ); - def< double >( d, names::tau_2, tau_2_ ); - def< double >( d, names::alpha_1, alpha_1_ ); - def< double >( d, names::alpha_2, alpha_2_ ); - def< double >( d, names::beta, beta_ ); - def< double >( d, names::tau_v, tau_v_ ); - def< double >( d, names::omega, omega_ + E_L_ ); + d[ names::E_L.toString() ] = E_L_; // Resting potential + d[ names::I_e.toString() ] = I_e_; + d[ names::C_m.toString() ] = C_; + d[ names::tau_m.toString() ] = Tau_; + d[ names::tau_syn_ex.toString() ] = tau_ex_; + d[ names::tau_syn_in.toString() ] = tau_in_; + d[ names::t_ref.toString() ] = tau_ref_; + d[ names::tau_1.toString() ] = tau_1_; + d[ names::tau_2.toString() ] = tau_2_; + d[ names::alpha_1.toString() ] = alpha_1_; + d[ names::alpha_2.toString() ] = alpha_2_; + d[ names::beta.toString() ] = beta_; + d[ names::tau_v.toString() ] = tau_v_; + d[ names::omega.toString() ] = omega_ + E_L_; } double -nest::amat2_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::amat2_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, C_, node ); - updateValueParam< double >( d, names::tau_m, Tau_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_in_, node ); - updateValueParam< double >( d, names::t_ref, tau_ref_, node ); - updateValueParam< double >( d, names::tau_1, tau_1_, node ); - updateValueParam< double >( d, names::tau_2, tau_2_, node ); - updateValueParam< double >( d, names::alpha_1, alpha_1_, node ); - updateValueParam< double >( d, names::alpha_2, alpha_2_, node ); - updateValueParam< double >( d, names::beta, beta_, node ); - updateValueParam< double >( d, names::tau_v, tau_v_, node ); - - if ( updateValueParam< double >( d, names::omega, omega_, node ) ) + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), C_, node ); + update_value_param( d, names::tau_m.toString(), Tau_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); + update_value_param( d, names::t_ref.toString(), tau_ref_, node ); + update_value_param( d, names::tau_1.toString(), tau_1_, node ); + update_value_param( d, names::tau_2.toString(), tau_2_, node ); + update_value_param( d, names::alpha_1.toString(), alpha_1_, node ); + update_value_param( d, names::alpha_2.toString(), alpha_2_, node ); + update_value_param( d, names::beta.toString(), beta_, node ); + update_value_param( d, names::tau_v.toString(), tau_v_, node ); + + if ( update_value_param( d, names::omega.toString(), omega_, node ) ) { omega_ -= E_L_; } @@ -181,20 +181,20 @@ nest::amat2_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::amat2_psc_exp::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::amat2_psc_exp::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, V_m_ + p.E_L_ ); // Membrane potential + d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential // Adaptive threshold - def< double >( d, names::V_th, p.E_L_ + p.omega_ + V_th_1_ + V_th_2_ + V_th_v_ ); - def< double >( d, names::V_th_alpha_1, V_th_1_ ); - def< double >( d, names::V_th_alpha_2, V_th_2_ ); - def< double >( d, names::V_th_v, V_th_v_ ); + d[ names::V_th.toString() ] = p.E_L_ + p.omega_ + V_th_1_ + V_th_2_ + V_th_v_; + d[ names::V_th_alpha_1.toString() ] = V_th_1_; + d[ names::V_th_alpha_2.toString() ] = V_th_2_; + d[ names::V_th_v.toString() ] = V_th_v_; } void -nest::amat2_psc_exp::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node ) +nest::amat2_psc_exp::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( updateValueParam< double >( d, names::V_m, V_m_, node ) ) + if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) { V_m_ -= p.E_L_; } @@ -203,9 +203,9 @@ nest::amat2_psc_exp::State_::set( const DictionaryDatum& d, const Parameters_& p V_m_ -= delta_EL; } - updateValueParam< double >( d, names::V_th_alpha_1, V_th_1_, node ); - updateValueParam< double >( d, names::V_th_alpha_2, V_th_2_, node ); - updateValueParam< double >( d, names::V_th_v, V_th_v_, node ); + update_value_param( d, names::V_th_alpha_1.toString(), V_th_1_, node ); + update_value_param( d, names::V_th_alpha_2.toString(), V_th_2_, node ); + update_value_param( d, names::V_th_v.toString(), V_th_v_, node ); } nest::amat2_psc_exp::Buffers_::Buffers_( amat2_psc_exp& n ) diff --git a/models/amat2_psc_exp.h b/models/amat2_psc_exp.h index 90e86ff285..58b68f1918 100644 --- a/models/amat2_psc_exp.h +++ b/models/amat2_psc_exp.h @@ -180,8 +180,8 @@ class amat2_psc_exp : public ArchivingNode void handle( CurrentEvent& ); void handle( DataLoggingRequest& ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -242,12 +242,12 @@ class amat2_psc_exp : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + double set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ---------------------------------------------------------------- @@ -274,14 +274,14 @@ class amat2_psc_exp : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double, Node* ); + void set( const dictionary&, const Parameters_&, double, Node* ); }; // ---------------------------------------------------------------- @@ -434,17 +434,17 @@ amat2_psc_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -amat2_psc_exp::get_status( DictionaryDatum& d ) const +amat2_psc_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -amat2_psc_exp::set_status( const DictionaryDatum& d ) +amat2_psc_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/bernoulli_synapse.h b/models/bernoulli_synapse.h index c000e04e81..baccce6e67 100644 --- a/models/bernoulli_synapse.h +++ b/models/bernoulli_synapse.h @@ -172,9 +172,9 @@ class bernoulli_synapse : public Connection< targetidentifierT > e_spike.set_multiplicity( n_spikes_in ); } - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); void set_weight( double w ) @@ -189,21 +189,21 @@ class bernoulli_synapse : public Connection< targetidentifierT > template < typename targetidentifierT > void -bernoulli_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +bernoulli_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::p_transmit, p_transmit_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::p_transmit.toString() ] = p_transmit_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -bernoulli_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +bernoulli_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::p_transmit, p_transmit_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::p_transmit.toString(), p_transmit_ ); if ( p_transmit_ < 0 || p_transmit_ > 1 ) { diff --git a/models/binary_neuron.h b/models/binary_neuron.h index 989c590f83..ecbf7f157c 100644 --- a/models/binary_neuron.h +++ b/models/binary_neuron.h @@ -107,8 +107,8 @@ class binary_neuron : public ArchivingNode SignalType sends_signal() const; SignalType receives_signal() const; - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void calibrate_time( const TimeConverter& tc ); @@ -139,8 +139,8 @@ class binary_neuron : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ---------------------------------------------------------------- @@ -158,8 +158,8 @@ class binary_neuron : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -289,19 +289,19 @@ binary_neuron< TGainfunction >::receives_signal() const template < class TGainfunction > inline void -binary_neuron< TGainfunction >::get_status( DictionaryDatum& d ) const +binary_neuron< TGainfunction >::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); gain_.get( d ); } template < class TGainfunction > inline void -binary_neuron< TGainfunction >::set_status( const DictionaryDatum& d ) +binary_neuron< TGainfunction >::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty @@ -351,16 +351,16 @@ binary_neuron< TGainfunction >::State_::State_() template < class TGainfunction > void -binary_neuron< TGainfunction >::Parameters_::get( DictionaryDatum& d ) const +binary_neuron< TGainfunction >::Parameters_::get( dictionary& d ) const { - def< double >( d, names::tau_m, tau_m_ ); + d[ names::tau_m.toString() ] = tau_m_; } template < class TGainfunction > void -binary_neuron< TGainfunction >::Parameters_::set( const DictionaryDatum& d, Node* node ) +binary_neuron< TGainfunction >::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::tau_m, tau_m_, node ); + update_value_param( d, names::tau_m.toString(), tau_m_, node ); if ( tau_m_ <= 0 ) { throw BadProperty( "All time constants must be strictly positive." ); @@ -369,15 +369,15 @@ binary_neuron< TGainfunction >::Parameters_::set( const DictionaryDatum& d, Node template < class TGainfunction > void -binary_neuron< TGainfunction >::State_::get( DictionaryDatum& d, const Parameters_& ) const +binary_neuron< TGainfunction >::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::h, h_ ); // summed input - def< double >( d, names::S, y_ ); // binary_neuron output state + d[ names::h.toString() ] = h_; // summed input + d[ names::S.toString() ] = y_; // binary_neuron output state } template < class TGainfunction > void -binary_neuron< TGainfunction >::State_::set( const DictionaryDatum&, const Parameters_&, Node* ) +binary_neuron< TGainfunction >::State_::set( const dictionary&, const Parameters_&, Node* ) { } diff --git a/models/clopath_synapse.h b/models/clopath_synapse.h index fb28692183..96eb14a5c8 100644 --- a/models/clopath_synapse.h +++ b/models/clopath_synapse.h @@ -139,12 +139,12 @@ class clopath_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -278,27 +278,27 @@ clopath_synapse< targetidentifierT >::clopath_synapse() template < typename targetidentifierT > void -clopath_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +clopath_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::x_bar, x_bar_ ); - def< double >( d, names::tau_x, tau_x_ ); - def< double >( d, names::Wmin, Wmin_ ); - def< double >( d, names::Wmax, Wmax_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::x_bar.toString() ] = x_bar_; + d[ names::tau_x.toString() ] = tau_x_; + d[ names::Wmin.toString() ] = Wmin_; + d[ names::Wmax.toString() ] = Wmax_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -clopath_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +clopath_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::x_bar, x_bar_ ); - updateValue< double >( d, names::tau_x, tau_x_ ); - updateValue< double >( d, names::Wmin, Wmin_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::x_bar.toString(), x_bar_ ); + d.update_value( names::tau_x.toString(), tau_x_ ); + d.update_value( names::Wmin.toString(), Wmin_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); // check if weight_ and Wmin_ has the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmin_ >= 0 ) - ( Wmin_ < 0 ) ) ) ) diff --git a/models/cont_delay_synapse.h b/models/cont_delay_synapse.h index 532ed7580e..995f1b20c3 100644 --- a/models/cont_delay_synapse.h +++ b/models/cont_delay_synapse.h @@ -121,17 +121,17 @@ class cont_delay_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Issue warning if delay is given in syn_spec. */ - void check_synapse_params( const DictionaryDatum& d ) const; + void check_synapse_params( const dictionary& d ) const; /** * Send an event to the receiver of this connection. diff --git a/models/cont_delay_synapse_impl.h b/models/cont_delay_synapse_impl.h index 4a029b82a8..a3db58e4e0 100644 --- a/models/cont_delay_synapse_impl.h +++ b/models/cont_delay_synapse_impl.h @@ -46,27 +46,27 @@ cont_delay_synapse< targetidentifierT >::cont_delay_synapse() template < typename targetidentifierT > void -cont_delay_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +cont_delay_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::delay, Time( Time::step( get_delay_steps() ) ).get_ms() - delay_offset_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::delay.toString() ] = Time( Time::step( get_delay_steps() ) ).get_ms() - delay_offset_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -cont_delay_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +cont_delay_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); // set delay if mentioned double delay; - if ( updateValue< double >( d, names::delay, delay ) ) + if ( d.update_value( names::delay.toString(), delay ) ) { const double h = Time::get_resolution().get_ms(); @@ -92,9 +92,9 @@ cont_delay_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, C template < typename targetidentifierT > void -cont_delay_synapse< targetidentifierT >::check_synapse_params( const DictionaryDatum& syn_spec ) const +cont_delay_synapse< targetidentifierT >::check_synapse_params( const dictionary& syn_spec ) const { - if ( syn_spec->known( names::delay ) ) + if ( syn_spec.known( names::delay.toString() ) ) { LOG( M_WARNING, "Connect", diff --git a/models/correlation_detector.cpp b/models/correlation_detector.cpp index ca3288050a..4d985dc028 100644 --- a/models/correlation_detector.cpp +++ b/models/correlation_detector.cpp @@ -96,47 +96,47 @@ nest::correlation_detector::State_::State_() * ---------------------------------------------------------------- */ void -nest::correlation_detector::Parameters_::get( DictionaryDatum& d ) const +nest::correlation_detector::Parameters_::get( dictionary& d ) const { - ( *d )[ names::delta_tau ] = delta_tau_.get_ms(); - ( *d )[ names::tau_max ] = tau_max_.get_ms(); - ( *d )[ names::Tstart ] = Tstart_.get_ms(); - ( *d )[ names::Tstop ] = Tstop_.get_ms(); + d[ names::delta_tau.toString() ] = delta_tau_.get_ms(); + d[ names::tau_max.toString() ] = tau_max_.get_ms(); + d[ names::Tstart.toString() ] = Tstart_.get_ms(); + d[ names::Tstop.toString() ] = Tstop_.get_ms(); } void -nest::correlation_detector::State_::get( DictionaryDatum& d ) const +nest::correlation_detector::State_::get( dictionary& d ) const { - ( *d )[ names::n_events ] = IntVectorDatum( new std::vector< long >( n_events_ ) ); - ( *d )[ names::histogram ] = DoubleVectorDatum( new std::vector< double >( histogram_ ) ); - ( *d )[ names::histogram_correction ] = DoubleVectorDatum( new std::vector< double >( histogram_correction_ ) ); - ( *d )[ names::count_histogram ] = IntVectorDatum( new std::vector< long >( count_histogram_ ) ); + d[ names::n_events.toString() ] = IntVectorDatum( new std::vector< long >( n_events_ ) ); + d[ names::histogram.toString() ] = DoubleVectorDatum( new std::vector< double >( histogram_ ) ); + d[ names::histogram_correction.toString() ] = DoubleVectorDatum( new std::vector< double >( histogram_correction_ ) ); + d[ names::count_histogram.toString() ] = IntVectorDatum( new std::vector< long >( count_histogram_ ) ); } bool -nest::correlation_detector::Parameters_::set( const DictionaryDatum& d, const correlation_detector& n, Node* node ) +nest::correlation_detector::Parameters_::set( const dictionary& d, const correlation_detector& n, Node* node ) { bool reset = false; double t; - if ( updateValueParam< double >( d, names::delta_tau, t, node ) ) + if ( update_value_param( d, names::delta_tau.toString(), t, node ) ) { delta_tau_ = Time::ms( t ); reset = true; } - if ( updateValueParam< double >( d, names::tau_max, t, node ) ) + if ( update_value_param( d, names::tau_max.toString(), t, node ) ) { tau_max_ = Time::ms( t ); reset = true; } - if ( updateValueParam< double >( d, names::Tstart, t, node ) ) + if ( update_value_param( d, names::Tstart.toString(), t, node ) ) { Tstart_ = Time::ms( t ); reset = true; } - if ( updateValueParam< double >( d, names::Tstop, t, node ) ) + if ( update_value_param( d, names::Tstop.toString(), t, node ) ) { Tstop_ = Time::ms( t ); reset = true; @@ -156,10 +156,10 @@ nest::correlation_detector::Parameters_::set( const DictionaryDatum& d, const co } void -nest::correlation_detector::State_::set( const DictionaryDatum& d, const Parameters_& p, bool reset_required, Node* ) +nest::correlation_detector::State_::set( const dictionary& d, const Parameters_& p, bool reset_required, Node* ) { std::vector< long > nev; - if ( updateValue< std::vector< long > >( d, names::n_events, nev ) ) + if ( d.update_value( names::n_events.toString(), nev ) ) { if ( nev.size() == 2 && nev[ 0 ] == 0 && nev[ 1 ] == 0 ) { diff --git a/models/correlation_detector.h b/models/correlation_detector.h index 5e1abd0355..5abf4412b5 100644 --- a/models/correlation_detector.h +++ b/models/correlation_detector.h @@ -193,8 +193,8 @@ class correlation_detector : public Node port handles_test_event( SpikeEvent&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void calibrate_time( const TimeConverter& tc ); @@ -249,14 +249,14 @@ class correlation_detector : public Node Parameters_& operator=( const Parameters_& ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set values from dicitonary. * @returns true if the state needs to be reset after a change of * binwidth or tau_max. */ - bool set( const DictionaryDatum&, const correlation_detector&, Node* ); + bool set( const dictionary&, const correlation_detector&, Node* ); }; // ------------------------------------------------------------ @@ -288,12 +288,12 @@ class correlation_detector : public Node State_(); //!< initialize default state - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; /** * @param bool if true, force state reset */ - void set( const DictionaryDatum&, const Parameters_&, bool, Node* ); + void set( const dictionary&, const Parameters_&, bool, Node* ); void reset( const Parameters_& ); }; @@ -317,7 +317,7 @@ correlation_detector::handles_test_event( SpikeEvent&, rport receptor_type ) } inline void -nest::correlation_detector::get_status( DictionaryDatum& d ) const +nest::correlation_detector::get_status( dictionary& d ) const { device_.get_status( d ); P_.get( d ); @@ -325,7 +325,7 @@ nest::correlation_detector::get_status( DictionaryDatum& d ) const } inline void -nest::correlation_detector::set_status( const DictionaryDatum& d ) +nest::correlation_detector::set_status( const dictionary& d ) { Parameters_ ptmp = P_; const bool reset_required = ptmp.set( d, *this, this ); diff --git a/models/correlomatrix_detector.cpp b/models/correlomatrix_detector.cpp index 4cdaf0adf8..25ff60a545 100644 --- a/models/correlomatrix_detector.cpp +++ b/models/correlomatrix_detector.cpp @@ -100,19 +100,19 @@ nest::correlomatrix_detector::State_::State_() * ---------------------------------------------------------------- */ void -nest::correlomatrix_detector::Parameters_::get( DictionaryDatum& d ) const +nest::correlomatrix_detector::Parameters_::get( dictionary& d ) const { - ( *d )[ names::delta_tau ] = delta_tau_.get_ms(); - ( *d )[ names::tau_max ] = tau_max_.get_ms(); - ( *d )[ names::Tstart ] = Tstart_.get_ms(); - ( *d )[ names::Tstop ] = Tstop_.get_ms(); - ( *d )[ names::N_channels ] = N_channels_; + d[ names::delta_tau.toString() ] = delta_tau_.get_ms(); + d[ names::tau_max.toString() ] = tau_max_.get_ms(); + d[ names::Tstart.toString() ] = Tstart_.get_ms(); + d[ names::Tstop.toString() ] = Tstop_.get_ms(); + d[ names::N_channels.toString() ] = N_channels_; } void -nest::correlomatrix_detector::State_::get( DictionaryDatum& d ) const +nest::correlomatrix_detector::State_::get( dictionary& d ) const { - ( *d )[ names::n_events ] = IntVectorDatum( new std::vector< long >( n_events_ ) ); + d[ names::n_events.toString() ] = IntVectorDatum( new std::vector< long >( n_events_ ) ); ArrayDatum* C = new ArrayDatum; ArrayDatum* CountC = new ArrayDatum; @@ -128,18 +128,18 @@ nest::correlomatrix_detector::State_::get( DictionaryDatum& d ) const C->push_back( *C_i ); CountC->push_back( *CountC_i ); } - ( *d )[ names::covariance ] = C; - ( *d )[ names::count_covariance ] = CountC; + d[ names::covariance.toString() ] = C; + d[ names::count_covariance.toString() ] = CountC; } bool -nest::correlomatrix_detector::Parameters_::set( const DictionaryDatum& d, const correlomatrix_detector& n, Node* node ) +nest::correlomatrix_detector::Parameters_::set( const dictionary& d, const correlomatrix_detector& n, Node* node ) { bool reset = false; double t; long N; - if ( updateValueParam< long >( d, names::N_channels, N, node ) ) + if ( update_value_param( d, names::N_channels.toString(), N, node ) ) { if ( N < 1 ) { @@ -152,25 +152,25 @@ nest::correlomatrix_detector::Parameters_::set( const DictionaryDatum& d, const } } - if ( updateValueParam< double >( d, names::delta_tau, t, node ) ) + if ( update_value_param( d, names::delta_tau.toString(), t, node ) ) { delta_tau_ = Time::ms( t ); reset = true; } - if ( updateValueParam< double >( d, names::tau_max, t, node ) ) + if ( update_value_param( d, names::tau_max.toString(), t, node ) ) { tau_max_ = Time::ms( t ); reset = true; } - if ( updateValueParam< double >( d, names::Tstart, t, node ) ) + if ( update_value_param( d, names::Tstart.toString(), t, node ) ) { Tstart_ = Time::ms( t ); reset = true; } - if ( updateValueParam< double >( d, names::Tstop, t, node ) ) + if ( update_value_param( d, names::Tstop.toString(), t, node ) ) { Tstop_ = Time::ms( t ); reset = true; @@ -195,7 +195,7 @@ nest::correlomatrix_detector::Parameters_::set( const DictionaryDatum& d, const } void -nest::correlomatrix_detector::State_::set( const DictionaryDatum&, const Parameters_&, bool, Node* ) +nest::correlomatrix_detector::State_::set( const dictionary&, const Parameters_&, bool, Node* ) { } diff --git a/models/correlomatrix_detector.h b/models/correlomatrix_detector.h index 27a947df27..3f462b2df2 100644 --- a/models/correlomatrix_detector.h +++ b/models/correlomatrix_detector.h @@ -179,8 +179,8 @@ class correlomatrix_detector : public Node port handles_test_event( SpikeEvent&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void calibrate_time( const TimeConverter& tc ); @@ -238,14 +238,14 @@ class correlomatrix_detector : public Node Parameters_& operator=( const Parameters_& ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set values from dicitonary. * @returns true if the state needs to be reset after a change of * binwidth or tau_max. */ - bool set( const DictionaryDatum&, const correlomatrix_detector&, Node* node ); + bool set( const dictionary&, const correlomatrix_detector&, Node* node ); }; // ------------------------------------------------------------ @@ -274,12 +274,12 @@ class correlomatrix_detector : public Node State_(); //!< initialize default state - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; /** * @param bool if true, force state reset */ - void set( const DictionaryDatum&, const Parameters_&, bool, Node* node ); + void set( const dictionary&, const Parameters_&, bool, Node* node ); void reset( const Parameters_& ); }; @@ -302,7 +302,7 @@ correlomatrix_detector::handles_test_event( SpikeEvent&, rport receptor_type ) } inline void -nest::correlomatrix_detector::get_status( DictionaryDatum& d ) const +nest::correlomatrix_detector::get_status( dictionary& d ) const { device_.get_status( d ); P_.get( d ); @@ -310,7 +310,7 @@ nest::correlomatrix_detector::get_status( DictionaryDatum& d ) const } inline void -nest::correlomatrix_detector::set_status( const DictionaryDatum& d ) +nest::correlomatrix_detector::set_status( const dictionary& d ) { Parameters_ ptmp = P_; const bool reset_required = ptmp.set( d, *this, this ); diff --git a/models/correlospinmatrix_detector.cpp b/models/correlospinmatrix_detector.cpp index 6a0774f4e5..eede25837b 100644 --- a/models/correlospinmatrix_detector.cpp +++ b/models/correlospinmatrix_detector.cpp @@ -103,17 +103,17 @@ nest::correlospinmatrix_detector::State_::State_() * ---------------------------------------------------------------- */ void -nest::correlospinmatrix_detector::Parameters_::get( DictionaryDatum& d ) const +nest::correlospinmatrix_detector::Parameters_::get( dictionary& d ) const { - ( *d )[ names::delta_tau ] = delta_tau_.get_ms(); - ( *d )[ names::tau_max ] = tau_max_.get_ms(); - ( *d )[ names::Tstart ] = Tstart_.get_ms(); - ( *d )[ names::Tstop ] = Tstop_.get_ms(); - ( *d )[ names::N_channels ] = N_channels_; + d[ names::delta_tau.toString() ] = delta_tau_.get_ms(); + d[ names::tau_max.toString() ] = tau_max_.get_ms(); + d[ names::Tstart.toString() ] = Tstart_.get_ms(); + d[ names::Tstop.toString() ] = Tstop_.get_ms(); + d[ names::N_channels.toString() ] = N_channels_; } void -nest::correlospinmatrix_detector::State_::get( DictionaryDatum& d ) const +nest::correlospinmatrix_detector::State_::get( dictionary& d ) const { ArrayDatum* CountC = new ArrayDatum; for ( size_t i = 0; i < count_covariance_.size(); ++i ) @@ -125,11 +125,11 @@ nest::correlospinmatrix_detector::State_::get( DictionaryDatum& d ) const } CountC->push_back( *CountC_i ); } - ( *d )[ names::count_covariance ] = CountC; + d[ names::count_covariance.toString() ] = CountC; } bool -nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d, +nest::correlospinmatrix_detector::Parameters_::set( const dictionary& d, const correlospinmatrix_detector& n, Node* node ) { @@ -137,7 +137,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d, double t; long N; - if ( updateValueParam< long >( d, names::N_channels, N, node ) ) + if ( update_value_param( d, names::N_channels.toString(), N, node ) ) { if ( N < 1 ) { @@ -150,7 +150,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d, } } - if ( updateValueParam< double >( d, names::delta_tau, t, node ) ) + if ( update_value_param( d, names::delta_tau.toString(), t, node ) ) { delta_tau_ = Time::ms( t ); reset = true; @@ -160,7 +160,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d, } } - if ( updateValueParam< double >( d, names::tau_max, t, node ) ) + if ( update_value_param( d, names::tau_max.toString(), t, node ) ) { tau_max_ = Time::ms( t ); reset = true; @@ -170,7 +170,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d, } } - if ( updateValueParam< double >( d, names::Tstart, t, node ) ) + if ( update_value_param( d, names::Tstart.toString(), t, node ) ) { Tstart_ = Time::ms( t ); reset = true; @@ -180,7 +180,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d, } } - if ( updateValueParam< double >( d, names::Tstop, t, node ) ) + if ( update_value_param( d, names::Tstop.toString(), t, node ) ) { Tstop_ = Time::ms( t ); reset = true; @@ -203,7 +203,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const DictionaryDatum& d, } void -nest::correlospinmatrix_detector::State_::set( const DictionaryDatum&, const Parameters_&, bool, Node* ) +nest::correlospinmatrix_detector::State_::set( const dictionary&, const Parameters_&, bool, Node* ) { } diff --git a/models/correlospinmatrix_detector.h b/models/correlospinmatrix_detector.h index 3c3f40f566..1f06b8d8a4 100644 --- a/models/correlospinmatrix_detector.h +++ b/models/correlospinmatrix_detector.h @@ -165,8 +165,8 @@ class correlospinmatrix_detector : public Node SignalType receives_signal() const; - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void calibrate_time( const TimeConverter& tc ); @@ -224,14 +224,14 @@ class correlospinmatrix_detector : public Node Parameters_& operator=( const Parameters_& ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set values from dicitonary. * @returns true if the state needs to be reset after a change of * binwidth or tau_max. */ - bool set( const DictionaryDatum&, const correlospinmatrix_detector&, Node* ); + bool set( const dictionary&, const correlospinmatrix_detector&, Node* ); }; // ------------------------------------------------------------ @@ -272,12 +272,12 @@ class correlospinmatrix_detector : public Node State_(); //!< initialize default state - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; /** * @param bool if true, force state reset */ - void set( const DictionaryDatum&, const Parameters_&, bool, Node* ); + void set( const dictionary&, const Parameters_&, bool, Node* ); void reset( const Parameters_& ); }; @@ -300,7 +300,7 @@ correlospinmatrix_detector::handles_test_event( SpikeEvent&, rport receptor_type } inline void -nest::correlospinmatrix_detector::get_status( DictionaryDatum& d ) const +nest::correlospinmatrix_detector::get_status( dictionary& d ) const { device_.get_status( d ); P_.get( d ); @@ -308,7 +308,7 @@ nest::correlospinmatrix_detector::get_status( DictionaryDatum& d ) const } inline void -nest::correlospinmatrix_detector::set_status( const DictionaryDatum& d ) +nest::correlospinmatrix_detector::set_status( const dictionary& d ) { Parameters_ ptmp = P_; const bool reset_required = ptmp.set( d, *this, this ); diff --git a/models/dc_generator.cpp b/models/dc_generator.cpp index a25bb03e00..ed9a6d3d9f 100644 --- a/models/dc_generator.cpp +++ b/models/dc_generator.cpp @@ -95,15 +95,15 @@ nest::dc_generator::Buffers_::Buffers_( const Buffers_&, dc_generator& n ) * ---------------------------------------------------------------- */ void -nest::dc_generator::Parameters_::get( DictionaryDatum& d ) const +nest::dc_generator::Parameters_::get( dictionary& d ) const { - def< double >( d, names::amplitude, amp_ ); + d[ names::amplitude.toString() ] = amp_; } void -nest::dc_generator::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::dc_generator::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::amplitude, amp_, node ); + update_value_param( d, names::amplitude.toString(), amp_, node ); } @@ -198,8 +198,8 @@ nest::dc_generator::set_data_from_stimulation_backend( std::vector< double >& in { throw BadParameterValue( "The size of the data for the dc_generator needs to be 1 [amplitude]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::amplitude ] = DoubleDatum( input_param[ 0 ] ); + dictionary d; + d[ names::amplitude.toString() ] = input_param[ 0 ]; ptmp.set( d, this ); } diff --git a/models/dc_generator.h b/models/dc_generator.h index 52c4f9edac..23b66b2532 100644 --- a/models/dc_generator.h +++ b/models/dc_generator.h @@ -103,8 +103,8 @@ class dc_generator : public StimulationDevice port handles_test_event( DataLoggingRequest&, rport ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; @@ -130,8 +130,8 @@ class dc_generator : public StimulationDevice Parameters_( const Parameters_& ); Parameters_& operator=( const Parameters_& p ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // ------------------------------------------------------------ @@ -200,16 +200,16 @@ dc_generator::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -dc_generator::get_status( DictionaryDatum& d ) const +dc_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -dc_generator::set_status( const DictionaryDatum& d ) +dc_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/diffusion_connection.h b/models/diffusion_connection.h index 46a23c90de..c1492bd1b4 100644 --- a/models/diffusion_connection.h +++ b/models/diffusion_connection.h @@ -141,9 +141,9 @@ class DiffusionConnection : public Connection< targetidentifierT > e(); } - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); void set_weight( double ) @@ -167,26 +167,26 @@ class DiffusionConnection : public Connection< targetidentifierT > template < typename targetidentifierT > void -DiffusionConnection< targetidentifierT >::get_status( DictionaryDatum& d ) const +DiffusionConnection< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::drift_factor, drift_factor_ ); - def< double >( d, names::diffusion_factor, diffusion_factor_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::drift_factor.toString() ] = drift_factor_; + d[ names::diffusion_factor.toString() ] = diffusion_factor_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -DiffusionConnection< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +DiffusionConnection< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // If the delay is set, we throw a BadProperty - if ( d->known( names::delay ) ) + if ( d.known( names::delay.toString() ) ) { throw BadProperty( "diffusion_connection has no delay." ); } // If the parameter weight is set, we throw a BadProperty - if ( d->known( names::weight ) ) + if ( d.known( names::weight.toString() ) ) { throw BadProperty( "Please use the parameters drift_factor and " @@ -194,8 +194,8 @@ DiffusionConnection< targetidentifierT >::set_status( const DictionaryDatum& d, } ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::drift_factor, drift_factor_ ); - updateValue< double >( d, names::diffusion_factor, diffusion_factor_ ); + d.update_value( names::drift_factor.toString(), drift_factor_ ); + d.update_value( names::diffusion_factor.toString(), diffusion_factor_ ); } } // namespace diff --git a/models/erfc_neuron.cpp b/models/erfc_neuron.cpp index ef92fa02bf..462423e5b7 100644 --- a/models/erfc_neuron.cpp +++ b/models/erfc_neuron.cpp @@ -26,17 +26,17 @@ namespace nest { void -gainfunction_erfc::get( DictionaryDatum& d ) const +gainfunction_erfc::get( dictionary& d ) const { - def< double >( d, names::theta, theta_ ); - def< double >( d, names::sigma, sigma_ ); + d[ names::theta.toString() ] = theta_; + d[ names::sigma.toString() ] = sigma_; } void -gainfunction_erfc::set( const DictionaryDatum& d, Node* node ) +gainfunction_erfc::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::theta, theta_, node ); - updateValueParam< double >( d, names::sigma, sigma_, node ); + update_value_param( d, names::theta.toString(), theta_, node ); + update_value_param( d, names::sigma.toString(), sigma_, node ); } /* diff --git a/models/erfc_neuron.h b/models/erfc_neuron.h index 789b79c23a..67f5be31ba 100644 --- a/models/erfc_neuron.h +++ b/models/erfc_neuron.h @@ -144,8 +144,8 @@ class gainfunction_erfc { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary bool operator()( RngPtr rng, double h ); }; diff --git a/models/gamma_sup_generator.cpp b/models/gamma_sup_generator.cpp index f5497d96c6..72b6b8cefc 100644 --- a/models/gamma_sup_generator.cpp +++ b/models/gamma_sup_generator.cpp @@ -136,30 +136,30 @@ nest::gamma_sup_generator::Parameters_::Parameters_() * ---------------------------------------------------------------- */ void -nest::gamma_sup_generator::Parameters_::get( DictionaryDatum& d ) const +nest::gamma_sup_generator::Parameters_::get( dictionary& d ) const { - ( *d )[ names::rate ] = rate_; - ( *d )[ names::gamma_shape ] = gamma_shape_; - ( *d )[ names::n_proc ] = n_proc_; + d[ names::rate.toString() ] = rate_; + d[ names::gamma_shape.toString() ] = gamma_shape_; + d[ names::n_proc.toString() ] = n_proc_; } void -nest::gamma_sup_generator::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::gamma_sup_generator::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< long >( d, names::gamma_shape, gamma_shape_, node ); + update_value_param( d, names::gamma_shape.toString(), gamma_shape_, node ); if ( gamma_shape_ < 1 ) { throw BadProperty( "The shape must be larger or equal 1" ); } - updateValueParam< double >( d, names::rate, rate_, node ); + update_value_param( d, names::rate.toString(), rate_, node ); if ( rate_ < 0.0 ) { throw BadProperty( "The rate must be larger than 0." ); } long n_proc_l = n_proc_; - updateValueParam< long >( d, names::n_proc, n_proc_l, node ); + update_value_param( d, names::n_proc.toString(), n_proc_l, node ); if ( n_proc_l < 1 ) { throw BadProperty( "The number of component processes cannot be smaller than one" ); @@ -292,10 +292,10 @@ nest::gamma_sup_generator::set_data_from_stimulation_backend( std::vector< doubl throw BadParameterValue( "The size of the data for the gamma_sup_generator needs to be 3 [gamma_shape, rate, n_proc]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::gamma_shape ] = DoubleDatum( lround( input_param[ 0 ] ) ); - ( *d )[ names::rate ] = DoubleDatum( input_param[ 1 ] ); - ( *d )[ names::n_proc ] = DoubleDatum( lround( input_param[ 2 ] ) ); + dictionary d; + d[ names::gamma_shape.toString() ] = lround( input_param[ 0 ] ); + d[ names::rate.toString() ] = input_param[ 1 ]; + d[ names::n_proc.toString() ] = lround( input_param[ 2 ] ); ptmp.set( d, this ); } diff --git a/models/gamma_sup_generator.h b/models/gamma_sup_generator.h index 5848836fea..053d569f47 100644 --- a/models/gamma_sup_generator.h +++ b/models/gamma_sup_generator.h @@ -100,8 +100,8 @@ class gamma_sup_generator : public StimulationDevice port send_test_event( Node&, rport, synindex, bool ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; void set_data_from_stimulation_backend( std::vector< double >& input_param ) override; @@ -150,8 +150,8 @@ class gamma_sup_generator : public StimulationDevice Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // ------------------------------------------------------------ @@ -234,14 +234,14 @@ gamma_sup_generator::send_test_event( Node& target, rport receptor_type, syninde } inline void -gamma_sup_generator::get_status( DictionaryDatum& d ) const +gamma_sup_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); } inline void -gamma_sup_generator::set_status( const DictionaryDatum& d ) +gamma_sup_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/gap_junction.h b/models/gap_junction.h index 715db1e918..b59131ea60 100644 --- a/models/gap_junction.h +++ b/models/gap_junction.h @@ -127,9 +127,9 @@ class GapJunction : public Connection< targetidentifierT > e(); } - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); void set_weight( double w ) @@ -149,28 +149,28 @@ class GapJunction : public Connection< targetidentifierT > template < typename targetidentifierT > void -GapJunction< targetidentifierT >::get_status( DictionaryDatum& d ) const +GapJunction< targetidentifierT >::get_status( dictionary& d ) const { // We have to include the delay here to prevent // errors due to internal calls of // this function in SLI/pyNEST ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -GapJunction< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +GapJunction< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // If the delay is set, we throw a BadProperty - if ( d->known( names::delay ) ) + if ( d.known( names::delay.toString() ) ) { throw BadProperty( "gap_junction connection has no delay" ); } ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); } } // namespace diff --git a/models/gauss_rate.cpp b/models/gauss_rate.cpp index 58dd29ed5b..1840b65c05 100644 --- a/models/gauss_rate.cpp +++ b/models/gauss_rate.cpp @@ -26,19 +26,19 @@ namespace nest { void -nonlinearities_gauss_rate::get( DictionaryDatum& d ) const +nonlinearities_gauss_rate::get( dictionary& d ) const { - def< double >( d, names::g, g_ ); - def< double >( d, names::mu, mu_ ); - def< double >( d, names::sigma, sigma_ ); + d[ names::g.toString() ] = g_; + d[ names::mu.toString() ] = mu_; + d[ names::sigma.toString() ] = sigma_; } void -nonlinearities_gauss_rate::set( const DictionaryDatum& d, Node* node ) +nonlinearities_gauss_rate::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::g, g_, node ); - updateValueParam< double >( d, names::mu, mu_, node ); - updateValueParam< double >( d, names::sigma, sigma_, node ); + update_value_param( d, names::g.toString(), g_, node ); + update_value_param( d, names::mu.toString(), mu_, node ); + update_value_param( d, names::sigma.toString(), sigma_, node ); } /* diff --git a/models/gauss_rate.h b/models/gauss_rate.h index 933651c583..a3ce00a1b0 100644 --- a/models/gauss_rate.h +++ b/models/gauss_rate.h @@ -144,8 +144,8 @@ class nonlinearities_gauss_rate { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* ); //!< Set values from dictionary double input( double h ); // non-linearity on input double mult_coupling_ex( double rate ); // factor of multiplicative coupling diff --git a/models/gif_cond_exp.cpp b/models/gif_cond_exp.cpp index 584166ecca..b6382cc937 100644 --- a/models/gif_cond_exp.cpp +++ b/models/gif_cond_exp.cpp @@ -194,64 +194,64 @@ nest::gif_cond_exp::State_& nest::gif_cond_exp::State_::operator=( const State_& * ---------------------------------------------------------------- */ void -nest::gif_cond_exp::Parameters_::get( DictionaryDatum& d ) const +nest::gif_cond_exp::Parameters_::get( dictionary& d ) const { - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::g_L, g_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::Delta_V, Delta_V_ ); - def< double >( d, names::V_T_star, V_T_star_ ); - def< double >( d, names::lambda_0, lambda_0_ * 1000.0 ); // convert to 1/s - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::tau_syn_ex, tau_synE_ ); - def< double >( d, names::tau_syn_in, tau_synI_ ); - def< double >( d, names::E_ex, E_ex_ ); - def< double >( d, names::E_in, E_in_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); + d[ names::I_e.toString() ] = I_e_; + d[ names::E_L.toString() ] = E_L_; + d[ names::g_L.toString() ] = g_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::Delta_V.toString() ] = Delta_V_; + d[ names::V_T_star.toString() ] = V_T_star_; + d[ names::lambda_0.toString() ] = lambda_0_ * 1000.0; // convert to 1/s + d[ names::t_ref.toString() ] = t_ref_; + d[ names::tau_syn_ex.toString() ] = tau_synE_; + d[ names::tau_syn_in.toString() ] = tau_synI_; + d[ names::E_ex.toString() ] = E_ex_; + d[ names::E_in.toString() ] = E_in_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad ); + d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad ); + d[ names::q_sfa.toString() ] = q_sfa_list_ad; ArrayDatum tau_stc_list_ad( tau_stc_ ); - def< ArrayDatum >( d, names::tau_stc, tau_stc_list_ad ); + d[ names::tau_stc.toString() ] = tau_stc_list_ad; ArrayDatum q_stc_list_ad( q_stc_ ); - def< ArrayDatum >( d, names::q_stc, q_stc_list_ad ); + d[ names::q_stc.toString() ] = q_stc_list_ad; } void -nest::gif_cond_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::gif_cond_exp::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::E_L, E_L_, node ); - updateValueParam< double >( d, names::g_L, g_L_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::Delta_V, Delta_V_, node ); - updateValueParam< double >( d, names::V_T_star, V_T_star_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::g_L.toString(), g_L_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); + update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); - if ( updateValueParam< double >( d, names::lambda_0, lambda_0_, node ) ) + if ( update_value_param( d, names::lambda_0.toString(), lambda_0_, node ) ) { lambda_0_ /= 1000.0; // convert to 1/ms } - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_synE_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI_, node ); - updateValueParam< double >( d, names::E_ex, E_ex_, node ); - updateValueParam< double >( d, names::E_in, E_in_, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_synE_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI_, node ); + update_value_param( d, names::E_ex.toString(), E_ex_, node ); + update_value_param( d, names::E_in.toString(), E_in_, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); - updateValue< std::vector< double > >( d, names::tau_sfa, tau_sfa_ ); - updateValue< std::vector< double > >( d, names::q_sfa, q_sfa_ ); - updateValue< std::vector< double > >( d, names::tau_stc, tau_stc_ ); - updateValue< std::vector< double > >( d, names::q_stc, q_stc_ ); + d.update_value( names::tau_sfa.toString(), tau_sfa_ ); + d.update_value( names::q_sfa.toString(), q_sfa_ ); + d.update_value( names::tau_stc.toString(), tau_stc_ ); + d.update_value( names::q_stc.toString(), q_stc_ ); if ( tau_sfa_.size() != q_sfa_.size() ) { @@ -313,21 +313,21 @@ nest::gif_cond_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::gif_cond_exp::State_::get( DictionaryDatum& d, const Parameters_& ) const +nest::gif_cond_exp::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::V_m, neuron_state_[ V_M ] ); // Membrane potential - def< double >( d, names::g_ex, neuron_state_[ G_EXC ] ); - def< double >( d, names::g_in, neuron_state_[ G_INH ] ); - def< double >( d, names::E_sfa, sfa_ ); // Adaptive threshold potential - def< double >( d, names::I_stc, stc_ ); // Spike-triggered current + d[ names::V_m.toString() ] = neuron_state_[ V_M ]; // Membrane potential + d[ names::g_ex.toString() ] = neuron_state_[ G_EXC ]; + d[ names::g_in.toString() ] = neuron_state_[ G_INH ]; + d[ names::E_sfa.toString() ] = sfa_; // Adaptive threshold potential + d[ names::I_stc.toString() ] = stc_; // Spike-triggered current } void -nest::gif_cond_exp::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::gif_cond_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, neuron_state_[ V_M ], node ); - updateValueParam< double >( d, names::g_ex, neuron_state_[ G_EXC ], node ); - updateValueParam< double >( d, names::g_in, neuron_state_[ G_INH ], node ); + update_value_param( d, names::V_m.toString(), neuron_state_[ V_M ], node ); + update_value_param( d, names::g_ex.toString(), neuron_state_[ G_EXC ], node ); + update_value_param( d, names::g_in.toString(), neuron_state_[ G_INH ], node ); } nest::gif_cond_exp::Buffers_::Buffers_( gif_cond_exp& n ) diff --git a/models/gif_cond_exp.h b/models/gif_cond_exp.h index 579ac8dc5d..5eae7623f7 100644 --- a/models/gif_cond_exp.h +++ b/models/gif_cond_exp.h @@ -242,8 +242,8 @@ class gif_cond_exp : public ArchivingNode port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -305,8 +305,8 @@ class gif_cond_exp : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // ---------------------------------------------------------------- @@ -343,8 +343,8 @@ class gif_cond_exp : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -476,16 +476,16 @@ gif_cond_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -gif_cond_exp::get_status( DictionaryDatum& d ) const +gif_cond_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -gif_cond_exp::set_status( const DictionaryDatum& d ) +gif_cond_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/gif_cond_exp_multisynapse.cpp b/models/gif_cond_exp_multisynapse.cpp index f6a16a1f15..24e876d74f 100644 --- a/models/gif_cond_exp_multisynapse.cpp +++ b/models/gif_cond_exp_multisynapse.cpp @@ -150,66 +150,66 @@ nest::gif_cond_exp_multisynapse::State_::State_( const Parameters_& p ) * ---------------------------------------------------------------- */ void -nest::gif_cond_exp_multisynapse::Parameters_::get( DictionaryDatum& d ) const +nest::gif_cond_exp_multisynapse::Parameters_::get( dictionary& d ) const { - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::g_L, g_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::Delta_V, Delta_V_ ); - def< double >( d, names::V_T_star, V_T_star_ ); - def< double >( d, names::lambda_0, lambda_0_ * 1000.0 ); // convert to 1/s - def< double >( d, names::t_ref, t_ref_ ); - def< size_t >( d, names::n_receptors, n_receptors() ); + d[ names::I_e.toString() ] = I_e_; + d[ names::E_L.toString() ] = E_L_; + d[ names::g_L.toString() ] = g_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::Delta_V.toString() ] = Delta_V_; + d[ names::V_T_star.toString() ] = V_T_star_; + d[ names::lambda_0.toString() ] = lambda_0_ * 1000.0; // convert to 1/s + d[ names::t_ref.toString() ] = t_ref_; + d[ names::n_receptors.toString() ] = n_receptors(); ArrayDatum E_rev_ad( E_rev_ ); - def< ArrayDatum >( d, names::E_rev, E_rev_ad ); - def< bool >( d, names::has_connections, has_connections_ ); - def< double >( d, names::gsl_error_tol, gsl_error_tol ); + d[ names::E_rev.toString() ] = E_rev_ad; + d[ names::has_connections.toString() ] = has_connections_; + d[ names::gsl_error_tol.toString() ] = gsl_error_tol; ArrayDatum tau_syn_ad( tau_syn_ ); - def< ArrayDatum >( d, names::tau_syn, tau_syn_ad ); + d[ names::tau_syn.toString() ] = tau_syn_ad; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad ); + d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad ); + d[ names::q_sfa.toString() ] = q_sfa_list_ad; ArrayDatum tau_stc_list_ad( tau_stc_ ); - def< ArrayDatum >( d, names::tau_stc, tau_stc_list_ad ); + d[ names::tau_stc.toString() ] = tau_stc_list_ad; ArrayDatum q_stc_list_ad( q_stc_ ); - def< ArrayDatum >( d, names::q_stc, q_stc_list_ad ); + d[ names::q_stc.toString() ] = q_stc_list_ad; } void -nest::gif_cond_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::gif_cond_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::E_L, E_L_, node ); - updateValueParam< double >( d, names::g_L, g_L_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::Delta_V, Delta_V_, node ); - updateValueParam< double >( d, names::V_T_star, V_T_star_, node ); - - if ( updateValueParam< double >( d, names::lambda_0, lambda_0_, node ) ) + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::g_L.toString(), g_L_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); + update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); + + if ( update_value_param( d, names::lambda_0.toString(), lambda_0_, node ) ) { lambda_0_ /= 1000.0; // convert to 1/ms } - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); - updateValue< std::vector< double > >( d, names::tau_sfa, tau_sfa_ ); - updateValue< std::vector< double > >( d, names::q_sfa, q_sfa_ ); - updateValue< std::vector< double > >( d, names::tau_stc, tau_stc_ ); - updateValue< std::vector< double > >( d, names::q_stc, q_stc_ ); + d.update_value( names::tau_sfa.toString(), tau_sfa_ ); + d.update_value( names::q_sfa.toString(), q_sfa_ ); + d.update_value( names::tau_stc.toString(), tau_stc_ ); + d.update_value( names::q_stc.toString(), q_stc_ ); const size_t old_n_receptors = n_receptors(); - bool Erev_flag = updateValue< std::vector< double > >( d, names::E_rev, E_rev_ ); - bool tau_flag = updateValue< std::vector< double > >( d, names::tau_syn, tau_syn_ ); + bool Erev_flag = d.update_value( names::E_rev.toString(), E_rev_ ); + bool tau_flag = d.update_value( names::tau_syn.toString(), tau_syn_ ); if ( Erev_flag || tau_flag ) { // receptor arrays have been modified if ( ( E_rev_.size() != old_n_receptors || tau_syn_.size() != old_n_receptors ) @@ -301,11 +301,11 @@ nest::gif_cond_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Nod } void -nest::gif_cond_exp_multisynapse::State_::get( DictionaryDatum& d, const Parameters_& ) const +nest::gif_cond_exp_multisynapse::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::V_m, y_[ V_M ] ); // Membrane potential - def< double >( d, names::E_sfa, sfa_ ); // Adaptive threshold potential - def< double >( d, names::I_stc, stc_ ); // Spike-triggered current + d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential + d[ names::E_sfa.toString() ] = sfa_; // Adaptive threshold potential + d[ names::I_stc.toString() ] = stc_; // Spike-triggered current std::vector< double >* g = new std::vector< double >(); @@ -315,13 +315,13 @@ nest::gif_cond_exp_multisynapse::State_::get( DictionaryDatum& d, const Paramete g->push_back( y_[ State_::G + State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ] ); } - ( *d )[ names::g ] = DoubleVectorDatum( g ); + d[ names::g.toString() ] = DoubleVectorDatum( g ); } void -nest::gif_cond_exp_multisynapse::State_::set( const DictionaryDatum& d, const Parameters_& p, Node* node ) +nest::gif_cond_exp_multisynapse::State_::set( const dictionary& d, const Parameters_& p, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); y_.resize( State_::NUMBER_OF_FIXED_STATES_ELEMENTS + State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * p.n_receptors(), 0.0 ); sfa_elems_.resize( p.tau_sfa_.size(), 0.0 ); diff --git a/models/gif_cond_exp_multisynapse.h b/models/gif_cond_exp_multisynapse.h index 4b300f12d7..028522e594 100644 --- a/models/gif_cond_exp_multisynapse.h +++ b/models/gif_cond_exp_multisynapse.h @@ -239,8 +239,8 @@ class gif_cond_exp_multisynapse : public ArchivingNode port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -305,8 +305,8 @@ class gif_cond_exp_multisynapse : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary //! Return the number of receptor ports inline size_t @@ -348,8 +348,8 @@ class gif_cond_exp_multisynapse : public ArchivingNode State_( const Parameters_& ); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // State_ @@ -481,16 +481,16 @@ gif_cond_exp_multisynapse::handles_test_event( DataLoggingRequest& dlr, rport re } inline void -gif_cond_exp_multisynapse::get_status( DictionaryDatum& d ) const +gif_cond_exp_multisynapse::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -gif_cond_exp_multisynapse::set_status( const DictionaryDatum& d ) +gif_cond_exp_multisynapse::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/gif_pop_psc_exp.cpp b/models/gif_pop_psc_exp.cpp index 1940fa6f5a..3c6c9f831d 100644 --- a/models/gif_pop_psc_exp.cpp +++ b/models/gif_pop_psc_exp.cpp @@ -107,50 +107,50 @@ nest::gif_pop_psc_exp::State_::State_() * ---------------------------------------------------------------- */ void -nest::gif_pop_psc_exp::Parameters_::get( DictionaryDatum& d ) const +nest::gif_pop_psc_exp::Parameters_::get( dictionary& d ) const { - def< long >( d, names::N, N_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::lambda_0, lambda_0_ ); - def< double >( d, names::Delta_V, Delta_V_ ); - def< long >( d, names::len_kernel, len_kernel_ ); - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::V_T_star, V_T_star_ ); - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::tau_syn_ex, tau_syn_ex_ ); - def< double >( d, names::tau_syn_in, tau_syn_in_ ); - def< bool >( d, "BinoRand", BinoRand_ ); + d[ names::N.toString() ] = N_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::C_m.toString() ] = c_m_; + d[ names::lambda_0.toString() ] = lambda_0_; + d[ names::Delta_V.toString() ] = Delta_V_; + d[ names::len_kernel.toString() ] = len_kernel_; + d[ names::I_e.toString() ] = I_e_; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::V_T_star.toString() ] = V_T_star_; + d[ names::E_L.toString() ] = E_L_; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::tau_syn_ex.toString() ] = tau_syn_ex_; + d[ names::tau_syn_in.toString() ] = tau_syn_in_; + d[ "BinoRand" ] = BinoRand_; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad ); + d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad ); + d[ names::q_sfa.toString() ] = q_sfa_list_ad; } void -nest::gif_pop_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::gif_pop_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< long >( d, names::N, N_, node ); - updateValueParam< double >( d, names::tau_m, tau_m_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::lambda_0, lambda_0_, node ); - updateValueParam< double >( d, names::Delta_V, Delta_V_, node ); - updateValueParam< long >( d, names::len_kernel, len_kernel_, node ); - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::V_T_star, V_T_star_, node ); - updateValueParam< double >( d, names::E_L, E_L_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_syn_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_syn_in_, node ); - updateValueParam< bool >( d, "BinoRand", BinoRand_, node ); - - updateValue< std::vector< double > >( d, names::tau_sfa, tau_sfa_ ); - updateValue< std::vector< double > >( d, names::q_sfa, q_sfa_ ); + update_value_param( d, names::N.toString(), N_, node ); + update_value_param( d, names::tau_m.toString(), tau_m_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::lambda_0.toString(), lambda_0_, node ); + update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); + update_value_param( d, names::len_kernel.toString(), len_kernel_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_syn_in_, node ); + update_value_param( d, "BinoRand", BinoRand_, node ); + + d.update_value( names::tau_sfa.toString(), tau_sfa_ ); + d.update_value( names::q_sfa.toString(), q_sfa_ ); if ( tau_sfa_.size() != q_sfa_.size() ) @@ -207,22 +207,22 @@ nest::gif_pop_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::gif_pop_psc_exp::State_::get( DictionaryDatum& d, const Parameters_& ) const +nest::gif_pop_psc_exp::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::V_m, V_m_ ); // Filtered version of input - def< long >( d, names::n_events, n_spikes_ ); // Number of generated spikes - def< double >( d, names::E_sfa, theta_hat_ ); // Adaptive threshold potential - def< double >( d, names::mean, n_expect_ ); - def< double >( d, names::I_syn_ex, I_syn_ex_ ); - def< double >( d, names::I_syn_in, I_syn_in_ ); + d[ names::V_m.toString() ] = V_m_; // Filtered version of input + d[ names::n_events.toString() ] = n_spikes_; // Number of generated spikes + d[ names::E_sfa.toString() ] = theta_hat_; // Adaptive threshold potential + d[ names::mean.toString() ] = n_expect_; + d[ names::I_syn_ex.toString() ] = I_syn_ex_; + d[ names::I_syn_in.toString() ] = I_syn_in_; } void -nest::gif_pop_psc_exp::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::gif_pop_psc_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, V_m_, node ); - updateValueParam< double >( d, names::I_syn_ex, I_syn_ex_, node ); - updateValueParam< double >( d, names::I_syn_in, I_syn_in_, node ); + update_value_param( d, names::V_m.toString(), V_m_, node ); + update_value_param( d, names::I_syn_ex.toString(), I_syn_ex_, node ); + update_value_param( d, names::I_syn_in.toString(), I_syn_in_, node ); initialized_ = false; // vectors of the state should be initialized with new parameter set. } diff --git a/models/gif_pop_psc_exp.h b/models/gif_pop_psc_exp.h index 68223515d2..70a9dc9e60 100644 --- a/models/gif_pop_psc_exp.h +++ b/models/gif_pop_psc_exp.h @@ -182,8 +182,8 @@ class gif_pop_psc_exp : public Node port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -254,9 +254,9 @@ class gif_pop_psc_exp : public Node /** Binomial random number switch */ bool BinoRand_; - Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + Parameters_(); //!< Sets default parameter values + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // ---------------------------------------------------------------- @@ -279,8 +279,8 @@ class gif_pop_psc_exp : public Node State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -445,7 +445,7 @@ gif_pop_psc_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_typ } inline void -gif_pop_psc_exp::get_status( DictionaryDatum& d ) const +gif_pop_psc_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); @@ -454,11 +454,11 @@ gif_pop_psc_exp::get_status( DictionaryDatum& d ) const // not from ArchivingNode, this call has been disabled here // (Node does not have a comparable method). // ArchivingNode::get_status(d); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -gif_pop_psc_exp::set_status( const DictionaryDatum& d ) +gif_pop_psc_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/gif_psc_exp.cpp b/models/gif_psc_exp.cpp index 4793238bc0..981f0793d6 100644 --- a/models/gif_psc_exp.cpp +++ b/models/gif_psc_exp.cpp @@ -107,58 +107,58 @@ nest::gif_psc_exp::State_::State_() * ---------------------------------------------------------------- */ void -nest::gif_psc_exp::Parameters_::get( DictionaryDatum& d ) const +nest::gif_psc_exp::Parameters_::get( dictionary& d ) const { - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::g_L, g_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::Delta_V, Delta_V_ ); - def< double >( d, names::V_T_star, V_T_star_ ); - def< double >( d, names::lambda_0, lambda_0_ * 1000.0 ); // convert to 1/s - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::tau_syn_ex, tau_ex_ ); - def< double >( d, names::tau_syn_in, tau_in_ ); + d[ names::I_e.toString() ] = I_e_; + d[ names::E_L.toString() ] = E_L_; + d[ names::g_L.toString() ] = g_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::Delta_V.toString() ] = Delta_V_; + d[ names::V_T_star.toString() ] = V_T_star_; + d[ names::lambda_0.toString() ] = lambda_0_ * 1000.0; // convert to 1/s + d[ names::t_ref.toString() ] = t_ref_; + d[ names::tau_syn_ex.toString() ] = tau_ex_; + d[ names::tau_syn_in.toString() ] = tau_in_; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad ); + d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad ); + d[ names::q_sfa.toString() ] = q_sfa_list_ad; ArrayDatum tau_stc_list_ad( tau_stc_ ); - def< ArrayDatum >( d, names::tau_stc, tau_stc_list_ad ); + d[ names::tau_stc.toString() ] = tau_stc_list_ad; ArrayDatum q_stc_list_ad( q_stc_ ); - def< ArrayDatum >( d, names::q_stc, q_stc_list_ad ); + d[ names::q_stc.toString() ] = q_stc_list_ad; } void -nest::gif_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::gif_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::E_L, E_L_, node ); - updateValueParam< double >( d, names::g_L, g_L_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::Delta_V, Delta_V_, node ); - updateValueParam< double >( d, names::V_T_star, V_T_star_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::g_L.toString(), g_L_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); + update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); - if ( updateValueParam< double >( d, names::lambda_0, lambda_0_, node ) ) + if ( update_value_param( d, names::lambda_0.toString(), lambda_0_, node ) ) { lambda_0_ /= 1000.0; // convert to 1/ms } - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_in_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); - updateValue< std::vector< double > >( d, names::tau_sfa, tau_sfa_ ); - updateValue< std::vector< double > >( d, names::q_sfa, q_sfa_ ); - updateValue< std::vector< double > >( d, names::tau_stc, tau_stc_ ); - updateValue< std::vector< double > >( d, names::q_stc, q_stc_ ); + d.update_value( names::tau_sfa.toString(), tau_sfa_ ); + d.update_value( names::q_sfa.toString(), q_sfa_ ); + d.update_value( names::tau_stc.toString(), tau_stc_ ); + d.update_value( names::q_stc.toString(), q_stc_ ); if ( tau_sfa_.size() != q_sfa_.size() ) { @@ -220,17 +220,17 @@ nest::gif_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::gif_psc_exp::State_::get( DictionaryDatum& d, const Parameters_& ) const +nest::gif_psc_exp::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::V_m, V_ ); // Membrane potential - def< double >( d, names::E_sfa, sfa_ ); // Adaptive threshold potential - def< double >( d, names::I_stc, stc_ ); // Spike-triggered current + d[ names::V_m.toString() ] = V_; // Membrane potential + d[ names::E_sfa.toString() ] = sfa_; // Adaptive threshold potential + d[ names::I_stc.toString() ] = stc_; // Spike-triggered current } void -nest::gif_psc_exp::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::gif_psc_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, V_, node ); + update_value_param( d, names::V_m.toString(), V_, node ); } nest::gif_psc_exp::Buffers_::Buffers_( gif_psc_exp& n ) diff --git a/models/gif_psc_exp.h b/models/gif_psc_exp.h index 3f2f7c9241..e880d21e08 100644 --- a/models/gif_psc_exp.h +++ b/models/gif_psc_exp.h @@ -224,8 +224,8 @@ class gif_psc_exp : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -283,8 +283,8 @@ class gif_psc_exp : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // ---------------------------------------------------------------- @@ -309,8 +309,8 @@ class gif_psc_exp : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -450,16 +450,16 @@ gif_psc_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -gif_psc_exp::get_status( DictionaryDatum& d ) const +gif_psc_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -gif_psc_exp::set_status( const DictionaryDatum& d ) +gif_psc_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/gif_psc_exp_multisynapse.cpp b/models/gif_psc_exp_multisynapse.cpp index 3c1a1cc158..07c011338e 100644 --- a/models/gif_psc_exp_multisynapse.cpp +++ b/models/gif_psc_exp_multisynapse.cpp @@ -104,59 +104,59 @@ nest::gif_psc_exp_multisynapse::State_::State_() * ---------------------------------------------------------------- */ void -nest::gif_psc_exp_multisynapse::Parameters_::get( DictionaryDatum& d ) const +nest::gif_psc_exp_multisynapse::Parameters_::get( dictionary& d ) const { - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::g_L, g_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::Delta_V, Delta_V_ ); - def< double >( d, names::V_T_star, V_T_star_ ); - def< double >( d, names::lambda_0, lambda_0_ * 1000.0 ); // convert to 1/s - def< double >( d, names::t_ref, t_ref_ ); - - def< int >( d, names::n_receptors, n_receptors_() ); - def< bool >( d, names::has_connections, has_connections_ ); + d[ names::I_e.toString() ] = I_e_; + d[ names::E_L.toString() ] = E_L_; + d[ names::g_L.toString() ] = g_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::Delta_V.toString() ] = Delta_V_; + d[ names::V_T_star.toString() ] = V_T_star_; + d[ names::lambda_0.toString() ] = lambda_0_ * 1000.0; // convert to 1/s + d[ names::t_ref.toString() ] = t_ref_; + + d[ names::n_receptors.toString() ] = n_receptors_(); + d[ names::has_connections.toString() ] = has_connections_; ArrayDatum tau_syn_ad( tau_syn_ ); - def< ArrayDatum >( d, names::tau_syn, tau_syn_ad ); + d[ names::tau_syn.toString() ] = tau_syn_ad; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad ); + d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad ); + d[ names::q_sfa.toString() ] = q_sfa_list_ad; ArrayDatum tau_stc_list_ad( tau_stc_ ); - def< ArrayDatum >( d, names::tau_stc, tau_stc_list_ad ); + d[ names::tau_stc.toString() ] = tau_stc_list_ad; ArrayDatum q_stc_list_ad( q_stc_ ); - def< ArrayDatum >( d, names::q_stc, q_stc_list_ad ); + d[ names::q_stc.toString() ] = q_stc_list_ad; } void -nest::gif_psc_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::gif_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::E_L, E_L_, node ); - updateValueParam< double >( d, names::g_L, g_L_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::Delta_V, Delta_V_, node ); - updateValueParam< double >( d, names::V_T_star, V_T_star_, node ); - - if ( updateValueParam< double >( d, names::lambda_0, lambda_0_, node ) ) + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::g_L.toString(), g_L_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); + update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); + + if ( update_value_param( d, names::lambda_0.toString(), lambda_0_, node ) ) { lambda_0_ /= 1000.0; // convert to 1/ms } - updateValueParam< double >( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); - updateValue< std::vector< double > >( d, names::tau_sfa, tau_sfa_ ); - updateValue< std::vector< double > >( d, names::q_sfa, q_sfa_ ); - updateValue< std::vector< double > >( d, names::tau_stc, tau_stc_ ); - updateValue< std::vector< double > >( d, names::q_stc, q_stc_ ); + d.update_value( names::tau_sfa.toString(), tau_sfa_ ); + d.update_value( names::q_sfa.toString(), q_sfa_ ); + d.update_value( names::tau_stc.toString(), tau_stc_ ); + d.update_value( names::q_stc.toString(), q_stc_ ); if ( tau_sfa_.size() != q_sfa_.size() ) { @@ -213,7 +213,7 @@ nest::gif_psc_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node } std::vector< double > tau_tmp; - if ( updateValue< std::vector< double > >( d, names::tau_syn, tau_tmp ) ) + if ( d.update_value( names::tau_syn.toString(), tau_tmp ) ) { if ( has_connections_ && tau_tmp.size() < tau_syn_.size() ) { @@ -235,17 +235,17 @@ nest::gif_psc_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node } void -nest::gif_psc_exp_multisynapse::State_::get( DictionaryDatum& d, const Parameters_& ) const +nest::gif_psc_exp_multisynapse::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::V_m, V_ ); // Membrane potential - def< double >( d, names::E_sfa, sfa_ ); // Adaptive threshold potential - def< double >( d, names::I_stc, stc_ ); // Spike-triggered current + d[ names::V_m.toString() ] = V_; // Membrane potential + d[ names::E_sfa.toString() ] = sfa_; // Adaptive threshold potential + d[ names::I_stc.toString() ] = stc_; // Spike-triggered current } void -nest::gif_psc_exp_multisynapse::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::gif_psc_exp_multisynapse::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, V_, node ); + update_value_param( d, names::V_m.toString(), V_, node ); } nest::gif_psc_exp_multisynapse::Buffers_::Buffers_( gif_psc_exp_multisynapse& n ) diff --git a/models/gif_psc_exp_multisynapse.h b/models/gif_psc_exp_multisynapse.h index d5f83e7194..4b347696c8 100644 --- a/models/gif_psc_exp_multisynapse.h +++ b/models/gif_psc_exp_multisynapse.h @@ -229,8 +229,8 @@ class gif_psc_exp_multisynapse : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -289,8 +289,8 @@ class gif_psc_exp_multisynapse : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary //! Return the number of receptor ports inline size_t @@ -321,8 +321,8 @@ class gif_psc_exp_multisynapse : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -449,16 +449,16 @@ gif_psc_exp_multisynapse::handles_test_event( DataLoggingRequest& dlr, rport rec } inline void -gif_psc_exp_multisynapse::get_status( DictionaryDatum& d ) const +gif_psc_exp_multisynapse::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -gif_psc_exp_multisynapse::set_status( const DictionaryDatum& d ) +gif_psc_exp_multisynapse::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/ginzburg_neuron.cpp b/models/ginzburg_neuron.cpp index 6ceb81de02..c38e507612 100644 --- a/models/ginzburg_neuron.cpp +++ b/models/ginzburg_neuron.cpp @@ -26,21 +26,21 @@ namespace nest { void -gainfunction_ginzburg::get( DictionaryDatum& d ) const +gainfunction_ginzburg::get( dictionary& d ) const { - def< double >( d, names::theta, theta_ ); - def< double >( d, names::c_1, c1_ ); - def< double >( d, names::c_2, c2_ ); - def< double >( d, names::c_3, c3_ ); + d[ names::theta.toString() ] = theta_; + d[ names::c_1.toString() ] = c1_; + d[ names::c_2.toString() ] = c2_; + d[ names::c_3.toString() ] = c3_; } void -gainfunction_ginzburg::set( const DictionaryDatum& d, Node* node ) +gainfunction_ginzburg::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::theta, theta_, node ); - updateValueParam< double >( d, names::c_1, c1_, node ); - updateValueParam< double >( d, names::c_2, c2_, node ); - updateValueParam< double >( d, names::c_3, c3_, node ); + update_value_param( d, names::theta.toString(), theta_, node ); + update_value_param( d, names::c_1.toString(), c1_, node ); + update_value_param( d, names::c_2.toString(), c2_, node ); + update_value_param( d, names::c_3.toString(), c3_, node ); } /* diff --git a/models/ginzburg_neuron.h b/models/ginzburg_neuron.h index 0b4e2094fa..90915de4bf 100644 --- a/models/ginzburg_neuron.h +++ b/models/ginzburg_neuron.h @@ -159,8 +159,8 @@ class gainfunction_ginzburg { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary bool operator()( RngPtr rng, double h ); }; diff --git a/models/glif_cond.cpp b/models/glif_cond.cpp index 33a21dc52f..da05038b50 100644 --- a/models/glif_cond.cpp +++ b/models/glif_cond.cpp @@ -188,47 +188,47 @@ nest::glif_cond::State_::State_( const Parameters_& p ) * ---------------------------------------------------------------- */ void -nest::glif_cond::Parameters_::get( DictionaryDatum& d ) const +nest::glif_cond::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_th, th_inf_ + E_L_ ); - def< double >( d, names::g_m, G_ ); - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::C_m, C_m_ ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::V_reset, V_reset_ + E_L_ ); - - def< double >( d, names::th_spike_add, th_spike_add_ ); - def< double >( d, names::th_spike_decay, th_spike_decay_ ); - def< double >( d, names::voltage_reset_fraction, voltage_reset_fraction_ ); - def< double >( d, names::voltage_reset_add, voltage_reset_add_ ); - - def< double >( d, names::th_voltage_index, th_voltage_index_ ); - def< double >( d, names::th_voltage_decay, th_voltage_decay_ ); - - def< std::vector< double > >( d, names::asc_init, asc_init_ ); - def< std::vector< double > >( d, names::asc_decay, asc_decay_ ); - def< std::vector< double > >( d, names::asc_amps, asc_amps_ ); - def< std::vector< double > >( d, names::asc_r, asc_r_ ); + d[ names::V_th.toString() ] = th_inf_ + E_L_; + d[ names::g_m.toString() ] = G_; + d[ names::E_L.toString() ] = E_L_; + d[ names::C_m.toString() ] = C_m_; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::V_reset.toString() ] = V_reset_ + E_L_; + + d[ names::th_spike_add.toString() ] = th_spike_add_; + d[ names::th_spike_decay.toString() ] = th_spike_decay_; + d[ names::voltage_reset_fraction.toString() ] = voltage_reset_fraction_; + d[ names::voltage_reset_add.toString() ] = voltage_reset_add_; + + d[ names::th_voltage_index.toString() ] = th_voltage_index_; + d[ names::th_voltage_decay.toString() ] = th_voltage_decay_; + + d[ names::asc_init.toString() ] = asc_init_; + d[ names::asc_decay.toString() ] = asc_decay_; + d[ names::asc_amps.toString() ] = asc_amps_; + d[ names::asc_r.toString() ] = asc_r_; ArrayDatum tau_syn_ad( tau_syn_ ); - def< ArrayDatum >( d, names::tau_syn, tau_syn_ad ); + d[ names::tau_syn.toString() ] = tau_syn_ad; ArrayDatum E_rev_ad( E_rev_ ); - def< ArrayDatum >( d, names::E_rev, E_rev_ad ); - def< bool >( d, names::has_connections, has_connections_ ); - def< bool >( d, names::spike_dependent_threshold, has_theta_spike_ ); - def< bool >( d, names::after_spike_currents, has_asc_ ); - def< bool >( d, names::adapting_threshold, has_theta_voltage_ ); + d[ names::E_rev.toString() ] = E_rev_ad; + d[ names::has_connections.toString() ] = has_connections_; + d[ names::spike_dependent_threshold.toString() ] = has_theta_spike_; + d[ names::after_spike_currents.toString() ] = has_asc_; + d[ names::adapting_threshold.toString() ] = has_theta_voltage_; } double -nest::glif_cond::Parameters_::set( const DictionaryDatum& d ) +nest::glif_cond::Parameters_::set( const dictionary& d ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValue< double >( d, names::E_L, E_L_ ); + d.update_value( names::E_L.toString(), E_L_ ); const double delta_EL = E_L_ - ELold; - if ( updateValue< double >( d, names::V_reset, V_reset_ ) ) + if ( d.update_value( names::V_reset.toString(), V_reset_ ) ) { V_reset_ -= E_L_; } @@ -237,7 +237,7 @@ nest::glif_cond::Parameters_::set( const DictionaryDatum& d ) V_reset_ -= delta_EL; } - if ( updateValue< double >( d, names::V_th, th_inf_ ) ) + if ( d.update_value( names::V_th.toString(), th_inf_ ) ) { th_inf_ -= E_L_; } @@ -246,27 +246,27 @@ nest::glif_cond::Parameters_::set( const DictionaryDatum& d ) th_inf_ -= delta_EL; } - updateValue< double >( d, names::g_m, G_ ); - updateValue< double >( d, names::C_m, C_m_ ); - updateValue< double >( d, names::t_ref, t_ref_ ); + d.update_value( names::g_m.toString(), G_ ); + d.update_value( names::C_m.toString(), C_m_ ); + d.update_value( names::t_ref.toString(), t_ref_ ); - updateValue< double >( d, names::th_spike_add, th_spike_add_ ); - updateValue< double >( d, names::th_spike_decay, th_spike_decay_ ); - updateValue< double >( d, names::voltage_reset_fraction, voltage_reset_fraction_ ); - updateValue< double >( d, names::voltage_reset_add, voltage_reset_add_ ); + d.update_value( names::th_spike_add.toString(), th_spike_add_ ); + d.update_value( names::th_spike_decay.toString(), th_spike_decay_ ); + d.update_value( names::voltage_reset_fraction.toString(), voltage_reset_fraction_ ); + d.update_value( names::voltage_reset_add.toString(), voltage_reset_add_ ); - updateValue< double >( d, names::th_voltage_index, th_voltage_index_ ); - updateValue< double >( d, names::th_voltage_decay, th_voltage_decay_ ); + d.update_value( names::th_voltage_index.toString(), th_voltage_index_ ); + d.update_value( names::th_voltage_decay.toString(), th_voltage_decay_ ); - updateValue< std::vector< double > >( d, names::asc_init, asc_init_ ); - updateValue< std::vector< double > >( d, names::asc_decay, asc_decay_ ); - updateValue< std::vector< double > >( d, names::asc_amps, asc_amps_ ); - updateValue< std::vector< double > >( d, names::asc_r, asc_r_ ); + d.update_value( names::asc_init.toString(), asc_init_ ); + d.update_value( names::asc_decay.toString(), asc_decay_ ); + d.update_value( names::asc_amps.toString(), asc_amps_ ); + d.update_value( names::asc_r.toString(), asc_r_ ); // set model mechanisms - updateValue< bool >( d, names::spike_dependent_threshold, has_theta_spike_ ); - updateValue< bool >( d, names::after_spike_currents, has_asc_ ); - updateValue< bool >( d, names::adapting_threshold, has_theta_voltage_ ); + d.update_value( names::spike_dependent_threshold.toString(), has_theta_spike_ ); + d.update_value( names::after_spike_currents.toString(), has_asc_ ); + d.update_value( names::adapting_threshold.toString(), has_theta_voltage_ ); // check model mechanisms parameter if ( not( ( not has_theta_spike_ and not has_asc_ and not has_theta_voltage_ ) or // glif1 @@ -353,8 +353,8 @@ nest::glif_cond::Parameters_::set( const DictionaryDatum& d ) } const size_t old_n_receptors = this->n_receptors_(); - bool tau_flag = updateValue< std::vector< double > >( d, names::tau_syn, tau_syn_ ); - bool Erev_flag = updateValue< std::vector< double > >( d, names::E_rev, E_rev_ ); + bool tau_flag = d.update_value( names::tau_syn.toString(), tau_syn_ ); + bool Erev_flag = d.update_value( names::E_rev.toString(), E_rev_ ); // receptor arrays have been modified if ( tau_flag || Erev_flag ) @@ -387,10 +387,10 @@ nest::glif_cond::Parameters_::set( const DictionaryDatum& d ) } void -nest::glif_cond::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::glif_cond::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, y_[ V_M ] + p.E_L_ ); - def< std::vector< double > >( d, names::ASCurrents, ASCurrents_ ); + d[ names::V_m.toString() ] = y_[ V_M ] + p.E_L_; + d[ names::ASCurrents.toString() ] = ASCurrents_; std::vector< double >* dg = new std::vector< double >(); std::vector< double >* g = new std::vector< double >(); @@ -405,14 +405,14 @@ nest::glif_cond::State_::get( DictionaryDatum& d, const Parameters_& p ) const + ( i * State_::NUMBER_OF_STATES_ELEMENTS_PER_RECEPTOR ) ] ); } - ( *d )[ names::dg ] = DoubleVectorDatum( dg ); - ( *d )[ names::g ] = DoubleVectorDatum( g ); + d[ names::dg.toString() ] = DoubleVectorDatum( dg ); + d[ names::g.toString() ] = DoubleVectorDatum( g ); } void -nest::glif_cond::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL ) +nest::glif_cond::State_::set( const dictionary& d, const Parameters_& p, double delta_EL ) { - if ( updateValue< double >( d, names::V_m, y_[ V_M ] ) ) + if ( d.update_value( names::V_m.toString(), y_[ V_M ] ) ) { y_[ V_M ] -= p.E_L_; } @@ -421,7 +421,7 @@ nest::glif_cond::State_::set( const DictionaryDatum& d, const Parameters_& p, do y_[ V_M ] -= delta_EL; } - bool asc_flag = updateValue< std::vector< double > >( d, names::ASCurrents, ASCurrents_ ); + bool asc_flag = d.update_value( names::ASCurrents.toString(), ASCurrents_ ); if ( asc_flag and not p.has_asc_ ) { throw BadProperty( "After spike currents are not supported or settable in the current model mechanisms." ); @@ -437,12 +437,12 @@ nest::glif_cond::State_::set( const DictionaryDatum& d, const Parameters_& p, do } } - if ( updateValue< double >( d, names::threshold_spike, threshold_spike_ ) and not p.has_theta_spike_ ) + if ( d.update_value( names::threshold_spike.toString(), threshold_spike_ ) and not p.has_theta_spike_ ) { throw BadProperty( "Threshold spike component is not supported or settable in the current model mechanisms." ); } - if ( updateValue< double >( d, names::threshold_voltage, threshold_voltage_ ) and not p.has_theta_voltage_ ) + if ( d.update_value( names::threshold_voltage.toString(), threshold_voltage_ ) and not p.has_theta_voltage_ ) { throw BadProperty( "Threshold voltage component is not supported or settable in the current model mechanisms." ); } diff --git a/models/glif_cond.h b/models/glif_cond.h index 74acb755e5..7d0e76a239 100644 --- a/models/glif_cond.h +++ b/models/glif_cond.h @@ -218,8 +218,8 @@ class glif_cond : public nest::ArchivingNode nest::port handles_test_event( nest::CurrentEvent&, nest::port ); nest::port handles_test_event( nest::DataLoggingRequest&, nest::port ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: //! Reset internal buffers of neuron. @@ -278,8 +278,8 @@ class glif_cond : public nest::ArchivingNode Parameters_(); - void get( DictionaryDatum& ) const; - double set( const DictionaryDatum& ); + void get( dictionary& ) const; + double set( const dictionary& ); }; @@ -320,8 +320,8 @@ class glif_cond : public nest::ArchivingNode State_( const Parameters_& ); - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, double ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, double ); }; @@ -467,7 +467,7 @@ nest::glif_cond::handles_test_event( nest::DataLoggingRequest& dlr, nest::port r } inline void -glif_cond::get_status( DictionaryDatum& d ) const +glif_cond::get_status( dictionary& d ) const { // get our own parameter and state data P_.get( d ); @@ -476,11 +476,11 @@ glif_cond::get_status( DictionaryDatum& d ) const // get information managed by parent class ArchivingNode::get_status( d ); - ( *d )[ nest::names::recordables ] = recordablesMap_.get_list(); + d[ nest::names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -glif_cond::set_status( const DictionaryDatum& d ) +glif_cond::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d ); // throws if BadProperty diff --git a/models/glif_psc.cpp b/models/glif_psc.cpp index 41d8fa260a..b69ff08cb9 100644 --- a/models/glif_psc.cpp +++ b/models/glif_psc.cpp @@ -118,45 +118,45 @@ nest::glif_psc::State_::State_( const Parameters_& p ) * ---------------------------------------------------------------- */ void -nest::glif_psc::Parameters_::get( DictionaryDatum& d ) const +nest::glif_psc::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_th, th_inf_ + E_L_ ); - def< double >( d, names::g, G_ ); - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::C_m, C_m_ ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::V_reset, V_reset_ + E_L_ ); - - def< double >( d, names::th_spike_add, th_spike_add_ ); - def< double >( d, names::th_spike_decay, th_spike_decay_ ); - def< double >( d, names::voltage_reset_fraction, voltage_reset_fraction_ ); - def< double >( d, names::voltage_reset_add, voltage_reset_add_ ); - - def< double >( d, names::th_voltage_index, th_voltage_index_ ); - def< double >( d, names::th_voltage_decay, th_voltage_decay_ ); - - def< std::vector< double > >( d, names::asc_init, asc_init_ ); - def< std::vector< double > >( d, names::asc_decay, asc_decay_ ); - def< std::vector< double > >( d, names::asc_amps, asc_amps_ ); - def< std::vector< double > >( d, names::asc_r, asc_r_ ); + d[ names::V_th.toString() ] = th_inf_ + E_L_; + d[ names::g.toString() ] = G_; + d[ names::E_L.toString() ] = E_L_; + d[ names::C_m.toString() ] = C_m_; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::V_reset.toString() ] = V_reset_ + E_L_; + + d[ names::th_spike_add.toString() ] = th_spike_add_; + d[ names::th_spike_decay.toString() ] = th_spike_decay_; + d[ names::voltage_reset_fraction.toString() ] = voltage_reset_fraction_; + d[ names::voltage_reset_add.toString() ] = voltage_reset_add_; + + d[ names::th_voltage_index.toString() ] = th_voltage_index_; + d[ names::th_voltage_decay.toString() ] = th_voltage_decay_; + + d[ names::asc_init.toString() ] = asc_init_; + d[ names::asc_decay.toString() ] = asc_decay_; + d[ names::asc_amps.toString() ] = asc_amps_; + d[ names::asc_r.toString() ] = asc_r_; ArrayDatum tau_syn_ad( tau_syn_ ); - def< ArrayDatum >( d, names::tau_syn, tau_syn_ad ); - def< bool >( d, names::has_connections, has_connections_ ); - def< bool >( d, names::spike_dependent_threshold, has_theta_spike_ ); - def< bool >( d, names::after_spike_currents, has_asc_ ); - def< bool >( d, names::adapting_threshold, has_theta_voltage_ ); + d[ names::tau_syn.toString() ] = tau_syn_ad; + d[ names::has_connections.toString() ] = has_connections_; + d[ names::spike_dependent_threshold.toString() ] = has_theta_spike_; + d[ names::after_spike_currents.toString() ] = has_asc_; + d[ names::adapting_threshold.toString() ] = has_theta_voltage_; } double -nest::glif_psc::Parameters_::set( const DictionaryDatum& d ) +nest::glif_psc::Parameters_::set( const dictionary& d ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValue< double >( d, names::E_L, E_L_ ); + d.update_value( names::E_L.toString(), E_L_ ); const double delta_EL = E_L_ - ELold; - if ( updateValue< double >( d, names::V_reset, V_reset_ ) ) + if ( d.update_value( names::V_reset.toString(), V_reset_ ) ) { V_reset_ -= E_L_; } @@ -165,7 +165,7 @@ nest::glif_psc::Parameters_::set( const DictionaryDatum& d ) V_reset_ -= delta_EL; } - if ( updateValue< double >( d, names::V_th, th_inf_ ) ) + if ( d.update_value( names::V_th.toString(), th_inf_ ) ) { th_inf_ -= E_L_; } @@ -174,27 +174,27 @@ nest::glif_psc::Parameters_::set( const DictionaryDatum& d ) th_inf_ -= delta_EL; } - updateValue< double >( d, names::g, G_ ); - updateValue< double >( d, names::C_m, C_m_ ); - updateValue< double >( d, names::t_ref, t_ref_ ); + d.update_value( names::g.toString(), G_ ); + d.update_value( names::C_m.toString(), C_m_ ); + d.update_value( names::t_ref.toString(), t_ref_ ); - updateValue< double >( d, names::th_spike_add, th_spike_add_ ); - updateValue< double >( d, names::th_spike_decay, th_spike_decay_ ); - updateValue< double >( d, names::voltage_reset_fraction, voltage_reset_fraction_ ); - updateValue< double >( d, names::voltage_reset_add, voltage_reset_add_ ); + d.update_value( names::th_spike_add.toString(), th_spike_add_ ); + d.update_value( names::th_spike_decay.toString(), th_spike_decay_ ); + d.update_value( names::voltage_reset_fraction.toString(), voltage_reset_fraction_ ); + d.update_value( names::voltage_reset_add.toString(), voltage_reset_add_ ); - updateValue< double >( d, names::th_voltage_index, th_voltage_index_ ); - updateValue< double >( d, names::th_voltage_decay, th_voltage_decay_ ); + d.update_value( names::th_voltage_index.toString(), th_voltage_index_ ); + d.update_value( names::th_voltage_decay.toString(), th_voltage_decay_ ); - updateValue< std::vector< double > >( d, names::asc_init, asc_init_ ); - updateValue< std::vector< double > >( d, names::asc_decay, asc_decay_ ); - updateValue< std::vector< double > >( d, names::asc_amps, asc_amps_ ); - updateValue< std::vector< double > >( d, names::asc_r, asc_r_ ); + d.update_value( names::asc_init.toString(), asc_init_ ); + d.update_value( names::asc_decay.toString(), asc_decay_ ); + d.update_value( names::asc_amps.toString(), asc_amps_ ); + d.update_value( names::asc_r.toString(), asc_r_ ); // set model mechanisms - updateValue< bool >( d, names::spike_dependent_threshold, has_theta_spike_ ); - updateValue< bool >( d, names::after_spike_currents, has_asc_ ); - updateValue< bool >( d, names::adapting_threshold, has_theta_voltage_ ); + d.update_value( names::spike_dependent_threshold.toString(), has_theta_spike_ ); + d.update_value( names::after_spike_currents.toString(), has_asc_ ); + d.update_value( names::adapting_threshold.toString(), has_theta_voltage_ ); // check model mechanisms parameter if ( not( ( not has_theta_spike_ and not has_asc_ and not has_theta_voltage_ ) or // glif1 @@ -281,7 +281,7 @@ nest::glif_psc::Parameters_::set( const DictionaryDatum& d ) } const size_t old_n_receptors = this->n_receptors_(); - if ( updateValue< std::vector< double > >( d, names::tau_syn, tau_syn_ ) ) + if ( d.update_value( names::tau_syn.toString(), tau_syn_ ) ) { if ( this->n_receptors_() != old_n_receptors && has_connections_ == true ) { @@ -302,18 +302,18 @@ nest::glif_psc::Parameters_::set( const DictionaryDatum& d ) } void -nest::glif_psc::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::glif_psc::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, U_ + p.E_L_ ); - def< std::vector< double > >( d, names::ASCurrents, ASCurrents_ ); - def< double >( d, names::threshold_spike, threshold_spike_ ); - def< double >( d, names::threshold_voltage, threshold_voltage_ ); + d[ names::V_m.toString() ] = U_ + p.E_L_; + d[ names::ASCurrents.toString() ] = ASCurrents_; + d[ names::threshold_spike.toString() ] = threshold_spike_; + d[ names::threshold_voltage.toString() ] = threshold_voltage_; } void -nest::glif_psc::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL ) +nest::glif_psc::State_::set( const dictionary& d, const Parameters_& p, double delta_EL ) { - if ( updateValue< double >( d, names::V_m, U_ ) ) + if ( d.update_value( names::V_m.toString(), U_ ) ) { U_ -= p.E_L_; } @@ -322,7 +322,7 @@ nest::glif_psc::State_::set( const DictionaryDatum& d, const Parameters_& p, dou U_ -= delta_EL; } - bool asc_flag = updateValue< std::vector< double > >( d, names::ASCurrents, ASCurrents_ ); + bool asc_flag = d.update_value( names::ASCurrents.toString(), ASCurrents_ ); if ( asc_flag and not p.has_asc_ ) { throw BadProperty( "After spike currents are not supported or settable in the current model mechanisms." ); @@ -338,12 +338,12 @@ nest::glif_psc::State_::set( const DictionaryDatum& d, const Parameters_& p, dou } } - if ( updateValue< double >( d, names::threshold_spike, threshold_spike_ ) and not p.has_theta_spike_ ) + if ( d.update_value( names::threshold_spike.toString(), threshold_spike_ ) and not p.has_theta_spike_ ) { throw BadProperty( "Threshold spike component is not supported or settable in the current model mechanisms." ); } - if ( updateValue< double >( d, names::threshold_voltage, threshold_voltage_ ) and not p.has_theta_voltage_ ) + if ( d.update_value( names::threshold_voltage.toString(), threshold_voltage_ ) and not p.has_theta_voltage_ ) { throw BadProperty( "Threshold voltage component is not supported or settable in the current model mechanisms." ); } diff --git a/models/glif_psc.h b/models/glif_psc.h index 176b42567e..07bbfd53c3 100644 --- a/models/glif_psc.h +++ b/models/glif_psc.h @@ -213,8 +213,8 @@ class glif_psc : public nest::ArchivingNode nest::port handles_test_event( nest::CurrentEvent&, nest::port ); nest::port handles_test_event( nest::DataLoggingRequest&, nest::port ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: //! Reset internal buffers of neuron. @@ -268,8 +268,8 @@ class glif_psc : public nest::ArchivingNode Parameters_(); - void get( DictionaryDatum& ) const; - double set( const DictionaryDatum& ); + void get( dictionary& ) const; + double set( const dictionary& ); }; struct State_ @@ -288,8 +288,8 @@ class glif_psc : public nest::ArchivingNode State_( const Parameters_& ); - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, double ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, double ); }; @@ -420,7 +420,7 @@ nest::glif_psc::handles_test_event( nest::DataLoggingRequest& dlr, nest::port re } inline void -glif_psc::get_status( DictionaryDatum& d ) const +glif_psc::get_status( dictionary& d ) const { // get our own parameter and state data P_.get( d ); @@ -429,11 +429,11 @@ glif_psc::get_status( DictionaryDatum& d ) const // get information managed by parent class ArchivingNode::get_status( d ); - ( *d )[ nest::names::recordables ] = recordablesMap_.get_list(); + d[ nest::names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -glif_psc::set_status( const DictionaryDatum& d ) +glif_psc::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d ); // throws if BadProperty diff --git a/models/hh_cond_beta_gap_traub.cpp b/models/hh_cond_beta_gap_traub.cpp index 1303d48e1a..a11ba50855 100644 --- a/models/hh_cond_beta_gap_traub.cpp +++ b/models/hh_cond_beta_gap_traub.cpp @@ -227,45 +227,45 @@ nest::hh_cond_beta_gap_traub::State_& nest::hh_cond_beta_gap_traub::State_::oper * ---------------------------------------------------------------- */ void -nest::hh_cond_beta_gap_traub::Parameters_::get( DictionaryDatum& d ) const +nest::hh_cond_beta_gap_traub::Parameters_::get( dictionary& d ) const { - def< double >( d, names::g_Na, g_Na ); - def< double >( d, names::g_K, g_K ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::E_Na, E_Na ); - def< double >( d, names::E_K, E_K ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_T, V_T ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::tau_rise_ex, tau_rise_ex ); - def< double >( d, names::tau_decay_ex, tau_decay_ex ); - def< double >( d, names::tau_rise_in, tau_rise_in ); - def< double >( d, names::tau_decay_in, tau_decay_in ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::I_e, I_e ); + d[ names::g_Na.toString() ] = g_Na; + d[ names::g_K.toString() ] = g_K; + d[ names::g_L.toString() ] = g_L; + d[ names::C_m.toString() ] = C_m; + d[ names::E_Na.toString() ] = E_Na; + d[ names::E_K.toString() ] = E_K; + d[ names::E_L.toString() ] = E_L; + d[ names::V_T.toString() ] = V_T; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::tau_rise_ex.toString() ] = tau_rise_ex; + d[ names::tau_decay_ex.toString() ] = tau_decay_ex; + d[ names::tau_rise_in.toString() ] = tau_rise_in; + d[ names::tau_decay_in.toString() ] = tau_decay_in; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::I_e.toString() ] = I_e; } void -nest::hh_cond_beta_gap_traub::Parameters_::set( const DictionaryDatum& d ) +nest::hh_cond_beta_gap_traub::Parameters_::set( const dictionary& d ) { - updateValue< double >( d, names::g_Na, g_Na ); - updateValue< double >( d, names::g_K, g_K ); - updateValue< double >( d, names::g_L, g_L ); - updateValue< double >( d, names::C_m, C_m ); - updateValue< double >( d, names::E_Na, E_Na ); - updateValue< double >( d, names::E_K, E_K ); - updateValue< double >( d, names::E_L, E_L ); - updateValue< double >( d, names::V_T, V_T ); - updateValue< double >( d, names::E_ex, E_ex ); - updateValue< double >( d, names::E_in, E_in ); - updateValue< double >( d, names::tau_rise_ex, tau_rise_ex ); - updateValue< double >( d, names::tau_decay_ex, tau_decay_ex ); - updateValue< double >( d, names::tau_rise_in, tau_rise_in ); - updateValue< double >( d, names::tau_decay_in, tau_decay_in ); - updateValue< double >( d, names::t_ref, t_ref_ ); - updateValue< double >( d, names::I_e, I_e ); + d.update_value( names::g_Na.toString(), g_Na ); + d.update_value( names::g_K.toString(), g_K ); + d.update_value( names::g_L.toString(), g_L ); + d.update_value( names::C_m.toString(), C_m ); + d.update_value( names::E_Na.toString(), E_Na ); + d.update_value( names::E_K.toString(), E_K ); + d.update_value( names::E_L.toString(), E_L ); + d.update_value( names::V_T.toString(), V_T ); + d.update_value( names::E_ex.toString(), E_ex ); + d.update_value( names::E_in.toString(), E_in ); + d.update_value( names::tau_rise_ex.toString(), tau_rise_ex ); + d.update_value( names::tau_decay_ex.toString(), tau_decay_ex ); + d.update_value( names::tau_rise_in.toString(), tau_rise_in ); + d.update_value( names::tau_decay_in.toString(), tau_decay_in ); + d.update_value( names::t_ref.toString(), t_ref_ ); + d.update_value( names::I_e.toString(), I_e ); if ( C_m <= 0 ) { @@ -289,21 +289,21 @@ nest::hh_cond_beta_gap_traub::Parameters_::set( const DictionaryDatum& d ) } void -nest::hh_cond_beta_gap_traub::State_::get( DictionaryDatum& d ) const +nest::hh_cond_beta_gap_traub::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); // Membrane potential - def< double >( d, names::Act_m, y_[ HH_M ] ); - def< double >( d, names::Inact_h, y_[ HH_H ] ); - def< double >( d, names::Act_n, y_[ HH_N ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential + d[ names::Act_m.toString() ] = y_[ HH_M ]; + d[ names::Inact_h.toString() ] = y_[ HH_H ]; + d[ names::Act_n.toString() ] = y_[ HH_N ]; } void -nest::hh_cond_beta_gap_traub::State_::set( const DictionaryDatum& d, const Parameters_& ) +nest::hh_cond_beta_gap_traub::State_::set( const dictionary& d, const Parameters_& ) { - updateValue< double >( d, names::V_m, y_[ V_M ] ); - updateValue< double >( d, names::Act_m, y_[ HH_M ] ); - updateValue< double >( d, names::Inact_h, y_[ HH_H ] ); - updateValue< double >( d, names::Act_n, y_[ HH_N ] ); + d.update_value( names::V_m.toString(), y_[ V_M ] ); + d.update_value( names::Act_m.toString(), y_[ HH_M ] ); + d.update_value( names::Inact_h.toString(), y_[ HH_H ] ); + d.update_value( names::Act_n.toString(), y_[ HH_N ] ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_cond_beta_gap_traub.h b/models/hh_cond_beta_gap_traub.h index 2a90c3f473..624cc4d911 100644 --- a/models/hh_cond_beta_gap_traub.h +++ b/models/hh_cond_beta_gap_traub.h @@ -208,8 +208,8 @@ class hh_cond_beta_gap_traub : public ArchivingNode { } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -262,8 +262,8 @@ class hh_cond_beta_gap_traub : public ArchivingNode Parameters_(); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum& ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary& ); //!< Set values from dicitonary }; public: @@ -298,8 +298,8 @@ class hh_cond_beta_gap_traub : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_& ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_& ); }; // Variables class ------------------------------------------------------- @@ -466,19 +466,19 @@ hh_cond_beta_gap_traub::handles_test_event( GapJunctionEvent&, rport receptor_ty } inline void -hh_cond_beta_gap_traub::get_status( DictionaryDatum& d ) const +hh_cond_beta_gap_traub::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); - def< double >( d, names::t_spike, get_spiketime_ms() ); + d[ names::t_spike.toString() ] = get_spiketime_ms(); } inline void -hh_cond_beta_gap_traub::set_status( const DictionaryDatum& d ) +hh_cond_beta_gap_traub::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d ); // throws if BadProperty diff --git a/models/hh_cond_exp_traub.cpp b/models/hh_cond_exp_traub.cpp index 3333f71f15..eecbc33792 100644 --- a/models/hh_cond_exp_traub.cpp +++ b/models/hh_cond_exp_traub.cpp @@ -188,41 +188,41 @@ nest::hh_cond_exp_traub::State_& nest::hh_cond_exp_traub::State_::operator=( con * ---------------------------------------------------------------- */ void -nest::hh_cond_exp_traub::Parameters_::get( DictionaryDatum& d ) const +nest::hh_cond_exp_traub::Parameters_::get( dictionary& d ) const { - def< double >( d, names::g_Na, g_Na ); - def< double >( d, names::g_K, g_K ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::E_Na, E_Na ); - def< double >( d, names::E_K, E_K ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::V_T, V_T ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::tau_syn_ex, tau_synE ); - def< double >( d, names::tau_syn_in, tau_synI ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::I_e, I_e ); + d[ names::g_Na.toString() ] = g_Na; + d[ names::g_K.toString() ] = g_K; + d[ names::g_L.toString() ] = g_L; + d[ names::C_m.toString() ] = C_m; + d[ names::E_Na.toString() ] = E_Na; + d[ names::E_K.toString() ] = E_K; + d[ names::E_L.toString() ] = E_L; + d[ names::V_T.toString() ] = V_T; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::tau_syn_ex.toString() ] = tau_synE; + d[ names::tau_syn_in.toString() ] = tau_synI; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::I_e.toString() ] = I_e; } void -nest::hh_cond_exp_traub::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::hh_cond_exp_traub::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::g_Na, g_Na, node ); - updateValueParam< double >( d, names::g_K, g_K, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::E_Na, E_Na, node ); - updateValueParam< double >( d, names::E_K, E_K, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::V_T, V_T, node ); - updateValueParam< double >( d, names::E_ex, E_ex, node ); - updateValueParam< double >( d, names::E_in, E_in, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_synE, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::g_Na.toString(), g_Na, node ); + update_value_param( d, names::g_K.toString(), g_K, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::E_Na.toString(), E_Na, node ); + update_value_param( d, names::E_K.toString(), E_K, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_T.toString(), V_T, node ); + update_value_param( d, names::E_ex.toString(), E_ex, node ); + update_value_param( d, names::E_in.toString(), E_in, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); if ( C_m <= 0 ) { @@ -241,21 +241,21 @@ nest::hh_cond_exp_traub::Parameters_::set( const DictionaryDatum& d, Node* node } void -nest::hh_cond_exp_traub::State_::get( DictionaryDatum& d ) const +nest::hh_cond_exp_traub::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); // Membrane potential - def< double >( d, names::Act_m, y_[ HH_M ] ); - def< double >( d, names::Inact_h, y_[ HH_H ] ); - def< double >( d, names::Act_n, y_[ HH_N ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential + d[ names::Act_m.toString() ] = y_[ HH_M ]; + d[ names::Inact_h.toString() ] = y_[ HH_H ]; + d[ names::Act_n.toString() ] = y_[ HH_N ]; } void -nest::hh_cond_exp_traub::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::hh_cond_exp_traub::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::Act_m, y_[ HH_M ], node ); - updateValueParam< double >( d, names::Inact_h, y_[ HH_H ], node ); - updateValueParam< double >( d, names::Act_n, y_[ HH_N ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::Act_m.toString(), y_[ HH_M ], node ); + update_value_param( d, names::Inact_h.toString(), y_[ HH_H ], node ); + update_value_param( d, names::Act_n.toString(), y_[ HH_N ], node ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_cond_exp_traub.h b/models/hh_cond_exp_traub.h index 7572b5328d..d0e759cef7 100644 --- a/models/hh_cond_exp_traub.h +++ b/models/hh_cond_exp_traub.h @@ -172,8 +172,8 @@ class hh_cond_exp_traub : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -221,8 +221,8 @@ class hh_cond_exp_traub : public ArchivingNode Parameters_(); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -254,8 +254,8 @@ class hh_cond_exp_traub : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -370,19 +370,19 @@ hh_cond_exp_traub::handles_test_event( DataLoggingRequest& dlr, rport receptor_t } inline void -hh_cond_exp_traub::get_status( DictionaryDatum& d ) const +hh_cond_exp_traub::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); - def< double >( d, names::t_spike, get_spiketime_ms() ); + d[ names::t_spike.toString() ] = get_spiketime_ms(); } inline void -hh_cond_exp_traub::set_status( const DictionaryDatum& d ) +hh_cond_exp_traub::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/hh_psc_alpha.cpp b/models/hh_psc_alpha.cpp index 4d3f74d658..a7377216c3 100644 --- a/models/hh_psc_alpha.cpp +++ b/models/hh_psc_alpha.cpp @@ -187,37 +187,37 @@ nest::hh_psc_alpha::State_& nest::hh_psc_alpha::State_::operator=( const State_& * ---------------------------------------------------------------- */ void -nest::hh_psc_alpha::Parameters_::get( DictionaryDatum& d ) const +nest::hh_psc_alpha::Parameters_::get( dictionary& d ) const { - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_Na, g_Na ); - def< double >( d, names::g_K, g_K ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_Na, E_Na ); - def< double >( d, names::E_K, E_K ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::tau_syn_ex, tau_synE ); - def< double >( d, names::tau_syn_in, tau_synI ); - def< double >( d, names::I_e, I_e ); + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_Na.toString() ] = g_Na; + d[ names::g_K.toString() ] = g_K; + d[ names::g_L.toString() ] = g_L; + d[ names::E_Na.toString() ] = E_Na; + d[ names::E_K.toString() ] = E_K; + d[ names::E_L.toString() ] = E_L; + d[ names::C_m.toString() ] = C_m; + d[ names::tau_syn_ex.toString() ] = tau_synE; + d[ names::tau_syn_in.toString() ] = tau_synI; + d[ names::I_e.toString() ] = I_e; } void -nest::hh_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::hh_psc_alpha::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_Na, g_Na, node ); - updateValueParam< double >( d, names::E_Na, E_Na, node ); - updateValueParam< double >( d, names::g_K, g_K, node ); - updateValueParam< double >( d, names::E_K, E_K, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - - updateValueParam< double >( d, names::tau_syn_ex, tau_synE, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI, node ); - - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_Na.toString(), g_Na, node ); + update_value_param( d, names::E_Na.toString(), E_Na, node ); + update_value_param( d, names::g_K.toString(), g_K, node ); + update_value_param( d, names::E_K.toString(), E_K, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + + update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); + + update_value_param( d, names::I_e.toString(), I_e, node ); if ( C_m <= 0 ) { throw BadProperty( "Capacitance must be strictly positive." ); @@ -237,21 +237,21 @@ nest::hh_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::hh_psc_alpha::State_::get( DictionaryDatum& d ) const +nest::hh_psc_alpha::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::Act_m, y_[ HH_M ] ); - def< double >( d, names::Inact_h, y_[ HH_H ] ); - def< double >( d, names::Act_n, y_[ HH_N ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::Act_m.toString() ] = y_[ HH_M ]; + d[ names::Inact_h.toString() ] = y_[ HH_H ]; + d[ names::Act_n.toString() ] = y_[ HH_N ]; } void -nest::hh_psc_alpha::State_::set( const DictionaryDatum& d, Node* node ) +nest::hh_psc_alpha::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::Act_m, y_[ HH_M ], node ); - updateValueParam< double >( d, names::Inact_h, y_[ HH_H ], node ); - updateValueParam< double >( d, names::Act_n, y_[ HH_N ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::Act_m.toString(), y_[ HH_M ], node ); + update_value_param( d, names::Inact_h.toString(), y_[ HH_H ], node ); + update_value_param( d, names::Act_n.toString(), y_[ HH_N ], node ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_psc_alpha.h b/models/hh_psc_alpha.h index 9817c34f15..60bce3188f 100644 --- a/models/hh_psc_alpha.h +++ b/models/hh_psc_alpha.h @@ -166,8 +166,8 @@ class hh_psc_alpha : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -205,8 +205,8 @@ class hh_psc_alpha : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -247,8 +247,8 @@ class hh_psc_alpha : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -371,17 +371,17 @@ hh_psc_alpha::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -hh_psc_alpha::get_status( DictionaryDatum& d ) const +hh_psc_alpha::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -hh_psc_alpha::set_status( const DictionaryDatum& d ) +hh_psc_alpha::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/hh_psc_alpha_clopath.cpp b/models/hh_psc_alpha_clopath.cpp index a959c1dbb9..683582a869 100644 --- a/models/hh_psc_alpha_clopath.cpp +++ b/models/hh_psc_alpha_clopath.cpp @@ -201,43 +201,43 @@ nest::hh_psc_alpha_clopath::State_& nest::hh_psc_alpha_clopath::State_::operator * ---------------------------------------------------------------- */ void -nest::hh_psc_alpha_clopath::Parameters_::get( DictionaryDatum& d ) const +nest::hh_psc_alpha_clopath::Parameters_::get( dictionary& d ) const { - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_Na, g_Na ); - def< double >( d, names::g_K, g_K ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_Na, E_Na ); - def< double >( d, names::E_K, E_K ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::tau_syn_ex, tau_synE ); - def< double >( d, names::tau_syn_in, tau_synI ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::tau_plus, tau_plus ); - def< double >( d, names::tau_minus, tau_minus ); - def< double >( d, names::tau_bar_bar, tau_bar_bar ); + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_Na.toString() ] = g_Na; + d[ names::g_K.toString() ] = g_K; + d[ names::g_L.toString() ] = g_L; + d[ names::E_Na.toString() ] = E_Na; + d[ names::E_K.toString() ] = E_K; + d[ names::E_L.toString() ] = E_L; + d[ names::C_m.toString() ] = C_m; + d[ names::tau_syn_ex.toString() ] = tau_synE; + d[ names::tau_syn_in.toString() ] = tau_synI; + d[ names::I_e.toString() ] = I_e; + d[ names::tau_plus.toString() ] = tau_plus; + d[ names::tau_minus.toString() ] = tau_minus; + d[ names::tau_bar_bar.toString() ] = tau_bar_bar; } void -nest::hh_psc_alpha_clopath::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::hh_psc_alpha_clopath::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_Na, g_Na, node ); - updateValueParam< double >( d, names::E_Na, E_Na, node ); - updateValueParam< double >( d, names::g_K, g_K, node ); - updateValueParam< double >( d, names::E_K, E_K, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - - updateValueParam< double >( d, names::tau_syn_ex, tau_synE, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI, node ); - - updateValueParam< double >( d, names::I_e, I_e, node ); - updateValueParam< double >( d, names::tau_plus, tau_plus, node ); - updateValueParam< double >( d, names::tau_minus, tau_minus, node ); - updateValueParam< double >( d, names::tau_bar_bar, tau_bar_bar, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_Na.toString(), g_Na, node ); + update_value_param( d, names::E_Na.toString(), E_Na, node ); + update_value_param( d, names::g_K.toString(), g_K, node ); + update_value_param( d, names::E_K.toString(), E_K, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + + update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); + + update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::tau_plus.toString(), tau_plus, node ); + update_value_param( d, names::tau_minus.toString(), tau_minus, node ); + update_value_param( d, names::tau_bar_bar.toString(), tau_bar_bar, node ); if ( C_m <= 0 ) { throw BadProperty( "Capacitance must be strictly positive." ); @@ -257,27 +257,27 @@ nest::hh_psc_alpha_clopath::Parameters_::set( const DictionaryDatum& d, Node* no } void -nest::hh_psc_alpha_clopath::State_::get( DictionaryDatum& d ) const +nest::hh_psc_alpha_clopath::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::Act_m, y_[ HH_M ] ); - def< double >( d, names::Inact_h, y_[ HH_H ] ); - def< double >( d, names::Act_n, y_[ HH_N ] ); - def< double >( d, names::u_bar_plus, y_[ U_BAR_PLUS ] ); - def< double >( d, names::u_bar_minus, y_[ U_BAR_MINUS ] ); - def< double >( d, names::u_bar_bar, y_[ U_BAR_BAR ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::Act_m.toString() ] = y_[ HH_M ]; + d[ names::Inact_h.toString() ] = y_[ HH_H ]; + d[ names::Act_n.toString() ] = y_[ HH_N ]; + d[ names::u_bar_plus.toString() ] = y_[ U_BAR_PLUS ]; + d[ names::u_bar_minus.toString() ] = y_[ U_BAR_MINUS ]; + d[ names::u_bar_bar.toString() ] = y_[ U_BAR_BAR ]; } void -nest::hh_psc_alpha_clopath::State_::set( const DictionaryDatum& d, Node* node ) +nest::hh_psc_alpha_clopath::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::Act_m, y_[ HH_M ], node ); - updateValueParam< double >( d, names::Inact_h, y_[ HH_H ], node ); - updateValueParam< double >( d, names::Act_n, y_[ HH_N ], node ); - updateValueParam< double >( d, names::u_bar_plus, y_[ U_BAR_PLUS ], node ); - updateValueParam< double >( d, names::u_bar_minus, y_[ U_BAR_MINUS ], node ); - updateValueParam< double >( d, names::u_bar_bar, y_[ U_BAR_BAR ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::Act_m.toString(), y_[ HH_M ], node ); + update_value_param( d, names::Inact_h.toString(), y_[ HH_H ], node ); + update_value_param( d, names::Act_n.toString(), y_[ HH_N ], node ); + update_value_param( d, names::u_bar_plus.toString(), y_[ U_BAR_PLUS ], node ); + update_value_param( d, names::u_bar_minus.toString(), y_[ U_BAR_MINUS ], node ); + update_value_param( d, names::u_bar_bar.toString(), y_[ U_BAR_BAR ], node ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_psc_alpha_clopath.h b/models/hh_psc_alpha_clopath.h index 8eb44c7567..c91df3a4dd 100644 --- a/models/hh_psc_alpha_clopath.h +++ b/models/hh_psc_alpha_clopath.h @@ -204,8 +204,8 @@ class hh_psc_alpha_clopath : public ClopathArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -246,8 +246,8 @@ class hh_psc_alpha_clopath : public ClopathArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -291,8 +291,8 @@ class hh_psc_alpha_clopath : public ClopathArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -415,17 +415,17 @@ hh_psc_alpha_clopath::handles_test_event( DataLoggingRequest& dlr, rport recepto } inline void -hh_psc_alpha_clopath::get_status( DictionaryDatum& d ) const +hh_psc_alpha_clopath::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ClopathArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -hh_psc_alpha_clopath::set_status( const DictionaryDatum& d ) +hh_psc_alpha_clopath::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/hh_psc_alpha_gap.cpp b/models/hh_psc_alpha_gap.cpp index 1437d4ed31..f016d0976b 100644 --- a/models/hh_psc_alpha_gap.cpp +++ b/models/hh_psc_alpha_gap.cpp @@ -225,39 +225,39 @@ nest::hh_psc_alpha_gap::State_& nest::hh_psc_alpha_gap::State_::operator=( const * ---------------------------------------------------------------- */ void -nest::hh_psc_alpha_gap::Parameters_::get( DictionaryDatum& d ) const +nest::hh_psc_alpha_gap::Parameters_::get( dictionary& d ) const { - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_Na, g_Na ); - def< double >( d, names::g_Kv1, g_Kv1 ); - def< double >( d, names::g_Kv3, g_Kv3 ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_Na, E_Na ); - def< double >( d, names::E_K, E_K ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::tau_syn_ex, tau_synE ); - def< double >( d, names::tau_syn_in, tau_synI ); - def< double >( d, names::I_e, I_e ); + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_Na.toString() ] = g_Na; + d[ names::g_Kv1.toString() ] = g_Kv1; + d[ names::g_Kv3.toString() ] = g_Kv3; + d[ names::g_L.toString() ] = g_L; + d[ names::E_Na.toString() ] = E_Na; + d[ names::E_K.toString() ] = E_K; + d[ names::E_L.toString() ] = E_L; + d[ names::C_m.toString() ] = C_m; + d[ names::tau_syn_ex.toString() ] = tau_synE; + d[ names::tau_syn_in.toString() ] = tau_synI; + d[ names::I_e.toString() ] = I_e; } void -nest::hh_psc_alpha_gap::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::hh_psc_alpha_gap::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_Na, g_Na, node ); - updateValueParam< double >( d, names::E_Na, E_Na, node ); - updateValueParam< double >( d, names::g_Kv1, g_Kv1, node ); - updateValueParam< double >( d, names::g_Kv3, g_Kv3, node ); - updateValueParam< double >( d, names::E_K, E_K, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - - updateValueParam< double >( d, names::tau_syn_ex, tau_synE, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI, node ); - - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_Na.toString(), g_Na, node ); + update_value_param( d, names::E_Na.toString(), E_Na, node ); + update_value_param( d, names::g_Kv1.toString(), g_Kv1, node ); + update_value_param( d, names::g_Kv3.toString(), g_Kv3, node ); + update_value_param( d, names::E_K.toString(), E_K, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + + update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); + + update_value_param( d, names::I_e.toString(), I_e, node ); if ( C_m <= 0 ) { throw BadProperty( "Capacitance must be strictly positive." ); @@ -277,23 +277,23 @@ nest::hh_psc_alpha_gap::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::hh_psc_alpha_gap::State_::get( DictionaryDatum& d ) const +nest::hh_psc_alpha_gap::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); - def< double >( d, names::Act_m, y_[ HH_M ] ); - def< double >( d, names::Inact_h, y_[ HH_H ] ); - def< double >( d, names::Act_n, y_[ HH_N ] ); - def< double >( d, names::Inact_p, y_[ HH_P ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::Act_m.toString() ] = y_[ HH_M ]; + d[ names::Inact_h.toString() ] = y_[ HH_H ]; + d[ names::Act_n.toString() ] = y_[ HH_N ]; + d[ names::Inact_p.toString() ] = y_[ HH_P ]; } void -nest::hh_psc_alpha_gap::State_::set( const DictionaryDatum& d, Node* node ) +nest::hh_psc_alpha_gap::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::Act_m, y_[ HH_M ], node ); - updateValueParam< double >( d, names::Inact_h, y_[ HH_H ], node ); - updateValueParam< double >( d, names::Act_n, y_[ HH_N ], node ); - updateValueParam< double >( d, names::Inact_p, y_[ HH_P ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::Act_m.toString(), y_[ HH_M ], node ); + update_value_param( d, names::Inact_h.toString(), y_[ HH_H ], node ); + update_value_param( d, names::Act_n.toString(), y_[ HH_N ], node ); + update_value_param( d, names::Inact_p.toString(), y_[ HH_P ], node ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 || y_[ HH_P ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_psc_alpha_gap.h b/models/hh_psc_alpha_gap.h index 577c229695..2b9ea464b1 100644 --- a/models/hh_psc_alpha_gap.h +++ b/models/hh_psc_alpha_gap.h @@ -184,8 +184,8 @@ class hh_psc_alpha_gap : public ArchivingNode { } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -231,8 +231,8 @@ class hh_psc_alpha_gap : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -273,8 +273,8 @@ class hh_psc_alpha_gap : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -431,17 +431,17 @@ hh_psc_alpha_gap::handles_test_event( GapJunctionEvent&, rport receptor_type ) } inline void -hh_psc_alpha_gap::get_status( DictionaryDatum& d ) const +hh_psc_alpha_gap::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -hh_psc_alpha_gap::set_status( const DictionaryDatum& d ) +hh_psc_alpha_gap::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/ht_neuron.cpp b/models/ht_neuron.cpp index 6e9e14760b..41aa6a8af5 100644 --- a/models/ht_neuron.cpp +++ b/models/ht_neuron.cpp @@ -330,97 +330,97 @@ nest::ht_neuron::State_::~State_() * ---------------------------------------------------------------- */ void -nest::ht_neuron::Parameters_::get( DictionaryDatum& d ) const -{ - def< double >( d, names::E_Na, E_Na ); - def< double >( d, names::E_K, E_K ); - def< double >( d, names::g_NaL, g_NaL ); - def< double >( d, names::g_KL, g_KL ); - def< double >( d, names::tau_m, tau_m ); - def< double >( d, names::theta_eq, theta_eq ); - def< double >( d, names::tau_theta, tau_theta ); - def< double >( d, names::t_ref, t_ref ); - def< double >( d, names::tau_spike, tau_spike ); - def< double >( d, names::g_peak_AMPA, g_peak_AMPA ); - def< double >( d, names::tau_rise_AMPA, tau_rise_AMPA ); - def< double >( d, names::tau_decay_AMPA, tau_decay_AMPA ); - def< double >( d, names::E_rev_AMPA, E_rev_AMPA ); - def< double >( d, names::g_peak_NMDA, g_peak_NMDA ); - def< double >( d, names::tau_rise_NMDA, tau_rise_NMDA ); - def< double >( d, names::tau_decay_NMDA, tau_decay_NMDA ); - def< double >( d, names::E_rev_NMDA, E_rev_NMDA ); - def< double >( d, names::V_act_NMDA, V_act_NMDA ); - def< double >( d, names::S_act_NMDA, S_act_NMDA ); - def< double >( d, names::tau_Mg_slow_NMDA, tau_Mg_slow_NMDA ); - def< double >( d, names::tau_Mg_fast_NMDA, tau_Mg_fast_NMDA ); - def< bool >( d, names::instant_unblock_NMDA, instant_unblock_NMDA ); - def< double >( d, names::g_peak_GABA_A, g_peak_GABA_A ); - def< double >( d, names::tau_rise_GABA_A, tau_rise_GABA_A ); - def< double >( d, names::tau_decay_GABA_A, tau_decay_GABA_A ); - def< double >( d, names::E_rev_GABA_A, E_rev_GABA_A ); - def< double >( d, names::g_peak_GABA_B, g_peak_GABA_B ); - def< double >( d, names::tau_rise_GABA_B, tau_rise_GABA_B ); - def< double >( d, names::tau_decay_GABA_B, tau_decay_GABA_B ); - def< double >( d, names::E_rev_GABA_B, E_rev_GABA_B ); - def< double >( d, names::g_peak_NaP, g_peak_NaP ); - def< double >( d, names::E_rev_NaP, E_rev_NaP ); - def< double >( d, names::N_NaP, N_NaP ); - def< double >( d, names::g_peak_KNa, g_peak_KNa ); - def< double >( d, names::E_rev_KNa, E_rev_KNa ); - def< double >( d, names::tau_D_KNa, tau_D_KNa ); - def< double >( d, names::g_peak_T, g_peak_T ); - def< double >( d, names::E_rev_T, E_rev_T ); - def< double >( d, names::N_T, N_T ); - def< double >( d, names::g_peak_h, g_peak_h ); - def< double >( d, names::E_rev_h, E_rev_h ); - def< bool >( d, names::voltage_clamp, voltage_clamp ); +nest::ht_neuron::Parameters_::get( dictionary& d ) const +{ + d[ names::E_Na.toString() ] = E_Na; + d[ names::E_K.toString() ] = E_K; + d[ names::g_NaL.toString() ] = g_NaL; + d[ names::g_KL.toString() ] = g_KL; + d[ names::tau_m.toString() ] = tau_m; + d[ names::theta_eq.toString() ] = theta_eq; + d[ names::tau_theta.toString() ] = tau_theta; + d[ names::t_ref.toString() ] = t_ref; + d[ names::tau_spike.toString() ] = tau_spike; + d[ names::g_peak_AMPA.toString() ] = g_peak_AMPA; + d[ names::tau_rise_AMPA.toString() ] = tau_rise_AMPA; + d[ names::tau_decay_AMPA.toString() ] = tau_decay_AMPA; + d[ names::E_rev_AMPA.toString() ] = E_rev_AMPA; + d[ names::g_peak_NMDA.toString() ] = g_peak_NMDA; + d[ names::tau_rise_NMDA.toString() ] = tau_rise_NMDA; + d[ names::tau_decay_NMDA.toString() ] = tau_decay_NMDA; + d[ names::E_rev_NMDA.toString() ] = E_rev_NMDA; + d[ names::V_act_NMDA.toString() ] = V_act_NMDA; + d[ names::S_act_NMDA.toString() ] = S_act_NMDA; + d[ names::tau_Mg_slow_NMDA.toString() ] = tau_Mg_slow_NMDA; + d[ names::tau_Mg_fast_NMDA.toString() ] = tau_Mg_fast_NMDA; + d[ names::instant_unblock_NMDA.toString() ] = instant_unblock_NMDA; + d[ names::g_peak_GABA_A.toString() ] = g_peak_GABA_A; + d[ names::tau_rise_GABA_A.toString() ] = tau_rise_GABA_A; + d[ names::tau_decay_GABA_A.toString() ] = tau_decay_GABA_A; + d[ names::E_rev_GABA_A.toString() ] = E_rev_GABA_A; + d[ names::g_peak_GABA_B.toString() ] = g_peak_GABA_B; + d[ names::tau_rise_GABA_B.toString() ] = tau_rise_GABA_B; + d[ names::tau_decay_GABA_B.toString() ] = tau_decay_GABA_B; + d[ names::E_rev_GABA_B.toString() ] = E_rev_GABA_B; + d[ names::g_peak_NaP.toString() ] = g_peak_NaP; + d[ names::E_rev_NaP.toString() ] = E_rev_NaP; + d[ names::N_NaP.toString() ] = N_NaP; + d[ names::g_peak_KNa.toString() ] = g_peak_KNa; + d[ names::E_rev_KNa.toString() ] = E_rev_KNa; + d[ names::tau_D_KNa.toString() ] = tau_D_KNa; + d[ names::g_peak_T.toString() ] = g_peak_T; + d[ names::E_rev_T.toString() ] = E_rev_T; + d[ names::N_T.toString() ] = N_T; + d[ names::g_peak_h.toString() ] = g_peak_h; + d[ names::E_rev_h.toString() ] = E_rev_h; + d[ names::voltage_clamp.toString() ] = voltage_clamp; } void -nest::ht_neuron::Parameters_::set( const DictionaryDatum& d, Node* node ) -{ - updateValueParam< double >( d, names::E_Na, E_Na, node ); - updateValueParam< double >( d, names::E_K, E_K, node ); - updateValueParam< double >( d, names::g_NaL, g_NaL, node ); - updateValueParam< double >( d, names::g_KL, g_KL, node ); - updateValueParam< double >( d, names::tau_m, tau_m, node ); - updateValueParam< double >( d, names::theta_eq, theta_eq, node ); - updateValueParam< double >( d, names::tau_theta, tau_theta, node ); - updateValueParam< double >( d, names::tau_spike, tau_spike, node ); - updateValueParam< double >( d, names::t_ref, t_ref, node ); - updateValueParam< double >( d, names::g_peak_AMPA, g_peak_AMPA, node ); - updateValueParam< double >( d, names::tau_rise_AMPA, tau_rise_AMPA, node ); - updateValueParam< double >( d, names::tau_decay_AMPA, tau_decay_AMPA, node ); - updateValueParam< double >( d, names::E_rev_AMPA, E_rev_AMPA, node ); - updateValueParam< double >( d, names::g_peak_NMDA, g_peak_NMDA, node ); - updateValueParam< double >( d, names::tau_rise_NMDA, tau_rise_NMDA, node ); - updateValueParam< double >( d, names::tau_decay_NMDA, tau_decay_NMDA, node ); - updateValueParam< double >( d, names::E_rev_NMDA, E_rev_NMDA, node ); - updateValueParam< double >( d, names::V_act_NMDA, V_act_NMDA, node ); - updateValueParam< double >( d, names::S_act_NMDA, S_act_NMDA, node ); - updateValueParam< double >( d, names::tau_Mg_slow_NMDA, tau_Mg_slow_NMDA, node ); - updateValueParam< double >( d, names::tau_Mg_fast_NMDA, tau_Mg_fast_NMDA, node ); - updateValueParam< bool >( d, names::instant_unblock_NMDA, instant_unblock_NMDA, node ); - updateValueParam< double >( d, names::g_peak_GABA_A, g_peak_GABA_A, node ); - updateValueParam< double >( d, names::tau_rise_GABA_A, tau_rise_GABA_A, node ); - updateValueParam< double >( d, names::tau_decay_GABA_A, tau_decay_GABA_A, node ); - updateValueParam< double >( d, names::E_rev_GABA_A, E_rev_GABA_A, node ); - updateValueParam< double >( d, names::g_peak_GABA_B, g_peak_GABA_B, node ); - updateValueParam< double >( d, names::tau_rise_GABA_B, tau_rise_GABA_B, node ); - updateValueParam< double >( d, names::tau_decay_GABA_B, tau_decay_GABA_B, node ); - updateValueParam< double >( d, names::E_rev_GABA_B, E_rev_GABA_B, node ); - updateValueParam< double >( d, names::g_peak_NaP, g_peak_NaP, node ); - updateValueParam< double >( d, names::E_rev_NaP, E_rev_NaP, node ); - updateValueParam< double >( d, names::N_NaP, N_NaP, node ); - updateValueParam< double >( d, names::g_peak_KNa, g_peak_KNa, node ); - updateValueParam< double >( d, names::E_rev_KNa, E_rev_KNa, node ); - updateValueParam< double >( d, names::tau_D_KNa, tau_D_KNa, node ); - updateValueParam< double >( d, names::g_peak_T, g_peak_T, node ); - updateValueParam< double >( d, names::E_rev_T, E_rev_T, node ); - updateValueParam< double >( d, names::N_T, N_T, node ); - updateValueParam< double >( d, names::g_peak_h, g_peak_h, node ); - updateValueParam< double >( d, names::E_rev_h, E_rev_h, node ); - updateValueParam< bool >( d, names::voltage_clamp, voltage_clamp, node ); +nest::ht_neuron::Parameters_::set( const dictionary& d, Node* node ) +{ + update_value_param( d, names::E_Na.toString(), E_Na, node ); + update_value_param( d, names::E_K.toString(), E_K, node ); + update_value_param( d, names::g_NaL.toString(), g_NaL, node ); + update_value_param( d, names::g_KL.toString(), g_KL, node ); + update_value_param( d, names::tau_m.toString(), tau_m, node ); + update_value_param( d, names::theta_eq.toString(), theta_eq, node ); + update_value_param( d, names::tau_theta.toString(), tau_theta, node ); + update_value_param( d, names::tau_spike.toString(), tau_spike, node ); + update_value_param( d, names::t_ref.toString(), t_ref, node ); + update_value_param( d, names::g_peak_AMPA.toString(), g_peak_AMPA, node ); + update_value_param( d, names::tau_rise_AMPA.toString(), tau_rise_AMPA, node ); + update_value_param( d, names::tau_decay_AMPA.toString(), tau_decay_AMPA, node ); + update_value_param( d, names::E_rev_AMPA.toString(), E_rev_AMPA, node ); + update_value_param( d, names::g_peak_NMDA.toString(), g_peak_NMDA, node ); + update_value_param( d, names::tau_rise_NMDA.toString(), tau_rise_NMDA, node ); + update_value_param( d, names::tau_decay_NMDA.toString(), tau_decay_NMDA, node ); + update_value_param( d, names::E_rev_NMDA.toString(), E_rev_NMDA, node ); + update_value_param( d, names::V_act_NMDA.toString(), V_act_NMDA, node ); + update_value_param( d, names::S_act_NMDA.toString(), S_act_NMDA, node ); + update_value_param( d, names::tau_Mg_slow_NMDA.toString(), tau_Mg_slow_NMDA, node ); + update_value_param( d, names::tau_Mg_fast_NMDA.toString(), tau_Mg_fast_NMDA, node ); + update_value_param( d, names::instant_unblock_NMDA.toString(), instant_unblock_NMDA, node ); + update_value_param( d, names::g_peak_GABA_A.toString(), g_peak_GABA_A, node ); + update_value_param( d, names::tau_rise_GABA_A.toString(), tau_rise_GABA_A, node ); + update_value_param( d, names::tau_decay_GABA_A.toString(), tau_decay_GABA_A, node ); + update_value_param( d, names::E_rev_GABA_A.toString(), E_rev_GABA_A, node ); + update_value_param( d, names::g_peak_GABA_B.toString(), g_peak_GABA_B, node ); + update_value_param( d, names::tau_rise_GABA_B.toString(), tau_rise_GABA_B, node ); + update_value_param( d, names::tau_decay_GABA_B.toString(), tau_decay_GABA_B, node ); + update_value_param( d, names::E_rev_GABA_B.toString(), E_rev_GABA_B, node ); + update_value_param( d, names::g_peak_NaP.toString(), g_peak_NaP, node ); + update_value_param( d, names::E_rev_NaP.toString(), E_rev_NaP, node ); + update_value_param( d, names::N_NaP.toString(), N_NaP, node ); + update_value_param( d, names::g_peak_KNa.toString(), g_peak_KNa, node ); + update_value_param( d, names::E_rev_KNa.toString(), E_rev_KNa, node ); + update_value_param( d, names::tau_D_KNa.toString(), tau_D_KNa, node ); + update_value_param( d, names::g_peak_T.toString(), g_peak_T, node ); + update_value_param( d, names::E_rev_T.toString(), E_rev_T, node ); + update_value_param( d, names::N_T.toString(), N_T, node ); + update_value_param( d, names::g_peak_h.toString(), g_peak_h, node ); + update_value_param( d, names::E_rev_h.toString(), E_rev_h, node ); + update_value_param( d, names::voltage_clamp.toString(), voltage_clamp, node ); if ( g_peak_AMPA < 0 ) { @@ -552,20 +552,20 @@ nest::ht_neuron::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::ht_neuron::State_::get( DictionaryDatum& d ) const +nest::ht_neuron::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); // Membrane potential - def< double >( d, names::theta, y_[ THETA ] ); // Threshold + d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential + d[ names::theta.toString() ] = y_[ THETA ]; // Threshold } void -nest::ht_neuron::State_::set( const DictionaryDatum& d, const ht_neuron& node, Node* nodeptr ) +nest::ht_neuron::State_::set( const dictionary& d, const ht_neuron& node, Node* nodeptr ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], nodeptr ); - updateValueParam< double >( d, names::theta, y_[ THETA ], nodeptr ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], nodeptr ); + update_value_param( d, names::theta.toString(), y_[ THETA ], nodeptr ); bool equilibrate = false; - updateValueParam< bool >( d, names::equilibrate, equilibrate, nodeptr ); + update_value_param( d, names::equilibrate.toString(), equilibrate, nodeptr ); if ( equilibrate ) { y_[ m_fast_NMDA ] = node.m_eq_NMDA_( y_[ V_M ] ); @@ -725,25 +725,25 @@ nest::ht_neuron::calibrate() } void -nest::ht_neuron::get_status( DictionaryDatum& d ) const +nest::ht_neuron::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - DictionaryDatum receptor_type = new Dictionary(); + dictionary receptor_type; - ( *receptor_type )[ names::AMPA ] = AMPA; - ( *receptor_type )[ names::NMDA ] = NMDA; - ( *receptor_type )[ names::GABA_A ] = GABA_A; - ( *receptor_type )[ names::GABA_B ] = GABA_B; + receptor_type[ names::AMPA.toString() ] = AMPA; + receptor_type[ names::NMDA.toString() ] = NMDA; + receptor_type[ names::GABA_A.toString() ] = GABA_A; + receptor_type[ names::GABA_B.toString() ] = GABA_B; - ( *d )[ names::receptor_types ] = receptor_type; - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::receptor_types.toString() ] = receptor_type; + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } void -nest::ht_neuron::set_status( const DictionaryDatum& d ) +nest::ht_neuron::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/ht_neuron.h b/models/ht_neuron.h index ffb3920afc..2a6451e8e4 100644 --- a/models/ht_neuron.h +++ b/models/ht_neuron.h @@ -207,8 +207,8 @@ class ht_neuron : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: /** @@ -249,8 +249,8 @@ class ht_neuron : public ArchivingNode { Parameters_(); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary // Note: Conductances are unitless // Leaks @@ -364,8 +364,8 @@ class ht_neuron : public ArchivingNode ~State_(); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const ht_neuron&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, const ht_neuron&, Node* node ); }; private: diff --git a/models/ht_synapse.h b/models/ht_synapse.h index a225afd03e..933ed6b0b6 100644 --- a/models/ht_synapse.h +++ b/models/ht_synapse.h @@ -130,12 +130,12 @@ class ht_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - virtual void get_status( DictionaryDatum& d ) const; + virtual void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - virtual void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + virtual void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -223,26 +223,26 @@ ht_synapse< targetidentifierT >::ht_synapse() template < typename targetidentifierT > void -ht_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +ht_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::tau_P, tau_P_ ); - def< double >( d, names::delta_P, delta_P_ ); - def< double >( d, names::P, p_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::tau_P.toString() ] = tau_P_; + d[ names::delta_P.toString() ] = delta_P_; + d[ names::P.toString() ] = p_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -ht_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +ht_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::tau_P, tau_P_ ); - updateValue< double >( d, names::delta_P, delta_P_ ); - updateValue< double >( d, names::P, p_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::tau_P.toString(), tau_P_ ); + d.update_value( names::delta_P.toString(), delta_P_ ); + d.update_value( names::P.toString(), p_ ); if ( tau_P_ <= 0.0 ) { diff --git a/models/iaf_chs_2007.cpp b/models/iaf_chs_2007.cpp index f7eb4f2d08..cbee1fb6e7 100644 --- a/models/iaf_chs_2007.cpp +++ b/models/iaf_chs_2007.cpp @@ -91,26 +91,26 @@ nest::iaf_chs_2007::State_::State_() * ---------------------------------------------------------------- */ void -nest::iaf_chs_2007::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_chs_2007::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_reset, U_reset_ ); - def< double >( d, names::V_epsp, U_epsp_ ); - def< double >( d, names::tau_epsp, tau_epsp_ ); - def< double >( d, names::tau_reset, tau_reset_ ); - def< double >( d, names::V_noise, U_noise_ ); - ( *d )[ names::noise ] = DoubleVectorDatum( new std::vector< double >( noise_ ) ); + d[ names::V_reset.toString() ] = U_reset_; + d[ names::V_epsp.toString() ] = U_epsp_; + d[ names::tau_epsp.toString() ] = tau_epsp_; + d[ names::tau_reset.toString() ] = tau_reset_; + d[ names::V_noise.toString() ] = U_noise_; + d[ names::noise.toString() ] = DoubleVectorDatum( new std::vector< double >( noise_ ) ); } void -nest::iaf_chs_2007::Parameters_::set( const DictionaryDatum& d, State_& s, Node* node ) +nest::iaf_chs_2007::Parameters_::set( const dictionary& d, State_& s, Node* node ) { - updateValueParam< double >( d, names::V_reset, U_reset_, node ); - updateValueParam< double >( d, names::V_epsp, U_epsp_, node ); - updateValueParam< double >( d, names::tau_epsp, tau_epsp_, node ); - updateValueParam< double >( d, names::tau_reset, tau_reset_, node ); - updateValueParam< double >( d, names::V_noise, U_noise_, node ); + update_value_param( d, names::V_reset.toString(), U_reset_, node ); + update_value_param( d, names::V_epsp.toString(), U_epsp_, node ); + update_value_param( d, names::tau_epsp.toString(), tau_epsp_, node ); + update_value_param( d, names::tau_reset.toString(), tau_reset_, node ); + update_value_param( d, names::V_noise.toString(), U_noise_, node ); - const bool updated_noise = updateValue< std::vector< double > >( d, names::noise, noise_ ); + const bool updated_noise = d.update_value( names::noise.toString(), noise_ ); if ( updated_noise ) { s.position_ = 0; @@ -138,15 +138,15 @@ nest::iaf_chs_2007::Parameters_::set( const DictionaryDatum& d, State_& s, Node* } void -nest::iaf_chs_2007::State_::get( DictionaryDatum& d ) const +nest::iaf_chs_2007::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, V_m_ ); // Membrane potential + d[ names::V_m.toString() ] = V_m_; // Membrane potential } void -nest::iaf_chs_2007::State_::set( DictionaryDatum const& d, Node* node ) +nest::iaf_chs_2007::State_::set( dictionary const& d, Node* node ) { - updateValueParam< double >( d, names::V_m, V_m_, node ); + update_value_param( d, names::V_m.toString(), V_m_, node ); } nest::iaf_chs_2007::Buffers_::Buffers_( iaf_chs_2007& n ) diff --git a/models/iaf_chs_2007.h b/models/iaf_chs_2007.h index 4512c6ddce..6e23125bda 100644 --- a/models/iaf_chs_2007.h +++ b/models/iaf_chs_2007.h @@ -130,8 +130,8 @@ class iaf_chs_2007 : public ArchivingNode port handles_test_event( SpikeEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -160,8 +160,8 @@ class iaf_chs_2007 : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum& ) const; - void set( DictionaryDatum const&, Node* ); + void get( dictionary& ) const; + void set( dictionary const&, Node* ); }; // ---------------------------------------------------------------- @@ -200,14 +200,14 @@ class iaf_chs_2007 : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() * @note State is passed so that the position can be reset if the * noise_ vector has been filled with new data. */ - void set( const DictionaryDatum&, State_& s, Node* node ); + void set( const dictionary&, State_& s, Node* node ); }; @@ -311,17 +311,17 @@ iaf_chs_2007::handles_test_event( DataLoggingRequest& dlr, port receptor_type ) } inline void -iaf_chs_2007::get_status( DictionaryDatum& d ) const +iaf_chs_2007::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_chs_2007::set_status( const DictionaryDatum& d ) +iaf_chs_2007::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, S_, this ); diff --git a/models/iaf_chxk_2008.cpp b/models/iaf_chxk_2008.cpp index c0d5bba4c2..a89caf9f63 100644 --- a/models/iaf_chxk_2008.cpp +++ b/models/iaf_chxk_2008.cpp @@ -193,40 +193,40 @@ nest::iaf_chxk_2008::Buffers_::Buffers_( const Buffers_&, iaf_chxk_2008& n ) * ---------------------------------------------------------------- */ void -nest::iaf_chxk_2008::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_chxk_2008::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_th, V_th ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::tau_syn_ex, tau_synE ); - def< double >( d, names::tau_syn_in, tau_synI ); - def< double >( d, names::I_e, I_e ); - def< double >( d, names::tau_ahp, tau_ahp ); - def< double >( d, names::E_ahp, E_ahp ); - def< double >( d, names::g_ahp, g_ahp ); - def< bool >( d, names::ahp_bug, ahp_bug ); + d[ names::V_th.toString() ] = V_th; + d[ names::g_L.toString() ] = g_L; + d[ names::C_m.toString() ] = C_m; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::E_L.toString() ] = E_L; + d[ names::tau_syn_ex.toString() ] = tau_synE; + d[ names::tau_syn_in.toString() ] = tau_synI; + d[ names::I_e.toString() ] = I_e; + d[ names::tau_ahp.toString() ] = tau_ahp; + d[ names::E_ahp.toString() ] = E_ahp; + d[ names::g_ahp.toString() ] = g_ahp; + d[ names::ahp_bug.toString() ] = ahp_bug; } void -nest::iaf_chxk_2008::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_chxk_2008::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::E_ex, E_ex, node ); - updateValueParam< double >( d, names::E_in, E_in, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_synE, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); - updateValueParam< double >( d, names::tau_ahp, tau_ahp, node ); - updateValueParam< double >( d, names::E_ahp, E_ahp, node ); - updateValueParam< double >( d, names::g_ahp, g_ahp, node ); - updateValueParam< bool >( d, names::ahp_bug, ahp_bug, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::E_ex.toString(), E_ex, node ); + update_value_param( d, names::E_in.toString(), E_in, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::tau_ahp.toString(), tau_ahp, node ); + update_value_param( d, names::E_ahp.toString(), E_ahp, node ); + update_value_param( d, names::g_ahp.toString(), g_ahp, node ); + update_value_param( d, names::ahp_bug.toString(), ahp_bug, node ); if ( C_m <= 0 ) { throw BadProperty( "Capacitance must be strictly positive." ); @@ -238,15 +238,15 @@ nest::iaf_chxk_2008::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::iaf_chxk_2008::State_::get( DictionaryDatum& d ) const +nest::iaf_chxk_2008::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y[ V_M ] ); // Membrane potential + d[ names::V_m.toString() ] = y[ V_M ]; // Membrane potential } void -nest::iaf_chxk_2008::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::iaf_chxk_2008::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y[ V_M ], node ); + update_value_param( d, names::V_m.toString(), y[ V_M ], node ); } /* ---------------------------------------------------------------- diff --git a/models/iaf_chxk_2008.h b/models/iaf_chxk_2008.h index c13e893d4c..1c7599d3ef 100644 --- a/models/iaf_chxk_2008.h +++ b/models/iaf_chxk_2008.h @@ -174,8 +174,8 @@ class iaf_chxk_2008 : public ArchivingNode void handle( CurrentEvent& ); void handle( DataLoggingRequest& ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -216,8 +216,8 @@ class iaf_chxk_2008 : public ArchivingNode Parameters_(); //!< Set default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // State variables class -------------------------------------------- @@ -258,13 +258,13 @@ class iaf_chxk_2008 : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set state from values in dictionary. * Requires Parameters_ as argument to, e.g., check bounds.' */ - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void set( const dictionary&, const Parameters_&, Node* ); }; private: @@ -427,17 +427,17 @@ iaf_chxk_2008::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -iaf_chxk_2008::get_status( DictionaryDatum& d ) const +iaf_chxk_2008::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_chxk_2008::set_status( const DictionaryDatum& d ) +iaf_chxk_2008::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_cond_alpha.cpp b/models/iaf_cond_alpha.cpp index 8c78c926f5..e776417681 100644 --- a/models/iaf_cond_alpha.cpp +++ b/models/iaf_cond_alpha.cpp @@ -181,40 +181,40 @@ nest::iaf_cond_alpha::Buffers_::Buffers_( const Buffers_&, iaf_cond_alpha& n ) * ---------------------------------------------------------------- */ void -nest::iaf_cond_alpha::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_cond_alpha::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_th, V_th ); - def< double >( d, names::V_reset, V_reset ); - def< double >( d, names::t_ref, t_ref ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::tau_syn_ex, tau_synE ); - def< double >( d, names::tau_syn_in, tau_synI ); - def< double >( d, names::I_e, I_e ); + d[ names::V_th.toString() ] = V_th; + d[ names::V_reset.toString() ] = V_reset; + d[ names::t_ref.toString() ] = t_ref; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::C_m.toString() ] = C_m; + d[ names::tau_syn_ex.toString() ] = tau_synE; + d[ names::tau_syn_in.toString() ] = tau_synI; + d[ names::I_e.toString() ] = I_e; } void -nest::iaf_cond_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_cond_alpha::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_reset, V_reset, node ); - updateValueParam< double >( d, names::t_ref, t_ref, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_reset.toString(), V_reset, node ); + update_value_param( d, names::t_ref.toString(), t_ref, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); - updateValueParam< double >( d, names::E_ex, E_ex, node ); - updateValueParam< double >( d, names::E_in, E_in, node ); + update_value_param( d, names::E_ex.toString(), E_ex, node ); + update_value_param( d, names::E_in.toString(), E_in, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_synE, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); if ( V_reset >= V_th ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -234,23 +234,23 @@ nest::iaf_cond_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::iaf_cond_alpha::State_::get( DictionaryDatum& d ) const +nest::iaf_cond_alpha::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y[ V_M ] ); // Membrane potential - def< double >( d, names::g_ex, y[ G_EXC ] ); - def< double >( d, names::dg_ex, y[ DG_EXC ] ); - def< double >( d, names::g_in, y[ G_INH ] ); - def< double >( d, names::dg_in, y[ DG_INH ] ); + d[ names::V_m.toString() ] = y[ V_M ]; // Membrane potential + d[ names::g_ex.toString() ] = y[ G_EXC ]; + d[ names::dg_ex.toString() ] = y[ DG_EXC ]; + d[ names::g_in.toString() ] = y[ G_INH ]; + d[ names::dg_in.toString() ] = y[ DG_INH ]; } void -nest::iaf_cond_alpha::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::iaf_cond_alpha::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y[ V_M ], node ); - updateValueParam< double >( d, names::g_ex, y[ G_EXC ], node ); - updateValueParam< double >( d, names::dg_ex, y[ DG_EXC ], node ); - updateValueParam< double >( d, names::g_in, y[ G_INH ], node ); - updateValueParam< double >( d, names::dg_in, y[ DG_INH ], node ); + update_value_param( d, names::V_m.toString(), y[ V_M ], node ); + update_value_param( d, names::g_ex.toString(), y[ G_EXC ], node ); + update_value_param( d, names::dg_ex.toString(), y[ DG_EXC ], node ); + update_value_param( d, names::g_in.toString(), y[ G_INH ], node ); + update_value_param( d, names::dg_in.toString(), y[ DG_INH ], node ); } diff --git a/models/iaf_cond_alpha.h b/models/iaf_cond_alpha.h index df463610bd..5cc8097a26 100644 --- a/models/iaf_cond_alpha.h +++ b/models/iaf_cond_alpha.h @@ -168,8 +168,8 @@ class iaf_cond_alpha : public ArchivingNode void handle( CurrentEvent& ); void handle( DataLoggingRequest& ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -207,8 +207,8 @@ class iaf_cond_alpha : public ArchivingNode Parameters_(); //!< Set default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // State variables class -------------------------------------------- @@ -247,13 +247,13 @@ class iaf_cond_alpha : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set state from values in dictionary. * Requires Parameters_ as argument to, eg, check bounds.' */ - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void set( const dictionary&, const Parameters_&, Node* ); }; private: @@ -395,17 +395,17 @@ iaf_cond_alpha::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -iaf_cond_alpha::get_status( DictionaryDatum& d ) const +iaf_cond_alpha::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_cond_alpha::set_status( const DictionaryDatum& d ) +iaf_cond_alpha::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_cond_alpha_mc.cpp b/models/iaf_cond_alpha_mc.cpp index b84f44dbac..85f1c1f20b 100644 --- a/models/iaf_cond_alpha_mc.cpp +++ b/models/iaf_cond_alpha_mc.cpp @@ -312,59 +312,59 @@ nest::iaf_cond_alpha_mc::Buffers_::Buffers_( const Buffers_&, iaf_cond_alpha_mc& * ---------------------------------------------------------------- */ void -nest::iaf_cond_alpha_mc::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_cond_alpha_mc::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_th, V_th ); - def< double >( d, names::V_reset, V_reset ); - def< double >( d, names::t_ref, t_ref ); + d[ names::V_th.toString() ] = V_th; + d[ names::V_reset.toString() ] = V_reset; + d[ names::t_ref.toString() ] = t_ref; - def< double >( d, names::g_sp, g_conn[ SOMA ] ); - def< double >( d, names::g_pd, g_conn[ PROX ] ); + d[ names::g_sp.toString() ] = g_conn[ SOMA ]; + d[ names::g_pd.toString() ] = g_conn[ PROX ]; // create subdictionaries for per-compartment parameters for ( size_t n = 0; n < NCOMP; ++n ) { - DictionaryDatum dd = new Dictionary(); - - def< double >( dd, names::g_L, g_L[ n ] ); - def< double >( dd, names::E_L, E_L[ n ] ); - def< double >( dd, names::E_ex, E_ex[ n ] ); - def< double >( dd, names::E_in, E_in[ n ] ); - def< double >( dd, names::C_m, C_m[ n ] ); - def< double >( dd, names::tau_syn_ex, tau_synE[ n ] ); - def< double >( dd, names::tau_syn_in, tau_synI[ n ] ); - def< double >( dd, names::I_e, I_e[ n ] ); - - ( *d )[ comp_names_[ n ] ] = dd; + dictionary dd; + + dd[ names::g_L.toString() ] = g_L[ n ]; + dd[ names::E_L.toString() ] = E_L[ n ]; + dd[ names::E_ex.toString() ] = E_ex[ n ]; + dd[ names::E_in.toString() ] = E_in[ n ]; + dd[ names::C_m.toString() ] = C_m[ n ]; + dd[ names::tau_syn_ex.toString() ] = tau_synE[ n ]; + dd[ names::tau_syn_in.toString() ] = tau_synI[ n ]; + dd[ names::I_e.toString() ] = I_e[ n ]; + + d[ comp_names_[ n ].toString() ] = dd; } } void -nest::iaf_cond_alpha_mc::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_cond_alpha_mc::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_reset, V_reset, node ); - updateValueParam< double >( d, names::t_ref, t_ref, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_reset.toString(), V_reset, node ); + update_value_param( d, names::t_ref.toString(), t_ref, node ); - updateValueParam< double >( d, Name( names::g_sp ), g_conn[ SOMA ], node ); - updateValueParam< double >( d, Name( names::g_pd ), g_conn[ PROX ], node ); + update_value_param( d, Name( names::g_sp ).toString(), g_conn[ SOMA ], node ); + update_value_param( d, Name( names::g_pd ).toString(), g_conn[ PROX ], node ); // extract from sub-dictionaries for ( size_t n = 0; n < NCOMP; ++n ) { - if ( d->known( comp_names_[ n ] ) ) + if ( d.known( comp_names_[ n ].toString() ) ) { - DictionaryDatum dd = getValue< DictionaryDatum >( d, comp_names_[ n ] ); - - updateValueParam< double >( dd, names::E_L, E_L[ n ], node ); - updateValueParam< double >( dd, names::E_ex, E_ex[ n ], node ); - updateValueParam< double >( dd, names::E_in, E_in[ n ], node ); - updateValueParam< double >( dd, names::C_m, C_m[ n ], node ); - updateValueParam< double >( dd, names::g_L, g_L[ n ], node ); - updateValueParam< double >( dd, names::tau_syn_ex, tau_synE[ n ], node ); - updateValueParam< double >( dd, names::tau_syn_in, tau_synI[ n ], node ); - updateValueParam< double >( dd, names::I_e, I_e[ n ], node ); + auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + + update_value_param( d, names::E_L.toString(), E_L[ n ], node ); + update_value_param( d, names::E_ex.toString(), E_ex[ n ], node ); + update_value_param( d, names::E_in.toString(), E_in[ n ], node ); + update_value_param( d, names::C_m.toString(), C_m[ n ], node ); + update_value_param( d, names::g_L.toString(), g_L[ n ], node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_synE[ n ], node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI[ n ], node ); + update_value_param( d, names::I_e.toString(), I_e[ n ], node ); } } if ( V_reset >= V_th ) @@ -391,29 +391,29 @@ nest::iaf_cond_alpha_mc::Parameters_::set( const DictionaryDatum& d, Node* node } void -nest::iaf_cond_alpha_mc::State_::get( DictionaryDatum& d ) const +nest::iaf_cond_alpha_mc::State_::get( dictionary& d ) const { // we assume here that State_::get() always is called after // Parameters_::get(), so that the per-compartment dictionaries exist for ( size_t n = 0; n < NCOMP; ++n ) { - assert( d->known( comp_names_[ n ] ) ); - DictionaryDatum dd = getValue< DictionaryDatum >( d, comp_names_[ n ] ); + assert( d.known( comp_names_[ n ].toString() ) ); + auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); - def< double >( dd, names::V_m, y_[ idx( n, V_M ) ] ); // Membrane potential + dd[ names::V_m.toString() ] = y_[ idx( n, V_M ) ]; // Membrane potential } } void -nest::iaf_cond_alpha_mc::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::iaf_cond_alpha_mc::State_::set( const dictionary& d, const Parameters_&, Node* node ) { // extract from sub-dictionaries for ( size_t n = 0; n < NCOMP; ++n ) { - if ( d->known( comp_names_[ n ] ) ) + if ( d.known( comp_names_[ n ].toString() ) ) { - DictionaryDatum dd = getValue< DictionaryDatum >( d, comp_names_[ n ] ); - updateValueParam< double >( dd, names::V_m, y_[ idx( n, V_M ) ], node ); + auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + update_value_param( d, names::V_m.toString(), y_[ idx( n, V_M ) ], node ); } } } diff --git a/models/iaf_cond_alpha_mc.h b/models/iaf_cond_alpha_mc.h index 9f163fb9d0..95a461effb 100644 --- a/models/iaf_cond_alpha_mc.h +++ b/models/iaf_cond_alpha_mc.h @@ -196,8 +196,8 @@ class iaf_cond_alpha_mc : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -309,8 +309,8 @@ class iaf_cond_alpha_mc : public ArchivingNode Parameters_( const Parameters_& ); //!< needed to copy C-arrays Parameters_& operator=( const Parameters_& ); //!< needed to copy C-arrays - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; @@ -351,8 +351,8 @@ class iaf_cond_alpha_mc : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); /** * Compute linear index into state array from compartment and element. @@ -524,37 +524,37 @@ iaf_cond_alpha_mc::handles_test_event( DataLoggingRequest& dlr, rport receptor_t } inline void -iaf_cond_alpha_mc::get_status( DictionaryDatum& d ) const +iaf_cond_alpha_mc::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); /** * @todo dictionary construction should be done only once for * static member in default c'tor, but this leads to * a seg fault on exit, see #328 */ - DictionaryDatum receptor_dict_ = new Dictionary(); - ( *receptor_dict_ )[ names::soma_exc ] = SOMA_EXC; - ( *receptor_dict_ )[ names::soma_inh ] = SOMA_INH; - ( *receptor_dict_ )[ names::soma_curr ] = I_SOMA; + dictionary receptor_dict_; + receptor_dict_[ names::soma_exc.toString() ] = SOMA_EXC; + receptor_dict_[ names::soma_inh.toString() ] = SOMA_INH; + receptor_dict_[ names::soma_curr.toString() ] = I_SOMA; - ( *receptor_dict_ )[ names::proximal_exc ] = PROX_EXC; - ( *receptor_dict_ )[ names::proximal_inh ] = PROX_INH; - ( *receptor_dict_ )[ names::proximal_curr ] = I_PROX; + receptor_dict_[ names::proximal_exc.toString() ] = PROX_EXC; + receptor_dict_[ names::proximal_inh.toString() ] = PROX_INH; + receptor_dict_[ names::proximal_curr.toString() ] = I_PROX; - ( *receptor_dict_ )[ names::distal_exc ] = DIST_EXC; - ( *receptor_dict_ )[ names::distal_inh ] = DIST_INH; - ( *receptor_dict_ )[ names::distal_curr ] = I_DIST; + receptor_dict_[ names::distal_exc.toString() ] = DIST_EXC; + receptor_dict_[ names::distal_inh.toString() ] = DIST_INH; + receptor_dict_[ names::distal_curr.toString() ] = I_DIST; - ( *d )[ names::receptor_types ] = receptor_dict_; + d[ names::receptor_types.toString() ] = receptor_dict_; } inline void -iaf_cond_alpha_mc::set_status( const DictionaryDatum& d ) +iaf_cond_alpha_mc::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_cond_beta.cpp b/models/iaf_cond_beta.cpp index eb049ebfbf..97c7ac9c6d 100644 --- a/models/iaf_cond_beta.cpp +++ b/models/iaf_cond_beta.cpp @@ -186,44 +186,44 @@ nest::iaf_cond_beta::Buffers_::Buffers_( const Buffers_&, iaf_cond_beta& n ) * ---------------------------------------------------------------- */ void -nest::iaf_cond_beta::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_cond_beta::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_th, V_th ); - def< double >( d, names::V_reset, V_reset ); - def< double >( d, names::t_ref, t_ref ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::tau_rise_ex, tau_rise_ex ); - def< double >( d, names::tau_decay_ex, tau_decay_ex ); - def< double >( d, names::tau_rise_in, tau_rise_in ); - def< double >( d, names::tau_decay_in, tau_decay_in ); - def< double >( d, names::I_e, I_e ); + d[ names::V_th.toString() ] = V_th; + d[ names::V_reset.toString() ] = V_reset; + d[ names::t_ref.toString() ] = t_ref; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::C_m.toString() ] = C_m; + d[ names::tau_rise_ex.toString() ] = tau_rise_ex; + d[ names::tau_decay_ex.toString() ] = tau_decay_ex; + d[ names::tau_rise_in.toString() ] = tau_rise_in; + d[ names::tau_decay_in.toString() ] = tau_decay_in; + d[ names::I_e.toString() ] = I_e; } void -nest::iaf_cond_beta::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_cond_beta::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - updateValueParam< double >( d, names::V_th, V_th, node ); - updateValueParam< double >( d, names::V_reset, V_reset, node ); - updateValueParam< double >( d, names::t_ref, t_ref, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); + update_value_param( d, names::V_th.toString(), V_th, node ); + update_value_param( d, names::V_reset.toString(), V_reset, node ); + update_value_param( d, names::t_ref.toString(), t_ref, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); - updateValueParam< double >( d, names::E_ex, E_ex, node ); - updateValueParam< double >( d, names::E_in, E_in, node ); + update_value_param( d, names::E_ex.toString(), E_ex, node ); + update_value_param( d, names::E_in.toString(), E_in, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::tau_rise_ex, tau_rise_ex, node ); - updateValueParam< double >( d, names::tau_decay_ex, tau_decay_ex, node ); - updateValueParam< double >( d, names::tau_rise_in, tau_rise_in, node ); - updateValueParam< double >( d, names::tau_decay_in, tau_decay_in, node ); + update_value_param( d, names::tau_rise_ex.toString(), tau_rise_ex, node ); + update_value_param( d, names::tau_decay_ex.toString(), tau_decay_ex, node ); + update_value_param( d, names::tau_rise_in.toString(), tau_rise_in, node ); + update_value_param( d, names::tau_decay_in.toString(), tau_decay_in, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); if ( V_reset >= V_th ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -243,23 +243,23 @@ nest::iaf_cond_beta::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::iaf_cond_beta::State_::get( DictionaryDatum& d ) const +nest::iaf_cond_beta::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y[ V_M ] ); // Membrane potential - def< double >( d, names::g_ex, y[ G_EXC ] ); - def< double >( d, names::dg_ex, y[ DG_EXC ] ); - def< double >( d, names::g_in, y[ G_INH ] ); - def< double >( d, names::dg_in, y[ DG_INH ] ); + d[ names::V_m.toString() ] = y[ V_M ]; // Membrane potential + d[ names::g_ex.toString() ] = y[ G_EXC ]; + d[ names::dg_ex.toString() ] = y[ DG_EXC ]; + d[ names::g_in.toString() ] = y[ G_INH ]; + d[ names::dg_in.toString() ] = y[ DG_INH ]; } void -nest::iaf_cond_beta::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::iaf_cond_beta::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y[ V_M ], node ); - updateValueParam< double >( d, names::g_ex, y[ G_EXC ], node ); - updateValueParam< double >( d, names::dg_ex, y[ DG_EXC ], node ); - updateValueParam< double >( d, names::g_in, y[ G_INH ], node ); - updateValueParam< double >( d, names::dg_in, y[ DG_INH ], node ); + update_value_param( d, names::V_m.toString(), y[ V_M ], node ); + update_value_param( d, names::g_ex.toString(), y[ G_EXC ], node ); + update_value_param( d, names::dg_ex.toString(), y[ DG_EXC ], node ); + update_value_param( d, names::g_in.toString(), y[ G_INH ], node ); + update_value_param( d, names::dg_in.toString(), y[ DG_INH ], node ); } diff --git a/models/iaf_cond_beta.h b/models/iaf_cond_beta.h index e5432fb820..73c6c2e498 100644 --- a/models/iaf_cond_beta.h +++ b/models/iaf_cond_beta.h @@ -175,8 +175,8 @@ class iaf_cond_beta : public ArchivingNode void handle( CurrentEvent& ); void handle( DataLoggingRequest& ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -217,8 +217,8 @@ class iaf_cond_beta : public ArchivingNode Parameters_(); //!< Set default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // State variables class -------------------------------------------- @@ -257,13 +257,13 @@ class iaf_cond_beta : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set state from values in dictionary. * Requires Parameters_ as argument to, eg, check bounds.' */ - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void set( const dictionary&, const Parameters_&, Node* ); }; private: @@ -405,17 +405,17 @@ iaf_cond_beta::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -iaf_cond_beta::get_status( DictionaryDatum& d ) const +iaf_cond_beta::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_cond_beta::set_status( const DictionaryDatum& d ) +iaf_cond_beta::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_cond_exp.cpp b/models/iaf_cond_exp.cpp index c0c5c3bc62..5c5686b283 100644 --- a/models/iaf_cond_exp.cpp +++ b/models/iaf_cond_exp.cpp @@ -145,40 +145,40 @@ nest::iaf_cond_exp::State_& nest::iaf_cond_exp::State_::operator=( const State_& * ---------------------------------------------------------------- */ void -nest::iaf_cond_exp::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_cond_exp::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_th, V_th_ ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::tau_syn_ex, tau_synE ); - def< double >( d, names::tau_syn_in, tau_synI ); - def< double >( d, names::I_e, I_e ); + d[ names::V_th.toString() ] = V_th_; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::C_m.toString() ] = C_m; + d[ names::tau_syn_ex.toString() ] = tau_synE; + d[ names::tau_syn_in.toString() ] = tau_synI; + d[ names::I_e.toString() ] = I_e; } void -nest::iaf_cond_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_cond_exp::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - updateValueParam< double >( d, names::V_th, V_th_, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); + update_value_param( d, names::V_th.toString(), V_th_, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); - updateValueParam< double >( d, names::E_ex, E_ex, node ); - updateValueParam< double >( d, names::E_in, E_in, node ); + update_value_param( d, names::E_ex.toString(), E_ex, node ); + update_value_param( d, names::E_in.toString(), E_in, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_synE, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); if ( V_reset_ >= V_th_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -198,19 +198,19 @@ nest::iaf_cond_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::iaf_cond_exp::State_::get( DictionaryDatum& d ) const +nest::iaf_cond_exp::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); // Membrane potential - def< double >( d, names::g_ex, y_[ G_EXC ] ); - def< double >( d, names::g_in, y_[ G_INH ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential + d[ names::g_ex.toString() ] = y_[ G_EXC ]; + d[ names::g_in.toString() ] = y_[ G_INH ]; } void -nest::iaf_cond_exp::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::iaf_cond_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::g_ex, y_[ G_EXC ], node ); - updateValueParam< double >( d, names::g_in, y_[ G_INH ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::g_ex.toString(), y_[ G_EXC ], node ); + update_value_param( d, names::g_in.toString(), y_[ G_INH ], node ); } nest::iaf_cond_exp::Buffers_::Buffers_( iaf_cond_exp& n ) diff --git a/models/iaf_cond_exp.h b/models/iaf_cond_exp.h index 39f68d786d..d390a670bb 100644 --- a/models/iaf_cond_exp.h +++ b/models/iaf_cond_exp.h @@ -146,8 +146,8 @@ class iaf_cond_exp : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -185,8 +185,8 @@ class iaf_cond_exp : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -216,8 +216,8 @@ class iaf_cond_exp : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -333,17 +333,17 @@ iaf_cond_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) inline void -iaf_cond_exp::get_status( DictionaryDatum& d ) const +iaf_cond_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_cond_exp::set_status( const DictionaryDatum& d ) +iaf_cond_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_cond_exp_sfa_rr.cpp b/models/iaf_cond_exp_sfa_rr.cpp index 44a1ab231b..afd04a2ce7 100644 --- a/models/iaf_cond_exp_sfa_rr.cpp +++ b/models/iaf_cond_exp_sfa_rr.cpp @@ -162,54 +162,54 @@ nest::iaf_cond_exp_sfa_rr::State_& nest::iaf_cond_exp_sfa_rr::State_::operator=( * ---------------------------------------------------------------- */ void -nest::iaf_cond_exp_sfa_rr::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_cond_exp_sfa_rr::Parameters_::get( dictionary& d ) const { - def< double >( d, names::V_th, V_th_ ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::g_L, g_L ); - def< double >( d, names::E_L, E_L ); - def< double >( d, names::E_ex, E_ex ); - def< double >( d, names::E_in, E_in ); - def< double >( d, names::C_m, C_m ); - def< double >( d, names::tau_syn_ex, tau_synE ); - def< double >( d, names::tau_syn_in, tau_synI ); - def< double >( d, names::I_e, I_e ); - - def< double >( d, names::tau_sfa, tau_sfa ); - def< double >( d, names::tau_rr, tau_rr ); - def< double >( d, names::E_sfa, E_sfa ); - def< double >( d, names::E_rr, E_rr ); - def< double >( d, names::q_sfa, q_sfa ); - def< double >( d, names::q_rr, q_rr ); + d[ names::V_th.toString() ] = V_th_; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::g_L.toString() ] = g_L; + d[ names::E_L.toString() ] = E_L; + d[ names::E_ex.toString() ] = E_ex; + d[ names::E_in.toString() ] = E_in; + d[ names::C_m.toString() ] = C_m; + d[ names::tau_syn_ex.toString() ] = tau_synE; + d[ names::tau_syn_in.toString() ] = tau_synI; + d[ names::I_e.toString() ] = I_e; + + d[ names::tau_sfa.toString() ] = tau_sfa; + d[ names::tau_rr.toString() ] = tau_rr; + d[ names::E_sfa.toString() ] = E_sfa; + d[ names::E_rr.toString() ] = E_rr; + d[ names::q_sfa.toString() ] = q_sfa; + d[ names::q_rr.toString() ] = q_rr; } void -nest::iaf_cond_exp_sfa_rr::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_cond_exp_sfa_rr::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - updateValueParam< double >( d, names::V_th, V_th_, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::E_L, E_L, node ); + update_value_param( d, names::V_th.toString(), V_th_, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::E_L.toString(), E_L, node ); - updateValueParam< double >( d, names::E_ex, E_ex, node ); - updateValueParam< double >( d, names::E_in, E_in, node ); + update_value_param( d, names::E_ex.toString(), E_ex, node ); + update_value_param( d, names::E_in.toString(), E_in, node ); - updateValueParam< double >( d, names::C_m, C_m, node ); - updateValueParam< double >( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m.toString(), C_m, node ); + update_value_param( d, names::g_L.toString(), g_L, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_synE, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_synI, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); - updateValueParam< double >( d, names::I_e, I_e, node ); + update_value_param( d, names::I_e.toString(), I_e, node ); - updateValueParam< double >( d, names::E_sfa, E_sfa, node ); - updateValueParam< double >( d, names::E_rr, E_rr, node ); - updateValueParam< double >( d, names::q_sfa, q_sfa, node ); - updateValueParam< double >( d, names::q_rr, q_rr, node ); - updateValueParam< double >( d, names::tau_sfa, tau_sfa, node ); - updateValueParam< double >( d, names::tau_rr, tau_rr, node ); + update_value_param( d, names::E_sfa.toString(), E_sfa, node ); + update_value_param( d, names::E_rr.toString(), E_rr, node ); + update_value_param( d, names::q_sfa.toString(), q_sfa, node ); + update_value_param( d, names::q_rr.toString(), q_rr, node ); + update_value_param( d, names::tau_sfa.toString(), tau_sfa, node ); + update_value_param( d, names::tau_rr.toString(), tau_rr, node ); if ( V_reset_ >= V_th_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -229,23 +229,23 @@ nest::iaf_cond_exp_sfa_rr::Parameters_::set( const DictionaryDatum& d, Node* nod } void -nest::iaf_cond_exp_sfa_rr::State_::get( DictionaryDatum& d ) const +nest::iaf_cond_exp_sfa_rr::State_::get( dictionary& d ) const { - def< double >( d, names::V_m, y_[ V_M ] ); // Membrane potential - def< double >( d, names::g_ex, y_[ G_EXC ] ); - def< double >( d, names::g_in, y_[ G_INH ] ); - def< double >( d, names::g_sfa, y_[ G_SFA ] ); - def< double >( d, names::g_rr, y_[ G_RR ] ); + d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential + d[ names::g_ex.toString() ] = y_[ G_EXC ]; + d[ names::g_in.toString() ] = y_[ G_INH ]; + d[ names::g_sfa.toString() ] = y_[ G_SFA ]; + d[ names::g_rr.toString() ] = y_[ G_RR ]; } void -nest::iaf_cond_exp_sfa_rr::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::iaf_cond_exp_sfa_rr::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y_[ V_M ], node ); - updateValueParam< double >( d, names::g_ex, y_[ G_EXC ], node ); - updateValueParam< double >( d, names::g_in, y_[ G_INH ], node ); - updateValueParam< double >( d, names::g_sfa, y_[ G_SFA ], node ); - updateValueParam< double >( d, names::g_rr, y_[ G_RR ], node ); + update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::g_ex.toString(), y_[ G_EXC ], node ); + update_value_param( d, names::g_in.toString(), y_[ G_INH ], node ); + update_value_param( d, names::g_sfa.toString(), y_[ G_SFA ], node ); + update_value_param( d, names::g_rr.toString(), y_[ G_RR ], node ); } nest::iaf_cond_exp_sfa_rr::Buffers_::Buffers_( iaf_cond_exp_sfa_rr& n ) diff --git a/models/iaf_cond_exp_sfa_rr.h b/models/iaf_cond_exp_sfa_rr.h index 0cc0943538..7c77b5966c 100644 --- a/models/iaf_cond_exp_sfa_rr.h +++ b/models/iaf_cond_exp_sfa_rr.h @@ -169,8 +169,8 @@ class iaf_cond_exp_sfa_rr : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -217,8 +217,8 @@ class iaf_cond_exp_sfa_rr : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; public: @@ -250,8 +250,8 @@ class iaf_cond_exp_sfa_rr : public ArchivingNode State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; private: @@ -368,17 +368,17 @@ iaf_cond_exp_sfa_rr::handles_test_event( DataLoggingRequest& dlr, rport receptor inline void -iaf_cond_exp_sfa_rr::get_status( DictionaryDatum& d ) const +iaf_cond_exp_sfa_rr::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_cond_exp_sfa_rr::set_status( const DictionaryDatum& d ) +iaf_cond_exp_sfa_rr::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_psc_alpha.cpp b/models/iaf_psc_alpha.cpp index ba2d1ca8c9..940331f230 100644 --- a/models/iaf_psc_alpha.cpp +++ b/models/iaf_psc_alpha.cpp @@ -95,30 +95,30 @@ iaf_psc_alpha::State_::State_() * ---------------------------------------------------------------- */ void -iaf_psc_alpha::Parameters_::get( DictionaryDatum& d ) const +iaf_psc_alpha::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); // Resting potential - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, Theta_ + E_L_ ); // threshold value - def< double >( d, names::V_reset, V_reset_ + E_L_ ); - def< double >( d, names::V_min, LowerBound_ + E_L_ ); - def< double >( d, names::C_m, C_ ); - def< double >( d, names::tau_m, Tau_ ); - def< double >( d, names::t_ref, TauR_ ); - def< double >( d, names::tau_syn_ex, tau_ex_ ); - def< double >( d, names::tau_syn_in, tau_in_ ); + d[ names::E_L.toString() ] = E_L_; // Resting potential + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = Theta_ + E_L_; // threshold value + d[ names::V_reset.toString() ] = V_reset_ + E_L_; + d[ names::V_min.toString() ] = LowerBound_ + E_L_; + d[ names::C_m.toString() ] = C_; + d[ names::tau_m.toString() ] = Tau_; + d[ names::t_ref.toString() ] = TauR_; + d[ names::tau_syn_ex.toString() ] = tau_ex_; + d[ names::tau_syn_in.toString() ] = tau_in_; } double -iaf_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) +iaf_psc_alpha::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( updateValueParam< double >( d, names::V_reset, V_reset_, node ) ) + if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -127,7 +127,7 @@ iaf_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) V_reset_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_th, Theta_, node ) ) + if ( update_value_param( d, names::V_th.toString(), Theta_, node ) ) { Theta_ -= E_L_; } @@ -136,7 +136,7 @@ iaf_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) Theta_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_min, LowerBound_, node ) ) + if ( update_value_param( d, names::V_min.toString(), LowerBound_, node ) ) { LowerBound_ -= E_L_; } @@ -145,12 +145,12 @@ iaf_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) LowerBound_ -= delta_EL; } - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, C_, node ); - updateValueParam< double >( d, names::tau_m, Tau_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_in_, node ); - updateValueParam< double >( d, names::t_ref, TauR_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), C_, node ); + update_value_param( d, names::tau_m.toString(), Tau_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); + update_value_param( d, names::t_ref.toString(), TauR_, node ); if ( C_ <= 0.0 ) { @@ -180,15 +180,15 @@ iaf_psc_alpha::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -iaf_psc_alpha::State_::get( DictionaryDatum& d, const Parameters_& p ) const +iaf_psc_alpha::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, y3_ + p.E_L_ ); // Membrane potential + d[ names::V_m.toString() ] = y3_ + p.E_L_; // Membrane potential } void -iaf_psc_alpha::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node ) +iaf_psc_alpha::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( updateValueParam< double >( d, names::V_m, y3_, node ) ) + if ( update_value_param( d, names::V_m.toString(), y3_, node ) ) { y3_ -= p.E_L_; } diff --git a/models/iaf_psc_alpha.h b/models/iaf_psc_alpha.h index 6bc659be16..e2788ddaf9 100644 --- a/models/iaf_psc_alpha.h +++ b/models/iaf_psc_alpha.h @@ -173,8 +173,8 @@ class iaf_psc_alpha : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -224,12 +224,12 @@ class iaf_psc_alpha : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); + double set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -248,14 +248,14 @@ class iaf_psc_alpha : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double, Node* node ); + void set( const dictionary&, const Parameters_&, double, Node* node ); }; // ---------------------------------------------------------------- @@ -392,17 +392,17 @@ iaf_psc_alpha::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -iaf_psc_alpha::get_status( DictionaryDatum& d ) const +iaf_psc_alpha::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_alpha::set_status( const DictionaryDatum& d ) +iaf_psc_alpha::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_psc_alpha_canon.cpp b/models/iaf_psc_alpha_canon.cpp index 5fc4530c5a..e0bafd635e 100644 --- a/models/iaf_psc_alpha_canon.cpp +++ b/models/iaf_psc_alpha_canon.cpp @@ -95,36 +95,36 @@ nest::iaf_psc_alpha_canon::State_::State_() * ---------------------------------------------------------------- */ void -nest::iaf_psc_alpha_canon::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_psc_alpha_canon::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, U_th_ + E_L_ ); - def< double >( d, names::V_min, U_min_ + E_L_ ); - def< double >( d, names::V_reset, U_reset_ + E_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::tau_syn, tau_syn_ ); - def< double >( d, names::t_ref, t_ref_ ); - def< long >( d, names::Interpol_Order, Interpol_ ); + d[ names::E_L.toString() ] = E_L_; + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = U_th_ + E_L_; + d[ names::V_min.toString() ] = U_min_ + E_L_; + d[ names::V_reset.toString() ] = U_reset_ + E_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::tau_syn.toString() ] = tau_syn_; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::Interpol_Order.toString() ] = Interpol_; } double -nest::iaf_psc_alpha_canon::Parameters_::set( const DictionaryDatum& d ) +nest::iaf_psc_alpha_canon::Parameters_::set( const dictionary& d ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValue< double >( d, names::E_L, E_L_ ); + d.update_value( names::E_L.toString(), E_L_ ); const double delta_EL = E_L_ - ELold; - updateValue< double >( d, names::tau_m, tau_m_ ); - updateValue< double >( d, names::tau_syn, tau_syn_ ); - updateValue< double >( d, names::C_m, c_m_ ); - updateValue< double >( d, names::t_ref, t_ref_ ); - updateValue< double >( d, names::I_e, I_e_ ); + d.update_value( names::tau_m.toString(), tau_m_ ); + d.update_value( names::tau_syn.toString(), tau_syn_ ); + d.update_value( names::C_m.toString(), c_m_ ); + d.update_value( names::t_ref.toString(), t_ref_ ); + d.update_value( names::I_e.toString(), I_e_ ); - if ( updateValue< double >( d, names::V_th, U_th_ ) ) + if ( d.update_value( names::V_th.toString(), U_th_ ) ) { U_th_ -= E_L_; } @@ -133,7 +133,7 @@ nest::iaf_psc_alpha_canon::Parameters_::set( const DictionaryDatum& d ) U_th_ -= delta_EL; } - if ( updateValue< double >( d, names::V_min, U_min_ ) ) + if ( d.update_value( names::V_min.toString(), U_min_ ) ) { U_min_ -= E_L_; } @@ -142,7 +142,7 @@ nest::iaf_psc_alpha_canon::Parameters_::set( const DictionaryDatum& d ) U_min_ -= delta_EL; } - if ( updateValue< double >( d, names::V_reset, U_reset_ ) ) + if ( d.update_value( names::V_reset.toString(), U_reset_ ) ) { U_reset_ -= E_L_; } @@ -152,7 +152,7 @@ nest::iaf_psc_alpha_canon::Parameters_::set( const DictionaryDatum& d ) } long tmp; - if ( updateValue< long >( d, names::Interpol_Order, tmp ) ) + if ( d.update_value( names::Interpol_Order.toString(), tmp ) ) { if ( NO_INTERPOL <= tmp && tmp < END_INTERP_ORDER ) { @@ -191,18 +191,18 @@ nest::iaf_psc_alpha_canon::Parameters_::set( const DictionaryDatum& d ) } void -nest::iaf_psc_alpha_canon::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::iaf_psc_alpha_canon::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, y3_ + p.E_L_ ); // Membrane potential - def< double >( d, names::y1, y1_ ); // y1 state - def< double >( d, names::y2, y2_ ); // y2 state - def< bool >( d, names::is_refractory, is_refractory_ ); + d[ names::V_m.toString() ] = y3_ + p.E_L_; // Membrane potential + d[ names::y1.toString() ] = y1_; // y1 state + d[ names::y2.toString() ] = y2_; // y2 state + d[ names::is_refractory.toString() ] = is_refractory_; } void -nest::iaf_psc_alpha_canon::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL ) +nest::iaf_psc_alpha_canon::State_::set( const dictionary& d, const Parameters_& p, double delta_EL ) { - if ( updateValue< double >( d, names::V_m, y3_ ) ) + if ( d.update_value( names::V_m.toString(), y3_ ) ) { y3_ -= p.E_L_; } @@ -211,8 +211,8 @@ nest::iaf_psc_alpha_canon::State_::set( const DictionaryDatum& d, const Paramete y3_ -= delta_EL; } - updateValue< double >( d, names::y1, y1_ ); - updateValue< double >( d, names::y2, y2_ ); + d.update_value( names::y1.toString(), y1_ ); + d.update_value( names::y2.toString(), y2_ ); } nest::iaf_psc_alpha_canon::Buffers_::Buffers_( iaf_psc_alpha_canon& n ) diff --git a/models/iaf_psc_alpha_canon.h b/models/iaf_psc_alpha_canon.h index a8b2bee8fa..9f6c726efa 100644 --- a/models/iaf_psc_alpha_canon.h +++ b/models/iaf_psc_alpha_canon.h @@ -205,8 +205,8 @@ class iaf_psc_alpha_canon : public ArchivingNode return true; } // uses off_grid events - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: /** @name Interface functions @@ -349,12 +349,12 @@ class iaf_psc_alpha_canon : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum& ); + double set( const dictionary& ); }; // ---------------------------------------------------------------- @@ -374,14 +374,14 @@ class iaf_psc_alpha_canon : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double ); + void set( const dictionary&, const Parameters_&, double ); }; // ---------------------------------------------------------------- @@ -508,17 +508,17 @@ iaf_psc_alpha_canon::handles_test_event( DataLoggingRequest& dlr, rport receptor } inline void -iaf_psc_alpha_canon::get_status( DictionaryDatum& d ) const +iaf_psc_alpha_canon::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_alpha_canon::set_status( const DictionaryDatum& d ) +iaf_psc_alpha_canon::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d ); // throws if BadProperty diff --git a/models/iaf_psc_alpha_multisynapse.cpp b/models/iaf_psc_alpha_multisynapse.cpp index 114ae89b6d..c603261ed4 100644 --- a/models/iaf_psc_alpha_multisynapse.cpp +++ b/models/iaf_psc_alpha_multisynapse.cpp @@ -119,33 +119,33 @@ iaf_psc_alpha_multisynapse::State_::State_() * ---------------------------------------------------------------- */ void -iaf_psc_alpha_multisynapse::Parameters_::get( DictionaryDatum& d ) const +iaf_psc_alpha_multisynapse::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); // resting potential - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, Theta_ + E_L_ ); // threshold value - def< double >( d, names::V_reset, V_reset_ + E_L_ ); - def< double >( d, names::C_m, C_ ); - def< double >( d, names::tau_m, Tau_ ); - def< double >( d, names::t_ref, refractory_time_ ); - def< double >( d, names::V_min, LowerBound_ + E_L_ ); - def< int >( d, names::n_synapses, n_receptors_() ); - def< bool >( d, names::has_connections, has_connections_ ); + d[ names::E_L.toString() ] = E_L_; // resting potential + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = Theta_ + E_L_; // threshold value + d[ names::V_reset.toString() ] = V_reset_ + E_L_; + d[ names::C_m.toString() ] = C_; + d[ names::tau_m.toString() ] = Tau_; + d[ names::t_ref.toString() ] = refractory_time_; + d[ names::V_min.toString() ] = LowerBound_ + E_L_; + d[ names::n_synapses.toString() ] = n_receptors_(); + d[ names::has_connections.toString() ] = has_connections_; ArrayDatum tau_syn_ad( tau_syn_ ); - def< ArrayDatum >( d, names::tau_syn, tau_syn_ad ); + d[ names::tau_syn.toString() ] = tau_syn_ad; } double -iaf_psc_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node ) +iaf_psc_alpha_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( updateValueParam< double >( d, names::V_reset, V_reset_, node ) ) + if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -153,7 +153,7 @@ iaf_psc_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* no { V_reset_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_th, Theta_, node ) ) + if ( update_value_param( d, names::V_th.toString(), Theta_, node ) ) { Theta_ -= E_L_; } @@ -161,7 +161,7 @@ iaf_psc_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* no { Theta_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_min, LowerBound_, node ) ) + if ( update_value_param( d, names::V_min.toString(), LowerBound_, node ) ) { LowerBound_ -= E_L_; } @@ -169,10 +169,10 @@ iaf_psc_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* no { LowerBound_ -= delta_EL; } - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, C_, node ); - updateValueParam< double >( d, names::tau_m, Tau_, node ); - updateValueParam< double >( d, names::t_ref, refractory_time_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), C_, node ); + update_value_param( d, names::tau_m.toString(), Tau_, node ); + update_value_param( d, names::t_ref.toString(), refractory_time_, node ); if ( C_ <= 0 ) { @@ -183,7 +183,7 @@ iaf_psc_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* no throw BadProperty( "Membrane time constant must be strictly positive." ); } const size_t old_n_receptors = this->n_receptors_(); - if ( updateValue< std::vector< double > >( d, "tau_syn", tau_syn_ ) ) + if ( d.update_value( "tau_syn", tau_syn_ ) ) { if ( this->n_receptors_() != old_n_receptors && has_connections_ == true ) { @@ -214,21 +214,18 @@ iaf_psc_alpha_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* no } void -iaf_psc_alpha_multisynapse::State_::get( DictionaryDatum& d, const Parameters_& p ) const +iaf_psc_alpha_multisynapse::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, V_m_ + p.E_L_ ); // Membrane potential + d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential } void -iaf_psc_alpha_multisynapse::State_::set( const DictionaryDatum& d, - const Parameters_& p, - const double delta_EL, - Node* node ) +iaf_psc_alpha_multisynapse::State_::set( const dictionary& d, const Parameters_& p, const double delta_EL, Node* node ) { // If the dictionary contains a value for the membrane potential, V_m, adjust // it with the resting potential, E_L_. If not, adjust the membrane potential // with the provided change in resting potential. - if ( updateValueParam< double >( d, names::V_m, V_m_, node ) ) + if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) { V_m_ -= p.E_L_; } @@ -425,7 +422,7 @@ iaf_psc_alpha_multisynapse::handle( DataLoggingRequest& e ) } void -iaf_psc_alpha_multisynapse::set_status( const DictionaryDatum& d ) +iaf_psc_alpha_multisynapse::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_psc_alpha_multisynapse.h b/models/iaf_psc_alpha_multisynapse.h index 5e4cefd2e9..939d18cada 100644 --- a/models/iaf_psc_alpha_multisynapse.h +++ b/models/iaf_psc_alpha_multisynapse.h @@ -107,8 +107,8 @@ class iaf_psc_alpha_multisynapse : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -164,12 +164,12 @@ class iaf_psc_alpha_multisynapse : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); + double set( const dictionary&, Node* node ); }; // Parameters_ // ---------------------------------------------------------------- @@ -213,14 +213,14 @@ class iaf_psc_alpha_multisynapse : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, const double, Node* ); + void set( const dictionary&, const Parameters_&, const double, Node* ); }; // State_ // ---------------------------------------------------------------- @@ -344,13 +344,13 @@ iaf_psc_alpha_multisynapse::handles_test_event( DataLoggingRequest& dlr, rport r } inline void -iaf_psc_alpha_multisynapse::get_status( DictionaryDatum& d ) const +iaf_psc_alpha_multisynapse::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } } // namespace diff --git a/models/iaf_psc_alpha_ps.cpp b/models/iaf_psc_alpha_ps.cpp index 012b7ffa1c..15b146398e 100644 --- a/models/iaf_psc_alpha_ps.cpp +++ b/models/iaf_psc_alpha_ps.cpp @@ -100,37 +100,37 @@ nest::iaf_psc_alpha_ps::State_::State_() * ---------------------------------------------------------------- */ void -nest::iaf_psc_alpha_ps::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_psc_alpha_ps::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, U_th_ + E_L_ ); - def< double >( d, names::V_min, U_min_ + E_L_ ); - def< double >( d, names::V_reset, U_reset_ + E_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::tau_syn_ex, tau_syn_ex_ ); - def< double >( d, names::tau_syn_in, tau_syn_in_ ); - def< double >( d, names::t_ref, t_ref_ ); + d[ names::E_L.toString() ] = E_L_; + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = U_th_ + E_L_; + d[ names::V_min.toString() ] = U_min_ + E_L_; + d[ names::V_reset.toString() ] = U_reset_ + E_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::tau_syn_ex.toString() ] = tau_syn_ex_; + d[ names::tau_syn_in.toString() ] = tau_syn_in_; + d[ names::t_ref.toString() ] = t_ref_; } double -nest::iaf_psc_alpha_ps::Parameters_::set( const DictionaryDatum& d ) +nest::iaf_psc_alpha_ps::Parameters_::set( const dictionary& d ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValue< double >( d, names::E_L, E_L_ ); + d.update_value( names::E_L.toString(), E_L_ ); const double delta_EL = E_L_ - ELold; - updateValue< double >( d, names::tau_m, tau_m_ ); - updateValue< double >( d, names::tau_syn_ex, tau_syn_ex_ ); - updateValue< double >( d, names::tau_syn_in, tau_syn_in_ ); - updateValue< double >( d, names::C_m, c_m_ ); - updateValue< double >( d, names::t_ref, t_ref_ ); - updateValue< double >( d, names::I_e, I_e_ ); + d.update_value( names::tau_m.toString(), tau_m_ ); + d.update_value( names::tau_syn_ex.toString(), tau_syn_ex_ ); + d.update_value( names::tau_syn_in.toString(), tau_syn_in_ ); + d.update_value( names::C_m.toString(), c_m_ ); + d.update_value( names::t_ref.toString(), t_ref_ ); + d.update_value( names::I_e.toString(), I_e_ ); - if ( updateValue< double >( d, names::V_th, U_th_ ) ) + if ( d.update_value( names::V_th.toString(), U_th_ ) ) { U_th_ -= E_L_; } @@ -139,7 +139,7 @@ nest::iaf_psc_alpha_ps::Parameters_::set( const DictionaryDatum& d ) U_th_ -= delta_EL; } - if ( updateValue< double >( d, names::V_min, U_min_ ) ) + if ( d.update_value( names::V_min.toString(), U_min_ ) ) { U_min_ -= E_L_; } @@ -148,7 +148,7 @@ nest::iaf_psc_alpha_ps::Parameters_::set( const DictionaryDatum& d ) U_min_ -= delta_EL; } - if ( updateValue< double >( d, names::V_reset, U_reset_ ) ) + if ( d.update_value( names::V_reset.toString(), U_reset_ ) ) { U_reset_ -= E_L_; } @@ -186,20 +186,20 @@ nest::iaf_psc_alpha_ps::Parameters_::set( const DictionaryDatum& d ) } void -nest::iaf_psc_alpha_ps::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::iaf_psc_alpha_ps::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, V_m_ + p.E_L_ ); // Membrane potential - def< double >( d, names::I_syn_ex, I_ex_ ); // Excitatory synaptic current - def< double >( d, names::I_syn_in, I_in_ ); // Inhibitory synaptic current - def< double >( d, names::dI_syn_in, dI_in_ ); // Derivative inhib. current - def< double >( d, names::dI_syn_ex, dI_ex_ ); // Derivative exc. current - def< bool >( d, names::is_refractory, is_refractory_ ); + d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential + d[ names::I_syn_ex.toString() ] = I_ex_; // Excitatory synaptic current + d[ names::I_syn_in.toString() ] = I_in_; // Inhibitory synaptic current + d[ names::dI_syn_in.toString() ] = dI_in_; // Derivative inhib. current + d[ names::dI_syn_ex.toString() ] = dI_ex_; // Derivative exc. current + d[ names::is_refractory.toString() ] = is_refractory_; } void -nest::iaf_psc_alpha_ps::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL ) +nest::iaf_psc_alpha_ps::State_::set( const dictionary& d, const Parameters_& p, double delta_EL ) { - if ( updateValue< double >( d, names::V_m, V_m_ ) ) + if ( d.update_value( names::V_m.toString(), V_m_ ) ) { V_m_ -= p.E_L_; } diff --git a/models/iaf_psc_alpha_ps.h b/models/iaf_psc_alpha_ps.h index 031c4d1fe5..8417927a13 100644 --- a/models/iaf_psc_alpha_ps.h +++ b/models/iaf_psc_alpha_ps.h @@ -192,8 +192,8 @@ class iaf_psc_alpha_ps : public ArchivingNode return true; } // uses off_grid events - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); /** * Based on the current state, compute the value of the membrane potential @@ -315,12 +315,12 @@ class iaf_psc_alpha_ps : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum& ); + double set( const dictionary& ); }; // ---------------------------------------------------------------- @@ -342,14 +342,14 @@ class iaf_psc_alpha_ps : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double ); + void set( const dictionary&, const Parameters_&, double ); }; // ---------------------------------------------------------------- @@ -495,17 +495,17 @@ iaf_psc_alpha_ps::handles_test_event( DataLoggingRequest& dlr, rport receptor_ty } inline void -iaf_psc_alpha_ps::get_status( DictionaryDatum& d ) const +iaf_psc_alpha_ps::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_alpha_ps::set_status( const DictionaryDatum& d ) +iaf_psc_alpha_ps::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d ); // throws if BadProperty diff --git a/models/iaf_psc_delta.cpp b/models/iaf_psc_delta.cpp index fe0da91e97..ae26858653 100644 --- a/models/iaf_psc_delta.cpp +++ b/models/iaf_psc_delta.cpp @@ -91,29 +91,29 @@ nest::iaf_psc_delta::State_::State_() * ---------------------------------------------------------------- */ void -nest::iaf_psc_delta::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_psc_delta::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); // Resting potential - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, V_th_ + E_L_ ); // threshold value - def< double >( d, names::V_reset, V_reset_ + E_L_ ); - def< double >( d, names::V_min, V_min_ + E_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::t_ref, t_ref_ ); - def< bool >( d, names::refractory_input, with_refr_input_ ); + d[ names::E_L.toString() ] = E_L_; // Resting potential + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = V_th_ + E_L_; // threshold value + d[ names::V_reset.toString() ] = V_reset_ + E_L_; + d[ names::V_min.toString() ] = V_min_ + E_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::refractory_input.toString() ] = with_refr_input_; } double -nest::iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_psc_delta::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( updateValueParam< double >( d, names::V_reset, V_reset_, node ) ) + if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -122,7 +122,7 @@ nest::iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) V_reset_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_th, V_th_, node ) ) + if ( update_value_param( d, names::V_th.toString(), V_th_, node ) ) { V_th_ -= E_L_; } @@ -131,7 +131,7 @@ nest::iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) V_th_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_min, V_min_, node ) ) + if ( update_value_param( d, names::V_min.toString(), V_min_, node ) ) { V_min_ -= E_L_; } @@ -140,10 +140,10 @@ nest::iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) V_min_ -= delta_EL; } - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::tau_m, tau_m_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::tau_m.toString(), tau_m_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); if ( V_reset_ >= V_th_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -161,21 +161,21 @@ nest::iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) throw BadProperty( "Membrane time constant must be > 0." ); } - updateValueParam< bool >( d, names::refractory_input, with_refr_input_, node ); + update_value_param( d, names::refractory_input.toString(), with_refr_input_, node ); return delta_EL; } void -nest::iaf_psc_delta::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::iaf_psc_delta::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, y3_ + p.E_L_ ); // Membrane potential + d[ names::V_m.toString() ] = y3_ + p.E_L_; // Membrane potential } void -nest::iaf_psc_delta::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node ) +nest::iaf_psc_delta::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( updateValueParam< double >( d, names::V_m, y3_, node ) ) + if ( update_value_param( d, names::V_m.toString(), y3_, node ) ) { y3_ -= p.E_L_; } diff --git a/models/iaf_psc_delta.h b/models/iaf_psc_delta.h index b889ad1fe3..518bdc34cf 100644 --- a/models/iaf_psc_delta.h +++ b/models/iaf_psc_delta.h @@ -168,8 +168,8 @@ class iaf_psc_delta : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -219,12 +219,12 @@ class iaf_psc_delta : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); + double set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -247,14 +247,14 @@ class iaf_psc_delta : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double, Node* ); + void set( const dictionary&, const Parameters_&, double, Node* ); }; // ---------------------------------------------------------------- @@ -357,16 +357,16 @@ iaf_psc_delta::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -iaf_psc_delta::get_status( DictionaryDatum& d ) const +iaf_psc_delta::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_delta::set_status( const DictionaryDatum& d ) +iaf_psc_delta::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_psc_delta_ps.cpp b/models/iaf_psc_delta_ps.cpp index efbaa912a6..96332d4f82 100644 --- a/models/iaf_psc_delta_ps.cpp +++ b/models/iaf_psc_delta_ps.cpp @@ -93,33 +93,33 @@ nest::iaf_psc_delta_ps::State_::State_() * ---------------------------------------------------------------- */ void -nest::iaf_psc_delta_ps::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_psc_delta_ps::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, U_th_ + E_L_ ); - def< double >( d, names::V_min, U_min_ + E_L_ ); - def< double >( d, names::V_reset, U_reset_ + E_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::t_ref, t_ref_ ); + d[ names::E_L.toString() ] = E_L_; + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = U_th_ + E_L_; + d[ names::V_min.toString() ] = U_min_ + E_L_; + d[ names::V_reset.toString() ] = U_reset_ + E_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::t_ref.toString() ] = t_ref_; } double -nest::iaf_psc_delta_ps::Parameters_::set( const DictionaryDatum& d ) +nest::iaf_psc_delta_ps::Parameters_::set( const dictionary& d ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValue< double >( d, names::E_L, E_L_ ); + d.update_value( names::E_L.toString(), E_L_ ); const double delta_EL = E_L_ - ELold; - updateValue< double >( d, names::tau_m, tau_m_ ); - updateValue< double >( d, names::C_m, c_m_ ); - updateValue< double >( d, names::t_ref, t_ref_ ); - updateValue< double >( d, names::I_e, I_e_ ); + d.update_value( names::tau_m.toString(), tau_m_ ); + d.update_value( names::C_m.toString(), c_m_ ); + d.update_value( names::t_ref.toString(), t_ref_ ); + d.update_value( names::I_e.toString(), I_e_ ); - if ( updateValue< double >( d, names::V_th, U_th_ ) ) + if ( d.update_value( names::V_th.toString(), U_th_ ) ) { U_th_ -= E_L_; } @@ -128,7 +128,7 @@ nest::iaf_psc_delta_ps::Parameters_::set( const DictionaryDatum& d ) U_th_ -= delta_EL; } - if ( updateValue< double >( d, names::V_min, U_min_ ) ) + if ( d.update_value( names::V_min.toString(), U_min_ ) ) { U_min_ -= E_L_; } @@ -137,7 +137,7 @@ nest::iaf_psc_delta_ps::Parameters_::set( const DictionaryDatum& d ) U_min_ -= delta_EL; } - if ( updateValue< double >( d, names::V_reset, U_reset_ ) ) + if ( d.update_value( names::V_reset.toString(), U_reset_ ) ) { U_reset_ -= E_L_; } @@ -171,17 +171,17 @@ nest::iaf_psc_delta_ps::Parameters_::set( const DictionaryDatum& d ) } void -nest::iaf_psc_delta_ps::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::iaf_psc_delta_ps::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, U_ + p.E_L_ ); // Membrane potential - def< bool >( d, names::is_refractory, is_refractory_ ); - def< bool >( d, names::refractory_input, with_refr_input_ ); + d[ names::V_m.toString() ] = U_ + p.E_L_; // Membrane potential + d[ names::is_refractory.toString() ] = is_refractory_; + d[ names::refractory_input.toString() ] = with_refr_input_; } void -nest::iaf_psc_delta_ps::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL ) +nest::iaf_psc_delta_ps::State_::set( const dictionary& d, const Parameters_& p, double delta_EL ) { - if ( updateValue< double >( d, names::V_m, U_ ) ) + if ( d.update_value( names::V_m.toString(), U_ ) ) { U_ -= p.E_L_; } diff --git a/models/iaf_psc_delta_ps.h b/models/iaf_psc_delta_ps.h index 06a8b0bc29..807a8c006b 100644 --- a/models/iaf_psc_delta_ps.h +++ b/models/iaf_psc_delta_ps.h @@ -199,8 +199,8 @@ class iaf_psc_delta_ps : public ArchivingNode return true; } // uses off_grid events - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: /** @name Interface functions @@ -280,12 +280,12 @@ class iaf_psc_delta_ps : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum& ); + double set( const dictionary& ); }; @@ -315,14 +315,14 @@ class iaf_psc_delta_ps : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double ); + void set( const dictionary&, const Parameters_&, double ); }; // ---------------------------------------------------------------- @@ -440,17 +440,17 @@ iaf_psc_delta_ps::handles_test_event( DataLoggingRequest& dlr, rport receptor_ty } inline void -iaf_psc_delta_ps::get_status( DictionaryDatum& d ) const +iaf_psc_delta_ps::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_delta_ps::set_status( const DictionaryDatum& d ) +iaf_psc_delta_ps::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d ); // throws if BadProperty diff --git a/models/iaf_psc_exp.cpp b/models/iaf_psc_exp.cpp index e4c182e94c..1da64a1d56 100644 --- a/models/iaf_psc_exp.cpp +++ b/models/iaf_psc_exp.cpp @@ -98,31 +98,31 @@ nest::iaf_psc_exp::State_::State_() * ---------------------------------------------------------------- */ void -nest::iaf_psc_exp::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_psc_exp::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); // resting potential - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, Theta_ + E_L_ ); // threshold value - def< double >( d, names::V_reset, V_reset_ + E_L_ ); - def< double >( d, names::C_m, C_ ); - def< double >( d, names::tau_m, Tau_ ); - def< double >( d, names::tau_syn_ex, tau_ex_ ); - def< double >( d, names::tau_syn_in, tau_in_ ); - def< double >( d, names::t_ref, t_ref_ ); - def< double >( d, names::rho, rho_ ); - def< double >( d, names::delta, delta_ ); + d[ names::E_L.toString() ] = E_L_; // resting potential + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = Theta_ + E_L_; // threshold value + d[ names::V_reset.toString() ] = V_reset_ + E_L_; + d[ names::C_m.toString() ] = C_; + d[ names::tau_m.toString() ] = Tau_; + d[ names::tau_syn_ex.toString() ] = tau_ex_; + d[ names::tau_syn_in.toString() ] = tau_in_; + d[ names::t_ref.toString() ] = t_ref_; + d[ names::rho.toString() ] = rho_; + d[ names::delta.toString() ] = delta_; } double -nest::iaf_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( updateValueParam< double >( d, names::V_reset, V_reset_, node ) ) + if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -131,7 +131,7 @@ nest::iaf_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) V_reset_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_th, Theta_, node ) ) + if ( update_value_param( d, names::V_th.toString(), Theta_, node ) ) { Theta_ -= E_L_; } @@ -140,12 +140,12 @@ nest::iaf_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) Theta_ -= delta_EL; } - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, C_, node ); - updateValueParam< double >( d, names::tau_m, Tau_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_in_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), C_, node ); + update_value_param( d, names::tau_m.toString(), Tau_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); if ( V_reset_ >= Theta_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -163,13 +163,13 @@ nest::iaf_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) throw BadProperty( "Refractory time must not be negative." ); } - updateValue< double >( d, "rho", rho_ ); + d.update_value( "rho", rho_ ); if ( rho_ < 0 ) { throw BadProperty( "Stochastic firing intensity must not be negative." ); } - updateValue< double >( d, "delta", delta_ ); + d.update_value( "delta", delta_ ); if ( delta_ < 0 ) { throw BadProperty( "Width of threshold region must not be negative." ); @@ -179,15 +179,15 @@ nest::iaf_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::iaf_psc_exp::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::iaf_psc_exp::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, V_m_ + p.E_L_ ); // Membrane potential + d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential } void -nest::iaf_psc_exp::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node ) +nest::iaf_psc_exp::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( updateValueParam< double >( d, names::V_m, V_m_, node ) ) + if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) { V_m_ -= p.E_L_; } diff --git a/models/iaf_psc_exp.h b/models/iaf_psc_exp.h index 3bf1024e66..16fd8ddb7b 100644 --- a/models/iaf_psc_exp.h +++ b/models/iaf_psc_exp.h @@ -186,8 +186,8 @@ class iaf_psc_exp : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -245,12 +245,12 @@ class iaf_psc_exp : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); + double set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -273,14 +273,14 @@ class iaf_psc_exp : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, const double, Node* ); + void set( const dictionary&, const Parameters_&, const double, Node* ); }; // ---------------------------------------------------------------- @@ -427,17 +427,17 @@ iaf_psc_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -iaf_psc_exp::get_status( DictionaryDatum& d ) const +iaf_psc_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_exp::set_status( const DictionaryDatum& d ) +iaf_psc_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_psc_exp_htum.cpp b/models/iaf_psc_exp_htum.cpp index 3a78267dbe..b6c64db56a 100644 --- a/models/iaf_psc_exp_htum.cpp +++ b/models/iaf_psc_exp_htum.cpp @@ -95,30 +95,30 @@ nest::iaf_psc_exp_htum::State_::State_() * ---------------------------------------------------------------- */ void -nest::iaf_psc_exp_htum::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_psc_exp_htum::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); // Resting potential - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, Theta_ + E_L_ ); // threshold value - def< double >( d, names::V_reset, V_reset_ + E_L_ ); - def< double >( d, names::C_m, C_ ); - def< double >( d, names::tau_m, Tau_ ); - def< double >( d, names::tau_syn_ex, tau_ex_ ); - def< double >( d, names::tau_syn_in, tau_in_ ); - def< double >( d, names::t_ref_abs, tau_ref_abs_ ); - def< double >( d, names::t_ref_tot, tau_ref_tot_ ); + d[ names::E_L.toString() ] = E_L_; // Resting potential + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = Theta_ + E_L_; // threshold value + d[ names::V_reset.toString() ] = V_reset_ + E_L_; + d[ names::C_m.toString() ] = C_; + d[ names::tau_m.toString() ] = Tau_; + d[ names::tau_syn_ex.toString() ] = tau_ex_; + d[ names::tau_syn_in.toString() ] = tau_in_; + d[ names::t_ref_abs.toString() ] = tau_ref_abs_; + d[ names::t_ref_tot.toString() ] = tau_ref_tot_; } double -nest::iaf_psc_exp_htum::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_psc_exp_htum::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( updateValueParam< double >( d, names::V_reset, V_reset_, node ) ) + if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -127,7 +127,7 @@ nest::iaf_psc_exp_htum::Parameters_::set( const DictionaryDatum& d, Node* node ) V_reset_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_th, Theta_, node ) ) + if ( update_value_param( d, names::V_th.toString(), Theta_, node ) ) { Theta_ -= E_L_; } @@ -136,13 +136,13 @@ nest::iaf_psc_exp_htum::Parameters_::set( const DictionaryDatum& d, Node* node ) Theta_ -= delta_EL; } - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, C_, node ); - updateValueParam< double >( d, names::tau_m, Tau_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_in_, node ); - updateValueParam< double >( d, names::t_ref_abs, tau_ref_abs_, node ); - updateValueParam< double >( d, names::t_ref_tot, tau_ref_tot_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), C_, node ); + update_value_param( d, names::tau_m.toString(), Tau_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); + update_value_param( d, names::t_ref_abs.toString(), tau_ref_abs_, node ); + update_value_param( d, names::t_ref_tot.toString(), tau_ref_tot_, node ); if ( V_reset_ >= Theta_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -166,15 +166,15 @@ nest::iaf_psc_exp_htum::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::iaf_psc_exp_htum::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::iaf_psc_exp_htum::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, V_m_ + p.E_L_ ); // Membrane potential + d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential } void -nest::iaf_psc_exp_htum::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node ) +nest::iaf_psc_exp_htum::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( updateValueParam< double >( d, names::V_m, V_m_, node ) ) + if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) { V_m_ -= p.E_L_; } diff --git a/models/iaf_psc_exp_htum.h b/models/iaf_psc_exp_htum.h index 014c712766..f9867450e7 100644 --- a/models/iaf_psc_exp_htum.h +++ b/models/iaf_psc_exp_htum.h @@ -170,8 +170,8 @@ class iaf_psc_exp_htum : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -221,12 +221,12 @@ class iaf_psc_exp_htum : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); + double set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -248,14 +248,14 @@ class iaf_psc_exp_htum : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double delta_EL, Node* ); + void set( const dictionary&, const Parameters_&, double delta_EL, Node* ); }; // ---------------------------------------------------------------- @@ -382,16 +382,16 @@ iaf_psc_exp_htum::handles_test_event( DataLoggingRequest& dlr, rport receptor_ty inline void -iaf_psc_exp_htum::get_status( DictionaryDatum& d ) const +iaf_psc_exp_htum::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_exp_htum::set_status( const DictionaryDatum& d ) +iaf_psc_exp_htum::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_psc_exp_multisynapse.cpp b/models/iaf_psc_exp_multisynapse.cpp index e2b2c4ce2e..d3be1fa7a1 100644 --- a/models/iaf_psc_exp_multisynapse.cpp +++ b/models/iaf_psc_exp_multisynapse.cpp @@ -117,32 +117,32 @@ iaf_psc_exp_multisynapse::State_::State_() * ---------------------------------------------------------------- */ void -iaf_psc_exp_multisynapse::Parameters_::get( DictionaryDatum& d ) const +iaf_psc_exp_multisynapse::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); // resting potential - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, Theta_ + E_L_ ); // threshold value - def< double >( d, names::V_reset, V_reset_ + E_L_ ); - def< double >( d, names::C_m, C_ ); - def< double >( d, names::tau_m, Tau_ ); - def< double >( d, names::t_ref, refractory_time_ ); - def< int >( d, names::n_synapses, n_receptors_() ); - def< bool >( d, names::has_connections, has_connections_ ); + d[ names::E_L.toString() ] = E_L_; // resting potential + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = Theta_ + E_L_; // threshold value + d[ names::V_reset.toString() ] = V_reset_ + E_L_; + d[ names::C_m.toString() ] = C_; + d[ names::tau_m.toString() ] = Tau_; + d[ names::t_ref.toString() ] = refractory_time_; + d[ names::n_synapses.toString() ] = n_receptors_(); + d[ names::has_connections.toString() ] = has_connections_; ArrayDatum tau_syn_ad( tau_syn_ ); - def< ArrayDatum >( d, names::tau_syn, tau_syn_ad ); + d[ names::tau_syn.toString() ] = tau_syn_ad; } double -iaf_psc_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node ) +iaf_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( updateValueParam< double >( d, names::V_reset, V_reset_, node ) ) + if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -150,7 +150,7 @@ iaf_psc_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node { V_reset_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_th, Theta_, node ) ) + if ( update_value_param( d, names::V_th.toString(), Theta_, node ) ) { Theta_ -= E_L_; } @@ -159,10 +159,10 @@ iaf_psc_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node Theta_ -= delta_EL; } - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, C_, node ); - updateValueParam< double >( d, names::tau_m, Tau_, node ); - updateValueParam< double >( d, names::t_ref, refractory_time_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), C_, node ); + update_value_param( d, names::tau_m.toString(), Tau_, node ); + update_value_param( d, names::t_ref.toString(), refractory_time_, node ); if ( C_ <= 0 ) { @@ -173,7 +173,7 @@ iaf_psc_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node throw BadProperty( "Membrane time constant must be strictly positive." ); } const size_t old_n_receptors = this->n_receptors_(); - if ( updateValue< std::vector< double > >( d, "tau_syn", tau_syn_ ) ) + if ( d.update_value( "tau_syn", tau_syn_ ) ) { if ( this->n_receptors_() != old_n_receptors && has_connections_ == true ) { @@ -204,18 +204,18 @@ iaf_psc_exp_multisynapse::Parameters_::set( const DictionaryDatum& d, Node* node } void -iaf_psc_exp_multisynapse::State_::get( DictionaryDatum& d, const Parameters_& p ) const +iaf_psc_exp_multisynapse::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, V_m_ + p.E_L_ ); // Membrane potential + d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential } void -iaf_psc_exp_multisynapse::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node ) +iaf_psc_exp_multisynapse::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { // If the dictionary contains a value for the membrane potential, V_m, adjust // it with the resting potential, E_L_. If not, adjust the membrane potential // with the provided change in resting potential. - if ( updateValueParam< double >( d, names::V_m, V_m_, node ) ) + if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) { V_m_ -= p.E_L_; } @@ -393,7 +393,7 @@ iaf_psc_exp_multisynapse::handle( DataLoggingRequest& e ) } void -iaf_psc_exp_multisynapse::set_status( const DictionaryDatum& d ) +iaf_psc_exp_multisynapse::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_psc_exp_multisynapse.h b/models/iaf_psc_exp_multisynapse.h index aa4b6ef82e..7f3e31d9a9 100644 --- a/models/iaf_psc_exp_multisynapse.h +++ b/models/iaf_psc_exp_multisynapse.h @@ -113,8 +113,8 @@ class iaf_psc_exp_multisynapse : public ArchivingNode port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -166,12 +166,12 @@ class iaf_psc_exp_multisynapse : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); + double set( const dictionary&, Node* node ); }; // Parameters_ // ---------------------------------------------------------------- @@ -214,14 +214,14 @@ class iaf_psc_exp_multisynapse : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, const double, Node* ); + void set( const dictionary&, const Parameters_&, const double, Node* ); }; // State_ // ---------------------------------------------------------------- @@ -346,13 +346,13 @@ iaf_psc_exp_multisynapse::handles_test_event( DataLoggingRequest& dlr, rport rec } inline void -iaf_psc_exp_multisynapse::get_status( DictionaryDatum& d ) const +iaf_psc_exp_multisynapse::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } } // namespace diff --git a/models/iaf_psc_exp_ps.cpp b/models/iaf_psc_exp_ps.cpp index 6027964e53..01a30997ae 100644 --- a/models/iaf_psc_exp_ps.cpp +++ b/models/iaf_psc_exp_ps.cpp @@ -105,37 +105,37 @@ nest::iaf_psc_exp_ps::Buffers_::Buffers_( const Buffers_&, iaf_psc_exp_ps& n ) * ---------------------------------------------------------------- */ void -nest::iaf_psc_exp_ps::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_psc_exp_ps::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, U_th_ + E_L_ ); - def< double >( d, names::V_min, U_min_ + E_L_ ); - def< double >( d, names::V_reset, U_reset_ + E_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::tau_syn_ex, tau_ex_ ); - def< double >( d, names::tau_syn_in, tau_in_ ); - def< double >( d, names::t_ref, t_ref_ ); + d[ names::E_L.toString() ] = E_L_; + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = U_th_ + E_L_; + d[ names::V_min.toString() ] = U_min_ + E_L_; + d[ names::V_reset.toString() ] = U_reset_ + E_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::tau_syn_ex.toString() ] = tau_ex_; + d[ names::tau_syn_in.toString() ] = tau_in_; + d[ names::t_ref.toString() ] = t_ref_; } double -nest::iaf_psc_exp_ps::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_psc_exp_ps::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - updateValueParam< double >( d, names::tau_m, tau_m_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_in_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::I_e, I_e_, node ); + update_value_param( d, names::tau_m.toString(), tau_m_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); - if ( updateValueParam< double >( d, names::V_th, U_th_, node ) ) + if ( update_value_param( d, names::V_th.toString(), U_th_, node ) ) { U_th_ -= E_L_; } @@ -144,7 +144,7 @@ nest::iaf_psc_exp_ps::Parameters_::set( const DictionaryDatum& d, Node* node ) U_th_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_min, U_min_, node ) ) + if ( update_value_param( d, names::V_min.toString(), U_min_, node ) ) { U_min_ -= E_L_; } @@ -153,7 +153,7 @@ nest::iaf_psc_exp_ps::Parameters_::set( const DictionaryDatum& d, Node* node ) U_min_ -= delta_EL; } - if ( updateValueParam< double >( d, names::V_reset, U_reset_, node ) ) + if ( update_value_param( d, names::V_reset.toString(), U_reset_, node ) ) { U_reset_ -= E_L_; } @@ -187,18 +187,18 @@ nest::iaf_psc_exp_ps::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::iaf_psc_exp_ps::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::iaf_psc_exp_ps::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, y2_ + p.E_L_ ); // Membrane potential - def< double >( d, names::I_syn_ex, y1_ex_ ); // Excitatory synaptic current - def< double >( d, names::I_syn_in, y1_in_ ); // Inhibitory synaptic current - def< bool >( d, names::is_refractory, is_refractory_ ); + d[ names::V_m.toString() ] = y2_ + p.E_L_; // Membrane potential + d[ names::I_syn_ex.toString() ] = y1_ex_; // Excitatory synaptic current + d[ names::I_syn_in.toString() ] = y1_in_; // Inhibitory synaptic current + d[ names::is_refractory.toString() ] = is_refractory_; } void -nest::iaf_psc_exp_ps::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node ) +nest::iaf_psc_exp_ps::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( updateValueParam< double >( d, names::V_m, y2_, node ) ) + if ( update_value_param( d, names::V_m.toString(), y2_, node ) ) { y2_ -= p.E_L_; } @@ -206,8 +206,8 @@ nest::iaf_psc_exp_ps::State_::set( const DictionaryDatum& d, const Parameters_& { y2_ -= delta_EL; } - updateValueParam< double >( d, names::I_syn_ex, y1_ex_, node ); - updateValueParam< double >( d, names::I_syn_in, y1_in_, node ); + update_value_param( d, names::I_syn_ex.toString(), y1_ex_, node ); + update_value_param( d, names::I_syn_in.toString(), y1_in_, node ); } /* ---------------------------------------------------------------- diff --git a/models/iaf_psc_exp_ps.h b/models/iaf_psc_exp_ps.h index c2bdf48b57..05a01bfea2 100644 --- a/models/iaf_psc_exp_ps.h +++ b/models/iaf_psc_exp_ps.h @@ -186,8 +186,8 @@ class iaf_psc_exp_ps : public ArchivingNode return true; } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); /** * Based on the current state, compute the value of the membrane potential @@ -306,12 +306,12 @@ class iaf_psc_exp_ps : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); + double set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -332,14 +332,14 @@ class iaf_psc_exp_ps : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double, Node* ); + void set( const dictionary&, const Parameters_&, double, Node* ); }; // ---------------------------------------------------------------- @@ -451,17 +451,17 @@ iaf_psc_exp_ps::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -iaf_psc_exp_ps::get_status( DictionaryDatum& d ) const +iaf_psc_exp_ps::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_exp_ps::set_status( const DictionaryDatum& d ) +iaf_psc_exp_ps::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/iaf_psc_exp_ps_lossless.cpp b/models/iaf_psc_exp_ps_lossless.cpp index e0035a1553..1669f3ec68 100644 --- a/models/iaf_psc_exp_ps_lossless.cpp +++ b/models/iaf_psc_exp_ps_lossless.cpp @@ -107,37 +107,37 @@ nest::iaf_psc_exp_ps_lossless::Buffers_::Buffers_( const Buffers_&, iaf_psc_exp_ * Parameter and state extractions and manipulation functions * ---------------------------------------------------------------- */ void -nest::iaf_psc_exp_ps_lossless::Parameters_::get( DictionaryDatum& d ) const +nest::iaf_psc_exp_ps_lossless::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, U_th_ + E_L_ ); - def< double >( d, names::V_min, U_min_ + E_L_ ); - def< double >( d, names::V_reset, U_reset_ + E_L_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::tau_syn_ex, tau_ex_ ); - def< double >( d, names::tau_syn_in, tau_in_ ); - def< double >( d, names::t_ref, t_ref_ ); + d[ names::E_L.toString() ] = E_L_; + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = U_th_ + E_L_; + d[ names::V_min.toString() ] = U_min_ + E_L_; + d[ names::V_reset.toString() ] = U_reset_ + E_L_; + d[ names::C_m.toString() ] = c_m_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::tau_syn_ex.toString() ] = tau_ex_; + d[ names::tau_syn_in.toString() ] = tau_in_; + d[ names::t_ref.toString() ] = t_ref_; } double -nest::iaf_psc_exp_ps_lossless::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::iaf_psc_exp_ps_lossless::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double E_L_old = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_E_L = E_L_ - E_L_old; - updateValueParam< double >( d, names::tau_m, tau_m_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_in_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); - updateValueParam< double >( d, names::I_e, I_e_, node ); + update_value_param( d, names::tau_m.toString(), tau_m_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); - if ( updateValueParam< double >( d, names::V_th, U_th_, node ) ) + if ( update_value_param( d, names::V_th.toString(), U_th_, node ) ) { U_th_ -= E_L_; } @@ -146,7 +146,7 @@ nest::iaf_psc_exp_ps_lossless::Parameters_::set( const DictionaryDatum& d, Node* U_th_ -= delta_E_L; } - if ( updateValueParam< double >( d, names::V_min, U_min_, node ) ) + if ( update_value_param( d, names::V_min.toString(), U_min_, node ) ) { U_min_ -= E_L_; } @@ -155,7 +155,7 @@ nest::iaf_psc_exp_ps_lossless::Parameters_::set( const DictionaryDatum& d, Node* U_min_ -= delta_E_L; } - if ( updateValueParam< double >( d, names::V_reset, U_reset_, node ) ) + if ( update_value_param( d, names::V_reset.toString(), U_reset_, node ) ) { U_reset_ -= E_L_; } @@ -208,24 +208,21 @@ nest::iaf_psc_exp_ps_lossless::Parameters_::set( const DictionaryDatum& d, Node* } void -nest::iaf_psc_exp_ps_lossless::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::iaf_psc_exp_ps_lossless::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, y2_ + p.E_L_ ); // Membrane potential - def< bool >( d, names::is_refractory, is_refractory_ ); - def< double >( d, names::t_spike, Time( Time::step( last_spike_step_ ) ).get_ms() ); - def< double >( d, names::offset, last_spike_offset_ ); - def< double >( d, names::I_syn_ex, I_syn_ex_ ); - def< double >( d, names::I_syn_in, I_syn_in_ ); - def< double >( d, names::I_syn, I_syn_ex_ + I_syn_in_ ); + d[ names::V_m.toString() ] = y2_ + p.E_L_; // Membrane potential + d[ names::is_refractory.toString() ] = is_refractory_; + d[ names::t_spike.toString() ] = Time( Time::step( last_spike_step_ ) ).get_ms(); + d[ names::offset.toString() ] = last_spike_offset_; + d[ names::I_syn_ex.toString() ] = I_syn_ex_; + d[ names::I_syn_in.toString() ] = I_syn_in_; + d[ names::I_syn.toString() ] = I_syn_ex_ + I_syn_in_; } void -nest::iaf_psc_exp_ps_lossless::State_::set( const DictionaryDatum& d, - const Parameters_& p, - double delta_EL, - Node* node ) +nest::iaf_psc_exp_ps_lossless::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( updateValueParam< double >( d, names::V_m, y2_, node ) ) + if ( update_value_param( d, names::V_m.toString(), y2_, node ) ) { y2_ -= p.E_L_; } @@ -234,8 +231,8 @@ nest::iaf_psc_exp_ps_lossless::State_::set( const DictionaryDatum& d, y2_ -= delta_EL; } - updateValueParam< double >( d, names::I_syn_ex, I_syn_ex_, node ); - updateValueParam< double >( d, names::I_syn_in, I_syn_in_, node ); + update_value_param( d, names::I_syn_ex.toString(), I_syn_ex_, node ); + update_value_param( d, names::I_syn_in.toString(), I_syn_in_, node ); } /* ---------------------------------------------------------------- diff --git a/models/iaf_psc_exp_ps_lossless.h b/models/iaf_psc_exp_ps_lossless.h index e512acba01..0dfee6f939 100644 --- a/models/iaf_psc_exp_ps_lossless.h +++ b/models/iaf_psc_exp_ps_lossless.h @@ -181,8 +181,8 @@ class iaf_psc_exp_ps_lossless : public ArchivingNode return true; } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); /** * Based on the current state, compute the value of the membrane potential @@ -316,8 +316,8 @@ class iaf_psc_exp_ps_lossless : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - double set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + double set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ---------------------------------------------------------------- @@ -338,8 +338,8 @@ class iaf_psc_exp_ps_lossless : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, double delta_EL, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, double delta_EL, Node* ); }; // ---------------------------------------------------------------- @@ -497,15 +497,15 @@ iaf_psc_exp_ps_lossless::handles_test_event( DataLoggingRequest& dlr, port recep } inline void -iaf_psc_exp_ps_lossless::get_status( DictionaryDatum& d ) const +iaf_psc_exp_ps_lossless::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -iaf_psc_exp_ps_lossless::set_status( const DictionaryDatum& d ) +iaf_psc_exp_ps_lossless::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/inhomogeneous_poisson_generator.cpp b/models/inhomogeneous_poisson_generator.cpp index 20691e4fc6..858dc0f748 100644 --- a/models/inhomogeneous_poisson_generator.cpp +++ b/models/inhomogeneous_poisson_generator.cpp @@ -62,7 +62,7 @@ nest::inhomogeneous_poisson_generator::Parameters_::Parameters_() * ---------------------------------------------------------------- */ void -nest::inhomogeneous_poisson_generator::Parameters_::get( DictionaryDatum& d ) const +nest::inhomogeneous_poisson_generator::Parameters_::get( dictionary& d ) const { const size_t n_rates = rate_times_.size(); std::vector< double >* times_ms = new std::vector< double >(); @@ -72,9 +72,9 @@ nest::inhomogeneous_poisson_generator::Parameters_::get( DictionaryDatum& d ) co times_ms->push_back( rate_times_[ n ].get_ms() ); } - ( *d )[ names::rate_times ] = DoubleVectorDatum( times_ms ); - ( *d )[ names::rate_values ] = DoubleVectorDatum( new std::vector< double >( rate_values_ ) ); - ( *d )[ names::allow_offgrid_times ] = BoolDatum( allow_offgrid_times_ ); + d[ names::rate_times.toString() ] = DoubleVectorDatum( times_ms ); + d[ names::rate_values.toString() ] = DoubleVectorDatum( new std::vector< double >( rate_values_ ) ); + d[ names::allow_offgrid_times.toString() ] = BoolDatum( allow_offgrid_times_ ); } void @@ -114,16 +114,16 @@ nest::inhomogeneous_poisson_generator::Parameters_::assert_valid_rate_time_and_i } void -nest::inhomogeneous_poisson_generator::Parameters_::set( const DictionaryDatum& d, Buffers_& b, Node* ) +nest::inhomogeneous_poisson_generator::Parameters_::set( const dictionary& d, Buffers_& b, Node* ) { - const bool times = d->known( names::rate_times ); - const bool rates = updateValue< std::vector< double > >( d, names::rate_values, rate_values_ ); + const bool times = d.known( names::rate_times.toString() ); + const bool rates = d.update_value( names::rate_values.toString(), rate_values_ ); // if offgrid flag changes, it must be done so either before any rates are // set or when setting new rates (which removes old ones) - if ( d->known( names::allow_offgrid_times ) ) + if ( d.known( names::allow_offgrid_times.toString() ) ) { - const bool flag_offgrid = d->lookup( names::allow_offgrid_times ); + const auto flag_offgrid = d.get< bool >( names::allow_offgrid_times.toString() ); if ( flag_offgrid != allow_offgrid_times_ and not( times or rate_times_.empty() ) ) { @@ -148,7 +148,7 @@ nest::inhomogeneous_poisson_generator::Parameters_::set( const DictionaryDatum& return; } - const std::vector< double > d_times = getValue< std::vector< double > >( d->lookup( names::rate_times ) ); + const auto d_times = d.get< std::vector< double > >( names::rate_times.toString() ); if ( d_times.empty() ) { @@ -305,7 +305,8 @@ nest::inhomogeneous_poisson_generator::set_data_from_stimulation_backend( std::v throw BadParameterValue( "The size of the data for the inhomogeneous_poisson_generator needs to be even [(time,rate) pairs]" ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); + dictionary d; + ( new Dictionary ); std::vector< double > times_ms; std::vector< double > rate_values; const size_t n_spikes = P_.rate_times_.size(); @@ -319,8 +320,8 @@ nest::inhomogeneous_poisson_generator::set_data_from_stimulation_backend( std::v times_ms.push_back( rate_time_update[ n * 2 ] ); rate_values.push_back( rate_time_update[ n * 2 + 1 ] ); } - ( *d )[ names::rate_times ] = DoubleVectorDatum( times_ms ); - ( *d )[ names::rate_values ] = DoubleVectorDatum( rate_values ); + d[ names::rate_times.toString() ] = DoubleVectorDatum( times_ms ); + d[ names::rate_values.toString() ] = DoubleVectorDatum( rate_values ); ptmp.set( d, B_, this ); } diff --git a/models/inhomogeneous_poisson_generator.h b/models/inhomogeneous_poisson_generator.h index 9a230b44dc..7007649b1b 100644 --- a/models/inhomogeneous_poisson_generator.h +++ b/models/inhomogeneous_poisson_generator.h @@ -113,8 +113,8 @@ class inhomogeneous_poisson_generator : public StimulationDevice port send_test_event( Node&, rport, synindex, bool ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; void set_data_from_stimulation_backend( std::vector< double >& input_param ) override; @@ -145,9 +145,9 @@ class inhomogeneous_poisson_generator : public StimulationDevice Parameters_( const Parameters_&, Buffers_& ); //!< Store current values in dictionary - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; //!< Set values from dictionary - void set( const DictionaryDatum&, Buffers_&, Node* ); + void set( const dictionary&, Buffers_&, Node* ); //!< Align rate time to grid if necessary and insert it into rate_times_ void assert_valid_rate_time_and_insert( const double t ); }; @@ -201,14 +201,14 @@ inhomogeneous_poisson_generator::send_test_event( Node& target, inline void -inhomogeneous_poisson_generator::get_status( DictionaryDatum& d ) const +inhomogeneous_poisson_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); } inline void -inhomogeneous_poisson_generator::set_status( const DictionaryDatum& d ) +inhomogeneous_poisson_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors diff --git a/models/izhikevich.cpp b/models/izhikevich.cpp index 889f958f51..3dce0e3d14 100644 --- a/models/izhikevich.cpp +++ b/models/izhikevich.cpp @@ -89,30 +89,30 @@ nest::izhikevich::State_::State_() * ---------------------------------------------------------------- */ void -nest::izhikevich::Parameters_::get( DictionaryDatum& d ) const +nest::izhikevich::Parameters_::get( dictionary& d ) const { - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::V_th, V_th_ ); // threshold value - def< double >( d, names::V_min, V_min_ ); - def< double >( d, names::a, a_ ); - def< double >( d, names::b, b_ ); - def< double >( d, names::c, c_ ); - def< double >( d, names::d, d_ ); - def< bool >( d, names::consistent_integration, consistent_integration_ ); + d[ names::I_e.toString() ] = I_e_; + d[ names::V_th.toString() ] = V_th_; // threshold value + d[ names::V_min.toString() ] = V_min_; + d[ names::a.toString() ] = a_; + d[ names::b.toString() ] = b_; + d[ names::c.toString() ] = c_; + d[ names::d.toString() ] = d_; + d[ names::consistent_integration.toString() ] = consistent_integration_; } void -nest::izhikevich::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::izhikevich::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::V_th, V_th_, node ); - updateValueParam< double >( d, names::V_min, V_min_, node ); - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::a, a_, node ); - updateValueParam< double >( d, names::b, b_, node ); - updateValueParam< double >( d, names::c, c_, node ); - updateValueParam< double >( d, names::d, d_, node ); - updateValue< bool >( d, names::consistent_integration, consistent_integration_ ); + update_value_param( d, names::V_th.toString(), V_th_, node ); + update_value_param( d, names::V_min.toString(), V_min_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::a.toString(), a_, node ); + update_value_param( d, names::b.toString(), b_, node ); + update_value_param( d, names::c.toString(), c_, node ); + update_value_param( d, names::d.toString(), d_, node ); + d.update_value( names::consistent_integration.toString(), consistent_integration_ ); const double h = Time::get_resolution().get_ms(); if ( not consistent_integration_ && h != 1.0 ) { @@ -121,17 +121,17 @@ nest::izhikevich::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::izhikevich::State_::get( DictionaryDatum& d, const Parameters_& ) const +nest::izhikevich::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::U_m, u_ ); // Membrane potential recovery variable - def< double >( d, names::V_m, v_ ); // Membrane potential + d[ names::U_m.toString() ] = u_; // Membrane potential recovery variable + d[ names::V_m.toString() ] = v_; // Membrane potential } void -nest::izhikevich::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::izhikevich::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::U_m, u_, node ); - updateValueParam< double >( d, names::V_m, v_, node ); + update_value_param( d, names::U_m.toString(), u_, node ); + update_value_param( d, names::V_m.toString(), v_, node ); } nest::izhikevich::Buffers_::Buffers_( izhikevich& n ) diff --git a/models/izhikevich.h b/models/izhikevich.h index 66fa5cd85a..b8023e1323 100644 --- a/models/izhikevich.h +++ b/models/izhikevich.h @@ -143,8 +143,8 @@ class izhikevich : public ArchivingNode port send_test_event( Node&, rport, synindex, bool ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: friend class RecordablesMap< izhikevich >; @@ -181,8 +181,8 @@ class izhikevich : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ---------------------------------------------------------------- @@ -203,8 +203,8 @@ class izhikevich : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -302,16 +302,16 @@ izhikevich::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -izhikevich::get_status( DictionaryDatum& d ) const +izhikevich::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -izhikevich::set_status( const DictionaryDatum& d ) +izhikevich::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/jonke_synapse.h b/models/jonke_synapse.h index 0158441e05..db06b650b1 100644 --- a/models/jonke_synapse.h +++ b/models/jonke_synapse.h @@ -138,12 +138,12 @@ class JonkeCommonProperties : public CommonSynapseProperties /** * Get all properties and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); double alpha_; double beta_; @@ -167,31 +167,31 @@ JonkeCommonProperties::JonkeCommonProperties() } void -JonkeCommonProperties::get_status( DictionaryDatum& d ) const +JonkeCommonProperties::get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - def< double >( d, names::alpha, alpha_ ); - def< double >( d, names::beta, beta_ ); - def< double >( d, names::lambda, lambda_ ); - def< double >( d, names::mu_plus, mu_plus_ ); - def< double >( d, names::mu_minus, mu_minus_ ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::Wmax, Wmax_ ); + d[ names::alpha.toString() ] = alpha_; + d[ names::beta.toString() ] = beta_; + d[ names::lambda.toString() ] = lambda_; + d[ names::mu_plus.toString() ] = mu_plus_; + d[ names::mu_minus.toString() ] = mu_minus_; + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::Wmax.toString() ] = Wmax_; } void -JonkeCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +JonkeCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - updateValue< double >( d, names::alpha, alpha_ ); - updateValue< double >( d, names::beta, beta_ ); - updateValue< double >( d, names::lambda, lambda_ ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::mu_plus, mu_plus_ ); - updateValue< double >( d, names::mu_minus, mu_minus_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::alpha.toString(), alpha_ ); + d.update_value( names::beta.toString(), beta_ ); + d.update_value( names::lambda.toString(), lambda_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::mu_plus.toString(), mu_plus_ ); + d.update_value( names::mu_minus.toString(), mu_minus_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); } @@ -230,19 +230,19 @@ class jonke_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Checks to see if illegal parameters are given in syn_spec. * * The illegal parameters are: "alpha", "beta", "lambda", "mu_plus", "mu_minus", "tau_plus", "Wmax" */ - void check_synapse_params( const DictionaryDatum& d ) const; + void check_synapse_params( const dictionary& d ) const; /** * Send an event to the receiver of this connection. @@ -394,31 +394,31 @@ jonke_synapse< targetidentifierT >::jonke_synapse() template < typename targetidentifierT > void -jonke_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +jonke_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -jonke_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +jonke_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); } template < typename targetidentifierT > void -jonke_synapse< targetidentifierT >::check_synapse_params( const DictionaryDatum& syn_spec ) const +jonke_synapse< targetidentifierT >::check_synapse_params( const dictionary& syn_spec ) const { std::string param_arr[] = { "alpha", "beta", "lambda", "mu_plus", "mu_minus", "tau_plus", "Wmax" }; const size_t n_param = sizeof( param_arr ) / sizeof( std::string ); for ( size_t n = 0; n < n_param; ++n ) { - if ( syn_spec->known( param_arr[ n ] ) ) + if ( syn_spec.known( param_arr[ n ] ) ) { throw NotImplemented( "Connect doesn't support the setting of parameter param_arr[ n ]" diff --git a/models/lin_rate.cpp b/models/lin_rate.cpp index 9beb70789e..4ea56864ff 100644 --- a/models/lin_rate.cpp +++ b/models/lin_rate.cpp @@ -26,23 +26,23 @@ namespace nest { void -nonlinearities_lin_rate::get( DictionaryDatum& d ) const +nonlinearities_lin_rate::get( dictionary& d ) const { - def< double >( d, names::g, g_ ); - def< double >( d, names::g_ex, g_ex_ ); - def< double >( d, names::g_in, g_in_ ); - def< double >( d, names::theta_ex, theta_ex_ ); - def< double >( d, names::theta_in, theta_in_ ); + d[ names::g.toString() ] = g_; + d[ names::g_ex.toString() ] = g_ex_; + d[ names::g_in.toString() ] = g_in_; + d[ names::theta_ex.toString() ] = theta_ex_; + d[ names::theta_in.toString() ] = theta_in_; } void -nonlinearities_lin_rate::set( const DictionaryDatum& d, Node* node ) +nonlinearities_lin_rate::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::g, g_, node ); - updateValueParam< double >( d, names::g_ex, g_ex_, node ); - updateValueParam< double >( d, names::g_in, g_in_, node ); - updateValueParam< double >( d, names::theta_ex, theta_ex_, node ); - updateValueParam< double >( d, names::theta_in, theta_in_, node ); + update_value_param( d, names::g.toString(), g_, node ); + update_value_param( d, names::g_ex.toString(), g_ex_, node ); + update_value_param( d, names::g_in.toString(), g_in_, node ); + update_value_param( d, names::theta_ex.toString(), theta_ex_, node ); + update_value_param( d, names::theta_in.toString(), theta_in_, node ); } /* diff --git a/models/lin_rate.h b/models/lin_rate.h index 84af8e64d0..106b95e98b 100644 --- a/models/lin_rate.h +++ b/models/lin_rate.h @@ -147,8 +147,8 @@ class nonlinearities_lin_rate { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary double input( double h ); // non-linearity on input double mult_coupling_ex( double rate ); // factor of multiplicative coupling diff --git a/models/mat2_psc_exp.cpp b/models/mat2_psc_exp.cpp index d8efb8aa67..a824fa70de 100644 --- a/models/mat2_psc_exp.cpp +++ b/models/mat2_psc_exp.cpp @@ -100,43 +100,43 @@ nest::mat2_psc_exp::State_::State_() * ---------------------------------------------------------------- */ void -nest::mat2_psc_exp::Parameters_::get( DictionaryDatum& d ) const +nest::mat2_psc_exp::Parameters_::get( dictionary& d ) const { - def< double >( d, names::E_L, E_L_ ); // Resting potential - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::C_m, C_ ); - def< double >( d, names::tau_m, Tau_ ); - def< double >( d, names::tau_syn_ex, tau_ex_ ); - def< double >( d, names::tau_syn_in, tau_in_ ); - def< double >( d, names::t_ref, tau_ref_ ); - def< double >( d, names::tau_1, tau_1_ ); - def< double >( d, names::tau_2, tau_2_ ); - def< double >( d, names::alpha_1, alpha_1_ ); - def< double >( d, names::alpha_2, alpha_2_ ); - def< double >( d, names::omega, omega_ + E_L_ ); + d[ names::E_L.toString() ] = E_L_; // Resting potential + d[ names::I_e.toString() ] = I_e_; + d[ names::C_m.toString() ] = C_; + d[ names::tau_m.toString() ] = Tau_; + d[ names::tau_syn_ex.toString() ] = tau_ex_; + d[ names::tau_syn_in.toString() ] = tau_in_; + d[ names::t_ref.toString() ] = tau_ref_; + d[ names::tau_1.toString() ] = tau_1_; + d[ names::tau_2.toString() ] = tau_2_; + d[ names::alpha_1.toString() ] = alpha_1_; + d[ names::alpha_2.toString() ] = alpha_2_; + d[ names::omega.toString() ] = omega_ + E_L_; } double -nest::mat2_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::mat2_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - updateValueParam< double >( d, names::E_L, E_L_, node ); + update_value_param( d, names::E_L.toString(), E_L_, node ); const double delta_EL = E_L_ - ELold; - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, C_, node ); - updateValueParam< double >( d, names::tau_m, Tau_, node ); - updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node ); - updateValueParam< double >( d, names::tau_syn_in, tau_in_, node ); - updateValueParam< double >( d, names::t_ref, tau_ref_, node ); - updateValueParam< double >( d, names::tau_1, tau_1_, node ); - updateValueParam< double >( d, names::tau_2, tau_2_, node ); - updateValueParam< double >( d, names::alpha_1, alpha_1_, node ); - updateValueParam< double >( d, names::alpha_2, alpha_2_, node ); - - if ( updateValueParam< double >( d, names::omega, omega_, node ) ) + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), C_, node ); + update_value_param( d, names::tau_m.toString(), Tau_, node ); + update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); + update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); + update_value_param( d, names::t_ref.toString(), tau_ref_, node ); + update_value_param( d, names::tau_1.toString(), tau_1_, node ); + update_value_param( d, names::tau_2.toString(), tau_2_, node ); + update_value_param( d, names::alpha_1.toString(), alpha_1_, node ); + update_value_param( d, names::alpha_2.toString(), alpha_2_, node ); + + if ( update_value_param( d, names::omega.toString(), omega_, node ) ) { omega_ -= E_L_; } @@ -163,18 +163,18 @@ nest::mat2_psc_exp::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::mat2_psc_exp::State_::get( DictionaryDatum& d, const Parameters_& p ) const +nest::mat2_psc_exp::State_::get( dictionary& d, const Parameters_& p ) const { - def< double >( d, names::V_m, V_m_ + p.E_L_ ); // Membrane potential - def< double >( d, names::V_th, p.E_L_ + p.omega_ + V_th_1_ + V_th_2_ ); // Adaptive threshold - def< double >( d, names::V_th_alpha_1, V_th_1_ ); - def< double >( d, names::V_th_alpha_2, V_th_2_ ); + d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential + d[ names::V_th.toString() ] = p.E_L_ + p.omega_ + V_th_1_ + V_th_2_; // Adaptive threshold + d[ names::V_th_alpha_1.toString() ] = V_th_1_; + d[ names::V_th_alpha_2.toString() ] = V_th_2_; } void -nest::mat2_psc_exp::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node ) +nest::mat2_psc_exp::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( updateValueParam< double >( d, names::V_m, V_m_, node ) ) + if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) { V_m_ -= p.E_L_; } @@ -183,8 +183,8 @@ nest::mat2_psc_exp::State_::set( const DictionaryDatum& d, const Parameters_& p, V_m_ -= delta_EL; } - updateValueParam< double >( d, names::V_th_alpha_1, V_th_1_, node ); - updateValueParam< double >( d, names::V_th_alpha_2, V_th_2_, node ); + update_value_param( d, names::V_th_alpha_1.toString(), V_th_1_, node ); + update_value_param( d, names::V_th_alpha_2.toString(), V_th_2_, node ); } nest::mat2_psc_exp::Buffers_::Buffers_( mat2_psc_exp& n ) diff --git a/models/mat2_psc_exp.h b/models/mat2_psc_exp.h index 3b107417d6..7778a6f220 100644 --- a/models/mat2_psc_exp.h +++ b/models/mat2_psc_exp.h @@ -168,8 +168,8 @@ class mat2_psc_exp : public ArchivingNode void handle( CurrentEvent& ); void handle( DataLoggingRequest& ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -224,12 +224,12 @@ class mat2_psc_exp : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** Set values from dictionary. * @returns Change in reversal potential E_L, to be passed to State_::set() */ - double set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + double set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ---------------------------------------------------------------- @@ -253,14 +253,14 @@ class mat2_psc_exp : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; + void get( dictionary&, const Parameters_& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, const Parameters_&, double, Node* ); + void set( const dictionary&, const Parameters_&, double, Node* ); }; // ---------------------------------------------------------------- @@ -388,17 +388,17 @@ mat2_psc_exp::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -mat2_psc_exp::get_status( DictionaryDatum& d ) const +mat2_psc_exp::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -mat2_psc_exp::set_status( const DictionaryDatum& d ) +mat2_psc_exp::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors const double delta_EL = ptmp.set( d, this ); // throws if BadProperty diff --git a/models/mcculloch_pitts_neuron.cpp b/models/mcculloch_pitts_neuron.cpp index ae6f1d8b93..65ef125a22 100644 --- a/models/mcculloch_pitts_neuron.cpp +++ b/models/mcculloch_pitts_neuron.cpp @@ -26,15 +26,15 @@ namespace nest { void -gainfunction_mcculloch_pitts::get( DictionaryDatum& d ) const +gainfunction_mcculloch_pitts::get( dictionary& d ) const { - def< double >( d, names::theta, theta_ ); + d[ names::theta.toString() ] = theta_; } void -gainfunction_mcculloch_pitts::set( const DictionaryDatum& d, Node* node ) +gainfunction_mcculloch_pitts::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::theta, theta_, node ); + update_value_param( d, names::theta.toString(), theta_, node ); } /* diff --git a/models/mcculloch_pitts_neuron.h b/models/mcculloch_pitts_neuron.h index 93d22edc04..64a1d0f8b0 100644 --- a/models/mcculloch_pitts_neuron.h +++ b/models/mcculloch_pitts_neuron.h @@ -132,8 +132,8 @@ class gainfunction_mcculloch_pitts { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary bool operator()( RngPtr, double h ); }; diff --git a/models/mip_generator.cpp b/models/mip_generator.cpp index a906153013..167136290d 100644 --- a/models/mip_generator.cpp +++ b/models/mip_generator.cpp @@ -46,17 +46,17 @@ nest::mip_generator::Parameters_::Parameters_() * ---------------------------------------------------------------- */ void -nest::mip_generator::Parameters_::get( DictionaryDatum& d ) const +nest::mip_generator::Parameters_::get( dictionary& d ) const { - ( *d )[ names::rate ] = rate_; - ( *d )[ names::p_copy ] = p_copy_; + d[ names::rate.toString() ] = rate_; + d[ names::p_copy.toString() ] = p_copy_; } void -nest::mip_generator::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::mip_generator::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::rate, rate_, node ); - updateValueParam< double >( d, names::p_copy, p_copy_, node ); + update_value_param( d, names::rate.toString(), rate_, node ); + update_value_param( d, names::p_copy.toString(), p_copy_, node ); if ( rate_ < 0 ) { @@ -194,9 +194,10 @@ nest::mip_generator::set_data_from_stimulation_backend( std::vector< double >& i } else { - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::rate ] = DoubleDatum( input_param[ 0 ] ); - ( *d )[ names::p_copy ] = DoubleDatum( input_param[ 1 ] ); + dictionary d; + ( new Dictionary ); + d[ names::rate.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::p_copy.toString() ] = DoubleDatum( input_param[ 1 ] ); ptmp.set( d, this ); } } diff --git a/models/mip_generator.h b/models/mip_generator.h index cce49c3874..b5e311c75c 100644 --- a/models/mip_generator.h +++ b/models/mip_generator.h @@ -119,8 +119,8 @@ class mip_generator : public StimulationDevice port send_test_event( Node&, rport, synindex, bool ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; void set_data_from_stimulation_backend( std::vector< double >& input_param ) override; @@ -149,8 +149,8 @@ class mip_generator : public StimulationDevice Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ------------------------------------------------------------ @@ -186,14 +186,14 @@ mip_generator::send_test_event( Node& target, rport receptor_type, synindex syn_ } inline void -mip_generator::get_status( DictionaryDatum& d ) const +mip_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); } inline void -mip_generator::set_status( const DictionaryDatum& d ) +mip_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/multimeter.cpp b/models/multimeter.cpp index a24783d40b..e6b1f3f62e 100644 --- a/models/multimeter.cpp +++ b/models/multimeter.cpp @@ -90,23 +90,23 @@ nest::multimeter::Buffers_::Buffers_() } void -nest::multimeter::Parameters_::get( DictionaryDatum& d ) const +nest::multimeter::Parameters_::get( dictionary& d ) const { - ( *d )[ names::interval ] = interval_.get_ms(); - ( *d )[ names::offset ] = offset_.get_ms(); + d[ names::interval.toString() ] = interval_.get_ms(); + d[ names::offset.toString() ] = offset_.get_ms(); ArrayDatum ad; for ( size_t j = 0; j < record_from_.size(); ++j ) { ad.push_back( LiteralDatum( record_from_[ j ] ) ); } - ( *d )[ names::record_from ] = ad; + d[ names::record_from.toString() ] = ad; } void -nest::multimeter::Parameters_::set( const DictionaryDatum& d, const Buffers_& b, Node* node ) +nest::multimeter::Parameters_::set( const dictionary& d, const Buffers_& b, Node* node ) { - if ( b.has_targets_ - && ( d->known( names::interval ) || d->known( names::offset ) || d->known( names::record_from ) ) ) + if ( b.has_targets_ && ( d.known( names::interval.toString() ) || d.known( names::offset.toString() ) + || d.known( names::record_from.toString() ) ) ) { throw BadProperty( "The recording interval, the interval offset and the list of properties " @@ -115,7 +115,7 @@ nest::multimeter::Parameters_::set( const DictionaryDatum& d, const Buffers_& b, } double v; - if ( updateValueParam< double >( d, names::interval, v, node ) ) + if ( update_value_param( d, names::interval.toString(), v, node ) ) { if ( Time( Time::ms( v ) ) < Time::get_resolution() ) { @@ -134,7 +134,7 @@ nest::multimeter::Parameters_::set( const DictionaryDatum& d, const Buffers_& b, } } - if ( updateValueParam< double >( d, names::offset, v, node ) ) + if ( update_value_param( d, names::offset.toString(), v, node ) ) { // if offset is different from the default value (0), it must be at least // as large as the resolution @@ -156,11 +156,11 @@ nest::multimeter::Parameters_::set( const DictionaryDatum& d, const Buffers_& b, } // extract data - if ( d->known( names::record_from ) ) + if ( d.known( names::record_from.toString() ) ) { record_from_.clear(); - ArrayDatum ad = getValue< ArrayDatum >( d, names::record_from ); + ArrayDatum ad = d.get< ArrayDatum >( names::record_from.toString() ); for ( Token* t = ad.begin(); t != ad.end(); ++t ) { record_from_.push_back( Name( getValue< std::string >( *t ) ) ); @@ -244,10 +244,11 @@ multimeter::get_type() const voltmeter::voltmeter() : multimeter() { - DictionaryDatum vmdict = DictionaryDatum( new Dictionary ); + dictionary vmdict; + ( new Dictionary ); ArrayDatum ad; ad.push_back( LiteralDatum( names::V_m.toString() ) ); - ( *vmdict )[ names::record_from ] = ad; + vmdict[ names::record_from.toString() ] = ad; set_status( vmdict ); } diff --git a/models/multimeter.h b/models/multimeter.h index 836d64a805..8aa5e12ecc 100644 --- a/models/multimeter.h +++ b/models/multimeter.h @@ -168,8 +168,8 @@ class multimeter : public RecordingDevice SignalType sends_signal() const; Type get_type() const; - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void calibrate_time( const TimeConverter& tc ); @@ -197,8 +197,8 @@ class multimeter : public RecordingDevice Parameters_(); Parameters_( const Parameters_& ); Parameters_& operator=( const Parameters_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Buffers_&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, const Buffers_&, Node* node ); }; // ------------------------------------------------------------ @@ -224,7 +224,7 @@ class multimeter : public RecordingDevice inline void -nest::multimeter::get_status( DictionaryDatum& d ) const +nest::multimeter::get_status( dictionary& d ) const { RecordingDevice::get_status( d ); P_.get( d ); @@ -248,11 +248,11 @@ nest::multimeter::get_status( DictionaryDatum& d ) const } inline void -nest::multimeter::set_status( const DictionaryDatum& d ) +nest::multimeter::set_status( const dictionary& d ) { // protect multimeter from being frozen bool freeze = false; - if ( updateValue< bool >( d, names::frozen, freeze ) && freeze ) + if ( d.update_value( names::frozen.toString(), freeze ) && freeze ) { throw BadProperty( "multimeter cannot be frozen." ); } diff --git a/models/music_cont_in_proxy.cpp b/models/music_cont_in_proxy.cpp index 3f257e3c26..458db1b4fc 100644 --- a/models/music_cont_in_proxy.cpp +++ b/models/music_cont_in_proxy.cpp @@ -59,13 +59,13 @@ nest::music_cont_in_proxy::State_::State_() * ---------------------------------------------------------------- */ void -nest::music_cont_in_proxy::Parameters_::get( DictionaryDatum& d ) const +nest::music_cont_in_proxy::Parameters_::get( dictionary& d ) const { - ( *d )[ names::port_name ] = port_name_; + d[ names::port_name.toString() ] = port_name_; } void -nest::music_cont_in_proxy::Parameters_::set( const DictionaryDatum& d, State_& s ) +nest::music_cont_in_proxy::Parameters_::set( const dictionary& d, State_& s ) { // TODO: This is not possible, as P_ does not know about get_name() // if(d->known(names::port_name) && s.published_) @@ -73,19 +73,19 @@ nest::music_cont_in_proxy::Parameters_::set( const DictionaryDatum& d, State_& s if ( not s.published_ ) { - updateValue< string >( d, names::port_name, port_name_ ); + d.update_value( names::port_name.toString(), port_name_ ); } } void -nest::music_cont_in_proxy::State_::get( DictionaryDatum& d ) const +nest::music_cont_in_proxy::State_::get( dictionary& d ) const { - ( *d )[ names::published ] = published_; - ( *d )[ names::port_width ] = port_width_; + d[ names::published.toString() ] = published_; + d[ names::port_width.toString() ] = port_width_; } void -nest::music_cont_in_proxy::State_::set( const DictionaryDatum&, const Parameters_& ) +nest::music_cont_in_proxy::State_::set( const dictionary&, const Parameters_& ) { } @@ -156,16 +156,16 @@ nest::music_cont_in_proxy::calibrate() } void -nest::music_cont_in_proxy::get_status( DictionaryDatum& d ) const +nest::music_cont_in_proxy::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); - ( *d )[ names::data ] = DoubleVectorDatum( new std::vector< double >( B_.data_ ) ); + d[ names::data.toString() ] = DoubleVectorDatum( new std::vector< double >( B_.data_ ) ); } void -nest::music_cont_in_proxy::set_status( const DictionaryDatum& d ) +nest::music_cont_in_proxy::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, S_ ); // throws if BadProperty diff --git a/models/music_cont_in_proxy.h b/models/music_cont_in_proxy.h index bc5c8a9364..98d4d0a32f 100644 --- a/models/music_cont_in_proxy.h +++ b/models/music_cont_in_proxy.h @@ -108,8 +108,8 @@ class music_cont_in_proxy : public DeviceNode return true; } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -130,8 +130,8 @@ class music_cont_in_proxy : public DeviceNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, State_& ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, State_& ); //!< Set values from dicitonary }; // ------------------------------------------------------------ @@ -144,9 +144,9 @@ class music_cont_in_proxy : public DeviceNode State_(); //!< Sets default state value - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //! Set values from dictionary - void set( const DictionaryDatum&, const Parameters_& ); + void set( const dictionary&, const Parameters_& ); }; // ------------------------------------------------------------ diff --git a/models/music_cont_out_proxy.cpp b/models/music_cont_out_proxy.cpp index a0d23ca335..d0461762f5 100644 --- a/models/music_cont_out_proxy.cpp +++ b/models/music_cont_out_proxy.cpp @@ -94,10 +94,10 @@ nest::music_cont_out_proxy::Buffers_::Buffers_( const Buffers_& b ) * ---------------------------------------------------------------- */ void -nest::music_cont_out_proxy::Parameters_::get( DictionaryDatum& d ) const +nest::music_cont_out_proxy::Parameters_::get( dictionary& d ) const { - ( *d )[ names::port_name ] = port_name_; - ( *d )[ names::interval ] = interval_.get_ms(); + d[ names::port_name.toString() ] = port_name_; + d[ names::interval.toString() ] = interval_.get_ms(); ArrayDatum ad_record_from; @@ -106,12 +106,12 @@ nest::music_cont_out_proxy::Parameters_::get( DictionaryDatum& d ) const ad_record_from.push_back( LiteralDatum( record_from_[ j ] ) ); } - ( *d )[ names::record_from ] = ad_record_from; - ( *d )[ names::targets ] = new NodeCollectionDatum( targets_ ); + d[ names::record_from.toString() ] = ad_record_from; + d[ names::targets.toString() ] = new NodeCollectionDatum( targets_ ); } void -nest::music_cont_out_proxy::Parameters_::set( const DictionaryDatum& d, +nest::music_cont_out_proxy::Parameters_::set( const dictionary& d, const Node& self, const State_& state, const Buffers_& buffers ) @@ -119,10 +119,10 @@ nest::music_cont_out_proxy::Parameters_::set( const DictionaryDatum& d, if ( state.published_ == false ) { - updateValue< string >( d, names::port_name, port_name_ ); + d.update_value( names::port_name.toString(), port_name_ ); } - if ( buffers.has_targets_ && ( d->known( names::interval ) || d->known( names::record_from ) ) ) + if ( buffers.has_targets_ && ( d.known( names::interval.toString() ) || d.known( names::record_from.toString() ) ) ) { throw BadProperty( "The recording interval and the list of properties to record " @@ -130,7 +130,7 @@ nest::music_cont_out_proxy::Parameters_::set( const DictionaryDatum& d, } double v; - if ( updateValue< double >( d, names::interval, v ) ) + if ( d.update_value( names::interval.toString(), v ) ) { if ( Time( Time::ms( v ) ) < Time::get_resolution() ) { @@ -149,18 +149,18 @@ nest::music_cont_out_proxy::Parameters_::set( const DictionaryDatum& d, } } // extract data - if ( d->known( names::record_from ) ) + if ( d.known( names::record_from.toString() ) ) { record_from_.clear(); - ArrayDatum ad = getValue< ArrayDatum >( d, names::record_from ); + ArrayDatum ad = d.get< ArrayDatum >( names::record_from.toString() ); for ( Token* t = ad.begin(); t != ad.end(); ++t ) { record_from_.push_back( Name( getValue< std::string >( *t ) ) ); } } - if ( d->known( names::targets ) ) + if ( d.known( names::targets.toString() ) ) { if ( record_from_.empty() ) { @@ -169,7 +169,7 @@ nest::music_cont_out_proxy::Parameters_::set( const DictionaryDatum& d, if ( state.published_ == false ) { - targets_ = getValue< NodeCollectionDatum >( d, names::targets ); + targets_ = d.get< NodeCollectionDatum >( names::targets.toString() ); } else { @@ -179,10 +179,10 @@ nest::music_cont_out_proxy::Parameters_::set( const DictionaryDatum& d, } void -nest::music_cont_out_proxy::State_::get( DictionaryDatum& d ) const +nest::music_cont_out_proxy::State_::get( dictionary& d ) const { - ( *d )[ names::published ] = published_; - ( *d )[ names::port_width ] = port_width_; + d[ names::published.toString() ] = published_; + d[ names::port_width.toString() ] = port_width_; } /* ---------------------------------------------------------------- @@ -237,13 +237,12 @@ nest::music_cont_out_proxy::calibrate() // only publish the output port once, if ( S_.published_ == false ) { - const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( "static_synapse" ); - assert( synmodel.empty() == false && "synapse 'static_synapse' not available" ); + assert( synmodel.known( "static_synapse" ) && "synapse 'static_synapse' not available" ); - const index synmodel_id = static_cast< index >( synmodel ); + const index synmodel_id = synmodel.get< synindex >( "static_synapse" ); std::vector< MUSIC::GlobalIndex > music_index_map; - DictionaryDatum dummy_params = new Dictionary(); + dictionary dummy_params; for ( size_t i = 0; i < P_.targets_->size(); ++i ) { const index tnode_id = ( *P_.targets_ )[ i ]; @@ -307,7 +306,7 @@ nest::music_cont_out_proxy::calibrate() } void -nest::music_cont_out_proxy::get_status( DictionaryDatum& d ) const +nest::music_cont_out_proxy::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); @@ -331,7 +330,7 @@ nest::music_cont_out_proxy::get_status( DictionaryDatum& d ) const } void -nest::music_cont_out_proxy::set_status( const DictionaryDatum& d ) +nest::music_cont_out_proxy::set_status( const dictionary& d ) { P_.set( d, *this, S_, B_ ); // throws if BadProperty } diff --git a/models/music_cont_out_proxy.h b/models/music_cont_out_proxy.h index 2517b371f0..faa15e260e 100644 --- a/models/music_cont_out_proxy.h +++ b/models/music_cont_out_proxy.h @@ -146,8 +146,8 @@ class music_cont_out_proxy : public DeviceNode SignalType sends_signal() const; - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void calibrate_time( const TimeConverter& tc ); @@ -180,20 +180,20 @@ class music_cont_out_proxy : public DeviceNode std::vector< Name > record_from_; //!< recordables to record from NodeCollectionPTR targets_; //!< nodes to be observed - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, const Node&, const State_&, const Buffers_& ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, const Node&, const State_&, const Buffers_& ); //!< Set values from dictionary }; // ------------------------------------------------------------ struct State_ { - State_(); //!< Sets default state value - State_( const State_& ); //!< Copy constructor for state values - bool published_; //!< indicates whether this node has been published - //!< already with MUSIC - size_t port_width_; //!< the width of the MUSIC port - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + State_(); //!< Sets default state value + State_( const State_& ); //!< Copy constructor for state values + bool published_; //!< indicates whether this node has been published + //!< already with MUSIC + size_t port_width_; //!< the width of the MUSIC port + void get( dictionary& ) const; //!< Store current values in dictionary }; // ------------------------------------------------------------ diff --git a/models/music_event_in_proxy.cpp b/models/music_event_in_proxy.cpp index 9a0fb1fc49..ca84ece554 100644 --- a/models/music_event_in_proxy.cpp +++ b/models/music_event_in_proxy.cpp @@ -63,30 +63,30 @@ nest::music_event_in_proxy::State_::State_() * ---------------------------------------------------------------- */ void -nest::music_event_in_proxy::Parameters_::get( DictionaryDatum& d ) const +nest::music_event_in_proxy::Parameters_::get( dictionary& d ) const { - ( *d )[ names::music_channel ] = channel_; - ( *d )[ names::port_name ] = port_name_; + d[ names::music_channel.toString() ] = channel_; + d[ names::port_name.toString() ] = port_name_; } void -nest::music_event_in_proxy::Parameters_::set( const DictionaryDatum& d, State_& s ) +nest::music_event_in_proxy::Parameters_::set( const dictionary& d, State_& s ) { if ( not s.registered_ ) { - updateValue< long >( d, names::music_channel, channel_ ); - updateValue< string >( d, names::port_name, port_name_ ); + d.update_value( names::music_channel.toString(), channel_ ); + d.update_value( names::port_name.toString(), port_name_ ); } } void -nest::music_event_in_proxy::State_::get( DictionaryDatum& d ) const +nest::music_event_in_proxy::State_::get( dictionary& d ) const { - ( *d )[ names::registered ] = registered_; + d[ names::registered.toString() ] = registered_; } void -nest::music_event_in_proxy::State_::set( const DictionaryDatum&, const Parameters_& ) +nest::music_event_in_proxy::State_::set( const dictionary&, const Parameters_& ) { } @@ -132,14 +132,14 @@ nest::music_event_in_proxy::calibrate() } void -nest::music_event_in_proxy::get_status( DictionaryDatum& d ) const +nest::music_event_in_proxy::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); } void -nest::music_event_in_proxy::set_status( const DictionaryDatum& d ) +nest::music_event_in_proxy::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, S_ ); // throws if BadProperty diff --git a/models/music_event_in_proxy.h b/models/music_event_in_proxy.h index 4e490bc19c..c6279d9d0a 100644 --- a/models/music_event_in_proxy.h +++ b/models/music_event_in_proxy.h @@ -116,8 +116,8 @@ class music_event_in_proxy : public DeviceNode void handle( SpikeEvent& ); port send_test_event( Node&, rport, synindex, bool ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -138,12 +138,12 @@ class music_event_in_proxy : public DeviceNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; /** * Set values from dicitonary. */ - void set( const DictionaryDatum&, State_& ); + void set( const dictionary&, State_& ); }; // ------------------------------------------------------------ @@ -155,9 +155,9 @@ class music_event_in_proxy : public DeviceNode State_(); //!< Sets default state value - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //!< Set values from dictionary - void set( const DictionaryDatum&, const Parameters_& ); + void set( const dictionary&, const Parameters_& ); }; // ------------------------------------------------------------ diff --git a/models/music_event_out_proxy.cpp b/models/music_event_out_proxy.cpp index 5228b7ec64..23888bece5 100644 --- a/models/music_event_out_proxy.cpp +++ b/models/music_event_out_proxy.cpp @@ -61,13 +61,13 @@ nest::music_event_out_proxy::State_::State_() * ---------------------------------------------------------------- */ void -nest::music_event_out_proxy::Parameters_::get( DictionaryDatum& d ) const +nest::music_event_out_proxy::Parameters_::get( dictionary& d ) const { - ( *d )[ names::port_name ] = port_name_; + d[ names::port_name.toString() ] = port_name_; } void -nest::music_event_out_proxy::Parameters_::set( const DictionaryDatum& d, State_& s ) +nest::music_event_out_proxy::Parameters_::set( const dictionary& d, State_& s ) { // TODO: This is not possible, as P_ does not know about get_name() // if(d->known(names::port_name) && s.published_) @@ -75,19 +75,19 @@ nest::music_event_out_proxy::Parameters_::set( const DictionaryDatum& d, State_& if ( not s.published_ ) { - updateValue< string >( d, names::port_name, port_name_ ); + d.update_value( names::port_name.toString(), port_name_ ); } } void -nest::music_event_out_proxy::State_::get( DictionaryDatum& d ) const +nest::music_event_out_proxy::State_::get( dictionary& d ) const { - ( *d )[ names::published ] = published_; - ( *d )[ names::port_width ] = port_width_; + d[ names::published.toString() ] = published_; + d[ names::port_width.toString() ] = port_width_; } void -nest::music_event_out_proxy::State_::set( const DictionaryDatum&, const Parameters_& ) +nest::music_event_out_proxy::State_::set( const dictionary&, const Parameters_& ) { } @@ -175,23 +175,23 @@ nest::music_event_out_proxy::calibrate() } void -nest::music_event_out_proxy::get_status( DictionaryDatum& d ) const +nest::music_event_out_proxy::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); - ( *d )[ names::connection_count ] = V_.index_map_.size(); + d[ names::connection_count.toString() ] = V_.index_map_.size(); // make a copy, since MUSIC uses int instead of long int std::vector< long >* pInd_map_long = new std::vector< long >( V_.index_map_.size() ); std::copy< std::vector< MUSIC::GlobalIndex >::const_iterator, std::vector< long >::iterator >( V_.index_map_.begin(), V_.index_map_.end(), pInd_map_long->begin() ); - ( *d )[ names::index_map ] = IntVectorDatum( pInd_map_long ); + d[ names::index_map.toString() ] = IntVectorDatum( pInd_map_long ); } void -nest::music_event_out_proxy::set_status( const DictionaryDatum& d ) +nest::music_event_out_proxy::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, S_ ); // throws if BadProperty diff --git a/models/music_event_out_proxy.h b/models/music_event_out_proxy.h index 4dbac5e241..96dfbfb3be 100644 --- a/models/music_event_out_proxy.h +++ b/models/music_event_out_proxy.h @@ -122,8 +122,8 @@ class music_event_out_proxy : public DeviceNode port handles_test_event( SpikeEvent&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -144,8 +144,8 @@ class music_event_out_proxy : public DeviceNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, State_& ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, State_& ); //!< Set values from dicitonary }; // ------------------------------------------------------------ @@ -158,9 +158,9 @@ class music_event_out_proxy : public DeviceNode State_(); //!< Sets default state value - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //!< Set values from dictionary - void set( const DictionaryDatum&, const Parameters_& ); + void set( const dictionary&, const Parameters_& ); }; // ------------------------------------------------------------ diff --git a/models/music_message_in_proxy.cpp b/models/music_message_in_proxy.cpp index 3a9560fa2f..8ed2d0f3ca 100644 --- a/models/music_message_in_proxy.cpp +++ b/models/music_message_in_proxy.cpp @@ -61,31 +61,31 @@ nest::music_message_in_proxy::State_::State_() * ---------------------------------------------------------------- */ void -nest::music_message_in_proxy::Parameters_::get( DictionaryDatum& d ) const +nest::music_message_in_proxy::Parameters_::get( dictionary& d ) const { - ( *d )[ names::port_name ] = port_name_; - ( *d )[ names::acceptable_latency ] = acceptable_latency_; + d[ names::port_name.toString() ] = port_name_; + d[ names::acceptable_latency.toString() ] = acceptable_latency_; } void -nest::music_message_in_proxy::Parameters_::set( const DictionaryDatum& d, State_& s, Node* node ) +nest::music_message_in_proxy::Parameters_::set( const dictionary& d, State_& s, Node* node ) { if ( not s.published_ ) { - updateValue< string >( d, names::port_name, port_name_ ); - updateValueParam< double >( d, names::acceptable_latency, acceptable_latency_, node ); + d.update_value( names::port_name.toString(), port_name_ ); + update_value_param( d, names::acceptable_latency.toString(), acceptable_latency_, node ); } } void -nest::music_message_in_proxy::State_::get( DictionaryDatum& d ) const +nest::music_message_in_proxy::State_::get( dictionary& d ) const { - ( *d )[ names::published ] = published_; - ( *d )[ names::port_width ] = port_width_; + d[ names::published.toString() ] = published_; + d[ names::port_width.toString() ] = port_width_; } void -nest::music_message_in_proxy::State_::set( const DictionaryDatum&, const Parameters_&, Node* ) +nest::music_message_in_proxy::State_::set( const dictionary&, const Parameters_&, Node* ) { } diff --git a/models/music_message_in_proxy.h b/models/music_message_in_proxy.h index 5274b5e70d..f4be1832f2 100644 --- a/models/music_message_in_proxy.h +++ b/models/music_message_in_proxy.h @@ -111,13 +111,13 @@ class MsgHandler : public MUSIC::MessageHandler public: void - get_status( DictionaryDatum& d ) const + get_status( dictionary& d ) const { DictionaryDatum dict( new Dictionary ); - ( *dict )[ names::messages ] = messages; - ( *dict )[ names::message_times ] = DoubleVectorDatum( new std::vector< double >( message_times ) ); - ( *d )[ names::n_messages ] = messages.size(); - ( *d )[ names::data ] = dict; + dict[ names::messages.toString() ] = messages; + dict[ names::message_times.toString() ] = DoubleVectorDatum( new std::vector< double >( message_times ) ); + d[ names::n_messages.toString() ] = messages.size(); + d[ names::data.toString() ] = dict; } void @@ -151,8 +151,8 @@ class music_message_in_proxy : public DeviceNode return true; } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -173,12 +173,12 @@ class music_message_in_proxy : public DeviceNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; /** * Set values from dicitonary. */ - void set( const DictionaryDatum&, State_&, Node* ); + void set( const dictionary&, State_&, Node* ); }; // ------------------------------------------------------------ @@ -191,9 +191,9 @@ class music_message_in_proxy : public DeviceNode State_(); //!< Sets default state value - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //! Set values from dictionary - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void set( const dictionary&, const Parameters_&, Node* ); }; // ------------------------------------------------------------ @@ -219,7 +219,7 @@ class music_message_in_proxy : public DeviceNode }; inline void -music_message_in_proxy::get_status( DictionaryDatum& d ) const +music_message_in_proxy::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); @@ -228,7 +228,7 @@ music_message_in_proxy::get_status( DictionaryDatum& d ) const } inline void -music_message_in_proxy::set_status( const DictionaryDatum& d ) +music_message_in_proxy::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, S_, this ); // throws if BadProperty @@ -237,7 +237,7 @@ music_message_in_proxy::set_status( const DictionaryDatum& d ) stmp.set( d, P_, this ); // throws if BadProperty long nm = 0; - if ( updateValueParam< long >( d, names::n_messages, nm, this ) ) + if ( update_value_param( d, names::n_messages.toString(), nm, this ) ) { if ( nm == 0 ) { diff --git a/models/music_rate_in_proxy.cpp b/models/music_rate_in_proxy.cpp index 6a27c8778b..d190f81c69 100644 --- a/models/music_rate_in_proxy.cpp +++ b/models/music_rate_in_proxy.cpp @@ -59,13 +59,13 @@ nest::music_rate_in_proxy::State_::State_() * ---------------------------------------------------------------- */ void -nest::music_rate_in_proxy::Parameters_::get( DictionaryDatum& d ) const +nest::music_rate_in_proxy::Parameters_::get( dictionary& d ) const { - ( *d )[ names::port_name ] = port_name_; + d[ names::port_name.toString() ] = port_name_; } void -nest::music_rate_in_proxy::Parameters_::set( const DictionaryDatum& d, State_& s ) +nest::music_rate_in_proxy::Parameters_::set( const dictionary& d, State_& s ) { // TODO: This is not possible, as P_ does not know about get_name() // if(d->known(names::port_name) && s.registered_) @@ -73,19 +73,19 @@ nest::music_rate_in_proxy::Parameters_::set( const DictionaryDatum& d, State_& s if ( not s.registered_ ) { - updateValue< string >( d, names::port_name, port_name_ ); - updateValue< long >( d, names::music_channel, channel_ ); + d.update_value( names::port_name.toString(), port_name_ ); + d.update_value( names::music_channel.toString(), channel_ ); } } void -nest::music_rate_in_proxy::State_::get( DictionaryDatum& d ) const +nest::music_rate_in_proxy::State_::get( dictionary& d ) const { - ( *d )[ names::registered ] = registered_; + d[ names::registered.toString() ] = registered_; } void -nest::music_rate_in_proxy::State_::set( const DictionaryDatum&, const Parameters_& ) +nest::music_rate_in_proxy::State_::set( const dictionary&, const Parameters_& ) { } @@ -131,16 +131,16 @@ nest::music_rate_in_proxy::calibrate() } void -nest::music_rate_in_proxy::get_status( DictionaryDatum& d ) const +nest::music_rate_in_proxy::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); - ( *d )[ names::data ] = DoubleVectorDatum( new std::vector< double >( 1, B_.data_ ) ); + d[ names::data.toString() ] = DoubleVectorDatum( new std::vector< double >( 1, B_.data_ ) ); } void -nest::music_rate_in_proxy::set_status( const DictionaryDatum& d ) +nest::music_rate_in_proxy::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, S_ ); // throws if BadProperty diff --git a/models/music_rate_in_proxy.h b/models/music_rate_in_proxy.h index c379cdf4df..6ac7864717 100644 --- a/models/music_rate_in_proxy.h +++ b/models/music_rate_in_proxy.h @@ -124,8 +124,8 @@ class music_rate_in_proxy : public DeviceNode void handle( InstantaneousRateConnectionEvent& ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); using Node::sends_secondary_event; void @@ -154,8 +154,8 @@ class music_rate_in_proxy : public DeviceNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, State_& ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, State_& ); //!< Set values from dicitonary }; // ------------------------------------------------------------ @@ -167,9 +167,9 @@ class music_rate_in_proxy : public DeviceNode State_(); //!< Sets default state value - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //! Set values from dictionary - void set( const DictionaryDatum&, const Parameters_& ); + void set( const dictionary&, const Parameters_& ); }; // ------------------------------------------------------------ diff --git a/models/music_rate_out_proxy.cpp b/models/music_rate_out_proxy.cpp index 0a345079c1..fa265643ed 100644 --- a/models/music_rate_out_proxy.cpp +++ b/models/music_rate_out_proxy.cpp @@ -71,13 +71,13 @@ nest::music_rate_out_proxy::Buffers_::Buffers_( const Buffers_& b ) * ---------------------------------------------------------------- */ void -nest::music_rate_out_proxy::Parameters_::get( DictionaryDatum& d ) const +nest::music_rate_out_proxy::Parameters_::get( dictionary& d ) const { - ( *d )[ names::port_name ] = port_name_; + d[ names::port_name.toString() ] = port_name_; } void -nest::music_rate_out_proxy::Parameters_::set( const DictionaryDatum& d, State_& s ) +nest::music_rate_out_proxy::Parameters_::set( const dictionary& d, State_& s ) { // TODO: This is not possible, as P_ does not know about get_name() // if(d->known(names::port_name) && s.published_) @@ -85,19 +85,19 @@ nest::music_rate_out_proxy::Parameters_::set( const DictionaryDatum& d, State_& if ( not s.published_ ) { - updateValue< string >( d, names::port_name, port_name_ ); + d.update_value( names::port_name.toString(), port_name_ ); } } void -nest::music_rate_out_proxy::State_::get( DictionaryDatum& d ) const +nest::music_rate_out_proxy::State_::get( dictionary& d ) const { - ( *d )[ names::published ] = published_; - ( *d )[ names::port_width ] = port_width_; + d[ names::published.toString() ] = published_; + d[ names::port_width.toString() ] = port_width_; } void -nest::music_rate_out_proxy::State_::set( const DictionaryDatum&, const Parameters_& ) +nest::music_rate_out_proxy::State_::set( const dictionary&, const Parameters_& ) { } @@ -191,23 +191,23 @@ nest::music_rate_out_proxy::calibrate() } void -nest::music_rate_out_proxy::get_status( DictionaryDatum& d ) const +nest::music_rate_out_proxy::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); - ( *d )[ names::connection_count ] = V_.index_map_.size(); + d[ names::connection_count.toString() ] = V_.index_map_.size(); // make a copy, since MUSIC uses int instead of long int std::vector< long >* pInd_map_long = new std::vector< long >( V_.index_map_.size() ); std::copy< std::vector< MUSIC::GlobalIndex >::const_iterator, std::vector< long >::iterator >( V_.index_map_.begin(), V_.index_map_.end(), pInd_map_long->begin() ); - ( *d )[ names::index_map ] = IntVectorDatum( pInd_map_long ); + d[ names::index_map.toString() ] = IntVectorDatum( pInd_map_long ); } void -nest::music_rate_out_proxy::set_status( const DictionaryDatum& d ) +nest::music_rate_out_proxy::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, S_ ); // throws if BadProperty diff --git a/models/music_rate_out_proxy.h b/models/music_rate_out_proxy.h index 1518fac8da..66f488c45e 100644 --- a/models/music_rate_out_proxy.h +++ b/models/music_rate_out_proxy.h @@ -120,8 +120,8 @@ class music_rate_out_proxy : public DeviceNode port handles_test_event( InstantaneousRateConnectionEvent&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -142,8 +142,8 @@ class music_rate_out_proxy : public DeviceNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, State_& ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, State_& ); //!< Set values from dicitonary }; // ------------------------------------------------------------ @@ -156,9 +156,9 @@ class music_rate_out_proxy : public DeviceNode State_(); //!< Sets default state value - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //!< Set values from dictionary - void set( const DictionaryDatum&, const Parameters_& ); + void set( const dictionary&, const Parameters_& ); }; // ------------------------------------------------------------ diff --git a/models/noise_generator.cpp b/models/noise_generator.cpp index 03368a97c4..f288cc4727 100644 --- a/models/noise_generator.cpp +++ b/models/noise_generator.cpp @@ -120,33 +120,33 @@ nest::noise_generator::Buffers_::Buffers_( const Buffers_& b, noise_generator& n * ---------------------------------------------------------------- */ void -nest::noise_generator::Parameters_::get( DictionaryDatum& d ) const +nest::noise_generator::Parameters_::get( dictionary& d ) const { - ( *d )[ names::mean ] = mean_; - ( *d )[ names::std ] = std_; - ( *d )[ names::std_mod ] = std_mod_; - ( *d )[ names::dt ] = dt_.get_ms(); - ( *d )[ names::phase ] = phi_deg_; - ( *d )[ names::frequency ] = freq_; + d[ names::mean.toString() ] = mean_; + d[ names::std.toString() ] = std_; + d[ names::std_mod.toString() ] = std_mod_; + d[ names::dt.toString() ] = dt_.get_ms(); + d[ names::phase.toString() ] = phi_deg_; + d[ names::frequency.toString() ] = freq_; } void -nest::noise_generator::State_::get( DictionaryDatum& d ) const +nest::noise_generator::State_::get( dictionary& d ) const { - ( *d )[ names::y_0 ] = y_0_; - ( *d )[ names::y_1 ] = y_1_; + d[ names::y_0.toString() ] = y_0_; + d[ names::y_1.toString() ] = y_1_; } void -nest::noise_generator::Parameters_::set( const DictionaryDatum& d, const noise_generator& n, Node* node ) +nest::noise_generator::Parameters_::set( const dictionary& d, const noise_generator& n, Node* node ) { - updateValueParam< double >( d, names::mean, mean_, node ); - updateValueParam< double >( d, names::std, std_, node ); - updateValueParam< double >( d, names::std_mod, std_mod_, node ); - updateValueParam< double >( d, names::frequency, freq_, node ); - updateValueParam< double >( d, names::phase, phi_deg_, node ); + update_value_param( d, names::mean.toString(), mean_, node ); + update_value_param( d, names::std.toString(), std_, node ); + update_value_param( d, names::std_mod.toString(), std_mod_, node ); + update_value_param( d, names::frequency.toString(), freq_, node ); + update_value_param( d, names::phase.toString(), phi_deg_, node ); double dt; - if ( updateValueParam< double >( d, names::dt, dt, node ) ) + if ( update_value_param( d, names::dt.toString(), dt, node ) ) { dt_ = Time::ms( dt ); } @@ -378,12 +378,13 @@ nest::noise_generator::set_data_from_stimulation_backend( std::vector< double >& throw BadParameterValue( "The size of the data for the noise_generator needs to be 5 [mean, std, std_mod, frequency, phase]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::mean ] = DoubleDatum( input_param[ 0 ] ); - ( *d )[ names::std ] = DoubleDatum( input_param[ 1 ] ); - ( *d )[ names::std_mod ] = DoubleDatum( input_param[ 2 ] ); - ( *d )[ names::frequency ] = DoubleDatum( input_param[ 3 ] ); - ( *d )[ names::phase ] = DoubleDatum( input_param[ 4 ] ); + dictionary d; + ( new Dictionary ); + d[ names::mean.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::std.toString() ] = DoubleDatum( input_param[ 1 ] ); + d[ names::std_mod.toString() ] = DoubleDatum( input_param[ 2 ] ); + d[ names::frequency.toString() ] = DoubleDatum( input_param[ 3 ] ); + d[ names::phase.toString() ] = DoubleDatum( input_param[ 4 ] ); ptmp.set( d, *this, this ); } diff --git a/models/noise_generator.h b/models/noise_generator.h index c47f6517f0..3ac0d96a2f 100644 --- a/models/noise_generator.h +++ b/models/noise_generator.h @@ -187,8 +187,8 @@ class noise_generator : public StimulationDevice port handles_test_event( DataLoggingRequest&, rport ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; void calibrate_time( const TimeConverter& tc ) override; @@ -236,9 +236,9 @@ class noise_generator : public StimulationDevice Parameters_( const Parameters_& ); Parameters_& operator=( const Parameters_& p ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //! Set values from dictionary - void set( const DictionaryDatum&, const noise_generator&, Node* node ); + void set( const dictionary&, const noise_generator&, Node* node ); }; // ------------------------------------------------------------ @@ -252,7 +252,7 @@ class noise_generator : public StimulationDevice State_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary }; // ------------------------------------------------------------ @@ -316,17 +316,17 @@ noise_generator::handles_test_event( DataLoggingRequest& dlr, rport receptor_typ } inline void -noise_generator::get_status( DictionaryDatum& d ) const +noise_generator::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); StimulationDevice::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -noise_generator::set_status( const DictionaryDatum& d ) +noise_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.num_targets_ = P_.num_targets_; // Copy Constr. does not copy connections diff --git a/models/parrot_neuron.cpp b/models/parrot_neuron.cpp index e1b712bccf..4e7719dec2 100644 --- a/models/parrot_neuron.cpp +++ b/models/parrot_neuron.cpp @@ -81,14 +81,14 @@ parrot_neuron::update( Time const& origin, const long from, const long to ) } void -parrot_neuron::get_status( DictionaryDatum& d ) const +parrot_neuron::get_status( dictionary& d ) const { - def< double >( d, names::t_spike, get_spiketime_ms() ); + d[ names::t_spike.toString() ] = get_spiketime_ms(); ArchivingNode::get_status( d ); } void -parrot_neuron::set_status( const DictionaryDatum& d ) +parrot_neuron::set_status( const dictionary& d ) { ArchivingNode::set_status( d ); } diff --git a/models/parrot_neuron.h b/models/parrot_neuron.h index e5315644ad..8337c2a1e4 100644 --- a/models/parrot_neuron.h +++ b/models/parrot_neuron.h @@ -100,8 +100,8 @@ class parrot_neuron : public ArchivingNode void handle( SpikeEvent& ); port handles_test_event( SpikeEvent&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); diff --git a/models/parrot_neuron_ps.cpp b/models/parrot_neuron_ps.cpp index d5381b740e..2819208228 100644 --- a/models/parrot_neuron_ps.cpp +++ b/models/parrot_neuron_ps.cpp @@ -96,13 +96,13 @@ parrot_neuron_ps::update( Time const& origin, long const from, long const to ) } void -parrot_neuron_ps::get_status( DictionaryDatum& d ) const +parrot_neuron_ps::get_status( dictionary& d ) const { ArchivingNode::get_status( d ); } void -parrot_neuron_ps::set_status( const DictionaryDatum& d ) +parrot_neuron_ps::set_status( const dictionary& d ) { ArchivingNode::set_status( d ); } diff --git a/models/parrot_neuron_ps.h b/models/parrot_neuron_ps.h index 3b3de9295c..30b4b6f401 100644 --- a/models/parrot_neuron_ps.h +++ b/models/parrot_neuron_ps.h @@ -96,8 +96,8 @@ class parrot_neuron_ps : public ArchivingNode port send_test_event( Node&, rport, synindex, bool ); port handles_test_event( SpikeEvent&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); bool is_off_grid() const diff --git a/models/poisson_generator.cpp b/models/poisson_generator.cpp index df858f8245..0a8b36f284 100644 --- a/models/poisson_generator.cpp +++ b/models/poisson_generator.cpp @@ -50,15 +50,15 @@ nest::poisson_generator::Parameters_::Parameters_() * ---------------------------------------------------------------- */ void -nest::poisson_generator::Parameters_::get( DictionaryDatum& d ) const +nest::poisson_generator::Parameters_::get( dictionary& d ) const { - def< double >( d, names::rate, rate_ ); + d[ names::rate.toString() ] = rate_; } void -nest::poisson_generator::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::poisson_generator::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::rate, rate_, node ); + update_value_param( d, names::rate.toString(), rate_, node ); if ( rate_ < 0 ) { throw BadProperty( "The rate cannot be negative." ); @@ -165,8 +165,9 @@ nest::poisson_generator::set_data_from_stimulation_backend( std::vector< double { throw BadParameterValue( "The size of the data for the poisson generator needs to be 1 [rate]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::rate ] = DoubleDatum( input_param[ 0 ] ); + dictionary d; + ( new Dictionary ); + d[ names::rate.toString() ] = DoubleDatum( input_param[ 0 ] ); ptmp.set( d, this ); } diff --git a/models/poisson_generator.h b/models/poisson_generator.h index 52418023cd..2da4404e14 100644 --- a/models/poisson_generator.h +++ b/models/poisson_generator.h @@ -97,8 +97,8 @@ class poisson_generator : public StimulationDevice port send_test_event( Node&, rport, synindex, bool ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; void set_data_from_stimulation_backend( std::vector< double >& input_param ) override; @@ -122,8 +122,8 @@ class poisson_generator : public StimulationDevice Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ------------------------------------------------------------ @@ -159,14 +159,14 @@ poisson_generator::send_test_event( Node& target, rport receptor_type, synindex } inline void -poisson_generator::get_status( DictionaryDatum& d ) const +poisson_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); } inline void -poisson_generator::set_status( const DictionaryDatum& d ) +poisson_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/poisson_generator_ps.cpp b/models/poisson_generator_ps.cpp index 88616efdcb..16f72b4e8e 100644 --- a/models/poisson_generator_ps.cpp +++ b/models/poisson_generator_ps.cpp @@ -55,23 +55,23 @@ nest::poisson_generator_ps::Parameters_::Parameters_() * ---------------------------------------------------------------- */ void -nest::poisson_generator_ps::Parameters_::get( DictionaryDatum& d ) const +nest::poisson_generator_ps::Parameters_::get( dictionary& d ) const { - ( *d )[ names::rate ] = rate_; - ( *d )[ names::dead_time ] = dead_time_; + d[ names::rate.toString() ] = rate_; + d[ names::dead_time.toString() ] = dead_time_; } void -nest::poisson_generator_ps::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::poisson_generator_ps::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::dead_time, dead_time_, node ); + update_value_param( d, names::dead_time.toString(), dead_time_, node ); if ( dead_time_ < 0 ) { throw BadProperty( "The dead time cannot be negative." ); } - updateValueParam< double >( d, names::rate, rate_, node ); + update_value_param( d, names::rate.toString(), rate_, node ); if ( rate_ < 0.0 ) { @@ -292,9 +292,10 @@ nest::poisson_generator_ps::set_data_from_stimulation_backend( std::vector< doub { throw BadParameterValue( "The size of the data for the poisson_generator_ps need to be 2 [dead_time, rate]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::dead_time ] = DoubleDatum( input_param[ 0 ] ); - ( *d )[ names::rate ] = DoubleDatum( input_param[ 1 ] ); + dictionary d; + ( new Dictionary ); + d[ names::dead_time.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::rate.toString() ] = DoubleDatum( input_param[ 1 ] ); ptmp.set( d, this ); } diff --git a/models/poisson_generator_ps.h b/models/poisson_generator_ps.h index d75f38021f..2b0e7d7b0c 100644 --- a/models/poisson_generator_ps.h +++ b/models/poisson_generator_ps.h @@ -103,8 +103,8 @@ class poisson_generator_ps : public StimulationDevice port send_test_event( Node&, rport, synindex, bool ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; void calibrate_time( const TimeConverter& tc ) override; @@ -154,8 +154,8 @@ class poisson_generator_ps : public StimulationDevice Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ------------------------------------------------------------ @@ -228,21 +228,21 @@ poisson_generator_ps::send_test_event( Node& target, rport receptor_type, synind } inline void -poisson_generator_ps::get_status( DictionaryDatum& d ) const +poisson_generator_ps::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); } inline void -poisson_generator_ps::set_status( const DictionaryDatum& d ) +poisson_generator_ps::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty // If the rate is changed, the event_hook must handle the interval from // the rate change to the first subsequent spike. - if ( d->known( names::rate ) ) + if ( d.known( names::rate.toString() ) ) { B_.next_spike_.assign( P_.num_targets_, Buffers_::SpikeTime( Time::neg_inf(), 0 ) ); } diff --git a/models/pp_cond_exp_mc_urbanczik.cpp b/models/pp_cond_exp_mc_urbanczik.cpp index 91acc16c2a..5fe77c363e 100644 --- a/models/pp_cond_exp_mc_urbanczik.cpp +++ b/models/pp_cond_exp_mc_urbanczik.cpp @@ -326,63 +326,63 @@ nest::pp_cond_exp_mc_urbanczik::Buffers_::Buffers_( const Buffers_&, pp_cond_exp * ---------------------------------------------------------------- */ void -nest::pp_cond_exp_mc_urbanczik::Parameters_::get( DictionaryDatum& d ) const +nest::pp_cond_exp_mc_urbanczik::Parameters_::get( dictionary& d ) const { - def< double >( d, names::t_ref, t_ref ); - def< double >( d, names::phi_max, urbanczik_params.phi_max ); - def< double >( d, names::rate_slope, urbanczik_params.rate_slope ); - def< double >( d, names::beta, urbanczik_params.beta ); - def< double >( d, names::theta, urbanczik_params.theta ); + d[ names::t_ref.toString() ] = t_ref; + d[ names::phi_max.toString() ] = urbanczik_params.phi_max; + d[ names::rate_slope.toString() ] = urbanczik_params.rate_slope; + d[ names::beta.toString() ] = urbanczik_params.beta; + d[ names::theta.toString() ] = urbanczik_params.theta; - def< double >( d, names::g_sp, urbanczik_params.g_conn[ SOMA ] ); - def< double >( d, names::g_ps, urbanczik_params.g_conn[ DEND ] ); + d[ names::g_sp.toString() ] = urbanczik_params.g_conn[ SOMA ]; + d[ names::g_ps.toString() ] = urbanczik_params.g_conn[ DEND ]; // create subdictionaries for per-compartment parameters for ( size_t n = 0; n < NCOMP; ++n ) { - DictionaryDatum dd = new Dictionary(); - - def< double >( dd, names::g_L, urbanczik_params.g_L[ n ] ); - def< double >( dd, names::E_L, urbanczik_params.E_L[ n ] ); - def< double >( dd, names::E_ex, E_ex[ n ] ); - def< double >( dd, names::E_in, E_in[ n ] ); - def< double >( dd, names::C_m, urbanczik_params.C_m[ n ] ); - def< double >( dd, names::tau_syn_ex, urbanczik_params.tau_syn_ex[ n ] ); - def< double >( dd, names::tau_syn_in, urbanczik_params.tau_syn_in[ n ] ); - def< double >( dd, names::I_e, I_e[ n ] ); - - ( *d )[ comp_names_[ n ] ] = dd; + dictionary dd; + + dd[ names::g_L.toString() ] = urbanczik_params.g_L[ n ]; + dd[ names::E_L.toString() ] = urbanczik_params.E_L[ n ]; + dd[ names::E_ex.toString() ] = E_ex[ n ]; + dd[ names::E_in.toString() ] = E_in[ n ]; + dd[ names::C_m.toString() ] = urbanczik_params.C_m[ n ]; + dd[ names::tau_syn_ex.toString() ] = urbanczik_params.tau_syn_ex[ n ]; + dd[ names::tau_syn_in.toString() ] = urbanczik_params.tau_syn_in[ n ]; + dd[ names::I_e.toString() ] = I_e[ n ]; + + d[ comp_names_[ n ].toString() ] = dd; } } void -nest::pp_cond_exp_mc_urbanczik::Parameters_::set( const DictionaryDatum& d ) +nest::pp_cond_exp_mc_urbanczik::Parameters_::set( const dictionary& d ) { // allow setting the membrane potential - updateValue< double >( d, names::t_ref, t_ref ); - updateValue< double >( d, names::phi_max, urbanczik_params.phi_max ); - updateValue< double >( d, names::rate_slope, urbanczik_params.rate_slope ); - updateValue< double >( d, names::beta, urbanczik_params.beta ); - updateValue< double >( d, names::theta, urbanczik_params.theta ); + d.update_value( names::t_ref.toString(), t_ref ); + d.update_value( names::phi_max.toString(), urbanczik_params.phi_max ); + d.update_value( names::rate_slope.toString(), urbanczik_params.rate_slope ); + d.update_value( names::beta.toString(), urbanczik_params.beta ); + d.update_value( names::theta.toString(), urbanczik_params.theta ); - updateValue< double >( d, Name( names::g_sp ), urbanczik_params.g_conn[ SOMA ] ); - updateValue< double >( d, Name( names::g_ps ), urbanczik_params.g_conn[ DEND ] ); + d.update_value( Name( names::g_sp ).toString(), urbanczik_params.g_conn[ SOMA ] ); + d.update_value( Name( names::g_ps ).toString(), urbanczik_params.g_conn[ DEND ] ); // extract from sub-dictionaries for ( size_t n = 0; n < NCOMP; ++n ) { - if ( d->known( comp_names_[ n ] ) ) + if ( d.known( comp_names_[ n ].toString() ) ) { - DictionaryDatum dd = getValue< DictionaryDatum >( d, comp_names_[ n ] ); - - updateValue< double >( dd, names::E_L, urbanczik_params.E_L[ n ] ); - updateValue< double >( dd, names::E_ex, E_ex[ n ] ); - updateValue< double >( dd, names::E_in, E_in[ n ] ); - updateValue< double >( dd, names::C_m, urbanczik_params.C_m[ n ] ); - updateValue< double >( dd, names::g_L, urbanczik_params.g_L[ n ] ); - updateValue< double >( dd, names::tau_syn_ex, urbanczik_params.tau_syn_ex[ n ] ); - updateValue< double >( dd, names::tau_syn_in, urbanczik_params.tau_syn_in[ n ] ); - updateValue< double >( dd, names::I_e, I_e[ n ] ); + auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + + dd.update_value( names::E_L.toString(), urbanczik_params.E_L[ n ] ); + dd.update_value( names::E_ex.toString(), E_ex[ n ] ); + dd.update_value( names::E_in.toString(), E_in[ n ] ); + dd.update_value( names::C_m.toString(), urbanczik_params.C_m[ n ] ); + dd.update_value( names::g_L.toString(), urbanczik_params.g_L[ n ] ); + dd.update_value( names::tau_syn_ex.toString(), urbanczik_params.tau_syn_ex[ n ] ); + dd.update_value( names::tau_syn_in.toString(), urbanczik_params.tau_syn_in[ n ] ); + dd.update_value( names::I_e.toString(), I_e[ n ] ); } } if ( urbanczik_params.rate_slope < 0 ) @@ -416,29 +416,29 @@ nest::pp_cond_exp_mc_urbanczik::Parameters_::set( const DictionaryDatum& d ) } void -nest::pp_cond_exp_mc_urbanczik::State_::get( DictionaryDatum& d ) const +nest::pp_cond_exp_mc_urbanczik::State_::get( dictionary& d ) const { // we assume here that State_::get() always is called after // Parameters_::get(), so that the per-compartment dictionaries exist for ( size_t n = 0; n < NCOMP; ++n ) { - assert( d->known( comp_names_[ n ] ) ); - DictionaryDatum dd = getValue< DictionaryDatum >( d, comp_names_[ n ] ); + assert( d.known( comp_names_[ n ].toString() ) ); + auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); - def< double >( dd, names::V_m, y_[ idx( n, V_M ) ] ); // Membrane potential + dd[ names::V_m.toString() ] = y_[ idx( n, V_M ) ]; // Membrane potential } } void -nest::pp_cond_exp_mc_urbanczik::State_::set( const DictionaryDatum& d, const Parameters_& ) +nest::pp_cond_exp_mc_urbanczik::State_::set( const dictionary& d, const Parameters_& ) { // extract from sub-dictionaries for ( size_t n = 0; n < NCOMP; ++n ) { - if ( d->known( comp_names_[ n ] ) ) + if ( d.known( comp_names_[ n ].toString() ) ) { - DictionaryDatum dd = getValue< DictionaryDatum >( d, comp_names_[ n ] ); - updateValue< double >( dd, names::V_m, y_[ idx( n, V_M ) ] ); + auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + dd.update_value( names::V_m.toString(), y_[ idx( n, V_M ) ] ); } } } diff --git a/models/pp_cond_exp_mc_urbanczik.h b/models/pp_cond_exp_mc_urbanczik.h index d7cf4bea41..58a4fd2f26 100644 --- a/models/pp_cond_exp_mc_urbanczik.h +++ b/models/pp_cond_exp_mc_urbanczik.h @@ -272,8 +272,8 @@ class pp_cond_exp_mc_urbanczik : public UrbanczikArchivingNode< pp_cond_exp_mc_u port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -374,8 +374,8 @@ class pp_cond_exp_mc_urbanczik : public UrbanczikArchivingNode< pp_cond_exp_mc_u Parameters_( const Parameters_& ); //!< needed to copy C-arrays Parameters_& operator=( const Parameters_& ); //!< needed to copy C-arrays - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum& ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary& ); //!< Set values from dicitonary }; @@ -417,8 +417,8 @@ class pp_cond_exp_mc_urbanczik : public UrbanczikArchivingNode< pp_cond_exp_mc_u State_& operator=( const State_& ); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, const Parameters_& ); + void get( dictionary& ) const; + void set( const dictionary&, const Parameters_& ); /** * Compute linear index into state array from compartment and element. @@ -606,33 +606,33 @@ pp_cond_exp_mc_urbanczik::handles_test_event( DataLoggingRequest& dlr, rport rec } inline void -pp_cond_exp_mc_urbanczik::get_status( DictionaryDatum& d ) const +pp_cond_exp_mc_urbanczik::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); UrbanczikArchivingNode< pp_cond_exp_mc_urbanczik_parameters >::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); /** * @todo dictionary construction should be done only once for * static member in default c'tor, but this leads to * a seg fault on exit, see #328 */ - DictionaryDatum receptor_dict_ = new Dictionary(); - ( *receptor_dict_ )[ names::soma_exc ] = SOMA_EXC; - ( *receptor_dict_ )[ names::soma_inh ] = SOMA_INH; - ( *receptor_dict_ )[ names::soma_curr ] = I_SOMA; + dictionary receptor_dict_; + receptor_dict_[ names::soma_exc.toString() ] = SOMA_EXC; + receptor_dict_[ names::soma_inh.toString() ] = SOMA_INH; + receptor_dict_[ names::soma_curr.toString() ] = I_SOMA; - ( *receptor_dict_ )[ names::dendritic_exc ] = DEND_EXC; - ( *receptor_dict_ )[ names::dendritic_inh ] = DEND_INH; - ( *receptor_dict_ )[ names::dendritic_curr ] = I_DEND; + receptor_dict_[ names::dendritic_exc.toString() ] = DEND_EXC; + receptor_dict_[ names::dendritic_inh.toString() ] = DEND_INH; + receptor_dict_[ names::dendritic_curr.toString() ] = I_DEND; - ( *d )[ names::receptor_types ] = receptor_dict_; + d[ names::receptor_types.toString() ] = receptor_dict_; } inline void -pp_cond_exp_mc_urbanczik::set_status( const DictionaryDatum& d ) +pp_cond_exp_mc_urbanczik::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d ); // throws if BadProperty diff --git a/models/pp_pop_psc_delta.cpp b/models/pp_pop_psc_delta.cpp index 18d8ddb263..fae87ee693 100644 --- a/models/pp_pop_psc_delta.cpp +++ b/models/pp_pop_psc_delta.cpp @@ -98,37 +98,37 @@ nest::pp_pop_psc_delta::State_::State_() * ---------------------------------------------------------------- */ void -nest::pp_pop_psc_delta::Parameters_::get( DictionaryDatum& d ) const +nest::pp_pop_psc_delta::Parameters_::get( dictionary& d ) const { - def< long >( d, names::N, N_ ); - def< double >( d, names::rho_0, rho_0_ ); - def< double >( d, names::delta_u, delta_u_ ); - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::len_kernel, len_kernel_ ); + d[ names::N.toString() ] = N_; + d[ names::rho_0.toString() ] = rho_0_; + d[ names::delta_u.toString() ] = delta_u_; + d[ names::I_e.toString() ] = I_e_; + d[ names::C_m.toString() ] = c_m_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::len_kernel.toString() ] = len_kernel_; ArrayDatum tau_eta_list_ad( tau_eta_ ); - def< ArrayDatum >( d, names::tau_eta, tau_eta_list_ad ); + d[ names::tau_eta.toString() ] = tau_eta_list_ad; ArrayDatum val_eta_list_ad( val_eta_ ); - def< ArrayDatum >( d, names::val_eta, val_eta_list_ad ); + d[ names::val_eta.toString() ] = val_eta_list_ad; } void -nest::pp_pop_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::pp_pop_psc_delta::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< long >( d, names::N, N_, node ); - updateValueParam< double >( d, names::rho_0, rho_0_, node ); - updateValueParam< double >( d, names::delta_u, delta_u_, node ); - updateValueParam< double >( d, names::len_kernel, len_kernel_, node ); + update_value_param( d, names::N.toString(), N_, node ); + update_value_param( d, names::rho_0.toString(), rho_0_, node ); + update_value_param( d, names::delta_u.toString(), delta_u_, node ); + update_value_param( d, names::len_kernel.toString(), len_kernel_, node ); - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::tau_m, tau_m_, node ); - updateValue< std::vector< double > >( d, names::tau_eta, tau_eta_ ); - updateValue< std::vector< double > >( d, names::val_eta, val_eta_ ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::tau_m.toString(), tau_m_, node ); + d.update_value( names::tau_eta.toString(), tau_eta_ ); + d.update_value( names::val_eta.toString(), val_eta_ ); if ( tau_eta_.size() != val_eta_.size() ) @@ -170,18 +170,18 @@ nest::pp_pop_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::pp_pop_psc_delta::State_::get( DictionaryDatum& d, const Parameters_& ) const +nest::pp_pop_psc_delta::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::V_m, h_ ); // Filterd version of input + d[ names::V_m.toString() ] = h_; // Filterd version of input int n_spikes = n_spikes_past_.size() > 0 ? n_spikes_past_[ p_n_spikes_past_ ] : 0; // return 0 if n_spikes_past_ has not been initialized yet - def< long >( d, names::n_events, n_spikes ); // Number of generated spikes + d[ names::n_events.toString() ] = n_spikes; // Number of generated spikes } void -nest::pp_pop_psc_delta::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::pp_pop_psc_delta::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, h_, node ); + update_value_param( d, names::V_m.toString(), h_, node ); initialized_ = false; // vectors of the state should be initialized with new parameter set. } diff --git a/models/pp_pop_psc_delta.h b/models/pp_pop_psc_delta.h index 6e91e7c21b..b8c25fcb44 100644 --- a/models/pp_pop_psc_delta.h +++ b/models/pp_pop_psc_delta.h @@ -183,8 +183,8 @@ class pp_pop_psc_delta : public Node port handles_test_event( CurrentEvent&, rport ); port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -230,9 +230,9 @@ class pp_pop_psc_delta : public Node /** -------------- */ std::vector< double > val_eta_; - Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + Parameters_(); //!< Sets default parameter values + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // ---------------------------------------------------------------- @@ -259,8 +259,8 @@ class pp_pop_psc_delta : public Node State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -379,15 +379,15 @@ pp_pop_psc_delta::handles_test_event( DataLoggingRequest& dlr, rport receptor_ty } inline void -pp_pop_psc_delta::get_status( DictionaryDatum& d ) const +pp_pop_psc_delta::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -pp_pop_psc_delta::set_status( const DictionaryDatum& d ) +pp_pop_psc_delta::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/pp_psc_delta.cpp b/models/pp_psc_delta.cpp index d42ad010b2..9658e70e9b 100644 --- a/models/pp_psc_delta.cpp +++ b/models/pp_psc_delta.cpp @@ -104,72 +104,72 @@ nest::pp_psc_delta::State_::State_() * ---------------------------------------------------------------- */ void -nest::pp_psc_delta::Parameters_::get( DictionaryDatum& d ) const +nest::pp_psc_delta::Parameters_::get( dictionary& d ) const { - def< double >( d, names::I_e, I_e_ ); - def< double >( d, names::C_m, c_m_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::dead_time, dead_time_ ); - def< bool >( d, names::dead_time_random, dead_time_random_ ); - def< long >( d, names::dead_time_shape, dead_time_shape_ ); - def< bool >( d, names::with_reset, with_reset_ ); - - def< double >( d, names::c_1, c_1_ ); - def< double >( d, names::c_2, c_2_ ); - def< double >( d, names::c_3, c_3_ ); - def< double >( d, names::t_ref_remaining, t_ref_remaining_ ); + d[ names::I_e.toString() ] = I_e_; + d[ names::C_m.toString() ] = c_m_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::dead_time.toString() ] = dead_time_; + d[ names::dead_time_random.toString() ] = dead_time_random_; + d[ names::dead_time_shape.toString() ] = dead_time_shape_; + d[ names::with_reset.toString() ] = with_reset_; + + d[ names::c_1.toString() ] = c_1_; + d[ names::c_2.toString() ] = c_2_; + d[ names::c_3.toString() ] = c_3_; + d[ names::t_ref_remaining.toString() ] = t_ref_remaining_; if ( multi_param_ ) { ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - def< ArrayDatum >( d, names::tau_sfa, tau_sfa_list_ad ); + d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - def< ArrayDatum >( d, names::q_sfa, q_sfa_list_ad ); + d[ names::q_sfa.toString() ] = q_sfa_list_ad; } else { if ( tau_sfa_.size() == 0 ) { - def< double >( d, names::tau_sfa, 0 ); - def< double >( d, names::q_sfa, 0 ); + d[ names::tau_sfa.toString() ] = 0; + d[ names::q_sfa.toString() ] = 0; } else { - def< double >( d, names::tau_sfa, tau_sfa_[ 0 ] ); - def< double >( d, names::q_sfa, q_sfa_[ 0 ] ); + d[ names::tau_sfa.toString() ] = tau_sfa_[ 0 ]; + d[ names::q_sfa.toString() ] = q_sfa_[ 0 ]; } } } void -nest::pp_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::pp_psc_delta::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::I_e, I_e_, node ); - updateValueParam< double >( d, names::C_m, c_m_, node ); - updateValueParam< double >( d, names::tau_m, tau_m_, node ); - updateValueParam< double >( d, names::dead_time, dead_time_, node ); - updateValueParam< bool >( d, names::dead_time_random, dead_time_random_, node ); - updateValueParam< long >( d, names::dead_time_shape, dead_time_shape_, node ); - updateValueParam< bool >( d, names::with_reset, with_reset_, node ); - updateValueParam< double >( d, names::c_1, c_1_, node ); - updateValueParam< double >( d, names::c_2, c_2_, node ); - updateValueParam< double >( d, names::c_3, c_3_, node ); - updateValueParam< double >( d, names::t_ref_remaining, t_ref_remaining_, node ); + update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::C_m.toString(), c_m_, node ); + update_value_param( d, names::tau_m.toString(), tau_m_, node ); + update_value_param( d, names::dead_time.toString(), dead_time_, node ); + update_value_param( d, names::dead_time_random.toString(), dead_time_random_, node ); + update_value_param( d, names::dead_time_shape.toString(), dead_time_shape_, node ); + update_value_param( d, names::with_reset.toString(), with_reset_, node ); + update_value_param( d, names::c_1.toString(), c_1_, node ); + update_value_param( d, names::c_2.toString(), c_2_, node ); + update_value_param( d, names::c_3.toString(), c_3_, node ); + update_value_param( d, names::t_ref_remaining.toString(), t_ref_remaining_, node ); try { - updateValue< std::vector< double > >( d, names::tau_sfa, tau_sfa_ ); - updateValue< std::vector< double > >( d, names::q_sfa, q_sfa_ ); + d.update_value( names::tau_sfa.toString(), tau_sfa_ ); + d.update_value( names::q_sfa.toString(), q_sfa_ ); } catch ( TypeMismatch& e ) { multi_param_ = 0; double tau_sfa_temp_; double q_sfa_temp_; - updateValueParam< double >( d, names::tau_sfa, tau_sfa_temp_, node ); - updateValueParam< double >( d, names::q_sfa, q_sfa_temp_, node ); + update_value_param( d, names::tau_sfa.toString(), tau_sfa_temp_, node ); + update_value_param( d, names::q_sfa.toString(), q_sfa_temp_, node ); tau_sfa_.push_back( tau_sfa_temp_ ); q_sfa_.push_back( q_sfa_temp_ ); } @@ -224,17 +224,17 @@ nest::pp_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::pp_psc_delta::State_::get( DictionaryDatum& d, const Parameters_& ) const +nest::pp_psc_delta::State_::get( dictionary& d, const Parameters_& ) const { - def< double >( d, names::V_m, y3_ ); // Membrane potential - def< double >( d, names::E_sfa, q_ ); // Adaptive threshold potential + d[ names::V_m.toString() ] = y3_; // Membrane potential + d[ names::E_sfa.toString() ] = q_; // Adaptive threshold potential } void -nest::pp_psc_delta::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node ) +nest::pp_psc_delta::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - updateValueParam< double >( d, names::V_m, y3_, node ); - updateValueParam< double >( d, names::E_sfa, q_, node ); + update_value_param( d, names::V_m.toString(), y3_, node ); + update_value_param( d, names::E_sfa.toString(), q_, node ); // vectors of the state should be initialized with new parameter set. initialized_ = false; } diff --git a/models/pp_psc_delta.h b/models/pp_psc_delta.h index b9768b6b4b..9a6dd8c6bd 100644 --- a/models/pp_psc_delta.h +++ b/models/pp_psc_delta.h @@ -216,8 +216,8 @@ class pp_psc_delta : public ArchivingNode port handles_test_event( DataLoggingRequest&, rport ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_state_(); @@ -282,8 +282,8 @@ class pp_psc_delta : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dictionary }; // ---------------------------------------------------------------- @@ -307,8 +307,8 @@ class pp_psc_delta : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum&, const Parameters_& ) const; - void set( const DictionaryDatum&, const Parameters_&, Node* ); + void get( dictionary&, const Parameters_& ) const; + void set( const dictionary&, const Parameters_&, Node* ); }; // ---------------------------------------------------------------- @@ -428,16 +428,16 @@ pp_psc_delta::handles_test_event( DataLoggingRequest& dlr, rport receptor_type ) } inline void -pp_psc_delta::get_status( DictionaryDatum& d ) const +pp_psc_delta::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -pp_psc_delta::set_status( const DictionaryDatum& d ) +pp_psc_delta::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/ppd_sup_generator.cpp b/models/ppd_sup_generator.cpp index 720a3f1e26..8cdcea1164 100644 --- a/models/ppd_sup_generator.cpp +++ b/models/ppd_sup_generator.cpp @@ -118,33 +118,33 @@ nest::ppd_sup_generator::Parameters_::Parameters_() * ---------------------------------------------------------------- */ void -nest::ppd_sup_generator::Parameters_::get( DictionaryDatum& d ) const +nest::ppd_sup_generator::Parameters_::get( dictionary& d ) const { - ( *d )[ names::rate ] = rate_; - ( *d )[ names::dead_time ] = dead_time_; - ( *d )[ names::n_proc ] = n_proc_; - ( *d )[ names::frequency ] = frequency_; - ( *d )[ names::relative_amplitude ] = amplitude_; + d[ names::rate.toString() ] = rate_; + d[ names::dead_time.toString() ] = dead_time_; + d[ names::n_proc.toString() ] = n_proc_; + d[ names::frequency.toString() ] = frequency_; + d[ names::relative_amplitude.toString() ] = amplitude_; } void -nest::ppd_sup_generator::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::ppd_sup_generator::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::dead_time, dead_time_, node ); + update_value_param( d, names::dead_time.toString(), dead_time_, node ); if ( dead_time_ < 0 ) { throw BadProperty( "The dead time cannot be negative." ); } - updateValueParam< double >( d, names::rate, rate_, node ); + update_value_param( d, names::rate.toString(), rate_, node ); if ( 1000.0 / rate_ <= dead_time_ ) { throw BadProperty( "The inverse rate has to be larger than the dead time." ); } long n_proc_l = n_proc_; - updateValueParam< long >( d, names::n_proc, n_proc_l, node ); + update_value_param( d, names::n_proc.toString(), n_proc_l, node ); if ( n_proc_l < 1 ) { throw BadProperty( "The number of component processes cannot be smaller than one" ); @@ -154,9 +154,9 @@ nest::ppd_sup_generator::Parameters_::set( const DictionaryDatum& d, Node* node n_proc_ = static_cast< unsigned long >( n_proc_l ); } - updateValueParam< double >( d, names::frequency, frequency_, node ); + update_value_param( d, names::frequency.toString(), frequency_, node ); - updateValueParam< double >( d, names::relative_amplitude, amplitude_, node ); + update_value_param( d, names::relative_amplitude.toString(), amplitude_, node ); if ( amplitude_ > 1.0 or amplitude_ < 0.0 ) { throw BadProperty( "The relative amplitude of the rate modulation must be in [0,1]." ); @@ -304,12 +304,13 @@ nest::ppd_sup_generator::set_data_from_stimulation_backend( std::vector< double "The size of the data for the ppd_sup_generator needs to be 5 " "[dead_time, rate, n_proc, frequency, relative_amplitude]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::dead_time ] = DoubleDatum( input_param[ 0 ] ); - ( *d )[ names::rate ] = DoubleDatum( input_param[ 1 ] ); - ( *d )[ names::n_proc ] = DoubleDatum( input_param[ 2 ] ); - ( *d )[ names::frequency ] = DoubleDatum( input_param[ 3 ] ); - ( *d )[ names::relative_amplitude ] = DoubleDatum( input_param[ 4 ] ); + dictionary d; + ( new Dictionary ); + d[ names::dead_time.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::rate.toString() ] = DoubleDatum( input_param[ 1 ] ); + d[ names::n_proc.toString() ] = DoubleDatum( input_param[ 2 ] ); + d[ names::frequency.toString() ] = DoubleDatum( input_param[ 3 ] ); + d[ names::relative_amplitude.toString() ] = DoubleDatum( input_param[ 4 ] ); ptmp.set( d, this ); } diff --git a/models/ppd_sup_generator.h b/models/ppd_sup_generator.h index 627d5ef906..22b4510d66 100644 --- a/models/ppd_sup_generator.h +++ b/models/ppd_sup_generator.h @@ -117,8 +117,8 @@ class ppd_sup_generator : public StimulationDevice port send_test_event( Node&, rport, synindex, bool ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; void set_data_from_stimulation_backend( std::vector< double >& input_param ) override; @@ -169,8 +169,8 @@ class ppd_sup_generator : public StimulationDevice Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; // ------------------------------------------------------------ @@ -258,14 +258,14 @@ ppd_sup_generator::send_test_event( Node& target, rport receptor_type, synindex } inline void -ppd_sup_generator::get_status( DictionaryDatum& d ) const +ppd_sup_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); } inline void -ppd_sup_generator::set_status( const DictionaryDatum& d ) +ppd_sup_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/pulsepacket_generator.cpp b/models/pulsepacket_generator.cpp index 07293ba856..127c4ec65b 100644 --- a/models/pulsepacket_generator.cpp +++ b/models/pulsepacket_generator.cpp @@ -64,21 +64,21 @@ nest::pulsepacket_generator::Variables_::Variables_() * ---------------------------------------------------------------- */ void -nest::pulsepacket_generator::Parameters_::get( DictionaryDatum& d ) const +nest::pulsepacket_generator::Parameters_::get( dictionary& d ) const { - ( *d )[ names::pulse_times ] = DoubleVectorDatum( new std::vector< double >( pulse_times_ ) ); - ( *d )[ names::activity ] = a_; - ( *d )[ names::sdev ] = sdev_; + d[ names::pulse_times.toString() ] = DoubleVectorDatum( new std::vector< double >( pulse_times_ ) ); + d[ names::activity.toString() ] = a_; + d[ names::sdev.toString() ] = sdev_; } void -nest::pulsepacket_generator::Parameters_::set( const DictionaryDatum& d, pulsepacket_generator& ppg, Node* node ) +nest::pulsepacket_generator::Parameters_::set( const dictionary& d, pulsepacket_generator& ppg, Node* node ) { // We cannot use a single line here since short-circuiting may stop evaluation // prematurely. Therefore, neednewpulse must be second arg on second line. - bool neednewpulse = updateValueParam< long >( d, names::activity, a_, node ); - neednewpulse = updateValueParam< double >( d, names::sdev, sdev_, node ) or neednewpulse; + bool neednewpulse = update_value_param( d, names::activity.toString(), a_, node ); + neednewpulse = update_value_param( d, names::sdev.toString(), sdev_, node ) or neednewpulse; if ( a_ < 0 ) { throw BadProperty( "The activity cannot be negative." ); @@ -89,7 +89,7 @@ nest::pulsepacket_generator::Parameters_::set( const DictionaryDatum& d, pulsepa } - if ( updateValue< std::vector< double > >( d, "pulse_times", pulse_times_ ) or neednewpulse ) + if ( d.update_value( "pulse_times", pulse_times_ ) or neednewpulse ) { std::sort( pulse_times_.begin(), pulse_times_.end() ); ppg.B_.spiketimes_.clear(); @@ -248,11 +248,12 @@ nest::pulsepacket_generator::set_data_from_stimulation_backend( std::vector< dou "The size of the data for the pulse_generator needs to be higher than 3 " "[activity, sdev, all the pulse times]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::activity ] = DoubleDatum( input_param[ 0 ] ); - ( *d )[ names::sdev ] = DoubleDatum( input_param[ 1 ] ); + dictionary d; + ( new Dictionary ); + d[ names::activity.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::sdev.toString() ] = DoubleDatum( input_param[ 1 ] ); input_param.erase( input_param.begin(), input_param.begin() + 2 ); - ( *d )[ names::pulse_times ] = DoubleVectorDatum( input_param ); + d[ names::pulse_times.toString() ] = DoubleVectorDatum( input_param ); ptmp.set( d, *this, this ); } diff --git a/models/pulsepacket_generator.h b/models/pulsepacket_generator.h index 35476ff8a3..407a717025 100644 --- a/models/pulsepacket_generator.h +++ b/models/pulsepacket_generator.h @@ -111,8 +111,8 @@ class pulsepacket_generator : public StimulationDevice port send_test_event( Node&, rport, synindex, bool ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; void set_data_from_stimulation_backend( std::vector< double >& input_param ) override; @@ -138,14 +138,14 @@ class pulsepacket_generator : public StimulationDevice Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set values from dicitonary. * @note Buffer is passed so that the position etc can be reset * parameters have been changed. */ - void set( const DictionaryDatum&, pulsepacket_generator&, Node* ); + void set( const dictionary&, pulsepacket_generator&, Node* ); }; // ------------------------------------------------------------ @@ -195,14 +195,14 @@ pulsepacket_generator::send_test_event( Node& target, rport receptor_type, synin } inline void -pulsepacket_generator::get_status( DictionaryDatum& d ) const +pulsepacket_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); } inline void -pulsepacket_generator::set_status( const DictionaryDatum& d ) +pulsepacket_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, *this, this ); // throws if BadProperty diff --git a/models/quantal_stp_synapse.h b/models/quantal_stp_synapse.h index 9c00bfd90c..b10c718e5f 100644 --- a/models/quantal_stp_synapse.h +++ b/models/quantal_stp_synapse.h @@ -131,13 +131,13 @@ class quantal_stp_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set default properties of this connection from the values given in * dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. diff --git a/models/quantal_stp_synapse_impl.h b/models/quantal_stp_synapse_impl.h index 9fa2664b44..c4fe1d3e06 100644 --- a/models/quantal_stp_synapse_impl.h +++ b/models/quantal_stp_synapse_impl.h @@ -42,21 +42,19 @@ namespace nest * int. */ bool -update_value_int( const DictionaryDatum& d, Name propname, int& prop ) +update_value_int( const dictionary& d, Name propname, int& prop ) { - if ( d->known( propname ) ) + if ( d.known( propname.toString() ) ) { - Datum* dat = ( *d )[ propname ].datum(); - IntegerDatum* intdat = dynamic_cast< IntegerDatum* >( dat ); - if ( intdat != 0 ) + const auto value = d.at( propname.toString() ); + if ( is_int( value ) ) { - prop = static_cast< int >( intdat->get() ); + prop = boost::any_cast< int >( value ); return true; } - DoubleDatum* doubledat = dynamic_cast< DoubleDatum* >( dat ); - if ( doubledat != 0 ) + else if ( is_double( value ) ) { - prop = static_cast< int >( doubledat->get() ); + prop = static_cast< int >( boost::any_cast< double >( value ) ); return true; } else @@ -84,30 +82,30 @@ quantal_stp_synapse< targetidentifierT >::quantal_stp_synapse() template < typename targetidentifierT > void -quantal_stp_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +quantal_stp_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::dU, U_ ); - def< double >( d, names::u, u_ ); - def< double >( d, names::tau_rec, tau_rec_ ); - def< double >( d, names::tau_fac, tau_fac_ ); - def< int >( d, names::n, n_ ); - def< int >( d, names::a, a_ ); + d[ names::weight.toString() ] = weight_; + d[ names::dU.toString() ] = U_; + d[ names::u.toString() ] = u_; + d[ names::tau_rec.toString() ] = tau_rec_; + d[ names::tau_fac.toString() ] = tau_fac_; + d[ names::n.toString() ] = n_; + d[ names::a.toString() ] = a_; } template < typename targetidentifierT > void -quantal_stp_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +quantal_stp_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); - updateValue< double >( d, names::dU, U_ ); - updateValue< double >( d, names::u, u_ ); - updateValue< double >( d, names::tau_rec, tau_rec_ ); - updateValue< double >( d, names::tau_fac, tau_fac_ ); + d.update_value( names::dU.toString(), U_ ); + d.update_value( names::u.toString(), u_ ); + d.update_value( names::tau_rec.toString(), tau_rec_ ); + d.update_value( names::tau_fac.toString(), tau_fac_ ); update_value_int( d, names::n, n_ ); update_value_int( d, names::a, a_ ); } diff --git a/models/rate_connection_delayed.h b/models/rate_connection_delayed.h index aad0da803c..eb69dab56d 100644 --- a/models/rate_connection_delayed.h +++ b/models/rate_connection_delayed.h @@ -125,9 +125,9 @@ class RateConnectionDelayed : public Connection< targetidentifierT > e(); } - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); void set_weight( double w ) @@ -141,19 +141,19 @@ class RateConnectionDelayed : public Connection< targetidentifierT > template < typename targetidentifierT > void -RateConnectionDelayed< targetidentifierT >::get_status( DictionaryDatum& d ) const +RateConnectionDelayed< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -RateConnectionDelayed< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +RateConnectionDelayed< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); } } // namespace diff --git a/models/rate_connection_instantaneous.h b/models/rate_connection_instantaneous.h index 4726020486..75f28e2435 100644 --- a/models/rate_connection_instantaneous.h +++ b/models/rate_connection_instantaneous.h @@ -125,9 +125,9 @@ class RateConnectionInstantaneous : public Connection< targetidentifierT > e(); } - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); void set_weight( double w ) @@ -149,19 +149,19 @@ class RateConnectionInstantaneous : public Connection< targetidentifierT > template < typename targetidentifierT > void -RateConnectionInstantaneous< targetidentifierT >::get_status( DictionaryDatum& d ) const +RateConnectionInstantaneous< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -RateConnectionInstantaneous< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +RateConnectionInstantaneous< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // If the delay is set, we throw a BadProperty - if ( d->known( names::delay ) ) + if ( d.known( names::delay.toString() ) ) { throw BadProperty( "rate_connection_instantaneous has no delay. Please use " @@ -169,7 +169,7 @@ RateConnectionInstantaneous< targetidentifierT >::set_status( const DictionaryDa } ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); } } // namespace diff --git a/models/rate_neuron_ipn.h b/models/rate_neuron_ipn.h index 4fcbbb36fd..bcd02374c8 100644 --- a/models/rate_neuron_ipn.h +++ b/models/rate_neuron_ipn.h @@ -136,8 +136,8 @@ class rate_neuron_ipn : public ArchivingNode { } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -197,9 +197,9 @@ class rate_neuron_ipn : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -214,14 +214,14 @@ class rate_neuron_ipn : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, Node* node ); + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -345,19 +345,19 @@ rate_neuron_ipn< TNonlinearities >::handles_test_event( DataLoggingRequest& dlr, template < class TNonlinearities > inline void -rate_neuron_ipn< TNonlinearities >::get_status( DictionaryDatum& d ) const +rate_neuron_ipn< TNonlinearities >::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); nonlinearities_.get( d ); } template < class TNonlinearities > inline void -rate_neuron_ipn< TNonlinearities >::set_status( const DictionaryDatum& d ) +rate_neuron_ipn< TNonlinearities >::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/rate_neuron_ipn_impl.h b/models/rate_neuron_ipn_impl.h index 17845d887d..809994c9bc 100644 --- a/models/rate_neuron_ipn_impl.h +++ b/models/rate_neuron_ipn_impl.h @@ -89,37 +89,37 @@ nest::rate_neuron_ipn< TNonlinearities >::State_::State_() template < class TNonlinearities > void -nest::rate_neuron_ipn< TNonlinearities >::Parameters_::get( DictionaryDatum& d ) const +nest::rate_neuron_ipn< TNonlinearities >::Parameters_::get( dictionary& d ) const { - def< double >( d, names::tau, tau_ ); - def< double >( d, names::lambda, lambda_ ); - def< double >( d, names::sigma, sigma_ ); - def< double >( d, names::mu, mu_ ); - def< double >( d, names::rectify_rate, rectify_rate_ ); - def< bool >( d, names::linear_summation, linear_summation_ ); - def< bool >( d, names::rectify_output, rectify_output_ ); - def< bool >( d, names::mult_coupling, mult_coupling_ ); + d[ names::tau.toString() ] = tau_; + d[ names::lambda.toString() ] = lambda_; + d[ names::sigma.toString() ] = sigma_; + d[ names::mu.toString() ] = mu_; + d[ names::rectify_rate.toString() ] = rectify_rate_; + d[ names::linear_summation.toString() ] = linear_summation_; + d[ names::rectify_output.toString() ] = rectify_output_; + d[ names::mult_coupling.toString() ] = mult_coupling_; // Also allow old names (to not break old scripts) - def< double >( d, names::std, sigma_ ); - def< double >( d, names::mean, mu_ ); + d[ names::std.toString() ] = sigma_; + d[ names::mean.toString() ] = mu_; } template < class TNonlinearities > void -nest::rate_neuron_ipn< TNonlinearities >::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::rate_neuron_ipn< TNonlinearities >::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::tau, tau_, node ); - updateValueParam< double >( d, names::lambda, lambda_, node ); - updateValueParam< double >( d, names::mu, mu_, node ); - updateValueParam< double >( d, names::rectify_rate, rectify_rate_, node ); - updateValueParam< double >( d, names::sigma, sigma_, node ); - updateValueParam< bool >( d, names::linear_summation, linear_summation_, node ); - updateValueParam< bool >( d, names::rectify_output, rectify_output_, node ); - updateValueParam< bool >( d, names::mult_coupling, mult_coupling_, node ); + update_value_param( d, names::tau.toString(), tau_, node ); + update_value_param( d, names::lambda.toString(), lambda_, node ); + update_value_param( d, names::mu.toString(), mu_, node ); + update_value_param( d, names::rectify_rate.toString(), rectify_rate_, node ); + update_value_param( d, names::sigma.toString(), sigma_, node ); + update_value_param( d, names::linear_summation.toString(), linear_summation_, node ); + update_value_param( d, names::rectify_output.toString(), rectify_output_, node ); + update_value_param( d, names::mult_coupling.toString(), mult_coupling_, node ); // Check for old names - if ( updateValueParam< double >( d, names::mean, mu_, node ) ) + if ( update_value_param( d, names::mean.toString(), mu_, node ) ) { LOG( M_WARNING, "rate_neuron_ipn< TNonlinearities >::Parameters_::set", @@ -127,7 +127,7 @@ nest::rate_neuron_ipn< TNonlinearities >::Parameters_::set( const DictionaryDatu "name from now on." ); } - if ( updateValueParam< double >( d, names::std, sigma_, node ) ) + if ( update_value_param( d, names::std.toString(), sigma_, node ) ) { LOG( M_WARNING, "rate_neuron_ipn< TNonlinearities >::Parameters_::set", @@ -156,17 +156,17 @@ nest::rate_neuron_ipn< TNonlinearities >::Parameters_::set( const DictionaryDatu template < class TNonlinearities > void -nest::rate_neuron_ipn< TNonlinearities >::State_::get( DictionaryDatum& d ) const +nest::rate_neuron_ipn< TNonlinearities >::State_::get( dictionary& d ) const { - def< double >( d, names::rate, rate_ ); // Rate - def< double >( d, names::noise, noise_ ); // Noise + d[ names::rate.toString() ] = rate_; // Rate + d[ names::noise.toString() ] = noise_; // Noise } template < class TNonlinearities > void -nest::rate_neuron_ipn< TNonlinearities >::State_::set( const DictionaryDatum& d, Node* node ) +nest::rate_neuron_ipn< TNonlinearities >::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::rate, rate_, node ); // Rate + update_value_param( d, names::rate.toString(), rate_, node ); // Rate } template < class TNonlinearities > diff --git a/models/rate_neuron_opn.h b/models/rate_neuron_opn.h index a532619731..40e065e680 100644 --- a/models/rate_neuron_opn.h +++ b/models/rate_neuron_opn.h @@ -139,8 +139,8 @@ class rate_neuron_opn : public ArchivingNode { } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -187,9 +187,9 @@ class rate_neuron_opn : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -205,14 +205,14 @@ class rate_neuron_opn : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, Node* node ); + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -343,19 +343,19 @@ rate_neuron_opn< TNonlinearities >::handles_test_event( DataLoggingRequest& dlr, template < class TNonlinearities > inline void -rate_neuron_opn< TNonlinearities >::get_status( DictionaryDatum& d ) const +rate_neuron_opn< TNonlinearities >::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); nonlinearities_.get( d ); } template < class TNonlinearities > inline void -rate_neuron_opn< TNonlinearities >::set_status( const DictionaryDatum& d ) +rate_neuron_opn< TNonlinearities >::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/rate_neuron_opn_impl.h b/models/rate_neuron_opn_impl.h index 3fbd5608f2..aeb6fd80ba 100644 --- a/models/rate_neuron_opn_impl.h +++ b/models/rate_neuron_opn_impl.h @@ -87,31 +87,31 @@ nest::rate_neuron_opn< TNonlinearities >::State_::State_() template < class TNonlinearities > void -nest::rate_neuron_opn< TNonlinearities >::Parameters_::get( DictionaryDatum& d ) const +nest::rate_neuron_opn< TNonlinearities >::Parameters_::get( dictionary& d ) const { - def< double >( d, names::tau, tau_ ); - def< double >( d, names::sigma, sigma_ ); - def< double >( d, names::mu, mu_ ); - def< bool >( d, names::linear_summation, linear_summation_ ); - def< bool >( d, names::mult_coupling, mult_coupling_ ); + d[ names::tau.toString() ] = tau_; + d[ names::sigma.toString() ] = sigma_; + d[ names::mu.toString() ] = mu_; + d[ names::linear_summation.toString() ] = linear_summation_; + d[ names::mult_coupling.toString() ] = mult_coupling_; // Also allow old names (to not break old scripts) - def< double >( d, names::std, sigma_ ); - def< double >( d, names::mean, mu_ ); + d[ names::std.toString() ] = sigma_; + d[ names::mean.toString() ] = mu_; } template < class TNonlinearities > void -nest::rate_neuron_opn< TNonlinearities >::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::rate_neuron_opn< TNonlinearities >::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::tau, tau_, node ); - updateValueParam< double >( d, names::mu, mu_, node ); - updateValueParam< double >( d, names::sigma, sigma_, node ); - updateValueParam< bool >( d, names::linear_summation, linear_summation_, node ); - updateValueParam< bool >( d, names::mult_coupling, mult_coupling_, node ); + update_value_param( d, names::tau.toString(), tau_, node ); + update_value_param( d, names::mu.toString(), mu_, node ); + update_value_param( d, names::sigma.toString(), sigma_, node ); + update_value_param( d, names::linear_summation.toString(), linear_summation_, node ); + update_value_param( d, names::mult_coupling.toString(), mult_coupling_, node ); // Check for old names - if ( updateValueParam< double >( d, names::mean, mu_, node ) ) + if ( update_value_param( d, names::mean.toString(), mu_, node ) ) { LOG( M_WARNING, "rate_neuron_opn< TNonlinearities >::Parameters_::set", @@ -119,7 +119,7 @@ nest::rate_neuron_opn< TNonlinearities >::Parameters_::set( const DictionaryDatu "name from now on." ); } - if ( updateValueParam< double >( d, names::std, sigma_, node ) ) + if ( update_value_param( d, names::std.toString(), sigma_, node ) ) { LOG( M_WARNING, "rate_neuron_opn< TNonlinearities >::Parameters_::set", @@ -140,18 +140,18 @@ nest::rate_neuron_opn< TNonlinearities >::Parameters_::set( const DictionaryDatu template < class TNonlinearities > void -nest::rate_neuron_opn< TNonlinearities >::State_::get( DictionaryDatum& d ) const +nest::rate_neuron_opn< TNonlinearities >::State_::get( dictionary& d ) const { - def< double >( d, names::rate, rate_ ); // Rate - def< double >( d, names::noise, noise_ ); // Noise - def< double >( d, names::noisy_rate, noisy_rate_ ); // Noisy rate + d[ names::rate.toString() ] = rate_; // Rate + d[ names::noise.toString() ] = noise_; // Noise + d[ names::noisy_rate.toString() ] = noisy_rate_; // Noisy rate } template < class TNonlinearities > void -nest::rate_neuron_opn< TNonlinearities >::State_::set( const DictionaryDatum& d, Node* node ) +nest::rate_neuron_opn< TNonlinearities >::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::rate, rate_, node ); // Rate + update_value_param( d, names::rate.toString(), rate_, node ); // Rate } template < class TNonlinearities > diff --git a/models/rate_transformer_node.h b/models/rate_transformer_node.h index 27c9978f26..5788d182da 100644 --- a/models/rate_transformer_node.h +++ b/models/rate_transformer_node.h @@ -137,8 +137,8 @@ class rate_transformer_node : public ArchivingNode } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -170,9 +170,9 @@ class rate_transformer_node : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -186,14 +186,14 @@ class rate_transformer_node : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum& ) const; + void get( dictionary& ) const; /** Set values from dictionary. * @param dictionary to take data from * @param current parameters * @param Change in reversal potential E_L specified by this dict */ - void set( const DictionaryDatum&, Node* node ); + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -292,19 +292,19 @@ rate_transformer_node< TNonlinearities >::handles_test_event( DataLoggingRequest template < class TNonlinearities > inline void -rate_transformer_node< TNonlinearities >::get_status( DictionaryDatum& d ) const +rate_transformer_node< TNonlinearities >::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); nonlinearities_.get( d ); } template < class TNonlinearities > inline void -rate_transformer_node< TNonlinearities >::set_status( const DictionaryDatum& d ) +rate_transformer_node< TNonlinearities >::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/rate_transformer_node_impl.h b/models/rate_transformer_node_impl.h index dbc07d7143..db3bfc4f2c 100644 --- a/models/rate_transformer_node_impl.h +++ b/models/rate_transformer_node_impl.h @@ -81,30 +81,30 @@ nest::rate_transformer_node< TNonlinearities >::State_::State_() template < class TNonlinearities > void -nest::rate_transformer_node< TNonlinearities >::Parameters_::get( DictionaryDatum& d ) const +nest::rate_transformer_node< TNonlinearities >::Parameters_::get( dictionary& d ) const { - def< bool >( d, names::linear_summation, linear_summation_ ); + d[ names::linear_summation.toString() ] = linear_summation_; } template < class TNonlinearities > void -nest::rate_transformer_node< TNonlinearities >::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::rate_transformer_node< TNonlinearities >::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< bool >( d, names::linear_summation, linear_summation_, node ); + update_value_param( d, names::linear_summation.toString(), linear_summation_, node ); } template < class TNonlinearities > void -nest::rate_transformer_node< TNonlinearities >::State_::get( DictionaryDatum& d ) const +nest::rate_transformer_node< TNonlinearities >::State_::get( dictionary& d ) const { - def< double >( d, names::rate, rate_ ); // Rate + d[ names::rate.toString() ] = rate_; // Rate } template < class TNonlinearities > void -nest::rate_transformer_node< TNonlinearities >::State_::set( const DictionaryDatum& d, Node* node ) +nest::rate_transformer_node< TNonlinearities >::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::rate, rate_, node ); // Rate + update_value_param( d, names::rate.toString(), rate_, node ); // Rate } template < class TNonlinearities > diff --git a/models/siegert_neuron.cpp b/models/siegert_neuron.cpp index 1679d8699b..eb9a6875eb 100644 --- a/models/siegert_neuron.cpp +++ b/models/siegert_neuron.cpp @@ -108,27 +108,27 @@ nest::siegert_neuron::State_::State_() * ---------------------------------------------------------------- */ void -nest::siegert_neuron::Parameters_::get( DictionaryDatum& d ) const +nest::siegert_neuron::Parameters_::get( dictionary& d ) const { - def< double >( d, names::mean, mean_ ); - def< double >( d, names::theta, theta_ ); - def< double >( d, names::V_reset, V_reset_ ); - def< double >( d, names::tau, tau_ ); - def< double >( d, names::tau_m, tau_m_ ); - def< double >( d, names::tau_syn, tau_syn_ ); - def< double >( d, names::t_ref, t_ref_ ); + d[ names::mean.toString() ] = mean_; + d[ names::theta.toString() ] = theta_; + d[ names::V_reset.toString() ] = V_reset_; + d[ names::tau.toString() ] = tau_; + d[ names::tau_m.toString() ] = tau_m_; + d[ names::tau_syn.toString() ] = tau_syn_; + d[ names::t_ref.toString() ] = t_ref_; } void -nest::siegert_neuron::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::siegert_neuron::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::mean, mean_, node ); - updateValueParam< double >( d, names::theta, theta_, node ); - updateValueParam< double >( d, names::V_reset, V_reset_, node ); - updateValueParam< double >( d, names::tau, tau_, node ); - updateValueParam< double >( d, names::tau_m, tau_m_, node ); - updateValueParam< double >( d, names::tau_syn, tau_syn_, node ); - updateValueParam< double >( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::mean.toString(), mean_, node ); + update_value_param( d, names::theta.toString(), theta_, node ); + update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::tau.toString(), tau_, node ); + update_value_param( d, names::tau_m.toString(), tau_m_, node ); + update_value_param( d, names::tau_syn.toString(), tau_syn_, node ); + update_value_param( d, names::t_ref.toString(), t_ref_, node ); if ( V_reset_ >= theta_ ) { @@ -157,15 +157,15 @@ nest::siegert_neuron::Parameters_::set( const DictionaryDatum& d, Node* node ) } void -nest::siegert_neuron::State_::get( DictionaryDatum& d ) const +nest::siegert_neuron::State_::get( dictionary& d ) const { - def< double >( d, names::rate, r_ ); // Rate + d[ names::rate.toString() ] = r_; // Rate } void -nest::siegert_neuron::State_::set( const DictionaryDatum& d, Node* node ) +nest::siegert_neuron::State_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::rate, r_, node ); // Rate + update_value_param( d, names::rate.toString(), r_, node ); // Rate } nest::siegert_neuron::Buffers_::Buffers_( siegert_neuron& n ) diff --git a/models/siegert_neuron.h b/models/siegert_neuron.h index 842eba2b16..d0e92a515b 100644 --- a/models/siegert_neuron.h +++ b/models/siegert_neuron.h @@ -166,8 +166,8 @@ class siegert_neuron : public ArchivingNode { } - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void init_buffers_(); @@ -218,9 +218,9 @@ class siegert_neuron : public ArchivingNode Parameters_(); //!< Sets default parameter values - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -234,8 +234,8 @@ class siegert_neuron : public ArchivingNode State_(); //!< Default initialization - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, Node* node ); }; // ---------------------------------------------------------------- @@ -332,16 +332,16 @@ siegert_neuron::handles_test_event( DataLoggingRequest& dlr, rport receptor_type } inline void -siegert_neuron::get_status( DictionaryDatum& d ) const +siegert_neuron::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -siegert_neuron::set_status( const DictionaryDatum& d ) +siegert_neuron::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/sigmoid_rate.cpp b/models/sigmoid_rate.cpp index 955174082f..232d1301c3 100644 --- a/models/sigmoid_rate.cpp +++ b/models/sigmoid_rate.cpp @@ -26,19 +26,19 @@ namespace nest { void -nonlinearities_sigmoid_rate::get( DictionaryDatum& d ) const +nonlinearities_sigmoid_rate::get( dictionary& d ) const { - def< double >( d, names::g, g_ ); - def< double >( d, names::beta, beta_ ); - def< double >( d, names::theta, theta_ ); + d[ names::g.toString() ] = g_; + d[ names::beta.toString() ] = beta_; + d[ names::theta.toString() ] = theta_; } void -nonlinearities_sigmoid_rate::set( const DictionaryDatum& d, Node* node ) +nonlinearities_sigmoid_rate::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::g, g_, node ); - updateValueParam< double >( d, names::beta, beta_, node ); - updateValueParam< double >( d, names::theta, theta_, node ); + update_value_param( d, names::g.toString(), g_, node ); + update_value_param( d, names::beta.toString(), beta_, node ); + update_value_param( d, names::theta.toString(), theta_, node ); } /* diff --git a/models/sigmoid_rate.h b/models/sigmoid_rate.h index 9250e8e419..230a77adbd 100644 --- a/models/sigmoid_rate.h +++ b/models/sigmoid_rate.h @@ -141,8 +141,8 @@ class nonlinearities_sigmoid_rate { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary double input( double h ); // non-linearity on input double mult_coupling_ex( double rate ); // factor of multiplicative coupling diff --git a/models/sigmoid_rate_gg_1998.cpp b/models/sigmoid_rate_gg_1998.cpp index 5376c62598..6fc2356912 100644 --- a/models/sigmoid_rate_gg_1998.cpp +++ b/models/sigmoid_rate_gg_1998.cpp @@ -26,15 +26,15 @@ namespace nest { void -nonlinearities_sigmoid_rate_gg_1998::get( DictionaryDatum& d ) const +nonlinearities_sigmoid_rate_gg_1998::get( dictionary& d ) const { - def< double >( d, names::g, g_ ); + d[ names::g.toString() ] = g_; } void -nonlinearities_sigmoid_rate_gg_1998::set( const DictionaryDatum& d, Node* node ) +nonlinearities_sigmoid_rate_gg_1998::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::g, g_, node ); + update_value_param( d, names::g.toString(), g_, node ); } /* diff --git a/models/sigmoid_rate_gg_1998.h b/models/sigmoid_rate_gg_1998.h index af2f73c923..9a5d9d743d 100644 --- a/models/sigmoid_rate_gg_1998.h +++ b/models/sigmoid_rate_gg_1998.h @@ -136,8 +136,8 @@ class nonlinearities_sigmoid_rate_gg_1998 { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary double input( double h ); // non-linearity on input double mult_coupling_ex( double rate ); // factor of multiplicative coupling diff --git a/models/sinusoidal_gamma_generator.cpp b/models/sinusoidal_gamma_generator.cpp index 033a887532..9c3ea47dc4 100644 --- a/models/sinusoidal_gamma_generator.cpp +++ b/models/sinusoidal_gamma_generator.cpp @@ -129,29 +129,29 @@ nest::sinusoidal_gamma_generator::Buffers_::Buffers_( const Buffers_& b, sinusoi * ---------------------------------------------------------------- */ void -nest::sinusoidal_gamma_generator::Parameters_::get( DictionaryDatum& d ) const +nest::sinusoidal_gamma_generator::Parameters_::get( dictionary& d ) const { - ( *d )[ names::rate ] = rate_ * 1000.0; - ( *d )[ names::frequency ] = om_ / ( 2.0 * numerics::pi / 1000.0 ); - ( *d )[ names::phase ] = 180.0 / numerics::pi * phi_; - ( *d )[ names::amplitude ] = amplitude_ * 1000.0; - ( *d )[ names::order ] = order_; - ( *d )[ names::individual_spike_trains ] = individual_spike_trains_; + d[ names::rate.toString() ] = rate_ * 1000.0; + d[ names::frequency.toString() ] = om_ / ( 2.0 * numerics::pi / 1000.0 ); + d[ names::phase.toString() ] = 180.0 / numerics::pi * phi_; + d[ names::amplitude.toString() ] = amplitude_ * 1000.0; + d[ names::order.toString() ] = order_; + d[ names::individual_spike_trains.toString() ] = individual_spike_trains_; } void -nest::sinusoidal_gamma_generator::Parameters_::set( const DictionaryDatum& d, +nest::sinusoidal_gamma_generator::Parameters_::set( const dictionary& d, const sinusoidal_gamma_generator& n, Node* node ) { - if ( not n.is_model_prototype() && d->known( names::individual_spike_trains ) ) + if ( not n.is_model_prototype() && d.known( names::individual_spike_trains.toString() ) ) { throw BadProperty( "The individual_spike_trains property can only be set as" " a model default using SetDefaults or upon CopyModel." ); } - if ( updateValue< bool >( d, names::individual_spike_trains, individual_spike_trains_ ) ) + if ( d.update_value( names::individual_spike_trains.toString(), individual_spike_trains_ ) ) { // this can happen only on model prototypes if ( individual_spike_trains_ ) @@ -166,17 +166,17 @@ nest::sinusoidal_gamma_generator::Parameters_::set( const DictionaryDatum& d, } } - if ( updateValueParam< double >( d, names::frequency, om_, node ) ) + if ( update_value_param( d, names::frequency.toString(), om_, node ) ) { om_ *= 2.0 * numerics::pi / 1000.0; } - if ( updateValueParam< double >( d, names::phase, phi_, node ) ) + if ( update_value_param( d, names::phase.toString(), phi_, node ) ) { phi_ *= numerics::pi / 180.0; } - if ( updateValueParam< double >( d, names::order, order_, node ) ) + if ( update_value_param( d, names::order.toString(), order_, node ) ) { if ( order_ < 1.0 ) { @@ -188,13 +188,13 @@ nest::sinusoidal_gamma_generator::Parameters_::set( const DictionaryDatum& d, floating-point comparison issues under 32-bit Linux. */ double dc_unscaled = 1e3 * rate_; - if ( updateValueParam< double >( d, names::rate, dc_unscaled, node ) ) + if ( update_value_param( d, names::rate.toString(), dc_unscaled, node ) ) { rate_ = 1e-3 * dc_unscaled; // scale to 1/ms } double ac_unscaled = 1e3 * amplitude_; - if ( updateValueParam< double >( d, names::amplitude, ac_unscaled, node ) ) + if ( update_value_param( d, names::amplitude.toString(), ac_unscaled, node ) ) { amplitude_ = 1e-3 * ac_unscaled; // scale to 1/ms } @@ -382,13 +382,14 @@ nest::sinusoidal_gamma_generator::set_data_from_stimulation_backend( std::vector "The size of the data for the sinusoidal_gamma_generator needs to 6 " "[frequency, phase, order, rate, amplitude, individual_spike_trains]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::frequency ] = DoubleDatum( input_param[ 0 ] ); - ( *d )[ names::phase ] = DoubleDatum( input_param[ 1 ] ); - ( *d )[ names::order ] = DoubleDatum( input_param[ 2 ] ); - ( *d )[ names::rate ] = DoubleDatum( input_param[ 3 ] ); - ( *d )[ names::amplitude ] = DoubleDatum( input_param[ 4 ] ); - ( *d )[ names::individual_spike_trains ] = BoolDatum( input_param[ 5 ] ); + dictionary d; + ( new Dictionary ); + d[ names::frequency.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::phase.toString() ] = DoubleDatum( input_param[ 1 ] ); + d[ names::order.toString() ] = DoubleDatum( input_param[ 2 ] ); + d[ names::rate.toString() ] = DoubleDatum( input_param[ 3 ] ); + d[ names::amplitude.toString() ] = DoubleDatum( input_param[ 4 ] ); + d[ names::individual_spike_trains.toString() ] = BoolDatum( input_param[ 5 ] ); ptmp.set( d, *this, this ); } diff --git a/models/sinusoidal_gamma_generator.h b/models/sinusoidal_gamma_generator.h index f468d002d0..ae445b5d84 100644 --- a/models/sinusoidal_gamma_generator.h +++ b/models/sinusoidal_gamma_generator.h @@ -207,8 +207,8 @@ class sinusoidal_gamma_generator : public StimulationDevice port handles_test_event( DataLoggingRequest&, rport ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; //! Model can be switched between proxies (single spike train) and not bool has_proxies() const override; @@ -262,14 +262,14 @@ class sinusoidal_gamma_generator : public StimulationDevice Parameters_( const Parameters_& ); Parameters_& operator=( const Parameters_& p ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set values from dictionary. * @note State is passed so that the position can be reset if the * spike_times_ vector has been filled with new data. */ - void set( const DictionaryDatum&, const sinusoidal_gamma_generator&, Node* ); + void set( const dictionary&, const sinusoidal_gamma_generator&, Node* ); }; struct State_ @@ -394,15 +394,15 @@ sinusoidal_gamma_generator::handles_test_event( DataLoggingRequest& dlr, rport r } inline void -sinusoidal_gamma_generator::get_status( DictionaryDatum& d ) const +sinusoidal_gamma_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -sinusoidal_gamma_generator::set_status( const DictionaryDatum& d ) +sinusoidal_gamma_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors diff --git a/models/sinusoidal_poisson_generator.cpp b/models/sinusoidal_poisson_generator.cpp index dfbc1d7617..cf5ce74e26 100644 --- a/models/sinusoidal_poisson_generator.cpp +++ b/models/sinusoidal_poisson_generator.cpp @@ -120,52 +120,52 @@ nest::sinusoidal_poisson_generator::Buffers_::Buffers_( const Buffers_&, sinusoi * ---------------------------------------------------------------- */ void -nest::sinusoidal_poisson_generator::Parameters_::get( DictionaryDatum& d ) const +nest::sinusoidal_poisson_generator::Parameters_::get( dictionary& d ) const { - ( *d )[ names::rate ] = rate_ * 1000.0; - ( *d )[ names::frequency ] = om_ / ( 2.0 * numerics::pi / 1000.0 ); - ( *d )[ names::phase ] = 180.0 / numerics::pi * phi_; - ( *d )[ names::amplitude ] = amplitude_ * 1000.0; - ( *d )[ names::individual_spike_trains ] = individual_spike_trains_; + d[ names::rate.toString() ] = rate_ * 1000.0; + d[ names::frequency.toString() ] = om_ / ( 2.0 * numerics::pi / 1000.0 ); + d[ names::phase.toString() ] = 180.0 / numerics::pi * phi_; + d[ names::amplitude.toString() ] = amplitude_ * 1000.0; + d[ names::individual_spike_trains.toString() ] = individual_spike_trains_; } void -nest::sinusoidal_poisson_generator::State_::get( DictionaryDatum& d ) const +nest::sinusoidal_poisson_generator::State_::get( dictionary& d ) const { - ( *d )[ names::y_0 ] = y_0_; - ( *d )[ names::y_1 ] = y_1_; + d[ names::y_0.toString() ] = y_0_; + d[ names::y_1.toString() ] = y_1_; } void -nest::sinusoidal_poisson_generator::Parameters_::set( const DictionaryDatum& d, +nest::sinusoidal_poisson_generator::Parameters_::set( const dictionary& d, const sinusoidal_poisson_generator& n, Node* node ) { - if ( not n.is_model_prototype() && d->known( names::individual_spike_trains ) ) + if ( not n.is_model_prototype() && d.known( names::individual_spike_trains.toString() ) ) { throw BadProperty( "The individual_spike_trains property can only be set as" " a model default using SetDefaults or upon CopyModel." ); } - updateValue< bool >( d, names::individual_spike_trains, individual_spike_trains_ ); + d.update_value( names::individual_spike_trains.toString(), individual_spike_trains_ ); - if ( updateValueParam< double >( d, names::rate, rate_, node ) ) + if ( update_value_param( d, names::rate.toString(), rate_, node ) ) { rate_ /= 1000.0; // scale to ms^-1 } - if ( updateValueParam< double >( d, names::frequency, om_, node ) ) + if ( update_value_param( d, names::frequency.toString(), om_, node ) ) { om_ *= 2.0 * numerics::pi / 1000.0; } - if ( updateValueParam< double >( d, names::phase, phi_, node ) ) + if ( update_value_param( d, names::phase.toString(), phi_, node ) ) { phi_ *= numerics::pi / 180.0; } - if ( updateValueParam< double >( d, names::amplitude, amplitude_, node ) ) + if ( update_value_param( d, names::amplitude.toString(), amplitude_, node ) ) { amplitude_ /= 1000.0; } @@ -324,12 +324,13 @@ nest::sinusoidal_poisson_generator::set_data_from_stimulation_backend( std::vect "The size of the data for the sinusoidal_gamma_generator needs to 5 " "[rate, frequency, phase, amplitude, individual_spike_trains]." ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); - ( *d )[ names::rate ] = DoubleDatum( input_param[ 0 ] ); - ( *d )[ names::frequency ] = DoubleDatum( input_param[ 1 ] ); - ( *d )[ names::phase ] = DoubleDatum( input_param[ 2 ] ); - ( *d )[ names::amplitude ] = DoubleDatum( input_param[ 3 ] ); - ( *d )[ names::individual_spike_trains ] = BoolDatum( input_param[ 4 ] ); + dictionary d; + ( new Dictionary ); + d[ names::rate.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::frequency.toString() ] = DoubleDatum( input_param[ 1 ] ); + d[ names::phase.toString() ] = DoubleDatum( input_param[ 2 ] ); + d[ names::amplitude.toString() ] = DoubleDatum( input_param[ 3 ] ); + d[ names::individual_spike_trains.toString() ] = BoolDatum( input_param[ 4 ] ); ptmp.set( d, *this, this ); } diff --git a/models/sinusoidal_poisson_generator.h b/models/sinusoidal_poisson_generator.h index f4f784484c..e4c6734c7e 100644 --- a/models/sinusoidal_poisson_generator.h +++ b/models/sinusoidal_poisson_generator.h @@ -143,8 +143,8 @@ class sinusoidal_poisson_generator : public StimulationDevice port handles_test_event( DataLoggingRequest&, rport ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; //! Model can be switched between proxies (single spike train) and not bool @@ -203,14 +203,14 @@ class sinusoidal_poisson_generator : public StimulationDevice Parameters_( const Parameters_& ); Parameters_& operator=( const Parameters_& p ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set values from dictionary. * @note State is passed so that the position can be reset if the * spike_times_ vector has been filled with new data. */ - void set( const DictionaryDatum&, const sinusoidal_poisson_generator&, Node* ); + void set( const dictionary&, const sinusoidal_poisson_generator&, Node* ); }; struct State_ @@ -223,7 +223,7 @@ class sinusoidal_poisson_generator : public StimulationDevice State_(); //!< Sets default state value - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary }; // ------------------------------------------------------------ @@ -303,16 +303,16 @@ sinusoidal_poisson_generator::handles_test_event( DataLoggingRequest& dlr, rport } inline void -sinusoidal_poisson_generator::get_status( DictionaryDatum& d ) const +sinusoidal_poisson_generator::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); StimulationDevice::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -sinusoidal_poisson_generator::set_status( const DictionaryDatum& d ) +sinusoidal_poisson_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors diff --git a/models/spike_dilutor.cpp b/models/spike_dilutor.cpp index b84504b28d..f8b38f8e85 100644 --- a/models/spike_dilutor.cpp +++ b/models/spike_dilutor.cpp @@ -48,15 +48,15 @@ nest::spike_dilutor::Parameters_::Parameters_() * ---------------------------------------------------------------- */ void -nest::spike_dilutor::Parameters_::get( DictionaryDatum& d ) const +nest::spike_dilutor::Parameters_::get( dictionary& d ) const { - ( *d )[ names::p_copy ] = p_copy_; + d[ names::p_copy.toString() ] = p_copy_; } void -nest::spike_dilutor::Parameters_::set( const DictionaryDatum& d, Node* node ) +nest::spike_dilutor::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::p_copy, p_copy_, node ); + update_value_param( d, names::p_copy.toString(), p_copy_, node ); if ( p_copy_ < 0 || p_copy_ > 1 ) { throw BadProperty( "Copy probability must be in [0, 1]." ); diff --git a/models/spike_dilutor.h b/models/spike_dilutor.h index 752632fce8..b007ae097c 100644 --- a/models/spike_dilutor.h +++ b/models/spike_dilutor.h @@ -100,8 +100,8 @@ class spike_dilutor : public DeviceNode port handles_test_event( SpikeEvent&, rport ) override; void handle( SpikeEvent& ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; private: void init_state_() override; @@ -124,8 +124,8 @@ class spike_dilutor : public DeviceNode Parameters_(); //!< Sets default parameter values Parameters_( const Parameters_& ) = default; - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary }; struct Buffers_ @@ -169,14 +169,14 @@ spike_dilutor::handles_test_event( SpikeEvent&, rport receptor_type ) } inline void -spike_dilutor::get_status( DictionaryDatum& d ) const +spike_dilutor::get_status( dictionary& d ) const { P_.get( d ); device_.get_status( d ); } inline void -spike_dilutor::set_status( const DictionaryDatum& d ) +spike_dilutor::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/spike_generator.cpp b/models/spike_generator.cpp index 2d349b8306..52c83ae3a0 100644 --- a/models/spike_generator.cpp +++ b/models/spike_generator.cpp @@ -63,7 +63,7 @@ nest::spike_generator::State_::State_() * ---------------------------------------------------------------- */ void -nest::spike_generator::Parameters_::get( DictionaryDatum& d ) const +nest::spike_generator::Parameters_::get( dictionary& d ) const { const size_t n_spikes = spike_stamps_.size(); const size_t n_offsets = spike_offsets_.size(); @@ -80,12 +80,12 @@ nest::spike_generator::Parameters_::get( DictionaryDatum& d ) const ( *times_ms )[ n ] -= spike_offsets_[ n ]; } } - ( *d )[ names::spike_times ] = DoubleVectorDatum( times_ms ); - ( *d )[ names::spike_weights ] = DoubleVectorDatum( new std::vector< double >( spike_weights_ ) ); - ( *d )[ names::spike_multiplicities ] = IntVectorDatum( new std::vector< long >( spike_multiplicities_ ) ); - ( *d )[ names::precise_times ] = BoolDatum( precise_times_ ); - ( *d )[ names::allow_offgrid_times ] = BoolDatum( allow_offgrid_times_ ); - ( *d )[ names::shift_now_spikes ] = BoolDatum( shift_now_spikes_ ); + d[ names::spike_times.toString() ] = DoubleVectorDatum( times_ms ); + d[ names::spike_weights.toString() ] = DoubleVectorDatum( new std::vector< double >( spike_weights_ ) ); + d[ names::spike_multiplicities.toString() ] = IntVectorDatum( new std::vector< long >( spike_multiplicities_ ) ); + d[ names::precise_times.toString() ] = BoolDatum( precise_times_ ); + d[ names::allow_offgrid_times.toString() ] = BoolDatum( allow_offgrid_times_ ); + d[ names::shift_now_spikes.toString() ] = BoolDatum( shift_now_spikes_ ); } void @@ -154,16 +154,16 @@ nest::spike_generator::Parameters_::assert_valid_spike_time_and_insert_( double } void -nest::spike_generator::Parameters_::set( const DictionaryDatum& d, +nest::spike_generator::Parameters_::set( const dictionary& d, State_& s, const Time& origin, const Time& now, Node* node ) { - bool precise_times_changed = updateValueParam< bool >( d, names::precise_times, precise_times_, node ); - bool shift_now_spikes_changed = updateValueParam< bool >( d, names::shift_now_spikes, shift_now_spikes_, node ); + bool precise_times_changed = update_value_param( d, names::precise_times.toString(), precise_times_, node ); + bool shift_now_spikes_changed = update_value_param( d, names::shift_now_spikes.toString(), shift_now_spikes_, node ); bool allow_offgrid_times_changed = - updateValueParam< bool >( d, names::allow_offgrid_times, allow_offgrid_times_, node ); + update_value_param( d, names::allow_offgrid_times.toString(), allow_offgrid_times_, node ); bool flags_changed = precise_times_changed or shift_now_spikes_changed or allow_offgrid_times_changed; if ( precise_times_ && ( allow_offgrid_times_ || shift_now_spikes_ ) ) { @@ -172,7 +172,7 @@ nest::spike_generator::Parameters_::set( const DictionaryDatum& d, "allow_offgrid_times or shift_now_spikes is set to true." ); } - const bool updated_spike_times = d->known( names::spike_times ); + const bool updated_spike_times = d.known( names::spike_times.toString() ); if ( flags_changed && not( updated_spike_times || spike_stamps_.empty() ) ) { throw BadProperty( @@ -182,7 +182,7 @@ nest::spike_generator::Parameters_::set( const DictionaryDatum& d, if ( updated_spike_times ) { - const std::vector< double > d_times = getValue< std::vector< double > >( d->lookup( names::spike_times ) ); + const auto d_times = d.get< std::vector< double > >( names::spike_times.toString() ); const size_t n_spikes = d_times.size(); spike_stamps_.clear(); spike_stamps_.reserve( n_spikes ); @@ -216,10 +216,10 @@ nest::spike_generator::Parameters_::set( const DictionaryDatum& d, // spike_weights can be the same size as spike_times, or can be of size 0 to // only use the spike_times array - bool updated_spike_weights = d->known( names::spike_weights ); + bool updated_spike_weights = d.known( names::spike_weights.toString() ); if ( updated_spike_weights ) { - std::vector< double > spike_weights = getValue< std::vector< double > >( d->lookup( names::spike_weights ) ); + auto spike_weights = d.get< std::vector< double > >( names::spike_weights.toString() ); if ( spike_weights.empty() ) { @@ -240,11 +240,10 @@ nest::spike_generator::Parameters_::set( const DictionaryDatum& d, // spike_multiplicities can be the same size as spike_times, // or can be of size 0 to only use the spike_times array - bool updated_spike_multiplicities = d->known( names::spike_multiplicities ); + bool updated_spike_multiplicities = d.known( names::spike_multiplicities.toString() ); if ( updated_spike_multiplicities ) { - std::vector< long > spike_multiplicities = - getValue< std::vector< long > >( d->lookup( names::spike_multiplicities ) ); + auto spike_multiplicities = d.get< std::vector< long > >( names::spike_multiplicities.toString() ); if ( spike_multiplicities.empty() ) { @@ -264,7 +263,8 @@ nest::spike_generator::Parameters_::set( const DictionaryDatum& d, } // Set position to start if something changed - if ( updated_spike_times || updated_spike_weights || updated_spike_multiplicities || d->known( names::origin ) ) + if ( updated_spike_times || updated_spike_weights || updated_spike_multiplicities + || d.known( names::origin.toString() ) ) { s.position_ = 0; } @@ -412,7 +412,8 @@ nest::spike_generator::set_data_from_stimulation_backend( std::vector< double >& if ( not input_spikes.empty() ) { - DictionaryDatum d = DictionaryDatum( new Dictionary ); + dictionary d; + ( new Dictionary ); std::vector< double > times_ms; const size_t n_spikes = P_.spike_stamps_.size(); times_ms.reserve( n_spikes + input_spikes.size() ); @@ -421,7 +422,7 @@ nest::spike_generator::set_data_from_stimulation_backend( std::vector< double >& times_ms.push_back( P_.spike_stamps_[ n ].get_ms() ); } std::copy( input_spikes.begin(), input_spikes.end(), std::back_inserter( times_ms ) ); - ( *d )[ names::spike_times ] = DoubleVectorDatum( times_ms ); + d[ names::spike_times.toString() ] = DoubleVectorDatum( times_ms ); ptmp.set( d, S_, origin, Time::step( times_ms[ times_ms.size() - 1 ] ), this ); } diff --git a/models/spike_generator.h b/models/spike_generator.h index fa274f4a93..b8d558f34e 100644 --- a/models/spike_generator.h +++ b/models/spike_generator.h @@ -223,8 +223,8 @@ class spike_generator : public StimulationDevice spike_generator( const spike_generator& ); port send_test_event( Node&, rport, synindex, bool ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; StimulationDevice::Type get_type() const override; void set_data_from_stimulation_backend( std::vector< double >& input_spikes ) override; @@ -287,7 +287,7 @@ class spike_generator : public StimulationDevice Parameters_(); //!< Sets default parameter values Parameters_( const Parameters_& ) = default; //!< Recalibrate all times - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary /** * Set values from dictionary. @@ -295,7 +295,7 @@ class spike_generator : public StimulationDevice * spike_times_ or spike_weights_ vector has been filled with * new data, or if the origin was reset. */ - void set( const DictionaryDatum&, State_&, const Time&, const Time&, Node* node ); + void set( const dictionary&, State_&, const Time&, const Time&, Node* node ); /** * Insert spike time to arrays, throw BadProperty for invalid spike times. @@ -333,14 +333,14 @@ spike_generator::send_test_event( Node& target, rport receptor_type, synindex sy } inline void -spike_generator::get_status( DictionaryDatum& d ) const +spike_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); } inline void -nest::spike_generator::set_status( const DictionaryDatum& d ) +nest::spike_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors @@ -348,7 +348,7 @@ nest::spike_generator::set_status( const DictionaryDatum& d ) // it is set in this call, we need to extract it explicitly here. Time origin; double v; - if ( updateValue< double >( d, names::origin, v ) ) + if ( d.update_value( names::origin.toString(), v ) ) { origin = Time::ms( v ); } diff --git a/models/spike_recorder.cpp b/models/spike_recorder.cpp index 5cbe62a8be..d3b81d0d0b 100644 --- a/models/spike_recorder.cpp +++ b/models/spike_recorder.cpp @@ -70,7 +70,7 @@ nest::spike_recorder::get_type() const } void -nest::spike_recorder::get_status( DictionaryDatum& d ) const +nest::spike_recorder::get_status( dictionary& d ) const { RecordingDevice::get_status( d ); @@ -92,7 +92,7 @@ nest::spike_recorder::get_status( DictionaryDatum& d ) const } void -nest::spike_recorder::set_status( const DictionaryDatum& d ) +nest::spike_recorder::set_status( const dictionary& d ) { RecordingDevice::set_status( d ); } diff --git a/models/spike_recorder.h b/models/spike_recorder.h index 32c4b2f5eb..0586edb074 100644 --- a/models/spike_recorder.h +++ b/models/spike_recorder.h @@ -119,8 +119,8 @@ class spike_recorder : public RecordingDevice Type get_type() const; SignalType receives_signal() const; - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void calibrate(); diff --git a/models/spin_detector.cpp b/models/spin_detector.cpp index 14af50dc7b..7f5d306e8a 100644 --- a/models/spin_detector.cpp +++ b/models/spin_detector.cpp @@ -82,7 +82,7 @@ nest::spin_detector::get_type() const } void -nest::spin_detector::get_status( DictionaryDatum& d ) const +nest::spin_detector::get_status( dictionary& d ) const { // get the data from the device RecordingDevice::get_status( d ); @@ -106,7 +106,7 @@ nest::spin_detector::get_status( DictionaryDatum& d ) const } void -nest::spin_detector::set_status( const DictionaryDatum& d ) +nest::spin_detector::set_status( const dictionary& d ) { RecordingDevice::set_status( d ); } diff --git a/models/spin_detector.h b/models/spin_detector.h index 44060c88a1..879a1293da 100644 --- a/models/spin_detector.h +++ b/models/spin_detector.h @@ -132,8 +132,8 @@ class spin_detector : public RecordingDevice Type get_type() const; SignalType receives_signal() const; - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void calibrate_time( const TimeConverter& tc ); diff --git a/models/static_synapse.h b/models/static_synapse.h index 3fe7e41646..cba25b862a 100644 --- a/models/static_synapse.h +++ b/models/static_synapse.h @@ -156,9 +156,9 @@ class static_synapse : public Connection< targetidentifierT > e(); } - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); void set_weight( double w ) @@ -169,20 +169,20 @@ class static_synapse : public Connection< targetidentifierT > template < typename targetidentifierT > void -static_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +static_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -static_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +static_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); } } // namespace diff --git a/models/static_synapse_hom_w.h b/models/static_synapse_hom_w.h index b8d59d17bd..5f8f43e8a1 100644 --- a/models/static_synapse_hom_w.h +++ b/models/static_synapse_hom_w.h @@ -129,7 +129,7 @@ class static_synapse_hom_w : public Connection< targetidentifierT > }; - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; void check_connection( Node& s, Node& t, rport receptor_type, const CommonPropertiesType& ) @@ -142,9 +142,9 @@ class static_synapse_hom_w : public Connection< targetidentifierT > * Checks to see if weight is given in syn_spec. */ void - check_synapse_params( const DictionaryDatum& syn_spec ) const + check_synapse_params( const dictionary& syn_spec ) const { - if ( syn_spec->known( names::weight ) ) + if ( syn_spec.known( names::weight.toString() ) ) { throw BadProperty( "Weight cannot be specified since it needs to be equal " @@ -181,10 +181,10 @@ class static_synapse_hom_w : public Connection< targetidentifierT > template < typename targetidentifierT > void -static_synapse_hom_w< targetidentifierT >::get_status( DictionaryDatum& d ) const +static_synapse_hom_w< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::size_of.toString() ] = sizeof( *this ); } } // namespace diff --git a/models/stdp_dopamine_synapse.cpp b/models/stdp_dopamine_synapse.cpp index 161c3b62b6..904a1a726e 100644 --- a/models/stdp_dopamine_synapse.cpp +++ b/models/stdp_dopamine_synapse.cpp @@ -52,35 +52,35 @@ STDPDopaCommonProperties::STDPDopaCommonProperties() } void -STDPDopaCommonProperties::get_status( DictionaryDatum& d ) const +STDPDopaCommonProperties::get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); if ( vt_ != 0 ) { - def< long >( d, names::vt, vt_->get_node_id() ); + d[ names::vt.toString() ] = vt_->get_node_id(); } else { - def< long >( d, names::vt, -1 ); + d[ names::vt.toString() ] = -1; } - def< double >( d, names::A_plus, A_plus_ ); - def< double >( d, names::A_minus, A_minus_ ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::tau_c, tau_c_ ); - def< double >( d, names::tau_n, tau_n_ ); - def< double >( d, names::b, b_ ); - def< double >( d, names::Wmin, Wmin_ ); - def< double >( d, names::Wmax, Wmax_ ); + d[ names::A_plus.toString() ] = A_plus_; + d[ names::A_minus.toString() ] = A_minus_; + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::tau_c.toString() ] = tau_c_; + d[ names::tau_n.toString() ] = tau_n_; + d[ names::b.toString() ] = b_; + d[ names::Wmin.toString() ] = Wmin_; + d[ names::Wmax.toString() ] = Wmax_; } void -STDPDopaCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +STDPDopaCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); long vtnode_id; - if ( updateValue< long >( d, names::vt, vtnode_id ) ) + if ( d.update_value( names::vt.toString(), vtnode_id ) ) { const thread tid = kernel().vp_manager.get_thread_id(); Node* vt = kernel().node_manager.get_node_or_proxy( vtnode_id, tid ); @@ -91,14 +91,14 @@ STDPDopaCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& } } - updateValue< double >( d, names::A_plus, A_plus_ ); - updateValue< double >( d, names::A_minus, A_minus_ ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::tau_c, tau_c_ ); - updateValue< double >( d, names::tau_n, tau_n_ ); - updateValue< double >( d, names::b, b_ ); - updateValue< double >( d, names::Wmin, Wmin_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::A_plus.toString(), A_plus_ ); + d.update_value( names::A_minus.toString(), A_minus_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::tau_c.toString(), tau_c_ ); + d.update_value( names::tau_n.toString(), tau_n_ ); + d.update_value( names::b.toString(), b_ ); + d.update_value( names::Wmin.toString(), Wmin_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); } Node* diff --git a/models/stdp_dopamine_synapse.h b/models/stdp_dopamine_synapse.h index af6add7778..baa85166a2 100644 --- a/models/stdp_dopamine_synapse.h +++ b/models/stdp_dopamine_synapse.h @@ -152,12 +152,12 @@ class STDPDopaCommonProperties : public CommonSynapseProperties /** * Get all properties and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); Node* get_node(); @@ -223,12 +223,12 @@ class stdp_dopamine_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Checks to see if illegal parameters are given in syn_spec. @@ -237,7 +237,7 @@ class stdp_dopamine_synapse : public Connection< targetidentifierT > * tau_n, tau_plus, c and n. The last two are prohibited only if we have more * than one thread. */ - void check_synapse_params( const DictionaryDatum& d ) const; + void check_synapse_params( const dictionary& d ) const; /** * Send an event to the receiver of this connection. @@ -349,35 +349,35 @@ stdp_dopamine_synapse< targetidentifierT >::stdp_dopamine_synapse() template < typename targetidentifierT > void -stdp_dopamine_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_dopamine_synapse< targetidentifierT >::get_status( dictionary& d ) const { // base class properties, different for individual synapse ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); + d[ names::weight.toString() ] = weight_; // own properties, different for individual synapse - def< double >( d, names::c, c_ ); - def< double >( d, names::n, n_ ); + d[ names::c.toString() ] = c_; + d[ names::n.toString() ] = n_; } template < typename targetidentifierT > void -stdp_dopamine_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_dopamine_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // base class properties ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); - updateValue< double >( d, names::c, c_ ); - updateValue< double >( d, names::n, n_ ); + d.update_value( names::c.toString(), c_ ); + d.update_value( names::n.toString(), n_ ); } template < typename targetidentifierT > void -stdp_dopamine_synapse< targetidentifierT >::check_synapse_params( const DictionaryDatum& syn_spec ) const +stdp_dopamine_synapse< targetidentifierT >::check_synapse_params( const dictionary& syn_spec ) const { - if ( syn_spec->known( names::vt ) ) + if ( syn_spec.known( names::vt.toString() ) ) { throw NotImplemented( "Connect doesn't support the direct specification of the " @@ -387,14 +387,14 @@ stdp_dopamine_synapse< targetidentifierT >::check_synapse_params( const Dictiona // Setting of parameter c and n not thread safe. if ( kernel().vp_manager.get_num_threads() > 1 ) { - if ( syn_spec->known( names::c ) ) + if ( syn_spec.known( names::c.toString() ) ) { throw NotImplemented( "For multi-threading Connect doesn't support the setting " "of parameter c in stdp_dopamine_synapse. " "Use SetDefaults() or CopyModel()." ); } - if ( syn_spec->known( names::n ) ) + if ( syn_spec.known( names::n.toString() ) ) { throw NotImplemented( "For multi-threading Connect doesn't support the setting " @@ -407,7 +407,7 @@ stdp_dopamine_synapse< targetidentifierT >::check_synapse_params( const Dictiona const size_t n_param = sizeof( param_arr ) / sizeof( std::string ); for ( size_t n = 0; n < n_param; ++n ) { - if ( syn_spec->known( param_arr[ n ] ) ) + if ( syn_spec.known( param_arr[ n ] ) ) { throw NotImplemented( "Connect doesn't support the setting of parameter param_arr[ n ]" diff --git a/models/stdp_nn_pre_centered_synapse.h b/models/stdp_nn_pre_centered_synapse.h index 2714456f41..dd46be3087 100644 --- a/models/stdp_nn_pre_centered_synapse.h +++ b/models/stdp_nn_pre_centered_synapse.h @@ -155,12 +155,12 @@ class stdp_nn_pre_centered_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -322,31 +322,31 @@ stdp_nn_pre_centered_synapse< targetidentifierT >::stdp_nn_pre_centered_synapse( template < typename targetidentifierT > void -stdp_nn_pre_centered_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_nn_pre_centered_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::lambda, lambda_ ); - def< double >( d, names::alpha, alpha_ ); - def< double >( d, names::mu_plus, mu_plus_ ); - def< double >( d, names::mu_minus, mu_minus_ ); - def< double >( d, names::Wmax, Wmax_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::lambda.toString() ] = lambda_; + d[ names::alpha.toString() ] = alpha_; + d[ names::mu_plus.toString() ] = mu_plus_; + d[ names::mu_minus.toString() ] = mu_minus_; + d[ names::Wmax.toString() ] = Wmax_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -stdp_nn_pre_centered_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_nn_pre_centered_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::lambda, lambda_ ); - updateValue< double >( d, names::alpha, alpha_ ); - updateValue< double >( d, names::mu_plus, mu_plus_ ); - updateValue< double >( d, names::mu_minus, mu_minus_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::lambda.toString(), lambda_ ); + d.update_value( names::alpha.toString(), alpha_ ); + d.update_value( names::mu_plus.toString(), mu_plus_ ); + d.update_value( names::mu_minus.toString(), mu_minus_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); // check if weight_ and Wmax_ have the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/stdp_nn_restr_synapse.h b/models/stdp_nn_restr_synapse.h index e0165f4797..22d30d07bc 100644 --- a/models/stdp_nn_restr_synapse.h +++ b/models/stdp_nn_restr_synapse.h @@ -150,12 +150,12 @@ class stdp_nn_restr_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -313,31 +313,31 @@ stdp_nn_restr_synapse< targetidentifierT >::stdp_nn_restr_synapse() template < typename targetidentifierT > void -stdp_nn_restr_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_nn_restr_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::lambda, lambda_ ); - def< double >( d, names::alpha, alpha_ ); - def< double >( d, names::mu_plus, mu_plus_ ); - def< double >( d, names::mu_minus, mu_minus_ ); - def< double >( d, names::Wmax, Wmax_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::lambda.toString() ] = lambda_; + d[ names::alpha.toString() ] = alpha_; + d[ names::mu_plus.toString() ] = mu_plus_; + d[ names::mu_minus.toString() ] = mu_minus_; + d[ names::Wmax.toString() ] = Wmax_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -stdp_nn_restr_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_nn_restr_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::lambda, lambda_ ); - updateValue< double >( d, names::alpha, alpha_ ); - updateValue< double >( d, names::mu_plus, mu_plus_ ); - updateValue< double >( d, names::mu_minus, mu_minus_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::lambda.toString(), lambda_ ); + d.update_value( names::alpha.toString(), alpha_ ); + d.update_value( names::mu_plus.toString(), mu_plus_ ); + d.update_value( names::mu_minus.toString(), mu_minus_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); // check if weight_ and Wmax_ have the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/stdp_nn_symm_synapse.h b/models/stdp_nn_symm_synapse.h index 939700356f..b2ef5412e3 100644 --- a/models/stdp_nn_symm_synapse.h +++ b/models/stdp_nn_symm_synapse.h @@ -152,12 +152,12 @@ class stdp_nn_symm_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -303,31 +303,31 @@ stdp_nn_symm_synapse< targetidentifierT >::stdp_nn_symm_synapse() template < typename targetidentifierT > void -stdp_nn_symm_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_nn_symm_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::lambda, lambda_ ); - def< double >( d, names::alpha, alpha_ ); - def< double >( d, names::mu_plus, mu_plus_ ); - def< double >( d, names::mu_minus, mu_minus_ ); - def< double >( d, names::Wmax, Wmax_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::lambda.toString() ] = lambda_; + d[ names::alpha.toString() ] = alpha_; + d[ names::mu_plus.toString() ] = mu_plus_; + d[ names::mu_minus.toString() ] = mu_minus_; + d[ names::Wmax.toString() ] = Wmax_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -stdp_nn_symm_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_nn_symm_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::lambda, lambda_ ); - updateValue< double >( d, names::alpha, alpha_ ); - updateValue< double >( d, names::mu_plus, mu_plus_ ); - updateValue< double >( d, names::mu_minus, mu_minus_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::lambda.toString(), lambda_ ); + d.update_value( names::alpha.toString(), alpha_ ); + d.update_value( names::mu_plus.toString(), mu_plus_ ); + d.update_value( names::mu_minus.toString(), mu_minus_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); // check if weight_ and Wmax_ have the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/stdp_pl_synapse_hom.cpp b/models/stdp_pl_synapse_hom.cpp index 091f128912..62707b7ba3 100644 --- a/models/stdp_pl_synapse_hom.cpp +++ b/models/stdp_pl_synapse_hom.cpp @@ -49,22 +49,22 @@ STDPPLHomCommonProperties::STDPPLHomCommonProperties() } void -STDPPLHomCommonProperties::get_status( DictionaryDatum& d ) const +STDPPLHomCommonProperties::get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::lambda, lambda_ ); - def< double >( d, names::alpha, alpha_ ); - def< double >( d, names::mu, mu_ ); + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::lambda.toString() ] = lambda_; + d[ names::alpha.toString() ] = alpha_; + d[ names::mu.toString() ] = mu_; } void -STDPPLHomCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +STDPPLHomCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); if ( tau_plus_ > 0. ) { tau_plus_inv_ = 1. / tau_plus_; @@ -73,9 +73,9 @@ STDPPLHomCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& { throw BadProperty( "tau_plus > 0. required." ); } - updateValue< double >( d, names::lambda, lambda_ ); - updateValue< double >( d, names::alpha, alpha_ ); - updateValue< double >( d, names::mu, mu_ ); + d.update_value( names::lambda.toString(), lambda_ ); + d.update_value( names::alpha.toString(), alpha_ ); + d.update_value( names::mu.toString(), mu_ ); } } // of namespace nest diff --git a/models/stdp_pl_synapse_hom.h b/models/stdp_pl_synapse_hom.h index 8d6500af94..27b63447a6 100644 --- a/models/stdp_pl_synapse_hom.h +++ b/models/stdp_pl_synapse_hom.h @@ -105,12 +105,12 @@ class STDPPLHomCommonProperties : public CommonSynapseProperties /** * Get all properties and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); // data members common to all connections double tau_plus_; @@ -158,12 +158,12 @@ class stdp_pl_synapse_hom : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -298,27 +298,27 @@ stdp_pl_synapse_hom< targetidentifierT >::stdp_pl_synapse_hom() template < typename targetidentifierT > void -stdp_pl_synapse_hom< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_pl_synapse_hom< targetidentifierT >::get_status( dictionary& d ) const { // base class properties, different for individual synapse ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); + d[ names::weight.toString() ] = weight_; // own properties, different for individual synapse - def< double >( d, names::Kplus, Kplus_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::Kplus.toString() ] = Kplus_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -stdp_pl_synapse_hom< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_pl_synapse_hom< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // base class properties ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); - updateValue< double >( d, names::Kplus, Kplus_ ); + d.update_value( names::Kplus.toString(), Kplus_ ); } } // of namespace nest diff --git a/models/stdp_synapse.h b/models/stdp_synapse.h index 1d32c735e7..8ac5326e7b 100644 --- a/models/stdp_synapse.h +++ b/models/stdp_synapse.h @@ -140,12 +140,12 @@ class stdp_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -290,31 +290,31 @@ stdp_synapse< targetidentifierT >::stdp_synapse() template < typename targetidentifierT > void -stdp_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::lambda, lambda_ ); - def< double >( d, names::alpha, alpha_ ); - def< double >( d, names::mu_plus, mu_plus_ ); - def< double >( d, names::mu_minus, mu_minus_ ); - def< double >( d, names::Wmax, Wmax_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::lambda.toString() ] = lambda_; + d[ names::alpha.toString() ] = alpha_; + d[ names::mu_plus.toString() ] = mu_plus_; + d[ names::mu_minus.toString() ] = mu_minus_; + d[ names::Wmax.toString() ] = Wmax_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -stdp_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::lambda, lambda_ ); - updateValue< double >( d, names::alpha, alpha_ ); - updateValue< double >( d, names::mu_plus, mu_plus_ ); - updateValue< double >( d, names::mu_minus, mu_minus_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::lambda.toString(), lambda_ ); + d.update_value( names::alpha.toString(), alpha_ ); + d.update_value( names::mu_plus.toString(), mu_plus_ ); + d.update_value( names::mu_minus.toString(), mu_minus_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); // check if weight_ and Wmax_ has the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/stdp_synapse_facetshw_hom.h b/models/stdp_synapse_facetshw_hom.h index 99356fc12d..a14631556a 100644 --- a/models/stdp_synapse_facetshw_hom.h +++ b/models/stdp_synapse_facetshw_hom.h @@ -181,12 +181,12 @@ class STDPFACETSHWHomCommonProperties : public CommonSynapseProperties /** * Get all properties and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); // overloaded for all supported event types void @@ -260,12 +260,12 @@ class stdp_facetshw_synapse_hom : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. diff --git a/models/stdp_synapse_facetshw_hom_impl.h b/models/stdp_synapse_facetshw_hom_impl.h index 76da53a759..73ee8b2dec 100644 --- a/models/stdp_synapse_facetshw_hom_impl.h +++ b/models/stdp_synapse_facetshw_hom_impl.h @@ -127,61 +127,61 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::calc_readout_cycle_duratio template < typename targetidentifierT > void -STDPFACETSHWHomCommonProperties< targetidentifierT >::get_status( DictionaryDatum& d ) const +STDPFACETSHWHomCommonProperties< targetidentifierT >::get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::tau_minus_stdp, tau_minus_ ); - def< double >( d, names::Wmax, Wmax_ ); - def< double >( d, names::weight_per_lut_entry, weight_per_lut_entry_ ); - - def< long >( d, names::no_synapses, no_synapses_ ); - def< long >( d, names::synapses_per_driver, synapses_per_driver_ ); - def< double >( d, names::driver_readout_time, driver_readout_time_ ); - def< double >( d, names::readout_cycle_duration, readout_cycle_duration_ ); - - ( *d )[ names::lookuptable_0 ] = IntVectorDatum( new std::vector< long >( lookuptable_0_ ) ); - ( *d )[ names::lookuptable_1 ] = IntVectorDatum( new std::vector< long >( lookuptable_1_ ) ); - ( *d )[ names::lookuptable_2 ] = IntVectorDatum( new std::vector< long >( lookuptable_2_ ) ); - ( *d )[ names::configbit_0 ] = IntVectorDatum( new std::vector< long >( configbit_0_ ) ); - ( *d )[ names::configbit_1 ] = IntVectorDatum( new std::vector< long >( configbit_1_ ) ); - ( *d )[ names::reset_pattern ] = IntVectorDatum( new std::vector< long >( reset_pattern_ ) ); + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::tau_minus_stdp.toString() ] = tau_minus_; + d[ names::Wmax.toString() ] = Wmax_; + d[ names::weight_per_lut_entry.toString() ] = weight_per_lut_entry_; + + d[ names::no_synapses.toString() ] = no_synapses_; + d[ names::synapses_per_driver.toString() ] = synapses_per_driver_; + d[ names::driver_readout_time.toString() ] = driver_readout_time_; + d[ names::readout_cycle_duration.toString() ] = readout_cycle_duration_; + + d[ names::lookuptable_0.toString() ] = IntVectorDatum( new std::vector< long >( lookuptable_0_ ) ); + d[ names::lookuptable_1.toString() ] = IntVectorDatum( new std::vector< long >( lookuptable_1_ ) ); + d[ names::lookuptable_2.toString() ] = IntVectorDatum( new std::vector< long >( lookuptable_2_ ) ); + d[ names::configbit_0.toString() ] = IntVectorDatum( new std::vector< long >( configbit_0_ ) ); + d[ names::configbit_1.toString() ] = IntVectorDatum( new std::vector< long >( configbit_1_ ) ); + d[ names::reset_pattern.toString() ] = IntVectorDatum( new std::vector< long >( reset_pattern_ ) ); } template < typename targetidentifierT > void -STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::tau_minus_stdp, tau_minus_ ); - if ( updateValue< double >( d, names::Wmax, Wmax_ ) ) + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::tau_minus_stdp.toString(), tau_minus_ ); + if ( d.update_value( names::Wmax.toString(), Wmax_ ) ) { weight_per_lut_entry_ = Wmax_ / ( lookuptable_0_.size() - 1 ); } // TP: they should not be allowed to be changed! But needed for CopyModel ... - updateValue< double >( d, names::weight_per_lut_entry, weight_per_lut_entry_ ); - updateValue< double >( d, names::readout_cycle_duration, readout_cycle_duration_ ); - if ( updateValue< long >( d, names::no_synapses, no_synapses_ ) ) + d.update_value( names::weight_per_lut_entry.toString(), weight_per_lut_entry_ ); + d.update_value( names::readout_cycle_duration.toString(), readout_cycle_duration_ ); + if ( d.update_value( names::no_synapses.toString(), no_synapses_ ) ) { calc_readout_cycle_duration_(); } - if ( updateValue< long >( d, names::synapses_per_driver, synapses_per_driver_ ) ) + if ( d.update_value( names::synapses_per_driver.toString(), synapses_per_driver_ ) ) { calc_readout_cycle_duration_(); } - if ( updateValue< double >( d, names::driver_readout_time, driver_readout_time_ ) ) + if ( d.update_value( names::driver_readout_time.toString(), driver_readout_time_ ) ) { calc_readout_cycle_duration_(); } - if ( d->known( names::lookuptable_0 ) ) + if ( d.known( names::lookuptable_0.toString() ) ) { - updateValue< std::vector< long > >( d, names::lookuptable_0, lookuptable_0_ ); + d.update_value( names::lookuptable_0.toString(), lookuptable_0_ ); // right size? if ( lookuptable_0_.size() != lookuptable_1_.size() ) @@ -198,9 +198,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const Dictiona } } } - if ( d->known( names::lookuptable_1 ) ) + if ( d.known( names::lookuptable_1.toString() ) ) { - updateValue< std::vector< long > >( d, names::lookuptable_1, lookuptable_1_ ); + d.update_value( names::lookuptable_1.toString(), lookuptable_1_ ); // right size? if ( lookuptable_1_.size() != lookuptable_0_.size() ) @@ -217,9 +217,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const Dictiona } } } - if ( d->known( names::lookuptable_2 ) ) + if ( d.known( names::lookuptable_2.toString() ) ) { - updateValue< std::vector< long > >( d, names::lookuptable_2, lookuptable_2_ ); + d.update_value( names::lookuptable_2.toString(), lookuptable_2_ ); // right size? if ( lookuptable_2_.size() != lookuptable_0_.size() ) @@ -237,9 +237,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const Dictiona } } - if ( d->known( names::configbit_0 ) ) + if ( d.known( names::configbit_0.toString() ) ) { - updateValue< std::vector< long > >( d, names::configbit_0, configbit_0_ ); + d.update_value( names::configbit_0.toString(), configbit_0_ ); // right size? if ( configbit_0_.size() != 4 ) @@ -247,9 +247,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const Dictiona throw BadProperty( "Wrong number of configuration bits (!=4)." ); } } - if ( d->known( names::configbit_1 ) ) + if ( d.known( names::configbit_1.toString() ) ) { - updateValue< std::vector< long > >( d, names::configbit_1, configbit_1_ ); + d.update_value( names::configbit_1.toString(), configbit_1_ ); // right size? if ( configbit_1_.size() != 4 ) @@ -257,9 +257,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const Dictiona throw BadProperty( "Wrong number of configuration bits (!=4)." ); } } - if ( d->known( names::reset_pattern ) ) + if ( d.known( names::reset_pattern.toString() ) ) { - updateValue< std::vector< long > >( d, names::reset_pattern, reset_pattern_ ); + d.update_value( names::reset_pattern.toString(), reset_pattern_ ); // right size? if ( reset_pattern_.size() != 6 ) @@ -290,21 +290,21 @@ stdp_facetshw_synapse_hom< targetidentifierT >::stdp_facetshw_synapse_hom() template < typename targetidentifierT > void -stdp_facetshw_synapse_hom< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_facetshw_synapse_hom< targetidentifierT >::get_status( dictionary& d ) const { // base class properties, different for individual synapse ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); + d[ names::weight.toString() ] = weight_; // own properties, different for individual synapse - def< double >( d, names::a_causal, a_causal_ ); - def< double >( d, names::a_acausal, a_acausal_ ); - def< double >( d, names::a_thresh_th, a_thresh_th_ ); - def< double >( d, names::a_thresh_tl, a_thresh_tl_ ); - - def< bool >( d, names::init_flag, init_flag_ ); - def< long >( d, names::synapse_id, synapse_id_ ); - def< double >( d, names::next_readout_time, next_readout_time_ ); + d[ names::a_causal.toString() ] = a_causal_; + d[ names::a_acausal.toString() ] = a_acausal_; + d[ names::a_thresh_th.toString() ] = a_thresh_th_; + d[ names::a_thresh_tl.toString() ] = a_thresh_tl_; + + d[ names::init_flag.toString() ] = init_flag_; + d[ names::synapse_id.toString() ] = synapse_id_; + d[ names::next_readout_time.toString() ] = next_readout_time_; // useful to get conversion before activity, but weight_per_lut_entry_ not // known here // def(d, "discrete_weight", @@ -314,22 +314,22 @@ stdp_facetshw_synapse_hom< targetidentifierT >::get_status( DictionaryDatum& d ) template < typename targetidentifierT > void -stdp_facetshw_synapse_hom< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_facetshw_synapse_hom< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // base class properties ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); - updateValue< double >( d, names::a_causal, a_causal_ ); - updateValue< double >( d, names::a_acausal, a_acausal_ ); - updateValue< double >( d, names::a_thresh_th, a_thresh_th_ ); - updateValue< double >( d, names::a_thresh_tl, a_thresh_tl_ ); + d.update_value( names::a_causal.toString(), a_causal_ ); + d.update_value( names::a_acausal.toString(), a_acausal_ ); + d.update_value( names::a_thresh_th.toString(), a_thresh_th_ ); + d.update_value( names::a_thresh_tl.toString(), a_thresh_tl_ ); - updateValue< long >( d, names::synapse_id, synapse_id_ ); + d.update_value( names::synapse_id.toString(), synapse_id_ ); // TP: they should not be allowed to be changed! But needed for CopyModel ... - updateValue< bool >( d, names::init_flag, init_flag_ ); - updateValue< double >( d, names::next_readout_time, next_readout_time_ ); + d.update_value( names::init_flag.toString(), init_flag_ ); + d.update_value( names::next_readout_time.toString(), next_readout_time_ ); // setting discrete_weight_ does not make sense, is temporary variable } diff --git a/models/stdp_synapse_hom.cpp b/models/stdp_synapse_hom.cpp index a2506bb17a..64661ebbb3 100644 --- a/models/stdp_synapse_hom.cpp +++ b/models/stdp_synapse_hom.cpp @@ -48,29 +48,29 @@ STDPHomCommonProperties::STDPHomCommonProperties() } void -STDPHomCommonProperties::get_status( DictionaryDatum& d ) const +STDPHomCommonProperties::get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::lambda, lambda_ ); - def< double >( d, names::alpha, alpha_ ); - def< double >( d, names::mu_plus, mu_plus_ ); - def< double >( d, names::mu_minus, mu_minus_ ); - def< double >( d, names::Wmax, Wmax_ ); + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::lambda.toString() ] = lambda_; + d[ names::alpha.toString() ] = alpha_; + d[ names::mu_plus.toString() ] = mu_plus_; + d[ names::mu_minus.toString() ] = mu_minus_; + d[ names::Wmax.toString() ] = Wmax_; } void -STDPHomCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +STDPHomCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::lambda, lambda_ ); - updateValue< double >( d, names::alpha, alpha_ ); - updateValue< double >( d, names::mu_plus, mu_plus_ ); - updateValue< double >( d, names::mu_minus, mu_minus_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::lambda.toString(), lambda_ ); + d.update_value( names::alpha.toString(), alpha_ ); + d.update_value( names::mu_plus.toString(), mu_plus_ ); + d.update_value( names::mu_minus.toString(), mu_minus_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); } } // of namespace nest diff --git a/models/stdp_synapse_hom.h b/models/stdp_synapse_hom.h index 9cdf267b0f..db675bf069 100644 --- a/models/stdp_synapse_hom.h +++ b/models/stdp_synapse_hom.h @@ -130,12 +130,12 @@ class STDPHomCommonProperties : public CommonSynapseProperties /** * Get all properties and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); // data members common to all connections double tau_plus_; @@ -184,12 +184,12 @@ class stdp_synapse_hom : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -324,27 +324,27 @@ stdp_synapse_hom< targetidentifierT >::send( Event& e, thread t, const STDPHomCo template < typename targetidentifierT > void -stdp_synapse_hom< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_synapse_hom< targetidentifierT >::get_status( dictionary& d ) const { // base class properties, different for individual synapse ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); + d[ names::weight.toString() ] = weight_; // own properties, different for individual synapse - def< double >( d, names::Kplus, Kplus_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::Kplus.toString() ] = Kplus_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -stdp_synapse_hom< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_synapse_hom< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // base class properties ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); - updateValue< double >( d, names::Kplus, Kplus_ ); + d.update_value( names::Kplus.toString(), Kplus_ ); } } // of namespace nest diff --git a/models/stdp_triplet_synapse.h b/models/stdp_triplet_synapse.h index 1196d743d0..3cbfc9f07a 100644 --- a/models/stdp_triplet_synapse.h +++ b/models/stdp_triplet_synapse.h @@ -151,12 +151,12 @@ class stdp_triplet_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -314,36 +314,36 @@ stdp_triplet_synapse< targetidentifierT >::stdp_triplet_synapse() template < typename targetidentifierT > void -stdp_triplet_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +stdp_triplet_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::tau_plus, tau_plus_ ); - def< double >( d, names::tau_plus_triplet, tau_plus_triplet_ ); - def< double >( d, names::Aplus, Aplus_ ); - def< double >( d, names::Aminus, Aminus_ ); - def< double >( d, names::Aplus_triplet, Aplus_triplet_ ); - def< double >( d, names::Aminus_triplet, Aminus_triplet_ ); - def< double >( d, names::Kplus, Kplus_ ); - def< double >( d, names::Kplus_triplet, Kplus_triplet_ ); - def< double >( d, names::Wmax, Wmax_ ); + d[ names::weight.toString() ] = weight_; + d[ names::tau_plus.toString() ] = tau_plus_; + d[ names::tau_plus_triplet.toString() ] = tau_plus_triplet_; + d[ names::Aplus.toString() ] = Aplus_; + d[ names::Aminus.toString() ] = Aminus_; + d[ names::Aplus_triplet.toString() ] = Aplus_triplet_; + d[ names::Aminus_triplet.toString() ] = Aminus_triplet_; + d[ names::Kplus.toString() ] = Kplus_; + d[ names::Kplus_triplet.toString() ] = Kplus_triplet_; + d[ names::Wmax.toString() ] = Wmax_; } template < typename targetidentifierT > void -stdp_triplet_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +stdp_triplet_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::tau_plus, tau_plus_ ); - updateValue< double >( d, names::tau_plus_triplet, tau_plus_triplet_ ); - updateValue< double >( d, names::Aplus, Aplus_ ); - updateValue< double >( d, names::Aminus, Aminus_ ); - updateValue< double >( d, names::Aplus_triplet, Aplus_triplet_ ); - updateValue< double >( d, names::Aminus_triplet, Aminus_triplet_ ); - updateValue< double >( d, names::Kplus, Kplus_ ); - updateValue< double >( d, names::Kplus_triplet, Kplus_triplet_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::tau_plus_triplet.toString(), tau_plus_triplet_ ); + d.update_value( names::Aplus.toString(), Aplus_ ); + d.update_value( names::Aminus.toString(), Aminus_ ); + d.update_value( names::Aplus_triplet.toString(), Aplus_triplet_ ); + d.update_value( names::Aminus_triplet.toString(), Aminus_triplet_ ); + d.update_value( names::Kplus.toString(), Kplus_ ); + d.update_value( names::Kplus_triplet.toString(), Kplus_triplet_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); // check if weight_ and Wmax_ has the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/step_current_generator.cpp b/models/step_current_generator.cpp index 0c2952ed3f..96ae43b6fb 100644 --- a/models/step_current_generator.cpp +++ b/models/step_current_generator.cpp @@ -100,7 +100,7 @@ nest::step_current_generator::Buffers_::Buffers_( const Buffers_&, step_current_ * ---------------------------------------------------------------- */ void -nest::step_current_generator::Parameters_::get( DictionaryDatum& d ) const +nest::step_current_generator::Parameters_::get( dictionary& d ) const { std::vector< double >* times_ms = new std::vector< double >(); times_ms->reserve( amp_time_stamps_.size() ); @@ -108,9 +108,9 @@ nest::step_current_generator::Parameters_::get( DictionaryDatum& d ) const { times_ms->push_back( amp_time_stamp.get_ms() ); } - ( *d )[ names::amplitude_times ] = DoubleVectorDatum( times_ms ); - ( *d )[ names::amplitude_values ] = DoubleVectorDatum( new std::vector< double >( amp_values_ ) ); - ( *d )[ names::allow_offgrid_times ] = BoolDatum( allow_offgrid_amp_times_ ); + d[ names::amplitude_times.toString() ] = DoubleVectorDatum( times_ms ); + d[ names::amplitude_values.toString() ] = DoubleVectorDatum( new std::vector< double >( amp_values_ ) ); + d[ names::allow_offgrid_times.toString() ] = BoolDatum( allow_offgrid_amp_times_ ); } nest::Time @@ -158,12 +158,12 @@ nest::step_current_generator::Parameters_::validate_time_( double t, const Time& } void -nest::step_current_generator::Parameters_::set( const DictionaryDatum& d, Buffers_& b, Node* ) +nest::step_current_generator::Parameters_::set( const dictionary& d, Buffers_& b, Node* ) { std::vector< double > new_times; - const bool times_changed = updateValue< std::vector< double > >( d, names::amplitude_times, new_times ); - const bool values_changed = updateValue< std::vector< double > >( d, names::amplitude_values, amp_values_ ); - const bool allow_offgrid_changed = updateValue< bool >( d, names::allow_offgrid_times, allow_offgrid_amp_times_ ); + const bool times_changed = d.update_value( names::amplitude_times.toString(), new_times ); + const bool values_changed = d.update_value( names::amplitude_values.toString(), amp_values_ ); + const bool allow_offgrid_changed = d.update_value( names::allow_offgrid_times.toString(), allow_offgrid_amp_times_ ); if ( times_changed xor values_changed ) { @@ -337,7 +337,8 @@ nest::step_current_generator::set_data_from_stimulation_backend( std::vector< do throw BadParameterValue( "The size of the data for the step_current_generator needs to be even [(time,amplitude) pairs] " ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); + dictionary d; + ( new Dictionary ); std::vector< double > times_ms; std::vector< double > amplitudes_pA; const size_t n_step = P_.amp_time_stamps_.size(); @@ -353,8 +354,8 @@ nest::step_current_generator::set_data_from_stimulation_backend( std::vector< do times_ms.push_back( time_amplitude[ n * 2 ] ); amplitudes_pA.push_back( time_amplitude[ n * 2 + 1 ] ); } - ( *d )[ names::amplitude_times ] = DoubleVectorDatum( times_ms ); - ( *d )[ names::amplitude_values ] = DoubleVectorDatum( amplitudes_pA ); + d[ names::amplitude_times.toString() ] = DoubleVectorDatum( times_ms ); + d[ names::amplitude_values.toString() ] = DoubleVectorDatum( amplitudes_pA ); ptmp.set( d, B_, this ); } diff --git a/models/step_current_generator.h b/models/step_current_generator.h index 42dd616682..df2f39f40c 100644 --- a/models/step_current_generator.h +++ b/models/step_current_generator.h @@ -118,8 +118,8 @@ class step_current_generator : public StimulationDevice port handles_test_event( DataLoggingRequest&, rport ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; void set_data_from_stimulation_backend( std::vector< double >& input_spikes ) override; @@ -153,9 +153,9 @@ class step_current_generator : public StimulationDevice Parameters_( const Parameters_& ); Parameters_& operator=( const Parameters_& p ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //! Set values from dictionary - void set( const DictionaryDatum&, Buffers_&, Node* ); + void set( const dictionary&, Buffers_&, Node* ); /** * Return time as Time object if valid, otherwise throw BadProperty @@ -231,16 +231,16 @@ step_current_generator::handles_test_event( DataLoggingRequest& dlr, rport recep } inline void -step_current_generator::get_status( DictionaryDatum& d ) const +step_current_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -step_current_generator::set_status( const DictionaryDatum& d ) +step_current_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, B_, this ); // throws if BadProperty diff --git a/models/step_rate_generator.cpp b/models/step_rate_generator.cpp index 7d547f6d83..63d2b2cf52 100644 --- a/models/step_rate_generator.cpp +++ b/models/step_rate_generator.cpp @@ -100,7 +100,7 @@ nest::step_rate_generator::Buffers_::Buffers_( const Buffers_&, step_rate_genera * ---------------------------------------------------------------- */ void -nest::step_rate_generator::Parameters_::get( DictionaryDatum& d ) const +nest::step_rate_generator::Parameters_::get( dictionary& d ) const { std::vector< double >* times_ms = new std::vector< double >(); times_ms->reserve( amp_time_stamps_.size() ); @@ -108,9 +108,9 @@ nest::step_rate_generator::Parameters_::get( DictionaryDatum& d ) const { times_ms->push_back( amp_time_stamp.get_ms() ); } - ( *d )[ names::amplitude_times ] = DoubleVectorDatum( times_ms ); - ( *d )[ names::amplitude_values ] = DoubleVectorDatum( new std::vector< double >( amp_values_ ) ); - ( *d )[ names::allow_offgrid_times ] = BoolDatum( allow_offgrid_amp_times_ ); + d[ names::amplitude_times.toString() ] = DoubleVectorDatum( times_ms ); + d[ names::amplitude_values.toString() ] = DoubleVectorDatum( new std::vector< double >( amp_values_ ) ); + d[ names::allow_offgrid_times.toString() ] = BoolDatum( allow_offgrid_amp_times_ ); } nest::Time @@ -158,12 +158,12 @@ nest::step_rate_generator::Parameters_::validate_time_( double t, const Time& t_ } void -nest::step_rate_generator::Parameters_::set( const DictionaryDatum& d, Buffers_& b, Node* ) +nest::step_rate_generator::Parameters_::set( const dictionary& d, Buffers_& b, Node* ) { std::vector< double > new_times; - const bool times_changed = updateValue< std::vector< double > >( d, names::amplitude_times, new_times ); - const bool values_changed = updateValue< std::vector< double > >( d, names::amplitude_values, amp_values_ ); - const bool allow_offgrid_changed = updateValue< bool >( d, names::allow_offgrid_times, allow_offgrid_amp_times_ ); + const bool times_changed = d.update_value( names::amplitude_times.toString(), new_times ); + const bool values_changed = d.update_value( names::amplitude_values.toString(), amp_values_ ); + const bool allow_offgrid_changed = d.update_value( names::allow_offgrid_times.toString(), allow_offgrid_amp_times_ ); if ( times_changed xor values_changed ) { @@ -350,7 +350,8 @@ nest::step_rate_generator::set_data_from_stimulation_backend( std::vector< doubl throw BadParameterValue( "The size of the data for the step_rate_generator needs to be even [(time,rate) pairs] " ); } - DictionaryDatum d = DictionaryDatum( new Dictionary ); + dictionary d; + ( new Dictionary ); std::vector< double > times_ms; std::vector< double > amplitudes_Hz; const size_t n_step = P_.amp_time_stamps_.size(); @@ -366,8 +367,8 @@ nest::step_rate_generator::set_data_from_stimulation_backend( std::vector< doubl times_ms.push_back( time_amplitude[ n * 2 ] ); amplitudes_Hz.push_back( time_amplitude[ n * 2 + 1 ] ); } - ( *d )[ names::amplitude_times ] = DoubleVectorDatum( times_ms ); - ( *d )[ names::amplitude_values ] = DoubleVectorDatum( amplitudes_Hz ); + d[ names::amplitude_times.toString() ] = DoubleVectorDatum( times_ms ); + d[ names::amplitude_values.toString() ] = DoubleVectorDatum( amplitudes_Hz ); ptmp.set( d, B_, this ); } diff --git a/models/step_rate_generator.h b/models/step_rate_generator.h index 6f95df92fd..e9630b06dd 100644 --- a/models/step_rate_generator.h +++ b/models/step_rate_generator.h @@ -121,8 +121,8 @@ class step_rate_generator : public StimulationDevice port handles_test_event( DataLoggingRequest&, rport ) override; - void get_status( DictionaryDatum& ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& ) const override; + void set_status( const dictionary& ) override; //! Allow multimeter to connect to local instances bool local_receiver() const override; @@ -158,9 +158,9 @@ class step_rate_generator : public StimulationDevice Parameters_( const Parameters_& ); Parameters_& operator=( const Parameters_& p ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary + void get( dictionary& ) const; //!< Store current values in dictionary //! Set values from dictionary - void set( const DictionaryDatum&, Buffers_&, Node* ); + void set( const dictionary&, Buffers_&, Node* ); /** * Return time as Time object if valid, otherwise throw BadProperty @@ -236,16 +236,16 @@ step_rate_generator::handles_test_event( DataLoggingRequest& dlr, rport receptor } inline void -step_rate_generator::get_status( DictionaryDatum& d ) const +step_rate_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); - ( *d )[ names::recordables ] = recordablesMap_.get_list(); + d[ names::recordables.toString() ] = recordablesMap_.get_list(); } inline void -step_rate_generator::set_status( const DictionaryDatum& d ) +step_rate_generator::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, B_, this ); // throws if BadProperty diff --git a/models/tanh_rate.cpp b/models/tanh_rate.cpp index a382d34499..7901a3814b 100644 --- a/models/tanh_rate.cpp +++ b/models/tanh_rate.cpp @@ -26,17 +26,17 @@ namespace nest { void -nonlinearities_tanh_rate::get( DictionaryDatum& d ) const +nonlinearities_tanh_rate::get( dictionary& d ) const { - def< double >( d, names::g, g_ ); - def< double >( d, names::theta, theta_ ); + d[ names::g.toString() ] = g_; + d[ names::theta.toString() ] = theta_; } void -nonlinearities_tanh_rate::set( const DictionaryDatum& d, Node* node ) +nonlinearities_tanh_rate::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::g, g_, node ); - updateValueParam< double >( d, names::theta, theta_, node ); + update_value_param( d, names::g.toString(), g_, node ); + update_value_param( d, names::theta.toString(), theta_, node ); } /* diff --git a/models/tanh_rate.h b/models/tanh_rate.h index 55e66d446d..06719d1fc5 100644 --- a/models/tanh_rate.h +++ b/models/tanh_rate.h @@ -135,8 +135,8 @@ class nonlinearities_tanh_rate { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary double input( double h ); // non-linearity on input double mult_coupling_ex( double rate ); // factor of multiplicative coupling diff --git a/models/threshold_lin_rate.cpp b/models/threshold_lin_rate.cpp index ff0a98594d..d45bab89c1 100644 --- a/models/threshold_lin_rate.cpp +++ b/models/threshold_lin_rate.cpp @@ -26,19 +26,19 @@ namespace nest { void -nonlinearities_threshold_lin_rate::get( DictionaryDatum& d ) const +nonlinearities_threshold_lin_rate::get( dictionary& d ) const { - def< double >( d, names::g, g_ ); - def< double >( d, names::theta, theta_ ); - def< double >( d, names::alpha, alpha_ ); + d[ names::g.toString() ] = g_; + d[ names::theta.toString() ] = theta_; + d[ names::alpha.toString() ] = alpha_; } void -nonlinearities_threshold_lin_rate::set( const DictionaryDatum& d, Node* node ) +nonlinearities_threshold_lin_rate::set( const dictionary& d, Node* node ) { - updateValueParam< double >( d, names::g, g_, node ); - updateValueParam< double >( d, names::theta, theta_, node ); - updateValueParam< double >( d, names::alpha, alpha_, node ); + update_value_param( d, names::g.toString(), g_, node ); + update_value_param( d, names::theta.toString(), theta_, node ); + update_value_param( d, names::alpha.toString(), alpha_, node ); } /* diff --git a/models/threshold_lin_rate.h b/models/threshold_lin_rate.h index 4f7f3a3177..7f2989c357 100644 --- a/models/threshold_lin_rate.h +++ b/models/threshold_lin_rate.h @@ -142,8 +142,8 @@ class nonlinearities_threshold_lin_rate { } - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum&, Node* node ); //!< Set values from dicitonary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary&, Node* node ); //!< Set values from dicitonary double input( double h ); // non-linearity on input double mult_coupling_ex( double rate ); // factor of multiplicative coupling diff --git a/models/tsodyks2_synapse.h b/models/tsodyks2_synapse.h index aebbf81a92..944a061497 100644 --- a/models/tsodyks2_synapse.h +++ b/models/tsodyks2_synapse.h @@ -149,12 +149,12 @@ class tsodyks2_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -248,51 +248,51 @@ tsodyks2_synapse< targetidentifierT >::tsodyks2_synapse() template < typename targetidentifierT > void -tsodyks2_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +tsodyks2_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - - def< double >( d, names::dU, U_ ); - def< double >( d, names::u, u_ ); - def< double >( d, names::tau_rec, tau_rec_ ); - def< double >( d, names::tau_fac, tau_fac_ ); - def< double >( d, names::x, x_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + + d[ names::dU.toString() ] = U_; + d[ names::u.toString() ] = u_; + d[ names::tau_rec.toString() ] = tau_rec_; + d[ names::tau_fac.toString() ] = tau_fac_; + d[ names::x.toString() ] = x_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -tsodyks2_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +tsodyks2_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); - updateValue< double >( d, names::dU, U_ ); + d.update_value( names::dU.toString(), U_ ); if ( U_ > 1.0 || U_ < 0.0 ) { throw BadProperty( "U must be in [0,1]." ); } - updateValue< double >( d, names::u, u_ ); + d.update_value( names::u.toString(), u_ ); if ( u_ > 1.0 || u_ < 0.0 ) { throw BadProperty( "u must be in [0,1]." ); } - updateValue< double >( d, names::tau_rec, tau_rec_ ); + d.update_value( names::tau_rec.toString(), tau_rec_ ); if ( tau_rec_ <= 0.0 ) { throw BadProperty( "tau_rec must be > 0." ); } - updateValue< double >( d, names::tau_fac, tau_fac_ ); + d.update_value( names::tau_fac.toString(), tau_fac_ ); if ( tau_fac_ < 0.0 ) { throw BadProperty( "tau_fac must be >= 0." ); } - updateValue< double >( d, names::x, x_ ); + d.update_value( names::x.toString(), x_ ); } } // namespace diff --git a/models/tsodyks_synapse.h b/models/tsodyks_synapse.h index 101a72df84..73567b2e13 100644 --- a/models/tsodyks_synapse.h +++ b/models/tsodyks_synapse.h @@ -167,12 +167,12 @@ class tsodyks_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -294,32 +294,32 @@ tsodyks_synapse< targetidentifierT >::tsodyks_synapse() template < typename targetidentifierT > void -tsodyks_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +tsodyks_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - - def< double >( d, names::U, U_ ); - def< double >( d, names::tau_psc, tau_psc_ ); - def< double >( d, names::tau_rec, tau_rec_ ); - def< double >( d, names::tau_fac, tau_fac_ ); - def< double >( d, names::x, x_ ); - def< double >( d, names::y, y_ ); - def< double >( d, names::u, u_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + + d[ names::U.toString() ] = U_; + d[ names::tau_psc.toString() ] = tau_psc_; + d[ names::tau_rec.toString() ] = tau_rec_; + d[ names::tau_fac.toString() ] = tau_fac_; + d[ names::x.toString() ] = x_; + d[ names::y.toString() ] = y_; + d[ names::u.toString() ] = u_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -tsodyks_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +tsodyks_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // Handle parameters that may throw an exception first, so we can leave the // synapse untouched // in case of invalid parameter values double x = x_; double y = y_; - updateValue< double >( d, names::x, x ); - updateValue< double >( d, names::y, y ); + d.update_value( names::x.toString(), x ); + d.update_value( names::y.toString(), y ); if ( x + y > 1.0 ) { @@ -330,33 +330,33 @@ tsodyks_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, Conn y_ = y; ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); - updateValue< double >( d, names::U, U_ ); + d.update_value( names::U.toString(), U_ ); if ( U_ > 1.0 || U_ < 0.0 ) { throw BadProperty( "U must be in [0,1]." ); } - updateValue< double >( d, names::tau_psc, tau_psc_ ); + d.update_value( names::tau_psc.toString(), tau_psc_ ); if ( tau_psc_ <= 0.0 ) { throw BadProperty( "tau_psc must be > 0." ); } - updateValue< double >( d, names::tau_rec, tau_rec_ ); + d.update_value( names::tau_rec.toString(), tau_rec_ ); if ( tau_rec_ <= 0.0 ) { throw BadProperty( "tau_rec must be > 0." ); } - updateValue< double >( d, names::tau_fac, tau_fac_ ); + d.update_value( names::tau_fac.toString(), tau_fac_ ); if ( tau_fac_ < 0.0 ) { throw BadProperty( "tau_fac must be >= 0." ); } - updateValue< double >( d, names::u, u_ ); + d.update_value( names::u.toString(), u_ ); } } // namespace diff --git a/models/tsodyks_synapse_hom.cpp b/models/tsodyks_synapse_hom.cpp index 538492a6bb..c8ce5fb3d5 100644 --- a/models/tsodyks_synapse_hom.cpp +++ b/models/tsodyks_synapse_hom.cpp @@ -42,40 +42,40 @@ TsodyksHomCommonProperties::TsodyksHomCommonProperties() } void -TsodyksHomCommonProperties::get_status( DictionaryDatum& d ) const +TsodyksHomCommonProperties::get_status( dictionary& d ) const { CommonPropertiesHomW::get_status( d ); - def< double >( d, names::U, U_ ); - def< double >( d, names::tau_psc, tau_psc_ ); - def< double >( d, names::tau_rec, tau_rec_ ); - def< double >( d, names::tau_fac, tau_fac_ ); + d[ names::U.toString() ] = U_; + d[ names::tau_psc.toString() ] = tau_psc_; + d[ names::tau_rec.toString() ] = tau_rec_; + d[ names::tau_fac.toString() ] = tau_fac_; } void -TsodyksHomCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +TsodyksHomCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { CommonPropertiesHomW::set_status( d, cm ); - updateValue< double >( d, names::U, U_ ); + d.update_value( names::U.toString(), U_ ); if ( U_ > 1.0 || U_ < 0.0 ) { throw BadProperty( "U must be in [0,1]." ); } - updateValue< double >( d, names::tau_psc, tau_psc_ ); + d.update_value( names::tau_psc.toString(), tau_psc_ ); if ( tau_psc_ <= 0.0 ) { throw BadProperty( "tau_psc must be > 0." ); } - updateValue< double >( d, names::tau_rec, tau_rec_ ); + d.update_value( names::tau_rec.toString(), tau_rec_ ); if ( tau_rec_ <= 0.0 ) { throw BadProperty( "tau_rec must be > 0." ); } - updateValue< double >( d, names::tau_fac, tau_fac_ ); + d.update_value( names::tau_fac.toString(), tau_fac_ ); if ( tau_fac_ < 0.0 ) { throw BadProperty( "tau_fac must be >= 0." ); diff --git a/models/tsodyks_synapse_hom.h b/models/tsodyks_synapse_hom.h index 3f44ca229e..6c76a2a4e9 100644 --- a/models/tsodyks_synapse_hom.h +++ b/models/tsodyks_synapse_hom.h @@ -149,12 +149,12 @@ class TsodyksHomCommonProperties : public CommonPropertiesHomW /** * Get all properties and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); double tau_psc_; //!< [ms] time constant of postsyn current double tau_fac_; //!< [ms] time constant for fascilitation @@ -200,12 +200,12 @@ class tsodyks_synapse_hom : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -317,25 +317,25 @@ tsodyks_synapse_hom< targetidentifierT >::tsodyks_synapse_hom() template < typename targetidentifierT > void -tsodyks_synapse_hom< targetidentifierT >::get_status( DictionaryDatum& d ) const +tsodyks_synapse_hom< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::x, x_ ); - def< double >( d, names::y, y_ ); - def< double >( d, names::u, u_ ); + d[ names::x.toString() ] = x_; + d[ names::y.toString() ] = y_; + d[ names::u.toString() ] = u_; } template < typename targetidentifierT > void -tsodyks_synapse_hom< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +tsodyks_synapse_hom< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // Handle parameters that may throw an exception first, so we can leave the // synapse untouched in case of invalid parameter values double x = x_; double y = y_; - updateValue< double >( d, names::x, x ); - updateValue< double >( d, names::y, y ); + d.update_value( names::x.toString(), x ); + d.update_value( names::y.toString(), y ); if ( x + y > 1.0 ) { @@ -347,7 +347,7 @@ tsodyks_synapse_hom< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::u, u_ ); + d.update_value( names::u.toString(), u_ ); } } // namespace diff --git a/models/urbanczik_synapse.h b/models/urbanczik_synapse.h index f78debd06b..9991c0f71c 100644 --- a/models/urbanczik_synapse.h +++ b/models/urbanczik_synapse.h @@ -140,12 +140,12 @@ class urbanczik_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -291,27 +291,27 @@ urbanczik_synapse< targetidentifierT >::urbanczik_synapse() template < typename targetidentifierT > void -urbanczik_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +urbanczik_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::tau_Delta, tau_Delta_ ); - def< double >( d, names::eta, eta_ ); - def< double >( d, names::Wmin, Wmin_ ); - def< double >( d, names::Wmax, Wmax_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::tau_Delta.toString() ] = tau_Delta_; + d[ names::eta.toString() ] = eta_; + d[ names::Wmin.toString() ] = Wmin_; + d[ names::Wmax.toString() ] = Wmax_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -urbanczik_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +urbanczik_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::tau_Delta, tau_Delta_ ); - updateValue< double >( d, names::eta, eta_ ); - updateValue< double >( d, names::Wmin, Wmin_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::tau_Delta.toString(), tau_Delta_ ); + d.update_value( names::eta.toString(), eta_ ); + d.update_value( names::Wmin.toString(), Wmin_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); init_weight_ = weight_; // check if weight_ and Wmin_ has the same sign diff --git a/models/vogels_sprekeler_synapse.h b/models/vogels_sprekeler_synapse.h index 97e530190e..46e191e8b4 100644 --- a/models/vogels_sprekeler_synapse.h +++ b/models/vogels_sprekeler_synapse.h @@ -118,12 +118,12 @@ class vogels_sprekeler_synapse : public Connection< targetidentifierT > /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Send an event to the receiver of this connection. @@ -267,29 +267,29 @@ vogels_sprekeler_synapse< targetidentifierT >::vogels_sprekeler_synapse() template < typename targetidentifierT > void -vogels_sprekeler_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const +vogels_sprekeler_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - def< double >( d, names::weight, weight_ ); - def< double >( d, names::tau, tau_ ); - def< double >( d, names::alpha, alpha_ ); - def< double >( d, names::eta, eta_ ); - def< double >( d, names::Wmax, Wmax_ ); - def< double >( d, names::Kplus, Kplus_ ); - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::weight.toString() ] = weight_; + d[ names::tau.toString() ] = tau_; + d[ names::alpha.toString() ] = alpha_; + d[ names::eta.toString() ] = eta_; + d[ names::Wmax.toString() ] = Wmax_; + d[ names::Kplus.toString() ] = Kplus_; + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename targetidentifierT > void -vogels_sprekeler_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +vogels_sprekeler_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); - updateValue< double >( d, names::tau, tau_ ); - updateValue< double >( d, names::alpha, alpha_ ); - updateValue< double >( d, names::eta, eta_ ); - updateValue< double >( d, names::Wmax, Wmax_ ); - updateValue< double >( d, names::Kplus, Kplus_ ); + d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::tau.toString(), tau_ ); + d.update_value( names::alpha.toString(), alpha_ ); + d.update_value( names::eta.toString(), eta_ ); + d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::Kplus.toString(), Kplus_ ); // if the weight_ is not 0, we check to ensure that weight_ and Wmax_ are of // the same sign diff --git a/models/volume_transmitter.cpp b/models/volume_transmitter.cpp index c0e4894f88..ddf1bd8e1e 100644 --- a/models/volume_transmitter.cpp +++ b/models/volume_transmitter.cpp @@ -55,14 +55,14 @@ nest::volume_transmitter::Parameters_::Parameters_() * ---------------------------------------------------------------- */ void -nest::volume_transmitter::Parameters_::get( DictionaryDatum& d ) const +nest::volume_transmitter::Parameters_::get( dictionary& d ) const { - def< long >( d, names::deliver_interval, deliver_interval_ ); + d[ names::deliver_interval.toString() ] = deliver_interval_; } -void ::nest::volume_transmitter::Parameters_::set( const DictionaryDatum& d, Node* node ) +void ::nest::volume_transmitter::Parameters_::set( const dictionary& d, Node* node ) { - updateValueParam< long >( d, names::deliver_interval, deliver_interval_, node ); + update_value_param( d, names::deliver_interval.toString(), deliver_interval_, node ); } /* ---------------------------------------------------------------- diff --git a/models/volume_transmitter.h b/models/volume_transmitter.h index 3fa708685f..2dc34e370d 100644 --- a/models/volume_transmitter.h +++ b/models/volume_transmitter.h @@ -140,8 +140,8 @@ class volume_transmitter : public ArchivingNode port handles_test_event( SpikeEvent&, rport ); - void get_status( DictionaryDatum& d ) const; - void set_status( const DictionaryDatum& d ); + void get_status( dictionary& d ) const; + void set_status( const dictionary& d ); /** * Since volume transmitters are duplicated on each thread, and are @@ -167,8 +167,8 @@ class volume_transmitter : public ArchivingNode struct Parameters_ { Parameters_(); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum&, Node* node ); + void get( dictionary& ) const; + void set( const dictionary&, Node* node ); long deliver_interval_; //!< update interval in d_min time steps }; @@ -198,14 +198,14 @@ volume_transmitter::handles_test_event( SpikeEvent&, rport receptor_type ) } inline void -volume_transmitter::get_status( DictionaryDatum& d ) const +volume_transmitter::get_status( dictionary& d ) const { P_.get( d ); ArchivingNode::get_status( d ); } inline void -volume_transmitter::set_status( const DictionaryDatum& d ) +volume_transmitter::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d, this ); // throws if BadProperty diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp index a33c114879..6b944add2a 100644 --- a/models/weight_recorder.cpp +++ b/models/weight_recorder.cpp @@ -63,74 +63,48 @@ nest::weight_recorder::Parameters_::Parameters_() } void -nest::weight_recorder::Parameters_::get( DictionaryDatum& d ) const +nest::weight_recorder::Parameters_::get( dictionary& d ) const { if ( senders_.get() ) { - ( *d )[ names::senders ] = senders_; + d[ names::senders.toString() ] = senders_; } else { ArrayDatum ad; - ( *d )[ names::senders ] = ad; + d[ names::senders.toString() ] = ad; } if ( targets_.get() ) { - ( *d )[ names::targets ] = targets_; + d[ names::targets.toString() ] = targets_; } else { ArrayDatum ad; - ( *d )[ names::targets ] = ad; + d[ names::targets.toString() ] = ad; } } void -nest::weight_recorder::Parameters_::set( const DictionaryDatum& d ) +nest::weight_recorder::Parameters_::set( const dictionary& d ) { - if ( d->known( names::senders ) ) + auto get_or_create_nc = [&d]( NodeCollectionDatum& nc, const std::string& key ) { - const Token& tkn = d->lookup( names::senders ); - if ( tkn.is_a< NodeCollectionDatum >() ) + const auto value = d.at( key ); + if ( is_nc( value ) ) { - senders_ = getValue< NodeCollectionDatum >( tkn ); + nc = d.get< NodeCollectionDatum >( key ); } - else + else if ( is_int_vector( value ) ) { - if ( tkn.is_a< IntVectorDatum >() ) - { - IntVectorDatum ivd = getValue< IntVectorDatum >( tkn ); - senders_ = NodeCollection::create( ivd ); - } - if ( tkn.is_a< ArrayDatum >() ) - { - ArrayDatum ad = getValue< ArrayDatum >( tkn ); - senders_ = NodeCollection::create( ad ); - } + const auto node_ids = d.get< std::vector< int > >( key ); + // TODO-PYNEST-NG: make a NodeCollection::create(vector) variant + // nc = NodeCollection::create(node_ids); } - } + }; - if ( d->known( names::targets ) ) - { - const Token& tkn = d->lookup( names::targets ); - if ( tkn.is_a< NodeCollectionDatum >() ) - { - targets_ = getValue< NodeCollectionDatum >( tkn ); - } - else - { - if ( tkn.is_a< IntVectorDatum >() ) - { - IntVectorDatum ivd = getValue< IntVectorDatum >( tkn ); - targets_ = NodeCollection::create( ivd ); - } - if ( tkn.is_a< ArrayDatum >() ) - { - ArrayDatum ad = getValue< ArrayDatum >( tkn ); - targets_ = NodeCollection::create( ad ); - } - } - } + get_or_create_nc( senders_, names::senders.toString() ); + get_or_create_nc( targets_, names::targets.toString() ); } void @@ -152,7 +126,7 @@ nest::weight_recorder::get_type() const } void -nest::weight_recorder::get_status( DictionaryDatum& d ) const +nest::weight_recorder::get_status( dictionary& d ) const { // get the data from the device RecordingDevice::get_status( d ); @@ -178,7 +152,7 @@ nest::weight_recorder::get_status( DictionaryDatum& d ) const } void -nest::weight_recorder::set_status( const DictionaryDatum& d ) +nest::weight_recorder::set_status( const dictionary& d ) { Parameters_ ptmp = P_; ptmp.set( d ); diff --git a/models/weight_recorder.h b/models/weight_recorder.h index b6745cbc33..1060b12819 100644 --- a/models/weight_recorder.h +++ b/models/weight_recorder.h @@ -122,8 +122,8 @@ class weight_recorder : public RecordingDevice Type get_type() const; SignalType receives_signal() const; - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void calibrate(); @@ -136,8 +136,8 @@ class weight_recorder : public RecordingDevice Parameters_(); Parameters_( const Parameters_& ) = default; - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum& ); + void get( dictionary& ) const; + void set( const dictionary& ); }; Parameters_ P_; diff --git a/nest/neststartup.cpp b/nest/neststartup.cpp index 7e4063346d..0a91f093ab 100644 --- a/nest/neststartup.cpp +++ b/nest/neststartup.cpp @@ -122,10 +122,10 @@ neststartup( int* argc, char*** argv, SLIInterpreter& engine, std::string module // this can make problems with reference counting, if // the intepreter decides cleans up memory before NEST is ready - engine.def( "modeldict", nest::kernel().model_manager.get_modeldict() ); - engine.def( "synapsedict", nest::kernel().model_manager.get_synapsedict() ); + // engine.def( "modeldict", nest::kernel().model_manager.get_modeldict() ); + // engine.def( "synapsedict", nest::kernel().model_manager.get_synapsedict() ); engine.def( "connruledict", nest::kernel().connection_manager.get_connruledict() ); - engine.def( "growthcurvedict", nest::kernel().sp_manager.get_growthcurvedict() ); + // engine.def( "growthcurvedict", nest::kernel().sp_manager.get_growthcurvedict() ); // now add static modules providing models add_static_modules( engine ); diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt index a310d5fe0d..fc6a78dbbd 100644 --- a/nestkernel/CMakeLists.txt +++ b/nestkernel/CMakeLists.txt @@ -145,6 +145,7 @@ target_include_directories( nestkernel PRIVATE ${PROJECT_SOURCE_DIR}/sli ${PROJECT_SOURCE_DIR}/nestkernel ${PROJECT_SOURCE_DIR}/nestkernel/spatial + ${PROJECT_SOURCE_DIR}/models ) install( TARGETS nestkernel diff --git a/nestkernel/archiving_node.cpp b/nestkernel/archiving_node.cpp index 609c4530c8..41f7a7dad4 100644 --- a/nestkernel/archiving_node.cpp +++ b/nestkernel/archiving_node.cpp @@ -218,14 +218,14 @@ nest::ArchivingNode::set_spiketime( Time const& t_sp, double offset ) } void -nest::ArchivingNode::get_status( DictionaryDatum& d ) const +nest::ArchivingNode::get_status( dictionary& d ) const { - def< double >( d, names::t_spike, get_spiketime_ms() ); - def< double >( d, names::tau_minus, tau_minus_ ); - def< double >( d, names::tau_minus_triplet, tau_minus_triplet_ ); - def< double >( d, names::post_trace, trace_ ); + d[ names::t_spike.toString() ] = get_spiketime_ms(); + d[ names::tau_minus.toString() ] = tau_minus_; + d[ names::tau_minus_triplet.toString() ] = tau_minus_triplet_; + d[ names::post_trace.toString() ] = trace_; #ifdef DEBUG_ARCHIVER - def< int >( d, names::archiver_length, history_.size() ); + d[ names::archiver_length.toString() ] = history_.size(); #endif // add status dict items from the parent class @@ -233,13 +233,13 @@ nest::ArchivingNode::get_status( DictionaryDatum& d ) const } void -nest::ArchivingNode::set_status( const DictionaryDatum& d ) +nest::ArchivingNode::set_status( const dictionary& d ) { // We need to preserve values in case invalid values are set double new_tau_minus = tau_minus_; double new_tau_minus_triplet = tau_minus_triplet_; - updateValue< double >( d, names::tau_minus, new_tau_minus ); - updateValue< double >( d, names::tau_minus_triplet, new_tau_minus_triplet ); + d.update_value( names::tau_minus.toString(), new_tau_minus ); + d.update_value( names::tau_minus_triplet.toString(), new_tau_minus_triplet ); if ( new_tau_minus <= 0.0 or new_tau_minus_triplet <= 0.0 ) { @@ -256,7 +256,7 @@ nest::ArchivingNode::set_status( const DictionaryDatum& d ) // check, if to clear spike history and K_minus bool clear = false; - updateValue< bool >( d, names::clear, clear ); + d.update_value( names::clear.toString(), clear ); if ( clear ) { clear_history(); diff --git a/nestkernel/archiving_node.h b/nestkernel/archiving_node.h index 5da56af8d7..4285f45a91 100644 --- a/nestkernel/archiving_node.h +++ b/nestkernel/archiving_node.h @@ -125,8 +125,8 @@ class ArchivingNode : public StructuralPlasticityNode */ void register_stdp_connection( double t_first_read, double delay ); - void get_status( DictionaryDatum& d ) const; - void set_status( const DictionaryDatum& d ); + void get_status( dictionary& d ) const; + void set_status( const dictionary& d ); protected: /** diff --git a/nestkernel/clopath_archiving_node.cpp b/nestkernel/clopath_archiving_node.cpp index eaa9101b1b..4b24b8af64 100644 --- a/nestkernel/clopath_archiving_node.cpp +++ b/nestkernel/clopath_archiving_node.cpp @@ -82,21 +82,21 @@ nest::ClopathArchivingNode::init_clopath_buffers() } void -nest::ClopathArchivingNode::get_status( DictionaryDatum& d ) const +nest::ClopathArchivingNode::get_status( dictionary& d ) const { ArchivingNode::get_status( d ); - def< double >( d, names::A_LTD, A_LTD_ ); - def< double >( d, names::A_LTP, A_LTP_ ); - def< double >( d, names::u_ref_squared, u_ref_squared_ ); - def< double >( d, names::theta_plus, theta_plus_ ); - def< double >( d, names::theta_minus, theta_minus_ ); - def< bool >( d, names::A_LTD_const, A_LTD_const_ ); - def< double >( d, names::delay_u_bars, delay_u_bars_ ); + d[ names::A_LTD.toString() ] = A_LTD_; + d[ names::A_LTP.toString() ] = A_LTP_; + d[ names::u_ref_squared.toString() ] = u_ref_squared_; + d[ names::theta_plus.toString() ] = theta_plus_; + d[ names::theta_minus.toString() ] = theta_minus_; + d[ names::A_LTD_const.toString() ] = A_LTD_const_; + d[ names::delay_u_bars.toString() ] = delay_u_bars_; } void -nest::ClopathArchivingNode::set_status( const DictionaryDatum& d ) +nest::ClopathArchivingNode::set_status( const dictionary& d ) { ArchivingNode::set_status( d ); @@ -108,13 +108,13 @@ nest::ClopathArchivingNode::set_status( const DictionaryDatum& d ) double new_u_ref_squared = u_ref_squared_; double new_A_LTD_const = A_LTD_const_; double new_delay_u_bars = delay_u_bars_; - updateValue< double >( d, names::A_LTD, new_A_LTD ); - updateValue< double >( d, names::A_LTP, new_A_LTP ); - updateValue< double >( d, names::u_ref_squared, new_u_ref_squared ); - updateValue< double >( d, names::theta_plus, new_theta_plus ); - updateValue< double >( d, names::theta_minus, new_theta_minus ); - updateValue< bool >( d, names::A_LTD_const, new_A_LTD_const ); - updateValue< double >( d, names::delay_u_bars, new_delay_u_bars ); + d.update_value( names::A_LTD.toString(), new_A_LTD ); + d.update_value( names::A_LTP.toString(), new_A_LTP ); + d.update_value( names::u_ref_squared.toString(), new_u_ref_squared ); + d.update_value( names::theta_plus.toString(), new_theta_plus ); + d.update_value( names::theta_minus.toString(), new_theta_minus ); + d.update_value( names::A_LTD_const.toString(), new_A_LTD_const ); + d.update_value( names::delay_u_bars.toString(), new_delay_u_bars ); A_LTD_ = new_A_LTD; A_LTP_ = new_A_LTP; u_ref_squared_ = new_u_ref_squared; diff --git a/nestkernel/clopath_archiving_node.h b/nestkernel/clopath_archiving_node.h index ca94c1318c..b9c8a01fe7 100644 --- a/nestkernel/clopath_archiving_node.h +++ b/nestkernel/clopath_archiving_node.h @@ -117,8 +117,8 @@ class ClopathArchivingNode : public ArchivingNode void write_clopath_history( Time const& t_sp, double u, double u_bar_plus, double u_bar_minus, double u_bar_bar ); void init_clopath_buffers(); - void get_status( DictionaryDatum& d ) const; - void set_status( const DictionaryDatum& d ); + void get_status( dictionary& d ) const; + void set_status( const dictionary& d ); private: std::vector< histentry_extended > ltd_history_; diff --git a/nestkernel/common_properties_hom_w.h b/nestkernel/common_properties_hom_w.h index 4804a3e7a0..6e4aa176cc 100644 --- a/nestkernel/common_properties_hom_w.h +++ b/nestkernel/common_properties_hom_w.h @@ -62,10 +62,10 @@ class CommonPropertiesHomW : public CommonSynapseProperties * Get all properties and put them into a dictionary. */ void - get_status( DictionaryDatum& d ) const + get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - def< double >( d, names::weight, weight_ ); + d[ names::weight.toString() ] = weight_; } double @@ -78,10 +78,10 @@ class CommonPropertiesHomW : public CommonSynapseProperties * Set properties from the values given in dictionary. */ void - set_status( const DictionaryDatum& d, ConnectorModel& cm ) + set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - updateValue< double >( d, names::weight, weight_ ); + d.update_value( names::weight.toString(), weight_ ); } private: diff --git a/nestkernel/common_synapse_properties.cpp b/nestkernel/common_synapse_properties.cpp index 69502b1d55..f7dcc92208 100644 --- a/nestkernel/common_synapse_properties.cpp +++ b/nestkernel/common_synapse_properties.cpp @@ -49,23 +49,23 @@ CommonSynapseProperties::~CommonSynapseProperties() } void -CommonSynapseProperties::get_status( DictionaryDatum& d ) const +CommonSynapseProperties::get_status( dictionary& d ) const { if ( weight_recorder_.get() ) { - def< NodeCollectionDatum >( d, names::weight_recorder, weight_recorder_ ); + d[ names::weight_recorder.toString() ] = weight_recorder_; } else { ArrayDatum ad; - def< ArrayDatum >( d, names::weight_recorder, ad ); + d[ names::weight_recorder.toString() ] = ad; } } void -CommonSynapseProperties::set_status( const DictionaryDatum& d, ConnectorModel& ) +CommonSynapseProperties::set_status( const dictionary& d, ConnectorModel& ) { - const bool update_wr = updateValue< NodeCollectionDatum >( d, names::weight_recorder, weight_recorder_ ); + const bool update_wr = d.update_value( names::weight_recorder.toString(), weight_recorder_ ); if ( update_wr and weight_recorder_->size() > 1 ) { throw BadProperty( "weight_recorder must be a single element NodeCollection" ); diff --git a/nestkernel/common_synapse_properties.h b/nestkernel/common_synapse_properties.h index db76cf2fc0..2049f937cd 100644 --- a/nestkernel/common_synapse_properties.h +++ b/nestkernel/common_synapse_properties.h @@ -64,12 +64,12 @@ class CommonSynapseProperties /** * Get all properties and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties from the values given in dictionary. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp index 9d3354f595..86761bd548 100644 --- a/nestkernel/conn_builder.cpp +++ b/nestkernel/conn_builder.cpp @@ -41,8 +41,8 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : sources_( sources ) , targets_( targets ) , allow_autapses_( true ) @@ -58,9 +58,9 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, // read out rule-related parameters ------------------------- // - /rule has been taken care of above // - rule-specific params are handled by subclass c'tor - updateValue< bool >( conn_spec, names::allow_autapses, allow_autapses_ ); - updateValue< bool >( conn_spec, names::allow_multapses, allow_multapses_ ); - updateValue< bool >( conn_spec, names::make_symmetric, make_symmetric_ ); + conn_spec.update_value< bool >( names::allow_autapses.toString(), allow_autapses_ ); + conn_spec.update_value< bool >( names::allow_multapses.toString(), allow_multapses_ ); + conn_spec.update_value< bool >( names::make_symmetric.toString(), make_symmetric_ ); // read out synapse-related parameters ---------------------- @@ -76,9 +76,10 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, delays_.resize( syn_specs.size() ); synapse_params_.resize( syn_specs.size() ); synapse_model_id_.resize( syn_specs.size() ); - synapse_model_id_[ 0 ] = kernel().model_manager.get_synapsedict()->lookup( "static_synapse" ); + synapse_model_id_[ 0 ] = kernel().model_manager.get_synapsedict().get< synindex >( "static_synapse" ); param_dicts_.resize( syn_specs.size() ); + std::cerr << "syn_specs.size(): " << syn_specs.size() << "\n"; // loop through vector of synapse dictionaries, and set synapse parameters for ( size_t synapse_indx = 0; synapse_indx < syn_specs.size(); ++synapse_indx ) { @@ -87,7 +88,7 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, set_synapse_model_( syn_params, synapse_indx ); set_default_weight_or_delay_( syn_params, synapse_indx ); - DictionaryDatum syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id_[ synapse_indx ] ); + dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id_[ synapse_indx ] ); #ifdef HAVE_MUSIC // We allow music_channel as alias for receptor_type during @@ -300,17 +301,13 @@ nest::ConnBuilder::update_param_dict_( index snode_id, { if ( synapse_parameter.second->provides_long() ) { - // change value of dictionary entry without allocating new datum - IntegerDatum* id = static_cast< IntegerDatum* >( - ( ( *param_dicts_[ synapse_indx ][ target_thread ] )[ synapse_parameter.first ] ).datum() ); - ( *id ) = synapse_parameter.second->value_int( target_thread, rng, snode_id, &target ); + param_dicts_[ synapse_indx ][ target_thread ][ synapse_parameter.first.toString() ] = + synapse_parameter.second->value_int( target_thread, rng, snode_id, &target ); } else { - // change value of dictionary entry without allocating new datum - DoubleDatum* dd = static_cast< DoubleDatum* >( - ( ( *param_dicts_[ synapse_indx ][ target_thread ] )[ synapse_parameter.first ] ).datum() ); - ( *dd ) = synapse_parameter.second->value_double( target_thread, rng, snode_id, &target ); + param_dicts_[ synapse_indx ][ target_thread ][ synapse_parameter.first.toString() ] = + synapse_parameter.second->value_double( target_thread, rng, snode_id, &target ); } } } @@ -433,19 +430,26 @@ nest::ConnBuilder::loop_over_targets_() const } void -nest::ConnBuilder::set_synapse_model_( DictionaryDatum syn_params, size_t synapse_indx ) +nest::ConnBuilder::set_synapse_model_( dictionary syn_params, size_t synapse_indx ) { - if ( not syn_params->known( names::synapse_model ) ) + if ( not syn_params.known( names::synapse_model.toString() ) ) { + std::cerr << "synapse_model key: " << names::synapse_model.toString() << "\n"; + std::cerr << "keys: " + << "\n"; + for ( auto& kv_pair : syn_params ) + { + std::cerr << kv_pair.first << " \n"; + } throw BadProperty( "Synapse spec must contain synapse model." ); } - const std::string syn_name = ( *syn_params )[ names::synapse_model ]; - if ( not kernel().model_manager.get_synapsedict()->known( syn_name ) ) + const std::string syn_name = syn_params.get< std::string >( names::synapse_model.toString() ); + if ( not kernel().model_manager.get_synapsedict().known( syn_name ) ) { throw UnknownSynapseType( syn_name ); } - index synapse_model_id = kernel().model_manager.get_synapsedict()->lookup( syn_name ); + index synapse_model_id = kernel().model_manager.get_synapsedict().get< synindex >( syn_name ); synapse_model_id_[ synapse_indx ] = synapse_model_id; // We need to make sure that Connect can process all synapse parameters specified. @@ -454,15 +458,14 @@ nest::ConnBuilder::set_synapse_model_( DictionaryDatum syn_params, size_t synaps } void -nest::ConnBuilder::set_default_weight_or_delay_( DictionaryDatum syn_params, size_t synapse_indx ) +nest::ConnBuilder::set_default_weight_or_delay_( dictionary syn_params, size_t synapse_indx ) { - DictionaryDatum syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id_[ synapse_indx ] ); + dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id_[ synapse_indx ] ); // All synapse models have the possibility to set the delay (see SynIdDelay), but some have // homogeneous weights, hence it should be possible to set the delay without the weight. - default_weight_[ synapse_indx ] = not syn_params->known( names::weight ); - - default_delay_[ synapse_indx ] = not syn_params->known( names::delay ); + default_weight_[ synapse_indx ] = not syn_params.known( names::weight.toString() ); + default_delay_[ synapse_indx ] = not syn_params.known( names::delay.toString() ); // If neither weight nor delay are given in the dict, we handle this separately. Important for // hom_w synapses, on which weight cannot be set. However, we use default weight and delay for @@ -471,39 +474,39 @@ nest::ConnBuilder::set_default_weight_or_delay_( DictionaryDatum syn_params, siz if ( not default_weight_and_delay_[ synapse_indx ] ) { - weights_[ synapse_indx ] = syn_params->known( names::weight ) - ? ConnParameter::create( ( *syn_params )[ names::weight ], kernel().vp_manager.get_num_threads() ) - : ConnParameter::create( ( *syn_defaults )[ names::weight ], kernel().vp_manager.get_num_threads() ); + weights_[ synapse_indx ] = syn_params.known( names::weight.toString() ) + ? ConnParameter::create( syn_params[ names::weight.toString() ], kernel().vp_manager.get_num_threads() ) + : ConnParameter::create( syn_defaults[ names::weight.toString() ], kernel().vp_manager.get_num_threads() ); register_parameters_requiring_skipping_( *weights_[ synapse_indx ] ); - delays_[ synapse_indx ] = syn_params->known( names::delay ) - ? ConnParameter::create( ( *syn_params )[ names::delay ], kernel().vp_manager.get_num_threads() ) - : ConnParameter::create( ( *syn_defaults )[ names::delay ], kernel().vp_manager.get_num_threads() ); + delays_[ synapse_indx ] = syn_params.known( names::delay.toString() ) + ? ConnParameter::create( syn_params[ names::delay.toString() ], kernel().vp_manager.get_num_threads() ) + : ConnParameter::create( syn_defaults[ names::delay.toString() ], kernel().vp_manager.get_num_threads() ); } else if ( default_weight_[ synapse_indx ] ) { - delays_[ synapse_indx ] = syn_params->known( names::delay ) - ? ConnParameter::create( ( *syn_params )[ names::delay ], kernel().vp_manager.get_num_threads() ) - : ConnParameter::create( ( *syn_defaults )[ names::delay ], kernel().vp_manager.get_num_threads() ); + delays_[ synapse_indx ] = syn_params.known( names::delay.toString() ) + ? ConnParameter::create( syn_params[ names::delay.toString() ], kernel().vp_manager.get_num_threads() ) + : ConnParameter::create( syn_defaults[ names::delay.toString() ], kernel().vp_manager.get_num_threads() ); } register_parameters_requiring_skipping_( *delays_[ synapse_indx ] ); } void -nest::ConnBuilder::set_synapse_params( DictionaryDatum syn_defaults, DictionaryDatum syn_params, size_t synapse_indx ) +nest::ConnBuilder::set_synapse_params( dictionary syn_defaults, dictionary syn_params, size_t synapse_indx ) { - for ( Dictionary::const_iterator default_it = syn_defaults->begin(); default_it != syn_defaults->end(); ++default_it ) + for ( auto& syn_kv_pair : syn_defaults ) { - const Name param_name = default_it->first; + const std::string param_name = syn_kv_pair.first; if ( skip_syn_params_.find( param_name ) != skip_syn_params_.end() ) { continue; // weight, delay or other not-settable parameter } - if ( syn_params->known( param_name ) ) + if ( syn_params.known( param_name ) ) { synapse_params_[ synapse_indx ][ param_name ] = - ConnParameter::create( ( *syn_params )[ param_name ], kernel().vp_manager.get_num_threads() ); + ConnParameter::create( syn_params[ param_name ], kernel().vp_manager.get_num_threads() ); register_parameters_requiring_skipping_( *synapse_params_[ synapse_indx ][ param_name ] ); } } @@ -512,24 +515,24 @@ nest::ConnBuilder::set_synapse_params( DictionaryDatum syn_defaults, DictionaryD // create it here once to avoid re-creating the object over and over again. for ( thread tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid ) { - param_dicts_[ synapse_indx ].push_back( new Dictionary() ); + param_dicts_[ synapse_indx ].emplace_back(); for ( auto param : synapse_params_[ synapse_indx ] ) { if ( param.second->provides_long() ) { - ( *param_dicts_[ synapse_indx ][ tid ] )[ param.first ] = Token( new IntegerDatum( 0 ) ); + param_dicts_[ synapse_indx ][ tid ][ param.first.toString() ] = 0; } else { - ( *param_dicts_[ synapse_indx ][ tid ] )[ param.first ] = Token( new DoubleDatum( 0.0 ) ); + param_dicts_[ synapse_indx ][ tid ][ param.first.toString() ] = 0.0; } } } } void -nest::ConnBuilder::set_structural_plasticity_parameters( std::vector< DictionaryDatum > syn_specs ) +nest::ConnBuilder::set_structural_plasticity_parameters( std::vector< dictionary > syn_specs ) { // Check if both pre and postsynaptic element are provided. Currently only possible to have // structural plasticity with single element syn_spec. @@ -537,13 +540,13 @@ nest::ConnBuilder::set_structural_plasticity_parameters( std::vector< Dictionary bool have_one_sp_key = false; for ( auto syn_params : syn_specs ) { - if ( not have_both_sp_keys - and ( syn_params->known( names::pre_synaptic_element ) and syn_params->known( names::post_synaptic_element ) ) ) + if ( not have_both_sp_keys and ( syn_params.known( names::pre_synaptic_element.toString() ) + and syn_params.known( names::post_synaptic_element.toString() ) ) ) { have_both_sp_keys = true; } - if ( not have_one_sp_key - and ( syn_params->known( names::pre_synaptic_element ) or syn_params->known( names::post_synaptic_element ) ) ) + if ( not have_one_sp_key and ( syn_params.known( names::pre_synaptic_element.toString() ) + or syn_params.known( names::post_synaptic_element.toString() ) ) ) { have_one_sp_key = true; } @@ -555,8 +558,8 @@ nest::ConnBuilder::set_structural_plasticity_parameters( std::vector< Dictionary } else if ( have_both_sp_keys ) { - pre_synaptic_element_name_ = getValue< std::string >( syn_specs[ 0 ], names::pre_synaptic_element ); - post_synaptic_element_name_ = getValue< std::string >( syn_specs[ 0 ], names::post_synaptic_element ); + pre_synaptic_element_name_ = syn_specs[ 0 ].get< std::string >( names::pre_synaptic_element.toString() ); + post_synaptic_element_name_ = syn_specs[ 0 ].get< std::string >( names::post_synaptic_element.toString() ); use_pre_synaptic_element_ = true; use_post_synaptic_element_ = true; @@ -593,8 +596,8 @@ nest::ConnBuilder::reset_delays_() nest::OneToOneBuilder::OneToOneBuilder( const NodeCollectionPTR sources, const NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) { // make sure that target and source population have the same size @@ -1079,8 +1082,8 @@ nest::AllToAllBuilder::sp_disconnect_() nest::FixedInDegreeBuilder::FixedInDegreeBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) { // check for potential errors @@ -1089,16 +1092,16 @@ nest::FixedInDegreeBuilder::FixedInDegreeBuilder( NodeCollectionPTR sources, { throw BadProperty( "Source array must not be empty." ); } - ParameterDatum* pd = dynamic_cast< ParameterDatum* >( ( *conn_spec )[ names::indegree ].datum() ); - if ( pd ) + auto indegree = conn_spec.at( names::indegree.toString() ); + if ( is_parameter( indegree ) ) { - indegree_ = *pd; // TODO: Checks of parameter range + indegree_ = boost::any_cast< Parameter* >( indegree ); } else { // Assume indegree is a scalar - const long value = ( *conn_spec )[ names::indegree ]; + const long value = conn_spec.get< long >( names::indegree.toString() ); indegree_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) ); // verify that indegree is not larger than source population if multapses are disabled @@ -1243,8 +1246,8 @@ nest::FixedInDegreeBuilder::inner_connect_( const int tid, nest::FixedOutDegreeBuilder::FixedOutDegreeBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) { // check for potential errors @@ -1253,17 +1256,16 @@ nest::FixedOutDegreeBuilder::FixedOutDegreeBuilder( NodeCollectionPTR sources, { throw BadProperty( "Target array must not be empty." ); } - ParameterDatum* pd = dynamic_cast< ParameterDatum* >( ( *conn_spec )[ names::outdegree ].datum() ); - if ( pd ) + auto outdegree = conn_spec.at( names::outdegree.toString() ); + if ( is_parameter( outdegree ) ) { - outdegree_ = *pd; // TODO: Checks of parameter range + outdegree_ = boost::any_cast< Parameter* >( outdegree ); } else { // Assume outdegree is a scalar - const long value = ( *conn_spec )[ names::outdegree ]; - + const long value = conn_spec.get< long >( names::outdegree.toString() ); outdegree_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) ); // verify that outdegree is not larger than target population if multapses @@ -1373,10 +1375,10 @@ nest::FixedOutDegreeBuilder::connect_() nest::FixedTotalNumberBuilder::FixedTotalNumberBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) - , N_( ( *conn_spec )[ names::N ] ) + , N_( boost::any_cast< long >( conn_spec.at( names::N.toString() ) ) ) { // check for potential errors @@ -1543,20 +1545,20 @@ nest::FixedTotalNumberBuilder::connect_() nest::BernoulliBuilder::BernoulliBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) { - ParameterDatum* pd = dynamic_cast< ParameterDatum* >( ( *conn_spec )[ names::p ].datum() ); - if ( pd ) + auto p = conn_spec.at( names::p.toString() ); + if ( is_parameter( p ) ) { - p_ = *pd; + p_ = boost::any_cast< Parameter* >( p ); // TODO: Checks of parameter range } else { // Assume p is a scalar - const double value = ( *conn_spec )[ names::p ]; + const double value = conn_spec.get< double >( names::p.toString() ); if ( value < 0 or 1 < value ) { throw BadProperty( "Connection probability 0 <= p <= 1 required." ); @@ -1658,10 +1660,10 @@ nest::BernoulliBuilder::inner_connect_( const int tid, RngPtr rng, Node* target, nest::SymmetricBernoulliBuilder::SymmetricBernoulliBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) - , p_( ( *conn_spec )[ names::p ] ) + , p_( boost::any_cast< double >( conn_spec.at( names::p.toString() ) ) ) { // This connector takes care of symmetric connections on its own creates_symmetric_connections_ = true; @@ -1794,8 +1796,8 @@ nest::SymmetricBernoulliBuilder::connect_() */ nest::SPBuilder::SPBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_spec ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_spec ) : ConnBuilder( sources, targets, conn_spec, syn_spec ) { // Check that both pre and postsynaptic element are provided @@ -1810,8 +1812,8 @@ nest::SPBuilder::update_delay( delay& d ) const { if ( get_default_delay() ) { - DictionaryDatum syn_defaults = kernel().model_manager.get_connector_defaults( get_synapse_model() ); - const double delay = getValue< double >( syn_defaults, "delay" ); + dictionary syn_defaults = kernel().model_manager.get_connector_defaults( get_synapse_model() ); + const double delay = syn_defaults.get< double >( "delay" ); d = Time( Time::ms( delay ) ).get_steps(); } } diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h index 012e93e3a1..527a7b36fe 100644 --- a/nestkernel/conn_builder.h +++ b/nestkernel/conn_builder.h @@ -77,7 +77,7 @@ class ConnBuilder virtual void disconnect(); //! parameters: sources, targets, specifications - ConnBuilder( NodeCollectionPTR, NodeCollectionPTR, const DictionaryDatum&, const std::vector< DictionaryDatum >& ); + ConnBuilder( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const std::vector< dictionary >& ); virtual ~ConnBuilder(); index @@ -209,7 +209,7 @@ class ConnBuilder std::vector< index > synapse_model_id_; //! dictionaries to pass to connect function, one per thread for every syn_spec - std::vector< std::vector< DictionaryDatum > > param_dicts_; + std::vector< std::vector< dictionary > > param_dicts_; private: typedef std::map< Name, ConnParameter* > ConnParameterMap; @@ -245,10 +245,10 @@ class ConnBuilder /* * Set synapse specific parameters. */ - void set_synapse_model_( DictionaryDatum syn_params, size_t indx ); - void set_default_weight_or_delay_( DictionaryDatum syn_params, size_t indx ); - void set_synapse_params( DictionaryDatum syn_defaults, DictionaryDatum syn_params, size_t indx ); - void set_structural_plasticity_parameters( std::vector< DictionaryDatum > syn_specs ); + void set_synapse_model_( dictionary syn_params, size_t indx ); + void set_default_weight_or_delay_( dictionary syn_params, size_t indx ); + void set_synapse_params( dictionary syn_defaults, dictionary syn_params, size_t indx ); + void set_structural_plasticity_parameters( std::vector< dictionary > syn_specs ); /** * Reset weight and delay pointers @@ -262,8 +262,8 @@ class OneToOneBuilder : public ConnBuilder public: OneToOneBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ); + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ); bool supports_symmetric() const @@ -289,8 +289,8 @@ class AllToAllBuilder : public ConnBuilder public: AllToAllBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) { } @@ -321,10 +321,7 @@ class AllToAllBuilder : public ConnBuilder class FixedInDegreeBuilder : public ConnBuilder { public: - FixedInDegreeBuilder( NodeCollectionPTR, - NodeCollectionPTR, - const DictionaryDatum&, - const std::vector< DictionaryDatum >& ); + FixedInDegreeBuilder( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const std::vector< dictionary >& ); protected: void connect_(); @@ -337,10 +334,7 @@ class FixedInDegreeBuilder : public ConnBuilder class FixedOutDegreeBuilder : public ConnBuilder { public: - FixedOutDegreeBuilder( NodeCollectionPTR, - NodeCollectionPTR, - const DictionaryDatum&, - const std::vector< DictionaryDatum >& ); + FixedOutDegreeBuilder( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const std::vector< dictionary >& ); protected: void connect_(); @@ -352,10 +346,7 @@ class FixedOutDegreeBuilder : public ConnBuilder class FixedTotalNumberBuilder : public ConnBuilder { public: - FixedTotalNumberBuilder( NodeCollectionPTR, - NodeCollectionPTR, - const DictionaryDatum&, - const std::vector< DictionaryDatum >& ); + FixedTotalNumberBuilder( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const std::vector< dictionary >& ); protected: void connect_(); @@ -367,10 +358,7 @@ class FixedTotalNumberBuilder : public ConnBuilder class BernoulliBuilder : public ConnBuilder { public: - BernoulliBuilder( NodeCollectionPTR, - NodeCollectionPTR, - const DictionaryDatum&, - const std::vector< DictionaryDatum >& ); + BernoulliBuilder( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const std::vector< dictionary >& ); protected: void connect_(); @@ -385,8 +373,8 @@ class SymmetricBernoulliBuilder : public ConnBuilder public: SymmetricBernoulliBuilder( NodeCollectionPTR, NodeCollectionPTR, - const DictionaryDatum&, - const std::vector< DictionaryDatum >& ); + const dictionary&, + const std::vector< dictionary >& ); bool supports_symmetric() const @@ -406,8 +394,8 @@ class SPBuilder : public ConnBuilder public: SPBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_spec ); + const dictionary& conn_spec, + const std::vector< dictionary >& syn_spec ); std::string get_pre_synaptic_element_name() const diff --git a/nestkernel/conn_builder_factory.h b/nestkernel/conn_builder_factory.h index 040f3621bc..de2c97b0b3 100644 --- a/nestkernel/conn_builder_factory.h +++ b/nestkernel/conn_builder_factory.h @@ -49,10 +49,8 @@ class GenericConnBuilderFactory virtual ~GenericConnBuilderFactory() { } - virtual ConnBuilder* create( NodeCollectionPTR, - NodeCollectionPTR, - const DictionaryDatum&, - const std::vector< DictionaryDatum >& ) const = 0; + virtual ConnBuilder* + create( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const std::vector< dictionary >& ) const = 0; }; /** @@ -68,8 +66,8 @@ class ConnBuilderFactory : public GenericConnBuilderFactory ConnBuilder* create( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) const + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) const { return new ConnBuilderType( sources, targets, conn_spec, syn_specs ); } diff --git a/nestkernel/conn_parameter.cpp b/nestkernel/conn_parameter.cpp index 4f632be3b9..32ab27c63d 100644 --- a/nestkernel/conn_parameter.cpp +++ b/nestkernel/conn_parameter.cpp @@ -22,6 +22,8 @@ #include "conn_parameter.h" +#include + // Includes from nestkernel: #include "nest_names.h" #include "kernel_manager.h" @@ -33,49 +35,44 @@ #include "tokenutils.h" nest::ConnParameter* -nest::ConnParameter::create( const Token& t, const size_t nthreads ) +nest::ConnParameter::create( const boost::any& value, const size_t nthreads ) { // single double - DoubleDatum* dd = dynamic_cast< DoubleDatum* >( t.datum() ); - if ( dd ) + if ( is_double( value ) ) { - return new ScalarDoubleParameter( *dd, nthreads ); + return new ScalarDoubleParameter( boost::any_cast< double >( value ), nthreads ); } // single integer - IntegerDatum* id = dynamic_cast< IntegerDatum* >( t.datum() ); - if ( id ) + if ( is_int( value ) ) { - return new ScalarIntegerParameter( *id, nthreads ); + return new ScalarIntegerParameter( boost::any_cast< int >( value ), nthreads ); } // array of doubles - DoubleVectorDatum* dvd = dynamic_cast< DoubleVectorDatum* >( t.datum() ); - if ( dvd ) + if ( is_double_vector( value ) ) { - return new ArrayDoubleParameter( **dvd, nthreads ); + return new ArrayDoubleParameter( boost::any_cast< std::vector< double > >( value ), nthreads ); } // Parameter - ParameterDatum* pd = dynamic_cast< ParameterDatum* >( t.datum() ); - if ( pd ) + if ( is_parameter( value ) ) { - return new ParameterConnParameterWrapper( *pd, nthreads ); + return new ParameterConnParameterWrapper( boost::any_cast< Parameter* >( value ), nthreads ); } // array of integer - IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( t.datum() ); - if ( ivd ) + if ( is_int_vector( value ) ) { - return new ArrayIntegerParameter( **ivd, nthreads ); + return new ArrayIntegerParameter( boost::any_cast< std::vector< int > >( value ), nthreads ); } - throw BadProperty( std::string( "Cannot handle parameter type. Received " ) + t.datum()->gettypename().toString() ); + throw BadProperty( std::string( "Cannot handle parameter type. Received " ) + value.type().name() ); } -nest::ParameterConnParameterWrapper::ParameterConnParameterWrapper( const ParameterDatum& pd, const size_t ) - : parameter_( pd.get() ) +nest::ParameterConnParameterWrapper::ParameterConnParameterWrapper( Parameter* p, const size_t ) + : parameter_( p ) { } diff --git a/nestkernel/conn_parameter.h b/nestkernel/conn_parameter.h index e41940617f..de68f8d435 100644 --- a/nestkernel/conn_parameter.h +++ b/nestkernel/conn_parameter.h @@ -27,6 +27,8 @@ #include #include +#include + // Includes from nestkernel: #include "exceptions.h" #include "parameter.h" @@ -115,7 +117,7 @@ class ConnParameter * @param nthread number of threads * required to fix number pointers to the iterator (one for each thread) */ - static ConnParameter* create( const Token&, const size_t ); + static ConnParameter* create( const boost::any&, const size_t ); }; @@ -318,7 +320,7 @@ class ArrayDoubleParameter : public ConnParameter class ArrayIntegerParameter : public ConnParameter { public: - ArrayIntegerParameter( const std::vector< long >& values, const size_t nthreads ) + ArrayIntegerParameter( const std::vector< int >& values, const size_t nthreads ) : values_( &values ) , next_( nthreads, values_->begin() ) { @@ -384,21 +386,21 @@ class ArrayIntegerParameter : public ConnParameter void reset() const { - for ( std::vector< std::vector< long >::const_iterator >::iterator it = next_.begin(); it != next_.end(); ++it ) + for ( std::vector< std::vector< int >::const_iterator >::iterator it = next_.begin(); it != next_.end(); ++it ) { *it = values_->begin(); } } private: - const std::vector< long >* values_; - mutable std::vector< std::vector< long >::const_iterator > next_; + const std::vector< int >* values_; + mutable std::vector< std::vector< int >::const_iterator > next_; }; class ParameterConnParameterWrapper : public ConnParameter { public: - ParameterConnParameterWrapper( const ParameterDatum&, const size_t ); + ParameterConnParameterWrapper( Parameter*, const size_t ); double value_double( thread target_thread, RngPtr rng, index snode_id, Node* target ) const; diff --git a/nestkernel/connection.h b/nestkernel/connection.h index 2dd44593eb..4500eee3cd 100644 --- a/nestkernel/connection.h +++ b/nestkernel/connection.h @@ -79,11 +79,11 @@ class ConnTestDummyNodeBase : public Node { } void - set_status( const DictionaryDatum& ) + set_status( const dictionary& ) { } void - get_status( DictionaryDatum& ) const + get_status( dictionary& ) const { } void @@ -131,7 +131,7 @@ class Connection /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. @@ -139,7 +139,7 @@ class Connection * @note Target and Rport cannot be changed after a connection has been * created. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); /** * Check syn_spec dictionary for parameters that are not allowed with the @@ -151,7 +151,7 @@ class Connection * @note Classes requiring checks need to override the function with their own * implementation, as this base class implementation does not do anything. */ - void check_synapse_params( const DictionaryDatum& d ) const; + void check_synapse_params( const dictionary& d ) const; /** * Calibrate the delay of this connection to the desired resolution. @@ -344,18 +344,18 @@ Connection< targetidentifierT >::check_connection_( Node& dummy_target, template < typename targetidentifierT > inline void -Connection< targetidentifierT >::get_status( DictionaryDatum& d ) const +Connection< targetidentifierT >::get_status( dictionary& d ) const { - def< double >( d, names::delay, syn_id_delay_.get_delay_ms() ); + d[ names::delay.toString() ] = syn_id_delay_.get_delay_ms(); target_.get_status( d ); } template < typename targetidentifierT > inline void -Connection< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& ) +Connection< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& ) { double delay; - if ( updateValue< double >( d, names::delay, delay ) ) + if ( d.update_value( names::delay.toString(), delay ) ) { kernel().connection_manager.get_delay_checker().assert_valid_delay_ms( delay ); syn_id_delay_.set_delay_ms( delay ); @@ -365,7 +365,7 @@ Connection< targetidentifierT >::set_status( const DictionaryDatum& d, Connector template < typename targetidentifierT > inline void -Connection< targetidentifierT >::check_synapse_params( const DictionaryDatum& ) const +Connection< targetidentifierT >::check_synapse_params( const dictionary& ) const { } diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp index 5d63a884ca..d3b5628e4d 100644 --- a/nestkernel/connection_creator.cpp +++ b/nestkernel/connection_creator.cpp @@ -26,7 +26,7 @@ namespace nest { -ConnectionCreator::ConnectionCreator( DictionaryDatum dict ) +ConnectionCreator::ConnectionCreator( dictionary dict ) : allow_autapses_( true ) , allow_multapses_( true ) , allow_oversized_( false ) @@ -40,13 +40,13 @@ ConnectionCreator::ConnectionCreator( DictionaryDatum dict ) Name connection_type; long number_of_connections( -1 ); // overwritten by dict entry - updateValue< std::string >( dict, names::connection_type, connection_type ); - updateValue< bool >( dict, names::allow_autapses, allow_autapses_ ); - updateValue< bool >( dict, names::allow_multapses, allow_multapses_ ); - updateValue< bool >( dict, names::allow_oversized_mask, allow_oversized_ ); + dict.update_value( names::connection_type.toString(), connection_type ); + dict.update_value( names::allow_autapses.toString(), allow_autapses_ ); + dict.update_value( names::allow_multapses.toString(), allow_multapses_ ); + dict.update_value( names::allow_oversized_mask.toString(), allow_oversized_ ); // Need to store number of connections in a temporary variable to be able to detect negative values. - if ( updateValue< long >( dict, names::number_of_connections, number_of_connections ) ) + if ( dict.update_value( names::number_of_connections.toString(), number_of_connections ) ) { if ( number_of_connections < 0 ) { @@ -55,61 +55,65 @@ ConnectionCreator::ConnectionCreator( DictionaryDatum dict ) // We are sure that number of connections isn't negative, so it is safe to store it in a size_t. number_of_connections_ = number_of_connections; } - if ( dict->known( names::mask ) ) - { - mask_ = NestModule::create_mask( ( *dict )[ names::mask ] ); - } - if ( dict->known( names::kernel ) ) - { - kernel_ = NestModule::create_parameter( ( *dict )[ names::kernel ] ); - } - if ( dict->known( names::synapse_parameters ) ) - { - // If synapse_parameters exists, we have collocated synapses. - ArrayDatum* syn_params_dvd = dynamic_cast< ArrayDatum* >( ( *dict )[ names::synapse_parameters ].datum() ); - if ( not syn_params_dvd ) - { - throw BadProperty( "synapse_parameters must be list of dictionaries" ); - } - - param_dicts_.resize( syn_params_dvd->size() ); - auto param_dict = param_dicts_.begin(); - for ( auto synapse_datum = syn_params_dvd->begin(); synapse_datum < syn_params_dvd->end(); - ++synapse_datum, ++param_dict ) - { - auto syn_param = dynamic_cast< DictionaryDatum* >( synapse_datum->datum() ); - extract_params_( *syn_param, *param_dict ); - } - } - else - { - // If not, we have single synapses. - param_dicts_.resize( 1 ); - param_dicts_[ 0 ].resize( kernel().vp_manager.get_num_threads() ); - extract_params_( dict, param_dicts_[ 0 ] ); - } - - ALL_ENTRIES_ACCESSED( *dict, "ConnectionCreator", "Unread dictionary entries: " ); + // TODO-PYNEST-NG: implement mask with dictionary + // if ( dict.known( names::mask.toString() ) ) + // { + // mask_ = NestModule::create_mask( ( *dict )[ names::mask.toString() ] ); + // } + if ( dict.known( names::kernel.toString() ) ) + { + kernel_ = create_parameter( dict[ names::kernel.toString() ] ); + } + // TODO-PYNEST-NG: collocated synapses + // if ( dict.known( names::synapse_parameters.toString() ) ) + // { + // // If synapse_parameters exists, we have collocated synapses. + // ArrayDatum* syn_params_dvd = + // dynamic_cast< ArrayDatum* >( ( *dict )[ names::synapse_parameters.toString() ].datum() ); + // if ( not syn_params_dvd ) + // { + // throw BadProperty( "synapse_parameters must be list of dictionaries" ); + // } + + // param_dicts_.resize( syn_params_dvd->size() ); + // auto param_dict = param_dicts_.begin(); + // for ( auto synapse_datum = syn_params_dvd->begin(); synapse_datum < syn_params_dvd->end(); + // ++synapse_datum, ++param_dict ) + // { + // auto syn_param = dynamic_cast< dictionary* >( synapse_datum->datum() ); + // extract_params_( *syn_param, *param_dict ); + // } + // } + // else + // { + // If not, we have single synapses. + param_dicts_.resize( 1 ); + param_dicts_[ 0 ].resize( kernel().vp_manager.get_num_threads() ); + extract_params_( dict, param_dicts_[ 0 ] ); + // } + + // TODO-PYNEST-NG: access flags + // ALL_ENTRIES_ACCESSED( *dict, "ConnectionCreator", "Unread dictionary entries: " ); // Set default synapse_model, weight and delay if not given explicitly if ( synapse_model_.empty() ) { - synapse_model_ = { kernel().model_manager.get_synapsedict()->lookup( "static_synapse" ) }; + synapse_model_ = { kernel().model_manager.get_synapsedict().get< synindex >( "static_synapse" ) }; } - DictionaryDatum syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_[ 0 ] ); + dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_[ 0 ] ); if ( weight_.empty() ) { - weight_ = { NestModule::create_parameter( ( *syn_defaults )[ names::weight ] ) }; + weight_ = { create_parameter( syn_defaults[ names::weight.toString() ] ) }; } if ( delay_.empty() ) { - if ( not getValue< bool >( ( *syn_defaults )[ names::has_delay ] ) ) + if ( not syn_defaults.get< bool >( names::has_delay.toString() ) ) { - delay_ = { NestModule::create_parameter( numerics::nan ) }; + delay_ = { create_parameter( numerics::nan ) }; } else { - delay_ = { NestModule::create_parameter( ( *syn_defaults )[ names::delay ] ) }; + delay_ = { create_parameter( syn_defaults[ names::delay.toString() ] ) }; } } @@ -144,59 +148,59 @@ ConnectionCreator::ConnectionCreator( DictionaryDatum dict ) } void -ConnectionCreator::extract_params_( const DictionaryDatum& dict_datum, std::vector< DictionaryDatum >& params ) +ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< dictionary >& params ) { - if ( not dict_datum->known( names::synapse_model ) ) + if ( not dict_datum.known( names::synapse_model.toString() ) ) { - dict_datum->insert( names::synapse_model, "static_synapse" ); + dict_datum[ names::synapse_model.toString() ] = "static_synapse"; } - std::string syn_name = ( *dict_datum )[ names::synapse_model ]; + const std::string syn_name = dict_datum.get< std::string >( names::synapse_model.toString() ); - if ( not kernel().model_manager.get_synapsedict()->known( syn_name ) ) + if ( not kernel().model_manager.get_synapsedict().known( syn_name ) ) { throw UnknownSynapseType( syn_name ); } - index synapse_model_id = kernel().model_manager.get_synapsedict()->lookup( syn_name ); + index synapse_model_id = kernel().model_manager.get_synapsedict().get< synindex >( syn_name ); synapse_model_.push_back( synapse_model_id ); - DictionaryDatum syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id ); - if ( dict_datum->known( names::weight ) ) + dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id ); + if ( dict_datum.known( names::weight.toString() ) ) { - weight_.push_back( NestModule::create_parameter( ( *dict_datum )[ names::weight ] ) ); + weight_.push_back( create_parameter( dict_datum[ names::weight.toString() ] ) ); } else { - weight_.push_back( NestModule::create_parameter( ( *syn_defaults )[ names::weight ] ) ); + weight_.push_back( create_parameter( syn_defaults[ names::weight.toString() ] ) ); } - if ( dict_datum->known( names::delay ) ) + if ( dict_datum.known( names::delay.toString() ) ) { - delay_.push_back( NestModule::create_parameter( ( *dict_datum )[ names::delay ] ) ); + delay_.push_back( create_parameter( dict_datum[ names::delay.toString() ] ) ); } else { - if ( not getValue< bool >( ( *syn_defaults )[ names::has_delay ] ) ) + if ( not syn_defaults.get< bool >( names::has_delay.toString() ) ) { - delay_.push_back( NestModule::create_parameter( numerics::nan ) ); + delay_.push_back( create_parameter( numerics::nan ) ); } else { - delay_.push_back( NestModule::create_parameter( ( *syn_defaults )[ names::delay ] ) ); + delay_.push_back( create_parameter( syn_defaults[ names::delay.toString() ] ) ); } } - DictionaryDatum syn_dict = new Dictionary(); + dictionary syn_dict; // Using a lambda function here instead of updateValue because updateValue causes // problems when setting a value to a dictionary-entry in syn_dict. - auto copy_long_if_known = [&syn_dict, &dict_datum]( const Name& name ) -> void + auto copy_long_if_known = [&syn_dict, &dict_datum]( const std::string& name ) -> void { - if ( dict_datum->known( name ) ) + if ( dict_datum.known( name ) ) { - ( *syn_dict )[ name ] = getValue< long >( dict_datum, name ); + syn_dict[ name ] = dict_datum.get< long >( name ); } }; - copy_long_if_known( names::synapse_label ); - copy_long_if_known( names::receptor_type ); + copy_long_if_known( names::synapse_label.toString() ); + copy_long_if_known( names::receptor_type.toString() ); params.resize( kernel().vp_manager.get_num_threads() ); #pragma omp parallel diff --git a/nestkernel/connection_creator.h b/nestkernel/connection_creator.h index b58d1899f0..a99b782a7d 100644 --- a/nestkernel/connection_creator.h +++ b/nestkernel/connection_creator.h @@ -91,7 +91,7 @@ class ConnectionCreator * be defined by a dictionary, parametertype, or double. * @param dict dictionary containing properties for the connections. */ - ConnectionCreator( DictionaryDatum dict ); + ConnectionCreator( dictionary dict ); /** * Connect two layers. @@ -130,7 +130,7 @@ class ConnectionCreator std::vector< std::pair< Position< D >, index > >* positions_; }; - void extract_params_( const DictionaryDatum&, std::vector< DictionaryDatum >& ); + void extract_params_( dictionary&, std::vector< dictionary >& ); template < typename Iterator, int D > void connect_to_target_( Iterator from, @@ -168,7 +168,7 @@ class ConnectionCreator std::shared_ptr< AbstractMask > mask_; std::shared_ptr< Parameter > kernel_; std::vector< index > synapse_model_; - std::vector< std::vector< DictionaryDatum > > param_dicts_; + std::vector< std::vector< dictionary > > param_dicts_; std::vector< std::shared_ptr< Parameter > > weight_; std::vector< std::shared_ptr< Parameter > > delay_; }; diff --git a/nestkernel/connection_label.h b/nestkernel/connection_label.h index 096959e5a2..2dee50643a 100644 --- a/nestkernel/connection_label.h +++ b/nestkernel/connection_label.h @@ -59,7 +59,7 @@ class ConnectionLabel : public ConnectionT /** * Get all properties of this connection and put them into a dictionary. */ - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; /** * Set properties of this connection from the values given in dictionary. @@ -67,7 +67,7 @@ class ConnectionLabel : public ConnectionT * @note Target and Rport cannot be changed after a connection has been * created. */ - void set_status( const DictionaryDatum& d, ConnectorModel& cm ); + void set_status( const dictionary& d, ConnectorModel& cm ); long get_label() const; @@ -84,22 +84,22 @@ ConnectionLabel< ConnectionT >::ConnectionLabel() template < typename ConnectionT > void -ConnectionLabel< ConnectionT >::get_status( DictionaryDatum& d ) const +ConnectionLabel< ConnectionT >::get_status( dictionary& d ) const { ConnectionT::get_status( d ); - def< long >( d, names::synapse_label, label_ ); + d[ names::synapse_label.toString() ] = label_; // override names::size_of from ConnectionT, // as the size from ConnectionLabel< ConnectionT > is // one long larger - def< long >( d, names::size_of, sizeof( *this ) ); + d[ names::size_of.toString() ] = sizeof( *this ); } template < typename ConnectionT > void -ConnectionLabel< ConnectionT >::set_status( const DictionaryDatum& d, ConnectorModel& cm ) +ConnectionLabel< ConnectionT >::set_status( const dictionary& d, ConnectorModel& cm ) { long lbl; - if ( updateValue< long >( d, names::synapse_label, lbl ) ) + if ( d.update_value( names::synapse_label.toString(), lbl ) ) { if ( lbl >= 0 ) { diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 044947132d..dde5e8875c 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -140,14 +140,14 @@ nest::ConnectionManager::finalize() } void -nest::ConnectionManager::set_status( const DictionaryDatum& d ) +nest::ConnectionManager::set_status( const dictionary& d ) { for ( size_t i = 0; i < delay_checkers_.size(); ++i ) { delay_checkers_[ i ].set_status( d ); } - updateValue< bool >( d, names::keep_source_table, keep_source_table_ ); + d.update_value( names::keep_source_table.toString(), keep_source_table_ ); if ( not keep_source_table_ and kernel().sp_manager.is_structural_plasticity_enabled() ) { throw KernelException( @@ -155,7 +155,7 @@ nest::ConnectionManager::set_status( const DictionaryDatum& d ) "to false." ); } - updateValue< bool >( d, names::sort_connections_by_source, sort_connections_by_source_ ); + d.update_value( names::sort_connections_by_source.toString(), sort_connections_by_source_ ); if ( not sort_connections_by_source_ and kernel().sp_manager.is_structural_plasticity_enabled() ) { throw KernelException( @@ -163,14 +163,14 @@ nest::ConnectionManager::set_status( const DictionaryDatum& d ) "be set to false." ); } - updateValue< bool >( d, names::use_compressed_spikes, use_compressed_spikes_ ); + d.update_value( names::use_compressed_spikes.toString(), use_compressed_spikes_ ); if ( use_compressed_spikes_ and not sort_connections_by_source_ ) { throw KernelException( "Spike compression requires sort_connections_by_source to be true." ); } // Need to update the saved values if we have changed the delay bounds. - if ( d->known( names::min_delay ) or d->known( names::max_delay ) ) + if ( d.known( names::min_delay.toString() ) or d.known( names::max_delay.toString() ) ) { update_delay_extrema_(); } @@ -198,7 +198,7 @@ nest::ConnectionManager::get_status( dictionary& dict ) dict[ names::time_construction_connect.toString() ] = sw_construction_connect.elapsed(); } -DictionaryDatum +dictionary nest::ConnectionManager::get_synapse_status( const index source_node_id, const index target_node_id, const thread tid, @@ -207,12 +207,12 @@ nest::ConnectionManager::get_synapse_status( const index source_node_id, { kernel().model_manager.assert_valid_syn_id( syn_id ); - DictionaryDatum dict( new Dictionary ); - ( *dict )[ names::source ] = source_node_id; - ( *dict )[ names::synapse_model ] = LiteralDatum( kernel().model_manager.get_synapse_prototype( syn_id ).get_name() ); - ( *dict )[ names::target_thread ] = tid; - ( *dict )[ names::synapse_id ] = syn_id; - ( *dict )[ names::port ] = lcid; + dictionary dict; + dict[ names::source.toString() ] = source_node_id; + dict[ names::synapse_model.toString() ] = kernel().model_manager.get_synapse_prototype( syn_id ).get_name(); + dict[ names::target_thread.toString() ] = tid; + dict[ names::synapse_id.toString() ] = syn_id; + dict[ names::port.toString() ] = lcid; const Node* source = kernel().node_manager.get_node_or_proxy( source_node_id, tid ); const Node* target = kernel().node_manager.get_node_or_proxy( target_node_id, tid ); @@ -248,7 +248,7 @@ nest::ConnectionManager::set_synapse_status( const index source_node_id, const thread tid, const synindex syn_id, const index lcid, - const DictionaryDatum& dict ) + const dictionary& dict ) { kernel().model_manager.assert_valid_syn_id( syn_id ); @@ -352,8 +352,8 @@ nest::ConnBuilder* nest::ConnectionManager::get_conn_builder( const std::string& name, NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) { const size_t rule_id = connruledict_->lookup( name ); return connbuilder_factories_.at( rule_id )->create( sources, targets, conn_spec, syn_specs ); @@ -371,8 +371,8 @@ nest::ConnectionManager::calibrate( const TimeConverter& tc ) void nest::ConnectionManager::connect( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) { if ( sources->empty() ) { @@ -383,18 +383,20 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources, throw IllegalConnection( "Postsynaptic nodes cannot be an empty NodeCollection" ); } - conn_spec->clear_access_flags(); + // TODO-PYNEST-NG: Access flags - for ( auto syn_params : syn_specs ) - { - syn_params->clear_access_flags(); - } + // conn_spec->clear_access_flags(); + + // for ( auto syn_params : syn_specs ) + // { + // syn_params->clear_access_flags(); + // } - if ( not conn_spec->known( names::rule ) ) + if ( not conn_spec.known( names::rule.toString() ) ) { throw BadProperty( "Connectivity spec must contain connectivity rule." ); } - const Name rule_name = static_cast< const std::string >( ( *conn_spec )[ names::rule ] ); + const Name rule_name = conn_spec.get< std::string >( names::rule.toString() ); if ( not connruledict_->known( rule_name ) ) { @@ -407,11 +409,11 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources, assert( cb != 0 ); // at this point, all entries in conn_spec and syn_spec have been checked - ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries in conn_spec: " ); - for ( auto syn_params : syn_specs ) - { - ALL_ENTRIES_ACCESSED( *syn_params, "Connect", "Unread dictionary entries in syn_spec: " ); - } + // ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries in conn_spec: " ); + // for ( auto syn_params : syn_specs ) + // { + // ALL_ENTRIES_ACCESSED( *syn_params, "Connect", "Unread dictionary entries in syn_spec: " ); + // } // Set flag before calling cb->connect() in case exception is thrown after some connections have been created. set_connections_have_changed(); @@ -421,18 +423,18 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources, } void -nest::ConnectionManager::connect( TokenArray sources, TokenArray targets, const DictionaryDatum& syn_spec ) +nest::ConnectionManager::connect( TokenArray sources, TokenArray targets, const dictionary& syn_spec ) { // Get synapse id size_t syn_id = 0; - auto synmodel = syn_spec->lookup( names::model ); - if ( not synmodel.empty() ) + if ( syn_spec.known( names::model.toString() ) ) { - std::string synmodel_name = getValue< std::string >( synmodel ); - synmodel = kernel().model_manager.get_synapsedict()->lookup( synmodel_name ); - if ( not synmodel.empty() ) + std::string synmodel_name = syn_spec.get< std::string >( names::model.toString() ); + const auto& syndict = kernel().model_manager.get_synapsedict(); + + if ( syndict.known( synmodel_name ) ) { - syn_id = static_cast< size_t >( synmodel ); + syn_id = static_cast< size_t >( syndict.get< synindex >( synmodel_name ) ); } else { @@ -491,7 +493,7 @@ nest::ConnectionManager::connect( const index snode_id, Node* target, thread target_thread, const synindex syn_id, - const DictionaryDatum& params, + const dictionary& params, const double delay, const double weight ) { @@ -521,7 +523,7 @@ nest::ConnectionManager::connect( const index snode_id, bool nest::ConnectionManager::connect( const index snode_id, const index tnode_id, - const DictionaryDatum& params, + const dictionary& params, const synindex syn_id ) { kernel().model_manager.assert_valid_syn_id( syn_id ); @@ -586,25 +588,25 @@ nest::ConnectionManager::connect_arrays( long* sources, } // Dictionary holding additional synapse parameters, passed to the connect call. - std::vector< DictionaryDatum > param_dicts; + std::vector< dictionary > param_dicts; param_dicts.reserve( kernel().vp_manager.get_num_threads() ); for ( thread i = 0; i < kernel().vp_manager.get_num_threads(); ++i ) { - param_dicts.emplace_back( new Dictionary ); + param_dicts.emplace_back(); for ( auto& param_keys : p_keys ) { if ( Name( param_keys ) == names::receptor_type ) { - ( *param_dicts[ i ] )[ param_keys ] = Token( new IntegerDatum( 0 ) ); + param_dicts[ i ][ param_keys ] = 0; } else { - ( *param_dicts[ i ] )[ param_keys ] = Token( new DoubleDatum( 0.0 ) ); + param_dicts[ i ][ param_keys ] = 0.0; } } } - index synapse_model_id( kernel().model_manager.get_synapsedict()->lookup( syn_model ) ); + index synapse_model_id( kernel().model_manager.get_synapsedict().get< synindex >( syn_model ) ); // Increments pointers to weight and delay, if they are specified. auto increment_wd = [weights, delays]( decltype( weights ) & w, decltype( delays ) & d ) @@ -682,20 +684,18 @@ nest::ConnectionManager::connect_arrays( long* sources, throw BadParameter( "Receptor types must be integers." ); } - // Change value of dictionary entry without allocating new datum. - auto id = static_cast< IntegerDatum* >( ( ( *param_dicts[ tid ] )[ param_pointer_pair.first ] ).datum() ); - ( *id ) = rtype_as_long; + param_dicts[ tid ][ param_pointer_pair.first.toString() ] = rtype_as_long; } else { - auto dd = static_cast< DoubleDatum* >( ( ( *param_dicts[ tid ] )[ param_pointer_pair.first ] ).datum() ); - ( *dd ) = *param; + param_dicts[ tid ][ param_pointer_pair.first.toString() ] = *param; } } connect( *s, target_node, tid, synapse_model_id, param_dicts[ tid ], delay_buffer, weight_buffer ); - ALL_ENTRIES_ACCESSED( *param_dicts[ tid ], "connect_arrays", "Unread dictionary entries: " ); + // TODO-PYNEST-NG: Access flags + // ALL_ENTRIES_ACCESSED( *param_dicts[ tid ], "connect_arrays", "Unread dictionary entries: " ); increment_wd( w, d ); } @@ -724,7 +724,7 @@ nest::ConnectionManager::connect_( Node& s, const index s_node_id, const thread tid, const synindex syn_id, - const DictionaryDatum& params, + const dictionary& params, const double delay, const double weight ) { @@ -775,7 +775,7 @@ nest::ConnectionManager::connect_to_device_( Node& s, const index s_node_id, const thread tid, const synindex syn_id, - const DictionaryDatum& params, + const dictionary& params, const double delay, const double weight ) { @@ -790,7 +790,7 @@ nest::ConnectionManager::connect_from_device_( Node& s, Node& r, const thread tid, const synindex syn_id, - const DictionaryDatum& params, + const dictionary& params, const double delay, const double weight ) { @@ -978,10 +978,11 @@ nest::ConnectionManager::get_connections( const DictionaryDatum& params ) if ( not syn_model_t.empty() ) { Name synmodel_name = getValue< Name >( syn_model_t ); - const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( synmodel_name ); - if ( not synmodel.empty() ) + const auto& syndict = kernel().model_manager.get_synapsedict(); + // const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( synmodel_name ); + if ( syndict.known( synmodel_name.toString() ) ) { - syn_id = static_cast< size_t >( synmodel ); + syn_id = static_cast< size_t >( syndict.get< synindex >( synmodel_name.toString() ) ); } else { diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h index 46f6831c52..0d7834afe6 100644 --- a/nestkernel/connection_manager.h +++ b/nestkernel/connection_manager.h @@ -81,7 +81,7 @@ class ConnectionManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); DictionaryDatum& get_connruledict(); @@ -100,15 +100,15 @@ class ConnectionManager : public ManagerInterface ConnBuilder* get_conn_builder( const std::string& name, NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ); + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ); /** * Create connections. */ - void connect( NodeCollectionPTR, NodeCollectionPTR, const DictionaryDatum&, const std::vector< DictionaryDatum >& ); + void connect( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const std::vector< dictionary >& ); - void connect( TokenArray, TokenArray, const DictionaryDatum& ); + void connect( TokenArray, TokenArray, const dictionary& ); /** * Connect two nodes. The source node is defined by its global ID. @@ -133,7 +133,7 @@ class ConnectionManager : public ManagerInterface Node* target, thread target_thread, const synindex syn_id, - const DictionaryDatum& params, + const dictionary& params, const double delay = numerics::nan, const double weight = numerics::nan ); @@ -147,7 +147,7 @@ class ConnectionManager : public ManagerInterface * \param params Parameter dictionary to configure the synapse. * \param syn_id The synapse model to use. */ - bool connect( const index snode_id, const index target, const DictionaryDatum& params, const synindex syn_id ); + bool connect( const index snode_id, const index target, const dictionary& params, const synindex syn_id ); void connect_arrays( long* sources, long* targets, @@ -172,7 +172,7 @@ class ConnectionManager : public ManagerInterface ConnectionType connection_required( Node*& source, Node*& target, thread tid ); // aka conndatum GetStatus - DictionaryDatum get_synapse_status( const index source_node_id, + dictionary get_synapse_status( const index source_node_id, const index target_node_id, const thread tid, const synindex syn_id, @@ -184,7 +184,7 @@ class ConnectionManager : public ManagerInterface const thread tid, const synindex syn_id, const index lcid, - const DictionaryDatum& dict ); + const dictionary& dict ); /** * Return connections between pairs of neurons. @@ -475,7 +475,7 @@ class ConnectionManager : public ManagerInterface const index s_node_id, const thread tid, const synindex syn_id, - const DictionaryDatum& params, + const dictionary& params, const double delay = numerics::nan, const double weight = numerics::nan ); @@ -502,7 +502,7 @@ class ConnectionManager : public ManagerInterface const index s_node_id, const thread tid, const synindex syn_id, - const DictionaryDatum& params, + const dictionary& params, const double delay = NAN, const double weight = NAN ); @@ -528,7 +528,7 @@ class ConnectionManager : public ManagerInterface Node& target, const thread tid, const synindex syn_id, - const DictionaryDatum& params, + const dictionary& params, const double delay = NAN, const double weight = NAN ); diff --git a/nestkernel/connector_base.h b/nestkernel/connector_base.h index c0d16af661..fc547ed775 100644 --- a/nestkernel/connector_base.h +++ b/nestkernel/connector_base.h @@ -81,13 +81,13 @@ class ConnectorBase * Write status of the connection at position lcid to the dictionary * dict. */ - virtual void get_synapse_status( const thread tid, const index lcid, DictionaryDatum& dict ) const = 0; + virtual void get_synapse_status( const thread tid, const index lcid, dictionary& dict ) const = 0; /** * Set status of the connection at position lcid according to the * dictionary dict. */ - virtual void set_synapse_status( const index lcid, const DictionaryDatum& dict, ConnectorModel& cm ) = 0; + virtual void set_synapse_status( const index lcid, const dictionary& dict, ConnectorModel& cm ) = 0; /** * Add ConnectionID with given source_node_id and lcid to conns. If @@ -243,7 +243,7 @@ class Connector : public ConnectorBase } void - get_synapse_status( const thread tid, const index lcid, DictionaryDatum& dict ) const + get_synapse_status( const thread tid, const index lcid, dictionary& dict ) const { assert( lcid < C_.size() ); @@ -251,11 +251,11 @@ class Connector : public ConnectorBase // get target node ID here, where tid is available // necessary for hpc synapses using TargetIdentifierIndex - def< long >( dict, names::target, C_[ lcid ].get_target( tid )->get_node_id() ); + dict[ names::target.toString() ] = C_[ lcid ].get_target( tid )->get_node_id(); } void - set_synapse_status( const index lcid, const DictionaryDatum& dict, ConnectorModel& cm ) + set_synapse_status( const index lcid, const dictionary& dict, ConnectorModel& cm ) { assert( lcid < C_.size() ); diff --git a/nestkernel/connector_model.h b/nestkernel/connector_model.h index 319c67b285..7a94aeb0b2 100644 --- a/nestkernel/connector_model.h +++ b/nestkernel/connector_model.h @@ -81,7 +81,7 @@ class ConnectorModel Node& tgt, std::vector< ConnectorBase* >& hetconn, const synindex syn_id, - const DictionaryDatum& d, + const dictionary& d, const double delay = NAN, const double weight = NAN ) = 0; @@ -89,15 +89,15 @@ class ConnectorModel virtual void calibrate( const TimeConverter& tc ) = 0; - virtual void get_status( DictionaryDatum& ) const = 0; - virtual void set_status( const DictionaryDatum& ) = 0; + virtual void get_status( dictionary& ) const = 0; + virtual void set_status( const dictionary& ) = 0; virtual const CommonSynapseProperties& get_common_properties() const = 0; /** * Checks to see if illegal parameters are given in syn_spec. */ - virtual void check_synapse_params( const DictionaryDatum& ) const = 0; + virtual void check_synapse_params( const dictionary& ) const = 0; virtual SecondaryEvent* get_event() const = 0; @@ -211,7 +211,7 @@ class GenericConnectorModel : public ConnectorModel Node& tgt, std::vector< ConnectorBase* >& hetconn, const synindex syn_id, - const DictionaryDatum& d, + const dictionary& d, const double delay, const double weight ); @@ -219,11 +219,11 @@ class GenericConnectorModel : public ConnectorModel void calibrate( const TimeConverter& tc ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void - check_synapse_params( const DictionaryDatum& syn_spec ) const + check_synapse_params( const dictionary& syn_spec ) const { default_connection_.check_synapse_params( syn_spec ); } diff --git a/nestkernel/connector_model_impl.h b/nestkernel/connector_model_impl.h index b58ae56f1a..1fdc2fff6c 100644 --- a/nestkernel/connector_model_impl.h +++ b/nestkernel/connector_model_impl.h @@ -84,7 +84,7 @@ GenericConnectorModel< ConnectionT >::calibrate( const TimeConverter& tc ) template < typename ConnectionT > void -GenericConnectorModel< ConnectionT >::get_status( DictionaryDatum& d ) const +GenericConnectorModel< ConnectionT >::get_status( dictionary& d ) const { // first get properties common to all synapses // these are stored only once (not within each Connection) @@ -93,20 +93,20 @@ GenericConnectorModel< ConnectionT >::get_status( DictionaryDatum& d ) const // then get default properties for individual synapses default_connection_.get_status( d ); - ( *d )[ names::receptor_type ] = receptor_type_; - ( *d )[ names::synapse_model ] = LiteralDatum( name_ ); - ( *d )[ names::requires_symmetric ] = requires_symmetric_; - ( *d )[ names::has_delay ] = has_delay_; + d[ names::receptor_type.toString() ] = receptor_type_; + d[ names::synapse_model.toString() ] = name_; + d[ names::requires_symmetric.toString() ] = requires_symmetric_; + d[ names::has_delay.toString() ] = has_delay_; } template < typename ConnectionT > void -GenericConnectorModel< ConnectionT >::set_status( const DictionaryDatum& d ) +GenericConnectorModel< ConnectionT >::set_status( const dictionary& d ) { - updateValue< long >( d, names::receptor_type, receptor_type_ ); + d.update_value( names::receptor_type.toString(), receptor_type_ ); #ifdef HAVE_MUSIC // We allow music_channel as alias for receptor_type during connection setup - updateValue< long >( d, names::music_channel, receptor_type_ ); + d.update_value( names::music_channel.toString(), receptor_type_ ); #endif // If the parameter dict d contains /delay, this should set the delay @@ -182,7 +182,7 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src, Node& tgt, std::vector< ConnectorBase* >& thread_local_connectors, const synindex syn_id, - const DictionaryDatum& p, + const dictionary& p, const double delay, const double weight ) { @@ -193,7 +193,7 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src, kernel().connection_manager.get_delay_checker().assert_valid_delay_ms( delay ); } - if ( p->known( names::delay ) ) + if ( p.known( names::delay.toString() ) ) { throw BadParameter( "Parameter dictionary must not contain delay if delay is given " @@ -205,7 +205,7 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src, // check delay double delay = 0.0; - if ( updateValue< double >( p, names::delay, delay ) ) + if ( p.update_value( names::delay.toString(), delay ) ) { if ( has_delay_ ) { @@ -231,7 +231,7 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src, connection.set_delay( delay ); } - if ( not p->empty() ) + if ( not p.empty() ) { // Reference to connector model needed here to check delay (maybe this could // be done one level above?). @@ -244,9 +244,9 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src, rport actual_receptor_type = receptor_type_; #ifdef HAVE_MUSIC // We allow music_channel as alias for receptor_type during connection setup - updateValue< long >( p, names::music_channel, actual_receptor_type ); + p.update_value( names::music_channel.toString(), actual_receptor_type ); #endif - updateValue< long >( p, names::receptor_type, actual_receptor_type ); + p.update_value( names::receptor_type.toString(), actual_receptor_type ); add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type ); } diff --git a/nestkernel/delay_checker.cpp b/nestkernel/delay_checker.cpp index 3b4a989dce..f89056607f 100644 --- a/nestkernel/delay_checker.cpp +++ b/nestkernel/delay_checker.cpp @@ -58,14 +58,14 @@ nest::DelayChecker::calibrate( const TimeConverter& tc ) } void -nest::DelayChecker::get_status( DictionaryDatum& d ) const +nest::DelayChecker::get_status( dictionary& d ) const { - ( *d )[ names::min_delay ] = get_min_delay().get_ms(); - ( *d )[ names::max_delay ] = get_max_delay().get_ms(); + d[ names::min_delay.toString() ] = get_min_delay().get_ms(); + d[ names::max_delay.toString() ] = get_max_delay().get_ms(); } void -nest::DelayChecker::set_status( const DictionaryDatum& d ) +nest::DelayChecker::set_status( const dictionary& d ) { // For the minimum delay, we always round down. The easiest way to do this, // is to round up and then subtract one step. The only remaining edge case @@ -73,7 +73,7 @@ nest::DelayChecker::set_status( const DictionaryDatum& d ) // a min delay that is one step too small. We can detect this by an // additional test. double delay_tmp = 0.0; - bool min_delay_updated = updateValue< double >( d, names::min_delay, delay_tmp ); + bool min_delay_updated = d.update_value( names::min_delay.toString(), delay_tmp ); Time new_min_delay; if ( min_delay_updated ) { @@ -86,7 +86,7 @@ nest::DelayChecker::set_status( const DictionaryDatum& d ) } // For the maximum delay, we always round up, using ms_stamp - bool max_delay_updated = updateValue< double >( d, names::max_delay, delay_tmp ); + bool max_delay_updated = d.update_value( names::max_delay.toString(), delay_tmp ); Time new_max_delay = Time( Time::ms_stamp( delay_tmp ) ); if ( min_delay_updated xor max_delay_updated ) diff --git a/nestkernel/delay_checker.h b/nestkernel/delay_checker.h index dd0198fd03..c47260369c 100644 --- a/nestkernel/delay_checker.h +++ b/nestkernel/delay_checker.h @@ -26,6 +26,8 @@ // Includes from nestkernel: #include "nest_time.h" +#include "dictionary.h" + // Includes from sli: #include "dictdatum.h" @@ -82,8 +84,8 @@ class DelayChecker void calibrate( const TimeConverter& ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: Time min_delay_; //!< Minimal delay of all created synapses. diff --git a/nestkernel/device.cpp b/nestkernel/device.cpp index baca2d78a4..5ccd292c2c 100644 --- a/nestkernel/device.cpp +++ b/nestkernel/device.cpp @@ -74,11 +74,11 @@ nest::Device::Parameters_& nest::Device::Parameters_::operator=( const Parameter * ---------------------------------------------------------------- */ void -nest::Device::Parameters_::get( DictionaryDatum& d ) const +nest::Device::Parameters_::get( dictionary& d ) const { - ( *d )[ names::origin ] = origin_.get_ms(); - ( *d )[ names::start ] = start_.get_ms(); - ( *d )[ names::stop ] = stop_.get_ms(); + d[ names::origin.toString() ] = origin_.get_ms(); + d[ names::start.toString() ] = start_.get_ms(); + d[ names::stop.toString() ] = stop_.get_ms(); } void @@ -107,11 +107,11 @@ nest::Device::Parameters_::update_( const DictionaryDatum& d, const Name& name, } void -nest::Device::Parameters_::set( const DictionaryDatum& d ) +nest::Device::Parameters_::set( const dictionary& d ) { - update_( d, names::origin, origin_ ); - update_( d, names::start, start_ ); - update_( d, names::stop, stop_ ); + d.update_value( names::origin.toString(), origin_ ); + d.update_value( names::start.toString(), start_ ); + d.update_value( names::stop.toString(), stop_ ); if ( stop_ < start_ ) { diff --git a/nestkernel/device.h b/nestkernel/device.h index 3d5b165cf4..a947cf4ecb 100644 --- a/nestkernel/device.h +++ b/nestkernel/device.h @@ -82,8 +82,8 @@ class Device /** Set internal variables before calls to SimulationManager::run() */ virtual void calibrate(); - virtual void get_status( DictionaryDatum& ) const; - virtual void set_status( const DictionaryDatum& ); + virtual void get_status( dictionary& ) const; + virtual void set_status( const dictionary& ); /** * Returns true if the device is active at the given time stamp. @@ -133,8 +133,8 @@ class Device Parameters_& operator=( const Parameters_& ); - void get( DictionaryDatum& ) const; //!< Store current values in dictionary - void set( const DictionaryDatum& ); //!< Set values from dictionary + void get( dictionary& ) const; //!< Store current values in dictionary + void set( const dictionary& ); //!< Set values from dictionary private: //! Update given Time parameter including error checking @@ -178,13 +178,13 @@ class Device } // namespace inline void -nest::Device::get_status( DictionaryDatum& d ) const +nest::Device::get_status( dictionary& d ) const { P_.get( d ); } inline void -nest::Device::set_status( const DictionaryDatum& d ) +nest::Device::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( d ); // throws if BadProperty diff --git a/nestkernel/event_delivery_manager.cpp b/nestkernel/event_delivery_manager.cpp index 6a11a09681..521602afc6 100644 --- a/nestkernel/event_delivery_manager.cpp +++ b/nestkernel/event_delivery_manager.cpp @@ -119,9 +119,9 @@ EventDeliveryManager::finalize() } void -EventDeliveryManager::set_status( const DictionaryDatum& dict ) +EventDeliveryManager::set_status( const dictionary& dict ) { - updateValue< bool >( dict, names::off_grid_spiking, off_grid_spiking_ ); + dict.update_value( names::off_grid_spiking.toString(), off_grid_spiking_ ); } void diff --git a/nestkernel/event_delivery_manager.h b/nestkernel/event_delivery_manager.h index 3274fd9456..fe32df490d 100644 --- a/nestkernel/event_delivery_manager.h +++ b/nestkernel/event_delivery_manager.h @@ -62,7 +62,7 @@ class EventDeliveryManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); /** diff --git a/nestkernel/free_layer.h b/nestkernel/free_layer.h index 03e8a199f1..0f6aeb18e5 100644 --- a/nestkernel/free_layer.h +++ b/nestkernel/free_layer.h @@ -49,8 +49,8 @@ class FreeLayer : public Layer< D > { public: Position< D > get_position( index sind ) const; - void set_status( const DictionaryDatum& ); - void get_status( DictionaryDatum& ) const; + void set_status( const dictionary& ); + void get_status( dictionary& ) const; protected: /** @@ -99,7 +99,7 @@ class FreeLayer : public Layer< D > template < int D > void -FreeLayer< D >::set_status( const DictionaryDatum& d ) +FreeLayer< D >::set_status( const dictionary& d ) { Layer< D >::set_status( d ); @@ -114,20 +114,20 @@ FreeLayer< D >::set_status( const DictionaryDatum& d ) } // Read positions from dictionary - if ( d->known( names::positions ) ) + if ( d.known( names::positions.toString() ) ) { - const Token& tkn = d->lookup( names::positions ); - if ( tkn.is_a< TokenArray >() ) + const auto positions = d.at( names::positions.toString() ); + if ( is_double_vector_vector( positions ) ) { // If the positions are created from a layer sliced with step, we need to take that into consideration. // Because the implementation of NodeCollections sliced with step internally keeps the "skipped" nodes, // the positions must include the "skipped" nodes as well for consistency. size_t step = 1; - if ( d->known( names::step ) ) + if ( d.known( names::step.toString() ) ) { - step = getValue< long >( d->lookup( names::step ) ); + step = d.get< long >( names::step.toString() ); } - TokenArray pos = getValue< TokenArray >( tkn ); + const auto pos = d.get< std::vector< std::vector< double > > >( names::positions.toString() ); const auto num_nodes = this->node_collection_->size(); // Number of positions, excluding the skipped nodes const auto stepped_pos_size = std::floor( pos.size() / ( float ) step ) + ( pos.size() % step > 0 ); @@ -144,9 +144,9 @@ FreeLayer< D >::set_status( const DictionaryDatum& d ) positions_.clear(); positions_.reserve( num_nodes ); - for ( Token* it = pos.begin(); it != pos.end(); ++it ) + for ( auto& position : pos ) { - Position< D > point = getValue< std::vector< double > >( *it ); + Position< D > point = position; positions_.push_back( point ); for ( int d = 0; d < D; ++d ) @@ -162,10 +162,10 @@ FreeLayer< D >::set_status( const DictionaryDatum& d ) } } } - else if ( tkn.is_a< ParameterDatum >() ) + else if ( is_parameter( positions ) ) { - auto pd = dynamic_cast< ParameterDatum* >( tkn.datum() ); - auto pos = dynamic_cast< DimensionParameter* >( pd->get() ); + auto pd = d.get< std::shared_ptr< Parameter > >( names::positions.toString() ); + auto pos = dynamic_cast< DimensionParameter* >( pd.get() ); positions_.clear(); auto num_nodes = this->node_collection_->size(); positions_.reserve( num_nodes ); @@ -195,9 +195,9 @@ FreeLayer< D >::set_status( const DictionaryDatum& d ) throw KernelException( "'positions' must be an array or a DimensionParameter." ); } } - if ( d->known( names::extent ) ) + if ( d.known( names::extent.toString() ) ) { - this->extent_ = getValue< std::vector< double > >( d, names::extent ); + this->extent_ = d.get< std::vector< double > >( names::extent.toString() ); Position< D > center = ( max_point + this->lower_left_ ) / 2; auto lower_left_point = this->lower_left_; // save lower-left-most point @@ -223,16 +223,17 @@ FreeLayer< D >::set_status( const DictionaryDatum& d ) template < int D > void -FreeLayer< D >::get_status( DictionaryDatum& d ) const +FreeLayer< D >::get_status( dictionary& d ) const { - Layer< D >::get_status( d ); - - TokenArray points; - for ( typename std::vector< Position< D > >::const_iterator it = positions_.begin(); it != positions_.end(); ++it ) - { - points.push_back( it->getToken() ); - } - def2< TokenArray, ArrayDatum >( d, names::positions, points ); + // TODO-PYNEST-NG: fix this + // Layer< D >::get_status( d ); + + // TokenArray points; + // for ( typename std::vector< Position< D > >::const_iterator it = positions_.begin(); it != positions_.end(); ++it ) + // { + // points.push_back( it->getToken() ); + // } + // def2< TokenArray, ArrayDatum >( d, names::positions, points ); } template < int D > diff --git a/nestkernel/generic_factory.h b/nestkernel/generic_factory.h index f78da4cd6c..c3380bc324 100644 --- a/nestkernel/generic_factory.h +++ b/nestkernel/generic_factory.h @@ -48,7 +48,7 @@ template < class BaseT > class GenericFactory { public: - typedef BaseT* ( *CreatorFunction )( const DictionaryDatum& d ); + typedef BaseT* ( *CreatorFunction )( const dictionary& d ); typedef std::map< Name, CreatorFunction > AssocMap; /** @@ -57,7 +57,7 @@ class GenericFactory * @param d Dictionary containing parameters for this subtype. * @returns dynamically allocated new object. */ - BaseT* create( const Name& name, const DictionaryDatum& d ) const; + BaseT* create( const Name& name, const dictionary& d ) const; /** * Register a new subtype. The type name must not already exist. The @@ -81,14 +81,14 @@ class GenericFactory private: template < class T > - static BaseT* new_from_dict_( const DictionaryDatum& d ); + static BaseT* new_from_dict_( const dictionary& d ); AssocMap associations_; }; template < class BaseT > inline BaseT* -GenericFactory< BaseT >::create( const Name& name, const DictionaryDatum& d ) const +GenericFactory< BaseT >::create( const Name& name, const dictionary& d ) const { typename AssocMap::const_iterator i = associations_.find( name ); if ( i != associations_.end() ) @@ -116,7 +116,7 @@ GenericFactory< BaseT >::register_subtype( const Name& name, CreatorFunction cre template < class BaseT > template < class T > BaseT* -GenericFactory< BaseT >::new_from_dict_( const DictionaryDatum& d ) +GenericFactory< BaseT >::new_from_dict_( const dictionary& d ) { return new T( d ); } diff --git a/nestkernel/genericmodel.h b/nestkernel/genericmodel.h index c8ccddad48..a9bceed416 100644 --- a/nestkernel/genericmodel.h +++ b/nestkernel/genericmodel.h @@ -95,8 +95,8 @@ class GenericModel : public Model void deprecation_warning( const std::string& ); private: - void set_status_( DictionaryDatum ); - DictionaryDatum get_status_(); + void set_status_( dictionary ); + dictionary get_status_(); size_t get_element_size() const; @@ -241,17 +241,17 @@ GenericModel< ElementT >::sends_signal() const template < typename ElementT > void -GenericModel< ElementT >::set_status_( DictionaryDatum d ) +GenericModel< ElementT >::set_status_( dictionary d ) { proto_.set_status( d ); } template < typename ElementT > -DictionaryDatum +dictionary GenericModel< ElementT >::get_status_() { - DictionaryDatum d = proto_.get_status_base(); - ( *d )[ names::elementsize ] = sizeof( ElementT ); + dictionary d = proto_.get_status_base(); + d[ names::elementsize.toString() ] = sizeof( ElementT ); return d; } diff --git a/nestkernel/grid_layer.h b/nestkernel/grid_layer.h index 6834e6e76f..8ecce08128 100644 --- a/nestkernel/grid_layer.h +++ b/nestkernel/grid_layer.h @@ -142,8 +142,8 @@ class GridLayer : public Layer< D > Position< D, index > get_dims() const; - void set_status( const DictionaryDatum& d ); - void get_status( DictionaryDatum& d ) const; + void get_status( dictionary& d ) const; + void set_status( const dictionary& d ); protected: Position< D, index > dims_; ///< number of nodes in each direction. @@ -164,11 +164,11 @@ GridLayer< D >::get_dims() const template < int D > void -GridLayer< D >::set_status( const DictionaryDatum& d ) +GridLayer< D >::set_status( const dictionary& d ) { std::vector< long > new_dims( D ); - updateValue< std::vector< long > >( d, names::shape, new_dims ); + d.update_value( names::shape.toString(), new_dims ); index new_size = 1; for ( int i = 0; i < D; ++i ) @@ -183,15 +183,15 @@ GridLayer< D >::set_status( const DictionaryDatum& d ) throw BadProperty( "Total size of layer must be unchanged." ); } - if ( d->known( names::extent ) ) + if ( d.known( names::extent.toString() ) ) { Position< D > center = this->get_center(); - this->extent_ = getValue< std::vector< double > >( d, names::extent ); + this->extent_ = d.get< std::vector< double > >( names::extent.toString() ); this->lower_left_ = center - this->extent_ / 2; } - if ( d->known( names::center ) ) + if ( d.known( names::center.toString() ) ) { - this->lower_left_ = getValue< std::vector< double > >( d, names::center ); + this->lower_left_ = d.get< std::vector< double > >( names::center.toString() ); this->lower_left_ -= this->extent_ / 2; } @@ -200,11 +200,11 @@ GridLayer< D >::set_status( const DictionaryDatum& d ) template < int D > void -GridLayer< D >::get_status( DictionaryDatum& d ) const +GridLayer< D >::get_status( dictionary& d ) const { Layer< D >::get_status( d ); - ( *d )[ names::shape ] = std::vector< index >( dims_.get_vector() ); + d[ names::shape.toString() ] = std::vector< index >( dims_.get_vector() ); } template < int D > diff --git a/nestkernel/grid_mask.h b/nestkernel/grid_mask.h index e0ad820f29..79923074d7 100644 --- a/nestkernel/grid_mask.h +++ b/nestkernel/grid_mask.h @@ -51,7 +51,7 @@ class GridMask : public AbstractMask * shape - size in grid coordinates (length 2 for 2D layers or length 3 for 3D layers) */ - GridMask( const DictionaryDatum& d ); + GridMask( const dictionary& d ); bool inside( const std::vector< double >& ) const @@ -110,9 +110,9 @@ class GridMask : public AbstractMask }; template < int D > -GridMask< D >::GridMask( const DictionaryDatum& d ) +GridMask< D >::GridMask( const dictionary& d ) { - std::vector< long > shape = getValue< std::vector< long > >( d, names::shape ); + std::vector< long > shape = d.get< std::vector< long > >( names::shape.toString() ); if ( D == 2 ) { diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp index 792d05f364..0221ebfe7e 100644 --- a/nestkernel/io_manager.cpp +++ b/nestkernel/io_manager.cpp @@ -77,10 +77,10 @@ IOManager::~IOManager() } void -IOManager::set_data_path_prefix_( const DictionaryDatum& dict ) +IOManager::set_data_path_prefix_( const dictionary& dict ) { std::string tmp; - if ( updateValue< std::string >( dict, names::data_path, tmp ) ) + if ( dict.update_value( names::data_path.toString(), tmp ) ) { DIR* testdir = opendir( tmp.c_str() ); if ( testdir != NULL ) @@ -109,7 +109,7 @@ IOManager::set_data_path_prefix_( const DictionaryDatum& dict ) } } - if ( updateValue< std::string >( dict, names::data_prefix, tmp ) ) + if ( dict.update_value( names::data_prefix.toString(), tmp ) ) { if ( tmp.find( '/' ) == std::string::npos ) { @@ -125,17 +125,17 @@ IOManager::set_data_path_prefix_( const DictionaryDatum& dict ) void IOManager::initialize() { - DictionaryDatum dict( new Dictionary ); + dictionary dict; // The properties data_path and data_prefix can be set via environment variables char* data_path = std::getenv( "NEST_DATA_PATH" ); if ( data_path ) { - ( *dict )[ names::data_path ] = std::string( data_path ); + dict[ names::data_path.toString() ] = std::string( data_path ); } char* data_prefix = std::getenv( "NEST_DATA_PREFIX" ); if ( data_prefix ) { - ( *dict )[ names::data_prefix ] = std::string( data_prefix ); + dict[ names::data_prefix.toString() ] = std::string( data_prefix ); } set_data_path_prefix_( dict ); @@ -180,19 +180,19 @@ void IOManager::change_num_threads( thread ) } void -IOManager::set_status( const DictionaryDatum& d ) +IOManager::set_status( const dictionary& d ) { set_data_path_prefix_( d ); - updateValue< bool >( d, names::overwrite_files, overwrite_files_ ); + d.update_value( names::overwrite_files.toString(), overwrite_files_ ); - DictionaryDatum recording_backends; - if ( updateValue< DictionaryDatum >( d, names::recording_backends, recording_backends ) ) + dictionary recording_backends; + if ( d.update_value( names::recording_backends.toString(), recording_backends ) ) { for ( const auto& it : recording_backends_ ) { - DictionaryDatum recording_backend_status; - if ( updateValue< DictionaryDatum >( recording_backends, it.first, recording_backend_status ) ) + dictionary recording_backend_status; + if ( recording_backends.update_value( it.first.toString(), recording_backend_status ) ) { it.second->set_status( recording_backend_status ); } @@ -304,7 +304,7 @@ IOManager::write( const Name& backend_name, } void -IOManager::enroll_recorder( const Name& backend_name, const RecordingDevice& device, const DictionaryDatum& params ) +IOManager::enroll_recorder( const Name& backend_name, const RecordingDevice& device, const dictionary& params ) { for ( auto& it : recording_backends_ ) { @@ -320,7 +320,7 @@ IOManager::enroll_recorder( const Name& backend_name, const RecordingDevice& dev } void -nest::IOManager::enroll_stimulator( const Name& backend_name, StimulationDevice& device, const DictionaryDatum& params ) +nest::IOManager::enroll_stimulator( const Name& backend_name, StimulationDevice& device, const dictionary& params ) { if ( not is_valid_stimulation_backend( backend_name ) and not backend_name.toString().empty() ) @@ -360,21 +360,19 @@ IOManager::set_recording_value_names( const Name& backend_name, } void -IOManager::check_recording_backend_device_status( const Name& backend_name, const DictionaryDatum& params ) +IOManager::check_recording_backend_device_status( const Name& backend_name, const dictionary& params ) { recording_backends_[ backend_name ]->check_device_status( params ); } void -IOManager::get_recording_backend_device_defaults( const Name& backend_name, DictionaryDatum& params ) +IOManager::get_recording_backend_device_defaults( const Name& backend_name, dictionary& params ) { recording_backends_[ backend_name ]->get_device_defaults( params ); } void -IOManager::get_recording_backend_device_status( const Name& backend_name, - const RecordingDevice& device, - DictionaryDatum& d ) +IOManager::get_recording_backend_device_status( const Name& backend_name, const RecordingDevice& device, dictionary& d ) { recording_backends_[ backend_name ]->get_device_status( device, d ); } diff --git a/nestkernel/io_manager.h b/nestkernel/io_manager.h index c4b4fee87b..f7087d29de 100644 --- a/nestkernel/io_manager.h +++ b/nestkernel/io_manager.h @@ -47,8 +47,8 @@ class IOManager : public ManagerInterface void finalize() override; // called from meta-manger to reinit void change_num_threads( thread ) override; - void set_status( const DictionaryDatum& ) override; // set parameters - void get_status( dictionary& ) override; // get parameters + void set_status( const dictionary& ) override; // set parameters + void get_status( dictionary& ) override; // get parameters IOManager(); // Construct only by meta-manager ~IOManager() override; @@ -106,20 +106,20 @@ class IOManager : public ManagerInterface void write( const Name&, const RecordingDevice&, const Event&, const std::vector< double >&, const std::vector< long >& ); - void enroll_recorder( const Name&, const RecordingDevice&, const DictionaryDatum& ); - void enroll_stimulator( const Name&, StimulationDevice&, const DictionaryDatum& ); + void enroll_recorder( const Name&, const RecordingDevice&, const dictionary& ); + void enroll_stimulator( const Name&, StimulationDevice&, const dictionary& ); void set_recording_value_names( const Name& backend_name, const RecordingDevice& device, const std::vector< Name >& double_value_names, const std::vector< Name >& long_value_names ); - void check_recording_backend_device_status( const Name&, const DictionaryDatum& ); - void get_recording_backend_device_defaults( const Name&, DictionaryDatum& ); - void get_recording_backend_device_status( const Name&, const RecordingDevice&, DictionaryDatum& ); + void check_recording_backend_device_status( const Name&, const dictionary& ); + void get_recording_backend_device_defaults( const Name&, dictionary& ); + void get_recording_backend_device_status( const Name&, const RecordingDevice&, dictionary& ); private: - void set_data_path_prefix_( const DictionaryDatum& ); + void set_data_path_prefix_( const dictionary& ); void register_recording_backends_(); void register_stimulation_backends_(); diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp index 19fefc95ff..63f7bb443a 100644 --- a/nestkernel/kernel_manager.cpp +++ b/nestkernel/kernel_manager.cpp @@ -155,7 +155,7 @@ nest::KernelManager::change_number_of_threads( thread new_num_threads ) } void -nest::KernelManager::set_status( const DictionaryDatum& dict ) +nest::KernelManager::set_status( const dictionary& dict ) { assert( is_initialized() ); diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h index eff3b78b45..007ee3738b 100644 --- a/nestkernel/kernel_manager.h +++ b/nestkernel/kernel_manager.h @@ -168,7 +168,7 @@ class KernelManager void prepare(); void cleanup(); - void set_status( const DictionaryDatum& ); + void set_status( const dictionary& ); void get_status( dictionary& ); //! Returns true if kernel is initialized diff --git a/nestkernel/layer.cpp b/nestkernel/layer.cpp index feb063561a..0444611a61 100644 --- a/nestkernel/layer.cpp +++ b/nestkernel/layer.cpp @@ -52,47 +52,46 @@ AbstractLayer::~AbstractLayer() } NodeCollectionPTR -AbstractLayer::create_layer( const DictionaryDatum& layer_dict ) +AbstractLayer::create_layer( const dictionary& layer_dict ) { index length = 0; AbstractLayer* layer_local = 0; - auto element_name = getValue< std::string >( layer_dict, names::elements ); - auto element_model = kernel().model_manager.get_modeldict()->lookup( element_name ); + auto element_name = layer_dict.get< std::string >( names::elements.toString() ); - if ( element_model.empty() ) + if ( not kernel().model_manager.get_modeldict().known( element_name ) ) { throw UnknownModelName( element_name ); } + auto element_model = kernel().model_manager.get_modeldict().get< index >( element_name ); auto element_id = static_cast< long >( element_model ); - if ( layer_dict->known( names::positions ) ) + if ( layer_dict.known( names::positions.toString() ) ) { - if ( layer_dict->known( names::shape ) ) + if ( layer_dict.known( names::shape.toString() ) ) { throw BadProperty( "Cannot specify both positions and shape." ); } int num_dimensions = 0; - const Token& tkn = layer_dict->lookup( names::positions ); - if ( tkn.is_a< TokenArray >() ) + const auto positions = layer_dict.at( names::positions.toString() ); + if ( is_double_vector_vector( positions ) ) { - TokenArray positions = getValue< TokenArray >( tkn ); - length = positions.size(); - std::vector< double > pos = getValue< std::vector< double > >( positions[ 0 ] ); - num_dimensions = pos.size(); + const auto pos = layer_dict.get< std::vector< std::vector< double > > >( names::positions.toString() ); + length = pos.size(); + num_dimensions = pos[ 0 ].size(); } - else if ( tkn.is_a< ParameterDatum >() ) + else if ( is_parameter( positions ) ) { - auto pd = dynamic_cast< ParameterDatum* >( tkn.datum() ); - auto positions = dynamic_cast< DimensionParameter* >( pd->get() ); + auto pd = layer_dict.get< std::shared_ptr< Parameter > >( names::positions.toString() ); + auto pos = dynamic_cast< DimensionParameter* >( pd.get() ); // To avoid nasty segfaults, we check that the parameter is indeed a DimensionParameter. - if ( not std::is_same< std::remove_reference< decltype( *positions ) >::type, DimensionParameter >::value ) + if ( not std::is_same< std::remove_reference< decltype( *pos ) >::type, DimensionParameter >::value ) { throw KernelException( "When 'positions' is a Parameter, it must be a DimensionParameter." ); } - length = getValue< long >( layer_dict, names::n ); - num_dimensions = positions->get_num_dimensions(); + length = layer_dict.get< long >( names::n.toString() ); + num_dimensions = pos->get_num_dimensions(); } else { @@ -117,9 +116,9 @@ AbstractLayer::create_layer( const DictionaryDatum& layer_dict ) throw BadProperty( "Positions must have 2 or 3 coordinates." ); } } - else if ( layer_dict->known( names::shape ) ) + else if ( layer_dict.known( names::shape.toString() ) ) { - std::vector< long > shape = getValue< std::vector< long > >( layer_dict, names::shape ); + std::vector< long > shape = layer_dict.get< std::vector< long > >( names::shape.toString() ); if ( not std::all_of( shape.begin(), shape.end(), diff --git a/nestkernel/layer.h b/nestkernel/layer.h index 62c71f7d16..6f1462e463 100644 --- a/nestkernel/layer.h +++ b/nestkernel/layer.h @@ -71,14 +71,14 @@ class AbstractLayer * entries in the dictionary. * @param d Dictionary with named parameter settings. */ - virtual void set_status( const DictionaryDatum& ) = 0; + virtual void set_status( const dictionary& ) = 0; /** * Export properties of the layer by setting * entries in the status dictionary. * @param d Dictionary. */ - virtual void get_status( DictionaryDatum& ) const = 0; + virtual void get_status( dictionary& ) const = 0; virtual unsigned int get_num_dimensions() const = 0; @@ -132,7 +132,7 @@ class AbstractLayer * parameters. * @returns pointer to NodeCollection for new layer */ - static NodeCollectionPTR create_layer( const DictionaryDatum& ); + static NodeCollectionPTR create_layer( const dictionary& ); /** * Return a vector with the node IDs of the nodes inside the mask. @@ -234,14 +234,14 @@ class Layer : public AbstractLayer * entries in the dictionary. * @param d Dictionary with named parameter settings. */ - void set_status( const DictionaryDatum& ); + void set_status( const dictionary& ); /** * Export properties of the layer by setting * entries in the status dictionary. * @param d Dictionary. */ - void get_status( DictionaryDatum& ) const; + void get_status( dictionary& ) const; unsigned int get_num_dimensions() const diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h index 71ab7954cd..90f3d6770e 100644 --- a/nestkernel/layer_impl.h +++ b/nestkernel/layer_impl.h @@ -79,11 +79,11 @@ Layer< D >::compute_displacement( const std::vector< double >& from_pos, template < int D > void -Layer< D >::set_status( const DictionaryDatum& d ) +Layer< D >::set_status( const dictionary& d ) { - if ( d->known( names::edge_wrap ) ) + if ( d.known( names::edge_wrap.toString() ) ) { - if ( getValue< bool >( d, names::edge_wrap ) ) + if ( d.get< bool >( names::edge_wrap.toString() ) ) { periodic_ = ( 1 << D ) - 1; // All dimensions periodic } @@ -92,18 +92,18 @@ Layer< D >::set_status( const DictionaryDatum& d ) template < int D > void -Layer< D >::get_status( DictionaryDatum& d ) const +Layer< D >::get_status( dictionary& d ) const { - ( *d )[ names::extent ] = std::vector< double >( extent_.get_vector() ); - ( *d )[ names::center ] = std::vector< double >( ( lower_left_ + extent_ / 2 ).get_vector() ); + d[ names::extent.toString() ] = std::vector< double >( extent_.get_vector() ); + d[ names::center.toString() ] = std::vector< double >( ( lower_left_ + extent_ / 2 ).get_vector() ); if ( periodic_.none() ) { - ( *d )[ names::edge_wrap ] = BoolDatum( false ); + d[ names::edge_wrap.toString() ] = BoolDatum( false ); } else if ( periodic_.count() == D ) { - ( *d )[ names::edge_wrap ] = true; + d[ names::edge_wrap.toString() ] = true; } } @@ -327,15 +327,15 @@ Layer< D >::dump_connections( std::ostream& out, for ( size_t i = 0; i < connectome.size(); ++i ) { ConnectionDatum con_id = getValue< ConnectionDatum >( connectome.get( i ) ); - DictionaryDatum result_dict = kernel().connection_manager.get_synapse_status( con_id.get_source_node_id(), + dictionary result_dict = kernel().connection_manager.get_synapse_status( con_id.get_source_node_id(), con_id.get_target_node_id(), con_id.get_target_thread(), con_id.get_synapse_model_id(), con_id.get_port() ); - long target_node_id = getValue< long >( result_dict, names::target ); - double weight = getValue< double >( result_dict, names::weight ); - double delay = getValue< double >( result_dict, names::delay ); + long target_node_id = result_dict.get< long >( names::target.toString() ); + double weight = result_dict.get< double >( names::weight.toString() ); + double delay = result_dict.get< double >( names::delay.toString() ); // Print source, target, weight, delay, rports out << source_node_id << ' ' << target_node_id << ' ' << weight << ' ' << delay; diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp index 320abd39b9..9a5cc95560 100644 --- a/nestkernel/logging_manager.cpp +++ b/nestkernel/logging_manager.cpp @@ -53,9 +53,9 @@ nest::LoggingManager::finalize() } void -nest::LoggingManager::set_status( const DictionaryDatum& dict ) +nest::LoggingManager::set_status( const dictionary& dict ) { - updateValue< bool >( dict, names::dict_miss_is_error, dict_miss_is_error_ ); + dict.update_value( names::dict_miss_is_error.toString(), dict_miss_is_error_ ); } void diff --git a/nestkernel/logging_manager.h b/nestkernel/logging_manager.h index 01abed4099..180262ddae 100644 --- a/nestkernel/logging_manager.h +++ b/nestkernel/logging_manager.h @@ -52,7 +52,7 @@ class LoggingManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); /** diff --git a/nestkernel/manager_interface.h b/nestkernel/manager_interface.h index 1ba07de93c..cbd2b22656 100644 --- a/nestkernel/manager_interface.h +++ b/nestkernel/manager_interface.h @@ -101,7 +101,7 @@ class ManagerInterface */ virtual void change_num_threads( thread ){}; - virtual void set_status( const DictionaryDatum& ) = 0; + virtual void set_status( const dictionary& ) = 0; virtual void get_status( dictionary& ) = 0; virtual void prepare(){}; diff --git a/nestkernel/mask.h b/nestkernel/mask.h index 5f6e525041..18eab105cd 100644 --- a/nestkernel/mask.h +++ b/nestkernel/mask.h @@ -218,7 +218,7 @@ class BoxMask : public Mask< D > * polar_angle - Rotation angle in degrees from z-axis (double), the polar * angle does not apply in 2D, optional */ - BoxMask( const DictionaryDatum& ); + BoxMask( const dictionary& ); BoxMask( const Position< D >& lower_left, const Position< D >& upper_right, @@ -324,7 +324,7 @@ class BallMask : public Mask< D > * "radius" with a double value and optionally the key "anchor" (the * center position) with an array of doubles. */ - BallMask( const DictionaryDatum& ); + BallMask( const dictionary& ); ~BallMask() { @@ -429,7 +429,7 @@ class EllipseMask : public Mask< D > * "polar_angle" with a double, an array of doubles, a double and a double, * respectively. */ - EllipseMask( const DictionaryDatum& ); + EllipseMask( const dictionary& ); ~EllipseMask() { @@ -746,10 +746,10 @@ BoxMask< 3 >::get_name() } template < int D > -BoxMask< D >::BoxMask( const DictionaryDatum& d ) +BoxMask< D >::BoxMask( const dictionary& d ) { - lower_left_ = getValue< std::vector< double > >( d, names::lower_left ); - upper_right_ = getValue< std::vector< double > >( d, names::upper_right ); + lower_left_ = d.get< std::vector< double > >( names::lower_left.toString() ); + upper_right_ = d.get< std::vector< double > >( names::upper_right.toString() ); if ( not( lower_left_ < upper_right_ ) ) { @@ -758,16 +758,16 @@ BoxMask< D >::BoxMask( const DictionaryDatum& d ) "Upper right must be strictly to the right and above lower left." ); } - if ( d->known( names::azimuth_angle ) ) + if ( d.known( names::azimuth_angle.toString() ) ) { - azimuth_angle_ = getValue< double >( d, names::azimuth_angle ); + azimuth_angle_ = d.get< double >( names::azimuth_angle.toString() ); } else { azimuth_angle_ = 0.0; } - if ( d->known( names::polar_angle ) ) + if ( d.known( names::polar_angle.toString() ) ) { if ( D == 2 ) { @@ -775,7 +775,7 @@ BoxMask< D >::BoxMask( const DictionaryDatum& d ) "nest::BoxMask: " "polar_angle not defined in 2D." ); } - polar_angle_ = getValue< double >( d, names::polar_angle ); + polar_angle_ = d.get< double >( names::polar_angle.toString() ); } else { @@ -907,9 +907,9 @@ BallMask< 3 >::get_name() } template < int D > -BallMask< D >::BallMask( const DictionaryDatum& d ) +BallMask< D >::BallMask( const dictionary& d ) { - radius_ = getValue< double >( d, names::radius ); + radius_ = d.get< double >( names::radius.toString() ); if ( radius_ <= 0 ) { throw BadProperty( @@ -917,9 +917,9 @@ BallMask< D >::BallMask( const DictionaryDatum& d ) "radius > 0 required." ); } - if ( d->known( names::anchor ) ) + if ( d.known( names::anchor.toString() ) ) { - center_ = getValue< std::vector< double > >( d, names::anchor ); + center_ = d.get< std::vector< double > >( names::anchor.toString() ); } } @@ -938,10 +938,10 @@ EllipseMask< 3 >::get_name() } template < int D > -EllipseMask< D >::EllipseMask( const DictionaryDatum& d ) +EllipseMask< D >::EllipseMask( const dictionary& d ) { - major_axis_ = getValue< double >( d, names::major_axis ); - minor_axis_ = getValue< double >( d, names::minor_axis ); + major_axis_ = d.get< double >( names::major_axis.toString() ); + minor_axis_ = d.get< double >( names::minor_axis.toString() ); if ( major_axis_ <= 0 or minor_axis_ <= 0 ) { throw BadProperty( @@ -958,7 +958,7 @@ EllipseMask< D >::EllipseMask( const DictionaryDatum& d ) x_scale_ = 4.0 / ( major_axis_ * major_axis_ ); y_scale_ = 4.0 / ( minor_axis_ * minor_axis_ ); - if ( d->known( names::polar_axis ) ) + if ( d.known( names::polar_axis.toString() ) ) { if ( D == 2 ) { @@ -966,7 +966,7 @@ EllipseMask< D >::EllipseMask( const DictionaryDatum& d ) "nest::EllipseMask: " "polar_axis not defined in 2D." ); } - polar_axis_ = getValue< double >( d, names::polar_axis ); + polar_axis_ = d.get< double >( names::polar_axis.toString() ); if ( polar_axis_ <= 0 ) { @@ -983,21 +983,21 @@ EllipseMask< D >::EllipseMask( const DictionaryDatum& d ) z_scale_ = 0.0; } - if ( d->known( names::anchor ) ) + if ( d.known( names::anchor.toString() ) ) { - center_ = getValue< std::vector< double > >( d, names::anchor ); + center_ = d.get< std::vector< double > >( names::anchor.toString() ); } - if ( d->known( names::azimuth_angle ) ) + if ( d.known( names::azimuth_angle.toString() ) ) { - azimuth_angle_ = getValue< double >( d, names::azimuth_angle ); + azimuth_angle_ = d.get< double >( names::azimuth_angle.toString() ); } else { azimuth_angle_ = 0.0; } - if ( d->known( names::polar_angle ) ) + if ( d.known( names::polar_angle.toString() ) ) { if ( D == 2 ) { @@ -1005,7 +1005,7 @@ EllipseMask< D >::EllipseMask( const DictionaryDatum& d ) "nest::EllipseMask: " "polar_angle not defined in 2D." ); } - polar_angle_ = getValue< double >( d, names::polar_angle ); + polar_angle_ = d.get< double >( names::polar_angle.toString() ); } else { diff --git a/nestkernel/model.cpp b/nestkernel/model.cpp index ae6a18d53c..c8dbdb082a 100644 --- a/nestkernel/model.cpp +++ b/nestkernel/model.cpp @@ -111,7 +111,7 @@ Model::mem_capacity() } void -Model::set_status( DictionaryDatum d ) +Model::set_status( dictionary d ) { try { @@ -123,10 +123,10 @@ Model::set_status( DictionaryDatum d ) } } -DictionaryDatum +dictionary Model::get_status( void ) { - DictionaryDatum d = get_status_(); + dictionary d = get_status_(); std::vector< long > tmp( memory_.size() ); for ( size_t t = 0; t < tmp.size(); ++t ) @@ -134,24 +134,24 @@ Model::get_status( void ) tmp[ t ] = memory_[ t ].get_instantiations(); } - ( *d )[ names::instantiations ] = Token( tmp ); - ( *d )[ names::type_id ] = LiteralDatum( kernel().model_manager.get_model( type_id_ )->get_name() ); + d[ names::instantiations.toString() ] = Token( tmp ); + d[ names::type_id.toString() ] = LiteralDatum( kernel().model_manager.get_model( type_id_ )->get_name() ); for ( size_t t = 0; t < tmp.size(); ++t ) { tmp[ t ] = memory_[ t ].get_total(); } - ( *d )[ names::capacity ] = Token( tmp ); + d[ names::capacity.toString() ] = Token( tmp ); for ( size_t t = 0; t < tmp.size(); ++t ) { tmp[ t ] = memory_[ t ].available(); } - ( *d )[ names::available ] = Token( tmp ); + d[ names::available.toString() ] = Token( tmp ); - ( *d )[ names::model ] = LiteralDatum( get_name() ); + d[ names::model.toString() ] = LiteralDatum( get_name() ); return d; } diff --git a/nestkernel/model.h b/nestkernel/model.h index 1c3ded51f1..5845ca32cd 100644 --- a/nestkernel/model.h +++ b/nestkernel/model.h @@ -143,7 +143,7 @@ class Model * @param d Dictionary with named parameter settings. * @ingroup status_interface */ - void set_status( DictionaryDatum ); + void set_status( dictionary ); /** * Export properties of the prototype node by setting @@ -151,7 +151,7 @@ class Model * @param d Dictionary. * @ingroup status_interface */ - DictionaryDatum get_status( void ); + dictionary get_status( void ); virtual port send_test_event( Node&, rport, synindex, bool ) = 0; @@ -211,9 +211,9 @@ class Model } private: - virtual void set_status_( DictionaryDatum ) = 0; + virtual void set_status_( dictionary ) = 0; - virtual DictionaryDatum get_status_() = 0; + virtual dictionary get_status_() = 0; /** diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index d1e57bde45..8ec466789d 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -48,8 +48,8 @@ ModelManager::ModelManager() , models_() , pristine_prototypes_() , prototypes_() - , modeldict_( new Dictionary ) - , synapsedict_( new Dictionary ) + , modeldict_() + , synapsedict_() , proxynode_model_( 0 ) , proxy_nodes_() , dummy_spike_sources_() @@ -104,7 +104,8 @@ ModelManager::initialize() models_.push_back( pristine_models_[ i ].first->clone( name ) ); if ( not pristine_models_[ i ].second ) { - modeldict_->insert( name, i ); + std::cerr << name << " " << i << "\n"; + modeldict_[ name ] = i; } } @@ -129,7 +130,7 @@ ModelManager::initialize() dummy_spike_sources_[ t ] = create_proxynode_( t, model_id ); } - synapsedict_->clear(); + synapsedict_.clear(); // one list of prototypes per thread std::vector< std::vector< ConnectorModel* > > tmp_proto( kernel().vp_manager.get_num_threads() ); @@ -146,7 +147,7 @@ ModelManager::initialize() { prototypes_[ t ].push_back( ( *i )->clone( name ) ); } - synapsedict_->insert( name, prototypes_[ 0 ].size() - 1 ); + synapsedict_[ name ] = static_cast< synindex >( prototypes_[ 0 ].size() - 1 ); } } } @@ -168,7 +169,7 @@ ModelManager::finalize() } void -ModelManager::set_status( const DictionaryDatum& ) +ModelManager::set_status( const dictionary& ) { } @@ -180,26 +181,23 @@ ModelManager::get_status( dictionary& dict ) } index -ModelManager::copy_model( Name old_name, Name new_name, DictionaryDatum params ) +ModelManager::copy_model( Name old_name, Name new_name, dictionary params ) { - if ( modeldict_->known( new_name ) or synapsedict_->known( new_name ) ) + if ( modeldict_.known( new_name.toString() ) or synapsedict_.known( new_name.toString() ) ) { throw NewModelNameExists( new_name ); } - const Token oldnodemodel = modeldict_->lookup( old_name ); - const Token oldsynmodel = synapsedict_->lookup( old_name ); - index new_id; - if ( not oldnodemodel.empty() ) + if ( modeldict_.known( old_name.toString() ) ) { - index old_id = static_cast< index >( oldnodemodel ); + index old_id = modeldict_.get< index >( old_name.toString() ); new_id = copy_node_model_( old_id, new_name ); set_node_defaults_( new_id, params ); } - else if ( not oldsynmodel.empty() ) + else if ( synapsedict_.known( old_name.toString() ) ) { - index old_id = static_cast< index >( oldsynmodel ); + index old_id = synapsedict_.get< synindex >( old_name.toString() ); new_id = copy_synapse_model_( old_id, new_name ); set_synapse_defaults_( new_id, params ); } @@ -232,7 +230,7 @@ ModelManager::register_node_model_( Model* model, bool private_model ) if ( not private_model ) { - modeldict_->insert( name, id ); + modeldict_[ name ] = id; } return id; @@ -248,7 +246,7 @@ ModelManager::copy_node_model_( index old_id, Name new_name ) models_.push_back( new_model ); index new_id = models_.size() - 1; - modeldict_->insert( new_name, new_id ); + modeldict_[ new_name.toString() ] = new_id; #pragma omp parallel { @@ -289,7 +287,7 @@ ModelManager::copy_synapse_model_( index old_id, Name new_name ) prototypes_[ t ][ new_id ]->set_syn_id( new_id ); } - synapsedict_->insert( new_name, new_id ); + synapsedict_[ new_name.toString() ] = static_cast< synindex >( new_id ); kernel().connection_manager.resize_connections(); return new_id; @@ -297,20 +295,17 @@ ModelManager::copy_synapse_model_( index old_id, Name new_name ) void -ModelManager::set_model_defaults( Name name, DictionaryDatum params ) +ModelManager::set_model_defaults( Name name, dictionary params ) { - const Token nodemodel = modeldict_->lookup( name ); - const Token synmodel = synapsedict_->lookup( name ); - index id; - if ( not nodemodel.empty() ) + if ( modeldict_.known( name.toString() ) ) { - id = static_cast< index >( nodemodel ); + id = modeldict_.get< index >( name.toString() ); set_node_defaults_( id, params ); } - else if ( not synmodel.empty() ) + else if ( synapsedict_.known( name.toString() ) ) { - id = static_cast< index >( synmodel ); + id = synapsedict_.get< synindex >( name.toString() ); set_synapse_defaults_( id, params ); } else @@ -323,19 +318,21 @@ ModelManager::set_model_defaults( Name name, DictionaryDatum params ) void -ModelManager::set_node_defaults_( index model_id, const DictionaryDatum& params ) +ModelManager::set_node_defaults_( index model_id, const dictionary& params ) { - params->clear_access_flags(); + // TODO-PYNEST-NG: Access flags + // params->clear_access_flags(); get_model( model_id )->set_status( params ); - ALL_ENTRIES_ACCESSED( *params, "ModelManager::set_node_defaults_", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *params, "ModelManager::set_node_defaults_", "Unread dictionary entries: " ); } void -ModelManager::set_synapse_defaults_( index model_id, const DictionaryDatum& params ) +ModelManager::set_synapse_defaults_( index model_id, const dictionary& params ) { - params->clear_access_flags(); + // TODO-PYNEST-NG: Access flags + // params->clear_access_flags(); assert_valid_syn_id( model_id ); std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() ); @@ -366,7 +363,7 @@ ModelManager::set_synapse_defaults_( index model_id, const DictionaryDatum& para } } - ALL_ENTRIES_ACCESSED( *params, "ModelManager::set_synapse_defaults_", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *params, "ModelManager::set_synapse_defaults_", "Unread dictionary entries: " ); } // TODO: replace int with index and return value -1 with invalid_index, also @@ -387,12 +384,12 @@ ModelManager::get_model_id( const Name name ) const } -DictionaryDatum +dictionary ModelManager::get_connector_defaults( synindex syn_id ) const { assert_valid_syn_id( syn_id ); - DictionaryDatum dict( new Dictionary() ); + dictionary dict; for ( thread t = 0; t < static_cast< thread >( kernel().vp_manager.get_num_threads() ); ++t ) { @@ -400,7 +397,7 @@ ModelManager::get_connector_defaults( synindex syn_id ) const prototypes_[ t ][ syn_id ]->get_status( dict ); } - ( *dict )[ names::num_connections ] = kernel().connection_manager.get_num_connections( syn_id ); + dict[ names::num_connections.toString() ] = kernel().connection_manager.get_num_connections( syn_id ); return dict; } @@ -447,7 +444,7 @@ ModelManager::clear_models_() proxy_nodes_.clear(); dummy_spike_sources_.clear(); - modeldict_->clear(); + modeldict_.clear(); model_defaults_modified_ = false; } @@ -555,7 +552,7 @@ ModelManager::create_secondary_events_prototypes() synindex ModelManager::register_connection_model_( ConnectorModel* cf ) { - if ( synapsedict_->known( cf->get_name() ) ) + if ( synapsedict_.known( cf->get_name() ) ) { delete cf; std::string msg = String::compose( @@ -576,7 +573,7 @@ ModelManager::register_connection_model_( ConnectorModel* cf ) prototypes_[ t ][ syn_id ]->set_syn_id( syn_id ); } - synapsedict_->insert( cf->get_name(), syn_id ); + synapsedict_[ cf->get_name() ] = syn_id; // Need to resize Connector vectors in case connection model is added after // ConnectionManager is initialised. diff --git a/nestkernel/model_manager.h b/nestkernel/model_manager.h index bacfb93f69..cbcf1fe0ca 100644 --- a/nestkernel/model_manager.h +++ b/nestkernel/model_manager.h @@ -71,7 +71,7 @@ class ModelManager : public ManagerInterface /** * */ - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); /** * @@ -117,32 +117,6 @@ class ModelManager : public ManagerInterface index register_node_model( const Name& name, bool private_model = false, std::string deprecation_info = std::string() ); - /** - * Register a pre-configured model prototype with the network. - * This function must be called exactly once for each model class to make - * it known to the network. The natural place for a call to this function - * is in a *module.cpp file. - * - * Pre-configured models are models based on the same class, as - * another model, but have different parameter settings; e.g., - * voltmeter is a pre-configured multimeter. - * - * @param name of the new node model. - * @param private_model if true, don't add model to modeldict. - * @param dictionary to use to pre-configure model - * @param deprecation_info If non-empty string, deprecation warning will - * be issued for model with this info to user. - * - * @return ID of the new model object. - * @see register_private_prototype_model, register_node_model, - * register_prototype_connection - */ - template < class ModelT > - index register_preconf_node_model( const Name& name, - DictionaryDatum& conf, - bool private_model = false, - std::string deprecation_info = std::string() ); - /** * Copy an existing model and register it as a new model. * This function allows users to create their own, cloned models. @@ -152,7 +126,7 @@ class ModelManager : public ManagerInterface * @return model ID of new Model object. * @see copy_node_model_, copy_synapse_model_ */ - index copy_model( Name old_name, Name new_name, DictionaryDatum params ); + index copy_model( Name old_name, Name new_name, dictionary params ); /** * Set the default parameters of a model. @@ -160,7 +134,7 @@ class ModelManager : public ManagerInterface * @param params default parameters to be set. * @see set_node_defaults_, set_synapse_defaults_ */ - void set_model_defaults( Name name, DictionaryDatum params ); + void set_model_defaults( Name name, dictionary params ); /** * Register a synape model with a custom Connector model and without any @@ -194,7 +168,7 @@ class ModelManager : public ManagerInterface */ Model* get_model( index ) const; - DictionaryDatum get_connector_defaults( synindex syn_id ) const; + dictionary get_connector_defaults( synindex syn_id ) const; /** * Checks, whether synapse type requires symmetric connections @@ -234,12 +208,12 @@ class ModelManager : public ManagerInterface /** * @return Reference to the model dictionary */ - DictionaryDatum& get_modeldict(); + dictionary& get_modeldict(); /** * @return Reference to the synapse dictionary */ - DictionaryDatum& get_synapsedict(); + dictionary& get_synapsedict(); /** * Does the network contain copies of models created using CopyModel? @@ -304,7 +278,7 @@ class ModelManager : public ManagerInterface * @param params default parameters to be set. * @see set_model_defaults, set_synapse_defaults_ */ - void set_node_defaults_( index model_id, const DictionaryDatum& params ); + void set_node_defaults_( index model_id, const dictionary& params ); /** * Set the default parameters of a model. @@ -312,7 +286,7 @@ class ModelManager : public ManagerInterface * @param params default parameters to be set. * @see set_model_defaults, set_node_defaults_ */ - void set_synapse_defaults_( index model_id, const DictionaryDatum& params ); + void set_synapse_defaults_( index model_id, const dictionary& params ); //! Compares model ids for sorting in memory_info static bool compare_model_by_id_( const int a, const int b ); @@ -353,7 +327,7 @@ class ModelManager : public ManagerInterface SeeAlso: info, Device, RecordingDevice */ - DictionaryDatum modeldict_; //!< Dictionary of all models + dictionary modeldict_; //!< Dictionary of all models /** @BeginDocumentation Name: synapsedict - Dictionary containing all synapse models. @@ -372,7 +346,7 @@ class ModelManager : public ManagerInterface SeeAlso: info */ - DictionaryDatum synapsedict_; //!< Dictionary of all synapse models + dictionary synapsedict_; //!< Dictionary of all synapse models Model* proxynode_model_; @@ -410,13 +384,13 @@ ModelManager::are_model_defaults_modified() const return model_defaults_modified_; } -inline DictionaryDatum& +inline dictionary& ModelManager::get_modeldict() { return modeldict_; } -inline DictionaryDatum& +inline dictionary& ModelManager::get_synapsedict() { return synapsedict_; diff --git a/nestkernel/model_manager_impl.h b/nestkernel/model_manager_impl.h index b24ca5919c..5a65b73b98 100644 --- a/nestkernel/model_manager_impl.h +++ b/nestkernel/model_manager_impl.h @@ -43,7 +43,7 @@ template < class ModelT > index ModelManager::register_node_model( const Name& name, bool private_model, std::string deprecation_info ) { - if ( not private_model and modeldict_->known( name ) ) + if ( not private_model and modeldict_.known( name.toString() ) ) { std::string msg = String::compose( "A model called '%1' already exists.\n" @@ -56,30 +56,6 @@ ModelManager::register_node_model( const Name& name, bool private_model, std::st return register_node_model_( model, private_model ); } -template < class ModelT > -index -ModelManager::register_preconf_node_model( const Name& name, - DictionaryDatum& conf, - bool private_model, - std::string deprecation_info ) -{ - if ( not private_model and modeldict_->known( name ) ) - { - std::string msg = String::compose( - "A model called '%1' already exists.\n" - "Please choose a different name!", - name ); - throw NamingConflict( msg ); - } - - Model* model = new GenericModel< ModelT >( name.toString(), deprecation_info ); - conf->clear_access_flags(); - model->set_status( conf ); - std::string missed; - // we only get here from C++ code, no need for exception - assert( conf->all_accessed( missed ) ); - return register_node_model_( model, private_model ); -} template < template < typename targetidentifierT > class ConnectionT > void diff --git a/nestkernel/modelrange_manager.h b/nestkernel/modelrange_manager.h index b831aafc43..3b10fd41cc 100644 --- a/nestkernel/modelrange_manager.h +++ b/nestkernel/modelrange_manager.h @@ -49,7 +49,7 @@ class ModelRangeManager : public ManagerInterface virtual void finalize(); virtual void - set_status( const DictionaryDatum& ) + set_status( const dictionary& ) { } virtual void diff --git a/nestkernel/mpi_manager.cpp b/nestkernel/mpi_manager.cpp index 01ccf55f49..18db124dc6 100644 --- a/nestkernel/mpi_manager.cpp +++ b/nestkernel/mpi_manager.cpp @@ -193,13 +193,13 @@ nest::MPIManager::finalize() } void -nest::MPIManager::set_status( const DictionaryDatum& dict ) +nest::MPIManager::set_status( const dictionary& dict ) { - updateValue< bool >( dict, names::adaptive_target_buffers, adaptive_target_buffers_ ); - updateValue< bool >( dict, names::adaptive_spike_buffers, adaptive_spike_buffers_ ); + dict.update_value( names::adaptive_target_buffers.toString(), adaptive_target_buffers_ ); + dict.update_value( names::adaptive_spike_buffers.toString(), adaptive_spike_buffers_ ); long new_buffer_size_target_data = buffer_size_target_data_; - updateValue< long >( dict, names::buffer_size_target_data, new_buffer_size_target_data ); + dict.update_value( names::buffer_size_target_data.toString(), new_buffer_size_target_data ); if ( new_buffer_size_target_data != static_cast< long >( buffer_size_target_data_ ) and new_buffer_size_target_data < static_cast< long >( max_buffer_size_target_data_ ) ) { @@ -207,20 +207,20 @@ nest::MPIManager::set_status( const DictionaryDatum& dict ) } long new_buffer_size_spike_data = buffer_size_spike_data_; - updateValue< long >( dict, names::buffer_size_spike_data, new_buffer_size_spike_data ); + dict.update_value( names::buffer_size_spike_data.toString(), new_buffer_size_spike_data ); if ( new_buffer_size_spike_data != static_cast< long >( buffer_size_spike_data_ ) and new_buffer_size_spike_data < static_cast< long >( max_buffer_size_spike_data_ ) ) { set_buffer_size_spike_data( new_buffer_size_spike_data ); } - updateValue< double >( dict, names::growth_factor_buffer_spike_data, growth_factor_buffer_spike_data_ ); - updateValue< double >( dict, names::growth_factor_buffer_target_data, growth_factor_buffer_target_data_ ); + dict.update_value( names::growth_factor_buffer_spike_data.toString(), growth_factor_buffer_spike_data_ ); + dict.update_value( names::growth_factor_buffer_target_data.toString(), growth_factor_buffer_target_data_ ); - updateValue< long >( dict, names::max_buffer_size_target_data, max_buffer_size_target_data_ ); - updateValue< long >( dict, names::max_buffer_size_spike_data, max_buffer_size_spike_data_ ); + dict.update_value( names::max_buffer_size_target_data.toString(), max_buffer_size_target_data_ ); + dict.update_value( names::max_buffer_size_spike_data.toString(), max_buffer_size_spike_data_ ); - updateValue< double >( dict, names::shrink_factor_buffer_spike_data, shrink_factor_buffer_spike_data_ ); + dict.update_value( names::shrink_factor_buffer_spike_data.toString(), shrink_factor_buffer_spike_data_ ); } void diff --git a/nestkernel/mpi_manager.h b/nestkernel/mpi_manager.h index 5bbe001956..1f3f226830 100644 --- a/nestkernel/mpi_manager.h +++ b/nestkernel/mpi_manager.h @@ -68,7 +68,7 @@ class MPIManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); void init_mpi( int* argc, char** argv[] ); diff --git a/nestkernel/music_manager.cpp b/nestkernel/music_manager.cpp index 35367c65de..d8713d8080 100644 --- a/nestkernel/music_manager.cpp +++ b/nestkernel/music_manager.cpp @@ -73,7 +73,7 @@ MUSICManager::finalize() - set the ... properties */ void -MUSICManager::set_status( const DictionaryDatum& ) +MUSICManager::set_status( const dictionary& ) { } diff --git a/nestkernel/music_manager.h b/nestkernel/music_manager.h index 0daeb314c3..82f27ac27f 100644 --- a/nestkernel/music_manager.h +++ b/nestkernel/music_manager.h @@ -79,7 +79,7 @@ class MUSICManager : public ManagerInterface virtual void initialize(); // called from meta-manager to construct virtual void finalize(); // called from meta-manger to reinit - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); MUSICManager(); diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 203a15f0aa..1e5ba8b527 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -31,12 +31,19 @@ #include "mpi_manager_impl.h" #include "parameter.h" -#include "../models/iaf_psc_alpha.h" +#include "iaf_psc_alpha.h" +#include "static_synapse.h" +#include "connector_model_impl.h" + + +#include "connection_manager_impl.h" #include "model_manager.h" #include "model_manager_impl.h" #include "genericmodel_impl.h" +#include "dictionary.h" + // Includes from sli: #include "sliexceptions.h" @@ -52,6 +59,34 @@ init_nest( int* argc, char** argv[] ) kernel().mpi_manager.init_mpi( argc, argv ); kernel().initialize(); kernel().model_manager.register_node_model< iaf_psc_alpha >( "iaf_psc_alpha" ); + + kernel().model_manager.register_connection_model< static_synapse >( "static_synapse" ); + + + // Add connection rules + kernel().connection_manager.register_conn_builder< OneToOneBuilder >( "one_to_one" ); + kernel().connection_manager.register_conn_builder< AllToAllBuilder >( "all_to_all" ); + kernel().connection_manager.register_conn_builder< FixedInDegreeBuilder >( "fixed_indegree" ); + kernel().connection_manager.register_conn_builder< FixedOutDegreeBuilder >( "fixed_outdegree" ); + kernel().connection_manager.register_conn_builder< BernoulliBuilder >( "pairwise_bernoulli" ); + kernel().connection_manager.register_conn_builder< SymmetricBernoulliBuilder >( "symmetric_pairwise_bernoulli" ); + kernel().connection_manager.register_conn_builder< FixedTotalNumberBuilder >( "fixed_total_number" ); +#ifdef HAVE_LIBNEUROSIM + kernel().connection_manager.register_conn_builder< ConnectionGeneratorBuilder >( "conngen" ); +#endif + + register_parameter< ConstantParameter >( "constant" ); + register_parameter< UniformParameter >( "uniform" ); + register_parameter< UniformIntParameter >( "uniform_int" ); + register_parameter< NormalParameter >( "normal" ); + register_parameter< LognormalParameter >( "lognormal" ); + register_parameter< ExponentialParameter >( "exponential" ); + register_parameter< NodePosParameter >( "position" ); + register_parameter< SpatialDistanceParameter >( "distance" ); + register_parameter< GaussianParameter >( "gaussian" ); + register_parameter< Gaussian2DParameter >( "gaussian2d" ); + register_parameter< GammaParameter >( "gamma" ); + register_parameter< ExpDistParameter >( "exp_distribution" ); } void @@ -96,6 +131,12 @@ pprint_to_string( NodeCollectionPTR nc ) return stream.str(); } +size_t +nc_size( NodeCollectionPTR nc ) +{ + return nc->size(); +} + RngPtr get_rank_synced_rng() @@ -116,11 +157,12 @@ get_vp_specific_rng( thread tid ) } void -set_kernel_status( const DictionaryDatum& dict ) +set_kernel_status( const dictionary& dict ) { - dict->clear_access_flags(); + // TODO-PYNEST-NG: access flags + // dict->clear_access_flags(); kernel().set_status( dict ); - ALL_ENTRIES_ACCESSED( *dict, "SetKernelStatus", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *dict, "SetKernelStatus", "Unread dictionary entries: " ); } dictionary @@ -140,39 +182,42 @@ get_kernel_status() } void -set_node_status( const index node_id, const DictionaryDatum& dict ) +set_node_status( const index node_id, const dictionary& dict ) { kernel().node_manager.set_status( node_id, dict ); } -DictionaryDatum +dictionary get_node_status( const index node_id ) { return kernel().node_manager.get_status( node_id ); } void -set_connection_status( const ConnectionDatum& conn, const DictionaryDatum& dict ) +set_connection_status( const ConnectionDatum& conn, const dictionary& dict ) { - DictionaryDatum conn_dict = conn.get_dict(); - const index source_node_id = getValue< long >( conn_dict, nest::names::source ); - const index target_node_id = getValue< long >( conn_dict, nest::names::target ); - const thread tid = getValue< long >( conn_dict, nest::names::target_thread ); - const synindex syn_id = getValue< long >( conn_dict, nest::names::synapse_modelid ); - const port p = getValue< long >( conn_dict, nest::names::port ); + // TODO_PYNEST-NG: Get ConnectionDatum dict + // DictionaryDatum conn_dict = conn.get_dict(); + dictionary conn_dict; + const index source_node_id = conn_dict.get< long >( nest::names::source.toString() ); + const index target_node_id = conn_dict.get< long >( nest::names::target.toString() ); + const thread tid = conn_dict.get< long >( nest::names::target_thread.toString() ); + const synindex syn_id = conn_dict.get< long >( nest::names::synapse_modelid.toString() ); + const port p = conn_dict.get< long >( nest::names::port.toString() ); - dict->clear_access_flags(); + // TODO_PYNEST-NG: Access flags + // dict->clear_access_flags(); kernel().connection_manager.set_synapse_status( source_node_id, target_node_id, tid, syn_id, p, dict ); - ALL_ENTRIES_ACCESSED2( *dict, - "SetStatus", - "Unread dictionary entries: ", - "Maybe you tried to set common synapse properties through an individual " - "synapse?" ); + // ALL_ENTRIES_ACCESSED2( *dict, + // "SetStatus", + // "Unread dictionary entries: ", + // "Maybe you tried to set common synapse properties through an individual " + // "synapse?" ); } -DictionaryDatum +dictionary get_connection_status( const ConnectionDatum& conn ) { return kernel().connection_manager.get_synapse_status( conn.get_source_node_id(), @@ -190,20 +235,20 @@ create( const std::string model_name, const index n_nodes ) throw RangeCheck(); } - const Token model = kernel().model_manager.get_modeldict()->lookup( model_name ); - if ( model.empty() ) + if ( not kernel().model_manager.get_modeldict().known( model_name ) ) { + std::cerr << "model name: " << model_name << "\n"; throw UnknownModelName( model_name ); } // create - const index model_id = static_cast< index >( model ); + const index model_id = static_cast< index >( kernel().model_manager.get_modeldict().get< index >( model_name ) ); return kernel().node_manager.add_node( model_id, n_nodes ); } NodeCollectionPTR -get_nodes( const DictionaryDatum& params, const bool local_only ) +get_nodes( const dictionary& params, const bool local_only ) { return kernel().node_manager.get_nodes( params, local_only ); } @@ -211,8 +256,8 @@ get_nodes( const DictionaryDatum& params, const bool local_only ) void connect( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& connectivity, - const std::vector< DictionaryDatum >& synapse_params ) + const dictionary& connectivity, + const std::vector< dictionary >& synapse_params ) { kernel().connection_manager.connect( sources, targets, connectivity, synapse_params ); } @@ -286,56 +331,120 @@ cleanup() } void -copy_model( const Name& oldmodname, const Name& newmodname, const DictionaryDatum& dict ) +copy_model( const Name& oldmodname, const Name& newmodname, const dictionary& dict ) { kernel().model_manager.copy_model( oldmodname, newmodname, dict ); } void -set_model_defaults( const Name& modelname, const DictionaryDatum& dict ) +set_model_defaults( const Name& modelname, const dictionary& dict ) { kernel().model_manager.set_model_defaults( modelname, dict ); } -DictionaryDatum +dictionary get_model_defaults( const Name& modelname ) { - const Token nodemodel = kernel().model_manager.get_modeldict()->lookup( modelname ); - const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( modelname ); + // const Token nodemodel = kernel().model_manager.get_modeldict()->lookup( modelname ); + // const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( modelname ); + + dictionary dict; + + // TODO-PYNEST-NG: fix when updating models get_status() + + // if ( not nodemodel.empty() ) + // { + // const long model_id = static_cast< long >( nodemodel ); + // Model* m = kernel().model_manager.get_model( model_id ); + // dict = m->get_status(); + // } + // else if ( not synmodel.empty() ) + // { + // const long synapse_id = static_cast< long >( synmodel ); + // dict = kernel().model_manager.get_connector_defaults( synapse_id ); + // } + // else + // { + // throw UnknownModelName( modelname.toString() ); + // } - DictionaryDatum dict; + return dict; +} - if ( not nodemodel.empty() ) +std::shared_ptr< Parameter > +create_parameter( const boost::any& value ) +{ + if ( is_double( value ) ) + { + return create_parameter( boost::any_cast< double >( value ) ); + } + else if ( is_int( value ) ) { - const long model_id = static_cast< long >( nodemodel ); - Model* m = kernel().model_manager.get_model( model_id ); - dict = m->get_status(); + return create_parameter( boost::any_cast< int >( value ) ); } - else if ( not synmodel.empty() ) + else if ( is_dict( value ) ) { - const long synapse_id = static_cast< long >( synmodel ); - dict = kernel().model_manager.get_connector_defaults( synapse_id ); + return create_parameter( boost::any_cast< dictionary >( value ) ); } - else + else if ( is_parameter( value ) ) { - throw UnknownModelName( modelname.toString() ); + return create_parameter( boost::any_cast< std::shared_ptr< Parameter > >( value ) ); } + throw BadProperty( "Parameter must be parametertype, constant or dictionary." ); +} - return dict; +std::shared_ptr< Parameter > +create_parameter( const std::shared_ptr< Parameter > param ) +{ + // TODO-PYNEST-NG: do we need this function? + return param; } -ParameterDatum -create_parameter( const DictionaryDatum& param_dict ) +std::shared_ptr< Parameter > +create_parameter( const double value ) { - param_dict->clear_access_flags(); + const auto param = new ConstantParameter( value ); + return std::shared_ptr< Parameter >( param ); +} - ParameterDatum datum( NestModule::create_parameter( param_dict ) ); +std::shared_ptr< Parameter > +create_parameter( const int value ) +{ + const auto param = new ConstantParameter( value ); + return std::shared_ptr< Parameter >( param ); +} - ALL_ENTRIES_ACCESSED( *param_dict, "nest::CreateParameter", "Unread dictionary entries: " ); +std::shared_ptr< Parameter > +create_parameter( const dictionary& param_dict ) +{ + // The dictionary should only have a single key, which is the name of + // the parameter type to create. + if ( param_dict.size() != 1 ) + { + throw BadProperty( "Parameter definition dictionary must contain one single key only." ); + } - return datum; + // TODO-PYNEST-NG: Access flags + const auto n = param_dict.begin()->first; + const auto pdict = param_dict.get< dictionary >( n ); + return create_parameter( n, pdict ); } +std::shared_ptr< Parameter > +create_parameter( const std::string& name, const dictionary& d ) +{ + // The parameter factory will create the parameter + return std::shared_ptr< Parameter >( parameter_factory_().create( name, d ) ); +} + +ParameterFactory& +parameter_factory_( void ) +{ + static ParameterFactory factory; + return factory; +} + + double get_value( const ParameterDatum& param ) { @@ -408,4 +517,5 @@ node_collection_array_index( const Datum* datum, const bool* array, unsigned lon return new NodeCollectionDatum( NodeCollection::create( node_ids ) ); } + } // namespace nest diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 97e513fd7d..de590bcd7d 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -97,27 +97,29 @@ void print_nodes_to_stream( std::ostream& out = std::cout ); std::string pprint_to_string( NodeCollectionPTR nc ); +size_t nc_size( NodeCollectionPTR nc ); + RngPtr get_rank_synced_rng(); RngPtr get_vp_synced_rng( thread tid ); RngPtr get_vp_specific_rng( thread tid ); -void set_kernel_status( const DictionaryDatum& dict ); +void set_kernel_status( const dictionary& dict ); dictionary get_kernel_status(); -void set_node_status( const index node_id, const DictionaryDatum& dict ); -DictionaryDatum get_node_status( const index node_id ); +void set_node_status( const index node_id, const dictionary& dict ); +dictionary get_node_status( const index node_id ); -void set_connection_status( const ConnectionDatum& conn, const DictionaryDatum& dict ); -DictionaryDatum get_connection_status( const ConnectionDatum& conn ); +void set_connection_status( const ConnectionDatum& conn, const dictionary& dict ); +dictionary get_connection_status( const ConnectionDatum& conn ); NodeCollectionPTR create( const std::string model_name, const index n ); -NodeCollectionPTR get_nodes( const DictionaryDatum& dict, const bool local_only ); +NodeCollectionPTR get_nodes( const dictionary& dict, const bool local_only ); void connect( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& connectivity, - const std::vector< DictionaryDatum >& synapse_params ); + const dictionary& connectivity, + const std::vector< dictionary >& synapse_params ); /** * @brief Connect arrays of node IDs one-to-one @@ -193,9 +195,24 @@ void cleanup(); void copy_model( const Name& oldmodname, const Name& newmodname, const DictionaryDatum& dict ); void set_model_defaults( const Name& model_name, const DictionaryDatum& ); -DictionaryDatum get_model_defaults( const Name& model_name ); +dictionary get_model_defaults( const Name& model_name ); + +// TODO-PYNEST-NG: static functions? +std::shared_ptr< Parameter > create_parameter( const boost::any& ); +std::shared_ptr< Parameter > create_parameter( const std::shared_ptr< Parameter > ); +std::shared_ptr< Parameter > create_parameter( const double ); +std::shared_ptr< Parameter > create_parameter( const int ); +std::shared_ptr< Parameter > create_parameter( const dictionary& param_dict ); +std::shared_ptr< Parameter > create_parameter( const std::string& name, const dictionary& d ); + +template < class T > +bool register_parameter( const Name& name ); + +using ParameterFactory = GenericFactory< Parameter >; + +ParameterFactory& parameter_factory_(); + -ParameterDatum create_parameter( const DictionaryDatum& param_dict ); double get_value( const ParameterDatum& param ); bool is_spatial( const ParameterDatum& param ); std::vector< double > apply( const ParameterDatum& param, const NodeCollectionDatum& nc ); @@ -203,6 +220,14 @@ std::vector< double > apply( const ParameterDatum& param, const DictionaryDatum& Datum* node_collection_array_index( const Datum* datum, const long* array, unsigned long n ); Datum* node_collection_array_index( const Datum* datum, const bool* array, unsigned long n ); + + +template < class T > +inline bool +register_parameter( const Name& name ) +{ + return parameter_factory_().register_subtype< T >( name ); +} } diff --git a/nestkernel/nestmodule.cpp b/nestkernel/nestmodule.cpp index 49cb51866c..44c3a13d90 100644 --- a/nestkernel/nestmodule.cpp +++ b/nestkernel/nestmodule.cpp @@ -106,54 +106,54 @@ NestModule::commandstring( void ) const return std::string( "(nest-init) run" ); } -ParameterDatum -NestModule::create_parameter( const Token& t ) -{ - // t can be an existing ParameterDatum, a DoubleDatum containing a - // constant value for this parameter, or a Dictionary containing - // parameters - ParameterDatum* pd = dynamic_cast< ParameterDatum* >( t.datum() ); - if ( pd ) - { - return *pd; - } - - // If t is a DoubleDatum, create a ConstantParameter with this value - DoubleDatum* dd = dynamic_cast< DoubleDatum* >( t.datum() ); - if ( dd ) - { - return new ConstantParameter( *dd ); - } - - DictionaryDatum* dictd = dynamic_cast< DictionaryDatum* >( t.datum() ); - if ( dictd ) - { - - // The dictionary should only have a single key, which is the name of - // the parameter type to create. - if ( ( *dictd )->size() != 1 ) - { - throw BadProperty( "Parameter definition dictionary must contain one single key only." ); - } - - Name n = ( *dictd )->begin()->first; - DictionaryDatum pdict = getValue< DictionaryDatum >( *dictd, n ); - return create_parameter( n, pdict ); - } - else - { - throw BadProperty( "Parameter must be parametertype, constant or dictionary." ); - } -} - -Parameter* -NestModule::create_parameter( const Name& name, const DictionaryDatum& d ) -{ - // The parameter factory will create the parameter - Parameter* param = parameter_factory_().create( name, d ); - - return param; -} +// ParameterDatum +// NestModule::create_parameter( const Token& t ) +// { +// // t can be an existing ParameterDatum, a DoubleDatum containing a +// // constant value for this parameter, or a Dictionary containing +// // parameters +// ParameterDatum* pd = dynamic_cast< ParameterDatum* >( t.datum() ); +// if ( pd ) +// { +// return *pd; +// } + +// // If t is a DoubleDatum, create a ConstantParameter with this value +// DoubleDatum* dd = dynamic_cast< DoubleDatum* >( t.datum() ); +// if ( dd ) +// { +// return new ConstantParameter( *dd ); +// } + +// DictionaryDatum* dictd = dynamic_cast< DictionaryDatum* >( t.datum() ); +// if ( dictd ) +// { + +// // The dictionary should only have a single key, which is the name of +// // the parameter type to create. +// if ( ( *dictd )->size() != 1 ) +// { +// throw BadProperty( "Parameter definition dictionary must contain one single key only." ); +// } + +// Name n = ( *dictd )->begin()->first; +// DictionaryDatum pdict = getValue< DictionaryDatum >( *dictd, n ); +// return create_parameter( n, pdict ); +// } +// else +// { +// throw BadProperty( "Parameter must be parametertype, constant or dictionary." ); +// } +// } + +// Parameter* +// NestModule::create_parameter( const Name& name, const DictionaryDatum& d ) +// { +// // The parameter factory will create the parameter +// Parameter* param = parameter_factory_().create( name, d ); + +// return param; +// } GenericFactory< Parameter >& NestModule::parameter_factory_( void ) @@ -173,109 +173,110 @@ NestModule::mask_factory_( void ) MaskDatum NestModule::create_mask( const Token& t ) { - // t can be either an existing MaskDatum, or a Dictionary containing - // mask parameters - MaskDatum* maskd = dynamic_cast< MaskDatum* >( t.datum() ); - if ( maskd ) - { - return *maskd; - } - else - { - - DictionaryDatum* dd = dynamic_cast< DictionaryDatum* >( t.datum() ); - if ( dd == 0 ) - { - throw BadProperty( "Mask must be masktype or dictionary." ); - } - - // The dictionary should contain one key which is the name of the - // mask type, and optionally the key 'anchor'. To find the unknown - // mask type key, we must loop through all keys. The value for the - // anchor key will be stored in the anchor_token variable. - Token anchor_token; - bool has_anchor = false; - AbstractMask* mask = 0; - - for ( Dictionary::iterator dit = ( *dd )->begin(); dit != ( *dd )->end(); ++dit ) - { - - if ( dit->first == names::anchor ) - { - - anchor_token = dit->second; - has_anchor = true; - } - else - { - - if ( mask != 0 ) - { // mask has already been defined - throw BadProperty( "Mask definition dictionary contains extraneous items." ); - } - mask = create_mask( dit->first, getValue< DictionaryDatum >( dit->second ) ); - } - } - - if ( has_anchor ) - { - - // The anchor may be an array of doubles (a spatial position). - // For grid layers only, it is also possible to provide an array of longs. - try - { - std::vector< long > anchor = getValue< std::vector< long > >( anchor_token ); - - switch ( anchor.size() ) - { - case 2: - try - { - GridMask< 2 >& grid_mask_2d = dynamic_cast< GridMask< 2 >& >( *mask ); - grid_mask_2d.set_anchor( Position< 2, int >( anchor[ 0 ], anchor[ 1 ] ) ); - } - catch ( std::bad_cast& e ) - { - throw BadProperty( "Mask must be 2-dimensional grid mask." ); - } - break; - case 3: - try - { - GridMask< 3 >& grid_mask_3d = dynamic_cast< GridMask< 3 >& >( *mask ); - grid_mask_3d.set_anchor( Position< 3, int >( anchor[ 0 ], anchor[ 1 ], anchor[ 2 ] ) ); - } - catch ( std::bad_cast& e ) - { - throw BadProperty( "Mask must be 3-dimensional grid mask." ); - } - break; - } - } - catch ( TypeMismatch& e ) - { - std::vector< double > anchor = getValue< std::vector< double > >( anchor_token ); - AbstractMask* amask; - - switch ( anchor.size() ) - { - case 2: - amask = new AnchoredMask< 2 >( dynamic_cast< Mask< 2 >& >( *mask ), anchor ); - break; - case 3: - amask = new AnchoredMask< 3 >( dynamic_cast< Mask< 3 >& >( *mask ), anchor ); - break; - default: - throw BadProperty( "Anchor must be 2- or 3-dimensional." ); - } - - delete mask; - mask = amask; - } - } - - return mask; - } + // TODO-PYNEST-NG: move and convert to use dictionary + // // t can be either an existing MaskDatum, or a Dictionary containing + // // mask parameters + // MaskDatum* maskd = dynamic_cast< MaskDatum* >( t.datum() ); + // if ( maskd ) + // { + // return *maskd; + // } + // else + // { + + // DictionaryDatum* dd = dynamic_cast< DictionaryDatum* >( t.datum() ); + // if ( dd == 0 ) + // { + // throw BadProperty( "Mask must be masktype or dictionary." ); + // } + + // // The dictionary should contain one key which is the name of the + // // mask type, and optionally the key 'anchor'. To find the unknown + // // mask type key, we must loop through all keys. The value for the + // // anchor key will be stored in the anchor_token variable. + // Token anchor_token; + // bool has_anchor = false; + // AbstractMask* mask = 0; + + // for ( Dictionary::iterator dit = ( *dd )->begin(); dit != ( *dd )->end(); ++dit ) + // { + + // if ( dit->first == names::anchor ) + // { + + // anchor_token = dit->second; + // has_anchor = true; + // } + // else + // { + + // if ( mask != 0 ) + // { // mask has already been defined + // throw BadProperty( "Mask definition dictionary contains extraneous items." ); + // } + // mask = create_mask( dit->first, getValue< DictionaryDatum >( dit->second ) ); + // } + // } + + // if ( has_anchor ) + // { + + // // The anchor may be an array of doubles (a spatial position). + // // For grid layers only, it is also possible to provide an array of longs. + // try + // { + // std::vector< long > anchor = getValue< std::vector< long > >( anchor_token ); + + // switch ( anchor.size() ) + // { + // case 2: + // try + // { + // GridMask< 2 >& grid_mask_2d = dynamic_cast< GridMask< 2 >& >( *mask ); + // grid_mask_2d.set_anchor( Position< 2, int >( anchor[ 0 ], anchor[ 1 ] ) ); + // } + // catch ( std::bad_cast& e ) + // { + // throw BadProperty( "Mask must be 2-dimensional grid mask." ); + // } + // break; + // case 3: + // try + // { + // GridMask< 3 >& grid_mask_3d = dynamic_cast< GridMask< 3 >& >( *mask ); + // grid_mask_3d.set_anchor( Position< 3, int >( anchor[ 0 ], anchor[ 1 ], anchor[ 2 ] ) ); + // } + // catch ( std::bad_cast& e ) + // { + // throw BadProperty( "Mask must be 3-dimensional grid mask." ); + // } + // break; + // } + // } + // catch ( TypeMismatch& e ) + // { + // std::vector< double > anchor = getValue< std::vector< double > >( anchor_token ); + // AbstractMask* amask; + + // switch ( anchor.size() ) + // { + // case 2: + // amask = new AnchoredMask< 2 >( dynamic_cast< Mask< 2 >& >( *mask ), anchor ); + // break; + // case 3: + // amask = new AnchoredMask< 3 >( dynamic_cast< Mask< 3 >& >( *mask ), anchor ); + // break; + // default: + // throw BadProperty( "Anchor must be 2- or 3-dimensional." ); + // } + + // delete mask; + // mask = amask; + // } + // } + + // return mask; + // } } static AbstractMask* @@ -337,7 +338,7 @@ NestModule::SetStatus_idFunction::execute( SLIInterpreter* i ) const DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); index node_id = getValue< long >( i->OStack.pick( 1 ) ); - set_node_status( node_id, dict ); + // set_node_status( node_id, dict ); i->OStack.pop( 2 ); i->EStack.pop(); @@ -351,7 +352,7 @@ NestModule::SetStatus_CDFunction::execute( SLIInterpreter* i ) const DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.pick( 1 ) ); - set_connection_status( conn, dict ); + // set_connection_status( conn, dict ); i->OStack.pop( 2 ); i->EStack.pop(); @@ -364,7 +365,7 @@ NestModule::SetKernelStatus_DFunction::execute( SLIInterpreter* i ) const DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); - set_kernel_status( dict ); + // set_kernel_status( dict ); i->OStack.pop(); i->EStack.pop(); @@ -390,49 +391,49 @@ NestModule::SetStatus_aaFunction::execute( SLIInterpreter* i ) const { i->assert_stack_load( 2 ); - ArrayDatum dict_a = getValue< ArrayDatum >( i->OStack.top() ); - ArrayDatum conn_a = getValue< ArrayDatum >( i->OStack.pick( 1 ) ); - - if ( ( dict_a.size() != 1 ) and ( dict_a.size() != conn_a.size() ) ) - { - throw RangeCheck(); - } - if ( dict_a.size() == 1 ) // Broadcast - { - DictionaryDatum dict = getValue< DictionaryDatum >( dict_a[ 0 ] ); - const size_t n_conns = conn_a.size(); - for ( size_t con = 0; con < n_conns; ++con ) - { - ConnectionDatum con_id = getValue< ConnectionDatum >( conn_a[ con ] ); - dict->clear_access_flags(); - kernel().connection_manager.set_synapse_status( con_id.get_source_node_id(), - con_id.get_target_node_id(), - con_id.get_target_thread(), - con_id.get_synapse_model_id(), - con_id.get_port(), - dict ); - - ALL_ENTRIES_ACCESSED( *dict, "SetStatus", "Unread dictionary entries: " ); - } - } - else - { - const size_t n_conns = conn_a.size(); - for ( size_t con = 0; con < n_conns; ++con ) - { - DictionaryDatum dict = getValue< DictionaryDatum >( dict_a[ con ] ); - ConnectionDatum con_id = getValue< ConnectionDatum >( conn_a[ con ] ); - dict->clear_access_flags(); - kernel().connection_manager.set_synapse_status( con_id.get_source_node_id(), - con_id.get_target_node_id(), - con_id.get_target_thread(), - con_id.get_synapse_model_id(), - con_id.get_port(), - dict ); - - ALL_ENTRIES_ACCESSED( *dict, "SetStatus", "Unread dictionary entries: " ); - } - } + // ArrayDatum dict_a = getValue< ArrayDatum >( i->OStack.top() ); + // ArrayDatum conn_a = getValue< ArrayDatum >( i->OStack.pick( 1 ) ); + + // if ( ( dict_a.size() != 1 ) and ( dict_a.size() != conn_a.size() ) ) + // { + // throw RangeCheck(); + // } + // if ( dict_a.size() == 1 ) // Broadcast + // { + // DictionaryDatum dict = getValue< DictionaryDatum >( dict_a[ 0 ] ); + // const size_t n_conns = conn_a.size(); + // for ( size_t con = 0; con < n_conns; ++con ) + // { + // ConnectionDatum con_id = getValue< ConnectionDatum >( conn_a[ con ] ); + // dict->clear_access_flags(); + // kernel().connection_manager.set_synapse_status( con_id.get_source_node_id(), + // con_id.get_target_node_id(), + // con_id.get_target_thread(), + // con_id.get_synapse_model_id(), + // con_id.get_port(), + // dict ); + + // ALL_ENTRIES_ACCESSED( *dict, "SetStatus", "Unread dictionary entries: " ); + // } + // } + // else + // { + // const size_t n_conns = conn_a.size(); + // for ( size_t con = 0; con < n_conns; ++con ) + // { + // DictionaryDatum dict = getValue< DictionaryDatum >( dict_a[ con ] ); + // ConnectionDatum con_id = getValue< ConnectionDatum >( conn_a[ con ] ); + // dict->clear_access_flags(); + // kernel().connection_manager.set_synapse_status( con_id.get_source_node_id(), + // con_id.get_target_node_id(), + // con_id.get_target_thread(), + // con_id.get_synapse_model_id(), + // con_id.get_port(), + // dict ); + + // ALL_ENTRIES_ACCESSED( *dict, "SetStatus", "Unread dictionary entries: " ); + // } + // } i->OStack.pop( 2 ); i->EStack.pop(); @@ -502,8 +503,8 @@ NestModule::GetStatus_gFunction::execute( SLIInterpreter* i ) const for ( NodeCollection::const_iterator it = nc->begin(); it < nc->end(); ++it ) { index node_id = ( *it ).node_id; - DictionaryDatum dict = get_node_status( node_id ); - result.push_back( dict ); + // DictionaryDatum dict = get_node_status( node_id ); + // result.push_back( dict ); } i->OStack.pop(); @@ -517,10 +518,10 @@ NestModule::GetStatus_iFunction::execute( SLIInterpreter* i ) const i->assert_stack_load( 1 ); index node_id = getValue< long >( i->OStack.pick( 0 ) ); - DictionaryDatum dict = get_node_status( node_id ); + // DictionaryDatum dict = get_node_status( node_id ); i->OStack.pop(); - i->OStack.push( dict ); + // i->OStack.push( dict ); i->EStack.pop(); } @@ -531,14 +532,14 @@ NestModule::GetStatus_CFunction::execute( SLIInterpreter* i ) const ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.pick( 0 ) ); - DictionaryDatum result_dict = kernel().connection_manager.get_synapse_status( conn.get_source_node_id(), - conn.get_target_node_id(), - conn.get_target_thread(), - conn.get_synapse_model_id(), - conn.get_port() ); + // DictionaryDatum result_dict = kernel().connection_manager.get_synapse_status( conn.get_source_node_id(), + // conn.get_target_node_id(), + // conn.get_target_thread(), + // conn.get_synapse_model_id(), + // conn.get_port() ); i->OStack.pop(); - i->OStack.push( result_dict ); + // i->OStack.push( result_dict ); i->EStack.pop(); } @@ -554,12 +555,12 @@ NestModule::GetStatus_aFunction::execute( SLIInterpreter* i ) const for ( size_t nt = 0; nt < n_results; ++nt ) { ConnectionDatum con_id = getValue< ConnectionDatum >( conns.get( nt ) ); - DictionaryDatum result_dict = kernel().connection_manager.get_synapse_status( con_id.get_source_node_id(), - con_id.get_target_node_id(), - con_id.get_target_thread(), - con_id.get_synapse_model_id(), - con_id.get_port() ); - result.push_back( result_dict ); + // DictionaryDatum result_dict = kernel().connection_manager.get_synapse_status( con_id.get_source_node_id(), + // con_id.get_target_node_id(), + // con_id.get_target_thread(), + // con_id.get_synapse_model_id(), + // con_id.get_port() ); + // result.push_back( result_dict ); } i->OStack.pop(); @@ -585,7 +586,7 @@ NestModule::GetMetadata_gFunction::execute( SLIInterpreter* i ) const // return empty dict if NC does not have metadata if ( meta.get() ) { - meta->get_status( dict ); + // meta->get_status( dict ); ( *dict )[ names::network_size ] = nc->size(); } @@ -619,7 +620,7 @@ NestModule::SetDefaults_l_DFunction::execute( SLIInterpreter* i ) const const Name name = getValue< Name >( i->OStack.pick( 1 ) ); DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - kernel().model_manager.set_model_defaults( name, params ); + // kernel().model_manager.set_model_defaults( name, params ); i->OStack.pop( 2 ); i->EStack.pop(); @@ -637,13 +638,13 @@ NestModule::GetDefaults_lFunction::execute( SLIInterpreter* i ) const { i->assert_stack_load( 1 ); - const Name modelname = getValue< Name >( i->OStack.pick( 0 ) ); + // const Name modelname = getValue< Name >( i->OStack.pick( 0 ) ); - DictionaryDatum dict = get_model_defaults( modelname ); + // DictionaryDatum dict = get_model_defaults( modelname ); - i->OStack.pop(); - i->OStack.push( dict ); - i->EStack.pop(); + // i->OStack.pop(); + // i->OStack.push( dict ); + // i->EStack.pop(); } void @@ -788,7 +789,7 @@ NestModule::CopyModel_l_l_DFunction::execute( SLIInterpreter* i ) const const Name new_name = getValue< Name >( i->OStack.pick( 1 ) ); DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - kernel().model_manager.copy_model( old_name, new_name, params ); + // kernel().model_manager.copy_model( old_name, new_name, params ); i->OStack.pop( 3 ); i->EStack.pop(); @@ -847,13 +848,13 @@ NestModule::GetNodes_D_b::execute( SLIInterpreter* i ) const i->assert_stack_load( 2 ); // extract arguments - const bool local_only = getValue< bool >( i->OStack.pick( 0 ) ); - const DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); + // const bool local_only = getValue< bool >( i->OStack.pick( 0 ) ); + // const DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); - NodeCollectionDatum nodes = get_nodes( params, local_only ); + // NodeCollectionDatum nodes = get_nodes( params, local_only ); i->OStack.pop( 2 ); - i->OStack.push( nodes ); + // i->OStack.push( nodes ); i->EStack.pop(); } @@ -895,7 +896,7 @@ NestModule::Disconnect_g_g_D_DFunction::execute( SLIInterpreter* i ) const DictionaryDatum synapse_params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // dictionary access checking is handled by disconnect - kernel().sp_manager.disconnect( sources, targets, connectivity, synapse_params ); + // kernel().sp_manager.disconnect( sources, targets, connectivity, synapse_params ); i->OStack.pop( 4 ); i->EStack.pop(); @@ -906,49 +907,49 @@ NestModule::Disconnect_g_g_D_DFunction::execute( SLIInterpreter* i ) const void NestModule::Connect_g_g_D_DFunction::execute( SLIInterpreter* i ) const { - kernel().connection_manager.sw_construction_connect.start(); + // kernel().connection_manager.sw_construction_connect.start(); i->assert_stack_load( 4 ); - NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) ); - NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) ); - DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); - DictionaryDatum synapse_params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) ); + // NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) ); + // DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); + // DictionaryDatum synapse_params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - // dictionary access checking is handled by connect - kernel().connection_manager.connect( sources, targets, connectivity, { synapse_params } ); + // // dictionary access checking is handled by connect + // kernel().connection_manager.connect( sources, targets, connectivity, { synapse_params } ); - i->OStack.pop( 4 ); - i->EStack.pop(); + // i->OStack.pop( 4 ); + // i->EStack.pop(); - kernel().connection_manager.sw_construction_connect.stop(); + // kernel().connection_manager.sw_construction_connect.stop(); } void NestModule::Connect_g_g_D_aFunction::execute( SLIInterpreter* i ) const { - kernel().connection_manager.sw_construction_connect.start(); + // kernel().connection_manager.sw_construction_connect.start(); i->assert_stack_load( 4 ); - NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) ); - NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) ); - DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); - ArrayDatum synapse_params_arr = getValue< ArrayDatum >( i->OStack.pick( 0 ) ); - std::vector< DictionaryDatum > synapse_params; + // NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) ); + // NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) ); + // DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); + // ArrayDatum synapse_params_arr = getValue< ArrayDatum >( i->OStack.pick( 0 ) ); + // std::vector< DictionaryDatum > synapse_params; - for ( auto syn_param : synapse_params_arr ) - { - synapse_params.push_back( getValue< DictionaryDatum >( syn_param ) ); - } + // for ( auto syn_param : synapse_params_arr ) + // { + // synapse_params.push_back( getValue< DictionaryDatum >( syn_param ) ); + // } - // dictionary access checking is handled by connect - kernel().connection_manager.connect( sources, targets, connectivity, synapse_params ); + // // dictionary access checking is handled by connect + // kernel().connection_manager.connect( sources, targets, connectivity, synapse_params ); - i->OStack.pop( 4 ); - i->EStack.pop(); + // i->OStack.pop( 4 ); + // i->EStack.pop(); - kernel().connection_manager.sw_construction_connect.stop(); + // kernel().connection_manager.sw_construction_connect.stop(); } /** @BeginDocumentation @@ -1710,10 +1711,10 @@ NestModule::CreateParameter_DFunction::execute( SLIInterpreter* i ) const i->assert_stack_load( 1 ); const DictionaryDatum param_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - ParameterDatum datum = nest::create_parameter( param_dict ); + // ParameterDatum datum = nest::create_parameter( param_dict ); i->OStack.pop( 1 ); - i->OStack.push( datum ); + // i->OStack.push( datum ); i->EStack.pop(); } @@ -2142,15 +2143,15 @@ NestModule::CreateLayer_D_DFunction::execute( SLIInterpreter* i ) const DictionaryDatum layer_dict = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - NodeCollectionDatum layer = create_layer( layer_dict ); + // NodeCollectionDatum layer = create_layer( layer_dict ); - for ( auto&& node_id_triple : *layer ) - { - set_node_status( node_id_triple.node_id, params ); - } + // for ( auto&& node_id_triple : *layer ) + // { + // // set_node_status( node_id_triple.node_id, params ); + // } i->OStack.pop( 2 ); - i->OStack.push( layer ); + // i->OStack.push( layer ); i->EStack.pop(); } @@ -2664,7 +2665,7 @@ NestModule::ConnectLayers_g_g_DFunction::execute( SLIInterpreter* i ) const const NodeCollectionDatum target = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) ); const DictionaryDatum connection_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - connect_layers( source, target, connection_dict ); + // connect_layers( source, target, connection_dict ); i->OStack.pop( 3 ); i->EStack.pop(); @@ -2881,203 +2882,204 @@ NestModule::SelectNodesByMask_g_a_MFunction::execute( SLIInterpreter* i ) const void NestModule::init( SLIInterpreter* i ) { - ConnectionType.settypename( "connectiontype" ); - ConnectionType.setdefaultaction( SLIInterpreter::datatypefunction ); - - MaskType.settypename( "masktype" ); - MaskType.setdefaultaction( SLIInterpreter::datatypefunction ); - - NodeCollectionType.settypename( "nodecollectiontype" ); - NodeCollectionType.setdefaultaction( SLIInterpreter::datatypefunction ); - - NodeCollectionIteratorType.settypename( "nodecollectioniteratortype" ); - NodeCollectionIteratorType.setdefaultaction( SLIInterpreter::datatypefunction ); - - ParameterType.settypename( "parametertype" ); - ParameterType.setdefaultaction( SLIInterpreter::datatypefunction ); - - // register interface functions with interpreter - - i->createcommand( "SetStatus_id", &setstatus_idfunction ); - i->createcommand( "SetStatus_CD", &setstatus_CDfunction ); - i->createcommand( "SetStatus_aa", &setstatus_aafunction ); - i->createcommand( "SetKernelStatus", &setkernelstatus_Dfunction ); - - i->createcommand( "GetStatus_g", &getstatus_gfunction ); - i->createcommand( "GetStatus_i", &getstatus_ifunction ); - i->createcommand( "GetStatus_C", &getstatus_Cfunction ); - i->createcommand( "GetStatus_a", &getstatus_afunction ); - i->createcommand( "GetMetadata_g", &getmetadata_gfunction ); - i->createcommand( "GetKernelStatus", &getkernelstatus_function ); + assert( false ); + // ConnectionType.settypename( "connectiontype" ); + // ConnectionType.setdefaultaction( SLIInterpreter::datatypefunction ); - i->createcommand( "GetConnections_D", &getconnections_Dfunction ); - i->createcommand( "cva_C", &cva_cfunction ); + // MaskType.settypename( "masktype" ); + // MaskType.setdefaultaction( SLIInterpreter::datatypefunction ); - i->createcommand( "Simulate_d", &simulatefunction ); - i->createcommand( "Run_d", &runfunction ); - i->createcommand( "Prepare", &preparefunction ); - i->createcommand( "Cleanup", &cleanupfunction ); - - i->createcommand( "CopyModel_l_l_D", ©model_l_l_Dfunction ); - i->createcommand( "SetDefaults_l_D", &setdefaults_l_Dfunction ); - i->createcommand( "GetDefaults_l", &getdefaults_lfunction ); - - i->createcommand( "Create_l_i", &create_l_ifunction ); - - i->createcommand( "GetNodes_D_b", &getnodes_D_bfunction ); - - i->createcommand( "mul_P_P", &mul_P_Pfunction ); - i->createcommand( "div_P_P", &div_P_Pfunction ); - i->createcommand( "add_P_P", &add_P_Pfunction ); - i->createcommand( "sub_P_P", &sub_P_Pfunction ); - - i->createcommand( "compare_P_P_D", &compare_P_P_Dfunction ); - i->createcommand( "conditional_P_P_P", &conditional_P_P_Pfunction ); - - i->createcommand( "min_P_d", &min_P_dfunction ); - i->createcommand( "max_P_d", &max_P_dfunction ); - i->createcommand( "redraw_P_d_d", &redraw_P_d_dfunction ); - - i->createcommand( "exp_P", &exp_Pfunction ); - i->createcommand( "sin_P", &sin_Pfunction ); - i->createcommand( "cos_P", &cos_Pfunction ); - i->createcommand( "pow_P_d", &pow_P_dfunction ); - - i->createcommand( "dimension2d_P_P", &dimension2d_P_Pfunction ); - i->createcommand( "dimension3d_P_P_P", &dimension3d_P_P_Pfunction ); - - i->createcommand( "CreateParameter_D", &createparameter_Dfunction ); - - i->createcommand( "GetValue_P", &getvalue_Pfunction ); - i->createcommand( "IsSpatial_P", &isspatial_Pfunction ); - i->createcommand( "Apply_P_D", &apply_P_Dfunction ); - i->createcommand( "Apply_P_g", &apply_P_gfunction ); - - i->createcommand( "Connect_g_g_D_D", &connect_g_g_D_Dfunction ); - i->createcommand( "Connect_g_g_D_a", &connect_g_g_D_afunction ); - - i->createcommand( "ResetKernel", &resetkernelfunction ); - - i->createcommand( "MemoryInfo", &memoryinfofunction ); - - i->createcommand( "PrintNodes", &printnodesfunction ); - i->createcommand( "PrintNodesToStream", &printnodestostreamfunction ); - - i->createcommand( "Rank", &rankfunction ); - i->createcommand( "NumProcesses", &numprocessesfunction ); - i->createcommand( "SetFakeNumProcesses", &setfakenumprocesses_ifunction ); - i->createcommand( "SyncProcesses", &syncprocessesfunction ); - i->createcommand( "TimeCommunication_i_i_b", &timecommunication_i_i_bfunction ); - i->createcommand( "TimeCommunicationv_i_i", &timecommunicationv_i_ifunction ); - i->createcommand( "TimeCommunicationAlltoall_i_i", &timecommunicationalltoall_i_ifunction ); - i->createcommand( "TimeCommunicationAlltoallv_i_i", &timecommunicationalltoallv_i_ifunction ); - i->createcommand( "ProcessorName", &processornamefunction ); -#ifdef HAVE_MPI - i->createcommand( "MPI_Abort", &mpiabort_ifunction ); -#endif - - i->createcommand( "cvdict_C", &cvdict_Cfunction ); - - i->createcommand( "cvnodecollection_i_i", &cvnodecollection_i_ifunction ); - i->createcommand( "cvnodecollection_ia", &cvnodecollection_iafunction ); - i->createcommand( "cvnodecollection_iv", &cvnodecollection_ivfunction ); - i->createcommand( "cva_g", &cva_gfunction ); - i->createcommand( "size_g", &size_gfunction ); - i->createcommand( "ValidQ_g", &validq_gfunction ); - i->createcommand( "join_g_g", &join_g_gfunction ); - i->createcommand( "MemberQ_g_i", &memberq_g_ifunction ); - i->createcommand( "Find_g_i", &find_g_ifunction ); - i->createcommand( "eq_g", &eq_gfunction ); - i->createcommand( ":beginiterator_g", &beginiterator_gfunction ); - i->createcommand( ":enditerator_g", &enditerator_gfunction ); - i->createcommand( ":getnodeid_q", &getnodeid_qfunction ); - i->createcommand( ":getnodeidmodelid_q", &getnodeidmodelid_qfunction ); - i->createcommand( ":next_q", &next_qfunction ); - i->createcommand( ":eq_q_q", &eq_q_qfunction ); - i->createcommand( ":lt_q_q", <_q_qfunction ); - i->createcommand( "get_g_i", &get_g_ifunction ); - i->createcommand( "Take_g_a", &take_g_afunction ); - -#ifdef HAVE_MUSIC - i->createcommand( "SetAcceptableLatency", &setacceptablelatency_l_dfunction ); - i->createcommand( "SetMaxBuffered", &setmaxbuffered_l_ifunction ); -#endif - i->createcommand( "EnableStructuralPlasticity", &enablestructuralplasticity_function ); - i->createcommand( "DisableStructuralPlasticity", &disablestructuralplasticity_function ); - i->createcommand( "Disconnect_g_g_D_D", &disconnect_g_g_D_Dfunction ); - - i->createcommand( "SetStdpEps", &setstdpeps_dfunction ); - - // SLI functions for spatial networks - i->createcommand( "CreateLayer_D_D", &createlayer_D_Dfunction ); - i->createcommand( "GetPosition_g", &getposition_gfunction ); - i->createcommand( "Displacement_g_g", &displacement_g_gfunction ); - i->createcommand( "Displacement_a_g", &displacement_a_gfunction ); - i->createcommand( "Distance_g_g", &distance_g_gfunction ); - i->createcommand( "Distance_a_g", &distance_a_gfunction ); - i->createcommand( "Distance_a", &distance_afunction ); - i->createcommand( "CreateMask_D", &createmask_Dfunction ); - i->createcommand( "Inside_a_M", &inside_a_Mfunction ); - i->createcommand( "and_M_M", &and_M_Mfunction ); - i->createcommand( "or_M_M", &or_M_Mfunction ); - i->createcommand( "sub_M_M", &sub_M_Mfunction ); - i->createcommand( "ConnectLayers_g_g_D", &connectlayers_g_g_Dfunction ); - i->createcommand( "GetLayerStatus_g", &getlayerstatus_gfunction ); - i->createcommand( "DumpLayerNodes_os_g", &dumplayernodes_os_gfunction ); - i->createcommand( "DumpLayerConnections_os_g_g_l", &dumplayerconnections_os_g_g_lfunction ); - i->createcommand( "cvdict_M", &cvdict_Mfunction ); - i->createcommand( "SelectNodesByMask_g_a_M", &selectnodesbymask_g_a_Mfunction ); - - - // Add connection rules - kernel().connection_manager.register_conn_builder< OneToOneBuilder >( "one_to_one" ); - kernel().connection_manager.register_conn_builder< AllToAllBuilder >( "all_to_all" ); - kernel().connection_manager.register_conn_builder< FixedInDegreeBuilder >( "fixed_indegree" ); - kernel().connection_manager.register_conn_builder< FixedOutDegreeBuilder >( "fixed_outdegree" ); - kernel().connection_manager.register_conn_builder< BernoulliBuilder >( "pairwise_bernoulli" ); - kernel().connection_manager.register_conn_builder< SymmetricBernoulliBuilder >( "symmetric_pairwise_bernoulli" ); - kernel().connection_manager.register_conn_builder< FixedTotalNumberBuilder >( "fixed_total_number" ); -#ifdef HAVE_LIBNEUROSIM - kernel().connection_manager.register_conn_builder< ConnectionGeneratorBuilder >( "conngen" ); -#endif - - // Add MSP growth curves - kernel().sp_manager.register_growth_curve< GrowthCurveSigmoid >( "sigmoid" ); - kernel().sp_manager.register_growth_curve< GrowthCurveGaussian >( "gaussian" ); - kernel().sp_manager.register_growth_curve< GrowthCurveLinear >( "linear" ); - - Token statusd = i->baselookup( Name( "statusdict" ) ); - DictionaryDatum dd = getValue< DictionaryDatum >( statusd ); - dd->insert( Name( "kernelname" ), new StringDatum( "NEST" ) ); - dd->insert( Name( "is_mpi" ), new BoolDatum( kernel().mpi_manager.is_mpi_used() ) ); - - register_parameter< ConstantParameter >( "constant" ); - register_parameter< UniformParameter >( "uniform" ); - register_parameter< UniformIntParameter >( "uniform_int" ); - register_parameter< NormalParameter >( "normal" ); - register_parameter< LognormalParameter >( "lognormal" ); - register_parameter< ExponentialParameter >( "exponential" ); - register_parameter< NodePosParameter >( "position" ); - register_parameter< SpatialDistanceParameter >( "distance" ); - register_parameter< GaussianParameter >( "gaussian" ); - register_parameter< Gaussian2DParameter >( "gaussian2d" ); - register_parameter< GammaParameter >( "gamma" ); - register_parameter< ExpDistParameter >( "exp_distribution" ); - -#ifdef HAVE_LIBNEUROSIM - i->createcommand( "CGParse", &cgparse_sfunction ); - i->createcommand( "CGParseFile", &cgparsefile_sfunction ); - i->createcommand( "CGSelectImplementation", &cgselectimplementation_s_sfunction ); -#endif + // NodeCollectionType.settypename( "nodecollectiontype" ); + // NodeCollectionType.setdefaultaction( SLIInterpreter::datatypefunction ); - register_mask< BallMask< 2 > >(); - register_mask< BallMask< 3 > >(); - register_mask< EllipseMask< 2 > >(); - register_mask< EllipseMask< 3 > >(); - register_mask< BoxMask< 2 > >(); - register_mask< BoxMask< 3 > >(); - register_mask( "doughnut", create_doughnut ); - register_mask< GridMask< 2 > >(); + // NodeCollectionIteratorType.settypename( "nodecollectioniteratortype" ); + // NodeCollectionIteratorType.setdefaultaction( SLIInterpreter::datatypefunction ); + + // ParameterType.settypename( "parametertype" ); + // ParameterType.setdefaultaction( SLIInterpreter::datatypefunction ); + + // // register interface functions with interpreter + + // i->createcommand( "SetStatus_id", &setstatus_idfunction ); + // i->createcommand( "SetStatus_CD", &setstatus_CDfunction ); + // i->createcommand( "SetStatus_aa", &setstatus_aafunction ); + // i->createcommand( "SetKernelStatus", &setkernelstatus_Dfunction ); + + // i->createcommand( "GetStatus_g", &getstatus_gfunction ); + // i->createcommand( "GetStatus_i", &getstatus_ifunction ); + // i->createcommand( "GetStatus_C", &getstatus_Cfunction ); + // i->createcommand( "GetStatus_a", &getstatus_afunction ); + // i->createcommand( "GetMetadata_g", &getmetadata_gfunction ); + // i->createcommand( "GetKernelStatus", &getkernelstatus_function ); + + // i->createcommand( "GetConnections_D", &getconnections_Dfunction ); + // i->createcommand( "cva_C", &cva_cfunction ); + + // i->createcommand( "Simulate_d", &simulatefunction ); + // i->createcommand( "Run_d", &runfunction ); + // i->createcommand( "Prepare", &preparefunction ); + // i->createcommand( "Cleanup", &cleanupfunction ); + + // i->createcommand( "CopyModel_l_l_D", ©model_l_l_Dfunction ); + // i->createcommand( "SetDefaults_l_D", &setdefaults_l_Dfunction ); + // i->createcommand( "GetDefaults_l", &getdefaults_lfunction ); + + // i->createcommand( "Create_l_i", &create_l_ifunction ); + + // i->createcommand( "GetNodes_D_b", &getnodes_D_bfunction ); + + // i->createcommand( "mul_P_P", &mul_P_Pfunction ); + // i->createcommand( "div_P_P", &div_P_Pfunction ); + // i->createcommand( "add_P_P", &add_P_Pfunction ); + // i->createcommand( "sub_P_P", &sub_P_Pfunction ); + + // i->createcommand( "compare_P_P_D", &compare_P_P_Dfunction ); + // i->createcommand( "conditional_P_P_P", &conditional_P_P_Pfunction ); + + // i->createcommand( "min_P_d", &min_P_dfunction ); + // i->createcommand( "max_P_d", &max_P_dfunction ); + // i->createcommand( "redraw_P_d_d", &redraw_P_d_dfunction ); + + // i->createcommand( "exp_P", &exp_Pfunction ); + // i->createcommand( "sin_P", &sin_Pfunction ); + // i->createcommand( "cos_P", &cos_Pfunction ); + // i->createcommand( "pow_P_d", &pow_P_dfunction ); + + // i->createcommand( "dimension2d_P_P", &dimension2d_P_Pfunction ); + // i->createcommand( "dimension3d_P_P_P", &dimension3d_P_P_Pfunction ); + + // i->createcommand( "CreateParameter_D", &createparameter_Dfunction ); + + // i->createcommand( "GetValue_P", &getvalue_Pfunction ); + // i->createcommand( "IsSpatial_P", &isspatial_Pfunction ); + // i->createcommand( "Apply_P_D", &apply_P_Dfunction ); + // i->createcommand( "Apply_P_g", &apply_P_gfunction ); + + // i->createcommand( "Connect_g_g_D_D", &connect_g_g_D_Dfunction ); + // i->createcommand( "Connect_g_g_D_a", &connect_g_g_D_afunction ); + + // i->createcommand( "ResetKernel", &resetkernelfunction ); + + // i->createcommand( "MemoryInfo", &memoryinfofunction ); + + // i->createcommand( "PrintNodes", &printnodesfunction ); + // i->createcommand( "PrintNodesToStream", &printnodestostreamfunction ); + + // i->createcommand( "Rank", &rankfunction ); + // i->createcommand( "NumProcesses", &numprocessesfunction ); + // i->createcommand( "SetFakeNumProcesses", &setfakenumprocesses_ifunction ); + // i->createcommand( "SyncProcesses", &syncprocessesfunction ); + // i->createcommand( "TimeCommunication_i_i_b", &timecommunication_i_i_bfunction ); + // i->createcommand( "TimeCommunicationv_i_i", &timecommunicationv_i_ifunction ); + // i->createcommand( "TimeCommunicationAlltoall_i_i", &timecommunicationalltoall_i_ifunction ); + // i->createcommand( "TimeCommunicationAlltoallv_i_i", &timecommunicationalltoallv_i_ifunction ); + // i->createcommand( "ProcessorName", &processornamefunction ); + // #ifdef HAVE_MPI + // i->createcommand( "MPI_Abort", &mpiabort_ifunction ); + // #endif + + // i->createcommand( "cvdict_C", &cvdict_Cfunction ); + + // i->createcommand( "cvnodecollection_i_i", &cvnodecollection_i_ifunction ); + // i->createcommand( "cvnodecollection_ia", &cvnodecollection_iafunction ); + // i->createcommand( "cvnodecollection_iv", &cvnodecollection_ivfunction ); + // i->createcommand( "cva_g", &cva_gfunction ); + // i->createcommand( "size_g", &size_gfunction ); + // i->createcommand( "ValidQ_g", &validq_gfunction ); + // i->createcommand( "join_g_g", &join_g_gfunction ); + // i->createcommand( "MemberQ_g_i", &memberq_g_ifunction ); + // i->createcommand( "Find_g_i", &find_g_ifunction ); + // i->createcommand( "eq_g", &eq_gfunction ); + // i->createcommand( ":beginiterator_g", &beginiterator_gfunction ); + // i->createcommand( ":enditerator_g", &enditerator_gfunction ); + // i->createcommand( ":getnodeid_q", &getnodeid_qfunction ); + // i->createcommand( ":getnodeidmodelid_q", &getnodeidmodelid_qfunction ); + // i->createcommand( ":next_q", &next_qfunction ); + // i->createcommand( ":eq_q_q", &eq_q_qfunction ); + // i->createcommand( ":lt_q_q", <_q_qfunction ); + // i->createcommand( "get_g_i", &get_g_ifunction ); + // i->createcommand( "Take_g_a", &take_g_afunction ); + + // #ifdef HAVE_MUSIC + // i->createcommand( "SetAcceptableLatency", &setacceptablelatency_l_dfunction ); + // i->createcommand( "SetMaxBuffered", &setmaxbuffered_l_ifunction ); + // #endif + // i->createcommand( "EnableStructuralPlasticity", &enablestructuralplasticity_function ); + // i->createcommand( "DisableStructuralPlasticity", &disablestructuralplasticity_function ); + // i->createcommand( "Disconnect_g_g_D_D", &disconnect_g_g_D_Dfunction ); + + // i->createcommand( "SetStdpEps", &setstdpeps_dfunction ); + + // // SLI functions for spatial networks + // i->createcommand( "CreateLayer_D_D", &createlayer_D_Dfunction ); + // i->createcommand( "GetPosition_g", &getposition_gfunction ); + // i->createcommand( "Displacement_g_g", &displacement_g_gfunction ); + // i->createcommand( "Displacement_a_g", &displacement_a_gfunction ); + // i->createcommand( "Distance_g_g", &distance_g_gfunction ); + // i->createcommand( "Distance_a_g", &distance_a_gfunction ); + // i->createcommand( "Distance_a", &distance_afunction ); + // i->createcommand( "CreateMask_D", &createmask_Dfunction ); + // i->createcommand( "Inside_a_M", &inside_a_Mfunction ); + // i->createcommand( "and_M_M", &and_M_Mfunction ); + // i->createcommand( "or_M_M", &or_M_Mfunction ); + // i->createcommand( "sub_M_M", &sub_M_Mfunction ); + // i->createcommand( "ConnectLayers_g_g_D", &connectlayers_g_g_Dfunction ); + // i->createcommand( "GetLayerStatus_g", &getlayerstatus_gfunction ); + // i->createcommand( "DumpLayerNodes_os_g", &dumplayernodes_os_gfunction ); + // i->createcommand( "DumpLayerConnections_os_g_g_l", &dumplayerconnections_os_g_g_lfunction ); + // i->createcommand( "cvdict_M", &cvdict_Mfunction ); + // i->createcommand( "SelectNodesByMask_g_a_M", &selectnodesbymask_g_a_Mfunction ); + + + // // Add connection rules + // kernel().connection_manager.register_conn_builder< OneToOneBuilder >( "one_to_one" ); + // kernel().connection_manager.register_conn_builder< AllToAllBuilder >( "all_to_all" ); + // kernel().connection_manager.register_conn_builder< FixedInDegreeBuilder >( "fixed_indegree" ); + // kernel().connection_manager.register_conn_builder< FixedOutDegreeBuilder >( "fixed_outdegree" ); + // kernel().connection_manager.register_conn_builder< BernoulliBuilder >( "pairwise_bernoulli" ); + // kernel().connection_manager.register_conn_builder< SymmetricBernoulliBuilder >( "symmetric_pairwise_bernoulli" ); + // kernel().connection_manager.register_conn_builder< FixedTotalNumberBuilder >( "fixed_total_number" ); + // #ifdef HAVE_LIBNEUROSIM + // kernel().connection_manager.register_conn_builder< ConnectionGeneratorBuilder >( "conngen" ); + // #endif + + // // Add MSP growth curves + // kernel().sp_manager.register_growth_curve< GrowthCurveSigmoid >( "sigmoid" ); + // kernel().sp_manager.register_growth_curve< GrowthCurveGaussian >( "gaussian" ); + // kernel().sp_manager.register_growth_curve< GrowthCurveLinear >( "linear" ); + + // Token statusd = i->baselookup( Name( "statusdict" ) ); + // DictionaryDatum dd = getValue< DictionaryDatum >( statusd ); + // dd->insert( Name( "kernelname" ), new StringDatum( "NEST" ) ); + // dd->insert( Name( "is_mpi" ), new BoolDatum( kernel().mpi_manager.is_mpi_used() ) ); + + // register_parameter< ConstantParameter >( "constant" ); + // register_parameter< UniformParameter >( "uniform" ); + // register_parameter< UniformIntParameter >( "uniform_int" ); + // register_parameter< NormalParameter >( "normal" ); + // register_parameter< LognormalParameter >( "lognormal" ); + // register_parameter< ExponentialParameter >( "exponential" ); + // register_parameter< NodePosParameter >( "position" ); + // register_parameter< SpatialDistanceParameter >( "distance" ); + // register_parameter< GaussianParameter >( "gaussian" ); + // register_parameter< Gaussian2DParameter >( "gaussian2d" ); + // register_parameter< GammaParameter >( "gamma" ); + // register_parameter< ExpDistParameter >( "exp_distribution" ); + + // #ifdef HAVE_LIBNEUROSIM + // i->createcommand( "CGParse", &cgparse_sfunction ); + // i->createcommand( "CGParseFile", &cgparsefile_sfunction ); + // i->createcommand( "CGSelectImplementation", &cgselectimplementation_s_sfunction ); + // #endif + + // register_mask< BallMask< 2 > >(); + // register_mask< BallMask< 3 > >(); + // register_mask< EllipseMask< 2 > >(); + // register_mask< EllipseMask< 3 > >(); + // register_mask< BoxMask< 2 > >(); + // register_mask< BoxMask< 3 > >(); + // register_mask( "doughnut", create_doughnut ); + // register_mask< GridMask< 2 > >(); } } // namespace nest diff --git a/nestkernel/nestmodule.h b/nestkernel/nestmodule.h index fa5deb2bda..d169137aa1 100644 --- a/nestkernel/nestmodule.h +++ b/nestkernel/nestmodule.h @@ -75,8 +75,8 @@ class NestModule : public SLIModule const std::string commandstring( void ) const; const std::string name( void ) const; - static sharedPtrDatum< Parameter, &ParameterType > create_parameter( const Token& ); - static Parameter* create_parameter( const Name& name, const DictionaryDatum& d ); + // static sharedPtrDatum< Parameter, &ParameterType > create_parameter( const Token& ); + // static Parameter* create_parameter( const Name& name, const DictionaryDatum& d ); using ParameterFactory = GenericFactory< Parameter >; using ParameterCreatorFunction = GenericFactory< Parameter >::CreatorFunction; @@ -125,7 +125,7 @@ class NestModule : public SLIModule * @param d Dictionary with parameters specific for this mask type. * @returns dynamically allocated new Mask object. */ - static AbstractMask* create_mask( const Name& name, const DictionaryDatum& d ); + static AbstractMask* create_mask( const Name& name, const dictionary& d ); /** * @defgroup NestSliInterface SLI Interface functions of the NEST kernel. @@ -822,11 +822,11 @@ NestModule::register_mask( const Name& name, MaskCreatorFunction creator ) return mask_factory_().register_subtype( name, creator ); } -inline AbstractMask* -NestModule::create_mask( const Name& name, const DictionaryDatum& d ) -{ - return mask_factory_().create( name, d ); -} +// inline AbstractMask* +// NestModule::create_mask( const Name& name, const dictionary& d ) +// { +// return mask_factory_().create( name, d ); +// } } // namespace diff --git a/nestkernel/node.cpp b/nestkernel/node.cpp index 3f3fdd9e90..7c9e1ff639 100644 --- a/nestkernel/node.cpp +++ b/nestkernel/node.cpp @@ -126,10 +126,10 @@ Node::get_model_() const return *kernel().model_manager.get_model( model_id_ ); } -DictionaryDatum +dictionary Node::get_status_dict_() { - return DictionaryDatum( new Dictionary ); + return {}; } void @@ -144,25 +144,25 @@ Node::get_local_device_id() const assert( false && "set_local_device_id() called on a non-device node." ); } -DictionaryDatum +dictionary Node::get_status_base() { - DictionaryDatum dict = get_status_dict_(); + dictionary dict = get_status_dict_(); // add information available for all nodes - ( *dict )[ names::local ] = kernel().node_manager.is_local_node( this ); - ( *dict )[ names::model ] = LiteralDatum( get_name() ); - ( *dict )[ names::global_id ] = get_node_id(); - ( *dict )[ names::vp ] = get_vp(); - ( *dict )[ names::element_type ] = LiteralDatum( get_element_type() ); + dict[ names::local.toString() ] = kernel().node_manager.is_local_node( this ); + dict[ names::model.toString() ] = LiteralDatum( get_name() ); + dict[ names::global_id.toString() ] = get_node_id(); + dict[ names::vp.toString() ] = get_vp(); + dict[ names::element_type.toString() ] = LiteralDatum( get_element_type() ); // add information available only for local nodes if ( not is_proxy() ) { - ( *dict )[ names::frozen ] = is_frozen(); - ( *dict )[ names::node_uses_wfr ] = node_uses_wfr(); - ( *dict )[ names::thread_local_id ] = get_thread_lid(); - ( *dict )[ names::thread ] = get_thread(); + dict[ names::frozen.toString() ] = is_frozen(); + dict[ names::node_uses_wfr.toString() ] = node_uses_wfr(); + dict[ names::thread_local_id.toString() ] = get_thread_lid(); + dict[ names::thread.toString() ] = get_thread(); } // now call the child class' hook @@ -172,7 +172,7 @@ Node::get_status_base() } void -Node::set_status_base( const DictionaryDatum& dict ) +Node::set_status_base( const dictionary& dict ) { try { @@ -184,7 +184,7 @@ Node::set_status_base( const DictionaryDatum& dict ) String::compose( "Setting status of a '%1' with node ID %2: %3", get_name(), get_node_id(), e.message() ) ); } - updateValue< bool >( dict, names::frozen, frozen_ ); + dict.update_value( names::frozen.toString(), frozen_ ); } /** diff --git a/nestkernel/node.h b/nestkernel/node.h index b85be6dd0a..a911502fe7 100644 --- a/nestkernel/node.h +++ b/nestkernel/node.h @@ -341,7 +341,7 @@ class Node * @param d Dictionary with named parameter settings. * @ingroup status_interface */ - virtual void set_status( const DictionaryDatum& ) = 0; + virtual void set_status( const dictionary& ) = 0; /** * Export properties of the node by setting @@ -349,7 +349,7 @@ class Node * @param d Dictionary. * @ingroup status_interface */ - virtual void get_status( DictionaryDatum& ) const = 0; + virtual void get_status( dictionary& ) const = 0; public: /** @@ -777,7 +777,7 @@ class Node * calls the custom function get_status(DictionaryDatum) with * the created status dictionary as argument. */ - DictionaryDatum get_status_base(); + dictionary get_status_base(); /** * Set status dictionary of a node. @@ -785,7 +785,7 @@ class Node * Forwards to set_status() of the derived class. * @internal */ - void set_status_base( const DictionaryDatum& ); + void set_status_base( const dictionary& ); /** * Returns true if node is model prototype. @@ -835,7 +835,7 @@ class Node * permanent status dictionary which is then returned by * get_status_dict_(). */ - virtual DictionaryDatum get_status_dict_(); + virtual dictionary get_status_dict_(); protected: /** diff --git a/nestkernel/node_collection.h b/nestkernel/node_collection.h index d06142273e..12f264df17 100644 --- a/nestkernel/node_collection.h +++ b/nestkernel/node_collection.h @@ -32,6 +32,7 @@ // Includes from libnestuil: #include "lockptr.h" +#include "dictionary.h" // Includes from nestkernel: #include "exceptions.h" @@ -63,8 +64,8 @@ class NodeCollectionMetadata NodeCollectionMetadata() = default; virtual ~NodeCollectionMetadata() = default; - virtual void set_status( const DictionaryDatum&, bool ) = 0; - virtual void get_status( DictionaryDatum& ) const = 0; + virtual void set_status( const dictionary&, bool ) = 0; + virtual void get_status( dictionary& ) const = 0; virtual void set_first_node_id( index ) = 0; virtual index get_first_node_id() const = 0; diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp index d9112e9ba5..227bc29ce1 100644 --- a/nestkernel/node_manager.cpp +++ b/nestkernel/node_manager.cpp @@ -81,14 +81,14 @@ NodeManager::finalize() destruct_nodes_(); } -DictionaryDatum +dictionary NodeManager::get_status( index idx ) { Node* target = get_mpi_local_node_or_device_head( idx ); assert( target != 0 ); - DictionaryDatum d = target->get_status_base(); + dictionary d = target->get_status_base(); return d; } @@ -307,11 +307,11 @@ NodeManager::add_music_nodes_( Model& model, index min_node_id, index max_node_i } NodeCollectionPTR -NodeManager::get_nodes( const DictionaryDatum& params, const bool local_only ) +NodeManager::get_nodes( const dictionary& params, const bool local_only ) { std::vector< long > nodes; - if ( params->empty() ) + if ( params.empty() ) { std::vector< std::vector< long > > nodes_on_thread; nodes_on_thread.resize( kernel().vp_manager.get_num_threads() ); @@ -341,13 +341,12 @@ NodeManager::get_nodes( const DictionaryDatum& params, const bool local_only ) bool match = true; index node_id = node.get_node_id(); - DictionaryDatum node_status = get_status( node_id ); - for ( Dictionary::iterator dict_entry = params->begin(); dict_entry != params->end(); ++dict_entry ) + dictionary node_status = get_status( node_id ); + for ( auto& entry : params ) { - if ( node_status->known( dict_entry->first ) ) + if ( node_status.known( entry.first ) ) { - const Token token = node_status->lookup( dict_entry->first ); - if ( not( token == dict_entry->second or token.matches_as_string( dict_entry->second ) ) ) + if ( not value_equal( node_status.at( entry.first ), entry.second ) ) { match = false; break; @@ -599,20 +598,21 @@ NodeManager::destruct_nodes_() } void -NodeManager::set_status_single_node_( Node& target, const DictionaryDatum& d, bool clear_flags ) +NodeManager::set_status_single_node_( Node& target, const dictionary& d, bool clear_flags ) { // proxies have no properties if ( not target.is_proxy() ) { - if ( clear_flags ) - { - d->clear_access_flags(); - } + // TODO-PYNEST-NG: access flags + // if ( clear_flags ) + // { + // d->clear_access_flags(); + // } target.set_status_base( d ); // TODO: Not sure this check should be at single neuron level; advantage is // it stops after first failure. - ALL_ENTRIES_ACCESSED( *d, "NodeManager::set_status", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *d, "NodeManager::set_status", "Unread dictionary entries: " ); } } @@ -779,7 +779,7 @@ NodeManager::print( std::ostream& out ) const } void -NodeManager::set_status( index node_id, const DictionaryDatum& d ) +NodeManager::set_status( index node_id, const dictionary& d ) { for ( thread t = 0; t < kernel().vp_manager.get_num_threads(); ++t ) { @@ -799,7 +799,7 @@ NodeManager::get_status( dictionary& d ) } void -NodeManager::set_status( const DictionaryDatum& ) +NodeManager::set_status( const dictionary& ) { } } diff --git a/nestkernel/node_manager.h b/nestkernel/node_manager.h index 86da75c265..7fce635e8a 100644 --- a/nestkernel/node_manager.h +++ b/nestkernel/node_manager.h @@ -55,14 +55,14 @@ class NodeManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); /** * Get properties of a node. The specified node must exist. * @throws nest::UnknownNode Target does not exist in the network. */ - DictionaryDatum get_status( index ); + dictionary get_status( index ); /** * Set properties of a Node. The specified node must exist. @@ -71,7 +71,7 @@ class NodeManager : public ManagerInterface * entry. * @throws TypeMismatch Array is not a flat & homogeneous array of integers. */ - void set_status( index, const DictionaryDatum& ); + void set_status( index, const dictionary& ); /** * Add a number of nodes to the network. @@ -99,7 +99,7 @@ class NodeManager : public ManagerInterface * * @returns NodeCollection as lock pointer */ - NodeCollectionPTR get_nodes( const DictionaryDatum& dict, const bool local_only ); + NodeCollectionPTR get_nodes( const dictionary& dict, const bool local_only ); /** * Return total number of network nodes. @@ -247,7 +247,7 @@ class NodeManager : public ManagerInterface * each call so Node::set_status_() * @throws UnaccessedDictionaryEntry */ - void set_status_single_node_( Node&, const DictionaryDatum&, bool clear_flags = true ); + void set_status_single_node_( Node&, const dictionary&, bool clear_flags = true ); /** * Initialized buffers, register in list of nodes to update/finalize. diff --git a/nestkernel/parameter.cpp b/nestkernel/parameter.cpp index f1fee95c9e..db84756e26 100644 --- a/nestkernel/parameter.cpp +++ b/nestkernel/parameter.cpp @@ -78,12 +78,12 @@ Parameter::apply( const NodeCollectionPTR& nc, const TokenArray& token_array ) return result; } -NormalParameter::NormalParameter( const DictionaryDatum& d ) +NormalParameter::NormalParameter( const dictionary& d ) : mean_( 0.0 ) , std_( 1.0 ) { - updateValue< double >( d, names::mean, mean_ ); - updateValue< double >( d, names::std, std_ ); + d.update_value( names::mean.toString(), mean_ ); + d.update_value( names::std.toString(), std_ ); if ( std_ <= 0 ) { throw BadProperty( "nest::NormalParameter: std > 0 required." ); @@ -104,12 +104,12 @@ NormalParameter::value( RngPtr rng, Node* node ) } -LognormalParameter::LognormalParameter( const DictionaryDatum& d ) +LognormalParameter::LognormalParameter( const dictionary& d ) : mean_( 0.0 ) , std_( 1.0 ) { - updateValue< double >( d, names::mean, mean_ ); - updateValue< double >( d, names::std, std_ ); + d.update_value( names::mean.toString(), mean_ ); + d.update_value( names::std.toString(), std_ ); if ( std_ <= 0 ) { throw BadProperty( "nest::LognormalParameter: std > 0 required." ); @@ -255,12 +255,12 @@ RedrawParameter::value( RngPtr rng, } -ExpDistParameter::ExpDistParameter( const DictionaryDatum& d ) +ExpDistParameter::ExpDistParameter( const dictionary& d ) : Parameter( true ) - , p_( getValue< ParameterDatum >( d, "x" ) ) - , inv_beta_( 1.0 / getValue< double >( d, "beta" ) ) + , p_( d.get< ParameterDatum >( "x" ) ) + , inv_beta_( 1.0 / d.get< double >( "beta" ) ) { - const auto beta = getValue< double >( d, "beta" ); + const auto beta = d.get< double >( "beta" ); if ( beta <= 0 ) { throw BadProperty( "beta > 0 required for exponential distribution parameter, got beta=" + std::to_string( beta ) ); @@ -277,13 +277,13 @@ ExpDistParameter::value( RngPtr rng, return std::exp( -p_->value( rng, source_pos, target_pos, layer, node ) * inv_beta_ ); } -GaussianParameter::GaussianParameter( const DictionaryDatum& d ) +GaussianParameter::GaussianParameter( const dictionary& d ) : Parameter( true ) - , p_( getValue< ParameterDatum >( d, "x" ) ) - , mean_( getValue< double >( d, "mean" ) ) - , inv_two_std2_( 1.0 / ( 2 * getValue< double >( d, "std" ) * getValue< double >( d, "std" ) ) ) + , p_( d.get< ParameterDatum >( "x" ) ) + , mean_( d.get< double >( "mean" ) ) + , inv_two_std2_( 1.0 / ( 2 * d.get< double >( "std" ) * d.get< double >( "std" ) ) ) { - const auto std = getValue< double >( d, "std" ); + const auto std = d.get< double >( "std" ); if ( std <= 0 ) { throw BadProperty( "std > 0 required for gaussian distribution parameter, got std=" + std::to_string( std ) ); @@ -302,23 +302,22 @@ GaussianParameter::value( RngPtr rng, } -Gaussian2DParameter::Gaussian2DParameter( const DictionaryDatum& d ) +Gaussian2DParameter::Gaussian2DParameter( const dictionary& d ) : Parameter( true ) - , px_( getValue< ParameterDatum >( d, "x" ) ) - , py_( getValue< ParameterDatum >( d, "y" ) ) - , mean_x_( getValue< double >( d, "mean_x" ) ) - , mean_y_( getValue< double >( d, "mean_y" ) ) - , x_term_const_( 1. / ( 2. * ( 1. - getValue< double >( d, "rho" ) * getValue< double >( d, "rho" ) ) - * getValue< double >( d, "std_x" ) * getValue< double >( d, "std_x" ) ) ) - , y_term_const_( 1. / ( 2. * ( 1. - getValue< double >( d, "rho" ) * getValue< double >( d, "rho" ) ) - * getValue< double >( d, "std_y" ) * getValue< double >( d, "std_y" ) ) ) - , xy_term_const_( - getValue< double >( d, "rho" ) / ( ( 1. - getValue< double >( d, "rho" ) * getValue< double >( d, "rho" ) ) - * getValue< double >( d, "std_x" ) * getValue< double >( d, "std_y" ) ) ) -{ - const auto rho = getValue< double >( d, "rho" ); - const auto std_x = getValue< double >( d, "std_x" ); - const auto std_y = getValue< double >( d, "std_y" ); + , px_( d.get< ParameterDatum >( "x" ) ) + , py_( d.get< ParameterDatum >( "y" ) ) + , mean_x_( d.get< double >( "mean_x" ) ) + , mean_y_( d.get< double >( "mean_y" ) ) + , x_term_const_( 1. / ( 2. * ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) * d.get< double >( "std_x" ) + * d.get< double >( "std_x" ) ) ) + , y_term_const_( 1. / ( 2. * ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) * d.get< double >( "std_y" ) + * d.get< double >( "std_y" ) ) ) + , xy_term_const_( d.get< double >( "rho" ) / ( ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) + * d.get< double >( "std_x" ) * d.get< double >( "std_y" ) ) ) +{ + const auto rho = d.get< double >( "rho" ); + const auto std_x = d.get< double >( "std_x" ); + const auto std_y = d.get< double >( "std_y" ); if ( rho >= 1 or rho <= -1 ) { throw BadProperty( @@ -349,18 +348,18 @@ Gaussian2DParameter::value( RngPtr rng, } -GammaParameter::GammaParameter( const DictionaryDatum& d ) +GammaParameter::GammaParameter( const dictionary& d ) : Parameter( true ) - , p_( getValue< ParameterDatum >( d, "x" ) ) - , kappa_( getValue< double >( d, "kappa" ) ) - , inv_theta_( 1.0 / getValue< double >( d, "theta" ) ) + , p_( d.get< ParameterDatum >( "x" ) ) + , kappa_( d.get< double >( "kappa" ) ) + , inv_theta_( 1.0 / d.get< double >( "theta" ) ) , delta_( std::pow( inv_theta_, kappa_ ) / std::tgamma( kappa_ ) ) { if ( kappa_ <= 0 ) { throw BadProperty( "kappa > 0 required for gamma distribution parameter, got kappa=" + std::to_string( kappa_ ) ); } - const auto theta = getValue< double >( d, "theta" ); + const auto theta = d.get< double >( "theta" ); if ( theta <= 0 ) { throw BadProperty( "theta > 0 required for gamma distribution parameter, got theta=" + std::to_string( theta ) ); diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h index e5576b0b28..84b795a26d 100644 --- a/nestkernel/parameter.h +++ b/nestkernel/parameter.h @@ -27,6 +27,8 @@ #include #include +#include "boost/any.hpp" + // Includes from nestkernel: #include "nest_names.h" #include "nest_types.h" @@ -145,9 +147,9 @@ class ConstantParameter : public Parameter * The dictionary must include the following entry: * value - constant value of this parameter */ - ConstantParameter( const DictionaryDatum& d ) + ConstantParameter( const dictionary& d ) { - value_ = getValue< double >( d, "value" ); + value_ = d.get< double >( "value" ); returns_int_only_ = value_is_integer_( value_ ); } @@ -183,12 +185,12 @@ class UniformParameter : public Parameter * min - minimum value * max - maximum value */ - UniformParameter( const DictionaryDatum& d ) + UniformParameter( const dictionary& d ) : lower_( 0.0 ) , range_( 1.0 ) { - updateValue< double >( d, names::min, lower_ ); - updateValue< double >( d, names::max, range_ ); + d.update_value( names::min.toString(), lower_ ); + d.update_value( names::max.toString(), range_ ); if ( lower_ >= range_ ) { throw BadProperty( @@ -224,11 +226,11 @@ class UniformIntParameter : public Parameter * The dictionary can include the following entries: * max - maximum value */ - UniformIntParameter( const DictionaryDatum& d ) + UniformIntParameter( const dictionary& d ) : Parameter( false, true ) , max_( 1.0 ) { - updateValue< long >( d, names::max, max_ ); + d.update_value( names::max.toString(), max_ ); if ( max_ <= 0 ) { throw BadProperty( "nest::UniformIntParameter: max > 0 required." ); @@ -262,7 +264,7 @@ class NormalParameter : public Parameter * mean - mean value * std - standard deviation */ - NormalParameter( const DictionaryDatum& d ); + NormalParameter( const dictionary& d ); double value( RngPtr rng, Node* node ) override; @@ -288,7 +290,7 @@ class LognormalParameter : public Parameter * mean - mean value of logarithm * sigma - standard distribution of logarithm */ - LognormalParameter( const DictionaryDatum& d ); + LognormalParameter( const dictionary& d ); double value( RngPtr rng, Node* node ) override; @@ -313,10 +315,10 @@ class ExponentialParameter : public Parameter * The dictionary can include the following entries: * beta - the scale parameter */ - ExponentialParameter( const DictionaryDatum& d ) + ExponentialParameter( const dictionary& d ) : beta_( 1.0 ) { - updateValue< double >( d, names::beta, beta_ ); + d.update_value( names::beta.toString(), beta_ ); } double @@ -347,12 +349,12 @@ class NodePosParameter : public Parameter * from the presynaptic or postsynaptic node in a connection. * 0: unspecified, 1: presynaptic, 2: postsynaptic. */ - NodePosParameter( const DictionaryDatum& d ) + NodePosParameter( const dictionary& d ) : Parameter( true ) , dimension_( 0 ) , synaptic_endpoint_( 0 ) { - bool dimension_specified = updateValue< long >( d, names::dimension, dimension_ ); + bool dimension_specified = d.update_value( names::dimension.toString(), dimension_ ); if ( not dimension_specified ) { throw BadParameterValue( "Dimension must be specified when creating a node position parameter." ); @@ -361,7 +363,7 @@ class NodePosParameter : public Parameter { throw BadParameterValue( "Node position parameter dimension cannot be negative." ); } - updateValue< long >( d, names::synaptic_endpoint, synaptic_endpoint_ ); + d.update_value( names::synaptic_endpoint.toString(), synaptic_endpoint_ ); if ( synaptic_endpoint_ < 0 or 2 < synaptic_endpoint_ ) { throw BadParameterValue( "Synaptic endpoint must either be unspecified (0), source (1) or target (2)." ); @@ -417,11 +419,11 @@ class NodePosParameter : public Parameter class SpatialDistanceParameter : public Parameter { public: - SpatialDistanceParameter( const DictionaryDatum& d ) + SpatialDistanceParameter( const dictionary& d ) : Parameter( true ) , dimension_( 0 ) { - updateValue< long >( d, names::dimension, dimension_ ); + d.update_value( names::dimension.toString(), dimension_ ); if ( dimension_ < 0 ) { throw BadParameterValue( "Spatial distance parameter dimension cannot be negative." ); @@ -1264,7 +1266,7 @@ class ExpDistParameter : public Parameter /** * Construct the parameter from a dictionary of arguments. */ - ExpDistParameter( const DictionaryDatum& d ); + ExpDistParameter( const dictionary& d ); /** * Copy constructor. @@ -1310,7 +1312,7 @@ class GaussianParameter : public Parameter /** * Construct the parameter from a dictionary of arguments. */ - GaussianParameter( const DictionaryDatum& d ); + GaussianParameter( const dictionary& d ); /** * Copy constructor. @@ -1357,7 +1359,7 @@ class Gaussian2DParameter : public Parameter /** * Construct the parameter from a dictionary of arguments. */ - Gaussian2DParameter( const DictionaryDatum& d ); + Gaussian2DParameter( const dictionary& d ); /** * Copy constructor. @@ -1412,7 +1414,7 @@ class GammaParameter : public Parameter /** * Construct the parameter from a dictionary of arguments. */ - GammaParameter( const DictionaryDatum& d ); + GammaParameter( const dictionary& d ); /** * Copy constructor. diff --git a/nestkernel/proxynode.cpp b/nestkernel/proxynode.cpp index 2b89200277..d46f368ad4 100644 --- a/nestkernel/proxynode.cpp +++ b/nestkernel/proxynode.cpp @@ -87,11 +87,11 @@ proxynode::sends_signal() const } void -proxynode::get_status( DictionaryDatum& d ) const +proxynode::get_status( dictionary& d ) const { const Model* model = kernel().model_manager.get_model( model_id_ ); const Name element_type = model->get_prototype().get_element_type(); - ( *d )[ names::element_type ] = LiteralDatum( element_type ); + d[ names::element_type.toString() ] = LiteralDatum( element_type ); } diff --git a/nestkernel/proxynode.h b/nestkernel/proxynode.h index bc0878e877..56d8b91146 100644 --- a/nestkernel/proxynode.h +++ b/nestkernel/proxynode.h @@ -94,7 +94,7 @@ class proxynode : public Node { } - void get_status( DictionaryDatum& ) const; + void get_status( dictionary& ) const; /** * Proxy nodes have no properties. @@ -104,7 +104,7 @@ class proxynode : public Node * problems with dictionary entry checking */ void - set_status( const DictionaryDatum& ) + set_status( const dictionary& ) { assert( false ); } diff --git a/nestkernel/random_manager.cpp b/nestkernel/random_manager.cpp index 12570367ba..9f8d9ec340 100644 --- a/nestkernel/random_manager.cpp +++ b/nestkernel/random_manager.cpp @@ -139,10 +139,10 @@ nest::RandomManager::get_status( dictionary& d ) } void -nest::RandomManager::set_status( const DictionaryDatum& d ) +nest::RandomManager::set_status( const dictionary& d ) { long rng_seed; - bool rng_seed_updated = updateValue< long >( d, names::rng_seed, rng_seed ); + bool rng_seed_updated = d.update_value( names::rng_seed.toString(), rng_seed ); if ( rng_seed_updated ) { @@ -155,7 +155,7 @@ nest::RandomManager::set_status( const DictionaryDatum& d ) } std::string rng_type; - bool rng_type_updated = updateValue< std::string >( d, names::rng_type, rng_type ); + bool rng_type_updated = d.update_value( names::rng_type.toString(), rng_type ); if ( rng_type_updated ) { @@ -170,7 +170,7 @@ nest::RandomManager::set_status( const DictionaryDatum& d ) } // If number of threads has been changed, we need to update the RNGs. - bool n_threads_updated = d->known( names::local_num_threads ); + bool n_threads_updated = d.known( names::local_num_threads.toString() ); if ( n_threads_updated or rng_seed_updated or rng_type_updated ) { reset_rngs_(); diff --git a/nestkernel/random_manager.h b/nestkernel/random_manager.h index 94ff37413c..5e50c3ecdb 100644 --- a/nestkernel/random_manager.h +++ b/nestkernel/random_manager.h @@ -59,7 +59,7 @@ class RandomManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); /** diff --git a/nestkernel/recording_backend.h b/nestkernel/recording_backend.h index 382b7a6a0b..1246ba5143 100644 --- a/nestkernel/recording_backend.h +++ b/nestkernel/recording_backend.h @@ -118,7 +118,7 @@ class RecordingBackend * * @ingroup NESTio */ - virtual void enroll( const RecordingDevice& device, const DictionaryDatum& params ) = 0; + virtual void enroll( const RecordingDevice& device, const dictionary& params ) = 0; /** * Disenroll a `RecordingDevice` from the `RecordingBackend`. @@ -258,7 +258,7 @@ class RecordingBackend * * @ingroup NESTio */ - virtual void set_status( const DictionaryDatum& params ) = 0; + virtual void set_status( const dictionary& params ) = 0; /** * Return the status of the recording backend by writing it to the given @@ -289,7 +289,7 @@ class RecordingBackend * * @ingroup NESTio */ - virtual void check_device_status( const DictionaryDatum& params ) const = 0; + virtual void check_device_status( const dictionary& params ) const = 0; /** * Return the per-device defaults by writing it to the given params @@ -301,7 +301,7 @@ class RecordingBackend * * @ingroup NESTio */ - virtual void get_device_defaults( DictionaryDatum& params ) const = 0; + virtual void get_device_defaults( dictionary& params ) const = 0; /** * Return the per-device status of the given recording device by @@ -318,7 +318,7 @@ class RecordingBackend * * @ingroup NESTio */ - virtual void get_device_status( const RecordingDevice& device, DictionaryDatum& params ) const = 0; + virtual void get_device_status( const RecordingDevice& device, dictionary& params ) const = 0; static const std::vector< Name > NO_DOUBLE_VALUE_NAMES; static const std::vector< Name > NO_LONG_VALUE_NAMES; diff --git a/nestkernel/recording_backend_ascii.cpp b/nestkernel/recording_backend_ascii.cpp index 70ba43f6ac..a5321b1d98 100644 --- a/nestkernel/recording_backend_ascii.cpp +++ b/nestkernel/recording_backend_ascii.cpp @@ -56,7 +56,7 @@ nest::RecordingBackendASCII::finalize() } void -nest::RecordingBackendASCII::enroll( const RecordingDevice& device, const DictionaryDatum& params ) +nest::RecordingBackendASCII::enroll( const RecordingDevice& device, const dictionary& params ) { const thread t = device.get_thread(); const index node_id = device.get_node_id(); @@ -181,7 +181,7 @@ nest::RecordingBackendASCII::prepare() } void -nest::RecordingBackendASCII::set_status( const DictionaryDatum& ) +nest::RecordingBackendASCII::set_status( const dictionary& ) { // nothing to do } @@ -193,21 +193,21 @@ nest::RecordingBackendASCII::get_status( dictionary& ) const } void -nest::RecordingBackendASCII::check_device_status( const DictionaryDatum& params ) const +nest::RecordingBackendASCII::check_device_status( const dictionary& params ) const { DeviceData dd( "", "" ); dd.set_status( params ); // throws if params contains invalid entries } void -nest::RecordingBackendASCII::get_device_defaults( DictionaryDatum& params ) const +nest::RecordingBackendASCII::get_device_defaults( dictionary& params ) const { DeviceData dd( "", "" ); dd.get_status( params ); } void -nest::RecordingBackendASCII::get_device_status( const nest::RecordingDevice& device, DictionaryDatum& d ) const +nest::RecordingBackendASCII::get_device_status( const nest::RecordingDevice& device, dictionary& d ) const { const thread t = device.get_thread(); const index node_id = device.get_node_id(); @@ -323,26 +323,25 @@ nest::RecordingBackendASCII::DeviceData::write( const Event& event, } void -nest::RecordingBackendASCII::DeviceData::get_status( DictionaryDatum& d ) const +nest::RecordingBackendASCII::DeviceData::get_status( dictionary& d ) const { - ( *d )[ names::file_extension ] = file_extension_; - ( *d )[ names::precision ] = precision_; - ( *d )[ names::time_in_steps ] = time_in_steps_; + d[ names::file_extension.toString() ] = file_extension_; + d[ names::precision.toString() ] = precision_; + d[ names::time_in_steps.toString() ] = time_in_steps_; std::string filename = compute_filename_(); - initialize_property_array( d, names::filenames ); - append_property( d, names::filenames, filename ); + d[ names::filenames.toString() ] = std::vector< std::string >( { filename } ); } void -nest::RecordingBackendASCII::DeviceData::set_status( const DictionaryDatum& d ) +nest::RecordingBackendASCII::DeviceData::set_status( const dictionary& d ) { - updateValue< std::string >( d, names::file_extension, file_extension_ ); - updateValue< long >( d, names::precision, precision_ ); - updateValue< std::string >( d, names::label, label_ ); + d.update_value( names::file_extension.toString(), file_extension_ ); + d.update_value( names::precision.toString(), precision_ ); + d.update_value( names::label.toString(), label_ ); bool time_in_steps = false; - if ( updateValue< bool >( d, names::time_in_steps, time_in_steps ) ) + if ( d.update_value( names::time_in_steps.toString(), time_in_steps ) ) { if ( kernel().simulation_manager.has_been_simulated() ) { diff --git a/nestkernel/recording_backend_ascii.h b/nestkernel/recording_backend_ascii.h index efe969cc9e..71ffce5975 100644 --- a/nestkernel/recording_backend_ascii.h +++ b/nestkernel/recording_backend_ascii.h @@ -159,7 +159,7 @@ class RecordingBackendASCII : public RecordingBackend void finalize() override; - void enroll( const RecordingDevice& device, const DictionaryDatum& params ) override; + void enroll( const RecordingDevice& device, const dictionary& params ) override; void disenroll( const RecordingDevice& device ) override; @@ -182,12 +182,12 @@ class RecordingBackendASCII : public RecordingBackend void write( const RecordingDevice&, const Event&, const std::vector< double >&, const std::vector< long >& ) override; - void set_status( const DictionaryDatum& ) override; + void set_status( const dictionary& ) override; void get_status( dictionary& ) const override; - void check_device_status( const DictionaryDatum& ) const override; - void get_device_defaults( DictionaryDatum& ) const override; - void get_device_status( const RecordingDevice& device, DictionaryDatum& ) const override; + void check_device_status( const dictionary& ) const override; + void get_device_defaults( dictionary& ) const override; + void get_device_status( const RecordingDevice& device, dictionary& ) const override; private: const std::string compute_vp_node_id_string_( const RecordingDevice& device ) const; @@ -201,8 +201,8 @@ class RecordingBackendASCII : public RecordingBackend void write( const Event&, const std::vector< double >&, const std::vector< long >& ); void flush_file(); void close_file(); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: long precision_; //!< Number of decimal places used when writing decimal values diff --git a/nestkernel/recording_backend_memory.cpp b/nestkernel/recording_backend_memory.cpp index 236134b1d7..8ca85c686d 100644 --- a/nestkernel/recording_backend_memory.cpp +++ b/nestkernel/recording_backend_memory.cpp @@ -47,7 +47,7 @@ nest::RecordingBackendMemory::finalize() } void -nest::RecordingBackendMemory::enroll( const RecordingDevice& device, const DictionaryDatum& params ) +nest::RecordingBackendMemory::enroll( const RecordingDevice& device, const dictionary& params ) { thread t = device.get_thread(); index node_id = device.get_node_id(); @@ -113,21 +113,21 @@ nest::RecordingBackendMemory::write( const RecordingDevice& device, } void -nest::RecordingBackendMemory::check_device_status( const DictionaryDatum& params ) const +nest::RecordingBackendMemory::check_device_status( const dictionary& params ) const { DeviceData dd; dd.set_status( params ); // throws if params contains invalid entries } void -nest::RecordingBackendMemory::get_device_defaults( DictionaryDatum& params ) const +nest::RecordingBackendMemory::get_device_defaults( dictionary& params ) const { DeviceData dd; dd.get_status( params ); } void -nest::RecordingBackendMemory::get_device_status( const RecordingDevice& device, DictionaryDatum& d ) const +nest::RecordingBackendMemory::get_device_status( const RecordingDevice& device, dictionary& d ) const { const thread t = device.get_thread(); const index node_id = device.get_node_id(); @@ -158,7 +158,7 @@ nest::RecordingBackendMemory::get_status( dictionary& ) const } void -nest::RecordingBackendMemory::set_status( lockPTRDatum< Dictionary, &SLIInterpreter::Dictionarytype > const& ) +nest::RecordingBackendMemory::set_status( const dictionary& ) { // nothing to do } @@ -215,18 +215,18 @@ nest::RecordingBackendMemory::DeviceData::push_back( const Event& event, } void -nest::RecordingBackendMemory::DeviceData::get_status( DictionaryDatum& d ) const +nest::RecordingBackendMemory::DeviceData::get_status( dictionary& d ) const { DictionaryDatum events; - if ( not d->known( names::events ) ) + if ( not d.known( names::events.toString() ) ) { events = DictionaryDatum( new Dictionary ); - ( *d )[ names::events ] = events; + d[ names::events.toString() ] = events; } else { - events = getValue< DictionaryDatum >( d, names::events ); + events = d.get< DictionaryDatum >( names::events.toString() ); } initialize_property_intvector( events, names::senders ); @@ -257,14 +257,14 @@ nest::RecordingBackendMemory::DeviceData::get_status( DictionaryDatum& d ) const append_property( events, long_value_names_[ i ], long_values_[ i ] ); } - ( *d )[ names::time_in_steps ] = time_in_steps_; + d[ names::time_in_steps.toString() ] = time_in_steps_; } void -nest::RecordingBackendMemory::DeviceData::set_status( const DictionaryDatum& d ) +nest::RecordingBackendMemory::DeviceData::set_status( const dictionary& d ) { bool time_in_steps = false; - if ( updateValue< bool >( d, names::time_in_steps, time_in_steps ) ) + if ( d.update_value( names::time_in_steps.toString(), time_in_steps ) ) { if ( kernel().simulation_manager.has_been_simulated() ) { @@ -275,7 +275,7 @@ nest::RecordingBackendMemory::DeviceData::set_status( const DictionaryDatum& d ) } size_t n_events = 1; - if ( updateValue< long >( d, names::n_events, n_events ) and n_events == 0 ) + if ( d.update_value( names::n_events.toString(), n_events ) and n_events == 0 ) { clear(); } diff --git a/nestkernel/recording_backend_memory.h b/nestkernel/recording_backend_memory.h index 0557a36ce3..d9128a116d 100644 --- a/nestkernel/recording_backend_memory.h +++ b/nestkernel/recording_backend_memory.h @@ -118,7 +118,7 @@ class RecordingBackendMemory : public RecordingBackend void initialize() override; void finalize() override; - void enroll( const RecordingDevice& device, const DictionaryDatum& params ) override; + void enroll( const RecordingDevice& device, const dictionary& params ) override; void disenroll( const RecordingDevice& device ) override; @@ -138,13 +138,13 @@ class RecordingBackendMemory : public RecordingBackend void post_step_hook() override; - void set_status( const DictionaryDatum& ) override; + void set_status( const dictionary& ) override; void get_status( dictionary& ) const override; - void check_device_status( const DictionaryDatum& ) const override; - void get_device_defaults( DictionaryDatum& ) const override; - void get_device_status( const RecordingDevice& device, DictionaryDatum& ) const override; + void check_device_status( const dictionary& ) const override; + void get_device_defaults( dictionary& ) const override; + void get_device_status( const RecordingDevice& device, dictionary& ) const override; private: struct DeviceData @@ -152,8 +152,8 @@ class RecordingBackendMemory : public RecordingBackend DeviceData(); void set_value_names( const std::vector< Name >&, const std::vector< Name >& ); void push_back( const Event&, const std::vector< double >&, const std::vector< long >& ); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); private: void clear(); diff --git a/nestkernel/recording_backend_mpi.cpp b/nestkernel/recording_backend_mpi.cpp index 18a2b8cee6..89c4e4b03d 100644 --- a/nestkernel/recording_backend_mpi.cpp +++ b/nestkernel/recording_backend_mpi.cpp @@ -69,7 +69,7 @@ nest::RecordingBackendMPI::finalize() } void -nest::RecordingBackendMPI::enroll( const RecordingDevice& device, const DictionaryDatum& ) +nest::RecordingBackendMPI::enroll( const RecordingDevice& device, const dictionary& ) { if ( device.get_type() == RecordingDevice::SPIKE_RECORDER ) { @@ -297,19 +297,19 @@ nest::RecordingBackendMPI::cleanup() } void -nest::RecordingBackendMPI::check_device_status( const DictionaryDatum& ) const +nest::RecordingBackendMPI::check_device_status( const dictionary& ) const { // nothing to do } void -nest::RecordingBackendMPI::get_device_defaults( DictionaryDatum& ) const +nest::RecordingBackendMPI::get_device_defaults( dictionary& ) const { // nothing to do } void -nest::RecordingBackendMPI::get_device_status( const nest::RecordingDevice&, DictionaryDatum& ) const +nest::RecordingBackendMPI::get_device_status( const nest::RecordingDevice&, dictionary& ) const { // nothing to do } @@ -349,7 +349,7 @@ nest::RecordingBackendMPI::get_status( dictionary& ) const } void -nest::RecordingBackendMPI::set_status( const DictionaryDatum& ) +nest::RecordingBackendMPI::set_status( const dictionary& ) { // nothing to do } diff --git a/nestkernel/recording_backend_mpi.h b/nestkernel/recording_backend_mpi.h index b431293231..eeae4ca973 100644 --- a/nestkernel/recording_backend_mpi.h +++ b/nestkernel/recording_backend_mpi.h @@ -104,7 +104,7 @@ class RecordingBackendMPI : public RecordingBackend void initialize() override; void finalize() override; - void enroll( const RecordingDevice& device, const DictionaryDatum& params ) override; + void enroll( const RecordingDevice& device, const dictionary& params ) override; void disenroll( const RecordingDevice& device ) override; @@ -118,7 +118,7 @@ class RecordingBackendMPI : public RecordingBackend void write( const RecordingDevice&, const Event&, const std::vector< double >&, const std::vector< long >& ) override; - void set_status( const DictionaryDatum& ) override; + void set_status( const dictionary& ) override; void get_status( dictionary& ) const override; @@ -128,9 +128,9 @@ class RecordingBackendMPI : public RecordingBackend void post_step_hook() override; - void check_device_status( const DictionaryDatum& ) const override; - void get_device_defaults( DictionaryDatum& ) const override; - void get_device_status( const RecordingDevice& device, DictionaryDatum& params_dictionary ) const override; + void check_device_status( const dictionary& ) const override; + void get_device_defaults( dictionary& ) const override; + void get_device_status( const RecordingDevice& device, dictionary& params_dictionary ) const override; private: bool enrolled_; diff --git a/nestkernel/recording_backend_screen.cpp b/nestkernel/recording_backend_screen.cpp index 6f1742c9dc..e6677b8ca2 100644 --- a/nestkernel/recording_backend_screen.cpp +++ b/nestkernel/recording_backend_screen.cpp @@ -41,7 +41,7 @@ nest::RecordingBackendScreen::finalize() } void -nest::RecordingBackendScreen::enroll( const RecordingDevice& device, const DictionaryDatum& params ) +nest::RecordingBackendScreen::enroll( const RecordingDevice& device, const dictionary& params ) { const index node_id = device.get_node_id(); const thread t = device.get_thread(); @@ -107,21 +107,21 @@ nest::RecordingBackendScreen::write( const RecordingDevice& device, } void -nest::RecordingBackendScreen::check_device_status( const DictionaryDatum& params ) const +nest::RecordingBackendScreen::check_device_status( const dictionary& params ) const { DeviceData dd; dd.set_status( params ); // throws if params contains invalid entries } void -nest::RecordingBackendScreen::get_device_defaults( DictionaryDatum& params ) const +nest::RecordingBackendScreen::get_device_defaults( dictionary& params ) const { DeviceData dd; dd.get_status( params ); } void -nest::RecordingBackendScreen::get_device_status( const nest::RecordingDevice& device, DictionaryDatum& d ) const +nest::RecordingBackendScreen::get_device_status( const nest::RecordingDevice& device, dictionary& d ) const { const thread t = device.get_thread(); const index node_id = device.get_node_id(); @@ -153,7 +153,7 @@ nest::RecordingBackendScreen::post_step_hook() } void -nest::RecordingBackendScreen::set_status( const DictionaryDatum& ) +nest::RecordingBackendScreen::set_status( const dictionary& ) { // nothing to do } @@ -173,17 +173,17 @@ nest::RecordingBackendScreen::DeviceData::DeviceData() } void -nest::RecordingBackendScreen::DeviceData::get_status( DictionaryDatum& d ) const +nest::RecordingBackendScreen::DeviceData::get_status( dictionary& d ) const { - ( *d )[ names::precision ] = precision_; - ( *d )[ names::time_in_steps ] = time_in_steps_; + d[ names::precision.toString() ] = precision_; + d[ names::time_in_steps.toString() ] = time_in_steps_; } void -nest::RecordingBackendScreen::DeviceData::set_status( const DictionaryDatum& d ) +nest::RecordingBackendScreen::DeviceData::set_status( const dictionary& d ) { - updateValue< long >( d, names::precision, precision_ ); - updateValue< bool >( d, names::time_in_steps, time_in_steps_ ); + d.update_value( names::precision.toString(), precision_ ); + d.update_value( names::time_in_steps.toString(), time_in_steps_ ); } void diff --git a/nestkernel/recording_backend_screen.h b/nestkernel/recording_backend_screen.h index da2e89df62..06033b62db 100644 --- a/nestkernel/recording_backend_screen.h +++ b/nestkernel/recording_backend_screen.h @@ -93,7 +93,7 @@ class RecordingBackendScreen : public RecordingBackend void finalize() override; - void enroll( const RecordingDevice& device, const DictionaryDatum& params ) override; + void enroll( const RecordingDevice& device, const dictionary& params ) override; void disenroll( const RecordingDevice& device ) override; @@ -113,20 +113,20 @@ class RecordingBackendScreen : public RecordingBackend void post_step_hook() override; - void set_status( const DictionaryDatum& ) override; + void set_status( const dictionary& ) override; void get_status( dictionary& ) const override; - void check_device_status( const DictionaryDatum& ) const override; - void get_device_defaults( DictionaryDatum& ) const override; - void get_device_status( const RecordingDevice& device, DictionaryDatum& ) const override; + void check_device_status( const dictionary& ) const override; + void get_device_defaults( dictionary& ) const override; + void get_device_status( const RecordingDevice& device, dictionary& ) const override; private: struct DeviceData { DeviceData(); - void get_status( DictionaryDatum& ) const; - void set_status( const DictionaryDatum& ); + void get_status( dictionary& ) const; + void set_status( const dictionary& ); void write( const Event&, const std::vector< double >&, const std::vector< long >& ); private: diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp index de2b51802d..14bf0e97e8 100644 --- a/nestkernel/recording_backend_sionlib.cpp +++ b/nestkernel/recording_backend_sionlib.cpp @@ -631,15 +631,15 @@ nest::RecordingBackendSIONlib::Parameters_::get( const RecordingBackendSIONlib&, void nest::RecordingBackendSIONlib::Parameters_::set( const RecordingBackendSIONlib&, const DictionaryDatum& d ) { - updateValue< std::string >( d, names::filename, filename_ ); - updateValue< long >( d, names::buffer_size, buffer_size_ ); - updateValue< long >( d, names::sion_chunksize, sion_chunksize_ ); - updateValue< bool >( d, names::sion_collective, sion_collective_ ); - updateValue< long >( d, names::sion_n_files, sion_n_files_ ); + d.update_value( names::filename.toString(), filename_ ); + d.update_value( names::buffer_size.toString(), buffer_size_ ); + d.update_value( names::sion_chunksize.toString(), sion_chunksize_ ); + d.update_value( names::sion_collective.toString(), sion_collective_ ); + d.update_value( names::sion_n_files.toString(), sion_n_files_ ); } void -nest::RecordingBackendSIONlib::set_status( const DictionaryDatum& d ) +nest::RecordingBackendSIONlib::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors ptmp.set( *this, d ); // throws if BadProperty @@ -686,7 +686,7 @@ nest::RecordingBackendSIONlib::post_step_hook() } void -nest::RecordingBackendSIONlib::check_device_status( const DictionaryDatum& ) const +nest::RecordingBackendSIONlib::check_device_status( const dictionary& ) const { // nothing to do } diff --git a/nestkernel/recording_backend_sionlib.h b/nestkernel/recording_backend_sionlib.h index 1735af02e9..6a4ef85929 100644 --- a/nestkernel/recording_backend_sionlib.h +++ b/nestkernel/recording_backend_sionlib.h @@ -206,7 +206,7 @@ class RecordingBackendSIONlib : public RecordingBackend void initialize() override; void finalize() override; - void enroll( const RecordingDevice& device, const DictionaryDatum& params ) override; + void enroll( const RecordingDevice& device, const dictionary& params ) override; void disenroll( const RecordingDevice& device ) override; @@ -223,7 +223,7 @@ class RecordingBackendSIONlib : public RecordingBackend const std::vector< double >& double_values, const std::vector< long >& long_values ) override; - void set_status( const DictionaryDatum& ) override; + void set_status( const dictionary& ) override; void get_status( dictionary& ) const override; @@ -233,9 +233,9 @@ class RecordingBackendSIONlib : public RecordingBackend void post_step_hook() override; - void check_device_status( const DictionaryDatum& ) const override; - void get_device_defaults( DictionaryDatum& ) const override; - void get_device_status( const RecordingDevice& device, DictionaryDatum& params_dictionary ) const override; + void check_device_status( const dictionary& ) const override; + void get_device_defaults( dictionary& ) const override; + void get_device_status( const RecordingDevice& device, dictionary& params_dictionary ) const override; private: void open_files_(); diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp index cff488597b..e617c9ce2c 100644 --- a/nestkernel/recording_device.cpp +++ b/nestkernel/recording_device.cpp @@ -30,7 +30,7 @@ nest::RecordingDevice::RecordingDevice() : DeviceNode() , Device() , P_() - , backend_params_( new Dictionary ) + , backend_params_() { } @@ -38,7 +38,7 @@ nest::RecordingDevice::RecordingDevice( const RecordingDevice& rd ) : DeviceNode( rd ) , Device( rd ) , P_( rd.P_ ) - , backend_params_( new Dictionary( *rd.backend_params_ ) ) + , backend_params_( ( rd.backend_params_ ) ) { } @@ -69,19 +69,19 @@ nest::RecordingDevice::Parameters_::Parameters_() } void -nest::RecordingDevice::Parameters_::get( DictionaryDatum& d ) const +nest::RecordingDevice::Parameters_::get( dictionary& d ) const { - ( *d )[ names::label ] = label_; - ( *d )[ names::record_to ] = LiteralDatum( record_to_ ); + d[ names::label.toString() ] = label_; + d[ names::record_to.toString() ] = LiteralDatum( record_to_ ); } void -nest::RecordingDevice::Parameters_::set( const DictionaryDatum& d ) +nest::RecordingDevice::Parameters_::set( const dictionary& d ) { - updateValue< std::string >( d, names::label, label_ ); + d.update_value( names::label.toString(), label_ ); std::string record_to; - if ( updateValue< std::string >( d, names::record_to, record_to ) ) + if ( d.update_value( names::record_to.toString(), record_to ) ) { if ( not kernel().io_manager.is_valid_recording_backend( record_to ) ) { @@ -99,18 +99,18 @@ nest::RecordingDevice::State_::State_() } void -nest::RecordingDevice::State_::get( DictionaryDatum& d ) const +nest::RecordingDevice::State_::get( dictionary& d ) const { size_t n_events = 0; - updateValue< long >( d, names::n_events, n_events ); - ( *d )[ names::n_events ] = n_events + n_events_; + d.update_value( names::n_events.toString(), n_events ); + d[ names::n_events.toString() ] = n_events + n_events_; } void -nest::RecordingDevice::State_::set( const DictionaryDatum& d ) +nest::RecordingDevice::State_::set( const dictionary& d ) { size_t n_events = 0; - if ( updateValue< long >( d, names::n_events, n_events ) ) + if ( d.update_value( names::n_events.toString(), n_events ) ) { if ( n_events != 0 ) { @@ -122,7 +122,7 @@ nest::RecordingDevice::State_::set( const DictionaryDatum& d ) } void -nest::RecordingDevice::set_status( const DictionaryDatum& d ) +nest::RecordingDevice::set_status( const dictionary& d ) { if ( kernel().simulation_manager.has_been_prepared() ) { @@ -139,28 +139,30 @@ nest::RecordingDevice::set_status( const DictionaryDatum& d ) if ( get_node_id() == 0 ) // this is a model prototype, not an actual instance { - DictionaryDatum backend_params = DictionaryDatum( new Dictionary ); + dictionary backend_params; // copy all properties not previously accessed from d to backend_params - for ( auto kv_pair = d->begin(); kv_pair != d->end(); ++kv_pair ) + for ( auto& kv_pair : d ) { - if ( not kv_pair->second.accessed() ) - { - ( *backend_params )[ kv_pair->first ] = kv_pair->second; - } + // TODO-PYNEST-NG: Fix when access flags are added + // if ( not kv_pair.second.accessed() ) + // { + // ( *backend_params )[ kv_pair.first ] = kv_pair.second; + // } } kernel().io_manager.check_recording_backend_device_status( ptmp.record_to_, backend_params ); // cache all properties accessed by the backend in private member - backend_params_->clear(); - for ( auto kv_pair = backend_params->begin(); kv_pair != backend_params->end(); ++kv_pair ) + backend_params_.clear(); + for ( auto& kv_pair : backend_params ) { - if ( kv_pair->second.accessed() ) - { - ( *backend_params_ )[ kv_pair->first ] = kv_pair->second; - d->lookup( kv_pair->first ).set_access_flag(); - } + // TODO-PYNEST-NG: Fix when access flags are added + // if ( kv_pair->second.accessed() ) + // { + // ( *backend_params_ )[ kv_pair->first ] = kv_pair->second; + // d->lookup( kv_pair->first ).set_access_flag(); + // } } } else @@ -174,14 +176,14 @@ nest::RecordingDevice::set_status( const DictionaryDatum& d ) } void -nest::RecordingDevice::get_status( DictionaryDatum& d ) const +nest::RecordingDevice::get_status( dictionary& d ) const { P_.get( d ); S_.get( d ); Device::get_status( d ); - ( *d )[ names::element_type ] = LiteralDatum( names::recorder ); + d[ names::element_type.toString() ] = LiteralDatum( names::recorder ); if ( get_node_id() == 0 ) // this is a model prototype, not an actual instance { @@ -189,9 +191,9 @@ nest::RecordingDevice::get_status( DictionaryDatum& d ) const kernel().io_manager.get_recording_backend_device_defaults( P_.record_to_, d ); // then overwrite with cached parameters - for ( auto kv_pair = backend_params_->begin(); kv_pair != backend_params_->end(); ++kv_pair ) + for ( auto& kv_pair : backend_params_ ) { - ( *d )[ kv_pair->first ] = kv_pair->second; + d[ kv_pair.first ] = kv_pair.second; } } else diff --git a/nestkernel/recording_device.h b/nestkernel/recording_device.h index 63dc814476..6c9784f5a7 100644 --- a/nestkernel/recording_device.h +++ b/nestkernel/recording_device.h @@ -150,8 +150,8 @@ class RecordingDevice : public DeviceNode, public Device const std::string& get_label() const; - void set_status( const DictionaryDatum& ) override; - void get_status( DictionaryDatum& ) const override; + void set_status( const dictionary& ) override; + void get_status( dictionary& ) const override; protected: void write( const Event&, const std::vector< double >&, const std::vector< long >& ); @@ -165,8 +165,8 @@ class RecordingDevice : public DeviceNode, public Device Parameters_(); Parameters_( const Parameters_& ) = default; - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum& ); + void get( dictionary& ) const; + void set( const dictionary& ); } P_; struct State_ @@ -174,11 +174,11 @@ class RecordingDevice : public DeviceNode, public Device size_t n_events_; //!< The number of events recorded by the device. State_(); - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum& ); + void get( dictionary& ) const; + void set( const dictionary& ); } S_; - DictionaryDatum backend_params_; + dictionary backend_params_; }; } // namespace diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp index 10ac1a7471..24710e4ec6 100644 --- a/nestkernel/simulation_manager.cpp +++ b/nestkernel/simulation_manager.cpp @@ -113,7 +113,7 @@ nest::SimulationManager::reset_timers_for_dynamics() } void -nest::SimulationManager::set_status( const DictionaryDatum& d ) +nest::SimulationManager::set_status( const dictionary& d ) { // Create an instance of time converter here to capture the current // representation of time objects: TICS_PER_MS and TICS_PER_STEP @@ -126,7 +126,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) TimeConverter time_converter; double time; - if ( updateValue< double >( d, names::biological_time, time ) ) + if ( d.update_value( names::biological_time.toString(), time ) ) { if ( time != 0.0 ) { @@ -151,15 +151,15 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) } } - updateValue< bool >( d, names::print_time, print_time_ ); + d.update_value( names::print_time.toString(), print_time_ ); // tics_per_ms and resolution must come after local_num_thread / // total_num_threads because they might reset the network and the time // representation double tics_per_ms = 0.0; - bool tics_per_ms_updated = updateValue< double >( d, names::tics_per_ms, tics_per_ms ); + bool tics_per_ms_updated = d.update_value( names::tics_per_ms.toString(), tics_per_ms ); double resd = 0.0; - bool res_updated = updateValue< double >( d, names::resolution, resd ); + bool res_updated = d.update_value( names::resolution.toString(), resd ); if ( tics_per_ms_updated or res_updated ) { @@ -290,7 +290,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) // must be set before nodes are created. // Important: wfr_comm_interval_ may change depending on use_wfr_ bool wfr; - if ( updateValue< bool >( d, names::use_wfr, wfr ) ) + if ( d.update_value( names::use_wfr.toString(), wfr ) ) { if ( kernel().node_manager.size() > 0 ) { @@ -316,7 +316,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) // connections are created. If use_wfr_ is false wfr_comm_interval_ is set to // the resolution whenever the resolution changes. double wfr_interval; - if ( updateValue< double >( d, names::wfr_comm_interval, wfr_interval ) ) + if ( d.update_value( names::wfr_comm_interval.toString(), wfr_interval ) ) { if ( not use_wfr_ ) { @@ -351,7 +351,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) // set the convergence tolerance for the waveform relaxation method double tol; - if ( updateValue< double >( d, names::wfr_tol, tol ) ) + if ( d.update_value( names::wfr_tol.toString(), tol ) ) { if ( tol < 0.0 ) { @@ -366,7 +366,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) // set the maximal number of iterations for the waveform relaxation method long max_iter; - if ( updateValue< long >( d, names::wfr_max_iterations, max_iter ) ) + if ( d.update_value( names::wfr_max_iterations.toString(), max_iter ) ) { if ( max_iter <= 0 ) { @@ -384,7 +384,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) // set the interpolation order for the waveform relaxation method long interp_order; - if ( updateValue< long >( d, names::wfr_interpolation_order, interp_order ) ) + if ( d.update_value( names::wfr_interpolation_order.toString(), interp_order ) ) { if ( ( interp_order < 0 ) or ( interp_order == 2 ) or ( interp_order > 3 ) ) { @@ -399,7 +399,7 @@ nest::SimulationManager::set_status( const DictionaryDatum& d ) // update time limit double t_new = 0.0; - if ( updateValue< double >( d, names::update_time_limit, t_new ) ) + if ( d.update_value( names::update_time_limit.toString(), t_new ) ) { if ( t_new <= 0 ) { diff --git a/nestkernel/simulation_manager.h b/nestkernel/simulation_manager.h index 1196b5e7b2..6b617b4da5 100644 --- a/nestkernel/simulation_manager.h +++ b/nestkernel/simulation_manager.h @@ -52,7 +52,7 @@ class SimulationManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); /** diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp index f41134e888..4e29433b17 100644 --- a/nestkernel/sp_manager.cpp +++ b/nestkernel/sp_manager.cpp @@ -60,7 +60,7 @@ SPManager::SPManager() , structural_plasticity_update_interval_( 10000. ) , structural_plasticity_enabled_( false ) , sp_conn_builders_() - , growthcurvedict_( new Dictionary() ) + , growthcurvedict_() , growthcurve_factories_() { } @@ -118,29 +118,31 @@ SPManager::get_status( dictionary& d ) * @param d Dictionary containing the values to be set */ void -SPManager::set_status( const DictionaryDatum& d ) +SPManager::set_status( const dictionary& d ) { - if ( d->known( names::structural_plasticity_update_interval ) ) + if ( d.known( names::structural_plasticity_update_interval.toString() ) ) { - updateValue< double >( d, names::structural_plasticity_update_interval, structural_plasticity_update_interval_ ); + d.update_value< double >( + names::structural_plasticity_update_interval.toString(), structural_plasticity_update_interval_ ); } - if ( not d->known( names::structural_plasticity_synapses ) ) + if ( not d.known( names::structural_plasticity_synapses.toString() ) ) { return; } /* * Configure synapses model updated during the simulation. */ Token synmodel; - DictionaryDatum syn_specs, syn_spec; - DictionaryDatum conn_spec = DictionaryDatum( new Dictionary() ); + dictionary syn_specs; + dictionary syn_spec; + dictionary conn_spec; - if ( d->known( names::allow_autapses ) ) + if ( d.known( names::allow_autapses.toString() ) ) { - def< bool >( conn_spec, names::allow_autapses, getValue< bool >( d, names::allow_autapses ) ); + conn_spec[ names::allow_autapses.toString() ] = d.get< bool >( names::allow_autapses.toString() ); } - if ( d->known( names::allow_multapses ) ) + if ( d.known( names::allow_multapses.toString() ) ) { - def< bool >( conn_spec, names::allow_multapses, getValue< bool >( d, names::allow_multapses ) ); + conn_spec[ names::allow_multapses.toString() ] = d.get< bool >( names::allow_multapses.toString() ); } NodeCollectionPTR sources( new NodeCollectionPrimitive() ); NodeCollectionPTR targets( new NodeCollectionPrimitive() ); @@ -150,10 +152,10 @@ SPManager::set_status( const DictionaryDatum& d ) delete ( *i ); } sp_conn_builders_.clear(); - updateValue< DictionaryDatum >( d, names::structural_plasticity_synapses, syn_specs ); - for ( Dictionary::const_iterator i = syn_specs->begin(); i != syn_specs->end(); ++i ) + d.update_value< dictionary >( names::structural_plasticity_synapses.toString(), syn_specs ); + for ( auto& kv_pair : syn_specs ) { - syn_spec = getValue< DictionaryDatum >( syn_specs, i->first ); + syn_spec = boost::any_cast< dictionary >( kv_pair.second ); // We use a ConnBuilder with dummy values to check the synapse parameters SPBuilder* conn_builder = new SPBuilder( sources, targets, conn_spec, { syn_spec } ); @@ -256,8 +258,8 @@ SPManager::disconnect( const index snode_id, Node* target, thread target_thread, void SPManager::disconnect( NodeCollectionPTR sources, NodeCollectionPTR targets, - DictionaryDatum& conn_spec, - DictionaryDatum& syn_spec ) + dictionary& conn_spec, + dictionary& syn_spec ) { if ( kernel().connection_manager.connections_have_changed() ) { @@ -276,18 +278,19 @@ SPManager::disconnect( NodeCollectionPTR sources, } ConnBuilder* cb = NULL; - conn_spec->clear_access_flags(); - syn_spec->clear_access_flags(); + // TODO-PYNEST-NG: Access flags + // conn_spec->clear_access_flags(); + // syn_spec->clear_access_flags(); - if ( not conn_spec->known( names::rule ) ) + if ( not conn_spec.known( names::rule.toString() ) ) { throw BadProperty( "Disconnection spec must contain disconnection rule." ); } - const std::string rule_name = ( *conn_spec )[ names::rule ]; + const std::string rule_name = conn_spec.get< std::string >( names::rule.toString() ); if ( not kernel().connection_manager.get_connruledict()->known( rule_name ) ) { - throw BadProperty( "Unknown connectivty rule: " + rule_name ); + throw BadProperty( "Unknown connectivity rule: " + rule_name ); } if ( not sp_conn_builders_.empty() ) @@ -295,8 +298,9 @@ SPManager::disconnect( NodeCollectionPTR sources, for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ ) { - std::string synModel = getValue< std::string >( syn_spec, names::synapse_model ); - if ( ( *i )->get_synapse_model() == ( index )( kernel().model_manager.get_synapsedict()->lookup( synModel ) ) ) + std::string synModel = syn_spec.get< std::string >( names::synapse_model.toString() ); + if ( ( *i )->get_synapse_model() + == ( index )( kernel().model_manager.get_synapsedict().get< synindex >( synModel ) ) ) { cb = kernel().connection_manager.get_conn_builder( rule_name, sources, targets, conn_spec, { syn_spec } ); cb->set_post_synaptic_element_name( ( *i )->get_post_synaptic_element_name() ); @@ -311,8 +315,9 @@ SPManager::disconnect( NodeCollectionPTR sources, assert( cb != 0 ); // at this point, all entries in conn_spec and syn_spec have been checked - ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries: " ); - ALL_ENTRIES_ACCESSED( *syn_spec, "Connect", "Unread dictionary entries: " ); + // TODO-PYNEST-NG: Access flags + // ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *syn_spec, "Connect", "Unread dictionary entries: " ); // Set flag before calling cb->disconnect() in case exception is thrown after some connections have been removed. kernel().connection_manager.set_connections_have_changed(); diff --git a/nestkernel/sp_manager.h b/nestkernel/sp_manager.h index 069cd21f08..a9b73aff68 100644 --- a/nestkernel/sp_manager.h +++ b/nestkernel/sp_manager.h @@ -70,9 +70,9 @@ class SPManager : public ManagerInterface virtual void finalize(); virtual void get_status( dictionary& ); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); - DictionaryDatum& get_growthcurvedict(); + dictionary& get_growthcurvedict(); /** * Create a new Growth Curve object using the GrowthCurve Factory @@ -96,7 +96,7 @@ class SPManager : public ManagerInterface * \param connectivityParams connectivity Dictionary * \param synapseParams synapse parameters Dictionary */ - void disconnect( NodeCollectionPTR, NodeCollectionPTR, DictionaryDatum&, DictionaryDatum& ); + void disconnect( NodeCollectionPTR, NodeCollectionPTR, dictionary&, dictionary& ); /** * Disconnect two nodes. @@ -198,7 +198,7 @@ class SPManager : public ManagerInterface Description: This dictionary provides indexes for the growth curve factory */ - DictionaryDatum growthcurvedict_; //!< Dictionary for growth rules. + dictionary growthcurvedict_; //!< Dictionary for growth rules. /** * GrowthCurve factories, indexed by growthcurvedict_ elements. @@ -206,7 +206,7 @@ class SPManager : public ManagerInterface std::vector< GenericGrowthCurveFactory* > growthcurve_factories_; }; -inline DictionaryDatum& +inline dictionary& SPManager::get_growthcurvedict() { return growthcurvedict_; @@ -215,7 +215,7 @@ SPManager::get_growthcurvedict() inline GrowthCurve* SPManager::new_growth_curve( Name name ) { - const long nc_id = ( *growthcurvedict_ )[ name ]; + const long nc_id = growthcurvedict_.get< long >( name.toString() ); return growthcurve_factories_.at( nc_id )->create(); } diff --git a/nestkernel/sp_manager_impl.h b/nestkernel/sp_manager_impl.h index a346dcb984..881d690d6d 100644 --- a/nestkernel/sp_manager_impl.h +++ b/nestkernel/sp_manager_impl.h @@ -39,12 +39,12 @@ template < typename GrowthCurve > void SPManager::register_growth_curve( const std::string& name ) { - assert( not growthcurvedict_->known( name ) ); + assert( not growthcurvedict_.known( name ) ); GenericGrowthCurveFactory* nc = new GrowthCurveFactory< GrowthCurve >(); assert( nc != 0 ); const int id = growthcurve_factories_.size(); growthcurve_factories_.push_back( nc ); - growthcurvedict_->insert( name, id ); + growthcurvedict_[ name ] = id; } } // namespace nest diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index bc725567e9..700b621e95 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -89,10 +89,10 @@ LayerMetadata::slice( size_t start, size_t stop, size_t step, NodeCollectionPTR layer_meta->set_first_node_id( node_collection->operator[]( 0 ) ); // Inherit status from current layer, but with new positions. - DictionaryDatum layer_dict = new Dictionary(); + dictionary layer_dict; layer_->get_status( layer_dict ); - ( *layer_dict )[ names::positions ] = ArrayDatum( new_positions ); - ( *layer_dict )[ names::step ] = step; + layer_dict[ names::positions.toString() ] = ArrayDatum( new_positions ); + layer_dict[ names::step.toString() ] = step; layer_local->set_status( layer_dict ); } @@ -111,13 +111,14 @@ get_layer( NodeCollectionPTR nc ) } NodeCollectionPTR -create_layer( const DictionaryDatum& layer_dict ) +create_layer( const dictionary& layer_dict ) { - layer_dict->clear_access_flags(); + // TODO-PYNEST-NG: Access flags + // layer_dict->clear_access_flags(); NodeCollectionPTR layer = AbstractLayer::create_layer( layer_dict ); - ALL_ENTRIES_ACCESSED( *layer_dict, "nest::CreateLayer", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *layer_dict, "nest::CreateLayer", "Unread dictionary entries: " ); return layer; } @@ -445,14 +446,15 @@ minus_mask( const MaskDatum& mask1, const MaskDatum& mask2 ) } void -connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const DictionaryDatum& connection_dict ) +connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& connection_dict ) { AbstractLayerPTR source = get_layer( source_nc ); AbstractLayerPTR target = get_layer( target_nc ); - connection_dict->clear_access_flags(); + // TODO-PYNEST-NG: Access flags + // connection_dict->clear_access_flags(); ConnectionCreator connector( connection_dict ); - ALL_ENTRIES_ACCESSED( *connection_dict, "nest::CreateLayers", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *connection_dict, "nest::CreateLayers", "Unread dictionary entries: " ); // Set flag before calling source->connect() in case exception is thrown after some connections have been created. kernel().connection_manager.set_connections_have_changed(); diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h index b1046e704c..d309c47269 100644 --- a/nestkernel/spatial.h +++ b/nestkernel/spatial.h @@ -57,10 +57,10 @@ class LayerMetadata : public NodeCollectionMetadata { } - void set_status( const DictionaryDatum&, bool ){}; + void set_status( const dictionary&, bool ){}; void - get_status( DictionaryDatum& d ) const + get_status( dictionary& d ) const { layer_->get_status( d ); } @@ -100,11 +100,11 @@ class LayerMetadata : public NodeCollectionMetadata return false; } // Compare status dictionaries of this layer and rhs layer - DictionaryDatum dict( new Dictionary() ); - DictionaryDatum rhs_dict( new Dictionary() ); + dictionary dict; + dictionary rhs_dict; get_status( dict ); rhs_layer_metadata->get_status( rhs_dict ); - return *dict == *rhs_dict; + return dict == rhs_dict; } private: @@ -113,7 +113,7 @@ class LayerMetadata : public NodeCollectionMetadata }; AbstractLayerPTR get_layer( NodeCollectionPTR layer_nc ); -NodeCollectionPTR create_layer( const DictionaryDatum& layer_dict ); +NodeCollectionPTR create_layer( const dictionary& layer_dict ); ArrayDatum get_position( NodeCollectionPTR layer_nc ); std::vector< double > get_position( const index node_id ); ArrayDatum displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ); @@ -126,7 +126,7 @@ BoolDatum inside( const std::vector< double >& point, const MaskDatum& mask ); MaskDatum intersect_mask( const MaskDatum& mask1, const MaskDatum& mask2 ); MaskDatum union_mask( const MaskDatum& mask1, const MaskDatum& mask2 ); MaskDatum minus_mask( const MaskDatum& mask1, const MaskDatum& mask2 ); -void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const DictionaryDatum& dict ); +void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ); void dump_layer_nodes( NodeCollectionPTR layer_nc, OstreamDatum& out ); void dump_layer_connections( const Token& syn_model, NodeCollectionPTR source_layer_nc, diff --git a/nestkernel/stimulation_backend.h b/nestkernel/stimulation_backend.h index 69bb5f325a..09301c363e 100644 --- a/nestkernel/stimulation_backend.h +++ b/nestkernel/stimulation_backend.h @@ -110,7 +110,7 @@ class StimulationBackend * * @ingroup NESTio */ - virtual void enroll( StimulationDevice&, const DictionaryDatum& ){}; + virtual void enroll( StimulationDevice&, const dictionary& ){}; /** * Disenroll a `StimulationDevice` from the `StimulationBackend`. diff --git a/nestkernel/stimulation_backend_mpi.cpp b/nestkernel/stimulation_backend_mpi.cpp index 361ce256e3..090068e00c 100644 --- a/nestkernel/stimulation_backend_mpi.cpp +++ b/nestkernel/stimulation_backend_mpi.cpp @@ -62,7 +62,7 @@ nest::StimulationBackendMPI::finalize() } void -nest::StimulationBackendMPI::enroll( nest::StimulationDevice& device, const DictionaryDatum& ) +nest::StimulationBackendMPI::enroll( nest::StimulationDevice& device, const dictionary& ) { thread tid = device.get_thread(); index node_id = device.get_node_id(); diff --git a/nestkernel/stimulation_backend_mpi.h b/nestkernel/stimulation_backend_mpi.h index f91b60c5fd..a2aea17d21 100644 --- a/nestkernel/stimulation_backend_mpi.h +++ b/nestkernel/stimulation_backend_mpi.h @@ -116,7 +116,7 @@ class StimulationBackendMPI : public StimulationBackend void finalize() override; - void enroll( StimulationDevice& device, const DictionaryDatum& params ) override; + void enroll( StimulationDevice& device, const dictionary& params ) override; void disenroll( StimulationDevice& device ) override; diff --git a/nestkernel/stimulation_device.cpp b/nestkernel/stimulation_device.cpp index 4cd3654a39..43fafa491f 100644 --- a/nestkernel/stimulation_device.cpp +++ b/nestkernel/stimulation_device.cpp @@ -30,7 +30,7 @@ nest::StimulationDevice::StimulationDevice() : DeviceNode() , Device() , first_syn_id_( invalid_synindex ) - , backend_params_( new Dictionary ) + , backend_params_() { } @@ -95,19 +95,19 @@ nest::StimulationDevice::Parameters_::Parameters_() } void -nest::StimulationDevice::Parameters_::get( DictionaryDatum& d ) const +nest::StimulationDevice::Parameters_::get( dictionary& d ) const { - ( *d )[ names::label ] = label_; - ( *d )[ names::stimulus_source ] = LiteralDatum( stimulus_source_ ); + d[ names::label.toString() ] = label_; + d[ names::stimulus_source.toString() ] = LiteralDatum( stimulus_source_ ); } void -nest::StimulationDevice::Parameters_::set( const DictionaryDatum& d ) +nest::StimulationDevice::Parameters_::set( const dictionary& d ) { - updateValue< std::string >( d, names::label, label_ ); + d.update_value( names::label.toString(), label_ ); std::string stimulus_source; - if ( updateValue< std::string >( d, names::stimulus_source, stimulus_source ) ) + if ( d.update_value( names::stimulus_source.toString(), stimulus_source ) ) { if ( not kernel().io_manager.is_valid_stimulation_backend( stimulus_source ) ) @@ -120,7 +120,7 @@ nest::StimulationDevice::Parameters_::set( const DictionaryDatum& d ) } void -nest::StimulationDevice::set_status( const DictionaryDatum& d ) +nest::StimulationDevice::set_status( const dictionary& d ) { Parameters_ ptmp = P_; // temporary copy in case of errors @@ -130,26 +130,28 @@ nest::StimulationDevice::set_status( const DictionaryDatum& d ) if ( get_node_id() == 0 ) // this is a model prototype, not an actual instance { - DictionaryDatum backend_params = DictionaryDatum( new Dictionary ); + dictionary backend_params; // copy all properties not previously accessed from d to backend_params - for ( auto& kv_pair : *d ) + for ( auto& kv_pair : d ) { - if ( not kv_pair.second.accessed() ) - { - ( *backend_params )[ kv_pair.first ] = kv_pair.second; - } + // TODO-PYNEST-NG: access flags + // if ( not kv_pair.second.accessed() ) + // { + // backend_params[ kv_pair.first.toString() ] = kv_pair.second; + // } } // cache all properties accessed by the backend in private member - backend_params_->clear(); - for ( auto& kv_pair : *backend_params ) + backend_params_.clear(); + for ( auto& kv_pair : backend_params ) { - if ( kv_pair.second.accessed() ) - { - ( *backend_params_ )[ kv_pair.first ] = kv_pair.second; - d->lookup( kv_pair.first ).set_access_flag(); - } + // TODO-PYNEST-NG: access flags + // if ( kv_pair.second.accessed() ) + // { + // backend_params_[ kv_pair.first.toString() ] = kv_pair.second; + // d->lookup( kv_pair.first ).set_access_flag(); + // } } } else @@ -163,20 +165,20 @@ nest::StimulationDevice::set_status( const DictionaryDatum& d ) void -nest::StimulationDevice::get_status( DictionaryDatum& d ) const +nest::StimulationDevice::get_status( dictionary& d ) const { P_.get( d ); Device::get_status( d ); - ( *d )[ names::element_type ] = LiteralDatum( names::stimulator ); + d[ names::element_type.toString() ] = names::stimulator.toString(); if ( get_node_id() == 0 ) // this is a model prototype, not an actual instance { // overwrite with cached parameters - for ( auto& kv_pair : *backend_params_ ) + for ( auto& kv_pair : backend_params_ ) { - ( *d )[ kv_pair.first ] = kv_pair.second; + d[ kv_pair.first ] = kv_pair.second; } } } diff --git a/nestkernel/stimulation_device.h b/nestkernel/stimulation_device.h index 783c3e0f35..bc86bc2977 100644 --- a/nestkernel/stimulation_device.h +++ b/nestkernel/stimulation_device.h @@ -157,8 +157,8 @@ class StimulationDevice : public DeviceNode, public Device * @see class comment for details. */ bool is_active( const Time& ) const override; - void get_status( DictionaryDatum& d ) const override; - void set_status( const DictionaryDatum& ) override; + void get_status( dictionary& d ) const override; + void set_status( const dictionary& ) override; bool has_proxies() const override; Name get_element_type() const override; @@ -203,8 +203,8 @@ class StimulationDevice : public DeviceNode, public Device Parameters_(); Parameters_( const Parameters_& ) = default; - void get( DictionaryDatum& ) const; - void set( const DictionaryDatum& ); + void get( dictionary& ) const; + void set( const dictionary& ); } P_; private: @@ -217,7 +217,7 @@ class StimulationDevice : public DeviceNode, public Device */ synindex first_syn_id_; - DictionaryDatum backend_params_; + dictionary backend_params_; }; inline Name diff --git a/nestkernel/structural_plasticity_node.cpp b/nestkernel/structural_plasticity_node.cpp index fa5d3d607c..2da23b3c3d 100644 --- a/nestkernel/structural_plasticity_node.cpp +++ b/nestkernel/structural_plasticity_node.cpp @@ -51,35 +51,33 @@ nest::StructuralPlasticityNode::StructuralPlasticityNode( const StructuralPlasti } void -nest::StructuralPlasticityNode::get_status( DictionaryDatum& d ) const +nest::StructuralPlasticityNode::get_status( dictionary& d ) const { - DictionaryDatum synaptic_elements_d; - DictionaryDatum synaptic_element_d; + dictionary synaptic_elements_d; - def< double >( d, names::Ca, Ca_minus_ ); - def< double >( d, names::tau_Ca, tau_Ca_ ); - def< double >( d, names::beta_Ca, beta_Ca_ ); + d[ names::Ca.toString() ] = Ca_minus_; + d[ names::tau_Ca.toString() ] = tau_Ca_; + d[ names::beta_Ca.toString() ] = beta_Ca_; - synaptic_elements_d = DictionaryDatum( new Dictionary ); - def< DictionaryDatum >( d, names::synaptic_elements, synaptic_elements_d ); + d[ names::synaptic_elements.toString() ] = synaptic_elements_d; for ( std::map< Name, SynapticElement >::const_iterator it = synaptic_elements_map_.begin(); it != synaptic_elements_map_.end(); ++it ) { - synaptic_element_d = DictionaryDatum( new Dictionary ); - def< DictionaryDatum >( synaptic_elements_d, it->first, synaptic_element_d ); + dictionary synaptic_element_d; + synaptic_elements_d[ it->first.toString() ] = synaptic_element_d; it->second.get( synaptic_element_d ); } } void -nest::StructuralPlasticityNode::set_status( const DictionaryDatum& d ) +nest::StructuralPlasticityNode::set_status( const dictionary& d ) { // We need to preserve values in case invalid values are set double new_tau_Ca = tau_Ca_; double new_beta_Ca = beta_Ca_; - updateValue< double >( d, names::tau_Ca, new_tau_Ca ); - updateValue< double >( d, names::beta_Ca, new_beta_Ca ); + d.update_value( names::tau_Ca.toString(), new_tau_Ca ); + d.update_value( names::beta_Ca.toString(), new_beta_Ca ); if ( new_tau_Ca <= 0.0 ) { @@ -97,43 +95,46 @@ nest::StructuralPlasticityNode::set_status( const DictionaryDatum& d ) // check, if to clear spike history and K_minus bool clear = false; - updateValue< bool >( d, names::clear, clear ); + d.update_value( names::clear.toString(), clear ); if ( clear ) { clear_history(); } - if ( d->known( names::synaptic_elements_param ) ) - { - const DictionaryDatum synaptic_elements_dict = getValue< DictionaryDatum >( d, names::synaptic_elements_param ); - - for ( std::map< Name, SynapticElement >::iterator it = synaptic_elements_map_.begin(); - it != synaptic_elements_map_.end(); - ++it ) - { - if ( synaptic_elements_dict->known( it->first ) ) - { - const DictionaryDatum synaptic_elements_a = getValue< DictionaryDatum >( synaptic_elements_dict, it->first ); - it->second.set( synaptic_elements_a ); - } - } - } - if ( not d->known( names::synaptic_elements ) ) - { - return; - } + // TODO-PYNEST-NG: fix + // if ( d->known( names::synaptic_elements_param ) ) + // { + // const DictionaryDatum synaptic_elements_dict = getValue< DictionaryDatum >( d, names::synaptic_elements_param ); + + // for ( std::map< Name, SynapticElement >::iterator it = synaptic_elements_map_.begin(); + // it != synaptic_elements_map_.end(); + // ++it ) + // { + // if ( synaptic_elements_dict->known( it->first ) ) + // { + // const DictionaryDatum synaptic_elements_a = getValue< DictionaryDatum >( synaptic_elements_dict, it->first ); + // it->second.set( synaptic_elements_a ); + // } + // } + // } + // if ( not d->known( names::synaptic_elements ) ) + // { + // return; + // } // we replace the existing synaptic_elements_map_ by the new one - DictionaryDatum synaptic_elements_d; + dictionary synaptic_elements_d; std::pair< std::map< Name, SynapticElement >::iterator, bool > insert_result; synaptic_elements_map_ = std::map< Name, SynapticElement >(); - synaptic_elements_d = getValue< DictionaryDatum >( d, names::synaptic_elements ); - - for ( Dictionary::const_iterator i = synaptic_elements_d->begin(); i != synaptic_elements_d->end(); ++i ) - { - insert_result = synaptic_elements_map_.insert( std::pair< Name, SynapticElement >( i->first, SynapticElement() ) ); - ( insert_result.first->second ).set( getValue< DictionaryDatum >( synaptic_elements_d, i->first ) ); - } + synaptic_elements_d = d.get< dictionary >( names::synaptic_elements.toString() ); + + // TODO-PYNEST-NG: fix + // for ( Dictionary::const_iterator i = synaptic_elements_d->begin(); i != synaptic_elements_d->end(); ++i ) + // { + // insert_result = synaptic_elements_map_.insert( std::pair< Name, SynapticElement >( i->first, SynapticElement() ) + // ); + // ( insert_result.first->second ).set( synaptic_elements_d.get< DictionaryDatum >( i->first ) ); + // } } void diff --git a/nestkernel/structural_plasticity_node.h b/nestkernel/structural_plasticity_node.h index c90f6ef994..0e4b5702c1 100644 --- a/nestkernel/structural_plasticity_node.h +++ b/nestkernel/structural_plasticity_node.h @@ -115,8 +115,8 @@ class StructuralPlasticityNode : public Node */ void connect_synaptic_element( Name name, int n ); - void get_status( DictionaryDatum& d ) const; - void set_status( const DictionaryDatum& d ); + void get_status( dictionary& d ) const; + void set_status( const dictionary& d ); /** * retrieve the current value of tau_Ca which defines the exponential decay diff --git a/nestkernel/synaptic_element.cpp b/nestkernel/synaptic_element.cpp index 93d3e8de83..c791fb4445 100644 --- a/nestkernel/synaptic_element.cpp +++ b/nestkernel/synaptic_element.cpp @@ -62,9 +62,10 @@ nest::SynapticElement::SynapticElement( const SynapticElement& se ) { growth_curve_ = kernel().sp_manager.new_growth_curve( se.growth_curve_->get_name() ); assert( growth_curve_ != 0 ); - DictionaryDatum nc_parameters = DictionaryDatum( new Dictionary ); + dictionary nc_parameters; se.get( nc_parameters ); - growth_curve_->set( nc_parameters ); + // TODO-PYNEST-NG: fix growth curve with dictionary + // growth_curve_->set( nc_parameters ); } nest::SynapticElement& nest::SynapticElement::operator=( const SynapticElement& other ) @@ -73,10 +74,11 @@ nest::SynapticElement& nest::SynapticElement::operator=( const SynapticElement& { // 1: allocate new memory and copy the elements GrowthCurve* new_nc = kernel().sp_manager.new_growth_curve( other.growth_curve_->get_name() ); - DictionaryDatum nc_parameters = DictionaryDatum( new Dictionary ); + dictionary nc_parameters; other.get( nc_parameters ); - new_nc->set( nc_parameters ); + // TODO-PYNEST-NG: fix growth curve with dictionary + // new_nc->set( nc_parameters ); delete growth_curve_; growth_curve_ = new_nc; @@ -95,42 +97,44 @@ nest::SynapticElement& nest::SynapticElement::operator=( const SynapticElement& * get function to store current values in dictionary * ---------------------------------------------------------------- */ void -nest::SynapticElement::get( DictionaryDatum& d ) const +nest::SynapticElement::get( dictionary& d ) const { // Store current values in the dictionary - def< double >( d, names::growth_rate, growth_rate_ ); - def< double >( d, names::tau_vacant, tau_vacant_ ); - def< bool >( d, names::continuous, continuous_ ); - def< double >( d, names::z, z_ ); - def< int >( d, names::z_connected, z_connected_ ); + d[ names::growth_rate.toString() ] = growth_rate_; + d[ names::tau_vacant.toString() ] = tau_vacant_; + d[ names::continuous.toString() ] = continuous_; + d[ names::z.toString() ] = z_; + d[ names::z_connected.toString() ] = z_connected_; // Store growth curve - growth_curve_->get( d ); + // TODO-PYNEST-NG: fix growth curve with dictionary + // growth_curve_->get( d ); } /* ---------------------------------------------------------------- * set function to store dictionary values in the SynaticElement * ---------------------------------------------------------------- */ void -nest::SynapticElement::set( const DictionaryDatum& d ) +nest::SynapticElement::set( const dictionary& d ) { double new_tau_vacant = tau_vacant_; // Store values - updateValue< double >( d, names::growth_rate, growth_rate_ ); - updateValue< double >( d, names::tau_vacant, new_tau_vacant ); - updateValue< bool >( d, names::continuous, continuous_ ); - updateValue< double >( d, names::z, z_ ); + d.update_value( names::growth_rate.toString(), growth_rate_ ); + d.update_value( names::tau_vacant.toString(), new_tau_vacant ); + d.update_value( names::continuous.toString(), continuous_ ); + d.update_value( names::z.toString(), z_ ); - if ( d->known( names::growth_curve ) ) + if ( d.known( names::growth_curve.toString() ) ) { - Name growth_curve_name( getValue< std::string >( d, names::growth_curve ) ); + Name growth_curve_name( d.get< std::string >( names::growth_curve.toString() ) ); if ( not growth_curve_->is( growth_curve_name ) ) { growth_curve_ = kernel().sp_manager.new_growth_curve( growth_curve_name ); } } - growth_curve_->set( d ); + // TODO-PYNEST-NG: fix growth curve with dictionary + // growth_curve_->set( d ); if ( new_tau_vacant <= 0.0 ) { diff --git a/nestkernel/synaptic_element.h b/nestkernel/synaptic_element.h index 9de56397ce..9add7e2072 100644 --- a/nestkernel/synaptic_element.h +++ b/nestkernel/synaptic_element.h @@ -90,6 +90,8 @@ // Includes from nestkernel: #include "growth_curve.h" +#include "dictionary.h" + // Includes from sli: #include "dictdatum.h" @@ -145,14 +147,14 @@ class SynapticElement * Store current values in a dictionary. * @param d to write data */ - void get( DictionaryDatum& d ) const; + void get( dictionary& d ) const; /** * \fn void set(const DictionaryDatum&) * Set values from a dictionary. * @param d to take data from */ - void set( const DictionaryDatum& d ); + void set( const dictionary& d ); /* diff --git a/nestkernel/target_identifier.h b/nestkernel/target_identifier.h index a63ee5a46a..a33373127a 100644 --- a/nestkernel/target_identifier.h +++ b/nestkernel/target_identifier.h @@ -59,13 +59,13 @@ class TargetIdentifierPtrRport void - get_status( DictionaryDatum& d ) const + get_status( dictionary& d ) const { // Do nothing if called on synapse prototype if ( target_ != 0 ) { - def< long >( d, names::rport, rport_ ); - def< long >( d, names::target, target_->get_node_id() ); + d[ names::rport.toString() ] = rport_; + d[ names::target.toString() ] = target_->get_node_id(); } } @@ -122,13 +122,13 @@ class TargetIdentifierIndex void - get_status( DictionaryDatum& d ) const + get_status( dictionary& d ) const { // Do nothing if called on synapse prototype if ( target_ != invalid_targetindex ) { - def< long >( d, names::rport, 0 ); - def< long >( d, names::target, target_ ); + d[ names::rport.toString() ] = 0; + d[ names::target.toString() ] = target_; } } diff --git a/nestkernel/target_table_devices.h b/nestkernel/target_table_devices.h index 1a15e4b15c..113ed9c760 100644 --- a/nestkernel/target_table_devices.h +++ b/nestkernel/target_table_devices.h @@ -85,7 +85,7 @@ class TargetTableDevices const index s_node_id, const thread tid, const synindex syn_id, - const DictionaryDatum& p, + const dictionary& p, const double d, const double w ); @@ -96,7 +96,7 @@ class TargetTableDevices Node& target, const thread tid, const synindex syn_id, - const DictionaryDatum& p, + const dictionary& p, const double d, const double w ); @@ -170,7 +170,7 @@ class TargetTableDevices void get_synapse_status_to_device( const thread tid, const index source_node_id, const synindex syn_id, - DictionaryDatum& dict, + dictionary& dict, const index lcid ) const; /** @@ -179,7 +179,7 @@ class TargetTableDevices void get_synapse_status_from_device( const thread tid, const index ldid, const synindex syn_id, - DictionaryDatum& dict, + dictionary& dict, const index lcid ) const; /** @@ -189,7 +189,7 @@ class TargetTableDevices const index source_node_id, const synindex syn_id, ConnectorModel& cm, - const DictionaryDatum& dict, + const dictionary& dict, const index lcid ); /** @@ -199,7 +199,7 @@ class TargetTableDevices const index ldid, const synindex syn_id, ConnectorModel& cm, - const DictionaryDatum& dict, + const dictionary& dict, const index lcid ); /** @@ -212,7 +212,7 @@ inline void TargetTableDevices::get_synapse_status_from_device( const thread tid, const index ldid, const synindex syn_id, - DictionaryDatum& dict, + dictionary& dict, const index lcid ) const { target_from_devices_[ tid ][ ldid ][ syn_id ]->get_synapse_status( tid, lcid, dict ); @@ -223,7 +223,7 @@ TargetTableDevices::set_synapse_status_from_device( const thread tid, const index ldid, const synindex syn_id, ConnectorModel& cm, - const DictionaryDatum& dict, + const dictionary& dict, const index lcid ) { target_from_devices_[ tid ][ ldid ][ syn_id ]->set_synapse_status( lcid, dict, cm ); diff --git a/nestkernel/target_table_devices_impl.h b/nestkernel/target_table_devices_impl.h index 53a3e2c52d..8828123224 100644 --- a/nestkernel/target_table_devices_impl.h +++ b/nestkernel/target_table_devices_impl.h @@ -37,7 +37,7 @@ nest::TargetTableDevices::add_connection_to_device( Node& source, const index source_node_id, const thread tid, const synindex syn_id, - const DictionaryDatum& p, + const dictionary& p, const double d, const double w ) { @@ -55,7 +55,7 @@ nest::TargetTableDevices::add_connection_from_device( Node& source, Node& target, const thread tid, const synindex syn_id, - const DictionaryDatum& p, + const dictionary& p, const double d, const double w ) { @@ -111,7 +111,7 @@ inline void nest::TargetTableDevices::get_synapse_status_to_device( const thread tid, const index source_node_id, const synindex syn_id, - DictionaryDatum& dict, + dictionary& dict, const index lcid ) const { const index lid = kernel().vp_manager.node_id_to_lid( source_node_id ); @@ -126,7 +126,7 @@ nest::TargetTableDevices::set_synapse_status_to_device( const thread tid, const index source_node_id, const synindex syn_id, ConnectorModel& cm, - const DictionaryDatum& dict, + const dictionary& dict, const index lcid ) { const index lid = kernel().vp_manager.node_id_to_lid( source_node_id ); diff --git a/nestkernel/urbanczik_archiving_node.h b/nestkernel/urbanczik_archiving_node.h index 290f50a513..dda46332a7 100644 --- a/nestkernel/urbanczik_archiving_node.h +++ b/nestkernel/urbanczik_archiving_node.h @@ -119,8 +119,8 @@ class UrbanczikArchivingNode : public ArchivingNode urbanczik_parameters* urbanczik_params; - void get_status( DictionaryDatum& d ) const; - void set_status( const DictionaryDatum& d ); + void get_status( dictionary& d ) const; + void set_status( const dictionary& d ); private: std::deque< histentry_extended > urbanczik_history_[ urbanczik_parameters::NCOMP - 1 ]; diff --git a/nestkernel/urbanczik_archiving_node_impl.h b/nestkernel/urbanczik_archiving_node_impl.h index 99c739d64a..084757a6f8 100644 --- a/nestkernel/urbanczik_archiving_node_impl.h +++ b/nestkernel/urbanczik_archiving_node_impl.h @@ -46,14 +46,14 @@ nest::UrbanczikArchivingNode< urbanczik_parameters >::UrbanczikArchivingNode( co template < class urbanczik_parameters > void -nest::UrbanczikArchivingNode< urbanczik_parameters >::get_status( DictionaryDatum& d ) const +nest::UrbanczikArchivingNode< urbanczik_parameters >::get_status( dictionary& d ) const { ArchivingNode::get_status( d ); } template < class urbanczik_parameters > void -nest::UrbanczikArchivingNode< urbanczik_parameters >::set_status( const DictionaryDatum& d ) +nest::UrbanczikArchivingNode< urbanczik_parameters >::set_status( const dictionary& d ) { ArchivingNode::set_status( d ); } diff --git a/nestkernel/vp_manager.cpp b/nestkernel/vp_manager.cpp index a8da0469aa..4d0d215a05 100644 --- a/nestkernel/vp_manager.cpp +++ b/nestkernel/vp_manager.cpp @@ -67,10 +67,10 @@ nest::VPManager::finalize() } void -nest::VPManager::set_status( const DictionaryDatum& d ) +nest::VPManager::set_status( const dictionary& d ) { long n_threads = get_num_threads(); - bool n_threads_updated = updateValue< long >( d, names::local_num_threads, n_threads ); + bool n_threads_updated = d.update_value( names::local_num_threads.toString(), n_threads ); if ( n_threads_updated ) { if ( kernel().node_manager.size() > 0 ) @@ -130,7 +130,7 @@ nest::VPManager::set_status( const DictionaryDatum& d ) } long n_vps = get_num_virtual_processes(); - bool n_vps_updated = updateValue< long >( d, names::total_num_virtual_procs, n_vps ); + bool n_vps_updated = d.update_value( names::total_num_virtual_procs.toString(), n_vps ); if ( n_vps_updated ) { if ( kernel().node_manager.size() > 0 ) diff --git a/nestkernel/vp_manager.h b/nestkernel/vp_manager.h index 1e99ddcaf4..ff01559f15 100644 --- a/nestkernel/vp_manager.h +++ b/nestkernel/vp_manager.h @@ -59,7 +59,7 @@ class VPManager : public ManagerInterface virtual void initialize(); virtual void finalize(); - virtual void set_status( const DictionaryDatum& ); + virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); /** diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py index c984c9e271..83b6d16e97 100644 --- a/pynest/nest/lib/hl_api_connection_helpers.py +++ b/pynest/nest/lib/hl_api_connection_helpers.py @@ -44,9 +44,8 @@ def _process_conn_spec(conn_spec): """Processes the connectivity specifications from None, string or dictionary to a dictionary.""" if conn_spec is None: - # Get default conn_spec - sr('/Connect /conn_spec GetOption') - return spp() + # Use default conn_spec + return {'rule': 'all_to_all'} elif isinstance(conn_spec, str): processed_conn_spec = {'rule': conn_spec} return processed_conn_spec @@ -61,11 +60,8 @@ def _process_syn_spec(syn_spec, conn_spec, prelength, postlength, use_connect_ar syn_spec = copy.copy(syn_spec) if syn_spec is None: - # for use_connect_arrays, return "static_synapse" by default - if use_connect_arrays: - return {"synapse_model": "static_synapse"} - - return syn_spec + # Use default syn_spec + return {"synapse_model": "static_synapse"} rule = conn_spec['rule'] diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py index 4e7ed6d0ae..cb39fed6be 100644 --- a/pynest/nest/lib/hl_api_connections.py +++ b/pynest/nest/lib/hl_api_connections.py @@ -255,8 +255,8 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, return - sps(pre) - sps(post) + # sps(pre) + # sps(post) if not isinstance(pre, NodeCollection): raise TypeError("Not implemented, presynaptic nodes must be a NodeCollection") @@ -278,10 +278,9 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, # Connect using ConnectLayers _connect_spatial(pre, post, spatial_projections) else: - sps(processed_conn_spec) - if processed_syn_spec is not None: - sps(processed_syn_spec) - sr('Connect') + # sps(processed_conn_spec) + kernel.llapi_connect(pre._datum, post._datum, processed_conn_spec, processed_syn_spec) + # sr('Connect') if return_synapsecollection: return GetConnections(pre, post) diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 44e72e5f91..e62a43eb00 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -278,7 +278,7 @@ def __neq__(self, other): return not self == other def __len__(self): - return sli_func('size', self._datum) + return kernel.llapi_nc_size(self._datum) def __str__(self): return kernel.llapi_to_string(self._datum).decode('utf8') diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 22ce6818e6..67b9c154d2 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -146,6 +146,7 @@ cdef extern from "tokenstack.h": cdef extern from "dictionary.h" namespace "boost": cppclass any: any() + any& operator=[T](T&) T any_cast[T](any& operand) cdef extern from "dictionary.h": @@ -153,6 +154,7 @@ cdef extern from "dictionary.h": dictionary() # ctypedef key_type # ctypedef mapped_type + any& operator[](const string&) cppclass const_iterator: pair[string, any]& operator*() const_iterator operator++() @@ -186,7 +188,12 @@ cdef extern from "kernel_manager.h" namespace "nest": cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) NodeCollectionPTR create( const string model_name, const long n ) + void connect(NodeCollectionPTR sources, + NodeCollectionPTR targets, + const dictionary& connectivity, + const vector[dictionary]& synapse_params ) string pprint_to_string( NodeCollectionPTR nc ) + size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() cdef extern from "pynestkernel_aux.h": diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 476c3c6664..5341de33a3 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -91,6 +91,9 @@ cdef class NodeCollectionObject(object): cdef _set_nc(self, NodeCollectionPTR nc): self.thisptr = nc + # cdef _get_ptr(self): + # return self.thisptr + cdef class SLIDatum(object): @@ -638,12 +641,35 @@ cdef object dictionary_to_pydict(dictionary cdict): inc(it) return tmp +cdef dictionary pydict_to_dictionary(object py_dict): + cdef dictionary cdict = dictionary() + for key, value in py_dict.items(): + if isinstance(value, int): + cdict[key.encode('utf-8')] = value + elif isinstance(value, str): + cdict[key.encode('utf-8')] = value.encode('utf-8') + else: + raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') + return cdict + def llapi_create(string model, long n): cdef NodeCollectionPTR gids = create(model, n) obj = NodeCollectionObject() obj._set_nc(gids) return nest.NodeCollection(obj) +def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params): + cdef vector[dictionary] syn_param_vec + if synapse_params is not None: + syn_param_vec.push_back(pydict_to_dictionary(synapse_params)) + + connect(pre.thisptr, post.thisptr, + pydict_to_dictionary(conn_params), + syn_param_vec) + +def llapi_nc_size(NodeCollectionObject nc): + return nc_size(nc.thisptr) + def llapi_to_string(NodeCollectionObject nc): return pprint_to_string(nc.thisptr) diff --git a/sli/CMakeLists.txt b/sli/CMakeLists.txt index 18248ee550..7606f64fff 100644 --- a/sli/CMakeLists.txt +++ b/sli/CMakeLists.txt @@ -94,14 +94,14 @@ add_library( sli_readline gnureadline.cc gnureadline.h ) target_link_libraries( sli_readline sli_lib nestutil ${READLINE_LIBRARIES} OpenMP::OpenMP_CXX ) # add the executable -add_executable( sli puresli.cc ) -target_link_libraries( sli sli_lib sli_readline ${GSL_LIBRARIES} OpenMP::OpenMP_CXX ) +# add_executable( sli puresli.cc ) +# target_link_libraries( sli sli_lib sli_readline ${GSL_LIBRARIES} OpenMP::OpenMP_CXX ) -target_include_directories( sli PRIVATE - ${PROJECT_SOURCE_DIR}/thirdparty - ${PROJECT_SOURCE_DIR}/libnestutil - ${PROJECT_BINARY_DIR}/libnestutil - ) +# target_include_directories( sli PRIVATE +# ${PROJECT_SOURCE_DIR}/thirdparty +# ${PROJECT_SOURCE_DIR}/libnestutil +# ${PROJECT_BINARY_DIR}/libnestutil +# ) target_include_directories( sli_lib PRIVATE ${PROJECT_SOURCE_DIR}/thirdparty @@ -119,7 +119,7 @@ target_include_directories( sli_readline PRIVATE ${PROJECT_BINARY_DIR}/libnestutil ) -install( TARGETS sli_readline sli_lib sli +install( TARGETS sli_readline sli_lib # sli LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} diff --git a/testsuite/cpptests/CMakeLists.txt b/testsuite/cpptests/CMakeLists.txt index e347120363..980a9a59e4 100644 --- a/testsuite/cpptests/CMakeLists.txt +++ b/testsuite/cpptests/CMakeLists.txt @@ -21,7 +21,7 @@ if ( HAVE_BOOST ) include_directories( ${BOOST_INCLUDE_DIR} ) add_executable( run_all_cpptests run_all.cpp ) - add_dependencies( run_all_cpptests sli nest ) + add_dependencies( run_all_cpptests nest ) target_link_libraries( run_all_cpptests ${BOOST_LIBRARIES} nestkernel ) diff --git a/testsuite/cpptests/test_parameter.h b/testsuite/cpptests/test_parameter.h index 9e565329e7..eae5826493 100644 --- a/testsuite/cpptests/test_parameter.h +++ b/testsuite/cpptests/test_parameter.h @@ -46,9 +46,9 @@ BOOST_AUTO_TEST_SUITE( test_parameter ) */ BOOST_AUTO_TEST_CASE( test_redraw_value_impossible, *boost::unit_test::timeout( 2 ) ) { - DictionaryDatum d = new Dictionary(); - ( *d )[ nest::names::min ] = 0.0; - ( *d )[ nest::names::max ] = 1.0; + dictionary d; + d[ nest::names::min.toString() ] = 0.0; + d[ nest::names::max.toString() ] = 1.0; ParameterDatum uniform_pd = new nest::UniformParameter( d ); // Requested region is outside of the parameter limits, so it cannot get an acceptable value. ParameterDatum redraw_pd = redraw_parameter( uniform_pd, -1.0, -0.5 ); @@ -69,8 +69,8 @@ BOOST_AUTO_TEST_CASE( test_uniform_int_returns_integer ) const int max = 100; const int num_iterations = 1000; - DictionaryDatum d = new Dictionary(); - ( *d )[ nest::names::max ] = max; + dictionary d; + d[ nest::names::max.toString() ] = max; ParameterDatum uniform_int_pd = new nest::UniformIntParameter( d ); // We need to go via a factory to avoid compiler confusion From 4a8b4b2a6852c28f3e6ab4f8d50d62f11ab8e7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 26 Jan 2022 09:13:58 +0100 Subject: [PATCH 010/375] Replaced DictionaryDatum with C++ dictionary --- models/music_message_in_proxy.h | 4 +- nest/neststartup.cpp | 18 +++---- nestkernel/CMakeLists.txt | 2 +- nestkernel/conn_builder.cpp | 2 +- nestkernel/conn_builder_conngen.cpp | 27 +++++----- nestkernel/conn_builder_conngen.h | 6 +-- nestkernel/connection_id.cpp | 16 +++--- nestkernel/connection_id.h | 4 +- nestkernel/connection_manager.cpp | 33 ++++++------ nestkernel/connection_manager.h | 8 +-- nestkernel/connection_manager_impl.h | 4 +- nestkernel/device.cpp | 4 +- nestkernel/device.h | 2 +- nestkernel/dynamicloader.cpp | 6 +-- nestkernel/dynamicloader.h | 4 +- nestkernel/generic_factory.h | 4 +- nestkernel/grid_mask.h | 12 ++--- nestkernel/growth_curve.cpp | 38 ++++++------- nestkernel/growth_curve.h | 18 ++++--- nestkernel/layer_impl.h | 6 +-- nestkernel/logging_manager.cpp | 54 ++++++++++--------- nestkernel/logging_manager.h | 7 ++- nestkernel/mask.h | 10 ++-- nestkernel/mask_impl.h | 54 +++++++++---------- nestkernel/model_manager.h | 2 +- nestkernel/music_manager.h | 4 +- nestkernel/nest.cpp | 22 ++++---- nestkernel/nest.h | 8 +-- nestkernel/nest_datums.h | 8 +++ nestkernel/nestmodule.cpp | 66 +++++++++++------------ nestkernel/nestmodule.h | 2 +- nestkernel/node.h | 2 +- nestkernel/parameter.cpp | 2 +- nestkernel/parameter.h | 6 +-- nestkernel/recording_backend_memory.cpp | 47 ++++++++++------ nestkernel/recording_backend_sionlib.cpp | 8 +-- nestkernel/recording_backend_sionlib.h | 2 +- nestkernel/recording_device.cpp | 4 +- nestkernel/sp_manager.cpp | 3 +- nestkernel/spatial.cpp | 11 ++-- nestkernel/spatial.h | 4 +- nestkernel/structural_plasticity_node.cpp | 12 ++--- nestkernel/synaptic_element.h | 4 +- 43 files changed, 296 insertions(+), 264 deletions(-) diff --git a/models/music_message_in_proxy.h b/models/music_message_in_proxy.h index f4be1832f2..c3b569fe16 100644 --- a/models/music_message_in_proxy.h +++ b/models/music_message_in_proxy.h @@ -113,9 +113,9 @@ class MsgHandler : public MUSIC::MessageHandler void get_status( dictionary& d ) const { - DictionaryDatum dict( new Dictionary ); + dictionary dict; dict[ names::messages.toString() ] = messages; - dict[ names::message_times.toString() ] = DoubleVectorDatum( new std::vector< double >( message_times ) ); + dict[ names::message_times.toString() ] = std::vector< double >( message_times ); d[ names::n_messages.toString() ] = messages.size(); d[ names::data.toString() ] = dict; } diff --git a/nest/neststartup.cpp b/nest/neststartup.cpp index 0a91f093ab..707bafb1c1 100644 --- a/nest/neststartup.cpp +++ b/nest/neststartup.cpp @@ -34,7 +34,7 @@ #include "logging_event.h" // Includes from nestkernel: -#include "dynamicloader.h" +// #include "dynamicloader.h" #include "genericmodel_impl.h" #include "kernel_manager.h" #include "nest.h" @@ -118,13 +118,13 @@ neststartup( int* argc, char*** argv, SLIInterpreter& engine, std::string module addmodule< FilesystemModule >( engine ); // register NestModule class - addmodule< nest::NestModule >( engine ); + // addmodule< nest::NestModule >( engine ); // this can make problems with reference counting, if // the intepreter decides cleans up memory before NEST is ready // engine.def( "modeldict", nest::kernel().model_manager.get_modeldict() ); // engine.def( "synapsedict", nest::kernel().model_manager.get_synapsedict() ); - engine.def( "connruledict", nest::kernel().connection_manager.get_connruledict() ); + // engine.def( "connruledict", nest::kernel().connection_manager.get_connruledict() ); // engine.def( "growthcurvedict", nest::kernel().sp_manager.get_growthcurvedict() ); // now add static modules providing models @@ -142,18 +142,18 @@ neststartup( int* argc, char*** argv, SLIInterpreter& engine, std::string module * optimize DynamicLoaderModule::registerLinkedModule() away. */ #ifdef HAVE_LIBLTDL - // dynamic loader module for managing linked and dynamically loaded extension - // modules - nest::DynamicLoaderModule* pDynLoader = new nest::DynamicLoaderModule( engine ); +// dynamic loader module for managing linked and dynamically loaded extension +// modules +// nest::DynamicLoaderModule* pDynLoader = new nest::DynamicLoaderModule( engine ); // initialize all modules that were linked into at compile time // these modules have registered via calling DynamicLoader::registerLinkedModule // from their constructor #ifndef IS_BLUEGENE - pDynLoader->initLinkedModules( engine ); +// pDynLoader->initLinkedModules( engine ); - // interpreter will delete module on destruction - engine.addmodule( pDynLoader ); +// interpreter will delete module on destruction +// engine.addmodule( pDynLoader ); #endif #endif diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt index fc6a78dbbd..a945b8aede 100644 --- a/nestkernel/CMakeLists.txt +++ b/nestkernel/CMakeLists.txt @@ -34,7 +34,7 @@ set ( nestkernel_sources deprecation_warning.h deprecation_warning.cpp device.h device.cpp device_node.h - dynamicloader.h dynamicloader.cpp + # dynamicloader.h dynamicloader.cpp event.h event.cpp exceptions.h exceptions.cpp genericmodel.h genericmodel_impl.h diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp index 86761bd548..a81028676b 100644 --- a/nestkernel/conn_builder.cpp +++ b/nestkernel/conn_builder.cpp @@ -93,7 +93,7 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, #ifdef HAVE_MUSIC // We allow music_channel as alias for receptor_type during // connection setup - ( *syn_defaults )[ names::music_channel ] = 0; + syn_defaults[ names::music_channel.toString() ] = 0; #endif set_synapse_params( syn_defaults, syn_params, synapse_indx ); diff --git a/nestkernel/conn_builder_conngen.cpp b/nestkernel/conn_builder_conngen.cpp index d6f2f6119f..8aa404bbe2 100644 --- a/nestkernel/conn_builder_conngen.cpp +++ b/nestkernel/conn_builder_conngen.cpp @@ -35,28 +35,29 @@ namespace nest ConnectionGeneratorBuilder::ConnectionGeneratorBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, - const DictionaryDatum& conn_spec, - const std::vector< DictionaryDatum >& syn_specs ) + const dictionary& conn_spec, + const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) , cg_( ConnectionGeneratorDatum() ) , params_map_() { - updateValue< ConnectionGeneratorDatum >( conn_spec, "cg", cg_ ); + conn_spec.update_value( "cg", cg_ ); if ( cg_->arity() != 0 ) { - if ( not conn_spec->known( "params_map" ) ) + if ( not conn_spec.known( "params_map" ) ) { throw BadProperty( "A params_map has to be given if the ConnectionGenerator has values." ); } - updateValue< DictionaryDatum >( conn_spec, "params_map", params_map_ ); + conn_spec.update_value( "params_map", params_map_ ); - for ( Dictionary::iterator it = params_map_->begin(); it != params_map_->end(); ++it ) - { - it->second.set_access_flag(); - } + // TODO-PYNEST-NG: access flags + // for ( Dictionary::iterator it = params_map_->begin(); it != params_map_->end(); ++it ) + // { + // it->second.set_access_flag(); + // } - if ( syn_specs[ 0 ]->known( names::weight ) or syn_specs[ 0 ]->known( names::delay ) ) + if ( syn_specs[ 0 ].known( names::weight.toString() ) or syn_specs[ 0 ].known( names::delay.toString() ) ) { throw BadProperty( "Properties weight and delay cannot be specified in syn_spec if the ConnectionGenerator has values." ); @@ -93,13 +94,13 @@ ConnectionGeneratorBuilder::connect_() } else if ( num_parameters == 2 ) { - if ( not params_map_->known( names::weight ) or not params_map_->known( names::delay ) ) + if ( not params_map_.known( names::weight.toString() ) or not params_map_.known( names::delay.toString() ) ) { throw BadProperty( "The parameter map has to contain the indices of weight and delay." ); } - const size_t d_idx = ( *params_map_ )[ names::delay ]; - const size_t w_idx = ( *params_map_ )[ names::weight ]; + const size_t d_idx = params_map_.get< size_t >( names::delay.toString() ); + const size_t w_idx = params_map_.get< size_t >( names::weight.toString() ); const bool d_idx_is_0_or_1 = ( d_idx == 0 ) or ( d_idx == 1 ); const bool w_idx_is_0_or_1 = ( w_idx == 0 ) or ( w_idx == 1 ); diff --git a/nestkernel/conn_builder_conngen.h b/nestkernel/conn_builder_conngen.h index 8e002232c0..7e5993c27e 100644 --- a/nestkernel/conn_builder_conngen.h +++ b/nestkernel/conn_builder_conngen.h @@ -45,8 +45,8 @@ class ConnectionGeneratorBuilder : public ConnBuilder public: ConnectionGeneratorBuilder( NodeCollectionPTR, NodeCollectionPTR, - const DictionaryDatum&, - const std::vector< DictionaryDatum >& ); + const dictionary&, + const std::vector< dictionary >& ); protected: void connect_(); @@ -56,7 +56,7 @@ class ConnectionGeneratorBuilder : public ConnBuilder private: ConnectionGeneratorDatum cg_; - DictionaryDatum params_map_; + dictionary params_map_; }; } // namespace nest diff --git a/nestkernel/connection_id.cpp b/nestkernel/connection_id.cpp index 70593a6780..837180b721 100644 --- a/nestkernel/connection_id.cpp +++ b/nestkernel/connection_id.cpp @@ -25,6 +25,8 @@ // Includes from nestkernel: #include "nest_names.h" +#include "dictionary.h" + // Includes from sli: #include "integerdatum.h" @@ -53,21 +55,21 @@ ConnectionID::ConnectionID( long source_node_id, long target_thread, long synaps { } -DictionaryDatum +dictionary ConnectionID::get_dict() const { - DictionaryDatum dict( new Dictionary ); + dictionary dict; // The node ID of the presynaptic node - def< long >( dict, nest::names::source, source_node_id_ ); + dict[ nest::names::source.toString() ] = source_node_id_; // The node ID of the postsynaptic node - def< long >( dict, nest::names::target, target_node_id_ ); + dict[ nest::names::target.toString() ] = target_node_id_; // The id of the synapse model - def< long >( dict, nest::names::synapse_modelid, synapse_modelid_ ); + dict[ nest::names::synapse_modelid.toString() ] = synapse_modelid_; // The thread of the postsynaptic node - def< long >( dict, nest::names::target_thread, target_thread_ ); + dict[ nest::names::target_thread.toString() ] = target_thread_; // The index in the list - def< long >( dict, nest::names::port, port_ ); + dict[ nest::names::port.toString() ] = port_; return dict; } diff --git a/nestkernel/connection_id.h b/nestkernel/connection_id.h index 44d26c89e3..921712d6a1 100644 --- a/nestkernel/connection_id.h +++ b/nestkernel/connection_id.h @@ -23,6 +23,8 @@ #ifndef CONNECTION_ID_H #define CONNECTION_ID_H +#include "dictionary.h" + // Includes from sli: #include "arraydatum.h" #include "dictutils.h" @@ -38,7 +40,7 @@ class ConnectionID ConnectionID( long source_node_id, long target_thread, long synapse_modelid, long port ); ConnectionID( const ConnectionID& ); - DictionaryDatum get_dict() const; + dictionary get_dict() const; ArrayDatum to_ArrayDatum() const; bool operator==( const ConnectionID& c ) const; void print_me( std::ostream& out ) const; diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index dde5e8875c..2b7438fb46 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -61,7 +61,7 @@ #include "tokenutils.h" nest::ConnectionManager::ConnectionManager() - : connruledict_( new Dictionary() ) + : connruledict_() , connbuilder_factories_() , min_delay_( 1 ) , max_delay_( 1 ) @@ -355,7 +355,7 @@ nest::ConnectionManager::get_conn_builder( const std::string& name, const dictionary& conn_spec, const std::vector< dictionary >& syn_specs ) { - const size_t rule_id = connruledict_->lookup( name ); + const auto rule_id = connruledict_.get< int >( name ); return connbuilder_factories_.at( rule_id )->create( sources, targets, conn_spec, syn_specs ); } @@ -398,12 +398,12 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources, } const Name rule_name = conn_spec.get< std::string >( names::rule.toString() ); - if ( not connruledict_->known( rule_name ) ) + if ( not connruledict_.known( rule_name.toString() ) ) { throw BadProperty( String::compose( "Unknown connectivity rule: %1", rule_name ) ); } - const long rule_id = ( *connruledict_ )[ rule_name ]; + const auto rule_id = connruledict_.get< int >( rule_name.toString() ); ConnBuilder* cb = connbuilder_factories_.at( rule_id )->create( sources, targets, conn_spec, syn_specs ); assert( cb != 0 ); @@ -927,29 +927,26 @@ nest::ConnectionManager::get_num_connections( const synindex syn_id ) const } ArrayDatum -nest::ConnectionManager::get_connections( const DictionaryDatum& params ) +nest::ConnectionManager::get_connections( const dictionary& params ) { std::deque< ConnectionID > connectome; - const Token& source_t = params->lookup( names::source ); - const Token& target_t = params->lookup( names::target ); - const Token& syn_model_t = params->lookup( names::synapse_model ); NodeCollectionPTR source_a = NodeCollectionPTR( 0 ); NodeCollectionPTR target_a = NodeCollectionPTR( 0 ); long synapse_label = UNLABELED_CONNECTION; - updateValue< long >( params, names::synapse_label, synapse_label ); + params.update_value( names::synapse_label.toString(), synapse_label ); - if ( not source_t.empty() ) + if ( params.known( names::source.toString() ) ) { - source_a = getValue< NodeCollectionDatum >( source_t ); + source_a = params.get< NodeCollectionDatum >( names::source.toString() ); if ( not source_a->valid() ) { throw KernelException( "GetConnection requires valid source NodeCollection." ); } } - if ( not target_t.empty() ) + if ( params.known( names::target.toString() ) ) { - target_a = getValue< NodeCollectionDatum >( target_t ); + target_a = params.get< NodeCollectionDatum >( names::target.toString() ); if ( not target_a->valid() ) { throw KernelException( "GetConnection requires valid target NodeCollection." ); @@ -975,18 +972,18 @@ nest::ConnectionManager::get_connections( const DictionaryDatum& params ) // First we check, whether a synapse model is given. // If not, we will iterate all. - if ( not syn_model_t.empty() ) + if ( params.known( names::target.toString() ) ) { - Name synmodel_name = getValue< Name >( syn_model_t ); + const auto synmodel_name = params.get< std::string >( names::synapse_model.toString() ); const auto& syndict = kernel().model_manager.get_synapsedict(); // const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( synmodel_name ); - if ( syndict.known( synmodel_name.toString() ) ) + if ( syndict.known( synmodel_name ) ) { - syn_id = static_cast< size_t >( syndict.get< synindex >( synmodel_name.toString() ) ); + syn_id = static_cast< size_t >( syndict.get< synindex >( synmodel_name ) ); } else { - throw UnknownModelName( synmodel_name.toString() ); + throw UnknownModelName( synmodel_name ); } get_connections( connectome, source_a, target_a, syn_id, synapse_label ); } diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h index 0d7834afe6..c44be3978c 100644 --- a/nestkernel/connection_manager.h +++ b/nestkernel/connection_manager.h @@ -84,7 +84,7 @@ class ConnectionManager : public ManagerInterface virtual void set_status( const dictionary& ); virtual void get_status( dictionary& ); - DictionaryDatum& get_connruledict(); + dictionary& get_connruledict(); void compute_target_data_buffer_size(); void compute_compressed_secondary_recv_buffer_positions( const thread tid ); @@ -200,7 +200,7 @@ class ConnectionManager : public ManagerInterface * The function then iterates all entries in source and collects the * connection IDs to all neurons in target. */ - ArrayDatum get_connections( const DictionaryDatum& params ); + ArrayDatum get_connections( const dictionary& params ); void get_connections( std::deque< ConnectionID >& connectome, NodeCollectionPTR source, @@ -595,7 +595,7 @@ class ConnectionManager : public ManagerInterface * * SeeAlso: Connect */ - DictionaryDatum connruledict_; //!< Dictionary for connection rules. + dictionary connruledict_; //!< Dictionary for connection rules. //! ConnBuilder factories, indexed by connruledict_ elements. std::vector< GenericConnBuilderFactory* > connbuilder_factories_; @@ -642,7 +642,7 @@ class ConnectionManager : public ManagerInterface double stdp_eps_; }; -inline DictionaryDatum& +inline dictionary& ConnectionManager::get_connruledict() { return connruledict_; diff --git a/nestkernel/connection_manager_impl.h b/nestkernel/connection_manager_impl.h index e011109a19..a0b385bc15 100644 --- a/nestkernel/connection_manager_impl.h +++ b/nestkernel/connection_manager_impl.h @@ -42,12 +42,12 @@ template < typename ConnBuilder > void ConnectionManager::register_conn_builder( const std::string& name ) { - assert( not connruledict_->known( name ) ); + assert( not connruledict_.known( name ) ); GenericConnBuilderFactory* cb = new ConnBuilderFactory< ConnBuilder >(); assert( cb != 0 ); const int id = connbuilder_factories_.size(); connbuilder_factories_.push_back( cb ); - connruledict_->insert( name, id ); + connruledict_[ name ] = id; } inline void diff --git a/nestkernel/device.cpp b/nestkernel/device.cpp index 5ccd292c2c..16f799a5bb 100644 --- a/nestkernel/device.cpp +++ b/nestkernel/device.cpp @@ -82,7 +82,7 @@ nest::Device::Parameters_::get( dictionary& d ) const } void -nest::Device::Parameters_::update_( const DictionaryDatum& d, const Name& name, Time& value ) +nest::Device::Parameters_::update_( const dictionary& d, const Name& name, Time& value ) { /* We cannot update the Time values directly, since updateValue() doesn't support Time objects. We thus read the value in ms into @@ -94,7 +94,7 @@ nest::Device::Parameters_::update_( const DictionaryDatum& d, const Name& name, */ double val; - if ( updateValue< double >( d, name, val ) ) + if ( d.update_value( name.toString(), val ) ) { const Time t = Time::ms( val ); if ( t.is_finite() and not t.is_grid_time() ) diff --git a/nestkernel/device.h b/nestkernel/device.h index a947cf4ecb..11b3663b7a 100644 --- a/nestkernel/device.h +++ b/nestkernel/device.h @@ -138,7 +138,7 @@ class Device private: //! Update given Time parameter including error checking - static void update_( const DictionaryDatum&, const Name&, Time& ); + static void update_( const dictionary&, const Name&, Time& ); }; diff --git a/nestkernel/dynamicloader.cpp b/nestkernel/dynamicloader.cpp index 20db659e73..9b3eb5a8b1 100644 --- a/nestkernel/dynamicloader.cpp +++ b/nestkernel/dynamicloader.cpp @@ -75,7 +75,7 @@ struct sDynModule }; // static member initialization -Dictionary* DynamicLoaderModule::moduledict_ = new Dictionary(); +dictionary DynamicLoaderModule::moduledict_; vecLinkedModules& DynamicLoaderModule::getLinkedModules() @@ -93,7 +93,7 @@ DynamicLoaderModule::getLinkedModules() DynamicLoaderModule::DynamicLoaderModule( SLIInterpreter& interpreter ) : loadmodule_function( dyn_modules ) { - interpreter.def( "moduledict", new DictionaryDatum( moduledict_ ) ); + // interpreter.def( "moduledict", new dictionary( moduledict_ ) ); } DynamicLoaderModule::~DynamicLoaderModule() @@ -249,7 +249,7 @@ DynamicLoaderModule::LoadModuleFunction::execute( SLIInterpreter* i ) const // put handle to module onto stack int moduleid = dyn_modules_.size() - 1; i->OStack.push( moduleid ); - ( *moduledict_ )[ new_module.name ] = moduleid; + moduledict_[ new_module.name ] = moduleid; // now we can run the module initializer, after we have cleared the EStack if ( not pModule->commandstring().empty() ) diff --git a/nestkernel/dynamicloader.h b/nestkernel/dynamicloader.h index 225a8ad4dd..f9543373b6 100644 --- a/nestkernel/dynamicloader.h +++ b/nestkernel/dynamicloader.h @@ -33,6 +33,8 @@ // C++ includes: #include +#include "dictionary.h" + // Includes from sli: #include "slifunction.h" #include "slimodule.h" @@ -108,7 +110,7 @@ class DynamicLoaderModule : public SLIModule vecDynModules dyn_modules; //! Dictionary for dynamically loaded modules. - static Dictionary* moduledict_; + static dictionary moduledict_; }; } // namespace diff --git a/nestkernel/generic_factory.h b/nestkernel/generic_factory.h index c3380bc324..bdd2897cc9 100644 --- a/nestkernel/generic_factory.h +++ b/nestkernel/generic_factory.h @@ -62,7 +62,7 @@ class GenericFactory /** * Register a new subtype. The type name must not already exist. The * class for the subtype is supplied via the template argument. This - * class should have a constructor taking a const DictionaryDatum& as + * class should have a constructor taking a const dictionary& as * parameter. * @param name subtype name. * @returns true if subtype was successfully registered. @@ -74,7 +74,7 @@ class GenericFactory * Register a new subtype. The type name must not already exist. * @param name Subtype name. * @param creator A factory function creating objects of this subtype - * from a const DictionaryDatum& containing parameters + * from a const dictionary& containing parameters * @returns true if mask was successfully registered. */ bool register_subtype( const Name& name, CreatorFunction creator ); diff --git a/nestkernel/grid_mask.h b/nestkernel/grid_mask.h index 79923074d7..853178ea7d 100644 --- a/nestkernel/grid_mask.h +++ b/nestkernel/grid_mask.h @@ -61,7 +61,7 @@ class GridMask : public AbstractMask void set_anchor( const Position< D, int >& ); - DictionaryDatum get_dict() const; + dictionary get_dict() const; GridMask< D >* clone() const @@ -143,12 +143,12 @@ GridMask< 3 >::get_name() } template < int D > -DictionaryDatum +dictionary GridMask< D >::get_dict() const { - DictionaryDatum d( new Dictionary ); - DictionaryDatum maskd( new Dictionary ); - def< DictionaryDatum >( d, get_name(), maskd ); + dictionary d; + dictionary maskd; + d[ get_name().toString() ] = maskd; long shape_x = lower_right_[ 0 ] - upper_left_[ 0 ]; long shape_y = lower_right_[ 1 ] - upper_left_[ 1 ]; @@ -159,7 +159,7 @@ GridMask< D >::get_dict() const long shape_z = lower_right_[ 2 ] - upper_left_[ 2 ]; shape_dim.push_back( shape_z ); } - def< std::vector< long > >( maskd, names::shape, shape_dim ); + maskd[ names::shape.toString() ] = shape_dim; return d; } diff --git a/nestkernel/growth_curve.cpp b/nestkernel/growth_curve.cpp index abd52b7657..b8e35f8c2b 100644 --- a/nestkernel/growth_curve.cpp +++ b/nestkernel/growth_curve.cpp @@ -50,16 +50,16 @@ nest::GrowthCurveLinear::GrowthCurveLinear() } void -nest::GrowthCurveLinear::get( DictionaryDatum& d ) const +nest::GrowthCurveLinear::get( dictionary& d ) const { - def< std::string >( d, names::growth_curve, name_.toString() ); - def< double >( d, names::eps, eps_ ); + d[ names::growth_curve.toString() ] = name_.toString(); + d[ names::eps.toString() ] = eps_; } void -nest::GrowthCurveLinear::set( const DictionaryDatum& d ) +nest::GrowthCurveLinear::set( const dictionary& d ) { - updateValue< double >( d, names::eps, eps_ ); + d.update_value( names::eps.toString(), eps_ ); } double @@ -88,18 +88,18 @@ nest::GrowthCurveGaussian::GrowthCurveGaussian() } void -nest::GrowthCurveGaussian::get( DictionaryDatum& d ) const +nest::GrowthCurveGaussian::get( dictionary& d ) const { - def< std::string >( d, names::growth_curve, name_.toString() ); - def< double >( d, names::eps, eps_ ); - def< double >( d, names::eta, eta_ ); + d[ names::growth_curve.toString() ] = name_.toString(); + d[ names::eps.toString() ] = eps_; + d[ names::eta.toString() ] = eta_; } void -nest::GrowthCurveGaussian::set( const DictionaryDatum& d ) +nest::GrowthCurveGaussian::set( const dictionary& d ) { - updateValue< double >( d, names::eps, eps_ ); - updateValue< double >( d, names::eta, eta_ ); + d.update_value( names::eps.toString(), eps_ ); + d.update_value( names::eta.toString(), eta_ ); } double @@ -141,18 +141,18 @@ nest::GrowthCurveSigmoid::GrowthCurveSigmoid() } void -nest::GrowthCurveSigmoid::get( DictionaryDatum& d ) const +nest::GrowthCurveSigmoid::get( dictionary& d ) const { - def< std::string >( d, names::growth_curve, name_.toString() ); - def< double >( d, names::eps, eps_ ); - def< double >( d, names::psi, psi_ ); + d[ names::growth_curve.toString() ] = name_.toString(); + d[ names::eps.toString() ] = eps_; + d[ names::psi.toString() ] = psi_; } void -nest::GrowthCurveSigmoid::set( const DictionaryDatum& d ) +nest::GrowthCurveSigmoid::set( const dictionary& d ) { - updateValue< double >( d, names::eps, eps_ ); - updateValue< double >( d, names::psi, psi_ ); + d.update_value( names::eps.toString(), eps_ ); + d.update_value( names::psi.toString(), psi_ ); // check that w is greater than 0 if ( not( psi_ >= 0 ) ) diff --git a/nestkernel/growth_curve.h b/nestkernel/growth_curve.h index 85d7e843a1..acfdb27d25 100644 --- a/nestkernel/growth_curve.h +++ b/nestkernel/growth_curve.h @@ -34,6 +34,8 @@ #include "nest_types.h" #include "exceptions.h" +#include "dictionary.h" + // Includes from sli: #include "dictdatum.h" @@ -51,8 +53,8 @@ class GrowthCurve virtual ~GrowthCurve() { } - virtual void get( DictionaryDatum& d ) const = 0; - virtual void set( const DictionaryDatum& d ) = 0; + virtual void get( dictionary& d ) const = 0; + virtual void set( const dictionary& d ) = 0; virtual double update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const = 0; virtual bool @@ -131,8 +133,8 @@ class GrowthCurveLinear : public GrowthCurve { public: GrowthCurveLinear(); - void get( DictionaryDatum& d ) const; - void set( const DictionaryDatum& d ); + void get( dictionary& d ) const; + void set( const dictionary& d ); double update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const; private: @@ -218,8 +220,8 @@ class GrowthCurveGaussian : public GrowthCurve { public: GrowthCurveGaussian(); - void get( DictionaryDatum& d ) const; - void set( const DictionaryDatum& d ); + void get( dictionary& d ) const; + void set( const dictionary& d ); double update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const; private: @@ -290,8 +292,8 @@ class GrowthCurveSigmoid : public GrowthCurve { public: GrowthCurveSigmoid(); - void get( DictionaryDatum& d ) const; - void set( const DictionaryDatum& d ); + void get( dictionary& d ) const; + void set( const dictionary& d ); double update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const; private: diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h index 90f3d6770e..9298f0d9cb 100644 --- a/nestkernel/layer_impl.h +++ b/nestkernel/layer_impl.h @@ -305,8 +305,8 @@ Layer< D >::dump_connections( std::ostream& out, std::vector< std::pair< Position< D >, index > >* src_vec = get_global_positions_vector( node_collection ); // Dictionary with parameters for get_connections() - DictionaryDatum ncdict( new Dictionary ); - def( ncdict, names::synapse_model, syn_model ); + dictionary ncdict; + ncdict[ names::synapse_model.toString() ] = syn_model; // Avoid setting up new array for each iteration of the loop std::vector< index > source_array( 1 ); @@ -320,7 +320,7 @@ Layer< D >::dump_connections( std::ostream& out, const Position< D > source_pos = src_iter->first; source_array[ 0 ] = source_node_id; - def( ncdict, names::source, NodeCollectionDatum( NodeCollection::create( source_array ) ) ); + ncdict[ names::source.toString() ] = NodeCollectionDatum( NodeCollection::create( source_array ) ); ArrayDatum connectome = kernel().connection_manager.get_connections( ncdict ); // Print information about all local connections for current source diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp index 9a5cc95560..b5f5f4afad 100644 --- a/nestkernel/logging_manager.cpp +++ b/nestkernel/logging_manager.cpp @@ -121,46 +121,48 @@ nest::LoggingManager::publish_log( const nest::severity_t s, } void -nest::LoggingManager::all_entries_accessed( const Dictionary& d, +nest::LoggingManager::all_entries_accessed( const dictionary& d, const std::string& where, const std::string& msg, const std::string& file, const size_t line ) const { - std::string missed; - if ( not d.all_accessed( missed ) ) - { - if ( dict_miss_is_error_ ) - { - throw UnaccessedDictionaryEntry( missed ); - } - else - { - publish_log( M_WARNING, where, msg + missed, file, line ); - } - } + // TODO-PYNEST-NG: Access flags + // std::string missed; + // if ( not d.all_accessed( missed ) ) + // { + // if ( dict_miss_is_error_ ) + // { + // throw UnaccessedDictionaryEntry( missed ); + // } + // else + // { + // publish_log( M_WARNING, where, msg + missed, file, line ); + // } + // } } void -nest::LoggingManager::all_entries_accessed( const Dictionary& d, +nest::LoggingManager::all_entries_accessed( const dictionary& d, const std::string& where, const std::string& msg1, const std::string& msg2, const std::string& file, const size_t line ) const { - std::string missed; - if ( not d.all_accessed( missed ) ) - { - if ( dict_miss_is_error_ ) - { - throw UnaccessedDictionaryEntry( missed + "\n" + msg2 ); - } - else - { - publish_log( M_WARNING, where, msg1 + missed + "\n" + msg2, file, line ); - } - } + // TODO-PYNEST-NG: Access flags + // std::string missed; + // if ( not d.all_accessed( missed ) ) + // { + // if ( dict_miss_is_error_ ) + // { + // throw UnaccessedDictionaryEntry( missed + "\n" + msg2 ); + // } + // else + // { + // publish_log( M_WARNING, where, msg1 + missed + "\n" + msg2, file, line ); + // } + // } } void diff --git a/nestkernel/logging_manager.h b/nestkernel/logging_manager.h index 180262ddae..ef51372555 100644 --- a/nestkernel/logging_manager.h +++ b/nestkernel/logging_manager.h @@ -30,6 +30,7 @@ // Includes from libnestutil: #include "logging.h" #include "manager_interface.h" +#include "dictionary.h" // Includes from sli: #include "dictdatum.h" @@ -37,8 +38,6 @@ // Inclused from nestkernel: #include "nest_names.h" -class Dictionary; - namespace nest { @@ -91,13 +90,13 @@ class LoggingManager : public ManagerInterface * Implements standard behaviour for dictionary entry misses. Use with define * ALL_ENTRIES_ACCESSED. */ - void all_entries_accessed( const Dictionary&, + void all_entries_accessed( const dictionary&, const std::string&, const std::string&, const std::string&, const size_t ) const; - void all_entries_accessed( const Dictionary&, + void all_entries_accessed( const dictionary&, const std::string&, const std::string&, const std::string&, diff --git a/nestkernel/mask.h b/nestkernel/mask.h index 18eab105cd..fe3e0cc07b 100644 --- a/nestkernel/mask.h +++ b/nestkernel/mask.h @@ -67,7 +67,7 @@ class AbstractMask /** * @returns a dictionary with the definition for this mask. */ - virtual DictionaryDatum + virtual dictionary get_dict() const { throw KernelException( "Can not convert mask to dict" ); @@ -248,7 +248,7 @@ class BoxMask : public Mask< D > Box< D > get_bbox() const; - DictionaryDatum get_dict() const; + dictionary get_dict() const; Mask< D >* clone() const; @@ -349,7 +349,7 @@ class BallMask : public Mask< D > Box< D > get_bbox() const; - DictionaryDatum get_dict() const; + dictionary get_dict() const; Mask< D >* clone() const; @@ -454,7 +454,7 @@ class EllipseMask : public Mask< D > Box< D > get_bbox() const; - DictionaryDatum get_dict() const; + dictionary get_dict() const; Mask< D >* clone() const; @@ -722,7 +722,7 @@ class AnchoredMask : public Mask< D > Box< D > get_bbox() const; - DictionaryDatum get_dict() const; + dictionary get_dict() const; Mask< D >* clone() const; diff --git a/nestkernel/mask_impl.h b/nestkernel/mask_impl.h index 2736ab2331..3808aadb66 100644 --- a/nestkernel/mask_impl.h +++ b/nestkernel/mask_impl.h @@ -128,16 +128,16 @@ BoxMask< D >::clone() const } template < int D > -DictionaryDatum +dictionary BoxMask< D >::get_dict() const { - DictionaryDatum d( new Dictionary ); - DictionaryDatum maskd( new Dictionary ); - def< DictionaryDatum >( d, get_name(), maskd ); - def< std::vector< double > >( maskd, names::lower_left, lower_left_.get_vector() ); - def< std::vector< double > >( maskd, names::upper_right, upper_right_.get_vector() ); - def< double >( maskd, names::azimuth_angle, azimuth_angle_ ); - def< double >( maskd, names::polar_angle, polar_angle_ ); + dictionary d; + dictionary maskd; + d[ get_name().toString() ] = maskd; + maskd[ names::lower_left.toString() ] = lower_left_.get_vector(); + maskd[ names::upper_right.toString() ] = upper_right_.get_vector(); + maskd[ names::azimuth_angle.toString() ] = azimuth_angle_; + maskd[ names::polar_angle.toString() ] = polar_angle_; return d; } @@ -204,14 +204,14 @@ BallMask< D >::clone() const } template < int D > -DictionaryDatum +dictionary BallMask< D >::get_dict() const { - DictionaryDatum d( new Dictionary ); - DictionaryDatum maskd( new Dictionary ); - def< DictionaryDatum >( d, get_name(), maskd ); - def< double >( maskd, names::radius, radius_ ); - def< std::vector< double > >( maskd, names::anchor, center_.get_vector() ); + dictionary d; + dictionary maskd; + d[ get_name().toString() ] = maskd; + maskd[ names::radius.toString() ] = radius_; + maskd[ names::anchor.toString() ] = center_.get_vector(); return d; } @@ -282,18 +282,18 @@ EllipseMask< D >::clone() const } template < int D > -DictionaryDatum +dictionary EllipseMask< D >::get_dict() const { - DictionaryDatum d( new Dictionary ); - DictionaryDatum maskd( new Dictionary ); - def< DictionaryDatum >( d, get_name(), maskd ); - def< double >( maskd, names::major_axis, major_axis_ ); - def< double >( maskd, names::minor_axis, minor_axis_ ); - def< double >( maskd, names::polar_axis, polar_axis_ ); - def< std::vector< double > >( maskd, names::anchor, center_.get_vector() ); - def< double >( maskd, names::azimuth_angle, azimuth_angle_ ); - def< double >( maskd, names::polar_angle, polar_angle_ ); + dictionary d; + dictionary maskd; + d[ get_name().toString() ] = maskd; + maskd[ names::major_axis.toString() ] = major_axis_; + maskd[ names::minor_axis.toString() ] = minor_axis_; + maskd[ names::polar_axis.toString() ] = polar_axis_; + maskd[ names::anchor.toString() ] = center_.get_vector(); + maskd[ names::azimuth_angle.toString() ] = azimuth_angle_; + maskd[ names::polar_angle.toString() ] = polar_angle_; return d; } @@ -502,11 +502,11 @@ AnchoredMask< D >::clone() const } template < int D > -DictionaryDatum +dictionary AnchoredMask< D >::get_dict() const { - DictionaryDatum d = m_->get_dict(); - def< std::vector< double > >( d, names::anchor, anchor_.get_vector() ); + dictionary d = m_->get_dict(); + d[ names::anchor.toString() ] = anchor_.get_vector(); return d; } diff --git a/nestkernel/model_manager.h b/nestkernel/model_manager.h index cbcf1fe0ca..026f2f513b 100644 --- a/nestkernel/model_manager.h +++ b/nestkernel/model_manager.h @@ -185,7 +185,7 @@ class ModelManager : public ManagerInterface */ bool connector_requires_urbanczik_archiving( const synindex syn_id ) const; - void set_connector_defaults( synindex syn_id, const DictionaryDatum& d ); + void set_connector_defaults( synindex syn_id, const dictionary& d ); /** * Check, if there are instances of a given model. diff --git a/nestkernel/music_manager.h b/nestkernel/music_manager.h index 82f27ac27f..fda1720226 100644 --- a/nestkernel/music_manager.h +++ b/nestkernel/music_manager.h @@ -51,8 +51,8 @@ void nest::Communicator::finalize() Linked Functions: -void set_status( index, const DictionaryDatum& ); -DictionaryDatum get_status( index ); +void set_status( index, const dictionary& ); +dictionary get_status( index ); void register_music_in_port( std::string portname ); void unregister_music_in_port( std::string portname ); void register_music_event_in_proxy( std::string portname, int channel, diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 1e5ba8b527..2563941820 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -197,7 +197,7 @@ void set_connection_status( const ConnectionDatum& conn, const dictionary& dict ) { // TODO_PYNEST-NG: Get ConnectionDatum dict - // DictionaryDatum conn_dict = conn.get_dict(); + // dictionary conn_dict = conn.get_dict(); dictionary conn_dict; const index source_node_id = conn_dict.get< long >( nest::names::source.toString() ); const index target_node_id = conn_dict.get< long >( nest::names::target.toString() ); @@ -276,13 +276,14 @@ connect_arrays( long* sources, } ArrayDatum -get_connections( const DictionaryDatum& dict ) +get_connections( const dictionary& dict ) { - dict->clear_access_flags(); + // TODO-PYNEST-NG: access flags + // dict->clear_access_flags(); ArrayDatum array = kernel().connection_manager.get_connections( dict ); - ALL_ENTRIES_ACCESSED( *dict, "GetConnections", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *dict, "GetConnections", "Unread dictionary entries: " ); return array; } @@ -473,14 +474,13 @@ apply( const ParameterDatum& param, const NodeCollectionDatum& nc ) } std::vector< double > -apply( const ParameterDatum& param, const DictionaryDatum& positions ) +apply( const ParameterDatum& param, const dictionary& positions ) { - auto source_tkn = positions->lookup( names::source ); - auto source_nc = getValue< NodeCollectionPTR >( source_tkn ); - - auto targets_tkn = positions->lookup( names::targets ); - TokenArray target_tkns = getValue< TokenArray >( targets_tkn ); - return param->apply( source_nc, target_tkns ); + auto source_nc = positions.get< NodeCollectionPTR >( names::source.toString() ); + auto targets = positions.get< std::vector< int > >( names::targets.toString() ); + // TODO-PYNEST-NG: fix Parameter::apply() + // return param->apply( source_nc, targets ); + return {}; } Datum* diff --git a/nestkernel/nest.h b/nestkernel/nest.h index de590bcd7d..58c298b64a 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -146,7 +146,7 @@ void connect_arrays( long* sources, size_t n, std::string syn_model ); -ArrayDatum get_connections( const DictionaryDatum& dict ); +ArrayDatum get_connections( const dictionary& dict ); void simulate( const double& t ); @@ -192,9 +192,9 @@ void prepare(); */ void cleanup(); -void copy_model( const Name& oldmodname, const Name& newmodname, const DictionaryDatum& dict ); +void copy_model( const Name& oldmodname, const Name& newmodname, const dictionary& dict ); -void set_model_defaults( const Name& model_name, const DictionaryDatum& ); +void set_model_defaults( const Name& model_name, const dictionary& ); dictionary get_model_defaults( const Name& model_name ); // TODO-PYNEST-NG: static functions? @@ -216,7 +216,7 @@ ParameterFactory& parameter_factory_(); double get_value( const ParameterDatum& param ); bool is_spatial( const ParameterDatum& param ); std::vector< double > apply( const ParameterDatum& param, const NodeCollectionDatum& nc ); -std::vector< double > apply( const ParameterDatum& param, const DictionaryDatum& positions ); +std::vector< double > apply( const ParameterDatum& param, const dictionary& positions ); Datum* node_collection_array_index( const Datum* datum, const long* array, unsigned long n ); Datum* node_collection_array_index( const Datum* datum, const bool* array, unsigned long n ); diff --git a/nestkernel/nest_datums.h b/nestkernel/nest_datums.h index 59284ca9ea..62e018d0ca 100644 --- a/nestkernel/nest_datums.h +++ b/nestkernel/nest_datums.h @@ -30,7 +30,15 @@ // Includes from nestkernel: #include "connection_id.h" #include "node_collection.h" + #include "nestmodule.h" +#include "event.h" +#include "exceptions.h" +#include "generic_factory.h" +#include "ntree.h" +#include "parameter.h" +#include "position.h" + // Includes from sli: #include "aggregatedatum.h" diff --git a/nestkernel/nestmodule.cpp b/nestkernel/nestmodule.cpp index 44c3a13d90..b5a2bf6fec 100644 --- a/nestkernel/nestmodule.cpp +++ b/nestkernel/nestmodule.cpp @@ -137,7 +137,7 @@ NestModule::commandstring( void ) const // } // Name n = ( *dictd )->begin()->first; -// DictionaryDatum pdict = getValue< DictionaryDatum >( *dictd, n ); +// DictionaryDatum pdict = *dictd.get(n.toString()); // return create_parameter( n, pdict ); // } // else @@ -171,7 +171,7 @@ NestModule::mask_factory_( void ) } MaskDatum -NestModule::create_mask( const Token& t ) +NestModule::create_mask( const dictionary& params ) { // TODO-PYNEST-NG: move and convert to use dictionary // // t can be either an existing MaskDatum, or a Dictionary containing @@ -283,25 +283,25 @@ static AbstractMask* create_doughnut( const DictionaryDatum& d ) { // The doughnut (actually an annulus) is created using a DifferenceMask - Position< 2 > center( 0, 0 ); - if ( d->known( names::anchor ) ) - { - center = getValue< std::vector< double > >( d, names::anchor ); - } + // Position< 2 > center( 0, 0 ); + // if ( d.known( names::anchor.toString() ) ) + // { + // center = d.get< std::vector< double > >( names::anchor.toString() ); + // } - const double outer = getValue< double >( d, names::outer_radius ); - const double inner = getValue< double >( d, names::inner_radius ); - if ( inner >= outer ) - { - throw BadProperty( - "nest::create_doughnut: " - "inner_radius < outer_radius required." ); - } + // const double outer = d.get< double >( names::outer_radius.toString() ); + // const double inner = d.get< double >( names::inner_radius.toString() ); + // if ( inner >= outer ) + // { + // throw BadProperty( + // "nest::create_doughnut: " + // "inner_radius < outer_radius required." ); + // } - BallMask< 2 > outer_circle( center, outer ); - BallMask< 2 > inner_circle( center, inner ); + // BallMask< 2 > outer_circle( center, outer ); + // BallMask< 2 > inner_circle( center, inner ); - return new DifferenceMask< 2 >( outer_circle, inner_circle ); + // return new DifferenceMask< 2 >( outer_circle, inner_circle ); } @@ -588,7 +588,7 @@ NestModule::GetMetadata_gFunction::execute( SLIInterpreter* i ) const { // meta->get_status( dict ); - ( *dict )[ names::network_size ] = nc->size(); + // dict[ names::network_size.toString() ] = nc->size(); } i->OStack.pop(); @@ -654,10 +654,10 @@ NestModule::GetConnections_DFunction::execute( SLIInterpreter* i ) const DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - ArrayDatum array = get_connections( dict ); + // ArrayDatum array = get_connections( dict ); i->OStack.pop(); - i->OStack.push( array ); + // i->OStack.push( array ); i->EStack.pop(); } @@ -1303,10 +1303,10 @@ NestModule::Cvdict_CFunction::execute( SLIInterpreter* i ) const i->assert_stack_load( 1 ); ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.pick( 0 ) ); - DictionaryDatum dict = conn.get_dict(); + // DictionaryDatum dict = conn.get_dict(); i->OStack.pop(); - i->OStack.push( dict ); + // i->OStack.push( dict ); i->EStack.pop(); } @@ -1845,10 +1845,10 @@ NestModule::Compare_P_P_DFunction::execute( SLIInterpreter* i ) const ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 1 ) ); DictionaryDatum param3 = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - ParameterDatum newparam = compare_parameter( param1, param2, param3 ); + // ParameterDatum newparam = compare_parameter( param1, param2, param3 ); i->OStack.pop( 3 ); - i->OStack.push( newparam ); + // i->OStack.push( newparam ); i->EStack.pop(); } @@ -1988,10 +1988,10 @@ NestModule::Apply_P_DFunction::execute( SLIInterpreter* i ) const auto positions = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); auto param = getValue< ParameterDatum >( i->OStack.pick( 1 ) ); - auto result = apply( param, positions ); + // auto result = apply( param, positions ); i->OStack.pop( 2 ); - i->OStack.push( result ); + // i->OStack.push( result ); i->EStack.pop(); } @@ -2399,10 +2399,10 @@ NestModule::CreateMask_DFunction::execute( SLIInterpreter* i ) const const DictionaryDatum mask_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); - MaskDatum datum = nest::create_mask( mask_dict ); + // MaskDatum datum = nest::create_mask( mask_dict ); i->OStack.pop( 1 ); - i->OStack.push( datum ); + // i->OStack.push( datum ); i->EStack.pop(); } @@ -2693,10 +2693,10 @@ NestModule::GetLayerStatus_gFunction::execute( SLIInterpreter* i ) const const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) ); - DictionaryDatum result = get_layer_status( layer ); + // DictionaryDatum result = get_layer_status( layer ); i->OStack.pop( 1 ); - i->OStack.push( result ); + // i->OStack.push( result ); i->EStack.pop(); } @@ -2811,10 +2811,10 @@ NestModule::Cvdict_MFunction::execute( SLIInterpreter* i ) const i->assert_stack_load( 1 ); MaskDatum mask = getValue< MaskDatum >( i->OStack.pick( 0 ) ); - DictionaryDatum dict = mask->get_dict(); + // DictionaryDatum dict = mask->get_dict(); i->OStack.pop(); - i->OStack.push( dict ); + // i->OStack.push( dict ); i->EStack.pop(); } diff --git a/nestkernel/nestmodule.h b/nestkernel/nestmodule.h index d169137aa1..ca2e3c1b30 100644 --- a/nestkernel/nestmodule.h +++ b/nestkernel/nestmodule.h @@ -117,7 +117,7 @@ class NestModule : public SLIModule * as value, and optionally an anchor. * @returns Either the MaskDatum given as argument, or a new mask. */ - static sharedPtrDatum< AbstractMask, &NestModule::MaskType > /*MaskDatum*/ create_mask( const Token& t ); + static sharedPtrDatum< AbstractMask, &NestModule::MaskType > /*MaskDatum*/ create_mask( const dictionary& params ); /** * Create a new Mask object using the mask factory. diff --git a/nestkernel/node.h b/nestkernel/node.h index a911502fe7..00f95b10ec 100644 --- a/nestkernel/node.h +++ b/nestkernel/node.h @@ -774,7 +774,7 @@ class Node * * get_status_base() first gets a dictionary with the basic * information of an element, using get_status_dict_(). It then - * calls the custom function get_status(DictionaryDatum) with + * calls the custom function get_status(dictionary) with * the created status dictionary as argument. */ dictionary get_status_base(); diff --git a/nestkernel/parameter.cpp b/nestkernel/parameter.cpp index db84756e26..2d0fb55648 100644 --- a/nestkernel/parameter.cpp +++ b/nestkernel/parameter.cpp @@ -405,7 +405,7 @@ subtract_parameter( const std::shared_ptr< Parameter > first, const std::shared_ std::shared_ptr< Parameter > compare_parameter( const std::shared_ptr< Parameter > first, const std::shared_ptr< Parameter > second, - const DictionaryDatum& d ) + const dictionary& d ) { return std::shared_ptr< Parameter >( new ComparingParameter( first, second, d ) ); } diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h index 84b795a26d..a87af39b7a 100644 --- a/nestkernel/parameter.h +++ b/nestkernel/parameter.h @@ -674,13 +674,13 @@ class ComparingParameter : public Parameter * 1: > * */ - ComparingParameter( std::shared_ptr< Parameter > m1, std::shared_ptr< Parameter > m2, const DictionaryDatum& d ) + ComparingParameter( std::shared_ptr< Parameter > m1, std::shared_ptr< Parameter > m2, const dictionary& d ) : Parameter( m1->is_spatial() or m2->is_spatial(), true ) , parameter1_( m1 ) , parameter2_( m2 ) , comparator_( -1 ) { - if ( not updateValue< long >( d, names::comparator, comparator_ ) ) + if ( not d.update_value( names::comparator.toString(), comparator_ ) ) { throw BadParameter( "A comparator has to be specified." ); } @@ -1516,7 +1516,7 @@ std::shared_ptr< Parameter > subtract_parameter( const std::shared_ptr< Paramete */ std::shared_ptr< Parameter > compare_parameter( const std::shared_ptr< Parameter > first, const std::shared_ptr< Parameter > second, - const DictionaryDatum& d ); + const dictionary& d ); /** * Create a parameter that chooses between two other parameters, diff --git a/nestkernel/recording_backend_memory.cpp b/nestkernel/recording_backend_memory.cpp index 8ca85c686d..a9dc7b7c67 100644 --- a/nestkernel/recording_backend_memory.cpp +++ b/nestkernel/recording_backend_memory.cpp @@ -217,44 +217,61 @@ nest::RecordingBackendMemory::DeviceData::push_back( const Event& event, void nest::RecordingBackendMemory::DeviceData::get_status( dictionary& d ) const { - DictionaryDatum events; + dictionary events; if ( not d.known( names::events.toString() ) ) { - events = DictionaryDatum( new Dictionary ); d[ names::events.toString() ] = events; } else { - events = d.get< DictionaryDatum >( names::events.toString() ); + events = d.get< dictionary >( names::events.toString() ); } - initialize_property_intvector( events, names::senders ); - append_property( events, names::senders, senders_ ); + auto init_intvector = [&events]( std::string key ) -> std::vector< int >& + { + if ( not events.known( key ) ) + { + events[ key ] = std::vector< int >(); + } + return boost::any_cast< std::vector< int >& >( events[ key ] ); + }; + auto init_doublevector = [&events]( std::string key ) -> std::vector< double >& + { + if ( not events.known( key ) ) + { + events[ key ] = std::vector< double >(); + } + return boost::any_cast< std::vector< double >& >( events[ key ] ); + }; + + // TODO-PYNEST-NG: check that the vector in events is appended correctly + auto& senders = init_intvector( names::senders.toString() ); + senders.insert( senders.end(), senders_.begin(), senders_.end() ); if ( time_in_steps_ ) { - initialize_property_intvector( events, names::times ); - append_property( events, names::times, times_steps_ ); + auto& times = init_intvector( names::times.toString() ); + times.insert( times.end(), times_steps_.begin(), times_steps_.end() ); - initialize_property_doublevector( events, names::offsets ); - append_property( events, names::offsets, times_offset_ ); + auto& offsets = init_doublevector( names::offsets.toString() ); + offsets.insert( offsets.end(), times_offset_.begin(), times_offset_.end() ); } else { - initialize_property_doublevector( events, names::times ); - append_property( events, names::times, times_ms_ ); + auto& times = init_doublevector( names::times.toString() ); + times.insert( times.end(), times_ms_.begin(), times_ms_.end() ); } for ( size_t i = 0; i < double_values_.size(); ++i ) { - initialize_property_doublevector( events, double_value_names_[ i ] ); - append_property( events, double_value_names_[ i ], double_values_[ i ] ); + auto& double_name = init_doublevector( double_value_names_[ i ].toString() ); + double_name.insert( double_name.end(), double_values_[ i ].begin(), double_values_[ i ].end() ); } for ( size_t i = 0; i < long_values_.size(); ++i ) { - initialize_property_intvector( events, long_value_names_[ i ] ); - append_property( events, long_value_names_[ i ], long_values_[ i ] ); + auto& long_name = init_intvector( long_value_names_[ i ].toString() ); + long_name.insert( long_name.end(), long_values_[ i ].begin(), long_values_[ i ].end() ); } d[ names::time_in_steps.toString() ] = time_in_steps_; diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp index 14bf0e97e8..7f163333b7 100644 --- a/nestkernel/recording_backend_sionlib.cpp +++ b/nestkernel/recording_backend_sionlib.cpp @@ -71,7 +71,7 @@ nest::RecordingBackendSIONlib::finalize() } void -nest::RecordingBackendSIONlib::enroll( const RecordingDevice& device, const DictionaryDatum& ) +nest::RecordingBackendSIONlib::enroll( const RecordingDevice& device, const dictionary& ) { const thread t = device.get_thread(); const thread node_id = device.get_node_id(); @@ -629,7 +629,7 @@ nest::RecordingBackendSIONlib::Parameters_::get( const RecordingBackendSIONlib&, } void -nest::RecordingBackendSIONlib::Parameters_::set( const RecordingBackendSIONlib&, const DictionaryDatum& d ) +nest::RecordingBackendSIONlib::Parameters_::set( const RecordingBackendSIONlib&, const dictionary& d ) { d.update_value( names::filename.toString(), filename_ ); d.update_value( names::buffer_size.toString(), buffer_size_ ); @@ -692,13 +692,13 @@ nest::RecordingBackendSIONlib::check_device_status( const dictionary& ) const } void -nest::RecordingBackendSIONlib::get_device_defaults( DictionaryDatum& ) const +nest::RecordingBackendSIONlib::get_device_defaults( dictionary& ) const { // nothing to do } void -nest::RecordingBackendSIONlib::get_device_status( const nest::RecordingDevice&, DictionaryDatum& ) const +nest::RecordingBackendSIONlib::get_device_status( const nest::RecordingDevice&, dictionary& ) const { // nothing to do } diff --git a/nestkernel/recording_backend_sionlib.h b/nestkernel/recording_backend_sionlib.h index 6a4ef85929..c729ded59b 100644 --- a/nestkernel/recording_backend_sionlib.h +++ b/nestkernel/recording_backend_sionlib.h @@ -357,7 +357,7 @@ class RecordingBackendSIONlib : public RecordingBackend Parameters_(); void get( const RecordingBackendSIONlib&, dictionary& ) const; - void set( const RecordingBackendSIONlib&, const DictionaryDatum& ); + void set( const RecordingBackendSIONlib&, const dictionary& ); }; Parameters_ P_; diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp index e617c9ce2c..4b70296ff2 100644 --- a/nestkernel/recording_device.cpp +++ b/nestkernel/recording_device.cpp @@ -147,7 +147,7 @@ nest::RecordingDevice::set_status( const dictionary& d ) // TODO-PYNEST-NG: Fix when access flags are added // if ( not kv_pair.second.accessed() ) // { - // ( *backend_params )[ kv_pair.first ] = kv_pair.second; + // backend_params[ kv_pair.first.toString() ] = kv_pair.second; // } } @@ -160,7 +160,7 @@ nest::RecordingDevice::set_status( const dictionary& d ) // TODO-PYNEST-NG: Fix when access flags are added // if ( kv_pair->second.accessed() ) // { - // ( *backend_params_ )[ kv_pair->first ] = kv_pair->second; + // backend_params_[ kv_pair->first.toString() ] = kv_pair->second; // d->lookup( kv_pair->first ).set_access_flag(); // } } diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp index 4e29433b17..f745c99a2e 100644 --- a/nestkernel/sp_manager.cpp +++ b/nestkernel/sp_manager.cpp @@ -98,7 +98,6 @@ SPManager::get_status( dictionary& d ) for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ ) { dictionary sp_synapse; - // DictionaryDatum sp_synapse = DictionaryDatum( new Dictionary() ); sp_synapse[ names::pre_synaptic_element.toString() ] = ( *i )->get_pre_synaptic_element_name(); sp_synapse[ names::post_synaptic_element.toString() ] = ( *i )->get_post_synaptic_element_name(); sp_synapse[ names::synapse_model.toString() ] = @@ -288,7 +287,7 @@ SPManager::disconnect( NodeCollectionPTR sources, } const std::string rule_name = conn_spec.get< std::string >( names::rule.toString() ); - if ( not kernel().connection_manager.get_connruledict()->known( rule_name ) ) + if ( not kernel().connection_manager.get_connruledict().known( rule_name ) ) { throw BadProperty( "Unknown connectivity rule: " + rule_name ); } diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index 700b621e95..bf1ec7cb4c 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -410,13 +410,14 @@ distance( const ArrayDatum conns ) } MaskDatum -create_mask( const DictionaryDatum& mask_dict ) +create_mask( const dictionary& mask_dict ) { - mask_dict->clear_access_flags(); + // TODO-PYNEST-NG: access flags + // mask_dict->clear_access_flags(); MaskDatum datum( NestModule::create_mask( mask_dict ) ); - ALL_ENTRIES_ACCESSED( *mask_dict, "nest::CreateMask", "Unread dictionary entries: " ); + // ALL_ENTRIES_ACCESSED( *mask_dict, "nest::CreateMask", "Unread dictionary entries: " ); return datum; } @@ -488,11 +489,11 @@ dump_layer_connections( const Token& syn_model, } } -DictionaryDatum get_layer_status( NodeCollectionPTR ) +dictionary get_layer_status( NodeCollectionPTR ) { assert( false && "not implemented" ); - return DictionaryDatum(); + return {}; } } // namespace nest diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h index d309c47269..df6d3aa39d 100644 --- a/nestkernel/spatial.h +++ b/nestkernel/spatial.h @@ -121,7 +121,7 @@ ArrayDatum displacement( NodeCollectionPTR layer_nc, const ArrayDatum point ); std::vector< double > distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ); std::vector< double > distance( NodeCollectionPTR layer_nc, const ArrayDatum point ); std::vector< double > distance( const ArrayDatum conns ); -MaskDatum create_mask( const DictionaryDatum& mask_dict ); +MaskDatum create_mask( const dictionary& mask_dict ); BoolDatum inside( const std::vector< double >& point, const MaskDatum& mask ); MaskDatum intersect_mask( const MaskDatum& mask1, const MaskDatum& mask2 ); MaskDatum union_mask( const MaskDatum& mask1, const MaskDatum& mask2 ); @@ -132,7 +132,7 @@ void dump_layer_connections( const Token& syn_model, NodeCollectionPTR source_layer_nc, NodeCollectionPTR target_layer_nc, OstreamDatum& out_file ); -DictionaryDatum get_layer_status( NodeCollectionPTR layer_nc ); +dictionary get_layer_status( NodeCollectionPTR layer_nc ); } #endif /* SPATIAL_H */ diff --git a/nestkernel/structural_plasticity_node.cpp b/nestkernel/structural_plasticity_node.cpp index 2da23b3c3d..a8469394be 100644 --- a/nestkernel/structural_plasticity_node.cpp +++ b/nestkernel/structural_plasticity_node.cpp @@ -102,22 +102,22 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) } // TODO-PYNEST-NG: fix - // if ( d->known( names::synaptic_elements_param ) ) + // if ( d.known( names::synaptic_elements_param.toString() ) ) // { - // const DictionaryDatum synaptic_elements_dict = getValue< DictionaryDatum >( d, names::synaptic_elements_param ); + // const dictionary synaptic_elements_dict = d.get(names::synaptic_elements_param.toString()); // for ( std::map< Name, SynapticElement >::iterator it = synaptic_elements_map_.begin(); // it != synaptic_elements_map_.end(); // ++it ) // { - // if ( synaptic_elements_dict->known( it->first ) ) + // if ( synaptic_elements_dict.known( it->first.toString() ) ) // { - // const DictionaryDatum synaptic_elements_a = getValue< DictionaryDatum >( synaptic_elements_dict, it->first ); + // const dictionary synaptic_elements_a = synaptic_elements_dict.get(it->first.toString()); // it->second.set( synaptic_elements_a ); // } // } // } - // if ( not d->known( names::synaptic_elements ) ) + // if ( not d.known( names::synaptic_elements.toString() ) ) // { // return; // } @@ -133,7 +133,7 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) // { // insert_result = synaptic_elements_map_.insert( std::pair< Name, SynapticElement >( i->first, SynapticElement() ) // ); - // ( insert_result.first->second ).set( synaptic_elements_d.get< DictionaryDatum >( i->first ) ); + // ( insert_result.first->second ).set( synaptic_elements_d.get< dictionary >( i->first ) ); // } } diff --git a/nestkernel/synaptic_element.h b/nestkernel/synaptic_element.h index 9add7e2072..256945f33a 100644 --- a/nestkernel/synaptic_element.h +++ b/nestkernel/synaptic_element.h @@ -143,14 +143,14 @@ class SynapticElement } /** - * \fn void get(DictionaryDatum&) const + * \fn void get(dictionary&) const * Store current values in a dictionary. * @param d to write data */ void get( dictionary& d ) const; /** - * \fn void set(const DictionaryDatum&) + * \fn void set(const dictionary&) * Set values from a dictionary. * @param d to take data from */ From f32a4baef4c17fcd6438a784224dce02abf90f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 27 Jan 2022 11:42:42 +0100 Subject: [PATCH 011/375] Implemented ResetKernel function --- nest/neststartup.cpp | 2 +- pynest/nest/lib/hl_api_simulation.py | 3 +-- pynest/pynestkernel.pxd | 3 ++- pynest/pynestkernel.pyx | 10 +++++++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/nest/neststartup.cpp b/nest/neststartup.cpp index 707bafb1c1..4c19b732f0 100644 --- a/nest/neststartup.cpp +++ b/nest/neststartup.cpp @@ -81,7 +81,7 @@ neststartup( int* argc, char*** argv, SLIInterpreter& engine ) neststartup( int* argc, char*** argv, SLIInterpreter& engine, std::string modulepath ) #endif { - nest::init_nest( argc, argv ); + // nest::init_nest( argc, argv ); sli_engine = &engine; register_logger_client( sli_logging ); diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index f223a12d0a..54282ac19c 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -194,8 +194,7 @@ def ResetKernel(): unloaded. This may change in a future version of NEST. """ - - sr('ResetKernel') + kernel.llapi_reset_kernel() @check_stack diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 67b9c154d2..e82a31803d 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -187,7 +187,8 @@ cdef extern from "kernel_manager.h" namespace "nest": cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) - NodeCollectionPTR create( const string model_name, const long n ) + void reset_kernel() + NodeCollectionPTR create( const string model_name, const long n ) except + void connect(NodeCollectionPTR sources, NodeCollectionPTR targets, const dictionary& connectivity, diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 5341de33a3..5927f0c5e2 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -652,8 +652,16 @@ cdef dictionary pydict_to_dictionary(object py_dict): raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') return cdict +def llapi_reset_kernel(): + reset_kernel() + def llapi_create(string model, long n): - cdef NodeCollectionPTR gids = create(model, n) + cdef NodeCollectionPTR gids + try: + gids = create(model, n) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_create', '') from None obj = NodeCollectionObject() obj._set_nc(gids) return nest.NodeCollection(obj) From bb2fcf3748448dcaba7e44d4a81f7b37af88467f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 27 Jan 2022 13:21:36 +0100 Subject: [PATCH 012/375] Implemented Simulate function --- pynest/nest/lib/hl_api_simulation.py | 3 +-- pynest/pynestkernel.pxd | 1 + pynest/pynestkernel.pyx | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index 54282ac19c..2fddd8c857 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -62,8 +62,7 @@ def Simulate(t): """ - sps(float(t)) - sr('ms Simulate') + kernel.llapi_simulate(t) @check_stack diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index e82a31803d..2dad4fcdfb 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -196,6 +196,7 @@ cdef extern from "nest.h" namespace "nest": string pprint_to_string( NodeCollectionPTR nc ) size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() + void simulate( const double& t ) cdef extern from "pynestkernel_aux.h": CYTHON_isConnectionGenerator( x ) diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 5927f0c5e2..987e8a953d 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -646,6 +646,8 @@ cdef dictionary pydict_to_dictionary(object py_dict): for key, value in py_dict.items(): if isinstance(value, int): cdict[key.encode('utf-8')] = value + elif isinstance(value, float): + cdict[key.encode('utf-8')] = value elif isinstance(value, str): cdict[key.encode('utf-8')] = value.encode('utf-8') else: @@ -684,3 +686,6 @@ def llapi_to_string(NodeCollectionObject nc): def llapi_get_kernel_status(): cdef dictionary cdict = get_kernel_status() return dictionary_to_pydict(cdict) + +def llapi_simulate(float t): + simulate(t) From f6573e46ca7cc12a01bcc8c5b366b32c787b09b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Mon, 31 Jan 2022 13:25:02 +0100 Subject: [PATCH 013/375] Implemented NodeCollection get() status --- libnestutil/dictionary.cpp | 7 +++++++ libnestutil/dictionary.h | 1 + models/multimeter.cpp | 9 ++++----- models/music_cont_out_proxy.cpp | 4 ++-- nestkernel/model.cpp | 4 ++-- nestkernel/nest.cpp | 27 +++++++++++++++++++++++++++ nestkernel/nest.h | 2 ++ nestkernel/node.cpp | 4 ++-- nestkernel/proxynode.cpp | 2 +- nestkernel/recording_device.cpp | 4 ++-- nestkernel/stimulation_device.cpp | 2 +- pynest/nest/lib/hl_api_helper.py | 13 +++++-------- pynest/nest/lib/hl_api_nodes.py | 2 +- pynest/nest/lib/hl_api_types.py | 2 +- pynest/pynestkernel.pxd | 2 ++ pynest/pynestkernel.pyx | 23 +++++++++++++++++++++++ 16 files changed, 83 insertions(+), 25 deletions(-) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 0c58078f1e..11391c4c4f 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -108,6 +108,13 @@ is_string_vector( const boost::any& operand ) return operand.type() == typeid( std::vector< std::string > ); } +// vector of boost::any +bool +is_any_vector( const boost::any& operand ) +{ + return operand.type() == typeid( std::vector< boost::any > ); +} + // dict bool is_dict( const boost::any& operand ) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 309ba52ab5..b0e5a547ef 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -44,6 +44,7 @@ bool is_int_vector( const boost::any& operand ); bool is_double_vector( const boost::any& operand ); bool is_double_vector_vector( const boost::any& operand ); bool is_string_vector( const boost::any& operand ); +bool is_any_vector( const boost::any& operand ); bool is_dict( const boost::any& operand ); bool is_parameter( const boost::any& operand ); bool is_nc( const boost::any& operand ); diff --git a/models/multimeter.cpp b/models/multimeter.cpp index e6b1f3f62e..a2cc196b6a 100644 --- a/models/multimeter.cpp +++ b/models/multimeter.cpp @@ -94,10 +94,10 @@ nest::multimeter::Parameters_::get( dictionary& d ) const { d[ names::interval.toString() ] = interval_.get_ms(); d[ names::offset.toString() ] = offset_.get_ms(); - ArrayDatum ad; + std::vector< std::string > ad; for ( size_t j = 0; j < record_from_.size(); ++j ) { - ad.push_back( LiteralDatum( record_from_[ j ] ) ); + ad.push_back( record_from_[ j ].toString() ); } d[ names::record_from.toString() ] = ad; } @@ -245,9 +245,8 @@ voltmeter::voltmeter() : multimeter() { dictionary vmdict; - ( new Dictionary ); - ArrayDatum ad; - ad.push_back( LiteralDatum( names::V_m.toString() ) ); + std::vector< std::string > ad; + ad.push_back( names::V_m.toString() ); vmdict[ names::record_from.toString() ] = ad; set_status( vmdict ); } diff --git a/models/music_cont_out_proxy.cpp b/models/music_cont_out_proxy.cpp index d0461762f5..22e4e65406 100644 --- a/models/music_cont_out_proxy.cpp +++ b/models/music_cont_out_proxy.cpp @@ -99,11 +99,11 @@ nest::music_cont_out_proxy::Parameters_::get( dictionary& d ) const d[ names::port_name.toString() ] = port_name_; d[ names::interval.toString() ] = interval_.get_ms(); - ArrayDatum ad_record_from; + std::vector< std::string > ad_record_from; for ( size_t j = 0; j < record_from_.size(); ++j ) { - ad_record_from.push_back( LiteralDatum( record_from_[ j ] ) ); + ad_record_from.push_back( record_from_[ j ].toString() ); } d[ names::record_from.toString() ] = ad_record_from; diff --git a/nestkernel/model.cpp b/nestkernel/model.cpp index c8dbdb082a..f08894b9aa 100644 --- a/nestkernel/model.cpp +++ b/nestkernel/model.cpp @@ -135,7 +135,7 @@ Model::get_status( void ) } d[ names::instantiations.toString() ] = Token( tmp ); - d[ names::type_id.toString() ] = LiteralDatum( kernel().model_manager.get_model( type_id_ )->get_name() ); + d[ names::type_id.toString() ] = kernel().model_manager.get_model( type_id_ )->get_name(); for ( size_t t = 0; t < tmp.size(); ++t ) { @@ -151,7 +151,7 @@ Model::get_status( void ) d[ names::available.toString() ] = Token( tmp ); - d[ names::model.toString() ] = LiteralDatum( get_name() ); + d[ names::model.toString() ] = get_name(); return d; } diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 2563941820..c934f45f6e 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -181,6 +181,33 @@ get_kernel_status() return d; } +dictionary +get_nc_status( NodeCollectionPTR node_collection ) +{ + dictionary result; + for ( NodeCollection::const_iterator it = node_collection->begin(); it < node_collection->end(); ++it ) + { + const auto node_status = get_node_status( ( *it ).node_id ); + for ( auto& kv_pair : node_status ) + { + auto p = result.find( kv_pair.first ); + if ( p != result.end() ) + { + // key exists + auto& v = boost::any_cast< std::vector< boost::any >& >( p->second ); + v.push_back( kv_pair.second ); + // *p = v; + } + else + { + // key does not exist yet + result[ kv_pair.first ] = std::vector< boost::any >{ kv_pair.second }; + } + } + } + return result; +} + void set_node_status( const index node_id, const dictionary& dict ) { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 58c298b64a..a8218b24ca 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -106,6 +106,8 @@ RngPtr get_vp_specific_rng( thread tid ); void set_kernel_status( const dictionary& dict ); dictionary get_kernel_status(); +dictionary get_nc_status( NodeCollectionPTR node_collection ); + void set_node_status( const index node_id, const dictionary& dict ); dictionary get_node_status( const index node_id ); diff --git a/nestkernel/node.cpp b/nestkernel/node.cpp index 7c9e1ff639..3e47f0b56e 100644 --- a/nestkernel/node.cpp +++ b/nestkernel/node.cpp @@ -151,10 +151,10 @@ Node::get_status_base() // add information available for all nodes dict[ names::local.toString() ] = kernel().node_manager.is_local_node( this ); - dict[ names::model.toString() ] = LiteralDatum( get_name() ); + dict[ names::model.toString() ] = get_name(); dict[ names::global_id.toString() ] = get_node_id(); dict[ names::vp.toString() ] = get_vp(); - dict[ names::element_type.toString() ] = LiteralDatum( get_element_type() ); + dict[ names::element_type.toString() ] = get_element_type(); // add information available only for local nodes if ( not is_proxy() ) diff --git a/nestkernel/proxynode.cpp b/nestkernel/proxynode.cpp index d46f368ad4..95ac3368dc 100644 --- a/nestkernel/proxynode.cpp +++ b/nestkernel/proxynode.cpp @@ -91,7 +91,7 @@ proxynode::get_status( dictionary& d ) const { const Model* model = kernel().model_manager.get_model( model_id_ ); const Name element_type = model->get_prototype().get_element_type(); - d[ names::element_type.toString() ] = LiteralDatum( element_type ); + d[ names::element_type.toString() ] = element_type.toString(); } diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp index 4b70296ff2..d1d4381f8f 100644 --- a/nestkernel/recording_device.cpp +++ b/nestkernel/recording_device.cpp @@ -72,7 +72,7 @@ void nest::RecordingDevice::Parameters_::get( dictionary& d ) const { d[ names::label.toString() ] = label_; - d[ names::record_to.toString() ] = LiteralDatum( record_to_ ); + d[ names::record_to.toString() ] = record_to_.toString(); } void @@ -183,7 +183,7 @@ nest::RecordingDevice::get_status( dictionary& d ) const Device::get_status( d ); - d[ names::element_type.toString() ] = LiteralDatum( names::recorder ); + d[ names::element_type.toString() ] = names::recorder.toString(); if ( get_node_id() == 0 ) // this is a model prototype, not an actual instance { diff --git a/nestkernel/stimulation_device.cpp b/nestkernel/stimulation_device.cpp index 43fafa491f..a18ce2bb1a 100644 --- a/nestkernel/stimulation_device.cpp +++ b/nestkernel/stimulation_device.cpp @@ -98,7 +98,7 @@ void nest::StimulationDevice::Parameters_::get( dictionary& d ) const { d[ names::label.toString() ] = label_; - d[ names::stimulus_source.toString() ] = LiteralDatum( stimulus_source_ ); + d[ names::stimulus_source.toString() ] = stimulus_source_.toString(); } void diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py index 167689c59e..292eb0f3d4 100644 --- a/pynest/nest/lib/hl_api_helper.py +++ b/pynest/nest/lib/hl_api_helper.py @@ -536,16 +536,13 @@ def get_parameters(nc, param): """ # param is single literal if is_literal(param): - cmd = '/{} get'.format(param) - sps(nc._datum) - try: - sr(cmd) - result = spp() - except kernel.NESTError: - result = nc.get()[param] # If the NodeCollection is a composite. + result = nc.get()[param] + # try: + # except kernel.NESTError: + # result = nc.get()[param] # If the NodeCollection is a composite. # param is array of strings elif is_iterable(param): - result = {param_name: nc.get(param_name) for param_name in param} + result = {param_name: get_parameters(nc, param_name) for param_name in param} else: raise TypeError("Params should be either a string or an iterable") diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index 823c454284..6dbbd9b09b 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -123,7 +123,7 @@ def Create(model, n=1, params=None, positions=None): if params is not None and iterable_or_parameter_in_params: try: - SetStatus(node_ids, params) + node_ids.set(params) except Exception: warnings.warn( "SetStatus() call failed, but nodes have already been " + diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index e62a43eb00..3bcbd99856 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -374,7 +374,7 @@ def get(self, *params, **kwargs): if len(params) == 0: # get() is called without arguments - result = sli_func('get', self._datum) + result = kernel.llapi_get_nc_status(self._datum) elif len(params) == 1: # params is a tuple with a string or list of strings result = get_parameters(self, params[0]) diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 2dad4fcdfb..7e78bc6976 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -172,6 +172,7 @@ cdef extern from "dictionary.h": cbool is_int_vector(const any&) cbool is_double_vector(const any&) cbool is_string_vector(const any&) + cbool is_any_vector(const any&) cbool is_dict(const any&) cdef extern from "mpi_manager.h" namespace "nest": @@ -196,6 +197,7 @@ cdef extern from "nest.h" namespace "nest": string pprint_to_string( NodeCollectionPTR nc ) size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() + dictionary get_nc_status( NodeCollectionPTR nc ) void simulate( const double& t ) cdef extern from "pynestkernel_aux.h": diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 987e8a953d..ec1656d1ee 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -607,6 +607,14 @@ cdef inline object sli_vector_to_object(sli_vector_ptr_t dat, vector_value_t _ = #### PyNEST LL API #### #### #### ################################################################################ +cdef object any_vector_to_list(vector[any] cvec): + cdef tmp = [] + cdef vector[any].iterator it = cvec.begin() + while it != cvec.end(): + tmp.append(any_to_pyobj(deref(it))) + inc(it) + return tmp + cdef object any_to_pyobj(any operand): if is_int(operand): @@ -627,6 +635,8 @@ cdef object any_to_pyobj(any operand): return any_cast[vector[double]](operand) if is_string_vector(operand): return any_cast[vector[string]](operand) + if is_any_vector(operand): + return tuple(any_vector_to_list(any_cast[vector[any]](operand))) if is_dict(operand): return dictionary_to_pydict(any_cast[dictionary](operand)) @@ -654,6 +664,14 @@ cdef dictionary pydict_to_dictionary(object py_dict): raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') return cdict +# cdef object vec_of_dict_to_list(vector[dictionary] cvec): +# cdef tmp = [] +# cdef vector[dictionary].iterator it = cvec.begin() +# while it != cvec.end(): +# tmp.append(dictionary_to_pydict(deref(it))) +# inc(it) +# return tmp + def llapi_reset_kernel(): reset_kernel() @@ -689,3 +707,8 @@ def llapi_get_kernel_status(): def llapi_simulate(float t): simulate(t) + +def llapi_get_nc_status(NodeCollectionObject nc): + cdef dictionary statuses = get_nc_status(nc.thisptr) + # return vec_of_dict_to_list(statuses) + return dictionary_to_pydict(statuses) From ee785428f8fc01deef1f85bd9c1fd6ddf602fcf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Mon, 31 Jan 2022 13:25:25 +0100 Subject: [PATCH 014/375] Implemented NodeCollection slicing function --- nestkernel/nest.cpp | 33 +++++++++++++++++++++++++++++++++ nestkernel/nest.h | 2 ++ pynest/nest/lib/hl_api_types.py | 2 +- pynest/pynestkernel.pxd | 1 + pynest/pynestkernel.pyx | 11 +++++++++++ 5 files changed, 48 insertions(+), 1 deletion(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index c934f45f6e..e42f61a3dc 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -254,6 +254,39 @@ get_connection_status( const ConnectionDatum& conn ) conn.get_port() ); } +NodeCollectionPTR +slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) +{ + const size_t g_size = nc->size(); + + // TODO-PYNEST-NG: Zero-based indexing? + if ( step < 1 ) + { + throw BadParameter( "Slicing step must be strictly positive." ); + } + + if ( start >= 0 ) + { + start -= 1; // adjust from 1-based to 0-based indexing + } + else + { + start += g_size; // automatically correct for 0-based indexing + } + + if ( stop >= 0 ) + { + // no adjustment necessary: adjustment from 1- to 0- based indexing + // and adjustment from last- to stop-based logic cancel + } + else + { + stop += g_size + 1; // adjust from 0- to 1- based indexin + } + + return nc->slice( start, stop, step ); +} + NodeCollectionPTR create( const std::string model_name, const index n_nodes ) { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index a8218b24ca..a5b9f1a01b 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -114,6 +114,8 @@ dictionary get_node_status( const index node_id ); void set_connection_status( const ConnectionDatum& conn, const dictionary& dict ); dictionary get_connection_status( const ConnectionDatum& conn ); +NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ); + NodeCollectionPTR create( const std::string model_name, const index n ); NodeCollectionPTR get_nodes( const dictionary& dict, const bool local_only ); diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 3bcbd99856..312d46bd1c 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -222,7 +222,7 @@ def __getitem__(self, key): if step < 1: raise IndexError('slicing step for NodeCollection must be strictly positive') - return sli_func('Take', self._datum, [start, stop, step]) + return kernel.llapi_slice(self._datum, start, stop, step) elif isinstance(key, (int, numpy.integer)): if abs(key + (key >= 0)) > self.__len__(): raise IndexError('index value outside of the NodeCollection') diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 7e78bc6976..b32f47c1a7 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -190,6 +190,7 @@ cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) void reset_kernel() NodeCollectionPTR create( const string model_name, const long n ) except + + NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) except + void connect(NodeCollectionPTR sources, NodeCollectionPTR targets, const dictionary& connectivity, diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index ec1656d1ee..0f219e63d2 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -695,6 +695,17 @@ def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object co pydict_to_dictionary(conn_params), syn_param_vec) +def llapi_slice(NodeCollectionObject nc, long start, long stop, long step): + cdef NodeCollectionPTR nc_ptr + try: + nc_ptr = slice_nc(nc.thisptr, start, stop, step) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_slice', '') from None + obj = NodeCollectionObject() + obj._set_nc(nc_ptr) + return nest.NodeCollection(obj) + def llapi_nc_size(NodeCollectionObject nc): return nc_size(nc.thisptr) From e77c948dbbacfca8db15f62b4cc7bd236e65c749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 15 Feb 2022 09:24:33 +0100 Subject: [PATCH 015/375] Implemented creating NodeCollection from list of node ids --- nestkernel/nest.cpp | 12 +++++++++--- nestkernel/nest.h | 4 +++- pynest/nest/lib/hl_api_types.py | 3 ++- pynest/pynestkernel.pxd | 5 ++++- pynest/pynestkernel.pyx | 11 +++++++++++ 5 files changed, 29 insertions(+), 6 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index e42f61a3dc..db947d91c9 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -31,16 +31,16 @@ #include "mpi_manager_impl.h" #include "parameter.h" +#include "connector_model_impl.h" #include "iaf_psc_alpha.h" #include "static_synapse.h" -#include "connector_model_impl.h" #include "connection_manager_impl.h" +#include "genericmodel_impl.h" #include "model_manager.h" #include "model_manager_impl.h" -#include "genericmodel_impl.h" #include "dictionary.h" @@ -201,7 +201,7 @@ get_nc_status( NodeCollectionPTR node_collection ) else { // key does not exist yet - result[ kv_pair.first ] = std::vector< boost::any >{ kv_pair.second }; + result[ kv_pair.first ] = std::vector< boost::any > { kv_pair.second }; } } } @@ -307,6 +307,12 @@ create( const std::string model_name, const index n_nodes ) return kernel().node_manager.add_node( model_id, n_nodes ); } +NodeCollectionPTR +make_nodecollection( const std::vector< index > node_ids ) +{ + return NodeCollection::create( node_ids ); +} + NodeCollectionPTR get_nodes( const dictionary& params, const bool local_only ) { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index a5b9f1a01b..794f5d8ac1 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -27,9 +27,9 @@ #include // Includes from libnestutil: +#include "dictionary.h" #include "enum_bitfield.h" #include "logging.h" -#include "dictionary.h" // Includes from nestkernel: #include "nest_datums.h" @@ -118,6 +118,8 @@ NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, l NodeCollectionPTR create( const std::string model_name, const index n ); +NodeCollectionPTR make_nodecollection( const std::vector< index > node_ids ); + NodeCollectionPTR get_nodes( const dictionary& dict, const bool local_only ); void connect( NodeCollectionPTR sources, diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 312d46bd1c..79f63ef34c 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -193,7 +193,8 @@ def __init__(self, data=None): # Data from user, must be converted to datum # Data can be anything that can be converted to a NodeCollection, # such as list, tuple, etc. - nc = kernel.make_nodecollection(data) # TODO-PYNEST-NG: implement + nc = kernel.llapi_make_nodecollection(data) # TODO-PYNEST-NG: implement + self._datum = nc._datum def __iter__(self): return NodeCollectionIterator(self) diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index b32f47c1a7..923b43708f 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -190,11 +190,14 @@ cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) void reset_kernel() NodeCollectionPTR create( const string model_name, const long n ) except + + + NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except + + NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) except + void connect(NodeCollectionPTR sources, NodeCollectionPTR targets, const dictionary& connectivity, - const vector[dictionary]& synapse_params ) + const vector[dictionary]& synapse_params ) except + string pprint_to_string( NodeCollectionPTR nc ) size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 0f219e63d2..414f2aee76 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -686,6 +686,17 @@ def llapi_create(string model, long n): obj._set_nc(gids) return nest.NodeCollection(obj) +def llapi_make_nodecollection(object node_ids): + cdef NodeCollectionPTR gids + try: + gids = make_nodecollection(node_ids) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_make_nodecollection', '') from None + obj = NodeCollectionObject() + obj._set_nc(gids) + return nest.NodeCollection(obj) + def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params): cdef vector[dictionary] syn_param_vec if synapse_params is not None: From 791033befd4db38fed6b15753c37a4a17cf48b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 17 Feb 2022 09:20:10 +0100 Subject: [PATCH 016/375] Fixed slicing of a single node --- pynest/nest/lib/hl_api_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 79f63ef34c..a62485ccd5 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -227,7 +227,7 @@ def __getitem__(self, key): elif isinstance(key, (int, numpy.integer)): if abs(key + (key >= 0)) > self.__len__(): raise IndexError('index value outside of the NodeCollection') - return sli_func('Take', self._datum, [key + (key >= 0)]) + return self[key:key + 1:1] elif isinstance(key, (list, tuple)): if len(key) == 0: return NodeCollection([]) From 34e655b9be5d6655ff5c1194668edc75d979c580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 17 Feb 2022 09:23:15 +0100 Subject: [PATCH 017/375] Implemented get NodeCollection status --- libnestutil/dict_util.h | 3 ++- nestkernel/nest.cpp | 9 +++++++++ nestkernel/nest.h | 1 + nestkernel/structural_plasticity_node.cpp | 8 ++++---- pynest/nest/lib/hl_api_types.py | 2 +- pynest/pynestkernel.pxd | 1 + pynest/pynestkernel.pyx | 5 +++++ 7 files changed, 23 insertions(+), 6 deletions(-) diff --git a/libnestutil/dict_util.h b/libnestutil/dict_util.h index 5fd613b662..50dcb1e576 100644 --- a/libnestutil/dict_util.h +++ b/libnestutil/dict_util.h @@ -71,7 +71,8 @@ template < typename T > bool update_value_param( dictionary const& d, const std::string& key, T& value, nest::Node* node ) { - if ( is_parameter( d.at( key ) ) ) + const auto it = d.find( key ); + if ( it != d.end() and is_parameter( it->second ) ) { if ( not node ) { diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index db947d91c9..8c634d5396 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -208,6 +208,15 @@ get_nc_status( NodeCollectionPTR node_collection ) return result; } +void +set_nc_status( NodeCollectionPTR nc, dictionary& params ) +{ + for ( auto it = nc->begin(); it < nc->end(); ++it ) + { + kernel().node_manager.set_status( ( *it ).node_id, params ); + } +} + void set_node_status( const index node_id, const dictionary& dict ) { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 794f5d8ac1..4a3ca8a33f 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -107,6 +107,7 @@ void set_kernel_status( const dictionary& dict ); dictionary get_kernel_status(); dictionary get_nc_status( NodeCollectionPTR node_collection ); +void set_nc_status( NodeCollectionPTR nc, dictionary& params ); void set_node_status( const index node_id, const dictionary& dict ); dictionary get_node_status( const index node_id ); diff --git a/nestkernel/structural_plasticity_node.cpp b/nestkernel/structural_plasticity_node.cpp index a8469394be..80d30eaa30 100644 --- a/nestkernel/structural_plasticity_node.cpp +++ b/nestkernel/structural_plasticity_node.cpp @@ -117,10 +117,10 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) // } // } // } - // if ( not d.known( names::synaptic_elements.toString() ) ) - // { - // return; - // } + if ( not d.known( names::synaptic_elements.toString() ) ) + { + return; + } // we replace the existing synaptic_elements_map_ by the new one dictionary synaptic_elements_d; std::pair< std::map< Name, SynapticElement >::iterator, bool > insert_result; diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index a62485ccd5..960209edcc 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -461,7 +461,7 @@ def set(self, params=None, **kwargs): if (isinstance(params, (list, tuple)) and self.__len__() != len(params)): raise TypeError("status dict must be a dict, or a list of dicts of length {} ".format(self.__len__())) - sli_func('SetStatus', self._datum, params) + kernel.llapi_set_nc_status(self._datum, params) def tolist(self): """ diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 923b43708f..bc18570700 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -202,6 +202,7 @@ cdef extern from "nest.h" namespace "nest": size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() dictionary get_nc_status( NodeCollectionPTR nc ) + void set_nc_status( NodeCollectionPTR nc, dictionary& params ) void simulate( const double& t ) cdef extern from "pynestkernel_aux.h": diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 414f2aee76..819ce5cf39 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -734,3 +734,8 @@ def llapi_get_nc_status(NodeCollectionObject nc): cdef dictionary statuses = get_nc_status(nc.thisptr) # return vec_of_dict_to_list(statuses) return dictionary_to_pydict(statuses) + +def llapi_set_nc_status(NodeCollectionObject nc, object params): + cdef dictionary params_dict = pydict_to_dictionary(params) + set_nc_status(nc.thisptr, params_dict) + exceptionCls = getattr(NESTErrors, str(e)) From a8ba6693141d0f6ec57e84bc29ff006f6d91318f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 2 Mar 2022 16:16:15 +0100 Subject: [PATCH 018/375] Implemented dictionary access flags --- libnestutil/CMakeLists.txt | 1 + libnestutil/dictionary.cpp | 66 +++++++++++++++++-- libnestutil/dictionary.h | 24 ++++++- .../dictionary_access_flag_manager.cpp | 64 ++++++++++++++++++ libnestutil/dictionary_access_flag_manager.h | 59 +++++++++++++++++ nestkernel/kernel_manager.h | 12 ++++ nestkernel/nest.cpp | 2 + pynest/pynestkernel.pxd | 2 +- pynest/pynestkernel.pyx | 7 +- 9 files changed, 226 insertions(+), 11 deletions(-) create mode 100644 libnestutil/dictionary_access_flag_manager.cpp create mode 100644 libnestutil/dictionary_access_flag_manager.h diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt index 7f1a3a8eb4..45513b6aa8 100644 --- a/libnestutil/CMakeLists.txt +++ b/libnestutil/CMakeLists.txt @@ -21,6 +21,7 @@ set( nestutil_sources beta_normalization_factor.h block_vector.h dictionary.h dictionary.cpp + dictionary_access_flag_manager.h dictionary_access_flag_manager.cpp dict_util.h enum_bitfield.h iterator_pair.h diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 11391c4c4f..90c52871b6 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -20,15 +20,17 @@ * */ +#include +#include +#include #include #include #include -#include -#include #include "dictionary.h" -#include "parameter.h" +#include "kernel_manager.h" #include "nest_datums.h" +#include "parameter.h" // debug @@ -304,7 +306,8 @@ value_equal( const boost::any first, const boost::any second ) } -bool dictionary::operator==( const dictionary& other ) const +bool +dictionary::operator==( const dictionary& other ) const { // Iterate elements in the other dictionary for ( auto& kv_pair : other ) @@ -315,7 +318,7 @@ bool dictionary::operator==( const dictionary& other ) const return false; } // Check for equality - const auto value = at( kv_pair.first ); + const auto value = maptype_::at( kv_pair.first ); if ( not value_equal( value, kv_pair.second ) ) { return false; @@ -324,3 +327,56 @@ bool dictionary::operator==( const dictionary& other ) const // All elements are equal return true; } + + +boost::any& dictionary::operator[]( const std::string& key ) +{ + nest::kernel().get_dict_access_flag_manager().register_access( *this, key ); + return maptype_::operator[]( key ); +} + +boost::any& dictionary::operator[]( std::string&& key ) +{ + nest::kernel().get_dict_access_flag_manager().register_access( *this, key ); + return maptype_::operator[]( key ); +} + +boost::any& +dictionary::at( const std::string& key ) +{ + nest::kernel().get_dict_access_flag_manager().register_access( *this, key ); + return maptype_::at( key ); +} + +const boost::any& +dictionary::at( const std::string& key ) const +{ + nest::kernel().get_dict_access_flag_manager().register_access( *this, key ); + return maptype_::at( key ); +} + +dictionary::iterator +dictionary::find( const std::string& key ) +{ + nest::kernel().get_dict_access_flag_manager().register_access( *this, key ); + return maptype_::find( key ); +} + +dictionary::const_iterator +dictionary::find( const std::string& key ) const +{ + nest::kernel().get_dict_access_flag_manager().register_access( *this, key ); + return maptype_::find( key ); +} + +void +dictionary::init_access_flags() const +{ + nest::kernel().get_dict_access_flag_manager().init_access_flags( *this ); +} + +void +dictionary::all_entries_accessed() const +{ + nest::kernel().get_dict_access_flag_manager().all_accessed( *this ); +} diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index b0e5a547ef..03d3e07cb9 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -23,10 +23,11 @@ #ifndef DICTIONARY_H_ #define DICTIONARY_H_ +#include #include #include +#include #include -#include #include "sliexceptions.h" @@ -53,6 +54,9 @@ bool value_equal( const boost::any first, const boost::any second ); class dictionary : public std::map< std::string, boost::any > { +private: + using maptype_ = std::map< std::string, boost::any >; + public: template < typename T > T @@ -87,14 +91,28 @@ class dictionary : public std::map< std::string, boost::any > bool known( const std::string& key ) const { - return find( key ) != end(); + // Bypass find() function to not set access flag + return maptype_::find( key ) != end(); } bool operator==( const dictionary& other ) const; - bool operator!=( const dictionary& other ) const + + bool + operator!=( const dictionary& other ) const { return not( *this == other ); } + + void init_access_flags() const; + void all_entries_accessed() const; + + // Wrappers for access flags + boost::any& operator[]( const std::string& key ); + boost::any& operator[]( std::string&& key ); + boost::any& at( const std::string& key ); + const boost::any& at( const std::string& key ) const; + iterator find( const std::string& key ); + const_iterator find( const std::string& key ) const; }; #endif /* DICTIONARY_H_ */ diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp new file mode 100644 index 0000000000..546a8481f4 --- /dev/null +++ b/libnestutil/dictionary_access_flag_manager.cpp @@ -0,0 +1,64 @@ +/* + * dictionary_access_flag_manager.cpp + * + * This file is part of NEST. + * + * Copyright (C) 2004 The NEST Initiative + * + * NEST is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * NEST is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NEST. If not, see . + * + */ + + +#include // std::sort, std::copy, std::set_difference +#include // std::accumulate +#include +#include + +#include "dictionary_access_flag_manager.h" + +void +DictionaryAccessFlagManager::all_accessed( const dictionary& dict ) const +{ + std::vector< key_type_ > keys; // To hold keys of the dictionary + std::vector< key_type_ > accessed_keys; // To hold accessed keys, copied from the unordered_set in access_flags_ + std::vector< key_type_ > not_accessed_keys; // To hold keys in the dictionary that are not accessed + + const auto access_set = access_flags_.at( &dict ); + + // Reserve memory for sizes we know + keys.reserve( dict.size() ); + accessed_keys.reserve( access_set.size() ); + // Copy the keys from the dictionary to the vector + for ( auto&& kv : dict ) + { + keys.emplace_back( kv.first ); + } + // Copy the keys from the set of accessed keys to the vector + std::copy( access_set.begin(), access_set.end(), std::back_inserter( accessed_keys ) ); + // Sort keys so we can use set_difference to find unaccessed keys + std::sort( keys.begin(), keys.end() ); + std::sort( accessed_keys.begin(), accessed_keys.end() ); + std::set_difference( + keys.begin(), keys.end(), accessed_keys.begin(), accessed_keys.end(), std::back_inserter( not_accessed_keys ) ); + + if ( not_accessed_keys.size() > 0 ) + { + const auto missed = std::accumulate( + not_accessed_keys.begin(), not_accessed_keys.end(), key_type_(), []( const key_type_& a, const key_type_& b ) { + return a + " " + b; + } ); + throw UnaccessedDictionaryEntry( missed ); + } +} diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h new file mode 100644 index 0000000000..0dcaa00ba5 --- /dev/null +++ b/libnestutil/dictionary_access_flag_manager.h @@ -0,0 +1,59 @@ +/* + * dictionary_access_flag_manager.h + * + * This file is part of NEST. + * + * Copyright (C) 2004 The NEST Initiative + * + * NEST is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * NEST is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NEST. If not, see . + * + */ + +#ifndef DICTIONARY_ACCESS_FLAG_MANAGER_H +#define DICTIONARY_ACCESS_FLAG_MANAGER_H + +#include +#include +#include + +#include "dictionary.h" + +class DictionaryAccessFlagManager +{ +private: + using key_type_ = dictionary::key_type; + std::map< const dictionary*, std::unordered_set< key_type_ > > access_flags_; + +public: + DictionaryAccessFlagManager() = default; + ~DictionaryAccessFlagManager() = default; + + void init_access_flags( const dictionary& ); + void register_access( const dictionary&, const key_type_& ); + void all_accessed( const dictionary& ) const; +}; + +inline void +DictionaryAccessFlagManager::init_access_flags( const dictionary& dict ) +{ + access_flags_[&dict ] = {}; +} + +inline void +DictionaryAccessFlagManager::register_access( const dictionary& dict, const key_type_& key ) +{ + access_flags_[&dict ].insert( key ); +} + +#endif // DICTIONARY_ACCESS_FLAG_MANAGER_H diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h index 007ee3738b..a40fcce181 100644 --- a/nestkernel/kernel_manager.h +++ b/nestkernel/kernel_manager.h @@ -38,6 +38,9 @@ #include "sp_manager.h" #include "vp_manager.h" +// Includes from libnestutil +#include "dictionary_access_flag_manager.h" + // Includes from sli: #include "dictdatum.h" @@ -112,6 +115,7 @@ class KernelManager ~KernelManager(); unsigned long fingerprint_; + DictionaryAccessFlagManager dict_access_flag_manager_; static KernelManager* kernel_manager_instance_; @@ -176,6 +180,8 @@ class KernelManager unsigned long get_fingerprint() const; + DictionaryAccessFlagManager& get_dict_access_flag_manager(); + LoggingManager logging_manager; MPIManager mpi_manager; VPManager vp_manager; @@ -224,4 +230,10 @@ nest::KernelManager::get_fingerprint() const return fingerprint_; } +inline DictionaryAccessFlagManager& +nest::KernelManager::get_dict_access_flag_manager() +{ + return dict_access_flag_manager_; +} + #endif /* KERNEL_MANAGER_H */ diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 8c634d5396..01b5dc629d 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -211,10 +211,12 @@ get_nc_status( NodeCollectionPTR node_collection ) void set_nc_status( NodeCollectionPTR nc, dictionary& params ) { + params.init_access_flags(); for ( auto it = nc->begin(); it < nc->end(); ++it ) { kernel().node_manager.set_status( ( *it ).node_id, params ); } + params.all_entries_accessed(); } void diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index bc18570700..8862087939 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -202,7 +202,7 @@ cdef extern from "nest.h" namespace "nest": size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() dictionary get_nc_status( NodeCollectionPTR nc ) - void set_nc_status( NodeCollectionPTR nc, dictionary& params ) + void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + void simulate( const double& t ) cdef extern from "pynestkernel_aux.h": diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 819ce5cf39..d6fbc6ba2e 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -737,5 +737,8 @@ def llapi_get_nc_status(NodeCollectionObject nc): def llapi_set_nc_status(NodeCollectionObject nc, object params): cdef dictionary params_dict = pydict_to_dictionary(params) - set_nc_status(nc.thisptr, params_dict) - exceptionCls = getattr(NESTErrors, str(e)) + try: + set_nc_status(nc.thisptr, params_dict) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_set_nc_status', '') from None From 605364f69283dfde5bf087a6604d76fbaf8e2695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 2 Mar 2022 16:20:02 +0100 Subject: [PATCH 019/375] Adjusted SLI UnaccessedDictionaryEntry to show unaccessed keys --- sli/sliexceptions.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sli/sliexceptions.h b/sli/sliexceptions.h index 55d4576910..9db79001b8 100644 --- a/sli/sliexceptions.h +++ b/sli/sliexceptions.h @@ -290,8 +290,8 @@ class DictError : public InterpreterError { } - DictError( char const* const ) - : InterpreterError( "DictError" ) + DictError( char const* const what ) + : InterpreterError( what ) { } }; @@ -396,7 +396,7 @@ class UnaccessedDictionaryEntry : public DictError } // input: string with names of not accessed UnaccessedDictionaryEntry( const std::string& m ) - : DictError( "UnaccessedDictionaryEntry" ) + : DictError( (std::string( "UnaccessedDictionaryEntry: Unused dictionary items:" ) + m).c_str() ) , msg_( m ) { } From d7aec03fcf948078a6dfb095eb09892536e6ae37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 3 Mar 2022 11:08:24 +0100 Subject: [PATCH 020/375] Re-added access flag checks --- libnestutil/dictionary.cpp | 6 ++- libnestutil/dictionary.h | 10 ++++- .../dictionary_access_flag_manager.cpp | 16 ++++++- libnestutil/dictionary_access_flag_manager.h | 21 +++++++++- nestkernel/conn_builder_conngen.cpp | 9 ++-- nestkernel/connection_creator.cpp | 6 +-- nestkernel/connection_manager.cpp | 42 +++++++++---------- nestkernel/logging_manager.cpp | 4 +- nestkernel/model_manager.cpp | 14 +++---- nestkernel/nest.cpp | 18 ++++---- nestkernel/node_manager.cpp | 15 ++++--- nestkernel/sp_manager.cpp | 14 +++---- nestkernel/spatial.cpp | 15 +++---- nestkernel/stimulation_device.cpp | 20 ++++----- pynest/nest/lib/hl_api_exceptions.py | 2 +- sli/sliexceptions.h | 6 +-- 16 files changed, 121 insertions(+), 97 deletions(-) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 90c52871b6..5e358effa9 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -376,7 +376,9 @@ dictionary::init_access_flags() const } void -dictionary::all_entries_accessed() const +dictionary::all_entries_accessed( const std::string where, const std::string what ) const { - nest::kernel().get_dict_access_flag_manager().all_accessed( *this ); + nest::kernel().get_dict_access_flag_manager().all_accessed( *this, where, what ); } + +// TODO-PYNEST-NG: Convenience function for accessed()? diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 03d3e07cb9..8a23ff31d8 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -104,7 +104,15 @@ class dictionary : public std::map< std::string, boost::any > } void init_access_flags() const; - void all_entries_accessed() const; + + /** + * @brief Check that all elements in the dictionary have been accessed. + * + * @param where Which function the error occurs in + * @param what Which parameter triggers the error + * + */ + void all_entries_accessed( const std::string where, const std::string what ) const; // Wrappers for access flags boost::any& operator[]( const std::string& key ); diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp index 546a8481f4..796388de8c 100644 --- a/libnestutil/dictionary_access_flag_manager.cpp +++ b/libnestutil/dictionary_access_flag_manager.cpp @@ -29,7 +29,9 @@ #include "dictionary_access_flag_manager.h" void -DictionaryAccessFlagManager::all_accessed( const dictionary& dict ) const +DictionaryAccessFlagManager::all_accessed( const dictionary& dict, + const std::string where, + const std::string what ) const { std::vector< key_type_ > keys; // To hold keys of the dictionary std::vector< key_type_ > accessed_keys; // To hold accessed keys, copied from the unordered_set in access_flags_ @@ -59,6 +61,16 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict ) const not_accessed_keys.begin(), not_accessed_keys.end(), key_type_(), []( const key_type_& a, const key_type_& b ) { return a + " " + b; } ); - throw UnaccessedDictionaryEntry( missed ); + + // TODO-PYNEST-NG: special case for blank ("unaccessed elements in function ")? + + throw UnaccessedDictionaryEntry( std::string( "unaccessed elements in " ) + what + std::string( ", in function " ) + + where + std::string( ": " ) + missed ); } } + +bool +DictionaryAccessFlagManager::accessed( const dictionary& dict, const key_type_& key ) +{ + return access_flags_.at( &dict ).count( key ) > 0; +} diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h index 0dcaa00ba5..5ae4b77200 100644 --- a/libnestutil/dictionary_access_flag_manager.h +++ b/libnestutil/dictionary_access_flag_manager.h @@ -41,7 +41,26 @@ class DictionaryAccessFlagManager void init_access_flags( const dictionary& ); void register_access( const dictionary&, const key_type_& ); - void all_accessed( const dictionary& ) const; + + /** + * @brief Check that all elements in a dictionary have been accessed. + * + * @param dict Dictionary to check + * @param where Which function the error occurs in + * @param what Which parameter triggers the error + * + */ + void all_accessed( const dictionary& dict, const std::string where, const std::string what ) const; + + /** + * @brief Return whether the specified key has been accessed by the dictionary. + * + * @param dict Dictionary to check + * @param key Key to check + * @return true if key has been accessed + * @return false if key has not been accessed + */ + bool accessed( const dictionary& dict, const key_type_& key ); }; inline void diff --git a/nestkernel/conn_builder_conngen.cpp b/nestkernel/conn_builder_conngen.cpp index 8aa404bbe2..ecc821b885 100644 --- a/nestkernel/conn_builder_conngen.cpp +++ b/nestkernel/conn_builder_conngen.cpp @@ -51,11 +51,10 @@ ConnectionGeneratorBuilder::ConnectionGeneratorBuilder( NodeCollectionPTR source conn_spec.update_value( "params_map", params_map_ ); - // TODO-PYNEST-NG: access flags - // for ( Dictionary::iterator it = params_map_->begin(); it != params_map_->end(); ++it ) - // { - // it->second.set_access_flag(); - // } + for ( auto& kv : params_map_ ) + { + nest::kernel().get_dict_access_flag_manager().register_access( params_map_, kv.first ); + } if ( syn_specs[ 0 ].known( names::weight.toString() ) or syn_specs[ 0 ].known( names::delay.toString() ) ) { diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp index d3b5628e4d..1e765bd2de 100644 --- a/nestkernel/connection_creator.cpp +++ b/nestkernel/connection_creator.cpp @@ -92,9 +92,6 @@ ConnectionCreator::ConnectionCreator( dictionary dict ) extract_params_( dict, param_dicts_[ 0 ] ); // } - // TODO-PYNEST-NG: access flags - // ALL_ENTRIES_ACCESSED( *dict, "ConnectionCreator", "Unread dictionary entries: " ); - // Set default synapse_model, weight and delay if not given explicitly if ( synapse_model_.empty() ) { @@ -192,8 +189,7 @@ ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< diction dictionary syn_dict; // Using a lambda function here instead of updateValue because updateValue causes // problems when setting a value to a dictionary-entry in syn_dict. - auto copy_long_if_known = [&syn_dict, &dict_datum]( const std::string& name ) -> void - { + auto copy_long_if_known = [&syn_dict, &dict_datum]( const std::string& name ) -> void { if ( dict_datum.known( name ) ) { syn_dict[ name ] = dict_datum.get< long >( name ); diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 2b7438fb46..006dba5a97 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -221,7 +221,7 @@ nest::ConnectionManager::get_synapse_status( const index source_node_id, // receiving devices if ( ( source->has_proxies() and target->has_proxies() and connections_[ tid ][ syn_id ] != NULL ) or ( ( source->has_proxies() and not target->has_proxies() and not target->local_receiver() - and connections_[ tid ][ syn_id ] != NULL ) ) ) + and connections_[ tid ][ syn_id ] != NULL ) ) ) { connections_[ tid ][ syn_id ]->get_synapse_status( tid, lcid, dict ); } @@ -262,7 +262,7 @@ nest::ConnectionManager::set_synapse_status( const index source_node_id, // receiving devices if ( ( source->has_proxies() and target->has_proxies() and connections_[ tid ][ syn_id ] != NULL ) or ( ( source->has_proxies() and not target->has_proxies() and not target->local_receiver() - and connections_[ tid ][ syn_id ] != NULL ) ) ) + and connections_[ tid ][ syn_id ] != NULL ) ) ) { connections_[ tid ][ syn_id ]->set_synapse_status( lcid, dict, cm ); } @@ -383,14 +383,11 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources, throw IllegalConnection( "Postsynaptic nodes cannot be an empty NodeCollection" ); } - // TODO-PYNEST-NG: Access flags - - // conn_spec->clear_access_flags(); - - // for ( auto syn_params : syn_specs ) - // { - // syn_params->clear_access_flags(); - // } + conn_spec.init_access_flags(); + for ( auto& syn_param : syn_specs ) + { + syn_param.init_access_flags(); + } if ( not conn_spec.known( names::rule.toString() ) ) { @@ -409,11 +406,11 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources, assert( cb != 0 ); // at this point, all entries in conn_spec and syn_spec have been checked - // ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries in conn_spec: " ); - // for ( auto syn_params : syn_specs ) - // { - // ALL_ENTRIES_ACCESSED( *syn_params, "Connect", "Unread dictionary entries in syn_spec: " ); - // } + conn_spec.all_entries_accessed( "Connect", "conn_spec" ); + for ( auto& syn_param : syn_specs ) + { + syn_param.all_entries_accessed( "Connect", "syn_spec" ); + } // Set flag before calling cb->connect() in case exception is thrown after some connections have been created. set_connections_have_changed(); @@ -609,8 +606,7 @@ nest::ConnectionManager::connect_arrays( long* sources, index synapse_model_id( kernel().model_manager.get_synapsedict().get< synindex >( syn_model ) ); // Increments pointers to weight and delay, if they are specified. - auto increment_wd = [weights, delays]( decltype( weights ) & w, decltype( delays ) & d ) - { + auto increment_wd = [weights, delays]( decltype( weights ) & w, decltype( delays ) & d ) { if ( weights != nullptr ) { ++w; @@ -692,10 +688,10 @@ nest::ConnectionManager::connect_arrays( long* sources, } } + param_dicts[ tid ].init_access_flags(); connect( *s, target_node, tid, synapse_model_id, param_dicts[ tid ], delay_buffer, weight_buffer ); - // TODO-PYNEST-NG: Access flags - // ALL_ENTRIES_ACCESSED( *param_dicts[ tid ], "connect_arrays", "Unread dictionary entries: " ); + param_dicts[ tid ].all_entries_accessed( "connect_arrays", "params" ); increment_wd( w, d ); } @@ -810,10 +806,10 @@ nest::ConnectionManager::increase_connection_count( const thread tid, const syni ++num_connections_[ tid ][ syn_id ]; if ( num_connections_[ tid ][ syn_id ] >= MAX_LCID ) { - throw KernelException( String::compose( - "Too many connections: at most %1 connections supported per virtual " - "process and synapse model.", - MAX_LCID ) ); + throw KernelException( + String::compose( "Too many connections: at most %1 connections supported per virtual " + "process and synapse model.", + MAX_LCID ) ); } } diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp index b5f5f4afad..5a186c3e16 100644 --- a/nestkernel/logging_manager.cpp +++ b/nestkernel/logging_manager.cpp @@ -127,7 +127,7 @@ nest::LoggingManager::all_entries_accessed( const dictionary& d, const std::string& file, const size_t line ) const { - // TODO-PYNEST-NG: Access flags + // TODO-PYNEST-NG: Access flags (function never used?) // std::string missed; // if ( not d.all_accessed( missed ) ) // { @@ -150,7 +150,7 @@ nest::LoggingManager::all_entries_accessed( const dictionary& d, const std::string& file, const size_t line ) const { - // TODO-PYNEST-NG: Access flags + // TODO-PYNEST-NG: Access flags (function never used?) // std::string missed; // if ( not d.all_accessed( missed ) ) // { diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index 8ec466789d..dd4a431a64 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -268,7 +268,8 @@ ModelManager::copy_synapse_model_( index old_id, Name new_name ) { const std::string msg = "CopyModel cannot generate another synapse. Maximal synapse model count " - "of " + std::to_string( MAX_SYN_ID ) + " exceeded."; + "of " + + std::to_string( MAX_SYN_ID ) + " exceeded."; LOG( M_ERROR, "ModelManager::copy_synapse_model_", msg ); throw KernelException( "Synapse model count exceeded" ); } @@ -320,19 +321,18 @@ ModelManager::set_model_defaults( Name name, dictionary params ) void ModelManager::set_node_defaults_( index model_id, const dictionary& params ) { - // TODO-PYNEST-NG: Access flags - // params->clear_access_flags(); + params.init_access_flags(); get_model( model_id )->set_status( params ); - // ALL_ENTRIES_ACCESSED( *params, "ModelManager::set_node_defaults_", "Unread dictionary entries: " ); + params.all_entries_accessed( "ModelManager::set_node_defaults_", "params" ); } void ModelManager::set_synapse_defaults_( index model_id, const dictionary& params ) { - // TODO-PYNEST-NG: Access flags - // params->clear_access_flags(); + params.init_access_flags(); + assert_valid_syn_id( model_id ); std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() ); @@ -363,7 +363,7 @@ ModelManager::set_synapse_defaults_( index model_id, const dictionary& params ) } } - // ALL_ENTRIES_ACCESSED( *params, "ModelManager::set_synapse_defaults_", "Unread dictionary entries: " ); + params.all_entries_accessed( "ModelManager::set_synapse_defaults_", "params" ); } // TODO: replace int with index and return value -1 with invalid_index, also diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 01b5dc629d..44c76caaa0 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -159,10 +159,9 @@ get_vp_specific_rng( thread tid ) void set_kernel_status( const dictionary& dict ) { - // TODO-PYNEST-NG: access flags - // dict->clear_access_flags(); + dict.init_access_flags(); kernel().set_status( dict ); - // ALL_ENTRIES_ACCESSED( *dict, "SetKernelStatus", "Unread dictionary entries: " ); + dict.all_entries_accessed( "SetKernelStatus", "params" ); } dictionary @@ -216,7 +215,7 @@ set_nc_status( NodeCollectionPTR nc, dictionary& params ) { kernel().node_manager.set_status( ( *it ).node_id, params ); } - params.all_entries_accessed(); + params.all_entries_accessed( "NodeCollection.set()", "params" ); } void @@ -355,12 +354,11 @@ connect_arrays( long* sources, ArrayDatum get_connections( const dictionary& dict ) { - // TODO-PYNEST-NG: access flags - // dict->clear_access_flags(); + dict.init_access_flags(); ArrayDatum array = kernel().connection_manager.get_connections( dict ); - // ALL_ENTRIES_ACCESSED( *dict, "GetConnections", "Unread dictionary entries: " ); + dict.all_entries_accessed( "GetConnections", "params" ); return array; } @@ -502,10 +500,12 @@ create_parameter( const dictionary& param_dict ) throw BadProperty( "Parameter definition dictionary must contain one single key only." ); } - // TODO-PYNEST-NG: Access flags const auto n = param_dict.begin()->first; const auto pdict = param_dict.get< dictionary >( n ); - return create_parameter( n, pdict ); + pdict.init_access_flags(); + auto parameter = create_parameter( n, pdict ); + pdict.all_entries_accessed( "create_parameter", "param" ); + return parameter; } std::shared_ptr< Parameter > diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp index 227bc29ce1..c48e124fbe 100644 --- a/nestkernel/node_manager.cpp +++ b/nestkernel/node_manager.cpp @@ -603,16 +603,15 @@ NodeManager::set_status_single_node_( Node& target, const dictionary& d, bool cl // proxies have no properties if ( not target.is_proxy() ) { - // TODO-PYNEST-NG: access flags - // if ( clear_flags ) - // { - // d->clear_access_flags(); - // } + if ( clear_flags ) + { + d.init_access_flags(); + } target.set_status_base( d ); // TODO: Not sure this check should be at single neuron level; advantage is // it stops after first failure. - // ALL_ENTRIES_ACCESSED( *d, "NodeManager::set_status", "Unread dictionary entries: " ); + d.all_entries_accessed( "NodeManager::set_status", "params" ); } } @@ -642,8 +641,8 @@ NodeManager::prepare_nodes() { size_t t = kernel().vp_manager.get_thread_id(); #else - for ( thread t = 0; t < kernel().vp_manager.get_num_threads(); ++t ) - { + for ( thread t = 0; t < kernel().vp_manager.get_num_threads(); ++t ) + { #endif // We prepare nodes in a parallel region. Therefore, we need to catch diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp index f745c99a2e..c5b907ff73 100644 --- a/nestkernel/sp_manager.cpp +++ b/nestkernel/sp_manager.cpp @@ -128,8 +128,8 @@ SPManager::set_status( const dictionary& d ) { return; } /* - * Configure synapses model updated during the simulation. - */ + * Configure synapses model updated during the simulation. + */ Token synmodel; dictionary syn_specs; dictionary syn_spec; @@ -277,9 +277,8 @@ SPManager::disconnect( NodeCollectionPTR sources, } ConnBuilder* cb = NULL; - // TODO-PYNEST-NG: Access flags - // conn_spec->clear_access_flags(); - // syn_spec->clear_access_flags(); + conn_spec.init_access_flags(); + syn_spec.init_access_flags(); if ( not conn_spec.known( names::rule.toString() ) ) { @@ -314,9 +313,8 @@ SPManager::disconnect( NodeCollectionPTR sources, assert( cb != 0 ); // at this point, all entries in conn_spec and syn_spec have been checked - // TODO-PYNEST-NG: Access flags - // ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries: " ); - // ALL_ENTRIES_ACCESSED( *syn_spec, "Connect", "Unread dictionary entries: " ); + conn_spec.all_entries_accessed( "Disconnect", "conn_spec" ); + syn_spec.all_entries_accessed( "Disconnect", "syn_spec" ); // Set flag before calling cb->disconnect() in case exception is thrown after some connections have been removed. kernel().connection_manager.set_connections_have_changed(); diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index bf1ec7cb4c..995bb80fc1 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -113,12 +113,11 @@ get_layer( NodeCollectionPTR nc ) NodeCollectionPTR create_layer( const dictionary& layer_dict ) { - // TODO-PYNEST-NG: Access flags - // layer_dict->clear_access_flags(); + layer_dict.init_access_flags(); NodeCollectionPTR layer = AbstractLayer::create_layer( layer_dict ); - // ALL_ENTRIES_ACCESSED( *layer_dict, "nest::CreateLayer", "Unread dictionary entries: " ); + layer_dict.all_entries_accessed( "CreateLayer", "params" ); return layer; } @@ -412,12 +411,11 @@ distance( const ArrayDatum conns ) MaskDatum create_mask( const dictionary& mask_dict ) { - // TODO-PYNEST-NG: access flags - // mask_dict->clear_access_flags(); + mask_dict.init_access_flags(); MaskDatum datum( NestModule::create_mask( mask_dict ) ); - // ALL_ENTRIES_ACCESSED( *mask_dict, "nest::CreateMask", "Unread dictionary entries: " ); + mask_dict.all_entries_accessed( "CreateMask", "params" ); return datum; } @@ -452,10 +450,9 @@ connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const AbstractLayerPTR source = get_layer( source_nc ); AbstractLayerPTR target = get_layer( target_nc ); - // TODO-PYNEST-NG: Access flags - // connection_dict->clear_access_flags(); + connection_dict.init_access_flags(); ConnectionCreator connector( connection_dict ); - // ALL_ENTRIES_ACCESSED( *connection_dict, "nest::CreateLayers", "Unread dictionary entries: " ); + connection_dict.all_entries_accessed( "CreateLayers", "params" ); // Set flag before calling source->connect() in case exception is thrown after some connections have been created. kernel().connection_manager.set_connections_have_changed(); diff --git a/nestkernel/stimulation_device.cpp b/nestkernel/stimulation_device.cpp index a18ce2bb1a..b336f4a9df 100644 --- a/nestkernel/stimulation_device.cpp +++ b/nestkernel/stimulation_device.cpp @@ -135,23 +135,21 @@ nest::StimulationDevice::set_status( const dictionary& d ) // copy all properties not previously accessed from d to backend_params for ( auto& kv_pair : d ) { - // TODO-PYNEST-NG: access flags - // if ( not kv_pair.second.accessed() ) - // { - // backend_params[ kv_pair.first.toString() ] = kv_pair.second; - // } + if ( not kernel().get_dict_access_flag_manager().accessed( d, kv_pair.first ) ) + { + backend_params[ kv_pair.first ] = kv_pair.second; + } } // cache all properties accessed by the backend in private member backend_params_.clear(); for ( auto& kv_pair : backend_params ) { - // TODO-PYNEST-NG: access flags - // if ( kv_pair.second.accessed() ) - // { - // backend_params_[ kv_pair.first.toString() ] = kv_pair.second; - // d->lookup( kv_pair.first ).set_access_flag(); - // } + if ( kernel().get_dict_access_flag_manager().accessed( backend_params, kv_pair.first ) ) + { + backend_params_[ kv_pair.first ] = kv_pair.second; + kernel().get_dict_access_flag_manager().register_access( d, kv_pair.first ); + } } } else diff --git a/pynest/nest/lib/hl_api_exceptions.py b/pynest/nest/lib/hl_api_exceptions.py index bdd3b27de6..6e4a9fc211 100644 --- a/pynest/nest/lib/hl_api_exceptions.py +++ b/pynest/nest/lib/hl_api_exceptions.py @@ -102,7 +102,7 @@ def __init__(self, commandname, errormessage, errorname='SLIException'): commandname: command name from SLI. errormessage: message from SLI. """ - message = "{} in SLI function {}{}".format(errorname, commandname, errormessage) + message = "{} in PyNEST function {}{}".format(errorname, commandname, errormessage) NESTErrors.NESTError.__init__(self, message) self.errorname = errorname diff --git a/sli/sliexceptions.h b/sli/sliexceptions.h index 9db79001b8..8ed2c2070b 100644 --- a/sli/sliexceptions.h +++ b/sli/sliexceptions.h @@ -71,7 +71,7 @@ class SLIException : public std::exception { } - virtual ~SLIException() throw(){}; + virtual ~SLIException() throw() {}; /** * Returns the SLI error name, used by raiseerror. @@ -358,7 +358,7 @@ class StackUnderflow : public InterpreterError StackUnderflow( int n, int g ) : InterpreterError( "StackUnderflow" ) , needed( n ) - , given( g ){}; + , given( g ) {}; std::string message() const; }; @@ -396,7 +396,7 @@ class UnaccessedDictionaryEntry : public DictError } // input: string with names of not accessed UnaccessedDictionaryEntry( const std::string& m ) - : DictError( (std::string( "UnaccessedDictionaryEntry: Unused dictionary items:" ) + m).c_str() ) + : DictError( ( std::string( "UnaccessedDictionaryEntry: " ) + m ).c_str() ) , msg_( m ) { } From 22902295ecc282deec5655b8d8f28f9d1be4c33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 3 Mar 2022 11:53:09 +0100 Subject: [PATCH 021/375] Simplified all_accessed() function --- .../dictionary_access_flag_manager.cpp | 37 ++++++------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp index 796388de8c..5f2ea18b18 100644 --- a/libnestutil/dictionary_access_flag_manager.cpp +++ b/libnestutil/dictionary_access_flag_manager.cpp @@ -21,7 +21,7 @@ */ -#include // std::sort, std::copy, std::set_difference +#include // std::copy_if #include // std::accumulate #include #include @@ -33,34 +33,21 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict, const std::string where, const std::string what ) const { - std::vector< key_type_ > keys; // To hold keys of the dictionary - std::vector< key_type_ > accessed_keys; // To hold accessed keys, copied from the unordered_set in access_flags_ - std::vector< key_type_ > not_accessed_keys; // To hold keys in the dictionary that are not accessed + // Vector of elements in the dictionary that are not accessed + std::vector< dictionary::value_type > not_accessed_kv_pairs; - const auto access_set = access_flags_.at( &dict ); + const auto& access_set = access_flags_.at( &dict ); + const auto comparator = [&access_set]( + dictionary::value_type kv ) { return access_set.find( kv.first ) == access_set.end(); }; - // Reserve memory for sizes we know - keys.reserve( dict.size() ); - accessed_keys.reserve( access_set.size() ); - // Copy the keys from the dictionary to the vector - for ( auto&& kv : dict ) - { - keys.emplace_back( kv.first ); - } - // Copy the keys from the set of accessed keys to the vector - std::copy( access_set.begin(), access_set.end(), std::back_inserter( accessed_keys ) ); - // Sort keys so we can use set_difference to find unaccessed keys - std::sort( keys.begin(), keys.end() ); - std::sort( accessed_keys.begin(), accessed_keys.end() ); - std::set_difference( - keys.begin(), keys.end(), accessed_keys.begin(), accessed_keys.end(), std::back_inserter( not_accessed_keys ) ); + std::copy_if( dict.begin(), dict.end(), std::back_inserter( not_accessed_kv_pairs ), comparator ); - if ( not_accessed_keys.size() > 0 ) + if ( not_accessed_kv_pairs.size() > 0 ) { - const auto missed = std::accumulate( - not_accessed_keys.begin(), not_accessed_keys.end(), key_type_(), []( const key_type_& a, const key_type_& b ) { - return a + " " + b; - } ); + const auto missed = std::accumulate( not_accessed_kv_pairs.begin(), + not_accessed_kv_pairs.end(), + key_type_(), + []( const key_type_& a, const dictionary::value_type& b ) { return a + " " + b.first; } ); // TODO-PYNEST-NG: special case for blank ("unaccessed elements in function ")? From 1d6a3e45567a2b1f499af7f69f0fb74145f51de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 3 Mar 2022 13:24:35 +0100 Subject: [PATCH 022/375] Added TODO on planned dictionary features and in the access flag manager --- libnestutil/dictionary.h | 4 ++++ libnestutil/dictionary_access_flag_manager.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 8a23ff31d8..de64069593 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -54,6 +54,10 @@ bool value_equal( const boost::any first, const boost::any second ); class dictionary : public std::map< std::string, boost::any > { + // TODO-PYNEST-NG: Meta-information about entries: + // * Value type (enum?) + // * Whether value is writable + // * Docstring for each entry private: using maptype_ = std::map< std::string, boost::any >; diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp index 5f2ea18b18..34ce2dcad2 100644 --- a/libnestutil/dictionary_access_flag_manager.cpp +++ b/libnestutil/dictionary_access_flag_manager.cpp @@ -54,6 +54,7 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict, throw UnaccessedDictionaryEntry( std::string( "unaccessed elements in " ) + what + std::string( ", in function " ) + where + std::string( ": " ) + missed ); } + // TODO-PYNEST-NG: clear access_flags_[ &dict ] to reclaim memory? } bool From 867759eb452ea17c9f2b0107fffbc9ea3145c9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 9 Mar 2022 09:06:37 +0100 Subject: [PATCH 023/375] Implemented set_kernel_status() --- pynest/nest/lib/hl_api_simulation.py | 3 +-- pynest/pynestkernel.pxd | 1 + pynest/pynestkernel.pyx | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index 2fddd8c857..ef5ffef0e7 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -239,8 +239,7 @@ def SetKernelStatus(params): warnings.warn(msg + f' \n`{key}` has been ignored') del params[key] - sps(params) - sr('SetKernelStatus') + kernel.llapi_set_kernel_status(params) @check_stack diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 8862087939..1b96ccf052 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -201,6 +201,7 @@ cdef extern from "nest.h" namespace "nest": string pprint_to_string( NodeCollectionPTR nc ) size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() + void set_kernel_status( const dictionary& ) except + dictionary get_nc_status( NodeCollectionPTR nc ) void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + void simulate( const double& t ) diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index d6fbc6ba2e..874a2a7659 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -727,6 +727,14 @@ def llapi_get_kernel_status(): cdef dictionary cdict = get_kernel_status() return dictionary_to_pydict(cdict) +def llapi_set_kernel_status(object params): + cdef dictionary params_dict = pydict_to_dictionary(params) + try: + set_kernel_status(params_dict) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_set_kernel_status', '') from None + def llapi_simulate(float t): simulate(t) From a0543bf127321f5658c193f83f73af3e530e3fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 10 Mar 2022 08:28:11 +0100 Subject: [PATCH 024/375] Small cleanup of dictionary header --- libnestutil/dictionary.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index de64069593..0655c526e7 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -20,8 +20,8 @@ * */ -#ifndef DICTIONARY_H_ -#define DICTIONARY_H_ +#ifndef DICTIONARY_H +#define DICTIONARY_H #include #include @@ -31,8 +31,6 @@ #include "sliexceptions.h" -// using dictionary = std::map< std::string, boost::any >; - std::string debug_type( const boost::any& operand ); bool is_int( const boost::any& operand ); From 488a79e5373a0ee5c3e9cf5b859b8d3dc2796193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 10 Mar 2022 08:28:45 +0100 Subject: [PATCH 025/375] Added try/catch when casting in update_value() --- libnestutil/dictionary.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 0655c526e7..74e83ff97b 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -84,8 +84,18 @@ class dictionary : public std::map< std::string, boost::any > auto it = find( key ); if ( it != end() ) { - value = boost::any_cast< T >( it->second ); - return true; + try + { + value = boost::any_cast< T >( it->second ); + return true; + } + catch ( const boost::bad_any_cast& ) + { + std::string msg = std::string( "Failed to cast " ) + it->first + " from " + debug_type( it->second ) + + " to type " + std::string( typeid( T ).name() ); + std::cerr << msg << "\n"; + throw TypeMismatch( msg ); + } } return false; } From 0a0598b6bfee4e6982ed1b1a99566a80def448aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 10 Mar 2022 11:39:50 +0100 Subject: [PATCH 026/375] Replaced Name objects with std::strings --- models/ac_generator.cpp | 31 +- models/ac_generator.h | 2 +- models/aeif_cond_alpha.cpp | 101 +- models/aeif_cond_alpha.h | 6 +- models/aeif_cond_alpha_multisynapse.cpp | 81 +- models/aeif_cond_alpha_multisynapse.h | 2 +- models/aeif_cond_beta_multisynapse.cpp | 88 +- models/aeif_cond_beta_multisynapse.h | 2 +- models/aeif_cond_exp.cpp | 93 +- models/aeif_cond_exp.h | 6 +- models/aeif_psc_alpha.cpp | 93 +- models/aeif_psc_alpha.h | 6 +- models/aeif_psc_delta.cpp | 77 +- models/aeif_psc_delta.h | 6 +- models/aeif_psc_delta_clopath.cpp | 144 +-- models/aeif_psc_delta_clopath.h | 6 +- models/aeif_psc_exp.cpp | 85 +- models/aeif_psc_exp.h | 6 +- models/amat2_psc_exp.cpp | 84 +- models/amat2_psc_exp.h | 6 +- models/bernoulli_synapse.h | 10 +- models/binary_neuron.h | 14 +- models/clopath_synapse.h | 24 +- models/cont_delay_synapse_impl.h | 12 +- models/correlation_detector.cpp | 29 +- models/correlomatrix_detector.cpp | 34 +- models/correlospinmatrix_detector.cpp | 26 +- models/dc_generator.cpp | 9 +- models/dc_generator.h | 2 +- models/diffusion_connection.h | 16 +- models/erfc_neuron.cpp | 8 +- models/gamma_sup_generator.cpp | 18 +- models/gap_junction.h | 8 +- models/gauss_rate.cpp | 12 +- models/gif_cond_exp.cpp | 115 +- models/gif_cond_exp.h | 6 +- models/gif_cond_exp_multisynapse.cpp | 104 +- models/gif_cond_exp_multisynapse.h | 6 +- models/gif_pop_psc_exp.cpp | 90 +- models/gif_pop_psc_exp.h | 2 +- models/gif_psc_exp.cpp | 94 +- models/gif_psc_exp.h | 6 +- models/gif_psc_exp_multisynapse.cpp | 96 +- models/gif_psc_exp_multisynapse.h | 4 +- models/ginzburg_neuron.cpp | 16 +- models/glif_cond.cpp | 137 +-- models/glif_cond.h | 2 +- models/glif_psc.cpp | 116 +-- models/glif_psc.h | 2 +- models/hh_cond_beta_gap_traub.cpp | 83 +- models/hh_cond_beta_gap_traub.h | 6 +- models/hh_cond_exp_traub.cpp | 75 +- models/hh_cond_exp_traub.h | 6 +- models/hh_psc_alpha.cpp | 67 +- models/hh_psc_alpha.h | 6 +- models/hh_psc_alpha_clopath.cpp | 91 +- models/hh_psc_alpha_clopath.h | 6 +- models/hh_psc_alpha_gap.cpp | 75 +- models/hh_psc_alpha_gap.h | 6 +- models/ht_neuron.cpp | 202 ++-- models/ht_synapse.h | 20 +- models/iaf_chs_2007.cpp | 28 +- models/iaf_chs_2007.h | 2 +- models/iaf_chxk_2008.cpp | 59 +- models/iaf_chxk_2008.h | 6 +- models/iaf_cond_alpha.cpp | 67 +- models/iaf_cond_alpha.h | 6 +- models/iaf_cond_alpha_mc.cpp | 58 +- models/iaf_cond_alpha_mc.h | 24 +- models/iaf_cond_beta.cpp | 75 +- models/iaf_cond_beta.h | 2 +- models/iaf_cond_exp.cpp | 59 +- models/iaf_cond_exp.h | 6 +- models/iaf_cond_exp_sfa_rr.cpp | 93 +- models/iaf_cond_exp_sfa_rr.h | 4 +- models/iaf_psc_alpha.cpp | 44 +- models/iaf_psc_alpha.h | 2 +- models/iaf_psc_alpha_canon.cpp | 54 +- models/iaf_psc_alpha_canon.h | 2 +- models/iaf_psc_alpha_multisynapse.cpp | 42 +- models/iaf_psc_alpha_multisynapse.h | 2 +- models/iaf_psc_alpha_ps.cpp | 54 +- models/iaf_psc_alpha_ps.h | 2 +- models/iaf_psc_delta.cpp | 40 +- models/iaf_psc_delta.h | 2 +- models/iaf_psc_delta_ps.cpp | 47 +- models/iaf_psc_delta_ps.h | 2 +- models/iaf_psc_exp.cpp | 44 +- models/iaf_psc_exp.h | 2 +- models/iaf_psc_exp_htum.cpp | 44 +- models/iaf_psc_exp_htum.h | 2 +- models/iaf_psc_exp_multisynapse.cpp | 38 +- models/iaf_psc_exp_multisynapse.h | 2 +- models/iaf_psc_exp_ps.cpp | 54 +- models/iaf_psc_exp_ps.h | 2 +- models/iaf_psc_exp_ps_lossless.cpp | 67 +- models/iaf_psc_exp_ps_lossless.h | 5 +- models/inhomogeneous_poisson_generator.cpp | 24 +- models/izhikevich.cpp | 40 +- models/izhikevich.h | 2 +- models/jonke_synapse.h | 34 +- models/lin_rate.cpp | 20 +- models/mat2_psc_exp.cpp | 64 +- models/mat2_psc_exp.h | 6 +- models/mcculloch_pitts_neuron.cpp | 4 +- models/mip_generator.cpp | 12 +- models/multimeter.cpp | 24 +- models/multimeter.h | 2 +- models/music_cont_in_proxy.cpp | 12 +- models/music_cont_out_proxy.cpp | 26 +- models/music_event_in_proxy.cpp | 12 +- models/music_event_out_proxy.cpp | 12 +- models/music_message_in_proxy.cpp | 12 +- models/music_message_in_proxy.h | 13 +- models/music_rate_in_proxy.cpp | 12 +- models/music_rate_out_proxy.cpp | 12 +- models/noise_generator.cpp | 41 +- models/noise_generator.h | 4 +- models/parrot_neuron.cpp | 2 +- models/poisson_generator.cpp | 6 +- models/poisson_generator_ps.cpp | 12 +- models/poisson_generator_ps.h | 2 +- models/pp_cond_exp_mc_urbanczik.cpp | 70 +- models/pp_cond_exp_mc_urbanczik.h | 18 +- models/pp_pop_psc_delta.cpp | 54 +- models/pp_pop_psc_delta.h | 2 +- models/pp_psc_delta.cpp | 86 +- models/pp_psc_delta.h | 2 +- models/ppd_sup_generator.cpp | 30 +- models/pulsepacket_generator.cpp | 20 +- models/quantal_stp_synapse_impl.h | 24 +- models/rate_connection_delayed.h | 6 +- models/rate_connection_instantaneous.h | 8 +- models/rate_neuron_ipn.h | 6 +- models/rate_neuron_ipn_impl.h | 48 +- models/rate_neuron_opn.h | 4 +- models/rate_neuron_opn_impl.h | 36 +- models/rate_transformer_node.h | 4 +- models/rate_transformer_node_impl.h | 10 +- models/siegert_neuron.cpp | 32 +- models/siegert_neuron.h | 2 +- models/sigmoid_rate.cpp | 12 +- models/sigmoid_rate_gg_1998.cpp | 4 +- models/sinusoidal_gamma_generator.cpp | 44 +- models/sinusoidal_gamma_generator.h | 4 +- models/sinusoidal_poisson_generator.cpp | 42 +- models/sinusoidal_poisson_generator.h | 4 +- models/spike_dilutor.cpp | 4 +- models/spike_generator.cpp | 36 +- models/spike_generator.h | 2 +- models/static_synapse.h | 6 +- models/static_synapse_hom_w.h | 6 +- models/stdp_dopamine_synapse.cpp | 38 +- models/stdp_dopamine_synapse.h | 23 +- models/stdp_nn_pre_centered_synapse.h | 32 +- models/stdp_nn_restr_synapse.h | 34 +- models/stdp_nn_symm_synapse.h | 34 +- models/stdp_pl_synapse_hom.cpp | 16 +- models/stdp_pl_synapse_hom.h | 10 +- models/stdp_synapse.h | 32 +- models/stdp_synapse_facetshw_hom_impl.h | 106 +- models/stdp_synapse_hom.cpp | 24 +- models/stdp_synapse_hom.h | 10 +- models/stdp_triplet_synapse.h | 44 +- models/step_current_generator.cpp | 19 +- models/step_current_generator.h | 3 +- models/step_rate_generator.cpp | 19 +- models/step_rate_generator.h | 4 +- models/tanh_rate.cpp | 8 +- models/threshold_lin_rate.cpp | 12 +- models/tsodyks2_synapse.h | 30 +- models/tsodyks_synapse.h | 44 +- models/tsodyks_synapse_hom.cpp | 16 +- models/tsodyks_synapse_hom.h | 12 +- models/urbanczik_synapse.h | 24 +- models/vogels_sprekeler_synapse.h | 30 +- models/volume_transmitter.cpp | 4 +- models/weight_recorder.cpp | 23 +- nestkernel/CMakeLists.txt | 2 +- nestkernel/archiving_node.cpp | 16 +- nestkernel/clopath_archiving_node.cpp | 32 +- nestkernel/common_properties_hom_w.h | 4 +- nestkernel/common_synapse_properties.cpp | 6 +- nestkernel/conn_builder.cpp | 66 +- nestkernel/conn_builder_conngen.cpp | 8 +- nestkernel/connection.h | 40 +- nestkernel/connection_creator.cpp | 52 +- nestkernel/connection_id.cpp | 13 +- nestkernel/connection_label.h | 10 +- nestkernel/connection_manager.cpp | 54 +- nestkernel/connector_base.h | 7 +- nestkernel/connector_model_impl.h | 26 +- nestkernel/delay_checker.cpp | 8 +- nestkernel/device.cpp | 15 +- nestkernel/event_delivery_manager.cpp | 35 +- nestkernel/free_layer.h | 22 +- nestkernel/genericmodel.h | 2 +- nestkernel/grid_layer.h | 24 +- nestkernel/grid_mask.h | 6 +- nestkernel/growth_curve.cpp | 26 +- nestkernel/io_manager.cpp | 20 +- nestkernel/layer.cpp | 29 +- nestkernel/layer_impl.h | 26 +- nestkernel/logging_manager.cpp | 4 +- nestkernel/mask.h | 44 +- nestkernel/mask_impl.h | 26 +- nestkernel/model.cpp | 10 +- nestkernel/model_manager.cpp | 4 +- nestkernel/mpi_manager.cpp | 40 +- nestkernel/nest.cpp | 14 +- nestkernel/nest_names.cpp | 597 ----------- nestkernel/nest_names.h | 1100 ++++++++++---------- nestkernel/nestmodule.cpp | 10 +- nestkernel/node.cpp | 20 +- nestkernel/node_manager.cpp | 4 +- nestkernel/parameter.cpp | 33 +- nestkernel/parameter.h | 24 +- nestkernel/proxynode.cpp | 2 +- nestkernel/random_manager.cpp | 15 +- nestkernel/recording_backend_ascii.cpp | 16 +- nestkernel/recording_backend_memory.cpp | 26 +- nestkernel/recording_backend_screen.cpp | 8 +- nestkernel/recording_backend_sionlib.cpp | 25 +- nestkernel/recording_device.cpp | 16 +- nestkernel/simulation_manager.cpp | 79 +- nestkernel/sp_manager.cpp | 33 +- nestkernel/spatial.cpp | 4 +- nestkernel/stimulation_device.cpp | 10 +- nestkernel/structural_plasticity_node.cpp | 22 +- nestkernel/synaptic_element.cpp | 43 +- nestkernel/target_identifier.h | 18 +- nestkernel/vp_manager.cpp | 8 +- testsuite/cpptests/test_parameter.h | 6 +- 233 files changed, 3784 insertions(+), 4341 deletions(-) delete mode 100644 nestkernel/nest_names.cpp diff --git a/models/ac_generator.cpp b/models/ac_generator.cpp index c7a4a09460..27b7f3e74f 100644 --- a/models/ac_generator.cpp +++ b/models/ac_generator.cpp @@ -72,7 +72,8 @@ nest::ac_generator::Parameters_::Parameters_( const Parameters_& p ) { } -nest::ac_generator::Parameters_& nest::ac_generator::Parameters_::operator=( const Parameters_& p ) +nest::ac_generator::Parameters_& +nest::ac_generator::Parameters_::operator=( const Parameters_& p ) { if ( this == &p ) { @@ -111,26 +112,26 @@ nest::ac_generator::Buffers_::Buffers_( const Buffers_&, ac_generator& n ) void nest::ac_generator::Parameters_::get( dictionary& d ) const { - d[ names::amplitude.toString() ] = amp_; - d[ names::offset.toString() ] = offset_; - d[ names::phase.toString() ] = phi_deg_; - d[ names::frequency.toString() ] = freq_; + d[ names::amplitude ] = amp_; + d[ names::offset ] = offset_; + d[ names::phase ] = phi_deg_; + d[ names::frequency ] = freq_; } void nest::ac_generator::State_::get( dictionary& d ) const { - d[ names::y_0.toString() ] = y_0_; - d[ names::y_1.toString() ] = y_1_; + d[ names::y_0 ] = y_0_; + d[ names::y_1 ] = y_1_; } void nest::ac_generator::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::amplitude.toString(), amp_, node ); - update_value_param( d, names::offset.toString(), offset_, node ); - update_value_param( d, names::frequency.toString(), freq_, node ); - update_value_param( d, names::phase.toString(), phi_deg_, node ); + update_value_param( d, names::amplitude, amp_, node ); + update_value_param( d, names::offset, offset_, node ); + update_value_param( d, names::frequency, freq_, node ); + update_value_param( d, names::phase, phi_deg_, node ); } @@ -250,10 +251,10 @@ nest::ac_generator::set_data_from_stimulation_backend( std::vector< double >& in "The size of the data for the ac_generator needs to be 4 [amplitude, offset, frequency, phase]." ); } dictionary d; - d[ names::amplitude.toString() ] = DoubleDatum( input_param[ 0 ] ); - d[ names::offset.toString() ] = DoubleDatum( input_param[ 1 ] ); - d[ names::frequency.toString() ] = DoubleDatum( input_param[ 2 ] ); - d[ names::phase.toString() ] = DoubleDatum( input_param[ 3 ] ); + d[ names::amplitude ] = DoubleDatum( input_param[ 0 ] ); + d[ names::offset ] = DoubleDatum( input_param[ 1 ] ); + d[ names::frequency ] = DoubleDatum( input_param[ 2 ] ); + d[ names::phase ] = DoubleDatum( input_param[ 3 ] ); ptmp.set( d, this ); } diff --git a/models/ac_generator.h b/models/ac_generator.h index 10cdccbe73..e5204cb07f 100644 --- a/models/ac_generator.h +++ b/models/ac_generator.h @@ -243,7 +243,7 @@ ac_generator::get_status( dictionary& d ) const S_.get( d ); StimulationDevice::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/aeif_cond_alpha.cpp b/models/aeif_cond_alpha.cpp index f453c159da..c209678b9c 100644 --- a/models/aeif_cond_alpha.cpp +++ b/models/aeif_cond_alpha.cpp @@ -105,8 +105,10 @@ nest::aeif_cond_alpha_dynamics( double, const double y[], double f[], void* pnod node.P_.Delta_T == 0. ? 0. : ( node.P_.g_L * node.P_.Delta_T * std::exp( ( V - node.P_.V_th ) / node.P_.Delta_T ) ); // dv/dt - f[ S::V_M ] = is_refractory ? 0. : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike - I_syn_exc - I_syn_inh - w - + node.P_.I_e + node.B_.I_stim_ ) / node.P_.C_m; + f[ S::V_M ] = is_refractory + ? 0. + : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike - I_syn_exc - I_syn_inh - w + node.P_.I_e + node.B_.I_stim_ ) + / node.P_.C_m; f[ S::DG_EXC ] = -dg_ex / node.P_.tau_syn_ex; // Synaptic Conductance (nS) @@ -167,7 +169,8 @@ nest::aeif_cond_alpha::State_::State_( const State_& s ) } } -nest::aeif_cond_alpha::State_& nest::aeif_cond_alpha::State_::operator=( const State_& s ) +nest::aeif_cond_alpha::State_& +nest::aeif_cond_alpha::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -184,50 +187,50 @@ nest::aeif_cond_alpha::State_& nest::aeif_cond_alpha::State_::operator=( const S void nest::aeif_cond_alpha::Parameters_::get( dictionary& d ) const { - d[ names::C_m.toString() ] = C_m; - d[ names::V_th.toString() ] = V_th; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::E_ex.toString() ] = E_ex; - d[ names::E_in.toString() ] = E_in; - d[ names::tau_syn_ex.toString() ] = tau_syn_ex; - d[ names::tau_syn_in.toString() ] = tau_syn_in; - d[ names::a.toString() ] = a; - d[ names::b.toString() ] = b; - d[ names::Delta_T.toString() ] = Delta_T; - d[ names::tau_w.toString() ] = tau_w; - d[ names::I_e.toString() ] = I_e; - d[ names::V_peak.toString() ] = V_peak_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::C_m ] = C_m; + d[ names::V_th ] = V_th; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::V_reset ] = V_reset_; + d[ names::E_ex ] = E_ex; + d[ names::E_in ] = E_in; + d[ names::tau_syn_ex ] = tau_syn_ex; + d[ names::tau_syn_in ] = tau_syn_in; + d[ names::a ] = a; + d[ names::b ] = b; + d[ names::Delta_T ] = Delta_T; + d[ names::tau_w ] = tau_w; + d[ names::I_e ] = I_e; + d[ names::V_peak ] = V_peak_; + d[ names::gsl_error_tol ] = gsl_error_tol; } void nest::aeif_cond_alpha::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_peak.toString(), V_peak_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::E_ex.toString(), E_ex, node ); - update_value_param( d, names::E_in.toString(), E_in, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_peak, V_peak_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::E_ex, E_ex, node ); + update_value_param( d, names::E_in, E_in, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_syn_in, node ); + update_value_param( d, names::tau_syn_ex, tau_syn_ex, node ); + update_value_param( d, names::tau_syn_in, tau_syn_in, node ); - update_value_param( d, names::a.toString(), a, node ); - update_value_param( d, names::b.toString(), b, node ); - update_value_param( d, names::Delta_T.toString(), Delta_T, node ); - update_value_param( d, names::tau_w.toString(), tau_w, node ); + update_value_param( d, names::a, a, node ); + update_value_param( d, names::b, b, node ); + update_value_param( d, names::Delta_T, Delta_T, node ); + update_value_param( d, names::tau_w, tau_w, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); if ( V_reset_ >= V_peak_ ) { @@ -282,23 +285,23 @@ nest::aeif_cond_alpha::Parameters_::set( const dictionary& d, Node* node ) void nest::aeif_cond_alpha::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; - d[ names::g_ex.toString() ] = y_[ G_EXC ]; - d[ names::dg_ex.toString() ] = y_[ DG_EXC ]; - d[ names::g_in.toString() ] = y_[ G_INH ]; - d[ names::dg_in.toString() ] = y_[ DG_INH ]; - d[ names::w.toString() ] = y_[ W ]; + d[ names::V_m ] = y_[ V_M ]; + d[ names::g_ex ] = y_[ G_EXC ]; + d[ names::dg_ex ] = y_[ DG_EXC ]; + d[ names::g_in ] = y_[ G_INH ]; + d[ names::dg_in ] = y_[ DG_INH ]; + d[ names::w ] = y_[ W ]; } void nest::aeif_cond_alpha::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::g_ex.toString(), y_[ G_EXC ], node ); - update_value_param( d, names::dg_ex.toString(), y_[ DG_EXC ], node ); - update_value_param( d, names::g_in.toString(), y_[ G_INH ], node ); - update_value_param( d, names::dg_in.toString(), y_[ DG_INH ], node ); - update_value_param( d, names::w.toString(), y_[ W ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::g_ex, y_[ G_EXC ], node ); + update_value_param( d, names::dg_ex, y_[ DG_EXC ], node ); + update_value_param( d, names::g_in, y_[ G_INH ], node ); + update_value_param( d, names::dg_in, y_[ DG_INH ], node ); + update_value_param( d, names::w, y_[ W ], node ); if ( y_[ G_EXC ] < 0 || y_[ G_INH ] < 0 ) { throw BadProperty( "Conductances must not be negative." ); diff --git a/models/aeif_cond_alpha.h b/models/aeif_cond_alpha.h index 2ae68d03f3..c9e93b1a9d 100644 --- a/models/aeif_cond_alpha.h +++ b/models/aeif_cond_alpha.h @@ -308,8 +308,8 @@ class aeif_cond_alpha : public ArchivingNode */ struct Buffers_ { - Buffers_( aeif_cond_alpha& ); //! logger_; @@ -430,7 +430,7 @@ aeif_cond_alpha::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/aeif_cond_alpha_multisynapse.cpp b/models/aeif_cond_alpha_multisynapse.cpp index 7aba62a05b..af987401a6 100644 --- a/models/aeif_cond_alpha_multisynapse.cpp +++ b/models/aeif_cond_alpha_multisynapse.cpp @@ -126,8 +126,9 @@ aeif_cond_alpha_multisynapse_dynamics( double, const double y[], double f[], voi node.P_.Delta_T == 0. ? 0 : ( node.P_.Delta_T * node.P_.g_L * std::exp( ( V - node.P_.V_th ) / node.P_.Delta_T ) ); // dv/dt - f[ S::V_M ] = is_refractory ? 0 : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike + I_syn - w + node.P_.I_e - + node.B_.I_stim_ ) / node.P_.C_m; + f[ S::V_M ] = is_refractory + ? 0 + : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike + I_syn - w + node.P_.I_e + node.B_.I_stim_ ) / node.P_.C_m; // Adaptation current w. f[ S::W ] = ( node.P_.a * ( V - node.P_.E_L ) - w ) / node.P_.tau_w; @@ -181,42 +182,42 @@ aeif_cond_alpha_multisynapse::State_::State_( const Parameters_& p ) void aeif_cond_alpha_multisynapse::Parameters_::get( dictionary& d ) const { - d[ names::C_m.toString() ] = C_m; - d[ names::V_th.toString() ] = V_th; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::n_receptors.toString() ] = n_receptors(); + d[ names::C_m ] = C_m; + d[ names::V_th ] = V_th; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::V_reset ] = V_reset_; + d[ names::n_receptors ] = n_receptors(); ArrayDatum E_rev_ad( E_rev ); ArrayDatum tau_syn_ad( tau_syn ); - d[ names::E_rev.toString() ] = E_rev_ad; - d[ names::tau_syn.toString() ] = tau_syn_ad; - d[ names::a.toString() ] = a; - d[ names::b.toString() ] = b; - d[ names::Delta_T.toString() ] = Delta_T; - d[ names::tau_w.toString() ] = tau_w; - d[ names::I_e.toString() ] = I_e; - d[ names::V_peak.toString() ] = V_peak_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; - d[ names::has_connections.toString() ] = has_connections_; + d[ names::E_rev ] = E_rev_ad; + d[ names::tau_syn ] = tau_syn_ad; + d[ names::a ] = a; + d[ names::b ] = b; + d[ names::Delta_T ] = Delta_T; + d[ names::tau_w ] = tau_w; + d[ names::I_e ] = I_e; + d[ names::V_peak ] = V_peak_; + d[ names::gsl_error_tol ] = gsl_error_tol; + d[ names::has_connections ] = has_connections_; } void aeif_cond_alpha_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_peak.toString(), V_peak_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_peak, V_peak_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_reset, V_reset_, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); const size_t old_n_receptors = n_receptors(); - bool Erev_flag = d.update_value( names::E_rev.toString(), E_rev ); - bool tau_flag = d.update_value( names::tau_syn.toString(), tau_syn ); + bool Erev_flag = d.update_value( names::E_rev, E_rev ); + bool tau_flag = d.update_value( names::tau_syn, tau_syn ); if ( Erev_flag || tau_flag ) { // receptor arrays have been modified if ( ( E_rev.size() != old_n_receptors || tau_syn.size() != old_n_receptors ) @@ -247,14 +248,14 @@ aeif_cond_alpha_multisynapse::Parameters_::set( const dictionary& d, Node* node } } - update_value_param( d, names::a.toString(), a, node ); - update_value_param( d, names::b.toString(), b, node ); - update_value_param( d, names::Delta_T.toString(), Delta_T, node ); - update_value_param( d, names::tau_w.toString(), tau_w, node ); + update_value_param( d, names::a, a, node ); + update_value_param( d, names::b, b, node ); + update_value_param( d, names::Delta_T, Delta_T, node ); + update_value_param( d, names::tau_w, tau_w, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); if ( V_peak_ < V_th ) { @@ -309,7 +310,7 @@ aeif_cond_alpha_multisynapse::Parameters_::set( const dictionary& d, Node* node void aeif_cond_alpha_multisynapse::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::V_m ] = y_[ V_M ]; std::vector< double >* dg = new std::vector< double >(); std::vector< double >* g = new std::vector< double >(); @@ -322,17 +323,17 @@ aeif_cond_alpha_multisynapse::State_::get( dictionary& d ) const g->push_back( y_[ State_::G + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] ); } - d[ names::dg.toString() ] = DoubleVectorDatum( dg ); - d[ names::g.toString() ] = DoubleVectorDatum( g ); + d[ names::dg ] = DoubleVectorDatum( dg ); + d[ names::g ] = DoubleVectorDatum( g ); - d[ names::w.toString() ] = y_[ W ]; + d[ names::w ] = y_[ W ]; } void aeif_cond_alpha_multisynapse::State_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::w.toString(), y_[ W ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::w, y_[ W ], node ); } aeif_cond_alpha_multisynapse::Buffers_::Buffers_( aeif_cond_alpha_multisynapse& n ) diff --git a/models/aeif_cond_alpha_multisynapse.h b/models/aeif_cond_alpha_multisynapse.h index 20c16562b5..cdfdfb887c 100644 --- a/models/aeif_cond_alpha_multisynapse.h +++ b/models/aeif_cond_alpha_multisynapse.h @@ -425,7 +425,7 @@ aeif_cond_alpha_multisynapse::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } } // namespace diff --git a/models/aeif_cond_beta_multisynapse.cpp b/models/aeif_cond_beta_multisynapse.cpp index edc83f6b69..b12770310d 100644 --- a/models/aeif_cond_beta_multisynapse.cpp +++ b/models/aeif_cond_beta_multisynapse.cpp @@ -125,8 +125,9 @@ aeif_cond_beta_multisynapse_dynamics( double, const double y[], double f[], void node.P_.Delta_T == 0. ? 0 : ( node.P_.Delta_T * node.P_.g_L * std::exp( ( V - node.P_.V_th ) / node.P_.Delta_T ) ); // dv/dt - f[ S::V_M ] = is_refractory ? 0 : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike + I_syn - w + node.P_.I_e - + node.B_.I_stim_ ) / node.P_.C_m; + f[ S::V_M ] = is_refractory + ? 0 + : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike + I_syn - w + node.P_.I_e + node.B_.I_stim_ ) / node.P_.C_m; // Adaptation current w. f[ S::W ] = ( node.P_.a * ( V - node.P_.E_L ) - w ) / node.P_.tau_w; @@ -181,49 +182,50 @@ aeif_cond_beta_multisynapse::State_::State_( const Parameters_& p ) void aeif_cond_beta_multisynapse::Parameters_::get( dictionary& d ) const { - d[ names::C_m.toString() ] = C_m; - d[ names::V_th.toString() ] = V_th; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::n_receptors.toString() ] = n_receptors(); + d[ names::C_m ] = C_m; + d[ names::V_th ] = V_th; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::V_reset ] = V_reset_; + d[ names::n_receptors ] = n_receptors(); ArrayDatum E_rev_ad( E_rev ); ArrayDatum tau_rise_ad( tau_rise ); ArrayDatum tau_decay_ad( tau_decay ); - d[ names::E_rev.toString() ] = E_rev_ad; - d[ names::tau_rise.toString() ] = tau_rise_ad; - d[ names::tau_decay.toString() ] = tau_decay_ad; - d[ names::a.toString() ] = a; - d[ names::b.toString() ] = b; - d[ names::Delta_T.toString() ] = Delta_T; - d[ names::tau_w.toString() ] = tau_w; - d[ names::I_e.toString() ] = I_e; - d[ names::V_peak.toString() ] = V_peak_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; - d[ names::has_connections.toString() ] = has_connections_; + d[ names::E_rev ] = E_rev_ad; + d[ names::tau_rise ] = tau_rise_ad; + d[ names::tau_decay ] = tau_decay_ad; + d[ names::a ] = a; + d[ names::b ] = b; + d[ names::Delta_T ] = Delta_T; + d[ names::tau_w ] = tau_w; + d[ names::I_e ] = I_e; + d[ names::V_peak ] = V_peak_; + d[ names::gsl_error_tol ] = gsl_error_tol; + d[ names::has_connections ] = has_connections_; } void aeif_cond_beta_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_peak.toString(), V_peak_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_peak, V_peak_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_reset, V_reset_, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); const size_t old_n_receptors = n_receptors(); - bool Erev_flag = d.update_value( names::E_rev.toString(), E_rev ); - bool taur_flag = d.update_value( names::tau_rise.toString(), tau_rise ); - bool taud_flag = d.update_value( names::tau_decay.toString(), tau_decay ); + bool Erev_flag = d.update_value( names::E_rev, E_rev ); + bool taur_flag = d.update_value( names::tau_rise, tau_rise ); + bool taud_flag = d.update_value( names::tau_decay, tau_decay ); if ( Erev_flag || taur_flag || taud_flag ) { // receptor arrays have been modified if ( ( E_rev.size() != old_n_receptors || tau_rise.size() != old_n_receptors - || tau_decay.size() != old_n_receptors ) && ( not Erev_flag || not taur_flag || not taud_flag ) ) + || tau_decay.size() != old_n_receptors ) + && ( not Erev_flag || not taur_flag || not taud_flag ) ) { throw BadProperty( "If the number of receptor ports is changed, all three arrays " @@ -254,14 +256,14 @@ aeif_cond_beta_multisynapse::Parameters_::set( const dictionary& d, Node* node ) } } - update_value_param( d, names::a.toString(), a, node ); - update_value_param( d, names::b.toString(), b, node ); - update_value_param( d, names::Delta_T.toString(), Delta_T, node ); - update_value_param( d, names::tau_w.toString(), tau_w, node ); + update_value_param( d, names::a, a, node ); + update_value_param( d, names::b, b, node ); + update_value_param( d, names::Delta_T, Delta_T, node ); + update_value_param( d, names::tau_w, tau_w, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); if ( V_peak_ < V_th ) { @@ -316,7 +318,7 @@ aeif_cond_beta_multisynapse::Parameters_::set( const dictionary& d, Node* node ) void aeif_cond_beta_multisynapse::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; + d[ names::V_m ] = y_[ V_M ]; std::vector< double >* dg = new std::vector< double >(); std::vector< double >* g = new std::vector< double >(); @@ -329,17 +331,17 @@ aeif_cond_beta_multisynapse::State_::get( dictionary& d ) const g->push_back( y_[ State_::G + ( State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ) ] ); } - d[ names::dg.toString() ] = DoubleVectorDatum( dg ); - d[ names::g.toString() ] = DoubleVectorDatum( g ); + d[ names::dg ] = DoubleVectorDatum( dg ); + d[ names::g ] = DoubleVectorDatum( g ); - d[ names::w.toString() ] = y_[ W ]; + d[ names::w ] = y_[ W ]; } void aeif_cond_beta_multisynapse::State_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::w.toString(), y_[ W ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::w, y_[ W ], node ); } aeif_cond_beta_multisynapse::Buffers_::Buffers_( aeif_cond_beta_multisynapse& n ) diff --git a/models/aeif_cond_beta_multisynapse.h b/models/aeif_cond_beta_multisynapse.h index ef0ab7534b..7f4ae73b4c 100644 --- a/models/aeif_cond_beta_multisynapse.h +++ b/models/aeif_cond_beta_multisynapse.h @@ -429,7 +429,7 @@ aeif_cond_beta_multisynapse::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } } // namespace diff --git a/models/aeif_cond_exp.cpp b/models/aeif_cond_exp.cpp index 828b3d166d..55d139f00f 100644 --- a/models/aeif_cond_exp.cpp +++ b/models/aeif_cond_exp.cpp @@ -108,8 +108,10 @@ nest::aeif_cond_exp_dynamics( double, const double y[], double f[], void* pnode node.P_.Delta_T == 0. ? 0. : ( node.P_.g_L * node.P_.Delta_T * std::exp( ( V - node.P_.V_th ) / node.P_.Delta_T ) ); // dv/dt - f[ S::V_M ] = is_refractory ? 0. : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike - I_syn_exc - I_syn_inh - w - + node.P_.I_e + node.B_.I_stim_ ) / node.P_.C_m; + f[ S::V_M ] = is_refractory + ? 0. + : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike - I_syn_exc - I_syn_inh - w + node.P_.I_e + node.B_.I_stim_ ) + / node.P_.C_m; f[ S::G_EXC ] = -g_ex / node.P_.tau_syn_ex; // Synaptic Conductance (nS) @@ -166,7 +168,8 @@ nest::aeif_cond_exp::State_::State_( const State_& s ) } } -nest::aeif_cond_exp::State_& nest::aeif_cond_exp::State_::operator=( const State_& s ) +nest::aeif_cond_exp::State_& +nest::aeif_cond_exp::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -183,50 +186,50 @@ nest::aeif_cond_exp::State_& nest::aeif_cond_exp::State_::operator=( const State void nest::aeif_cond_exp::Parameters_::get( dictionary& d ) const { - d[ names::C_m.toString() ] = C_m; - d[ names::V_th.toString() ] = V_th; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::E_ex.toString() ] = E_ex; - d[ names::E_in.toString() ] = E_in; - d[ names::tau_syn_ex.toString() ] = tau_syn_ex; - d[ names::tau_syn_in.toString() ] = tau_syn_in; - d[ names::a.toString() ] = a; - d[ names::b.toString() ] = b; - d[ names::Delta_T.toString() ] = Delta_T; - d[ names::tau_w.toString() ] = tau_w; - d[ names::I_e.toString() ] = I_e; - d[ names::V_peak.toString() ] = V_peak_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::C_m ] = C_m; + d[ names::V_th ] = V_th; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::V_reset ] = V_reset_; + d[ names::E_ex ] = E_ex; + d[ names::E_in ] = E_in; + d[ names::tau_syn_ex ] = tau_syn_ex; + d[ names::tau_syn_in ] = tau_syn_in; + d[ names::a ] = a; + d[ names::b ] = b; + d[ names::Delta_T ] = Delta_T; + d[ names::tau_w ] = tau_w; + d[ names::I_e ] = I_e; + d[ names::V_peak ] = V_peak_; + d[ names::gsl_error_tol ] = gsl_error_tol; } void nest::aeif_cond_exp::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_peak.toString(), V_peak_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::E_ex.toString(), E_ex, node ); - update_value_param( d, names::E_in.toString(), E_in, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_peak, V_peak_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::E_ex, E_ex, node ); + update_value_param( d, names::E_in, E_in, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_syn_in, node ); + update_value_param( d, names::tau_syn_ex, tau_syn_ex, node ); + update_value_param( d, names::tau_syn_in, tau_syn_in, node ); - update_value_param( d, names::a.toString(), a, node ); - update_value_param( d, names::b.toString(), b, node ); - update_value_param( d, names::Delta_T.toString(), Delta_T, node ); - update_value_param( d, names::tau_w.toString(), tau_w, node ); + update_value_param( d, names::a, a, node ); + update_value_param( d, names::b, b, node ); + update_value_param( d, names::Delta_T, Delta_T, node ); + update_value_param( d, names::tau_w, tau_w, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); if ( V_peak_ < V_th ) { @@ -281,19 +284,19 @@ nest::aeif_cond_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::aeif_cond_exp::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; - d[ names::g_ex.toString() ] = y_[ G_EXC ]; - d[ names::g_in.toString() ] = y_[ G_INH ]; - d[ names::w.toString() ] = y_[ W ]; + d[ names::V_m ] = y_[ V_M ]; + d[ names::g_ex ] = y_[ G_EXC ]; + d[ names::g_in ] = y_[ G_INH ]; + d[ names::w ] = y_[ W ]; } void nest::aeif_cond_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::g_ex.toString(), y_[ G_EXC ], node ); - update_value_param( d, names::g_in.toString(), y_[ G_INH ], node ); - update_value_param( d, names::w.toString(), y_[ W ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::g_ex, y_[ G_EXC ], node ); + update_value_param( d, names::g_in, y_[ G_INH ], node ); + update_value_param( d, names::w, y_[ W ], node ); if ( y_[ G_EXC ] < 0 || y_[ G_INH ] < 0 ) { throw BadProperty( "Conductances must not be negative." ); diff --git a/models/aeif_cond_exp.h b/models/aeif_cond_exp.h index a3eadda16a..880bb96ce6 100644 --- a/models/aeif_cond_exp.h +++ b/models/aeif_cond_exp.h @@ -306,8 +306,8 @@ class aeif_cond_exp : public ArchivingNode */ struct Buffers_ { - Buffers_( aeif_cond_exp& ); //! logger_; @@ -422,7 +422,7 @@ aeif_cond_exp::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/aeif_psc_alpha.cpp b/models/aeif_psc_alpha.cpp index 1d9eb4d651..9ee12e3116 100644 --- a/models/aeif_psc_alpha.cpp +++ b/models/aeif_psc_alpha.cpp @@ -102,8 +102,10 @@ nest::aeif_psc_alpha_dynamics( double, const double y[], double f[], void* pnode node.P_.Delta_T == 0. ? 0. : ( node.P_.g_L * node.P_.Delta_T * std::exp( ( V - node.P_.V_th ) / node.P_.Delta_T ) ); // dv/dt - f[ S::V_M ] = is_refractory ? 0. : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike + I_syn_ex - I_syn_in - w - + node.P_.I_e + node.B_.I_stim_ ) / node.P_.C_m; + f[ S::V_M ] = is_refractory + ? 0. + : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike + I_syn_ex - I_syn_in - w + node.P_.I_e + node.B_.I_stim_ ) + / node.P_.C_m; f[ S::DI_EXC ] = -dI_syn_ex / node.P_.tau_syn_ex; // Exc. synaptic current (pA) @@ -161,7 +163,8 @@ nest::aeif_psc_alpha::State_::State_( const State_& s ) } } -nest::aeif_psc_alpha::State_& nest::aeif_psc_alpha::State_::operator=( const State_& s ) +nest::aeif_psc_alpha::State_& +nest::aeif_psc_alpha::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -178,46 +181,46 @@ nest::aeif_psc_alpha::State_& nest::aeif_psc_alpha::State_::operator=( const Sta void nest::aeif_psc_alpha::Parameters_::get( dictionary& d ) const { - d[ names::C_m.toString() ] = C_m; - d[ names::V_th.toString() ] = V_th; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::tau_syn_ex.toString() ] = tau_syn_ex; - d[ names::tau_syn_in.toString() ] = tau_syn_in; - d[ names::a.toString() ] = a; - d[ names::b.toString() ] = b; - d[ names::Delta_T.toString() ] = Delta_T; - d[ names::tau_w.toString() ] = tau_w; - d[ names::I_e.toString() ] = I_e; - d[ names::V_peak.toString() ] = V_peak_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::C_m ] = C_m; + d[ names::V_th ] = V_th; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::V_reset ] = V_reset_; + d[ names::tau_syn_ex ] = tau_syn_ex; + d[ names::tau_syn_in ] = tau_syn_in; + d[ names::a ] = a; + d[ names::b ] = b; + d[ names::Delta_T ] = Delta_T; + d[ names::tau_w ] = tau_w; + d[ names::I_e ] = I_e; + d[ names::V_peak ] = V_peak_; + d[ names::gsl_error_tol ] = gsl_error_tol; } void nest::aeif_psc_alpha::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_peak.toString(), V_peak_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_peak, V_peak_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_reset, V_reset_, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_syn_in, node ); + update_value_param( d, names::tau_syn_ex, tau_syn_ex, node ); + update_value_param( d, names::tau_syn_in, tau_syn_in, node ); - update_value_param( d, names::a.toString(), a, node ); - update_value_param( d, names::b.toString(), b, node ); - update_value_param( d, names::Delta_T.toString(), Delta_T, node ); - update_value_param( d, names::tau_w.toString(), tau_w, node ); + update_value_param( d, names::a, a, node ); + update_value_param( d, names::b, b, node ); + update_value_param( d, names::Delta_T, Delta_T, node ); + update_value_param( d, names::tau_w, tau_w, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); if ( V_reset_ >= V_peak_ ) { @@ -272,23 +275,23 @@ nest::aeif_psc_alpha::Parameters_::set( const dictionary& d, Node* node ) void nest::aeif_psc_alpha::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; - d[ names::I_syn_ex.toString() ] = y_[ I_EXC ]; - d[ names::dI_syn_ex.toString() ] = y_[ DI_EXC ]; - d[ names::I_syn_in.toString() ] = y_[ I_INH ]; - d[ names::dI_syn_in.toString() ] = y_[ DI_INH ]; - d[ names::w.toString() ] = y_[ W ]; + d[ names::V_m ] = y_[ V_M ]; + d[ names::I_syn_ex ] = y_[ I_EXC ]; + d[ names::dI_syn_ex ] = y_[ DI_EXC ]; + d[ names::I_syn_in ] = y_[ I_INH ]; + d[ names::dI_syn_in ] = y_[ DI_INH ]; + d[ names::w ] = y_[ W ]; } void nest::aeif_psc_alpha::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::I_syn_ex.toString(), y_[ I_EXC ], node ); - update_value_param( d, names::dI_syn_ex.toString(), y_[ DI_EXC ], node ); - update_value_param( d, names::I_syn_in.toString(), y_[ I_INH ], node ); - update_value_param( d, names::dI_syn_in.toString(), y_[ DI_INH ], node ); - update_value_param( d, names::w.toString(), y_[ W ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::I_syn_ex, y_[ I_EXC ], node ); + update_value_param( d, names::dI_syn_ex, y_[ DI_EXC ], node ); + update_value_param( d, names::I_syn_in, y_[ I_INH ], node ); + update_value_param( d, names::dI_syn_in, y_[ DI_INH ], node ); + update_value_param( d, names::w, y_[ W ], node ); if ( y_[ I_EXC ] < 0 || y_[ I_INH ] < 0 ) { throw BadProperty( "Conductances must not be negative." ); diff --git a/models/aeif_psc_alpha.h b/models/aeif_psc_alpha.h index 439fb74d59..844648a51b 100644 --- a/models/aeif_psc_alpha.h +++ b/models/aeif_psc_alpha.h @@ -292,8 +292,8 @@ class aeif_psc_alpha : public ArchivingNode */ struct Buffers_ { - Buffers_( aeif_psc_alpha& ); //! logger_; @@ -414,7 +414,7 @@ aeif_psc_alpha::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/aeif_psc_delta.cpp b/models/aeif_psc_delta.cpp index 34e0b3e3ef..a925a33bd0 100644 --- a/models/aeif_psc_delta.cpp +++ b/models/aeif_psc_delta.cpp @@ -95,12 +95,14 @@ nest::aeif_psc_delta_dynamics( double, const double y[], double f[], void* pnode const double V = is_refractory ? node.P_.V_reset_ : std::min( y[ S::V_M ], node.P_.V_peak_ ); const double& w = y[ S::W ]; - const double I_spike = node.P_.Delta_T == 0. ? 0. : node.P_.g_L * node.P_.Delta_T - * std::exp( ( V - node.P_.V_th ) * node.V_.Delta_T_inv_ ); + const double I_spike = node.P_.Delta_T == 0. + ? 0. + : node.P_.g_L * node.P_.Delta_T * std::exp( ( V - node.P_.V_th ) * node.V_.Delta_T_inv_ ); // dv/dt - f[ S::V_M ] = is_refractory ? 0.0 : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike - w + node.P_.I_e - + node.B_.I_stim_ ) * node.V_.C_m_inv_; + f[ S::V_M ] = is_refractory + ? 0.0 + : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike - w + node.P_.I_e + node.B_.I_stim_ ) * node.V_.C_m_inv_; // Adaptation current w. f[ S::W ] = ( node.P_.a * ( V - node.P_.E_L ) - w ) * node.V_.tau_w_inv_; @@ -151,7 +153,8 @@ nest::aeif_psc_delta::State_::State_( const State_& s ) } } -nest::aeif_psc_delta::State_& nest::aeif_psc_delta::State_::operator=( const State_& s ) +nest::aeif_psc_delta::State_& +nest::aeif_psc_delta::State_::operator=( const State_& s ) { refr_spikes_buffer_ = s.refr_spikes_buffer_; r_ = s.r_; @@ -169,42 +172,42 @@ nest::aeif_psc_delta::State_& nest::aeif_psc_delta::State_::operator=( const Sta void nest::aeif_psc_delta::Parameters_::get( dictionary& d ) const { - d[ names::C_m.toString() ] = C_m; - d[ names::V_th.toString() ] = V_th; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::a.toString() ] = a; - d[ names::b.toString() ] = b; - d[ names::Delta_T.toString() ] = Delta_T; - d[ names::tau_w.toString() ] = tau_w; - d[ names::I_e.toString() ] = I_e; - d[ names::V_peak.toString() ] = V_peak_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; - d[ names::refractory_input.toString() ] = with_refr_input_; + d[ names::C_m ] = C_m; + d[ names::V_th ] = V_th; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::V_reset ] = V_reset_; + d[ names::a ] = a; + d[ names::b ] = b; + d[ names::Delta_T ] = Delta_T; + d[ names::tau_w ] = tau_w; + d[ names::I_e ] = I_e; + d[ names::V_peak ] = V_peak_; + d[ names::gsl_error_tol ] = gsl_error_tol; + d[ names::refractory_input ] = with_refr_input_; } void nest::aeif_psc_delta::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_peak.toString(), V_peak_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_peak, V_peak_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_reset, V_reset_, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); - update_value_param( d, names::a.toString(), a, node ); - update_value_param( d, names::b.toString(), b, node ); - update_value_param( d, names::Delta_T.toString(), Delta_T, node ); - update_value_param( d, names::tau_w.toString(), tau_w, node ); + update_value_param( d, names::a, a, node ); + update_value_param( d, names::b, b, node ); + update_value_param( d, names::Delta_T, Delta_T, node ); + update_value_param( d, names::tau_w, tau_w, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); if ( V_reset_ >= V_peak_ ) { @@ -255,21 +258,21 @@ nest::aeif_psc_delta::Parameters_::set( const dictionary& d, Node* node ) throw BadProperty( "The gsl_error_tol must be strictly positive." ); } - update_value_param( d, names::refractory_input.toString(), with_refr_input_, node ); + update_value_param( d, names::refractory_input, with_refr_input_, node ); } void nest::aeif_psc_delta::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; - d[ names::w.toString() ] = y_[ W ]; + d[ names::V_m ] = y_[ V_M ]; + d[ names::w ] = y_[ W ]; } void nest::aeif_psc_delta::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::w.toString(), y_[ W ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::w, y_[ W ], node ); } diff --git a/models/aeif_psc_delta.h b/models/aeif_psc_delta.h index 761a89ee93..09e90c456d 100644 --- a/models/aeif_psc_delta.h +++ b/models/aeif_psc_delta.h @@ -288,8 +288,8 @@ class aeif_psc_delta : public ArchivingNode */ struct Buffers_ { - Buffers_( aeif_psc_delta& ); //! logger_; @@ -409,7 +409,7 @@ aeif_psc_delta::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/aeif_psc_delta_clopath.cpp b/models/aeif_psc_delta_clopath.cpp index bdf7d56c9c..ab6ea0eabb 100644 --- a/models/aeif_psc_delta_clopath.cpp +++ b/models/aeif_psc_delta_clopath.cpp @@ -112,8 +112,9 @@ nest::aeif_psc_delta_clopath_dynamics( double, const double y[], double f[], voi node.P_.Delta_T == 0. ? 0. : ( node.P_.g_L * node.P_.Delta_T * std::exp( ( V - V_th ) / node.P_.Delta_T ) ); // dv/dt - f[ S::V_M ] = ( is_refractory || is_clamped ) ? 0.0 : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike - w + z - + node.P_.I_e + node.B_.I_stim_ ) / node.P_.C_m; + f[ S::V_M ] = ( is_refractory || is_clamped ) + ? 0.0 + : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike - w + z + node.P_.I_e + node.B_.I_stim_ ) / node.P_.C_m; // Adaptation current w. f[ S::W ] = is_clamped ? 0.0 : ( node.P_.a * ( V - node.P_.E_L ) - w ) / node.P_.tau_w; @@ -186,7 +187,8 @@ nest::aeif_psc_delta_clopath::State_::State_( const State_& s ) } } -nest::aeif_psc_delta_clopath::State_& nest::aeif_psc_delta_clopath::State_::operator=( const State_& s ) +nest::aeif_psc_delta_clopath::State_& +nest::aeif_psc_delta_clopath::State_::operator=( const State_& s ) { r_ = s.r_; clamp_r_ = s.clamp_r_; @@ -204,60 +206,60 @@ nest::aeif_psc_delta_clopath::State_& nest::aeif_psc_delta_clopath::State_::oper void nest::aeif_psc_delta_clopath::Parameters_::get( dictionary& d ) const { - d[ names::C_m.toString() ] = C_m; - d[ names::V_th_max.toString() ] = V_th_max; - d[ names::V_th_rest.toString() ] = V_th_rest; - d[ names::tau_V_th.toString() ] = tau_V_th; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::a.toString() ] = a; - d[ names::b.toString() ] = b; - d[ names::I_sp.toString() ] = I_sp; - d[ names::Delta_T.toString() ] = Delta_T; - d[ names::tau_w.toString() ] = tau_w; - d[ names::tau_z.toString() ] = tau_z; - d[ names::tau_plus.toString() ] = tau_plus; - d[ names::tau_minus.toString() ] = tau_minus; - d[ names::tau_bar_bar.toString() ] = tau_bar_bar; - d[ names::I_e.toString() ] = I_e; - d[ names::V_peak.toString() ] = V_peak_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; - d[ names::V_clamp.toString() ] = V_clamp_; - d[ names::t_clamp.toString() ] = t_clamp_; + d[ names::C_m ] = C_m; + d[ names::V_th_max ] = V_th_max; + d[ names::V_th_rest ] = V_th_rest; + d[ names::tau_V_th ] = tau_V_th; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::V_reset ] = V_reset_; + d[ names::a ] = a; + d[ names::b ] = b; + d[ names::I_sp ] = I_sp; + d[ names::Delta_T ] = Delta_T; + d[ names::tau_w ] = tau_w; + d[ names::tau_z ] = tau_z; + d[ names::tau_plus ] = tau_plus; + d[ names::tau_minus ] = tau_minus; + d[ names::tau_bar_bar ] = tau_bar_bar; + d[ names::I_e ] = I_e; + d[ names::V_peak ] = V_peak_; + d[ names::gsl_error_tol ] = gsl_error_tol; + d[ names::V_clamp ] = V_clamp_; + d[ names::t_clamp ] = t_clamp_; } void nest::aeif_psc_delta_clopath::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th_max.toString(), V_th_max, node ); - update_value_param( d, names::V_th_rest.toString(), V_th_rest, node ); - update_value_param( d, names::tau_V_th.toString(), tau_V_th, node ); - update_value_param( d, names::V_peak.toString(), V_peak_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); - - update_value_param( d, names::a.toString(), a, node ); - update_value_param( d, names::b.toString(), b, node ); - update_value_param( d, names::I_sp.toString(), I_sp, node ); - update_value_param( d, names::Delta_T.toString(), Delta_T, node ); - update_value_param( d, names::tau_w.toString(), tau_w, node ); - update_value_param( d, names::tau_z.toString(), tau_z, node ); - update_value_param( d, names::tau_plus.toString(), tau_plus, node ); - update_value_param( d, names::tau_minus.toString(), tau_minus, node ); - update_value_param( d, names::tau_bar_bar.toString(), tau_bar_bar, node ); - - update_value_param( d, names::I_e.toString(), I_e, node ); - - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); - - update_value_param( d, names::V_clamp.toString(), V_clamp_, node ); - update_value_param( d, names::t_clamp.toString(), t_clamp_, node ); + update_value_param( d, names::V_th_max, V_th_max, node ); + update_value_param( d, names::V_th_rest, V_th_rest, node ); + update_value_param( d, names::tau_V_th, tau_V_th, node ); + update_value_param( d, names::V_peak, V_peak_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); + + update_value_param( d, names::a, a, node ); + update_value_param( d, names::b, b, node ); + update_value_param( d, names::I_sp, I_sp, node ); + update_value_param( d, names::Delta_T, Delta_T, node ); + update_value_param( d, names::tau_w, tau_w, node ); + update_value_param( d, names::tau_z, tau_z, node ); + update_value_param( d, names::tau_plus, tau_plus, node ); + update_value_param( d, names::tau_minus, tau_minus, node ); + update_value_param( d, names::tau_bar_bar, tau_bar_bar, node ); + + update_value_param( d, names::I_e, I_e, node ); + + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); + + update_value_param( d, names::V_clamp, V_clamp_, node ); + update_value_param( d, names::t_clamp, t_clamp_, node ); if ( V_reset_ >= V_peak_ ) { @@ -322,21 +324,21 @@ nest::aeif_psc_delta_clopath::Parameters_::set( const dictionary& d, Node* node void nest::aeif_psc_delta_clopath::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; - d[ names::w.toString() ] = y_[ W ]; - d[ names::u_bar_plus.toString() ] = y_[ U_BAR_PLUS ]; - d[ names::u_bar_minus.toString() ] = y_[ U_BAR_MINUS ]; - d[ names::u_bar_bar.toString() ] = y_[ U_BAR_BAR ]; + d[ names::V_m ] = y_[ V_M ]; + d[ names::w ] = y_[ W ]; + d[ names::u_bar_plus ] = y_[ U_BAR_PLUS ]; + d[ names::u_bar_minus ] = y_[ U_BAR_MINUS ]; + d[ names::u_bar_bar ] = y_[ U_BAR_BAR ]; } void nest::aeif_psc_delta_clopath::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::w.toString(), y_[ W ], node ); - update_value_param( d, names::u_bar_plus.toString(), y_[ U_BAR_PLUS ], node ); - update_value_param( d, names::u_bar_minus.toString(), y_[ U_BAR_MINUS ], node ); - update_value_param( d, names::u_bar_bar.toString(), y_[ U_BAR_BAR ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::w, y_[ W ], node ); + update_value_param( d, names::u_bar_plus, y_[ U_BAR_PLUS ], node ); + update_value_param( d, names::u_bar_minus, y_[ U_BAR_MINUS ], node ); + update_value_param( d, names::u_bar_bar, y_[ U_BAR_BAR ], node ); } nest::aeif_psc_delta_clopath::Buffers_::Buffers_( aeif_psc_delta_clopath& n ) @@ -538,10 +540,10 @@ nest::aeif_psc_delta_clopath::update( const Time& origin, const long from, const S_.y_[ State_::V_TH ] = P_.V_th_max; /* Initialize clamping step counter. - * - We need to add 1 to compensate for count-down immediately after - * while loop. - * - If neuron does not use clamping, set to 0 - */ + * - We need to add 1 to compensate for count-down immediately after + * while loop. + * - If neuron does not use clamping, set to 0 + */ S_.clamp_r_ = V_.clamp_counts_ > 0 ? V_.clamp_counts_ + 1 : 0; set_spiketime( Time::step( origin.get_steps() + lag + 1 ) ); @@ -554,11 +556,11 @@ nest::aeif_psc_delta_clopath::update( const Time& origin, const long from, const S_.clamp_r_ = 0; /* Initialize refractory step counter. - * - We need to add 1 to compensate for count-down immediately after - * while loop. - * - If neuron has no refractory time, set to 0 to avoid refractory - * artifact inside while loop. - */ + * - We need to add 1 to compensate for count-down immediately after + * while loop. + * - If neuron has no refractory time, set to 0 to avoid refractory + * artifact inside while loop. + */ S_.r_ = V_.refractory_counts_ > 0 ? V_.refractory_counts_ + 1 : 0; } diff --git a/models/aeif_psc_delta_clopath.h b/models/aeif_psc_delta_clopath.h index fb9d0db482..52ceff0d2e 100644 --- a/models/aeif_psc_delta_clopath.h +++ b/models/aeif_psc_delta_clopath.h @@ -328,8 +328,8 @@ class aeif_psc_delta_clopath : public ClopathArchivingNode */ struct Buffers_ { - Buffers_( aeif_psc_delta_clopath& ); //! logger_; @@ -444,7 +444,7 @@ aeif_psc_delta_clopath::get_status( dictionary& d ) const S_.get( d ); ClopathArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/aeif_psc_exp.cpp b/models/aeif_psc_exp.cpp index 158e9badbe..dbb7c1efb1 100644 --- a/models/aeif_psc_exp.cpp +++ b/models/aeif_psc_exp.cpp @@ -105,8 +105,10 @@ nest::aeif_psc_exp_dynamics( double, const double y[], double f[], void* pnode ) node.P_.Delta_T == 0. ? 0. : ( node.P_.g_L * node.P_.Delta_T * std::exp( ( V - node.P_.V_th ) / node.P_.Delta_T ) ); // dv/dt - f[ S::V_M ] = is_refractory ? 0. : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike + I_syn_ex - I_syn_in - w - + node.P_.I_e + node.B_.I_stim_ ) / node.P_.C_m; + f[ S::V_M ] = is_refractory + ? 0. + : ( -node.P_.g_L * ( V - node.P_.E_L ) + I_spike + I_syn_ex - I_syn_in - w + node.P_.I_e + node.B_.I_stim_ ) + / node.P_.C_m; f[ S::I_EXC ] = -I_syn_ex / node.P_.tau_syn_ex; // Exc. synaptic current (pA) @@ -160,7 +162,8 @@ nest::aeif_psc_exp::State_::State_( const State_& s ) } } -nest::aeif_psc_exp::State_& nest::aeif_psc_exp::State_::operator=( const State_& s ) +nest::aeif_psc_exp::State_& +nest::aeif_psc_exp::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -177,46 +180,46 @@ nest::aeif_psc_exp::State_& nest::aeif_psc_exp::State_::operator=( const State_& void nest::aeif_psc_exp::Parameters_::get( dictionary& d ) const { - d[ names::C_m.toString() ] = C_m; - d[ names::V_th.toString() ] = V_th; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::tau_syn_ex.toString() ] = tau_syn_ex; - d[ names::tau_syn_in.toString() ] = tau_syn_in; - d[ names::a.toString() ] = a; - d[ names::b.toString() ] = b; - d[ names::Delta_T.toString() ] = Delta_T; - d[ names::tau_w.toString() ] = tau_w; - d[ names::I_e.toString() ] = I_e; - d[ names::V_peak.toString() ] = V_peak_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::C_m ] = C_m; + d[ names::V_th ] = V_th; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::V_reset ] = V_reset_; + d[ names::tau_syn_ex ] = tau_syn_ex; + d[ names::tau_syn_in ] = tau_syn_in; + d[ names::a ] = a; + d[ names::b ] = b; + d[ names::Delta_T ] = Delta_T; + d[ names::tau_w ] = tau_w; + d[ names::I_e ] = I_e; + d[ names::V_peak ] = V_peak_; + d[ names::gsl_error_tol ] = gsl_error_tol; } void nest::aeif_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_peak.toString(), V_peak_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_peak, V_peak_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_reset, V_reset_, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_syn_in, node ); + update_value_param( d, names::tau_syn_ex, tau_syn_ex, node ); + update_value_param( d, names::tau_syn_in, tau_syn_in, node ); - update_value_param( d, names::a.toString(), a, node ); - update_value_param( d, names::b.toString(), b, node ); - update_value_param( d, names::Delta_T.toString(), Delta_T, node ); - update_value_param( d, names::tau_w.toString(), tau_w, node ); + update_value_param( d, names::a, a, node ); + update_value_param( d, names::b, b, node ); + update_value_param( d, names::Delta_T, Delta_T, node ); + update_value_param( d, names::tau_w, tau_w, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); if ( V_reset_ >= V_peak_ ) { @@ -271,19 +274,19 @@ nest::aeif_psc_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::aeif_psc_exp::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; - d[ names::I_syn_ex.toString() ] = y_[ I_EXC ]; - d[ names::I_syn_in.toString() ] = y_[ I_INH ]; - d[ names::w.toString() ] = y_[ W ]; + d[ names::V_m ] = y_[ V_M ]; + d[ names::I_syn_ex ] = y_[ I_EXC ]; + d[ names::I_syn_in ] = y_[ I_INH ]; + d[ names::w ] = y_[ W ]; } void nest::aeif_psc_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::I_syn_ex.toString(), y_[ I_EXC ], node ); - update_value_param( d, names::I_syn_in.toString(), y_[ I_INH ], node ); - update_value_param( d, names::w.toString(), y_[ W ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::I_syn_ex, y_[ I_EXC ], node ); + update_value_param( d, names::I_syn_in, y_[ I_INH ], node ); + update_value_param( d, names::w, y_[ W ], node ); if ( y_[ I_EXC ] < 0 || y_[ I_INH ] < 0 ) { throw BadProperty( "Conductances must not be negative." ); diff --git a/models/aeif_psc_exp.h b/models/aeif_psc_exp.h index 421ef228d8..22b02578a2 100644 --- a/models/aeif_psc_exp.h +++ b/models/aeif_psc_exp.h @@ -292,8 +292,8 @@ class aeif_psc_exp : public ArchivingNode */ struct Buffers_ { - Buffers_( aeif_psc_exp& ); //! logger_; @@ -408,7 +408,7 @@ aeif_psc_exp::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/amat2_psc_exp.cpp b/models/amat2_psc_exp.cpp index 76158efa91..3e787b8f0a 100644 --- a/models/amat2_psc_exp.cpp +++ b/models/amat2_psc_exp.cpp @@ -109,20 +109,20 @@ nest::amat2_psc_exp::State_::State_() void nest::amat2_psc_exp::Parameters_::get( dictionary& d ) const { - d[ names::E_L.toString() ] = E_L_; // Resting potential - d[ names::I_e.toString() ] = I_e_; - d[ names::C_m.toString() ] = C_; - d[ names::tau_m.toString() ] = Tau_; - d[ names::tau_syn_ex.toString() ] = tau_ex_; - d[ names::tau_syn_in.toString() ] = tau_in_; - d[ names::t_ref.toString() ] = tau_ref_; - d[ names::tau_1.toString() ] = tau_1_; - d[ names::tau_2.toString() ] = tau_2_; - d[ names::alpha_1.toString() ] = alpha_1_; - d[ names::alpha_2.toString() ] = alpha_2_; - d[ names::beta.toString() ] = beta_; - d[ names::tau_v.toString() ] = tau_v_; - d[ names::omega.toString() ] = omega_ + E_L_; + d[ names::E_L ] = E_L_; // Resting potential + d[ names::I_e ] = I_e_; + d[ names::C_m ] = C_; + d[ names::tau_m ] = Tau_; + d[ names::tau_syn_ex ] = tau_ex_; + d[ names::tau_syn_in ] = tau_in_; + d[ names::t_ref ] = tau_ref_; + d[ names::tau_1 ] = tau_1_; + d[ names::tau_2 ] = tau_2_; + d[ names::alpha_1 ] = alpha_1_; + d[ names::alpha_2 ] = alpha_2_; + d[ names::beta ] = beta_; + d[ names::tau_v ] = tau_v_; + d[ names::omega ] = omega_ + E_L_; } double @@ -131,23 +131,23 @@ nest::amat2_psc_exp::Parameters_::set( const dictionary& d, Node* node ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::E_L, E_L_, node ); const double delta_EL = E_L_ - ELold; - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::C_m.toString(), C_, node ); - update_value_param( d, names::tau_m.toString(), Tau_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); - update_value_param( d, names::t_ref.toString(), tau_ref_, node ); - update_value_param( d, names::tau_1.toString(), tau_1_, node ); - update_value_param( d, names::tau_2.toString(), tau_2_, node ); - update_value_param( d, names::alpha_1.toString(), alpha_1_, node ); - update_value_param( d, names::alpha_2.toString(), alpha_2_, node ); - update_value_param( d, names::beta.toString(), beta_, node ); - update_value_param( d, names::tau_v.toString(), tau_v_, node ); - - if ( update_value_param( d, names::omega.toString(), omega_, node ) ) + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::C_m, C_, node ); + update_value_param( d, names::tau_m, Tau_, node ); + update_value_param( d, names::tau_syn_ex, tau_ex_, node ); + update_value_param( d, names::tau_syn_in, tau_in_, node ); + update_value_param( d, names::t_ref, tau_ref_, node ); + update_value_param( d, names::tau_1, tau_1_, node ); + update_value_param( d, names::tau_2, tau_2_, node ); + update_value_param( d, names::alpha_1, alpha_1_, node ); + update_value_param( d, names::alpha_2, alpha_2_, node ); + update_value_param( d, names::beta, beta_, node ); + update_value_param( d, names::tau_v, tau_v_, node ); + + if ( update_value_param( d, names::omega, omega_, node ) ) { omega_ -= E_L_; } @@ -183,18 +183,18 @@ nest::amat2_psc_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::amat2_psc_exp::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential + d[ names::V_m ] = V_m_ + p.E_L_; // Membrane potential // Adaptive threshold - d[ names::V_th.toString() ] = p.E_L_ + p.omega_ + V_th_1_ + V_th_2_ + V_th_v_; - d[ names::V_th_alpha_1.toString() ] = V_th_1_; - d[ names::V_th_alpha_2.toString() ] = V_th_2_; - d[ names::V_th_v.toString() ] = V_th_v_; + d[ names::V_th ] = p.E_L_ + p.omega_ + V_th_1_ + V_th_2_ + V_th_v_; + d[ names::V_th_alpha_1 ] = V_th_1_; + d[ names::V_th_alpha_2 ] = V_th_2_; + d[ names::V_th_v ] = V_th_v_; } void nest::amat2_psc_exp::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) + if ( update_value_param( d, names::V_m, V_m_, node ) ) { V_m_ -= p.E_L_; } @@ -203,9 +203,9 @@ nest::amat2_psc_exp::State_::set( const dictionary& d, const Parameters_& p, dou V_m_ -= delta_EL; } - update_value_param( d, names::V_th_alpha_1.toString(), V_th_1_, node ); - update_value_param( d, names::V_th_alpha_2.toString(), V_th_2_, node ); - update_value_param( d, names::V_th_v.toString(), V_th_v_, node ); + update_value_param( d, names::V_th_alpha_1, V_th_1_, node ); + update_value_param( d, names::V_th_alpha_2, V_th_2_, node ); + update_value_param( d, names::V_th_v, V_th_v_, node ); } nest::amat2_psc_exp::Buffers_::Buffers_( amat2_psc_exp& n ) @@ -320,13 +320,13 @@ nest::amat2_psc_exp::calibrate() / ( c * std::pow( taum - tauV, 2 ) ); V_.P71_ = ( beta * tauE * taum * tauV * ( ( em * taum * std::pow( tauE - tauV, 2 ) - eE * tauE * std::pow( taum - tauV, 2 ) ) * tauV - - eV * ( tauE - taum ) - * ( h * ( tauE - tauV ) * ( taum - tauV ) + tauE * taum * tauV - std::pow( tauV, 3 ) ) ) ) + - eV * ( tauE - taum ) + * ( h * ( tauE - tauV ) * ( taum - tauV ) + tauE * taum * tauV - std::pow( tauV, 3 ) ) ) ) / ( c * ( tauE - taum ) * std::pow( tauE - tauV, 2 ) * std::pow( taum - tauV, 2 ) ); V_.P72_ = ( beta * tauI * taum * tauV * ( ( em * taum * std::pow( tauI - tauV, 2 ) - eI * tauI * std::pow( taum - tauV, 2 ) ) * tauV - - eV * ( tauI - taum ) - * ( h * ( tauI - tauV ) * ( taum - tauV ) + tauI * taum * tauV - std::pow( tauV, 3 ) ) ) ) + - eV * ( tauI - taum ) + * ( h * ( tauI - tauV ) * ( taum - tauV ) + tauI * taum * tauV - std::pow( tauV, 3 ) ) ) ) / ( c * ( tauI - taum ) * std::pow( tauI - tauV, 2 ) * std::pow( taum - tauV, 2 ) ); V_.P73_ = ( beta * tauV * ( -( em * taum * tauV ) + eV * ( h * ( taum - tauV ) + taum * tauV ) ) ) / std::pow( taum - tauV, 2 ); diff --git a/models/amat2_psc_exp.h b/models/amat2_psc_exp.h index 58b68f1918..53a50d350a 100644 --- a/models/amat2_psc_exp.h +++ b/models/amat2_psc_exp.h @@ -291,8 +291,8 @@ class amat2_psc_exp : public ArchivingNode */ struct Buffers_ { - Buffers_( amat2_psc_exp& ); //!::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::p_transmit.toString() ] = p_transmit_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::p_transmit ] = p_transmit_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -202,8 +202,8 @@ void bernoulli_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::p_transmit.toString(), p_transmit_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::p_transmit, p_transmit_ ); if ( p_transmit_ < 0 || p_transmit_ > 1 ) { diff --git a/models/binary_neuron.h b/models/binary_neuron.h index ecbf7f157c..37d0c48c40 100644 --- a/models/binary_neuron.h +++ b/models/binary_neuron.h @@ -28,8 +28,8 @@ #include // Includes from libnestutil: -#include "numerics.h" #include "dict_util.h" +#include "numerics.h" // Includes from nestkernel: #include "archiving_node.h" @@ -91,8 +91,8 @@ class binary_neuron : public ArchivingNode */ using Node::handle; using Node::handles_test_event; - using Node::sends_signal; using Node::receives_signal; + using Node::sends_signal; port send_test_event( Node&, rport, synindex, bool ); @@ -294,7 +294,7 @@ binary_neuron< TGainfunction >::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); gain_.get( d ); } @@ -353,14 +353,14 @@ template < class TGainfunction > void binary_neuron< TGainfunction >::Parameters_::get( dictionary& d ) const { - d[ names::tau_m.toString() ] = tau_m_; + d[ names::tau_m ] = tau_m_; } template < class TGainfunction > void binary_neuron< TGainfunction >::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::tau_m.toString(), tau_m_, node ); + update_value_param( d, names::tau_m, tau_m_, node ); if ( tau_m_ <= 0 ) { throw BadProperty( "All time constants must be strictly positive." ); @@ -371,8 +371,8 @@ template < class TGainfunction > void binary_neuron< TGainfunction >::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::h.toString() ] = h_; // summed input - d[ names::S.toString() ] = y_; // binary_neuron output state + d[ names::h ] = h_; // summed input + d[ names::S ] = y_; // binary_neuron output state } template < class TGainfunction > diff --git a/models/clopath_synapse.h b/models/clopath_synapse.h index 96eb14a5c8..1857adf925 100644 --- a/models/clopath_synapse.h +++ b/models/clopath_synapse.h @@ -131,8 +131,8 @@ class clopath_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -281,12 +281,12 @@ void clopath_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::x_bar.toString() ] = x_bar_; - d[ names::tau_x.toString() ] = tau_x_; - d[ names::Wmin.toString() ] = Wmin_; - d[ names::Wmax.toString() ] = Wmax_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::x_bar ] = x_bar_; + d[ names::tau_x ] = tau_x_; + d[ names::Wmin ] = Wmin_; + d[ names::Wmax ] = Wmax_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -294,11 +294,11 @@ void clopath_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::x_bar.toString(), x_bar_ ); - d.update_value( names::tau_x.toString(), tau_x_ ); - d.update_value( names::Wmin.toString(), Wmin_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::x_bar, x_bar_ ); + d.update_value( names::tau_x, tau_x_ ); + d.update_value( names::Wmin, Wmin_ ); + d.update_value( names::Wmax, Wmax_ ); // check if weight_ and Wmin_ has the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmin_ >= 0 ) - ( Wmin_ < 0 ) ) ) ) diff --git a/models/cont_delay_synapse_impl.h b/models/cont_delay_synapse_impl.h index a3db58e4e0..2373fe7f77 100644 --- a/models/cont_delay_synapse_impl.h +++ b/models/cont_delay_synapse_impl.h @@ -50,9 +50,9 @@ cont_delay_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::delay.toString() ] = Time( Time::step( get_delay_steps() ) ).get_ms() - delay_offset_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::delay ] = Time( Time::step( get_delay_steps() ) ).get_ms() - delay_offset_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -61,12 +61,12 @@ cont_delay_synapse< targetidentifierT >::set_status( const dictionary& d, Connec { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); // set delay if mentioned double delay; - if ( d.update_value( names::delay.toString(), delay ) ) + if ( d.update_value( names::delay, delay ) ) { const double h = Time::get_resolution().get_ms(); @@ -94,7 +94,7 @@ template < typename targetidentifierT > void cont_delay_synapse< targetidentifierT >::check_synapse_params( const dictionary& syn_spec ) const { - if ( syn_spec.known( names::delay.toString() ) ) + if ( syn_spec.known( names::delay ) ) { LOG( M_WARNING, "Connect", diff --git a/models/correlation_detector.cpp b/models/correlation_detector.cpp index 4d985dc028..cc56a6cca5 100644 --- a/models/correlation_detector.cpp +++ b/models/correlation_detector.cpp @@ -66,7 +66,8 @@ nest::correlation_detector::Parameters_::Parameters_( const Parameters_& p ) Tstop_.calibrate(); } -nest::correlation_detector::Parameters_& nest::correlation_detector::Parameters_::operator=( const Parameters_& p ) +nest::correlation_detector::Parameters_& +nest::correlation_detector::Parameters_::operator=( const Parameters_& p ) { delta_tau_ = p.delta_tau_; tau_max_ = p.tau_max_; @@ -98,19 +99,19 @@ nest::correlation_detector::State_::State_() void nest::correlation_detector::Parameters_::get( dictionary& d ) const { - d[ names::delta_tau.toString() ] = delta_tau_.get_ms(); - d[ names::tau_max.toString() ] = tau_max_.get_ms(); - d[ names::Tstart.toString() ] = Tstart_.get_ms(); - d[ names::Tstop.toString() ] = Tstop_.get_ms(); + d[ names::delta_tau ] = delta_tau_.get_ms(); + d[ names::tau_max ] = tau_max_.get_ms(); + d[ names::Tstart ] = Tstart_.get_ms(); + d[ names::Tstop ] = Tstop_.get_ms(); } void nest::correlation_detector::State_::get( dictionary& d ) const { - d[ names::n_events.toString() ] = IntVectorDatum( new std::vector< long >( n_events_ ) ); - d[ names::histogram.toString() ] = DoubleVectorDatum( new std::vector< double >( histogram_ ) ); - d[ names::histogram_correction.toString() ] = DoubleVectorDatum( new std::vector< double >( histogram_correction_ ) ); - d[ names::count_histogram.toString() ] = IntVectorDatum( new std::vector< long >( count_histogram_ ) ); + d[ names::n_events ] = IntVectorDatum( new std::vector< long >( n_events_ ) ); + d[ names::histogram ] = DoubleVectorDatum( new std::vector< double >( histogram_ ) ); + d[ names::histogram_correction ] = DoubleVectorDatum( new std::vector< double >( histogram_correction_ ) ); + d[ names::count_histogram ] = IntVectorDatum( new std::vector< long >( count_histogram_ ) ); } bool @@ -118,25 +119,25 @@ nest::correlation_detector::Parameters_::set( const dictionary& d, const correla { bool reset = false; double t; - if ( update_value_param( d, names::delta_tau.toString(), t, node ) ) + if ( update_value_param( d, names::delta_tau, t, node ) ) { delta_tau_ = Time::ms( t ); reset = true; } - if ( update_value_param( d, names::tau_max.toString(), t, node ) ) + if ( update_value_param( d, names::tau_max, t, node ) ) { tau_max_ = Time::ms( t ); reset = true; } - if ( update_value_param( d, names::Tstart.toString(), t, node ) ) + if ( update_value_param( d, names::Tstart, t, node ) ) { Tstart_ = Time::ms( t ); reset = true; } - if ( update_value_param( d, names::Tstop.toString(), t, node ) ) + if ( update_value_param( d, names::Tstop, t, node ) ) { Tstop_ = Time::ms( t ); reset = true; @@ -159,7 +160,7 @@ void nest::correlation_detector::State_::set( const dictionary& d, const Parameters_& p, bool reset_required, Node* ) { std::vector< long > nev; - if ( d.update_value( names::n_events.toString(), nev ) ) + if ( d.update_value( names::n_events, nev ) ) { if ( nev.size() == 2 && nev[ 0 ] == 0 && nev[ 1 ] == 0 ) { diff --git a/models/correlomatrix_detector.cpp b/models/correlomatrix_detector.cpp index 25ff60a545..316b528848 100644 --- a/models/correlomatrix_detector.cpp +++ b/models/correlomatrix_detector.cpp @@ -70,7 +70,8 @@ nest::correlomatrix_detector::Parameters_::Parameters_( const Parameters_& p ) Tstop_.calibrate(); } -nest::correlomatrix_detector::Parameters_& nest::correlomatrix_detector::Parameters_::operator=( const Parameters_& p ) +nest::correlomatrix_detector::Parameters_& +nest::correlomatrix_detector::Parameters_::operator=( const Parameters_& p ) { delta_tau_ = p.delta_tau_; tau_max_ = p.tau_max_; @@ -102,17 +103,17 @@ nest::correlomatrix_detector::State_::State_() void nest::correlomatrix_detector::Parameters_::get( dictionary& d ) const { - d[ names::delta_tau.toString() ] = delta_tau_.get_ms(); - d[ names::tau_max.toString() ] = tau_max_.get_ms(); - d[ names::Tstart.toString() ] = Tstart_.get_ms(); - d[ names::Tstop.toString() ] = Tstop_.get_ms(); - d[ names::N_channels.toString() ] = N_channels_; + d[ names::delta_tau ] = delta_tau_.get_ms(); + d[ names::tau_max ] = tau_max_.get_ms(); + d[ names::Tstart ] = Tstart_.get_ms(); + d[ names::Tstop ] = Tstop_.get_ms(); + d[ names::N_channels ] = N_channels_; } void nest::correlomatrix_detector::State_::get( dictionary& d ) const { - d[ names::n_events.toString() ] = IntVectorDatum( new std::vector< long >( n_events_ ) ); + d[ names::n_events ] = IntVectorDatum( new std::vector< long >( n_events_ ) ); ArrayDatum* C = new ArrayDatum; ArrayDatum* CountC = new ArrayDatum; @@ -128,8 +129,8 @@ nest::correlomatrix_detector::State_::get( dictionary& d ) const C->push_back( *C_i ); CountC->push_back( *CountC_i ); } - d[ names::covariance.toString() ] = C; - d[ names::count_covariance.toString() ] = CountC; + d[ names::covariance ] = C; + d[ names::count_covariance ] = CountC; } bool @@ -139,7 +140,7 @@ nest::correlomatrix_detector::Parameters_::set( const dictionary& d, const corre double t; long N; - if ( update_value_param( d, names::N_channels.toString(), N, node ) ) + if ( update_value_param( d, names::N_channels, N, node ) ) { if ( N < 1 ) { @@ -152,25 +153,25 @@ nest::correlomatrix_detector::Parameters_::set( const dictionary& d, const corre } } - if ( update_value_param( d, names::delta_tau.toString(), t, node ) ) + if ( update_value_param( d, names::delta_tau, t, node ) ) { delta_tau_ = Time::ms( t ); reset = true; } - if ( update_value_param( d, names::tau_max.toString(), t, node ) ) + if ( update_value_param( d, names::tau_max, t, node ) ) { tau_max_ = Time::ms( t ); reset = true; } - if ( update_value_param( d, names::Tstart.toString(), t, node ) ) + if ( update_value_param( d, names::Tstart, t, node ) ) { Tstart_ = Time::ms( t ); reset = true; } - if ( update_value_param( d, names::Tstop.toString(), t, node ) ) + if ( update_value_param( d, names::Tstop, t, node ) ) { Tstop_ = Time::ms( t ); reset = true; @@ -360,8 +361,9 @@ nest::correlomatrix_detector::handle( SpikeEvent& e ) if ( sender_ind <= other_ind ) { - bin = -1. * std::floor( ( 0.5 * P_.delta_tau_.get_steps() - std::abs( spike_i - spike_j->timestep_ ) ) - / P_.delta_tau_.get_steps() ); + bin = -1. + * std::floor( ( 0.5 * P_.delta_tau_.get_steps() - std::abs( spike_i - spike_j->timestep_ ) ) + / P_.delta_tau_.get_steps() ); } else { diff --git a/models/correlospinmatrix_detector.cpp b/models/correlospinmatrix_detector.cpp index eede25837b..ed95c1050a 100644 --- a/models/correlospinmatrix_detector.cpp +++ b/models/correlospinmatrix_detector.cpp @@ -71,8 +71,8 @@ nest::correlospinmatrix_detector::Parameters_::Parameters_( const Parameters_& p } -nest::correlospinmatrix_detector::Parameters_& nest::correlospinmatrix_detector::Parameters_::operator=( - const Parameters_& p ) +nest::correlospinmatrix_detector::Parameters_& +nest::correlospinmatrix_detector::Parameters_::operator=( const Parameters_& p ) { delta_tau_ = p.delta_tau_; tau_max_ = p.tau_max_; @@ -105,11 +105,11 @@ nest::correlospinmatrix_detector::State_::State_() void nest::correlospinmatrix_detector::Parameters_::get( dictionary& d ) const { - d[ names::delta_tau.toString() ] = delta_tau_.get_ms(); - d[ names::tau_max.toString() ] = tau_max_.get_ms(); - d[ names::Tstart.toString() ] = Tstart_.get_ms(); - d[ names::Tstop.toString() ] = Tstop_.get_ms(); - d[ names::N_channels.toString() ] = N_channels_; + d[ names::delta_tau ] = delta_tau_.get_ms(); + d[ names::tau_max ] = tau_max_.get_ms(); + d[ names::Tstart ] = Tstart_.get_ms(); + d[ names::Tstop ] = Tstop_.get_ms(); + d[ names::N_channels ] = N_channels_; } void @@ -125,7 +125,7 @@ nest::correlospinmatrix_detector::State_::get( dictionary& d ) const } CountC->push_back( *CountC_i ); } - d[ names::count_covariance.toString() ] = CountC; + d[ names::count_covariance ] = CountC; } bool @@ -137,7 +137,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const dictionary& d, double t; long N; - if ( update_value_param( d, names::N_channels.toString(), N, node ) ) + if ( update_value_param( d, names::N_channels, N, node ) ) { if ( N < 1 ) { @@ -150,7 +150,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const dictionary& d, } } - if ( update_value_param( d, names::delta_tau.toString(), t, node ) ) + if ( update_value_param( d, names::delta_tau, t, node ) ) { delta_tau_ = Time::ms( t ); reset = true; @@ -160,7 +160,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const dictionary& d, } } - if ( update_value_param( d, names::tau_max.toString(), t, node ) ) + if ( update_value_param( d, names::tau_max, t, node ) ) { tau_max_ = Time::ms( t ); reset = true; @@ -170,7 +170,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const dictionary& d, } } - if ( update_value_param( d, names::Tstart.toString(), t, node ) ) + if ( update_value_param( d, names::Tstart, t, node ) ) { Tstart_ = Time::ms( t ); reset = true; @@ -180,7 +180,7 @@ nest::correlospinmatrix_detector::Parameters_::set( const dictionary& d, } } - if ( update_value_param( d, names::Tstop.toString(), t, node ) ) + if ( update_value_param( d, names::Tstop, t, node ) ) { Tstop_ = Time::ms( t ); reset = true; diff --git a/models/dc_generator.cpp b/models/dc_generator.cpp index ed9a6d3d9f..589711e5ce 100644 --- a/models/dc_generator.cpp +++ b/models/dc_generator.cpp @@ -62,7 +62,8 @@ nest::dc_generator::Parameters_::Parameters_( const Parameters_& p ) { } -nest::dc_generator::Parameters_& nest::dc_generator::Parameters_::operator=( const Parameters_& p ) +nest::dc_generator::Parameters_& +nest::dc_generator::Parameters_::operator=( const Parameters_& p ) { if ( this == &p ) { @@ -97,13 +98,13 @@ nest::dc_generator::Buffers_::Buffers_( const Buffers_&, dc_generator& n ) void nest::dc_generator::Parameters_::get( dictionary& d ) const { - d[ names::amplitude.toString() ] = amp_; + d[ names::amplitude ] = amp_; } void nest::dc_generator::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::amplitude.toString(), amp_, node ); + update_value_param( d, names::amplitude, amp_, node ); } @@ -199,7 +200,7 @@ nest::dc_generator::set_data_from_stimulation_backend( std::vector< double >& in throw BadParameterValue( "The size of the data for the dc_generator needs to be 1 [amplitude]." ); } dictionary d; - d[ names::amplitude.toString() ] = input_param[ 0 ]; + d[ names::amplitude ] = input_param[ 0 ]; ptmp.set( d, this ); } diff --git a/models/dc_generator.h b/models/dc_generator.h index 23b66b2532..575b9f8e84 100644 --- a/models/dc_generator.h +++ b/models/dc_generator.h @@ -205,7 +205,7 @@ dc_generator::get_status( dictionary& d ) const P_.get( d ); StimulationDevice::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/diffusion_connection.h b/models/diffusion_connection.h index c1492bd1b4..a6ac26208e 100644 --- a/models/diffusion_connection.h +++ b/models/diffusion_connection.h @@ -170,10 +170,10 @@ void DiffusionConnection< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::drift_factor.toString() ] = drift_factor_; - d[ names::diffusion_factor.toString() ] = diffusion_factor_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::drift_factor ] = drift_factor_; + d[ names::diffusion_factor ] = diffusion_factor_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -181,12 +181,12 @@ void DiffusionConnection< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // If the delay is set, we throw a BadProperty - if ( d.known( names::delay.toString() ) ) + if ( d.known( names::delay ) ) { throw BadProperty( "diffusion_connection has no delay." ); } // If the parameter weight is set, we throw a BadProperty - if ( d.known( names::weight.toString() ) ) + if ( d.known( names::weight ) ) { throw BadProperty( "Please use the parameters drift_factor and " @@ -194,8 +194,8 @@ DiffusionConnection< targetidentifierT >::set_status( const dictionary& d, Conne } ConnectionBase::set_status( d, cm ); - d.update_value( names::drift_factor.toString(), drift_factor_ ); - d.update_value( names::diffusion_factor.toString(), diffusion_factor_ ); + d.update_value( names::drift_factor, drift_factor_ ); + d.update_value( names::diffusion_factor, diffusion_factor_ ); } } // namespace diff --git a/models/erfc_neuron.cpp b/models/erfc_neuron.cpp index 462423e5b7..892acde06d 100644 --- a/models/erfc_neuron.cpp +++ b/models/erfc_neuron.cpp @@ -28,15 +28,15 @@ namespace nest void gainfunction_erfc::get( dictionary& d ) const { - d[ names::theta.toString() ] = theta_; - d[ names::sigma.toString() ] = sigma_; + d[ names::theta ] = theta_; + d[ names::sigma ] = sigma_; } void gainfunction_erfc::set( const dictionary& d, Node* node ) { - update_value_param( d, names::theta.toString(), theta_, node ); - update_value_param( d, names::sigma.toString(), sigma_, node ); + update_value_param( d, names::theta, theta_, node ); + update_value_param( d, names::sigma, sigma_, node ); } /* diff --git a/models/gamma_sup_generator.cpp b/models/gamma_sup_generator.cpp index 72b6b8cefc..f43999e7c1 100644 --- a/models/gamma_sup_generator.cpp +++ b/models/gamma_sup_generator.cpp @@ -138,28 +138,28 @@ nest::gamma_sup_generator::Parameters_::Parameters_() void nest::gamma_sup_generator::Parameters_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_; - d[ names::gamma_shape.toString() ] = gamma_shape_; - d[ names::n_proc.toString() ] = n_proc_; + d[ names::rate ] = rate_; + d[ names::gamma_shape ] = gamma_shape_; + d[ names::n_proc ] = n_proc_; } void nest::gamma_sup_generator::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::gamma_shape.toString(), gamma_shape_, node ); + update_value_param( d, names::gamma_shape, gamma_shape_, node ); if ( gamma_shape_ < 1 ) { throw BadProperty( "The shape must be larger or equal 1" ); } - update_value_param( d, names::rate.toString(), rate_, node ); + update_value_param( d, names::rate, rate_, node ); if ( rate_ < 0.0 ) { throw BadProperty( "The rate must be larger than 0." ); } long n_proc_l = n_proc_; - update_value_param( d, names::n_proc.toString(), n_proc_l, node ); + update_value_param( d, names::n_proc, n_proc_l, node ); if ( n_proc_l < 1 ) { throw BadProperty( "The number of component processes cannot be smaller than one" ); @@ -293,9 +293,9 @@ nest::gamma_sup_generator::set_data_from_stimulation_backend( std::vector< doubl "The size of the data for the gamma_sup_generator needs to be 3 [gamma_shape, rate, n_proc]." ); } dictionary d; - d[ names::gamma_shape.toString() ] = lround( input_param[ 0 ] ); - d[ names::rate.toString() ] = input_param[ 1 ]; - d[ names::n_proc.toString() ] = lround( input_param[ 2 ] ); + d[ names::gamma_shape ] = lround( input_param[ 0 ] ); + d[ names::rate ] = input_param[ 1 ]; + d[ names::n_proc ] = lround( input_param[ 2 ] ); ptmp.set( d, this ); } diff --git a/models/gap_junction.h b/models/gap_junction.h index b59131ea60..68b5ebe17a 100644 --- a/models/gap_junction.h +++ b/models/gap_junction.h @@ -155,8 +155,8 @@ GapJunction< targetidentifierT >::get_status( dictionary& d ) const // errors due to internal calls of // this function in SLI/pyNEST ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -164,13 +164,13 @@ void GapJunction< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // If the delay is set, we throw a BadProperty - if ( d.known( names::delay.toString() ) ) + if ( d.known( names::delay ) ) { throw BadProperty( "gap_junction connection has no delay" ); } ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); } } // namespace diff --git a/models/gauss_rate.cpp b/models/gauss_rate.cpp index 1840b65c05..c64377a8c5 100644 --- a/models/gauss_rate.cpp +++ b/models/gauss_rate.cpp @@ -28,17 +28,17 @@ namespace nest void nonlinearities_gauss_rate::get( dictionary& d ) const { - d[ names::g.toString() ] = g_; - d[ names::mu.toString() ] = mu_; - d[ names::sigma.toString() ] = sigma_; + d[ names::g ] = g_; + d[ names::mu ] = mu_; + d[ names::sigma ] = sigma_; } void nonlinearities_gauss_rate::set( const dictionary& d, Node* node ) { - update_value_param( d, names::g.toString(), g_, node ); - update_value_param( d, names::mu.toString(), mu_, node ); - update_value_param( d, names::sigma.toString(), sigma_, node ); + update_value_param( d, names::g, g_, node ); + update_value_param( d, names::mu, mu_, node ); + update_value_param( d, names::sigma, sigma_, node ); } /* diff --git a/models/gif_cond_exp.cpp b/models/gif_cond_exp.cpp index b6382cc937..50de145990 100644 --- a/models/gif_cond_exp.cpp +++ b/models/gif_cond_exp.cpp @@ -25,10 +25,10 @@ #ifdef HAVE_GSL // C++ includes: -#include +#include #include #include -#include +#include // Includes from libnestutil: #include "compose.hpp" @@ -164,7 +164,8 @@ nest::gif_cond_exp::State_::State_( const State_& s ) } } -nest::gif_cond_exp::State_& nest::gif_cond_exp::State_::operator=( const State_& s ) +nest::gif_cond_exp::State_& +nest::gif_cond_exp::State_::operator=( const State_& s ) { I_stim_ = s.I_stim_; sfa_ = s.sfa_; @@ -196,79 +197,79 @@ nest::gif_cond_exp::State_& nest::gif_cond_exp::State_::operator=( const State_& void nest::gif_cond_exp::Parameters_::get( dictionary& d ) const { - d[ names::I_e.toString() ] = I_e_; - d[ names::E_L.toString() ] = E_L_; - d[ names::g_L.toString() ] = g_L_; - d[ names::C_m.toString() ] = c_m_; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::Delta_V.toString() ] = Delta_V_; - d[ names::V_T_star.toString() ] = V_T_star_; - d[ names::lambda_0.toString() ] = lambda_0_ * 1000.0; // convert to 1/s - d[ names::t_ref.toString() ] = t_ref_; - d[ names::tau_syn_ex.toString() ] = tau_synE_; - d[ names::tau_syn_in.toString() ] = tau_synI_; - d[ names::E_ex.toString() ] = E_ex_; - d[ names::E_in.toString() ] = E_in_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::I_e ] = I_e_; + d[ names::E_L ] = E_L_; + d[ names::g_L ] = g_L_; + d[ names::C_m ] = c_m_; + d[ names::V_reset ] = V_reset_; + d[ names::Delta_V ] = Delta_V_; + d[ names::V_T_star ] = V_T_star_; + d[ names::lambda_0 ] = lambda_0_ * 1000.0; // convert to 1/s + d[ names::t_ref ] = t_ref_; + d[ names::tau_syn_ex ] = tau_synE_; + d[ names::tau_syn_in ] = tau_synI_; + d[ names::E_ex ] = E_ex_; + d[ names::E_in ] = E_in_; + d[ names::gsl_error_tol ] = gsl_error_tol; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; + d[ names::tau_sfa ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - d[ names::q_sfa.toString() ] = q_sfa_list_ad; + d[ names::q_sfa ] = q_sfa_list_ad; ArrayDatum tau_stc_list_ad( tau_stc_ ); - d[ names::tau_stc.toString() ] = tau_stc_list_ad; + d[ names::tau_stc ] = tau_stc_list_ad; ArrayDatum q_stc_list_ad( q_stc_ ); - d[ names::q_stc.toString() ] = q_stc_list_ad; + d[ names::q_stc ] = q_stc_list_ad; } void nest::gif_cond_exp::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::E_L.toString(), E_L_, node ); - update_value_param( d, names::g_L.toString(), g_L_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); - update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::E_L, E_L_, node ); + update_value_param( d, names::g_L, g_L_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::Delta_V, Delta_V_, node ); + update_value_param( d, names::V_T_star, V_T_star_, node ); - if ( update_value_param( d, names::lambda_0.toString(), lambda_0_, node ) ) + if ( update_value_param( d, names::lambda_0, lambda_0_, node ) ) { lambda_0_ /= 1000.0; // convert to 1/ms } - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_synE_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI_, node ); - update_value_param( d, names::E_ex.toString(), E_ex_, node ); - update_value_param( d, names::E_in.toString(), E_in_, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::tau_syn_ex, tau_synE_, node ); + update_value_param( d, names::tau_syn_in, tau_synI_, node ); + update_value_param( d, names::E_ex, E_ex_, node ); + update_value_param( d, names::E_in, E_in_, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); - d.update_value( names::tau_sfa.toString(), tau_sfa_ ); - d.update_value( names::q_sfa.toString(), q_sfa_ ); - d.update_value( names::tau_stc.toString(), tau_stc_ ); - d.update_value( names::q_stc.toString(), q_stc_ ); + d.update_value( names::tau_sfa, tau_sfa_ ); + d.update_value( names::q_sfa, q_sfa_ ); + d.update_value( names::tau_stc, tau_stc_ ); + d.update_value( names::q_stc, q_stc_ ); if ( tau_sfa_.size() != q_sfa_.size() ) { - throw BadProperty( String::compose( - "'tau_sfa' and 'q_sfa' need to have the same dimensions.\nSize of " - "tau_sfa: %1\nSize of q_sfa: %2", - tau_sfa_.size(), - q_sfa_.size() ) ); + throw BadProperty( + String::compose( "'tau_sfa' and 'q_sfa' need to have the same dimensions.\nSize of " + "tau_sfa: %1\nSize of q_sfa: %2", + tau_sfa_.size(), + q_sfa_.size() ) ); } if ( tau_stc_.size() != q_stc_.size() ) { - throw BadProperty( String::compose( - "'tau_stc' and 'q_stc' need to have the same dimensions.\nSize of " - "tau_stc: %1\nSize of q_stc: %2", - tau_stc_.size(), - q_stc_.size() ) ); + throw BadProperty( + String::compose( "'tau_stc' and 'q_stc' need to have the same dimensions.\nSize of " + "tau_stc: %1\nSize of q_stc: %2", + tau_stc_.size(), + q_stc_.size() ) ); } if ( g_L_ <= 0 ) { @@ -315,19 +316,19 @@ nest::gif_cond_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::gif_cond_exp::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::V_m.toString() ] = neuron_state_[ V_M ]; // Membrane potential - d[ names::g_ex.toString() ] = neuron_state_[ G_EXC ]; - d[ names::g_in.toString() ] = neuron_state_[ G_INH ]; - d[ names::E_sfa.toString() ] = sfa_; // Adaptive threshold potential - d[ names::I_stc.toString() ] = stc_; // Spike-triggered current + d[ names::V_m ] = neuron_state_[ V_M ]; // Membrane potential + d[ names::g_ex ] = neuron_state_[ G_EXC ]; + d[ names::g_in ] = neuron_state_[ G_INH ]; + d[ names::E_sfa ] = sfa_; // Adaptive threshold potential + d[ names::I_stc ] = stc_; // Spike-triggered current } void nest::gif_cond_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), neuron_state_[ V_M ], node ); - update_value_param( d, names::g_ex.toString(), neuron_state_[ G_EXC ], node ); - update_value_param( d, names::g_in.toString(), neuron_state_[ G_INH ], node ); + update_value_param( d, names::V_m, neuron_state_[ V_M ], node ); + update_value_param( d, names::g_ex, neuron_state_[ G_EXC ], node ); + update_value_param( d, names::g_in, neuron_state_[ G_INH ], node ); } nest::gif_cond_exp::Buffers_::Buffers_( gif_cond_exp& n ) diff --git a/models/gif_cond_exp.h b/models/gif_cond_exp.h index 5eae7623f7..1c47bace63 100644 --- a/models/gif_cond_exp.h +++ b/models/gif_cond_exp.h @@ -33,10 +33,10 @@ #include // Includes from nestkernel: -#include "event.h" #include "archiving_node.h" -#include "ring_buffer.h" #include "connection.h" +#include "event.h" +#include "ring_buffer.h" #include "universal_data_logger.h" @@ -481,7 +481,7 @@ gif_cond_exp::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/gif_cond_exp_multisynapse.cpp b/models/gif_cond_exp_multisynapse.cpp index 24e876d74f..24674b970d 100644 --- a/models/gif_cond_exp_multisynapse.cpp +++ b/models/gif_cond_exp_multisynapse.cpp @@ -25,10 +25,10 @@ #ifdef HAVE_GSL // C++ includes: -#include +#include #include #include -#include +#include // Includes from libnestutil: #include "compose.hpp" @@ -152,64 +152,64 @@ nest::gif_cond_exp_multisynapse::State_::State_( const Parameters_& p ) void nest::gif_cond_exp_multisynapse::Parameters_::get( dictionary& d ) const { - d[ names::I_e.toString() ] = I_e_; - d[ names::E_L.toString() ] = E_L_; - d[ names::g_L.toString() ] = g_L_; - d[ names::C_m.toString() ] = c_m_; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::Delta_V.toString() ] = Delta_V_; - d[ names::V_T_star.toString() ] = V_T_star_; - d[ names::lambda_0.toString() ] = lambda_0_ * 1000.0; // convert to 1/s - d[ names::t_ref.toString() ] = t_ref_; - d[ names::n_receptors.toString() ] = n_receptors(); + d[ names::I_e ] = I_e_; + d[ names::E_L ] = E_L_; + d[ names::g_L ] = g_L_; + d[ names::C_m ] = c_m_; + d[ names::V_reset ] = V_reset_; + d[ names::Delta_V ] = Delta_V_; + d[ names::V_T_star ] = V_T_star_; + d[ names::lambda_0 ] = lambda_0_ * 1000.0; // convert to 1/s + d[ names::t_ref ] = t_ref_; + d[ names::n_receptors ] = n_receptors(); ArrayDatum E_rev_ad( E_rev_ ); - d[ names::E_rev.toString() ] = E_rev_ad; - d[ names::has_connections.toString() ] = has_connections_; - d[ names::gsl_error_tol.toString() ] = gsl_error_tol; + d[ names::E_rev ] = E_rev_ad; + d[ names::has_connections ] = has_connections_; + d[ names::gsl_error_tol ] = gsl_error_tol; ArrayDatum tau_syn_ad( tau_syn_ ); - d[ names::tau_syn.toString() ] = tau_syn_ad; + d[ names::tau_syn ] = tau_syn_ad; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; + d[ names::tau_sfa ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - d[ names::q_sfa.toString() ] = q_sfa_list_ad; + d[ names::q_sfa ] = q_sfa_list_ad; ArrayDatum tau_stc_list_ad( tau_stc_ ); - d[ names::tau_stc.toString() ] = tau_stc_list_ad; + d[ names::tau_stc ] = tau_stc_list_ad; ArrayDatum q_stc_list_ad( q_stc_ ); - d[ names::q_stc.toString() ] = q_stc_list_ad; + d[ names::q_stc ] = q_stc_list_ad; } void nest::gif_cond_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::E_L.toString(), E_L_, node ); - update_value_param( d, names::g_L.toString(), g_L_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); - update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); - - if ( update_value_param( d, names::lambda_0.toString(), lambda_0_, node ) ) + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::E_L, E_L_, node ); + update_value_param( d, names::g_L, g_L_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::Delta_V, Delta_V_, node ); + update_value_param( d, names::V_T_star, V_T_star_, node ); + + if ( update_value_param( d, names::lambda_0, lambda_0_, node ) ) { lambda_0_ /= 1000.0; // convert to 1/ms } - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::gsl_error_tol.toString(), gsl_error_tol, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::gsl_error_tol, gsl_error_tol, node ); - d.update_value( names::tau_sfa.toString(), tau_sfa_ ); - d.update_value( names::q_sfa.toString(), q_sfa_ ); - d.update_value( names::tau_stc.toString(), tau_stc_ ); - d.update_value( names::q_stc.toString(), q_stc_ ); + d.update_value( names::tau_sfa, tau_sfa_ ); + d.update_value( names::q_sfa, q_sfa_ ); + d.update_value( names::tau_stc, tau_stc_ ); + d.update_value( names::q_stc, q_stc_ ); const size_t old_n_receptors = n_receptors(); - bool Erev_flag = d.update_value( names::E_rev.toString(), E_rev_ ); - bool tau_flag = d.update_value( names::tau_syn.toString(), tau_syn_ ); + bool Erev_flag = d.update_value( names::E_rev, E_rev_ ); + bool tau_flag = d.update_value( names::tau_syn, tau_syn_ ); if ( Erev_flag || tau_flag ) { // receptor arrays have been modified if ( ( E_rev_.size() != old_n_receptors || tau_syn_.size() != old_n_receptors ) @@ -242,20 +242,20 @@ nest::gif_cond_exp_multisynapse::Parameters_::set( const dictionary& d, Node* no if ( tau_sfa_.size() != q_sfa_.size() ) { - throw BadProperty( String::compose( - "'tau_sfa' and 'q_sfa' need to have the same dimensions.\nSize of " - "tau_sfa: %1\nSize of q_sfa: %2", - tau_sfa_.size(), - q_sfa_.size() ) ); + throw BadProperty( + String::compose( "'tau_sfa' and 'q_sfa' need to have the same dimensions.\nSize of " + "tau_sfa: %1\nSize of q_sfa: %2", + tau_sfa_.size(), + q_sfa_.size() ) ); } if ( tau_stc_.size() != q_stc_.size() ) { - throw BadProperty( String::compose( - "'tau_stc' and 'q_stc' need to have the same dimensions.\nSize of " - "tau_stc: %1\nSize of q_stc: %2", - tau_stc_.size(), - q_stc_.size() ) ); + throw BadProperty( + String::compose( "'tau_stc' and 'q_stc' need to have the same dimensions.\nSize of " + "tau_stc: %1\nSize of q_stc: %2", + tau_stc_.size(), + q_stc_.size() ) ); } if ( g_L_ <= 0 ) @@ -303,9 +303,9 @@ nest::gif_cond_exp_multisynapse::Parameters_::set( const dictionary& d, Node* no void nest::gif_cond_exp_multisynapse::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential - d[ names::E_sfa.toString() ] = sfa_; // Adaptive threshold potential - d[ names::I_stc.toString() ] = stc_; // Spike-triggered current + d[ names::V_m ] = y_[ V_M ]; // Membrane potential + d[ names::E_sfa ] = sfa_; // Adaptive threshold potential + d[ names::I_stc ] = stc_; // Spike-triggered current std::vector< double >* g = new std::vector< double >(); @@ -315,13 +315,13 @@ nest::gif_cond_exp_multisynapse::State_::get( dictionary& d, const Parameters_& g->push_back( y_[ State_::G + State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * i ] ); } - d[ names::g.toString() ] = DoubleVectorDatum( g ); + d[ names::g ] = DoubleVectorDatum( g ); } void nest::gif_cond_exp_multisynapse::State_::set( const dictionary& d, const Parameters_& p, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); y_.resize( State_::NUMBER_OF_FIXED_STATES_ELEMENTS + State_::NUM_STATE_ELEMENTS_PER_RECEPTOR * p.n_receptors(), 0.0 ); sfa_elems_.resize( p.tau_sfa_.size(), 0.0 ); diff --git a/models/gif_cond_exp_multisynapse.h b/models/gif_cond_exp_multisynapse.h index 028522e594..109b4a3896 100644 --- a/models/gif_cond_exp_multisynapse.h +++ b/models/gif_cond_exp_multisynapse.h @@ -33,10 +33,10 @@ #include // Includes from nestkernel: -#include "event.h" #include "archiving_node.h" -#include "ring_buffer.h" #include "connection.h" +#include "event.h" +#include "ring_buffer.h" #include "universal_data_logger.h" #include "nest.h" @@ -486,7 +486,7 @@ gif_cond_exp_multisynapse::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/gif_pop_psc_exp.cpp b/models/gif_pop_psc_exp.cpp index 3c6c9f831d..c6bc2c1d0d 100644 --- a/models/gif_pop_psc_exp.cpp +++ b/models/gif_pop_psc_exp.cpp @@ -32,8 +32,8 @@ https://doi.org/10.1371/journal.pcbi.1005507 */ #include "gif_pop_psc_exp.h" -#include "universal_data_logger_impl.h" #include "compose.hpp" +#include "universal_data_logger_impl.h" // Includes from libnestutil: #include "dict_util.h" @@ -109,57 +109,57 @@ nest::gif_pop_psc_exp::State_::State_() void nest::gif_pop_psc_exp::Parameters_::get( dictionary& d ) const { - d[ names::N.toString() ] = N_; - d[ names::tau_m.toString() ] = tau_m_; - d[ names::C_m.toString() ] = c_m_; - d[ names::lambda_0.toString() ] = lambda_0_; - d[ names::Delta_V.toString() ] = Delta_V_; - d[ names::len_kernel.toString() ] = len_kernel_; - d[ names::I_e.toString() ] = I_e_; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::V_T_star.toString() ] = V_T_star_; - d[ names::E_L.toString() ] = E_L_; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::tau_syn_ex.toString() ] = tau_syn_ex_; - d[ names::tau_syn_in.toString() ] = tau_syn_in_; + d[ names::N ] = N_; + d[ names::tau_m ] = tau_m_; + d[ names::C_m ] = c_m_; + d[ names::lambda_0 ] = lambda_0_; + d[ names::Delta_V ] = Delta_V_; + d[ names::len_kernel ] = len_kernel_; + d[ names::I_e ] = I_e_; + d[ names::V_reset ] = V_reset_; + d[ names::V_T_star ] = V_T_star_; + d[ names::E_L ] = E_L_; + d[ names::t_ref ] = t_ref_; + d[ names::tau_syn_ex ] = tau_syn_ex_; + d[ names::tau_syn_in ] = tau_syn_in_; d[ "BinoRand" ] = BinoRand_; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; + d[ names::tau_sfa ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - d[ names::q_sfa.toString() ] = q_sfa_list_ad; + d[ names::q_sfa ] = q_sfa_list_ad; } void nest::gif_pop_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::N.toString(), N_, node ); - update_value_param( d, names::tau_m.toString(), tau_m_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::lambda_0.toString(), lambda_0_, node ); - update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); - update_value_param( d, names::len_kernel.toString(), len_kernel_, node ); - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); - update_value_param( d, names::E_L.toString(), E_L_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_syn_ex_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_syn_in_, node ); + update_value_param( d, names::N, N_, node ); + update_value_param( d, names::tau_m, tau_m_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::lambda_0, lambda_0_, node ); + update_value_param( d, names::Delta_V, Delta_V_, node ); + update_value_param( d, names::len_kernel, len_kernel_, node ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::V_T_star, V_T_star_, node ); + update_value_param( d, names::E_L, E_L_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::tau_syn_ex, tau_syn_ex_, node ); + update_value_param( d, names::tau_syn_in, tau_syn_in_, node ); update_value_param( d, "BinoRand", BinoRand_, node ); - d.update_value( names::tau_sfa.toString(), tau_sfa_ ); - d.update_value( names::q_sfa.toString(), q_sfa_ ); + d.update_value( names::tau_sfa, tau_sfa_ ); + d.update_value( names::q_sfa, q_sfa_ ); if ( tau_sfa_.size() != q_sfa_.size() ) { - throw BadProperty( String::compose( - "'tau_sfa' and 'q_sfa' need to have the same dimension.\nSize of " - "tau_sfa: %1\nSize of q_sfa: %2", - tau_sfa_.size(), - q_sfa_.size() ) ); + throw BadProperty( + String::compose( "'tau_sfa' and 'q_sfa' need to have the same dimension.\nSize of " + "tau_sfa: %1\nSize of q_sfa: %2", + tau_sfa_.size(), + q_sfa_.size() ) ); } if ( c_m_ <= 0 ) @@ -209,20 +209,20 @@ nest::gif_pop_psc_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::gif_pop_psc_exp::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::V_m.toString() ] = V_m_; // Filtered version of input - d[ names::n_events.toString() ] = n_spikes_; // Number of generated spikes - d[ names::E_sfa.toString() ] = theta_hat_; // Adaptive threshold potential - d[ names::mean.toString() ] = n_expect_; - d[ names::I_syn_ex.toString() ] = I_syn_ex_; - d[ names::I_syn_in.toString() ] = I_syn_in_; + d[ names::V_m ] = V_m_; // Filtered version of input + d[ names::n_events ] = n_spikes_; // Number of generated spikes + d[ names::E_sfa ] = theta_hat_; // Adaptive threshold potential + d[ names::mean ] = n_expect_; + d[ names::I_syn_ex ] = I_syn_ex_; + d[ names::I_syn_in ] = I_syn_in_; } void nest::gif_pop_psc_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), V_m_, node ); - update_value_param( d, names::I_syn_ex.toString(), I_syn_ex_, node ); - update_value_param( d, names::I_syn_in.toString(), I_syn_in_, node ); + update_value_param( d, names::V_m, V_m_, node ); + update_value_param( d, names::I_syn_ex, I_syn_ex_, node ); + update_value_param( d, names::I_syn_in, I_syn_in_, node ); initialized_ = false; // vectors of the state should be initialized with new parameter set. } diff --git a/models/gif_pop_psc_exp.h b/models/gif_pop_psc_exp.h index 70a9dc9e60..d0eff620fb 100644 --- a/models/gif_pop_psc_exp.h +++ b/models/gif_pop_psc_exp.h @@ -454,7 +454,7 @@ gif_pop_psc_exp::get_status( dictionary& d ) const // not from ArchivingNode, this call has been disabled here // (Node does not have a comparable method). // ArchivingNode::get_status(d); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/gif_psc_exp.cpp b/models/gif_psc_exp.cpp index 981f0793d6..08f19f50bf 100644 --- a/models/gif_psc_exp.cpp +++ b/models/gif_psc_exp.cpp @@ -35,12 +35,12 @@ // Includes from sli: #include "dict.h" -#include "integerdatum.h" -#include "doubledatum.h" #include "dictutils.h" +#include "doubledatum.h" +#include "integerdatum.h" -#include "numerics.h" #include "compose.hpp" +#include "numerics.h" #include "propagator_stability.h" namespace nest @@ -109,73 +109,73 @@ nest::gif_psc_exp::State_::State_() void nest::gif_psc_exp::Parameters_::get( dictionary& d ) const { - d[ names::I_e.toString() ] = I_e_; - d[ names::E_L.toString() ] = E_L_; - d[ names::g_L.toString() ] = g_L_; - d[ names::C_m.toString() ] = c_m_; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::Delta_V.toString() ] = Delta_V_; - d[ names::V_T_star.toString() ] = V_T_star_; - d[ names::lambda_0.toString() ] = lambda_0_ * 1000.0; // convert to 1/s - d[ names::t_ref.toString() ] = t_ref_; - d[ names::tau_syn_ex.toString() ] = tau_ex_; - d[ names::tau_syn_in.toString() ] = tau_in_; + d[ names::I_e ] = I_e_; + d[ names::E_L ] = E_L_; + d[ names::g_L ] = g_L_; + d[ names::C_m ] = c_m_; + d[ names::V_reset ] = V_reset_; + d[ names::Delta_V ] = Delta_V_; + d[ names::V_T_star ] = V_T_star_; + d[ names::lambda_0 ] = lambda_0_ * 1000.0; // convert to 1/s + d[ names::t_ref ] = t_ref_; + d[ names::tau_syn_ex ] = tau_ex_; + d[ names::tau_syn_in ] = tau_in_; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; + d[ names::tau_sfa ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - d[ names::q_sfa.toString() ] = q_sfa_list_ad; + d[ names::q_sfa ] = q_sfa_list_ad; ArrayDatum tau_stc_list_ad( tau_stc_ ); - d[ names::tau_stc.toString() ] = tau_stc_list_ad; + d[ names::tau_stc ] = tau_stc_list_ad; ArrayDatum q_stc_list_ad( q_stc_ ); - d[ names::q_stc.toString() ] = q_stc_list_ad; + d[ names::q_stc ] = q_stc_list_ad; } void nest::gif_psc_exp::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::E_L.toString(), E_L_, node ); - update_value_param( d, names::g_L.toString(), g_L_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); - update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::E_L, E_L_, node ); + update_value_param( d, names::g_L, g_L_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::Delta_V, Delta_V_, node ); + update_value_param( d, names::V_T_star, V_T_star_, node ); - if ( update_value_param( d, names::lambda_0.toString(), lambda_0_, node ) ) + if ( update_value_param( d, names::lambda_0, lambda_0_, node ) ) { lambda_0_ /= 1000.0; // convert to 1/ms } - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::tau_syn_ex, tau_ex_, node ); + update_value_param( d, names::tau_syn_in, tau_in_, node ); - d.update_value( names::tau_sfa.toString(), tau_sfa_ ); - d.update_value( names::q_sfa.toString(), q_sfa_ ); - d.update_value( names::tau_stc.toString(), tau_stc_ ); - d.update_value( names::q_stc.toString(), q_stc_ ); + d.update_value( names::tau_sfa, tau_sfa_ ); + d.update_value( names::q_sfa, q_sfa_ ); + d.update_value( names::tau_stc, tau_stc_ ); + d.update_value( names::q_stc, q_stc_ ); if ( tau_sfa_.size() != q_sfa_.size() ) { - throw BadProperty( String::compose( - "'tau_sfa' and 'q_sfa' need to have the same dimensions.\nSize of " - "tau_sfa: %1\nSize of q_sfa: %2", - tau_sfa_.size(), - q_sfa_.size() ) ); + throw BadProperty( + String::compose( "'tau_sfa' and 'q_sfa' need to have the same dimensions.\nSize of " + "tau_sfa: %1\nSize of q_sfa: %2", + tau_sfa_.size(), + q_sfa_.size() ) ); } if ( tau_stc_.size() != q_stc_.size() ) { - throw BadProperty( String::compose( - "'tau_stc' and 'q_stc' need to have the same dimensions.\nSize of " - "tau_stc: %1\nSize of q_stc: %2", - tau_stc_.size(), - q_stc_.size() ) ); + throw BadProperty( + String::compose( "'tau_stc' and 'q_stc' need to have the same dimensions.\nSize of " + "tau_stc: %1\nSize of q_stc: %2", + tau_stc_.size(), + q_stc_.size() ) ); } if ( g_L_ <= 0 ) { @@ -222,15 +222,15 @@ nest::gif_psc_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::gif_psc_exp::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::V_m.toString() ] = V_; // Membrane potential - d[ names::E_sfa.toString() ] = sfa_; // Adaptive threshold potential - d[ names::I_stc.toString() ] = stc_; // Spike-triggered current + d[ names::V_m ] = V_; // Membrane potential + d[ names::E_sfa ] = sfa_; // Adaptive threshold potential + d[ names::I_stc ] = stc_; // Spike-triggered current } void nest::gif_psc_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), V_, node ); + update_value_param( d, names::V_m, V_, node ); } nest::gif_psc_exp::Buffers_::Buffers_( gif_psc_exp& n ) diff --git a/models/gif_psc_exp.h b/models/gif_psc_exp.h index e880d21e08..a3c81f4d33 100644 --- a/models/gif_psc_exp.h +++ b/models/gif_psc_exp.h @@ -24,10 +24,10 @@ #define GIF_PSC_EXP_H // Includes from nestkernel: -#include "event.h" #include "archiving_node.h" -#include "ring_buffer.h" #include "connection.h" +#include "event.h" +#include "ring_buffer.h" #include "universal_data_logger.h" #include "nest.h" @@ -455,7 +455,7 @@ gif_psc_exp::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/gif_psc_exp_multisynapse.cpp b/models/gif_psc_exp_multisynapse.cpp index 07c011338e..458915fffc 100644 --- a/models/gif_psc_exp_multisynapse.cpp +++ b/models/gif_psc_exp_multisynapse.cpp @@ -36,9 +36,9 @@ // Includes from sli: #include "dict.h" -#include "integerdatum.h" -#include "doubledatum.h" #include "dictutils.h" +#include "doubledatum.h" +#include "integerdatum.h" #include "compose.hpp" #include "propagator_stability.h" @@ -106,74 +106,74 @@ nest::gif_psc_exp_multisynapse::State_::State_() void nest::gif_psc_exp_multisynapse::Parameters_::get( dictionary& d ) const { - d[ names::I_e.toString() ] = I_e_; - d[ names::E_L.toString() ] = E_L_; - d[ names::g_L.toString() ] = g_L_; - d[ names::C_m.toString() ] = c_m_; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::Delta_V.toString() ] = Delta_V_; - d[ names::V_T_star.toString() ] = V_T_star_; - d[ names::lambda_0.toString() ] = lambda_0_ * 1000.0; // convert to 1/s - d[ names::t_ref.toString() ] = t_ref_; - - d[ names::n_receptors.toString() ] = n_receptors_(); - d[ names::has_connections.toString() ] = has_connections_; + d[ names::I_e ] = I_e_; + d[ names::E_L ] = E_L_; + d[ names::g_L ] = g_L_; + d[ names::C_m ] = c_m_; + d[ names::V_reset ] = V_reset_; + d[ names::Delta_V ] = Delta_V_; + d[ names::V_T_star ] = V_T_star_; + d[ names::lambda_0 ] = lambda_0_ * 1000.0; // convert to 1/s + d[ names::t_ref ] = t_ref_; + + d[ names::n_receptors ] = n_receptors_(); + d[ names::has_connections ] = has_connections_; ArrayDatum tau_syn_ad( tau_syn_ ); - d[ names::tau_syn.toString() ] = tau_syn_ad; + d[ names::tau_syn ] = tau_syn_ad; ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; + d[ names::tau_sfa ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - d[ names::q_sfa.toString() ] = q_sfa_list_ad; + d[ names::q_sfa ] = q_sfa_list_ad; ArrayDatum tau_stc_list_ad( tau_stc_ ); - d[ names::tau_stc.toString() ] = tau_stc_list_ad; + d[ names::tau_stc ] = tau_stc_list_ad; ArrayDatum q_stc_list_ad( q_stc_ ); - d[ names::q_stc.toString() ] = q_stc_list_ad; + d[ names::q_stc ] = q_stc_list_ad; } void nest::gif_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::E_L.toString(), E_L_, node ); - update_value_param( d, names::g_L.toString(), g_L_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::Delta_V.toString(), Delta_V_, node ); - update_value_param( d, names::V_T_star.toString(), V_T_star_, node ); - - if ( update_value_param( d, names::lambda_0.toString(), lambda_0_, node ) ) + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::E_L, E_L_, node ); + update_value_param( d, names::g_L, g_L_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::Delta_V, Delta_V_, node ); + update_value_param( d, names::V_T_star, V_T_star_, node ); + + if ( update_value_param( d, names::lambda_0, lambda_0_, node ) ) { lambda_0_ /= 1000.0; // convert to 1/ms } - update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); - d.update_value( names::tau_sfa.toString(), tau_sfa_ ); - d.update_value( names::q_sfa.toString(), q_sfa_ ); - d.update_value( names::tau_stc.toString(), tau_stc_ ); - d.update_value( names::q_stc.toString(), q_stc_ ); + d.update_value( names::tau_sfa, tau_sfa_ ); + d.update_value( names::q_sfa, q_sfa_ ); + d.update_value( names::tau_stc, tau_stc_ ); + d.update_value( names::q_stc, q_stc_ ); if ( tau_sfa_.size() != q_sfa_.size() ) { - throw BadProperty( String::compose( - "'tau_sfa' and 'q_sfa' need to have the same dimensions.\nSize of " - "tau_sfa: %1\nSize of q_sfa: %2", - tau_sfa_.size(), - q_sfa_.size() ) ); + throw BadProperty( + String::compose( "'tau_sfa' and 'q_sfa' need to have the same dimensions.\nSize of " + "tau_sfa: %1\nSize of q_sfa: %2", + tau_sfa_.size(), + q_sfa_.size() ) ); } if ( tau_stc_.size() != q_stc_.size() ) { - throw BadProperty( String::compose( - "'tau_stc' and 'q_stc' need to have the same dimensions.\nSize of " - "tau_stc: %1\nSize of q_stc: %2", - tau_stc_.size(), - q_stc_.size() ) ); + throw BadProperty( + String::compose( "'tau_stc' and 'q_stc' need to have the same dimensions.\nSize of " + "tau_stc: %1\nSize of q_stc: %2", + tau_stc_.size(), + q_stc_.size() ) ); } if ( g_L_ <= 0 ) { @@ -213,7 +213,7 @@ nest::gif_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* nod } std::vector< double > tau_tmp; - if ( d.update_value( names::tau_syn.toString(), tau_tmp ) ) + if ( d.update_value( names::tau_syn, tau_tmp ) ) { if ( has_connections_ && tau_tmp.size() < tau_syn_.size() ) { @@ -237,15 +237,15 @@ nest::gif_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* nod void nest::gif_psc_exp_multisynapse::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::V_m.toString() ] = V_; // Membrane potential - d[ names::E_sfa.toString() ] = sfa_; // Adaptive threshold potential - d[ names::I_stc.toString() ] = stc_; // Spike-triggered current + d[ names::V_m ] = V_; // Membrane potential + d[ names::E_sfa ] = sfa_; // Adaptive threshold potential + d[ names::I_stc ] = stc_; // Spike-triggered current } void nest::gif_psc_exp_multisynapse::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), V_, node ); + update_value_param( d, names::V_m, V_, node ); } nest::gif_psc_exp_multisynapse::Buffers_::Buffers_( gif_psc_exp_multisynapse& n ) diff --git a/models/gif_psc_exp_multisynapse.h b/models/gif_psc_exp_multisynapse.h index 4b347696c8..5fa6858e6f 100644 --- a/models/gif_psc_exp_multisynapse.h +++ b/models/gif_psc_exp_multisynapse.h @@ -25,9 +25,9 @@ // Includes from nestkernel: #include "archiving_node.h" -#include "ring_buffer.h" #include "connection.h" #include "event.h" +#include "ring_buffer.h" #include "universal_data_logger.h" #include "nest.h" @@ -454,7 +454,7 @@ gif_psc_exp_multisynapse::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/ginzburg_neuron.cpp b/models/ginzburg_neuron.cpp index c38e507612..2be0e4d2d2 100644 --- a/models/ginzburg_neuron.cpp +++ b/models/ginzburg_neuron.cpp @@ -28,19 +28,19 @@ namespace nest void gainfunction_ginzburg::get( dictionary& d ) const { - d[ names::theta.toString() ] = theta_; - d[ names::c_1.toString() ] = c1_; - d[ names::c_2.toString() ] = c2_; - d[ names::c_3.toString() ] = c3_; + d[ names::theta ] = theta_; + d[ names::c_1 ] = c1_; + d[ names::c_2 ] = c2_; + d[ names::c_3 ] = c3_; } void gainfunction_ginzburg::set( const dictionary& d, Node* node ) { - update_value_param( d, names::theta.toString(), theta_, node ); - update_value_param( d, names::c_1.toString(), c1_, node ); - update_value_param( d, names::c_2.toString(), c2_, node ); - update_value_param( d, names::c_3.toString(), c3_, node ); + update_value_param( d, names::theta, theta_, node ); + update_value_param( d, names::c_1, c1_, node ); + update_value_param( d, names::c_2, c2_, node ); + update_value_param( d, names::c_3, c3_, node ); } /* diff --git a/models/glif_cond.cpp b/models/glif_cond.cpp index da05038b50..5807db51f8 100644 --- a/models/glif_cond.cpp +++ b/models/glif_cond.cpp @@ -25,8 +25,8 @@ #ifdef HAVE_GSL // C++ includes: -#include #include +#include // Includes from libnestutil: #include "numerics.h" @@ -34,8 +34,8 @@ // Includes from nestkernel: #include "exceptions.h" #include "kernel_manager.h" -#include "universal_data_logger_impl.h" #include "name.h" +#include "universal_data_logger_impl.h" // Includes from sli: #include "dict.h" @@ -150,15 +150,15 @@ nest::glif_cond::Parameters_::Parameters_() , th_spike_add_( 0.37 ) // in mV , th_spike_decay_( 0.009 ) // in 1/ms , voltage_reset_fraction_( 0.20 ) - , voltage_reset_add_( 18.51 ) // in mV - , th_voltage_index_( 0.005 ) // in 1/ms - , th_voltage_decay_( 0.09 ) // in 1/ms - , asc_init_( std::vector< double >( 2, 0.0 ) ) // in pA - , asc_decay_( std::vector< double >{ 0.003, 0.1 } ) // in 1/ms - , asc_amps_( std::vector< double >{ -9.18, -198.94 } ) // in pA - , asc_r_( std::vector< double >( 2, 1.0 ) ) // in ms - , tau_syn_( std::vector< double >{ 0.2, 2.0 } ) // in ms - , E_rev_( std::vector< double >{ 0.0, -85.0 } ) // in mV + , voltage_reset_add_( 18.51 ) // in mV + , th_voltage_index_( 0.005 ) // in 1/ms + , th_voltage_decay_( 0.09 ) // in 1/ms + , asc_init_( std::vector< double >( 2, 0.0 ) ) // in pA + , asc_decay_( std::vector< double > { 0.003, 0.1 } ) // in 1/ms + , asc_amps_( std::vector< double > { -9.18, -198.94 } ) // in pA + , asc_r_( std::vector< double >( 2, 1.0 ) ) // in ms + , tau_syn_( std::vector< double > { 0.2, 2.0 } ) // in ms + , E_rev_( std::vector< double > { 0.0, -85.0 } ) // in mV , has_connections_( false ) , has_theta_spike_( false ) , has_asc_( false ) @@ -190,33 +190,33 @@ nest::glif_cond::State_::State_( const Parameters_& p ) void nest::glif_cond::Parameters_::get( dictionary& d ) const { - d[ names::V_th.toString() ] = th_inf_ + E_L_; - d[ names::g_m.toString() ] = G_; - d[ names::E_L.toString() ] = E_L_; - d[ names::C_m.toString() ] = C_m_; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::V_reset.toString() ] = V_reset_ + E_L_; - - d[ names::th_spike_add.toString() ] = th_spike_add_; - d[ names::th_spike_decay.toString() ] = th_spike_decay_; - d[ names::voltage_reset_fraction.toString() ] = voltage_reset_fraction_; - d[ names::voltage_reset_add.toString() ] = voltage_reset_add_; - - d[ names::th_voltage_index.toString() ] = th_voltage_index_; - d[ names::th_voltage_decay.toString() ] = th_voltage_decay_; - - d[ names::asc_init.toString() ] = asc_init_; - d[ names::asc_decay.toString() ] = asc_decay_; - d[ names::asc_amps.toString() ] = asc_amps_; - d[ names::asc_r.toString() ] = asc_r_; + d[ names::V_th ] = th_inf_ + E_L_; + d[ names::g_m ] = G_; + d[ names::E_L ] = E_L_; + d[ names::C_m ] = C_m_; + d[ names::t_ref ] = t_ref_; + d[ names::V_reset ] = V_reset_ + E_L_; + + d[ names::th_spike_add ] = th_spike_add_; + d[ names::th_spike_decay ] = th_spike_decay_; + d[ names::voltage_reset_fraction ] = voltage_reset_fraction_; + d[ names::voltage_reset_add ] = voltage_reset_add_; + + d[ names::th_voltage_index ] = th_voltage_index_; + d[ names::th_voltage_decay ] = th_voltage_decay_; + + d[ names::asc_init ] = asc_init_; + d[ names::asc_decay ] = asc_decay_; + d[ names::asc_amps ] = asc_amps_; + d[ names::asc_r ] = asc_r_; ArrayDatum tau_syn_ad( tau_syn_ ); - d[ names::tau_syn.toString() ] = tau_syn_ad; + d[ names::tau_syn ] = tau_syn_ad; ArrayDatum E_rev_ad( E_rev_ ); - d[ names::E_rev.toString() ] = E_rev_ad; - d[ names::has_connections.toString() ] = has_connections_; - d[ names::spike_dependent_threshold.toString() ] = has_theta_spike_; - d[ names::after_spike_currents.toString() ] = has_asc_; - d[ names::adapting_threshold.toString() ] = has_theta_voltage_; + d[ names::E_rev ] = E_rev_ad; + d[ names::has_connections ] = has_connections_; + d[ names::spike_dependent_threshold ] = has_theta_spike_; + d[ names::after_spike_currents ] = has_asc_; + d[ names::adapting_threshold ] = has_theta_voltage_; } double @@ -225,10 +225,10 @@ nest::glif_cond::Parameters_::set( const dictionary& d ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - d.update_value( names::E_L.toString(), E_L_ ); + d.update_value( names::E_L, E_L_ ); const double delta_EL = E_L_ - ELold; - if ( d.update_value( names::V_reset.toString(), V_reset_ ) ) + if ( d.update_value( names::V_reset, V_reset_ ) ) { V_reset_ -= E_L_; } @@ -237,7 +237,7 @@ nest::glif_cond::Parameters_::set( const dictionary& d ) V_reset_ -= delta_EL; } - if ( d.update_value( names::V_th.toString(), th_inf_ ) ) + if ( d.update_value( names::V_th, th_inf_ ) ) { th_inf_ -= E_L_; } @@ -246,27 +246,27 @@ nest::glif_cond::Parameters_::set( const dictionary& d ) th_inf_ -= delta_EL; } - d.update_value( names::g_m.toString(), G_ ); - d.update_value( names::C_m.toString(), C_m_ ); - d.update_value( names::t_ref.toString(), t_ref_ ); + d.update_value( names::g_m, G_ ); + d.update_value( names::C_m, C_m_ ); + d.update_value( names::t_ref, t_ref_ ); - d.update_value( names::th_spike_add.toString(), th_spike_add_ ); - d.update_value( names::th_spike_decay.toString(), th_spike_decay_ ); - d.update_value( names::voltage_reset_fraction.toString(), voltage_reset_fraction_ ); - d.update_value( names::voltage_reset_add.toString(), voltage_reset_add_ ); + d.update_value( names::th_spike_add, th_spike_add_ ); + d.update_value( names::th_spike_decay, th_spike_decay_ ); + d.update_value( names::voltage_reset_fraction, voltage_reset_fraction_ ); + d.update_value( names::voltage_reset_add, voltage_reset_add_ ); - d.update_value( names::th_voltage_index.toString(), th_voltage_index_ ); - d.update_value( names::th_voltage_decay.toString(), th_voltage_decay_ ); + d.update_value( names::th_voltage_index, th_voltage_index_ ); + d.update_value( names::th_voltage_decay, th_voltage_decay_ ); - d.update_value( names::asc_init.toString(), asc_init_ ); - d.update_value( names::asc_decay.toString(), asc_decay_ ); - d.update_value( names::asc_amps.toString(), asc_amps_ ); - d.update_value( names::asc_r.toString(), asc_r_ ); + d.update_value( names::asc_init, asc_init_ ); + d.update_value( names::asc_decay, asc_decay_ ); + d.update_value( names::asc_amps, asc_amps_ ); + d.update_value( names::asc_r, asc_r_ ); // set model mechanisms - d.update_value( names::spike_dependent_threshold.toString(), has_theta_spike_ ); - d.update_value( names::after_spike_currents.toString(), has_asc_ ); - d.update_value( names::adapting_threshold.toString(), has_theta_voltage_ ); + d.update_value( names::spike_dependent_threshold, has_theta_spike_ ); + d.update_value( names::after_spike_currents, has_asc_ ); + d.update_value( names::adapting_threshold, has_theta_voltage_ ); // check model mechanisms parameter if ( not( ( not has_theta_spike_ and not has_asc_ and not has_theta_voltage_ ) or // glif1 @@ -353,8 +353,8 @@ nest::glif_cond::Parameters_::set( const dictionary& d ) } const size_t old_n_receptors = this->n_receptors_(); - bool tau_flag = d.update_value( names::tau_syn.toString(), tau_syn_ ); - bool Erev_flag = d.update_value( names::E_rev.toString(), E_rev_ ); + bool tau_flag = d.update_value( names::tau_syn, tau_syn_ ); + bool Erev_flag = d.update_value( names::E_rev, E_rev_ ); // receptor arrays have been modified if ( tau_flag || Erev_flag ) @@ -363,7 +363,8 @@ nest::glif_cond::Parameters_::set( const dictionary& d ) { throw BadProperty( "The reversal potential and synaptic time constant arrays, " - "i.e., E_rev (" + std::to_string( E_rev_.size() ) + ") and tau_syn (" + std::to_string( tau_syn_.size() ) + "i.e., E_rev (" + + std::to_string( E_rev_.size() ) + ") and tau_syn (" + std::to_string( tau_syn_.size() ) + "), must have the same size." ); } @@ -389,14 +390,14 @@ nest::glif_cond::Parameters_::set( const dictionary& d ) void nest::glif_cond::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = y_[ V_M ] + p.E_L_; - d[ names::ASCurrents.toString() ] = ASCurrents_; + d[ names::V_m ] = y_[ V_M ] + p.E_L_; + d[ names::ASCurrents ] = ASCurrents_; std::vector< double >* dg = new std::vector< double >(); std::vector< double >* g = new std::vector< double >(); - for ( size_t i = 0; i < ( ( y_.size() - State_::NUMBER_OF_FIXED_STATES_ELEMENTS ) - / State_::NUMBER_OF_STATES_ELEMENTS_PER_RECEPTOR ); + for ( size_t i = 0; i + < ( ( y_.size() - State_::NUMBER_OF_FIXED_STATES_ELEMENTS ) / State_::NUMBER_OF_STATES_ELEMENTS_PER_RECEPTOR ); ++i ) { dg->push_back( y_[ State_::DG_SYN - State_::NUMBER_OF_RECORDABLES_ELEMENTS @@ -405,14 +406,14 @@ nest::glif_cond::State_::get( dictionary& d, const Parameters_& p ) const + ( i * State_::NUMBER_OF_STATES_ELEMENTS_PER_RECEPTOR ) ] ); } - d[ names::dg.toString() ] = DoubleVectorDatum( dg ); - d[ names::g.toString() ] = DoubleVectorDatum( g ); + d[ names::dg ] = DoubleVectorDatum( dg ); + d[ names::g ] = DoubleVectorDatum( g ); } void nest::glif_cond::State_::set( const dictionary& d, const Parameters_& p, double delta_EL ) { - if ( d.update_value( names::V_m.toString(), y_[ V_M ] ) ) + if ( d.update_value( names::V_m, y_[ V_M ] ) ) { y_[ V_M ] -= p.E_L_; } @@ -421,7 +422,7 @@ nest::glif_cond::State_::set( const dictionary& d, const Parameters_& p, double y_[ V_M ] -= delta_EL; } - bool asc_flag = d.update_value( names::ASCurrents.toString(), ASCurrents_ ); + bool asc_flag = d.update_value( names::ASCurrents, ASCurrents_ ); if ( asc_flag and not p.has_asc_ ) { throw BadProperty( "After spike currents are not supported or settable in the current model mechanisms." ); @@ -437,12 +438,12 @@ nest::glif_cond::State_::set( const dictionary& d, const Parameters_& p, double } } - if ( d.update_value( names::threshold_spike.toString(), threshold_spike_ ) and not p.has_theta_spike_ ) + if ( d.update_value( names::threshold_spike, threshold_spike_ ) and not p.has_theta_spike_ ) { throw BadProperty( "Threshold spike component is not supported or settable in the current model mechanisms." ); } - if ( d.update_value( names::threshold_voltage.toString(), threshold_voltage_ ) and not p.has_theta_voltage_ ) + if ( d.update_value( names::threshold_voltage, threshold_voltage_ ) and not p.has_theta_voltage_ ) { throw BadProperty( "Threshold voltage component is not supported or settable in the current model mechanisms." ); } diff --git a/models/glif_cond.h b/models/glif_cond.h index 7d0e76a239..c4ade4f613 100644 --- a/models/glif_cond.h +++ b/models/glif_cond.h @@ -476,7 +476,7 @@ glif_cond::get_status( dictionary& d ) const // get information managed by parent class ArchivingNode::get_status( d ); - d[ nest::names::recordables.toString() ] = recordablesMap_.get_list(); + d[ nest::names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/glif_psc.cpp b/models/glif_psc.cpp index b69ff08cb9..7ed0114759 100644 --- a/models/glif_psc.cpp +++ b/models/glif_psc.cpp @@ -79,12 +79,12 @@ nest::glif_psc::Parameters_::Parameters_() , th_spike_add_( 0.37 ) // in mV , th_spike_decay_( 0.009 ) // in 1/ms , voltage_reset_fraction_( 0.20 ) - , voltage_reset_add_( 18.51 ) // in mV - , th_voltage_index_( 0.005 ) // in 1/ms - , th_voltage_decay_( 0.09 ) // in 1/ms - , asc_init_( std::vector< double >( 2, 0.0 ) ) // in pA - , asc_decay_( std::vector< double >{ 0.003, 0.1 } ) // in 1/ms - , asc_amps_( std::vector< double >{ -9.18, -198.94 } ) // in pA + , voltage_reset_add_( 18.51 ) // in mV + , th_voltage_index_( 0.005 ) // in 1/ms + , th_voltage_decay_( 0.09 ) // in 1/ms + , asc_init_( std::vector< double >( 2, 0.0 ) ) // in pA + , asc_decay_( std::vector< double > { 0.003, 0.1 } ) // in 1/ms + , asc_amps_( std::vector< double > { -9.18, -198.94 } ) // in pA , asc_r_( std::vector< double >( 2, 1.0 ) ) , tau_syn_( std::vector< double >( 1, 2.0 ) ) // in ms , has_connections_( false ) @@ -120,31 +120,31 @@ nest::glif_psc::State_::State_( const Parameters_& p ) void nest::glif_psc::Parameters_::get( dictionary& d ) const { - d[ names::V_th.toString() ] = th_inf_ + E_L_; - d[ names::g.toString() ] = G_; - d[ names::E_L.toString() ] = E_L_; - d[ names::C_m.toString() ] = C_m_; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::V_reset.toString() ] = V_reset_ + E_L_; - - d[ names::th_spike_add.toString() ] = th_spike_add_; - d[ names::th_spike_decay.toString() ] = th_spike_decay_; - d[ names::voltage_reset_fraction.toString() ] = voltage_reset_fraction_; - d[ names::voltage_reset_add.toString() ] = voltage_reset_add_; - - d[ names::th_voltage_index.toString() ] = th_voltage_index_; - d[ names::th_voltage_decay.toString() ] = th_voltage_decay_; - - d[ names::asc_init.toString() ] = asc_init_; - d[ names::asc_decay.toString() ] = asc_decay_; - d[ names::asc_amps.toString() ] = asc_amps_; - d[ names::asc_r.toString() ] = asc_r_; + d[ names::V_th ] = th_inf_ + E_L_; + d[ names::g ] = G_; + d[ names::E_L ] = E_L_; + d[ names::C_m ] = C_m_; + d[ names::t_ref ] = t_ref_; + d[ names::V_reset ] = V_reset_ + E_L_; + + d[ names::th_spike_add ] = th_spike_add_; + d[ names::th_spike_decay ] = th_spike_decay_; + d[ names::voltage_reset_fraction ] = voltage_reset_fraction_; + d[ names::voltage_reset_add ] = voltage_reset_add_; + + d[ names::th_voltage_index ] = th_voltage_index_; + d[ names::th_voltage_decay ] = th_voltage_decay_; + + d[ names::asc_init ] = asc_init_; + d[ names::asc_decay ] = asc_decay_; + d[ names::asc_amps ] = asc_amps_; + d[ names::asc_r ] = asc_r_; ArrayDatum tau_syn_ad( tau_syn_ ); - d[ names::tau_syn.toString() ] = tau_syn_ad; - d[ names::has_connections.toString() ] = has_connections_; - d[ names::spike_dependent_threshold.toString() ] = has_theta_spike_; - d[ names::after_spike_currents.toString() ] = has_asc_; - d[ names::adapting_threshold.toString() ] = has_theta_voltage_; + d[ names::tau_syn ] = tau_syn_ad; + d[ names::has_connections ] = has_connections_; + d[ names::spike_dependent_threshold ] = has_theta_spike_; + d[ names::after_spike_currents ] = has_asc_; + d[ names::adapting_threshold ] = has_theta_voltage_; } double @@ -153,10 +153,10 @@ nest::glif_psc::Parameters_::set( const dictionary& d ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - d.update_value( names::E_L.toString(), E_L_ ); + d.update_value( names::E_L, E_L_ ); const double delta_EL = E_L_ - ELold; - if ( d.update_value( names::V_reset.toString(), V_reset_ ) ) + if ( d.update_value( names::V_reset, V_reset_ ) ) { V_reset_ -= E_L_; } @@ -165,7 +165,7 @@ nest::glif_psc::Parameters_::set( const dictionary& d ) V_reset_ -= delta_EL; } - if ( d.update_value( names::V_th.toString(), th_inf_ ) ) + if ( d.update_value( names::V_th, th_inf_ ) ) { th_inf_ -= E_L_; } @@ -174,27 +174,27 @@ nest::glif_psc::Parameters_::set( const dictionary& d ) th_inf_ -= delta_EL; } - d.update_value( names::g.toString(), G_ ); - d.update_value( names::C_m.toString(), C_m_ ); - d.update_value( names::t_ref.toString(), t_ref_ ); + d.update_value( names::g, G_ ); + d.update_value( names::C_m, C_m_ ); + d.update_value( names::t_ref, t_ref_ ); - d.update_value( names::th_spike_add.toString(), th_spike_add_ ); - d.update_value( names::th_spike_decay.toString(), th_spike_decay_ ); - d.update_value( names::voltage_reset_fraction.toString(), voltage_reset_fraction_ ); - d.update_value( names::voltage_reset_add.toString(), voltage_reset_add_ ); + d.update_value( names::th_spike_add, th_spike_add_ ); + d.update_value( names::th_spike_decay, th_spike_decay_ ); + d.update_value( names::voltage_reset_fraction, voltage_reset_fraction_ ); + d.update_value( names::voltage_reset_add, voltage_reset_add_ ); - d.update_value( names::th_voltage_index.toString(), th_voltage_index_ ); - d.update_value( names::th_voltage_decay.toString(), th_voltage_decay_ ); + d.update_value( names::th_voltage_index, th_voltage_index_ ); + d.update_value( names::th_voltage_decay, th_voltage_decay_ ); - d.update_value( names::asc_init.toString(), asc_init_ ); - d.update_value( names::asc_decay.toString(), asc_decay_ ); - d.update_value( names::asc_amps.toString(), asc_amps_ ); - d.update_value( names::asc_r.toString(), asc_r_ ); + d.update_value( names::asc_init, asc_init_ ); + d.update_value( names::asc_decay, asc_decay_ ); + d.update_value( names::asc_amps, asc_amps_ ); + d.update_value( names::asc_r, asc_r_ ); // set model mechanisms - d.update_value( names::spike_dependent_threshold.toString(), has_theta_spike_ ); - d.update_value( names::after_spike_currents.toString(), has_asc_ ); - d.update_value( names::adapting_threshold.toString(), has_theta_voltage_ ); + d.update_value( names::spike_dependent_threshold, has_theta_spike_ ); + d.update_value( names::after_spike_currents, has_asc_ ); + d.update_value( names::adapting_threshold, has_theta_voltage_ ); // check model mechanisms parameter if ( not( ( not has_theta_spike_ and not has_asc_ and not has_theta_voltage_ ) or // glif1 @@ -281,7 +281,7 @@ nest::glif_psc::Parameters_::set( const dictionary& d ) } const size_t old_n_receptors = this->n_receptors_(); - if ( d.update_value( names::tau_syn.toString(), tau_syn_ ) ) + if ( d.update_value( names::tau_syn, tau_syn_ ) ) { if ( this->n_receptors_() != old_n_receptors && has_connections_ == true ) { @@ -304,16 +304,16 @@ nest::glif_psc::Parameters_::set( const dictionary& d ) void nest::glif_psc::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = U_ + p.E_L_; - d[ names::ASCurrents.toString() ] = ASCurrents_; - d[ names::threshold_spike.toString() ] = threshold_spike_; - d[ names::threshold_voltage.toString() ] = threshold_voltage_; + d[ names::V_m ] = U_ + p.E_L_; + d[ names::ASCurrents ] = ASCurrents_; + d[ names::threshold_spike ] = threshold_spike_; + d[ names::threshold_voltage ] = threshold_voltage_; } void nest::glif_psc::State_::set( const dictionary& d, const Parameters_& p, double delta_EL ) { - if ( d.update_value( names::V_m.toString(), U_ ) ) + if ( d.update_value( names::V_m, U_ ) ) { U_ -= p.E_L_; } @@ -322,7 +322,7 @@ nest::glif_psc::State_::set( const dictionary& d, const Parameters_& p, double d U_ -= delta_EL; } - bool asc_flag = d.update_value( names::ASCurrents.toString(), ASCurrents_ ); + bool asc_flag = d.update_value( names::ASCurrents, ASCurrents_ ); if ( asc_flag and not p.has_asc_ ) { throw BadProperty( "After spike currents are not supported or settable in the current model mechanisms." ); @@ -338,12 +338,12 @@ nest::glif_psc::State_::set( const dictionary& d, const Parameters_& p, double d } } - if ( d.update_value( names::threshold_spike.toString(), threshold_spike_ ) and not p.has_theta_spike_ ) + if ( d.update_value( names::threshold_spike, threshold_spike_ ) and not p.has_theta_spike_ ) { throw BadProperty( "Threshold spike component is not supported or settable in the current model mechanisms." ); } - if ( d.update_value( names::threshold_voltage.toString(), threshold_voltage_ ) and not p.has_theta_voltage_ ) + if ( d.update_value( names::threshold_voltage, threshold_voltage_ ) and not p.has_theta_voltage_ ) { throw BadProperty( "Threshold voltage component is not supported or settable in the current model mechanisms." ); } diff --git a/models/glif_psc.h b/models/glif_psc.h index 07bbfd53c3..7daaaa14b9 100644 --- a/models/glif_psc.h +++ b/models/glif_psc.h @@ -429,7 +429,7 @@ glif_psc::get_status( dictionary& d ) const // get information managed by parent class ArchivingNode::get_status( d ); - d[ nest::names::recordables.toString() ] = recordablesMap_.get_list(); + d[ nest::names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/hh_cond_beta_gap_traub.cpp b/models/hh_cond_beta_gap_traub.cpp index a11ba50855..4b1c5c1c20 100644 --- a/models/hh_cond_beta_gap_traub.cpp +++ b/models/hh_cond_beta_gap_traub.cpp @@ -212,7 +212,8 @@ nest::hh_cond_beta_gap_traub::State_::State_( const State_& s ) } } -nest::hh_cond_beta_gap_traub::State_& nest::hh_cond_beta_gap_traub::State_::operator=( const State_& s ) +nest::hh_cond_beta_gap_traub::State_& +nest::hh_cond_beta_gap_traub::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -229,43 +230,43 @@ nest::hh_cond_beta_gap_traub::State_& nest::hh_cond_beta_gap_traub::State_::oper void nest::hh_cond_beta_gap_traub::Parameters_::get( dictionary& d ) const { - d[ names::g_Na.toString() ] = g_Na; - d[ names::g_K.toString() ] = g_K; - d[ names::g_L.toString() ] = g_L; - d[ names::C_m.toString() ] = C_m; - d[ names::E_Na.toString() ] = E_Na; - d[ names::E_K.toString() ] = E_K; - d[ names::E_L.toString() ] = E_L; - d[ names::V_T.toString() ] = V_T; - d[ names::E_ex.toString() ] = E_ex; - d[ names::E_in.toString() ] = E_in; - d[ names::tau_rise_ex.toString() ] = tau_rise_ex; - d[ names::tau_decay_ex.toString() ] = tau_decay_ex; - d[ names::tau_rise_in.toString() ] = tau_rise_in; - d[ names::tau_decay_in.toString() ] = tau_decay_in; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::I_e.toString() ] = I_e; + d[ names::g_Na ] = g_Na; + d[ names::g_K ] = g_K; + d[ names::g_L ] = g_L; + d[ names::C_m ] = C_m; + d[ names::E_Na ] = E_Na; + d[ names::E_K ] = E_K; + d[ names::E_L ] = E_L; + d[ names::V_T ] = V_T; + d[ names::E_ex ] = E_ex; + d[ names::E_in ] = E_in; + d[ names::tau_rise_ex ] = tau_rise_ex; + d[ names::tau_decay_ex ] = tau_decay_ex; + d[ names::tau_rise_in ] = tau_rise_in; + d[ names::tau_decay_in ] = tau_decay_in; + d[ names::t_ref ] = t_ref_; + d[ names::I_e ] = I_e; } void nest::hh_cond_beta_gap_traub::Parameters_::set( const dictionary& d ) { - d.update_value( names::g_Na.toString(), g_Na ); - d.update_value( names::g_K.toString(), g_K ); - d.update_value( names::g_L.toString(), g_L ); - d.update_value( names::C_m.toString(), C_m ); - d.update_value( names::E_Na.toString(), E_Na ); - d.update_value( names::E_K.toString(), E_K ); - d.update_value( names::E_L.toString(), E_L ); - d.update_value( names::V_T.toString(), V_T ); - d.update_value( names::E_ex.toString(), E_ex ); - d.update_value( names::E_in.toString(), E_in ); - d.update_value( names::tau_rise_ex.toString(), tau_rise_ex ); - d.update_value( names::tau_decay_ex.toString(), tau_decay_ex ); - d.update_value( names::tau_rise_in.toString(), tau_rise_in ); - d.update_value( names::tau_decay_in.toString(), tau_decay_in ); - d.update_value( names::t_ref.toString(), t_ref_ ); - d.update_value( names::I_e.toString(), I_e ); + d.update_value( names::g_Na, g_Na ); + d.update_value( names::g_K, g_K ); + d.update_value( names::g_L, g_L ); + d.update_value( names::C_m, C_m ); + d.update_value( names::E_Na, E_Na ); + d.update_value( names::E_K, E_K ); + d.update_value( names::E_L, E_L ); + d.update_value( names::V_T, V_T ); + d.update_value( names::E_ex, E_ex ); + d.update_value( names::E_in, E_in ); + d.update_value( names::tau_rise_ex, tau_rise_ex ); + d.update_value( names::tau_decay_ex, tau_decay_ex ); + d.update_value( names::tau_rise_in, tau_rise_in ); + d.update_value( names::tau_decay_in, tau_decay_in ); + d.update_value( names::t_ref, t_ref_ ); + d.update_value( names::I_e, I_e ); if ( C_m <= 0 ) { @@ -291,19 +292,19 @@ nest::hh_cond_beta_gap_traub::Parameters_::set( const dictionary& d ) void nest::hh_cond_beta_gap_traub::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential - d[ names::Act_m.toString() ] = y_[ HH_M ]; - d[ names::Inact_h.toString() ] = y_[ HH_H ]; - d[ names::Act_n.toString() ] = y_[ HH_N ]; + d[ names::V_m ] = y_[ V_M ]; // Membrane potential + d[ names::Act_m ] = y_[ HH_M ]; + d[ names::Inact_h ] = y_[ HH_H ]; + d[ names::Act_n ] = y_[ HH_N ]; } void nest::hh_cond_beta_gap_traub::State_::set( const dictionary& d, const Parameters_& ) { - d.update_value( names::V_m.toString(), y_[ V_M ] ); - d.update_value( names::Act_m.toString(), y_[ HH_M ] ); - d.update_value( names::Inact_h.toString(), y_[ HH_H ] ); - d.update_value( names::Act_n.toString(), y_[ HH_N ] ); + d.update_value( names::V_m, y_[ V_M ] ); + d.update_value( names::Act_m, y_[ HH_M ] ); + d.update_value( names::Inact_h, y_[ HH_H ] ); + d.update_value( names::Act_n, y_[ HH_N ] ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_cond_beta_gap_traub.h b/models/hh_cond_beta_gap_traub.h index 624cc4d911..5ef3ae6000 100644 --- a/models/hh_cond_beta_gap_traub.h +++ b/models/hh_cond_beta_gap_traub.h @@ -30,8 +30,8 @@ // C includes: #include -#include #include +#include #include // Includes from nestkernel: @@ -472,9 +472,9 @@ hh_cond_beta_gap_traub::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); - d[ names::t_spike.toString() ] = get_spiketime_ms(); + d[ names::t_spike ] = get_spiketime_ms(); } inline void diff --git a/models/hh_cond_exp_traub.cpp b/models/hh_cond_exp_traub.cpp index eecbc33792..ba1541bb29 100644 --- a/models/hh_cond_exp_traub.cpp +++ b/models/hh_cond_exp_traub.cpp @@ -173,7 +173,8 @@ nest::hh_cond_exp_traub::State_::State_( const State_& s ) } } -nest::hh_cond_exp_traub::State_& nest::hh_cond_exp_traub::State_::operator=( const State_& s ) +nest::hh_cond_exp_traub::State_& +nest::hh_cond_exp_traub::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -190,39 +191,39 @@ nest::hh_cond_exp_traub::State_& nest::hh_cond_exp_traub::State_::operator=( con void nest::hh_cond_exp_traub::Parameters_::get( dictionary& d ) const { - d[ names::g_Na.toString() ] = g_Na; - d[ names::g_K.toString() ] = g_K; - d[ names::g_L.toString() ] = g_L; - d[ names::C_m.toString() ] = C_m; - d[ names::E_Na.toString() ] = E_Na; - d[ names::E_K.toString() ] = E_K; - d[ names::E_L.toString() ] = E_L; - d[ names::V_T.toString() ] = V_T; - d[ names::E_ex.toString() ] = E_ex; - d[ names::E_in.toString() ] = E_in; - d[ names::tau_syn_ex.toString() ] = tau_synE; - d[ names::tau_syn_in.toString() ] = tau_synI; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::I_e.toString() ] = I_e; + d[ names::g_Na ] = g_Na; + d[ names::g_K ] = g_K; + d[ names::g_L ] = g_L; + d[ names::C_m ] = C_m; + d[ names::E_Na ] = E_Na; + d[ names::E_K ] = E_K; + d[ names::E_L ] = E_L; + d[ names::V_T ] = V_T; + d[ names::E_ex ] = E_ex; + d[ names::E_in ] = E_in; + d[ names::tau_syn_ex ] = tau_synE; + d[ names::tau_syn_in ] = tau_synI; + d[ names::t_ref ] = t_ref_; + d[ names::I_e ] = I_e; } void nest::hh_cond_exp_traub::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::g_Na.toString(), g_Na, node ); - update_value_param( d, names::g_K.toString(), g_K, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::E_Na.toString(), E_Na, node ); - update_value_param( d, names::E_K.toString(), E_K, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::V_T.toString(), V_T, node ); - update_value_param( d, names::E_ex.toString(), E_ex, node ); - update_value_param( d, names::E_in.toString(), E_in, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::g_Na, g_Na, node ); + update_value_param( d, names::g_K, g_K, node ); + update_value_param( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::E_Na, E_Na, node ); + update_value_param( d, names::E_K, E_K, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::V_T, V_T, node ); + update_value_param( d, names::E_ex, E_ex, node ); + update_value_param( d, names::E_in, E_in, node ); + update_value_param( d, names::tau_syn_ex, tau_synE, node ); + update_value_param( d, names::tau_syn_in, tau_synI, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::I_e, I_e, node ); if ( C_m <= 0 ) { @@ -243,19 +244,19 @@ nest::hh_cond_exp_traub::Parameters_::set( const dictionary& d, Node* node ) void nest::hh_cond_exp_traub::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential - d[ names::Act_m.toString() ] = y_[ HH_M ]; - d[ names::Inact_h.toString() ] = y_[ HH_H ]; - d[ names::Act_n.toString() ] = y_[ HH_N ]; + d[ names::V_m ] = y_[ V_M ]; // Membrane potential + d[ names::Act_m ] = y_[ HH_M ]; + d[ names::Inact_h ] = y_[ HH_H ]; + d[ names::Act_n ] = y_[ HH_N ]; } void nest::hh_cond_exp_traub::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::Act_m.toString(), y_[ HH_M ], node ); - update_value_param( d, names::Inact_h.toString(), y_[ HH_H ], node ); - update_value_param( d, names::Act_n.toString(), y_[ HH_N ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::Act_m, y_[ HH_M ], node ); + update_value_param( d, names::Inact_h, y_[ HH_H ], node ); + update_value_param( d, names::Act_n, y_[ HH_N ], node ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_cond_exp_traub.h b/models/hh_cond_exp_traub.h index d0e759cef7..f9c66a6f08 100644 --- a/models/hh_cond_exp_traub.h +++ b/models/hh_cond_exp_traub.h @@ -276,7 +276,7 @@ class hh_cond_exp_traub : public ArchivingNode */ struct Buffers_ { - Buffers_( hh_cond_exp_traub& ); //! logger_; @@ -377,7 +377,7 @@ hh_psc_alpha::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/hh_psc_alpha_clopath.cpp b/models/hh_psc_alpha_clopath.cpp index 683582a869..e489ef0342 100644 --- a/models/hh_psc_alpha_clopath.cpp +++ b/models/hh_psc_alpha_clopath.cpp @@ -186,7 +186,8 @@ nest::hh_psc_alpha_clopath::State_::State_( const State_& s ) } } -nest::hh_psc_alpha_clopath::State_& nest::hh_psc_alpha_clopath::State_::operator=( const State_& s ) +nest::hh_psc_alpha_clopath::State_& +nest::hh_psc_alpha_clopath::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -203,41 +204,41 @@ nest::hh_psc_alpha_clopath::State_& nest::hh_psc_alpha_clopath::State_::operator void nest::hh_psc_alpha_clopath::Parameters_::get( dictionary& d ) const { - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_Na.toString() ] = g_Na; - d[ names::g_K.toString() ] = g_K; - d[ names::g_L.toString() ] = g_L; - d[ names::E_Na.toString() ] = E_Na; - d[ names::E_K.toString() ] = E_K; - d[ names::E_L.toString() ] = E_L; - d[ names::C_m.toString() ] = C_m; - d[ names::tau_syn_ex.toString() ] = tau_synE; - d[ names::tau_syn_in.toString() ] = tau_synI; - d[ names::I_e.toString() ] = I_e; - d[ names::tau_plus.toString() ] = tau_plus; - d[ names::tau_minus.toString() ] = tau_minus; - d[ names::tau_bar_bar.toString() ] = tau_bar_bar; + d[ names::t_ref ] = t_ref_; + d[ names::g_Na ] = g_Na; + d[ names::g_K ] = g_K; + d[ names::g_L ] = g_L; + d[ names::E_Na ] = E_Na; + d[ names::E_K ] = E_K; + d[ names::E_L ] = E_L; + d[ names::C_m ] = C_m; + d[ names::tau_syn_ex ] = tau_synE; + d[ names::tau_syn_in ] = tau_synI; + d[ names::I_e ] = I_e; + d[ names::tau_plus ] = tau_plus; + d[ names::tau_minus ] = tau_minus; + d[ names::tau_bar_bar ] = tau_bar_bar; } void nest::hh_psc_alpha_clopath::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_Na.toString(), g_Na, node ); - update_value_param( d, names::E_Na.toString(), E_Na, node ); - update_value_param( d, names::g_K.toString(), g_K, node ); - update_value_param( d, names::E_K.toString(), E_K, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - - update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); - - update_value_param( d, names::I_e.toString(), I_e, node ); - update_value_param( d, names::tau_plus.toString(), tau_plus, node ); - update_value_param( d, names::tau_minus.toString(), tau_minus, node ); - update_value_param( d, names::tau_bar_bar.toString(), tau_bar_bar, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_Na, g_Na, node ); + update_value_param( d, names::E_Na, E_Na, node ); + update_value_param( d, names::g_K, g_K, node ); + update_value_param( d, names::E_K, E_K, node ); + update_value_param( d, names::g_L, g_L, node ); + update_value_param( d, names::E_L, E_L, node ); + + update_value_param( d, names::tau_syn_ex, tau_synE, node ); + update_value_param( d, names::tau_syn_in, tau_synI, node ); + + update_value_param( d, names::I_e, I_e, node ); + update_value_param( d, names::tau_plus, tau_plus, node ); + update_value_param( d, names::tau_minus, tau_minus, node ); + update_value_param( d, names::tau_bar_bar, tau_bar_bar, node ); if ( C_m <= 0 ) { throw BadProperty( "Capacitance must be strictly positive." ); @@ -259,25 +260,25 @@ nest::hh_psc_alpha_clopath::Parameters_::set( const dictionary& d, Node* node ) void nest::hh_psc_alpha_clopath::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; - d[ names::Act_m.toString() ] = y_[ HH_M ]; - d[ names::Inact_h.toString() ] = y_[ HH_H ]; - d[ names::Act_n.toString() ] = y_[ HH_N ]; - d[ names::u_bar_plus.toString() ] = y_[ U_BAR_PLUS ]; - d[ names::u_bar_minus.toString() ] = y_[ U_BAR_MINUS ]; - d[ names::u_bar_bar.toString() ] = y_[ U_BAR_BAR ]; + d[ names::V_m ] = y_[ V_M ]; + d[ names::Act_m ] = y_[ HH_M ]; + d[ names::Inact_h ] = y_[ HH_H ]; + d[ names::Act_n ] = y_[ HH_N ]; + d[ names::u_bar_plus ] = y_[ U_BAR_PLUS ]; + d[ names::u_bar_minus ] = y_[ U_BAR_MINUS ]; + d[ names::u_bar_bar ] = y_[ U_BAR_BAR ]; } void nest::hh_psc_alpha_clopath::State_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::Act_m.toString(), y_[ HH_M ], node ); - update_value_param( d, names::Inact_h.toString(), y_[ HH_H ], node ); - update_value_param( d, names::Act_n.toString(), y_[ HH_N ], node ); - update_value_param( d, names::u_bar_plus.toString(), y_[ U_BAR_PLUS ], node ); - update_value_param( d, names::u_bar_minus.toString(), y_[ U_BAR_MINUS ], node ); - update_value_param( d, names::u_bar_bar.toString(), y_[ U_BAR_BAR ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::Act_m, y_[ HH_M ], node ); + update_value_param( d, names::Inact_h, y_[ HH_H ], node ); + update_value_param( d, names::Act_n, y_[ HH_N ], node ); + update_value_param( d, names::u_bar_plus, y_[ U_BAR_PLUS ], node ); + update_value_param( d, names::u_bar_minus, y_[ U_BAR_MINUS ], node ); + update_value_param( d, names::u_bar_bar, y_[ U_BAR_BAR ], node ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_psc_alpha_clopath.h b/models/hh_psc_alpha_clopath.h index c91df3a4dd..6de7de5d1a 100644 --- a/models/hh_psc_alpha_clopath.h +++ b/models/hh_psc_alpha_clopath.h @@ -303,8 +303,8 @@ class hh_psc_alpha_clopath : public ClopathArchivingNode */ struct Buffers_ { - Buffers_( hh_psc_alpha_clopath& ); //! logger_; @@ -421,7 +421,7 @@ hh_psc_alpha_clopath::get_status( dictionary& d ) const S_.get( d ); ClopathArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/hh_psc_alpha_gap.cpp b/models/hh_psc_alpha_gap.cpp index f016d0976b..88300e52d7 100644 --- a/models/hh_psc_alpha_gap.cpp +++ b/models/hh_psc_alpha_gap.cpp @@ -210,7 +210,8 @@ nest::hh_psc_alpha_gap::State_::State_( const State_& s ) } } -nest::hh_psc_alpha_gap::State_& nest::hh_psc_alpha_gap::State_::operator=( const State_& s ) +nest::hh_psc_alpha_gap::State_& +nest::hh_psc_alpha_gap::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -227,37 +228,37 @@ nest::hh_psc_alpha_gap::State_& nest::hh_psc_alpha_gap::State_::operator=( const void nest::hh_psc_alpha_gap::Parameters_::get( dictionary& d ) const { - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_Na.toString() ] = g_Na; - d[ names::g_Kv1.toString() ] = g_Kv1; - d[ names::g_Kv3.toString() ] = g_Kv3; - d[ names::g_L.toString() ] = g_L; - d[ names::E_Na.toString() ] = E_Na; - d[ names::E_K.toString() ] = E_K; - d[ names::E_L.toString() ] = E_L; - d[ names::C_m.toString() ] = C_m; - d[ names::tau_syn_ex.toString() ] = tau_synE; - d[ names::tau_syn_in.toString() ] = tau_synI; - d[ names::I_e.toString() ] = I_e; + d[ names::t_ref ] = t_ref_; + d[ names::g_Na ] = g_Na; + d[ names::g_Kv1 ] = g_Kv1; + d[ names::g_Kv3 ] = g_Kv3; + d[ names::g_L ] = g_L; + d[ names::E_Na ] = E_Na; + d[ names::E_K ] = E_K; + d[ names::E_L ] = E_L; + d[ names::C_m ] = C_m; + d[ names::tau_syn_ex ] = tau_synE; + d[ names::tau_syn_in ] = tau_synI; + d[ names::I_e ] = I_e; } void nest::hh_psc_alpha_gap::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_Na.toString(), g_Na, node ); - update_value_param( d, names::E_Na.toString(), E_Na, node ); - update_value_param( d, names::g_Kv1.toString(), g_Kv1, node ); - update_value_param( d, names::g_Kv3.toString(), g_Kv3, node ); - update_value_param( d, names::E_K.toString(), E_K, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - - update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); - - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_Na, g_Na, node ); + update_value_param( d, names::E_Na, E_Na, node ); + update_value_param( d, names::g_Kv1, g_Kv1, node ); + update_value_param( d, names::g_Kv3, g_Kv3, node ); + update_value_param( d, names::E_K, E_K, node ); + update_value_param( d, names::g_L, g_L, node ); + update_value_param( d, names::E_L, E_L, node ); + + update_value_param( d, names::tau_syn_ex, tau_synE, node ); + update_value_param( d, names::tau_syn_in, tau_synI, node ); + + update_value_param( d, names::I_e, I_e, node ); if ( C_m <= 0 ) { throw BadProperty( "Capacitance must be strictly positive." ); @@ -279,21 +280,21 @@ nest::hh_psc_alpha_gap::Parameters_::set( const dictionary& d, Node* node ) void nest::hh_psc_alpha_gap::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; - d[ names::Act_m.toString() ] = y_[ HH_M ]; - d[ names::Inact_h.toString() ] = y_[ HH_H ]; - d[ names::Act_n.toString() ] = y_[ HH_N ]; - d[ names::Inact_p.toString() ] = y_[ HH_P ]; + d[ names::V_m ] = y_[ V_M ]; + d[ names::Act_m ] = y_[ HH_M ]; + d[ names::Inact_h ] = y_[ HH_H ]; + d[ names::Act_n ] = y_[ HH_N ]; + d[ names::Inact_p ] = y_[ HH_P ]; } void nest::hh_psc_alpha_gap::State_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::Act_m.toString(), y_[ HH_M ], node ); - update_value_param( d, names::Inact_h.toString(), y_[ HH_H ], node ); - update_value_param( d, names::Act_n.toString(), y_[ HH_N ], node ); - update_value_param( d, names::Inact_p.toString(), y_[ HH_P ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::Act_m, y_[ HH_M ], node ); + update_value_param( d, names::Inact_h, y_[ HH_H ], node ); + update_value_param( d, names::Act_n, y_[ HH_N ], node ); + update_value_param( d, names::Inact_p, y_[ HH_P ], node ); if ( y_[ HH_M ] < 0 || y_[ HH_H ] < 0 || y_[ HH_N ] < 0 || y_[ HH_P ] < 0 ) { throw BadProperty( "All (in)activation variables must be non-negative." ); diff --git a/models/hh_psc_alpha_gap.h b/models/hh_psc_alpha_gap.h index 2b9ea464b1..db4c38af8a 100644 --- a/models/hh_psc_alpha_gap.h +++ b/models/hh_psc_alpha_gap.h @@ -39,8 +39,8 @@ #include "event.h" #include "nest_types.h" #include "node.h" -#include "ring_buffer.h" #include "recordables_map.h" +#include "ring_buffer.h" #include "universal_data_logger.h" namespace nest @@ -285,7 +285,7 @@ class hh_psc_alpha_gap : public ArchivingNode */ struct Buffers_ { - Buffers_( hh_psc_alpha_gap& ); //! // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -226,11 +226,11 @@ void ht_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::tau_P.toString() ] = tau_P_; - d[ names::delta_P.toString() ] = delta_P_; - d[ names::P.toString() ] = p_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::tau_P ] = tau_P_; + d[ names::delta_P ] = delta_P_; + d[ names::P ] = p_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -239,10 +239,10 @@ ht_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::tau_P.toString(), tau_P_ ); - d.update_value( names::delta_P.toString(), delta_P_ ); - d.update_value( names::P.toString(), p_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::tau_P, tau_P_ ); + d.update_value( names::delta_P, delta_P_ ); + d.update_value( names::P, p_ ); if ( tau_P_ <= 0.0 ) { diff --git a/models/iaf_chs_2007.cpp b/models/iaf_chs_2007.cpp index cbee1fb6e7..e87164c92a 100644 --- a/models/iaf_chs_2007.cpp +++ b/models/iaf_chs_2007.cpp @@ -93,24 +93,24 @@ nest::iaf_chs_2007::State_::State_() void nest::iaf_chs_2007::Parameters_::get( dictionary& d ) const { - d[ names::V_reset.toString() ] = U_reset_; - d[ names::V_epsp.toString() ] = U_epsp_; - d[ names::tau_epsp.toString() ] = tau_epsp_; - d[ names::tau_reset.toString() ] = tau_reset_; - d[ names::V_noise.toString() ] = U_noise_; - d[ names::noise.toString() ] = DoubleVectorDatum( new std::vector< double >( noise_ ) ); + d[ names::V_reset ] = U_reset_; + d[ names::V_epsp ] = U_epsp_; + d[ names::tau_epsp ] = tau_epsp_; + d[ names::tau_reset ] = tau_reset_; + d[ names::V_noise ] = U_noise_; + d[ names::noise ] = DoubleVectorDatum( new std::vector< double >( noise_ ) ); } void nest::iaf_chs_2007::Parameters_::set( const dictionary& d, State_& s, Node* node ) { - update_value_param( d, names::V_reset.toString(), U_reset_, node ); - update_value_param( d, names::V_epsp.toString(), U_epsp_, node ); - update_value_param( d, names::tau_epsp.toString(), tau_epsp_, node ); - update_value_param( d, names::tau_reset.toString(), tau_reset_, node ); - update_value_param( d, names::V_noise.toString(), U_noise_, node ); + update_value_param( d, names::V_reset, U_reset_, node ); + update_value_param( d, names::V_epsp, U_epsp_, node ); + update_value_param( d, names::tau_epsp, tau_epsp_, node ); + update_value_param( d, names::tau_reset, tau_reset_, node ); + update_value_param( d, names::V_noise, U_noise_, node ); - const bool updated_noise = d.update_value( names::noise.toString(), noise_ ); + const bool updated_noise = d.update_value( names::noise, noise_ ); if ( updated_noise ) { s.position_ = 0; @@ -140,13 +140,13 @@ nest::iaf_chs_2007::Parameters_::set( const dictionary& d, State_& s, Node* node void nest::iaf_chs_2007::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = V_m_; // Membrane potential + d[ names::V_m ] = V_m_; // Membrane potential } void nest::iaf_chs_2007::State_::set( dictionary const& d, Node* node ) { - update_value_param( d, names::V_m.toString(), V_m_, node ); + update_value_param( d, names::V_m, V_m_, node ); } nest::iaf_chs_2007::Buffers_::Buffers_( iaf_chs_2007& n ) diff --git a/models/iaf_chs_2007.h b/models/iaf_chs_2007.h index 6e23125bda..b399d2bde7 100644 --- a/models/iaf_chs_2007.h +++ b/models/iaf_chs_2007.h @@ -317,7 +317,7 @@ iaf_chs_2007::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_chxk_2008.cpp b/models/iaf_chxk_2008.cpp index a89caf9f63..cb71e97d7e 100644 --- a/models/iaf_chxk_2008.cpp +++ b/models/iaf_chxk_2008.cpp @@ -158,7 +158,8 @@ nest::iaf_chxk_2008::State_::State_( const State_& s ) } } -nest::iaf_chxk_2008::State_& nest::iaf_chxk_2008::State_::operator=( const State_& s ) +nest::iaf_chxk_2008::State_& +nest::iaf_chxk_2008::State_::operator=( const State_& s ) { r = s.r; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -195,38 +196,38 @@ nest::iaf_chxk_2008::Buffers_::Buffers_( const Buffers_&, iaf_chxk_2008& n ) void nest::iaf_chxk_2008::Parameters_::get( dictionary& d ) const { - d[ names::V_th.toString() ] = V_th; - d[ names::g_L.toString() ] = g_L; - d[ names::C_m.toString() ] = C_m; - d[ names::E_ex.toString() ] = E_ex; - d[ names::E_in.toString() ] = E_in; - d[ names::E_L.toString() ] = E_L; - d[ names::tau_syn_ex.toString() ] = tau_synE; - d[ names::tau_syn_in.toString() ] = tau_synI; - d[ names::I_e.toString() ] = I_e; - d[ names::tau_ahp.toString() ] = tau_ahp; - d[ names::E_ahp.toString() ] = E_ahp; - d[ names::g_ahp.toString() ] = g_ahp; - d[ names::ahp_bug.toString() ] = ahp_bug; + d[ names::V_th ] = V_th; + d[ names::g_L ] = g_L; + d[ names::C_m ] = C_m; + d[ names::E_ex ] = E_ex; + d[ names::E_in ] = E_in; + d[ names::E_L ] = E_L; + d[ names::tau_syn_ex ] = tau_synE; + d[ names::tau_syn_in ] = tau_synI; + d[ names::I_e ] = I_e; + d[ names::tau_ahp ] = tau_ahp; + d[ names::E_ahp ] = E_ahp; + d[ names::g_ahp ] = g_ahp; + d[ names::ahp_bug ] = ahp_bug; } void nest::iaf_chxk_2008::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::E_ex.toString(), E_ex, node ); - update_value_param( d, names::E_in.toString(), E_in, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); - update_value_param( d, names::tau_ahp.toString(), tau_ahp, node ); - update_value_param( d, names::E_ahp.toString(), E_ahp, node ); - update_value_param( d, names::g_ahp.toString(), g_ahp, node ); - update_value_param( d, names::ahp_bug.toString(), ahp_bug, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::g_L, g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::E_ex, E_ex, node ); + update_value_param( d, names::E_in, E_in, node ); + update_value_param( d, names::E_L, E_L, node ); + update_value_param( d, names::tau_syn_ex, tau_synE, node ); + update_value_param( d, names::tau_syn_in, tau_synI, node ); + update_value_param( d, names::I_e, I_e, node ); + update_value_param( d, names::tau_ahp, tau_ahp, node ); + update_value_param( d, names::E_ahp, E_ahp, node ); + update_value_param( d, names::g_ahp, g_ahp, node ); + update_value_param( d, names::ahp_bug, ahp_bug, node ); if ( C_m <= 0 ) { throw BadProperty( "Capacitance must be strictly positive." ); @@ -240,13 +241,13 @@ nest::iaf_chxk_2008::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_chxk_2008::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y[ V_M ]; // Membrane potential + d[ names::V_m ] = y[ V_M ]; // Membrane potential } void nest::iaf_chxk_2008::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y[ V_M ], node ); + update_value_param( d, names::V_m, y[ V_M ], node ); } /* ---------------------------------------------------------------- diff --git a/models/iaf_chxk_2008.h b/models/iaf_chxk_2008.h index 1c7599d3ef..366fd05fb7 100644 --- a/models/iaf_chxk_2008.h +++ b/models/iaf_chxk_2008.h @@ -278,8 +278,8 @@ class iaf_chxk_2008 : public ArchivingNode */ struct Buffers_ { - Buffers_( iaf_chxk_2008& ); //! logger_; @@ -433,7 +433,7 @@ iaf_chxk_2008::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_cond_alpha.cpp b/models/iaf_cond_alpha.cpp index e776417681..1ed74a577d 100644 --- a/models/iaf_cond_alpha.cpp +++ b/models/iaf_cond_alpha.cpp @@ -146,7 +146,8 @@ nest::iaf_cond_alpha::State_::State_( const State_& s ) } } -nest::iaf_cond_alpha::State_& nest::iaf_cond_alpha::State_::operator=( const State_& s ) +nest::iaf_cond_alpha::State_& +nest::iaf_cond_alpha::State_::operator=( const State_& s ) { r = s.r; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -183,38 +184,38 @@ nest::iaf_cond_alpha::Buffers_::Buffers_( const Buffers_&, iaf_cond_alpha& n ) void nest::iaf_cond_alpha::Parameters_::get( dictionary& d ) const { - d[ names::V_th.toString() ] = V_th; - d[ names::V_reset.toString() ] = V_reset; - d[ names::t_ref.toString() ] = t_ref; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::E_ex.toString() ] = E_ex; - d[ names::E_in.toString() ] = E_in; - d[ names::C_m.toString() ] = C_m; - d[ names::tau_syn_ex.toString() ] = tau_synE; - d[ names::tau_syn_in.toString() ] = tau_synI; - d[ names::I_e.toString() ] = I_e; + d[ names::V_th ] = V_th; + d[ names::V_reset ] = V_reset; + d[ names::t_ref ] = t_ref; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::E_ex ] = E_ex; + d[ names::E_in ] = E_in; + d[ names::C_m ] = C_m; + d[ names::tau_syn_ex ] = tau_synE; + d[ names::tau_syn_in ] = tau_synI; + d[ names::I_e ] = I_e; } void nest::iaf_cond_alpha::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_reset.toString(), V_reset, node ); - update_value_param( d, names::t_ref.toString(), t_ref, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_reset, V_reset, node ); + update_value_param( d, names::t_ref, t_ref, node ); + update_value_param( d, names::E_L, E_L, node ); - update_value_param( d, names::E_ex.toString(), E_ex, node ); - update_value_param( d, names::E_in.toString(), E_in, node ); + update_value_param( d, names::E_ex, E_ex, node ); + update_value_param( d, names::E_in, E_in, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); + update_value_param( d, names::tau_syn_ex, tau_synE, node ); + update_value_param( d, names::tau_syn_in, tau_synI, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); if ( V_reset >= V_th ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -236,21 +237,21 @@ nest::iaf_cond_alpha::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_cond_alpha::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y[ V_M ]; // Membrane potential - d[ names::g_ex.toString() ] = y[ G_EXC ]; - d[ names::dg_ex.toString() ] = y[ DG_EXC ]; - d[ names::g_in.toString() ] = y[ G_INH ]; - d[ names::dg_in.toString() ] = y[ DG_INH ]; + d[ names::V_m ] = y[ V_M ]; // Membrane potential + d[ names::g_ex ] = y[ G_EXC ]; + d[ names::dg_ex ] = y[ DG_EXC ]; + d[ names::g_in ] = y[ G_INH ]; + d[ names::dg_in ] = y[ DG_INH ]; } void nest::iaf_cond_alpha::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y[ V_M ], node ); - update_value_param( d, names::g_ex.toString(), y[ G_EXC ], node ); - update_value_param( d, names::dg_ex.toString(), y[ DG_EXC ], node ); - update_value_param( d, names::g_in.toString(), y[ G_INH ], node ); - update_value_param( d, names::dg_in.toString(), y[ DG_INH ], node ); + update_value_param( d, names::V_m, y[ V_M ], node ); + update_value_param( d, names::g_ex, y[ G_EXC ], node ); + update_value_param( d, names::dg_ex, y[ DG_EXC ], node ); + update_value_param( d, names::g_in, y[ G_INH ], node ); + update_value_param( d, names::dg_in, y[ DG_INH ], node ); } diff --git a/models/iaf_cond_alpha.h b/models/iaf_cond_alpha.h index 5cc8097a26..d504632678 100644 --- a/models/iaf_cond_alpha.h +++ b/models/iaf_cond_alpha.h @@ -267,8 +267,8 @@ class iaf_cond_alpha : public ArchivingNode */ struct Buffers_ { - Buffers_( iaf_cond_alpha& ); //! logger_; @@ -401,7 +401,7 @@ iaf_cond_alpha::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_cond_alpha_mc.cpp b/models/iaf_cond_alpha_mc.cpp index 85f1c1f20b..fca17b145c 100644 --- a/models/iaf_cond_alpha_mc.cpp +++ b/models/iaf_cond_alpha_mc.cpp @@ -223,7 +223,8 @@ nest::iaf_cond_alpha_mc::Parameters_::Parameters_( const Parameters_& p ) } } -nest::iaf_cond_alpha_mc::Parameters_& nest::iaf_cond_alpha_mc::Parameters_::operator=( const Parameters_& p ) +nest::iaf_cond_alpha_mc::Parameters_& +nest::iaf_cond_alpha_mc::Parameters_::operator=( const Parameters_& p ) { assert( this != &p ); // would be bad logical error in program @@ -277,7 +278,8 @@ nest::iaf_cond_alpha_mc::State_::State_( const State_& s ) } } -nest::iaf_cond_alpha_mc::State_& nest::iaf_cond_alpha_mc::State_::operator=( const State_& s ) +nest::iaf_cond_alpha_mc::State_& +nest::iaf_cond_alpha_mc::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -314,26 +316,26 @@ nest::iaf_cond_alpha_mc::Buffers_::Buffers_( const Buffers_&, iaf_cond_alpha_mc& void nest::iaf_cond_alpha_mc::Parameters_::get( dictionary& d ) const { - d[ names::V_th.toString() ] = V_th; - d[ names::V_reset.toString() ] = V_reset; - d[ names::t_ref.toString() ] = t_ref; + d[ names::V_th ] = V_th; + d[ names::V_reset ] = V_reset; + d[ names::t_ref ] = t_ref; - d[ names::g_sp.toString() ] = g_conn[ SOMA ]; - d[ names::g_pd.toString() ] = g_conn[ PROX ]; + d[ names::g_sp ] = g_conn[ SOMA ]; + d[ names::g_pd ] = g_conn[ PROX ]; // create subdictionaries for per-compartment parameters for ( size_t n = 0; n < NCOMP; ++n ) { dictionary dd; - dd[ names::g_L.toString() ] = g_L[ n ]; - dd[ names::E_L.toString() ] = E_L[ n ]; - dd[ names::E_ex.toString() ] = E_ex[ n ]; - dd[ names::E_in.toString() ] = E_in[ n ]; - dd[ names::C_m.toString() ] = C_m[ n ]; - dd[ names::tau_syn_ex.toString() ] = tau_synE[ n ]; - dd[ names::tau_syn_in.toString() ] = tau_synI[ n ]; - dd[ names::I_e.toString() ] = I_e[ n ]; + dd[ names::g_L ] = g_L[ n ]; + dd[ names::E_L ] = E_L[ n ]; + dd[ names::E_ex ] = E_ex[ n ]; + dd[ names::E_in ] = E_in[ n ]; + dd[ names::C_m ] = C_m[ n ]; + dd[ names::tau_syn_ex ] = tau_synE[ n ]; + dd[ names::tau_syn_in ] = tau_synI[ n ]; + dd[ names::I_e ] = I_e[ n ]; d[ comp_names_[ n ].toString() ] = dd; } @@ -343,9 +345,9 @@ void nest::iaf_cond_alpha_mc::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - update_value_param( d, names::V_th.toString(), V_th, node ); - update_value_param( d, names::V_reset.toString(), V_reset, node ); - update_value_param( d, names::t_ref.toString(), t_ref, node ); + update_value_param( d, names::V_th, V_th, node ); + update_value_param( d, names::V_reset, V_reset, node ); + update_value_param( d, names::t_ref, t_ref, node ); update_value_param( d, Name( names::g_sp ).toString(), g_conn[ SOMA ], node ); update_value_param( d, Name( names::g_pd ).toString(), g_conn[ PROX ], node ); @@ -357,14 +359,14 @@ nest::iaf_cond_alpha_mc::Parameters_::set( const dictionary& d, Node* node ) { auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); - update_value_param( d, names::E_L.toString(), E_L[ n ], node ); - update_value_param( d, names::E_ex.toString(), E_ex[ n ], node ); - update_value_param( d, names::E_in.toString(), E_in[ n ], node ); - update_value_param( d, names::C_m.toString(), C_m[ n ], node ); - update_value_param( d, names::g_L.toString(), g_L[ n ], node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_synE[ n ], node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI[ n ], node ); - update_value_param( d, names::I_e.toString(), I_e[ n ], node ); + update_value_param( d, names::E_L, E_L[ n ], node ); + update_value_param( d, names::E_ex, E_ex[ n ], node ); + update_value_param( d, names::E_in, E_in[ n ], node ); + update_value_param( d, names::C_m, C_m[ n ], node ); + update_value_param( d, names::g_L, g_L[ n ], node ); + update_value_param( d, names::tau_syn_ex, tau_synE[ n ], node ); + update_value_param( d, names::tau_syn_in, tau_synI[ n ], node ); + update_value_param( d, names::I_e, I_e[ n ], node ); } } if ( V_reset >= V_th ) @@ -400,7 +402,7 @@ nest::iaf_cond_alpha_mc::State_::get( dictionary& d ) const assert( d.known( comp_names_[ n ].toString() ) ); auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); - dd[ names::V_m.toString() ] = y_[ idx( n, V_M ) ]; // Membrane potential + dd[ names::V_m ] = y_[ idx( n, V_M ) ]; // Membrane potential } } @@ -413,7 +415,7 @@ nest::iaf_cond_alpha_mc::State_::set( const dictionary& d, const Parameters_&, N if ( d.known( comp_names_[ n ].toString() ) ) { auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); - update_value_param( d, names::V_m.toString(), y_[ idx( n, V_M ) ], node ); + update_value_param( d, names::V_m, y_[ idx( n, V_M ) ], node ); } } } diff --git a/models/iaf_cond_alpha_mc.h b/models/iaf_cond_alpha_mc.h index 95a461effb..7bb3a56f89 100644 --- a/models/iaf_cond_alpha_mc.h +++ b/models/iaf_cond_alpha_mc.h @@ -376,7 +376,7 @@ class iaf_cond_alpha_mc : public ArchivingNode */ struct Buffers_ { - Buffers_( iaf_cond_alpha_mc& ); //!= V_th ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -245,21 +246,21 @@ nest::iaf_cond_beta::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_cond_beta::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y[ V_M ]; // Membrane potential - d[ names::g_ex.toString() ] = y[ G_EXC ]; - d[ names::dg_ex.toString() ] = y[ DG_EXC ]; - d[ names::g_in.toString() ] = y[ G_INH ]; - d[ names::dg_in.toString() ] = y[ DG_INH ]; + d[ names::V_m ] = y[ V_M ]; // Membrane potential + d[ names::g_ex ] = y[ G_EXC ]; + d[ names::dg_ex ] = y[ DG_EXC ]; + d[ names::g_in ] = y[ G_INH ]; + d[ names::dg_in ] = y[ DG_INH ]; } void nest::iaf_cond_beta::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y[ V_M ], node ); - update_value_param( d, names::g_ex.toString(), y[ G_EXC ], node ); - update_value_param( d, names::dg_ex.toString(), y[ DG_EXC ], node ); - update_value_param( d, names::g_in.toString(), y[ G_INH ], node ); - update_value_param( d, names::dg_in.toString(), y[ DG_INH ], node ); + update_value_param( d, names::V_m, y[ V_M ], node ); + update_value_param( d, names::g_ex, y[ G_EXC ], node ); + update_value_param( d, names::dg_ex, y[ DG_EXC ], node ); + update_value_param( d, names::g_in, y[ G_INH ], node ); + update_value_param( d, names::dg_in, y[ DG_INH ], node ); } diff --git a/models/iaf_cond_beta.h b/models/iaf_cond_beta.h index 73c6c2e498..3eee969934 100644 --- a/models/iaf_cond_beta.h +++ b/models/iaf_cond_beta.h @@ -411,7 +411,7 @@ iaf_cond_beta::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_cond_exp.cpp b/models/iaf_cond_exp.cpp index 5c5686b283..979702a384 100644 --- a/models/iaf_cond_exp.cpp +++ b/models/iaf_cond_exp.cpp @@ -130,7 +130,8 @@ nest::iaf_cond_exp::State_::State_( const State_& s ) } } -nest::iaf_cond_exp::State_& nest::iaf_cond_exp::State_::operator=( const State_& s ) +nest::iaf_cond_exp::State_& +nest::iaf_cond_exp::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -147,38 +148,38 @@ nest::iaf_cond_exp::State_& nest::iaf_cond_exp::State_::operator=( const State_& void nest::iaf_cond_exp::Parameters_::get( dictionary& d ) const { - d[ names::V_th.toString() ] = V_th_; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::E_ex.toString() ] = E_ex; - d[ names::E_in.toString() ] = E_in; - d[ names::C_m.toString() ] = C_m; - d[ names::tau_syn_ex.toString() ] = tau_synE; - d[ names::tau_syn_in.toString() ] = tau_synI; - d[ names::I_e.toString() ] = I_e; + d[ names::V_th ] = V_th_; + d[ names::V_reset ] = V_reset_; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::E_ex ] = E_ex; + d[ names::E_in ] = E_in; + d[ names::C_m ] = C_m; + d[ names::tau_syn_ex ] = tau_synE; + d[ names::tau_syn_in ] = tau_synI; + d[ names::I_e ] = I_e; } void nest::iaf_cond_exp::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - update_value_param( d, names::V_th.toString(), V_th_, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_th, V_th_, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); - update_value_param( d, names::E_ex.toString(), E_ex, node ); - update_value_param( d, names::E_in.toString(), E_in, node ); + update_value_param( d, names::E_ex, E_ex, node ); + update_value_param( d, names::E_in, E_in, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); + update_value_param( d, names::tau_syn_ex, tau_synE, node ); + update_value_param( d, names::tau_syn_in, tau_synI, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); if ( V_reset_ >= V_th_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -200,17 +201,17 @@ nest::iaf_cond_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_cond_exp::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential - d[ names::g_ex.toString() ] = y_[ G_EXC ]; - d[ names::g_in.toString() ] = y_[ G_INH ]; + d[ names::V_m ] = y_[ V_M ]; // Membrane potential + d[ names::g_ex ] = y_[ G_EXC ]; + d[ names::g_in ] = y_[ G_INH ]; } void nest::iaf_cond_exp::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::g_ex.toString(), y_[ G_EXC ], node ); - update_value_param( d, names::g_in.toString(), y_[ G_INH ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::g_ex, y_[ G_EXC ], node ); + update_value_param( d, names::g_in, y_[ G_INH ], node ); } nest::iaf_cond_exp::Buffers_::Buffers_( iaf_cond_exp& n ) diff --git a/models/iaf_cond_exp.h b/models/iaf_cond_exp.h index d390a670bb..05a47fc8ea 100644 --- a/models/iaf_cond_exp.h +++ b/models/iaf_cond_exp.h @@ -228,8 +228,8 @@ class iaf_cond_exp : public ArchivingNode */ struct Buffers_ { - Buffers_( iaf_cond_exp& ); //! logger_; @@ -339,7 +339,7 @@ iaf_cond_exp::get_status( dictionary& d ) const S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_cond_exp_sfa_rr.cpp b/models/iaf_cond_exp_sfa_rr.cpp index afd04a2ce7..8f91f3ff68 100644 --- a/models/iaf_cond_exp_sfa_rr.cpp +++ b/models/iaf_cond_exp_sfa_rr.cpp @@ -147,7 +147,8 @@ nest::iaf_cond_exp_sfa_rr::State_::State_( const State_& s ) } } -nest::iaf_cond_exp_sfa_rr::State_& nest::iaf_cond_exp_sfa_rr::State_::operator=( const State_& s ) +nest::iaf_cond_exp_sfa_rr::State_& +nest::iaf_cond_exp_sfa_rr::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -164,52 +165,52 @@ nest::iaf_cond_exp_sfa_rr::State_& nest::iaf_cond_exp_sfa_rr::State_::operator=( void nest::iaf_cond_exp_sfa_rr::Parameters_::get( dictionary& d ) const { - d[ names::V_th.toString() ] = V_th_; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::g_L.toString() ] = g_L; - d[ names::E_L.toString() ] = E_L; - d[ names::E_ex.toString() ] = E_ex; - d[ names::E_in.toString() ] = E_in; - d[ names::C_m.toString() ] = C_m; - d[ names::tau_syn_ex.toString() ] = tau_synE; - d[ names::tau_syn_in.toString() ] = tau_synI; - d[ names::I_e.toString() ] = I_e; - - d[ names::tau_sfa.toString() ] = tau_sfa; - d[ names::tau_rr.toString() ] = tau_rr; - d[ names::E_sfa.toString() ] = E_sfa; - d[ names::E_rr.toString() ] = E_rr; - d[ names::q_sfa.toString() ] = q_sfa; - d[ names::q_rr.toString() ] = q_rr; + d[ names::V_th ] = V_th_; + d[ names::V_reset ] = V_reset_; + d[ names::t_ref ] = t_ref_; + d[ names::g_L ] = g_L; + d[ names::E_L ] = E_L; + d[ names::E_ex ] = E_ex; + d[ names::E_in ] = E_in; + d[ names::C_m ] = C_m; + d[ names::tau_syn_ex ] = tau_synE; + d[ names::tau_syn_in ] = tau_synI; + d[ names::I_e ] = I_e; + + d[ names::tau_sfa ] = tau_sfa; + d[ names::tau_rr ] = tau_rr; + d[ names::E_sfa ] = E_sfa; + d[ names::E_rr ] = E_rr; + d[ names::q_sfa ] = q_sfa; + d[ names::q_rr ] = q_rr; } void nest::iaf_cond_exp_sfa_rr::Parameters_::set( const dictionary& d, Node* node ) { // allow setting the membrane potential - update_value_param( d, names::V_th.toString(), V_th_, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::E_L.toString(), E_L, node ); + update_value_param( d, names::V_th, V_th_, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::E_L, E_L, node ); - update_value_param( d, names::E_ex.toString(), E_ex, node ); - update_value_param( d, names::E_in.toString(), E_in, node ); + update_value_param( d, names::E_ex, E_ex, node ); + update_value_param( d, names::E_in, E_in, node ); - update_value_param( d, names::C_m.toString(), C_m, node ); - update_value_param( d, names::g_L.toString(), g_L, node ); + update_value_param( d, names::C_m, C_m, node ); + update_value_param( d, names::g_L, g_L, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_synE, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_synI, node ); + update_value_param( d, names::tau_syn_ex, tau_synE, node ); + update_value_param( d, names::tau_syn_in, tau_synI, node ); - update_value_param( d, names::I_e.toString(), I_e, node ); + update_value_param( d, names::I_e, I_e, node ); - update_value_param( d, names::E_sfa.toString(), E_sfa, node ); - update_value_param( d, names::E_rr.toString(), E_rr, node ); - update_value_param( d, names::q_sfa.toString(), q_sfa, node ); - update_value_param( d, names::q_rr.toString(), q_rr, node ); - update_value_param( d, names::tau_sfa.toString(), tau_sfa, node ); - update_value_param( d, names::tau_rr.toString(), tau_rr, node ); + update_value_param( d, names::E_sfa, E_sfa, node ); + update_value_param( d, names::E_rr, E_rr, node ); + update_value_param( d, names::q_sfa, q_sfa, node ); + update_value_param( d, names::q_rr, q_rr, node ); + update_value_param( d, names::tau_sfa, tau_sfa, node ); + update_value_param( d, names::tau_rr, tau_rr, node ); if ( V_reset_ >= V_th_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -231,21 +232,21 @@ nest::iaf_cond_exp_sfa_rr::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_cond_exp_sfa_rr::State_::get( dictionary& d ) const { - d[ names::V_m.toString() ] = y_[ V_M ]; // Membrane potential - d[ names::g_ex.toString() ] = y_[ G_EXC ]; - d[ names::g_in.toString() ] = y_[ G_INH ]; - d[ names::g_sfa.toString() ] = y_[ G_SFA ]; - d[ names::g_rr.toString() ] = y_[ G_RR ]; + d[ names::V_m ] = y_[ V_M ]; // Membrane potential + d[ names::g_ex ] = y_[ G_EXC ]; + d[ names::g_in ] = y_[ G_INH ]; + d[ names::g_sfa ] = y_[ G_SFA ]; + d[ names::g_rr ] = y_[ G_RR ]; } void nest::iaf_cond_exp_sfa_rr::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y_[ V_M ], node ); - update_value_param( d, names::g_ex.toString(), y_[ G_EXC ], node ); - update_value_param( d, names::g_in.toString(), y_[ G_INH ], node ); - update_value_param( d, names::g_sfa.toString(), y_[ G_SFA ], node ); - update_value_param( d, names::g_rr.toString(), y_[ G_RR ], node ); + update_value_param( d, names::V_m, y_[ V_M ], node ); + update_value_param( d, names::g_ex, y_[ G_EXC ], node ); + update_value_param( d, names::g_in, y_[ G_INH ], node ); + update_value_param( d, names::g_sfa, y_[ G_SFA ], node ); + update_value_param( d, names::g_rr, y_[ G_RR ], node ); } nest::iaf_cond_exp_sfa_rr::Buffers_::Buffers_( iaf_cond_exp_sfa_rr& n ) diff --git a/models/iaf_cond_exp_sfa_rr.h b/models/iaf_cond_exp_sfa_rr.h index 7c77b5966c..64ad0d9df6 100644 --- a/models/iaf_cond_exp_sfa_rr.h +++ b/models/iaf_cond_exp_sfa_rr.h @@ -262,7 +262,7 @@ class iaf_cond_exp_sfa_rr : public ArchivingNode */ struct Buffers_ { - Buffers_( iaf_cond_exp_sfa_rr& ); //!= V_th_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -161,7 +161,7 @@ nest::iaf_psc_delta::Parameters_::set( const dictionary& d, Node* node ) throw BadProperty( "Membrane time constant must be > 0." ); } - update_value_param( d, names::refractory_input.toString(), with_refr_input_, node ); + update_value_param( d, names::refractory_input, with_refr_input_, node ); return delta_EL; } @@ -169,13 +169,13 @@ nest::iaf_psc_delta::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_psc_delta::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = y3_ + p.E_L_; // Membrane potential + d[ names::V_m ] = y3_ + p.E_L_; // Membrane potential } void nest::iaf_psc_delta::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( update_value_param( d, names::V_m.toString(), y3_, node ) ) + if ( update_value_param( d, names::V_m, y3_, node ) ) { y3_ -= p.E_L_; } diff --git a/models/iaf_psc_delta.h b/models/iaf_psc_delta.h index 518bdc34cf..38afad0597 100644 --- a/models/iaf_psc_delta.h +++ b/models/iaf_psc_delta.h @@ -362,7 +362,7 @@ iaf_psc_delta::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_psc_delta_ps.cpp b/models/iaf_psc_delta_ps.cpp index 96332d4f82..16177e9062 100644 --- a/models/iaf_psc_delta_ps.cpp +++ b/models/iaf_psc_delta_ps.cpp @@ -95,14 +95,14 @@ nest::iaf_psc_delta_ps::State_::State_() void nest::iaf_psc_delta_ps::Parameters_::get( dictionary& d ) const { - d[ names::E_L.toString() ] = E_L_; - d[ names::I_e.toString() ] = I_e_; - d[ names::V_th.toString() ] = U_th_ + E_L_; - d[ names::V_min.toString() ] = U_min_ + E_L_; - d[ names::V_reset.toString() ] = U_reset_ + E_L_; - d[ names::C_m.toString() ] = c_m_; - d[ names::tau_m.toString() ] = tau_m_; - d[ names::t_ref.toString() ] = t_ref_; + d[ names::E_L ] = E_L_; + d[ names::I_e ] = I_e_; + d[ names::V_th ] = U_th_ + E_L_; + d[ names::V_min ] = U_min_ + E_L_; + d[ names::V_reset ] = U_reset_ + E_L_; + d[ names::C_m ] = c_m_; + d[ names::tau_m ] = tau_m_; + d[ names::t_ref ] = t_ref_; } double @@ -111,15 +111,15 @@ nest::iaf_psc_delta_ps::Parameters_::set( const dictionary& d ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - d.update_value( names::E_L.toString(), E_L_ ); + d.update_value( names::E_L, E_L_ ); const double delta_EL = E_L_ - ELold; - d.update_value( names::tau_m.toString(), tau_m_ ); - d.update_value( names::C_m.toString(), c_m_ ); - d.update_value( names::t_ref.toString(), t_ref_ ); - d.update_value( names::I_e.toString(), I_e_ ); + d.update_value( names::tau_m, tau_m_ ); + d.update_value( names::C_m, c_m_ ); + d.update_value( names::t_ref, t_ref_ ); + d.update_value( names::I_e, I_e_ ); - if ( d.update_value( names::V_th.toString(), U_th_ ) ) + if ( d.update_value( names::V_th, U_th_ ) ) { U_th_ -= E_L_; } @@ -128,7 +128,7 @@ nest::iaf_psc_delta_ps::Parameters_::set( const dictionary& d ) U_th_ -= delta_EL; } - if ( d.update_value( names::V_min.toString(), U_min_ ) ) + if ( d.update_value( names::V_min, U_min_ ) ) { U_min_ -= E_L_; } @@ -137,7 +137,7 @@ nest::iaf_psc_delta_ps::Parameters_::set( const dictionary& d ) U_min_ -= delta_EL; } - if ( d.update_value( names::V_reset.toString(), U_reset_ ) ) + if ( d.update_value( names::V_reset, U_reset_ ) ) { U_reset_ -= E_L_; } @@ -173,15 +173,15 @@ nest::iaf_psc_delta_ps::Parameters_::set( const dictionary& d ) void nest::iaf_psc_delta_ps::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = U_ + p.E_L_; // Membrane potential - d[ names::is_refractory.toString() ] = is_refractory_; - d[ names::refractory_input.toString() ] = with_refr_input_; + d[ names::V_m ] = U_ + p.E_L_; // Membrane potential + d[ names::is_refractory ] = is_refractory_; + d[ names::refractory_input ] = with_refr_input_; } void nest::iaf_psc_delta_ps::State_::set( const dictionary& d, const Parameters_& p, double delta_EL ) { - if ( d.update_value( names::V_m.toString(), U_ ) ) + if ( d.update_value( names::V_m, U_ ) ) { U_ -= p.E_L_; } @@ -368,9 +368,10 @@ iaf_psc_delta_ps::update( Time const& origin, const long from, const long to ) { if ( S_.with_refr_input_ ) { - V_.refr_spikes_buffer_ += - ev_weight * std::exp( -( ( S_.last_spike_step_ - T - 1 ) * V_.h_ms_ - - ( S_.last_spike_offset_ - ev_offset ) + P_.t_ref_ ) / P_.tau_m_ ); + V_.refr_spikes_buffer_ += ev_weight + * std::exp( + -( ( S_.last_spike_step_ - T - 1 ) * V_.h_ms_ - ( S_.last_spike_offset_ - ev_offset ) + P_.t_ref_ ) + / P_.tau_m_ ); } } else diff --git a/models/iaf_psc_delta_ps.h b/models/iaf_psc_delta_ps.h index 807a8c006b..8304d332fc 100644 --- a/models/iaf_psc_delta_ps.h +++ b/models/iaf_psc_delta_ps.h @@ -446,7 +446,7 @@ iaf_psc_delta_ps::get_status( dictionary& d ) const S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_psc_exp.cpp b/models/iaf_psc_exp.cpp index 1da64a1d56..9471decc77 100644 --- a/models/iaf_psc_exp.cpp +++ b/models/iaf_psc_exp.cpp @@ -100,17 +100,17 @@ nest::iaf_psc_exp::State_::State_() void nest::iaf_psc_exp::Parameters_::get( dictionary& d ) const { - d[ names::E_L.toString() ] = E_L_; // resting potential - d[ names::I_e.toString() ] = I_e_; - d[ names::V_th.toString() ] = Theta_ + E_L_; // threshold value - d[ names::V_reset.toString() ] = V_reset_ + E_L_; - d[ names::C_m.toString() ] = C_; - d[ names::tau_m.toString() ] = Tau_; - d[ names::tau_syn_ex.toString() ] = tau_ex_; - d[ names::tau_syn_in.toString() ] = tau_in_; - d[ names::t_ref.toString() ] = t_ref_; - d[ names::rho.toString() ] = rho_; - d[ names::delta.toString() ] = delta_; + d[ names::E_L ] = E_L_; // resting potential + d[ names::I_e ] = I_e_; + d[ names::V_th ] = Theta_ + E_L_; // threshold value + d[ names::V_reset ] = V_reset_ + E_L_; + d[ names::C_m ] = C_; + d[ names::tau_m ] = Tau_; + d[ names::tau_syn_ex ] = tau_ex_; + d[ names::tau_syn_in ] = tau_in_; + d[ names::t_ref ] = t_ref_; + d[ names::rho ] = rho_; + d[ names::delta ] = delta_; } double @@ -119,10 +119,10 @@ nest::iaf_psc_exp::Parameters_::set( const dictionary& d, Node* node ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::E_L, E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) + if ( update_value_param( d, names::V_reset, V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -131,7 +131,7 @@ nest::iaf_psc_exp::Parameters_::set( const dictionary& d, Node* node ) V_reset_ -= delta_EL; } - if ( update_value_param( d, names::V_th.toString(), Theta_, node ) ) + if ( update_value_param( d, names::V_th, Theta_, node ) ) { Theta_ -= E_L_; } @@ -140,12 +140,12 @@ nest::iaf_psc_exp::Parameters_::set( const dictionary& d, Node* node ) Theta_ -= delta_EL; } - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::C_m.toString(), C_, node ); - update_value_param( d, names::tau_m.toString(), Tau_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::C_m, C_, node ); + update_value_param( d, names::tau_m, Tau_, node ); + update_value_param( d, names::tau_syn_ex, tau_ex_, node ); + update_value_param( d, names::tau_syn_in, tau_in_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); if ( V_reset_ >= Theta_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -181,13 +181,13 @@ nest::iaf_psc_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_psc_exp::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential + d[ names::V_m ] = V_m_ + p.E_L_; // Membrane potential } void nest::iaf_psc_exp::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) + if ( update_value_param( d, names::V_m, V_m_, node ) ) { V_m_ -= p.E_L_; } diff --git a/models/iaf_psc_exp.h b/models/iaf_psc_exp.h index 16fd8ddb7b..6eb02c4de8 100644 --- a/models/iaf_psc_exp.h +++ b/models/iaf_psc_exp.h @@ -433,7 +433,7 @@ iaf_psc_exp::get_status( dictionary& d ) const S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_psc_exp_htum.cpp b/models/iaf_psc_exp_htum.cpp index b6c64db56a..5c1dd7bb99 100644 --- a/models/iaf_psc_exp_htum.cpp +++ b/models/iaf_psc_exp_htum.cpp @@ -97,16 +97,16 @@ nest::iaf_psc_exp_htum::State_::State_() void nest::iaf_psc_exp_htum::Parameters_::get( dictionary& d ) const { - d[ names::E_L.toString() ] = E_L_; // Resting potential - d[ names::I_e.toString() ] = I_e_; - d[ names::V_th.toString() ] = Theta_ + E_L_; // threshold value - d[ names::V_reset.toString() ] = V_reset_ + E_L_; - d[ names::C_m.toString() ] = C_; - d[ names::tau_m.toString() ] = Tau_; - d[ names::tau_syn_ex.toString() ] = tau_ex_; - d[ names::tau_syn_in.toString() ] = tau_in_; - d[ names::t_ref_abs.toString() ] = tau_ref_abs_; - d[ names::t_ref_tot.toString() ] = tau_ref_tot_; + d[ names::E_L ] = E_L_; // Resting potential + d[ names::I_e ] = I_e_; + d[ names::V_th ] = Theta_ + E_L_; // threshold value + d[ names::V_reset ] = V_reset_ + E_L_; + d[ names::C_m ] = C_; + d[ names::tau_m ] = Tau_; + d[ names::tau_syn_ex ] = tau_ex_; + d[ names::tau_syn_in ] = tau_in_; + d[ names::t_ref_abs ] = tau_ref_abs_; + d[ names::t_ref_tot ] = tau_ref_tot_; } double @@ -115,10 +115,10 @@ nest::iaf_psc_exp_htum::Parameters_::set( const dictionary& d, Node* node ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::E_L, E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) + if ( update_value_param( d, names::V_reset, V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -127,7 +127,7 @@ nest::iaf_psc_exp_htum::Parameters_::set( const dictionary& d, Node* node ) V_reset_ -= delta_EL; } - if ( update_value_param( d, names::V_th.toString(), Theta_, node ) ) + if ( update_value_param( d, names::V_th, Theta_, node ) ) { Theta_ -= E_L_; } @@ -136,13 +136,13 @@ nest::iaf_psc_exp_htum::Parameters_::set( const dictionary& d, Node* node ) Theta_ -= delta_EL; } - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::C_m.toString(), C_, node ); - update_value_param( d, names::tau_m.toString(), Tau_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); - update_value_param( d, names::t_ref_abs.toString(), tau_ref_abs_, node ); - update_value_param( d, names::t_ref_tot.toString(), tau_ref_tot_, node ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::C_m, C_, node ); + update_value_param( d, names::tau_m, Tau_, node ); + update_value_param( d, names::tau_syn_ex, tau_ex_, node ); + update_value_param( d, names::tau_syn_in, tau_in_, node ); + update_value_param( d, names::t_ref_abs, tau_ref_abs_, node ); + update_value_param( d, names::t_ref_tot, tau_ref_tot_, node ); if ( V_reset_ >= Theta_ ) { throw BadProperty( "Reset potential must be smaller than threshold." ); @@ -168,13 +168,13 @@ nest::iaf_psc_exp_htum::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_psc_exp_htum::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential + d[ names::V_m ] = V_m_ + p.E_L_; // Membrane potential } void nest::iaf_psc_exp_htum::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) + if ( update_value_param( d, names::V_m, V_m_, node ) ) { V_m_ -= p.E_L_; } diff --git a/models/iaf_psc_exp_htum.h b/models/iaf_psc_exp_htum.h index f9867450e7..91ac044218 100644 --- a/models/iaf_psc_exp_htum.h +++ b/models/iaf_psc_exp_htum.h @@ -387,7 +387,7 @@ iaf_psc_exp_htum::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_psc_exp_multisynapse.cpp b/models/iaf_psc_exp_multisynapse.cpp index d3be1fa7a1..5e84dcecf1 100644 --- a/models/iaf_psc_exp_multisynapse.cpp +++ b/models/iaf_psc_exp_multisynapse.cpp @@ -119,18 +119,18 @@ iaf_psc_exp_multisynapse::State_::State_() void iaf_psc_exp_multisynapse::Parameters_::get( dictionary& d ) const { - d[ names::E_L.toString() ] = E_L_; // resting potential - d[ names::I_e.toString() ] = I_e_; - d[ names::V_th.toString() ] = Theta_ + E_L_; // threshold value - d[ names::V_reset.toString() ] = V_reset_ + E_L_; - d[ names::C_m.toString() ] = C_; - d[ names::tau_m.toString() ] = Tau_; - d[ names::t_ref.toString() ] = refractory_time_; - d[ names::n_synapses.toString() ] = n_receptors_(); - d[ names::has_connections.toString() ] = has_connections_; + d[ names::E_L ] = E_L_; // resting potential + d[ names::I_e ] = I_e_; + d[ names::V_th ] = Theta_ + E_L_; // threshold value + d[ names::V_reset ] = V_reset_ + E_L_; + d[ names::C_m ] = C_; + d[ names::tau_m ] = Tau_; + d[ names::t_ref ] = refractory_time_; + d[ names::n_synapses ] = n_receptors_(); + d[ names::has_connections ] = has_connections_; ArrayDatum tau_syn_ad( tau_syn_ ); - d[ names::tau_syn.toString() ] = tau_syn_ad; + d[ names::tau_syn ] = tau_syn_ad; } double @@ -139,10 +139,10 @@ iaf_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::E_L, E_L_, node ); const double delta_EL = E_L_ - ELold; - if ( update_value_param( d, names::V_reset.toString(), V_reset_, node ) ) + if ( update_value_param( d, names::V_reset, V_reset_, node ) ) { V_reset_ -= E_L_; } @@ -150,7 +150,7 @@ iaf_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) { V_reset_ -= delta_EL; } - if ( update_value_param( d, names::V_th.toString(), Theta_, node ) ) + if ( update_value_param( d, names::V_th, Theta_, node ) ) { Theta_ -= E_L_; } @@ -159,10 +159,10 @@ iaf_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) Theta_ -= delta_EL; } - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::C_m.toString(), C_, node ); - update_value_param( d, names::tau_m.toString(), Tau_, node ); - update_value_param( d, names::t_ref.toString(), refractory_time_, node ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::C_m, C_, node ); + update_value_param( d, names::tau_m, Tau_, node ); + update_value_param( d, names::t_ref, refractory_time_, node ); if ( C_ <= 0 ) { @@ -206,7 +206,7 @@ iaf_psc_exp_multisynapse::Parameters_::set( const dictionary& d, Node* node ) void iaf_psc_exp_multisynapse::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential + d[ names::V_m ] = V_m_ + p.E_L_; // Membrane potential } void @@ -215,7 +215,7 @@ iaf_psc_exp_multisynapse::State_::set( const dictionary& d, const Parameters_& p // If the dictionary contains a value for the membrane potential, V_m, adjust // it with the resting potential, E_L_. If not, adjust the membrane potential // with the provided change in resting potential. - if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) + if ( update_value_param( d, names::V_m, V_m_, node ) ) { V_m_ -= p.E_L_; } diff --git a/models/iaf_psc_exp_multisynapse.h b/models/iaf_psc_exp_multisynapse.h index 7f3e31d9a9..d9310093da 100644 --- a/models/iaf_psc_exp_multisynapse.h +++ b/models/iaf_psc_exp_multisynapse.h @@ -352,7 +352,7 @@ iaf_psc_exp_multisynapse::get_status( dictionary& d ) const S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } } // namespace diff --git a/models/iaf_psc_exp_ps.cpp b/models/iaf_psc_exp_ps.cpp index 01a30997ae..dc735b248a 100644 --- a/models/iaf_psc_exp_ps.cpp +++ b/models/iaf_psc_exp_ps.cpp @@ -107,16 +107,16 @@ nest::iaf_psc_exp_ps::Buffers_::Buffers_( const Buffers_&, iaf_psc_exp_ps& n ) void nest::iaf_psc_exp_ps::Parameters_::get( dictionary& d ) const { - d[ names::E_L.toString() ] = E_L_; - d[ names::I_e.toString() ] = I_e_; - d[ names::V_th.toString() ] = U_th_ + E_L_; - d[ names::V_min.toString() ] = U_min_ + E_L_; - d[ names::V_reset.toString() ] = U_reset_ + E_L_; - d[ names::C_m.toString() ] = c_m_; - d[ names::tau_m.toString() ] = tau_m_; - d[ names::tau_syn_ex.toString() ] = tau_ex_; - d[ names::tau_syn_in.toString() ] = tau_in_; - d[ names::t_ref.toString() ] = t_ref_; + d[ names::E_L ] = E_L_; + d[ names::I_e ] = I_e_; + d[ names::V_th ] = U_th_ + E_L_; + d[ names::V_min ] = U_min_ + E_L_; + d[ names::V_reset ] = U_reset_ + E_L_; + d[ names::C_m ] = c_m_; + d[ names::tau_m ] = tau_m_; + d[ names::tau_syn_ex ] = tau_ex_; + d[ names::tau_syn_in ] = tau_in_; + d[ names::t_ref ] = t_ref_; } double @@ -125,17 +125,17 @@ nest::iaf_psc_exp_ps::Parameters_::set( const dictionary& d, Node* node ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::E_L, E_L_, node ); const double delta_EL = E_L_ - ELold; - update_value_param( d, names::tau_m.toString(), tau_m_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::tau_m, tau_m_, node ); + update_value_param( d, names::tau_syn_ex, tau_ex_, node ); + update_value_param( d, names::tau_syn_in, tau_in_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::I_e, I_e_, node ); - if ( update_value_param( d, names::V_th.toString(), U_th_, node ) ) + if ( update_value_param( d, names::V_th, U_th_, node ) ) { U_th_ -= E_L_; } @@ -144,7 +144,7 @@ nest::iaf_psc_exp_ps::Parameters_::set( const dictionary& d, Node* node ) U_th_ -= delta_EL; } - if ( update_value_param( d, names::V_min.toString(), U_min_, node ) ) + if ( update_value_param( d, names::V_min, U_min_, node ) ) { U_min_ -= E_L_; } @@ -153,7 +153,7 @@ nest::iaf_psc_exp_ps::Parameters_::set( const dictionary& d, Node* node ) U_min_ -= delta_EL; } - if ( update_value_param( d, names::V_reset.toString(), U_reset_, node ) ) + if ( update_value_param( d, names::V_reset, U_reset_, node ) ) { U_reset_ -= E_L_; } @@ -189,16 +189,16 @@ nest::iaf_psc_exp_ps::Parameters_::set( const dictionary& d, Node* node ) void nest::iaf_psc_exp_ps::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = y2_ + p.E_L_; // Membrane potential - d[ names::I_syn_ex.toString() ] = y1_ex_; // Excitatory synaptic current - d[ names::I_syn_in.toString() ] = y1_in_; // Inhibitory synaptic current - d[ names::is_refractory.toString() ] = is_refractory_; + d[ names::V_m ] = y2_ + p.E_L_; // Membrane potential + d[ names::I_syn_ex ] = y1_ex_; // Excitatory synaptic current + d[ names::I_syn_in ] = y1_in_; // Inhibitory synaptic current + d[ names::is_refractory ] = is_refractory_; } void nest::iaf_psc_exp_ps::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( update_value_param( d, names::V_m.toString(), y2_, node ) ) + if ( update_value_param( d, names::V_m, y2_, node ) ) { y2_ -= p.E_L_; } @@ -206,8 +206,8 @@ nest::iaf_psc_exp_ps::State_::set( const dictionary& d, const Parameters_& p, do { y2_ -= delta_EL; } - update_value_param( d, names::I_syn_ex.toString(), y1_ex_, node ); - update_value_param( d, names::I_syn_in.toString(), y1_in_, node ); + update_value_param( d, names::I_syn_ex, y1_ex_, node ); + update_value_param( d, names::I_syn_in, y1_in_, node ); } /* ---------------------------------------------------------------- diff --git a/models/iaf_psc_exp_ps.h b/models/iaf_psc_exp_ps.h index 05a01bfea2..671a307fad 100644 --- a/models/iaf_psc_exp_ps.h +++ b/models/iaf_psc_exp_ps.h @@ -457,7 +457,7 @@ iaf_psc_exp_ps::get_status( dictionary& d ) const S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/iaf_psc_exp_ps_lossless.cpp b/models/iaf_psc_exp_ps_lossless.cpp index 1669f3ec68..bfd0edec60 100644 --- a/models/iaf_psc_exp_ps_lossless.cpp +++ b/models/iaf_psc_exp_ps_lossless.cpp @@ -35,11 +35,11 @@ #include "regula_falsi.h" // Includes from sli: +#include "arraydatum.h" #include "dict.h" #include "dictutils.h" -#include "integerdatum.h" #include "doubledatum.h" -#include "arraydatum.h" +#include "integerdatum.h" /* ---------------------------------------------------------------- @@ -109,16 +109,16 @@ nest::iaf_psc_exp_ps_lossless::Buffers_::Buffers_( const Buffers_&, iaf_psc_exp_ void nest::iaf_psc_exp_ps_lossless::Parameters_::get( dictionary& d ) const { - d[ names::E_L.toString() ] = E_L_; - d[ names::I_e.toString() ] = I_e_; - d[ names::V_th.toString() ] = U_th_ + E_L_; - d[ names::V_min.toString() ] = U_min_ + E_L_; - d[ names::V_reset.toString() ] = U_reset_ + E_L_; - d[ names::C_m.toString() ] = c_m_; - d[ names::tau_m.toString() ] = tau_m_; - d[ names::tau_syn_ex.toString() ] = tau_ex_; - d[ names::tau_syn_in.toString() ] = tau_in_; - d[ names::t_ref.toString() ] = t_ref_; + d[ names::E_L ] = E_L_; + d[ names::I_e ] = I_e_; + d[ names::V_th ] = U_th_ + E_L_; + d[ names::V_min ] = U_min_ + E_L_; + d[ names::V_reset ] = U_reset_ + E_L_; + d[ names::C_m ] = c_m_; + d[ names::tau_m ] = tau_m_; + d[ names::tau_syn_ex ] = tau_ex_; + d[ names::tau_syn_in ] = tau_in_; + d[ names::t_ref ] = t_ref_; } double @@ -127,17 +127,17 @@ nest::iaf_psc_exp_ps_lossless::Parameters_::set( const dictionary& d, Node* node // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double E_L_old = E_L_; - update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::E_L, E_L_, node ); const double delta_E_L = E_L_ - E_L_old; - update_value_param( d, names::tau_m.toString(), tau_m_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); - update_value_param( d, names::I_e.toString(), I_e_, node ); + update_value_param( d, names::tau_m, tau_m_, node ); + update_value_param( d, names::tau_syn_ex, tau_ex_, node ); + update_value_param( d, names::tau_syn_in, tau_in_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); + update_value_param( d, names::I_e, I_e_, node ); - if ( update_value_param( d, names::V_th.toString(), U_th_, node ) ) + if ( update_value_param( d, names::V_th, U_th_, node ) ) { U_th_ -= E_L_; } @@ -146,7 +146,7 @@ nest::iaf_psc_exp_ps_lossless::Parameters_::set( const dictionary& d, Node* node U_th_ -= delta_E_L; } - if ( update_value_param( d, names::V_min.toString(), U_min_, node ) ) + if ( update_value_param( d, names::V_min, U_min_, node ) ) { U_min_ -= E_L_; } @@ -155,7 +155,7 @@ nest::iaf_psc_exp_ps_lossless::Parameters_::set( const dictionary& d, Node* node U_min_ -= delta_E_L; } - if ( update_value_param( d, names::V_reset.toString(), U_reset_, node ) ) + if ( update_value_param( d, names::V_reset, U_reset_, node ) ) { U_reset_ -= E_L_; } @@ -210,19 +210,19 @@ nest::iaf_psc_exp_ps_lossless::Parameters_::set( const dictionary& d, Node* node void nest::iaf_psc_exp_ps_lossless::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = y2_ + p.E_L_; // Membrane potential - d[ names::is_refractory.toString() ] = is_refractory_; - d[ names::t_spike.toString() ] = Time( Time::step( last_spike_step_ ) ).get_ms(); - d[ names::offset.toString() ] = last_spike_offset_; - d[ names::I_syn_ex.toString() ] = I_syn_ex_; - d[ names::I_syn_in.toString() ] = I_syn_in_; - d[ names::I_syn.toString() ] = I_syn_ex_ + I_syn_in_; + d[ names::V_m ] = y2_ + p.E_L_; // Membrane potential + d[ names::is_refractory ] = is_refractory_; + d[ names::t_spike ] = Time( Time::step( last_spike_step_ ) ).get_ms(); + d[ names::offset ] = last_spike_offset_; + d[ names::I_syn_ex ] = I_syn_ex_; + d[ names::I_syn_in ] = I_syn_in_; + d[ names::I_syn ] = I_syn_ex_ + I_syn_in_; } void nest::iaf_psc_exp_ps_lossless::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( update_value_param( d, names::V_m.toString(), y2_, node ) ) + if ( update_value_param( d, names::V_m, y2_, node ) ) { y2_ -= p.E_L_; } @@ -231,8 +231,8 @@ nest::iaf_psc_exp_ps_lossless::State_::set( const dictionary& d, const Parameter y2_ -= delta_EL; } - update_value_param( d, names::I_syn_ex.toString(), I_syn_ex_, node ); - update_value_param( d, names::I_syn_in.toString(), I_syn_in_, node ); + update_value_param( d, names::I_syn_ex, I_syn_ex_, node ); + update_value_param( d, names::I_syn_in, I_syn_in_, node ); } /* ---------------------------------------------------------------- @@ -622,7 +622,8 @@ nest::iaf_psc_exp_ps_lossless::is_spike_( const double dt ) // no-spike, NS_1, (V <= g_h,I_e(I) and V < f_h,I_e(I)) if ( ( V_0 < ( ( ( I_0 + I_e ) * ( V_.b1_ * exp_tau_m + V_.b2_ * exp_tau_s ) + V_.b3_ * ( exp_tau_m - exp_tau_s ) ) - / ( V_.b4_ * exp_tau_s ) ) ) and ( V_0 <= f ) ) + / ( V_.b4_ * exp_tau_s ) ) ) + and ( V_0 <= f ) ) { return numerics::nan; } diff --git a/models/iaf_psc_exp_ps_lossless.h b/models/iaf_psc_exp_ps_lossless.h index 0dfee6f939..d112839a5c 100644 --- a/models/iaf_psc_exp_ps_lossless.h +++ b/models/iaf_psc_exp_ps_lossless.h @@ -176,7 +176,8 @@ class iaf_psc_exp_ps_lossless : public ArchivingNode void handle( CurrentEvent& ); void handle( DataLoggingRequest& ); - bool is_off_grid() const // uses off_grid events + bool + is_off_grid() const // uses off_grid events { return true; } @@ -501,7 +502,7 @@ iaf_psc_exp_ps_lossless::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/inhomogeneous_poisson_generator.cpp b/models/inhomogeneous_poisson_generator.cpp index 858dc0f748..bfd6235194 100644 --- a/models/inhomogeneous_poisson_generator.cpp +++ b/models/inhomogeneous_poisson_generator.cpp @@ -37,12 +37,12 @@ #include "universal_data_logger_impl.h" // Includes from sli: +#include "arraydatum.h" +#include "booldatum.h" #include "dict.h" #include "dictutils.h" #include "doubledatum.h" -#include "booldatum.h" #include "integerdatum.h" -#include "arraydatum.h" /* ---------------------------------------------------------------- @@ -72,9 +72,9 @@ nest::inhomogeneous_poisson_generator::Parameters_::get( dictionary& d ) const times_ms->push_back( rate_times_[ n ].get_ms() ); } - d[ names::rate_times.toString() ] = DoubleVectorDatum( times_ms ); - d[ names::rate_values.toString() ] = DoubleVectorDatum( new std::vector< double >( rate_values_ ) ); - d[ names::allow_offgrid_times.toString() ] = BoolDatum( allow_offgrid_times_ ); + d[ names::rate_times ] = DoubleVectorDatum( times_ms ); + d[ names::rate_values ] = DoubleVectorDatum( new std::vector< double >( rate_values_ ) ); + d[ names::allow_offgrid_times ] = BoolDatum( allow_offgrid_times_ ); } void @@ -116,14 +116,14 @@ nest::inhomogeneous_poisson_generator::Parameters_::assert_valid_rate_time_and_i void nest::inhomogeneous_poisson_generator::Parameters_::set( const dictionary& d, Buffers_& b, Node* ) { - const bool times = d.known( names::rate_times.toString() ); - const bool rates = d.update_value( names::rate_values.toString(), rate_values_ ); + const bool times = d.known( names::rate_times ); + const bool rates = d.update_value( names::rate_values, rate_values_ ); // if offgrid flag changes, it must be done so either before any rates are // set or when setting new rates (which removes old ones) - if ( d.known( names::allow_offgrid_times.toString() ) ) + if ( d.known( names::allow_offgrid_times ) ) { - const auto flag_offgrid = d.get< bool >( names::allow_offgrid_times.toString() ); + const auto flag_offgrid = d.get< bool >( names::allow_offgrid_times ); if ( flag_offgrid != allow_offgrid_times_ and not( times or rate_times_.empty() ) ) { @@ -148,7 +148,7 @@ nest::inhomogeneous_poisson_generator::Parameters_::set( const dictionary& d, Bu return; } - const auto d_times = d.get< std::vector< double > >( names::rate_times.toString() ); + const auto d_times = d.get< std::vector< double > >( names::rate_times ); if ( d_times.empty() ) { @@ -320,8 +320,8 @@ nest::inhomogeneous_poisson_generator::set_data_from_stimulation_backend( std::v times_ms.push_back( rate_time_update[ n * 2 ] ); rate_values.push_back( rate_time_update[ n * 2 + 1 ] ); } - d[ names::rate_times.toString() ] = DoubleVectorDatum( times_ms ); - d[ names::rate_values.toString() ] = DoubleVectorDatum( rate_values ); + d[ names::rate_times ] = DoubleVectorDatum( times_ms ); + d[ names::rate_values ] = DoubleVectorDatum( rate_values ); ptmp.set( d, B_, this ); } diff --git a/models/izhikevich.cpp b/models/izhikevich.cpp index 3dce0e3d14..8421cf9ab9 100644 --- a/models/izhikevich.cpp +++ b/models/izhikevich.cpp @@ -91,28 +91,28 @@ nest::izhikevich::State_::State_() void nest::izhikevich::Parameters_::get( dictionary& d ) const { - d[ names::I_e.toString() ] = I_e_; - d[ names::V_th.toString() ] = V_th_; // threshold value - d[ names::V_min.toString() ] = V_min_; - d[ names::a.toString() ] = a_; - d[ names::b.toString() ] = b_; - d[ names::c.toString() ] = c_; - d[ names::d.toString() ] = d_; - d[ names::consistent_integration.toString() ] = consistent_integration_; + d[ names::I_e ] = I_e_; + d[ names::V_th ] = V_th_; // threshold value + d[ names::V_min ] = V_min_; + d[ names::a ] = a_; + d[ names::b ] = b_; + d[ names::c ] = c_; + d[ names::d ] = d_; + d[ names::consistent_integration ] = consistent_integration_; } void nest::izhikevich::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::V_th.toString(), V_th_, node ); - update_value_param( d, names::V_min.toString(), V_min_, node ); - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::a.toString(), a_, node ); - update_value_param( d, names::b.toString(), b_, node ); - update_value_param( d, names::c.toString(), c_, node ); - update_value_param( d, names::d.toString(), d_, node ); - d.update_value( names::consistent_integration.toString(), consistent_integration_ ); + update_value_param( d, names::V_th, V_th_, node ); + update_value_param( d, names::V_min, V_min_, node ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::a, a_, node ); + update_value_param( d, names::b, b_, node ); + update_value_param( d, names::c, c_, node ); + update_value_param( d, names::d, d_, node ); + d.update_value( names::consistent_integration, consistent_integration_ ); const double h = Time::get_resolution().get_ms(); if ( not consistent_integration_ && h != 1.0 ) { @@ -123,15 +123,15 @@ nest::izhikevich::Parameters_::set( const dictionary& d, Node* node ) void nest::izhikevich::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::U_m.toString() ] = u_; // Membrane potential recovery variable - d[ names::V_m.toString() ] = v_; // Membrane potential + d[ names::U_m ] = u_; // Membrane potential recovery variable + d[ names::V_m ] = v_; // Membrane potential } void nest::izhikevich::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::U_m.toString(), u_, node ); - update_value_param( d, names::V_m.toString(), v_, node ); + update_value_param( d, names::U_m, u_, node ); + update_value_param( d, names::V_m, v_, node ); } nest::izhikevich::Buffers_::Buffers_( izhikevich& n ) diff --git a/models/izhikevich.h b/models/izhikevich.h index b8023e1323..250d29b4eb 100644 --- a/models/izhikevich.h +++ b/models/izhikevich.h @@ -307,7 +307,7 @@ izhikevich::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/jonke_synapse.h b/models/jonke_synapse.h index db06b650b1..0acdb6ac12 100644 --- a/models/jonke_synapse.h +++ b/models/jonke_synapse.h @@ -171,13 +171,13 @@ JonkeCommonProperties::get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - d[ names::alpha.toString() ] = alpha_; - d[ names::beta.toString() ] = beta_; - d[ names::lambda.toString() ] = lambda_; - d[ names::mu_plus.toString() ] = mu_plus_; - d[ names::mu_minus.toString() ] = mu_minus_; - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::Wmax.toString() ] = Wmax_; + d[ names::alpha ] = alpha_; + d[ names::beta ] = beta_; + d[ names::lambda ] = lambda_; + d[ names::mu_plus ] = mu_plus_; + d[ names::mu_minus ] = mu_minus_; + d[ names::tau_plus ] = tau_plus_; + d[ names::Wmax ] = Wmax_; } void @@ -185,13 +185,13 @@ JonkeCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - d.update_value( names::alpha.toString(), alpha_ ); - d.update_value( names::beta.toString(), beta_ ); - d.update_value( names::lambda.toString(), lambda_ ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::mu_plus.toString(), mu_plus_ ); - d.update_value( names::mu_minus.toString(), mu_minus_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::alpha, alpha_ ); + d.update_value( names::beta, beta_ ); + d.update_value( names::lambda, lambda_ ); + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::mu_plus, mu_plus_ ); + d.update_value( names::mu_minus, mu_minus_ ); + d.update_value( names::Wmax, Wmax_ ); } @@ -397,8 +397,8 @@ void jonke_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -406,7 +406,7 @@ void jonke_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); } template < typename targetidentifierT > diff --git a/models/lin_rate.cpp b/models/lin_rate.cpp index 4ea56864ff..e99ac9eb6d 100644 --- a/models/lin_rate.cpp +++ b/models/lin_rate.cpp @@ -28,21 +28,21 @@ namespace nest void nonlinearities_lin_rate::get( dictionary& d ) const { - d[ names::g.toString() ] = g_; - d[ names::g_ex.toString() ] = g_ex_; - d[ names::g_in.toString() ] = g_in_; - d[ names::theta_ex.toString() ] = theta_ex_; - d[ names::theta_in.toString() ] = theta_in_; + d[ names::g ] = g_; + d[ names::g_ex ] = g_ex_; + d[ names::g_in ] = g_in_; + d[ names::theta_ex ] = theta_ex_; + d[ names::theta_in ] = theta_in_; } void nonlinearities_lin_rate::set( const dictionary& d, Node* node ) { - update_value_param( d, names::g.toString(), g_, node ); - update_value_param( d, names::g_ex.toString(), g_ex_, node ); - update_value_param( d, names::g_in.toString(), g_in_, node ); - update_value_param( d, names::theta_ex.toString(), theta_ex_, node ); - update_value_param( d, names::theta_in.toString(), theta_in_, node ); + update_value_param( d, names::g, g_, node ); + update_value_param( d, names::g_ex, g_ex_, node ); + update_value_param( d, names::g_in, g_in_, node ); + update_value_param( d, names::theta_ex, theta_ex_, node ); + update_value_param( d, names::theta_in, theta_in_, node ); } /* diff --git a/models/mat2_psc_exp.cpp b/models/mat2_psc_exp.cpp index a824fa70de..08d4e3a1e2 100644 --- a/models/mat2_psc_exp.cpp +++ b/models/mat2_psc_exp.cpp @@ -102,18 +102,18 @@ nest::mat2_psc_exp::State_::State_() void nest::mat2_psc_exp::Parameters_::get( dictionary& d ) const { - d[ names::E_L.toString() ] = E_L_; // Resting potential - d[ names::I_e.toString() ] = I_e_; - d[ names::C_m.toString() ] = C_; - d[ names::tau_m.toString() ] = Tau_; - d[ names::tau_syn_ex.toString() ] = tau_ex_; - d[ names::tau_syn_in.toString() ] = tau_in_; - d[ names::t_ref.toString() ] = tau_ref_; - d[ names::tau_1.toString() ] = tau_1_; - d[ names::tau_2.toString() ] = tau_2_; - d[ names::alpha_1.toString() ] = alpha_1_; - d[ names::alpha_2.toString() ] = alpha_2_; - d[ names::omega.toString() ] = omega_ + E_L_; + d[ names::E_L ] = E_L_; // Resting potential + d[ names::I_e ] = I_e_; + d[ names::C_m ] = C_; + d[ names::tau_m ] = Tau_; + d[ names::tau_syn_ex ] = tau_ex_; + d[ names::tau_syn_in ] = tau_in_; + d[ names::t_ref ] = tau_ref_; + d[ names::tau_1 ] = tau_1_; + d[ names::tau_2 ] = tau_2_; + d[ names::alpha_1 ] = alpha_1_; + d[ names::alpha_2 ] = alpha_2_; + d[ names::omega ] = omega_ + E_L_; } double @@ -122,21 +122,21 @@ nest::mat2_psc_exp::Parameters_::set( const dictionary& d, Node* node ) // if E_L_ is changed, we need to adjust all variables defined relative to // E_L_ const double ELold = E_L_; - update_value_param( d, names::E_L.toString(), E_L_, node ); + update_value_param( d, names::E_L, E_L_, node ); const double delta_EL = E_L_ - ELold; - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::C_m.toString(), C_, node ); - update_value_param( d, names::tau_m.toString(), Tau_, node ); - update_value_param( d, names::tau_syn_ex.toString(), tau_ex_, node ); - update_value_param( d, names::tau_syn_in.toString(), tau_in_, node ); - update_value_param( d, names::t_ref.toString(), tau_ref_, node ); - update_value_param( d, names::tau_1.toString(), tau_1_, node ); - update_value_param( d, names::tau_2.toString(), tau_2_, node ); - update_value_param( d, names::alpha_1.toString(), alpha_1_, node ); - update_value_param( d, names::alpha_2.toString(), alpha_2_, node ); - - if ( update_value_param( d, names::omega.toString(), omega_, node ) ) + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::C_m, C_, node ); + update_value_param( d, names::tau_m, Tau_, node ); + update_value_param( d, names::tau_syn_ex, tau_ex_, node ); + update_value_param( d, names::tau_syn_in, tau_in_, node ); + update_value_param( d, names::t_ref, tau_ref_, node ); + update_value_param( d, names::tau_1, tau_1_, node ); + update_value_param( d, names::tau_2, tau_2_, node ); + update_value_param( d, names::alpha_1, alpha_1_, node ); + update_value_param( d, names::alpha_2, alpha_2_, node ); + + if ( update_value_param( d, names::omega, omega_, node ) ) { omega_ -= E_L_; } @@ -165,16 +165,16 @@ nest::mat2_psc_exp::Parameters_::set( const dictionary& d, Node* node ) void nest::mat2_psc_exp::State_::get( dictionary& d, const Parameters_& p ) const { - d[ names::V_m.toString() ] = V_m_ + p.E_L_; // Membrane potential - d[ names::V_th.toString() ] = p.E_L_ + p.omega_ + V_th_1_ + V_th_2_; // Adaptive threshold - d[ names::V_th_alpha_1.toString() ] = V_th_1_; - d[ names::V_th_alpha_2.toString() ] = V_th_2_; + d[ names::V_m ] = V_m_ + p.E_L_; // Membrane potential + d[ names::V_th ] = p.E_L_ + p.omega_ + V_th_1_ + V_th_2_; // Adaptive threshold + d[ names::V_th_alpha_1 ] = V_th_1_; + d[ names::V_th_alpha_2 ] = V_th_2_; } void nest::mat2_psc_exp::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node ) { - if ( update_value_param( d, names::V_m.toString(), V_m_, node ) ) + if ( update_value_param( d, names::V_m, V_m_, node ) ) { V_m_ -= p.E_L_; } @@ -183,8 +183,8 @@ nest::mat2_psc_exp::State_::set( const dictionary& d, const Parameters_& p, doub V_m_ -= delta_EL; } - update_value_param( d, names::V_th_alpha_1.toString(), V_th_1_, node ); - update_value_param( d, names::V_th_alpha_2.toString(), V_th_2_, node ); + update_value_param( d, names::V_th_alpha_1, V_th_1_, node ); + update_value_param( d, names::V_th_alpha_2, V_th_2_, node ); } nest::mat2_psc_exp::Buffers_::Buffers_( mat2_psc_exp& n ) diff --git a/models/mat2_psc_exp.h b/models/mat2_psc_exp.h index 7778a6f220..ba0ad797c3 100644 --- a/models/mat2_psc_exp.h +++ b/models/mat2_psc_exp.h @@ -270,8 +270,8 @@ class mat2_psc_exp : public ArchivingNode */ struct Buffers_ { - Buffers_( mat2_psc_exp& ); //!& i { dictionary d; ( new Dictionary ); - d[ names::rate.toString() ] = DoubleDatum( input_param[ 0 ] ); - d[ names::p_copy.toString() ] = DoubleDatum( input_param[ 1 ] ); + d[ names::rate ] = DoubleDatum( input_param[ 0 ] ); + d[ names::p_copy ] = DoubleDatum( input_param[ 1 ] ); ptmp.set( d, this ); } } diff --git a/models/multimeter.cpp b/models/multimeter.cpp index a2cc196b6a..48e0b3fc6e 100644 --- a/models/multimeter.cpp +++ b/models/multimeter.cpp @@ -73,7 +73,8 @@ nest::multimeter::Parameters_::Parameters_( const Parameters_& p ) interval_.calibrate(); } -nest::multimeter::Parameters_& nest::multimeter::Parameters_::operator=( const Parameters_& p ) +nest::multimeter::Parameters_& +nest::multimeter::Parameters_::operator=( const Parameters_& p ) { interval_ = p.interval_; offset_ = p.offset_; @@ -92,21 +93,20 @@ nest::multimeter::Buffers_::Buffers_() void nest::multimeter::Parameters_::get( dictionary& d ) const { - d[ names::interval.toString() ] = interval_.get_ms(); - d[ names::offset.toString() ] = offset_.get_ms(); + d[ names::interval ] = interval_.get_ms(); + d[ names::offset ] = offset_.get_ms(); std::vector< std::string > ad; for ( size_t j = 0; j < record_from_.size(); ++j ) { ad.push_back( record_from_[ j ].toString() ); } - d[ names::record_from.toString() ] = ad; + d[ names::record_from ] = ad; } void nest::multimeter::Parameters_::set( const dictionary& d, const Buffers_& b, Node* node ) { - if ( b.has_targets_ && ( d.known( names::interval.toString() ) || d.known( names::offset.toString() ) - || d.known( names::record_from.toString() ) ) ) + if ( b.has_targets_ && ( d.known( names::interval ) || d.known( names::offset ) || d.known( names::record_from ) ) ) { throw BadProperty( "The recording interval, the interval offset and the list of properties " @@ -115,7 +115,7 @@ nest::multimeter::Parameters_::set( const dictionary& d, const Buffers_& b, Node } double v; - if ( update_value_param( d, names::interval.toString(), v, node ) ) + if ( update_value_param( d, names::interval, v, node ) ) { if ( Time( Time::ms( v ) ) < Time::get_resolution() ) { @@ -134,7 +134,7 @@ nest::multimeter::Parameters_::set( const dictionary& d, const Buffers_& b, Node } } - if ( update_value_param( d, names::offset.toString(), v, node ) ) + if ( update_value_param( d, names::offset, v, node ) ) { // if offset is different from the default value (0), it must be at least // as large as the resolution @@ -156,11 +156,11 @@ nest::multimeter::Parameters_::set( const dictionary& d, const Buffers_& b, Node } // extract data - if ( d.known( names::record_from.toString() ) ) + if ( d.known( names::record_from ) ) { record_from_.clear(); - ArrayDatum ad = d.get< ArrayDatum >( names::record_from.toString() ); + ArrayDatum ad = d.get< ArrayDatum >( names::record_from ); for ( Token* t = ad.begin(); t != ad.end(); ++t ) { record_from_.push_back( Name( getValue< std::string >( *t ) ) ); @@ -246,8 +246,8 @@ voltmeter::voltmeter() { dictionary vmdict; std::vector< std::string > ad; - ad.push_back( names::V_m.toString() ); - vmdict[ names::record_from.toString() ] = ad; + ad.push_back( names::V_m ); + vmdict[ names::record_from ] = ad; set_status( vmdict ); } diff --git a/models/multimeter.h b/models/multimeter.h index 8aa5e12ecc..65ec341736 100644 --- a/models/multimeter.h +++ b/models/multimeter.h @@ -252,7 +252,7 @@ nest::multimeter::set_status( const dictionary& d ) { // protect multimeter from being frozen bool freeze = false; - if ( d.update_value( names::frozen.toString(), freeze ) && freeze ) + if ( d.update_value( names::frozen, freeze ) && freeze ) { throw BadProperty( "multimeter cannot be frozen." ); } diff --git a/models/music_cont_in_proxy.cpp b/models/music_cont_in_proxy.cpp index 458db1b4fc..9fee43a795 100644 --- a/models/music_cont_in_proxy.cpp +++ b/models/music_cont_in_proxy.cpp @@ -32,8 +32,8 @@ #include "integerdatum.h" // Includes from libnestutil: -#include "dict_util.h" #include "compose.hpp" +#include "dict_util.h" #include "logging.h" // Includes from nestkernel: @@ -61,7 +61,7 @@ nest::music_cont_in_proxy::State_::State_() void nest::music_cont_in_proxy::Parameters_::get( dictionary& d ) const { - d[ names::port_name.toString() ] = port_name_; + d[ names::port_name ] = port_name_; } void @@ -73,15 +73,15 @@ nest::music_cont_in_proxy::Parameters_::set( const dictionary& d, State_& s ) if ( not s.published_ ) { - d.update_value( names::port_name.toString(), port_name_ ); + d.update_value( names::port_name, port_name_ ); } } void nest::music_cont_in_proxy::State_::get( dictionary& d ) const { - d[ names::published.toString() ] = published_; - d[ names::port_width.toString() ] = port_width_; + d[ names::published ] = published_; + d[ names::port_width ] = port_width_; } void @@ -161,7 +161,7 @@ nest::music_cont_in_proxy::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); - d[ names::data.toString() ] = DoubleVectorDatum( new std::vector< double >( B_.data_ ) ); + d[ names::data ] = DoubleVectorDatum( new std::vector< double >( B_.data_ ) ); } void diff --git a/models/music_cont_out_proxy.cpp b/models/music_cont_out_proxy.cpp index 22e4e65406..0fffd54fe6 100644 --- a/models/music_cont_out_proxy.cpp +++ b/models/music_cont_out_proxy.cpp @@ -96,8 +96,8 @@ nest::music_cont_out_proxy::Buffers_::Buffers_( const Buffers_& b ) void nest::music_cont_out_proxy::Parameters_::get( dictionary& d ) const { - d[ names::port_name.toString() ] = port_name_; - d[ names::interval.toString() ] = interval_.get_ms(); + d[ names::port_name ] = port_name_; + d[ names::interval ] = interval_.get_ms(); std::vector< std::string > ad_record_from; @@ -106,8 +106,8 @@ nest::music_cont_out_proxy::Parameters_::get( dictionary& d ) const ad_record_from.push_back( record_from_[ j ].toString() ); } - d[ names::record_from.toString() ] = ad_record_from; - d[ names::targets.toString() ] = new NodeCollectionDatum( targets_ ); + d[ names::record_from ] = ad_record_from; + d[ names::targets ] = new NodeCollectionDatum( targets_ ); } void @@ -119,10 +119,10 @@ nest::music_cont_out_proxy::Parameters_::set( const dictionary& d, if ( state.published_ == false ) { - d.update_value( names::port_name.toString(), port_name_ ); + d.update_value( names::port_name, port_name_ ); } - if ( buffers.has_targets_ && ( d.known( names::interval.toString() ) || d.known( names::record_from.toString() ) ) ) + if ( buffers.has_targets_ && ( d.known( names::interval ) || d.known( names::record_from ) ) ) { throw BadProperty( "The recording interval and the list of properties to record " @@ -130,7 +130,7 @@ nest::music_cont_out_proxy::Parameters_::set( const dictionary& d, } double v; - if ( d.update_value( names::interval.toString(), v ) ) + if ( d.update_value( names::interval, v ) ) { if ( Time( Time::ms( v ) ) < Time::get_resolution() ) { @@ -149,18 +149,18 @@ nest::music_cont_out_proxy::Parameters_::set( const dictionary& d, } } // extract data - if ( d.known( names::record_from.toString() ) ) + if ( d.known( names::record_from ) ) { record_from_.clear(); - ArrayDatum ad = d.get< ArrayDatum >( names::record_from.toString() ); + ArrayDatum ad = d.get< ArrayDatum >( names::record_from ); for ( Token* t = ad.begin(); t != ad.end(); ++t ) { record_from_.push_back( Name( getValue< std::string >( *t ) ) ); } } - if ( d.known( names::targets.toString() ) ) + if ( d.known( names::targets ) ) { if ( record_from_.empty() ) { @@ -169,7 +169,7 @@ nest::music_cont_out_proxy::Parameters_::set( const dictionary& d, if ( state.published_ == false ) { - targets_ = d.get< NodeCollectionDatum >( names::targets.toString() ); + targets_ = d.get< NodeCollectionDatum >( names::targets ); } else { @@ -181,8 +181,8 @@ nest::music_cont_out_proxy::Parameters_::set( const dictionary& d, void nest::music_cont_out_proxy::State_::get( dictionary& d ) const { - d[ names::published.toString() ] = published_; - d[ names::port_width.toString() ] = port_width_; + d[ names::published ] = published_; + d[ names::port_width ] = port_width_; } /* ---------------------------------------------------------------- diff --git a/models/music_event_in_proxy.cpp b/models/music_event_in_proxy.cpp index ca84ece554..d30a423fc9 100644 --- a/models/music_event_in_proxy.cpp +++ b/models/music_event_in_proxy.cpp @@ -39,8 +39,8 @@ #include "logging.h" // Includes from nestkernel: -#include "kernel_manager.h" #include "event_delivery_manager_impl.h" +#include "kernel_manager.h" /* ---------------------------------------------------------------- * Default constructors defining default parameters and state @@ -65,8 +65,8 @@ nest::music_event_in_proxy::State_::State_() void nest::music_event_in_proxy::Parameters_::get( dictionary& d ) const { - d[ names::music_channel.toString() ] = channel_; - d[ names::port_name.toString() ] = port_name_; + d[ names::music_channel ] = channel_; + d[ names::port_name ] = port_name_; } void @@ -74,15 +74,15 @@ nest::music_event_in_proxy::Parameters_::set( const dictionary& d, State_& s ) { if ( not s.registered_ ) { - d.update_value( names::music_channel.toString(), channel_ ); - d.update_value( names::port_name.toString(), port_name_ ); + d.update_value( names::music_channel, channel_ ); + d.update_value( names::port_name, port_name_ ); } } void nest::music_event_in_proxy::State_::get( dictionary& d ) const { - d[ names::registered.toString() ] = registered_; + d[ names::registered ] = registered_; } void diff --git a/models/music_event_out_proxy.cpp b/models/music_event_out_proxy.cpp index 23888bece5..cf20ffa0d0 100644 --- a/models/music_event_out_proxy.cpp +++ b/models/music_event_out_proxy.cpp @@ -63,7 +63,7 @@ nest::music_event_out_proxy::State_::State_() void nest::music_event_out_proxy::Parameters_::get( dictionary& d ) const { - d[ names::port_name.toString() ] = port_name_; + d[ names::port_name ] = port_name_; } void @@ -75,15 +75,15 @@ nest::music_event_out_proxy::Parameters_::set( const dictionary& d, State_& s ) if ( not s.published_ ) { - d.update_value( names::port_name.toString(), port_name_ ); + d.update_value( names::port_name, port_name_ ); } } void nest::music_event_out_proxy::State_::get( dictionary& d ) const { - d[ names::published.toString() ] = published_; - d[ names::port_width.toString() ] = port_width_; + d[ names::published ] = published_; + d[ names::port_width ] = port_width_; } void @@ -180,14 +180,14 @@ nest::music_event_out_proxy::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); - d[ names::connection_count.toString() ] = V_.index_map_.size(); + d[ names::connection_count ] = V_.index_map_.size(); // make a copy, since MUSIC uses int instead of long int std::vector< long >* pInd_map_long = new std::vector< long >( V_.index_map_.size() ); std::copy< std::vector< MUSIC::GlobalIndex >::const_iterator, std::vector< long >::iterator >( V_.index_map_.begin(), V_.index_map_.end(), pInd_map_long->begin() ); - d[ names::index_map.toString() ] = IntVectorDatum( pInd_map_long ); + d[ names::index_map ] = IntVectorDatum( pInd_map_long ); } void diff --git a/models/music_message_in_proxy.cpp b/models/music_message_in_proxy.cpp index 8ed2d0f3ca..683081aab5 100644 --- a/models/music_message_in_proxy.cpp +++ b/models/music_message_in_proxy.cpp @@ -63,8 +63,8 @@ nest::music_message_in_proxy::State_::State_() void nest::music_message_in_proxy::Parameters_::get( dictionary& d ) const { - d[ names::port_name.toString() ] = port_name_; - d[ names::acceptable_latency.toString() ] = acceptable_latency_; + d[ names::port_name ] = port_name_; + d[ names::acceptable_latency ] = acceptable_latency_; } void @@ -72,16 +72,16 @@ nest::music_message_in_proxy::Parameters_::set( const dictionary& d, State_& s, { if ( not s.published_ ) { - d.update_value( names::port_name.toString(), port_name_ ); - update_value_param( d, names::acceptable_latency.toString(), acceptable_latency_, node ); + d.update_value( names::port_name, port_name_ ); + update_value_param( d, names::acceptable_latency, acceptable_latency_, node ); } } void nest::music_message_in_proxy::State_::get( dictionary& d ) const { - d[ names::published.toString() ] = published_; - d[ names::port_width.toString() ] = port_width_; + d[ names::published ] = published_; + d[ names::port_width ] = port_width_; } void diff --git a/models/music_message_in_proxy.h b/models/music_message_in_proxy.h index c3b569fe16..b330939276 100644 --- a/models/music_message_in_proxy.h +++ b/models/music_message_in_proxy.h @@ -103,7 +103,8 @@ class MsgHandler : public MUSIC::MessageHandler ArrayDatum messages; //!< The buffer for incoming message std::vector< double > message_times; //!< The buffer for incoming message - void operator()( double t, void* msg, size_t size ) + void + operator()( double t, void* msg, size_t size ) { message_times.push_back( t * 1000.0 ); messages.push_back( std::string( static_cast< char* >( msg ), size ) ); @@ -114,10 +115,10 @@ class MsgHandler : public MUSIC::MessageHandler get_status( dictionary& d ) const { dictionary dict; - dict[ names::messages.toString() ] = messages; - dict[ names::message_times.toString() ] = std::vector< double >( message_times ); - d[ names::n_messages.toString() ] = messages.size(); - d[ names::data.toString() ] = dict; + dict[ names::messages ] = messages; + dict[ names::message_times ] = std::vector< double >( message_times ); + d[ names::n_messages ] = messages.size(); + d[ names::data ] = dict; } void @@ -237,7 +238,7 @@ music_message_in_proxy::set_status( const dictionary& d ) stmp.set( d, P_, this ); // throws if BadProperty long nm = 0; - if ( update_value_param( d, names::n_messages.toString(), nm, this ) ) + if ( update_value_param( d, names::n_messages, nm, this ) ) { if ( nm == 0 ) { diff --git a/models/music_rate_in_proxy.cpp b/models/music_rate_in_proxy.cpp index d190f81c69..cda7a7af94 100644 --- a/models/music_rate_in_proxy.cpp +++ b/models/music_rate_in_proxy.cpp @@ -36,8 +36,8 @@ #include "logging.h" // Includes from nestkernel: -#include "kernel_manager.h" #include "event_delivery_manager_impl.h" +#include "kernel_manager.h" /* ---------------------------------------------------------------- * Default constructors defining default parameters and state @@ -61,7 +61,7 @@ nest::music_rate_in_proxy::State_::State_() void nest::music_rate_in_proxy::Parameters_::get( dictionary& d ) const { - d[ names::port_name.toString() ] = port_name_; + d[ names::port_name ] = port_name_; } void @@ -73,15 +73,15 @@ nest::music_rate_in_proxy::Parameters_::set( const dictionary& d, State_& s ) if ( not s.registered_ ) { - d.update_value( names::port_name.toString(), port_name_ ); - d.update_value( names::music_channel.toString(), channel_ ); + d.update_value( names::port_name, port_name_ ); + d.update_value( names::music_channel, channel_ ); } } void nest::music_rate_in_proxy::State_::get( dictionary& d ) const { - d[ names::registered.toString() ] = registered_; + d[ names::registered ] = registered_; } void @@ -136,7 +136,7 @@ nest::music_rate_in_proxy::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); - d[ names::data.toString() ] = DoubleVectorDatum( new std::vector< double >( 1, B_.data_ ) ); + d[ names::data ] = DoubleVectorDatum( new std::vector< double >( 1, B_.data_ ) ); } void diff --git a/models/music_rate_out_proxy.cpp b/models/music_rate_out_proxy.cpp index fa265643ed..e6916167b2 100644 --- a/models/music_rate_out_proxy.cpp +++ b/models/music_rate_out_proxy.cpp @@ -73,7 +73,7 @@ nest::music_rate_out_proxy::Buffers_::Buffers_( const Buffers_& b ) void nest::music_rate_out_proxy::Parameters_::get( dictionary& d ) const { - d[ names::port_name.toString() ] = port_name_; + d[ names::port_name ] = port_name_; } void @@ -85,15 +85,15 @@ nest::music_rate_out_proxy::Parameters_::set( const dictionary& d, State_& s ) if ( not s.published_ ) { - d.update_value( names::port_name.toString(), port_name_ ); + d.update_value( names::port_name, port_name_ ); } } void nest::music_rate_out_proxy::State_::get( dictionary& d ) const { - d[ names::published.toString() ] = published_; - d[ names::port_width.toString() ] = port_width_; + d[ names::published ] = published_; + d[ names::port_width ] = port_width_; } void @@ -196,14 +196,14 @@ nest::music_rate_out_proxy::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); - d[ names::connection_count.toString() ] = V_.index_map_.size(); + d[ names::connection_count ] = V_.index_map_.size(); // make a copy, since MUSIC uses int instead of long int std::vector< long >* pInd_map_long = new std::vector< long >( V_.index_map_.size() ); std::copy< std::vector< MUSIC::GlobalIndex >::const_iterator, std::vector< long >::iterator >( V_.index_map_.begin(), V_.index_map_.end(), pInd_map_long->begin() ); - d[ names::index_map.toString() ] = IntVectorDatum( pInd_map_long ); + d[ names::index_map ] = IntVectorDatum( pInd_map_long ); } void diff --git a/models/noise_generator.cpp b/models/noise_generator.cpp index f288cc4727..1b70442ac8 100644 --- a/models/noise_generator.cpp +++ b/models/noise_generator.cpp @@ -79,7 +79,8 @@ nest::noise_generator::Parameters_::Parameters_( const Parameters_& p ) dt_.calibrate(); } -nest::noise_generator::Parameters_& nest::noise_generator::Parameters_::operator=( const Parameters_& p ) +nest::noise_generator::Parameters_& +nest::noise_generator::Parameters_::operator=( const Parameters_& p ) { if ( this == &p ) { @@ -122,31 +123,31 @@ nest::noise_generator::Buffers_::Buffers_( const Buffers_& b, noise_generator& n void nest::noise_generator::Parameters_::get( dictionary& d ) const { - d[ names::mean.toString() ] = mean_; - d[ names::std.toString() ] = std_; - d[ names::std_mod.toString() ] = std_mod_; - d[ names::dt.toString() ] = dt_.get_ms(); - d[ names::phase.toString() ] = phi_deg_; - d[ names::frequency.toString() ] = freq_; + d[ names::mean ] = mean_; + d[ names::std ] = std_; + d[ names::std_mod ] = std_mod_; + d[ names::dt ] = dt_.get_ms(); + d[ names::phase ] = phi_deg_; + d[ names::frequency ] = freq_; } void nest::noise_generator::State_::get( dictionary& d ) const { - d[ names::y_0.toString() ] = y_0_; - d[ names::y_1.toString() ] = y_1_; + d[ names::y_0 ] = y_0_; + d[ names::y_1 ] = y_1_; } void nest::noise_generator::Parameters_::set( const dictionary& d, const noise_generator& n, Node* node ) { - update_value_param( d, names::mean.toString(), mean_, node ); - update_value_param( d, names::std.toString(), std_, node ); - update_value_param( d, names::std_mod.toString(), std_mod_, node ); - update_value_param( d, names::frequency.toString(), freq_, node ); - update_value_param( d, names::phase.toString(), phi_deg_, node ); + update_value_param( d, names::mean, mean_, node ); + update_value_param( d, names::std, std_, node ); + update_value_param( d, names::std_mod, std_mod_, node ); + update_value_param( d, names::frequency, freq_, node ); + update_value_param( d, names::phase, phi_deg_, node ); double dt; - if ( update_value_param( d, names::dt.toString(), dt, node ) ) + if ( update_value_param( d, names::dt, dt, node ) ) { dt_ = Time::ms( dt ); } @@ -380,11 +381,11 @@ nest::noise_generator::set_data_from_stimulation_backend( std::vector< double >& } dictionary d; ( new Dictionary ); - d[ names::mean.toString() ] = DoubleDatum( input_param[ 0 ] ); - d[ names::std.toString() ] = DoubleDatum( input_param[ 1 ] ); - d[ names::std_mod.toString() ] = DoubleDatum( input_param[ 2 ] ); - d[ names::frequency.toString() ] = DoubleDatum( input_param[ 3 ] ); - d[ names::phase.toString() ] = DoubleDatum( input_param[ 4 ] ); + d[ names::mean ] = DoubleDatum( input_param[ 0 ] ); + d[ names::std ] = DoubleDatum( input_param[ 1 ] ); + d[ names::std_mod ] = DoubleDatum( input_param[ 2 ] ); + d[ names::frequency ] = DoubleDatum( input_param[ 3 ] ); + d[ names::phase ] = DoubleDatum( input_param[ 4 ] ); ptmp.set( d, *this, this ); } diff --git a/models/noise_generator.h b/models/noise_generator.h index 3ac0d96a2f..5af055e4ad 100644 --- a/models/noise_generator.h +++ b/models/noise_generator.h @@ -174,9 +174,9 @@ class noise_generator : public StimulationDevice * @see Technical Issues / Virtual Functions: Overriding, Overloading, and * Hiding */ + using Node::event_hook; using Node::handle; using Node::handles_test_event; - using Node::event_hook; using Node::sends_signal; port send_test_event( Node&, rport, synindex, bool ) override; @@ -322,7 +322,7 @@ noise_generator::get_status( dictionary& d ) const S_.get( d ); StimulationDevice::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/parrot_neuron.cpp b/models/parrot_neuron.cpp index 4e7719dec2..7af7f78134 100644 --- a/models/parrot_neuron.cpp +++ b/models/parrot_neuron.cpp @@ -83,7 +83,7 @@ parrot_neuron::update( Time const& origin, const long from, const long to ) void parrot_neuron::get_status( dictionary& d ) const { - d[ names::t_spike.toString() ] = get_spiketime_ms(); + d[ names::t_spike ] = get_spiketime_ms(); ArchivingNode::get_status( d ); } diff --git a/models/poisson_generator.cpp b/models/poisson_generator.cpp index 0a8b36f284..e0bf8ac034 100644 --- a/models/poisson_generator.cpp +++ b/models/poisson_generator.cpp @@ -52,13 +52,13 @@ nest::poisson_generator::Parameters_::Parameters_() void nest::poisson_generator::Parameters_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_; + d[ names::rate ] = rate_; } void nest::poisson_generator::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::rate.toString(), rate_, node ); + update_value_param( d, names::rate, rate_, node ); if ( rate_ < 0 ) { throw BadProperty( "The rate cannot be negative." ); @@ -167,7 +167,7 @@ nest::poisson_generator::set_data_from_stimulation_backend( std::vector< double } dictionary d; ( new Dictionary ); - d[ names::rate.toString() ] = DoubleDatum( input_param[ 0 ] ); + d[ names::rate ] = DoubleDatum( input_param[ 0 ] ); ptmp.set( d, this ); } diff --git a/models/poisson_generator_ps.cpp b/models/poisson_generator_ps.cpp index 16f72b4e8e..d1d55b5cc8 100644 --- a/models/poisson_generator_ps.cpp +++ b/models/poisson_generator_ps.cpp @@ -57,21 +57,21 @@ nest::poisson_generator_ps::Parameters_::Parameters_() void nest::poisson_generator_ps::Parameters_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_; - d[ names::dead_time.toString() ] = dead_time_; + d[ names::rate ] = rate_; + d[ names::dead_time ] = dead_time_; } void nest::poisson_generator_ps::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::dead_time.toString(), dead_time_, node ); + update_value_param( d, names::dead_time, dead_time_, node ); if ( dead_time_ < 0 ) { throw BadProperty( "The dead time cannot be negative." ); } - update_value_param( d, names::rate.toString(), rate_, node ); + update_value_param( d, names::rate, rate_, node ); if ( rate_ < 0.0 ) { @@ -294,8 +294,8 @@ nest::poisson_generator_ps::set_data_from_stimulation_backend( std::vector< doub } dictionary d; ( new Dictionary ); - d[ names::dead_time.toString() ] = DoubleDatum( input_param[ 0 ] ); - d[ names::rate.toString() ] = DoubleDatum( input_param[ 1 ] ); + d[ names::dead_time ] = DoubleDatum( input_param[ 0 ] ); + d[ names::rate ] = DoubleDatum( input_param[ 1 ] ); ptmp.set( d, this ); } diff --git a/models/poisson_generator_ps.h b/models/poisson_generator_ps.h index 2b0e7d7b0c..e441e10c0c 100644 --- a/models/poisson_generator_ps.h +++ b/models/poisson_generator_ps.h @@ -242,7 +242,7 @@ poisson_generator_ps::set_status( const dictionary& d ) // If the rate is changed, the event_hook must handle the interval from // the rate change to the first subsequent spike. - if ( d.known( names::rate.toString() ) ) + if ( d.known( names::rate ) ) { B_.next_spike_.assign( P_.num_targets_, Buffers_::SpikeTime( Time::neg_inf(), 0 ) ); } diff --git a/models/pp_cond_exp_mc_urbanczik.cpp b/models/pp_cond_exp_mc_urbanczik.cpp index 5fe77c363e..de923b0e55 100644 --- a/models/pp_cond_exp_mc_urbanczik.cpp +++ b/models/pp_cond_exp_mc_urbanczik.cpp @@ -149,7 +149,8 @@ nest::pp_cond_exp_mc_urbanczik_dynamics( double, const double y[], double f[], v // In the paper the resting potential is set to zero and // the capacitance to one. f[ S::idx( n, S::V_M ) ] = ( -node.P_.urbanczik_params.g_L[ n ] * ( V_dnd - node.P_.urbanczik_params.E_L[ n ] ) - + I_syn_ex + I_syn_in + I_conn_s_d ) / node.P_.urbanczik_params.C_m[ n ]; + + I_syn_ex + I_syn_in + I_conn_s_d ) + / node.P_.urbanczik_params.C_m[ n ]; // derivative dendritic current f[ S::idx( n, S::I_EXC ) ] = -I_syn_ex / node.P_.urbanczik_params.tau_syn_ex[ n ]; @@ -239,8 +240,8 @@ nest::pp_cond_exp_mc_urbanczik::Parameters_::Parameters_( const Parameters_& p ) } } -nest::pp_cond_exp_mc_urbanczik::Parameters_& nest::pp_cond_exp_mc_urbanczik::Parameters_::operator=( - const Parameters_& p ) +nest::pp_cond_exp_mc_urbanczik::Parameters_& +nest::pp_cond_exp_mc_urbanczik::Parameters_::operator=( const Parameters_& p ) { assert( this != &p ); // would be bad logical error in program @@ -291,7 +292,8 @@ nest::pp_cond_exp_mc_urbanczik::State_::State_( const State_& s ) } } -nest::pp_cond_exp_mc_urbanczik::State_& nest::pp_cond_exp_mc_urbanczik::State_::operator=( const State_& s ) +nest::pp_cond_exp_mc_urbanczik::State_& +nest::pp_cond_exp_mc_urbanczik::State_::operator=( const State_& s ) { r_ = s.r_; for ( size_t i = 0; i < STATE_VEC_SIZE; ++i ) @@ -328,28 +330,28 @@ nest::pp_cond_exp_mc_urbanczik::Buffers_::Buffers_( const Buffers_&, pp_cond_exp void nest::pp_cond_exp_mc_urbanczik::Parameters_::get( dictionary& d ) const { - d[ names::t_ref.toString() ] = t_ref; - d[ names::phi_max.toString() ] = urbanczik_params.phi_max; - d[ names::rate_slope.toString() ] = urbanczik_params.rate_slope; - d[ names::beta.toString() ] = urbanczik_params.beta; - d[ names::theta.toString() ] = urbanczik_params.theta; + d[ names::t_ref ] = t_ref; + d[ names::phi_max ] = urbanczik_params.phi_max; + d[ names::rate_slope ] = urbanczik_params.rate_slope; + d[ names::beta ] = urbanczik_params.beta; + d[ names::theta ] = urbanczik_params.theta; - d[ names::g_sp.toString() ] = urbanczik_params.g_conn[ SOMA ]; - d[ names::g_ps.toString() ] = urbanczik_params.g_conn[ DEND ]; + d[ names::g_sp ] = urbanczik_params.g_conn[ SOMA ]; + d[ names::g_ps ] = urbanczik_params.g_conn[ DEND ]; // create subdictionaries for per-compartment parameters for ( size_t n = 0; n < NCOMP; ++n ) { dictionary dd; - dd[ names::g_L.toString() ] = urbanczik_params.g_L[ n ]; - dd[ names::E_L.toString() ] = urbanczik_params.E_L[ n ]; - dd[ names::E_ex.toString() ] = E_ex[ n ]; - dd[ names::E_in.toString() ] = E_in[ n ]; - dd[ names::C_m.toString() ] = urbanczik_params.C_m[ n ]; - dd[ names::tau_syn_ex.toString() ] = urbanczik_params.tau_syn_ex[ n ]; - dd[ names::tau_syn_in.toString() ] = urbanczik_params.tau_syn_in[ n ]; - dd[ names::I_e.toString() ] = I_e[ n ]; + dd[ names::g_L ] = urbanczik_params.g_L[ n ]; + dd[ names::E_L ] = urbanczik_params.E_L[ n ]; + dd[ names::E_ex ] = E_ex[ n ]; + dd[ names::E_in ] = E_in[ n ]; + dd[ names::C_m ] = urbanczik_params.C_m[ n ]; + dd[ names::tau_syn_ex ] = urbanczik_params.tau_syn_ex[ n ]; + dd[ names::tau_syn_in ] = urbanczik_params.tau_syn_in[ n ]; + dd[ names::I_e ] = I_e[ n ]; d[ comp_names_[ n ].toString() ] = dd; } @@ -359,11 +361,11 @@ void nest::pp_cond_exp_mc_urbanczik::Parameters_::set( const dictionary& d ) { // allow setting the membrane potential - d.update_value( names::t_ref.toString(), t_ref ); - d.update_value( names::phi_max.toString(), urbanczik_params.phi_max ); - d.update_value( names::rate_slope.toString(), urbanczik_params.rate_slope ); - d.update_value( names::beta.toString(), urbanczik_params.beta ); - d.update_value( names::theta.toString(), urbanczik_params.theta ); + d.update_value( names::t_ref, t_ref ); + d.update_value( names::phi_max, urbanczik_params.phi_max ); + d.update_value( names::rate_slope, urbanczik_params.rate_slope ); + d.update_value( names::beta, urbanczik_params.beta ); + d.update_value( names::theta, urbanczik_params.theta ); d.update_value( Name( names::g_sp ).toString(), urbanczik_params.g_conn[ SOMA ] ); d.update_value( Name( names::g_ps ).toString(), urbanczik_params.g_conn[ DEND ] ); @@ -375,14 +377,14 @@ nest::pp_cond_exp_mc_urbanczik::Parameters_::set( const dictionary& d ) { auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); - dd.update_value( names::E_L.toString(), urbanczik_params.E_L[ n ] ); - dd.update_value( names::E_ex.toString(), E_ex[ n ] ); - dd.update_value( names::E_in.toString(), E_in[ n ] ); - dd.update_value( names::C_m.toString(), urbanczik_params.C_m[ n ] ); - dd.update_value( names::g_L.toString(), urbanczik_params.g_L[ n ] ); - dd.update_value( names::tau_syn_ex.toString(), urbanczik_params.tau_syn_ex[ n ] ); - dd.update_value( names::tau_syn_in.toString(), urbanczik_params.tau_syn_in[ n ] ); - dd.update_value( names::I_e.toString(), I_e[ n ] ); + dd.update_value( names::E_L, urbanczik_params.E_L[ n ] ); + dd.update_value( names::E_ex, E_ex[ n ] ); + dd.update_value( names::E_in, E_in[ n ] ); + dd.update_value( names::C_m, urbanczik_params.C_m[ n ] ); + dd.update_value( names::g_L, urbanczik_params.g_L[ n ] ); + dd.update_value( names::tau_syn_ex, urbanczik_params.tau_syn_ex[ n ] ); + dd.update_value( names::tau_syn_in, urbanczik_params.tau_syn_in[ n ] ); + dd.update_value( names::I_e, I_e[ n ] ); } } if ( urbanczik_params.rate_slope < 0 ) @@ -425,7 +427,7 @@ nest::pp_cond_exp_mc_urbanczik::State_::get( dictionary& d ) const assert( d.known( comp_names_[ n ].toString() ) ); auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); - dd[ names::V_m.toString() ] = y_[ idx( n, V_M ) ]; // Membrane potential + dd[ names::V_m ] = y_[ idx( n, V_M ) ]; // Membrane potential } } @@ -438,7 +440,7 @@ nest::pp_cond_exp_mc_urbanczik::State_::set( const dictionary& d, const Paramete if ( d.known( comp_names_[ n ].toString() ) ) { auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); - dd.update_value( names::V_m.toString(), y_[ idx( n, V_M ) ] ); + dd.update_value( names::V_m, y_[ idx( n, V_M ) ] ); } } } diff --git a/models/pp_cond_exp_mc_urbanczik.h b/models/pp_cond_exp_mc_urbanczik.h index 58a4fd2f26..98328ef91e 100644 --- a/models/pp_cond_exp_mc_urbanczik.h +++ b/models/pp_cond_exp_mc_urbanczik.h @@ -443,7 +443,7 @@ class pp_cond_exp_mc_urbanczik : public UrbanczikArchivingNode< pp_cond_exp_mc_u */ struct Buffers_ { - Buffers_( pp_cond_exp_mc_urbanczik& ); //!::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); /** * @todo dictionary construction should be done only once for @@ -620,15 +620,15 @@ pp_cond_exp_mc_urbanczik::get_status( dictionary& d ) const * a seg fault on exit, see #328 */ dictionary receptor_dict_; - receptor_dict_[ names::soma_exc.toString() ] = SOMA_EXC; - receptor_dict_[ names::soma_inh.toString() ] = SOMA_INH; - receptor_dict_[ names::soma_curr.toString() ] = I_SOMA; + receptor_dict_[ names::soma_exc ] = SOMA_EXC; + receptor_dict_[ names::soma_inh ] = SOMA_INH; + receptor_dict_[ names::soma_curr ] = I_SOMA; - receptor_dict_[ names::dendritic_exc.toString() ] = DEND_EXC; - receptor_dict_[ names::dendritic_inh.toString() ] = DEND_INH; - receptor_dict_[ names::dendritic_curr.toString() ] = I_DEND; + receptor_dict_[ names::dendritic_exc ] = DEND_EXC; + receptor_dict_[ names::dendritic_inh ] = DEND_INH; + receptor_dict_[ names::dendritic_curr ] = I_DEND; - d[ names::receptor_types.toString() ] = receptor_dict_; + d[ names::receptor_types ] = receptor_dict_; } inline void diff --git a/models/pp_pop_psc_delta.cpp b/models/pp_pop_psc_delta.cpp index fae87ee693..3e7950964f 100644 --- a/models/pp_pop_psc_delta.cpp +++ b/models/pp_pop_psc_delta.cpp @@ -27,8 +27,8 @@ #include // Includes from libnestutil: -#include "dict_util.h" #include "compose.hpp" +#include "dict_util.h" #include "numerics.h" // Includes from nestkernel: @@ -100,44 +100,44 @@ nest::pp_pop_psc_delta::State_::State_() void nest::pp_pop_psc_delta::Parameters_::get( dictionary& d ) const { - d[ names::N.toString() ] = N_; - d[ names::rho_0.toString() ] = rho_0_; - d[ names::delta_u.toString() ] = delta_u_; - d[ names::I_e.toString() ] = I_e_; - d[ names::C_m.toString() ] = c_m_; - d[ names::tau_m.toString() ] = tau_m_; - d[ names::len_kernel.toString() ] = len_kernel_; + d[ names::N ] = N_; + d[ names::rho_0 ] = rho_0_; + d[ names::delta_u ] = delta_u_; + d[ names::I_e ] = I_e_; + d[ names::C_m ] = c_m_; + d[ names::tau_m ] = tau_m_; + d[ names::len_kernel ] = len_kernel_; ArrayDatum tau_eta_list_ad( tau_eta_ ); - d[ names::tau_eta.toString() ] = tau_eta_list_ad; + d[ names::tau_eta ] = tau_eta_list_ad; ArrayDatum val_eta_list_ad( val_eta_ ); - d[ names::val_eta.toString() ] = val_eta_list_ad; + d[ names::val_eta ] = val_eta_list_ad; } void nest::pp_pop_psc_delta::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::N.toString(), N_, node ); - update_value_param( d, names::rho_0.toString(), rho_0_, node ); - update_value_param( d, names::delta_u.toString(), delta_u_, node ); - update_value_param( d, names::len_kernel.toString(), len_kernel_, node ); + update_value_param( d, names::N, N_, node ); + update_value_param( d, names::rho_0, rho_0_, node ); + update_value_param( d, names::delta_u, delta_u_, node ); + update_value_param( d, names::len_kernel, len_kernel_, node ); - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::tau_m.toString(), tau_m_, node ); - d.update_value( names::tau_eta.toString(), tau_eta_ ); - d.update_value( names::val_eta.toString(), val_eta_ ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::tau_m, tau_m_, node ); + d.update_value( names::tau_eta, tau_eta_ ); + d.update_value( names::val_eta, val_eta_ ); if ( tau_eta_.size() != val_eta_.size() ) { - throw BadProperty( String::compose( - "'tau_eta' and 'val_eta' need to have the same dimension.\nSize of " - "tau_eta: %1\nSize of val_eta: %2", - tau_eta_.size(), - val_eta_.size() ) ); + throw BadProperty( + String::compose( "'tau_eta' and 'val_eta' need to have the same dimension.\nSize of " + "tau_eta: %1\nSize of val_eta: %2", + tau_eta_.size(), + val_eta_.size() ) ); } if ( c_m_ <= 0 ) { @@ -172,16 +172,16 @@ nest::pp_pop_psc_delta::Parameters_::set( const dictionary& d, Node* node ) void nest::pp_pop_psc_delta::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::V_m.toString() ] = h_; // Filterd version of input + d[ names::V_m ] = h_; // Filterd version of input int n_spikes = n_spikes_past_.size() > 0 ? n_spikes_past_[ p_n_spikes_past_ ] : 0; // return 0 if n_spikes_past_ has not been initialized yet - d[ names::n_events.toString() ] = n_spikes; // Number of generated spikes + d[ names::n_events ] = n_spikes; // Number of generated spikes } void nest::pp_pop_psc_delta::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), h_, node ); + update_value_param( d, names::V_m, h_, node ); initialized_ = false; // vectors of the state should be initialized with new parameter set. } diff --git a/models/pp_pop_psc_delta.h b/models/pp_pop_psc_delta.h index b8c25fcb44..706aa86612 100644 --- a/models/pp_pop_psc_delta.h +++ b/models/pp_pop_psc_delta.h @@ -383,7 +383,7 @@ pp_pop_psc_delta::get_status( dictionary& d ) const { P_.get( d ); S_.get( d, P_ ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/pp_psc_delta.cpp b/models/pp_psc_delta.cpp index 9658e70e9b..ca255fa523 100644 --- a/models/pp_psc_delta.cpp +++ b/models/pp_psc_delta.cpp @@ -31,8 +31,8 @@ #include // Includes from libnestutil: -#include "dict_util.h" #include "compose.hpp" +#include "dict_util.h" #include "numerics.h" // Includes from nestkernel: @@ -106,38 +106,38 @@ nest::pp_psc_delta::State_::State_() void nest::pp_psc_delta::Parameters_::get( dictionary& d ) const { - d[ names::I_e.toString() ] = I_e_; - d[ names::C_m.toString() ] = c_m_; - d[ names::tau_m.toString() ] = tau_m_; - d[ names::dead_time.toString() ] = dead_time_; - d[ names::dead_time_random.toString() ] = dead_time_random_; - d[ names::dead_time_shape.toString() ] = dead_time_shape_; - d[ names::with_reset.toString() ] = with_reset_; - - d[ names::c_1.toString() ] = c_1_; - d[ names::c_2.toString() ] = c_2_; - d[ names::c_3.toString() ] = c_3_; - d[ names::t_ref_remaining.toString() ] = t_ref_remaining_; + d[ names::I_e ] = I_e_; + d[ names::C_m ] = c_m_; + d[ names::tau_m ] = tau_m_; + d[ names::dead_time ] = dead_time_; + d[ names::dead_time_random ] = dead_time_random_; + d[ names::dead_time_shape ] = dead_time_shape_; + d[ names::with_reset ] = with_reset_; + + d[ names::c_1 ] = c_1_; + d[ names::c_2 ] = c_2_; + d[ names::c_3 ] = c_3_; + d[ names::t_ref_remaining ] = t_ref_remaining_; if ( multi_param_ ) { ArrayDatum tau_sfa_list_ad( tau_sfa_ ); - d[ names::tau_sfa.toString() ] = tau_sfa_list_ad; + d[ names::tau_sfa ] = tau_sfa_list_ad; ArrayDatum q_sfa_list_ad( q_sfa_ ); - d[ names::q_sfa.toString() ] = q_sfa_list_ad; + d[ names::q_sfa ] = q_sfa_list_ad; } else { if ( tau_sfa_.size() == 0 ) { - d[ names::tau_sfa.toString() ] = 0; - d[ names::q_sfa.toString() ] = 0; + d[ names::tau_sfa ] = 0; + d[ names::q_sfa ] = 0; } else { - d[ names::tau_sfa.toString() ] = tau_sfa_[ 0 ]; - d[ names::q_sfa.toString() ] = q_sfa_[ 0 ]; + d[ names::tau_sfa ] = tau_sfa_[ 0 ]; + d[ names::q_sfa ] = q_sfa_[ 0 ]; } } } @@ -146,30 +146,30 @@ void nest::pp_psc_delta::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::I_e.toString(), I_e_, node ); - update_value_param( d, names::C_m.toString(), c_m_, node ); - update_value_param( d, names::tau_m.toString(), tau_m_, node ); - update_value_param( d, names::dead_time.toString(), dead_time_, node ); - update_value_param( d, names::dead_time_random.toString(), dead_time_random_, node ); - update_value_param( d, names::dead_time_shape.toString(), dead_time_shape_, node ); - update_value_param( d, names::with_reset.toString(), with_reset_, node ); - update_value_param( d, names::c_1.toString(), c_1_, node ); - update_value_param( d, names::c_2.toString(), c_2_, node ); - update_value_param( d, names::c_3.toString(), c_3_, node ); - update_value_param( d, names::t_ref_remaining.toString(), t_ref_remaining_, node ); + update_value_param( d, names::I_e, I_e_, node ); + update_value_param( d, names::C_m, c_m_, node ); + update_value_param( d, names::tau_m, tau_m_, node ); + update_value_param( d, names::dead_time, dead_time_, node ); + update_value_param( d, names::dead_time_random, dead_time_random_, node ); + update_value_param( d, names::dead_time_shape, dead_time_shape_, node ); + update_value_param( d, names::with_reset, with_reset_, node ); + update_value_param( d, names::c_1, c_1_, node ); + update_value_param( d, names::c_2, c_2_, node ); + update_value_param( d, names::c_3, c_3_, node ); + update_value_param( d, names::t_ref_remaining, t_ref_remaining_, node ); try { - d.update_value( names::tau_sfa.toString(), tau_sfa_ ); - d.update_value( names::q_sfa.toString(), q_sfa_ ); + d.update_value( names::tau_sfa, tau_sfa_ ); + d.update_value( names::q_sfa, q_sfa_ ); } catch ( TypeMismatch& e ) { multi_param_ = 0; double tau_sfa_temp_; double q_sfa_temp_; - update_value_param( d, names::tau_sfa.toString(), tau_sfa_temp_, node ); - update_value_param( d, names::q_sfa.toString(), q_sfa_temp_, node ); + update_value_param( d, names::tau_sfa, tau_sfa_temp_, node ); + update_value_param( d, names::q_sfa, q_sfa_temp_, node ); tau_sfa_.push_back( tau_sfa_temp_ ); q_sfa_.push_back( q_sfa_temp_ ); } @@ -177,11 +177,11 @@ nest::pp_psc_delta::Parameters_::set( const dictionary& d, Node* node ) if ( tau_sfa_.size() != q_sfa_.size() ) { - throw BadProperty( String::compose( - "'tau_sfa' and 'q_sfa' need to have the same dimension.\nSize of " - "tau_sfa: %1\nSize of q_sfa: %2", - tau_sfa_.size(), - q_sfa_.size() ) ); + throw BadProperty( + String::compose( "'tau_sfa' and 'q_sfa' need to have the same dimension.\nSize of " + "tau_sfa: %1\nSize of q_sfa: %2", + tau_sfa_.size(), + q_sfa_.size() ) ); } if ( c_m_ <= 0 ) @@ -226,15 +226,15 @@ nest::pp_psc_delta::Parameters_::set( const dictionary& d, Node* node ) void nest::pp_psc_delta::State_::get( dictionary& d, const Parameters_& ) const { - d[ names::V_m.toString() ] = y3_; // Membrane potential - d[ names::E_sfa.toString() ] = q_; // Adaptive threshold potential + d[ names::V_m ] = y3_; // Membrane potential + d[ names::E_sfa ] = q_; // Adaptive threshold potential } void nest::pp_psc_delta::State_::set( const dictionary& d, const Parameters_&, Node* node ) { - update_value_param( d, names::V_m.toString(), y3_, node ); - update_value_param( d, names::E_sfa.toString(), q_, node ); + update_value_param( d, names::V_m, y3_, node ); + update_value_param( d, names::E_sfa, q_, node ); // vectors of the state should be initialized with new parameter set. initialized_ = false; } diff --git a/models/pp_psc_delta.h b/models/pp_psc_delta.h index 9a6dd8c6bd..77774a579b 100644 --- a/models/pp_psc_delta.h +++ b/models/pp_psc_delta.h @@ -433,7 +433,7 @@ pp_psc_delta::get_status( dictionary& d ) const P_.get( d ); S_.get( d, P_ ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/ppd_sup_generator.cpp b/models/ppd_sup_generator.cpp index 8cdcea1164..669aade2a2 100644 --- a/models/ppd_sup_generator.cpp +++ b/models/ppd_sup_generator.cpp @@ -120,31 +120,31 @@ nest::ppd_sup_generator::Parameters_::Parameters_() void nest::ppd_sup_generator::Parameters_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_; - d[ names::dead_time.toString() ] = dead_time_; - d[ names::n_proc.toString() ] = n_proc_; - d[ names::frequency.toString() ] = frequency_; - d[ names::relative_amplitude.toString() ] = amplitude_; + d[ names::rate ] = rate_; + d[ names::dead_time ] = dead_time_; + d[ names::n_proc ] = n_proc_; + d[ names::frequency ] = frequency_; + d[ names::relative_amplitude ] = amplitude_; } void nest::ppd_sup_generator::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::dead_time.toString(), dead_time_, node ); + update_value_param( d, names::dead_time, dead_time_, node ); if ( dead_time_ < 0 ) { throw BadProperty( "The dead time cannot be negative." ); } - update_value_param( d, names::rate.toString(), rate_, node ); + update_value_param( d, names::rate, rate_, node ); if ( 1000.0 / rate_ <= dead_time_ ) { throw BadProperty( "The inverse rate has to be larger than the dead time." ); } long n_proc_l = n_proc_; - update_value_param( d, names::n_proc.toString(), n_proc_l, node ); + update_value_param( d, names::n_proc, n_proc_l, node ); if ( n_proc_l < 1 ) { throw BadProperty( "The number of component processes cannot be smaller than one" ); @@ -154,9 +154,9 @@ nest::ppd_sup_generator::Parameters_::set( const dictionary& d, Node* node ) n_proc_ = static_cast< unsigned long >( n_proc_l ); } - update_value_param( d, names::frequency.toString(), frequency_, node ); + update_value_param( d, names::frequency, frequency_, node ); - update_value_param( d, names::relative_amplitude.toString(), amplitude_, node ); + update_value_param( d, names::relative_amplitude, amplitude_, node ); if ( amplitude_ > 1.0 or amplitude_ < 0.0 ) { throw BadProperty( "The relative amplitude of the rate modulation must be in [0,1]." ); @@ -306,11 +306,11 @@ nest::ppd_sup_generator::set_data_from_stimulation_backend( std::vector< double } dictionary d; ( new Dictionary ); - d[ names::dead_time.toString() ] = DoubleDatum( input_param[ 0 ] ); - d[ names::rate.toString() ] = DoubleDatum( input_param[ 1 ] ); - d[ names::n_proc.toString() ] = DoubleDatum( input_param[ 2 ] ); - d[ names::frequency.toString() ] = DoubleDatum( input_param[ 3 ] ); - d[ names::relative_amplitude.toString() ] = DoubleDatum( input_param[ 4 ] ); + d[ names::dead_time ] = DoubleDatum( input_param[ 0 ] ); + d[ names::rate ] = DoubleDatum( input_param[ 1 ] ); + d[ names::n_proc ] = DoubleDatum( input_param[ 2 ] ); + d[ names::frequency ] = DoubleDatum( input_param[ 3 ] ); + d[ names::relative_amplitude ] = DoubleDatum( input_param[ 4 ] ); ptmp.set( d, this ); } diff --git a/models/pulsepacket_generator.cpp b/models/pulsepacket_generator.cpp index 127c4ec65b..c3877f0673 100644 --- a/models/pulsepacket_generator.cpp +++ b/models/pulsepacket_generator.cpp @@ -66,9 +66,9 @@ nest::pulsepacket_generator::Variables_::Variables_() void nest::pulsepacket_generator::Parameters_::get( dictionary& d ) const { - d[ names::pulse_times.toString() ] = DoubleVectorDatum( new std::vector< double >( pulse_times_ ) ); - d[ names::activity.toString() ] = a_; - d[ names::sdev.toString() ] = sdev_; + d[ names::pulse_times ] = DoubleVectorDatum( new std::vector< double >( pulse_times_ ) ); + d[ names::activity ] = a_; + d[ names::sdev ] = sdev_; } void @@ -77,8 +77,8 @@ nest::pulsepacket_generator::Parameters_::set( const dictionary& d, pulsepacket_ // We cannot use a single line here since short-circuiting may stop evaluation // prematurely. Therefore, neednewpulse must be second arg on second line. - bool neednewpulse = update_value_param( d, names::activity.toString(), a_, node ); - neednewpulse = update_value_param( d, names::sdev.toString(), sdev_, node ) or neednewpulse; + bool neednewpulse = update_value_param( d, names::activity, a_, node ); + neednewpulse = update_value_param( d, names::sdev, sdev_, node ) or neednewpulse; if ( a_ < 0 ) { throw BadProperty( "The activity cannot be negative." ); @@ -97,8 +97,8 @@ nest::pulsepacket_generator::Parameters_::set( const dictionary& d, pulsepacket_ } /* ---------------------------------------------------------------- -* Default and copy constructor for node -* ---------------------------------------------------------------- */ + * Default and copy constructor for node + * ---------------------------------------------------------------- */ nest::pulsepacket_generator::pulsepacket_generator() : StimulationDevice() @@ -250,10 +250,10 @@ nest::pulsepacket_generator::set_data_from_stimulation_backend( std::vector< dou } dictionary d; ( new Dictionary ); - d[ names::activity.toString() ] = DoubleDatum( input_param[ 0 ] ); - d[ names::sdev.toString() ] = DoubleDatum( input_param[ 1 ] ); + d[ names::activity ] = DoubleDatum( input_param[ 0 ] ); + d[ names::sdev ] = DoubleDatum( input_param[ 1 ] ); input_param.erase( input_param.begin(), input_param.begin() + 2 ); - d[ names::pulse_times.toString() ] = DoubleVectorDatum( input_param ); + d[ names::pulse_times ] = DoubleVectorDatum( input_param ); ptmp.set( d, *this, this ); } diff --git a/models/quantal_stp_synapse_impl.h b/models/quantal_stp_synapse_impl.h index c4fe1d3e06..a344dff5db 100644 --- a/models/quantal_stp_synapse_impl.h +++ b/models/quantal_stp_synapse_impl.h @@ -85,13 +85,13 @@ void quantal_stp_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::dU.toString() ] = U_; - d[ names::u.toString() ] = u_; - d[ names::tau_rec.toString() ] = tau_rec_; - d[ names::tau_fac.toString() ] = tau_fac_; - d[ names::n.toString() ] = n_; - d[ names::a.toString() ] = a_; + d[ names::weight ] = weight_; + d[ names::dU ] = U_; + d[ names::u ] = u_; + d[ names::tau_rec ] = tau_rec_; + d[ names::tau_fac ] = tau_fac_; + d[ names::n ] = n_; + d[ names::a ] = a_; } @@ -100,12 +100,12 @@ void quantal_stp_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); - d.update_value( names::dU.toString(), U_ ); - d.update_value( names::u.toString(), u_ ); - d.update_value( names::tau_rec.toString(), tau_rec_ ); - d.update_value( names::tau_fac.toString(), tau_fac_ ); + d.update_value( names::dU, U_ ); + d.update_value( names::u, u_ ); + d.update_value( names::tau_rec, tau_rec_ ); + d.update_value( names::tau_fac, tau_fac_ ); update_value_int( d, names::n, n_ ); update_value_int( d, names::a, a_ ); } diff --git a/models/rate_connection_delayed.h b/models/rate_connection_delayed.h index eb69dab56d..b99e5df4af 100644 --- a/models/rate_connection_delayed.h +++ b/models/rate_connection_delayed.h @@ -144,8 +144,8 @@ void RateConnectionDelayed< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -153,7 +153,7 @@ void RateConnectionDelayed< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); } } // namespace diff --git a/models/rate_connection_instantaneous.h b/models/rate_connection_instantaneous.h index 75f28e2435..30cc8c0071 100644 --- a/models/rate_connection_instantaneous.h +++ b/models/rate_connection_instantaneous.h @@ -152,8 +152,8 @@ void RateConnectionInstantaneous< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -161,7 +161,7 @@ void RateConnectionInstantaneous< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { // If the delay is set, we throw a BadProperty - if ( d.known( names::delay.toString() ) ) + if ( d.known( names::delay ) ) { throw BadProperty( "rate_connection_instantaneous has no delay. Please use " @@ -169,7 +169,7 @@ RateConnectionInstantaneous< targetidentifierT >::set_status( const dictionary& } ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); } } // namespace diff --git a/models/rate_neuron_ipn.h b/models/rate_neuron_ipn.h index bcd02374c8..43dee9c62e 100644 --- a/models/rate_neuron_ipn.h +++ b/models/rate_neuron_ipn.h @@ -36,8 +36,8 @@ #include "nest_types.h" #include "node.h" #include "random_generators.h" -#include "ring_buffer.h" #include "recordables_map.h" +#include "ring_buffer.h" #include "universal_data_logger.h" namespace nest @@ -116,8 +116,8 @@ class rate_neuron_ipn : public ArchivingNode * Hiding */ using Node::handle; - using Node::sends_secondary_event; using Node::handles_test_event; + using Node::sends_secondary_event; void handle( InstantaneousRateConnectionEvent& ); void handle( DelayedRateConnectionEvent& ); @@ -350,7 +350,7 @@ rate_neuron_ipn< TNonlinearities >::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); nonlinearities_.get( d ); } diff --git a/models/rate_neuron_ipn_impl.h b/models/rate_neuron_ipn_impl.h index 809994c9bc..74dc438b1b 100644 --- a/models/rate_neuron_ipn_impl.h +++ b/models/rate_neuron_ipn_impl.h @@ -34,8 +34,8 @@ #include // Includes from libnestutil: -#include "numerics.h" #include "dict_util.h" +#include "numerics.h" // Includes from nestkernel: #include "exceptions.h" @@ -91,35 +91,35 @@ template < class TNonlinearities > void nest::rate_neuron_ipn< TNonlinearities >::Parameters_::get( dictionary& d ) const { - d[ names::tau.toString() ] = tau_; - d[ names::lambda.toString() ] = lambda_; - d[ names::sigma.toString() ] = sigma_; - d[ names::mu.toString() ] = mu_; - d[ names::rectify_rate.toString() ] = rectify_rate_; - d[ names::linear_summation.toString() ] = linear_summation_; - d[ names::rectify_output.toString() ] = rectify_output_; - d[ names::mult_coupling.toString() ] = mult_coupling_; + d[ names::tau ] = tau_; + d[ names::lambda ] = lambda_; + d[ names::sigma ] = sigma_; + d[ names::mu ] = mu_; + d[ names::rectify_rate ] = rectify_rate_; + d[ names::linear_summation ] = linear_summation_; + d[ names::rectify_output ] = rectify_output_; + d[ names::mult_coupling ] = mult_coupling_; // Also allow old names (to not break old scripts) - d[ names::std.toString() ] = sigma_; - d[ names::mean.toString() ] = mu_; + d[ names::std ] = sigma_; + d[ names::mean ] = mu_; } template < class TNonlinearities > void nest::rate_neuron_ipn< TNonlinearities >::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::tau.toString(), tau_, node ); - update_value_param( d, names::lambda.toString(), lambda_, node ); - update_value_param( d, names::mu.toString(), mu_, node ); - update_value_param( d, names::rectify_rate.toString(), rectify_rate_, node ); - update_value_param( d, names::sigma.toString(), sigma_, node ); - update_value_param( d, names::linear_summation.toString(), linear_summation_, node ); - update_value_param( d, names::rectify_output.toString(), rectify_output_, node ); - update_value_param( d, names::mult_coupling.toString(), mult_coupling_, node ); + update_value_param( d, names::tau, tau_, node ); + update_value_param( d, names::lambda, lambda_, node ); + update_value_param( d, names::mu, mu_, node ); + update_value_param( d, names::rectify_rate, rectify_rate_, node ); + update_value_param( d, names::sigma, sigma_, node ); + update_value_param( d, names::linear_summation, linear_summation_, node ); + update_value_param( d, names::rectify_output, rectify_output_, node ); + update_value_param( d, names::mult_coupling, mult_coupling_, node ); // Check for old names - if ( update_value_param( d, names::mean.toString(), mu_, node ) ) + if ( update_value_param( d, names::mean, mu_, node ) ) { LOG( M_WARNING, "rate_neuron_ipn< TNonlinearities >::Parameters_::set", @@ -127,7 +127,7 @@ nest::rate_neuron_ipn< TNonlinearities >::Parameters_::set( const dictionary& d, "name from now on." ); } - if ( update_value_param( d, names::std.toString(), sigma_, node ) ) + if ( update_value_param( d, names::std, sigma_, node ) ) { LOG( M_WARNING, "rate_neuron_ipn< TNonlinearities >::Parameters_::set", @@ -158,15 +158,15 @@ template < class TNonlinearities > void nest::rate_neuron_ipn< TNonlinearities >::State_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_; // Rate - d[ names::noise.toString() ] = noise_; // Noise + d[ names::rate ] = rate_; // Rate + d[ names::noise ] = noise_; // Noise } template < class TNonlinearities > void nest::rate_neuron_ipn< TNonlinearities >::State_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::rate.toString(), rate_, node ); // Rate + update_value_param( d, names::rate, rate_, node ); // Rate } template < class TNonlinearities > diff --git a/models/rate_neuron_opn.h b/models/rate_neuron_opn.h index 40e065e680..8685468148 100644 --- a/models/rate_neuron_opn.h +++ b/models/rate_neuron_opn.h @@ -119,8 +119,8 @@ class rate_neuron_opn : public ArchivingNode * Hiding */ using Node::handle; - using Node::sends_secondary_event; using Node::handles_test_event; + using Node::sends_secondary_event; void handle( InstantaneousRateConnectionEvent& ); void handle( DelayedRateConnectionEvent& ); @@ -348,7 +348,7 @@ rate_neuron_opn< TNonlinearities >::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); nonlinearities_.get( d ); } diff --git a/models/rate_neuron_opn_impl.h b/models/rate_neuron_opn_impl.h index aeb6fd80ba..6eededfbb6 100644 --- a/models/rate_neuron_opn_impl.h +++ b/models/rate_neuron_opn_impl.h @@ -89,29 +89,29 @@ template < class TNonlinearities > void nest::rate_neuron_opn< TNonlinearities >::Parameters_::get( dictionary& d ) const { - d[ names::tau.toString() ] = tau_; - d[ names::sigma.toString() ] = sigma_; - d[ names::mu.toString() ] = mu_; - d[ names::linear_summation.toString() ] = linear_summation_; - d[ names::mult_coupling.toString() ] = mult_coupling_; + d[ names::tau ] = tau_; + d[ names::sigma ] = sigma_; + d[ names::mu ] = mu_; + d[ names::linear_summation ] = linear_summation_; + d[ names::mult_coupling ] = mult_coupling_; // Also allow old names (to not break old scripts) - d[ names::std.toString() ] = sigma_; - d[ names::mean.toString() ] = mu_; + d[ names::std ] = sigma_; + d[ names::mean ] = mu_; } template < class TNonlinearities > void nest::rate_neuron_opn< TNonlinearities >::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::tau.toString(), tau_, node ); - update_value_param( d, names::mu.toString(), mu_, node ); - update_value_param( d, names::sigma.toString(), sigma_, node ); - update_value_param( d, names::linear_summation.toString(), linear_summation_, node ); - update_value_param( d, names::mult_coupling.toString(), mult_coupling_, node ); + update_value_param( d, names::tau, tau_, node ); + update_value_param( d, names::mu, mu_, node ); + update_value_param( d, names::sigma, sigma_, node ); + update_value_param( d, names::linear_summation, linear_summation_, node ); + update_value_param( d, names::mult_coupling, mult_coupling_, node ); // Check for old names - if ( update_value_param( d, names::mean.toString(), mu_, node ) ) + if ( update_value_param( d, names::mean, mu_, node ) ) { LOG( M_WARNING, "rate_neuron_opn< TNonlinearities >::Parameters_::set", @@ -119,7 +119,7 @@ nest::rate_neuron_opn< TNonlinearities >::Parameters_::set( const dictionary& d, "name from now on." ); } - if ( update_value_param( d, names::std.toString(), sigma_, node ) ) + if ( update_value_param( d, names::std, sigma_, node ) ) { LOG( M_WARNING, "rate_neuron_opn< TNonlinearities >::Parameters_::set", @@ -142,16 +142,16 @@ template < class TNonlinearities > void nest::rate_neuron_opn< TNonlinearities >::State_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_; // Rate - d[ names::noise.toString() ] = noise_; // Noise - d[ names::noisy_rate.toString() ] = noisy_rate_; // Noisy rate + d[ names::rate ] = rate_; // Rate + d[ names::noise ] = noise_; // Noise + d[ names::noisy_rate ] = noisy_rate_; // Noisy rate } template < class TNonlinearities > void nest::rate_neuron_opn< TNonlinearities >::State_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::rate.toString(), rate_, node ); // Rate + update_value_param( d, names::rate, rate_, node ); // Rate } template < class TNonlinearities > diff --git a/models/rate_transformer_node.h b/models/rate_transformer_node.h index 5788d182da..8c5c14a324 100644 --- a/models/rate_transformer_node.h +++ b/models/rate_transformer_node.h @@ -116,8 +116,8 @@ class rate_transformer_node : public ArchivingNode */ using Node::handle; - using Node::sends_secondary_event; using Node::handles_test_event; + using Node::sends_secondary_event; void handle( InstantaneousRateConnectionEvent& ); void handle( DelayedRateConnectionEvent& ); @@ -297,7 +297,7 @@ rate_transformer_node< TNonlinearities >::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); nonlinearities_.get( d ); } diff --git a/models/rate_transformer_node_impl.h b/models/rate_transformer_node_impl.h index db3bfc4f2c..6545d47a74 100644 --- a/models/rate_transformer_node_impl.h +++ b/models/rate_transformer_node_impl.h @@ -34,8 +34,8 @@ #include // Includes from libnestutil: -#include "numerics.h" #include "dict_util.h" +#include "numerics.h" // Includes from nestkernel: @@ -83,28 +83,28 @@ template < class TNonlinearities > void nest::rate_transformer_node< TNonlinearities >::Parameters_::get( dictionary& d ) const { - d[ names::linear_summation.toString() ] = linear_summation_; + d[ names::linear_summation ] = linear_summation_; } template < class TNonlinearities > void nest::rate_transformer_node< TNonlinearities >::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::linear_summation.toString(), linear_summation_, node ); + update_value_param( d, names::linear_summation, linear_summation_, node ); } template < class TNonlinearities > void nest::rate_transformer_node< TNonlinearities >::State_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_; // Rate + d[ names::rate ] = rate_; // Rate } template < class TNonlinearities > void nest::rate_transformer_node< TNonlinearities >::State_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::rate.toString(), rate_, node ); // Rate + update_value_param( d, names::rate, rate_, node ); // Rate } template < class TNonlinearities > diff --git a/models/siegert_neuron.cpp b/models/siegert_neuron.cpp index eb9a6875eb..1a3cf63efa 100644 --- a/models/siegert_neuron.cpp +++ b/models/siegert_neuron.cpp @@ -110,25 +110,25 @@ nest::siegert_neuron::State_::State_() void nest::siegert_neuron::Parameters_::get( dictionary& d ) const { - d[ names::mean.toString() ] = mean_; - d[ names::theta.toString() ] = theta_; - d[ names::V_reset.toString() ] = V_reset_; - d[ names::tau.toString() ] = tau_; - d[ names::tau_m.toString() ] = tau_m_; - d[ names::tau_syn.toString() ] = tau_syn_; - d[ names::t_ref.toString() ] = t_ref_; + d[ names::mean ] = mean_; + d[ names::theta ] = theta_; + d[ names::V_reset ] = V_reset_; + d[ names::tau ] = tau_; + d[ names::tau_m ] = tau_m_; + d[ names::tau_syn ] = tau_syn_; + d[ names::t_ref ] = t_ref_; } void nest::siegert_neuron::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::mean.toString(), mean_, node ); - update_value_param( d, names::theta.toString(), theta_, node ); - update_value_param( d, names::V_reset.toString(), V_reset_, node ); - update_value_param( d, names::tau.toString(), tau_, node ); - update_value_param( d, names::tau_m.toString(), tau_m_, node ); - update_value_param( d, names::tau_syn.toString(), tau_syn_, node ); - update_value_param( d, names::t_ref.toString(), t_ref_, node ); + update_value_param( d, names::mean, mean_, node ); + update_value_param( d, names::theta, theta_, node ); + update_value_param( d, names::V_reset, V_reset_, node ); + update_value_param( d, names::tau, tau_, node ); + update_value_param( d, names::tau_m, tau_m_, node ); + update_value_param( d, names::tau_syn, tau_syn_, node ); + update_value_param( d, names::t_ref, t_ref_, node ); if ( V_reset_ >= theta_ ) { @@ -159,13 +159,13 @@ nest::siegert_neuron::Parameters_::set( const dictionary& d, Node* node ) void nest::siegert_neuron::State_::get( dictionary& d ) const { - d[ names::rate.toString() ] = r_; // Rate + d[ names::rate ] = r_; // Rate } void nest::siegert_neuron::State_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::rate.toString(), r_, node ); // Rate + update_value_param( d, names::rate, r_, node ); // Rate } nest::siegert_neuron::Buffers_::Buffers_( siegert_neuron& n ) diff --git a/models/siegert_neuron.h b/models/siegert_neuron.h index d0e92a515b..7b4055b360 100644 --- a/models/siegert_neuron.h +++ b/models/siegert_neuron.h @@ -337,7 +337,7 @@ siegert_neuron::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); ArchivingNode::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/sigmoid_rate.cpp b/models/sigmoid_rate.cpp index 232d1301c3..89973516f5 100644 --- a/models/sigmoid_rate.cpp +++ b/models/sigmoid_rate.cpp @@ -28,17 +28,17 @@ namespace nest void nonlinearities_sigmoid_rate::get( dictionary& d ) const { - d[ names::g.toString() ] = g_; - d[ names::beta.toString() ] = beta_; - d[ names::theta.toString() ] = theta_; + d[ names::g ] = g_; + d[ names::beta ] = beta_; + d[ names::theta ] = theta_; } void nonlinearities_sigmoid_rate::set( const dictionary& d, Node* node ) { - update_value_param( d, names::g.toString(), g_, node ); - update_value_param( d, names::beta.toString(), beta_, node ); - update_value_param( d, names::theta.toString(), theta_, node ); + update_value_param( d, names::g, g_, node ); + update_value_param( d, names::beta, beta_, node ); + update_value_param( d, names::theta, theta_, node ); } /* diff --git a/models/sigmoid_rate_gg_1998.cpp b/models/sigmoid_rate_gg_1998.cpp index 6fc2356912..dca40c4606 100644 --- a/models/sigmoid_rate_gg_1998.cpp +++ b/models/sigmoid_rate_gg_1998.cpp @@ -28,13 +28,13 @@ namespace nest void nonlinearities_sigmoid_rate_gg_1998::get( dictionary& d ) const { - d[ names::g.toString() ] = g_; + d[ names::g ] = g_; } void nonlinearities_sigmoid_rate_gg_1998::set( const dictionary& d, Node* node ) { - update_value_param( d, names::g.toString(), g_, node ); + update_value_param( d, names::g, g_, node ); } /* diff --git a/models/sinusoidal_gamma_generator.cpp b/models/sinusoidal_gamma_generator.cpp index 9c3ea47dc4..3747513532 100644 --- a/models/sinusoidal_gamma_generator.cpp +++ b/models/sinusoidal_gamma_generator.cpp @@ -41,10 +41,10 @@ #include "universal_data_logger_impl.h" // Includes from sli: +#include "booldatum.h" #include "dict.h" #include "dictutils.h" #include "doubledatum.h" -#include "booldatum.h" namespace nest { @@ -81,8 +81,8 @@ nest::sinusoidal_gamma_generator::Parameters_::Parameters_( const Parameters_& p { } -nest::sinusoidal_gamma_generator::Parameters_& nest::sinusoidal_gamma_generator::Parameters_::operator=( - const Parameters_& p ) +nest::sinusoidal_gamma_generator::Parameters_& +nest::sinusoidal_gamma_generator::Parameters_::operator=( const Parameters_& p ) { if ( this == &p ) { @@ -131,12 +131,12 @@ nest::sinusoidal_gamma_generator::Buffers_::Buffers_( const Buffers_& b, sinusoi void nest::sinusoidal_gamma_generator::Parameters_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_ * 1000.0; - d[ names::frequency.toString() ] = om_ / ( 2.0 * numerics::pi / 1000.0 ); - d[ names::phase.toString() ] = 180.0 / numerics::pi * phi_; - d[ names::amplitude.toString() ] = amplitude_ * 1000.0; - d[ names::order.toString() ] = order_; - d[ names::individual_spike_trains.toString() ] = individual_spike_trains_; + d[ names::rate ] = rate_ * 1000.0; + d[ names::frequency ] = om_ / ( 2.0 * numerics::pi / 1000.0 ); + d[ names::phase ] = 180.0 / numerics::pi * phi_; + d[ names::amplitude ] = amplitude_ * 1000.0; + d[ names::order ] = order_; + d[ names::individual_spike_trains ] = individual_spike_trains_; } void @@ -144,14 +144,14 @@ nest::sinusoidal_gamma_generator::Parameters_::set( const dictionary& d, const sinusoidal_gamma_generator& n, Node* node ) { - if ( not n.is_model_prototype() && d.known( names::individual_spike_trains.toString() ) ) + if ( not n.is_model_prototype() && d.known( names::individual_spike_trains ) ) { throw BadProperty( "The individual_spike_trains property can only be set as" " a model default using SetDefaults or upon CopyModel." ); } - if ( d.update_value( names::individual_spike_trains.toString(), individual_spike_trains_ ) ) + if ( d.update_value( names::individual_spike_trains, individual_spike_trains_ ) ) { // this can happen only on model prototypes if ( individual_spike_trains_ ) @@ -166,17 +166,17 @@ nest::sinusoidal_gamma_generator::Parameters_::set( const dictionary& d, } } - if ( update_value_param( d, names::frequency.toString(), om_, node ) ) + if ( update_value_param( d, names::frequency, om_, node ) ) { om_ *= 2.0 * numerics::pi / 1000.0; } - if ( update_value_param( d, names::phase.toString(), phi_, node ) ) + if ( update_value_param( d, names::phase, phi_, node ) ) { phi_ *= numerics::pi / 180.0; } - if ( update_value_param( d, names::order.toString(), order_, node ) ) + if ( update_value_param( d, names::order, order_, node ) ) { if ( order_ < 1.0 ) { @@ -188,13 +188,13 @@ nest::sinusoidal_gamma_generator::Parameters_::set( const dictionary& d, floating-point comparison issues under 32-bit Linux. */ double dc_unscaled = 1e3 * rate_; - if ( update_value_param( d, names::rate.toString(), dc_unscaled, node ) ) + if ( update_value_param( d, names::rate, dc_unscaled, node ) ) { rate_ = 1e-3 * dc_unscaled; // scale to 1/ms } double ac_unscaled = 1e3 * amplitude_; - if ( update_value_param( d, names::amplitude.toString(), ac_unscaled, node ) ) + if ( update_value_param( d, names::amplitude, ac_unscaled, node ) ) { amplitude_ = 1e-3 * ac_unscaled; // scale to 1/ms } @@ -384,12 +384,12 @@ nest::sinusoidal_gamma_generator::set_data_from_stimulation_backend( std::vector } dictionary d; ( new Dictionary ); - d[ names::frequency.toString() ] = DoubleDatum( input_param[ 0 ] ); - d[ names::phase.toString() ] = DoubleDatum( input_param[ 1 ] ); - d[ names::order.toString() ] = DoubleDatum( input_param[ 2 ] ); - d[ names::rate.toString() ] = DoubleDatum( input_param[ 3 ] ); - d[ names::amplitude.toString() ] = DoubleDatum( input_param[ 4 ] ); - d[ names::individual_spike_trains.toString() ] = BoolDatum( input_param[ 5 ] ); + d[ names::frequency ] = DoubleDatum( input_param[ 0 ] ); + d[ names::phase ] = DoubleDatum( input_param[ 1 ] ); + d[ names::order ] = DoubleDatum( input_param[ 2 ] ); + d[ names::rate ] = DoubleDatum( input_param[ 3 ] ); + d[ names::amplitude ] = DoubleDatum( input_param[ 4 ] ); + d[ names::individual_spike_trains ] = BoolDatum( input_param[ 5 ] ); ptmp.set( d, *this, this ); } diff --git a/models/sinusoidal_gamma_generator.h b/models/sinusoidal_gamma_generator.h index ae445b5d84..8fa24c4f6f 100644 --- a/models/sinusoidal_gamma_generator.h +++ b/models/sinusoidal_gamma_generator.h @@ -199,9 +199,9 @@ class sinusoidal_gamma_generator : public StimulationDevice * @see Technical Issues / Virtual Functions: Overriding, Overloading, and * Hiding */ + using Node::event_hook; using Node::handle; using Node::handles_test_event; - using Node::event_hook; void handle( DataLoggingRequest& ) override; @@ -398,7 +398,7 @@ sinusoidal_gamma_generator::get_status( dictionary& d ) const { P_.get( d ); StimulationDevice::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/sinusoidal_poisson_generator.cpp b/models/sinusoidal_poisson_generator.cpp index cf5ce74e26..481d6fac68 100644 --- a/models/sinusoidal_poisson_generator.cpp +++ b/models/sinusoidal_poisson_generator.cpp @@ -39,11 +39,11 @@ // Includes from sli: #include "arraydatum.h" +#include "booldatum.h" #include "dict.h" #include "dictutils.h" #include "doubledatum.h" #include "integerdatum.h" -#include "booldatum.h" namespace nest { @@ -79,8 +79,8 @@ nest::sinusoidal_poisson_generator::Parameters_::Parameters_( const Parameters_& { } -nest::sinusoidal_poisson_generator::Parameters_& nest::sinusoidal_poisson_generator::Parameters_::operator=( - const Parameters_& p ) +nest::sinusoidal_poisson_generator::Parameters_& +nest::sinusoidal_poisson_generator::Parameters_::operator=( const Parameters_& p ) { if ( this == &p ) { @@ -122,18 +122,18 @@ nest::sinusoidal_poisson_generator::Buffers_::Buffers_( const Buffers_&, sinusoi void nest::sinusoidal_poisson_generator::Parameters_::get( dictionary& d ) const { - d[ names::rate.toString() ] = rate_ * 1000.0; - d[ names::frequency.toString() ] = om_ / ( 2.0 * numerics::pi / 1000.0 ); - d[ names::phase.toString() ] = 180.0 / numerics::pi * phi_; - d[ names::amplitude.toString() ] = amplitude_ * 1000.0; - d[ names::individual_spike_trains.toString() ] = individual_spike_trains_; + d[ names::rate ] = rate_ * 1000.0; + d[ names::frequency ] = om_ / ( 2.0 * numerics::pi / 1000.0 ); + d[ names::phase ] = 180.0 / numerics::pi * phi_; + d[ names::amplitude ] = amplitude_ * 1000.0; + d[ names::individual_spike_trains ] = individual_spike_trains_; } void nest::sinusoidal_poisson_generator::State_::get( dictionary& d ) const { - d[ names::y_0.toString() ] = y_0_; - d[ names::y_1.toString() ] = y_1_; + d[ names::y_0 ] = y_0_; + d[ names::y_1 ] = y_1_; } void @@ -141,31 +141,31 @@ nest::sinusoidal_poisson_generator::Parameters_::set( const dictionary& d, const sinusoidal_poisson_generator& n, Node* node ) { - if ( not n.is_model_prototype() && d.known( names::individual_spike_trains.toString() ) ) + if ( not n.is_model_prototype() && d.known( names::individual_spike_trains ) ) { throw BadProperty( "The individual_spike_trains property can only be set as" " a model default using SetDefaults or upon CopyModel." ); } - d.update_value( names::individual_spike_trains.toString(), individual_spike_trains_ ); + d.update_value( names::individual_spike_trains, individual_spike_trains_ ); - if ( update_value_param( d, names::rate.toString(), rate_, node ) ) + if ( update_value_param( d, names::rate, rate_, node ) ) { rate_ /= 1000.0; // scale to ms^-1 } - if ( update_value_param( d, names::frequency.toString(), om_, node ) ) + if ( update_value_param( d, names::frequency, om_, node ) ) { om_ *= 2.0 * numerics::pi / 1000.0; } - if ( update_value_param( d, names::phase.toString(), phi_, node ) ) + if ( update_value_param( d, names::phase, phi_, node ) ) { phi_ *= numerics::pi / 180.0; } - if ( update_value_param( d, names::amplitude.toString(), amplitude_, node ) ) + if ( update_value_param( d, names::amplitude, amplitude_, node ) ) { amplitude_ /= 1000.0; } @@ -326,11 +326,11 @@ nest::sinusoidal_poisson_generator::set_data_from_stimulation_backend( std::vect } dictionary d; ( new Dictionary ); - d[ names::rate.toString() ] = DoubleDatum( input_param[ 0 ] ); - d[ names::frequency.toString() ] = DoubleDatum( input_param[ 1 ] ); - d[ names::phase.toString() ] = DoubleDatum( input_param[ 2 ] ); - d[ names::amplitude.toString() ] = DoubleDatum( input_param[ 3 ] ); - d[ names::individual_spike_trains.toString() ] = BoolDatum( input_param[ 4 ] ); + d[ names::rate ] = DoubleDatum( input_param[ 0 ] ); + d[ names::frequency ] = DoubleDatum( input_param[ 1 ] ); + d[ names::phase ] = DoubleDatum( input_param[ 2 ] ); + d[ names::amplitude ] = DoubleDatum( input_param[ 3 ] ); + d[ names::individual_spike_trains ] = BoolDatum( input_param[ 4 ] ); ptmp.set( d, *this, this ); } diff --git a/models/sinusoidal_poisson_generator.h b/models/sinusoidal_poisson_generator.h index e4c6734c7e..4e3b0c36f7 100644 --- a/models/sinusoidal_poisson_generator.h +++ b/models/sinusoidal_poisson_generator.h @@ -135,9 +135,9 @@ class sinusoidal_poisson_generator : public StimulationDevice * @see Technical Issues / Virtual Functions: Overriding, Overloading, and * Hiding */ + using Node::event_hook; using Node::handle; using Node::handles_test_event; - using Node::event_hook; void handle( DataLoggingRequest& ) override; @@ -308,7 +308,7 @@ sinusoidal_poisson_generator::get_status( dictionary& d ) const P_.get( d ); S_.get( d ); StimulationDevice::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/spike_dilutor.cpp b/models/spike_dilutor.cpp index f8b38f8e85..2bf73e7af4 100644 --- a/models/spike_dilutor.cpp +++ b/models/spike_dilutor.cpp @@ -50,13 +50,13 @@ nest::spike_dilutor::Parameters_::Parameters_() void nest::spike_dilutor::Parameters_::get( dictionary& d ) const { - d[ names::p_copy.toString() ] = p_copy_; + d[ names::p_copy ] = p_copy_; } void nest::spike_dilutor::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::p_copy.toString(), p_copy_, node ); + update_value_param( d, names::p_copy, p_copy_, node ); if ( p_copy_ < 0 || p_copy_ > 1 ) { throw BadProperty( "Copy probability must be in [0, 1]." ); diff --git a/models/spike_generator.cpp b/models/spike_generator.cpp index 52c83ae3a0..9b7695c1ba 100644 --- a/models/spike_generator.cpp +++ b/models/spike_generator.cpp @@ -80,12 +80,12 @@ nest::spike_generator::Parameters_::get( dictionary& d ) const ( *times_ms )[ n ] -= spike_offsets_[ n ]; } } - d[ names::spike_times.toString() ] = DoubleVectorDatum( times_ms ); - d[ names::spike_weights.toString() ] = DoubleVectorDatum( new std::vector< double >( spike_weights_ ) ); - d[ names::spike_multiplicities.toString() ] = IntVectorDatum( new std::vector< long >( spike_multiplicities_ ) ); - d[ names::precise_times.toString() ] = BoolDatum( precise_times_ ); - d[ names::allow_offgrid_times.toString() ] = BoolDatum( allow_offgrid_times_ ); - d[ names::shift_now_spikes.toString() ] = BoolDatum( shift_now_spikes_ ); + d[ names::spike_times ] = DoubleVectorDatum( times_ms ); + d[ names::spike_weights ] = DoubleVectorDatum( new std::vector< double >( spike_weights_ ) ); + d[ names::spike_multiplicities ] = IntVectorDatum( new std::vector< long >( spike_multiplicities_ ) ); + d[ names::precise_times ] = BoolDatum( precise_times_ ); + d[ names::allow_offgrid_times ] = BoolDatum( allow_offgrid_times_ ); + d[ names::shift_now_spikes ] = BoolDatum( shift_now_spikes_ ); } void @@ -160,10 +160,9 @@ nest::spike_generator::Parameters_::set( const dictionary& d, const Time& now, Node* node ) { - bool precise_times_changed = update_value_param( d, names::precise_times.toString(), precise_times_, node ); - bool shift_now_spikes_changed = update_value_param( d, names::shift_now_spikes.toString(), shift_now_spikes_, node ); - bool allow_offgrid_times_changed = - update_value_param( d, names::allow_offgrid_times.toString(), allow_offgrid_times_, node ); + bool precise_times_changed = update_value_param( d, names::precise_times, precise_times_, node ); + bool shift_now_spikes_changed = update_value_param( d, names::shift_now_spikes, shift_now_spikes_, node ); + bool allow_offgrid_times_changed = update_value_param( d, names::allow_offgrid_times, allow_offgrid_times_, node ); bool flags_changed = precise_times_changed or shift_now_spikes_changed or allow_offgrid_times_changed; if ( precise_times_ && ( allow_offgrid_times_ || shift_now_spikes_ ) ) { @@ -172,7 +171,7 @@ nest::spike_generator::Parameters_::set( const dictionary& d, "allow_offgrid_times or shift_now_spikes is set to true." ); } - const bool updated_spike_times = d.known( names::spike_times.toString() ); + const bool updated_spike_times = d.known( names::spike_times ); if ( flags_changed && not( updated_spike_times || spike_stamps_.empty() ) ) { throw BadProperty( @@ -182,7 +181,7 @@ nest::spike_generator::Parameters_::set( const dictionary& d, if ( updated_spike_times ) { - const auto d_times = d.get< std::vector< double > >( names::spike_times.toString() ); + const auto d_times = d.get< std::vector< double > >( names::spike_times ); const size_t n_spikes = d_times.size(); spike_stamps_.clear(); spike_stamps_.reserve( n_spikes ); @@ -216,10 +215,10 @@ nest::spike_generator::Parameters_::set( const dictionary& d, // spike_weights can be the same size as spike_times, or can be of size 0 to // only use the spike_times array - bool updated_spike_weights = d.known( names::spike_weights.toString() ); + bool updated_spike_weights = d.known( names::spike_weights ); if ( updated_spike_weights ) { - auto spike_weights = d.get< std::vector< double > >( names::spike_weights.toString() ); + auto spike_weights = d.get< std::vector< double > >( names::spike_weights ); if ( spike_weights.empty() ) { @@ -240,10 +239,10 @@ nest::spike_generator::Parameters_::set( const dictionary& d, // spike_multiplicities can be the same size as spike_times, // or can be of size 0 to only use the spike_times array - bool updated_spike_multiplicities = d.known( names::spike_multiplicities.toString() ); + bool updated_spike_multiplicities = d.known( names::spike_multiplicities ); if ( updated_spike_multiplicities ) { - auto spike_multiplicities = d.get< std::vector< long > >( names::spike_multiplicities.toString() ); + auto spike_multiplicities = d.get< std::vector< long > >( names::spike_multiplicities ); if ( spike_multiplicities.empty() ) { @@ -263,8 +262,7 @@ nest::spike_generator::Parameters_::set( const dictionary& d, } // Set position to start if something changed - if ( updated_spike_times || updated_spike_weights || updated_spike_multiplicities - || d.known( names::origin.toString() ) ) + if ( updated_spike_times || updated_spike_weights || updated_spike_multiplicities || d.known( names::origin ) ) { s.position_ = 0; } @@ -422,7 +420,7 @@ nest::spike_generator::set_data_from_stimulation_backend( std::vector< double >& times_ms.push_back( P_.spike_stamps_[ n ].get_ms() ); } std::copy( input_spikes.begin(), input_spikes.end(), std::back_inserter( times_ms ) ); - d[ names::spike_times.toString() ] = DoubleVectorDatum( times_ms ); + d[ names::spike_times ] = DoubleVectorDatum( times_ms ); ptmp.set( d, S_, origin, Time::step( times_ms[ times_ms.size() - 1 ] ), this ); } diff --git a/models/spike_generator.h b/models/spike_generator.h index b8d558f34e..4ca40235ff 100644 --- a/models/spike_generator.h +++ b/models/spike_generator.h @@ -348,7 +348,7 @@ nest::spike_generator::set_status( const dictionary& d ) // it is set in this call, we need to extract it explicitly here. Time origin; double v; - if ( d.update_value( names::origin.toString(), v ) ) + if ( d.update_value( names::origin, v ) ) { origin = Time::ms( v ); } diff --git a/models/static_synapse.h b/models/static_synapse.h index cba25b862a..bba7e43385 100644 --- a/models/static_synapse.h +++ b/models/static_synapse.h @@ -173,8 +173,8 @@ static_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -182,7 +182,7 @@ void static_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); } } // namespace diff --git a/models/static_synapse_hom_w.h b/models/static_synapse_hom_w.h index 5f8f43e8a1..7ae8b9f54a 100644 --- a/models/static_synapse_hom_w.h +++ b/models/static_synapse_hom_w.h @@ -76,9 +76,9 @@ class static_synapse_hom_w : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; - using ConnectionBase::get_delay_steps; class ConnTestDummyNode : public ConnTestDummyNodeBase { @@ -144,7 +144,7 @@ class static_synapse_hom_w : public Connection< targetidentifierT > void check_synapse_params( const dictionary& syn_spec ) const { - if ( syn_spec.known( names::weight.toString() ) ) + if ( syn_spec.known( names::weight ) ) { throw BadProperty( "Weight cannot be specified since it needs to be equal " @@ -184,7 +184,7 @@ void static_synapse_hom_w< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::size_of ] = sizeof( *this ); } } // namespace diff --git a/models/stdp_dopamine_synapse.cpp b/models/stdp_dopamine_synapse.cpp index 904a1a726e..aea61d8dbc 100644 --- a/models/stdp_dopamine_synapse.cpp +++ b/models/stdp_dopamine_synapse.cpp @@ -57,21 +57,21 @@ STDPDopaCommonProperties::get_status( dictionary& d ) const CommonSynapseProperties::get_status( d ); if ( vt_ != 0 ) { - d[ names::vt.toString() ] = vt_->get_node_id(); + d[ names::vt ] = vt_->get_node_id(); } else { - d[ names::vt.toString() ] = -1; + d[ names::vt ] = -1; } - d[ names::A_plus.toString() ] = A_plus_; - d[ names::A_minus.toString() ] = A_minus_; - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::tau_c.toString() ] = tau_c_; - d[ names::tau_n.toString() ] = tau_n_; - d[ names::b.toString() ] = b_; - d[ names::Wmin.toString() ] = Wmin_; - d[ names::Wmax.toString() ] = Wmax_; + d[ names::A_plus ] = A_plus_; + d[ names::A_minus ] = A_minus_; + d[ names::tau_plus ] = tau_plus_; + d[ names::tau_c ] = tau_c_; + d[ names::tau_n ] = tau_n_; + d[ names::b ] = b_; + d[ names::Wmin ] = Wmin_; + d[ names::Wmax ] = Wmax_; } void @@ -80,7 +80,7 @@ STDPDopaCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) CommonSynapseProperties::set_status( d, cm ); long vtnode_id; - if ( d.update_value( names::vt.toString(), vtnode_id ) ) + if ( d.update_value( names::vt, vtnode_id ) ) { const thread tid = kernel().vp_manager.get_thread_id(); Node* vt = kernel().node_manager.get_node_or_proxy( vtnode_id, tid ); @@ -91,14 +91,14 @@ STDPDopaCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) } } - d.update_value( names::A_plus.toString(), A_plus_ ); - d.update_value( names::A_minus.toString(), A_minus_ ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::tau_c.toString(), tau_c_ ); - d.update_value( names::tau_n.toString(), tau_n_ ); - d.update_value( names::b.toString(), b_ ); - d.update_value( names::Wmin.toString(), Wmin_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::A_plus, A_plus_ ); + d.update_value( names::A_minus, A_minus_ ); + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::tau_c, tau_c_ ); + d.update_value( names::tau_n, tau_n_ ); + d.update_value( names::b, b_ ); + d.update_value( names::Wmin, Wmin_ ); + d.update_value( names::Wmax, Wmax_ ); } Node* diff --git a/models/stdp_dopamine_synapse.h b/models/stdp_dopamine_synapse.h index baa85166a2..a32249d025 100644 --- a/models/stdp_dopamine_synapse.h +++ b/models/stdp_dopamine_synapse.h @@ -354,11 +354,11 @@ stdp_dopamine_synapse< targetidentifierT >::get_status( dictionary& d ) const // base class properties, different for individual synapse ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; + d[ names::weight ] = weight_; // own properties, different for individual synapse - d[ names::c.toString() ] = c_; - d[ names::n.toString() ] = n_; + d[ names::c ] = c_; + d[ names::n ] = n_; } template < typename targetidentifierT > @@ -367,17 +367,17 @@ stdp_dopamine_synapse< targetidentifierT >::set_status( const dictionary& d, Con { // base class properties ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); - d.update_value( names::c.toString(), c_ ); - d.update_value( names::n.toString(), n_ ); + d.update_value( names::c, c_ ); + d.update_value( names::n, n_ ); } template < typename targetidentifierT > void stdp_dopamine_synapse< targetidentifierT >::check_synapse_params( const dictionary& syn_spec ) const { - if ( syn_spec.known( names::vt.toString() ) ) + if ( syn_spec.known( names::vt ) ) { throw NotImplemented( "Connect doesn't support the direct specification of the " @@ -387,14 +387,14 @@ stdp_dopamine_synapse< targetidentifierT >::check_synapse_params( const dictiona // Setting of parameter c and n not thread safe. if ( kernel().vp_manager.get_num_threads() > 1 ) { - if ( syn_spec.known( names::c.toString() ) ) + if ( syn_spec.known( names::c ) ) { throw NotImplemented( "For multi-threading Connect doesn't support the setting " "of parameter c in stdp_dopamine_synapse. " "Use SetDefaults() or CopyModel()." ); } - if ( syn_spec.known( names::n.toString() ) ) + if ( syn_spec.known( names::n ) ) { throw NotImplemented( "For multi-threading Connect doesn't support the setting " @@ -435,8 +435,9 @@ stdp_dopamine_synapse< targetidentifierT >::update_weight_( double c0, { const double taus_ = ( cp.tau_c_ + cp.tau_n_ ) / ( cp.tau_c_ * cp.tau_n_ ); weight_ = weight_ - - c0 * ( n0 / taus_ * numerics::expm1( taus_ * minus_dt ) - - cp.b_ * cp.tau_c_ * numerics::expm1( minus_dt / cp.tau_c_ ) ); + - c0 + * ( n0 / taus_ * numerics::expm1( taus_ * minus_dt ) + - cp.b_ * cp.tau_c_ * numerics::expm1( minus_dt / cp.tau_c_ ) ); if ( weight_ < cp.Wmin_ ) { diff --git a/models/stdp_nn_pre_centered_synapse.h b/models/stdp_nn_pre_centered_synapse.h index dd46be3087..609931fc40 100644 --- a/models/stdp_nn_pre_centered_synapse.h +++ b/models/stdp_nn_pre_centered_synapse.h @@ -147,8 +147,8 @@ class stdp_nn_pre_centered_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -325,14 +325,14 @@ void stdp_nn_pre_centered_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::lambda.toString() ] = lambda_; - d[ names::alpha.toString() ] = alpha_; - d[ names::mu_plus.toString() ] = mu_plus_; - d[ names::mu_minus.toString() ] = mu_minus_; - d[ names::Wmax.toString() ] = Wmax_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::tau_plus ] = tau_plus_; + d[ names::lambda ] = lambda_; + d[ names::alpha ] = alpha_; + d[ names::mu_plus ] = mu_plus_; + d[ names::mu_minus ] = mu_minus_; + d[ names::Wmax ] = Wmax_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -340,13 +340,13 @@ void stdp_nn_pre_centered_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::lambda.toString(), lambda_ ); - d.update_value( names::alpha.toString(), alpha_ ); - d.update_value( names::mu_plus.toString(), mu_plus_ ); - d.update_value( names::mu_minus.toString(), mu_minus_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::lambda, lambda_ ); + d.update_value( names::alpha, alpha_ ); + d.update_value( names::mu_plus, mu_plus_ ); + d.update_value( names::mu_minus, mu_minus_ ); + d.update_value( names::Wmax, Wmax_ ); // check if weight_ and Wmax_ have the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/stdp_nn_restr_synapse.h b/models/stdp_nn_restr_synapse.h index 22d30d07bc..25af60b454 100644 --- a/models/stdp_nn_restr_synapse.h +++ b/models/stdp_nn_restr_synapse.h @@ -142,8 +142,8 @@ class stdp_nn_restr_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -281,7 +281,7 @@ stdp_nn_restr_synapse< targetidentifierT >::send( Event& e, thread t, const Comm value_to_throw_away, // discard Kminus nearest_neighbor_Kminus, value_to_throw_away // discard Kminus_triplet - ); + ); weight_ = depress_( weight_, nearest_neighbor_Kminus ); } @@ -316,14 +316,14 @@ void stdp_nn_restr_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::lambda.toString() ] = lambda_; - d[ names::alpha.toString() ] = alpha_; - d[ names::mu_plus.toString() ] = mu_plus_; - d[ names::mu_minus.toString() ] = mu_minus_; - d[ names::Wmax.toString() ] = Wmax_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::tau_plus ] = tau_plus_; + d[ names::lambda ] = lambda_; + d[ names::alpha ] = alpha_; + d[ names::mu_plus ] = mu_plus_; + d[ names::mu_minus ] = mu_minus_; + d[ names::Wmax ] = Wmax_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -331,13 +331,13 @@ void stdp_nn_restr_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::lambda.toString(), lambda_ ); - d.update_value( names::alpha.toString(), alpha_ ); - d.update_value( names::mu_plus.toString(), mu_plus_ ); - d.update_value( names::mu_minus.toString(), mu_minus_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::lambda, lambda_ ); + d.update_value( names::alpha, alpha_ ); + d.update_value( names::mu_plus, mu_plus_ ); + d.update_value( names::mu_minus, mu_minus_ ); + d.update_value( names::Wmax, Wmax_ ); // check if weight_ and Wmax_ have the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/stdp_nn_symm_synapse.h b/models/stdp_nn_symm_synapse.h index b2ef5412e3..cb8ecb05a6 100644 --- a/models/stdp_nn_symm_synapse.h +++ b/models/stdp_nn_symm_synapse.h @@ -144,8 +144,8 @@ class stdp_nn_symm_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -228,7 +228,7 @@ class stdp_nn_symm_synapse : public Connection< targetidentifierT > * Send an event to the receiver of this connection. * \param e The event to send * \param t The thread on which this connection is stored. - * \param cp Common properties object, containing the stdp parameters. + * \param cp Common properties object, containing the stdp parameters. */ template < typename targetidentifierT > inline void @@ -306,14 +306,14 @@ void stdp_nn_symm_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::lambda.toString() ] = lambda_; - d[ names::alpha.toString() ] = alpha_; - d[ names::mu_plus.toString() ] = mu_plus_; - d[ names::mu_minus.toString() ] = mu_minus_; - d[ names::Wmax.toString() ] = Wmax_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::tau_plus ] = tau_plus_; + d[ names::lambda ] = lambda_; + d[ names::alpha ] = alpha_; + d[ names::mu_plus ] = mu_plus_; + d[ names::mu_minus ] = mu_minus_; + d[ names::Wmax ] = Wmax_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -321,13 +321,13 @@ void stdp_nn_symm_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::lambda.toString(), lambda_ ); - d.update_value( names::alpha.toString(), alpha_ ); - d.update_value( names::mu_plus.toString(), mu_plus_ ); - d.update_value( names::mu_minus.toString(), mu_minus_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::lambda, lambda_ ); + d.update_value( names::alpha, alpha_ ); + d.update_value( names::mu_plus, mu_plus_ ); + d.update_value( names::mu_minus, mu_minus_ ); + d.update_value( names::Wmax, Wmax_ ); // check if weight_ and Wmax_ have the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/stdp_pl_synapse_hom.cpp b/models/stdp_pl_synapse_hom.cpp index 62707b7ba3..b8183b86ac 100644 --- a/models/stdp_pl_synapse_hom.cpp +++ b/models/stdp_pl_synapse_hom.cpp @@ -53,10 +53,10 @@ STDPPLHomCommonProperties::get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::lambda.toString() ] = lambda_; - d[ names::alpha.toString() ] = alpha_; - d[ names::mu.toString() ] = mu_; + d[ names::tau_plus ] = tau_plus_; + d[ names::lambda ] = lambda_; + d[ names::alpha ] = alpha_; + d[ names::mu ] = mu_; } void @@ -64,7 +64,7 @@ STDPPLHomCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); + d.update_value( names::tau_plus, tau_plus_ ); if ( tau_plus_ > 0. ) { tau_plus_inv_ = 1. / tau_plus_; @@ -73,9 +73,9 @@ STDPPLHomCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { throw BadProperty( "tau_plus > 0. required." ); } - d.update_value( names::lambda.toString(), lambda_ ); - d.update_value( names::alpha.toString(), alpha_ ); - d.update_value( names::mu.toString(), mu_ ); + d.update_value( names::lambda, lambda_ ); + d.update_value( names::alpha, alpha_ ); + d.update_value( names::mu, mu_ ); } } // of namespace nest diff --git a/models/stdp_pl_synapse_hom.h b/models/stdp_pl_synapse_hom.h index 27b63447a6..a1e5a32f12 100644 --- a/models/stdp_pl_synapse_hom.h +++ b/models/stdp_pl_synapse_hom.h @@ -303,11 +303,11 @@ stdp_pl_synapse_hom< targetidentifierT >::get_status( dictionary& d ) const // base class properties, different for individual synapse ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; + d[ names::weight ] = weight_; // own properties, different for individual synapse - d[ names::Kplus.toString() ] = Kplus_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::Kplus ] = Kplus_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -316,9 +316,9 @@ stdp_pl_synapse_hom< targetidentifierT >::set_status( const dictionary& d, Conne { // base class properties ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); - d.update_value( names::Kplus.toString(), Kplus_ ); + d.update_value( names::Kplus, Kplus_ ); } } // of namespace nest diff --git a/models/stdp_synapse.h b/models/stdp_synapse.h index 8ac5326e7b..1719c73037 100644 --- a/models/stdp_synapse.h +++ b/models/stdp_synapse.h @@ -132,8 +132,8 @@ class stdp_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -293,14 +293,14 @@ void stdp_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::lambda.toString() ] = lambda_; - d[ names::alpha.toString() ] = alpha_; - d[ names::mu_plus.toString() ] = mu_plus_; - d[ names::mu_minus.toString() ] = mu_minus_; - d[ names::Wmax.toString() ] = Wmax_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::tau_plus ] = tau_plus_; + d[ names::lambda ] = lambda_; + d[ names::alpha ] = alpha_; + d[ names::mu_plus ] = mu_plus_; + d[ names::mu_minus ] = mu_minus_; + d[ names::Wmax ] = Wmax_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -308,13 +308,13 @@ void stdp_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::lambda.toString(), lambda_ ); - d.update_value( names::alpha.toString(), alpha_ ); - d.update_value( names::mu_plus.toString(), mu_plus_ ); - d.update_value( names::mu_minus.toString(), mu_minus_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::lambda, lambda_ ); + d.update_value( names::alpha, alpha_ ); + d.update_value( names::mu_plus, mu_plus_ ); + d.update_value( names::mu_minus, mu_minus_ ); + d.update_value( names::Wmax, Wmax_ ); // check if weight_ and Wmax_ has the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/stdp_synapse_facetshw_hom_impl.h b/models/stdp_synapse_facetshw_hom_impl.h index 73ee8b2dec..069ebb0b86 100644 --- a/models/stdp_synapse_facetshw_hom_impl.h +++ b/models/stdp_synapse_facetshw_hom_impl.h @@ -131,22 +131,22 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::get_status( dictionary& d { CommonSynapseProperties::get_status( d ); - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::tau_minus_stdp.toString() ] = tau_minus_; - d[ names::Wmax.toString() ] = Wmax_; - d[ names::weight_per_lut_entry.toString() ] = weight_per_lut_entry_; - - d[ names::no_synapses.toString() ] = no_synapses_; - d[ names::synapses_per_driver.toString() ] = synapses_per_driver_; - d[ names::driver_readout_time.toString() ] = driver_readout_time_; - d[ names::readout_cycle_duration.toString() ] = readout_cycle_duration_; - - d[ names::lookuptable_0.toString() ] = IntVectorDatum( new std::vector< long >( lookuptable_0_ ) ); - d[ names::lookuptable_1.toString() ] = IntVectorDatum( new std::vector< long >( lookuptable_1_ ) ); - d[ names::lookuptable_2.toString() ] = IntVectorDatum( new std::vector< long >( lookuptable_2_ ) ); - d[ names::configbit_0.toString() ] = IntVectorDatum( new std::vector< long >( configbit_0_ ) ); - d[ names::configbit_1.toString() ] = IntVectorDatum( new std::vector< long >( configbit_1_ ) ); - d[ names::reset_pattern.toString() ] = IntVectorDatum( new std::vector< long >( reset_pattern_ ) ); + d[ names::tau_plus ] = tau_plus_; + d[ names::tau_minus_stdp ] = tau_minus_; + d[ names::Wmax ] = Wmax_; + d[ names::weight_per_lut_entry ] = weight_per_lut_entry_; + + d[ names::no_synapses ] = no_synapses_; + d[ names::synapses_per_driver ] = synapses_per_driver_; + d[ names::driver_readout_time ] = driver_readout_time_; + d[ names::readout_cycle_duration ] = readout_cycle_duration_; + + d[ names::lookuptable_0 ] = IntVectorDatum( new std::vector< long >( lookuptable_0_ ) ); + d[ names::lookuptable_1 ] = IntVectorDatum( new std::vector< long >( lookuptable_1_ ) ); + d[ names::lookuptable_2 ] = IntVectorDatum( new std::vector< long >( lookuptable_2_ ) ); + d[ names::configbit_0 ] = IntVectorDatum( new std::vector< long >( configbit_0_ ) ); + d[ names::configbit_1 ] = IntVectorDatum( new std::vector< long >( configbit_1_ ) ); + d[ names::reset_pattern ] = IntVectorDatum( new std::vector< long >( reset_pattern_ ) ); } template < typename targetidentifierT > @@ -155,33 +155,33 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const dictiona { CommonSynapseProperties::set_status( d, cm ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::tau_minus_stdp.toString(), tau_minus_ ); - if ( d.update_value( names::Wmax.toString(), Wmax_ ) ) + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::tau_minus_stdp, tau_minus_ ); + if ( d.update_value( names::Wmax, Wmax_ ) ) { weight_per_lut_entry_ = Wmax_ / ( lookuptable_0_.size() - 1 ); } // TP: they should not be allowed to be changed! But needed for CopyModel ... - d.update_value( names::weight_per_lut_entry.toString(), weight_per_lut_entry_ ); - d.update_value( names::readout_cycle_duration.toString(), readout_cycle_duration_ ); - if ( d.update_value( names::no_synapses.toString(), no_synapses_ ) ) + d.update_value( names::weight_per_lut_entry, weight_per_lut_entry_ ); + d.update_value( names::readout_cycle_duration, readout_cycle_duration_ ); + if ( d.update_value( names::no_synapses, no_synapses_ ) ) { calc_readout_cycle_duration_(); } - if ( d.update_value( names::synapses_per_driver.toString(), synapses_per_driver_ ) ) + if ( d.update_value( names::synapses_per_driver, synapses_per_driver_ ) ) { calc_readout_cycle_duration_(); } - if ( d.update_value( names::driver_readout_time.toString(), driver_readout_time_ ) ) + if ( d.update_value( names::driver_readout_time, driver_readout_time_ ) ) { calc_readout_cycle_duration_(); } - if ( d.known( names::lookuptable_0.toString() ) ) + if ( d.known( names::lookuptable_0 ) ) { - d.update_value( names::lookuptable_0.toString(), lookuptable_0_ ); + d.update_value( names::lookuptable_0, lookuptable_0_ ); // right size? if ( lookuptable_0_.size() != lookuptable_1_.size() ) @@ -198,9 +198,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const dictiona } } } - if ( d.known( names::lookuptable_1.toString() ) ) + if ( d.known( names::lookuptable_1 ) ) { - d.update_value( names::lookuptable_1.toString(), lookuptable_1_ ); + d.update_value( names::lookuptable_1, lookuptable_1_ ); // right size? if ( lookuptable_1_.size() != lookuptable_0_.size() ) @@ -217,9 +217,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const dictiona } } } - if ( d.known( names::lookuptable_2.toString() ) ) + if ( d.known( names::lookuptable_2 ) ) { - d.update_value( names::lookuptable_2.toString(), lookuptable_2_ ); + d.update_value( names::lookuptable_2, lookuptable_2_ ); // right size? if ( lookuptable_2_.size() != lookuptable_0_.size() ) @@ -237,9 +237,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const dictiona } } - if ( d.known( names::configbit_0.toString() ) ) + if ( d.known( names::configbit_0 ) ) { - d.update_value( names::configbit_0.toString(), configbit_0_ ); + d.update_value( names::configbit_0, configbit_0_ ); // right size? if ( configbit_0_.size() != 4 ) @@ -247,9 +247,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const dictiona throw BadProperty( "Wrong number of configuration bits (!=4)." ); } } - if ( d.known( names::configbit_1.toString() ) ) + if ( d.known( names::configbit_1 ) ) { - d.update_value( names::configbit_1.toString(), configbit_1_ ); + d.update_value( names::configbit_1, configbit_1_ ); // right size? if ( configbit_1_.size() != 4 ) @@ -257,9 +257,9 @@ STDPFACETSHWHomCommonProperties< targetidentifierT >::set_status( const dictiona throw BadProperty( "Wrong number of configuration bits (!=4)." ); } } - if ( d.known( names::reset_pattern.toString() ) ) + if ( d.known( names::reset_pattern ) ) { - d.update_value( names::reset_pattern.toString(), reset_pattern_ ); + d.update_value( names::reset_pattern, reset_pattern_ ); // right size? if ( reset_pattern_.size() != 6 ) @@ -294,17 +294,17 @@ stdp_facetshw_synapse_hom< targetidentifierT >::get_status( dictionary& d ) cons { // base class properties, different for individual synapse ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; + d[ names::weight ] = weight_; // own properties, different for individual synapse - d[ names::a_causal.toString() ] = a_causal_; - d[ names::a_acausal.toString() ] = a_acausal_; - d[ names::a_thresh_th.toString() ] = a_thresh_th_; - d[ names::a_thresh_tl.toString() ] = a_thresh_tl_; - - d[ names::init_flag.toString() ] = init_flag_; - d[ names::synapse_id.toString() ] = synapse_id_; - d[ names::next_readout_time.toString() ] = next_readout_time_; + d[ names::a_causal ] = a_causal_; + d[ names::a_acausal ] = a_acausal_; + d[ names::a_thresh_th ] = a_thresh_th_; + d[ names::a_thresh_tl ] = a_thresh_tl_; + + d[ names::init_flag ] = init_flag_; + d[ names::synapse_id ] = synapse_id_; + d[ names::next_readout_time ] = next_readout_time_; // useful to get conversion before activity, but weight_per_lut_entry_ not // known here // def(d, "discrete_weight", @@ -318,18 +318,18 @@ stdp_facetshw_synapse_hom< targetidentifierT >::set_status( const dictionary& d, { // base class properties ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); - d.update_value( names::a_causal.toString(), a_causal_ ); - d.update_value( names::a_acausal.toString(), a_acausal_ ); - d.update_value( names::a_thresh_th.toString(), a_thresh_th_ ); - d.update_value( names::a_thresh_tl.toString(), a_thresh_tl_ ); + d.update_value( names::a_causal, a_causal_ ); + d.update_value( names::a_acausal, a_acausal_ ); + d.update_value( names::a_thresh_th, a_thresh_th_ ); + d.update_value( names::a_thresh_tl, a_thresh_tl_ ); - d.update_value( names::synapse_id.toString(), synapse_id_ ); + d.update_value( names::synapse_id, synapse_id_ ); // TP: they should not be allowed to be changed! But needed for CopyModel ... - d.update_value( names::init_flag.toString(), init_flag_ ); - d.update_value( names::next_readout_time.toString(), next_readout_time_ ); + d.update_value( names::init_flag, init_flag_ ); + d.update_value( names::next_readout_time, next_readout_time_ ); // setting discrete_weight_ does not make sense, is temporary variable } diff --git a/models/stdp_synapse_hom.cpp b/models/stdp_synapse_hom.cpp index 64661ebbb3..07020a4d25 100644 --- a/models/stdp_synapse_hom.cpp +++ b/models/stdp_synapse_hom.cpp @@ -52,12 +52,12 @@ STDPHomCommonProperties::get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::lambda.toString() ] = lambda_; - d[ names::alpha.toString() ] = alpha_; - d[ names::mu_plus.toString() ] = mu_plus_; - d[ names::mu_minus.toString() ] = mu_minus_; - d[ names::Wmax.toString() ] = Wmax_; + d[ names::tau_plus ] = tau_plus_; + d[ names::lambda ] = lambda_; + d[ names::alpha ] = alpha_; + d[ names::mu_plus ] = mu_plus_; + d[ names::mu_minus ] = mu_minus_; + d[ names::Wmax ] = Wmax_; } void @@ -65,12 +65,12 @@ STDPHomCommonProperties::set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::lambda.toString(), lambda_ ); - d.update_value( names::alpha.toString(), alpha_ ); - d.update_value( names::mu_plus.toString(), mu_plus_ ); - d.update_value( names::mu_minus.toString(), mu_minus_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::lambda, lambda_ ); + d.update_value( names::alpha, alpha_ ); + d.update_value( names::mu_plus, mu_plus_ ); + d.update_value( names::mu_minus, mu_minus_ ); + d.update_value( names::Wmax, Wmax_ ); } } // of namespace nest diff --git a/models/stdp_synapse_hom.h b/models/stdp_synapse_hom.h index db675bf069..38a6b58118 100644 --- a/models/stdp_synapse_hom.h +++ b/models/stdp_synapse_hom.h @@ -329,11 +329,11 @@ stdp_synapse_hom< targetidentifierT >::get_status( dictionary& d ) const // base class properties, different for individual synapse ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; + d[ names::weight ] = weight_; // own properties, different for individual synapse - d[ names::Kplus.toString() ] = Kplus_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::Kplus ] = Kplus_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -342,9 +342,9 @@ stdp_synapse_hom< targetidentifierT >::set_status( const dictionary& d, Connecto { // base class properties ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); - d.update_value( names::Kplus.toString(), Kplus_ ); + d.update_value( names::Kplus, Kplus_ ); } } // of namespace nest diff --git a/models/stdp_triplet_synapse.h b/models/stdp_triplet_synapse.h index 3cbfc9f07a..a4c5755a2b 100644 --- a/models/stdp_triplet_synapse.h +++ b/models/stdp_triplet_synapse.h @@ -24,8 +24,8 @@ #define STDP_TRIPLET_SYNAPSE_H // C-header for math.h since copysign() is in C99 but not C++98 -#include #include "connection.h" +#include namespace nest { @@ -143,8 +143,8 @@ class stdp_triplet_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places // these functions are used. Since ConnectionBase depends on the template // parameter, they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -317,16 +317,16 @@ void stdp_triplet_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::tau_plus.toString() ] = tau_plus_; - d[ names::tau_plus_triplet.toString() ] = tau_plus_triplet_; - d[ names::Aplus.toString() ] = Aplus_; - d[ names::Aminus.toString() ] = Aminus_; - d[ names::Aplus_triplet.toString() ] = Aplus_triplet_; - d[ names::Aminus_triplet.toString() ] = Aminus_triplet_; - d[ names::Kplus.toString() ] = Kplus_; - d[ names::Kplus_triplet.toString() ] = Kplus_triplet_; - d[ names::Wmax.toString() ] = Wmax_; + d[ names::weight ] = weight_; + d[ names::tau_plus ] = tau_plus_; + d[ names::tau_plus_triplet ] = tau_plus_triplet_; + d[ names::Aplus ] = Aplus_; + d[ names::Aminus ] = Aminus_; + d[ names::Aplus_triplet ] = Aplus_triplet_; + d[ names::Aminus_triplet ] = Aminus_triplet_; + d[ names::Kplus ] = Kplus_; + d[ names::Kplus_triplet ] = Kplus_triplet_; + d[ names::Wmax ] = Wmax_; } template < typename targetidentifierT > @@ -334,16 +334,16 @@ void stdp_triplet_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::tau_plus.toString(), tau_plus_ ); - d.update_value( names::tau_plus_triplet.toString(), tau_plus_triplet_ ); - d.update_value( names::Aplus.toString(), Aplus_ ); - d.update_value( names::Aminus.toString(), Aminus_ ); - d.update_value( names::Aplus_triplet.toString(), Aplus_triplet_ ); - d.update_value( names::Aminus_triplet.toString(), Aminus_triplet_ ); - d.update_value( names::Kplus.toString(), Kplus_ ); - d.update_value( names::Kplus_triplet.toString(), Kplus_triplet_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::tau_plus, tau_plus_ ); + d.update_value( names::tau_plus_triplet, tau_plus_triplet_ ); + d.update_value( names::Aplus, Aplus_ ); + d.update_value( names::Aminus, Aminus_ ); + d.update_value( names::Aplus_triplet, Aplus_triplet_ ); + d.update_value( names::Aminus_triplet, Aminus_triplet_ ); + d.update_value( names::Kplus, Kplus_ ); + d.update_value( names::Kplus_triplet, Kplus_triplet_ ); + d.update_value( names::Wmax, Wmax_ ); // check if weight_ and Wmax_ has the same sign if ( not( ( ( weight_ >= 0 ) - ( weight_ < 0 ) ) == ( ( Wmax_ >= 0 ) - ( Wmax_ < 0 ) ) ) ) diff --git a/models/step_current_generator.cpp b/models/step_current_generator.cpp index 96ae43b6fb..76ebe62054 100644 --- a/models/step_current_generator.cpp +++ b/models/step_current_generator.cpp @@ -62,7 +62,8 @@ nest::step_current_generator::Parameters_::Parameters_( const Parameters_& p ) { } -nest::step_current_generator::Parameters_& nest::step_current_generator::Parameters_::operator=( const Parameters_& p ) +nest::step_current_generator::Parameters_& +nest::step_current_generator::Parameters_::operator=( const Parameters_& p ) { if ( this == &p ) { @@ -108,9 +109,9 @@ nest::step_current_generator::Parameters_::get( dictionary& d ) const { times_ms->push_back( amp_time_stamp.get_ms() ); } - d[ names::amplitude_times.toString() ] = DoubleVectorDatum( times_ms ); - d[ names::amplitude_values.toString() ] = DoubleVectorDatum( new std::vector< double >( amp_values_ ) ); - d[ names::allow_offgrid_times.toString() ] = BoolDatum( allow_offgrid_amp_times_ ); + d[ names::amplitude_times ] = DoubleVectorDatum( times_ms ); + d[ names::amplitude_values ] = DoubleVectorDatum( new std::vector< double >( amp_values_ ) ); + d[ names::allow_offgrid_times ] = BoolDatum( allow_offgrid_amp_times_ ); } nest::Time @@ -161,9 +162,9 @@ void nest::step_current_generator::Parameters_::set( const dictionary& d, Buffers_& b, Node* ) { std::vector< double > new_times; - const bool times_changed = d.update_value( names::amplitude_times.toString(), new_times ); - const bool values_changed = d.update_value( names::amplitude_values.toString(), amp_values_ ); - const bool allow_offgrid_changed = d.update_value( names::allow_offgrid_times.toString(), allow_offgrid_amp_times_ ); + const bool times_changed = d.update_value( names::amplitude_times, new_times ); + const bool values_changed = d.update_value( names::amplitude_values, amp_values_ ); + const bool allow_offgrid_changed = d.update_value( names::allow_offgrid_times, allow_offgrid_amp_times_ ); if ( times_changed xor values_changed ) { @@ -354,8 +355,8 @@ nest::step_current_generator::set_data_from_stimulation_backend( std::vector< do times_ms.push_back( time_amplitude[ n * 2 ] ); amplitudes_pA.push_back( time_amplitude[ n * 2 + 1 ] ); } - d[ names::amplitude_times.toString() ] = DoubleVectorDatum( times_ms ); - d[ names::amplitude_values.toString() ] = DoubleVectorDatum( amplitudes_pA ); + d[ names::amplitude_times ] = DoubleVectorDatum( times_ms ); + d[ names::amplitude_values ] = DoubleVectorDatum( amplitudes_pA ); ptmp.set( d, B_, this ); } diff --git a/models/step_current_generator.h b/models/step_current_generator.h index df2f39f40c..616ebc1491 100644 --- a/models/step_current_generator.h +++ b/models/step_current_generator.h @@ -31,7 +31,6 @@ #include "connection.h" #include "device_node.h" #include "event.h" -#include "stimulation_device.h" #include "nest_types.h" #include "ring_buffer.h" #include "stimulation_device.h" @@ -236,7 +235,7 @@ step_current_generator::get_status( dictionary& d ) const P_.get( d ); StimulationDevice::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/step_rate_generator.cpp b/models/step_rate_generator.cpp index 63d2b2cf52..ba3c651515 100644 --- a/models/step_rate_generator.cpp +++ b/models/step_rate_generator.cpp @@ -62,7 +62,8 @@ nest::step_rate_generator::Parameters_::Parameters_( const Parameters_& p ) { } -nest::step_rate_generator::Parameters_& nest::step_rate_generator::Parameters_::operator=( const Parameters_& p ) +nest::step_rate_generator::Parameters_& +nest::step_rate_generator::Parameters_::operator=( const Parameters_& p ) { if ( this == &p ) { @@ -108,9 +109,9 @@ nest::step_rate_generator::Parameters_::get( dictionary& d ) const { times_ms->push_back( amp_time_stamp.get_ms() ); } - d[ names::amplitude_times.toString() ] = DoubleVectorDatum( times_ms ); - d[ names::amplitude_values.toString() ] = DoubleVectorDatum( new std::vector< double >( amp_values_ ) ); - d[ names::allow_offgrid_times.toString() ] = BoolDatum( allow_offgrid_amp_times_ ); + d[ names::amplitude_times ] = DoubleVectorDatum( times_ms ); + d[ names::amplitude_values ] = DoubleVectorDatum( new std::vector< double >( amp_values_ ) ); + d[ names::allow_offgrid_times ] = BoolDatum( allow_offgrid_amp_times_ ); } nest::Time @@ -161,9 +162,9 @@ void nest::step_rate_generator::Parameters_::set( const dictionary& d, Buffers_& b, Node* ) { std::vector< double > new_times; - const bool times_changed = d.update_value( names::amplitude_times.toString(), new_times ); - const bool values_changed = d.update_value( names::amplitude_values.toString(), amp_values_ ); - const bool allow_offgrid_changed = d.update_value( names::allow_offgrid_times.toString(), allow_offgrid_amp_times_ ); + const bool times_changed = d.update_value( names::amplitude_times, new_times ); + const bool values_changed = d.update_value( names::amplitude_values, amp_values_ ); + const bool allow_offgrid_changed = d.update_value( names::allow_offgrid_times, allow_offgrid_amp_times_ ); if ( times_changed xor values_changed ) { @@ -367,8 +368,8 @@ nest::step_rate_generator::set_data_from_stimulation_backend( std::vector< doubl times_ms.push_back( time_amplitude[ n * 2 ] ); amplitudes_Hz.push_back( time_amplitude[ n * 2 + 1 ] ); } - d[ names::amplitude_times.toString() ] = DoubleVectorDatum( times_ms ); - d[ names::amplitude_values.toString() ] = DoubleVectorDatum( amplitudes_Hz ); + d[ names::amplitude_times ] = DoubleVectorDatum( times_ms ); + d[ names::amplitude_values ] = DoubleVectorDatum( amplitudes_Hz ); ptmp.set( d, B_, this ); } diff --git a/models/step_rate_generator.h b/models/step_rate_generator.h index e9630b06dd..38043c1af3 100644 --- a/models/step_rate_generator.h +++ b/models/step_rate_generator.h @@ -109,7 +109,7 @@ class step_rate_generator : public StimulationDevice step_rate_generator( const step_rate_generator& ); // port send_test_event( Node&, rport, synindex, bool ); - void sends_secondary_event( DelayedRateConnectionEvent& ) override{}; + void sends_secondary_event( DelayedRateConnectionEvent& ) override {}; using Node::handle; using Node::handles_test_event; @@ -241,7 +241,7 @@ step_rate_generator::get_status( dictionary& d ) const P_.get( d ); StimulationDevice::get_status( d ); - d[ names::recordables.toString() ] = recordablesMap_.get_list(); + d[ names::recordables ] = recordablesMap_.get_list(); } inline void diff --git a/models/tanh_rate.cpp b/models/tanh_rate.cpp index 7901a3814b..53e6670d80 100644 --- a/models/tanh_rate.cpp +++ b/models/tanh_rate.cpp @@ -28,15 +28,15 @@ namespace nest void nonlinearities_tanh_rate::get( dictionary& d ) const { - d[ names::g.toString() ] = g_; - d[ names::theta.toString() ] = theta_; + d[ names::g ] = g_; + d[ names::theta ] = theta_; } void nonlinearities_tanh_rate::set( const dictionary& d, Node* node ) { - update_value_param( d, names::g.toString(), g_, node ); - update_value_param( d, names::theta.toString(), theta_, node ); + update_value_param( d, names::g, g_, node ); + update_value_param( d, names::theta, theta_, node ); } /* diff --git a/models/threshold_lin_rate.cpp b/models/threshold_lin_rate.cpp index d45bab89c1..db104c3d20 100644 --- a/models/threshold_lin_rate.cpp +++ b/models/threshold_lin_rate.cpp @@ -28,17 +28,17 @@ namespace nest void nonlinearities_threshold_lin_rate::get( dictionary& d ) const { - d[ names::g.toString() ] = g_; - d[ names::theta.toString() ] = theta_; - d[ names::alpha.toString() ] = alpha_; + d[ names::g ] = g_; + d[ names::theta ] = theta_; + d[ names::alpha ] = alpha_; } void nonlinearities_threshold_lin_rate::set( const dictionary& d, Node* node ) { - update_value_param( d, names::g.toString(), g_, node ); - update_value_param( d, names::theta.toString(), theta_, node ); - update_value_param( d, names::alpha.toString(), alpha_, node ); + update_value_param( d, names::g, g_, node ); + update_value_param( d, names::theta, theta_, node ); + update_value_param( d, names::alpha, alpha_, node ); } /* diff --git a/models/tsodyks2_synapse.h b/models/tsodyks2_synapse.h index 944a061497..2d2ad23333 100644 --- a/models/tsodyks2_synapse.h +++ b/models/tsodyks2_synapse.h @@ -141,8 +141,8 @@ class tsodyks2_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -251,14 +251,14 @@ void tsodyks2_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - - d[ names::dU.toString() ] = U_; - d[ names::u.toString() ] = u_; - d[ names::tau_rec.toString() ] = tau_rec_; - d[ names::tau_fac.toString() ] = tau_fac_; - d[ names::x.toString() ] = x_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + + d[ names::dU ] = U_; + d[ names::u ] = u_; + d[ names::tau_rec ] = tau_rec_; + d[ names::tau_fac ] = tau_fac_; + d[ names::x ] = x_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -266,33 +266,33 @@ void tsodyks2_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); - d.update_value( names::dU.toString(), U_ ); + d.update_value( names::dU, U_ ); if ( U_ > 1.0 || U_ < 0.0 ) { throw BadProperty( "U must be in [0,1]." ); } - d.update_value( names::u.toString(), u_ ); + d.update_value( names::u, u_ ); if ( u_ > 1.0 || u_ < 0.0 ) { throw BadProperty( "u must be in [0,1]." ); } - d.update_value( names::tau_rec.toString(), tau_rec_ ); + d.update_value( names::tau_rec, tau_rec_ ); if ( tau_rec_ <= 0.0 ) { throw BadProperty( "tau_rec must be > 0." ); } - d.update_value( names::tau_fac.toString(), tau_fac_ ); + d.update_value( names::tau_fac, tau_fac_ ); if ( tau_fac_ < 0.0 ) { throw BadProperty( "tau_fac must be >= 0." ); } - d.update_value( names::x.toString(), x_ ); + d.update_value( names::x, x_ ); } } // namespace diff --git a/models/tsodyks_synapse.h b/models/tsodyks_synapse.h index 73567b2e13..371b6728bd 100644 --- a/models/tsodyks_synapse.h +++ b/models/tsodyks_synapse.h @@ -143,9 +143,9 @@ class tsodyks_synapse : public Connection< targetidentifierT > tsodyks_synapse(); /** - * Copy constructor from a property object. - * Needs to be defined properly in order for GenericConnector to work. - */ + * Copy constructor from a property object. + * Needs to be defined properly in order for GenericConnector to work. + */ tsodyks_synapse( const tsodyks_synapse& ) = default; /** @@ -159,8 +159,8 @@ class tsodyks_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -297,16 +297,16 @@ void tsodyks_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - - d[ names::U.toString() ] = U_; - d[ names::tau_psc.toString() ] = tau_psc_; - d[ names::tau_rec.toString() ] = tau_rec_; - d[ names::tau_fac.toString() ] = tau_fac_; - d[ names::x.toString() ] = x_; - d[ names::y.toString() ] = y_; - d[ names::u.toString() ] = u_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + + d[ names::U ] = U_; + d[ names::tau_psc ] = tau_psc_; + d[ names::tau_rec ] = tau_rec_; + d[ names::tau_fac ] = tau_fac_; + d[ names::x ] = x_; + d[ names::y ] = y_; + d[ names::u ] = u_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -318,8 +318,8 @@ tsodyks_synapse< targetidentifierT >::set_status( const dictionary& d, Connector // in case of invalid parameter values double x = x_; double y = y_; - d.update_value( names::x.toString(), x ); - d.update_value( names::y.toString(), y ); + d.update_value( names::x, x ); + d.update_value( names::y, y ); if ( x + y > 1.0 ) { @@ -330,33 +330,33 @@ tsodyks_synapse< targetidentifierT >::set_status( const dictionary& d, Connector y_ = y; ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); - d.update_value( names::U.toString(), U_ ); + d.update_value( names::U, U_ ); if ( U_ > 1.0 || U_ < 0.0 ) { throw BadProperty( "U must be in [0,1]." ); } - d.update_value( names::tau_psc.toString(), tau_psc_ ); + d.update_value( names::tau_psc, tau_psc_ ); if ( tau_psc_ <= 0.0 ) { throw BadProperty( "tau_psc must be > 0." ); } - d.update_value( names::tau_rec.toString(), tau_rec_ ); + d.update_value( names::tau_rec, tau_rec_ ); if ( tau_rec_ <= 0.0 ) { throw BadProperty( "tau_rec must be > 0." ); } - d.update_value( names::tau_fac.toString(), tau_fac_ ); + d.update_value( names::tau_fac, tau_fac_ ); if ( tau_fac_ < 0.0 ) { throw BadProperty( "tau_fac must be >= 0." ); } - d.update_value( names::u.toString(), u_ ); + d.update_value( names::u, u_ ); } } // namespace diff --git a/models/tsodyks_synapse_hom.cpp b/models/tsodyks_synapse_hom.cpp index c8ce5fb3d5..13f3edf9b2 100644 --- a/models/tsodyks_synapse_hom.cpp +++ b/models/tsodyks_synapse_hom.cpp @@ -46,10 +46,10 @@ TsodyksHomCommonProperties::get_status( dictionary& d ) const { CommonPropertiesHomW::get_status( d ); - d[ names::U.toString() ] = U_; - d[ names::tau_psc.toString() ] = tau_psc_; - d[ names::tau_rec.toString() ] = tau_rec_; - d[ names::tau_fac.toString() ] = tau_fac_; + d[ names::U ] = U_; + d[ names::tau_psc ] = tau_psc_; + d[ names::tau_rec ] = tau_rec_; + d[ names::tau_fac ] = tau_fac_; } void @@ -57,25 +57,25 @@ TsodyksHomCommonProperties::set_status( const dictionary& d, ConnectorModel& cm { CommonPropertiesHomW::set_status( d, cm ); - d.update_value( names::U.toString(), U_ ); + d.update_value( names::U, U_ ); if ( U_ > 1.0 || U_ < 0.0 ) { throw BadProperty( "U must be in [0,1]." ); } - d.update_value( names::tau_psc.toString(), tau_psc_ ); + d.update_value( names::tau_psc, tau_psc_ ); if ( tau_psc_ <= 0.0 ) { throw BadProperty( "tau_psc must be > 0." ); } - d.update_value( names::tau_rec.toString(), tau_rec_ ); + d.update_value( names::tau_rec, tau_rec_ ); if ( tau_rec_ <= 0.0 ) { throw BadProperty( "tau_rec must be > 0." ); } - d.update_value( names::tau_fac.toString(), tau_fac_ ); + d.update_value( names::tau_fac, tau_fac_ ); if ( tau_fac_ < 0.0 ) { throw BadProperty( "tau_fac must be >= 0." ); diff --git a/models/tsodyks_synapse_hom.h b/models/tsodyks_synapse_hom.h index 6c76a2a4e9..3b894626ca 100644 --- a/models/tsodyks_synapse_hom.h +++ b/models/tsodyks_synapse_hom.h @@ -321,9 +321,9 @@ tsodyks_synapse_hom< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::x.toString() ] = x_; - d[ names::y.toString() ] = y_; - d[ names::u.toString() ] = u_; + d[ names::x ] = x_; + d[ names::y ] = y_; + d[ names::u ] = u_; } template < typename targetidentifierT > @@ -334,8 +334,8 @@ tsodyks_synapse_hom< targetidentifierT >::set_status( const dictionary& d, Conne // synapse untouched in case of invalid parameter values double x = x_; double y = y_; - d.update_value( names::x.toString(), x ); - d.update_value( names::y.toString(), y ); + d.update_value( names::x, x ); + d.update_value( names::y, y ); if ( x + y > 1.0 ) { @@ -347,7 +347,7 @@ tsodyks_synapse_hom< targetidentifierT >::set_status( const dictionary& d, Conne ConnectionBase::set_status( d, cm ); - d.update_value( names::u.toString(), u_ ); + d.update_value( names::u, u_ ); } } // namespace diff --git a/models/urbanczik_synapse.h b/models/urbanczik_synapse.h index 9991c0f71c..1e842e6498 100644 --- a/models/urbanczik_synapse.h +++ b/models/urbanczik_synapse.h @@ -132,8 +132,8 @@ class urbanczik_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -294,12 +294,12 @@ void urbanczik_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::tau_Delta.toString() ] = tau_Delta_; - d[ names::eta.toString() ] = eta_; - d[ names::Wmin.toString() ] = Wmin_; - d[ names::Wmax.toString() ] = Wmax_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::tau_Delta ] = tau_Delta_; + d[ names::eta ] = eta_; + d[ names::Wmin ] = Wmin_; + d[ names::Wmax ] = Wmax_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -307,11 +307,11 @@ void urbanczik_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::tau_Delta.toString(), tau_Delta_ ); - d.update_value( names::eta.toString(), eta_ ); - d.update_value( names::Wmin.toString(), Wmin_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::tau_Delta, tau_Delta_ ); + d.update_value( names::eta, eta_ ); + d.update_value( names::Wmin, Wmin_ ); + d.update_value( names::Wmax, Wmax_ ); init_weight_ = weight_; // check if weight_ and Wmin_ has the same sign diff --git a/models/vogels_sprekeler_synapse.h b/models/vogels_sprekeler_synapse.h index 46e191e8b4..2c3d90f809 100644 --- a/models/vogels_sprekeler_synapse.h +++ b/models/vogels_sprekeler_synapse.h @@ -24,8 +24,8 @@ #define VOGELS_SPREKELER_SYNAPSE_H // C-header for math.h since copysign() is in C99 but not C++98 -#include #include "connection.h" +#include namespace nest { @@ -110,8 +110,8 @@ class vogels_sprekeler_synapse : public Connection< targetidentifierT > // Since ConnectionBase depends on the template parameter, they are not // automatically // found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; @@ -270,13 +270,13 @@ void vogels_sprekeler_synapse< targetidentifierT >::get_status( dictionary& d ) const { ConnectionBase::get_status( d ); - d[ names::weight.toString() ] = weight_; - d[ names::tau.toString() ] = tau_; - d[ names::alpha.toString() ] = alpha_; - d[ names::eta.toString() ] = eta_; - d[ names::Wmax.toString() ] = Wmax_; - d[ names::Kplus.toString() ] = Kplus_; - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::weight ] = weight_; + d[ names::tau ] = tau_; + d[ names::alpha ] = alpha_; + d[ names::eta ] = eta_; + d[ names::Wmax ] = Wmax_; + d[ names::Kplus ] = Kplus_; + d[ names::size_of ] = sizeof( *this ); } template < typename targetidentifierT > @@ -284,12 +284,12 @@ void vogels_sprekeler_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm ) { ConnectionBase::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); - d.update_value( names::tau.toString(), tau_ ); - d.update_value( names::alpha.toString(), alpha_ ); - d.update_value( names::eta.toString(), eta_ ); - d.update_value( names::Wmax.toString(), Wmax_ ); - d.update_value( names::Kplus.toString(), Kplus_ ); + d.update_value( names::weight, weight_ ); + d.update_value( names::tau, tau_ ); + d.update_value( names::alpha, alpha_ ); + d.update_value( names::eta, eta_ ); + d.update_value( names::Wmax, Wmax_ ); + d.update_value( names::Kplus, Kplus_ ); // if the weight_ is not 0, we check to ensure that weight_ and Wmax_ are of // the same sign diff --git a/models/volume_transmitter.cpp b/models/volume_transmitter.cpp index ddf1bd8e1e..a9be6940ec 100644 --- a/models/volume_transmitter.cpp +++ b/models/volume_transmitter.cpp @@ -57,12 +57,12 @@ nest::volume_transmitter::Parameters_::Parameters_() void nest::volume_transmitter::Parameters_::get( dictionary& d ) const { - d[ names::deliver_interval.toString() ] = deliver_interval_; + d[ names::deliver_interval ] = deliver_interval_; } void ::nest::volume_transmitter::Parameters_::set( const dictionary& d, Node* node ) { - update_value_param( d, names::deliver_interval.toString(), deliver_interval_, node ); + update_value_param( d, names::deliver_interval, deliver_interval_, node ); } /* ---------------------------------------------------------------- diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp index 6b944add2a..65e39a5a1d 100644 --- a/models/weight_recorder.cpp +++ b/models/weight_recorder.cpp @@ -26,15 +26,15 @@ #include // Includes from libnestutil: -#include "dict_util.h" #include "compose.hpp" +#include "dict_util.h" #include "logging.h" // Includes from nestkernel: #include "event_delivery_manager_impl.h" -#include "node_collection.h" #include "kernel_manager.h" #include "nest_datums.h" +#include "node_collection.h" // Includes from sli: #include "arraydatum.h" @@ -67,29 +67,28 @@ nest::weight_recorder::Parameters_::get( dictionary& d ) const { if ( senders_.get() ) { - d[ names::senders.toString() ] = senders_; + d[ names::senders ] = senders_; } else { ArrayDatum ad; - d[ names::senders.toString() ] = ad; + d[ names::senders ] = ad; } if ( targets_.get() ) { - d[ names::targets.toString() ] = targets_; + d[ names::targets ] = targets_; } else { ArrayDatum ad; - d[ names::targets.toString() ] = ad; + d[ names::targets ] = ad; } } void nest::weight_recorder::Parameters_::set( const dictionary& d ) { - auto get_or_create_nc = [&d]( NodeCollectionDatum& nc, const std::string& key ) - { + auto get_or_create_nc = [&d]( NodeCollectionDatum& nc, const std::string& key ) { const auto value = d.at( key ); if ( is_nc( value ) ) { @@ -103,8 +102,8 @@ nest::weight_recorder::Parameters_::set( const dictionary& d ) } }; - get_or_create_nc( senders_, names::senders.toString() ); - get_or_create_nc( targets_, names::targets.toString() ); + get_or_create_nc( senders_, names::senders ); + get_or_create_nc( targets_, names::targets ); } void @@ -179,7 +178,7 @@ nest::weight_recorder::handle( WeightRecorderEvent& e ) write( e, { e.get_weight() }, { static_cast< long >( e.get_receiver_node_id() ), - static_cast< long >( e.get_rport() ), - static_cast< long >( e.get_port() ) } ); + static_cast< long >( e.get_rport() ), + static_cast< long >( e.get_port() ) } ); } } diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt index a945b8aede..f0217b480e 100644 --- a/nestkernel/CMakeLists.txt +++ b/nestkernel/CMakeLists.txt @@ -45,7 +45,7 @@ set ( nestkernel_sources model_manager.h model_manager_impl.h model_manager.cpp nest_types.h nest_datums.h nest_datums.cpp - nest_names.cpp nest_names.h + nest_names.h nestmodule.h nestmodule.cpp nest_time.h nest_time.cpp nest_timeconverter.h nest_timeconverter.cpp diff --git a/nestkernel/archiving_node.cpp b/nestkernel/archiving_node.cpp index 41f7a7dad4..5da0d5f975 100644 --- a/nestkernel/archiving_node.cpp +++ b/nestkernel/archiving_node.cpp @@ -220,12 +220,12 @@ nest::ArchivingNode::set_spiketime( Time const& t_sp, double offset ) void nest::ArchivingNode::get_status( dictionary& d ) const { - d[ names::t_spike.toString() ] = get_spiketime_ms(); - d[ names::tau_minus.toString() ] = tau_minus_; - d[ names::tau_minus_triplet.toString() ] = tau_minus_triplet_; - d[ names::post_trace.toString() ] = trace_; + d[ names::t_spike ] = get_spiketime_ms(); + d[ names::tau_minus ] = tau_minus_; + d[ names::tau_minus_triplet ] = tau_minus_triplet_; + d[ names::post_trace ] = trace_; #ifdef DEBUG_ARCHIVER - d[ names::archiver_length.toString() ] = history_.size(); + d[ names::archiver_length ] = history_.size(); #endif // add status dict items from the parent class @@ -238,8 +238,8 @@ nest::ArchivingNode::set_status( const dictionary& d ) // We need to preserve values in case invalid values are set double new_tau_minus = tau_minus_; double new_tau_minus_triplet = tau_minus_triplet_; - d.update_value( names::tau_minus.toString(), new_tau_minus ); - d.update_value( names::tau_minus_triplet.toString(), new_tau_minus_triplet ); + d.update_value( names::tau_minus, new_tau_minus ); + d.update_value( names::tau_minus_triplet, new_tau_minus_triplet ); if ( new_tau_minus <= 0.0 or new_tau_minus_triplet <= 0.0 ) { @@ -256,7 +256,7 @@ nest::ArchivingNode::set_status( const dictionary& d ) // check, if to clear spike history and K_minus bool clear = false; - d.update_value( names::clear.toString(), clear ); + d.update_value( names::clear, clear ); if ( clear ) { clear_history(); diff --git a/nestkernel/clopath_archiving_node.cpp b/nestkernel/clopath_archiving_node.cpp index 4b24b8af64..e5a50ad876 100644 --- a/nestkernel/clopath_archiving_node.cpp +++ b/nestkernel/clopath_archiving_node.cpp @@ -86,13 +86,13 @@ nest::ClopathArchivingNode::get_status( dictionary& d ) const { ArchivingNode::get_status( d ); - d[ names::A_LTD.toString() ] = A_LTD_; - d[ names::A_LTP.toString() ] = A_LTP_; - d[ names::u_ref_squared.toString() ] = u_ref_squared_; - d[ names::theta_plus.toString() ] = theta_plus_; - d[ names::theta_minus.toString() ] = theta_minus_; - d[ names::A_LTD_const.toString() ] = A_LTD_const_; - d[ names::delay_u_bars.toString() ] = delay_u_bars_; + d[ names::A_LTD ] = A_LTD_; + d[ names::A_LTP ] = A_LTP_; + d[ names::u_ref_squared ] = u_ref_squared_; + d[ names::theta_plus ] = theta_plus_; + d[ names::theta_minus ] = theta_minus_; + d[ names::A_LTD_const ] = A_LTD_const_; + d[ names::delay_u_bars ] = delay_u_bars_; } void @@ -108,13 +108,13 @@ nest::ClopathArchivingNode::set_status( const dictionary& d ) double new_u_ref_squared = u_ref_squared_; double new_A_LTD_const = A_LTD_const_; double new_delay_u_bars = delay_u_bars_; - d.update_value( names::A_LTD.toString(), new_A_LTD ); - d.update_value( names::A_LTP.toString(), new_A_LTP ); - d.update_value( names::u_ref_squared.toString(), new_u_ref_squared ); - d.update_value( names::theta_plus.toString(), new_theta_plus ); - d.update_value( names::theta_minus.toString(), new_theta_minus ); - d.update_value( names::A_LTD_const.toString(), new_A_LTD_const ); - d.update_value( names::delay_u_bars.toString(), new_delay_u_bars ); + d.update_value( names::A_LTD, new_A_LTD ); + d.update_value( names::A_LTP, new_A_LTP ); + d.update_value( names::u_ref_squared, new_u_ref_squared ); + d.update_value( names::theta_plus, new_theta_plus ); + d.update_value( names::theta_minus, new_theta_minus ); + d.update_value( names::A_LTD_const, new_A_LTD_const ); + d.update_value( names::delay_u_bars, new_delay_u_bars ); A_LTD_ = new_A_LTD; A_LTP_ = new_A_LTP; u_ref_squared_ = new_u_ref_squared; @@ -225,8 +225,8 @@ nest::ClopathArchivingNode::write_LTD_history( const double t_ltd_ms, double u_b { if ( n_incoming_ ) { - const double dw = A_LTD_const_ ? A_LTD_ * ( u_bar_minus - theta_minus_ ) : A_LTD_ * u_bar_bar * u_bar_bar - * ( u_bar_minus - theta_minus_ ) / u_ref_squared_; + const double dw = A_LTD_const_ ? A_LTD_ * ( u_bar_minus - theta_minus_ ) + : A_LTD_ * u_bar_bar * u_bar_bar * ( u_bar_minus - theta_minus_ ) / u_ref_squared_; ltd_history_[ ltd_hist_current_ ] = histentry_extended( t_ltd_ms, dw, 0 ); ltd_hist_current_ = ( ltd_hist_current_ + 1 ) % ltd_hist_len_; } diff --git a/nestkernel/common_properties_hom_w.h b/nestkernel/common_properties_hom_w.h index 6e4aa176cc..cdc3f41108 100644 --- a/nestkernel/common_properties_hom_w.h +++ b/nestkernel/common_properties_hom_w.h @@ -65,7 +65,7 @@ class CommonPropertiesHomW : public CommonSynapseProperties get_status( dictionary& d ) const { CommonSynapseProperties::get_status( d ); - d[ names::weight.toString() ] = weight_; + d[ names::weight ] = weight_; } double @@ -81,7 +81,7 @@ class CommonPropertiesHomW : public CommonSynapseProperties set_status( const dictionary& d, ConnectorModel& cm ) { CommonSynapseProperties::set_status( d, cm ); - d.update_value( names::weight.toString(), weight_ ); + d.update_value( names::weight, weight_ ); } private: diff --git a/nestkernel/common_synapse_properties.cpp b/nestkernel/common_synapse_properties.cpp index f7dcc92208..3696b0f6a2 100644 --- a/nestkernel/common_synapse_properties.cpp +++ b/nestkernel/common_synapse_properties.cpp @@ -53,19 +53,19 @@ CommonSynapseProperties::get_status( dictionary& d ) const { if ( weight_recorder_.get() ) { - d[ names::weight_recorder.toString() ] = weight_recorder_; + d[ names::weight_recorder ] = weight_recorder_; } else { ArrayDatum ad; - d[ names::weight_recorder.toString() ] = ad; + d[ names::weight_recorder ] = ad; } } void CommonSynapseProperties::set_status( const dictionary& d, ConnectorModel& ) { - const bool update_wr = d.update_value( names::weight_recorder.toString(), weight_recorder_ ); + const bool update_wr = d.update_value( names::weight_recorder, weight_recorder_ ); if ( update_wr and weight_recorder_->size() > 1 ) { throw BadProperty( "weight_recorder must be a single element NodeCollection" ); diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp index a81028676b..6961f7696d 100644 --- a/nestkernel/conn_builder.cpp +++ b/nestkernel/conn_builder.cpp @@ -58,9 +58,9 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, // read out rule-related parameters ------------------------- // - /rule has been taken care of above // - rule-specific params are handled by subclass c'tor - conn_spec.update_value< bool >( names::allow_autapses.toString(), allow_autapses_ ); - conn_spec.update_value< bool >( names::allow_multapses.toString(), allow_multapses_ ); - conn_spec.update_value< bool >( names::make_symmetric.toString(), make_symmetric_ ); + conn_spec.update_value< bool >( names::allow_autapses, allow_autapses_ ); + conn_spec.update_value< bool >( names::allow_multapses, allow_multapses_ ); + conn_spec.update_value< bool >( names::make_symmetric, make_symmetric_ ); // read out synapse-related parameters ---------------------- @@ -93,7 +93,7 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, #ifdef HAVE_MUSIC // We allow music_channel as alias for receptor_type during // connection setup - syn_defaults[ names::music_channel.toString() ] = 0; + syn_defaults[ names::music_channel ] = 0; #endif set_synapse_params( syn_defaults, syn_params, synapse_indx ); @@ -432,9 +432,9 @@ nest::ConnBuilder::loop_over_targets_() const void nest::ConnBuilder::set_synapse_model_( dictionary syn_params, size_t synapse_indx ) { - if ( not syn_params.known( names::synapse_model.toString() ) ) + if ( not syn_params.known( names::synapse_model ) ) { - std::cerr << "synapse_model key: " << names::synapse_model.toString() << "\n"; + std::cerr << "synapse_model key: " << names::synapse_model << "\n"; std::cerr << "keys: " << "\n"; for ( auto& kv_pair : syn_params ) @@ -443,7 +443,7 @@ nest::ConnBuilder::set_synapse_model_( dictionary syn_params, size_t synapse_ind } throw BadProperty( "Synapse spec must contain synapse model." ); } - const std::string syn_name = syn_params.get< std::string >( names::synapse_model.toString() ); + const std::string syn_name = syn_params.get< std::string >( names::synapse_model ); if ( not kernel().model_manager.get_synapsedict().known( syn_name ) ) { throw UnknownSynapseType( syn_name ); @@ -464,8 +464,8 @@ nest::ConnBuilder::set_default_weight_or_delay_( dictionary syn_params, size_t s // All synapse models have the possibility to set the delay (see SynIdDelay), but some have // homogeneous weights, hence it should be possible to set the delay without the weight. - default_weight_[ synapse_indx ] = not syn_params.known( names::weight.toString() ); - default_delay_[ synapse_indx ] = not syn_params.known( names::delay.toString() ); + default_weight_[ synapse_indx ] = not syn_params.known( names::weight ); + default_delay_[ synapse_indx ] = not syn_params.known( names::delay ); // If neither weight nor delay are given in the dict, we handle this separately. Important for // hom_w synapses, on which weight cannot be set. However, we use default weight and delay for @@ -474,20 +474,20 @@ nest::ConnBuilder::set_default_weight_or_delay_( dictionary syn_params, size_t s if ( not default_weight_and_delay_[ synapse_indx ] ) { - weights_[ synapse_indx ] = syn_params.known( names::weight.toString() ) - ? ConnParameter::create( syn_params[ names::weight.toString() ], kernel().vp_manager.get_num_threads() ) - : ConnParameter::create( syn_defaults[ names::weight.toString() ], kernel().vp_manager.get_num_threads() ); + weights_[ synapse_indx ] = syn_params.known( names::weight ) + ? ConnParameter::create( syn_params[ names::weight ], kernel().vp_manager.get_num_threads() ) + : ConnParameter::create( syn_defaults[ names::weight ], kernel().vp_manager.get_num_threads() ); register_parameters_requiring_skipping_( *weights_[ synapse_indx ] ); - delays_[ synapse_indx ] = syn_params.known( names::delay.toString() ) - ? ConnParameter::create( syn_params[ names::delay.toString() ], kernel().vp_manager.get_num_threads() ) - : ConnParameter::create( syn_defaults[ names::delay.toString() ], kernel().vp_manager.get_num_threads() ); + delays_[ synapse_indx ] = syn_params.known( names::delay ) + ? ConnParameter::create( syn_params[ names::delay ], kernel().vp_manager.get_num_threads() ) + : ConnParameter::create( syn_defaults[ names::delay ], kernel().vp_manager.get_num_threads() ); } else if ( default_weight_[ synapse_indx ] ) { - delays_[ synapse_indx ] = syn_params.known( names::delay.toString() ) - ? ConnParameter::create( syn_params[ names::delay.toString() ], kernel().vp_manager.get_num_threads() ) - : ConnParameter::create( syn_defaults[ names::delay.toString() ], kernel().vp_manager.get_num_threads() ); + delays_[ synapse_indx ] = syn_params.known( names::delay ) + ? ConnParameter::create( syn_params[ names::delay ], kernel().vp_manager.get_num_threads() ) + : ConnParameter::create( syn_defaults[ names::delay ], kernel().vp_manager.get_num_threads() ); } register_parameters_requiring_skipping_( *delays_[ synapse_indx ] ); } @@ -540,13 +540,13 @@ nest::ConnBuilder::set_structural_plasticity_parameters( std::vector< dictionary bool have_one_sp_key = false; for ( auto syn_params : syn_specs ) { - if ( not have_both_sp_keys and ( syn_params.known( names::pre_synaptic_element.toString() ) - and syn_params.known( names::post_synaptic_element.toString() ) ) ) + if ( not have_both_sp_keys + and ( syn_params.known( names::pre_synaptic_element ) and syn_params.known( names::post_synaptic_element ) ) ) { have_both_sp_keys = true; } - if ( not have_one_sp_key and ( syn_params.known( names::pre_synaptic_element.toString() ) - or syn_params.known( names::post_synaptic_element.toString() ) ) ) + if ( not have_one_sp_key + and ( syn_params.known( names::pre_synaptic_element ) or syn_params.known( names::post_synaptic_element ) ) ) { have_one_sp_key = true; } @@ -558,8 +558,8 @@ nest::ConnBuilder::set_structural_plasticity_parameters( std::vector< dictionary } else if ( have_both_sp_keys ) { - pre_synaptic_element_name_ = syn_specs[ 0 ].get< std::string >( names::pre_synaptic_element.toString() ); - post_synaptic_element_name_ = syn_specs[ 0 ].get< std::string >( names::post_synaptic_element.toString() ); + pre_synaptic_element_name_ = syn_specs[ 0 ].get< std::string >( names::pre_synaptic_element ); + post_synaptic_element_name_ = syn_specs[ 0 ].get< std::string >( names::post_synaptic_element ); use_pre_synaptic_element_ = true; use_post_synaptic_element_ = true; @@ -1092,7 +1092,7 @@ nest::FixedInDegreeBuilder::FixedInDegreeBuilder( NodeCollectionPTR sources, { throw BadProperty( "Source array must not be empty." ); } - auto indegree = conn_spec.at( names::indegree.toString() ); + auto indegree = conn_spec.at( names::indegree ); if ( is_parameter( indegree ) ) { // TODO: Checks of parameter range @@ -1101,7 +1101,7 @@ nest::FixedInDegreeBuilder::FixedInDegreeBuilder( NodeCollectionPTR sources, else { // Assume indegree is a scalar - const long value = conn_spec.get< long >( names::indegree.toString() ); + const long value = conn_spec.get< long >( names::indegree ); indegree_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) ); // verify that indegree is not larger than source population if multapses are disabled @@ -1256,7 +1256,7 @@ nest::FixedOutDegreeBuilder::FixedOutDegreeBuilder( NodeCollectionPTR sources, { throw BadProperty( "Target array must not be empty." ); } - auto outdegree = conn_spec.at( names::outdegree.toString() ); + auto outdegree = conn_spec.at( names::outdegree ); if ( is_parameter( outdegree ) ) { // TODO: Checks of parameter range @@ -1265,7 +1265,7 @@ nest::FixedOutDegreeBuilder::FixedOutDegreeBuilder( NodeCollectionPTR sources, else { // Assume outdegree is a scalar - const long value = conn_spec.get< long >( names::outdegree.toString() ); + const long value = conn_spec.get< long >( names::outdegree ); outdegree_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) ); // verify that outdegree is not larger than target population if multapses @@ -1378,7 +1378,7 @@ nest::FixedTotalNumberBuilder::FixedTotalNumberBuilder( NodeCollectionPTR source const dictionary& conn_spec, const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) - , N_( boost::any_cast< long >( conn_spec.at( names::N.toString() ) ) ) + , N_( boost::any_cast< long >( conn_spec.at( names::N ) ) ) { // check for potential errors @@ -1477,7 +1477,7 @@ nest::FixedTotalNumberBuilder::connect_() sum_partitions += static_cast< unsigned int >( num_conns_on_vp[ k ] ); } -// end code adapted from gsl 1.8 + // end code adapted from gsl 1.8 #pragma omp parallel { @@ -1549,7 +1549,7 @@ nest::BernoulliBuilder::BernoulliBuilder( NodeCollectionPTR sources, const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) { - auto p = conn_spec.at( names::p.toString() ); + auto p = conn_spec.at( names::p ); if ( is_parameter( p ) ) { p_ = boost::any_cast< Parameter* >( p ); @@ -1558,7 +1558,7 @@ nest::BernoulliBuilder::BernoulliBuilder( NodeCollectionPTR sources, else { // Assume p is a scalar - const double value = conn_spec.get< double >( names::p.toString() ); + const double value = conn_spec.get< double >( names::p ); if ( value < 0 or 1 < value ) { throw BadProperty( "Connection probability 0 <= p <= 1 required." ); @@ -1663,7 +1663,7 @@ nest::SymmetricBernoulliBuilder::SymmetricBernoulliBuilder( NodeCollectionPTR so const dictionary& conn_spec, const std::vector< dictionary >& syn_specs ) : ConnBuilder( sources, targets, conn_spec, syn_specs ) - , p_( boost::any_cast< double >( conn_spec.at( names::p.toString() ) ) ) + , p_( boost::any_cast< double >( conn_spec.at( names::p ) ) ) { // This connector takes care of symmetric connections on its own creates_symmetric_connections_ = true; diff --git a/nestkernel/conn_builder_conngen.cpp b/nestkernel/conn_builder_conngen.cpp index ecc821b885..9517d5773a 100644 --- a/nestkernel/conn_builder_conngen.cpp +++ b/nestkernel/conn_builder_conngen.cpp @@ -56,7 +56,7 @@ ConnectionGeneratorBuilder::ConnectionGeneratorBuilder( NodeCollectionPTR source nest::kernel().get_dict_access_flag_manager().register_access( params_map_, kv.first ); } - if ( syn_specs[ 0 ].known( names::weight.toString() ) or syn_specs[ 0 ].known( names::delay.toString() ) ) + if ( syn_specs[ 0 ].known( names::weight ) or syn_specs[ 0 ].known( names::delay ) ) { throw BadProperty( "Properties weight and delay cannot be specified in syn_spec if the ConnectionGenerator has values." ); @@ -93,13 +93,13 @@ ConnectionGeneratorBuilder::connect_() } else if ( num_parameters == 2 ) { - if ( not params_map_.known( names::weight.toString() ) or not params_map_.known( names::delay.toString() ) ) + if ( not params_map_.known( names::weight ) or not params_map_.known( names::delay ) ) { throw BadProperty( "The parameter map has to contain the indices of weight and delay." ); } - const size_t d_idx = params_map_.get< size_t >( names::delay.toString() ); - const size_t w_idx = params_map_.get< size_t >( names::weight.toString() ); + const size_t d_idx = params_map_.get< size_t >( names::delay ); + const size_t w_idx = params_map_.get< size_t >( names::weight ); const bool d_idx_is_0_or_1 = ( d_idx == 0 ) or ( d_idx == 1 ); const bool w_idx_is_0_or_1 = ( w_idx == 0 ) or ( w_idx == 1 ); diff --git a/nestkernel/connection.h b/nestkernel/connection.h index 4500eee3cd..0658360bdb 100644 --- a/nestkernel/connection.h +++ b/nestkernel/connection.h @@ -50,24 +50,24 @@ namespace nest class ConnectorModel; /** - * Base class for dummy nodes used in connection testing. - * - * This class provides a based for dummy node objects that - * are used to test whether a connection can be established. - * The base class provides empty implementations of all pure - * virtual functions of class Node. - * - * Each connection class (i.e., each class derived from class - * template Connection), must derive a concrete ConnTestDummyNode - * class that overrides method Node::handles_test_event() for all - * event types that the connection supports. - * - * For details, see Kunkel et al, Front Neuroinform 8:78 (2014), - * Sec 3.3.1. Note that the ConnTestDummyNode class is called - * "check_helper" in the paper. - * - * @ingroup event_interface - */ + * Base class for dummy nodes used in connection testing. + * + * This class provides a based for dummy node objects that + * are used to test whether a connection can be established. + * The base class provides empty implementations of all pure + * virtual functions of class Node. + * + * Each connection class (i.e., each class derived from class + * template Connection), must derive a concrete ConnTestDummyNode + * class that overrides method Node::handles_test_event() for all + * event types that the connection supports. + * + * For details, see Kunkel et al, Front Neuroinform 8:78 (2014), + * Sec 3.3.1. Note that the ConnTestDummyNode class is called + * "check_helper" in the paper. + * + * @ingroup event_interface + */ class ConnTestDummyNodeBase : public Node { void @@ -346,7 +346,7 @@ template < typename targetidentifierT > inline void Connection< targetidentifierT >::get_status( dictionary& d ) const { - d[ names::delay.toString() ] = syn_id_delay_.get_delay_ms(); + d[ names::delay ] = syn_id_delay_.get_delay_ms(); target_.get_status( d ); } @@ -355,7 +355,7 @@ inline void Connection< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& ) { double delay; - if ( d.update_value( names::delay.toString(), delay ) ) + if ( d.update_value( names::delay, delay ) ) { kernel().connection_manager.get_delay_checker().assert_valid_delay_ms( delay ); syn_id_delay_.set_delay_ms( delay ); diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp index 1e765bd2de..9ced7893cd 100644 --- a/nestkernel/connection_creator.cpp +++ b/nestkernel/connection_creator.cpp @@ -40,13 +40,13 @@ ConnectionCreator::ConnectionCreator( dictionary dict ) Name connection_type; long number_of_connections( -1 ); // overwritten by dict entry - dict.update_value( names::connection_type.toString(), connection_type ); - dict.update_value( names::allow_autapses.toString(), allow_autapses_ ); - dict.update_value( names::allow_multapses.toString(), allow_multapses_ ); - dict.update_value( names::allow_oversized_mask.toString(), allow_oversized_ ); + dict.update_value( names::connection_type, connection_type ); + dict.update_value( names::allow_autapses, allow_autapses_ ); + dict.update_value( names::allow_multapses, allow_multapses_ ); + dict.update_value( names::allow_oversized_mask, allow_oversized_ ); // Need to store number of connections in a temporary variable to be able to detect negative values. - if ( dict.update_value( names::number_of_connections.toString(), number_of_connections ) ) + if ( dict.update_value( names::number_of_connections, number_of_connections ) ) { if ( number_of_connections < 0 ) { @@ -56,20 +56,20 @@ ConnectionCreator::ConnectionCreator( dictionary dict ) number_of_connections_ = number_of_connections; } // TODO-PYNEST-NG: implement mask with dictionary - // if ( dict.known( names::mask.toString() ) ) + // if ( dict.known( names::mask ) ) // { - // mask_ = NestModule::create_mask( ( *dict )[ names::mask.toString() ] ); + // mask_ = NestModule::create_mask( ( *dict )[ names::mask ] ); // } - if ( dict.known( names::kernel.toString() ) ) + if ( dict.known( names::kernel ) ) { - kernel_ = create_parameter( dict[ names::kernel.toString() ] ); + kernel_ = create_parameter( dict[ names::kernel ] ); } // TODO-PYNEST-NG: collocated synapses - // if ( dict.known( names::synapse_parameters.toString() ) ) + // if ( dict.known( names::synapse_parameters ) ) // { // // If synapse_parameters exists, we have collocated synapses. // ArrayDatum* syn_params_dvd = - // dynamic_cast< ArrayDatum* >( ( *dict )[ names::synapse_parameters.toString() ].datum() ); + // dynamic_cast< ArrayDatum* >( ( *dict )[ names::synapse_parameters ].datum() ); // if ( not syn_params_dvd ) // { // throw BadProperty( "synapse_parameters must be list of dictionaries" ); @@ -100,17 +100,17 @@ ConnectionCreator::ConnectionCreator( dictionary dict ) dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_[ 0 ] ); if ( weight_.empty() ) { - weight_ = { create_parameter( syn_defaults[ names::weight.toString() ] ) }; + weight_ = { create_parameter( syn_defaults[ names::weight ] ) }; } if ( delay_.empty() ) { - if ( not syn_defaults.get< bool >( names::has_delay.toString() ) ) + if ( not syn_defaults.get< bool >( names::has_delay ) ) { delay_ = { create_parameter( numerics::nan ) }; } else { - delay_ = { create_parameter( syn_defaults[ names::delay.toString() ] ) }; + delay_ = { create_parameter( syn_defaults[ names::delay ] ) }; } } @@ -147,11 +147,11 @@ ConnectionCreator::ConnectionCreator( dictionary dict ) void ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< dictionary >& params ) { - if ( not dict_datum.known( names::synapse_model.toString() ) ) + if ( not dict_datum.known( names::synapse_model ) ) { - dict_datum[ names::synapse_model.toString() ] = "static_synapse"; + dict_datum[ names::synapse_model ] = "static_synapse"; } - const std::string syn_name = dict_datum.get< std::string >( names::synapse_model.toString() ); + const std::string syn_name = dict_datum.get< std::string >( names::synapse_model ); if ( not kernel().model_manager.get_synapsedict().known( syn_name ) ) { @@ -161,28 +161,28 @@ ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< diction synapse_model_.push_back( synapse_model_id ); dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id ); - if ( dict_datum.known( names::weight.toString() ) ) + if ( dict_datum.known( names::weight ) ) { - weight_.push_back( create_parameter( dict_datum[ names::weight.toString() ] ) ); + weight_.push_back( create_parameter( dict_datum[ names::weight ] ) ); } else { - weight_.push_back( create_parameter( syn_defaults[ names::weight.toString() ] ) ); + weight_.push_back( create_parameter( syn_defaults[ names::weight ] ) ); } - if ( dict_datum.known( names::delay.toString() ) ) + if ( dict_datum.known( names::delay ) ) { - delay_.push_back( create_parameter( dict_datum[ names::delay.toString() ] ) ); + delay_.push_back( create_parameter( dict_datum[ names::delay ] ) ); } else { - if ( not syn_defaults.get< bool >( names::has_delay.toString() ) ) + if ( not syn_defaults.get< bool >( names::has_delay ) ) { delay_.push_back( create_parameter( numerics::nan ) ); } else { - delay_.push_back( create_parameter( syn_defaults[ names::delay.toString() ] ) ); + delay_.push_back( create_parameter( syn_defaults[ names::delay ] ) ); } } @@ -195,8 +195,8 @@ ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< diction syn_dict[ name ] = dict_datum.get< long >( name ); } }; - copy_long_if_known( names::synapse_label.toString() ); - copy_long_if_known( names::receptor_type.toString() ); + copy_long_if_known( names::synapse_label ); + copy_long_if_known( names::receptor_type ); params.resize( kernel().vp_manager.get_num_threads() ); #pragma omp parallel diff --git a/nestkernel/connection_id.cpp b/nestkernel/connection_id.cpp index 837180b721..2f8f6dc15c 100644 --- a/nestkernel/connection_id.cpp +++ b/nestkernel/connection_id.cpp @@ -61,15 +61,15 @@ ConnectionID::get_dict() const dictionary dict; // The node ID of the presynaptic node - dict[ nest::names::source.toString() ] = source_node_id_; + dict[ nest::names::source ] = source_node_id_; // The node ID of the postsynaptic node - dict[ nest::names::target.toString() ] = target_node_id_; + dict[ nest::names::target ] = target_node_id_; // The id of the synapse model - dict[ nest::names::synapse_modelid.toString() ] = synapse_modelid_; + dict[ nest::names::synapse_modelid ] = synapse_modelid_; // The thread of the postsynaptic node - dict[ nest::names::target_thread.toString() ] = target_thread_; + dict[ nest::names::target_thread ] = target_thread_; // The index in the list - dict[ nest::names::port.toString() ] = port_; + dict[ nest::names::port ] = port_; return dict; } @@ -86,7 +86,8 @@ ConnectionID::to_ArrayDatum() const return ad; } -bool ConnectionID::operator==( const ConnectionID& c ) const +bool +ConnectionID::operator==( const ConnectionID& c ) const { return ( source_node_id_ == c.source_node_id_ ) and ( target_node_id_ == c.target_node_id_ ) and ( target_thread_ == c.target_thread_ ) and ( port_ == c.port_ ) and ( synapse_modelid_ == c.synapse_modelid_ ); diff --git a/nestkernel/connection_label.h b/nestkernel/connection_label.h index 2dee50643a..dbb429134a 100644 --- a/nestkernel/connection_label.h +++ b/nestkernel/connection_label.h @@ -23,10 +23,10 @@ #ifndef CONNECTION_LABEL_H #define CONNECTION_LABEL_H -#include "nest.h" -#include "nest_names.h" #include "dictdatum.h" #include "dictutils.h" +#include "nest.h" +#include "nest_names.h" namespace nest { @@ -87,11 +87,11 @@ void ConnectionLabel< ConnectionT >::get_status( dictionary& d ) const { ConnectionT::get_status( d ); - d[ names::synapse_label.toString() ] = label_; + d[ names::synapse_label ] = label_; // override names::size_of from ConnectionT, // as the size from ConnectionLabel< ConnectionT > is // one long larger - d[ names::size_of.toString() ] = sizeof( *this ); + d[ names::size_of ] = sizeof( *this ); } template < typename ConnectionT > @@ -99,7 +99,7 @@ void ConnectionLabel< ConnectionT >::set_status( const dictionary& d, ConnectorModel& cm ) { long lbl; - if ( d.update_value( names::synapse_label.toString(), lbl ) ) + if ( d.update_value( names::synapse_label, lbl ) ) { if ( lbl >= 0 ) { diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 006dba5a97..8d787358d4 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -147,7 +147,7 @@ nest::ConnectionManager::set_status( const dictionary& d ) delay_checkers_[ i ].set_status( d ); } - d.update_value( names::keep_source_table.toString(), keep_source_table_ ); + d.update_value( names::keep_source_table, keep_source_table_ ); if ( not keep_source_table_ and kernel().sp_manager.is_structural_plasticity_enabled() ) { throw KernelException( @@ -155,7 +155,7 @@ nest::ConnectionManager::set_status( const dictionary& d ) "to false." ); } - d.update_value( names::sort_connections_by_source.toString(), sort_connections_by_source_ ); + d.update_value( names::sort_connections_by_source, sort_connections_by_source_ ); if ( not sort_connections_by_source_ and kernel().sp_manager.is_structural_plasticity_enabled() ) { throw KernelException( @@ -163,14 +163,14 @@ nest::ConnectionManager::set_status( const dictionary& d ) "be set to false." ); } - d.update_value( names::use_compressed_spikes.toString(), use_compressed_spikes_ ); + d.update_value( names::use_compressed_spikes, use_compressed_spikes_ ); if ( use_compressed_spikes_ and not sort_connections_by_source_ ) { throw KernelException( "Spike compression requires sort_connections_by_source to be true." ); } // Need to update the saved values if we have changed the delay bounds. - if ( d.known( names::min_delay.toString() ) or d.known( names::max_delay.toString() ) ) + if ( d.known( names::min_delay ) or d.known( names::max_delay ) ) { update_delay_extrema_(); } @@ -186,16 +186,16 @@ void nest::ConnectionManager::get_status( dictionary& dict ) { update_delay_extrema_(); - dict[ names::min_delay.toString() ] = Time( Time::step( min_delay_ ) ).get_ms(); - dict[ names::max_delay.toString() ] = Time( Time::step( max_delay_ ) ).get_ms(); + dict[ names::min_delay ] = Time( Time::step( min_delay_ ) ).get_ms(); + dict[ names::max_delay ] = Time( Time::step( max_delay_ ) ).get_ms(); const size_t n = get_num_connections(); - dict[ names::num_connections.toString() ] = n; - dict[ names::keep_source_table.toString() ] = keep_source_table_; - dict[ names::sort_connections_by_source.toString() ] = sort_connections_by_source_; - dict[ names::use_compressed_spikes.toString() ] = use_compressed_spikes_; + dict[ names::num_connections ] = n; + dict[ names::keep_source_table ] = keep_source_table_; + dict[ names::sort_connections_by_source ] = sort_connections_by_source_; + dict[ names::use_compressed_spikes ] = use_compressed_spikes_; - dict[ names::time_construction_connect.toString() ] = sw_construction_connect.elapsed(); + dict[ names::time_construction_connect ] = sw_construction_connect.elapsed(); } dictionary @@ -208,11 +208,11 @@ nest::ConnectionManager::get_synapse_status( const index source_node_id, kernel().model_manager.assert_valid_syn_id( syn_id ); dictionary dict; - dict[ names::source.toString() ] = source_node_id; - dict[ names::synapse_model.toString() ] = kernel().model_manager.get_synapse_prototype( syn_id ).get_name(); - dict[ names::target_thread.toString() ] = tid; - dict[ names::synapse_id.toString() ] = syn_id; - dict[ names::port.toString() ] = lcid; + dict[ names::source ] = source_node_id; + dict[ names::synapse_model ] = kernel().model_manager.get_synapse_prototype( syn_id ).get_name(); + dict[ names::target_thread ] = tid; + dict[ names::synapse_id ] = syn_id; + dict[ names::port ] = lcid; const Node* source = kernel().node_manager.get_node_or_proxy( source_node_id, tid ); const Node* target = kernel().node_manager.get_node_or_proxy( target_node_id, tid ); @@ -389,11 +389,11 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources, syn_param.init_access_flags(); } - if ( not conn_spec.known( names::rule.toString() ) ) + if ( not conn_spec.known( names::rule ) ) { throw BadProperty( "Connectivity spec must contain connectivity rule." ); } - const Name rule_name = conn_spec.get< std::string >( names::rule.toString() ); + const Name rule_name = conn_spec.get< std::string >( names::rule ); if ( not connruledict_.known( rule_name.toString() ) ) { @@ -424,9 +424,9 @@ nest::ConnectionManager::connect( TokenArray sources, TokenArray targets, const { // Get synapse id size_t syn_id = 0; - if ( syn_spec.known( names::model.toString() ) ) + if ( syn_spec.known( names::model ) ) { - std::string synmodel_name = syn_spec.get< std::string >( names::model.toString() ); + std::string synmodel_name = syn_spec.get< std::string >( names::model ); const auto& syndict = kernel().model_manager.get_synapsedict(); if ( syndict.known( synmodel_name ) ) @@ -930,19 +930,19 @@ nest::ConnectionManager::get_connections( const dictionary& params ) NodeCollectionPTR target_a = NodeCollectionPTR( 0 ); long synapse_label = UNLABELED_CONNECTION; - params.update_value( names::synapse_label.toString(), synapse_label ); + params.update_value( names::synapse_label, synapse_label ); - if ( params.known( names::source.toString() ) ) + if ( params.known( names::source ) ) { - source_a = params.get< NodeCollectionDatum >( names::source.toString() ); + source_a = params.get< NodeCollectionDatum >( names::source ); if ( not source_a->valid() ) { throw KernelException( "GetConnection requires valid source NodeCollection." ); } } - if ( params.known( names::target.toString() ) ) + if ( params.known( names::target ) ) { - target_a = params.get< NodeCollectionDatum >( names::target.toString() ); + target_a = params.get< NodeCollectionDatum >( names::target ); if ( not target_a->valid() ) { throw KernelException( "GetConnection requires valid target NodeCollection." ); @@ -968,9 +968,9 @@ nest::ConnectionManager::get_connections( const dictionary& params ) // First we check, whether a synapse model is given. // If not, we will iterate all. - if ( params.known( names::target.toString() ) ) + if ( params.known( names::target ) ) { - const auto synmodel_name = params.get< std::string >( names::synapse_model.toString() ); + const auto synmodel_name = params.get< std::string >( names::synapse_model ); const auto& syndict = kernel().model_manager.get_synapsedict(); // const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( synmodel_name ); if ( syndict.known( synmodel_name ) ) diff --git a/nestkernel/connector_base.h b/nestkernel/connector_base.h index fc547ed775..971389091f 100644 --- a/nestkernel/connector_base.h +++ b/nestkernel/connector_base.h @@ -64,7 +64,7 @@ class ConnectorBase // Destructor needs to be declared virtual to avoid undefined // behavior, avoid possible memory leak and needs to be defined to // avoid linker error, see, e.g., Meyers, S. (2005) p40ff - virtual ~ConnectorBase(){}; + virtual ~ConnectorBase() {}; /** * Return syn_id_ of the synapse type of this Connector (index in @@ -251,7 +251,7 @@ class Connector : public ConnectorBase // get target node ID here, where tid is available // necessary for hpc synapses using TargetIdentifierIndex - dict[ names::target.toString() ] = C_[ lcid ].get_target( tid )->get_node_id(); + dict[ names::target ] = C_[ lcid ].get_target( tid )->get_node_id(); } void @@ -425,7 +425,8 @@ class Connector : public ConnectorBase { if ( static_cast< GenericConnectorModel< ConnectionT >* >( cm[ syn_id_ ] ) ->get_common_properties() - .get_vt_node_id() == vt_node_id ) + .get_vt_node_id() + == vt_node_id ) { C_[ i ].trigger_update_weight( tid, dopa_spikes, diff --git a/nestkernel/connector_model_impl.h b/nestkernel/connector_model_impl.h index 1fdc2fff6c..1b75c91f3f 100644 --- a/nestkernel/connector_model_impl.h +++ b/nestkernel/connector_model_impl.h @@ -93,20 +93,20 @@ GenericConnectorModel< ConnectionT >::get_status( dictionary& d ) const // then get default properties for individual synapses default_connection_.get_status( d ); - d[ names::receptor_type.toString() ] = receptor_type_; - d[ names::synapse_model.toString() ] = name_; - d[ names::requires_symmetric.toString() ] = requires_symmetric_; - d[ names::has_delay.toString() ] = has_delay_; + d[ names::receptor_type ] = receptor_type_; + d[ names::synapse_model ] = name_; + d[ names::requires_symmetric ] = requires_symmetric_; + d[ names::has_delay ] = has_delay_; } template < typename ConnectionT > void GenericConnectorModel< ConnectionT >::set_status( const dictionary& d ) { - d.update_value( names::receptor_type.toString(), receptor_type_ ); + d.update_value( names::receptor_type, receptor_type_ ); #ifdef HAVE_MUSIC // We allow music_channel as alias for receptor_type during connection setup - d.update_value( names::music_channel.toString(), receptor_type_ ); + d.update_value( names::music_channel, receptor_type_ ); #endif // If the parameter dict d contains /delay, this should set the delay @@ -161,9 +161,9 @@ GenericConnectorModel< ConnectionT >::used_default_delay() throw BadDelay( default_connection_.get_delay(), String::compose( "Default delay of '%1' must be between min_delay %2 " "and max_delay %3.", - get_name(), - Time::delay_steps_to_ms( kernel().connection_manager.get_min_delay() ), - Time::delay_steps_to_ms( kernel().connection_manager.get_max_delay() ) ) ); + get_name(), + Time::delay_steps_to_ms( kernel().connection_manager.get_min_delay() ), + Time::delay_steps_to_ms( kernel().connection_manager.get_max_delay() ) ) ); } default_delay_needs_check_ = false; } @@ -193,7 +193,7 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src, kernel().connection_manager.get_delay_checker().assert_valid_delay_ms( delay ); } - if ( p.known( names::delay.toString() ) ) + if ( p.known( names::delay ) ) { throw BadParameter( "Parameter dictionary must not contain delay if delay is given " @@ -205,7 +205,7 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src, // check delay double delay = 0.0; - if ( p.update_value( names::delay.toString(), delay ) ) + if ( p.update_value( names::delay, delay ) ) { if ( has_delay_ ) { @@ -244,9 +244,9 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src, rport actual_receptor_type = receptor_type_; #ifdef HAVE_MUSIC // We allow music_channel as alias for receptor_type during connection setup - p.update_value( names::music_channel.toString(), actual_receptor_type ); + p.update_value( names::music_channel, actual_receptor_type ); #endif - p.update_value( names::receptor_type.toString(), actual_receptor_type ); + p.update_value( names::receptor_type, actual_receptor_type ); add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type ); } diff --git a/nestkernel/delay_checker.cpp b/nestkernel/delay_checker.cpp index f89056607f..4630baa042 100644 --- a/nestkernel/delay_checker.cpp +++ b/nestkernel/delay_checker.cpp @@ -60,8 +60,8 @@ nest::DelayChecker::calibrate( const TimeConverter& tc ) void nest::DelayChecker::get_status( dictionary& d ) const { - d[ names::min_delay.toString() ] = get_min_delay().get_ms(); - d[ names::max_delay.toString() ] = get_max_delay().get_ms(); + d[ names::min_delay ] = get_min_delay().get_ms(); + d[ names::max_delay ] = get_max_delay().get_ms(); } void @@ -73,7 +73,7 @@ nest::DelayChecker::set_status( const dictionary& d ) // a min delay that is one step too small. We can detect this by an // additional test. double delay_tmp = 0.0; - bool min_delay_updated = d.update_value( names::min_delay.toString(), delay_tmp ); + bool min_delay_updated = d.update_value( names::min_delay, delay_tmp ); Time new_min_delay; if ( min_delay_updated ) { @@ -86,7 +86,7 @@ nest::DelayChecker::set_status( const dictionary& d ) } // For the maximum delay, we always round up, using ms_stamp - bool max_delay_updated = d.update_value( names::max_delay.toString(), delay_tmp ); + bool max_delay_updated = d.update_value( names::max_delay, delay_tmp ); Time new_max_delay = Time( Time::ms_stamp( delay_tmp ) ); if ( min_delay_updated xor max_delay_updated ) diff --git a/nestkernel/device.cpp b/nestkernel/device.cpp index 16f799a5bb..44278c33c7 100644 --- a/nestkernel/device.cpp +++ b/nestkernel/device.cpp @@ -59,7 +59,8 @@ nest::Device::Parameters_::Parameters_( const Parameters_& p ) stop_.calibrate(); } -nest::Device::Parameters_& nest::Device::Parameters_::operator=( const Parameters_& p ) +nest::Device::Parameters_& +nest::Device::Parameters_::operator=( const Parameters_& p ) { origin_ = p.origin_; start_ = p.start_; @@ -76,9 +77,9 @@ nest::Device::Parameters_& nest::Device::Parameters_::operator=( const Parameter void nest::Device::Parameters_::get( dictionary& d ) const { - d[ names::origin.toString() ] = origin_.get_ms(); - d[ names::start.toString() ] = start_.get_ms(); - d[ names::stop.toString() ] = stop_.get_ms(); + d[ names::origin ] = origin_.get_ms(); + d[ names::start ] = start_.get_ms(); + d[ names::stop ] = stop_.get_ms(); } void @@ -109,9 +110,9 @@ nest::Device::Parameters_::update_( const dictionary& d, const Name& name, Time& void nest::Device::Parameters_::set( const dictionary& d ) { - d.update_value( names::origin.toString(), origin_ ); - d.update_value( names::start.toString(), start_ ); - d.update_value( names::stop.toString(), stop_ ); + d.update_value( names::origin, origin_ ); + d.update_value( names::start, start_ ); + d.update_value( names::stop, stop_ ); if ( stop_ < start_ ) { diff --git a/nestkernel/event_delivery_manager.cpp b/nestkernel/event_delivery_manager.cpp index 521602afc6..cd681c2c8c 100644 --- a/nestkernel/event_delivery_manager.cpp +++ b/nestkernel/event_delivery_manager.cpp @@ -98,8 +98,8 @@ EventDeliveryManager::initialize() std::vector< std::vector< Target > >( kernel().connection_manager.get_min_delay(), std::vector< Target >() ) ); off_grid_spike_register_[ tid ].resize( num_threads, - std::vector< std::vector< OffGridTarget > >( kernel().connection_manager.get_min_delay(), - std::vector< OffGridTarget >() ) ); + std::vector< std::vector< OffGridTarget > >( + kernel().connection_manager.get_min_delay(), std::vector< OffGridTarget >() ) ); } // of omp parallel } @@ -121,21 +121,20 @@ EventDeliveryManager::finalize() void EventDeliveryManager::set_status( const dictionary& dict ) { - dict.update_value( names::off_grid_spiking.toString(), off_grid_spiking_ ); + dict.update_value( names::off_grid_spiking, off_grid_spiking_ ); } void EventDeliveryManager::get_status( dictionary& dict ) { - dict[ names::off_grid_spiking.toString() ] = off_grid_spiking_; - dict[ names::local_spike_counter.toString() ] = - std::accumulate( local_spike_counter_.begin(), local_spike_counter_.end(), 0 ); + dict[ names::off_grid_spiking ] = off_grid_spiking_; + dict[ names::local_spike_counter ] = std::accumulate( local_spike_counter_.begin(), local_spike_counter_.end(), 0 ); #ifdef TIMER_DETAILED - dict[ names::time_collocate_spike_data.toString() ] = sw_collocate_spike_data_.elapsed(); - dict[ names::time_communicate_spike_data.toString() ] = sw_communicate_spike_data_.elapsed(); - dict[ names::time_deliver_spike_data.toString() ] = sw_deliver_spike_data_.elapsed(); - dict[ names::time_communicate_target_data.toString() ] = sw_communicate_target_data_.elapsed(); + dict[ names::time_collocate_spike_data ] = sw_collocate_spike_data_.elapsed(); + dict[ names::time_communicate_spike_data ] = sw_communicate_spike_data_.elapsed(); + dict[ names::time_deliver_spike_data ] = sw_deliver_spike_data_.elapsed(); + dict[ names::time_communicate_target_data ] = sw_communicate_target_data_.elapsed(); #endif } @@ -476,10 +475,10 @@ EventDeliveryManager::collocate_spike_data_buffers_( const thread tid, bool is_spike_register_empty = true; // First dimension: loop over writing thread - for ( - typename std::vector< std::vector< std::vector< std::vector< TargetT > > > >::iterator it = spike_register.begin(); - it != spike_register.end(); - ++it ) + for ( typename std::vector< std::vector< std::vector< std::vector< TargetT > > > >::iterator it = + spike_register.begin(); + it != spike_register.end(); + ++it ) { // Second dimension: fixed reading thread @@ -883,10 +882,10 @@ EventDeliveryManager::resize_spike_register_( const thread tid ) it->resize( kernel().connection_manager.get_min_delay(), std::vector< Target >() ); } - for ( - std::vector< std::vector< std::vector< OffGridTarget > > >::iterator it = off_grid_spike_register_[ tid ].begin(); - it != off_grid_spike_register_[ tid ].end(); - ++it ) + for ( std::vector< std::vector< std::vector< OffGridTarget > > >::iterator it = + off_grid_spike_register_[ tid ].begin(); + it != off_grid_spike_register_[ tid ].end(); + ++it ) { it->resize( kernel().connection_manager.get_min_delay(), std::vector< OffGridTarget >() ); } diff --git a/nestkernel/free_layer.h b/nestkernel/free_layer.h index 0f6aeb18e5..35bde32aca 100644 --- a/nestkernel/free_layer.h +++ b/nestkernel/free_layer.h @@ -82,11 +82,13 @@ class FreeLayer : public Layer< D > { return Position< D >( pos_ ); } - bool operator<( const NodePositionData& other ) const + bool + operator<( const NodePositionData& other ) const { return node_id_ < other.node_id_; } - bool operator==( const NodePositionData& other ) const + bool + operator==( const NodePositionData& other ) const { return node_id_ == other.node_id_; } @@ -114,20 +116,20 @@ FreeLayer< D >::set_status( const dictionary& d ) } // Read positions from dictionary - if ( d.known( names::positions.toString() ) ) + if ( d.known( names::positions ) ) { - const auto positions = d.at( names::positions.toString() ); + const auto positions = d.at( names::positions ); if ( is_double_vector_vector( positions ) ) { // If the positions are created from a layer sliced with step, we need to take that into consideration. // Because the implementation of NodeCollections sliced with step internally keeps the "skipped" nodes, // the positions must include the "skipped" nodes as well for consistency. size_t step = 1; - if ( d.known( names::step.toString() ) ) + if ( d.known( names::step ) ) { - step = d.get< long >( names::step.toString() ); + step = d.get< long >( names::step ); } - const auto pos = d.get< std::vector< std::vector< double > > >( names::positions.toString() ); + const auto pos = d.get< std::vector< std::vector< double > > >( names::positions ); const auto num_nodes = this->node_collection_->size(); // Number of positions, excluding the skipped nodes const auto stepped_pos_size = std::floor( pos.size() / ( float ) step ) + ( pos.size() % step > 0 ); @@ -164,7 +166,7 @@ FreeLayer< D >::set_status( const dictionary& d ) } else if ( is_parameter( positions ) ) { - auto pd = d.get< std::shared_ptr< Parameter > >( names::positions.toString() ); + auto pd = d.get< std::shared_ptr< Parameter > >( names::positions ); auto pos = dynamic_cast< DimensionParameter* >( pd.get() ); positions_.clear(); auto num_nodes = this->node_collection_->size(); @@ -195,9 +197,9 @@ FreeLayer< D >::set_status( const dictionary& d ) throw KernelException( "'positions' must be an array or a DimensionParameter." ); } } - if ( d.known( names::extent.toString() ) ) + if ( d.known( names::extent ) ) { - this->extent_ = d.get< std::vector< double > >( names::extent.toString() ); + this->extent_ = d.get< std::vector< double > >( names::extent ); Position< D > center = ( max_point + this->lower_left_ ) / 2; auto lower_left_point = this->lower_left_; // save lower-left-most point diff --git a/nestkernel/genericmodel.h b/nestkernel/genericmodel.h index a9bceed416..b81f6bfc19 100644 --- a/nestkernel/genericmodel.h +++ b/nestkernel/genericmodel.h @@ -251,7 +251,7 @@ dictionary GenericModel< ElementT >::get_status_() { dictionary d = proto_.get_status_base(); - d[ names::elementsize.toString() ] = sizeof( ElementT ); + d[ names::elementsize ] = sizeof( ElementT ); return d; } diff --git a/nestkernel/grid_layer.h b/nestkernel/grid_layer.h index 8ecce08128..bb2266768c 100644 --- a/nestkernel/grid_layer.h +++ b/nestkernel/grid_layer.h @@ -74,7 +74,8 @@ class GridLayer : public Layer< D > /** * Postfix increment operator. */ - masked_iterator operator++( int ) + masked_iterator + operator++( int ) { masked_iterator tmp = *this; ++*this; @@ -84,11 +85,13 @@ class GridLayer : public Layer< D > /** * Iterators are equal if they point to the same node in the same layer. */ - bool operator==( const masked_iterator& other ) const + bool + operator==( const masked_iterator& other ) const { return ( other.layer_.get_metadata() == layer_.get_metadata() ) && ( other.node_ == node_ ); } - bool operator!=( const masked_iterator& other ) const + bool + operator!=( const masked_iterator& other ) const { return ( other.layer_.get_metadata() != layer_.get_metadata() ) || ( other.node_ != node_ ); } @@ -168,7 +171,7 @@ GridLayer< D >::set_status( const dictionary& d ) { std::vector< long > new_dims( D ); - d.update_value( names::shape.toString(), new_dims ); + d.update_value( names::shape, new_dims ); index new_size = 1; for ( int i = 0; i < D; ++i ) @@ -183,15 +186,15 @@ GridLayer< D >::set_status( const dictionary& d ) throw BadProperty( "Total size of layer must be unchanged." ); } - if ( d.known( names::extent.toString() ) ) + if ( d.known( names::extent ) ) { Position< D > center = this->get_center(); - this->extent_ = d.get< std::vector< double > >( names::extent.toString() ); + this->extent_ = d.get< std::vector< double > >( names::extent ); this->lower_left_ = center - this->extent_ / 2; } - if ( d.known( names::center.toString() ) ) + if ( d.known( names::center ) ) { - this->lower_left_ = d.get< std::vector< double > >( names::center.toString() ); + this->lower_left_ = d.get< std::vector< double > >( names::center ); this->lower_left_ -= this->extent_ / 2; } @@ -204,7 +207,7 @@ GridLayer< D >::get_status( dictionary& d ) const { Layer< D >::get_status( d ); - d[ names::shape.toString() ] = std::vector< index >( dims_.get_vector() ); + d[ names::shape ] = std::vector< index >( dims_.get_vector() ); } template < int D > @@ -378,7 +381,8 @@ inline std::pair< Position< D >, index > GridLayer< D >::masked_iterator::operat } template < int D > -typename GridLayer< D >::masked_iterator& GridLayer< D >::masked_iterator::operator++() +typename GridLayer< D >::masked_iterator& +GridLayer< D >::masked_iterator::operator++() { do { diff --git a/nestkernel/grid_mask.h b/nestkernel/grid_mask.h index 853178ea7d..c89862e0da 100644 --- a/nestkernel/grid_mask.h +++ b/nestkernel/grid_mask.h @@ -112,7 +112,7 @@ class GridMask : public AbstractMask template < int D > GridMask< D >::GridMask( const dictionary& d ) { - std::vector< long > shape = d.get< std::vector< long > >( names::shape.toString() ); + std::vector< long > shape = d.get< std::vector< long > >( names::shape ); if ( D == 2 ) { @@ -152,14 +152,14 @@ GridMask< D >::get_dict() const long shape_x = lower_right_[ 0 ] - upper_left_[ 0 ]; long shape_y = lower_right_[ 1 ] - upper_left_[ 1 ]; - std::vector< long > shape_dim{ shape_x, shape_y }; + std::vector< long > shape_dim { shape_x, shape_y }; if ( D == 3 ) { long shape_z = lower_right_[ 2 ] - upper_left_[ 2 ]; shape_dim.push_back( shape_z ); } - maskd[ names::shape.toString() ] = shape_dim; + maskd[ names::shape ] = shape_dim; return d; } diff --git a/nestkernel/growth_curve.cpp b/nestkernel/growth_curve.cpp index b8e35f8c2b..4b2112927d 100644 --- a/nestkernel/growth_curve.cpp +++ b/nestkernel/growth_curve.cpp @@ -52,14 +52,14 @@ nest::GrowthCurveLinear::GrowthCurveLinear() void nest::GrowthCurveLinear::get( dictionary& d ) const { - d[ names::growth_curve.toString() ] = name_.toString(); - d[ names::eps.toString() ] = eps_; + d[ names::growth_curve ] = name_.toString(); + d[ names::eps ] = eps_; } void nest::GrowthCurveLinear::set( const dictionary& d ) { - d.update_value( names::eps.toString(), eps_ ); + d.update_value( names::eps, eps_ ); } double @@ -90,16 +90,16 @@ nest::GrowthCurveGaussian::GrowthCurveGaussian() void nest::GrowthCurveGaussian::get( dictionary& d ) const { - d[ names::growth_curve.toString() ] = name_.toString(); - d[ names::eps.toString() ] = eps_; - d[ names::eta.toString() ] = eta_; + d[ names::growth_curve ] = name_.toString(); + d[ names::eps ] = eps_; + d[ names::eta ] = eta_; } void nest::GrowthCurveGaussian::set( const dictionary& d ) { - d.update_value( names::eps.toString(), eps_ ); - d.update_value( names::eta.toString(), eta_ ); + d.update_value( names::eps, eps_ ); + d.update_value( names::eta, eta_ ); } double @@ -143,16 +143,16 @@ nest::GrowthCurveSigmoid::GrowthCurveSigmoid() void nest::GrowthCurveSigmoid::get( dictionary& d ) const { - d[ names::growth_curve.toString() ] = name_.toString(); - d[ names::eps.toString() ] = eps_; - d[ names::psi.toString() ] = psi_; + d[ names::growth_curve ] = name_.toString(); + d[ names::eps ] = eps_; + d[ names::psi ] = psi_; } void nest::GrowthCurveSigmoid::set( const dictionary& d ) { - d.update_value( names::eps.toString(), eps_ ); - d.update_value( names::psi.toString(), psi_ ); + d.update_value( names::eps, eps_ ); + d.update_value( names::psi, psi_ ); // check that w is greater than 0 if ( not( psi_ >= 0 ) ) diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp index 0221ebfe7e..8908b1deb8 100644 --- a/nestkernel/io_manager.cpp +++ b/nestkernel/io_manager.cpp @@ -80,7 +80,7 @@ void IOManager::set_data_path_prefix_( const dictionary& dict ) { std::string tmp; - if ( dict.update_value( names::data_path.toString(), tmp ) ) + if ( dict.update_value( names::data_path, tmp ) ) { DIR* testdir = opendir( tmp.c_str() ); if ( testdir != NULL ) @@ -109,7 +109,7 @@ IOManager::set_data_path_prefix_( const dictionary& dict ) } } - if ( dict.update_value( names::data_prefix.toString(), tmp ) ) + if ( dict.update_value( names::data_prefix, tmp ) ) { if ( tmp.find( '/' ) == std::string::npos ) { @@ -130,12 +130,12 @@ IOManager::initialize() char* data_path = std::getenv( "NEST_DATA_PATH" ); if ( data_path ) { - dict[ names::data_path.toString() ] = std::string( data_path ); + dict[ names::data_path ] = std::string( data_path ); } char* data_prefix = std::getenv( "NEST_DATA_PREFIX" ); if ( data_prefix ) { - dict[ names::data_prefix.toString() ] = std::string( data_prefix ); + dict[ names::data_prefix ] = std::string( data_prefix ); } set_data_path_prefix_( dict ); @@ -184,10 +184,10 @@ IOManager::set_status( const dictionary& d ) { set_data_path_prefix_( d ); - d.update_value( names::overwrite_files.toString(), overwrite_files_ ); + d.update_value( names::overwrite_files, overwrite_files_ ); dictionary recording_backends; - if ( d.update_value( names::recording_backends.toString(), recording_backends ) ) + if ( d.update_value( names::recording_backends, recording_backends ) ) { for ( const auto& it : recording_backends_ ) { @@ -203,9 +203,9 @@ IOManager::set_status( const dictionary& d ) void IOManager::get_status( dictionary& d ) { - d[ names::data_path.toString() ] = data_path_; - d[ names::data_prefix.toString() ] = data_prefix_; - d[ names::overwrite_files.toString() ] = overwrite_files_; + d[ names::data_path ] = data_path_; + d[ names::data_prefix ] = data_prefix_; + d[ names::overwrite_files ] = overwrite_files_; dictionary recording_backends; for ( const auto& it : recording_backends_ ) @@ -214,7 +214,7 @@ IOManager::get_status( dictionary& d ) it.second->get_status( recording_backend_status ); recording_backends[ it.first.toString() ] = recording_backend_status; } - d[ names::recording_backends.toString() ] = recording_backends; + d[ names::recording_backends ] = recording_backends; } void diff --git a/nestkernel/layer.cpp b/nestkernel/layer.cpp index 0444611a61..041dd74480 100644 --- a/nestkernel/layer.cpp +++ b/nestkernel/layer.cpp @@ -24,9 +24,9 @@ // Includes from nestkernel: #include "exceptions.h" +#include "kernel_manager.h" #include "nest_names.h" #include "node_collection.h" -#include "kernel_manager.h" #include "parameter.h" // Includes from sli: @@ -57,7 +57,7 @@ AbstractLayer::create_layer( const dictionary& layer_dict ) index length = 0; AbstractLayer* layer_local = 0; - auto element_name = layer_dict.get< std::string >( names::elements.toString() ); + auto element_name = layer_dict.get< std::string >( names::elements ); if ( not kernel().model_manager.get_modeldict().known( element_name ) ) { @@ -66,31 +66,31 @@ AbstractLayer::create_layer( const dictionary& layer_dict ) auto element_model = kernel().model_manager.get_modeldict().get< index >( element_name ); auto element_id = static_cast< long >( element_model ); - if ( layer_dict.known( names::positions.toString() ) ) + if ( layer_dict.known( names::positions ) ) { - if ( layer_dict.known( names::shape.toString() ) ) + if ( layer_dict.known( names::shape ) ) { throw BadProperty( "Cannot specify both positions and shape." ); } int num_dimensions = 0; - const auto positions = layer_dict.at( names::positions.toString() ); + const auto positions = layer_dict.at( names::positions ); if ( is_double_vector_vector( positions ) ) { - const auto pos = layer_dict.get< std::vector< std::vector< double > > >( names::positions.toString() ); + const auto pos = layer_dict.get< std::vector< std::vector< double > > >( names::positions ); length = pos.size(); num_dimensions = pos[ 0 ].size(); } else if ( is_parameter( positions ) ) { - auto pd = layer_dict.get< std::shared_ptr< Parameter > >( names::positions.toString() ); + auto pd = layer_dict.get< std::shared_ptr< Parameter > >( names::positions ); auto pos = dynamic_cast< DimensionParameter* >( pd.get() ); // To avoid nasty segfaults, we check that the parameter is indeed a DimensionParameter. if ( not std::is_same< std::remove_reference< decltype( *pos ) >::type, DimensionParameter >::value ) { throw KernelException( "When 'positions' is a Parameter, it must be a DimensionParameter." ); } - length = layer_dict.get< long >( names::n.toString() ); + length = layer_dict.get< long >( names::n ); num_dimensions = pos->get_num_dimensions(); } else @@ -116,16 +116,11 @@ AbstractLayer::create_layer( const dictionary& layer_dict ) throw BadProperty( "Positions must have 2 or 3 coordinates." ); } } - else if ( layer_dict.known( names::shape.toString() ) ) + else if ( layer_dict.known( names::shape ) ) { - std::vector< long > shape = layer_dict.get< std::vector< long > >( names::shape.toString() ); - - if ( not std::all_of( shape.begin(), - shape.end(), - []( long x ) - { - return x > 0; - } ) ) + std::vector< long > shape = layer_dict.get< std::vector< long > >( names::shape ); + + if ( not std::all_of( shape.begin(), shape.end(), []( long x ) { return x > 0; } ) ) { throw BadProperty( "All shape entries must be positive." ); } diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h index 9298f0d9cb..d92ec025f3 100644 --- a/nestkernel/layer_impl.h +++ b/nestkernel/layer_impl.h @@ -26,9 +26,9 @@ #include "layer.h" // Includes from nestkernel: -#include "node_collection.h" -#include "nest_datums.h" #include "booldatum.h" +#include "nest_datums.h" +#include "node_collection.h" // Includes from spatial: #include "grid_layer.h" @@ -81,9 +81,9 @@ template < int D > void Layer< D >::set_status( const dictionary& d ) { - if ( d.known( names::edge_wrap.toString() ) ) + if ( d.known( names::edge_wrap ) ) { - if ( d.get< bool >( names::edge_wrap.toString() ) ) + if ( d.get< bool >( names::edge_wrap ) ) { periodic_ = ( 1 << D ) - 1; // All dimensions periodic } @@ -94,16 +94,16 @@ template < int D > void Layer< D >::get_status( dictionary& d ) const { - d[ names::extent.toString() ] = std::vector< double >( extent_.get_vector() ); - d[ names::center.toString() ] = std::vector< double >( ( lower_left_ + extent_ / 2 ).get_vector() ); + d[ names::extent ] = std::vector< double >( extent_.get_vector() ); + d[ names::center ] = std::vector< double >( ( lower_left_ + extent_ / 2 ).get_vector() ); if ( periodic_.none() ) { - d[ names::edge_wrap.toString() ] = BoolDatum( false ); + d[ names::edge_wrap ] = BoolDatum( false ); } else if ( periodic_.count() == D ) { - d[ names::edge_wrap.toString() ] = true; + d[ names::edge_wrap ] = true; } } @@ -306,7 +306,7 @@ Layer< D >::dump_connections( std::ostream& out, // Dictionary with parameters for get_connections() dictionary ncdict; - ncdict[ names::synapse_model.toString() ] = syn_model; + ncdict[ names::synapse_model ] = syn_model; // Avoid setting up new array for each iteration of the loop std::vector< index > source_array( 1 ); @@ -320,7 +320,7 @@ Layer< D >::dump_connections( std::ostream& out, const Position< D > source_pos = src_iter->first; source_array[ 0 ] = source_node_id; - ncdict[ names::source.toString() ] = NodeCollectionDatum( NodeCollection::create( source_array ) ); + ncdict[ names::source ] = NodeCollectionDatum( NodeCollection::create( source_array ) ); ArrayDatum connectome = kernel().connection_manager.get_connections( ncdict ); // Print information about all local connections for current source @@ -333,9 +333,9 @@ Layer< D >::dump_connections( std::ostream& out, con_id.get_synapse_model_id(), con_id.get_port() ); - long target_node_id = result_dict.get< long >( names::target.toString() ); - double weight = result_dict.get< double >( names::weight.toString() ); - double delay = result_dict.get< double >( names::delay.toString() ); + long target_node_id = result_dict.get< long >( names::target ); + double weight = result_dict.get< double >( names::weight ); + double delay = result_dict.get< double >( names::delay ); // Print source, target, weight, delay, rports out << source_node_id << ' ' << target_node_id << ' ' << weight << ' ' << delay; diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp index 5a186c3e16..b5e0196191 100644 --- a/nestkernel/logging_manager.cpp +++ b/nestkernel/logging_manager.cpp @@ -55,13 +55,13 @@ nest::LoggingManager::finalize() void nest::LoggingManager::set_status( const dictionary& dict ) { - dict.update_value( names::dict_miss_is_error.toString(), dict_miss_is_error_ ); + dict.update_value( names::dict_miss_is_error, dict_miss_is_error_ ); } void nest::LoggingManager::get_status( dictionary& dict ) { - dict[ names::dict_miss_is_error.toString() ] = dict_miss_is_error_; + dict[ names::dict_miss_is_error ] = dict_miss_is_error_; } diff --git a/nestkernel/mask.h b/nestkernel/mask.h index fe3e0cc07b..eba6426f63 100644 --- a/nestkernel/mask.h +++ b/nestkernel/mask.h @@ -531,7 +531,7 @@ class IntersectionMask : public Mask< D > Mask< D >* clone() const; protected: - Mask< D >* mask1_, *mask2_; + Mask< D >*mask1_, *mask2_; }; /** @@ -580,7 +580,7 @@ class UnionMask : public Mask< D > Mask< D >* clone() const; protected: - Mask< D >* mask1_, *mask2_; + Mask< D >*mask1_, *mask2_; }; /** @@ -629,7 +629,7 @@ class DifferenceMask : public Mask< D > Mask< D >* clone() const; protected: - Mask< D >* mask1_, *mask2_; + Mask< D >*mask1_, *mask2_; }; @@ -748,8 +748,8 @@ BoxMask< 3 >::get_name() template < int D > BoxMask< D >::BoxMask( const dictionary& d ) { - lower_left_ = d.get< std::vector< double > >( names::lower_left.toString() ); - upper_right_ = d.get< std::vector< double > >( names::upper_right.toString() ); + lower_left_ = d.get< std::vector< double > >( names::lower_left ); + upper_right_ = d.get< std::vector< double > >( names::upper_right ); if ( not( lower_left_ < upper_right_ ) ) { @@ -758,16 +758,16 @@ BoxMask< D >::BoxMask( const dictionary& d ) "Upper right must be strictly to the right and above lower left." ); } - if ( d.known( names::azimuth_angle.toString() ) ) + if ( d.known( names::azimuth_angle ) ) { - azimuth_angle_ = d.get< double >( names::azimuth_angle.toString() ); + azimuth_angle_ = d.get< double >( names::azimuth_angle ); } else { azimuth_angle_ = 0.0; } - if ( d.known( names::polar_angle.toString() ) ) + if ( d.known( names::polar_angle ) ) { if ( D == 2 ) { @@ -775,7 +775,7 @@ BoxMask< D >::BoxMask( const dictionary& d ) "nest::BoxMask: " "polar_angle not defined in 2D." ); } - polar_angle_ = d.get< double >( names::polar_angle.toString() ); + polar_angle_ = d.get< double >( names::polar_angle ); } else { @@ -909,7 +909,7 @@ BallMask< 3 >::get_name() template < int D > BallMask< D >::BallMask( const dictionary& d ) { - radius_ = d.get< double >( names::radius.toString() ); + radius_ = d.get< double >( names::radius ); if ( radius_ <= 0 ) { throw BadProperty( @@ -917,9 +917,9 @@ BallMask< D >::BallMask( const dictionary& d ) "radius > 0 required." ); } - if ( d.known( names::anchor.toString() ) ) + if ( d.known( names::anchor ) ) { - center_ = d.get< std::vector< double > >( names::anchor.toString() ); + center_ = d.get< std::vector< double > >( names::anchor ); } } @@ -940,8 +940,8 @@ EllipseMask< 3 >::get_name() template < int D > EllipseMask< D >::EllipseMask( const dictionary& d ) { - major_axis_ = d.get< double >( names::major_axis.toString() ); - minor_axis_ = d.get< double >( names::minor_axis.toString() ); + major_axis_ = d.get< double >( names::major_axis ); + minor_axis_ = d.get< double >( names::minor_axis ); if ( major_axis_ <= 0 or minor_axis_ <= 0 ) { throw BadProperty( @@ -958,7 +958,7 @@ EllipseMask< D >::EllipseMask( const dictionary& d ) x_scale_ = 4.0 / ( major_axis_ * major_axis_ ); y_scale_ = 4.0 / ( minor_axis_ * minor_axis_ ); - if ( d.known( names::polar_axis.toString() ) ) + if ( d.known( names::polar_axis ) ) { if ( D == 2 ) { @@ -966,7 +966,7 @@ EllipseMask< D >::EllipseMask( const dictionary& d ) "nest::EllipseMask: " "polar_axis not defined in 2D." ); } - polar_axis_ = d.get< double >( names::polar_axis.toString() ); + polar_axis_ = d.get< double >( names::polar_axis ); if ( polar_axis_ <= 0 ) { @@ -983,21 +983,21 @@ EllipseMask< D >::EllipseMask( const dictionary& d ) z_scale_ = 0.0; } - if ( d.known( names::anchor.toString() ) ) + if ( d.known( names::anchor ) ) { - center_ = d.get< std::vector< double > >( names::anchor.toString() ); + center_ = d.get< std::vector< double > >( names::anchor ); } - if ( d.known( names::azimuth_angle.toString() ) ) + if ( d.known( names::azimuth_angle ) ) { - azimuth_angle_ = d.get< double >( names::azimuth_angle.toString() ); + azimuth_angle_ = d.get< double >( names::azimuth_angle ); } else { azimuth_angle_ = 0.0; } - if ( d.known( names::polar_angle.toString() ) ) + if ( d.known( names::polar_angle ) ) { if ( D == 2 ) { @@ -1005,7 +1005,7 @@ EllipseMask< D >::EllipseMask( const dictionary& d ) "nest::EllipseMask: " "polar_angle not defined in 2D." ); } - polar_angle_ = d.get< double >( names::polar_angle.toString() ); + polar_angle_ = d.get< double >( names::polar_angle ); } else { diff --git a/nestkernel/mask_impl.h b/nestkernel/mask_impl.h index 3808aadb66..16fef66c58 100644 --- a/nestkernel/mask_impl.h +++ b/nestkernel/mask_impl.h @@ -134,10 +134,10 @@ BoxMask< D >::get_dict() const dictionary d; dictionary maskd; d[ get_name().toString() ] = maskd; - maskd[ names::lower_left.toString() ] = lower_left_.get_vector(); - maskd[ names::upper_right.toString() ] = upper_right_.get_vector(); - maskd[ names::azimuth_angle.toString() ] = azimuth_angle_; - maskd[ names::polar_angle.toString() ] = polar_angle_; + maskd[ names::lower_left ] = lower_left_.get_vector(); + maskd[ names::upper_right ] = upper_right_.get_vector(); + maskd[ names::azimuth_angle ] = azimuth_angle_; + maskd[ names::polar_angle ] = polar_angle_; return d; } @@ -210,8 +210,8 @@ BallMask< D >::get_dict() const dictionary d; dictionary maskd; d[ get_name().toString() ] = maskd; - maskd[ names::radius.toString() ] = radius_; - maskd[ names::anchor.toString() ] = center_.get_vector(); + maskd[ names::radius ] = radius_; + maskd[ names::anchor ] = center_.get_vector(); return d; } @@ -288,12 +288,12 @@ EllipseMask< D >::get_dict() const dictionary d; dictionary maskd; d[ get_name().toString() ] = maskd; - maskd[ names::major_axis.toString() ] = major_axis_; - maskd[ names::minor_axis.toString() ] = minor_axis_; - maskd[ names::polar_axis.toString() ] = polar_axis_; - maskd[ names::anchor.toString() ] = center_.get_vector(); - maskd[ names::azimuth_angle.toString() ] = azimuth_angle_; - maskd[ names::polar_angle.toString() ] = polar_angle_; + maskd[ names::major_axis ] = major_axis_; + maskd[ names::minor_axis ] = minor_axis_; + maskd[ names::polar_axis ] = polar_axis_; + maskd[ names::anchor ] = center_.get_vector(); + maskd[ names::azimuth_angle ] = azimuth_angle_; + maskd[ names::polar_angle ] = polar_angle_; return d; } @@ -506,7 +506,7 @@ dictionary AnchoredMask< D >::get_dict() const { dictionary d = m_->get_dict(); - d[ names::anchor.toString() ] = anchor_.get_vector(); + d[ names::anchor ] = anchor_.get_vector(); return d; } diff --git a/nestkernel/model.cpp b/nestkernel/model.cpp index f08894b9aa..c85ac96dae 100644 --- a/nestkernel/model.cpp +++ b/nestkernel/model.cpp @@ -134,24 +134,24 @@ Model::get_status( void ) tmp[ t ] = memory_[ t ].get_instantiations(); } - d[ names::instantiations.toString() ] = Token( tmp ); - d[ names::type_id.toString() ] = kernel().model_manager.get_model( type_id_ )->get_name(); + d[ names::instantiations ] = Token( tmp ); + d[ names::type_id ] = kernel().model_manager.get_model( type_id_ )->get_name(); for ( size_t t = 0; t < tmp.size(); ++t ) { tmp[ t ] = memory_[ t ].get_total(); } - d[ names::capacity.toString() ] = Token( tmp ); + d[ names::capacity ] = Token( tmp ); for ( size_t t = 0; t < tmp.size(); ++t ) { tmp[ t ] = memory_[ t ].available(); } - d[ names::available.toString() ] = Token( tmp ); + d[ names::available ] = Token( tmp ); - d[ names::model.toString() ] = get_name(); + d[ names::model ] = get_name(); return d; } diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index dd4a431a64..4547bc799b 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -177,7 +177,7 @@ void ModelManager::get_status( dictionary& dict ) { // syn_ids start at 0, so the maximal number of syn models is MAX_SYN_ID + 1 - dict[ names::max_num_syn_models.toString() ] = MAX_SYN_ID + 1; + dict[ names::max_num_syn_models ] = MAX_SYN_ID + 1; } index @@ -397,7 +397,7 @@ ModelManager::get_connector_defaults( synindex syn_id ) const prototypes_[ t ][ syn_id ]->get_status( dict ); } - dict[ names::num_connections.toString() ] = kernel().connection_manager.get_num_connections( syn_id ); + dict[ names::num_connections ] = kernel().connection_manager.get_num_connections( syn_id ); return dict; } diff --git a/nestkernel/mpi_manager.cpp b/nestkernel/mpi_manager.cpp index 18db124dc6..a794d77373 100644 --- a/nestkernel/mpi_manager.cpp +++ b/nestkernel/mpi_manager.cpp @@ -195,11 +195,11 @@ nest::MPIManager::finalize() void nest::MPIManager::set_status( const dictionary& dict ) { - dict.update_value( names::adaptive_target_buffers.toString(), adaptive_target_buffers_ ); - dict.update_value( names::adaptive_spike_buffers.toString(), adaptive_spike_buffers_ ); + dict.update_value( names::adaptive_target_buffers, adaptive_target_buffers_ ); + dict.update_value( names::adaptive_spike_buffers, adaptive_spike_buffers_ ); long new_buffer_size_target_data = buffer_size_target_data_; - dict.update_value( names::buffer_size_target_data.toString(), new_buffer_size_target_data ); + dict.update_value( names::buffer_size_target_data, new_buffer_size_target_data ); if ( new_buffer_size_target_data != static_cast< long >( buffer_size_target_data_ ) and new_buffer_size_target_data < static_cast< long >( max_buffer_size_target_data_ ) ) { @@ -207,36 +207,36 @@ nest::MPIManager::set_status( const dictionary& dict ) } long new_buffer_size_spike_data = buffer_size_spike_data_; - dict.update_value( names::buffer_size_spike_data.toString(), new_buffer_size_spike_data ); + dict.update_value( names::buffer_size_spike_data, new_buffer_size_spike_data ); if ( new_buffer_size_spike_data != static_cast< long >( buffer_size_spike_data_ ) and new_buffer_size_spike_data < static_cast< long >( max_buffer_size_spike_data_ ) ) { set_buffer_size_spike_data( new_buffer_size_spike_data ); } - dict.update_value( names::growth_factor_buffer_spike_data.toString(), growth_factor_buffer_spike_data_ ); - dict.update_value( names::growth_factor_buffer_target_data.toString(), growth_factor_buffer_target_data_ ); + dict.update_value( names::growth_factor_buffer_spike_data, growth_factor_buffer_spike_data_ ); + dict.update_value( names::growth_factor_buffer_target_data, growth_factor_buffer_target_data_ ); - dict.update_value( names::max_buffer_size_target_data.toString(), max_buffer_size_target_data_ ); - dict.update_value( names::max_buffer_size_spike_data.toString(), max_buffer_size_spike_data_ ); + dict.update_value( names::max_buffer_size_target_data, max_buffer_size_target_data_ ); + dict.update_value( names::max_buffer_size_spike_data, max_buffer_size_spike_data_ ); - dict.update_value( names::shrink_factor_buffer_spike_data.toString(), shrink_factor_buffer_spike_data_ ); + dict.update_value( names::shrink_factor_buffer_spike_data, shrink_factor_buffer_spike_data_ ); } void nest::MPIManager::get_status( dictionary& dict ) { - dict[ names::num_processes.toString() ] = num_processes_; - dict[ names::adaptive_spike_buffers.toString() ] = adaptive_spike_buffers_; - dict[ names::adaptive_target_buffers.toString() ] = adaptive_target_buffers_; - dict[ names::buffer_size_target_data.toString() ] = buffer_size_target_data_; - dict[ names::buffer_size_spike_data.toString() ] = buffer_size_spike_data_; - dict[ names::send_buffer_size_secondary_events.toString() ] = get_send_buffer_size_secondary_events_in_int(); - dict[ names::recv_buffer_size_secondary_events.toString() ] = get_recv_buffer_size_secondary_events_in_int(); - dict[ names::max_buffer_size_spike_data.toString() ] = max_buffer_size_spike_data_; - dict[ names::max_buffer_size_target_data.toString() ] = max_buffer_size_target_data_; - dict[ names::growth_factor_buffer_spike_data.toString() ] = growth_factor_buffer_spike_data_; - dict[ names::growth_factor_buffer_target_data.toString() ] = growth_factor_buffer_target_data_; + dict[ names::num_processes ] = num_processes_; + dict[ names::adaptive_spike_buffers ] = adaptive_spike_buffers_; + dict[ names::adaptive_target_buffers ] = adaptive_target_buffers_; + dict[ names::buffer_size_target_data ] = buffer_size_target_data_; + dict[ names::buffer_size_spike_data ] = buffer_size_spike_data_; + dict[ names::send_buffer_size_secondary_events ] = get_send_buffer_size_secondary_events_in_int(); + dict[ names::recv_buffer_size_secondary_events ] = get_recv_buffer_size_secondary_events_in_int(); + dict[ names::max_buffer_size_spike_data ] = max_buffer_size_spike_data_; + dict[ names::max_buffer_size_target_data ] = max_buffer_size_target_data_; + dict[ names::growth_factor_buffer_spike_data ] = growth_factor_buffer_spike_data_; + dict[ names::growth_factor_buffer_target_data ] = growth_factor_buffer_target_data_; } #ifdef HAVE_MPI diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 44c76caaa0..0f0b54653a 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -236,11 +236,11 @@ set_connection_status( const ConnectionDatum& conn, const dictionary& dict ) // TODO_PYNEST-NG: Get ConnectionDatum dict // dictionary conn_dict = conn.get_dict(); dictionary conn_dict; - const index source_node_id = conn_dict.get< long >( nest::names::source.toString() ); - const index target_node_id = conn_dict.get< long >( nest::names::target.toString() ); - const thread tid = conn_dict.get< long >( nest::names::target_thread.toString() ); - const synindex syn_id = conn_dict.get< long >( nest::names::synapse_modelid.toString() ); - const port p = conn_dict.get< long >( nest::names::port.toString() ); + const index source_node_id = conn_dict.get< long >( nest::names::source ); + const index target_node_id = conn_dict.get< long >( nest::names::target ); + const thread tid = conn_dict.get< long >( nest::names::target_thread ); + const synindex syn_id = conn_dict.get< long >( nest::names::synapse_modelid ); + const port p = conn_dict.get< long >( nest::names::port ); // TODO_PYNEST-NG: Access flags // dict->clear_access_flags(); @@ -553,8 +553,8 @@ apply( const ParameterDatum& param, const NodeCollectionDatum& nc ) std::vector< double > apply( const ParameterDatum& param, const dictionary& positions ) { - auto source_nc = positions.get< NodeCollectionPTR >( names::source.toString() ); - auto targets = positions.get< std::vector< int > >( names::targets.toString() ); + auto source_nc = positions.get< NodeCollectionPTR >( names::source ); + auto targets = positions.get< std::vector< int > >( names::targets ); // TODO-PYNEST-NG: fix Parameter::apply() // return param->apply( source_nc, targets ); return {}; diff --git a/nestkernel/nest_names.cpp b/nestkernel/nest_names.cpp deleted file mode 100644 index 79d37cea8d..0000000000 --- a/nestkernel/nest_names.cpp +++ /dev/null @@ -1,597 +0,0 @@ -/* - * nest_names.cpp - * - * This file is part of NEST. - * - * Copyright (C) 2004 The NEST Initiative - * - * NEST is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * NEST is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NEST. If not, see . - * - */ -#include "nest_names.h" - -namespace nest -{ - -namespace names -{ - -const Name AMPA( "AMPA" ); -const Name ASCurrents( "ASCurrents" ); -const Name ASCurrents_sum( "ASCurrents_sum" ); -const Name A_LTD( "A_LTD" ); -const Name A_LTD_const( "A_LTD_const" ); -const Name A_LTP( "A_LTP" ); -const Name A_minus( "A_minus" ); -const Name A_plus( "A_plus" ); -const Name Act_m( "Act_m" ); -const Name Act_n( "Act_n" ); -const Name Aminus( "Aminus" ); -const Name Aminus_triplet( "Aminus_triplet" ); -const Name Aplus( "Aplus" ); -const Name Aplus_triplet( "Aplus_triplet" ); -const Name a( "a" ); -const Name a_acausal( "a_acausal" ); -const Name a_causal( "a_causal" ); -const Name a_thresh_th( "a_thresh_th" ); -const Name a_thresh_tl( "a_thresh_tl" ); -const Name acceptable_latency( "acceptable_latency" ); -const Name activity( "activity" ); -const Name adapting_threshold( "adapting_threshold" ); -const Name adaptive_spike_buffers( "adaptive_spike_buffers" ); -const Name adaptive_target_buffers( "adaptive_target_buffers" ); -const Name after_spike_currents( "after_spike_currents" ); -const Name ahp_bug( "ahp_bug" ); -const Name allow_autapses( "allow_autapses" ); -const Name allow_multapses( "allow_multapses" ); -const Name allow_offgrid_times( "allow_offgrid_times" ); -const Name allow_oversized_mask( "allow_oversized_mask" ); -const Name alpha( "alpha" ); -const Name alpha_1( "alpha_1" ); -const Name alpha_2( "alpha_2" ); -const Name amplitude( "amplitude" ); -const Name amplitude_times( "amplitude_times" ); -const Name amplitude_values( "amplitude_values" ); -const Name anchor( "anchor" ); -const Name archiver_length( "archiver_length" ); -const Name asc_amps( "asc_amps" ); -const Name asc_decay( "asc_decay" ); -const Name asc_init( "asc_init" ); -const Name asc_r( "asc_r" ); -const Name available( "available" ); -const Name azimuth_angle( "azimuth_angle" ); - -const Name b( "b" ); -const Name beta( "beta" ); -const Name beta_Ca( "beta_Ca" ); -const Name biological_time( "biological_time" ); -const Name box( "box" ); -const Name buffer_size( "buffer_size" ); -const Name buffer_size_spike_data( "buffer_size_spike_data" ); -const Name buffer_size_target_data( "buffer_size_target_data" ); - -const Name C_m( "C_m" ); -const Name Ca( "Ca" ); -const Name c( "c" ); -const Name c_1( "c_1" ); -const Name c_2( "c_2" ); -const Name c_3( "c_3" ); -const Name capacity( "capacity" ); -const Name center( "center" ); -const Name circular( "circular" ); -const Name clear( "clear" ); -const Name comparator( "comparator" ); -const Name configbit_0( "configbit_0" ); -const Name configbit_1( "configbit_1" ); -const Name connection_count( "connection_count" ); -const Name connection_type( "connection_type" ); -const Name consistent_integration( "consistent_integration" ); -const Name continuous( "continuous" ); -const Name count_covariance( "count_covariance" ); -const Name count_histogram( "count_histogram" ); -const Name covariance( "covariance" ); - -const Name Delta_T( "Delta_T" ); -const Name Delta_V( "Delta_V" ); -const Name d( "d" ); -const Name dI_syn_ex( "dI_syn_ex" ); -const Name dI_syn_in( "dI_syn_in" ); -const Name dU( "U" ); -const Name data( "data" ); -const Name data_path( "data_path" ); -const Name data_prefix( "data_prefix" ); -const Name dead_time( "dead_time" ); -const Name dead_time_random( "dead_time_random" ); -const Name dead_time_shape( "dead_time_shape" ); -const Name delay( "delay" ); -const Name delay_u_bars( "delay_u_bars" ); -const Name deliver_interval( "deliver_interval" ); -const Name delta( "delta" ); -const Name delta_P( "delta_P" ); -const Name delta_tau( "delta_tau" ); -const Name delta_u( "delta_u" ); -const Name dendritic_curr( "dendritic_curr" ); -const Name dendritic_exc( "dendritic_exc" ); -const Name dendritic_inh( "dendritic_inh" ); -const Name dg( "dg" ); -const Name dg_ex( "dg_ex" ); -const Name dg_in( "dg_in" ); -const Name dict_miss_is_error( "dict_miss_is_error" ); -const Name diffusion_factor( "diffusion_factor" ); -const Name dimension( "dimension" ); -const Name distal_curr( "distal_curr" ); -const Name distal_exc( "distal_exc" ); -const Name distal_inh( "distal_inh" ); -const Name drift_factor( "drift_factor" ); -const Name driver_readout_time( "driver_readout_time" ); -const Name dt( "dt" ); - -const Name E_K( "E_K" ); -const Name E_L( "E_L" ); -const Name E_Na( "E_Na" ); -const Name E_ahp( "E_ahp" ); -const Name E_ex( "E_ex" ); -const Name E_in( "E_in" ); -const Name E_rev( "E_rev" ); -const Name E_rev_AMPA( "E_rev_AMPA" ); -const Name E_rev_GABA_A( "E_rev_GABA_A" ); -const Name E_rev_GABA_B( "E_rev_GABA_B" ); -const Name E_rev_KNa( "E_rev_KNa" ); -const Name E_rev_NMDA( "E_rev_NMDA" ); -const Name E_rev_NaP( "E_rev_NaP" ); -const Name E_rev_T( "E_rev_T" ); -const Name E_rev_h( "E_rev_h" ); -const Name E_rr( "E_rr" ); -const Name E_sfa( "E_sfa" ); -const Name edge_wrap( "edge_wrap" ); -const Name element_type( "element_type" ); -const Name elements( "elements" ); -const Name elementsize( "elementsize" ); -const Name ellipsoidal( "ellipsoidal" ); -const Name elliptical( "elliptical" ); -const Name eps( "eps" ); -const Name equilibrate( "equilibrate" ); -const Name eta( "eta" ); -const Name events( "events" ); -const Name extent( "extent" ); - -const Name file_extension( "file_extension" ); -const Name filename( "filename" ); -const Name filenames( "filenames" ); -const Name frequency( "frequency" ); -const Name frozen( "frozen" ); - -const Name GABA_A( "GABA_A" ); -const Name GABA_B( "GABA_B" ); -const Name g( "g" ); -const Name g_AMPA( "g_AMPA" ); -const Name g_GABA_A( "g_GABA_A" ); -const Name g_GABA_B( "g_GABA_B" ); -const Name g_K( "g_K" ); -const Name g_KL( "g_KL" ); -const Name g_Kv1( "g_Kv1" ); -const Name g_Kv3( "g_Kv3" ); -const Name g_L( "g_L" ); -const Name g_NMDA( "g_NMDA" ); -const Name g_Na( "g_Na" ); -const Name g_NaL( "g_NaL" ); -const Name g_ahp( "g_ahp" ); -const Name g_ex( "g_ex" ); -const Name g_in( "g_in" ); -const Name g_m( "g_m" ); -const Name g_pd( "g_pd" ); -const Name g_peak_AMPA( "g_peak_AMPA" ); -const Name g_peak_GABA_A( "g_peak_GABA_A" ); -const Name g_peak_GABA_B( "g_peak_GABA_B" ); -const Name g_peak_KNa( "g_peak_KNa" ); -const Name g_peak_NMDA( "g_peak_NMDA" ); -const Name g_peak_NaP( "g_peak_NaP" ); -const Name g_peak_T( "g_peak_T" ); -const Name g_peak_h( "g_peak_h" ); -const Name g_ps( "g_ps" ); -const Name g_rr( "g_rr" ); -const Name g_sfa( "g_sfa" ); -const Name g_sp( "g_sp" ); -const Name gamma_shape( "gamma_shape" ); -const Name gaussian( "gaussian" ); -const Name global_id( "global_id" ); -const Name grid( "grid" ); -const Name grid3d( "grid3d" ); -const Name growth_curve( "growth_curve" ); -const Name growth_factor_buffer_spike_data( "growth_factor_buffer_spike_data" ); -const Name growth_factor_buffer_target_data( "growth_factor_buffer_target_data" ); -const Name growth_rate( "growth_rate" ); -const Name gsl_error_tol( "gsl_error_tol" ); - -const Name h( "h" ); -const Name has_connections( "has_connections" ); -const Name has_delay( "has_delay" ); -const Name histogram( "histogram" ); -const Name histogram_correction( "histogram_correction" ); - -const Name I( "I" ); -const Name I_KNa( "I_KNa" ); -const Name I_NaP( "I_NaP" ); -const Name I_T( "I_T" ); -const Name I_ahp( "I_ahp" ); -const Name I_e( "I_e" ); -const Name I_h( "I_h" ); -const Name I_sp( "I_sp" ); -const Name I_stc( "I_stc" ); -const Name I_syn( "I_syn" ); -const Name I_syn_ex( "I_syn_ex" ); -const Name I_syn_in( "I_syn_in" ); -const Name Inact_h( "Inact_h" ); -const Name Inact_p( "Inact_p" ); -const Name Interpol_Order( "Interpol_Order" ); -const Name indegree( "indegree" ); -const Name index_map( "index_map" ); -const Name individual_spike_trains( "individual_spike_trains" ); -const Name init_flag( "init_flag" ); -const Name inner_radius( "inner_radius" ); -const Name instant_unblock_NMDA( "instant_unblock_NMDA" ); -const Name instantiations( "instantiations" ); -const Name interval( "interval" ); -const Name is_refractory( "is_refractory" ); - -const Name Kplus( "Kplus" ); -const Name Kplus_triplet( "Kplus_triplet" ); -const Name keep_source_table( "keep_source_table" ); -const Name kernel( "kernel" ); - -const Name label( "label" ); -const Name lambda( "lambda" ); -const Name lambda_0( "lambda_0" ); -const Name len_kernel( "len_kernel" ); -const Name linear( "linear" ); -const Name linear_summation( "linear_summation" ); -const Name local( "local" ); -const Name local_num_threads( "local_num_threads" ); -const Name local_spike_counter( "local_spike_counter" ); -const Name lookuptable_0( "lookuptable_0" ); -const Name lookuptable_1( "lookuptable_1" ); -const Name lookuptable_2( "lookuptable_2" ); -const Name lower_left( "lower_left" ); - -const Name major_axis( "major_axis" ); -const Name make_symmetric( "make_symmetric" ); -const Name mask( "mask" ); -const Name max( "max" ); -const Name max_buffer_size_spike_data( "max_buffer_size_spike_data" ); -const Name max_buffer_size_target_data( "max_buffer_size_target_data" ); -const Name max_delay( "max_delay" ); -const Name max_num_syn_models( "max_num_syn_models" ); -const Name max_update_time( "max_update_time" ); -const Name mean( "mean" ); -const Name memory( "memory" ); -const Name message_times( "messages_times" ); -const Name messages( "messages" ); -const Name min( "min" ); -const Name min_delay( "min_delay" ); -const Name min_update_time( "min_update_time" ); -const Name minor_axis( "minor_axis" ); -const Name model( "model" ); -const Name ms_per_tic( "ms_per_tic" ); -const Name mu( "mu" ); -const Name mu_minus( "mu_minus" ); -const Name mu_plus( "mu_plus" ); -const Name mult_coupling( "mult_coupling" ); -const Name music_channel( "music_channel" ); - -const Name N( "N" ); -const Name NMDA( "NMDA" ); -const Name N_channels( "N_channels" ); -const Name N_NaP( "N_NaP" ); -const Name N_T( "N_T" ); -const Name n( "n" ); -const Name n_events( "n_events" ); -const Name n_messages( "n_messages" ); -const Name n_proc( "n_proc" ); -const Name n_receptors( "n_receptors" ); -const Name n_synapses( "n_synapses" ); -const Name network_size( "network_size" ); -const Name neuron( "neuron" ); -const Name next_readout_time( "next_readout_time" ); -const Name no_synapses( "no_synapses" ); -const Name node_uses_wfr( "node_uses_wfr" ); -const Name noise( "noise" ); -const Name noisy_rate( "noisy_rate" ); -const Name num_connections( "num_connections" ); -const Name num_processes( "num_processes" ); -const Name number_of_connections( "number_of_connections" ); - -const Name off_grid_spiking( "off_grid_spiking" ); -const Name offset( "offset" ); -const Name offsets( "offsets" ); -const Name omega( "omega" ); -const Name order( "order" ); -const Name origin( "origin" ); -const Name other( "other" ); -const Name outdegree( "outdegree" ); -const Name outer_radius( "outer_radius" ); -const Name overwrite_files( "overwrite_files" ); - -const Name P( "P" ); -const Name p( "p" ); -const Name p_copy( "p_copy" ); -const Name p_transmit( "p_transmit" ); -const Name pairwise_bernoulli_on_source( "pairwise_bernoulli_on_source" ); -const Name pairwise_bernoulli_on_target( "pairwise_bernoulli_on_target" ); -const Name phase( "phase" ); -const Name phi_max( "phi_max" ); -const Name polar_angle( "polar_angle" ); -const Name polar_axis( "polar_axis" ); -const Name port( "port" ); -const Name port_name( "port_name" ); -const Name port_width( "port_width" ); -const Name ports( "ports" ); -const Name positions( "positions" ); -const Name post_synaptic_element( "post_synaptic_element" ); -const Name post_trace( "post_trace" ); -const Name pre_synaptic_element( "pre_synaptic_element" ); -const Name precise_times( "precise_times" ); -const Name precision( "precision" ); -const Name print_time( "print_time" ); -const Name proximal_curr( "proximal_curr" ); -const Name proximal_exc( "proximal_exc" ); -const Name proximal_inh( "proximal_inh" ); -const Name psi( "psi" ); -const Name published( "published" ); -const Name pulse_times( "pulse_times" ); - -const Name q_rr( "q_rr" ); -const Name q_sfa( "q_sfa" ); -const Name q_stc( "q_stc" ); - -const Name radius( "radius" ); -const Name rate( "rate" ); -const Name rate_slope( "rate_slope" ); -const Name rate_times( "rate_times" ); -const Name rate_values( "rate_values" ); -const Name readout_cycle_duration( "readout_cycle_duration" ); -const Name receptor_type( "receptor_type" ); -const Name receptor_types( "receptor_types" ); -const Name receptors( "receptors" ); -const Name record_from( "record_from" ); -const Name record_to( "record_to" ); -const Name recordables( "recordables" ); -const Name recorder( "recorder" ); -const Name recording_backends( "recording_backends" ); -const Name rectangular( "rectangular" ); -const Name rectify_output( "rectify_output" ); -const Name rectify_rate( "rectify_rate" ); -const Name recv_buffer_size_secondary_events( "recv_buffer_size_secondary_events" ); -const Name refractory_input( "refractory_input" ); -const Name registered( "registered" ); -const Name relative_amplitude( "relative_amplitude" ); -const Name requires_symmetric( "requires_symmetric" ); -const Name reset_pattern( "reset_pattern" ); -const Name resolution( "resolution" ); -const Name rho( "rho" ); -const Name rho_0( "rho_0" ); -const Name rng_seed( "rng_seed" ); -const Name rng_type( "rng_type" ); -const Name rng_types( "rng_types" ); -const Name rport( "receptor" ); -const Name rule( "rule" ); - -const Name S( "S" ); -const Name S_act_NMDA( "S_act_NMDA" ); -const Name sdev( "sdev" ); -const Name send_buffer_size_secondary_events( "send_buffer_size_secondary_events" ); -const Name senders( "senders" ); -const Name shape( "shape" ); -const Name shift_now_spikes( "shift_now_spikes" ); -const Name shrink_factor_buffer_spike_data( "shrink_factor_buffer_spike_data" ); -const Name sigma( "sigma" ); -const Name sigmoid( "sigmoid" ); -const Name sion_chunksize( "sion_chunksize" ); -const Name sion_collective( "sion_collective" ); -const Name sion_n_files( "sion_n_files" ); -const Name size_of( "sizeof" ); -const Name soma_curr( "soma_curr" ); -const Name soma_exc( "soma_exc" ); -const Name soma_inh( "soma_inh" ); -const Name sort_connections_by_source( "sort_connections_by_source" ); -const Name source( "source" ); -const Name spherical( "spherical" ); -const Name spike_dependent_threshold( "spike_dependent_threshold" ); -const Name spike_multiplicities( "spike_multiplicities" ); -const Name spike_times( "spike_times" ); -const Name spike_weights( "spike_weights" ); -const Name start( "start" ); -const Name state( "state" ); -const Name std( "std" ); -const Name std_mod( "std_mod" ); -const Name stimulator( "stimulator" ); -const Name stimulus_source( "stimulus_source" ); -const Name step( "step" ); -const Name stop( "stop" ); -const Name structural_plasticity_synapses( "structural_plasticity_synapses" ); -const Name structural_plasticity_update_interval( "structural_plasticity_update_interval" ); -const Name synapse_id( "synapse_id" ); -const Name synapse_label( "synapse_label" ); -const Name synapse_model( "synapse_model" ); -const Name synapse_modelid( "synapse_modelid" ); -const Name synapse_parameters( "synapse_parameters" ); -const Name synapses_per_driver( "synapses_per_driver" ); -const Name synaptic_elements( "synaptic_elements" ); -const Name synaptic_elements_param( "synaptic_elements_param" ); -const Name synaptic_endpoint( "synaptic_endpoint" ); - -const Name T_max( "T_max" ); -const Name T_min( "T_min" ); -const Name Tstart( "Tstart" ); -const Name Tstop( "Tstop" ); -const Name t_clamp( "t_clamp" ); -const Name t_ref( "t_ref" ); -const Name t_ref_abs( "t_ref_abs" ); -const Name t_ref_remaining( "t_ref_remaining" ); -const Name t_ref_tot( "t_ref_tot" ); -const Name t_spike( "t_spike" ); -const Name target( "target" ); -const Name target_thread( "target_thread" ); -const Name targets( "targets" ); -const Name tau( "tau" ); -const Name tau_1( "tau_1" ); -const Name tau_2( "tau_2" ); -const Name tau_Ca( "tau_Ca" ); -const Name tau_D_KNa( "tau_D_KNa" ); -const Name tau_Delta( "tau_Delta" ); -const Name tau_Mg_fast_NMDA( "tau_Mg_fast_NMDA" ); -const Name tau_Mg_slow_NMDA( "tau_Mg_slow_NMDA" ); -const Name tau_P( "tau_P" ); -const Name tau_V_th( "tau_V_th" ); -const Name tau_ahp( "tau_ahp" ); -const Name tau_bar_bar( "tau_bar_bar" ); -const Name tau_c( "tau_c" ); -const Name tau_decay( "tau_decay" ); -const Name tau_decay_AMPA( "tau_decay_AMPA" ); -const Name tau_decay_GABA_A( "tau_decay_GABA_A" ); -const Name tau_decay_GABA_B( "tau_decay_GABA_B" ); -const Name tau_decay_NMDA( "tau_decay_NMDA" ); -const Name tau_decay_ex( "tau_decay_ex" ); -const Name tau_decay_in( "tau_decay_in" ); -const Name tau_epsp( "tau_epsp" ); -const Name tau_eta( "tau_eta" ); -const Name tau_fac( "tau_fac" ); -const Name tau_m( "tau_m" ); -const Name tau_max( "tau_max" ); -const Name tau_minus( "tau_minus" ); -const Name tau_minus_stdp( "tau_minus_stdp" ); -const Name tau_minus_triplet( "tau_minus_triplet" ); -const Name tau_n( "tau_n" ); -const Name tau_plus( "tau_plus" ); -const Name tau_plus_triplet( "tau_plus_triplet" ); -const Name tau_psc( "tau_psc" ); -const Name tau_rec( "tau_rec" ); -const Name tau_reset( "tau_reset" ); -const Name tau_rise( "tau_rise" ); -const Name tau_rise_AMPA( "tau_rise_AMPA" ); -const Name tau_rise_GABA_A( "tau_rise_GABA_A" ); -const Name tau_rise_GABA_B( "tau_rise_GABA_B" ); -const Name tau_rise_NMDA( "tau_rise_NMDA" ); -const Name tau_rise_ex( "tau_rise_ex" ); -const Name tau_rise_in( "tau_rise_in" ); -const Name tau_rr( "tau_rr" ); -const Name tau_sfa( "tau_sfa" ); -const Name tau_spike( "tau_spike" ); -const Name tau_stc( "tau_stc" ); -const Name tau_syn( "tau_syn" ); -const Name tau_syn_ex( "tau_syn_ex" ); -const Name tau_syn_in( "tau_syn_in" ); -const Name tau_theta( "tau_theta" ); -const Name tau_v( "tau_v" ); -const Name tau_vacant( "tau_vacant" ); -const Name tau_w( "tau_w" ); -const Name tau_x( "tau_x" ); -const Name tau_z( "tau_z" ); -const Name th_spike_add( "th_spike_add" ); -const Name th_spike_decay( "th_spike_decay" ); -const Name th_voltage_decay( "th_voltage_decay" ); -const Name th_voltage_index( "th_voltage_index" ); -const Name theta( "theta" ); -const Name theta_eq( "theta_eq" ); -const Name theta_ex( "theta_ex" ); -const Name theta_in( "theta_in" ); -const Name theta_minus( "theta_minus" ); -const Name theta_plus( "theta_plus" ); -const Name thread( "thread" ); -const Name thread_local_id( "thread_local_id" ); -const Name threshold( "threshold" ); -const Name threshold_spike( "threshold_spike" ); -const Name threshold_voltage( "threshold_voltage" ); -const Name tics_per_ms( "tics_per_ms" ); -const Name tics_per_step( "tics_per_step" ); -#ifdef TIMER_DETAILED -const Name time_collocate_spike_data( "time_collocate_spike_data" ); -const Name time_communicate_spike_data( "time_communicate_spike_data" ); -const Name time_communicate_target_data( "time_communicate_target_data" ); -const Name time_deliver_spike_data( "time_deliver_spike_data" ); -const Name time_gather_spike_data( "time_gather_spike_data" ); -const Name time_gather_target_data( "time_gather_target_data" ); -const Name time_update( "time_update" ); -#endif -const Name time_communicate_prepare( "time_communicate_prepare" ); -const Name time_construction_connect( "time_construction_connect" ); -const Name time_construction_create( "time_construction_create" ); -const Name time_in_steps( "time_in_steps" ); -const Name time_simulate( "time_simulate" ); -const Name times( "times" ); -const Name to_do( "to_do" ); -const Name total_num_virtual_procs( "total_num_virtual_procs" ); -const Name type_id( "type_id" ); - -const Name U( "U" ); -const Name U_m( "U_m" ); -const Name u( "u" ); -const Name u_bar_bar( "u_bar_bar" ); -const Name u_bar_minus( "u_bar_minus" ); -const Name u_bar_plus( "u_bar_plus" ); -const Name u_ref_squared( "u_ref_squared" ); -const Name update_time_limit( "update_time_limit" ); -const Name upper_right( "upper_right" ); -const Name use_compressed_spikes( "use_compressed_spikes" ); -const Name use_wfr( "use_wfr" ); - -const Name V_T( "V_T" ); -const Name V_T_star( "V_T_star" ); -const Name V_act_NMDA( "V_act_NMDA" ); -const Name V_clamp( "V_clamp" ); -const Name V_epsp( "V_epsp" ); -const Name V_m( "V_m" ); -const Name V_min( "V_min" ); -const Name V_noise( "V_noise" ); -const Name V_peak( "V_peak" ); -const Name V_reset( "V_reset" ); -const Name V_th( "V_th" ); -const Name V_th_alpha_1( "V_th_alpha_1" ); -const Name V_th_alpha_2( "V_th_alpha_2" ); -const Name V_th_max( "V_th_max" ); -const Name V_th_rest( "V_th_rest" ); -const Name V_th_v( "V_th_v" ); -const Name val_eta( "val_eta" ); -const Name voltage_clamp( "voltage_clamp" ); -const Name voltage_reset_add( "voltage_reset_add" ); -const Name voltage_reset_fraction( "voltage_reset_fraction" ); -const Name vp( "vp" ); -const Name vt( "vt" ); - -const Name Wmax( "Wmax" ); -const Name Wmin( "Wmin" ); -const Name w( "w" ); -const Name weight( "weight" ); -const Name weight_per_lut_entry( "weight_per_lut_entry" ); -const Name weight_recorder( "weight_recorder" ); -const Name weights( "weights" ); -const Name wfr_comm_interval( "wfr_comm_interval" ); -const Name wfr_interpolation_order( "wfr_interpolation_order" ); -const Name wfr_max_iterations( "wfr_max_iterations" ); -const Name wfr_tol( "wfr_tol" ); -const Name with_reset( "with_reset" ); - -const Name x( "x" ); -const Name x_bar( "x_bar" ); - -const Name y( "y" ); -const Name y1( "y1" ); -const Name y2( "y2" ); -const Name y_0( "y_0" ); -const Name y_1( "y_1" ); - -const Name z( "z" ); -const Name z_connected( "z_connected" ); -} // namespace names - -} // namespace nest diff --git a/nestkernel/nest_names.h b/nestkernel/nest_names.h index 4bebcec62d..619867a342 100644 --- a/nestkernel/nest_names.h +++ b/nestkernel/nest_names.h @@ -23,599 +23,591 @@ #ifndef NEST_NAMES_H #define NEST_NAMES_H +#include + // Generated includes: #include "config.h" -// Includes from sli: -#include "name.h" - namespace nest { /** - * This namespace contains global Name objects. These can be used in - * Node::get_status and Node::set_status to make data exchange more - * efficient and consistent. Creating a Name from a std::string is in - * O(log n), for n the number of Names already created. Using - * predefined names makes data exchange much more efficient as it - * uses integer comparisons instead of string comparisons internally. + * This namespace contains global name std::string objects. These can be + * used in Node::get_status and Node::set_status. * - * The Name declarations below and the definitions in nest_names.cpp - * are sorted alphabetically with lower case letters preceding upper - * case letters. The ordering of the names has to be the same in both - * this file and the .cpp file. + * The Name declarations below are sorted alphabetically with lower case + * letters preceding upper case letters. * * See testsuite/unittests/test_unused_names.py for a test that checks - * if a) Name declarations and definitions are consistent - * b) all Name objects defined are also actually used. + * if all name strings defined are also actually used. */ namespace names { -extern const Name AMPA; -extern const Name ASCurrents; -extern const Name ASCurrents_sum; -extern const Name A_LTD; -extern const Name A_LTD_const; -extern const Name A_LTP; -extern const Name A_minus; -extern const Name A_plus; -extern const Name Act_m; -extern const Name Act_n; -extern const Name Aminus; -extern const Name Aminus_triplet; -extern const Name Aplus; -extern const Name Aplus_triplet; -extern const Name a; -extern const Name a_acausal; -extern const Name a_causal; -extern const Name a_thresh_th; -extern const Name a_thresh_tl; -extern const Name acceptable_latency; -extern const Name activity; -extern const Name adapting_threshold; -extern const Name adaptive_spike_buffers; -extern const Name adaptive_target_buffers; -extern const Name after_spike_currents; -extern const Name ahp_bug; -extern const Name allow_autapses; -extern const Name allow_multapses; -extern const Name allow_offgrid_times; -extern const Name allow_oversized_mask; -extern const Name alpha; -extern const Name alpha_1; -extern const Name alpha_2; -extern const Name amplitude; -extern const Name amplitude_times; -extern const Name amplitude_values; -extern const Name anchor; -extern const Name archiver_length; -extern const Name asc_amps; -extern const Name asc_decay; -extern const Name asc_init; -extern const Name asc_r; -extern const Name available; -extern const Name azimuth_angle; +const std::string AMPA( "AMPA" ); +const std::string ASCurrents( "ASCurrents" ); +const std::string ASCurrents_sum( "ASCurrents_sum" ); +const std::string A_LTD( "A_LTD" ); +const std::string A_LTD_const( "A_LTD_const" ); +const std::string A_LTP( "A_LTP" ); +const std::string A_minus( "A_minus" ); +const std::string A_plus( "A_plus" ); +const std::string Act_m( "Act_m" ); +const std::string Act_n( "Act_n" ); +const std::string Aminus( "Aminus" ); +const std::string Aminus_triplet( "Aminus_triplet" ); +const std::string Aplus( "Aplus" ); +const std::string Aplus_triplet( "Aplus_triplet" ); +const std::string a( "a" ); +const std::string a_acausal( "a_acausal" ); +const std::string a_causal( "a_causal" ); +const std::string a_thresh_th( "a_thresh_th" ); +const std::string a_thresh_tl( "a_thresh_tl" ); +const std::string acceptable_latency( "acceptable_latency" ); +const std::string activity( "activity" ); +const std::string adapting_threshold( "adapting_threshold" ); +const std::string adaptive_spike_buffers( "adaptive_spike_buffers" ); +const std::string adaptive_target_buffers( "adaptive_target_buffers" ); +const std::string after_spike_currents( "after_spike_currents" ); +const std::string ahp_bug( "ahp_bug" ); +const std::string allow_autapses( "allow_autapses" ); +const std::string allow_multapses( "allow_multapses" ); +const std::string allow_offgrid_times( "allow_offgrid_times" ); +const std::string allow_oversized_mask( "allow_oversized_mask" ); +const std::string alpha( "alpha" ); +const std::string alpha_1( "alpha_1" ); +const std::string alpha_2( "alpha_2" ); +const std::string amplitude( "amplitude" ); +const std::string amplitude_times( "amplitude_times" ); +const std::string amplitude_values( "amplitude_values" ); +const std::string anchor( "anchor" ); +const std::string archiver_length( "archiver_length" ); +const std::string asc_amps( "asc_amps" ); +const std::string asc_decay( "asc_decay" ); +const std::string asc_init( "asc_init" ); +const std::string asc_r( "asc_r" ); +const std::string available( "available" ); +const std::string azimuth_angle( "azimuth_angle" ); -extern const Name b; -extern const Name beta; -extern const Name beta_Ca; -extern const Name biological_time; -extern const Name box; -extern const Name buffer_size; -extern const Name buffer_size_spike_data; -extern const Name buffer_size_target_data; +const std::string b( "b" ); +const std::string beta( "beta" ); +const std::string beta_Ca( "beta_Ca" ); +const std::string biological_time( "biological_time" ); +const std::string box( "box" ); +const std::string buffer_size( "buffer_size" ); +const std::string buffer_size_spike_data( "buffer_size_spike_data" ); +const std::string buffer_size_target_data( "buffer_size_target_data" ); -extern const Name C_m; -extern const Name Ca; -extern const Name c; -extern const Name c_1; -extern const Name c_2; -extern const Name c_3; -extern const Name capacity; -extern const Name center; -extern const Name circular; -extern const Name clear; -extern const Name comparator; -extern const Name configbit_0; -extern const Name configbit_1; -extern const Name connection_count; -extern const Name connection_type; -extern const Name consistent_integration; -extern const Name continuous; -extern const Name count_covariance; -extern const Name count_histogram; -extern const Name covariance; +const std::string C_m( "C_m" ); +const std::string Ca( "Ca" ); +const std::string c( "c" ); +const std::string c_1( "c_1" ); +const std::string c_2( "c_2" ); +const std::string c_3( "c_3" ); +const std::string capacity( "capacity" ); +const std::string center( "center" ); +const std::string circular( "circular" ); +const std::string clear( "clear" ); +const std::string comparator( "comparator" ); +const std::string configbit_0( "configbit_0" ); +const std::string configbit_1( "configbit_1" ); +const std::string connection_count( "connection_count" ); +const std::string connection_type( "connection_type" ); +const std::string consistent_integration( "consistent_integration" ); +const std::string continuous( "continuous" ); +const std::string count_covariance( "count_covariance" ); +const std::string count_histogram( "count_histogram" ); +const std::string covariance( "covariance" ); -extern const Name Delta_T; -extern const Name Delta_V; -extern const Name d; -extern const Name dI_syn_ex; -extern const Name dI_syn_in; -extern const Name dU; -extern const Name data; -extern const Name data_path; -extern const Name data_prefix; -extern const Name dead_time; -extern const Name dead_time_random; -extern const Name dead_time_shape; -extern const Name delay; -extern const Name delay_u_bars; -extern const Name deliver_interval; -extern const Name delta; -extern const Name delta_P; -extern const Name delta_tau; -extern const Name delta_u; -extern const Name dendritic_curr; -extern const Name dendritic_exc; -extern const Name dendritic_inh; -extern const Name dg; -extern const Name dg_ex; -extern const Name dg_in; -extern const Name dict_miss_is_error; -extern const Name diffusion_factor; -extern const Name dimension; -extern const Name distal_curr; -extern const Name distal_exc; -extern const Name distal_inh; -extern const Name drift_factor; -extern const Name driver_readout_time; -extern const Name dt; +const std::string Delta_T( "Delta_T" ); +const std::string Delta_V( "Delta_V" ); +const std::string d( "d" ); +const std::string dI_syn_ex( "dI_syn_ex" ); +const std::string dI_syn_in( "dI_syn_in" ); +const std::string dU( "U" ); +const std::string data( "data" ); +const std::string data_path( "data_path" ); +const std::string data_prefix( "data_prefix" ); +const std::string dead_time( "dead_time" ); +const std::string dead_time_random( "dead_time_random" ); +const std::string dead_time_shape( "dead_time_shape" ); +const std::string delay( "delay" ); +const std::string delay_u_bars( "delay_u_bars" ); +const std::string deliver_interval( "deliver_interval" ); +const std::string delta( "delta" ); +const std::string delta_P( "delta_P" ); +const std::string delta_tau( "delta_tau" ); +const std::string delta_u( "delta_u" ); +const std::string dendritic_curr( "dendritic_curr" ); +const std::string dendritic_exc( "dendritic_exc" ); +const std::string dendritic_inh( "dendritic_inh" ); +const std::string dg( "dg" ); +const std::string dg_ex( "dg_ex" ); +const std::string dg_in( "dg_in" ); +const std::string dict_miss_is_error( "dict_miss_is_error" ); +const std::string diffusion_factor( "diffusion_factor" ); +const std::string dimension( "dimension" ); +const std::string distal_curr( "distal_curr" ); +const std::string distal_exc( "distal_exc" ); +const std::string distal_inh( "distal_inh" ); +const std::string drift_factor( "drift_factor" ); +const std::string driver_readout_time( "driver_readout_time" ); +const std::string dt( "dt" ); -extern const Name E_K; -extern const Name E_L; -extern const Name E_Na; -extern const Name E_ahp; -extern const Name E_ex; -extern const Name E_in; -extern const Name E_rev; -extern const Name E_rev_AMPA; -extern const Name E_rev_GABA_A; -extern const Name E_rev_GABA_B; -extern const Name E_rev_KNa; -extern const Name E_rev_NMDA; -extern const Name E_rev_NaP; -extern const Name E_rev_T; -extern const Name E_rev_h; -extern const Name E_rr; -extern const Name E_sfa; -extern const Name edge_wrap; -extern const Name element_type; -extern const Name elements; -extern const Name elementsize; -extern const Name ellipsoidal; -extern const Name elliptical; -extern const Name eps; -extern const Name equilibrate; -extern const Name eta; -extern const Name events; -extern const Name extent; +const std::string E_K( "E_K" ); +const std::string E_L( "E_L" ); +const std::string E_Na( "E_Na" ); +const std::string E_ahp( "E_ahp" ); +const std::string E_ex( "E_ex" ); +const std::string E_in( "E_in" ); +const std::string E_rev( "E_rev" ); +const std::string E_rev_AMPA( "E_rev_AMPA" ); +const std::string E_rev_GABA_A( "E_rev_GABA_A" ); +const std::string E_rev_GABA_B( "E_rev_GABA_B" ); +const std::string E_rev_KNa( "E_rev_KNa" ); +const std::string E_rev_NMDA( "E_rev_NMDA" ); +const std::string E_rev_NaP( "E_rev_NaP" ); +const std::string E_rev_T( "E_rev_T" ); +const std::string E_rev_h( "E_rev_h" ); +const std::string E_rr( "E_rr" ); +const std::string E_sfa( "E_sfa" ); +const std::string edge_wrap( "edge_wrap" ); +const std::string element_type( "element_type" ); +const std::string elements( "elements" ); +const std::string elementsize( "elementsize" ); +const std::string ellipsoidal( "ellipsoidal" ); +const std::string elliptical( "elliptical" ); +const std::string eps( "eps" ); +const std::string equilibrate( "equilibrate" ); +const std::string eta( "eta" ); +const std::string events( "events" ); +const std::string extent( "extent" ); -extern const Name file_extension; -extern const Name filename; -extern const Name filenames; -extern const Name frequency; -extern const Name frozen; +const std::string file_extension( "file_extension" ); +const std::string filename( "filename" ); +const std::string filenames( "filenames" ); +const std::string frequency( "frequency" ); +const std::string frozen( "frozen" ); -extern const Name GABA_A; -extern const Name GABA_B; -extern const Name g; -extern const Name g_AMPA; -extern const Name g_GABA_A; -extern const Name g_GABA_B; -extern const Name g_K; -extern const Name g_KL; -extern const Name g_Kv1; -extern const Name g_Kv3; -extern const Name g_L; -extern const Name g_NMDA; -extern const Name g_Na; -extern const Name g_NaL; -extern const Name g_ahp; -extern const Name g_ex; -extern const Name g_in; -extern const Name g_m; -extern const Name g_pd; -extern const Name g_peak_AMPA; -extern const Name g_peak_GABA_A; -extern const Name g_peak_GABA_B; -extern const Name g_peak_KNa; -extern const Name g_peak_NMDA; -extern const Name g_peak_NaP; -extern const Name g_peak_T; -extern const Name g_peak_h; -extern const Name g_ps; -extern const Name g_rr; -extern const Name g_sfa; -extern const Name g_sp; -extern const Name gamma_shape; -extern const Name gaussian; -extern const Name global_id; -extern const Name grid3d; -extern const Name grid; -extern const Name growth_curve; -extern const Name growth_factor_buffer_spike_data; -extern const Name growth_factor_buffer_target_data; -extern const Name growth_rate; -extern const Name gsl_error_tol; +const std::string GABA_A( "GABA_A" ); +const std::string GABA_B( "GABA_B" ); +const std::string g( "g" ); +const std::string g_AMPA( "g_AMPA" ); +const std::string g_GABA_A( "g_GABA_A" ); +const std::string g_GABA_B( "g_GABA_B" ); +const std::string g_K( "g_K" ); +const std::string g_KL( "g_KL" ); +const std::string g_Kv1( "g_Kv1" ); +const std::string g_Kv3( "g_Kv3" ); +const std::string g_L( "g_L" ); +const std::string g_NMDA( "g_NMDA" ); +const std::string g_Na( "g_Na" ); +const std::string g_NaL( "g_NaL" ); +const std::string g_ahp( "g_ahp" ); +const std::string g_ex( "g_ex" ); +const std::string g_in( "g_in" ); +const std::string g_m( "g_m" ); +const std::string g_pd( "g_pd" ); +const std::string g_peak_AMPA( "g_peak_AMPA" ); +const std::string g_peak_GABA_A( "g_peak_GABA_A" ); +const std::string g_peak_GABA_B( "g_peak_GABA_B" ); +const std::string g_peak_KNa( "g_peak_KNa" ); +const std::string g_peak_NMDA( "g_peak_NMDA" ); +const std::string g_peak_NaP( "g_peak_NaP" ); +const std::string g_peak_T( "g_peak_T" ); +const std::string g_peak_h( "g_peak_h" ); +const std::string g_ps( "g_ps" ); +const std::string g_rr( "g_rr" ); +const std::string g_sfa( "g_sfa" ); +const std::string g_sp( "g_sp" ); +const std::string gamma_shape( "gamma_shape" ); +const std::string gaussian( "gaussian" ); +const std::string global_id( "global_id" ); +const std::string grid( "grid" ); +const std::string grid3d( "grid3d" ); +const std::string growth_curve( "growth_curve" ); +const std::string growth_factor_buffer_spike_data( "growth_factor_buffer_spike_data" ); +const std::string growth_factor_buffer_target_data( "growth_factor_buffer_target_data" ); +const std::string growth_rate( "growth_rate" ); +const std::string gsl_error_tol( "gsl_error_tol" ); -extern const Name h; -extern const Name has_connections; -extern const Name has_delay; -extern const Name histogram; -extern const Name histogram_correction; +const std::string h( "h" ); +const std::string has_connections( "has_connections" ); +const std::string has_delay( "has_delay" ); +const std::string histogram( "histogram" ); +const std::string histogram_correction( "histogram_correction" ); -extern const Name I; -extern const Name I_KNa; -extern const Name I_NaP; -extern const Name I_T; -extern const Name I_ahp; -extern const Name I_e; -extern const Name I_h; -extern const Name I_sp; -extern const Name I_stc; -extern const Name I_syn; -extern const Name I_syn_ex; -extern const Name I_syn_in; -extern const Name Inact_h; -extern const Name Inact_p; -extern const Name Interpol_Order; -extern const Name indegree; -extern const Name index_map; -extern const Name individual_spike_trains; -extern const Name init_flag; -extern const Name inner_radius; -extern const Name instant_unblock_NMDA; -extern const Name instantiations; -extern const Name interval; -extern const Name is_refractory; +const std::string I( "I" ); +const std::string I_KNa( "I_KNa" ); +const std::string I_NaP( "I_NaP" ); +const std::string I_T( "I_T" ); +const std::string I_ahp( "I_ahp" ); +const std::string I_e( "I_e" ); +const std::string I_h( "I_h" ); +const std::string I_sp( "I_sp" ); +const std::string I_stc( "I_stc" ); +const std::string I_syn( "I_syn" ); +const std::string I_syn_ex( "I_syn_ex" ); +const std::string I_syn_in( "I_syn_in" ); +const std::string Inact_h( "Inact_h" ); +const std::string Inact_p( "Inact_p" ); +const std::string Interpol_Order( "Interpol_Order" ); +const std::string indegree( "indegree" ); +const std::string index_map( "index_map" ); +const std::string individual_spike_trains( "individual_spike_trains" ); +const std::string init_flag( "init_flag" ); +const std::string inner_radius( "inner_radius" ); +const std::string instant_unblock_NMDA( "instant_unblock_NMDA" ); +const std::string instantiations( "instantiations" ); +const std::string interval( "interval" ); +const std::string is_refractory( "is_refractory" ); -extern const Name Kplus; -extern const Name Kplus_triplet; -extern const Name keep_source_table; -extern const Name kernel; +const std::string Kplus( "Kplus" ); +const std::string Kplus_triplet( "Kplus_triplet" ); +const std::string keep_source_table( "keep_source_table" ); +const std::string kernel( "kernel" ); -extern const Name label; -extern const Name lambda; -extern const Name lambda_0; -extern const Name len_kernel; -extern const Name linear; -extern const Name linear_summation; -extern const Name local; -extern const Name local_num_threads; -extern const Name local_spike_counter; -extern const Name lookuptable_0; -extern const Name lookuptable_1; -extern const Name lookuptable_2; -extern const Name lower_left; +const std::string label( "label" ); +const std::string lambda( "lambda" ); +const std::string lambda_0( "lambda_0" ); +const std::string len_kernel( "len_kernel" ); +const std::string linear( "linear" ); +const std::string linear_summation( "linear_summation" ); +const std::string local( "local" ); +const std::string local_num_threads( "local_num_threads" ); +const std::string local_spike_counter( "local_spike_counter" ); +const std::string lookuptable_0( "lookuptable_0" ); +const std::string lookuptable_1( "lookuptable_1" ); +const std::string lookuptable_2( "lookuptable_2" ); +const std::string lower_left( "lower_left" ); -extern const Name major_axis; -extern const Name make_symmetric; -extern const Name mask; -extern const Name max; -extern const Name max_buffer_size_spike_data; -extern const Name max_buffer_size_target_data; -extern const Name max_delay; -extern const Name max_num_syn_models; -extern const Name max_update_time; -extern const Name mean; -extern const Name memory; -extern const Name message_times; -extern const Name messages; -extern const Name min; -extern const Name min_delay; -extern const Name min_update_time; -extern const Name minor_axis; -extern const Name model; -extern const Name ms_per_tic; -extern const Name mu; -extern const Name mu_minus; -extern const Name mu_plus; -extern const Name mult_coupling; -extern const Name music_channel; +const std::string major_axis( "major_axis" ); +const std::string make_symmetric( "make_symmetric" ); +const std::string mask( "mask" ); +const std::string max( "max" ); +const std::string max_buffer_size_spike_data( "max_buffer_size_spike_data" ); +const std::string max_buffer_size_target_data( "max_buffer_size_target_data" ); +const std::string max_delay( "max_delay" ); +const std::string max_num_syn_models( "max_num_syn_models" ); +const std::string max_update_time( "max_update_time" ); +const std::string mean( "mean" ); +const std::string memory( "memory" ); +const std::string message_times( "messages_times" ); +const std::string messages( "messages" ); +const std::string min( "min" ); +const std::string min_delay( "min_delay" ); +const std::string min_update_time( "min_update_time" ); +const std::string minor_axis( "minor_axis" ); +const std::string model( "model" ); +const std::string ms_per_tic( "ms_per_tic" ); +const std::string mu( "mu" ); +const std::string mu_minus( "mu_minus" ); +const std::string mu_plus( "mu_plus" ); +const std::string mult_coupling( "mult_coupling" ); +const std::string music_channel( "music_channel" ); -extern const Name N; -extern const Name NMDA; -extern const Name N_channels; -extern const Name N_NaP; -extern const Name N_T; -extern const Name n; -extern const Name n_events; -extern const Name n_messages; -extern const Name n_proc; -extern const Name n_receptors; -extern const Name n_synapses; -extern const Name network_size; -extern const Name neuron; -extern const Name next_readout_time; -extern const Name no_synapses; -extern const Name node_uses_wfr; -extern const Name noise; -extern const Name noisy_rate; -extern const Name num_connections; -extern const Name num_processes; -extern const Name number_of_connections; +const std::string N( "N" ); +const std::string NMDA( "NMDA" ); +const std::string N_channels( "N_channels" ); +const std::string N_NaP( "N_NaP" ); +const std::string N_T( "N_T" ); +const std::string n( "n" ); +const std::string n_events( "n_events" ); +const std::string n_messages( "n_messages" ); +const std::string n_proc( "n_proc" ); +const std::string n_receptors( "n_receptors" ); +const std::string n_synapses( "n_synapses" ); +const std::string network_size( "network_size" ); +const std::string neuron( "neuron" ); +const std::string next_readout_time( "next_readout_time" ); +const std::string no_synapses( "no_synapses" ); +const std::string node_uses_wfr( "node_uses_wfr" ); +const std::string noise( "noise" ); +const std::string noisy_rate( "noisy_rate" ); +const std::string num_connections( "num_connections" ); +const std::string num_processes( "num_processes" ); +const std::string number_of_connections( "number_of_connections" ); -extern const Name off_grid_spiking; -extern const Name offset; -extern const Name offsets; -extern const Name omega; -extern const Name order; -extern const Name origin; -extern const Name other; -extern const Name outdegree; -extern const Name outer_radius; -extern const Name overwrite_files; +const std::string off_grid_spiking( "off_grid_spiking" ); +const std::string offset( "offset" ); +const std::string offsets( "offsets" ); +const std::string omega( "omega" ); +const std::string order( "order" ); +const std::string origin( "origin" ); +const std::string other( "other" ); +const std::string outdegree( "outdegree" ); +const std::string outer_radius( "outer_radius" ); +const std::string overwrite_files( "overwrite_files" ); -extern const Name P; -extern const Name p; -extern const Name p_copy; -extern const Name p_transmit; -extern const Name pairwise_bernoulli_on_source; -extern const Name pairwise_bernoulli_on_target; -extern const Name phase; -extern const Name phi_max; -extern const Name polar_angle; -extern const Name polar_axis; -extern const Name port; -extern const Name port_name; -extern const Name port_width; -extern const Name ports; -extern const Name positions; -extern const Name post_synaptic_element; -extern const Name post_trace; -extern const Name pre_synaptic_element; -extern const Name precise_times; -extern const Name precision; -extern const Name print_time; -extern const Name proximal_curr; -extern const Name proximal_exc; -extern const Name proximal_inh; -extern const Name psi; -extern const Name published; -extern const Name pulse_times; +const std::string P( "P" ); +const std::string p( "p" ); +const std::string p_copy( "p_copy" ); +const std::string p_transmit( "p_transmit" ); +const std::string pairwise_bernoulli_on_source( "pairwise_bernoulli_on_source" ); +const std::string pairwise_bernoulli_on_target( "pairwise_bernoulli_on_target" ); +const std::string phase( "phase" ); +const std::string phi_max( "phi_max" ); +const std::string polar_angle( "polar_angle" ); +const std::string polar_axis( "polar_axis" ); +const std::string port( "port" ); +const std::string port_name( "port_name" ); +const std::string port_width( "port_width" ); +const std::string ports( "ports" ); +const std::string positions( "positions" ); +const std::string post_synaptic_element( "post_synaptic_element" ); +const std::string post_trace( "post_trace" ); +const std::string pre_synaptic_element( "pre_synaptic_element" ); +const std::string precise_times( "precise_times" ); +const std::string precision( "precision" ); +const std::string print_time( "print_time" ); +const std::string proximal_curr( "proximal_curr" ); +const std::string proximal_exc( "proximal_exc" ); +const std::string proximal_inh( "proximal_inh" ); +const std::string psi( "psi" ); +const std::string published( "published" ); +const std::string pulse_times( "pulse_times" ); -extern const Name q_rr; -extern const Name q_sfa; -extern const Name q_stc; +const std::string q_rr( "q_rr" ); +const std::string q_sfa( "q_sfa" ); +const std::string q_stc( "q_stc" ); -extern const Name radius; -extern const Name rate; -extern const Name rate_slope; -extern const Name rate_times; -extern const Name rate_values; -extern const Name readout_cycle_duration; -extern const Name receptor_type; -extern const Name receptor_types; -extern const Name receptors; -extern const Name record_from; -extern const Name record_to; -extern const Name recordables; -extern const Name recorder; -extern const Name recording_backends; -extern const Name rectangular; -extern const Name rectify_output; -extern const Name rectify_rate; -extern const Name recv_buffer_size_secondary_events; -extern const Name refractory_input; -extern const Name registered; -extern const Name relative_amplitude; -extern const Name requires_symmetric; -extern const Name reset_pattern; -extern const Name resolution; -extern const Name rho; -extern const Name rho_0; -extern const Name rng_seed; -extern const Name rng_type; -extern const Name rng_types; -extern const Name rport; -extern const Name rule; +const std::string radius( "radius" ); +const std::string rate( "rate" ); +const std::string rate_slope( "rate_slope" ); +const std::string rate_times( "rate_times" ); +const std::string rate_values( "rate_values" ); +const std::string readout_cycle_duration( "readout_cycle_duration" ); +const std::string receptor_type( "receptor_type" ); +const std::string receptor_types( "receptor_types" ); +const std::string receptors( "receptors" ); +const std::string record_from( "record_from" ); +const std::string record_to( "record_to" ); +const std::string recordables( "recordables" ); +const std::string recorder( "recorder" ); +const std::string recording_backends( "recording_backends" ); +const std::string rectangular( "rectangular" ); +const std::string rectify_output( "rectify_output" ); +const std::string rectify_rate( "rectify_rate" ); +const std::string recv_buffer_size_secondary_events( "recv_buffer_size_secondary_events" ); +const std::string refractory_input( "refractory_input" ); +const std::string registered( "registered" ); +const std::string relative_amplitude( "relative_amplitude" ); +const std::string requires_symmetric( "requires_symmetric" ); +const std::string reset_pattern( "reset_pattern" ); +const std::string resolution( "resolution" ); +const std::string rho( "rho" ); +const std::string rho_0( "rho_0" ); +const std::string rng_seed( "rng_seed" ); +const std::string rng_type( "rng_type" ); +const std::string rng_types( "rng_types" ); +const std::string rport( "receptor" ); +const std::string rule( "rule" ); -extern const Name S; -extern const Name S_act_NMDA; -extern const Name sdev; -extern const Name senders; -extern const Name send_buffer_size_secondary_events; -extern const Name shape; -extern const Name shift_now_spikes; -extern const Name shrink_factor_buffer_spike_data; -extern const Name sigma; -extern const Name sigmoid; -extern const Name sion_chunksize; -extern const Name sion_collective; -extern const Name sion_n_files; -extern const Name size_of; -extern const Name soma_curr; -extern const Name soma_exc; -extern const Name soma_inh; -extern const Name sort_connections_by_source; -extern const Name source; -extern const Name spherical; -extern const Name spike_dependent_threshold; -extern const Name spike_multiplicities; -extern const Name spike_times; -extern const Name spike_weights; -extern const Name start; -extern const Name state; -extern const Name std; -extern const Name std_mod; -extern const Name stimulator; -extern const Name stimulus_source; -extern const Name step; -extern const Name stop; -extern const Name structural_plasticity_synapses; -extern const Name structural_plasticity_update_interval; -extern const Name synapse_id; -extern const Name synapse_label; -extern const Name synapse_model; -extern const Name synapse_modelid; -extern const Name synapse_parameters; -extern const Name synapses_per_driver; -extern const Name synaptic_elements; -extern const Name synaptic_elements_param; -extern const Name synaptic_endpoint; +const std::string S( "S" ); +const std::string S_act_NMDA( "S_act_NMDA" ); +const std::string sdev( "sdev" ); +const std::string send_buffer_size_secondary_events( "send_buffer_size_secondary_events" ); +const std::string senders( "senders" ); +const std::string shape( "shape" ); +const std::string shift_now_spikes( "shift_now_spikes" ); +const std::string shrink_factor_buffer_spike_data( "shrink_factor_buffer_spike_data" ); +const std::string sigma( "sigma" ); +const std::string sigmoid( "sigmoid" ); +const std::string sion_chunksize( "sion_chunksize" ); +const std::string sion_collective( "sion_collective" ); +const std::string sion_n_files( "sion_n_files" ); +const std::string size_of( "sizeof" ); +const std::string soma_curr( "soma_curr" ); +const std::string soma_exc( "soma_exc" ); +const std::string soma_inh( "soma_inh" ); +const std::string sort_connections_by_source( "sort_connections_by_source" ); +const std::string source( "source" ); +const std::string spherical( "spherical" ); +const std::string spike_dependent_threshold( "spike_dependent_threshold" ); +const std::string spike_multiplicities( "spike_multiplicities" ); +const std::string spike_times( "spike_times" ); +const std::string spike_weights( "spike_weights" ); +const std::string start( "start" ); +const std::string state( "state" ); +const std::string std( "std" ); +const std::string std_mod( "std_mod" ); +const std::string stimulator( "stimulator" ); +const std::string stimulus_source( "stimulus_source" ); +const std::string step( "step" ); +const std::string stop( "stop" ); +const std::string structural_plasticity_synapses( "structural_plasticity_synapses" ); +const std::string structural_plasticity_update_interval( "structural_plasticity_update_interval" ); +const std::string synapse_id( "synapse_id" ); +const std::string synapse_label( "synapse_label" ); +const std::string synapse_model( "synapse_model" ); +const std::string synapse_modelid( "synapse_modelid" ); +const std::string synapse_parameters( "synapse_parameters" ); +const std::string synapses_per_driver( "synapses_per_driver" ); +const std::string synaptic_elements( "synaptic_elements" ); +const std::string synaptic_elements_param( "synaptic_elements_param" ); +const std::string synaptic_endpoint( "synaptic_endpoint" ); -extern const Name T_max; -extern const Name T_min; -extern const Name Tstart; -extern const Name Tstop; -extern const Name t_clamp; -extern const Name t_ref; -extern const Name t_ref_abs; -extern const Name t_ref_remaining; -extern const Name t_ref_tot; -extern const Name t_spike; -extern const Name target; -extern const Name target_thread; -extern const Name targets; -extern const Name tau; -extern const Name tau_1; -extern const Name tau_2; -extern const Name tau_Ca; -extern const Name tau_D_KNa; -extern const Name tau_Delta; -extern const Name tau_Mg_fast_NMDA; -extern const Name tau_Mg_slow_NMDA; -extern const Name tau_P; -extern const Name tau_V_th; -extern const Name tau_ahp; -extern const Name tau_bar_bar; -extern const Name tau_c; -extern const Name tau_decay; -extern const Name tau_decay_AMPA; -extern const Name tau_decay_GABA_A; -extern const Name tau_decay_GABA_B; -extern const Name tau_decay_NMDA; -extern const Name tau_decay_ex; -extern const Name tau_decay_in; -extern const Name tau_epsp; -extern const Name tau_eta; -extern const Name tau_fac; -extern const Name tau_m; -extern const Name tau_max; -extern const Name tau_minus; -extern const Name tau_minus_stdp; -extern const Name tau_minus_triplet; -extern const Name tau_n; -extern const Name tau_plus; -extern const Name tau_plus_triplet; -extern const Name tau_psc; -extern const Name tau_rec; -extern const Name tau_reset; -extern const Name tau_rise; -extern const Name tau_rise_AMPA; -extern const Name tau_rise_GABA_A; -extern const Name tau_rise_GABA_B; -extern const Name tau_rise_NMDA; -extern const Name tau_rise_ex; -extern const Name tau_rise_in; -extern const Name tau_rr; -extern const Name tau_sfa; -extern const Name tau_spike; -extern const Name tau_stc; -extern const Name tau_syn; -extern const Name tau_syn_ex; -extern const Name tau_syn_in; -extern const Name tau_theta; -extern const Name tau_v; -extern const Name tau_vacant; -extern const Name tau_w; -extern const Name tau_x; -extern const Name tau_z; -extern const Name th_spike_add; -extern const Name th_spike_decay; -extern const Name th_voltage_decay; -extern const Name th_voltage_index; -extern const Name theta; -extern const Name theta_eq; -extern const Name theta_ex; -extern const Name theta_in; -extern const Name theta_minus; -extern const Name theta_plus; -extern const Name thread; -extern const Name thread_local_id; -extern const Name threshold; -extern const Name threshold_spike; -extern const Name threshold_voltage; -extern const Name tics_per_ms; -extern const Name tics_per_step; +const std::string T_max( "T_max" ); +const std::string T_min( "T_min" ); +const std::string Tstart( "Tstart" ); +const std::string Tstop( "Tstop" ); +const std::string t_clamp( "t_clamp" ); +const std::string t_ref( "t_ref" ); +const std::string t_ref_abs( "t_ref_abs" ); +const std::string t_ref_remaining( "t_ref_remaining" ); +const std::string t_ref_tot( "t_ref_tot" ); +const std::string t_spike( "t_spike" ); +const std::string target( "target" ); +const std::string target_thread( "target_thread" ); +const std::string targets( "targets" ); +const std::string tau( "tau" ); +const std::string tau_1( "tau_1" ); +const std::string tau_2( "tau_2" ); +const std::string tau_Ca( "tau_Ca" ); +const std::string tau_D_KNa( "tau_D_KNa" ); +const std::string tau_Delta( "tau_Delta" ); +const std::string tau_Mg_fast_NMDA( "tau_Mg_fast_NMDA" ); +const std::string tau_Mg_slow_NMDA( "tau_Mg_slow_NMDA" ); +const std::string tau_P( "tau_P" ); +const std::string tau_V_th( "tau_V_th" ); +const std::string tau_ahp( "tau_ahp" ); +const std::string tau_bar_bar( "tau_bar_bar" ); +const std::string tau_c( "tau_c" ); +const std::string tau_decay( "tau_decay" ); +const std::string tau_decay_AMPA( "tau_decay_AMPA" ); +const std::string tau_decay_GABA_A( "tau_decay_GABA_A" ); +const std::string tau_decay_GABA_B( "tau_decay_GABA_B" ); +const std::string tau_decay_NMDA( "tau_decay_NMDA" ); +const std::string tau_decay_ex( "tau_decay_ex" ); +const std::string tau_decay_in( "tau_decay_in" ); +const std::string tau_epsp( "tau_epsp" ); +const std::string tau_eta( "tau_eta" ); +const std::string tau_fac( "tau_fac" ); +const std::string tau_m( "tau_m" ); +const std::string tau_max( "tau_max" ); +const std::string tau_minus( "tau_minus" ); +const std::string tau_minus_stdp( "tau_minus_stdp" ); +const std::string tau_minus_triplet( "tau_minus_triplet" ); +const std::string tau_n( "tau_n" ); +const std::string tau_plus( "tau_plus" ); +const std::string tau_plus_triplet( "tau_plus_triplet" ); +const std::string tau_psc( "tau_psc" ); +const std::string tau_rec( "tau_rec" ); +const std::string tau_reset( "tau_reset" ); +const std::string tau_rise( "tau_rise" ); +const std::string tau_rise_AMPA( "tau_rise_AMPA" ); +const std::string tau_rise_GABA_A( "tau_rise_GABA_A" ); +const std::string tau_rise_GABA_B( "tau_rise_GABA_B" ); +const std::string tau_rise_NMDA( "tau_rise_NMDA" ); +const std::string tau_rise_ex( "tau_rise_ex" ); +const std::string tau_rise_in( "tau_rise_in" ); +const std::string tau_rr( "tau_rr" ); +const std::string tau_sfa( "tau_sfa" ); +const std::string tau_spike( "tau_spike" ); +const std::string tau_stc( "tau_stc" ); +const std::string tau_syn( "tau_syn" ); +const std::string tau_syn_ex( "tau_syn_ex" ); +const std::string tau_syn_in( "tau_syn_in" ); +const std::string tau_theta( "tau_theta" ); +const std::string tau_v( "tau_v" ); +const std::string tau_vacant( "tau_vacant" ); +const std::string tau_w( "tau_w" ); +const std::string tau_x( "tau_x" ); +const std::string tau_z( "tau_z" ); +const std::string th_spike_add( "th_spike_add" ); +const std::string th_spike_decay( "th_spike_decay" ); +const std::string th_voltage_decay( "th_voltage_decay" ); +const std::string th_voltage_index( "th_voltage_index" ); +const std::string theta( "theta" ); +const std::string theta_eq( "theta_eq" ); +const std::string theta_ex( "theta_ex" ); +const std::string theta_in( "theta_in" ); +const std::string theta_minus( "theta_minus" ); +const std::string theta_plus( "theta_plus" ); +const std::string thread( "thread" ); +const std::string thread_local_id( "thread_local_id" ); +const std::string threshold( "threshold" ); +const std::string threshold_spike( "threshold_spike" ); +const std::string threshold_voltage( "threshold_voltage" ); +const std::string tics_per_ms( "tics_per_ms" ); +const std::string tics_per_step( "tics_per_step" ); #ifdef TIMER_DETAILED -extern const Name time_collocate_spike_data; -extern const Name time_communicate_spike_data; -extern const Name time_communicate_target_data; -extern const Name time_deliver_spike_data; -extern const Name time_gather_spike_data; -extern const Name time_gather_target_data; -extern const Name time_update; +const std::string time_collocate_spike_data( "time_collocate_spike_data" ); +const std::string time_communicate_spike_data( "time_communicate_spike_data" ); +const std::string time_communicate_target_data( "time_communicate_target_data" ); +const std::string time_deliver_spike_data( "time_deliver_spike_data" ); +const std::string time_gather_spike_data( "time_gather_spike_data" ); +const std::string time_gather_target_data( "time_gather_target_data" ); +const std::string time_update( "time_update" ); #endif -extern const Name time_communicate_prepare; -extern const Name time_construction_connect; -extern const Name time_construction_create; -extern const Name time_in_steps; -extern const Name time_simulate; -extern const Name times; -extern const Name to_do; -extern const Name total_num_virtual_procs; -extern const Name type_id; +const std::string time_communicate_prepare( "time_communicate_prepare" ); +const std::string time_construction_connect( "time_construction_connect" ); +const std::string time_construction_create( "time_construction_create" ); +const std::string time_in_steps( "time_in_steps" ); +const std::string time_simulate( "time_simulate" ); +const std::string times( "times" ); +const std::string to_do( "to_do" ); +const std::string total_num_virtual_procs( "total_num_virtual_procs" ); +const std::string type_id( "type_id" ); -extern const Name U; -extern const Name U_m; -extern const Name u; -extern const Name u_bar_bar; -extern const Name u_bar_minus; -extern const Name u_bar_plus; -extern const Name u_ref_squared; -extern const Name update_time_limit; -extern const Name upper_right; -extern const Name use_compressed_spikes; -extern const Name use_wfr; +const std::string U( "U" ); +const std::string U_m( "U_m" ); +const std::string u( "u" ); +const std::string u_bar_bar( "u_bar_bar" ); +const std::string u_bar_minus( "u_bar_minus" ); +const std::string u_bar_plus( "u_bar_plus" ); +const std::string u_ref_squared( "u_ref_squared" ); +const std::string update_time_limit( "update_time_limit" ); +const std::string upper_right( "upper_right" ); +const std::string use_compressed_spikes( "use_compressed_spikes" ); +const std::string use_wfr( "use_wfr" ); -extern const Name V_T; -extern const Name V_T_star; -extern const Name V_act_NMDA; -extern const Name V_clamp; -extern const Name V_epsp; -extern const Name V_m; -extern const Name V_min; -extern const Name V_noise; -extern const Name V_peak; -extern const Name V_reset; -extern const Name V_th; -extern const Name V_th_alpha_1; -extern const Name V_th_alpha_2; -extern const Name V_th_max; -extern const Name V_th_rest; -extern const Name V_th_v; -extern const Name val_eta; -extern const Name voltage_clamp; -extern const Name voltage_reset_add; -extern const Name voltage_reset_fraction; -extern const Name vp; -extern const Name vt; +const std::string V_T( "V_T" ); +const std::string V_T_star( "V_T_star" ); +const std::string V_act_NMDA( "V_act_NMDA" ); +const std::string V_clamp( "V_clamp" ); +const std::string V_epsp( "V_epsp" ); +const std::string V_m( "V_m" ); +const std::string V_min( "V_min" ); +const std::string V_noise( "V_noise" ); +const std::string V_peak( "V_peak" ); +const std::string V_reset( "V_reset" ); +const std::string V_th( "V_th" ); +const std::string V_th_alpha_1( "V_th_alpha_1" ); +const std::string V_th_alpha_2( "V_th_alpha_2" ); +const std::string V_th_max( "V_th_max" ); +const std::string V_th_rest( "V_th_rest" ); +const std::string V_th_v( "V_th_v" ); +const std::string val_eta( "val_eta" ); +const std::string voltage_clamp( "voltage_clamp" ); +const std::string voltage_reset_add( "voltage_reset_add" ); +const std::string voltage_reset_fraction( "voltage_reset_fraction" ); +const std::string vp( "vp" ); +const std::string vt( "vt" ); -extern const Name w; -extern const Name weight; -extern const Name weight_per_lut_entry; -extern const Name weight_recorder; -extern const Name weights; -extern const Name wfr_comm_interval; -extern const Name wfr_interpolation_order; -extern const Name wfr_max_iterations; -extern const Name wfr_tol; -extern const Name with_reset; -extern const Name Wmax; -extern const Name Wmin; +const std::string Wmax( "Wmax" ); +const std::string Wmin( "Wmin" ); +const std::string w( "w" ); +const std::string weight( "weight" ); +const std::string weight_per_lut_entry( "weight_per_lut_entry" ); +const std::string weight_recorder( "weight_recorder" ); +const std::string weights( "weights" ); +const std::string wfr_comm_interval( "wfr_comm_interval" ); +const std::string wfr_interpolation_order( "wfr_interpolation_order" ); +const std::string wfr_max_iterations( "wfr_max_iterations" ); +const std::string wfr_tol( "wfr_tol" ); +const std::string with_reset( "with_reset" ); -extern const Name x; -extern const Name x_bar; +const std::string x( "x" ); +const std::string x_bar( "x_bar" ); -extern const Name y1; -extern const Name y2; -extern const Name y; -extern const Name y_0; -extern const Name y_1; +const std::string y( "y" ); +const std::string y1( "y1" ); +const std::string y2( "y2" ); +const std::string y_0( "y_0" ); +const std::string y_1( "y_1" ); -extern const Name z; -extern const Name z_connected; +const std::string z( "z" ); +const std::string z_connected( "z_connected" ); } // namespace names } // namespace nest diff --git a/nestkernel/nestmodule.cpp b/nestkernel/nestmodule.cpp index b5a2bf6fec..5658a4a636 100644 --- a/nestkernel/nestmodule.cpp +++ b/nestkernel/nestmodule.cpp @@ -284,13 +284,13 @@ create_doughnut( const DictionaryDatum& d ) { // The doughnut (actually an annulus) is created using a DifferenceMask // Position< 2 > center( 0, 0 ); - // if ( d.known( names::anchor.toString() ) ) + // if ( d.known( names::anchor ) ) // { - // center = d.get< std::vector< double > >( names::anchor.toString() ); + // center = d.get< std::vector< double > >( names::anchor ); // } - // const double outer = d.get< double >( names::outer_radius.toString() ); - // const double inner = d.get< double >( names::inner_radius.toString() ); + // const double outer = d.get< double >( names::outer_radius ); + // const double inner = d.get< double >( names::inner_radius ); // if ( inner >= outer ) // { // throw BadProperty( @@ -588,7 +588,7 @@ NestModule::GetMetadata_gFunction::execute( SLIInterpreter* i ) const { // meta->get_status( dict ); - // dict[ names::network_size.toString() ] = nc->size(); + // dict[ names::network_size ] = nc->size(); } i->OStack.pop(); diff --git a/nestkernel/node.cpp b/nestkernel/node.cpp index 3e47f0b56e..b892376604 100644 --- a/nestkernel/node.cpp +++ b/nestkernel/node.cpp @@ -150,19 +150,19 @@ Node::get_status_base() dictionary dict = get_status_dict_(); // add information available for all nodes - dict[ names::local.toString() ] = kernel().node_manager.is_local_node( this ); - dict[ names::model.toString() ] = get_name(); - dict[ names::global_id.toString() ] = get_node_id(); - dict[ names::vp.toString() ] = get_vp(); - dict[ names::element_type.toString() ] = get_element_type(); + dict[ names::local ] = kernel().node_manager.is_local_node( this ); + dict[ names::model ] = get_name(); + dict[ names::global_id ] = get_node_id(); + dict[ names::vp ] = get_vp(); + dict[ names::element_type ] = get_element_type(); // add information available only for local nodes if ( not is_proxy() ) { - dict[ names::frozen.toString() ] = is_frozen(); - dict[ names::node_uses_wfr.toString() ] = node_uses_wfr(); - dict[ names::thread_local_id.toString() ] = get_thread_lid(); - dict[ names::thread.toString() ] = get_thread(); + dict[ names::frozen ] = is_frozen(); + dict[ names::node_uses_wfr ] = node_uses_wfr(); + dict[ names::thread_local_id ] = get_thread_lid(); + dict[ names::thread ] = get_thread(); } // now call the child class' hook @@ -184,7 +184,7 @@ Node::set_status_base( const dictionary& dict ) String::compose( "Setting status of a '%1' with node ID %2: %3", get_name(), get_node_id(), e.message() ) ); } - dict.update_value( names::frozen.toString(), frozen_ ); + dict.update_value( names::frozen, frozen_ ); } /** diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp index c48e124fbe..ac52955ef5 100644 --- a/nestkernel/node_manager.cpp +++ b/nestkernel/node_manager.cpp @@ -793,8 +793,8 @@ NodeManager::set_status( index node_id, const dictionary& d ) void NodeManager::get_status( dictionary& d ) { - d[ names::network_size.toString() ] = size(); - d[ names::time_construction_create.toString() ] = sw_construction_create_.elapsed(); + d[ names::network_size ] = size(); + d[ names::time_construction_create ] = sw_construction_create_.elapsed(); } void diff --git a/nestkernel/parameter.cpp b/nestkernel/parameter.cpp index 2d0fb55648..27b4a24a80 100644 --- a/nestkernel/parameter.cpp +++ b/nestkernel/parameter.cpp @@ -22,8 +22,8 @@ #include -#include "node_collection.h" #include "node.h" +#include "node_collection.h" #include "spatial.h" #include "vp_manager_impl.h" @@ -82,8 +82,8 @@ NormalParameter::NormalParameter( const dictionary& d ) : mean_( 0.0 ) , std_( 1.0 ) { - d.update_value( names::mean.toString(), mean_ ); - d.update_value( names::std.toString(), std_ ); + d.update_value( names::mean, mean_ ); + d.update_value( names::std, std_ ); if ( std_ <= 0 ) { throw BadProperty( "nest::NormalParameter: std > 0 required." ); @@ -108,8 +108,8 @@ LognormalParameter::LognormalParameter( const dictionary& d ) : mean_( 0.0 ) , std_( 1.0 ) { - d.update_value( names::mean.toString(), mean_ ); - d.update_value( names::std.toString(), std_ ); + d.update_value( names::mean, mean_ ); + d.update_value( names::std, std_ ); if ( std_ <= 0 ) { throw BadProperty( "nest::LognormalParameter: std > 0 required." ); @@ -192,10 +192,10 @@ SpatialDistanceParameter::value( RngPtr, } return std::abs( layer.compute_displacement( source_pos, target_pos, dimension_ - 1 ) ); default: - throw KernelException( String::compose( - "SpatialDistanceParameter dimension must be either 0 for unspecified," - " or 1-3 for x-z. Got ", - dimension_ ) ); + throw KernelException( + String::compose( "SpatialDistanceParameter dimension must be either 0 for unspecified," + " or 1-3 for x-z. Got ", + dimension_ ) ); break; } } @@ -308,12 +308,15 @@ Gaussian2DParameter::Gaussian2DParameter( const dictionary& d ) , py_( d.get< ParameterDatum >( "y" ) ) , mean_x_( d.get< double >( "mean_x" ) ) , mean_y_( d.get< double >( "mean_y" ) ) - , x_term_const_( 1. / ( 2. * ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) * d.get< double >( "std_x" ) - * d.get< double >( "std_x" ) ) ) - , y_term_const_( 1. / ( 2. * ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) * d.get< double >( "std_y" ) - * d.get< double >( "std_y" ) ) ) - , xy_term_const_( d.get< double >( "rho" ) / ( ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) - * d.get< double >( "std_x" ) * d.get< double >( "std_y" ) ) ) + , x_term_const_( 1. + / ( 2. * ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) * d.get< double >( "std_x" ) + * d.get< double >( "std_x" ) ) ) + , y_term_const_( 1. + / ( 2. * ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) * d.get< double >( "std_y" ) + * d.get< double >( "std_y" ) ) ) + , xy_term_const_( d.get< double >( "rho" ) + / ( ( 1. - d.get< double >( "rho" ) * d.get< double >( "rho" ) ) * d.get< double >( "std_x" ) + * d.get< double >( "std_y" ) ) ) { const auto rho = d.get< double >( "rho" ); const auto std_x = d.get< double >( "std_x" ); diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h index a87af39b7a..02a0f28b60 100644 --- a/nestkernel/parameter.h +++ b/nestkernel/parameter.h @@ -24,8 +24,8 @@ #define PARAMETER_H_ // C++ includes: -#include #include +#include #include "boost/any.hpp" @@ -117,8 +117,8 @@ class Parameter bool returns_int_only() const; protected: - bool is_spatial_{ false }; - bool returns_int_only_{ false }; + bool is_spatial_ { false }; + bool returns_int_only_ { false }; bool value_is_integer_( const double value ) const; }; @@ -189,8 +189,8 @@ class UniformParameter : public Parameter : lower_( 0.0 ) , range_( 1.0 ) { - d.update_value( names::min.toString(), lower_ ); - d.update_value( names::max.toString(), range_ ); + d.update_value( names::min, lower_ ); + d.update_value( names::max, range_ ); if ( lower_ >= range_ ) { throw BadProperty( @@ -230,7 +230,7 @@ class UniformIntParameter : public Parameter : Parameter( false, true ) , max_( 1.0 ) { - d.update_value( names::max.toString(), max_ ); + d.update_value( names::max, max_ ); if ( max_ <= 0 ) { throw BadProperty( "nest::UniformIntParameter: max > 0 required." ); @@ -318,7 +318,7 @@ class ExponentialParameter : public Parameter ExponentialParameter( const dictionary& d ) : beta_( 1.0 ) { - d.update_value( names::beta.toString(), beta_ ); + d.update_value( names::beta, beta_ ); } double @@ -354,7 +354,7 @@ class NodePosParameter : public Parameter , dimension_( 0 ) , synaptic_endpoint_( 0 ) { - bool dimension_specified = d.update_value( names::dimension.toString(), dimension_ ); + bool dimension_specified = d.update_value( names::dimension, dimension_ ); if ( not dimension_specified ) { throw BadParameterValue( "Dimension must be specified when creating a node position parameter." ); @@ -363,7 +363,7 @@ class NodePosParameter : public Parameter { throw BadParameterValue( "Node position parameter dimension cannot be negative." ); } - d.update_value( names::synaptic_endpoint.toString(), synaptic_endpoint_ ); + d.update_value( names::synaptic_endpoint, synaptic_endpoint_ ); if ( synaptic_endpoint_ < 0 or 2 < synaptic_endpoint_ ) { throw BadParameterValue( "Synaptic endpoint must either be unspecified (0), source (1) or target (2)." ); @@ -423,7 +423,7 @@ class SpatialDistanceParameter : public Parameter : Parameter( true ) , dimension_( 0 ) { - d.update_value( names::dimension.toString(), dimension_ ); + d.update_value( names::dimension, dimension_ ); if ( dimension_ < 0 ) { throw BadParameterValue( "Spatial distance parameter dimension cannot be negative." ); @@ -680,7 +680,7 @@ class ComparingParameter : public Parameter , parameter2_( m2 ) , comparator_( -1 ) { - if ( not d.update_value( names::comparator.toString(), comparator_ ) ) + if ( not d.update_value( names::comparator, comparator_ ) ) { throw BadParameter( "A comparator has to be specified." ); } @@ -765,7 +765,7 @@ class ConditionalParameter : public Parameter std::shared_ptr< Parameter > if_true, std::shared_ptr< Parameter > if_false ) : Parameter( condition->is_spatial() or if_true->is_spatial() or if_false->is_spatial(), - if_true->returns_int_only() and if_false->returns_int_only() ) + if_true->returns_int_only() and if_false->returns_int_only() ) , condition_( condition ) , if_true_( if_true ) , if_false_( if_false ) diff --git a/nestkernel/proxynode.cpp b/nestkernel/proxynode.cpp index 95ac3368dc..53364d3e9a 100644 --- a/nestkernel/proxynode.cpp +++ b/nestkernel/proxynode.cpp @@ -91,7 +91,7 @@ proxynode::get_status( dictionary& d ) const { const Model* model = kernel().model_manager.get_model( model_id_ ); const Name element_type = model->get_prototype().get_element_type(); - d[ names::element_type.toString() ] = element_type.toString(); + d[ names::element_type ] = element_type.toString(); } diff --git a/nestkernel/random_manager.cpp b/nestkernel/random_manager.cpp index 9f8d9ec340..d9d626f28f 100644 --- a/nestkernel/random_manager.cpp +++ b/nestkernel/random_manager.cpp @@ -98,8 +98,7 @@ nest::RandomManager::reset_rngs_() // Delete existing RNGs. delete rank_synced_rng_; - auto delete_rngs = []( std::vector< RngPtr >& rng_vec ) - { + auto delete_rngs = []( std::vector< RngPtr >& rng_vec ) { for ( auto rng : rng_vec ) { delete rng; @@ -133,16 +132,16 @@ nest::RandomManager::get_status( dictionary& d ) rng_types.push_back( rng->first ); } - d[ names::rng_types.toString() ] = rng_types; - d[ names::rng_seed.toString() ] = static_cast< long >( base_seed_ ); // casting to avoid checking for exotic types - d[ names::rng_type.toString() ] = current_rng_type_; + d[ names::rng_types ] = rng_types; + d[ names::rng_seed ] = static_cast< long >( base_seed_ ); // casting to avoid checking for exotic types + d[ names::rng_type ] = current_rng_type_; } void nest::RandomManager::set_status( const dictionary& d ) { long rng_seed; - bool rng_seed_updated = d.update_value( names::rng_seed.toString(), rng_seed ); + bool rng_seed_updated = d.update_value( names::rng_seed, rng_seed ); if ( rng_seed_updated ) { @@ -155,7 +154,7 @@ nest::RandomManager::set_status( const dictionary& d ) } std::string rng_type; - bool rng_type_updated = d.update_value( names::rng_type.toString(), rng_type ); + bool rng_type_updated = d.update_value( names::rng_type, rng_type ); if ( rng_type_updated ) { @@ -170,7 +169,7 @@ nest::RandomManager::set_status( const dictionary& d ) } // If number of threads has been changed, we need to update the RNGs. - bool n_threads_updated = d.known( names::local_num_threads.toString() ); + bool n_threads_updated = d.known( names::local_num_threads ); if ( n_threads_updated or rng_seed_updated or rng_type_updated ) { reset_rngs_(); diff --git a/nestkernel/recording_backend_ascii.cpp b/nestkernel/recording_backend_ascii.cpp index a5321b1d98..e6e55b1b70 100644 --- a/nestkernel/recording_backend_ascii.cpp +++ b/nestkernel/recording_backend_ascii.cpp @@ -325,23 +325,23 @@ nest::RecordingBackendASCII::DeviceData::write( const Event& event, void nest::RecordingBackendASCII::DeviceData::get_status( dictionary& d ) const { - d[ names::file_extension.toString() ] = file_extension_; - d[ names::precision.toString() ] = precision_; - d[ names::time_in_steps.toString() ] = time_in_steps_; + d[ names::file_extension ] = file_extension_; + d[ names::precision ] = precision_; + d[ names::time_in_steps ] = time_in_steps_; std::string filename = compute_filename_(); - d[ names::filenames.toString() ] = std::vector< std::string >( { filename } ); + d[ names::filenames ] = std::vector< std::string >( { filename } ); } void nest::RecordingBackendASCII::DeviceData::set_status( const dictionary& d ) { - d.update_value( names::file_extension.toString(), file_extension_ ); - d.update_value( names::precision.toString(), precision_ ); - d.update_value( names::label.toString(), label_ ); + d.update_value( names::file_extension, file_extension_ ); + d.update_value( names::precision, precision_ ); + d.update_value( names::label, label_ ); bool time_in_steps = false; - if ( d.update_value( names::time_in_steps.toString(), time_in_steps ) ) + if ( d.update_value( names::time_in_steps, time_in_steps ) ) { if ( kernel().simulation_manager.has_been_simulated() ) { diff --git a/nestkernel/recording_backend_memory.cpp b/nestkernel/recording_backend_memory.cpp index a9dc7b7c67..917b6a73fe 100644 --- a/nestkernel/recording_backend_memory.cpp +++ b/nestkernel/recording_backend_memory.cpp @@ -219,25 +219,23 @@ nest::RecordingBackendMemory::DeviceData::get_status( dictionary& d ) const { dictionary events; - if ( not d.known( names::events.toString() ) ) + if ( not d.known( names::events ) ) { - d[ names::events.toString() ] = events; + d[ names::events ] = events; } else { - events = d.get< dictionary >( names::events.toString() ); + events = d.get< dictionary >( names::events ); } - auto init_intvector = [&events]( std::string key ) -> std::vector< int >& - { + auto init_intvector = [&events]( std::string key ) -> std::vector< int >& { if ( not events.known( key ) ) { events[ key ] = std::vector< int >(); } return boost::any_cast< std::vector< int >& >( events[ key ] ); }; - auto init_doublevector = [&events]( std::string key ) -> std::vector< double >& - { + auto init_doublevector = [&events]( std::string key ) -> std::vector< double >& { if ( not events.known( key ) ) { events[ key ] = std::vector< double >(); @@ -246,20 +244,20 @@ nest::RecordingBackendMemory::DeviceData::get_status( dictionary& d ) const }; // TODO-PYNEST-NG: check that the vector in events is appended correctly - auto& senders = init_intvector( names::senders.toString() ); + auto& senders = init_intvector( names::senders ); senders.insert( senders.end(), senders_.begin(), senders_.end() ); if ( time_in_steps_ ) { - auto& times = init_intvector( names::times.toString() ); + auto& times = init_intvector( names::times ); times.insert( times.end(), times_steps_.begin(), times_steps_.end() ); - auto& offsets = init_doublevector( names::offsets.toString() ); + auto& offsets = init_doublevector( names::offsets ); offsets.insert( offsets.end(), times_offset_.begin(), times_offset_.end() ); } else { - auto& times = init_doublevector( names::times.toString() ); + auto& times = init_doublevector( names::times ); times.insert( times.end(), times_ms_.begin(), times_ms_.end() ); } @@ -274,14 +272,14 @@ nest::RecordingBackendMemory::DeviceData::get_status( dictionary& d ) const long_name.insert( long_name.end(), long_values_[ i ].begin(), long_values_[ i ].end() ); } - d[ names::time_in_steps.toString() ] = time_in_steps_; + d[ names::time_in_steps ] = time_in_steps_; } void nest::RecordingBackendMemory::DeviceData::set_status( const dictionary& d ) { bool time_in_steps = false; - if ( d.update_value( names::time_in_steps.toString(), time_in_steps ) ) + if ( d.update_value( names::time_in_steps, time_in_steps ) ) { if ( kernel().simulation_manager.has_been_simulated() ) { @@ -292,7 +290,7 @@ nest::RecordingBackendMemory::DeviceData::set_status( const dictionary& d ) } size_t n_events = 1; - if ( d.update_value( names::n_events.toString(), n_events ) and n_events == 0 ) + if ( d.update_value( names::n_events, n_events ) and n_events == 0 ) { clear(); } diff --git a/nestkernel/recording_backend_screen.cpp b/nestkernel/recording_backend_screen.cpp index e6677b8ca2..deb9f35df8 100644 --- a/nestkernel/recording_backend_screen.cpp +++ b/nestkernel/recording_backend_screen.cpp @@ -175,15 +175,15 @@ nest::RecordingBackendScreen::DeviceData::DeviceData() void nest::RecordingBackendScreen::DeviceData::get_status( dictionary& d ) const { - d[ names::precision.toString() ] = precision_; - d[ names::time_in_steps.toString() ] = time_in_steps_; + d[ names::precision ] = precision_; + d[ names::time_in_steps ] = time_in_steps_; } void nest::RecordingBackendScreen::DeviceData::set_status( const dictionary& d ) { - d.update_value( names::precision.toString(), precision_ ); - d.update_value( names::time_in_steps.toString(), time_in_steps_ ); + d.update_value( names::precision, precision_ ); + d.update_value( names::time_in_steps, time_in_steps_ ); } void diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp index 7f163333b7..4e9b7d7a5c 100644 --- a/nestkernel/recording_backend_sionlib.cpp +++ b/nestkernel/recording_backend_sionlib.cpp @@ -599,7 +599,8 @@ nest::RecordingBackendSIONlib::SIONBuffer::write( const char* v, size_t n ) } template < typename T > -nest::RecordingBackendSIONlib::SIONBuffer& nest::RecordingBackendSIONlib::SIONBuffer::operator<<( const T data ) +nest::RecordingBackendSIONlib::SIONBuffer& +nest::RecordingBackendSIONlib::SIONBuffer::operator<<( const T data ) { write( ( const char* ) &data, sizeof( T ) ); return *this; @@ -621,21 +622,21 @@ nest::RecordingBackendSIONlib::Parameters_::Parameters_() void nest::RecordingBackendSIONlib::Parameters_::get( const RecordingBackendSIONlib&, dictionary& d ) const { - d[ names::filename.toString() ] = filename_; - d[ names::buffer_size.toString() ] = buffer_size_; - d[ names::sion_chunksize.toString() ] = sion_chunksize_; - d[ names::sion_collective.toString() ] = sion_collective_; - d[ names::sion_n_files.toString() ] = sion_n_files_; + d[ names::filename ] = filename_; + d[ names::buffer_size ] = buffer_size_; + d[ names::sion_chunksize ] = sion_chunksize_; + d[ names::sion_collective ] = sion_collective_; + d[ names::sion_n_files ] = sion_n_files_; } void nest::RecordingBackendSIONlib::Parameters_::set( const RecordingBackendSIONlib&, const dictionary& d ) { - d.update_value( names::filename.toString(), filename_ ); - d.update_value( names::buffer_size.toString(), buffer_size_ ); - d.update_value( names::sion_chunksize.toString(), sion_chunksize_ ); - d.update_value( names::sion_collective.toString(), sion_collective_ ); - d.update_value( names::sion_n_files.toString(), sion_n_files_ ); + d.update_value( names::filename, filename_ ); + d.update_value( names::buffer_size, buffer_size_ ); + d.update_value( names::sion_chunksize, sion_chunksize_ ); + d.update_value( names::sion_collective, sion_collective_ ); + d.update_value( names::sion_n_files, sion_n_files_ ); } void @@ -653,7 +654,7 @@ nest::RecordingBackendSIONlib::get_status( dictionary& d ) const { P_.get( *this, d ); - d[ names::filename.toString() ] = filename_; + d[ names::filename ] = filename_; } void diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp index d1d4381f8f..4b24fce98f 100644 --- a/nestkernel/recording_device.cpp +++ b/nestkernel/recording_device.cpp @@ -71,17 +71,17 @@ nest::RecordingDevice::Parameters_::Parameters_() void nest::RecordingDevice::Parameters_::get( dictionary& d ) const { - d[ names::label.toString() ] = label_; - d[ names::record_to.toString() ] = record_to_.toString(); + d[ names::label ] = label_; + d[ names::record_to ] = record_to_.toString(); } void nest::RecordingDevice::Parameters_::set( const dictionary& d ) { - d.update_value( names::label.toString(), label_ ); + d.update_value( names::label, label_ ); std::string record_to; - if ( d.update_value( names::record_to.toString(), record_to ) ) + if ( d.update_value( names::record_to, record_to ) ) { if ( not kernel().io_manager.is_valid_recording_backend( record_to ) ) { @@ -102,15 +102,15 @@ void nest::RecordingDevice::State_::get( dictionary& d ) const { size_t n_events = 0; - d.update_value( names::n_events.toString(), n_events ); - d[ names::n_events.toString() ] = n_events + n_events_; + d.update_value( names::n_events, n_events ); + d[ names::n_events ] = n_events + n_events_; } void nest::RecordingDevice::State_::set( const dictionary& d ) { size_t n_events = 0; - if ( d.update_value( names::n_events.toString(), n_events ) ) + if ( d.update_value( names::n_events, n_events ) ) { if ( n_events != 0 ) { @@ -183,7 +183,7 @@ nest::RecordingDevice::get_status( dictionary& d ) const Device::get_status( d ); - d[ names::element_type.toString() ] = names::recorder.toString(); + d[ names::element_type ] = names::recorder; if ( get_node_id() == 0 ) // this is a model prototype, not an actual instance { diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp index 24710e4ec6..cfdb8a51c2 100644 --- a/nestkernel/simulation_manager.cpp +++ b/nestkernel/simulation_manager.cpp @@ -126,7 +126,7 @@ nest::SimulationManager::set_status( const dictionary& d ) TimeConverter time_converter; double time; - if ( d.update_value( names::biological_time.toString(), time ) ) + if ( d.update_value( names::biological_time, time ) ) { if ( time != 0.0 ) { @@ -151,15 +151,15 @@ nest::SimulationManager::set_status( const dictionary& d ) } } - d.update_value( names::print_time.toString(), print_time_ ); + d.update_value( names::print_time, print_time_ ); // tics_per_ms and resolution must come after local_num_thread / // total_num_threads because they might reset the network and the time // representation double tics_per_ms = 0.0; - bool tics_per_ms_updated = d.update_value( names::tics_per_ms.toString(), tics_per_ms ); + bool tics_per_ms_updated = d.update_value( names::tics_per_ms, tics_per_ms ); double resd = 0.0; - bool res_updated = d.update_value( names::resolution.toString(), resd ); + bool res_updated = d.update_value( names::resolution, resd ); if ( tics_per_ms_updated or res_updated ) { @@ -290,7 +290,7 @@ nest::SimulationManager::set_status( const dictionary& d ) // must be set before nodes are created. // Important: wfr_comm_interval_ may change depending on use_wfr_ bool wfr; - if ( d.update_value( names::use_wfr.toString(), wfr ) ) + if ( d.update_value( names::use_wfr, wfr ) ) { if ( kernel().node_manager.size() > 0 ) { @@ -316,7 +316,7 @@ nest::SimulationManager::set_status( const dictionary& d ) // connections are created. If use_wfr_ is false wfr_comm_interval_ is set to // the resolution whenever the resolution changes. double wfr_interval; - if ( d.update_value( names::wfr_comm_interval.toString(), wfr_interval ) ) + if ( d.update_value( names::wfr_comm_interval, wfr_interval ) ) { if ( not use_wfr_ ) { @@ -351,7 +351,7 @@ nest::SimulationManager::set_status( const dictionary& d ) // set the convergence tolerance for the waveform relaxation method double tol; - if ( d.update_value( names::wfr_tol.toString(), tol ) ) + if ( d.update_value( names::wfr_tol, tol ) ) { if ( tol < 0.0 ) { @@ -366,7 +366,7 @@ nest::SimulationManager::set_status( const dictionary& d ) // set the maximal number of iterations for the waveform relaxation method long max_iter; - if ( d.update_value( names::wfr_max_iterations.toString(), max_iter ) ) + if ( d.update_value( names::wfr_max_iterations, max_iter ) ) { if ( max_iter <= 0 ) { @@ -384,7 +384,7 @@ nest::SimulationManager::set_status( const dictionary& d ) // set the interpolation order for the waveform relaxation method long interp_order; - if ( d.update_value( names::wfr_interpolation_order.toString(), interp_order ) ) + if ( d.update_value( names::wfr_interpolation_order, interp_order ) ) { if ( ( interp_order < 0 ) or ( interp_order == 2 ) or ( interp_order > 3 ) ) { @@ -399,7 +399,7 @@ nest::SimulationManager::set_status( const dictionary& d ) // update time limit double t_new = 0.0; - if ( d.update_value( names::update_time_limit.toString(), t_new ) ) + if ( d.update_value( names::update_time_limit, t_new ) ) { if ( t_new <= 0 ) { @@ -414,35 +414,35 @@ nest::SimulationManager::set_status( const dictionary& d ) void nest::SimulationManager::get_status( dictionary& d ) { - d[ names::ms_per_tic.toString() ] = Time::get_ms_per_tic(); - d[ names::tics_per_ms.toString() ] = Time::get_tics_per_ms(); - d[ names::tics_per_step.toString() ] = + d[ names::ms_per_tic ] = Time::get_ms_per_tic(); + d[ names::tics_per_ms ] = Time::get_tics_per_ms(); + d[ names::tics_per_step ] = static_cast< size_t >( Time::get_tics_per_step() ); // casting to avoid extra checks of any types - d[ names::resolution.toString() ] = Time::get_resolution().get_ms(); + d[ names::resolution ] = Time::get_resolution().get_ms(); - d[ names::T_min.toString() ] = Time::min().get_ms(); - d[ names::T_max.toString() ] = Time::max().get_ms(); + d[ names::T_min ] = Time::min().get_ms(); + d[ names::T_max ] = Time::max().get_ms(); - d[ names::biological_time.toString() ] = get_time().get_ms(); - d[ names::to_do.toString() ] = static_cast< long >( to_do_ ); // casting to avoid extra checks of any types - d[ names::print_time.toString() ] = print_time_; + d[ names::biological_time ] = get_time().get_ms(); + d[ names::to_do ] = static_cast< long >( to_do_ ); // casting to avoid extra checks of any types + d[ names::print_time ] = print_time_; - d[ names::use_wfr.toString() ] = use_wfr_; - d[ names::wfr_comm_interval.toString() ] = wfr_comm_interval_; - d[ names::wfr_tol.toString() ] = wfr_tol_; - d[ names::wfr_max_iterations.toString() ] = wfr_max_iterations_; - d[ names::wfr_interpolation_order.toString() ] = wfr_interpolation_order_; + d[ names::use_wfr ] = use_wfr_; + d[ names::wfr_comm_interval ] = wfr_comm_interval_; + d[ names::wfr_tol ] = wfr_tol_; + d[ names::wfr_max_iterations ] = wfr_max_iterations_; + d[ names::wfr_interpolation_order ] = wfr_interpolation_order_; - d[ names::update_time_limit.toString() ] = update_time_limit_; - d[ names::min_update_time.toString() ] = min_update_time_; - d[ names::max_update_time.toString() ] = max_update_time_; + d[ names::update_time_limit ] = update_time_limit_; + d[ names::min_update_time ] = min_update_time_; + d[ names::max_update_time ] = max_update_time_; - d[ names::time_simulate.toString() ] = sw_simulate_.elapsed(); - d[ names::time_communicate_prepare.toString() ] = sw_communicate_prepare_.elapsed(); + d[ names::time_simulate ] = sw_simulate_.elapsed(); + d[ names::time_communicate_prepare ] = sw_communicate_prepare_.elapsed(); #ifdef TIMER_DETAILED - d[ names::time_gather_spike_data.toString() ] = sw_gather_spike_data_.elapsed(); - d[ names::time_update.toString() ] = sw_update_.elapsed(); - d[ names::time_gather_target_data.toString() ] = sw_gather_target_data_.elapsed(); + d[ names::time_gather_spike_data ] = sw_gather_spike_data_.elapsed(); + d[ names::time_update ] = sw_update_.elapsed(); + d[ names::time_gather_target_data ] = sw_gather_target_data_.elapsed(); #endif } @@ -655,19 +655,15 @@ nest::SimulationManager::call_update_() os << "Simulation time (ms): " << t_sim; #ifdef _OPENMP - os << std::endl - << "Number of OpenMP threads: " << kernel().vp_manager.get_num_threads(); + os << std::endl << "Number of OpenMP threads: " << kernel().vp_manager.get_num_threads(); #else - os << std::endl - << "Not using OpenMP"; + os << std::endl << "Not using OpenMP"; #endif #ifdef HAVE_MPI - os << std::endl - << "Number of MPI processes: " << kernel().mpi_manager.get_num_processes(); + os << std::endl << "Number of MPI processes: " << kernel().mpi_manager.get_num_processes(); #else - os << std::endl - << "Not using MPI"; + os << std::endl << "Not using MPI"; #endif LOG( M_INFO, "SimulationManager::start_updating_", os.str() ); @@ -815,7 +811,8 @@ nest::SimulationManager::update_() if ( kernel().sp_manager.is_structural_plasticity_enabled() and ( std::fmod( Time( Time::step( clock_.get_steps() + from_step_ ) ).get_ms(), - kernel().sp_manager.get_structural_plasticity_update_interval() ) == 0 ) ) + kernel().sp_manager.get_structural_plasticity_update_interval() ) + == 0 ) ) { for ( SparseNodeArray::const_iterator i = kernel().node_manager.get_local_nodes( tid ).begin(); i != kernel().node_manager.get_local_nodes( tid ).end(); diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp index c5b907ff73..2960e7707e 100644 --- a/nestkernel/sp_manager.cpp +++ b/nestkernel/sp_manager.cpp @@ -98,17 +98,17 @@ SPManager::get_status( dictionary& d ) for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ ) { dictionary sp_synapse; - sp_synapse[ names::pre_synaptic_element.toString() ] = ( *i )->get_pre_synaptic_element_name(); - sp_synapse[ names::post_synaptic_element.toString() ] = ( *i )->get_post_synaptic_element_name(); - sp_synapse[ names::synapse_model.toString() ] = + sp_synapse[ names::pre_synaptic_element ] = ( *i )->get_pre_synaptic_element_name(); + sp_synapse[ names::post_synaptic_element ] = ( *i )->get_post_synaptic_element_name(); + sp_synapse[ names::synapse_model ] = kernel().model_manager.get_synapse_prototype( ( *i )->get_synapse_model(), 0 ).get_name(); std::stringstream syn_name; syn_name << "syn" << ( sp_conn_builders_.end() - i ); sp_synapses[ syn_name.str() ] = sp_synapse; } - d[ names::structural_plasticity_synapses.toString() ] = sp_synapses; - d[ names::structural_plasticity_update_interval.toString() ] = structural_plasticity_update_interval_; + d[ names::structural_plasticity_synapses ] = sp_synapses; + d[ names::structural_plasticity_update_interval ] = structural_plasticity_update_interval_; } /** @@ -119,12 +119,11 @@ SPManager::get_status( dictionary& d ) void SPManager::set_status( const dictionary& d ) { - if ( d.known( names::structural_plasticity_update_interval.toString() ) ) + if ( d.known( names::structural_plasticity_update_interval ) ) { - d.update_value< double >( - names::structural_plasticity_update_interval.toString(), structural_plasticity_update_interval_ ); + d.update_value< double >( names::structural_plasticity_update_interval, structural_plasticity_update_interval_ ); } - if ( not d.known( names::structural_plasticity_synapses.toString() ) ) + if ( not d.known( names::structural_plasticity_synapses ) ) { return; } /* @@ -135,13 +134,13 @@ SPManager::set_status( const dictionary& d ) dictionary syn_spec; dictionary conn_spec; - if ( d.known( names::allow_autapses.toString() ) ) + if ( d.known( names::allow_autapses ) ) { - conn_spec[ names::allow_autapses.toString() ] = d.get< bool >( names::allow_autapses.toString() ); + conn_spec[ names::allow_autapses ] = d.get< bool >( names::allow_autapses ); } - if ( d.known( names::allow_multapses.toString() ) ) + if ( d.known( names::allow_multapses ) ) { - conn_spec[ names::allow_multapses.toString() ] = d.get< bool >( names::allow_multapses.toString() ); + conn_spec[ names::allow_multapses ] = d.get< bool >( names::allow_multapses ); } NodeCollectionPTR sources( new NodeCollectionPrimitive() ); NodeCollectionPTR targets( new NodeCollectionPrimitive() ); @@ -151,7 +150,7 @@ SPManager::set_status( const dictionary& d ) delete ( *i ); } sp_conn_builders_.clear(); - d.update_value< dictionary >( names::structural_plasticity_synapses.toString(), syn_specs ); + d.update_value< dictionary >( names::structural_plasticity_synapses, syn_specs ); for ( auto& kv_pair : syn_specs ) { syn_spec = boost::any_cast< dictionary >( kv_pair.second ); @@ -280,11 +279,11 @@ SPManager::disconnect( NodeCollectionPTR sources, conn_spec.init_access_flags(); syn_spec.init_access_flags(); - if ( not conn_spec.known( names::rule.toString() ) ) + if ( not conn_spec.known( names::rule ) ) { throw BadProperty( "Disconnection spec must contain disconnection rule." ); } - const std::string rule_name = conn_spec.get< std::string >( names::rule.toString() ); + const std::string rule_name = conn_spec.get< std::string >( names::rule ); if ( not kernel().connection_manager.get_connruledict().known( rule_name ) ) { @@ -296,7 +295,7 @@ SPManager::disconnect( NodeCollectionPTR sources, for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ ) { - std::string synModel = syn_spec.get< std::string >( names::synapse_model.toString() ); + std::string synModel = syn_spec.get< std::string >( names::synapse_model ); if ( ( *i )->get_synapse_model() == ( index )( kernel().model_manager.get_synapsedict().get< synindex >( synModel ) ) ) { diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index 995bb80fc1..743f08982a 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -91,8 +91,8 @@ LayerMetadata::slice( size_t start, size_t stop, size_t step, NodeCollectionPTR // Inherit status from current layer, but with new positions. dictionary layer_dict; layer_->get_status( layer_dict ); - layer_dict[ names::positions.toString() ] = ArrayDatum( new_positions ); - layer_dict[ names::step.toString() ] = step; + layer_dict[ names::positions ] = ArrayDatum( new_positions ); + layer_dict[ names::step ] = step; layer_local->set_status( layer_dict ); } diff --git a/nestkernel/stimulation_device.cpp b/nestkernel/stimulation_device.cpp index b336f4a9df..21679e85cc 100644 --- a/nestkernel/stimulation_device.cpp +++ b/nestkernel/stimulation_device.cpp @@ -97,17 +97,17 @@ nest::StimulationDevice::Parameters_::Parameters_() void nest::StimulationDevice::Parameters_::get( dictionary& d ) const { - d[ names::label.toString() ] = label_; - d[ names::stimulus_source.toString() ] = stimulus_source_.toString(); + d[ names::label ] = label_; + d[ names::stimulus_source ] = stimulus_source_.toString(); } void nest::StimulationDevice::Parameters_::set( const dictionary& d ) { - d.update_value( names::label.toString(), label_ ); + d.update_value( names::label, label_ ); std::string stimulus_source; - if ( d.update_value( names::stimulus_source.toString(), stimulus_source ) ) + if ( d.update_value( names::stimulus_source, stimulus_source ) ) { if ( not kernel().io_manager.is_valid_stimulation_backend( stimulus_source ) ) @@ -169,7 +169,7 @@ nest::StimulationDevice::get_status( dictionary& d ) const Device::get_status( d ); - d[ names::element_type.toString() ] = names::stimulator.toString(); + d[ names::element_type ] = names::stimulator; if ( get_node_id() == 0 ) // this is a model prototype, not an actual instance { diff --git a/nestkernel/structural_plasticity_node.cpp b/nestkernel/structural_plasticity_node.cpp index 80d30eaa30..0248a3b9bd 100644 --- a/nestkernel/structural_plasticity_node.cpp +++ b/nestkernel/structural_plasticity_node.cpp @@ -55,11 +55,11 @@ nest::StructuralPlasticityNode::get_status( dictionary& d ) const { dictionary synaptic_elements_d; - d[ names::Ca.toString() ] = Ca_minus_; - d[ names::tau_Ca.toString() ] = tau_Ca_; - d[ names::beta_Ca.toString() ] = beta_Ca_; + d[ names::Ca ] = Ca_minus_; + d[ names::tau_Ca ] = tau_Ca_; + d[ names::beta_Ca ] = beta_Ca_; - d[ names::synaptic_elements.toString() ] = synaptic_elements_d; + d[ names::synaptic_elements ] = synaptic_elements_d; for ( std::map< Name, SynapticElement >::const_iterator it = synaptic_elements_map_.begin(); it != synaptic_elements_map_.end(); ++it ) @@ -76,8 +76,8 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) // We need to preserve values in case invalid values are set double new_tau_Ca = tau_Ca_; double new_beta_Ca = beta_Ca_; - d.update_value( names::tau_Ca.toString(), new_tau_Ca ); - d.update_value( names::beta_Ca.toString(), new_beta_Ca ); + d.update_value( names::tau_Ca, new_tau_Ca ); + d.update_value( names::beta_Ca, new_beta_Ca ); if ( new_tau_Ca <= 0.0 ) { @@ -95,16 +95,16 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) // check, if to clear spike history and K_minus bool clear = false; - d.update_value( names::clear.toString(), clear ); + d.update_value( names::clear, clear ); if ( clear ) { clear_history(); } // TODO-PYNEST-NG: fix - // if ( d.known( names::synaptic_elements_param.toString() ) ) + // if ( d.known( names::synaptic_elements_param ) ) // { - // const dictionary synaptic_elements_dict = d.get(names::synaptic_elements_param.toString()); + // const dictionary synaptic_elements_dict = d.get(names::synaptic_elements_param); // for ( std::map< Name, SynapticElement >::iterator it = synaptic_elements_map_.begin(); // it != synaptic_elements_map_.end(); @@ -117,7 +117,7 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) // } // } // } - if ( not d.known( names::synaptic_elements.toString() ) ) + if ( not d.known( names::synaptic_elements ) ) { return; } @@ -126,7 +126,7 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) std::pair< std::map< Name, SynapticElement >::iterator, bool > insert_result; synaptic_elements_map_ = std::map< Name, SynapticElement >(); - synaptic_elements_d = d.get< dictionary >( names::synaptic_elements.toString() ); + synaptic_elements_d = d.get< dictionary >( names::synaptic_elements ); // TODO-PYNEST-NG: fix // for ( Dictionary::const_iterator i = synaptic_elements_d->begin(); i != synaptic_elements_d->end(); ++i ) diff --git a/nestkernel/synaptic_element.cpp b/nestkernel/synaptic_element.cpp index c791fb4445..898eff3178 100644 --- a/nestkernel/synaptic_element.cpp +++ b/nestkernel/synaptic_element.cpp @@ -37,9 +37,9 @@ #include "dictutils.h" /* ---------------------------------------------------------------- -* SynapticElement -* Default constructors defining default parameters and state -* ---------------------------------------------------------------- */ + * SynapticElement + * Default constructors defining default parameters and state + * ---------------------------------------------------------------- */ nest::SynapticElement::SynapticElement() : z_( 0.0 ) @@ -68,7 +68,8 @@ nest::SynapticElement::SynapticElement( const SynapticElement& se ) // growth_curve_->set( nc_parameters ); } -nest::SynapticElement& nest::SynapticElement::operator=( const SynapticElement& other ) +nest::SynapticElement& +nest::SynapticElement::operator=( const SynapticElement& other ) { if ( this != &other ) { @@ -94,17 +95,17 @@ nest::SynapticElement& nest::SynapticElement::operator=( const SynapticElement& } /* ---------------------------------------------------------------- -* get function to store current values in dictionary -* ---------------------------------------------------------------- */ + * get function to store current values in dictionary + * ---------------------------------------------------------------- */ void nest::SynapticElement::get( dictionary& d ) const { // Store current values in the dictionary - d[ names::growth_rate.toString() ] = growth_rate_; - d[ names::tau_vacant.toString() ] = tau_vacant_; - d[ names::continuous.toString() ] = continuous_; - d[ names::z.toString() ] = z_; - d[ names::z_connected.toString() ] = z_connected_; + d[ names::growth_rate ] = growth_rate_; + d[ names::tau_vacant ] = tau_vacant_; + d[ names::continuous ] = continuous_; + d[ names::z ] = z_; + d[ names::z_connected ] = z_connected_; // Store growth curve // TODO-PYNEST-NG: fix growth curve with dictionary @@ -112,22 +113,22 @@ nest::SynapticElement::get( dictionary& d ) const } /* ---------------------------------------------------------------- -* set function to store dictionary values in the SynaticElement -* ---------------------------------------------------------------- */ + * set function to store dictionary values in the SynaticElement + * ---------------------------------------------------------------- */ void nest::SynapticElement::set( const dictionary& d ) { double new_tau_vacant = tau_vacant_; // Store values - d.update_value( names::growth_rate.toString(), growth_rate_ ); - d.update_value( names::tau_vacant.toString(), new_tau_vacant ); - d.update_value( names::continuous.toString(), continuous_ ); - d.update_value( names::z.toString(), z_ ); + d.update_value( names::growth_rate, growth_rate_ ); + d.update_value( names::tau_vacant, new_tau_vacant ); + d.update_value( names::continuous, continuous_ ); + d.update_value( names::z, z_ ); - if ( d.known( names::growth_curve.toString() ) ) + if ( d.known( names::growth_curve ) ) { - Name growth_curve_name( d.get< std::string >( names::growth_curve.toString() ) ); + Name growth_curve_name( d.get< std::string >( names::growth_curve ) ); if ( not growth_curve_->is( growth_curve_name ) ) { growth_curve_ = kernel().sp_manager.new_growth_curve( growth_curve_name ); @@ -145,8 +146,8 @@ nest::SynapticElement::set( const dictionary& d ) /* ---------------------------------------------------------------- -* Update the number of element at the time t (in ms) -* ---------------------------------------------------------------- */ + * Update the number of element at the time t (in ms) + * ---------------------------------------------------------------- */ void nest::SynapticElement::update( double t, double t_minus, double Ca_minus, double tau_Ca ) { diff --git a/nestkernel/target_identifier.h b/nestkernel/target_identifier.h index a33373127a..738ac6667f 100644 --- a/nestkernel/target_identifier.h +++ b/nestkernel/target_identifier.h @@ -28,8 +28,8 @@ * @file Provide classes to be used as template arguments to Connection. */ -#include "kernel_manager.h" #include "compose.hpp" +#include "kernel_manager.h" namespace nest { @@ -64,8 +64,8 @@ class TargetIdentifierPtrRport // Do nothing if called on synapse prototype if ( target_ != 0 ) { - d[ names::rport.toString() ] = rport_; - d[ names::target.toString() ] = target_->get_node_id(); + d[ names::rport ] = rport_; + d[ names::target ] = target_->get_node_id(); } } @@ -127,8 +127,8 @@ class TargetIdentifierIndex // Do nothing if called on synapse prototype if ( target_ != invalid_targetindex ) { - d[ names::rport.toString() ] = 0; - d[ names::target.toString() ] = target_; + d[ names::rport ] = 0; + d[ names::target ] = target_; } } @@ -171,10 +171,10 @@ TargetIdentifierIndex::set_target( Node* target ) index target_lid = target->get_thread_lid(); if ( target_lid > max_targetindex ) { - throw IllegalConnection( String::compose( - "HPC synapses support at most %1 nodes per thread. " - "See Kunkel et al, Front Neuroinform 8:78 (2014), Sec 3.3.2.", - max_targetindex ) ); + throw IllegalConnection( + String::compose( "HPC synapses support at most %1 nodes per thread. " + "See Kunkel et al, Front Neuroinform 8:78 (2014), Sec 3.3.2.", + max_targetindex ) ); } target_ = target_lid; } diff --git a/nestkernel/vp_manager.cpp b/nestkernel/vp_manager.cpp index 4d0d215a05..4540d45dca 100644 --- a/nestkernel/vp_manager.cpp +++ b/nestkernel/vp_manager.cpp @@ -70,7 +70,7 @@ void nest::VPManager::set_status( const dictionary& d ) { long n_threads = get_num_threads(); - bool n_threads_updated = d.update_value( names::local_num_threads.toString(), n_threads ); + bool n_threads_updated = d.update_value( names::local_num_threads, n_threads ); if ( n_threads_updated ) { if ( kernel().node_manager.size() > 0 ) @@ -130,7 +130,7 @@ nest::VPManager::set_status( const dictionary& d ) } long n_vps = get_num_virtual_processes(); - bool n_vps_updated = d.update_value( names::total_num_virtual_procs.toString(), n_vps ); + bool n_vps_updated = d.update_value( names::total_num_virtual_procs, n_vps ); if ( n_vps_updated ) { if ( kernel().node_manager.size() > 0 ) @@ -195,8 +195,8 @@ nest::VPManager::set_status( const dictionary& d ) void nest::VPManager::get_status( dictionary& d ) { - d[ names::local_num_threads.toString() ] = get_num_threads(); - d[ names::total_num_virtual_procs.toString() ] = get_num_virtual_processes(); + d[ names::local_num_threads ] = get_num_threads(); + d[ names::total_num_virtual_procs ] = get_num_virtual_processes(); } void diff --git a/testsuite/cpptests/test_parameter.h b/testsuite/cpptests/test_parameter.h index eae5826493..98f0d4cdc4 100644 --- a/testsuite/cpptests/test_parameter.h +++ b/testsuite/cpptests/test_parameter.h @@ -47,8 +47,8 @@ BOOST_AUTO_TEST_SUITE( test_parameter ) BOOST_AUTO_TEST_CASE( test_redraw_value_impossible, *boost::unit_test::timeout( 2 ) ) { dictionary d; - d[ nest::names::min.toString() ] = 0.0; - d[ nest::names::max.toString() ] = 1.0; + d[ nest::names::min ] = 0.0; + d[ nest::names::max ] = 1.0; ParameterDatum uniform_pd = new nest::UniformParameter( d ); // Requested region is outside of the parameter limits, so it cannot get an acceptable value. ParameterDatum redraw_pd = redraw_parameter( uniform_pd, -1.0, -0.5 ); @@ -70,7 +70,7 @@ BOOST_AUTO_TEST_CASE( test_uniform_int_returns_integer ) const int num_iterations = 1000; dictionary d; - d[ nest::names::max.toString() ] = max; + d[ nest::names::max ] = max; ParameterDatum uniform_int_pd = new nest::UniformIntParameter( d ); // We need to go via a factory to avoid compiler confusion From 969ea88d0b42ca42fe25faec30cf2842d7e19c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 10 Mar 2022 11:40:55 +0100 Subject: [PATCH 027/375] Formatting --- libnestutil/block_vector.h | 74 +++++++++++--------- libnestutil/enum_bitfield.h | 17 +++-- libnestutil/iterator_pair.h | 9 ++- libnestutil/lockptr.h | 18 +++-- libnestutil/logging_event.cpp | 3 +- libnestutil/propagator_stability.cpp | 7 +- libnestutil/sort.h | 2 +- libnestutil/stopwatch.cpp | 3 +- libnestutil/streamers.h | 3 +- libnestutil/vector_util.h | 2 +- models/cont_delay_synapse.h | 2 +- models/correlation_detector.h | 3 +- models/correlomatrix_detector.h | 3 +- models/correlospinmatrix_detector.h | 3 +- models/erfc_neuron.h | 3 +- models/ginzburg_neuron.h | 3 +- models/mcculloch_pitts_neuron.h | 3 +- models/modelsmodule.cpp | 18 ++--- models/music_cont_out_proxy.h | 5 +- models/parrot_neuron.h | 2 +- models/quantal_stp_synapse.h | 2 +- models/spike_dilutor.h | 4 +- models/spike_recorder.cpp | 2 +- models/spin_detector.cpp | 2 +- models/spin_detector.h | 2 +- nest/neststartup.cpp | 4 +- nest/neststartup.h | 2 +- nestkernel/clopath_archiving_node.h | 2 +- nestkernel/conn_builder.h | 4 +- nestkernel/conn_builder_factory.h | 2 +- nestkernel/conn_parameter.cpp | 2 +- nestkernel/conn_parameter.h | 12 ++-- nestkernel/connection_manager.h | 2 +- nestkernel/connector_model.h | 24 +++---- nestkernel/deprecation_warning.h | 4 +- nestkernel/dynamicloader.cpp | 6 +- nestkernel/event.cpp | 42 +++++++---- nestkernel/event.h | 26 +++---- nestkernel/event_delivery_manager.h | 18 ++--- nestkernel/exceptions.cpp | 3 +- nestkernel/exceptions.h | 52 +++++++------- nestkernel/growth_curve.h | 2 +- nestkernel/logging_manager.h | 2 +- nestkernel/manager_interface.h | 6 +- nestkernel/mpi_manager.h | 12 ++-- nestkernel/music_event_handler.cpp | 3 +- nestkernel/nest_datums.h | 2 +- nestkernel/nest_time.cpp | 3 +- nestkernel/nest_time.h | 39 +++++++---- nestkernel/nestmodule.h | 2 +- nestkernel/node.h | 12 ++-- nestkernel/node_collection.cpp | 29 ++++---- nestkernel/node_collection.h | 66 ++++++++++-------- nestkernel/node_manager.h | 4 +- nestkernel/ntree.h | 22 +++--- nestkernel/ntree_impl.h | 12 ++-- nestkernel/per_thread_bool_indicator.h | 2 +- nestkernel/position.h | 75 +++++++++++++------- nestkernel/random_generators.h | 66 +++++++++++------- nestkernel/recordables_map.h | 5 +- nestkernel/recording_backend.h | 22 +++--- nestkernel/recording_backend_mpi.cpp | 6 +- nestkernel/recording_backend_mpi.h | 8 +-- nestkernel/recording_device.h | 6 +- nestkernel/ring_buffer_impl.h | 2 +- nestkernel/send_buffer_position.h | 2 +- nestkernel/slice_ring_buffer.h | 9 ++- nestkernel/source.h | 9 ++- nestkernel/source_table.cpp | 18 ++--- nestkernel/source_table.h | 4 +- nestkernel/source_table_position.h | 18 +++-- nestkernel/sp_manager.h | 2 +- nestkernel/spatial.h | 9 +-- nestkernel/stimulation_backend.h | 96 +++++++++++++------------- nestkernel/stimulation_backend_mpi.cpp | 12 ++-- nestkernel/stimulation_backend_mpi.h | 12 ++-- nestkernel/stimulation_device.h | 6 +- nestkernel/synaptic_element.h | 58 ++++++++-------- nestkernel/target.h | 5 +- nestkernel/target_data.h | 3 +- nestkernel/target_table.cpp | 2 +- nestkernel/urbanczik_archiving_node.h | 2 +- sli/aggregatedatum.h | 6 +- sli/allocator.cpp | 3 +- sli/allocator.h | 2 +- sli/booldatum.cc | 6 +- sli/charcode.cc | 3 +- sli/datum.h | 5 +- sli/dict.cc | 3 +- sli/dict.h | 15 ++-- sli/dictstack.cc | 21 +++--- sli/dictstack.h | 24 ++++--- sli/fdstream.cc | 2 +- sli/fdstream.h | 2 +- sli/filesystem.h | 4 +- sli/functional.h | 3 +- sli/functiondatum.h | 9 ++- sli/genericdatum.h | 3 +- sli/interpret.cc | 12 ++-- sli/interpret.h | 5 +- sli/name.cc | 3 +- sli/name.h | 9 ++- sli/numericdatum.h | 6 +- sli/parser.cc | 9 ++- sli/processes.cc | 26 +++---- sli/puresli.cc | 10 +-- sli/scanner.cc | 6 +- sli/sli_io.cc | 8 +-- sli/slimodule.h | 2 +- sli/slistartup.h | 2 +- sli/specialfunctionsmodule.cc | 2 +- sli/specialfunctionsmodule.h | 2 +- sli/tarrayobj.cc | 13 ++-- sli/tarrayobj.h | 2 +- sli/token.cc | 3 +- sli/token.h | 12 ++-- sli/tokenarray.cc | 6 +- sli/tokenarray.h | 11 +-- sli/tokenstack.h | 3 +- sli/triedatum.h | 6 +- sli/typechk.h | 3 +- testsuite/cpptests/run_all.cpp | 2 +- testsuite/cpptests/test_streamers.h | 2 +- 123 files changed, 766 insertions(+), 585 deletions(-) diff --git a/libnestutil/block_vector.h b/libnestutil/block_vector.h index 7d1e19a22f..2394dce91b 100644 --- a/libnestutil/block_vector.h +++ b/libnestutil/block_vector.h @@ -23,11 +23,11 @@ #ifndef BLOCK_VECTOR_H_ #define BLOCK_VECTOR_H_ +#include #include -#include #include #include -#include +#include #include "sliexceptions.h" @@ -593,7 +593,8 @@ inline bv_iterator< value_type_, ref_, ptr_ >::bv_iterator( const BlockVector< v } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, ptr_ >::operator++() +inline bv_iterator< value_type_, ref_, ptr_ >& +bv_iterator< value_type_, ref_, ptr_ >::operator++() { ++block_it_; if ( block_it_ == current_block_end_ ) @@ -613,7 +614,8 @@ inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, p } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, ptr_ >::operator--() +inline bv_iterator< value_type_, ref_, ptr_ >& +bv_iterator< value_type_, ref_, ptr_ >::operator--() { // If we are still within the block, we can just decrement the block iterator. // If not, we need to switch to the previous block. @@ -639,7 +641,8 @@ inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, p } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, ptr_ >::operator+=( difference_type val ) +inline bv_iterator< value_type_, ref_, ptr_ >& +bv_iterator< value_type_, ref_, ptr_ >::operator+=( difference_type val ) { if ( val < 0 ) { @@ -653,7 +656,8 @@ inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, p } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, ptr_ >::operator-=( difference_type val ) +inline bv_iterator< value_type_, ref_, ptr_ >& +bv_iterator< value_type_, ref_, ptr_ >::operator-=( difference_type val ) { if ( val < 0 ) { @@ -667,23 +671,24 @@ inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, p } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, ptr_ >::operator+( - difference_type val ) const +inline bv_iterator< value_type_, ref_, ptr_ > +bv_iterator< value_type_, ref_, ptr_ >::operator+( difference_type val ) const { bv_iterator tmp = *this; return tmp += val; } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, ptr_ >::operator-( - difference_type val ) const +inline bv_iterator< value_type_, ref_, ptr_ > +bv_iterator< value_type_, ref_, ptr_ >::operator-( difference_type val ) const { bv_iterator tmp = *this; return tmp -= val; } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, ptr_ >::operator++( int ) +inline bv_iterator< value_type_, ref_, ptr_ > +bv_iterator< value_type_, ref_, ptr_ >::operator++( int ) { bv_iterator< value_type_, ref_, ptr_ > old( *this ); ++( *this ); @@ -691,7 +696,8 @@ inline bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, pt } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, ptr_ >::operator--( int ) +inline bv_iterator< value_type_, ref_, ptr_ > +bv_iterator< value_type_, ref_, ptr_ >::operator--( int ) { bv_iterator< value_type_, ref_, ptr_ > old( *this ); --( *this ); @@ -699,8 +705,8 @@ inline bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, pt } template < typename value_type_, typename ref_, typename ptr_ > -inline typename bv_iterator< value_type_, ref_, ptr_ >::reference bv_iterator< value_type_, ref_, ptr_ >:: -operator*() const +inline + typename bv_iterator< value_type_, ref_, ptr_ >::reference bv_iterator< value_type_, ref_, ptr_ >::operator*() const { // TODO: Using const_cast to remove the constness isn't the most elegant // solution. There is probably a better way to do this. @@ -708,8 +714,8 @@ operator*() const } template < typename value_type_, typename ref_, typename ptr_ > -inline typename bv_iterator< value_type_, ref_, ptr_ >::pointer bv_iterator< value_type_, ref_, ptr_ >:: -operator->() const +inline + typename bv_iterator< value_type_, ref_, ptr_ >::pointer bv_iterator< value_type_, ref_, ptr_ >::operator->() const { // TODO: Again, using const_cast to remove the constness isn't the most // elegant solution. There is probably a better way to do this. @@ -717,8 +723,8 @@ operator->() const } template < typename value_type_, typename ref_, typename ptr_ > -inline typename bv_iterator< value_type_, ref_, ptr_ >::difference_type bv_iterator< value_type_, ref_, ptr_ >:: -operator-( const iterator& other ) const +inline typename bv_iterator< value_type_, ref_, ptr_ >::difference_type +bv_iterator< value_type_, ref_, ptr_ >::operator-( const iterator& other ) const { const auto this_element_index = block_it_ - block_vector_it_->begin(); const auto other_element_index = other.block_it_ - other.block_vector_it_->begin(); @@ -726,8 +732,8 @@ operator-( const iterator& other ) const } template < typename value_type_, typename ref_, typename ptr_ > -inline typename bv_iterator< value_type_, ref_, ptr_ >::difference_type bv_iterator< value_type_, ref_, ptr_ >:: -operator-( const const_iterator& other ) const +inline typename bv_iterator< value_type_, ref_, ptr_ >::difference_type +bv_iterator< value_type_, ref_, ptr_ >::operator-( const const_iterator& other ) const { const auto this_element_index = block_it_ - block_vector_it_->begin(); const auto other_element_index = other.block_it_ - other.block_vector_it_->begin(); @@ -735,8 +741,8 @@ operator-( const const_iterator& other ) const } template < typename value_type_, typename ref_, typename ptr_ > -inline typename bv_iterator< value_type_, ref_, ptr_ >::iterator& bv_iterator< value_type_, ref_, ptr_ >::operator=( - const iterator& other ) +inline typename bv_iterator< value_type_, ref_, ptr_ >::iterator& +bv_iterator< value_type_, ref_, ptr_ >::operator=( const iterator& other ) { block_vector_ = other.block_vector_; block_vector_it_ = other.block_vector_it_; @@ -753,41 +759,45 @@ inline typename bv_iterator< value_type_, ref_, ptr_ >::reference bv_iterator< v } template < typename value_type_, typename ref_, typename ptr_ > -inline bool bv_iterator< value_type_, ref_, ptr_ >::operator==( - const bv_iterator< value_type_, ref_, ptr_ >& rhs ) const +inline bool +bv_iterator< value_type_, ref_, ptr_ >::operator==( const bv_iterator< value_type_, ref_, ptr_ >& rhs ) const { return ( block_vector_it_ == rhs.block_vector_it_ and block_it_ == rhs.block_it_ ); } template < typename value_type_, typename ref_, typename ptr_ > -inline bool bv_iterator< value_type_, ref_, ptr_ >::operator!=( - const bv_iterator< value_type_, ref_, ptr_ >& rhs ) const +inline bool +bv_iterator< value_type_, ref_, ptr_ >::operator!=( const bv_iterator< value_type_, ref_, ptr_ >& rhs ) const { return ( block_vector_it_ != rhs.block_vector_it_ or block_it_ != rhs.block_it_ ); } template < typename value_type_, typename ref_, typename ptr_ > -inline bool bv_iterator< value_type_, ref_, ptr_ >::operator<( const bv_iterator& rhs ) const +inline bool +bv_iterator< value_type_, ref_, ptr_ >::operator<( const bv_iterator& rhs ) const { return ( block_vector_it_ < rhs.block_vector_it_ or ( block_vector_it_ == rhs.block_vector_it_ and block_it_ < rhs.block_it_ ) ); } template < typename value_type_, typename ref_, typename ptr_ > -inline bool bv_iterator< value_type_, ref_, ptr_ >::operator>( const bv_iterator& rhs ) const +inline bool +bv_iterator< value_type_, ref_, ptr_ >::operator>( const bv_iterator& rhs ) const { return ( block_vector_it_ > rhs.block_vector_it_ or ( block_vector_it_ == rhs.block_vector_it_ and block_it_ > rhs.block_it_ ) ); } template < typename value_type_, typename ref_, typename ptr_ > -inline bool bv_iterator< value_type_, ref_, ptr_ >::operator<=( const bv_iterator& rhs ) const +inline bool +bv_iterator< value_type_, ref_, ptr_ >::operator<=( const bv_iterator& rhs ) const { return operator<( rhs ) or operator==( rhs ); } template < typename value_type_, typename ref_, typename ptr_ > -inline bool bv_iterator< value_type_, ref_, ptr_ >::operator>=( const bv_iterator& rhs ) const +inline bool +bv_iterator< value_type_, ref_, ptr_ >::operator>=( const bv_iterator& rhs ) const { return operator>( rhs ) or operator==( rhs ); } @@ -800,8 +810,8 @@ bv_iterator< value_type_, ref_, ptr_ >::const_cast_() const } template < typename value_type_, typename ref_, typename ptr_ > -inline bv_iterator< value_type_, ref_, ptr_ > operator+( - typename bv_iterator< value_type_, ref_, ptr_ >::difference_type n, +inline bv_iterator< value_type_, ref_, ptr_ > +operator+( typename bv_iterator< value_type_, ref_, ptr_ >::difference_type n, bv_iterator< value_type_, ref_, ptr_ >& x ) { return x + n; diff --git a/libnestutil/enum_bitfield.h b/libnestutil/enum_bitfield.h index 06071405ca..995406c2e9 100644 --- a/libnestutil/enum_bitfield.h +++ b/libnestutil/enum_bitfield.h @@ -72,7 +72,7 @@ namespace nest * { * std::cout << "Fourth flag is set!" << std::endl; * } -*/ + */ template < typename Enum > struct EnableBitMaskOperators @@ -81,7 +81,8 @@ struct EnableBitMaskOperators }; template < typename Enum > -typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator|( Enum lhs, Enum rhs ) +typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type +operator|( Enum lhs, Enum rhs ) { using underlying = typename std::underlying_type< Enum >::type; return static_cast< Enum >( static_cast< underlying >( lhs ) | static_cast< underlying >( rhs ) ); @@ -95,14 +96,16 @@ typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type op } template < typename Enum > -typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator^( Enum& lhs, Enum rhs ) +typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type +operator^( Enum& lhs, Enum rhs ) { using underlying = typename std::underlying_type< Enum >::type; return static_cast< Enum >( static_cast< underlying >( lhs ) ^ static_cast< underlying >( rhs ) ); } template < typename Enum > -typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator|=( Enum& lhs, Enum rhs ) +typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type +operator|=( Enum& lhs, Enum rhs ) { using underlying = typename std::underlying_type< Enum >::type; lhs = static_cast< Enum >( static_cast< underlying >( lhs ) | static_cast< underlying >( rhs ) ); @@ -110,7 +113,8 @@ typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type op } template < typename Enum > -typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator&=( Enum& lhs, Enum rhs ) +typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type +operator&=( Enum& lhs, Enum rhs ) { using underlying = typename std::underlying_type< Enum >::type; lhs = static_cast< Enum >( static_cast< underlying >( lhs ) & static_cast< underlying >( rhs ) ); @@ -118,7 +122,8 @@ typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type op } template < typename Enum > -typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type operator^=( Enum& lhs, Enum rhs ) +typename std::enable_if< EnableBitMaskOperators< Enum >::enable, Enum >::type +operator^=( Enum& lhs, Enum rhs ) { using underlying = typename std::underlying_type< Enum >::type; lhs = static_cast< Enum >( static_cast< underlying >( lhs ) ^ static_cast< underlying >( rhs ) ); diff --git a/libnestutil/iterator_pair.h b/libnestutil/iterator_pair.h index d79cf9d44e..62004980c6 100644 --- a/libnestutil/iterator_pair.h +++ b/libnestutil/iterator_pair.h @@ -56,7 +56,8 @@ swap( boost::tuple< T&, U& > a, boost::tuple< T&, U& > b ) noexcept * first values of the tuples. */ template < class T1, class T2, class S1, class S2 > -inline bool operator<( const cons< T1, T2 >& lhs, const cons< S1, S2 >& rhs ) +inline bool +operator<( const cons< T1, T2 >& lhs, const cons< S1, S2 >& rhs ) { // check that tuple lengths are equal BOOST_STATIC_ASSERT( length< T2 >::value == length< S2 >::value ); @@ -162,13 +163,15 @@ make_iterator_pair( sort_iter_type_ sort_iter, perm_iter_type_ perm_iter ) struct rightshift_iterator_pair { template < typename T > - inline int operator()( boost::tuples::tuple< int&, T& > s, unsigned offset ) + inline int + operator()( boost::tuples::tuple< int&, T& > s, unsigned offset ) { return boost::get< 0 >( s ) >> offset; } template < typename T > - inline int operator()( boost::tuples::tuple< nest::Source&, T& > s, unsigned offset ) + inline int + operator()( boost::tuples::tuple< nest::Source&, T& > s, unsigned offset ) { return boost::get< 0 >( s ).get_node_id() >> offset; } diff --git a/libnestutil/lockptr.h b/libnestutil/lockptr.h index 9e8a23cfb9..325ea30e7e 100644 --- a/libnestutil/lockptr.h +++ b/libnestutil/lockptr.h @@ -187,7 +187,8 @@ class lockPTR assert( obj != NULL ); } - lockPTR< D > operator=( const lockPTR< D >& spd ) + lockPTR< D > + operator=( const lockPTR< D >& spd ) { assert( obj != NULL ); assert( spd.obj != NULL ); @@ -197,14 +198,16 @@ class lockPTR return *this; } - lockPTR< D > operator=( D& s ) + lockPTR< D > + operator=( D& s ) { *this = lockPTR< D >( s ); assert( not( obj->isdeletable() ) ); return *this; } - lockPTR< D > operator=( D const& s ) + lockPTR< D > + operator=( D const& s ) { *this = lockPTR< D >( s ); assert( not( obj->isdeletable() ) ); @@ -274,18 +277,21 @@ class lockPTR that are shared by lockPTRs, so this is equivalent to comparing the address of the D objects. */ - bool operator==( const lockPTR< D >& p ) const + bool + operator==( const lockPTR< D >& p ) const { return ( obj == p.obj ); } - bool operator!=( const lockPTR< D >& p ) const + bool + operator!=( const lockPTR< D >& p ) const { return ( obj != p.obj ); } - bool valid( void ) const //!< returns true if and only if obj->pointee != NULL + bool + valid( void ) const //!< returns true if and only if obj->pointee != NULL { assert( obj != NULL ); return ( obj->get() != NULL ); diff --git a/libnestutil/logging_event.cpp b/libnestutil/logging_event.cpp index 1c6a3b0267..3d417a22fb 100644 --- a/libnestutil/logging_event.cpp +++ b/libnestutil/logging_event.cpp @@ -46,7 +46,8 @@ nest::LoggingEvent::LoggingEvent( const nest::severity_t s, namespace nest { -std::ostream& operator<<( std::ostream& out, const LoggingEvent& e ) +std::ostream& +operator<<( std::ostream& out, const LoggingEvent& e ) { struct tm* ptm = localtime( &e.time_stamp ); switch ( e.severity ) diff --git a/libnestutil/propagator_stability.cpp b/libnestutil/propagator_stability.cpp index 62d7b94652..8aa46c6938 100644 --- a/libnestutil/propagator_stability.cpp +++ b/libnestutil/propagator_stability.cpp @@ -32,9 +32,10 @@ double propagator_31( double tau_syn, double tau, double C, double h ) { const double P31_linear = 1 / ( 3. * C * tau * tau ) * h * h * h * ( tau_syn - tau ) * std::exp( -h / tau ); - const double P31 = - 1 / C * ( std::exp( -h / tau_syn ) * numerics::expm1( -h / tau + h / tau_syn ) / ( tau / tau_syn - 1 ) * tau - - h * std::exp( -h / tau_syn ) ) / ( -1 - -tau / tau_syn ) * tau; + const double P31 = 1 / C + * ( std::exp( -h / tau_syn ) * numerics::expm1( -h / tau + h / tau_syn ) / ( tau / tau_syn - 1 ) * tau + - h * std::exp( -h / tau_syn ) ) + / ( -1 - -tau / tau_syn ) * tau; const double P31_singular = h * h / 2 / C * std::exp( -h / tau ); const double dev_P31 = std::abs( P31 - P31_singular ); diff --git a/libnestutil/sort.h b/libnestutil/sort.h index 6193237e3d..a74ab68409 100644 --- a/libnestutil/sort.h +++ b/libnestutil/sort.h @@ -33,8 +33,8 @@ #include "block_vector.h" #ifdef HAVE_BOOST -#include #include "iterator_pair.h" +#include #endif #define INSERTION_SORT_CUTOFF 10 // use insertion sort for smaller arrays diff --git a/libnestutil/stopwatch.cpp b/libnestutil/stopwatch.cpp index ad8c190b50..ec7a2b7676 100644 --- a/libnestutil/stopwatch.cpp +++ b/libnestutil/stopwatch.cpp @@ -24,7 +24,8 @@ namespace nest { -std::ostream& operator<<( std::ostream& os, const Stopwatch& stopwatch ) +std::ostream& +operator<<( std::ostream& os, const Stopwatch& stopwatch ) { stopwatch.print( "", Stopwatch::SECONDS, os ); return os; diff --git a/libnestutil/streamers.h b/libnestutil/streamers.h index 66073dcd59..15efcfe50c 100644 --- a/libnestutil/streamers.h +++ b/libnestutil/streamers.h @@ -31,7 +31,8 @@ * This templated operator streams all elements of a std::vector<>. */ template < typename T > -std::ostream& operator<<( std::ostream& os, const std::vector< T >& vec ) +std::ostream& +operator<<( std::ostream& os, const std::vector< T >& vec ) { os << "vector["; bool first = true; diff --git a/libnestutil/vector_util.h b/libnestutil/vector_util.h index bc4e62d840..e7b11b88d3 100644 --- a/libnestutil/vector_util.h +++ b/libnestutil/vector_util.h @@ -23,8 +23,8 @@ #ifndef VECTOR_UTIL_H #define VECTOR_UTIL_H -#include #include +#include namespace vector_util { diff --git a/models/cont_delay_synapse.h b/models/cont_delay_synapse.h index 995f1b20c3..0b217154ce 100644 --- a/models/cont_delay_synapse.h +++ b/models/cont_delay_synapse.h @@ -107,9 +107,9 @@ class cont_delay_synapse : public Connection< targetidentifierT > // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. using ConnectionBase::get_delay_steps; - using ConnectionBase::set_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; + using ConnectionBase::set_delay_steps; //! Used by ConnectorModel::add_connection() for fast initialization void diff --git a/models/correlation_detector.h b/models/correlation_detector.h index 5abf4412b5..76f10d092f 100644 --- a/models/correlation_detector.h +++ b/models/correlation_detector.h @@ -225,7 +225,8 @@ class correlation_detector : public Node /** * Greater operator needed for insertion sort. */ - inline bool operator>( const Spike_& second ) const + inline bool + operator>( const Spike_& second ) const { return timestep_ > second.timestep_; } diff --git a/models/correlomatrix_detector.h b/models/correlomatrix_detector.h index 3f462b2df2..043d48c773 100644 --- a/models/correlomatrix_detector.h +++ b/models/correlomatrix_detector.h @@ -213,7 +213,8 @@ class correlomatrix_detector : public Node /** * Greater operator needed for insertion sort. */ - inline bool operator>( const Spike_& second ) const + inline bool + operator>( const Spike_& second ) const { return timestep_ > second.timestep_; } diff --git a/models/correlospinmatrix_detector.h b/models/correlospinmatrix_detector.h index 1f06b8d8a4..688d93f0b3 100644 --- a/models/correlospinmatrix_detector.h +++ b/models/correlospinmatrix_detector.h @@ -199,7 +199,8 @@ class correlospinmatrix_detector : public Node /** * Greater operator needed for insertion sort. */ - inline bool operator>( const BinaryPulse_& second ) const + inline bool + operator>( const BinaryPulse_& second ) const { return t_off_ > second.t_off_; } diff --git a/models/erfc_neuron.h b/models/erfc_neuron.h index 67f5be31ba..5313e0001e 100644 --- a/models/erfc_neuron.h +++ b/models/erfc_neuron.h @@ -150,7 +150,8 @@ class gainfunction_erfc bool operator()( RngPtr rng, double h ); }; -inline bool gainfunction_erfc::operator()( RngPtr rng, double h ) +inline bool +gainfunction_erfc::operator()( RngPtr rng, double h ) { return rng->drand() < 0.5 * erfc( -( h - theta_ ) / ( sqrt( 2. ) * sigma_ ) ); } diff --git a/models/ginzburg_neuron.h b/models/ginzburg_neuron.h index 90915de4bf..2977010842 100644 --- a/models/ginzburg_neuron.h +++ b/models/ginzburg_neuron.h @@ -165,7 +165,8 @@ class gainfunction_ginzburg bool operator()( RngPtr rng, double h ); }; -inline bool gainfunction_ginzburg::operator()( RngPtr rng, double h ) +inline bool +gainfunction_ginzburg::operator()( RngPtr rng, double h ) { return rng->drand() < c1_ * h + c2_ * 0.5 * ( 1.0 + tanh( c3_ * ( h - theta_ ) ) ); } diff --git a/models/mcculloch_pitts_neuron.h b/models/mcculloch_pitts_neuron.h index 64a1d0f8b0..6dfd7e6296 100644 --- a/models/mcculloch_pitts_neuron.h +++ b/models/mcculloch_pitts_neuron.h @@ -138,7 +138,8 @@ class gainfunction_mcculloch_pitts bool operator()( RngPtr, double h ); }; -inline bool gainfunction_mcculloch_pitts::operator()( RngPtr, double h ) +inline bool +gainfunction_mcculloch_pitts::operator()( RngPtr, double h ) { return h > theta_; } diff --git a/models/modelsmodule.cpp b/models/modelsmodule.cpp index 6c907d6908..cb3b4ea08e 100644 --- a/models/modelsmodule.cpp +++ b/models/modelsmodule.cpp @@ -40,14 +40,14 @@ #include "amat2_psc_exp.h" #include "erfc_neuron.h" #include "gauss_rate.h" -#include "gif_psc_exp.h" -#include "gif_psc_exp_multisynapse.h" #include "gif_cond_exp.h" #include "gif_cond_exp_multisynapse.h" #include "gif_pop_psc_exp.h" +#include "gif_psc_exp.h" +#include "gif_psc_exp_multisynapse.h" +#include "ginzburg_neuron.h" #include "glif_cond.h" #include "glif_psc.h" -#include "ginzburg_neuron.h" #include "hh_cond_beta_gap_traub.h" #include "hh_cond_exp_traub.h" #include "hh_psc_alpha.h" @@ -91,11 +91,11 @@ #include "ac_generator.h" #include "dc_generator.h" #include "gamma_sup_generator.h" +#include "inhomogeneous_poisson_generator.h" #include "mip_generator.h" #include "noise_generator.h" #include "poisson_generator.h" #include "poisson_generator_ps.h" -#include "inhomogeneous_poisson_generator.h" #include "ppd_sup_generator.h" #include "pulsepacket_generator.h" #include "sinusoidal_gamma_generator.h" @@ -131,15 +131,15 @@ #include "rate_connection_instantaneous.h" #include "static_synapse.h" #include "static_synapse_hom_w.h" -#include "stdp_synapse.h" -#include "stdp_synapse_facetshw_hom.h" -#include "stdp_synapse_facetshw_hom_impl.h" -#include "stdp_synapse_hom.h" #include "stdp_dopamine_synapse.h" +#include "stdp_nn_pre_centered_synapse.h" #include "stdp_nn_restr_synapse.h" #include "stdp_nn_symm_synapse.h" -#include "stdp_nn_pre_centered_synapse.h" #include "stdp_pl_synapse_hom.h" +#include "stdp_synapse.h" +#include "stdp_synapse_facetshw_hom.h" +#include "stdp_synapse_facetshw_hom_impl.h" +#include "stdp_synapse_hom.h" #include "stdp_triplet_synapse.h" #include "tsodyks2_synapse.h" #include "tsodyks_synapse.h" diff --git a/models/music_cont_out_proxy.h b/models/music_cont_out_proxy.h index faa15e260e..4d869743fe 100644 --- a/models/music_cont_out_proxy.h +++ b/models/music_cont_out_proxy.h @@ -40,10 +40,9 @@ // Includes from nestkernel: #include "device_node.h" -#include "node_collection.h" #include "nest_timeconverter.h" #include "nest_types.h" -#include "device_node.h" +#include "node_collection.h" // Includes from sli: #include "arraydatum.h" @@ -203,7 +202,7 @@ class music_cont_out_proxy : public DeviceNode Buffers_(); //!< Initializes default buffer Buffers_( const Buffers_& ); //!< Copy constructor for the data buffer bool has_targets_; //!< Indicates whether the proxy is recording from any - //!neurons or not + //! neurons or not std::vector< double > data_; //!< Recorded data }; diff --git a/models/parrot_neuron.h b/models/parrot_neuron.h index 8337c2a1e4..fb82d5d220 100644 --- a/models/parrot_neuron.h +++ b/models/parrot_neuron.h @@ -90,8 +90,8 @@ class parrot_neuron : public ArchivingNode */ using Node::handle; using Node::handles_test_event; - using Node::sends_signal; using Node::receives_signal; + using Node::sends_signal; port send_test_event( Node&, rport, synindex, bool ); SignalType sends_signal() const; diff --git a/models/quantal_stp_synapse.h b/models/quantal_stp_synapse.h index b10c718e5f..b33f9b2599 100644 --- a/models/quantal_stp_synapse.h +++ b/models/quantal_stp_synapse.h @@ -123,8 +123,8 @@ class quantal_stp_synapse : public Connection< targetidentifierT > // ConnectionBase. This avoids explicit name prefixes in all places these // functions are used. Since ConnectionBase depends on the template parameter, // they are not automatically found in the base class. - using ConnectionBase::get_delay_steps; using ConnectionBase::get_delay; + using ConnectionBase::get_delay_steps; using ConnectionBase::get_rport; using ConnectionBase::get_target; diff --git a/models/spike_dilutor.h b/models/spike_dilutor.h index b007ae097c..09106bd813 100644 --- a/models/spike_dilutor.h +++ b/models/spike_dilutor.h @@ -92,9 +92,9 @@ class spike_dilutor : public DeviceNode return names::stimulator; } - using Node::handles_test_event; // new - using Node::handle; using Node::event_hook; + using Node::handle; + using Node::handles_test_event; // new port send_test_event( Node&, rport, synindex, bool ) override; port handles_test_event( SpikeEvent&, rport ) override; diff --git a/models/spike_recorder.cpp b/models/spike_recorder.cpp index d3b81d0d0b..11ad77ef7d 100644 --- a/models/spike_recorder.cpp +++ b/models/spike_recorder.cpp @@ -26,8 +26,8 @@ #include // Includes from libnestutil: -#include "dict_util.h" #include "compose.hpp" +#include "dict_util.h" #include "logging.h" // Includes from nestkernel: diff --git a/models/spin_detector.cpp b/models/spin_detector.cpp index 7f5d306e8a..f6b2ec7948 100644 --- a/models/spin_detector.cpp +++ b/models/spin_detector.cpp @@ -26,8 +26,8 @@ #include // Includes from libnestutil: -#include "dict_util.h" #include "compose.hpp" +#include "dict_util.h" #include "logging.h" // Includes from nestkernel: diff --git a/models/spin_detector.h b/models/spin_detector.h index 879a1293da..89ba38ae74 100644 --- a/models/spin_detector.h +++ b/models/spin_detector.h @@ -31,9 +31,9 @@ #include "device_node.h" #include "event.h" #include "exceptions.h" +#include "nest_timeconverter.h" #include "nest_types.h" #include "recording_device.h" -#include "nest_timeconverter.h" namespace nest { diff --git a/nest/neststartup.cpp b/nest/neststartup.cpp index 4c19b732f0..1c591bc90f 100644 --- a/nest/neststartup.cpp +++ b/nest/neststartup.cpp @@ -35,12 +35,12 @@ // Includes from nestkernel: // #include "dynamicloader.h" +#include "exceptions.h" #include "genericmodel_impl.h" #include "kernel_manager.h" +#include "model_manager_impl.h" #include "nest.h" #include "nestmodule.h" -#include "model_manager_impl.h" -#include "exceptions.h" // Includes from sli: #include "dict.h" diff --git a/nest/neststartup.h b/nest/neststartup.h index ec19cb89d9..5974e68414 100644 --- a/nest/neststartup.h +++ b/nest/neststartup.h @@ -27,8 +27,8 @@ #include "config.h" #if defined( HAVE_LIBNEUROSIM ) && defined( _IS_PYNEST ) -#include #include "datum.h" +#include #define CYTHON_isConnectionGenerator( x ) PNS::isConnectionGenerator( x ) Datum* CYTHON_unpackConnectionGeneratorDatum( PyObject* ); #else diff --git a/nestkernel/clopath_archiving_node.h b/nestkernel/clopath_archiving_node.h index b9c8a01fe7..eaf5d0449e 100644 --- a/nestkernel/clopath_archiving_node.h +++ b/nestkernel/clopath_archiving_node.h @@ -27,10 +27,10 @@ #include // Includes from nestkernel: +#include "archiving_node.h" #include "histentry.h" #include "nest_time.h" #include "nest_types.h" -#include "archiving_node.h" #include "synaptic_element.h" // Includes from sli: diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h index 527a7b36fe..318ad6674f 100644 --- a/nestkernel/conn_builder.h +++ b/nestkernel/conn_builder.h @@ -32,13 +32,13 @@ // C++ includes: #include -#include #include +#include // Includes from nestkernel: #include "conn_parameter.h" -#include "node_collection.h" #include "nest_time.h" +#include "node_collection.h" #include "parameter.h" // Includes from sli: diff --git a/nestkernel/conn_builder_factory.h b/nestkernel/conn_builder_factory.h index de2c97b0b3..e9ad5b0700 100644 --- a/nestkernel/conn_builder_factory.h +++ b/nestkernel/conn_builder_factory.h @@ -31,8 +31,8 @@ // Includes from sli: #include "dictdatum.h" -#include "sharedptrdatum.h" #include "name.h" +#include "sharedptrdatum.h" namespace nest { diff --git a/nestkernel/conn_parameter.cpp b/nestkernel/conn_parameter.cpp index 32ab27c63d..bfd78deafd 100644 --- a/nestkernel/conn_parameter.cpp +++ b/nestkernel/conn_parameter.cpp @@ -25,8 +25,8 @@ #include // Includes from nestkernel: -#include "nest_names.h" #include "kernel_manager.h" +#include "nest_names.h" // Includes from sli: #include "arraydatum.h" diff --git a/nestkernel/conn_parameter.h b/nestkernel/conn_parameter.h index de68f8d435..d653d45394 100644 --- a/nestkernel/conn_parameter.h +++ b/nestkernel/conn_parameter.h @@ -31,8 +31,8 @@ // Includes from nestkernel: #include "exceptions.h" -#include "parameter.h" #include "nest_datums.h" +#include "parameter.h" // Includes from sli: #include "token.h" @@ -112,11 +112,11 @@ class ConnParameter } /** - * @param t parameter - * type is established by casts to all acceptedpossibilities - * @param nthread number of threads - * required to fix number pointers to the iterator (one for each thread) - */ + * @param t parameter + * type is established by casts to all acceptedpossibilities + * @param nthread number of threads + * required to fix number pointers to the iterator (one for each thread) + */ static ConnParameter* create( const boost::any&, const size_t ); }; diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h index c44be3978c..e942c065e5 100644 --- a/nestkernel/connection_manager.h +++ b/nestkernel/connection_manager.h @@ -34,10 +34,10 @@ #include "conn_builder.h" #include "connection_id.h" #include "connector_base.h" -#include "node_collection.h" #include "nest_time.h" #include "nest_timeconverter.h" #include "nest_types.h" +#include "node_collection.h" #include "per_thread_bool_indicator.h" #include "source_table.h" #include "spike_data.h" diff --git a/nestkernel/connector_model.h b/nestkernel/connector_model.h index 7a94aeb0b2..a94b6a2fad 100644 --- a/nestkernel/connector_model.h +++ b/nestkernel/connector_model.h @@ -188,12 +188,12 @@ class GenericConnectorModel : public ConnectorModel bool requires_clopath_archiving, bool requires_urbanczik_archiving ) : ConnectorModel( name, - is_primary, - has_delay, - requires_symmetric, - supports_wfr, - requires_clopath_archiving, - requires_urbanczik_archiving ) + is_primary, + has_delay, + requires_symmetric, + supports_wfr, + requires_clopath_archiving, + requires_urbanczik_archiving ) , receptor_type_( 0 ) { } @@ -283,12 +283,12 @@ class GenericSecondaryConnectorModel : public GenericConnectorModel< ConnectionT const bool requires_symmetric, const bool supports_wfr ) : GenericConnectorModel< ConnectionT >( name, - /*is _primary=*/false, - has_delay, - requires_symmetric, - supports_wfr, - /*requires_clopath_archiving=*/false, - /*requires_urbanczik_archiving=*/false ) + /*is _primary=*/false, + has_delay, + requires_symmetric, + supports_wfr, + /*requires_clopath_archiving=*/false, + /*requires_urbanczik_archiving=*/false ) , pev_( 0 ) { pev_ = new typename ConnectionT::EventType(); diff --git a/nestkernel/deprecation_warning.h b/nestkernel/deprecation_warning.h index 913980f879..6ae62ee7fa 100644 --- a/nestkernel/deprecation_warning.h +++ b/nestkernel/deprecation_warning.h @@ -21,9 +21,9 @@ */ // C++ includes: -#include -#include #include +#include +#include #ifndef DEPRECATION_WARNING_H #define DEPRECATION_WARNING_H diff --git a/nestkernel/dynamicloader.cpp b/nestkernel/dynamicloader.cpp index 9b3eb5a8b1..1edb018818 100644 --- a/nestkernel/dynamicloader.cpp +++ b/nestkernel/dynamicloader.cpp @@ -61,14 +61,16 @@ struct sDynModule lt_dlhandle handle; SLIModule* pModule; - bool operator==( const sDynModule& rhs ) const + bool + operator==( const sDynModule& rhs ) const { return name == rhs.name; } // operator!= must be implemented explicitly, not all compilers // generate it automatically from operator== - bool operator!=( const sDynModule& rhs ) const + bool + operator!=( const sDynModule& rhs ) const { return not( *this == rhs ); } diff --git a/nestkernel/event.cpp b/nestkernel/event.cpp index d28e0fb3a5..cb18286e99 100644 --- a/nestkernel/event.cpp +++ b/nestkernel/event.cpp @@ -51,72 +51,86 @@ Event::Event() } -void SpikeEvent::operator()() +void +SpikeEvent::operator()() { receiver_->handle( *this ); } -void WeightRecorderEvent::operator()() +void +WeightRecorderEvent::operator()() { receiver_->handle( *this ); } -void DSSpikeEvent::operator()() +void +DSSpikeEvent::operator()() { sender_->event_hook( *this ); } -void RateEvent::operator()() +void +RateEvent::operator()() { receiver_->handle( *this ); } -void CurrentEvent::operator()() +void +CurrentEvent::operator()() { receiver_->handle( *this ); } -void DSCurrentEvent::operator()() +void +DSCurrentEvent::operator()() { sender_->event_hook( *this ); } -void ConductanceEvent::operator()() +void +ConductanceEvent::operator()() { receiver_->handle( *this ); } -void DoubleDataEvent::operator()() +void +DoubleDataEvent::operator()() { receiver_->handle( *this ); } -void DataLoggingRequest::operator()() +void +DataLoggingRequest::operator()() { receiver_->handle( *this ); } -void DataLoggingReply::operator()() +void +DataLoggingReply::operator()() { receiver_->handle( *this ); } -void GapJunctionEvent::operator()() +void +GapJunctionEvent::operator()() { receiver_->handle( *this ); } -void InstantaneousRateConnectionEvent::operator()() +void +InstantaneousRateConnectionEvent::operator()() { receiver_->handle( *this ); } -void DelayedRateConnectionEvent::operator()() +void +DelayedRateConnectionEvent::operator()() { receiver_->handle( *this ); } -void DiffusionConnectionEvent::operator()() +void +DiffusionConnectionEvent::operator()() { receiver_->handle( *this ); } diff --git a/nestkernel/event.h b/nestkernel/event.h index e79eeb38dc..2da8eee3db 100644 --- a/nestkernel/event.h +++ b/nestkernel/event.h @@ -24,9 +24,9 @@ #define EVENT_H // C++ includes: +#include #include #include -#include #include // Includes from nestkernel: @@ -248,12 +248,12 @@ class Event /** * Set drift_factor of the event (see DiffusionConnectionEvent). */ - virtual void set_drift_factor( weight ){}; + virtual void set_drift_factor( weight ) {}; /** * Set diffusion_factor of the event (see DiffusionConnectionEvent). */ - virtual void set_diffusion_factor( weight ){}; + virtual void set_diffusion_factor( weight ) {}; /** * Returns true if the pointer to the sender node is valid. @@ -967,22 +967,20 @@ class DataSecondaryEvent : public SecondaryEvent static std::vector< synindex > supported_syn_ids_; static size_t coeff_length_; // length of coeffarray - union CoeffarrayBegin - { + union CoeffarrayBegin { std::vector< unsigned int >::iterator as_uint; typename std::vector< DataType >::iterator as_d; - CoeffarrayBegin(){}; // need to provide default constructor due to - // non-trivial constructors of iterators + CoeffarrayBegin() {}; // need to provide default constructor due to + // non-trivial constructors of iterators } coeffarray_begin_; - union CoeffarrayEnd - { + union CoeffarrayEnd { std::vector< unsigned int >::iterator as_uint; typename std::vector< DataType >::iterator as_d; - CoeffarrayEnd(){}; // need to provide default constructor due to - // non-trivial constructors of iterators + CoeffarrayEnd() {}; // need to provide default constructor due to + // non-trivial constructors of iterators } coeffarray_end_; public: @@ -1062,7 +1060,8 @@ class DataSecondaryEvent : public SecondaryEvent * The following operator is used to read the information of the * DataSecondaryEvent from the buffer in EventDeliveryManager::deliver_events */ - std::vector< unsigned int >::iterator& operator<<( std::vector< unsigned int >::iterator& pos ) + std::vector< unsigned int >::iterator& + operator<<( std::vector< unsigned int >::iterator& pos ) { // The synid can be skipped here as it is stored in a static vector @@ -1083,7 +1082,8 @@ class DataSecondaryEvent : public SecondaryEvent * All DataSecondaryEvents are identified by the synid of the * first element in supported_syn_ids_. */ - std::vector< unsigned int >::iterator& operator>>( std::vector< unsigned int >::iterator& pos ) + std::vector< unsigned int >::iterator& + operator>>( std::vector< unsigned int >::iterator& pos ) { for ( typename std::vector< DataType >::iterator it = coeffarray_begin_.as_d; it != coeffarray_end_.as_d; ++it ) { diff --git a/nestkernel/event_delivery_manager.h b/nestkernel/event_delivery_manager.h index fe32df490d..f7ca06d4a6 100644 --- a/nestkernel/event_delivery_manager.h +++ b/nestkernel/event_delivery_manager.h @@ -39,8 +39,8 @@ #include "nest_types.h" #include "node.h" #include "per_thread_bool_indicator.h" -#include "target_table.h" #include "spike_data.h" +#include "target_table.h" #include "vp_manager.h" // Includes from sli: @@ -456,10 +456,10 @@ EventDeliveryManager::reset_spike_register_( const thread tid ) } } - for ( - std::vector< std::vector< std::vector< OffGridTarget > > >::iterator it = off_grid_spike_register_[ tid ].begin(); - it < off_grid_spike_register_[ tid ].end(); - ++it ) + for ( std::vector< std::vector< std::vector< OffGridTarget > > >::iterator it = + off_grid_spike_register_[ tid ].begin(); + it < off_grid_spike_register_[ tid ].end(); + ++it ) { for ( std::vector< std::vector< OffGridTarget > >::iterator iit = it->begin(); iit < it->end(); ++iit ) { @@ -487,10 +487,10 @@ EventDeliveryManager::clean_spike_register_( const thread tid ) iit->erase( new_end, iit->end() ); } } - for ( - std::vector< std::vector< std::vector< OffGridTarget > > >::iterator it = off_grid_spike_register_[ tid ].begin(); - it < off_grid_spike_register_[ tid ].end(); - ++it ) + for ( std::vector< std::vector< std::vector< OffGridTarget > > >::iterator it = + off_grid_spike_register_[ tid ].begin(); + it < off_grid_spike_register_[ tid ].end(); + ++it ) { for ( std::vector< std::vector< OffGridTarget > >::iterator iit = it->begin(); iit < it->end(); ++iit ) { diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp index 2e8f770e57..4820e87dce 100644 --- a/nestkernel/exceptions.cpp +++ b/nestkernel/exceptions.cpp @@ -132,7 +132,8 @@ nest::NodeWithProxiesExpected::message() const { std::ostringstream out; out << "Nest expected a node with proxies (eg normal model neuron)," - "but the node with id " << id_ << " is not a node without proxies, e.g., a device."; + "but the node with id " + << id_ << " is not a node without proxies, e.g., a device."; return out.str(); } diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h index b9cba49b54..67c04d5805 100644 --- a/nestkernel/exceptions.h +++ b/nestkernel/exceptions.h @@ -715,8 +715,8 @@ class InvalidTimeInModel : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. * @param model name of model causing problem * @param property name of property conflicting * @param value value of property conflicting @@ -749,8 +749,8 @@ class StepMultipleRequired : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. * @param model name of model causing problem * @param property name of property conflicting * @param value value of property conflicting @@ -783,8 +783,8 @@ class TimeMultipleRequired : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. * @param model name of model causing problem * @param name_a name of dividend * @param value_a value of dividend @@ -826,11 +826,11 @@ class GSLSolverFailure : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. - * @param model name of model causing problem - * @param status exit status of the GSL solver - */ + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. + * @param model name of model causing problem + * @param status exit status of the GSL solver + */ GSLSolverFailure( const std::string& model, const int status ) : KernelException( "GSLSolverFailure" ) , model_( model ) @@ -904,7 +904,7 @@ class KeyError : public KernelException /** * Exception to be thrown if an internal error occures. * @ingroup KernelExceptions -*/ + */ class InternalError : public KernelException { std::string msg_; @@ -940,8 +940,8 @@ class MUSICPortUnconnected : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. * @param model name of model causing problem * @param portname name of MUSIC port */ @@ -971,8 +971,8 @@ class MUSICPortHasNoWidth : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. * @param model name of model causing problem * @param portname name of music port */ @@ -1025,16 +1025,16 @@ class MUSICPortAlreadyPublished : public KernelException }; /** -* Exception to be thrown if the user tries to change the name of an already -* published port. -* @ingroup KernelExceptions -*/ + * Exception to be thrown if the user tries to change the name of an already + * published port. + * @ingroup KernelExceptions + */ class MUSICSimulationHasRun : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. * @param model name of model causing problem */ MUSICSimulationHasRun( const std::string& model ) @@ -1062,8 +1062,8 @@ class MUSICChannelUnknown : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. * @param model name of model causing problem */ MUSICChannelUnknown( const std::string& model, const std::string& portname, int channel ) @@ -1117,8 +1117,8 @@ class MUSICChannelAlreadyMapped : public KernelException { public: /** - * @note model should be passed from get_name() to ensure that - * names of copied models are reported correctly. + * @note model should be passed from get_name() to ensure that + * names of copied models are reported correctly. * @param model name of model causing problem */ MUSICChannelAlreadyMapped( const std::string& model, const std::string& portname, int channel ) diff --git a/nestkernel/growth_curve.h b/nestkernel/growth_curve.h index acfdb27d25..a6518219cc 100644 --- a/nestkernel/growth_curve.h +++ b/nestkernel/growth_curve.h @@ -31,8 +31,8 @@ */ // Includes from nestkernel: -#include "nest_types.h" #include "exceptions.h" +#include "nest_types.h" #include "dictionary.h" diff --git a/nestkernel/logging_manager.h b/nestkernel/logging_manager.h index ef51372555..e4a3bbd983 100644 --- a/nestkernel/logging_manager.h +++ b/nestkernel/logging_manager.h @@ -28,9 +28,9 @@ #include // Includes from libnestutil: +#include "dictionary.h" #include "logging.h" #include "manager_interface.h" -#include "dictionary.h" // Includes from sli: #include "dictdatum.h" diff --git a/nestkernel/manager_interface.h b/nestkernel/manager_interface.h index cbd2b22656..7ec7747243 100644 --- a/nestkernel/manager_interface.h +++ b/nestkernel/manager_interface.h @@ -99,13 +99,13 @@ class ManagerInterface * and allows the manager to re-allocate data structures * accordingly. */ - virtual void change_num_threads( thread ){}; + virtual void change_num_threads( thread ) {}; virtual void set_status( const dictionary& ) = 0; virtual void get_status( dictionary& ) = 0; - virtual void prepare(){}; - virtual void cleanup(){}; + virtual void prepare() {}; + virtual void cleanup() {}; }; } diff --git a/nestkernel/mpi_manager.h b/nestkernel/mpi_manager.h index 1f3f226830..76d4c1ca4f 100644 --- a/nestkernel/mpi_manager.h +++ b/nestkernel/mpi_manager.h @@ -370,8 +370,8 @@ class MPIManager : public ManagerInterface //!< rank will be written std::vector< int > send_displacements_secondary_events_in_int_per_rank_; //!< offset in the MPI send buffer (in ints) -//!< from which elements send to each rank will -//!< be read + //!< from which elements send to each rank will + //!< be read #ifdef HAVE_MPI //! array containing communication partner for each step. @@ -569,16 +569,16 @@ MPIManager::get_send_recv_count_spike_data_per_rank() const inline size_t MPIManager::get_send_buffer_size_secondary_events_in_int() const { - return send_displacements_secondary_events_in_int_per_rank_[ send_displacements_secondary_events_in_int_per_rank_ - .size() - 1 ] + return send_displacements_secondary_events_in_int_per_rank_ + [ send_displacements_secondary_events_in_int_per_rank_.size() - 1 ] + send_counts_secondary_events_in_int_per_rank_[ send_counts_secondary_events_in_int_per_rank_.size() - 1 ]; } inline size_t MPIManager::get_recv_buffer_size_secondary_events_in_int() const { - return recv_displacements_secondary_events_in_int_per_rank_[ recv_displacements_secondary_events_in_int_per_rank_ - .size() - 1 ] + return recv_displacements_secondary_events_in_int_per_rank_ + [ recv_displacements_secondary_events_in_int_per_rank_.size() - 1 ] + recv_counts_secondary_events_in_int_per_rank_[ recv_counts_secondary_events_in_int_per_rank_.size() - 1 ]; } diff --git a/nestkernel/music_event_handler.cpp b/nestkernel/music_event_handler.cpp index 9728f8ab10..d15c60be1e 100644 --- a/nestkernel/music_event_handler.cpp +++ b/nestkernel/music_event_handler.cpp @@ -142,7 +142,8 @@ MusicEventHandler::publish_port() } } -void MusicEventHandler::operator()( double t, MUSIC::GlobalIndex channel ) +void +MusicEventHandler::operator()( double t, MUSIC::GlobalIndex channel ) { assert( channelmap_[ channel ] != 0 ); eventqueue_[ channel ].push( t * 1e3 ); // MUSIC uses seconds as time unit diff --git a/nestkernel/nest_datums.h b/nestkernel/nest_datums.h index 62e018d0ca..284d5afa5e 100644 --- a/nestkernel/nest_datums.h +++ b/nestkernel/nest_datums.h @@ -31,10 +31,10 @@ #include "connection_id.h" #include "node_collection.h" -#include "nestmodule.h" #include "event.h" #include "exceptions.h" #include "generic_factory.h" +#include "nestmodule.h" #include "ntree.h" #include "parameter.h" #include "position.h" diff --git a/nestkernel/nest_time.cpp b/nestkernel/nest_time.cpp index 1aa0b2da40..98902d6a8d 100644 --- a/nestkernel/nest_time.cpp +++ b/nestkernel/nest_time.cpp @@ -198,7 +198,8 @@ Time::reset_to_defaults() Range::STEPS_PER_MS = 1 / Range::MS_PER_STEP; } -std::ostream& operator<<( std::ostream& strm, const Time& t ) +std::ostream& +operator<<( std::ostream& strm, const Time& t ) { if ( t.is_neg_inf() ) { diff --git a/nestkernel/nest_time.h b/nestkernel/nest_time.h index 25798d03de..8358f16f06 100644 --- a/nestkernel/nest_time.h +++ b/nestkernel/nest_time.h @@ -197,7 +197,7 @@ class Time friend Time operator-( const Time& t1, const Time& t2 ); friend Time operator*( const long factor, const Time& t ); friend Time operator*( const Time& t, long factor ); - friend std::ostream&(::operator<<)( std::ostream&, const Time& ); + friend std::ostream&( ::operator<<)( std::ostream&, const Time& ); ///////////////////////////////////////////////////////////// // Limits for time, including infinity definitions @@ -247,7 +247,7 @@ class Time { tic_t t; explicit tic( tic_t t ) - : t( t ){}; + : t( t ) {}; }; struct step @@ -269,7 +269,7 @@ class Time static double fromtoken( const Token& t ); explicit ms( const Token& t ) - : t( fromtoken( t ) ){}; + : t( fromtoken( t ) ) {}; }; struct ms_stamp @@ -295,7 +295,7 @@ class Time public: Time() - : tics( 0 ){}; + : tics( 0 ) {}; // Default copy constructor: assumes legal time object // Defined by compiler. @@ -307,8 +307,8 @@ class Time } Time( step t ) - : tics( ( time_abs( t.t ) < LIM_MAX.steps ) ? t.t * Range::TICS_PER_STEP : ( t.t < 0 ) ? LIM_NEG_INF.tics - : LIM_POS_INF.tics ) + : tics( ( time_abs( t.t ) < LIM_MAX.steps ) ? t.t * Range::TICS_PER_STEP + : ( t.t < 0 ) ? LIM_NEG_INF.tics : LIM_POS_INF.tics ) { } @@ -476,7 +476,8 @@ class Time // Unary operators ///////////////////////////////////////////////////////////// - Time& operator+=( const Time& t ) + Time& + operator+=( const Time& t ) { tics += t.tics; range(); @@ -566,42 +567,50 @@ const Time TimeZero; // Binary operators ///////////////////////////////////////////////////////////// -inline bool operator==( const Time& t1, const Time& t2 ) +inline bool +operator==( const Time& t1, const Time& t2 ) { return t1.tics == t2.tics; } -inline bool operator!=( const Time& t1, const Time& t2 ) +inline bool +operator!=( const Time& t1, const Time& t2 ) { return t1.tics != t2.tics; } -inline bool operator<( const Time& t1, const Time& t2 ) +inline bool +operator<( const Time& t1, const Time& t2 ) { return t1.tics < t2.tics; } -inline bool operator>( const Time& t1, const Time& t2 ) +inline bool +operator>( const Time& t1, const Time& t2 ) { return t1.tics > t2.tics; } -inline bool operator<=( const Time& t1, const Time& t2 ) +inline bool +operator<=( const Time& t1, const Time& t2 ) { return t1.tics <= t2.tics; } -inline bool operator>=( const Time& t1, const Time& t2 ) +inline bool +operator>=( const Time& t1, const Time& t2 ) { return t1.tics >= t2.tics; } -inline Time operator+( const Time& t1, const Time& t2 ) +inline Time +operator+( const Time& t1, const Time& t2 ) { return Time::tic( t1.tics + t2.tics ); // check range } -inline Time operator-( const Time& t1, const Time& t2 ) +inline Time +operator-( const Time& t1, const Time& t2 ) { return Time::tic( t1.tics - t2.tics ); // check range } diff --git a/nestkernel/nestmodule.h b/nestkernel/nestmodule.h index ca2e3c1b30..ebe6c439cb 100644 --- a/nestkernel/nestmodule.h +++ b/nestkernel/nestmodule.h @@ -33,10 +33,10 @@ // Includes from sli: #include "dict.h" +#include "sharedptrdatum.h" #include "slifunction.h" #include "slimodule.h" #include "slitype.h" -#include "sharedptrdatum.h" namespace nest diff --git a/nestkernel/node.h b/nestkernel/node.h index 00f95b10ec..b9b87d8667 100644 --- a/nestkernel/node.h +++ b/nestkernel/node.h @@ -631,14 +631,14 @@ class Node * @param t double time when the update is being performed * @ingroup SP_functions */ - virtual void update_synaptic_elements( double ){}; + virtual void update_synaptic_elements( double ) {}; /** * Is used to reduce the number of synaptic elements in the node through * time. This amount is defined by tau_vacant. * @ingroup SP_functions */ - virtual void decay_synaptic_elements_vacant(){}; + virtual void decay_synaptic_elements_vacant() {}; /** * Is used to update the number of connected @@ -648,7 +648,7 @@ class Node * @param n int number of new connections of the given type * @ingroup SP_functions */ - virtual void connect_synaptic_element( Name, int ){}; + virtual void connect_synaptic_element( Name, int ) {}; /** * return the Kminus value at t (in ms). @@ -666,9 +666,9 @@ class Node virtual void get_K_values( double t, double& Kminus, double& nearest_neighbor_Kminus, double& Kminus_triplet ); /** - * return the spike history for (t1,t2]. - * @throws UnexpectedEvent - */ + * return the spike history for (t1,t2]. + * @throws UnexpectedEvent + */ virtual void get_history( double t1, double t2, std::deque< histentry >::iterator* start, diff --git a/nestkernel/node_collection.cpp b/nestkernel/node_collection.cpp index 99e171350e..c6df568b3a 100644 --- a/nestkernel/node_collection.cpp +++ b/nestkernel/node_collection.cpp @@ -22,8 +22,8 @@ #include "node_collection.h" #include "kernel_manager.h" -#include "vp_manager_impl.h" #include "mpi_manager_impl.h" +#include "vp_manager_impl.h" // C++ includes: @@ -37,12 +37,14 @@ namespace nest // function object for sorting a vector of NodeCollectionPrimitives struct PrimitiveSortObject { - bool operator()( NodeCollectionPrimitive& primitive_lhs, NodeCollectionPrimitive& primitive_rhs ) + bool + operator()( NodeCollectionPrimitive& primitive_lhs, NodeCollectionPrimitive& primitive_rhs ) { return primitive_lhs[ 0 ] < primitive_rhs[ 0 ]; } - bool operator()( const NodeCollectionPrimitive& primitive_lhs, const NodeCollectionPrimitive& primitive_rhs ) + bool + operator()( const NodeCollectionPrimitive& primitive_lhs, const NodeCollectionPrimitive& primitive_rhs ) { return primitive_lhs[ 0 ] < primitive_rhs[ 0 ]; } @@ -84,7 +86,7 @@ nc_const_iterator::nc_const_iterator( NodeCollectionPTR collection_ptr, if ( ( part >= collection.parts_.size() or offset >= collection.parts_[ part ].size() ) and not( part == collection.parts_.size() and offset == 0 ) // end iterator - ) + ) { throw KernelException( "Invalid part or offset into NodeCollectionComposite" ); } @@ -97,7 +99,8 @@ nc_const_iterator::print_me( std::ostream& out ) const << ", ex: " << element_idx_ << "]]"; } -NodeCollectionPTR operator+( NodeCollectionPTR lhs, NodeCollectionPTR rhs ) +NodeCollectionPTR +operator+( NodeCollectionPTR lhs, NodeCollectionPTR rhs ) { return lhs->operator+( rhs ); } @@ -294,7 +297,8 @@ NodeCollectionPrimitive::to_array() const return node_ids; } -NodeCollectionPTR NodeCollectionPrimitive::operator+( NodeCollectionPTR rhs ) const +NodeCollectionPTR +NodeCollectionPrimitive::operator+( NodeCollectionPTR rhs ) const { if ( not valid() or not rhs->valid() ) { @@ -586,7 +590,8 @@ NodeCollectionComposite::NodeCollectionComposite( const NodeCollectionComposite& } } -NodeCollectionPTR NodeCollectionComposite::operator+( NodeCollectionPTR rhs ) const +NodeCollectionPTR +NodeCollectionComposite::operator+( NodeCollectionPTR rhs ) const { if ( rhs->empty() ) { @@ -627,7 +632,7 @@ NodeCollectionPTR NodeCollectionComposite::operator+( NodeCollectionPTR rhs ) co } // check overlap between the two composites - const NodeCollectionComposite* shortest, *longest; + const NodeCollectionComposite *shortest, *longest; if ( size() < rhs_ptr->size() ) { shortest = this; @@ -670,7 +675,8 @@ NodeCollectionPTR NodeCollectionComposite::operator+( NodeCollectionPTR rhs ) co } } -NodeCollectionPTR NodeCollectionComposite::operator+( const NodeCollectionPrimitive& rhs ) const +NodeCollectionPTR +NodeCollectionComposite::operator+( const NodeCollectionPrimitive& rhs ) const { if ( get_metadata().get() and not( get_metadata() == rhs.get_metadata() ) ) { @@ -883,10 +889,7 @@ NodeCollectionComposite::find( const index node_id ) const } else { - auto size_accu = []( long a, const NodeCollectionPrimitive& b ) - { - return a + b.size(); - }; + auto size_accu = []( long a, const NodeCollectionPrimitive& b ) { return a + b.size(); }; long sum_pre = std::accumulate( parts_.begin(), parts_.begin() + middle, ( long ) 0, size_accu ); return sum_pre + parts_[ middle ].find( node_id ); } diff --git a/nestkernel/node_collection.h b/nestkernel/node_collection.h index 12f264df17..b343fdea88 100644 --- a/nestkernel/node_collection.h +++ b/nestkernel/node_collection.h @@ -25,14 +25,14 @@ // C++ includes: #include +#include #include #include // out_of_range #include -#include // Includes from libnestuil: -#include "lockptr.h" #include "dictionary.h" +#include "lockptr.h" // Includes from nestkernel: #include "exceptions.h" @@ -91,9 +91,9 @@ class NodeCollectionMetadata class NodeIDTriple { public: - index node_id{ 0 }; - index model_id{ 0 }; - size_t lid{ 0 }; + index node_id { 0 }; + index model_id { 0 }; + size_t lid { 0 }; NodeIDTriple() = default; }; @@ -525,21 +525,21 @@ class NodeCollectionComposite : public NodeCollection NodeCollectionComposite( const NodeCollectionPrimitive&, size_t, size_t, size_t ); /** - * Composite copy constructor. - * - * @param comp Composite to be copied. - */ + * Composite copy constructor. + * + * @param comp Composite to be copied. + */ NodeCollectionComposite( const NodeCollectionComposite& ); /** - * Creates a new composite from another, with boundaries and step length. - * This constructor is used only when slicing. - * - * @param composite Composite to slice. - * @param start Index in the composite to begin at. - * @param stop Index in the composite to stop at. - * @param step Length to step in the composite. - */ + * Creates a new composite from another, with boundaries and step length. + * This constructor is used only when slicing. + * + * @param composite Composite to slice. + * @param start Index in the composite to begin at. + * @param stop Index in the composite to stop at. + * @param step Length to step in the composite. + */ NodeCollectionComposite( const NodeCollectionComposite&, size_t, size_t, size_t ); /** @@ -591,7 +591,8 @@ class NodeCollectionComposite : public NodeCollection long find( const index ) const override; }; -inline bool NodeCollection::operator!=( NodeCollectionPTR rhs ) const +inline bool +NodeCollection::operator!=( NodeCollectionPTR rhs ) const { return not( *this == rhs ); } @@ -622,7 +623,7 @@ inline NodeIDTriple nc_const_iterator::operator*() const { if ( not( part_idx_ < composite_collection_->stop_part_ or ( part_idx_ == composite_collection_->stop_part_ - and element_idx_ < composite_collection_->stop_offset_ ) ) ) + and element_idx_ < composite_collection_->stop_offset_ ) ) ) { throw KernelException( "Invalid NodeCollection iterator (composite element beyond specified stop element)" ); } @@ -655,7 +656,8 @@ inline NodeIDTriple nc_const_iterator::operator*() const return gt; } -inline nc_const_iterator& nc_const_iterator::operator++() +inline nc_const_iterator& +nc_const_iterator::operator++() { if ( primitive_collection_ ) { @@ -700,7 +702,8 @@ inline nc_const_iterator& nc_const_iterator::operator++() return *this; } -inline nc_const_iterator& nc_const_iterator::operator+=( const size_t n ) +inline nc_const_iterator& +nc_const_iterator::operator+=( const size_t n ) { if ( primitive_collection_ ) { @@ -716,23 +719,27 @@ inline nc_const_iterator& nc_const_iterator::operator+=( const size_t n ) return *this; } -inline nc_const_iterator nc_const_iterator::operator+( const size_t n ) const +inline nc_const_iterator +nc_const_iterator::operator+( const size_t n ) const { nc_const_iterator it = *this; return it += n; } -inline bool nc_const_iterator::operator!=( const nc_const_iterator& rhs ) const +inline bool +nc_const_iterator::operator!=( const nc_const_iterator& rhs ) const { return not( part_idx_ == rhs.part_idx_ and element_idx_ == rhs.element_idx_ ); } -inline bool nc_const_iterator::operator<( const nc_const_iterator& rhs ) const +inline bool +nc_const_iterator::operator<( const nc_const_iterator& rhs ) const { return ( part_idx_ < rhs.part_idx_ or ( part_idx_ == rhs.part_idx_ and element_idx_ < rhs.element_idx_ ) ); } -inline bool nc_const_iterator::operator<=( const nc_const_iterator& rhs ) const +inline bool +nc_const_iterator::operator<=( const nc_const_iterator& rhs ) const { return ( part_idx_ < rhs.part_idx_ or ( part_idx_ == rhs.part_idx_ and element_idx_ <= rhs.element_idx_ ) ); } @@ -754,7 +761,8 @@ inline index NodeCollectionPrimitive::operator[]( const size_t idx ) const return first_ + idx; } -inline bool NodeCollectionPrimitive::operator==( NodeCollectionPTR rhs ) const +inline bool +NodeCollectionPrimitive::operator==( NodeCollectionPTR rhs ) const { auto const* const rhs_ptr = dynamic_cast< NodeCollectionPrimitive const* >( rhs.get() ); // Checking that rhs_ptr is valid first, to avoid segfaults. If rhs is a NodeCollectionComposite, @@ -772,7 +780,8 @@ inline bool NodeCollectionPrimitive::operator==( NodeCollectionPTR rhs ) const return first_ == rhs_ptr->first_ and last_ == rhs_ptr->last_ and model_id_ == rhs_ptr->model_id_ and eq_metadata; } -inline bool NodeCollectionPrimitive::operator==( const NodeCollectionPrimitive& rhs ) const +inline bool +NodeCollectionPrimitive::operator==( const NodeCollectionPrimitive& rhs ) const { // Not dereferencing rhs_ptr->metadata_ in the equality comparison because we want to avoid overloading // operator==() of *metadata_, and to let it handle typechecking. @@ -873,7 +882,8 @@ inline index NodeCollectionComposite::operator[]( const size_t i ) const } -inline bool NodeCollectionComposite::operator==( NodeCollectionPTR rhs ) const +inline bool +NodeCollectionComposite::operator==( NodeCollectionPTR rhs ) const { auto const* const rhs_ptr = dynamic_cast< NodeCollectionComposite const* >( rhs.get() ); diff --git a/nestkernel/node_manager.h b/nestkernel/node_manager.h index 7fce635e8a..1221a4a9b6 100644 --- a/nestkernel/node_manager.h +++ b/nestkernel/node_manager.h @@ -32,8 +32,8 @@ // Includes from nestkernel: #include "conn_builder.h" -#include "node_collection.h" #include "nest_types.h" +#include "node_collection.h" #include "sparse_node_array.h" // Includes from sli: @@ -294,7 +294,7 @@ class NodeManager : public ManagerInterface /** * The network as sparse array of local nodes. One entry per thread, * which contains only the thread-local nodes. - */ + */ std::vector< SparseNodeArray > local_nodes_; std::vector< std::vector< Node* > > wfr_nodes_vec_; //!< Nodelists for unfrozen nodes that diff --git a/nestkernel/ntree.h b/nestkernel/ntree.h index e098bd9930..c9752a912d 100644 --- a/nestkernel/ntree.h +++ b/nestkernel/ntree.h @@ -25,9 +25,9 @@ // C++ includes: #include +#include #include #include -#include // Includes from spatial: #include "position.h" @@ -108,7 +108,8 @@ class Ntree /** * Postfix increment operator. */ - iterator operator++( int ) + iterator + operator++( int ) { iterator tmp = *this; ++*this; @@ -119,11 +120,13 @@ class Ntree * Iterators are equal if they point to the same node in the same * ntree. */ - bool operator==( const iterator& other ) const + bool + operator==( const iterator& other ) const { return ( other.ntree_ == ntree_ ) && ( other.node_ == node_ ); } - bool operator!=( const iterator& other ) const + bool + operator!=( const iterator& other ) const { return ( other.ntree_ != ntree_ ) || ( other.node_ != node_ ); } @@ -132,7 +135,7 @@ class Ntree /** * Move to the next leaf quadrant, or set ntree_ to 0 if there are no * more leaves. - */ + */ void next_leaf_(); Ntree* ntree_; @@ -188,7 +191,8 @@ class Ntree /** * Postfix increment operator. */ - masked_iterator operator++( int ) + masked_iterator + operator++( int ) { masked_iterator tmp = *this; ++*this; @@ -199,11 +203,13 @@ class Ntree * Iterators are equal if they point to the same node in the same * ntree. */ - bool operator==( const masked_iterator& other ) const + bool + operator==( const masked_iterator& other ) const { return ( other.ntree_ == ntree_ ) && ( other.node_ == node_ ); } - bool operator!=( const masked_iterator& other ) const + bool + operator!=( const masked_iterator& other ) const { return ( other.ntree_ != ntree_ ) || ( other.node_ != node_ ); } diff --git a/nestkernel/ntree_impl.h b/nestkernel/ntree_impl.h index 722544402a..42400f29f4 100644 --- a/nestkernel/ntree_impl.h +++ b/nestkernel/ntree_impl.h @@ -57,8 +57,8 @@ Ntree< D, T, max_capacity, max_depth >::iterator::iterator( Ntree& q ) } template < int D, class T, int max_capacity, int max_depth > -typename Ntree< D, T, max_capacity, max_depth >::iterator& Ntree< D, T, max_capacity, max_depth >::iterator:: -operator++() +typename Ntree< D, T, max_capacity, max_depth >::iterator& +Ntree< D, T, max_capacity, max_depth >::iterator::operator++() { node_++; @@ -142,8 +142,9 @@ Ntree< D, T, max_capacity, max_depth >::masked_iterator::masked_iterator( Ntree< { if ( ntree_->periodic_[ i ] ) { - anchor_[ i ] = nest::mod( anchor_[ i ] + mask_bb.lower_left[ i ] - ntree_->lower_left_[ i ], - ntree_->extent_[ i ] ) - mask_bb.lower_left[ i ] + ntree_->lower_left_[ i ]; + anchor_[ i ] = + nest::mod( anchor_[ i ] + mask_bb.lower_left[ i ] - ntree_->lower_left_[ i ], ntree_->extent_[ i ] ) + - mask_bb.lower_left[ i ] + ntree_->lower_left_[ i ]; } } anchors_.push_back( anchor_ ); @@ -349,8 +350,7 @@ Ntree< D, T, max_capacity, max_depth >::masked_iterator::first_leaf_inside_() template < int D, class T, int max_capacity, int max_depth > typename Ntree< D, T, max_capacity, max_depth >::masked_iterator& - Ntree< D, T, max_capacity, max_depth >::masked_iterator:: - operator++() +Ntree< D, T, max_capacity, max_depth >::masked_iterator::operator++() { ++node_; diff --git a/nestkernel/per_thread_bool_indicator.h b/nestkernel/per_thread_bool_indicator.h index 54bbc24557..5eca3e007a 100644 --- a/nestkernel/per_thread_bool_indicator.h +++ b/nestkernel/per_thread_bool_indicator.h @@ -102,7 +102,7 @@ BoolIndicatorUInt64::logical_and( const bool status ) class PerThreadBoolIndicator { public: - PerThreadBoolIndicator(){}; + PerThreadBoolIndicator() {}; BoolIndicatorUInt64& operator[]( const thread tid ); diff --git a/nestkernel/position.h b/nestkernel/position.h index 3ef374b3a4..d7bab36502 100644 --- a/nestkernel/position.h +++ b/nestkernel/position.h @@ -354,7 +354,8 @@ class MultiIndex : public Position< D, int > { } - MultiIndex& operator++() + MultiIndex& + operator++() { // Try increasing the first coordinate first, resetting it and // continuing with the next if the first one overflows, and so on @@ -377,7 +378,8 @@ class MultiIndex : public Position< D, int > return *this; } - MultiIndex operator++( int ) + MultiIndex + operator++( int ) { MultiIndex tmp = *this; ++*this; @@ -463,7 +465,8 @@ inline Position< D, T >::Position( Position&& other ) } template < int D, class T > -inline Position< D, T >& Position< D, T >::operator=( const std::vector< T >& y ) +inline Position< D, T >& +Position< D, T >::operator=( const std::vector< T >& y ) { if ( y.size() != D ) { @@ -513,7 +516,8 @@ Position< D, T >::get_vector( std::vector< T >& vector ) const template < int D, class T > template < class OT > -inline Position< D, T > Position< D, T >::operator+( const Position< D, OT >& other ) const +inline Position< D, T > +Position< D, T >::operator+( const Position< D, OT >& other ) const { Position p = *this; p += other; @@ -522,7 +526,8 @@ inline Position< D, T > Position< D, T >::operator+( const Position< D, OT >& ot template < int D, class T > template < class OT > -inline Position< D, T > Position< D, T >::operator-( const Position< D, OT >& other ) const +inline Position< D, T > +Position< D, T >::operator-( const Position< D, OT >& other ) const { Position p = *this; p -= other; @@ -530,7 +535,8 @@ inline Position< D, T > Position< D, T >::operator-( const Position< D, OT >& ot } template < int D, class T > -inline Position< D, T > Position< D, T >::operator-() const +inline Position< D, T > +Position< D, T >::operator-() const { Position p; p -= *this; @@ -548,7 +554,8 @@ inline Position< D, T > Position< D, T >::operator*( const Position< D, OT >& ot template < int D, class T > template < class OT > -inline Position< D, T > Position< D, T >::operator/( const Position< D, OT >& other ) const +inline Position< D, T > +Position< D, T >::operator/( const Position< D, OT >& other ) const { Position p = *this; p /= other; @@ -556,7 +563,8 @@ inline Position< D, T > Position< D, T >::operator/( const Position< D, OT >& ot } template < int D, class T > -inline Position< D, T > Position< D, T >::operator+( const T& a ) const +inline Position< D, T > +Position< D, T >::operator+( const T& a ) const { Position p = *this; p += a; @@ -564,7 +572,8 @@ inline Position< D, T > Position< D, T >::operator+( const T& a ) const } template < int D, class T > -inline Position< D, T > Position< D, T >::operator-( const T& a ) const +inline Position< D, T > +Position< D, T >::operator-( const T& a ) const { Position p = *this; p -= a; @@ -580,7 +589,8 @@ inline Position< D, T > Position< D, T >::operator*( const T& a ) const } template < int D, class T > -inline Position< D, T > Position< D, T >::operator/( const T& a ) const +inline Position< D, T > +Position< D, T >::operator/( const T& a ) const { Position p = *this; p /= a; @@ -589,7 +599,8 @@ inline Position< D, T > Position< D, T >::operator/( const T& a ) const template < int D, class T > template < class OT > -inline Position< D, T >& Position< D, T >::operator+=( const Position< D, OT >& other ) +inline Position< D, T >& +Position< D, T >::operator+=( const Position< D, OT >& other ) { for ( int i = 0; i < D; ++i ) { @@ -600,7 +611,8 @@ inline Position< D, T >& Position< D, T >::operator+=( const Position< D, OT >& template < int D, class T > template < class OT > -inline Position< D, T >& Position< D, T >::operator-=( const Position< D, OT >& other ) +inline Position< D, T >& +Position< D, T >::operator-=( const Position< D, OT >& other ) { for ( int i = 0; i < D; ++i ) { @@ -611,7 +623,8 @@ inline Position< D, T >& Position< D, T >::operator-=( const Position< D, OT >& template < int D, class T > template < class OT > -inline Position< D, T >& Position< D, T >::operator*=( const Position< D, OT >& other ) +inline Position< D, T >& +Position< D, T >::operator*=( const Position< D, OT >& other ) { for ( int i = 0; i < D; ++i ) { @@ -622,7 +635,8 @@ inline Position< D, T >& Position< D, T >::operator*=( const Position< D, OT >& template < int D, class T > template < class OT > -inline Position< D, T >& Position< D, T >::operator/=( const Position< D, OT >& other ) +inline Position< D, T >& +Position< D, T >::operator/=( const Position< D, OT >& other ) { for ( int i = 0; i < D; ++i ) { @@ -632,7 +646,8 @@ inline Position< D, T >& Position< D, T >::operator/=( const Position< D, OT >& } template < int D, class T > -inline Position< D, T >& Position< D, T >::operator+=( const T& a ) +inline Position< D, T >& +Position< D, T >::operator+=( const T& a ) { for ( int i = 0; i < D; ++i ) { @@ -642,7 +657,8 @@ inline Position< D, T >& Position< D, T >::operator+=( const T& a ) } template < int D, class T > -inline Position< D, T >& Position< D, T >::operator-=( const T& a ) +inline Position< D, T >& +Position< D, T >::operator-=( const T& a ) { for ( int i = 0; i < D; ++i ) { @@ -652,7 +668,8 @@ inline Position< D, T >& Position< D, T >::operator-=( const T& a ) } template < int D, class T > -inline Position< D, T >& Position< D, T >::operator*=( const T& a ) +inline Position< D, T >& +Position< D, T >::operator*=( const T& a ) { for ( int i = 0; i < D; ++i ) { @@ -662,7 +679,8 @@ inline Position< D, T >& Position< D, T >::operator*=( const T& a ) } template < int D, class T > -inline Position< D, T >& Position< D, T >::operator/=( const T& a ) +inline Position< D, T >& +Position< D, T >::operator/=( const T& a ) { for ( int i = 0; i < D; ++i ) { @@ -672,7 +690,8 @@ inline Position< D, T >& Position< D, T >::operator/=( const T& a ) } template < int D, class T > -inline bool Position< D, T >::operator==( const Position< D, T >& y ) const +inline bool +Position< D, T >::operator==( const Position< D, T >& y ) const { for ( int i = 0; i < D; ++i ) { @@ -685,7 +704,8 @@ inline bool Position< D, T >::operator==( const Position< D, T >& y ) const } template < int D, class T > -inline bool Position< D, T >::operator!=( const Position< D, T >& y ) const +inline bool +Position< D, T >::operator!=( const Position< D, T >& y ) const { for ( int i = 0; i < D; ++i ) { @@ -698,7 +718,8 @@ inline bool Position< D, T >::operator!=( const Position< D, T >& y ) const } template < int D, class T > -inline bool Position< D, T >::operator<( const Position< D, T >& y ) const +inline bool +Position< D, T >::operator<( const Position< D, T >& y ) const { for ( int i = 0; i < D; ++i ) { @@ -711,7 +732,8 @@ inline bool Position< D, T >::operator<( const Position< D, T >& y ) const } template < int D, class T > -inline bool Position< D, T >::operator>( const Position< D, T >& y ) const +inline bool +Position< D, T >::operator>( const Position< D, T >& y ) const { for ( int i = 0; i < D; ++i ) { @@ -724,7 +746,8 @@ inline bool Position< D, T >::operator>( const Position< D, T >& y ) const } template < int D, class T > -inline bool Position< D, T >::operator<=( const Position< D, T >& y ) const +inline bool +Position< D, T >::operator<=( const Position< D, T >& y ) const { for ( int i = 0; i < D; ++i ) { @@ -737,7 +760,8 @@ inline bool Position< D, T >::operator<=( const Position< D, T >& y ) const } template < int D, class T > -inline bool Position< D, T >::operator>=( const Position< D, T >& y ) const +inline bool +Position< D, T >::operator>=( const Position< D, T >& y ) const { for ( int i = 0; i < D; ++i ) { @@ -781,7 +805,8 @@ Position< D, T >::print( std::ostream& out, char sep ) const } template < int D, class T > -std::ostream& operator<<( std::ostream& os, const Position< D, T >& pos ) +std::ostream& +operator<<( std::ostream& os, const Position< D, T >& pos ) { os << "("; if ( D > 0 ) diff --git a/nestkernel/random_generators.h b/nestkernel/random_generators.h index 45f79adbea..30acf53193 100644 --- a/nestkernel/random_generators.h +++ b/nestkernel/random_generators.h @@ -27,8 +27,8 @@ #include #include #include -#include #include +#include // libnestutil includes: #include "randutils.hpp" @@ -137,97 +137,113 @@ class RandomGenerator final : public BaseRandomGenerator rng_.seed( sseq ); } - inline unsigned long operator()( std::uniform_int_distribution< unsigned long >& d ) override + inline unsigned long + operator()( std::uniform_int_distribution< unsigned long >& d ) override { return d( rng_ ); } - inline double operator()( std::uniform_real_distribution<>& d ) override + inline double + operator()( std::uniform_real_distribution<>& d ) override { return d( rng_ ); } - inline unsigned long operator()( std::poisson_distribution< unsigned long >& d ) override + inline unsigned long + operator()( std::poisson_distribution< unsigned long >& d ) override { return d( rng_ ); } - inline double operator()( std::normal_distribution<>& d ) override + inline double + operator()( std::normal_distribution<>& d ) override { return d( rng_ ); } - inline double operator()( std::lognormal_distribution<>& d ) override + inline double + operator()( std::lognormal_distribution<>& d ) override { return d( rng_ ); } - inline unsigned long operator()( std::binomial_distribution< unsigned long >& d ) override + inline unsigned long + operator()( std::binomial_distribution< unsigned long >& d ) override { return d( rng_ ); } - inline double operator()( std::gamma_distribution<>& d ) override + inline double + operator()( std::gamma_distribution<>& d ) override { return d( rng_ ); } - inline double operator()( std::exponential_distribution<>& d ) override + inline double + operator()( std::exponential_distribution<>& d ) override { return d( rng_ ); } - inline unsigned long operator()( std::discrete_distribution< unsigned long >& d ) override + inline unsigned long + operator()( std::discrete_distribution< unsigned long >& d ) override { return d( rng_ ); } - inline unsigned long operator()( std::uniform_int_distribution< unsigned long >& d, + inline unsigned long + operator()( std::uniform_int_distribution< unsigned long >& d, std::uniform_int_distribution< unsigned long >::param_type& p ) override { return d( rng_, p ); } - inline double operator()( std::uniform_real_distribution<>& d, - std::uniform_real_distribution<>::param_type& p ) override + inline double + operator()( std::uniform_real_distribution<>& d, std::uniform_real_distribution<>::param_type& p ) override { return d( rng_, p ); } - inline unsigned long operator()( std::poisson_distribution< unsigned long >& d, + inline unsigned long + operator()( std::poisson_distribution< unsigned long >& d, std::poisson_distribution< unsigned long >::param_type& p ) override { return d( rng_, p ); } - inline double operator()( std::normal_distribution<>& d, std::normal_distribution<>::param_type& p ) override + inline double + operator()( std::normal_distribution<>& d, std::normal_distribution<>::param_type& p ) override { return d( rng_, p ); } - inline double operator()( std::lognormal_distribution<>& d, std::lognormal_distribution<>::param_type& p ) override + inline double + operator()( std::lognormal_distribution<>& d, std::lognormal_distribution<>::param_type& p ) override { return d( rng_, p ); } - inline unsigned long operator()( std::binomial_distribution< unsigned long >& d, + inline unsigned long + operator()( std::binomial_distribution< unsigned long >& d, std::binomial_distribution< unsigned long >::param_type& p ) override { return d( rng_, p ); } - inline double operator()( std::gamma_distribution<>& d, std::gamma_distribution<>::param_type& p ) override + inline double + operator()( std::gamma_distribution<>& d, std::gamma_distribution<>::param_type& p ) override { return d( rng_, p ); } - inline double operator()( std::exponential_distribution<>& d, - std::exponential_distribution<>::param_type& p ) override + inline double + operator()( std::exponential_distribution<>& d, std::exponential_distribution<>::param_type& p ) override { return d( rng_, p ); } - inline unsigned long operator()( std::discrete_distribution< unsigned long >& d, + inline unsigned long + operator()( std::discrete_distribution< unsigned long >& d, std::discrete_distribution< unsigned long >::param_type& p ) override { return d( rng_, p ); @@ -258,7 +274,7 @@ class RandomGenerator final : public BaseRandomGenerator class BaseRandomGeneratorFactory { public: - virtual ~BaseRandomGeneratorFactory(){}; + virtual ~BaseRandomGeneratorFactory() {}; /** * @brief Clones the RNG wrapper and sets the state of the cloned RNG engine. @@ -308,7 +324,8 @@ class RandomDistribution * * @param g Pointer to the RNG wrapper. */ - inline result_type operator()( RngPtr g ) + inline result_type + operator()( RngPtr g ) { static_assert( std::is_same< result_type, unsigned long >::value or std::is_same< result_type, double >::value, "result_type of the distribution must be unsigned long or double" ); @@ -324,7 +341,8 @@ class RandomDistribution * @param g Pointer to the RNG wrapper. * @param params Distribution parameter set to use. */ - inline result_type operator()( RngPtr g, param_type& params ) + inline result_type + operator()( RngPtr g, param_type& params ) { static_assert( std::is_same< result_type, unsigned long >::value or std::is_same< result_type, double >::value, "result_type of the distribution must be unsigned long or double" ); diff --git a/nestkernel/recordables_map.h b/nestkernel/recordables_map.h index 872d95c29b..09a52692a4 100644 --- a/nestkernel/recordables_map.h +++ b/nestkernel/recordables_map.h @@ -142,9 +142,10 @@ class DataAccessFunctor public: DataAccessFunctor( HostNode& n, size_t elem ) : parent_( &n ) - , elem_( elem ){}; + , elem_( elem ) {}; - double operator()() const + double + operator()() const { return parent_->get_state_element( elem_ ); }; diff --git a/nestkernel/recording_backend.h b/nestkernel/recording_backend.h index 1246ba5143..ed459c5230 100644 --- a/nestkernel/recording_backend.h +++ b/nestkernel/recording_backend.h @@ -66,7 +66,7 @@ class Event; * the cleanup() function of all backends. * * @ingroup NESTio -*/ + */ class RecordingBackend { @@ -175,16 +175,16 @@ class RecordingBackend virtual void prepare() = 0; /** - * Clean up the backend at the end of a user level call to the NEST Simulate - * function. - * - * This function is called by `SimulationManager::cleanup()` and allows the - * backend to close open files or network connections or take similar action. - * - * @see prepare() - * - * @ingroup NESTio - */ + * Clean up the backend at the end of a user level call to the NEST Simulate + * function. + * + * This function is called by `SimulationManager::cleanup()` and allows the + * backend to close open files or network connections or take similar action. + * + * @see prepare() + * + * @ingroup NESTio + */ virtual void cleanup() = 0; /** diff --git a/nestkernel/recording_backend_mpi.cpp b/nestkernel/recording_backend_mpi.cpp index 89c4e4b03d..e03bac1405 100644 --- a/nestkernel/recording_backend_mpi.cpp +++ b/nestkernel/recording_backend_mpi.cpp @@ -25,9 +25,9 @@ // Includes from nestkernel: -#include "recording_device.h" -#include "recording_backend_mpi.h" #include "exceptions.h" +#include "recording_backend_mpi.h" +#include "recording_device.h" nest::RecordingBackendMPI::RecordingBackendMPI() : enrolled_( false ) @@ -330,7 +330,7 @@ nest::RecordingBackendMPI::write( const RecordingDevice& device, auto it_devices = devices_[ thread_id ].find( recorder ); if ( it_devices != devices_[ thread_id ].end() ) { - std::array< double, 3 > data{ double( recorder ), double( sender ), stamp.get_ms() }; + std::array< double, 3 > data { double( recorder ), double( sender ), stamp.get_ms() }; buffer_[ thread_id ][ std::get< 0 >( it_devices->second ) ].push_back( data ); } else diff --git a/nestkernel/recording_backend_mpi.h b/nestkernel/recording_backend_mpi.h index eeae4ca973..6a9927c249 100644 --- a/nestkernel/recording_backend_mpi.h +++ b/nestkernel/recording_backend_mpi.h @@ -24,12 +24,12 @@ #define RECORDING_BACKEND_MPI_H #include "recording_backend.h" +#include +#include +#include #include #include -#include -#include #include -#include /* BeginUserDocs: NOINDEX @@ -150,7 +150,7 @@ class RecordingBackendMPI : public RecordingBackend * local thread. The map associates the node ID of a device on a * given thread with its MPI index and device. Only the master * thread has a valid MPI communicator pointer. - */ + */ typedef std::vector< std::map< index, std::tuple< int, MPI_Comm*, const RecordingDevice* > > > device_map; device_map devices_; diff --git a/nestkernel/recording_device.h b/nestkernel/recording_device.h index 6c9784f5a7..bab4949c96 100644 --- a/nestkernel/recording_device.h +++ b/nestkernel/recording_device.h @@ -28,12 +28,12 @@ #include // Includes from nestkernel: -#include "node.h" #include "device.h" #include "device_node.h" -#include "recording_backend.h" -#include "nest_types.h" #include "kernel_manager.h" +#include "nest_types.h" +#include "node.h" +#include "recording_backend.h" // Includes from sli: #include "dictdatum.h" diff --git a/nestkernel/ring_buffer_impl.h b/nestkernel/ring_buffer_impl.h index 3ec4b8d7ae..5e8d97ac74 100644 --- a/nestkernel/ring_buffer_impl.h +++ b/nestkernel/ring_buffer_impl.h @@ -28,7 +28,7 @@ template < unsigned int num_channels > nest::MultiChannelInputBuffer< num_channels >::MultiChannelInputBuffer() : buffer_( kernel().connection_manager.get_min_delay() + kernel().connection_manager.get_max_delay(), - std::array< double, num_channels >() ) + std::array< double, num_channels >() ) { } diff --git a/nestkernel/send_buffer_position.h b/nestkernel/send_buffer_position.h index 2743c17997..0fb9bd80e1 100644 --- a/nestkernel/send_buffer_position.h +++ b/nestkernel/send_buffer_position.h @@ -25,8 +25,8 @@ // C++ includes: #include -#include #include +#include // Includes from nestkernel: #include "vp_manager.h" diff --git a/nestkernel/slice_ring_buffer.h b/nestkernel/slice_ring_buffer.h index 791adec9a2..0cdfe04a1b 100644 --- a/nestkernel/slice_ring_buffer.h +++ b/nestkernel/slice_ring_buffer.h @@ -234,17 +234,20 @@ inline SliceRingBuffer::SpikeInfo::SpikeInfo( long stamp, double ps_offset, doub { } -inline bool SliceRingBuffer::SpikeInfo::operator<( const SpikeInfo& b ) const +inline bool +SliceRingBuffer::SpikeInfo::operator<( const SpikeInfo& b ) const { return stamp_ == b.stamp_ ? ps_offset_ > b.ps_offset_ : stamp_ < b.stamp_; } -inline bool SliceRingBuffer::SpikeInfo::operator<=( const SpikeInfo& b ) const +inline bool +SliceRingBuffer::SpikeInfo::operator<=( const SpikeInfo& b ) const { return not( *this > b ); } -inline bool SliceRingBuffer::SpikeInfo::operator>( const SpikeInfo& b ) const +inline bool +SliceRingBuffer::SpikeInfo::operator>( const SpikeInfo& b ) const { return stamp_ == b.stamp_ ? ps_offset_ < b.ps_offset_ : stamp_ > b.stamp_; } diff --git a/nestkernel/source.h b/nestkernel/source.h index 02b2afcfb7..addec8a81d 100644 --- a/nestkernel/source.h +++ b/nestkernel/source.h @@ -151,17 +151,20 @@ Source::is_disabled() const return node_id_ == DISABLED_NODE_ID; } -inline bool operator<( const Source& lhs, const Source& rhs ) +inline bool +operator<( const Source& lhs, const Source& rhs ) { return ( lhs.node_id_ < rhs.node_id_ ); } -inline bool operator>( const Source& lhs, const Source& rhs ) +inline bool +operator>( const Source& lhs, const Source& rhs ) { return operator<( rhs, lhs ); } -inline bool operator==( const Source& lhs, const Source& rhs ) +inline bool +operator==( const Source& lhs, const Source& rhs ) { return ( lhs.node_id_ == rhs.node_id_ ); } diff --git a/nestkernel/source_table.cpp b/nestkernel/source_table.cpp index af912e5b3c..2c6efe9cc8 100644 --- a/nestkernel/source_table.cpp +++ b/nestkernel/source_table.cpp @@ -238,10 +238,10 @@ nest::SourceTable::compute_buffer_pos_for_unique_secondary_sources( const thread // node ID and synapse-type id on this MPI rank std::vector< int > recv_counts_secondary_events_in_int_per_rank( kernel().mpi_manager.get_num_processes(), 0 ); - for ( - std::set< std::pair< index, size_t > >::const_iterator cit = ( *unique_secondary_source_node_id_syn_id ).begin(); - cit != ( *unique_secondary_source_node_id_syn_id ).end(); - ++cit ) + for ( std::set< std::pair< index, size_t > >::const_iterator cit = + ( *unique_secondary_source_node_id_syn_id ).begin(); + cit != ( *unique_secondary_source_node_id_syn_id ).end(); + ++cit ) { const thread source_rank = kernel().mpi_manager.get_process_id_of_node_id( cit->first ); const size_t event_size = kernel().model_manager.get_secondary_event_prototype( cit->second, tid ).size(); @@ -279,11 +279,11 @@ nest::SourceTable::source_should_be_processed_( const thread rank_start, { const thread source_rank = kernel().mpi_manager.get_process_id_of_node_id( source.get_node_id() ); - return not( source.is_processed() or source.is_disabled() - // is this thread responsible for this part of the MPI - // buffer? - or source_rank < rank_start - or rank_end <= source_rank ); + return not( source.is_processed() + or source.is_disabled() + // is this thread responsible for this part of the MPI + // buffer? + or source_rank < rank_start or rank_end <= source_rank ); } bool diff --git a/nestkernel/source_table.h b/nestkernel/source_table.h index b696f406bf..8e493ba7a2 100644 --- a/nestkernel/source_table.h +++ b/nestkernel/source_table.h @@ -353,8 +353,8 @@ SourceTable::save_entry_point( const thread tid ) // contain non-processed entry (see reject_last_target_data()) or // store maximal value for lcid. saved_positions_[ tid ].lcid = std::min( current_positions_[ tid ].lcid + 1, - static_cast< long >( sources_[ current_positions_[ tid ].tid ][ current_positions_[ tid ].syn_id ].size() - - 1 ) ); + static_cast< long >( + sources_[ current_positions_[ tid ].tid ][ current_positions_[ tid ].syn_id ].size() - 1 ) ); } else { diff --git a/nestkernel/source_table_position.h b/nestkernel/source_table_position.h index 6822b3f64a..4cd2c11a10 100644 --- a/nestkernel/source_table_position.h +++ b/nestkernel/source_table_position.h @@ -135,17 +135,20 @@ SourceTablePosition::decrease() assert( lcid >= -1 ); } -inline bool operator==( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) +inline bool +operator==( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) { return ( ( lhs.tid == rhs.tid ) and ( lhs.syn_id == rhs.syn_id ) and ( lhs.lcid == rhs.lcid ) ); } -inline bool operator!=( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) +inline bool +operator!=( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) { return not operator==( lhs, rhs ); } -inline bool operator<( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) +inline bool +operator<( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) { if ( lhs.tid == rhs.tid ) { @@ -164,17 +167,20 @@ inline bool operator<( const SourceTablePosition& lhs, const SourceTablePosition } } -inline bool operator>( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) +inline bool +operator>( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) { return operator<( rhs, lhs ); } -inline bool operator<=( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) +inline bool +operator<=( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) { return not operator>( lhs, rhs ); } -inline bool operator>=( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) +inline bool +operator>=( const SourceTablePosition& lhs, const SourceTablePosition& rhs ) { return not operator<( lhs, rhs ); } diff --git a/nestkernel/sp_manager.h b/nestkernel/sp_manager.h index a9b73aff68..6ca4e20f7e 100644 --- a/nestkernel/sp_manager.h +++ b/nestkernel/sp_manager.h @@ -37,10 +37,10 @@ #include "manager_interface.h" // Includes from nestkernel: -#include "node_collection.h" #include "growth_curve_factory.h" #include "nest_time.h" #include "nest_types.h" +#include "node_collection.h" // Includes from sli: #include "arraydatum.h" diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h index df6d3aa39d..d83b7eec76 100644 --- a/nestkernel/spatial.h +++ b/nestkernel/spatial.h @@ -27,8 +27,8 @@ #include // Includes from nestkernel: -#include "node_collection.h" #include "nest_types.h" +#include "node_collection.h" // Includes from sli: #include "arraydatum.h" @@ -38,8 +38,8 @@ #include "token.h" // Includes from spatial: -#include "layer.h" #include "free_layer.h" +#include "layer.h" #include "mask.h" @@ -57,7 +57,7 @@ class LayerMetadata : public NodeCollectionMetadata { } - void set_status( const dictionary&, bool ){}; + void set_status( const dictionary&, bool ) {}; void get_status( dictionary& d ) const @@ -92,7 +92,8 @@ class LayerMetadata : public NodeCollectionMetadata void slice( size_t start, size_t stop, size_t step, NodeCollectionPTR node_collection ); - bool operator==( const NodeCollectionMetadataPTR rhs ) const + bool + operator==( const NodeCollectionMetadataPTR rhs ) const { const auto rhs_layer_metadata = dynamic_cast< LayerMetadata* >( rhs.get() ); if ( rhs_layer_metadata == nullptr ) diff --git a/nestkernel/stimulation_backend.h b/nestkernel/stimulation_backend.h index 09301c363e..cc23d6321e 100644 --- a/nestkernel/stimulation_backend.h +++ b/nestkernel/stimulation_backend.h @@ -28,8 +28,8 @@ // Includes from sli: #include "dictdatum.h" -#include "name.h" #include "dictutils.h" +#include "name.h" #include "stimulation_device.h" namespace nest @@ -67,7 +67,7 @@ namespace nest * @author Sandra Diaz * * @ingroup NESTio -*/ + */ class StimulationBackend { @@ -77,40 +77,40 @@ class StimulationBackend virtual ~StimulationBackend() noexcept = default; /** - * Enroll a `StimulationDevice` with the `StimulationBackend`. - * - * When this function is called by a `StimulationDevice` @p device, - * the `StimulationBackend` can set up per-device data structures and - * properties. Individual device instances can be identified using - * the `thread` and `node_id` of the @p device. - * - * This function is called from the set_initialized_() function of - * the @p device and their set_status() function. - * - * A backend needs to be able to cope with multiple calls to this - * function, as multiple calls to set_status() may occur on the @p - * device. For already enrolled devices this usually means that only - * the parameters in @p params have to be set, but no further - * actions are needed. - * - * Each stimulation backend must ensure that enrollment (including all - * settings made by the user) is persistent over multiple calls to - * Prepare, while the enrollment of all devices should end with a - * call to finalize(). - * - * A common implementation of this function will create an entry in - * a thread-local map, associating the device's node ID with the - * device-specific backend properties and an input facility of some - * kind. - * - * @param device the StimulationDevice to be enrolled - * @param params device-specific backend parameters - * - * @see disenroll() - * - * @ingroup NESTio - */ - virtual void enroll( StimulationDevice&, const dictionary& ){}; + * Enroll a `StimulationDevice` with the `StimulationBackend`. + * + * When this function is called by a `StimulationDevice` @p device, + * the `StimulationBackend` can set up per-device data structures and + * properties. Individual device instances can be identified using + * the `thread` and `node_id` of the @p device. + * + * This function is called from the set_initialized_() function of + * the @p device and their set_status() function. + * + * A backend needs to be able to cope with multiple calls to this + * function, as multiple calls to set_status() may occur on the @p + * device. For already enrolled devices this usually means that only + * the parameters in @p params have to be set, but no further + * actions are needed. + * + * Each stimulation backend must ensure that enrollment (including all + * settings made by the user) is persistent over multiple calls to + * Prepare, while the enrollment of all devices should end with a + * call to finalize(). + * + * A common implementation of this function will create an entry in + * a thread-local map, associating the device's node ID with the + * device-specific backend properties and an input facility of some + * kind. + * + * @param device the StimulationDevice to be enrolled + * @param params device-specific backend parameters + * + * @see disenroll() + * + * @ingroup NESTio + */ + virtual void enroll( StimulationDevice&, const dictionary& ) {}; /** * Disenroll a `StimulationDevice` from the `StimulationBackend`. @@ -128,7 +128,7 @@ class StimulationBackend * * @ingroup NESTio */ - virtual void disenroll( StimulationDevice& ){}; + virtual void disenroll( StimulationDevice& ) {}; /** * Initialize global backend-specific data structures. @@ -181,19 +181,19 @@ class StimulationBackend virtual void prepare() = 0; /** - * Clean up the backend at the end of a user level call to the NEST Simulate - * function. - * - * This function is called by `SimulationManager::cleanup()` and allows the - * backend to close open files, close network connections, etc. - * - * @see prepare() - * - * @ingroup NESTio - */ + * Clean up the backend at the end of a user level call to the NEST Simulate + * function. + * + * This function is called by `SimulationManager::cleanup()` and allows the + * backend to close open files, close network connections, etc. + * + * @see prepare() + * + * @ingroup NESTio + */ virtual void cleanup() = 0; - void clear( const StimulationDevice& ){}; + void clear( const StimulationDevice& ) {}; }; } // namespace diff --git a/nestkernel/stimulation_backend_mpi.cpp b/nestkernel/stimulation_backend_mpi.cpp index 090068e00c..2ecfcafe36 100644 --- a/nestkernel/stimulation_backend_mpi.cpp +++ b/nestkernel/stimulation_backend_mpi.cpp @@ -21,13 +21,13 @@ */ // C++ includes: -#include #include +#include // Includes from nestkernel: +#include "kernel_manager.h" #include "stimulation_backend.h" #include "stimulation_backend_mpi.h" -#include "kernel_manager.h" #include "stimulation_device.h" nest::StimulationBackendMPI::StimulationBackendMPI() @@ -139,7 +139,7 @@ nest::StimulationBackendMPI::prepare() // This is because the management of threads here is using MPI_THREAD_FUNNELED (see mpi_manager.cpp:119). comm = new MPI_Comm; auto vector_id_device = new std::vector< int >; // vector of ID device for the rank - int* vector_nb_device_th{ new int[ kernel().vp_manager.get_num_threads() ]{} }; // number of device by thread + int* vector_nb_device_th { new int[ kernel().vp_manager.get_num_threads() ] {} }; // number of device by thread std::fill_n( vector_nb_device_th, kernel().vp_manager.get_num_threads(), 0 ); // add the id of the device if there is a connection with the device. if ( kernel().connection_manager.get_device_connected( @@ -203,7 +203,7 @@ void nest::StimulationBackendMPI::pre_run_hook() { // create the variable which will contain the receiving data from the communication - auto data{ new std::pair< int*, double* >[ commMap_.size() ]{} }; + auto data { new std::pair< int*, double* >[commMap_.size()] {} }; int index = 0; #pragma omp master { @@ -338,10 +338,10 @@ nest::StimulationBackendMPI::receive_spike_train( const MPI_Comm& comm, std::vec // Receive the size of data MPI_Status status_mpi; // Receive the size of the data in total and for each devices - int* nb_size_data_per_id{ new int[ size_list + 1 ]{} }; // delete in the function clean_memory_input_data + int* nb_size_data_per_id { new int[ size_list + 1 ] {} }; // delete in the function clean_memory_input_data MPI_Recv( nb_size_data_per_id, size_list + 1, MPI_INT, MPI_ANY_SOURCE, devices_id[ 0 ], comm, &status_mpi ); // Receive the data - double* data{ new double[ nb_size_data_per_id[ 0 ] ]{} }; // delete in the function clean_memory_input_data + double* data { new double[ nb_size_data_per_id[ 0 ] ] {} }; // delete in the function clean_memory_input_data MPI_Recv( data, nb_size_data_per_id[ 0 ], MPI_DOUBLE, status_mpi.MPI_SOURCE, devices_id[ 0 ], comm, &status_mpi ); // return the size of the data by device and the data return std::make_pair( nb_size_data_per_id, data ); diff --git a/nestkernel/stimulation_backend_mpi.h b/nestkernel/stimulation_backend_mpi.h index a2aea17d21..221ce13ab1 100644 --- a/nestkernel/stimulation_backend_mpi.h +++ b/nestkernel/stimulation_backend_mpi.h @@ -23,15 +23,15 @@ #ifndef STIMULATION_BACKEND_MPI_H #define STIMULATION_BACKEND_MPI_H -#include "stimulation_backend.h" -#include "nest_types.h" #include "nest_time.h" +#include "nest_types.h" +#include "stimulation_backend.h" +#include +#include +#include #include #include -#include -#include #include -#include /* BeginUserDocs: stimulation backend @@ -135,7 +135,7 @@ class StimulationBackendMPI : public StimulationBackend * A map for the enrolled devices. We have a vector with one map per local * thread. The map associates the node ID of a device on a given thread * with its device. Only the master thread has a valid MPI communicator pointer. - */ + */ using device_map = std::vector< std::map< index, std::pair< const MPI_Comm*, StimulationDevice* > > >; device_map devices_; /** diff --git a/nestkernel/stimulation_device.h b/nestkernel/stimulation_device.h index bc86bc2977..8427bef1fa 100644 --- a/nestkernel/stimulation_device.h +++ b/nestkernel/stimulation_device.h @@ -163,9 +163,9 @@ class StimulationDevice : public DeviceNode, public Device bool has_proxies() const override; Name get_element_type() const override; - using Device::init_state; using Device::calibrate; using Device::init_buffers; + using Device::init_state; using Node::calibrate; void calibrate() override; @@ -190,8 +190,8 @@ class StimulationDevice : public DeviceNode, public Device throw KernelException( "WORNG TYPE" ); }; const std::string& get_label() const; - virtual void set_data_from_stimulation_backend( std::vector< double >& ){}; - void update( Time const&, const long, const long ) override{}; + virtual void set_data_from_stimulation_backend( std::vector< double >& ) {}; + void update( Time const&, const long, const long ) override {}; protected: void set_initialized_() final; diff --git a/nestkernel/synaptic_element.h b/nestkernel/synaptic_element.h index 256945f33a..7bde7dd3a8 100644 --- a/nestkernel/synaptic_element.h +++ b/nestkernel/synaptic_element.h @@ -114,46 +114,46 @@ class SynapticElement public: /** - * \fn SynapticElement() - * Constructor. - */ + * \fn SynapticElement() + * Constructor. + */ SynapticElement(); /** - * \fn SynapticElement(const SynapticElement& se) - * Copy Constructor. - * @param se SynapticElement - */ + * \fn SynapticElement(const SynapticElement& se) + * Copy Constructor. + * @param se SynapticElement + */ SynapticElement( const SynapticElement& se ); /** - * \fn SynapticElement(const SynapticElement& se) - * copy assignment operator. - * @param other SynapticElement - */ + * \fn SynapticElement(const SynapticElement& se) + * copy assignment operator. + * @param other SynapticElement + */ SynapticElement& operator=( const SynapticElement& other ); /** - * \fn SynapticElement() - * Destructor. - */ + * \fn SynapticElement() + * Destructor. + */ ~SynapticElement() { delete growth_curve_; } /** - * \fn void get(dictionary&) const - * Store current values in a dictionary. - * @param d to write data - */ + * \fn void get(dictionary&) const + * Store current values in a dictionary. + * @param d to write data + */ void get( dictionary& d ) const; /** - * \fn void set(const dictionary&) - * Set values from a dictionary. - * @param d to take data from - */ + * \fn void set(const dictionary&) + * Set values from a dictionary. + * @param d to take data from + */ void set( const dictionary& d ); @@ -168,13 +168,13 @@ class SynapticElement void update( double t, double t_minus, double Ca_minus, double tau_Ca ); /** - * \fn double get_z_value(ArchivingNode const *a, double t) const - * Get the number of synaptic_element at the time t (in ms) - * Returns a negative number when synaptic elements must be deleted - * during the next update - * @param a node of this synaptic_element - * @param t Current time (in ms) - */ + * \fn double get_z_value(ArchivingNode const *a, double t) const + * Get the number of synaptic_element at the time t (in ms) + * Returns a negative number when synaptic elements must be deleted + * during the next update + * @param a node of this synaptic_element + * @param t Current time (in ms) + */ int get_z_vacant() const { diff --git a/nestkernel/target.h b/nestkernel/target.h index cb67feeb6a..6d2c95c407 100644 --- a/nestkernel/target.h +++ b/nestkernel/target.h @@ -27,9 +27,9 @@ #include // Includes from nestkernel: +#include "exceptions.h" #include "nest_types.h" #include "static_assert.h" -#include "exceptions.h" namespace nest { @@ -176,7 +176,8 @@ inline Target::Target( const Target& target ) set_status( TARGET_ID_UNPROCESSED ); // initialize } -inline Target& Target::operator=( const Target& other ) +inline Target& +Target::operator=( const Target& other ) { remote_target_id_ = other.remote_target_id_; set_status( TARGET_ID_UNPROCESSED ); diff --git a/nestkernel/target_data.h b/nestkernel/target_data.h index 4c9d21042d..ebc6764c32 100644 --- a/nestkernel/target_data.h +++ b/nestkernel/target_data.h @@ -192,8 +192,7 @@ class TargetData public: //! variant fields - union - { + union { TargetDataFields target_data; SecondaryTargetDataFields secondary_data; }; diff --git a/nestkernel/target_table.cpp b/nestkernel/target_table.cpp index 2f28e0bf09..56fd94af24 100644 --- a/nestkernel/target_table.cpp +++ b/nestkernel/target_table.cpp @@ -21,8 +21,8 @@ */ // Includes from nestkernel: -#include "kernel_manager.h" #include "target_table.h" +#include "kernel_manager.h" // Includes from libnestutil #include "vector_util.h" diff --git a/nestkernel/urbanczik_archiving_node.h b/nestkernel/urbanczik_archiving_node.h index dda46332a7..cf08a65682 100644 --- a/nestkernel/urbanczik_archiving_node.h +++ b/nestkernel/urbanczik_archiving_node.h @@ -27,10 +27,10 @@ #include // Includes from nestkernel: +#include "archiving_node.h" #include "histentry.h" #include "nest_time.h" #include "nest_types.h" -#include "archiving_node.h" #include "synaptic_element.h" // Includes from sli: diff --git a/sli/aggregatedatum.h b/sli/aggregatedatum.h index 15d2dc41a9..fb625252a4 100644 --- a/sli/aggregatedatum.h +++ b/sli/aggregatedatum.h @@ -104,7 +104,8 @@ class AggregateDatum : public TypedDatum< slt >, public C return static_cast< C >( *ddc ) == static_cast< C >( *this ); } - static void* operator new( size_t size ) + static void* + operator new( size_t size ) { if ( size != memory.size_of() ) { @@ -113,7 +114,8 @@ class AggregateDatum : public TypedDatum< slt >, public C return memory.alloc(); } - static void operator delete( void* p, size_t size ) + static void + operator delete( void* p, size_t size ) { if ( p == NULL ) { diff --git a/sli/allocator.cpp b/sli/allocator.cpp index 77790d5b6a..554039fbfd 100644 --- a/sli/allocator.cpp +++ b/sli/allocator.cpp @@ -94,7 +94,8 @@ sli::pool::~pool() } } -sli::pool& sli::pool::operator=( const sli::pool& p ) +sli::pool& +sli::pool::operator=( const sli::pool& p ) { if ( &p == this ) { diff --git a/sli/allocator.h b/sli/allocator.h index ed87344309..b249fd8804 100644 --- a/sli/allocator.h +++ b/sli/allocator.h @@ -226,7 +226,7 @@ class PoorMansAllocator { chunk( char* mem, chunk* next ) : mem_( mem ) - , next_( next ){}; + , next_( next ) {}; char* mem_; chunk* next_; }; diff --git a/sli/booldatum.cc b/sli/booldatum.cc index d3b494ade6..baa6d2e37f 100644 --- a/sli/booldatum.cc +++ b/sli/booldatum.cc @@ -64,7 +64,8 @@ BoolDatum::print( std::ostream& out ) const out << ( d ? true_string : false_string ); } -void* BoolDatum::operator new( size_t size ) +void* +BoolDatum::operator new( size_t size ) { if ( size != memory.size_of() ) { @@ -73,7 +74,8 @@ void* BoolDatum::operator new( size_t size ) return memory.alloc(); } -void BoolDatum::operator delete( void* p, size_t size ) +void +BoolDatum::operator delete( void* p, size_t size ) { if ( p == NULL ) { diff --git a/sli/charcode.cc b/sli/charcode.cc index d859109f15..a6feb5bc5d 100644 --- a/sli/charcode.cc +++ b/sli/charcode.cc @@ -52,7 +52,8 @@ CharCode::Group( size_t code, const char* g ) } } -size_t CharCode::operator()( char c ) const +size_t +CharCode::operator()( char c ) const { unsigned char chr = static_cast< unsigned char >( c ); assert( chr < size() ); diff --git a/sli/datum.h b/sli/datum.h index 030f5acac4..c584ca91ba 100644 --- a/sli/datum.h +++ b/sli/datum.h @@ -93,7 +93,7 @@ class Datum public: - virtual ~Datum(){}; + virtual ~Datum() {}; void @@ -209,7 +209,8 @@ class TypedDatum : public Datum }; template < SLIType* slt > -inline const TypedDatum< slt >& TypedDatum< slt >::operator=( const TypedDatum< slt >& ) +inline const TypedDatum< slt >& +TypedDatum< slt >::operator=( const TypedDatum< slt >& ) { // assert( type == d.type ); return *this; diff --git a/sli/dict.cc b/sli/dict.cc index 8e2809ddf5..7839ef7326 100644 --- a/sli/dict.cc +++ b/sli/dict.cc @@ -204,7 +204,8 @@ Dictionary::all_accessed_( std::string& missed, std::string prefix ) const return missed.empty(); } -std::ostream& operator<<( std::ostream& out, const Dictionary& d ) +std::ostream& +operator<<( std::ostream& out, const Dictionary& d ) { out << "<<"; diff --git a/sli/dict.h b/sli/dict.h index 946eabc627..268f4c190b 100644 --- a/sli/dict.h +++ b/sli/dict.h @@ -36,7 +36,8 @@ typedef std::map< Name, Token, std::less< Name > > TokenMap; -inline bool operator==( const TokenMap& x, const TokenMap& y ) +inline bool +operator==( const TokenMap& x, const TokenMap& y ) { return ( x.size() == y.size() ) && equal( x.begin(), x.end(), y.begin() ); } @@ -60,7 +61,8 @@ class Dictionary : private TokenMap static bool nocase_compare( char c1, char c2 ); public: - bool operator()( const std::pair< Name, Token >& lhs, const std::pair< Name, Token >& rhs ) const + bool + operator()( const std::pair< Name, Token >& lhs, const std::pair< Name, Token >& rhs ) const { const std::string& ls = lhs.first.toString(); const std::string& rs = rhs.first.toString(); @@ -81,12 +83,12 @@ class Dictionary : private TokenMap } ~Dictionary(); - using TokenMap::erase; - using TokenMap::size; using TokenMap::begin; using TokenMap::end; - using TokenMap::iterator; + using TokenMap::erase; using TokenMap::find; + using TokenMap::iterator; + using TokenMap::size; void clear(); @@ -137,7 +139,8 @@ class Dictionary : private TokenMap void info( std::ostream& ) const; - bool operator==( const Dictionary& d ) const + bool + operator==( const Dictionary& d ) const { return ::operator==( *this, d ); } diff --git a/sli/dictstack.cc b/sli/dictstack.cc index 60da77f869..a923609321 100644 --- a/sli/dictstack.cc +++ b/sli/dictstack.cc @@ -95,10 +95,10 @@ DictionaryStack::basedef_move( const Name& n, Token& t ) void DictionaryStack::pop( void ) { -// -// remove top dictionary from stack -// dictionary stack must contain at least one dictionary -// + // + // remove top dictionary from stack + // dictionary stack must contain at least one dictionary + // #ifdef DICTSTACK_CACHE clear_dict_from_cache( *( d.begin() ) ); @@ -163,11 +163,11 @@ DictionaryStack::push( Token& d ) void DictionaryStack::push( const DictionaryDatum& pd ) { -// -// extract Dictionary from Token envelope -// and push it on top of the stack. -// a non dictionary datum at this point is a program bug. -// + // + // extract Dictionary from Token envelope + // and push it on top of the stack. + // a non dictionary datum at this point is a program bug. + // #ifdef DICTSTACK_CACHE pd->add_dictstack_reference(); @@ -217,7 +217,8 @@ DictionaryStack::top_info( std::ostream& o ) const ( *d.begin() )->info( o ); } -const DictionaryStack& DictionaryStack::operator=( const DictionaryStack& ds ) +const DictionaryStack& +DictionaryStack::operator=( const DictionaryStack& ds ) { if ( &ds != this ) { diff --git a/sli/dictstack.h b/sli/dictstack.h index 22a26decfb..49812e0262 100644 --- a/sli/dictstack.h +++ b/sli/dictstack.h @@ -210,8 +210,9 @@ class DictionaryStack * If the Name is not found, * @a VoidToken is returned. */ - const Token& baselookup( const Name& n ) // lookup in a specified - { // base dictionary + const Token& + baselookup( const Name& n ) // lookup in a specified + { // base dictionary #ifdef DICTSTACK_CACHE Name::handle_t key = n.toIndex(); if ( key < basecache_.size() ) @@ -274,8 +275,9 @@ class DictionaryStack /** Test for a name in the bottom level dictionary. */ - bool baseknown( const Name& n ) // lookup in a specified - { // base dictionary + bool + baseknown( const Name& n ) // lookup in a specified + { // base dictionary #ifdef DICTSTACK_CACHE Name::handle_t key = n.toIndex(); if ( key < basecache_.size() ) @@ -389,13 +391,13 @@ DictionaryStack::def( const Name& n, const Token& t ) inline void DictionaryStack::def_move( const Name& n, Token& t ) { -// -// insert (n,t) in top level dictionary -// dictionary stack must contain at least one dictionary -// VoidToken is an illegal value for t. -// def_move returns t as the VoidToken. -// -/* clear_token_from_cache(n); */ + // + // insert (n,t) in top level dictionary + // dictionary stack must contain at least one dictionary + // VoidToken is an illegal value for t. + // def_move returns t as the VoidToken. + // + /* clear_token_from_cache(n); */ #ifdef DICTSTACK_CACHE cache_token( n, &( ( *d.begin() )->insert_move( n, t ) ) ); diff --git a/sli/fdstream.cc b/sli/fdstream.cc index 402fca590c..6db90ff410 100644 --- a/sli/fdstream.cc +++ b/sli/fdstream.cc @@ -115,7 +115,7 @@ fdbuf::close() // std::cerr<<"overflow failed!"< #include +#include typedef std::ifstream ifdstream; typedef std::ofstream ofdstream; diff --git a/sli/filesystem.h b/sli/filesystem.h index 7b737c5d64..fb3c9e4f16 100644 --- a/sli/filesystem.h +++ b/sli/filesystem.h @@ -113,8 +113,8 @@ class FilesystemModule : public SLIModule TmpNamFunction tmpnamfunction; CompareFilesFunction comparefilesfunction; - FilesystemModule( void ){}; - ~FilesystemModule(){}; + FilesystemModule( void ) {}; + ~FilesystemModule() {}; void init( SLIInterpreter* ); const std::string name( void ) const; diff --git a/sli/functional.h b/sli/functional.h index 53912af508..68039b0cb5 100644 --- a/sli/functional.h +++ b/sli/functional.h @@ -34,7 +34,8 @@ template < class T > class delete_ptr { public: - T* operator()( T* p ) + T* + operator()( T* p ) { delete p; return 0; diff --git a/sli/functiondatum.h b/sli/functiondatum.h index 254ba6c312..ca3555e26f 100644 --- a/sli/functiondatum.h +++ b/sli/functiondatum.h @@ -68,7 +68,8 @@ class FunctionDatum : public TypedDatum< &SLIInterpreter::Functiontype > return this; } - SLIFunction const& operator=( SLIFunction const& f ) + SLIFunction const& + operator=( SLIFunction const& f ) { std::cerr << "Warning: Definition of FunctionDatum (" << name << ") changed!!\n"; @@ -152,7 +153,8 @@ class FunctionDatum : public TypedDatum< &SLIInterpreter::Functiontype > void backtrace( SLIInterpreter*, int ) const; - static void* operator new( size_t size ) + static void* + operator new( size_t size ) { if ( size != sizeof( FunctionDatum ) ) { @@ -161,7 +163,8 @@ class FunctionDatum : public TypedDatum< &SLIInterpreter::Functiontype > return memory.alloc(); } - static void operator delete( void* p, size_t size ) + static void + operator delete( void* p, size_t size ) { if ( p == NULL ) { diff --git a/sli/genericdatum.h b/sli/genericdatum.h index 6810c6f874..7688c0fea8 100644 --- a/sli/genericdatum.h +++ b/sli/genericdatum.h @@ -63,7 +63,8 @@ class GenericDatum : public TypedDatum< slt > GenericDatum( const GenericDatum< D, slt >& gd ) = default; - const D& operator=( const D& d_s ) + const D& + operator=( const D& d_s ) { d = d_s; return d; diff --git a/sli/interpret.cc b/sli/interpret.cc index 9f71dc75e0..f04b3cd05e 100644 --- a/sli/interpret.cc +++ b/sli/interpret.cc @@ -844,8 +844,7 @@ SLIInterpreter::message( std::ostream& out, std::strftime( timestring, buflen, "%b %d %H:%M:%S", std::localtime( &tm ) ); std::string msg = String::compose( "%1 %2 [%3]: ", timestring, from, levelname ); - out << std::endl - << msg << errorname; + out << std::endl << msg << errorname; // Set the preferred line indentation. const size_t indent = 4; @@ -876,8 +875,7 @@ SLIInterpreter::message( std::ostream& out, // Indent first message line if ( text_str.size() != 0 ) { - std::cout << std::endl - << std::string( indent, ' ' ); + std::cout << std::endl << std::string( indent, ' ' ); } size_t pos = 0; @@ -889,8 +887,7 @@ SLIInterpreter::message( std::ostream& out, // Print a lineshift followed by an indented whitespace // Manually inserted lineshift at the end of the message // are suppressed. - out << std::endl - << std::string( indent, ' ' ); + out << std::endl << std::string( indent, ' ' ); pos = 0; } else @@ -912,8 +909,7 @@ SLIInterpreter::message( std::ostream& out, if ( i != 0 && text_str.at( i - 1 ) == ' ' && static_cast< int >( space - i ) > static_cast< int >( width - pos ) ) { - out << std::endl - << std::string( indent, ' ' ); + out << std::endl << std::string( indent, ' ' ); pos = 0; } diff --git a/sli/interpret.h b/sli/interpret.h index 0f3df67655..faa5c6e30d 100644 --- a/sli/interpret.h +++ b/sli/interpret.h @@ -59,8 +59,9 @@ class Dictionary; class FunctionDatum; class BoolDatum; -extern "C" { -void SLIthrowsignal( int s ); +extern "C" +{ + void SLIthrowsignal( int s ); } class SLIInterpreter diff --git a/sli/name.cc b/sli/name.cc index aed3662af2..e5b2c1e66a 100644 --- a/sli/name.cc +++ b/sli/name.cc @@ -124,7 +124,8 @@ Name::info( std::ostream& out ) } -std::ostream& operator<<( std::ostream& o, const Name& n ) +std::ostream& +operator<<( std::ostream& o, const Name& n ) { o << n.toString().c_str(); return o; diff --git a/sli/name.h b/sli/name.h index 122cab84bd..9017bd05c4 100644 --- a/sli/name.h +++ b/sli/name.h @@ -89,12 +89,14 @@ class Name return handle_; } - bool operator==( const Name& n ) const + bool + operator==( const Name& n ) const { return handle_ == n.handle_; } - bool operator!=( const Name& n ) const + bool + operator!=( const Name& n ) const { return not( handle_ == n.handle_ ); } @@ -105,7 +107,8 @@ class Name * on string comparison would be very slow. We thus compare based on * table indices. */ - bool operator<( const Name& n ) const + bool + operator<( const Name& n ) const { return handle_ < n.handle_; } diff --git a/sli/numericdatum.h b/sli/numericdatum.h index c20d46c3f4..792ccaffe4 100644 --- a/sli/numericdatum.h +++ b/sli/numericdatum.h @@ -87,7 +87,8 @@ class NumericDatum : public GenericDatum< D, slt > this->print( o ); } - static void* operator new( size_t size ) + static void* + operator new( size_t size ) { if ( size != memory.size_of() ) { @@ -96,7 +97,8 @@ class NumericDatum : public GenericDatum< D, slt > return memory.alloc(); } - static void operator delete( void* p, size_t size ) + static void + operator delete( void* p, size_t size ) { if ( p == NULL ) { diff --git a/sli/parser.cc b/sli/parser.cc index dd355a996a..8a0dce6a2a 100644 --- a/sli/parser.cc +++ b/sli/parser.cc @@ -72,7 +72,8 @@ Parser::Parser( void ) } -bool Parser::operator()( Token& t ) +bool +Parser::operator()( Token& t ) { assert( s != NULL ); @@ -209,12 +210,14 @@ bool Parser::operator()( Token& t ) return ( result == tokencompleted ); } -bool operator==( Parser const& p1, Parser const& p2 ) +bool +operator==( Parser const& p1, Parser const& p2 ) { return &p1 == &p2; } -std::ostream& operator<<( std::ostream& out, const Parser& p ) +std::ostream& +operator<<( std::ostream& out, const Parser& p ) { out << "Parser(" << p.scan() << ')' << std::endl; return out; diff --git a/sli/processes.cc b/sli/processes.cc index aa53043882..f8db5a2c13 100644 --- a/sli/processes.cc +++ b/sli/processes.cc @@ -82,21 +82,23 @@ #endif #if defined IS_BLUEGENE_P || defined IS_BLUEGENE_Q -extern "C" { -// These functions are defined in the file "get_mem.c". They need -// to reside in a plain C file, because the #pragmas defined in the -// BG header files interfere with C++, causing "undefined reference -// to non-virtual thunk" MH 12-02-22, redid fix by JME 12-01-27. -long bg_get_heap_mem(); -long bg_get_stack_mem(); -long bg_get_mmap_mem(); +extern "C" +{ + // These functions are defined in the file "get_mem.c". They need + // to reside in a plain C file, because the #pragmas defined in the + // BG header files interfere with C++, causing "undefined reference + // to non-virtual thunk" MH 12-02-22, redid fix by JME 12-01-27. + long bg_get_heap_mem(); + long bg_get_stack_mem(); + long bg_get_mmap_mem(); } #endif #if defined __APPLE__ && defined HAVE_MACH_MACH_H -extern "C" { -// Similar to the above prototype definitions for BG. -unsigned long darwin_get_used_mem(); +extern "C" +{ + // Similar to the above prototype definitions for BG. + unsigned long darwin_get_used_mem(); } #endif @@ -364,7 +366,7 @@ Processes::Sysexec_aFunction::execute( SLIInterpreter* i ) const // **argv denotes an pointer to an array which is allocated dynamically // the old formulation char *argv[array->size() + 1]; is no longer legal c++ // (Ruediger!!) - char** argv = new char* [ array->size() + 1 ]; + char** argv = new char*[ array->size() + 1 ]; for ( unsigned int j = 0; j < array->size(); j++ ) // forall in array { diff --git a/sli/puresli.cc b/sli/puresli.cc index cadd8fc2e2..83f6b69a72 100644 --- a/sli/puresli.cc +++ b/sli/puresli.cc @@ -42,11 +42,11 @@ int main( int argc, char* argv[] ) { -/** - We disable synchronization between stdio and istd::ostreams - this has to be done before any in- or output has been - done. -*/ + /** + We disable synchronization between stdio and istd::ostreams + this has to be done before any in- or output has been + done. + */ #ifdef __GNUC__ #if __GNUC__ < 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ < 1 ) diff --git a/sli/scanner.cc b/sli/scanner.cc index 6f29b38385..8492356f55 100644 --- a/sli/scanner.cc +++ b/sli/scanner.cc @@ -525,7 +525,8 @@ Scanner::source( std::istream* in_s ) } } -bool Scanner::operator()( Token& t ) +bool +Scanner::operator()( Token& t ) { static const int base = 10; ScanStates state = start; @@ -819,6 +820,5 @@ Scanner::print_error( const char* msg ) { std::cout << "% parser: At line " << line << " position " << col << ".\n" << "% parser: Syntax Error: " << msg << "\n"; - std::cout << "% parser: Context preceding the error follows:\n" << old_context << std::endl - << context << std::endl; + std::cout << "% parser: Context preceding the error follows:\n" << old_context << std::endl << context << std::endl; } diff --git a/sli/sli_io.cc b/sli/sli_io.cc index bbe3b440c2..3fb2943646 100644 --- a/sli/sli_io.cc +++ b/sli/sli_io.cc @@ -372,8 +372,8 @@ IsstreamFunction::execute( SLIInterpreter* i ) const void OsstreamFunction::execute( SLIInterpreter* i ) const { -// call: osstream -> osstream true -// -> false + // call: osstream -> osstream true + // -> false #ifdef HAVE_SSTREAM std::ostringstream* out = new std::ostringstream(); @@ -461,8 +461,8 @@ StrSStreamFunction::execute( SLIInterpreter* i ) const void OstrstreamFunction::execute( SLIInterpreter* i ) const { -// call: ostrstream -> ostrstream true -// -> false + // call: ostrstream -> ostrstream true + // -> false #ifdef HAVE_SSTREAM std::ostringstream* out = new std::ostringstream(); diff --git a/sli/slimodule.h b/sli/slimodule.h index 9158db2360..4f60855863 100644 --- a/sli/slimodule.h +++ b/sli/slimodule.h @@ -36,7 +36,7 @@ class Dictionary; class SLIModule { public: - virtual ~SLIModule(){}; + virtual ~SLIModule() {}; /** * Initialize the module. diff --git a/sli/slistartup.h b/sli/slistartup.h index 7c69175be9..6ae3ec7d42 100644 --- a/sli/slistartup.h +++ b/sli/slistartup.h @@ -27,9 +27,9 @@ #include // Generated includes: +#include "config.h" #include "dirent.h" #include "errno.h" -#include "config.h" // Includes from libnestutil: #include "compose.hpp" diff --git a/sli/specialfunctionsmodule.cc b/sli/specialfunctionsmodule.cc index de132b4e4c..0347617d21 100644 --- a/sli/specialfunctionsmodule.cc +++ b/sli/specialfunctionsmodule.cc @@ -69,7 +69,7 @@ SpecialFunctionsModule::name( void ) const void SpecialFunctionsModule::init( SLIInterpreter* i ) { -// Do whatever initialization is needed, then... + // Do whatever initialization is needed, then... #ifdef HAVE_GSL // turn error handler off, so that errors in GSL functions diff --git a/sli/specialfunctionsmodule.h b/sli/specialfunctionsmodule.h index ad74b39864..6a070c720d 100644 --- a/sli/specialfunctionsmodule.h +++ b/sli/specialfunctionsmodule.h @@ -53,7 +53,7 @@ class SpecialFunctionsModule : public SLIModule // Part 1: Methods pertaining to the module ---------------------- public: - SpecialFunctionsModule( void ){}; + SpecialFunctionsModule( void ) {}; // ~SpecialFunctionsModule(void); // The Module is registered by a call to this Function: diff --git a/sli/tarrayobj.cc b/sli/tarrayobj.cc index 35bfa242b1..5ea33d932b 100644 --- a/sli/tarrayobj.cc +++ b/sli/tarrayobj.cc @@ -145,7 +145,8 @@ TokenArrayObj::resize( size_t s, const Token& t ) resize( s, alloc_block_size, t ); } -const TokenArrayObj& TokenArrayObj::operator=( const TokenArrayObj& a ) +const TokenArrayObj& +TokenArrayObj::operator=( const TokenArrayObj& a ) { if ( capacity() >= a.size() ) // This branch also covers the case where a is the null-vector. @@ -338,7 +339,7 @@ TokenArrayObj::reduce( Token* first, Token* last ) // First step: shift all elements to the begin of // the array. - Token* i = p, * j = first; + Token *i = p, *j = first; if ( first > begin() ) { @@ -613,7 +614,8 @@ TokenArrayObj::append_move( TokenArrayObj& a ) } -bool TokenArrayObj::operator==( const TokenArrayObj& a ) const +bool +TokenArrayObj::operator==( const TokenArrayObj& a ) const { // std::cout << "comparison of TokenArrayObj" << std::endl; @@ -636,7 +638,7 @@ bool TokenArrayObj::operator==( const TokenArrayObj& a ) const return false; } - Token* i = begin(), * j = a.begin(); + Token *i = begin(), *j = a.begin(); while ( i < end() ) { if ( not( *i++ == *j++ ) ) @@ -688,7 +690,8 @@ TokenArrayObj::valid( void ) const } -std::ostream& operator<<( std::ostream& out, const TokenArrayObj& a ) +std::ostream& +operator<<( std::ostream& out, const TokenArrayObj& a ) { for ( Token* i = a.begin(); i < a.end(); ++i ) diff --git a/sli/tarrayobj.h b/sli/tarrayobj.h index cb39d6efeb..d9f00096f4 100644 --- a/sli/tarrayobj.h +++ b/sli/tarrayobj.h @@ -58,7 +58,7 @@ class TokenArrayObj , begin_of_free_storage( NULL ) , end_of_free_storage( NULL ) , alloc_block_size( ARRAY_ALLOC_SIZE ) - , refs_( 1 ){}; + , refs_( 1 ) {}; TokenArrayObj( size_t, const Token& = Token(), size_t = 0 ); TokenArrayObj( const TokenArrayObj& ); diff --git a/sli/token.cc b/sli/token.cc index 75945f4b56..7b1c64688c 100644 --- a/sli/token.cc +++ b/sli/token.cc @@ -175,7 +175,8 @@ Token::pprint( std::ostream& out ) const } } -std::ostream& operator<<( std::ostream& out, const Token& c ) +std::ostream& +operator<<( std::ostream& out, const Token& c ) { if ( not c ) { diff --git a/sli/token.h b/sli/token.h index 831dd3737f..375efcde31 100644 --- a/sli/token.h +++ b/sli/token.h @@ -396,7 +396,8 @@ class Token } - Token& operator=( const Token& c_s ) + Token& + operator=( const Token& c_s ) { if ( c_s.p == p ) { @@ -417,7 +418,8 @@ class Token return *this; } - Token& operator=( Datum* p_s ) + Token& + operator=( Datum* p_s ) { if ( p != p_s ) { @@ -432,7 +434,8 @@ class Token } - bool operator==( const Token& t ) const + bool + operator==( const Token& t ) const { if ( p == t.p ) { @@ -443,7 +446,8 @@ class Token } // define != explicitly --- HEP 2001-08-09 - bool operator!=( const Token& t ) const + bool + operator!=( const Token& t ) const { return not( *this == t ); } diff --git a/sli/tokenarray.cc b/sli/tokenarray.cc index 8a4059d475..b3a4237d2d 100644 --- a/sli/tokenarray.cc +++ b/sli/tokenarray.cc @@ -29,7 +29,8 @@ #include "tokenutils.h" -const TokenArray& TokenArray::operator=( const TokenArray& a ) +const TokenArray& +TokenArray::operator=( const TokenArray& a ) { a.data->add_reference(); // protect from a=a data->remove_reference(); @@ -173,7 +174,8 @@ TokenArray::valid( void ) const } -std::ostream& operator<<( std::ostream& out, const TokenArray& a ) +std::ostream& +operator<<( std::ostream& out, const TokenArray& a ) { for ( Token* t = a.begin(); t < a.end(); ++t ) diff --git a/sli/tokenarray.h b/sli/tokenarray.h index 846101b346..777f9f531b 100644 --- a/sli/tokenarray.h +++ b/sli/tokenarray.h @@ -107,7 +107,7 @@ class TokenArray public: TokenArray( void ) - : data( new TokenArrayObj() ){}; + : data( new TokenArrayObj() ) {}; explicit TokenArray( size_t n, const Token& t = Token(), size_t alloc = 128 ) : data( new TokenArrayObj( n, t, alloc ) ) @@ -289,7 +289,8 @@ class TokenArray data->push_back_move( t ); } - void assign_move( size_t i, Token& t ) // 8.4.98 Diesmann + void + assign_move( size_t i, Token& t ) // 8.4.98 Diesmann { clone(); data->assign_move( data->begin() + i, t ); @@ -311,7 +312,8 @@ class TokenArray } } - void insert_move( size_t i, TokenArray& a ) // 8.4.98 Diesmann + void + insert_move( size_t i, TokenArray& a ) // 8.4.98 Diesmann { clone(); // make copy if others point to representation a.clone(); // also for a because we are going to empy it @@ -425,7 +427,8 @@ class TokenArray const TokenArray& operator=( const std::vector< long >& ); const TokenArray& operator=( const std::vector< double >& ); - bool operator==( const TokenArray& a ) const + bool + operator==( const TokenArray& a ) const { return *data == *a.data; } diff --git a/sli/tokenstack.h b/sli/tokenstack.h index 4a70ff0f60..b3d9af7c72 100644 --- a/sli/tokenstack.h +++ b/sli/tokenstack.h @@ -98,7 +98,8 @@ class TokenStack : private TokenArrayObj pop_back(); } - void pop_move( Token& e ) // new one 5.5.97 + void + pop_move( Token& e ) // new one 5.5.97 { e.move( *( end() - 1 ) ); pop_back(); diff --git a/sli/triedatum.h b/sli/triedatum.h index 835ae86e3b..42c9829d19 100644 --- a/sli/triedatum.h +++ b/sli/triedatum.h @@ -133,7 +133,8 @@ class TrieDatum : public TypedDatum< &SLIInterpreter::Trietype > return tree; } - static void* operator new( size_t size ) + static void* + operator new( size_t size ) { if ( size != memory.size_of() ) { @@ -142,7 +143,8 @@ class TrieDatum : public TypedDatum< &SLIInterpreter::Trietype > return memory.alloc(); } - static void operator delete( void* p, size_t size ) + static void + operator delete( void* p, size_t size ) { if ( p == NULL ) { diff --git a/sli/typechk.h b/sli/typechk.h index 1adba8b28f..a6214440dd 100644 --- a/sli/typechk.h +++ b/sli/typechk.h @@ -257,7 +257,8 @@ TypeTrie::lookup( const TokenStack& st ) const } -inline bool TypeTrie::operator==( const TypeTrie& tt ) const +inline bool +TypeTrie::operator==( const TypeTrie& tt ) const { return ( root == tt.root ); } diff --git a/testsuite/cpptests/run_all.cpp b/testsuite/cpptests/run_all.cpp index c5a925ee9d..1227cb26be 100644 --- a/testsuite/cpptests/run_all.cpp +++ b/testsuite/cpptests/run_all.cpp @@ -27,7 +27,7 @@ // Includes from cpptests #include "test_block_vector.h" #include "test_enum_bitfield.h" +#include "test_parameter.h" #include "test_sort.h" #include "test_streamers.h" #include "test_target_fields.h" -#include "test_parameter.h" diff --git a/testsuite/cpptests/test_streamers.h b/testsuite/cpptests/test_streamers.h index 9a17fb80b8..27af4f0daa 100644 --- a/testsuite/cpptests/test_streamers.h +++ b/testsuite/cpptests/test_streamers.h @@ -27,8 +27,8 @@ #include // C++ includes: -#include #include +#include // Includes from libnestutil: #include "streamers.h" From 7112cbc682039bf12381a43ced9d83b108577b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 10 Mar 2022 15:32:19 +0100 Subject: [PATCH 028/375] Reverted test order --- testsuite/cpptests/run_all.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/cpptests/run_all.cpp b/testsuite/cpptests/run_all.cpp index 1227cb26be..c5a925ee9d 100644 --- a/testsuite/cpptests/run_all.cpp +++ b/testsuite/cpptests/run_all.cpp @@ -27,7 +27,7 @@ // Includes from cpptests #include "test_block_vector.h" #include "test_enum_bitfield.h" -#include "test_parameter.h" #include "test_sort.h" #include "test_streamers.h" #include "test_target_fields.h" +#include "test_parameter.h" From 45fa2e71b7f3074fc10603e6d9db72400603d4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 11 Mar 2022 14:02:52 +0100 Subject: [PATCH 029/375] Moved new api to nestkernel_api cython files --- pynest/CMakeLists.txt | 24 +++ pynest/nest/lib/hl_api_connections.py | 3 +- pynest/nest/lib/hl_api_nodes.py | 3 +- pynest/nest/lib/hl_api_simulation.py | 48 +++--- pynest/nest/lib/hl_api_types.py | 35 +++-- pynest/nest/ll_api.py | 1 + pynest/nestkernel_api.pxd | 96 ++++++++++++ pynest/nestkernel_api.pyx | 201 ++++++++++++++++++++++++++ pynest/pynestkernel.pyx | 149 ------------------- 9 files changed, 377 insertions(+), 183 deletions(-) create mode 100644 pynest/nestkernel_api.pxd create mode 100644 pynest/nestkernel_api.pyx diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt index 0dc6117641..20778cb3d9 100644 --- a/pynest/CMakeLists.txt +++ b/pynest/CMakeLists.txt @@ -24,8 +24,12 @@ if ( HAVE_PYTHON ) set_source_files_properties( pynestkernel.pyx PROPERTIES CYTHON_IS_CXX TRUE ) + set_source_files_properties( + nestkernel_api.pyx + PROPERTIES CYTHON_IS_CXX TRUE ) cython_add_module( pynestkernel pynestkernel.pyx ) + cython_add_module( nestkernel_api nestkernel_api.pyx ) else () # require the source pynest/pynestkernel.cxx precompiled set( pynestkernel_generated_file "NOTFOUND" ) @@ -58,6 +62,11 @@ if ( HAVE_PYTHON ) ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES} ) + target_link_libraries( nestkernel_api + nest_lib nestutil nestkernel sli_lib + ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES} + ) + target_include_directories( pynestkernel PRIVATE ${PROJECT_BINARY_DIR}/libnestutil ${PROJECT_SOURCE_DIR}/libnestutil @@ -69,16 +78,31 @@ if ( HAVE_PYTHON ) ${SLI_MODULE_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) + target_include_directories( nestkernel_api PRIVATE + ${PROJECT_BINARY_DIR}/libnestutil + ${PROJECT_SOURCE_DIR}/libnestutil + ${PROJECT_SOURCE_DIR}/pynest + ${PROJECT_SOURCE_DIR}/nestkernel + ${PROJECT_SOURCE_DIR}/nestkernel/spatial + ${PROJECT_SOURCE_DIR}/sli + ${PROJECT_SOURCE_DIR}/thirdparty + ${SLI_MODULE_INCLUDE_DIRS} + ${Python_INCLUDE_DIRS} + ) target_compile_definitions( pynestkernel PRIVATE -D_IS_PYNEST ) + target_compile_definitions( nestkernel_api PRIVATE + -D_IS_PYNEST + ) install(DIRECTORY nest/ ${PROJECT_BINARY_DIR}/pynest/nest/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest PATTERN "versionchecker.py.in" EXCLUDE ) install( TARGETS pynestkernel DESTINATION ${PYEXECDIR}/nest/ ) + install( TARGETS nestkernel_api DESTINATION ${PYEXECDIR}/nest/ ) install( CODE " execute_process( COMMAND ${PYTHON} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install_egg_info diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py index cb39fed6be..60f88bb762 100644 --- a/pynest/nest/lib/hl_api_connections.py +++ b/pynest/nest/lib/hl_api_connections.py @@ -27,6 +27,7 @@ from ..ll_api import * from .. import pynestkernel as kernel +from .. import nestkernel_api as nestkernel from .hl_api_connection_helpers import (_process_input_nodes, _connect_layers_needed, _connect_spatial, _process_conn_spec, @@ -279,7 +280,7 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, _connect_spatial(pre, post, spatial_projections) else: # sps(processed_conn_spec) - kernel.llapi_connect(pre._datum, post._datum, processed_conn_spec, processed_syn_spec) + nestkernel.llapi_connect(pre._datum, post._datum, processed_conn_spec, processed_syn_spec) # sr('Connect') if return_synapsecollection: diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index 6dbbd9b09b..094ef3ce23 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -28,6 +28,7 @@ import nest from ..ll_api import * from .. import pynestkernel as kernel +from .. import nestkernel_api as nestkernel from .hl_api_helper import * from .hl_api_info import SetStatus from .hl_api_types import NodeCollection, Parameter @@ -119,7 +120,7 @@ def Create(model, n=1, params=None, positions=None): if isinstance(params, dict) and params: # if params is a dict and not empty iterable_or_parameter_in_params = any(is_iterable(v) or isinstance(v, Parameter) for k, v in params.items()) - node_ids = kernel.llapi_create(model.encode('utf8'), n) + node_ids = nestkernel.llapi_create(model.encode('utf8'), n) if params is not None and iterable_or_parameter_in_params: try: diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index ef5ffef0e7..d1aea7179e 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -27,6 +27,7 @@ import warnings from .. import pynestkernel as kernel +from .. import nestkernel_api as nestkernel from ..ll_api import * from .hl_api_helper import * @@ -62,7 +63,7 @@ def Simulate(t): """ - kernel.llapi_simulate(t) + nestkernel.llapi_simulate(t) @check_stack @@ -193,7 +194,7 @@ def ResetKernel(): unloaded. This may change in a future version of NEST. """ - kernel.llapi_reset_kernel() + nestkernel.llapi_reset_kernel() @check_stack @@ -220,26 +221,27 @@ def SetKernelStatus(params): # imported via hl_api during initialization, we can't put the import on # the module level, but have to have it on the function level. import nest # noqa - raise_errors = params.get('dict_miss_is_error', nest.dict_miss_is_error) - valids = nest._kernel_attr_names - readonly = nest._readonly_kernel_attrs - keys = list(params.keys()) - for key in keys: - msg = None - if key not in valids: - msg = f'`{key}` is not a valid kernel parameter, ' + \ - 'valid parameters are: ' + \ - ', '.join(f"'{p}'" for p in sorted(valids)) - elif key in readonly: - msg = f'`{key}` is a readonly kernel parameter' - if msg is not None: - if raise_errors: - raise ValueError(msg) - else: - warnings.warn(msg + f' \n`{key}` has been ignored') - del params[key] - - kernel.llapi_set_kernel_status(params) + # TODO-PYNEST-NG: Enable again when KernelAttribute works + # raise_errors = params.get('dict_miss_is_error', nest.dict_miss_is_error) + # valids = nest._kernel_attr_names + # readonly = nest._readonly_kernel_attrs + # keys = list(params.keys()) + # for key in keys: + # msg = None + # if key not in valids: + # msg = f'`{key}` is not a valid kernel parameter, ' + \ + # 'valid parameters are: ' + \ + # ', '.join(f"'{p}'" for p in sorted(valids)) + # elif key in readonly: + # msg = f'`{key}` is a readonly kernel parameter' + # if msg is not None: + # if raise_errors: + # raise ValueError(msg) + # else: + # warnings.warn(msg + f' \n`{key}` has been ignored') + # del params[key] + + nestkernel.llapi_set_kernel_status(params) @check_stack @@ -278,7 +280,7 @@ def GetKernelStatus(keys=None): """ - status_root = kernel.llapi_get_kernel_status() + status_root = nestkernel.llapi_get_kernel_status() if keys is None: return status_root diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 960209edcc..1eb2507d40 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -23,14 +23,31 @@ Classes defining the different PyNEST types """ +import numpy +from math import floor, log +import json from ..ll_api import * from .. import pynestkernel as kernel +from .. import nestkernel_api as nestkernel from .hl_api_helper import * from .hl_api_simulation import GetKernelStatus -import numpy -import json -from math import floor, log + +def sli_func(*args, **kwargs): + raise RuntimeError(f'Called sli_func with\nargs: {args}\nkwargs: {kwargs}') + + +def sli_run(*args, **kwargs): + raise RuntimeError(f'Called sli_run with\nargs: {args}\nkwargs: {kwargs}') + + +def sps(*args, **kwargs): + raise RuntimeError(f'Called sps with\nargs: {args}\nkwargs: {kwargs}') + + +def sr(*args, **kwargs): + raise RuntimeError(f'Called sr with\nargs: {args}\nkwargs: {kwargs}') + try: import pandas @@ -193,7 +210,7 @@ def __init__(self, data=None): # Data from user, must be converted to datum # Data can be anything that can be converted to a NodeCollection, # such as list, tuple, etc. - nc = kernel.llapi_make_nodecollection(data) # TODO-PYNEST-NG: implement + nc = nestkernel.llapi_make_nodecollection(data) # TODO-PYNEST-NG: implement self._datum = nc._datum def __iter__(self): @@ -223,7 +240,7 @@ def __getitem__(self, key): if step < 1: raise IndexError('slicing step for NodeCollection must be strictly positive') - return kernel.llapi_slice(self._datum, start, stop, step) + return nestkernel.llapi_slice(self._datum, start, stop, step) elif isinstance(key, (int, numpy.integer)): if abs(key + (key >= 0)) > self.__len__(): raise IndexError('index value outside of the NodeCollection') @@ -279,10 +296,10 @@ def __neq__(self, other): return not self == other def __len__(self): - return kernel.llapi_nc_size(self._datum) + return nestkernel.llapi_nc_size(self._datum) def __str__(self): - return kernel.llapi_to_string(self._datum).decode('utf8') + return nestkernel.llapi_to_string(self._datum).decode('utf8') def __repr__(self): return self.__str__() @@ -375,7 +392,7 @@ def get(self, *params, **kwargs): if len(params) == 0: # get() is called without arguments - result = kernel.llapi_get_nc_status(self._datum) + result = nestkernel.llapi_get_nc_status(self._datum) elif len(params) == 1: # params is a tuple with a string or list of strings result = get_parameters(self, params[0]) @@ -461,7 +478,7 @@ def set(self, params=None, **kwargs): if (isinstance(params, (list, tuple)) and self.__len__() != len(params)): raise TypeError("status dict must be a dict, or a list of dicts of length {} ".format(self.__len__())) - kernel.llapi_set_nc_status(self._datum, params) + nestkernel.llapi_set_nc_status(self._datum, params) def tolist(self): """ diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py index 4ab0619581..0ed417a6b9 100644 --- a/pynest/nest/ll_api.py +++ b/pynest/nest/ll_api.py @@ -47,6 +47,7 @@ sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL) from . import pynestkernel as kernel # noqa +from . import nestkernel_api as nestkernel # noqa __all__ = [ 'check_stack', diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd new file mode 100644 index 0000000000..060caed6ac --- /dev/null +++ b/pynest/nestkernel_api.pxd @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +# +# ll_api.pxd +# +# This file is part of NEST. +# +# Copyright (C) 2004 The NEST Initiative +# +# NEST is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# NEST is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with NEST. If not, see . + +from libcpp cimport bool as cbool + +from libcpp.string cimport string +from libcpp.vector cimport vector +from libcpp.utility cimport pair + +from cpython.ref cimport PyObject + +cdef extern from "node_collection.h" namespace "nest": + cppclass NodeCollectionPTR: + NodeCollectionPTR() + +cdef extern from "node_collection.h": + cppclass NodeCollectionDatum: + NodeCollectionDatum(const NodeCollectionDatum&) + + cppclass NodeCollectionIteratorDatum: + NodeCollectionIteratorDatum(const NodeCollectionIteratorDatum&) + +cdef extern from "dictionary.h" namespace "boost": + cppclass any: + any() + any& operator=[T](T&) + T any_cast[T](any& operand) + +cdef extern from "dictionary.h": + cppclass dictionary: + dictionary() + # ctypedef key_type + # ctypedef mapped_type + any& operator[](const string&) + cppclass const_iterator: + pair[string, any]& operator*() + const_iterator operator++() + bint operator==(const const_iterator&) + bint operator!=(const const_iterator&) + const_iterator begin() + const_iterator end() + string debug_type(const any&) + cbool is_int(const any&) + cbool is_long(const any&) + cbool is_size_t(const any&) + cbool is_double(const any&) + cbool is_bool(const any&) + cbool is_string(const any&) + cbool is_int_vector(const any&) + cbool is_double_vector(const any&) + cbool is_string_vector(const any&) + cbool is_any_vector(const any&) + cbool is_dict(const any&) + +cdef extern from "nest.h" namespace "nest": + void init_nest( int* argc, char** argv[] ) + void reset_kernel() + NodeCollectionPTR create( const string model_name, const long n ) except + + + NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except + + + NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) except + + void connect(NodeCollectionPTR sources, + NodeCollectionPTR targets, + const dictionary& connectivity, + const vector[dictionary]& synapse_params ) except + + string pprint_to_string( NodeCollectionPTR nc ) + size_t nc_size( NodeCollectionPTR nc ) + dictionary get_kernel_status() + void set_kernel_status( const dictionary& ) except + + dictionary get_nc_status( NodeCollectionPTR nc ) + void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + + void simulate( const double& t ) + +cdef extern from "nest.h" namespace "nest": + # Datum* node_collection_array_index(const Datum* node_collection, const long* array, unsigned long n) except + + # Datum* node_collection_array_index(const Datum* node_collection, const cbool* array, unsigned long n) except + + void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx new file mode 100644 index 0000000000..c1e434efab --- /dev/null +++ b/pynest/nestkernel_api.pyx @@ -0,0 +1,201 @@ +# -*- coding: utf-8 -*- +# +# ll_api.pyx +# +# This file is part of NEST. +# +# Copyright (C) 2004 The NEST Initiative +# +# NEST is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# NEST is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with NEST. If not, see . +# +# distutils: language = c++ +# + +import cython + +# from libc.stdlib cimport malloc, free +# from libc.string cimport memcpy + +from libcpp.string cimport string +from libcpp.vector cimport vector + +from cython.operator cimport dereference as deref +from cython.operator cimport preincrement as inc + +# from cpython cimport array + +# from cpython.ref cimport PyObject +# from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE + +import nest +from nest.lib.hl_api_exceptions import NESTMappedException, NESTErrors, NESTError + + +cdef class NodeCollectionObject(object): + + cdef NodeCollectionPTR thisptr + + def __repr__(self): + return "" + + cdef _set_nc(self, NodeCollectionPTR nc): + self.thisptr = nc + + # cdef _get_ptr(self): + # return self.thisptr + + +cdef object any_vector_to_list(vector[any] cvec): + cdef tmp = [] + cdef vector[any].iterator it = cvec.begin() + while it != cvec.end(): + tmp.append(any_to_pyobj(deref(it))) + inc(it) + return tmp + + +cdef object any_to_pyobj(any operand): + if is_int(operand): + return any_cast[int](operand) + if is_long(operand): + return any_cast[long](operand) + if is_size_t(operand): + return any_cast[size_t](operand) + if is_double(operand): + return any_cast[double](operand) + if is_bool(operand): + return any_cast[cbool](operand) + if is_string(operand): + return any_cast[string](operand) + if is_int_vector(operand): + return any_cast[vector[int]](operand) + if is_double_vector(operand): + return any_cast[vector[double]](operand) + if is_string_vector(operand): + return any_cast[vector[string]](operand) + if is_any_vector(operand): + return tuple(any_vector_to_list(any_cast[vector[any]](operand))) + if is_dict(operand): + return dictionary_to_pydict(any_cast[dictionary](operand)) + +cdef object dictionary_to_pydict(dictionary cdict): + cdef tmp = {} + + cdef dictionary.const_iterator it = cdict.begin() + while it != cdict.end(): + tmp[deref(it).first.decode('utf8')] = any_to_pyobj(deref(it).second) + if tmp[deref(it).first.decode('utf8')] is None: + print('Could not convert: ' + deref(it).first.decode('utf8') + ' of type ' + debug_type(deref(it).second).decode('utf8')) + inc(it) + return tmp + +cdef dictionary pydict_to_dictionary(object py_dict): + cdef dictionary cdict = dictionary() + for key, value in py_dict.items(): + if isinstance(value, int): + cdict[key.encode('utf-8')] = value + elif isinstance(value, float): + cdict[key.encode('utf-8')] = value + elif isinstance(value, str): + cdict[key.encode('utf-8')] = value.encode('utf-8') + else: + raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') + return cdict + +# cdef object vec_of_dict_to_list(vector[dictionary] cvec): +# cdef tmp = [] +# cdef vector[dictionary].iterator it = cvec.begin() +# while it != cvec.end(): +# tmp.append(dictionary_to_pydict(deref(it))) +# inc(it) +# return tmp + +def llapi_reset_kernel(): + reset_kernel() + +def llapi_create(string model, long n): + cdef NodeCollectionPTR gids + try: + gids = create(model, n) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_create', '') from None + obj = NodeCollectionObject() + obj._set_nc(gids) + return nest.NodeCollection(obj) + +def llapi_make_nodecollection(object node_ids): + cdef NodeCollectionPTR gids + try: + gids = make_nodecollection(node_ids) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_make_nodecollection', '') from None + obj = NodeCollectionObject() + obj._set_nc(gids) + return nest.NodeCollection(obj) + +def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params): + cdef vector[dictionary] syn_param_vec + if synapse_params is not None: + syn_param_vec.push_back(pydict_to_dictionary(synapse_params)) + + connect(pre.thisptr, post.thisptr, + pydict_to_dictionary(conn_params), + syn_param_vec) + +def llapi_slice(NodeCollectionObject nc, long start, long stop, long step): + cdef NodeCollectionPTR nc_ptr + try: + nc_ptr = slice_nc(nc.thisptr, start, stop, step) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_slice', '') from None + obj = NodeCollectionObject() + obj._set_nc(nc_ptr) + return nest.NodeCollection(obj) + +def llapi_nc_size(NodeCollectionObject nc): + return nc_size(nc.thisptr) + +def llapi_to_string(NodeCollectionObject nc): + return pprint_to_string(nc.thisptr) + +def llapi_get_kernel_status(): + cdef dictionary cdict = get_kernel_status() + return dictionary_to_pydict(cdict) + +def llapi_set_kernel_status(object params): + cdef dictionary params_dict = pydict_to_dictionary(params) + try: + set_kernel_status(params_dict) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_set_kernel_status', '') from None + +def llapi_simulate(float t): + simulate(t) + +def llapi_get_nc_status(NodeCollectionObject nc): + cdef dictionary statuses = get_nc_status(nc.thisptr) + # return vec_of_dict_to_list(statuses) + return dictionary_to_pydict(statuses) + +def llapi_set_nc_status(NodeCollectionObject nc, object params): + cdef dictionary params_dict = pydict_to_dictionary(params) + try: + set_nc_status(nc.thisptr, params_dict) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_set_nc_status', '') from None diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index 874a2a7659..d9bcdd7aa9 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -601,152 +601,3 @@ cdef inline object sli_vector_to_object(sli_vector_ptr_t dat, vector_value_t _ = return numpy.array([], dtype=ret_dtype) else: return arr - -################################################################################ -#### #### -#### PyNEST LL API #### -#### #### -################################################################################ -cdef object any_vector_to_list(vector[any] cvec): - cdef tmp = [] - cdef vector[any].iterator it = cvec.begin() - while it != cvec.end(): - tmp.append(any_to_pyobj(deref(it))) - inc(it) - return tmp - - -cdef object any_to_pyobj(any operand): - if is_int(operand): - return any_cast[int](operand) - if is_long(operand): - return any_cast[long](operand) - if is_size_t(operand): - return any_cast[size_t](operand) - if is_double(operand): - return any_cast[double](operand) - if is_bool(operand): - return any_cast[cbool](operand) - if is_string(operand): - return any_cast[string](operand) - if is_int_vector(operand): - return any_cast[vector[int]](operand) - if is_double_vector(operand): - return any_cast[vector[double]](operand) - if is_string_vector(operand): - return any_cast[vector[string]](operand) - if is_any_vector(operand): - return tuple(any_vector_to_list(any_cast[vector[any]](operand))) - if is_dict(operand): - return dictionary_to_pydict(any_cast[dictionary](operand)) - -cdef object dictionary_to_pydict(dictionary cdict): - cdef tmp = {} - - cdef dictionary.const_iterator it = cdict.begin() - while it != cdict.end(): - tmp[deref(it).first.decode('utf8')] = any_to_pyobj(deref(it).second) - if tmp[deref(it).first.decode('utf8')] is None: - print('Could not convert: ' + deref(it).first.decode('utf8') + ' of type ' + debug_type(deref(it).second).decode('utf8')) - inc(it) - return tmp - -cdef dictionary pydict_to_dictionary(object py_dict): - cdef dictionary cdict = dictionary() - for key, value in py_dict.items(): - if isinstance(value, int): - cdict[key.encode('utf-8')] = value - elif isinstance(value, float): - cdict[key.encode('utf-8')] = value - elif isinstance(value, str): - cdict[key.encode('utf-8')] = value.encode('utf-8') - else: - raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') - return cdict - -# cdef object vec_of_dict_to_list(vector[dictionary] cvec): -# cdef tmp = [] -# cdef vector[dictionary].iterator it = cvec.begin() -# while it != cvec.end(): -# tmp.append(dictionary_to_pydict(deref(it))) -# inc(it) -# return tmp - -def llapi_reset_kernel(): - reset_kernel() - -def llapi_create(string model, long n): - cdef NodeCollectionPTR gids - try: - gids = create(model, n) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_create', '') from None - obj = NodeCollectionObject() - obj._set_nc(gids) - return nest.NodeCollection(obj) - -def llapi_make_nodecollection(object node_ids): - cdef NodeCollectionPTR gids - try: - gids = make_nodecollection(node_ids) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_make_nodecollection', '') from None - obj = NodeCollectionObject() - obj._set_nc(gids) - return nest.NodeCollection(obj) - -def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params): - cdef vector[dictionary] syn_param_vec - if synapse_params is not None: - syn_param_vec.push_back(pydict_to_dictionary(synapse_params)) - - connect(pre.thisptr, post.thisptr, - pydict_to_dictionary(conn_params), - syn_param_vec) - -def llapi_slice(NodeCollectionObject nc, long start, long stop, long step): - cdef NodeCollectionPTR nc_ptr - try: - nc_ptr = slice_nc(nc.thisptr, start, stop, step) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_slice', '') from None - obj = NodeCollectionObject() - obj._set_nc(nc_ptr) - return nest.NodeCollection(obj) - -def llapi_nc_size(NodeCollectionObject nc): - return nc_size(nc.thisptr) - -def llapi_to_string(NodeCollectionObject nc): - return pprint_to_string(nc.thisptr) - -def llapi_get_kernel_status(): - cdef dictionary cdict = get_kernel_status() - return dictionary_to_pydict(cdict) - -def llapi_set_kernel_status(object params): - cdef dictionary params_dict = pydict_to_dictionary(params) - try: - set_kernel_status(params_dict) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_set_kernel_status', '') from None - -def llapi_simulate(float t): - simulate(t) - -def llapi_get_nc_status(NodeCollectionObject nc): - cdef dictionary statuses = get_nc_status(nc.thisptr) - # return vec_of_dict_to_list(statuses) - return dictionary_to_pydict(statuses) - -def llapi_set_nc_status(NodeCollectionObject nc, object params): - cdef dictionary params_dict = pydict_to_dictionary(params) - try: - set_nc_status(nc.thisptr, params_dict) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_set_nc_status', '') from None From b95e3ce2900372651b32df3e1de5ec0016297878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 11 Mar 2022 14:03:41 +0100 Subject: [PATCH 030/375] Fixed type checking and exception handling in pydict_to_dictionary() --- pynest/nestkernel_api.pyx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index c1e434efab..1608ced41f 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -100,14 +100,16 @@ cdef object dictionary_to_pydict(dictionary cdict): inc(it) return tmp -cdef dictionary pydict_to_dictionary(object py_dict): +cdef dictionary pydict_to_dictionary(object py_dict) except *: cdef dictionary cdict = dictionary() for key, value in py_dict.items(): - if isinstance(value, int): + if type(value) is int: cdict[key.encode('utf-8')] = value - elif isinstance(value, float): + elif type(value) is float: cdict[key.encode('utf-8')] = value - elif isinstance(value, str): + elif type(value) is bool: + cdict[key.encode('utf-8')] = value + elif type(value) is str: cdict[key.encode('utf-8')] = value.encode('utf-8') else: raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') From 62b13c0dcc7df58051f307858129efcc6c3cef10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 11 Mar 2022 14:09:13 +0100 Subject: [PATCH 031/375] Removed debug output --- nestkernel/model_manager.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index 4547bc799b..b75d93cbec 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -104,7 +104,6 @@ ModelManager::initialize() models_.push_back( pristine_models_[ i ].first->clone( name ) ); if ( not pristine_models_[ i ].second ) { - std::cerr << name << " " << i << "\n"; modeldict_[ name ] = i; } } From 966ac00a9d37a2d10921646729469e36e03cdd9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 11 Mar 2022 16:01:09 +0100 Subject: [PATCH 032/375] Moved take_array_index() to nestkernel_api --- nestkernel/nest.cpp | 14 +++--- nestkernel/nest.h | 5 +- pynest/nest/lib/hl_api_types.py | 6 +-- pynest/nest/ll_api.py | 4 +- pynest/nestkernel_api.pxd | 4 +- pynest/nestkernel_api.pyx | 37 +++++++++++++++ pynest/pynestkernel.pxd | 4 +- pynest/pynestkernel.pyx | 82 ++++++++++++++------------------- 8 files changed, 88 insertions(+), 68 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 0f0b54653a..90f5af94c6 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -560,10 +560,9 @@ apply( const ParameterDatum& param, const dictionary& positions ) return {}; } -Datum* -node_collection_array_index( const Datum* datum, const long* array, unsigned long n ) +NodeCollectionPTR +node_collection_array_index( NodeCollectionPTR node_collection, const long* array, unsigned long n ) { - const NodeCollectionDatum node_collection = *dynamic_cast< const NodeCollectionDatum* >( datum ); assert( node_collection->size() >= n ); std::vector< index > node_ids; node_ids.reserve( n ); @@ -572,13 +571,12 @@ node_collection_array_index( const Datum* datum, const long* array, unsigned lon { node_ids.push_back( node_collection->operator[]( *node_ptr ) ); } - return new NodeCollectionDatum( NodeCollection::create( node_ids ) ); + return NodeCollection::create( node_ids ); } -Datum* -node_collection_array_index( const Datum* datum, const bool* array, unsigned long n ) +NodeCollectionPTR +node_collection_array_index( NodeCollectionPTR node_collection, const bool* array, unsigned long n ) { - const NodeCollectionDatum node_collection = *dynamic_cast< const NodeCollectionDatum* >( datum ); assert( node_collection->size() == n ); std::vector< index > node_ids; node_ids.reserve( n ); @@ -591,7 +589,7 @@ node_collection_array_index( const Datum* datum, const bool* array, unsigned lon node_ids.push_back( ( *nc_it ).node_id ); } } - return new NodeCollectionDatum( NodeCollection::create( node_ids ) ); + return NodeCollection::create( node_ids ); } diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 4a3ca8a33f..0804673a9d 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -225,9 +225,8 @@ bool is_spatial( const ParameterDatum& param ); std::vector< double > apply( const ParameterDatum& param, const NodeCollectionDatum& nc ); std::vector< double > apply( const ParameterDatum& param, const dictionary& positions ); -Datum* node_collection_array_index( const Datum* datum, const long* array, unsigned long n ); -Datum* node_collection_array_index( const Datum* datum, const bool* array, unsigned long n ); - +NodeCollectionPTR node_collection_array_index( NodeCollectionPTR node_collection, const long* array, unsigned long n ); +NodeCollectionPTR node_collection_array_index( NodeCollectionPTR node_collection, const bool* array, unsigned long n ); template < class T > inline bool diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 1eb2507d40..51846b5fb1 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -204,7 +204,7 @@ class NodeCollection(object): def __init__(self, data=None): if data is None: data = [] - if isinstance(data, kernel.NodeCollectionObject): + if isinstance(data, nestkernel.NodeCollectionObject): self._datum = data else: # Data from user, must be converted to datum @@ -260,7 +260,7 @@ def __getitem__(self, key): raise ValueError('All node IDs in a NodeCollection have to be unique') else: raise TypeError('Indices must be integers or bools') - return take_array_index(self._datum, np_key) + return nestkernel.llapi_take_array_index(self._datum, np_key) elif isinstance(key, numpy.ndarray): if len(key) == 0: return NodeCollection([]) @@ -273,7 +273,7 @@ def __getitem__(self, key): raise IndexError('Bool index array must be the same length as NodeCollection') if not is_booltype and len(numpy.unique(key)) != len(key): raise ValueError('All node IDs in a NodeCollection have to be unique') - return take_array_index(self._datum, key) + return nestkernel.llapi_(self._datum, key) else: raise IndexError('only integers, slices, lists, tuples, and numpy arrays are valid indices') diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py index 0ed417a6b9..f170a0035d 100644 --- a/pynest/nest/ll_api.py +++ b/pynest/nest/ll_api.py @@ -53,14 +53,14 @@ 'check_stack', 'connect_arrays', 'set_communicator', - 'take_array_index', + # 'take_array_index', # 'KernelAttribute', TODO-PYNEST-NG: Enable again when it works without SLI ] engine = kernel.NESTEngine() -take_array_index = engine.take_array_index +# take_array_index = engine.take_array_index connect_arrays = engine.connect_arrays diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 060caed6ac..620df88c00 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -91,6 +91,6 @@ cdef extern from "nest.h" namespace "nest": void simulate( const double& t ) cdef extern from "nest.h" namespace "nest": - # Datum* node_collection_array_index(const Datum* node_collection, const long* array, unsigned long n) except + - # Datum* node_collection_array_index(const Datum* node_collection, const cbool* array, unsigned long n) except + + NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except + + NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except + void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 1608ced41f..837d251ad3 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -41,6 +41,8 @@ from cython.operator cimport preincrement as inc import nest from nest.lib.hl_api_exceptions import NESTMappedException, NESTErrors, NESTError +import numpy + cdef class NodeCollectionObject(object): @@ -201,3 +203,38 @@ def llapi_set_nc_status(NodeCollectionObject nc, object params): except RuntimeError as e: exceptionCls = getattr(NESTErrors, str(e)) raise exceptionCls('llapi_set_nc_status', '') from None + + +def llapi_take_array_index(NodeCollectionObject node_collection, object array): + if not isinstance(array, numpy.ndarray): + raise TypeError('array must be a 1-dimensional NumPy array of ints or bools, got {}'.format(type(array))) + if not array.ndim == 1: + raise TypeError('array must be a 1-dimensional NumPy array, got {}-dimensional NumPy array'.format(array.ndim)) + + # Get pointers to the first element in the Numpy array + cdef long[:] array_long_mv + cdef long* array_long_ptr + + cdef cbool[:] array_bool_mv + cdef cbool* array_bool_ptr + + cdef NodeCollectionPTR new_nc_ptr + + try: + if array.dtype == numpy.bool: + # Boolean C-type arrays are not supported in NumPy, so we use an 8-bit integer array + array_bool_mv = numpy.ascontiguousarray(array, dtype=numpy.uint8) + array_bool_ptr = &array_bool_mv[0] + new_nc_ptr = node_collection_array_index(node_collection.thisptr, array_bool_ptr, len(array)) + elif numpy.issubdtype(array.dtype, numpy.integer): + array_long_mv = numpy.ascontiguousarray(array, dtype=numpy.long) + array_long_ptr = &array_long_mv[0] + new_nc_ptr = node_collection_array_index(node_collection.thisptr, array_long_ptr, len(array)) + else: + raise TypeError('array must be a NumPy array of ints or bools, got {}'.format(array.dtype)) + obj = NodeCollectionObject() + obj._set_nc(new_nc_ptr) + return nest.NodeCollection(obj) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('take_array_index', '') from None diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd index 1b96ccf052..5a4304dcf6 100644 --- a/pynest/pynestkernel.pxd +++ b/pynest/pynestkernel.pxd @@ -218,8 +218,8 @@ cdef extern from "pynestkernel_aux.h": # void c_set_communicator "set_communicator" (object) with gil cdef extern from "nest.h" namespace "nest": - Datum* node_collection_array_index(const Datum* node_collection, const long* array, unsigned long n) except + - Datum* node_collection_array_index(const Datum* node_collection, const cbool* array, unsigned long n) except + + # Datum* node_collection_array_index(const Datum* node_collection, const long* array, unsigned long n) except + + # Datum* node_collection_array_index(const Datum* node_collection, const cbool* array, unsigned long n) except + void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except + cdef extern from *: diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx index d9bcdd7aa9..a9d77128cc 100644 --- a/pynest/pynestkernel.pyx +++ b/pynest/pynestkernel.pyx @@ -81,20 +81,6 @@ except ImportError: pass -cdef class NodeCollectionObject(object): - - cdef NodeCollectionPTR thisptr - - def __repr__(self): - return "" - - cdef _set_nc(self, NodeCollectionPTR nc): - self.thisptr = nc - - # cdef _get_ptr(self): - # return self.thisptr - - cdef class SLIDatum(object): cdef Datum* thisptr @@ -221,40 +207,40 @@ cdef class NESTEngine(object): return True - def take_array_index(self, node_collection, array): - if not (isinstance(node_collection, SLIDatum) and ( node_collection).dtype == SLI_TYPE_NODECOLLECTION.decode()): - raise TypeError('node_collection must be a NodeCollection, got {}'.format(type(node_collection))) - if not isinstance(array, numpy.ndarray): - raise TypeError('array must be a 1-dimensional NumPy array of ints or bools, got {}'.format(type(array))) - if not array.ndim == 1: - raise TypeError('array must be a 1-dimensional NumPy array, got {}-dimensional NumPy array'.format(array.ndim)) - - # Get pointers to the first element in the Numpy array - cdef long[:] array_long_mv - cdef long* array_long_ptr - - cdef cbool[:] array_bool_mv - cdef cbool* array_bool_ptr - - cdef Datum* nc_datum = python_object_to_datum(node_collection) - - try: - if array.dtype == numpy.bool: - # Boolean C-type arrays are not supported in NumPy, so we use an 8-bit integer array - array_bool_mv = numpy.ascontiguousarray(array, dtype=numpy.uint8) - array_bool_ptr = &array_bool_mv[0] - new_nc_datum = node_collection_array_index(nc_datum, array_bool_ptr, len(array)) - return sli_datum_to_object(new_nc_datum) - elif numpy.issubdtype(array.dtype, numpy.integer): - array_long_mv = numpy.ascontiguousarray(array, dtype=numpy.long) - array_long_ptr = &array_long_mv[0] - new_nc_datum = node_collection_array_index(nc_datum, array_long_ptr, len(array)) - return sli_datum_to_object(new_nc_datum) - else: - raise TypeError('array must be a NumPy array of ints or bools, got {}'.format(array.dtype)) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('take_array_index', '') from None + # def take_array_index(self, node_collection, array): + # if not (isinstance(node_collection, SLIDatum) and ( node_collection).dtype == SLI_TYPE_NODECOLLECTION.decode()): + # raise TypeError('node_collection must be a NodeCollection, got {}'.format(type(node_collection))) + # if not isinstance(array, numpy.ndarray): + # raise TypeError('array must be a 1-dimensional NumPy array of ints or bools, got {}'.format(type(array))) + # if not array.ndim == 1: + # raise TypeError('array must be a 1-dimensional NumPy array, got {}-dimensional NumPy array'.format(array.ndim)) + + # # Get pointers to the first element in the Numpy array + # cdef long[:] array_long_mv + # cdef long* array_long_ptr + + # cdef cbool[:] array_bool_mv + # cdef cbool* array_bool_ptr + + # cdef Datum* nc_datum = python_object_to_datum(node_collection) + + # try: + # if array.dtype == numpy.bool: + # # Boolean C-type arrays are not supported in NumPy, so we use an 8-bit integer array + # array_bool_mv = numpy.ascontiguousarray(array, dtype=numpy.uint8) + # array_bool_ptr = &array_bool_mv[0] + # new_nc_datum = node_collection_array_index(nc_datum, array_bool_ptr, len(array)) + # return sli_datum_to_object(new_nc_datum) + # elif numpy.issubdtype(array.dtype, numpy.integer): + # array_long_mv = numpy.ascontiguousarray(array, dtype=numpy.long) + # array_long_ptr = &array_long_mv[0] + # new_nc_datum = node_collection_array_index(nc_datum, array_long_ptr, len(array)) + # return sli_datum_to_object(new_nc_datum) + # else: + # raise TypeError('array must be a NumPy array of ints or bools, got {}'.format(array.dtype)) + # except RuntimeError as e: + # exceptionCls = getattr(NESTErrors, str(e)) + # raise exceptionCls('take_array_index', '') from None def connect_arrays(self, sources, targets, weights, delays, synapse_model, syn_param_keys, syn_param_values): """Calls connect_arrays function, bypassing SLI to expose pointers to the NumPy arrays""" From d5e333b245b2a4e2f0630c8c03314635a398c83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 16 Mar 2022 08:11:51 +0100 Subject: [PATCH 033/375] Implemented join NC function --- pynest/nest/lib/hl_api_types.py | 4 ++-- pynest/nestkernel_api.pxd | 1 + pynest/nestkernel_api.pyx | 13 +++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 51846b5fb1..a0f3bb1083 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -210,7 +210,7 @@ def __init__(self, data=None): # Data from user, must be converted to datum # Data can be anything that can be converted to a NodeCollection, # such as list, tuple, etc. - nc = nestkernel.llapi_make_nodecollection(data) # TODO-PYNEST-NG: implement + nc = nestkernel.llapi_make_nodecollection(data) self._datum = nc._datum def __iter__(self): @@ -220,7 +220,7 @@ def __add__(self, other): if not isinstance(other, NodeCollection): raise NotImplementedError() - return sli_func('join', self._datum, other._datum) + return nestkernel.llapi_join_nc(self._datum, other._datum) def __getitem__(self, key): if isinstance(key, slice): diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 620df88c00..a2ba78df1d 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -30,6 +30,7 @@ from cpython.ref cimport PyObject cdef extern from "node_collection.h" namespace "nest": cppclass NodeCollectionPTR: NodeCollectionPTR() + NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) cdef extern from "node_collection.h": cppclass NodeCollectionDatum: diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 837d251ad3..dc0c2f7016 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -142,6 +142,7 @@ def llapi_create(string model, long n): def llapi_make_nodecollection(object node_ids): cdef NodeCollectionPTR gids try: + # node_ids list is automatically converted to an std::vector gids = make_nodecollection(node_ids) except RuntimeError as e: exceptionCls = getattr(NESTErrors, str(e)) @@ -204,6 +205,18 @@ def llapi_set_nc_status(NodeCollectionObject nc, object params): exceptionCls = getattr(NESTErrors, str(e)) raise exceptionCls('llapi_set_nc_status', '') from None +def llapi_join_nc(NodeCollectionObject lhs, NodeCollectionObject rhs): + cdef NodeCollectionPTR result + try: + # Using operator+() directly + result = lhs.thisptr + rhs.thisptr + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_join_nc', '') from None + obj = NodeCollectionObject() + obj._set_nc(result) + return nest.NodeCollection(obj) + def llapi_take_array_index(NodeCollectionObject node_collection, object array): if not isinstance(array, numpy.ndarray): From b1e7fb514282780b35a2d85fbd9a5da1ffb7d04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 16 Mar 2022 10:53:16 +0100 Subject: [PATCH 034/375] Implemented NC equality and member check functions --- nestkernel/nest.cpp | 12 ++++++++++++ nestkernel/nest.h | 3 +++ pynest/nest/lib/hl_api_types.py | 6 +++--- pynest/nestkernel_api.pxd | 4 ++++ pynest/nestkernel_api.pyx | 17 +++++++++++++++++ 5 files changed, 39 insertions(+), 3 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 90f5af94c6..8fa70a225f 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -329,6 +329,18 @@ get_nodes( const dictionary& params, const bool local_only ) return kernel().node_manager.get_nodes( params, local_only ); } +bool +equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ) +{ + return lhs->operator==( rhs ); +} + +bool +contains( const NodeCollectionPTR nc, const size_t node_id ) +{ + return nc->contains( node_id ); +} + void connect( NodeCollectionPTR sources, NodeCollectionPTR targets, diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 0804673a9d..f7d9705cee 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -123,6 +123,9 @@ NodeCollectionPTR make_nodecollection( const std::vector< index > node_ids ); NodeCollectionPTR get_nodes( const dictionary& dict, const bool local_only ); +bool equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ); +bool contains( const NodeCollectionPTR nc, const size_t node_id ); + void connect( NodeCollectionPTR sources, NodeCollectionPTR targets, const dictionary& connectivity, diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index a0f3bb1083..b3207dc58b 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -273,12 +273,12 @@ def __getitem__(self, key): raise IndexError('Bool index array must be the same length as NodeCollection') if not is_booltype and len(numpy.unique(key)) != len(key): raise ValueError('All node IDs in a NodeCollection have to be unique') - return nestkernel.llapi_(self._datum, key) + return nestkernel.llapi_take_array_index(self._datum, key) else: raise IndexError('only integers, slices, lists, tuples, and numpy arrays are valid indices') def __contains__(self, node_id): - return sli_func('MemberQ', self._datum, node_id) + return nestkernel.llapi_nc_contains(self._datum, node_id) def __eq__(self, other): if not isinstance(other, NodeCollection): @@ -287,7 +287,7 @@ def __eq__(self, other): if self.__len__() != other.__len__(): return False - return sli_func('eq', self, other) + return nestkernel.llapi_eq_nc(self._datum, other._datum) def __neq__(self, other): if not isinstance(other, NodeCollection): diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index a2ba78df1d..73a211528d 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -30,6 +30,7 @@ from cpython.ref cimport PyObject cdef extern from "node_collection.h" namespace "nest": cppclass NodeCollectionPTR: NodeCollectionPTR() + NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) cdef extern from "node_collection.h": @@ -78,6 +79,9 @@ cdef extern from "nest.h" namespace "nest": NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except + + cbool equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ) except + + cbool contains( const NodeCollectionPTR nc, const size_t node_id ) except + + NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) except + void connect(NodeCollectionPTR sources, NodeCollectionPTR targets, diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index dc0c2f7016..ea596eee1d 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -29,6 +29,7 @@ import cython from libcpp.string cimport string from libcpp.vector cimport vector +from libcpp.memory cimport shared_ptr from cython.operator cimport dereference as deref from cython.operator cimport preincrement as inc @@ -218,6 +219,22 @@ def llapi_join_nc(NodeCollectionObject lhs, NodeCollectionObject rhs): return nest.NodeCollection(obj) +def llapi_eq_nc(NodeCollectionObject lhs, NodeCollectionObject rhs): + try: + return equal(lhs.thisptr, rhs.thisptr) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_eq_nc', '') from None + + +def llapi_nc_contains(NodeCollectionObject nc, long node_id): + try: + return contains(nc.thisptr, node_id) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_nc_contains', '') from None + + def llapi_take_array_index(NodeCollectionObject node_collection, object array): if not isinstance(array, numpy.ndarray): raise TypeError('array must be a 1-dimensional NumPy array of ints or bools, got {}'.format(type(array))) From ce19aa9cb45ce71c392773db6d0c75038d54984f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 16 Mar 2022 14:18:23 +0100 Subject: [PATCH 035/375] Moved specific functions out of nest.h and removed nest.h dependencies --- models/gif_cond_exp.h | 2 -- models/gif_cond_exp_multisynapse.h | 1 - models/gif_pop_psc_exp.h | 1 - models/gif_psc_exp.h | 1 - models/gif_psc_exp_multisynapse.h | 1 - models/inhomogeneous_poisson_generator.h | 1 - models/modelsmodule.h | 1 - nestkernel/connection_creator.cpp | 1 + nestkernel/connection_creator_impl.h | 1 - nestkernel/connection_label.h | 1 - nestkernel/kernel_manager.h | 18 ++++++++++ nestkernel/model_manager.h | 45 +++++++++++++++++++++++- nestkernel/model_manager_impl.h | 1 - nestkernel/nest.cpp | 19 ---------- nestkernel/nest.h | 44 ----------------------- 15 files changed, 63 insertions(+), 75 deletions(-) diff --git a/models/gif_cond_exp.h b/models/gif_cond_exp.h index 1c47bace63..b918918e09 100644 --- a/models/gif_cond_exp.h +++ b/models/gif_cond_exp.h @@ -40,8 +40,6 @@ #include "universal_data_logger.h" -#include "nest.h" - namespace nest { diff --git a/models/gif_cond_exp_multisynapse.h b/models/gif_cond_exp_multisynapse.h index 109b4a3896..3c131a4eb0 100644 --- a/models/gif_cond_exp_multisynapse.h +++ b/models/gif_cond_exp_multisynapse.h @@ -39,7 +39,6 @@ #include "ring_buffer.h" #include "universal_data_logger.h" -#include "nest.h" namespace nest { diff --git a/models/gif_pop_psc_exp.h b/models/gif_pop_psc_exp.h index d0eff620fb..c5fcdf4bdc 100644 --- a/models/gif_pop_psc_exp.h +++ b/models/gif_pop_psc_exp.h @@ -25,7 +25,6 @@ // Includes from nestkernel: -#include "nest.h" #include "node.h" #include "random_generators.h" #include "ring_buffer.h" diff --git a/models/gif_psc_exp.h b/models/gif_psc_exp.h index a3c81f4d33..c046d1bb4c 100644 --- a/models/gif_psc_exp.h +++ b/models/gif_psc_exp.h @@ -30,7 +30,6 @@ #include "ring_buffer.h" #include "universal_data_logger.h" -#include "nest.h" namespace nest { diff --git a/models/gif_psc_exp_multisynapse.h b/models/gif_psc_exp_multisynapse.h index 5fa6858e6f..f8975f9214 100644 --- a/models/gif_psc_exp_multisynapse.h +++ b/models/gif_psc_exp_multisynapse.h @@ -30,7 +30,6 @@ #include "ring_buffer.h" #include "universal_data_logger.h" -#include "nest.h" namespace nest { diff --git a/models/inhomogeneous_poisson_generator.h b/models/inhomogeneous_poisson_generator.h index 7007649b1b..0de9af8b55 100644 --- a/models/inhomogeneous_poisson_generator.h +++ b/models/inhomogeneous_poisson_generator.h @@ -30,7 +30,6 @@ #include "connection.h" #include "device_node.h" #include "event.h" -#include "nest.h" #include "random_generators.h" #include "ring_buffer.h" #include "stimulation_device.h" diff --git a/models/modelsmodule.h b/models/modelsmodule.h index 70ae988eb9..3924243e4f 100644 --- a/models/modelsmodule.h +++ b/models/modelsmodule.h @@ -27,7 +27,6 @@ #include // Includes from nestkernel: -#include "nest.h" #include "nest_impl.h" // Includes from sli: diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp index 9ced7893cd..31a0cf6b63 100644 --- a/nestkernel/connection_creator.cpp +++ b/nestkernel/connection_creator.cpp @@ -22,6 +22,7 @@ #include "connection_creator.h" #include "dictutils.h" +#include "nest.h" namespace nest { diff --git a/nestkernel/connection_creator_impl.h b/nestkernel/connection_creator_impl.h index 6955d762ad..81900fe3e3 100644 --- a/nestkernel/connection_creator_impl.h +++ b/nestkernel/connection_creator_impl.h @@ -30,7 +30,6 @@ // Includes from nestkernel: #include "kernel_manager.h" -#include "nest.h" namespace nest { diff --git a/nestkernel/connection_label.h b/nestkernel/connection_label.h index dbb429134a..ff5b010fe2 100644 --- a/nestkernel/connection_label.h +++ b/nestkernel/connection_label.h @@ -25,7 +25,6 @@ #include "dictdatum.h" #include "dictutils.h" -#include "nest.h" #include "nest_names.h" namespace nest diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h index a40fcce181..92ca4b331f 100644 --- a/nestkernel/kernel_manager.h +++ b/nestkernel/kernel_manager.h @@ -203,6 +203,24 @@ class KernelManager KernelManager& kernel(); +inline RngPtr +get_rank_synced_rng() +{ + return kernel().random_manager.get_rank_synced_rng(); +} + +inline RngPtr +get_vp_synced_rng( thread tid ) +{ + return kernel().random_manager.get_vp_synced_rng( tid ); +} + +inline RngPtr +get_vp_specific_rng( thread tid ) +{ + return kernel().random_manager.get_vp_specific_rng( tid ); +} + } // namespace nest inline nest::KernelManager& diff --git a/nestkernel/model_manager.h b/nestkernel/model_manager.h index 026f2f513b..4b967c8d5b 100644 --- a/nestkernel/model_manager.h +++ b/nestkernel/model_manager.h @@ -26,12 +26,13 @@ // C++ includes: #include +#include "enum_bitfield.h" + // Includes from nestkernel: #include "connector_model.h" #include "genericmodel.h" #include "manager_interface.h" #include "model.h" -#include "nest.h" #include "nest_time.h" #include "nest_timeconverter.h" #include "nest_types.h" @@ -42,6 +43,48 @@ namespace nest { + + +enum class RegisterConnectionModelFlags : unsigned +{ + REGISTER_HPC = 1 << 0, + REGISTER_LBL = 1 << 1, + IS_PRIMARY = 1 << 2, + HAS_DELAY = 1 << 3, + SUPPORTS_WFR = 1 << 4, + REQUIRES_SYMMETRIC = 1 << 5, + REQUIRES_CLOPATH_ARCHIVING = 1 << 6, + REQUIRES_URBANCZIK_ARCHIVING = 1 << 7 +}; + +template <> +struct EnableBitMaskOperators< RegisterConnectionModelFlags > +{ + static const bool enable = true; +}; + +const RegisterConnectionModelFlags default_connection_model_flags = RegisterConnectionModelFlags::REGISTER_HPC + | RegisterConnectionModelFlags::REGISTER_LBL | RegisterConnectionModelFlags::IS_PRIMARY + | RegisterConnectionModelFlags::HAS_DELAY; + +const RegisterConnectionModelFlags default_secondary_connection_model_flags = + RegisterConnectionModelFlags::SUPPORTS_WFR | RegisterConnectionModelFlags::HAS_DELAY; + +/** + * Register connection model (i.e. an instance of a class inheriting from `Connection`). + */ +template < template < typename > class ConnectorModelT > +void register_connection_model( const std::string& name, + const RegisterConnectionModelFlags flags = default_connection_model_flags ); + +/** + * Register secondary connection models (e.g. gap junctions, rate-based models). + */ +template < template < typename > class ConnectorModelT > +void register_secondary_connection_model( const std::string& name, + const RegisterConnectionModelFlags flags = default_secondary_connection_model_flags ); + + class ModelManager : public ManagerInterface { public: diff --git a/nestkernel/model_manager_impl.h b/nestkernel/model_manager_impl.h index 5a65b73b98..bb81d01897 100644 --- a/nestkernel/model_manager_impl.h +++ b/nestkernel/model_manager_impl.h @@ -32,7 +32,6 @@ // Includes from nestkernel: #include "connection_label.h" #include "kernel_manager.h" -#include "nest.h" #include "target_identifier.h" diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 8fa70a225f..940c7da5d6 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -137,25 +137,6 @@ nc_size( NodeCollectionPTR nc ) return nc->size(); } - -RngPtr -get_rank_synced_rng() -{ - return kernel().random_manager.get_rank_synced_rng(); -} - -RngPtr -get_vp_synced_rng( thread tid ) -{ - return kernel().random_manager.get_vp_synced_rng( tid ); -} - -RngPtr -get_vp_specific_rng( thread tid ) -{ - return kernel().random_manager.get_vp_specific_rng( tid ); -} - void set_kernel_status( const dictionary& dict ) { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index f7d9705cee..ef4900b264 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -28,7 +28,6 @@ // Includes from libnestutil: #include "dictionary.h" -#include "enum_bitfield.h" #include "logging.h" // Includes from nestkernel: @@ -54,55 +53,12 @@ void enable_dryrun_mode( const index n_procs ); void register_logger_client( const deliver_logging_event_ptr client_callback ); -enum class RegisterConnectionModelFlags : unsigned -{ - REGISTER_HPC = 1 << 0, - REGISTER_LBL = 1 << 1, - IS_PRIMARY = 1 << 2, - HAS_DELAY = 1 << 3, - SUPPORTS_WFR = 1 << 4, - REQUIRES_SYMMETRIC = 1 << 5, - REQUIRES_CLOPATH_ARCHIVING = 1 << 6, - REQUIRES_URBANCZIK_ARCHIVING = 1 << 7 -}; - -template <> -struct EnableBitMaskOperators< RegisterConnectionModelFlags > -{ - static const bool enable = true; -}; - -const RegisterConnectionModelFlags default_connection_model_flags = RegisterConnectionModelFlags::REGISTER_HPC - | RegisterConnectionModelFlags::REGISTER_LBL | RegisterConnectionModelFlags::IS_PRIMARY - | RegisterConnectionModelFlags::HAS_DELAY; - -const RegisterConnectionModelFlags default_secondary_connection_model_flags = - RegisterConnectionModelFlags::SUPPORTS_WFR | RegisterConnectionModelFlags::HAS_DELAY; - -/** - * Register connection model (i.e. an instance of a class inheriting from `Connection`). - */ -template < template < typename > class ConnectorModelT > -void register_connection_model( const std::string& name, - const RegisterConnectionModelFlags flags = default_connection_model_flags ); - -/** - * Register secondary connection models (e.g. gap junctions, rate-based models). - */ -template < template < typename > class ConnectorModelT > -void register_secondary_connection_model( const std::string& name, - const RegisterConnectionModelFlags flags = default_secondary_connection_model_flags ); - void print_nodes_to_stream( std::ostream& out = std::cout ); std::string pprint_to_string( NodeCollectionPTR nc ); size_t nc_size( NodeCollectionPTR nc ); -RngPtr get_rank_synced_rng(); -RngPtr get_vp_synced_rng( thread tid ); -RngPtr get_vp_specific_rng( thread tid ); - void set_kernel_status( const dictionary& dict ); dictionary get_kernel_status(); From 5f3c5f0ab76fbd3127b89d24d431f0d419cba0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 17 Mar 2022 09:23:21 +0100 Subject: [PATCH 036/375] Implemented find(), get_metadata(), and create_parameter() functions --- nestkernel/nest.cpp | 20 +++++++++++++++ nestkernel/nest.h | 2 ++ pynest/nest/lib/hl_api_types.py | 13 +++++----- pynest/nestkernel_api.pxd | 8 ++++++ pynest/nestkernel_api.pyx | 45 ++++++++++++++++++++++++++++++--- 5 files changed, 78 insertions(+), 10 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 940c7da5d6..5220011d37 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -322,6 +322,26 @@ contains( const NodeCollectionPTR nc, const size_t node_id ) return nc->contains( node_id ); } +long +find( const NodeCollectionPTR nc, size_t node_id ) +{ + return nc->find( node_id ); +} + +dictionary +get_metadata( const NodeCollectionPTR nc ) +{ + dictionary status_dict; + const auto meta = nc->get_metadata(); + // Fill the status dictionary only if the NodeCollection has valid metadata. + if ( meta.get() ) + { + meta->get_status( status_dict ); + status_dict[ names::network_size ] = nc->size(); + } + return status_dict; +} + void connect( NodeCollectionPTR sources, NodeCollectionPTR targets, diff --git a/nestkernel/nest.h b/nestkernel/nest.h index ef4900b264..2b8b706a3d 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -78,6 +78,8 @@ NodeCollectionPTR create( const std::string model_name, const index n ); NodeCollectionPTR make_nodecollection( const std::vector< index > node_ids ); NodeCollectionPTR get_nodes( const dictionary& dict, const bool local_only ); +long find( const NodeCollectionPTR nc, size_t node_id ); +dictionary get_metadata( const NodeCollectionPTR nc ); bool equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ); bool contains( const NodeCollectionPTR nc, const size_t node_id ); diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index b3207dc58b..4ef1ae38d1 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -126,7 +126,7 @@ def CreateParameter(parametertype, specs): 'min' : float, # minimum value, default: -inf 'max' : float} # maximum value, default: +inf """ - return sli_func('CreateParameter', {parametertype: specs}) + return nestkernel.llapi_create_parameter({parametertype: specs}) class NodeCollectionIterator(object): @@ -504,7 +504,7 @@ def index(self, node_id): ValueError If the node ID is not in the `NodeCollection`. """ - index = sli_func('Find', self._datum, node_id) + index = nestkernel.llapi_nc_find(self._datum, node_id) if index == -1: raise ValueError('{} is not in NodeCollection'.format(node_id)) @@ -524,7 +524,7 @@ def __getattr__(self, attr): raise AttributeError('Cannot get attribute of empty NodeCollection') if attr == 'spatial': - metadata = sli_func('GetMetadata', self._datum) + metadata = nestkernel.llapi_get_nc_metadata(self._datum) val = metadata if metadata else None super().__setattr__(attr, val) return self.spatial @@ -983,6 +983,7 @@ def Inside(self, point): return sli_func("Inside", point, self._datum) +# TODO-PYNEST-NG: We may consider moving the entire (or most of) Parameter class to the cython level. class Parameter(object): """ Class for parameters @@ -997,9 +998,9 @@ class Parameter(object): # The constructor should not be called by the user def __init__(self, datum): """Parameters must be created using the CreateParameter command.""" - if not isinstance(datum, - kernel.SLIDatum) or datum.dtype != "parametertype": - raise TypeError("expected parameter datum") + if not isinstance(datum, nestkernel.ParameterObject): + raise TypeError("expected low-level parameter object;" + " use the CreateParameter() function to create a Parameter") self._datum = datum # Generic binary operation diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 73a211528d..2a844c9ae5 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -24,6 +24,7 @@ from libcpp cimport bool as cbool from libcpp.string cimport string from libcpp.vector cimport vector from libcpp.utility cimport pair +from libcpp.memory cimport shared_ptr from cpython.ref cimport PyObject @@ -81,6 +82,8 @@ cdef extern from "nest.h" namespace "nest": cbool equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ) except + cbool contains( const NodeCollectionPTR nc, const size_t node_id ) except + + long find( const NodeCollectionPTR nc, size_t node_id ) except + + dictionary get_metadata( const NodeCollectionPTR nc ) except + NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) except + void connect(NodeCollectionPTR sources, @@ -94,8 +97,13 @@ cdef extern from "nest.h" namespace "nest": dictionary get_nc_status( NodeCollectionPTR nc ) void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + void simulate( const double& t ) + shared_ptr[Parameter] create_parameter( const dictionary& param_dict ) cdef extern from "nest.h" namespace "nest": NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except + NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except + void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except + + +cdef extern from "parameter.h" namespace "nest": + cppclass Parameter: + Parameter() \ No newline at end of file diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index ea596eee1d..d2a525a8b5 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -41,11 +41,12 @@ from cython.operator cimport preincrement as inc import nest from nest.lib.hl_api_exceptions import NESTMappedException, NESTErrors, NESTError +from libcpp.memory cimport shared_ptr import numpy -cdef class NodeCollectionObject(object): +cdef class NodeCollectionObject: cdef NodeCollectionPTR thisptr @@ -55,8 +56,15 @@ cdef class NodeCollectionObject(object): cdef _set_nc(self, NodeCollectionPTR nc): self.thisptr = nc - # cdef _get_ptr(self): - # return self.thisptr +cdef class ParameterObject: + + cdef shared_ptr[Parameter] thisptr + + def __repr__(self): + return "" + + cdef _set_parameter(self, shared_ptr[Parameter] parameter_ptr): + self.thisptr = parameter_ptr cdef object any_vector_to_list(vector[any] cvec): @@ -107,13 +115,15 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *: cdef dictionary cdict = dictionary() for key, value in py_dict.items(): if type(value) is int: - cdict[key.encode('utf-8')] = value + cdict[key.encode('utf-8')] = value elif type(value) is float: cdict[key.encode('utf-8')] = value elif type(value) is bool: cdict[key.encode('utf-8')] = value elif type(value) is str: cdict[key.encode('utf-8')] = value.encode('utf-8') + elif type(value) is dict: + cdict[key.encode('utf-8')] = pydict_to_dictionary(value) else: raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') return cdict @@ -234,6 +244,21 @@ def llapi_nc_contains(NodeCollectionObject nc, long node_id): exceptionCls = getattr(NESTErrors, str(e)) raise exceptionCls('llapi_nc_contains', '') from None +def llapi_nc_find(NodeCollectionObject nc, long node_id): + try: + return find(nc.thisptr, node_id) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_nc_find', '') from None + +# TODO-PYNEST-NG: decorator for exception handling? +def llapi_get_nc_metadata(NodeCollectionObject nc): + try: + return dictionary_to_pydict(get_metadata(nc.thisptr)) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_get_nc_metadata', '') from None + def llapi_take_array_index(NodeCollectionObject node_collection, object array): if not isinstance(array, numpy.ndarray): @@ -268,3 +293,15 @@ def llapi_take_array_index(NodeCollectionObject node_collection, object array): except RuntimeError as e: exceptionCls = getattr(NESTErrors, str(e)) raise exceptionCls('take_array_index', '') from None + +def llapi_create_parameter(object specs): + cdef dictionary specs_dictionary = pydict_to_dictionary(specs) + cdef shared_ptr[Parameter] parameter + try: + parameter = create_parameter(specs_dictionary) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_create_parameter', '') from None + obj = ParameterObject() + obj._set_parameter(parameter) + return nest.Parameter(obj) From 58d21485c2f59154ce5865e890d50c661f63ce7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 18 Mar 2022 10:12:07 +0100 Subject: [PATCH 037/375] Implemented create_spatial() and related functions --- libnestutil/dictionary.h | 70 +++++++++++++++++++++------ nestkernel/free_layer.h | 20 ++++---- nestkernel/layer_impl.h | 2 +- nestkernel/nest.cpp | 7 +++ nestkernel/nest.h | 1 + nestkernel/parameter.h | 4 +- nestkernel/spatial.cpp | 7 ++- pynest/nest/lib/hl_api_nodes.py | 6 +-- pynest/nest/lib/hl_api_types.py | 3 +- pynest/nest/spatial/hl_api_spatial.py | 13 +++-- pynest/nestkernel_api.pxd | 8 ++- pynest/nestkernel_api.pyx | 32 +++++++++++- 12 files changed, 125 insertions(+), 48 deletions(-) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 74e83ff97b..0b0bb9856f 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -59,24 +59,59 @@ class dictionary : public std::map< std::string, boost::any > private: using maptype_ = std::map< std::string, boost::any >; -public: template < typename T > T - get( const std::string& key ) const + cast_value_( const boost::any& value, const std::string& key ) const { try { - return boost::any_cast< T >( at( key ) ); + return boost::any_cast< T >( value ); } catch ( const boost::bad_any_cast& ) { - std::string msg = std::string( "Failed to cast " ) + key + " from " + debug_type( at( key ) ) + " to type " + std::string msg = std::string( "Failed to cast " ) + key + " from " + debug_type( value ) + " to type " + std::string( typeid( T ).name() ); std::cerr << msg << "\n"; throw TypeMismatch( msg ); } } + size_t // TODO: or template? + cast_to_integer_( const boost::any& value, const std::string& key ) const + { + if ( is_size_t( value ) ) + { + return cast_value_< size_t >( value, key ); + } + else if ( is_long( value ) ) + { + return cast_value_< long >( value, key ); + } + else if ( is_int( value ) ) + { + return cast_value_< int >( value, key ); + } + // Not an integer type + std::string msg = + std::string( "Failed to cast " ) + key + " from " + debug_type( at( key ) ) + " to an integer type "; + std::cerr << msg << "\n"; + throw TypeMismatch( msg ); + } + +public: + template < typename T > + T + get( const std::string& key ) const + { + return cast_value_< T >( at( key ), key ); + } + + size_t // TODO: or template? + get_integer( const std::string& key ) const + { + return cast_to_integer_( at( key ), key ); + } + template < typename T > bool update_value( const std::string& key, T& value ) const @@ -84,18 +119,21 @@ class dictionary : public std::map< std::string, boost::any > auto it = find( key ); if ( it != end() ) { - try - { - value = boost::any_cast< T >( it->second ); - return true; - } - catch ( const boost::bad_any_cast& ) - { - std::string msg = std::string( "Failed to cast " ) + it->first + " from " + debug_type( it->second ) - + " to type " + std::string( typeid( T ).name() ); - std::cerr << msg << "\n"; - throw TypeMismatch( msg ); - } + value = cast_value_< T >( it->second, key ); + return true; + } + return false; + } + + template < typename T > + bool + update_integer_value( const std::string& key, T& value ) const + { + auto it = find( key ); + if ( it != end() ) + { + value = cast_to_integer_( it->second, key ); + return true; } return false; } diff --git a/nestkernel/free_layer.h b/nestkernel/free_layer.h index 35bde32aca..ea09807ced 100644 --- a/nestkernel/free_layer.h +++ b/nestkernel/free_layer.h @@ -127,7 +127,7 @@ FreeLayer< D >::set_status( const dictionary& d ) size_t step = 1; if ( d.known( names::step ) ) { - step = d.get< long >( names::step ); + step = d.get_integer( names::step ); } const auto pos = d.get< std::vector< std::vector< double > > >( names::positions ); const auto num_nodes = this->node_collection_->size(); @@ -227,15 +227,15 @@ template < int D > void FreeLayer< D >::get_status( dictionary& d ) const { - // TODO-PYNEST-NG: fix this - // Layer< D >::get_status( d ); - - // TokenArray points; - // for ( typename std::vector< Position< D > >::const_iterator it = positions_.begin(); it != positions_.end(); ++it ) - // { - // points.push_back( it->getToken() ); - // } - // def2< TokenArray, ArrayDatum >( d, names::positions, points ); + Layer< D >::get_status( d ); + + std::vector< std::vector< double > > points; + for ( auto& pos : positions_ ) + { + points.emplace_back( pos.get_vector() ); + } + + d[ names::positions ] = points; } template < int D > diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h index d92ec025f3..8dc1b192ab 100644 --- a/nestkernel/layer_impl.h +++ b/nestkernel/layer_impl.h @@ -99,7 +99,7 @@ Layer< D >::get_status( dictionary& d ) const if ( periodic_.none() ) { - d[ names::edge_wrap ] = BoolDatum( false ); + d[ names::edge_wrap ] = false; } else if ( periodic_.count() == D ) { diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 5220011d37..96f5a7c6f0 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -35,6 +35,7 @@ #include "iaf_psc_alpha.h" #include "static_synapse.h" +#include "spatial.h" #include "connection_manager_impl.h" @@ -298,6 +299,12 @@ create( const std::string model_name, const index n_nodes ) return kernel().node_manager.add_node( model_id, n_nodes ); } +NodeCollectionPTR +create_spatial( const dictionary& layer_dict ) +{ + return create_layer( layer_dict ); +} + NodeCollectionPTR make_nodecollection( const std::vector< index > node_ids ) { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 2b8b706a3d..69bcade351 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -74,6 +74,7 @@ dictionary get_connection_status( const ConnectionDatum& conn ); NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ); NodeCollectionPTR create( const std::string model_name, const index n ); +NodeCollectionPTR create_spatial( const dictionary& layer_dict ); NodeCollectionPTR make_nodecollection( const std::vector< index > node_ids ); diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h index 02a0f28b60..1b6488ace1 100644 --- a/nestkernel/parameter.h +++ b/nestkernel/parameter.h @@ -354,7 +354,7 @@ class NodePosParameter : public Parameter , dimension_( 0 ) , synaptic_endpoint_( 0 ) { - bool dimension_specified = d.update_value( names::dimension, dimension_ ); + bool dimension_specified = d.update_integer_value( names::dimension, dimension_ ); if ( not dimension_specified ) { throw BadParameterValue( "Dimension must be specified when creating a node position parameter." ); @@ -363,7 +363,7 @@ class NodePosParameter : public Parameter { throw BadParameterValue( "Node position parameter dimension cannot be negative." ); } - d.update_value( names::synaptic_endpoint, synaptic_endpoint_ ); + d.update_integer_value( names::synaptic_endpoint, synaptic_endpoint_ ); if ( synaptic_endpoint_ < 0 or 2 < synaptic_endpoint_ ) { throw BadParameterValue( "Synaptic endpoint must either be unspecified (0), source (1) or target (2)." ); diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index 743f08982a..7983ed5c30 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -60,11 +60,10 @@ LayerMetadata::slice( size_t start, size_t stop, size_t step, NodeCollectionPTR // Get positions of current layer, sliced in start-stop. Because the implementation of NodeCollections sliced // with step internally keeps the "skipped" nodes, positions must include the "skipped" nodes as well, so that // the node indices match the position indices. - TokenArray new_positions; + std::vector< std::vector< double > > new_positions; for ( size_t lid = start; lid < stop; ++lid ) { - const auto pos = layer_->get_position_vector( lid ); - new_positions.push_back( pos ); + new_positions.emplace_back( layer_->get_position_vector( lid ) ); } // Create new free layer with sliced positions @@ -91,7 +90,7 @@ LayerMetadata::slice( size_t start, size_t stop, size_t step, NodeCollectionPTR // Inherit status from current layer, but with new positions. dictionary layer_dict; layer_->get_status( layer_dict ); - layer_dict[ names::positions ] = ArrayDatum( new_positions ); + layer_dict[ names::positions ] = new_positions; layer_dict[ names::step ] = step; layer_local->set_status( layer_dict ); } diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index 094ef3ce23..f5bfe601aa 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -93,7 +93,7 @@ def Create(model, n=1, params=None, positions=None): layer_specs = {'elements': model} layer_specs['edge_wrap'] = positions.edge_wrap if isinstance(positions, spatial.free): - layer_specs['positions'] = positions.pos + layer_specs['positions'] = positions.pos._datum # If the positions are based on a parameter object, the number of nodes must be specified. if isinstance(positions.pos, Parameter): layer_specs['n'] = n @@ -109,8 +109,8 @@ def Create(model, n=1, params=None, positions=None): # For compatibility with SLI. if params is None: params = {} - layer = sli_func('CreateLayerParams', layer_specs, params) - + layer = nestkernel.llapi_create_spatial(layer_specs) + layer.set(params) return layer # If any of the elements in the parameter dictionary is either an array-like object, diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 4ef1ae38d1..f9db09ea91 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -150,7 +150,8 @@ def __next__(self): if self._increment > len(self._nc) - 1: raise StopIteration - val = sli_func('Take', self._nc._datum, [self._increment + (self._increment >= 0)]) + index = self._increment + (self._increment >= 0) + val = nestkernel.llapi_slice(self._nc._datum, index, index, 1) self._increment += 1 return val diff --git a/pynest/nest/spatial/hl_api_spatial.py b/pynest/nest/spatial/hl_api_spatial.py index cd018d86e8..f79bb80aee 100644 --- a/pynest/nest/spatial/hl_api_spatial.py +++ b/pynest/nest/spatial/hl_api_spatial.py @@ -21,6 +21,8 @@ import numpy as np from ..lib.hl_api_types import CreateParameter, Parameter +from .. import nestkernel_api as nestkernel + __all__ = [ 'distance', @@ -253,13 +255,10 @@ def __init__(self, pos, extent=None, edge_wrap=False, num_dimensions=None): def _parameter_list_to_dimension(self, dim_parameters, num_dimensions): """Converts a list of Parameters to a dimension2d or dimension3d Parameter.""" - if num_dimensions == 2: - dimfunc = 'dimension2d' - elif num_dimensions == 3: - dimfunc = 'dimension3d' - else: - raise ValueError('Number of dimensions must be 2 or 3.') + assert(len(dim_parameters) == num_dimensions) + if num_dimensions < 2 or num_dimensions > 3: + raise ValueError('Number of dimensions must be 2 or 3') # The dimension2d and dimension3d Parameter stores a Parameter for # each dimension. When creating positions for nodes, values from # each parameter are fetched for the position vector. - return sli_func(dimfunc, *dim_parameters) + return nestkernel.llapi_dimension_parameter([p._datum for p in dim_parameters]) diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 2a844c9ae5..52236ab129 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -32,7 +32,7 @@ cdef extern from "node_collection.h" namespace "nest": cppclass NodeCollectionPTR: NodeCollectionPTR() - NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) + NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) except + cdef extern from "node_collection.h": cppclass NodeCollectionDatum: @@ -69,6 +69,7 @@ cdef extern from "dictionary.h": cbool is_string(const any&) cbool is_int_vector(const any&) cbool is_double_vector(const any&) + cbool is_double_vector_vector(const any&) cbool is_string_vector(const any&) cbool is_any_vector(const any&) cbool is_dict(const any&) @@ -77,6 +78,7 @@ cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) void reset_kernel() NodeCollectionPTR create( const string model_name, const long n ) except + + NodeCollectionPTR create_spatial( const dictionary& ) NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except + @@ -106,4 +108,6 @@ cdef extern from "nest.h" namespace "nest": cdef extern from "parameter.h" namespace "nest": cppclass Parameter: - Parameter() \ No newline at end of file + Parameter() + shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y) + shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y, const shared_ptr[Parameter] z) diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index d2a525a8b5..5f7eee51aa 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -93,6 +93,8 @@ cdef object any_to_pyobj(any operand): return any_cast[vector[int]](operand) if is_double_vector(operand): return any_cast[vector[double]](operand) + if is_double_vector_vector(operand): + return any_cast[vector[vector[double]]](operand) if is_string_vector(operand): return any_cast[vector[string]](operand) if is_any_vector(operand): @@ -107,7 +109,7 @@ cdef object dictionary_to_pydict(dictionary cdict): while it != cdict.end(): tmp[deref(it).first.decode('utf8')] = any_to_pyobj(deref(it).second) if tmp[deref(it).first.decode('utf8')] is None: - print('Could not convert: ' + deref(it).first.decode('utf8') + ' of type ' + debug_type(deref(it).second).decode('utf8')) + raise RuntimeError('Could not convert: ' + deref(it).first.decode('utf8') + ' of type ' + debug_type(deref(it).second).decode('utf8')) inc(it) return tmp @@ -115,7 +117,7 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *: cdef dictionary cdict = dictionary() for key, value in py_dict.items(): if type(value) is int: - cdict[key.encode('utf-8')] = value + cdict[key.encode('utf-8')] = value elif type(value) is float: cdict[key.encode('utf-8')] = value elif type(value) is bool: @@ -124,6 +126,8 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *: cdict[key.encode('utf-8')] = value.encode('utf-8') elif type(value) is dict: cdict[key.encode('utf-8')] = pydict_to_dictionary(value) + elif type(value) is ParameterObject: + cdict[key.encode('utf-8')] = (value).thisptr else: raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') return cdict @@ -150,6 +154,17 @@ def llapi_create(string model, long n): obj._set_nc(gids) return nest.NodeCollection(obj) +def llapi_create_spatial(object layer_params): + cdef NodeCollectionPTR gids + try: + gids = create_spatial(pydict_to_dictionary(layer_params)) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_create_spatial', '') from None + obj = NodeCollectionObject() + obj._set_nc(gids) + return nest.NodeCollection(obj) + def llapi_make_nodecollection(object node_ids): cdef NodeCollectionPTR gids try: @@ -305,3 +320,16 @@ def llapi_create_parameter(object specs): obj = ParameterObject() obj._set_parameter(parameter) return nest.Parameter(obj) + +def llapi_dimension_parameter(object list_of_pos_params): + cdef shared_ptr[Parameter] dim_parameter + cdef ParameterObject x, y, z + if len(list_of_pos_params) == 2: + x, y = list_of_pos_params + dim_parameter = dimension_parameter(x.thisptr, y.thisptr) + if len(list_of_pos_params) == 3: + x, y, z = list_of_pos_params + dim_parameter = dimension_parameter(x.thisptr, y.thisptr, z.thisptr) + obj = ParameterObject() + obj._set_parameter(dim_parameter) + return nest.Parameter(obj) From 6aed151ea412c71c39032aab6ed78f7101fad321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 18 Mar 2022 13:45:07 +0100 Subject: [PATCH 038/375] Corrected getting status of a NodeCollection with a single node --- pynest/nest/lib/hl_api_helper.py | 7 ++----- pynest/nestkernel_api.pyx | 11 ++++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py index 292eb0f3d4..98b3362ab5 100644 --- a/pynest/nest/lib/hl_api_helper.py +++ b/pynest/nest/lib/hl_api_helper.py @@ -40,6 +40,7 @@ from ..ll_api import * from .. import pynestkernel as kernel +from .. import nestkernel_api as nestkernel __all__ = [ 'broadcast', @@ -536,11 +537,7 @@ def get_parameters(nc, param): """ # param is single literal if is_literal(param): - result = nc.get()[param] - # try: - # except kernel.NESTError: - # result = nc.get()[param] # If the NodeCollection is a composite. - # param is array of strings + result = nestkernel.llapi_get_nc_status(nc._datum, param) elif is_iterable(param): result = {param_name: get_parameters(nc, param_name) for param_name in param} else: diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 5f7eee51aa..f6d02f03f7 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -218,10 +218,15 @@ def llapi_set_kernel_status(object params): def llapi_simulate(float t): simulate(t) -def llapi_get_nc_status(NodeCollectionObject nc): +def llapi_get_nc_status(NodeCollectionObject nc, object key=None): cdef dictionary statuses = get_nc_status(nc.thisptr) - # return vec_of_dict_to_list(statuses) - return dictionary_to_pydict(statuses) + if key is None: + return dictionary_to_pydict(statuses) + elif isinstance(key, str): + value = any_to_pyobj(statuses[key.encode('utf-8')]) + return value[0] if len(value) == 1 else value + else: + raise TypeError(f'key must be a string, got {type(key)}') def llapi_set_nc_status(NodeCollectionObject nc, object params): cdef dictionary params_dict = pydict_to_dictionary(params) From 8a94e88d88a28014945a7d3f149468ea911d4fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 18 Mar 2022 14:39:57 +0100 Subject: [PATCH 039/375] Corrected operator==() --- libnestutil/dictionary.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 5e358effa9..1e6dcbc127 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -309,6 +309,10 @@ value_equal( const boost::any first, const boost::any second ) bool dictionary::operator==( const dictionary& other ) const { + if ( size() != other.size() ) + { + return false; + } // Iterate elements in the other dictionary for ( auto& kv_pair : other ) { From b406fe6dbb93a86f4239758c99c73b80470ad0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 18 Mar 2022 14:40:37 +0100 Subject: [PATCH 040/375] Added documentation on the dictionary class --- libnestutil/dictionary.h | 98 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 94 insertions(+), 4 deletions(-) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 0b0bb9856f..e195a96659 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -26,11 +26,16 @@ #include #include #include -#include #include #include "sliexceptions.h" +/** + * @brief Get the typename of the operand. + * + * @param operand to get the typename of. + * @return std::string of the typename. + */ std::string debug_type( const boost::any& operand ); bool is_int( const boost::any& operand ); @@ -48,8 +53,20 @@ bool is_dict( const boost::any& operand ); bool is_parameter( const boost::any& operand ); bool is_nc( const boost::any& operand ); +/** + * @brief Check whether two boost::any values are equal. + * + * @param first The first value. + * @param second The other value. + * @return Whether the values are equal, both in type and value. + */ bool value_equal( const boost::any first, const boost::any second ); +/** + * @brief A Python-like dictionary, based on std::map. + * + * Values are stored as boost::any objects, with std::string keys. + */ class dictionary : public std::map< std::string, boost::any > { // TODO-PYNEST-NG: Meta-information about entries: @@ -59,6 +76,15 @@ class dictionary : public std::map< std::string, boost::any > private: using maptype_ = std::map< std::string, boost::any >; + /** + * @brief Cast the specified value to the specified type. + * + * @tparam T Type of element. If the value is not of the specified type, a TypeMismatch error is thrown. + * @param value the any object to cast. + * @param key key where the value is located in the dictionary, for information upon cast errors. + * @throws TypeMismatch if the value is not of specified type T. + * @return value cast to the specified type. + */ template < typename T > T cast_value_( const boost::any& value, const std::string& key ) const @@ -76,6 +102,14 @@ class dictionary : public std::map< std::string, boost::any > } } + /** + * @brief Cast the specified value to an integer. + * + * @param value the any object to cast. + * @param key key where the value is located in the dictionary, for information upon cast errors. + * @throws TypeMismatch if the value is not an integer. + * @return value cast to an integer. + */ size_t // TODO: or template? cast_to_integer_( const boost::any& value, const std::string& key ) const { @@ -99,6 +133,14 @@ class dictionary : public std::map< std::string, boost::any > } public: + /** + * @brief Get the value at key in the specified type. + * + * @tparam T Type of the value. If the value is not of the specified type, a TypeMismatch error is thrown. + * @param key key where the value is located in the dictionary. + * @throws TypeMismatch if the value is not of specified type T. + * @return the value at key cast to the specified type. + */ template < typename T > T get( const std::string& key ) const @@ -106,12 +148,27 @@ class dictionary : public std::map< std::string, boost::any > return cast_value_< T >( at( key ), key ); } + /** + * @brief Get the value at key as an integer. + * + * @param key key where the value is located in the dictionary. + * @throws TypeMismatch if the value is not an integer. + * @return the value at key cast to the specified type. + */ size_t // TODO: or template? get_integer( const std::string& key ) const { return cast_to_integer_( at( key ), key ); } + /** + * @brief Update the specified value if there exists a value at key. + * + * @param key key where the value may be located in the dictionary. + * @param value object to update if there exists a value at key. + * @throws TypeMismatch if the value at key is not the same type as the value argument. + * @return Whether value was updated. + */ template < typename T > bool update_value( const std::string& key, T& value ) const @@ -125,6 +182,14 @@ class dictionary : public std::map< std::string, boost::any > return false; } + /** + * @brief Update the specified value if there exists an integer value at key. + * + * @param key key where the value may be located in the dictionary. + * @param value object to update if there exists a value at key. + * @throws TypeMismatch if the value at key is not an integer. + * @return Whether the value was updated. + */ template < typename T > bool update_integer_value( const std::string& key, T& value ) const @@ -138,6 +203,12 @@ class dictionary : public std::map< std::string, boost::any > return false; } + /** + * @brief Check whether there exists a value with specified key in the dictionary. + * + * @param key key where the value may be located in the dictionary. + * @return true if there is a value with the specified key, false if not. + */ bool known( const std::string& key ) const { @@ -145,22 +216,41 @@ class dictionary : public std::map< std::string, boost::any > return maptype_::find( key ) != end(); } + /** + * @brief Check whether the dictionary is equal to another dictionary. + * + * Two dictionaries are equal only if they contain the exact same entries with the same values. + * + * @param other dictionary to check against. + * @return true if the dictionary is equal to the other dictionary, false if not. + */ bool operator==( const dictionary& other ) const; + /** + * @brief Check whether the dictionary is unequal to another dictionary. + * + * Two dictionaries are unequal if they do not contain the exact same entries with the same values. + * + * @param other dictionary to check against. + * @return true if the dictionary is unequal to the other dictionary, false if not. + */ bool operator!=( const dictionary& other ) const { return not( *this == other ); } + /** + * @brief Initializes or resets access flags for the current dictionary. + */ void init_access_flags() const; /** * @brief Check that all elements in the dictionary have been accessed. * - * @param where Which function the error occurs in - * @param what Which parameter triggers the error - * + * @param where Which function the error occurs in. + * @param what Which parameter triggers the error. + * @throws UnaccessedDictionaryEntry if there are unaccessed dictionary entries. */ void all_entries_accessed( const std::string where, const std::string what ) const; From a810626a86640f7f14ec8fbb6b01230e4890fe7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 18 Mar 2022 15:34:51 +0100 Subject: [PATCH 041/375] Implemented Prepare(), Run(), and Cleanup() functions --- pynest/nest/lib/hl_api_simulation.py | 9 +++------ pynest/nestkernel_api.pxd | 3 +++ pynest/nestkernel_api.pyx | 9 +++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index d1aea7179e..259c33ea57 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -100,9 +100,7 @@ def Run(t): Prepare, Cleanup, RunManager, Simulate """ - - sps(float(t)) - sr('ms Run') + nestkernel.llapi_run(t) @check_stack @@ -117,8 +115,7 @@ def Prepare(): Run, Cleanup """ - - sr('Prepare') + nestkernel.llapi_prepare() @check_stack @@ -133,7 +130,7 @@ def Cleanup(): Run, Prepare """ - sr('Cleanup') + nestkernel.llapi_cleanup() @contextmanager diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 52236ab129..c98792ff4d 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -99,6 +99,9 @@ cdef extern from "nest.h" namespace "nest": dictionary get_nc_status( NodeCollectionPTR nc ) void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + void simulate( const double& t ) + void prepare() + void run( const double& t ) + void cleanup() shared_ptr[Parameter] create_parameter( const dictionary& param_dict ) cdef extern from "nest.h" namespace "nest": diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index f6d02f03f7..b1b0925db2 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -218,6 +218,15 @@ def llapi_set_kernel_status(object params): def llapi_simulate(float t): simulate(t) +def llapi_prepare(): + prepare() + +def llapi_run(float t): + run(t) + +def llapi_cleanup(): + cleanup() + def llapi_get_nc_status(NodeCollectionObject nc, object key=None): cdef dictionary statuses = get_nc_status(nc.thisptr) if key is None: From 03bd3cf3c7af341e05ac30808da1d392617d1de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 18 Mar 2022 15:56:17 +0100 Subject: [PATCH 042/375] Implemented print_nodes() and get_nodes() functions --- nestkernel/nest.cpp | 8 +++++--- nestkernel/nest.h | 2 +- nestkernel/nestmodule.cpp | 4 ++-- pynest/nest/lib/hl_api_nodes.py | 7 +++---- pynest/nest/lib/hl_api_types.py | 2 +- pynest/nestkernel_api.pxd | 2 ++ pynest/nestkernel_api.pyx | 12 +++++++++++- 7 files changed, 25 insertions(+), 12 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 96f5a7c6f0..2aca3cb852 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -118,10 +118,12 @@ register_logger_client( const deliver_logging_event_ptr client_callback ) kernel().logging_manager.register_logging_client( client_callback ); } -void -print_nodes_to_stream( std::ostream& ostr ) +std::string +print_nodes_to_string() { - kernel().node_manager.print( ostr ); + std::stringstream string_stream; + kernel().node_manager.print( string_stream ); + return string_stream.str(); } std::string diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 69bcade351..1fdaf0314f 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -53,7 +53,7 @@ void enable_dryrun_mode( const index n_procs ); void register_logger_client( const deliver_logging_event_ptr client_callback ); -void print_nodes_to_stream( std::ostream& out = std::cout ); +std::string print_nodes_to_string(); std::string pprint_to_string( NodeCollectionPTR nc ); diff --git a/nestkernel/nestmodule.cpp b/nestkernel/nestmodule.cpp index 5658a4a636..387df743fa 100644 --- a/nestkernel/nestmodule.cpp +++ b/nestkernel/nestmodule.cpp @@ -985,7 +985,7 @@ NestModule::MemoryInfoFunction::execute( SLIInterpreter* i ) const void NestModule::PrintNodesFunction::execute( SLIInterpreter* i ) const { - print_nodes_to_stream(); + // print_nodes_to_stream(); std::cout << std::endl; i->EStack.pop(); } @@ -1004,7 +1004,7 @@ void NestModule::PrintNodesToStreamFunction::execute( SLIInterpreter* i ) const { std::stringstream out; - print_nodes_to_stream( out ); + // print_nodes_to_stream( out ); i->OStack.push( out.str() ); i->EStack.pop(); diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index f5bfe601aa..e2676b5fdd 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -138,8 +138,8 @@ def Create(model, n=1, params=None, positions=None): def PrintNodes(): """Print the `node ID` ranges and `model names` of all the nodes in the network.""" - sr("PrintNodesToStream") - print(spp()) + string = nestkernel.llapi_print_nodes() + print(string) def GetNodes(properties={}, local_only=False): @@ -165,8 +165,7 @@ def GetNodes(properties={}, local_only=False): NodeCollection: `NodeCollection` of nodes """ - - return sli_func('GetNodes', properties, local_only) + return nestkernel.llapi_get_nodes(properties, local_only) @check_stack diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index f9db09ea91..ed2ebf50d4 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -300,7 +300,7 @@ def __len__(self): return nestkernel.llapi_nc_size(self._datum) def __str__(self): - return nestkernel.llapi_to_string(self._datum).decode('utf8') + return nestkernel.llapi_to_string(self._datum) def __repr__(self): return self.__str__() diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index c98792ff4d..fb8d45219d 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -92,9 +92,11 @@ cdef extern from "nest.h" namespace "nest": NodeCollectionPTR targets, const dictionary& connectivity, const vector[dictionary]& synapse_params ) except + + string print_nodes_to_string() string pprint_to_string( NodeCollectionPTR nc ) size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() + NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) void set_kernel_status( const dictionary& ) except + dictionary get_nc_status( NodeCollectionPTR nc ) void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index b1b0925db2..f3329d354b 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -197,16 +197,26 @@ def llapi_slice(NodeCollectionObject nc, long start, long stop, long step): obj._set_nc(nc_ptr) return nest.NodeCollection(obj) +def llapi_print_nodes(): + return print_nodes_to_string().decode('utf8') + def llapi_nc_size(NodeCollectionObject nc): return nc_size(nc.thisptr) def llapi_to_string(NodeCollectionObject nc): - return pprint_to_string(nc.thisptr) + return pprint_to_string(nc.thisptr).decode('utf8') def llapi_get_kernel_status(): cdef dictionary cdict = get_kernel_status() return dictionary_to_pydict(cdict) +def llapi_get_nodes(object params, cbool local_only): + cdef dictionary params_dict = pydict_to_dictionary(params) + cdef NodeCollectionPTR nc_ptr = get_nodes(params_dict, local_only) + obj = NodeCollectionObject() + obj._set_nc(nc_ptr) + return nest.NodeCollection(obj) + def llapi_set_kernel_status(object params): cdef dictionary params_dict = pydict_to_dictionary(params) try: From a3074c34dcade304353c2878837292e983eb81c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Mon, 21 Mar 2022 11:16:40 +0100 Subject: [PATCH 043/375] Implemented Rank(), NumProcesses() and GetLocalNodeCollection() --- nestkernel/nest.cpp | 12 ++++++++++++ nestkernel/nest.h | 3 +++ pynest/nest/lib/hl_api_nodes.py | 13 +++++++++---- pynest/nest/lib/hl_api_parallel_computing.py | 7 +++---- pynest/nestkernel_api.pxd | 2 ++ pynest/nestkernel_api.pyx | 6 ++++++ 6 files changed, 35 insertions(+), 8 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 2aca3cb852..df394e9624 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -118,6 +118,18 @@ register_logger_client( const deliver_logging_event_ptr client_callback ) kernel().logging_manager.register_logging_client( client_callback ); } +int +get_rank() +{ + return kernel().mpi_manager.get_rank(); +} + +int +get_num_mpi_processes() +{ + return kernel().mpi_manager.get_num_processes(); +} + std::string print_nodes_to_string() { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 1fdaf0314f..86002c1191 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -53,6 +53,9 @@ void enable_dryrun_mode( const index n_procs ); void register_logger_client( const deliver_logging_event_ptr client_callback ); +int get_rank(); +int get_num_mpi_processes(); + std::string print_nodes_to_string(); std::string pprint_to_string( NodeCollectionPTR nc ); diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index e2676b5fdd..176d4a106f 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -30,8 +30,8 @@ from .. import pynestkernel as kernel from .. import nestkernel_api as nestkernel from .hl_api_helper import * -from .hl_api_info import SetStatus from .hl_api_types import NodeCollection, Parameter +from .hl_api_parallel_computing import Rank, NumProcesses __all__ = [ 'Create', @@ -188,6 +188,11 @@ def GetLocalNodeCollection(nc): if not isinstance(nc, NodeCollection): raise TypeError("GetLocalNodeCollection requires a NodeCollection in order to run") - sps(nc) - sr("LocalOnly") - return spp() + rank = Rank() + num_procs = NumProcesses() + first_in_nc = nc[0].global_id + first_index = ((rank - first_in_nc % num_procs) + num_procs) % num_procs + if first_index <= len(nc): + return nc[first_index:len(nc):num_procs] + else: + return NodeCollection([]) diff --git a/pynest/nest/lib/hl_api_parallel_computing.py b/pynest/nest/lib/hl_api_parallel_computing.py index e68c959408..79e4e3445d 100644 --- a/pynest/nest/lib/hl_api_parallel_computing.py +++ b/pynest/nest/lib/hl_api_parallel_computing.py @@ -25,6 +25,7 @@ from ..ll_api import * from .. import pynestkernel as kernel +from .. import nestkernel_api as nestkernel from .hl_api_helper import * __all__ = [ @@ -57,8 +58,7 @@ def Rank(): may complete but generate nonsensical results. """ - sr("Rank") - return spp() + return nestkernel.llapi_get_rank() @check_stack @@ -71,8 +71,7 @@ def NumProcesses(): Number of overall MPI processes """ - sr("NumProcesses") - return spp() + return nestkernel.llapi_get_num_mpi_processes() @check_stack diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index fb8d45219d..64575246dd 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -92,6 +92,8 @@ cdef extern from "nest.h" namespace "nest": NodeCollectionPTR targets, const dictionary& connectivity, const vector[dictionary]& synapse_params ) except + + int get_rank() + int get_num_mpi_processes() string print_nodes_to_string() string pprint_to_string( NodeCollectionPTR nc ) size_t nc_size( NodeCollectionPTR nc ) diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index f3329d354b..7fa5897b62 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -197,6 +197,12 @@ def llapi_slice(NodeCollectionObject nc, long start, long stop, long step): obj._set_nc(nc_ptr) return nest.NodeCollection(obj) +def llapi_get_rank(): + return get_rank() + +def llapi_get_num_mpi_processes(): + return get_num_mpi_processes() + def llapi_print_nodes(): return print_nodes_to_string().decode('utf8') From 19d52e74924409dc7073c1d0afaec7a5ef1c39bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Mon, 21 Mar 2022 16:04:14 +0100 Subject: [PATCH 044/375] Added more models to hardcoded registration --- nestkernel/CMakeLists.txt | 4 ++++ nestkernel/nest.cpp | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt index f0217b480e..13decce84a 100644 --- a/nestkernel/CMakeLists.txt +++ b/nestkernel/CMakeLists.txt @@ -73,6 +73,10 @@ set ( nestkernel_sources music_manager.cpp music_manager.h nest.h nest_impl.h nest.cpp ../models/iaf_psc_alpha.h ../models/iaf_psc_alpha.cpp + ../models/iaf_psc_delta.h ../models/iaf_psc_delta.cpp + ../models/iaf_psc_exp.h ../models/iaf_psc_exp.cpp + ../models/parrot_neuron.h ../models/parrot_neuron.cpp + ../models/weight_recorder.h ../models/weight_recorder.cpp synaptic_element.h synaptic_element.cpp growth_curve.h growth_curve.cpp growth_curve_factory.h diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index df394e9624..9a1544aabc 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -33,7 +33,11 @@ #include "connector_model_impl.h" #include "iaf_psc_alpha.h" +#include "iaf_psc_delta.h" +#include "iaf_psc_exp.h" +#include "parrot_neuron.h" #include "static_synapse.h" +#include "weight_recorder.h" #include "spatial.h" @@ -59,7 +63,13 @@ init_nest( int* argc, char** argv[] ) KernelManager::create_kernel_manager(); kernel().mpi_manager.init_mpi( argc, argv ); kernel().initialize(); + kernel().model_manager.register_node_model< iaf_psc_alpha >( "iaf_psc_alpha" ); + kernel().model_manager.register_node_model< iaf_psc_delta >( "iaf_psc_delta" ); + kernel().model_manager.register_node_model< iaf_psc_exp >( "iaf_psc_exp" ); + kernel().model_manager.register_node_model< parrot_neuron >( "parrot_neuron" ); + + kernel().model_manager.register_node_model< weight_recorder >( "weight_recorder" ); kernel().model_manager.register_connection_model< static_synapse >( "static_synapse" ); @@ -340,6 +350,9 @@ equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ) bool contains( const NodeCollectionPTR nc, const size_t node_id ) { + std::cerr << "NodeCollection:\n"; + nc->print_me( std::cerr ); + std::cerr << "\n"; return nc->contains( node_id ); } From 98007d47d40d77d4898db46356fa79b006819e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 22 Mar 2022 09:33:18 +0100 Subject: [PATCH 045/375] Updated GetStatus() and SetStatus() --- pynest/nest/lib/hl_api_info.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py index c048562702..91f506cccd 100644 --- a/pynest/nest/lib/hl_api_info.py +++ b/pynest/nest/lib/hl_api_info.py @@ -299,7 +299,7 @@ def SetStatus(nodes, params, val=None): sr('2 arraystore') sr('Transpose { arrayload pop SetStatus } forall') else: - sli_func('SetStatus', nodes, params) + nodes.set(params) @check_stack @@ -409,21 +409,12 @@ def GetStatus(nodes, keys=None, output=''): return '[]' if output == 'json' else () if keys is None: - cmd = 'GetStatus' - elif is_literal(keys): - cmd = 'GetStatus {{ /{0} get }} Map'.format(keys) - elif is_iterable(keys): - keys_str = " ".join("/{0}".format(x) for x in keys) - cmd = 'GetStatus {{ [ [ {0} ] ] get }} Map'.format(keys_str) + result = nodes.get() + elif is_literal(keys) or is_iterable(keys): + result = nodes.get(keys) else: raise TypeError("keys should be either a string or an iterable") - sps(nodes) - - sr(cmd) - - result = spp() - if isinstance(result, dict): # We have taken GetStatus on a layer object, or another NodeCollection with metadata, which returns a # dictionary from C++, so we need to turn it into a tuple for consistency. From 5bfea812592e6d22b7dee580cc739394efcc7006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 23 Mar 2022 10:30:32 +0100 Subject: [PATCH 046/375] Implemented get_connections() --- nestkernel/conn_builder.cpp | 21 +++++++++++---------- nestkernel/conn_builder.h | 8 ++++---- nestkernel/connection_id.h | 11 +---------- nestkernel/connection_manager.cpp | 14 +++----------- nestkernel/connection_manager.h | 2 +- nestkernel/layer_impl.h | 4 ++-- nestkernel/nest.cpp | 6 +++--- nestkernel/nest.h | 2 +- pynest/nest/lib/hl_api_connections.py | 8 +------- pynest/nest/lib/hl_api_types.py | 12 +++++------- pynest/nestkernel_api.pxd | 6 ++++++ pynest/nestkernel_api.pyx | 27 +++++++++++++++++++++++++++ 12 files changed, 65 insertions(+), 56 deletions(-) diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp index 6961f7696d..c39d562357 100644 --- a/nestkernel/conn_builder.cpp +++ b/nestkernel/conn_builder.cpp @@ -79,11 +79,10 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, synapse_model_id_[ 0 ] = kernel().model_manager.get_synapsedict().get< synindex >( "static_synapse" ); param_dicts_.resize( syn_specs.size() ); - std::cerr << "syn_specs.size(): " << syn_specs.size() << "\n"; // loop through vector of synapse dictionaries, and set synapse parameters for ( size_t synapse_indx = 0; synapse_indx < syn_specs.size(); ++synapse_indx ) { - auto syn_params = syn_specs[ synapse_indx ]; + auto& syn_params = syn_specs[ synapse_indx ]; set_synapse_model_( syn_params, synapse_indx ); set_default_weight_or_delay_( syn_params, synapse_indx ); @@ -430,7 +429,7 @@ nest::ConnBuilder::loop_over_targets_() const } void -nest::ConnBuilder::set_synapse_model_( dictionary syn_params, size_t synapse_indx ) +nest::ConnBuilder::set_synapse_model_( const dictionary& syn_params, const size_t synapse_indx ) { if ( not syn_params.known( names::synapse_model ) ) { @@ -458,7 +457,7 @@ nest::ConnBuilder::set_synapse_model_( dictionary syn_params, size_t synapse_ind } void -nest::ConnBuilder::set_default_weight_or_delay_( dictionary syn_params, size_t synapse_indx ) +nest::ConnBuilder::set_default_weight_or_delay_( const dictionary& syn_params, const size_t synapse_indx ) { dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id_[ synapse_indx ] ); @@ -475,25 +474,27 @@ nest::ConnBuilder::set_default_weight_or_delay_( dictionary syn_params, size_t s if ( not default_weight_and_delay_[ synapse_indx ] ) { weights_[ synapse_indx ] = syn_params.known( names::weight ) - ? ConnParameter::create( syn_params[ names::weight ], kernel().vp_manager.get_num_threads() ) + ? ConnParameter::create( syn_params.at( names::weight ), kernel().vp_manager.get_num_threads() ) : ConnParameter::create( syn_defaults[ names::weight ], kernel().vp_manager.get_num_threads() ); register_parameters_requiring_skipping_( *weights_[ synapse_indx ] ); delays_[ synapse_indx ] = syn_params.known( names::delay ) - ? ConnParameter::create( syn_params[ names::delay ], kernel().vp_manager.get_num_threads() ) + ? ConnParameter::create( syn_params.at( names::delay ), kernel().vp_manager.get_num_threads() ) : ConnParameter::create( syn_defaults[ names::delay ], kernel().vp_manager.get_num_threads() ); } else if ( default_weight_[ synapse_indx ] ) { delays_[ synapse_indx ] = syn_params.known( names::delay ) - ? ConnParameter::create( syn_params[ names::delay ], kernel().vp_manager.get_num_threads() ) + ? ConnParameter::create( syn_params.at( names::delay ), kernel().vp_manager.get_num_threads() ) : ConnParameter::create( syn_defaults[ names::delay ], kernel().vp_manager.get_num_threads() ); } register_parameters_requiring_skipping_( *delays_[ synapse_indx ] ); } void -nest::ConnBuilder::set_synapse_params( dictionary syn_defaults, dictionary syn_params, size_t synapse_indx ) +nest::ConnBuilder::set_synapse_params( const dictionary& syn_defaults, + const dictionary& syn_params, + const size_t synapse_indx ) { for ( auto& syn_kv_pair : syn_defaults ) { @@ -506,7 +507,7 @@ nest::ConnBuilder::set_synapse_params( dictionary syn_defaults, dictionary syn_p if ( syn_params.known( param_name ) ) { synapse_params_[ synapse_indx ][ param_name ] = - ConnParameter::create( syn_params[ param_name ], kernel().vp_manager.get_num_threads() ); + ConnParameter::create( syn_params.at( param_name ), kernel().vp_manager.get_num_threads() ); register_parameters_requiring_skipping_( *synapse_params_[ synapse_indx ][ param_name ] ); } } @@ -532,7 +533,7 @@ nest::ConnBuilder::set_synapse_params( dictionary syn_defaults, dictionary syn_p } void -nest::ConnBuilder::set_structural_plasticity_parameters( std::vector< dictionary > syn_specs ) +nest::ConnBuilder::set_structural_plasticity_parameters( const std::vector< dictionary >& syn_specs ) { // Check if both pre and postsynaptic element are provided. Currently only possible to have // structural plasticity with single element syn_spec. diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h index 318ad6674f..af9fc6ff7b 100644 --- a/nestkernel/conn_builder.h +++ b/nestkernel/conn_builder.h @@ -245,10 +245,10 @@ class ConnBuilder /* * Set synapse specific parameters. */ - void set_synapse_model_( dictionary syn_params, size_t indx ); - void set_default_weight_or_delay_( dictionary syn_params, size_t indx ); - void set_synapse_params( dictionary syn_defaults, dictionary syn_params, size_t indx ); - void set_structural_plasticity_parameters( std::vector< dictionary > syn_specs ); + void set_synapse_model_( const dictionary& syn_params, const size_t indx ); + void set_default_weight_or_delay_( const dictionary& syn_params, const size_t indx ); + void set_synapse_params( const dictionary& syn_defaults, const dictionary& syn_params, const size_t indx ); + void set_structural_plasticity_parameters( const std::vector< dictionary >& syn_specs ); /** * Reset weight and delay pointers diff --git a/nestkernel/connection_id.h b/nestkernel/connection_id.h index 921712d6a1..3963be04b4 100644 --- a/nestkernel/connection_id.h +++ b/nestkernel/connection_id.h @@ -38,7 +38,7 @@ class ConnectionID ConnectionID(); ConnectionID( long source_node_id, long target_node_id, long target_thread, long synapse_modelid, long port ); ConnectionID( long source_node_id, long target_thread, long synapse_modelid, long port ); - ConnectionID( const ConnectionID& ); + ConnectionID( const ConnectionID& ) = default; dictionary get_dict() const; ArrayDatum to_ArrayDatum() const; @@ -67,15 +67,6 @@ inline ConnectionID::ConnectionID() { } -inline ConnectionID::ConnectionID( const ConnectionID& cid ) - : source_node_id_( cid.source_node_id_ ) - , target_node_id_( cid.target_node_id_ ) - , target_thread_( cid.target_thread_ ) - , synapse_modelid_( cid.synapse_modelid_ ) - , port_( cid.port_ ) -{ -} - inline long ConnectionID::get_source_node_id() const { diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 8d787358d4..0bac6a52b9 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -42,6 +42,7 @@ #include "clopath_archiving_node.h" #include "conn_builder.h" #include "conn_builder_factory.h" +#include "connection_id.h" #include "connection_label.h" #include "connector_base.h" #include "connector_model.h" @@ -922,7 +923,7 @@ nest::ConnectionManager::get_num_connections( const synindex syn_id ) const return num_connections; } -ArrayDatum +std::deque< nest::ConnectionID > nest::ConnectionManager::get_connections( const dictionary& params ) { std::deque< ConnectionID > connectome; @@ -991,18 +992,9 @@ nest::ConnectionManager::get_connections( const dictionary& params ) } } - ArrayDatum result; - result.reserve( connectome.size() ); - - while ( not connectome.empty() ) - { - result.push_back( ConnectionDatum( connectome.front() ) ); - connectome.pop_front(); - } - get_connections_has_been_called_ = true; - return result; + return connectome; } // Helper method which removes ConnectionIDs from input deque and diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h index e942c065e5..c98510c79b 100644 --- a/nestkernel/connection_manager.h +++ b/nestkernel/connection_manager.h @@ -200,7 +200,7 @@ class ConnectionManager : public ManagerInterface * The function then iterates all entries in source and collects the * connection IDs to all neurons in target. */ - ArrayDatum get_connections( const dictionary& params ); + std::deque< ConnectionID > get_connections( const dictionary& params ); void get_connections( std::deque< ConnectionID >& connectome, NodeCollectionPTR source, diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h index 8dc1b192ab..f73c8f642c 100644 --- a/nestkernel/layer_impl.h +++ b/nestkernel/layer_impl.h @@ -321,12 +321,12 @@ Layer< D >::dump_connections( std::ostream& out, source_array[ 0 ] = source_node_id; ncdict[ names::source ] = NodeCollectionDatum( NodeCollection::create( source_array ) ); - ArrayDatum connectome = kernel().connection_manager.get_connections( ncdict ); + auto connectome = kernel().connection_manager.get_connections( ncdict ); // Print information about all local connections for current source for ( size_t i = 0; i < connectome.size(); ++i ) { - ConnectionDatum con_id = getValue< ConnectionDatum >( connectome.get( i ) ); + auto con_id = connectome[ i ]; dictionary result_dict = kernel().connection_manager.get_synapse_status( con_id.get_source_node_id(), con_id.get_target_node_id(), con_id.get_target_thread(), diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 9a1544aabc..7d3d96951c 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -398,16 +398,16 @@ connect_arrays( long* sources, kernel().connection_manager.connect_arrays( sources, targets, weights, delays, p_keys, p_values, n, syn_model ); } -ArrayDatum +std::deque< ConnectionID > get_connections( const dictionary& dict ) { dict.init_access_flags(); - ArrayDatum array = kernel().connection_manager.get_connections( dict ); + const auto& connectome = kernel().connection_manager.get_connections( dict ); dict.all_entries_accessed( "GetConnections", "params" ); - return array; + return connectome; } void diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 86002c1191..c2c4dcb97a 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -118,7 +118,7 @@ void connect_arrays( long* sources, size_t n, std::string syn_model ); -ArrayDatum get_connections( const dictionary& dict ); +std::deque< ConnectionID > get_connections( const dictionary& dict ); void simulate( const double& t ); diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py index 60f88bb762..33694cabab 100644 --- a/pynest/nest/lib/hl_api_connections.py +++ b/pynest/nest/lib/hl_api_connections.py @@ -102,13 +102,7 @@ def GetConnections(source=None, target=None, synapse_model=None, if synapse_label is not None: params['synapse_label'] = synapse_label - sps(params) - sr("GetConnections") - - conns = spp() - - if isinstance(conns, tuple): - conns = SynapseCollection(None) + conns = nestkernel.llapi_get_connections(params) return conns diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index ed2ebf50d4..63736750dd 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -581,18 +581,16 @@ def __init__(self, data): if isinstance(data, list): for datum in data: - if (not isinstance(datum, kernel.SLIDatum) or - datum.dtype != "connectiontype"): - raise TypeError("Expected Connection Datum.") + if (not isinstance(datum, nestkernel.ConnectionObject)): + raise TypeError("Expected ConnectionObject.") self._datum = data elif data is None: # We can have an empty SynapseCollection if there are no connections. self._datum = data else: - if (not isinstance(data, kernel.SLIDatum) or - data.dtype != "connectiontype"): - raise TypeError("Expected Connection Datum.") - # self._datum needs to be a list of Connection datums. + if (not isinstance(data, nestkernel.ConnectionObject)): + raise TypeError("Expected ConnectionObject.") + # self._datum needs to be a list of ConnectionObjects. self._datum = [data] self.print_full = False diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 64575246dd..5674289510 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -23,6 +23,7 @@ from libcpp cimport bool as cbool from libcpp.string cimport string from libcpp.vector cimport vector +from libcpp.deque cimport deque from libcpp.utility cimport pair from libcpp.memory cimport shared_ptr @@ -74,6 +75,10 @@ cdef extern from "dictionary.h": cbool is_any_vector(const any&) cbool is_dict(const any&) +cdef extern from "connection_id.h" namespace "nest": + cppclass ConnectionID: + ConnectionID() + cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) void reset_kernel() @@ -99,6 +104,7 @@ cdef extern from "nest.h" namespace "nest": size_t nc_size( NodeCollectionPTR nc ) dictionary get_kernel_status() NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) + deque[ConnectionID] get_connections( const dictionary& dict ) void set_kernel_status( const dictionary& ) except + dictionary get_nc_status( NodeCollectionPTR nc ) void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 7fa5897b62..445471b87d 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -29,6 +29,7 @@ import cython from libcpp.string cimport string from libcpp.vector cimport vector +from libcpp.deque cimport deque from libcpp.memory cimport shared_ptr from cython.operator cimport dereference as deref @@ -56,6 +57,16 @@ cdef class NodeCollectionObject: cdef _set_nc(self, NodeCollectionPTR nc): self.thisptr = nc +cdef class ConnectionObject: + + cdef ConnectionID thisobj + + def __repr__(self): + return "" + + cdef _set_connection_id(self, ConnectionID conn_id): + self.thisobj = conn_id + cdef class ParameterObject: cdef shared_ptr[Parameter] thisptr @@ -363,3 +374,19 @@ def llapi_dimension_parameter(object list_of_pos_params): obj = ParameterObject() obj._set_parameter(dim_parameter) return nest.Parameter(obj) + +def llapi_get_connections(object params): + cdef dictionary params_dictionary = pydict_to_dictionary(params) + cdef deque[ConnectionID] connections + + connections = get_connections(params_dictionary) + + cdef connections_list = [] + cdef deque[ConnectionID].iterator it = connections.begin() + while it != connections.end(): + obj = ConnectionObject() + obj._set_connection_id(deref(it)) + connections_list.append(obj) + inc(it) + + return nest.SynapseCollection(connections_list) From b4c4a16bb6f5db15b40880a961fb9f8eeef296bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 23 Mar 2022 13:54:25 +0100 Subject: [PATCH 047/375] Implemented getting and setting connection status --- libnestutil/dictionary.cpp | 6 +++ libnestutil/dictionary.h | 1 + nestkernel/nest.cpp | 53 ++++++++++++++++++++++++++ nestkernel/nest.h | 5 ++- pynest/nest/lib/hl_api_types.py | 12 +----- pynest/nestkernel_api.pxd | 4 ++ pynest/nestkernel_api.pyx | 67 ++++++++++++++++++++++++++++----- 7 files changed, 127 insertions(+), 21 deletions(-) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 1e6dcbc127..7260200e71 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -47,6 +47,12 @@ is_int( const boost::any& operand ) return operand.type() == typeid( int ); } +bool +is_uint( const boost::any& operand ) +{ + return operand.type() == typeid( unsigned int ); +} + // long bool is_long( const boost::any& operand ) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index e195a96659..2612481b27 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -39,6 +39,7 @@ std::string debug_type( const boost::any& operand ); bool is_int( const boost::any& operand ); +bool is_uint( const boost::any& operand ); bool is_long( const boost::any& operand ); bool is_size_t( const boost::any& operand ); bool is_double( const boost::any& operand ); diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 7d3d96951c..30276debde 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -224,6 +224,59 @@ set_nc_status( NodeCollectionPTR nc, dictionary& params ) params.all_entries_accessed( "NodeCollection.set()", "params" ); } +void +set_connection_status( const std::deque< ConnectionID >& conns, const dictionary& dict ) +{ + for ( auto& conn : conns ) + { + kernel().connection_manager.set_synapse_status( conn.get_source_node_id(), + conn.get_target_node_id(), + conn.get_target_thread(), + conn.get_synapse_model_id(), + conn.get_port(), + dict ); + } +} + +void +set_connection_status( const std::deque< ConnectionID >& conns, const std::vector< dictionary >& dicts ) +{ + if ( conns.size() != dicts.size() ) + { + throw BadParameter( "List of dictionaries must contain one dictionary per connection" ); + } + + for ( size_t i = 0; i < conns.size(); ++i ) + { + const auto conn = conns[ i ]; + const auto dict = dicts[ i ]; + kernel().connection_manager.set_synapse_status( conn.get_source_node_id(), + conn.get_target_node_id(), + conn.get_target_thread(), + conn.get_synapse_model_id(), + conn.get_port(), + dict ); + } +} + +std::vector< dictionary > +get_connection_status( const std::deque< ConnectionID >& conns ) +{ + std::vector< dictionary > result; + result.reserve( conns.size() ); + + for ( auto& conn : conns ) + { + const auto d = kernel().connection_manager.get_synapse_status( conn.get_source_node_id(), + conn.get_target_node_id(), + conn.get_target_thread(), + conn.get_synapse_model_id(), + conn.get_port() ); + result.push_back( d ); + } + return result; +} + void set_node_status( const index node_id, const dictionary& dict ) { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index c2c4dcb97a..bcac1dc453 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -71,8 +71,9 @@ void set_nc_status( NodeCollectionPTR nc, dictionary& params ); void set_node_status( const index node_id, const dictionary& dict ); dictionary get_node_status( const index node_id ); -void set_connection_status( const ConnectionDatum& conn, const dictionary& dict ); -dictionary get_connection_status( const ConnectionDatum& conn ); +void set_connection_status( const std::deque< ConnectionID >& conns, const dictionary& dict ); +void set_connection_status( const std::deque< ConnectionID >& conns, const std::vector< dictionary >& dicts ); +std::vector< dictionary > get_connection_status( const std::deque< ConnectionID >& conns ); NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ); diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 63736750dd..400922e647 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -813,9 +813,7 @@ def get(self, keys=None, output=''): else: raise TypeError("keys should be either a string or an iterable") - sps(self._datum) - sr(cmd) - result = spp() + result = nestkernel.llapi_get_connection_status(self._datum) # Need to restructure the data. final_result = restructure_data(result, keys) @@ -892,13 +890,7 @@ def set(self, params=None, **kwargs): temp_dict[key] = vals[i] params = temp_param - params = broadcast(params, self.__len__(), (dict,), "params") - - sps(self._datum) - sps(params) - - sr('2 arraystore') - sr('Transpose { arrayload pop SetStatus } forall') + nestkernel.llapi_set_connection_status(self._datum, params) class CollocatedSynapses(object): diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 5674289510..a47384eac0 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -63,6 +63,7 @@ cdef extern from "dictionary.h": const_iterator end() string debug_type(const any&) cbool is_int(const any&) + cbool is_uint(const any&) cbool is_long(const any&) cbool is_size_t(const any&) cbool is_double(const any&) @@ -108,6 +109,9 @@ cdef extern from "nest.h" namespace "nest": void set_kernel_status( const dictionary& ) except + dictionary get_nc_status( NodeCollectionPTR nc ) void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + + vector[dictionary] get_connection_status(const deque[ConnectionID]&) except + + void set_connection_status(const deque[ConnectionID]&, const dictionary&) except + + void set_connection_status(const deque[ConnectionID]&, const vector[dictionary]&) except + void simulate( const double& t ) void prepare() void run( const double& t ) diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 445471b87d..4401fde86b 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -90,6 +90,8 @@ cdef object any_vector_to_list(vector[any] cvec): cdef object any_to_pyobj(any operand): if is_int(operand): return any_cast[int](operand) + if is_uint(operand): + return any_cast[uint](operand) if is_long(operand): return any_cast[long](operand) if is_size_t(operand): @@ -99,7 +101,7 @@ cdef object any_to_pyobj(any operand): if is_bool(operand): return any_cast[cbool](operand) if is_string(operand): - return any_cast[string](operand) + return any_cast[string](operand).decode('utf8') if is_int_vector(operand): return any_cast[vector[int]](operand) if is_double_vector(operand): @@ -143,13 +145,19 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *: raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') return cdict -# cdef object vec_of_dict_to_list(vector[dictionary] cvec): -# cdef tmp = [] -# cdef vector[dictionary].iterator it = cvec.begin() -# while it != cvec.end(): -# tmp.append(dictionary_to_pydict(deref(it))) -# inc(it) -# return tmp +cdef object vec_of_dict_to_list(vector[dictionary] cvec): + cdef tmp = [] + cdef vector[dictionary].iterator it = cvec.begin() + while it != cvec.end(): + tmp.append(dictionary_to_pydict(deref(it))) + inc(it) + return tmp + +cdef vector[dictionary] list_of_dict_to_vec(object pylist): + cdef vector[dictionary] vec + for pydict in pylist: + vec.push_back(pydict_to_dictionary(pydict)) + return vec def llapi_reset_kernel(): reset_kernel() @@ -379,7 +387,11 @@ def llapi_get_connections(object params): cdef dictionary params_dictionary = pydict_to_dictionary(params) cdef deque[ConnectionID] connections - connections = get_connections(params_dictionary) + try: + connections = get_connections(params_dictionary) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_get_connections', '') from None cdef connections_list = [] cdef deque[ConnectionID].iterator it = connections.begin() @@ -390,3 +402,40 @@ def llapi_get_connections(object params): inc(it) return nest.SynapseCollection(connections_list) + +def llapi_get_connection_status(object conns): + cdef vector[dictionary] connection_statuses + cdef deque[ConnectionID] conn_deque + cdef ConnectionObject conn_object + for conn_object in conns: + conn_deque.push_back(conn_object.thisobj) + + try: + connection_statuses = get_connection_status(conn_deque) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_get_connection_status', '') from None + + return vec_of_dict_to_list(connection_statuses) + + +def llapi_set_connection_status(object conns, object params): + # Convert the list of connections to a deque + cdef deque[ConnectionID] conn_deque + cdef ConnectionObject conn_object + for conn_object in conns: + conn_deque.push_back(conn_object.thisobj) + + try: + # params can be a dictionary or a list of dictionaries + if isinstance(params, dict): + set_connection_status(conn_deque, pydict_to_dictionary(params)) + elif isinstance(params, list): + if len(params) != len(conns): + raise ValueError('params list length must be equal to number of connections') + set_connection_status(conn_deque, list_of_dict_to_vec(params)) + else: + raise TypeError('params must be a dict or a list of dicts') + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls('llapi_set_connection_status', '') from None From d0bbc5f72303ae0f97f2bf1115e38903f0f6ed27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 23 Mar 2022 15:33:29 +0100 Subject: [PATCH 048/375] Added decorator for C++ exception handling --- pynest/nestkernel_api.pxd | 30 +++---- pynest/nestkernel_api.pyx | 185 ++++++++++++++++---------------------- 2 files changed, 93 insertions(+), 122 deletions(-) diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index a47384eac0..e47a2e5dda 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -98,25 +98,25 @@ cdef extern from "nest.h" namespace "nest": NodeCollectionPTR targets, const dictionary& connectivity, const vector[dictionary]& synapse_params ) except + - int get_rank() - int get_num_mpi_processes() + int get_rank() except + + int get_num_mpi_processes() except + string print_nodes_to_string() - string pprint_to_string( NodeCollectionPTR nc ) - size_t nc_size( NodeCollectionPTR nc ) - dictionary get_kernel_status() - NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) - deque[ConnectionID] get_connections( const dictionary& dict ) + string pprint_to_string( NodeCollectionPTR nc ) except + + size_t nc_size( NodeCollectionPTR nc ) except + + dictionary get_kernel_status() except + + NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) except + + deque[ConnectionID] get_connections( const dictionary& dict ) except + void set_kernel_status( const dictionary& ) except + - dictionary get_nc_status( NodeCollectionPTR nc ) + dictionary get_nc_status( NodeCollectionPTR nc ) except + void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except + vector[dictionary] get_connection_status(const deque[ConnectionID]&) except + void set_connection_status(const deque[ConnectionID]&, const dictionary&) except + void set_connection_status(const deque[ConnectionID]&, const vector[dictionary]&) except + - void simulate( const double& t ) - void prepare() - void run( const double& t ) - void cleanup() - shared_ptr[Parameter] create_parameter( const dictionary& param_dict ) + void simulate( const double& t ) except + + void prepare() except + + void run( const double& t ) except + + void cleanup() except + + shared_ptr[Parameter] create_parameter( const dictionary& param_dict ) except + cdef extern from "nest.h" namespace "nest": NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except + @@ -126,5 +126,5 @@ cdef extern from "nest.h" namespace "nest": cdef extern from "parameter.h" namespace "nest": cppclass Parameter: Parameter() - shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y) - shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y, const shared_ptr[Parameter] z) + shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y) except + + shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y, const shared_ptr[Parameter] z) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 4401fde86b..f000d46c24 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -159,43 +159,44 @@ cdef vector[dictionary] list_of_dict_to_vec(object pylist): vec.push_back(pydict_to_dictionary(pydict)) return vec +def catch_cpp_error(func): + def wrapper_catch_cpp_error(*args, **kwargs): + try: + return func(*args, **kwargs) + except RuntimeError as e: + exceptionCls = getattr(NESTErrors, str(e)) + raise exceptionCls(func.__name__, '') from None + return wrapper_catch_cpp_error + def llapi_reset_kernel(): reset_kernel() +@catch_cpp_error def llapi_create(string model, long n): cdef NodeCollectionPTR gids - try: - gids = create(model, n) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_create', '') from None + gids = create(model, n) obj = NodeCollectionObject() obj._set_nc(gids) return nest.NodeCollection(obj) +@catch_cpp_error def llapi_create_spatial(object layer_params): cdef NodeCollectionPTR gids - try: - gids = create_spatial(pydict_to_dictionary(layer_params)) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_create_spatial', '') from None + gids = create_spatial(pydict_to_dictionary(layer_params)) obj = NodeCollectionObject() obj._set_nc(gids) return nest.NodeCollection(obj) +@catch_cpp_error def llapi_make_nodecollection(object node_ids): cdef NodeCollectionPTR gids - try: - # node_ids list is automatically converted to an std::vector - gids = make_nodecollection(node_ids) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_make_nodecollection', '') from None + # node_ids list is automatically converted to an std::vector + gids = make_nodecollection(node_ids) obj = NodeCollectionObject() obj._set_nc(gids) return nest.NodeCollection(obj) +@catch_cpp_error def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params): cdef vector[dictionary] syn_param_vec if synapse_params is not None: @@ -205,36 +206,39 @@ def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object co pydict_to_dictionary(conn_params), syn_param_vec) +@catch_cpp_error def llapi_slice(NodeCollectionObject nc, long start, long stop, long step): cdef NodeCollectionPTR nc_ptr - try: - nc_ptr = slice_nc(nc.thisptr, start, stop, step) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_slice', '') from None + nc_ptr = slice_nc(nc.thisptr, start, stop, step) obj = NodeCollectionObject() obj._set_nc(nc_ptr) return nest.NodeCollection(obj) +@catch_cpp_error def llapi_get_rank(): return get_rank() +@catch_cpp_error def llapi_get_num_mpi_processes(): return get_num_mpi_processes() def llapi_print_nodes(): return print_nodes_to_string().decode('utf8') +@catch_cpp_error def llapi_nc_size(NodeCollectionObject nc): return nc_size(nc.thisptr) +@catch_cpp_error def llapi_to_string(NodeCollectionObject nc): return pprint_to_string(nc.thisptr).decode('utf8') +@catch_cpp_error def llapi_get_kernel_status(): cdef dictionary cdict = get_kernel_status() return dictionary_to_pydict(cdict) +@catch_cpp_error def llapi_get_nodes(object params, cbool local_only): cdef dictionary params_dict = pydict_to_dictionary(params) cdef NodeCollectionPTR nc_ptr = get_nodes(params_dict, local_only) @@ -242,26 +246,28 @@ def llapi_get_nodes(object params, cbool local_only): obj._set_nc(nc_ptr) return nest.NodeCollection(obj) +@catch_cpp_error def llapi_set_kernel_status(object params): cdef dictionary params_dict = pydict_to_dictionary(params) - try: - set_kernel_status(params_dict) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_set_kernel_status', '') from None + set_kernel_status(params_dict) +@catch_cpp_error def llapi_simulate(float t): simulate(t) +@catch_cpp_error def llapi_prepare(): prepare() +@catch_cpp_error def llapi_run(float t): run(t) +@catch_cpp_error def llapi_cleanup(): cleanup() +@catch_cpp_error def llapi_get_nc_status(NodeCollectionObject nc, object key=None): cdef dictionary statuses = get_nc_status(nc.thisptr) if key is None: @@ -272,58 +278,37 @@ def llapi_get_nc_status(NodeCollectionObject nc, object key=None): else: raise TypeError(f'key must be a string, got {type(key)}') +@catch_cpp_error def llapi_set_nc_status(NodeCollectionObject nc, object params): cdef dictionary params_dict = pydict_to_dictionary(params) - try: - set_nc_status(nc.thisptr, params_dict) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_set_nc_status', '') from None + set_nc_status(nc.thisptr, params_dict) +@catch_cpp_error def llapi_join_nc(NodeCollectionObject lhs, NodeCollectionObject rhs): cdef NodeCollectionPTR result - try: - # Using operator+() directly - result = lhs.thisptr + rhs.thisptr - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_join_nc', '') from None + # Using operator+() directly + result = lhs.thisptr + rhs.thisptr obj = NodeCollectionObject() obj._set_nc(result) return nest.NodeCollection(obj) - +@catch_cpp_error def llapi_eq_nc(NodeCollectionObject lhs, NodeCollectionObject rhs): - try: - return equal(lhs.thisptr, rhs.thisptr) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_eq_nc', '') from None - + return equal(lhs.thisptr, rhs.thisptr) +@catch_cpp_error def llapi_nc_contains(NodeCollectionObject nc, long node_id): - try: - return contains(nc.thisptr, node_id) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_nc_contains', '') from None + return contains(nc.thisptr, node_id) +@catch_cpp_error def llapi_nc_find(NodeCollectionObject nc, long node_id): - try: - return find(nc.thisptr, node_id) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_nc_find', '') from None + return find(nc.thisptr, node_id) -# TODO-PYNEST-NG: decorator for exception handling? +@catch_cpp_error def llapi_get_nc_metadata(NodeCollectionObject nc): - try: - return dictionary_to_pydict(get_metadata(nc.thisptr)) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_get_nc_metadata', '') from None - + return dictionary_to_pydict(get_metadata(nc.thisptr)) +@catch_cpp_error def llapi_take_array_index(NodeCollectionObject node_collection, object array): if not isinstance(array, numpy.ndarray): raise TypeError('array must be a 1-dimensional NumPy array of ints or bools, got {}'.format(type(array))) @@ -339,37 +324,31 @@ def llapi_take_array_index(NodeCollectionObject node_collection, object array): cdef NodeCollectionPTR new_nc_ptr - try: - if array.dtype == numpy.bool: - # Boolean C-type arrays are not supported in NumPy, so we use an 8-bit integer array - array_bool_mv = numpy.ascontiguousarray(array, dtype=numpy.uint8) - array_bool_ptr = &array_bool_mv[0] - new_nc_ptr = node_collection_array_index(node_collection.thisptr, array_bool_ptr, len(array)) - elif numpy.issubdtype(array.dtype, numpy.integer): - array_long_mv = numpy.ascontiguousarray(array, dtype=numpy.long) - array_long_ptr = &array_long_mv[0] - new_nc_ptr = node_collection_array_index(node_collection.thisptr, array_long_ptr, len(array)) - else: - raise TypeError('array must be a NumPy array of ints or bools, got {}'.format(array.dtype)) - obj = NodeCollectionObject() - obj._set_nc(new_nc_ptr) - return nest.NodeCollection(obj) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('take_array_index', '') from None + if array.dtype == numpy.bool: + # Boolean C-type arrays are not supported in NumPy, so we use an 8-bit integer array + array_bool_mv = numpy.ascontiguousarray(array, dtype=numpy.uint8) + array_bool_ptr = &array_bool_mv[0] + new_nc_ptr = node_collection_array_index(node_collection.thisptr, array_bool_ptr, len(array)) + elif numpy.issubdtype(array.dtype, numpy.integer): + array_long_mv = numpy.ascontiguousarray(array, dtype=numpy.long) + array_long_ptr = &array_long_mv[0] + new_nc_ptr = node_collection_array_index(node_collection.thisptr, array_long_ptr, len(array)) + else: + raise TypeError('array must be a NumPy array of ints or bools, got {}'.format(array.dtype)) + obj = NodeCollectionObject() + obj._set_nc(new_nc_ptr) + return nest.NodeCollection(obj) +@catch_cpp_error def llapi_create_parameter(object specs): cdef dictionary specs_dictionary = pydict_to_dictionary(specs) cdef shared_ptr[Parameter] parameter - try: - parameter = create_parameter(specs_dictionary) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_create_parameter', '') from None + parameter = create_parameter(specs_dictionary) obj = ParameterObject() obj._set_parameter(parameter) return nest.Parameter(obj) +@catch_cpp_error def llapi_dimension_parameter(object list_of_pos_params): cdef shared_ptr[Parameter] dim_parameter cdef ParameterObject x, y, z @@ -383,15 +362,12 @@ def llapi_dimension_parameter(object list_of_pos_params): obj._set_parameter(dim_parameter) return nest.Parameter(obj) +@catch_cpp_error def llapi_get_connections(object params): cdef dictionary params_dictionary = pydict_to_dictionary(params) cdef deque[ConnectionID] connections - try: - connections = get_connections(params_dictionary) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_get_connections', '') from None + connections = get_connections(params_dictionary) cdef connections_list = [] cdef deque[ConnectionID].iterator it = connections.begin() @@ -403,22 +379,21 @@ def llapi_get_connections(object params): return nest.SynapseCollection(connections_list) +@catch_cpp_error def llapi_get_connection_status(object conns): cdef vector[dictionary] connection_statuses + # Convert the list of connections to a deque cdef deque[ConnectionID] conn_deque cdef ConnectionObject conn_object for conn_object in conns: conn_deque.push_back(conn_object.thisobj) - try: - connection_statuses = get_connection_status(conn_deque) - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_get_connection_status', '') from None + connection_statuses = get_connection_status(conn_deque) return vec_of_dict_to_list(connection_statuses) +@catch_cpp_error def llapi_set_connection_status(object conns, object params): # Convert the list of connections to a deque cdef deque[ConnectionID] conn_deque @@ -426,16 +401,12 @@ def llapi_set_connection_status(object conns, object params): for conn_object in conns: conn_deque.push_back(conn_object.thisobj) - try: - # params can be a dictionary or a list of dictionaries - if isinstance(params, dict): - set_connection_status(conn_deque, pydict_to_dictionary(params)) - elif isinstance(params, list): - if len(params) != len(conns): - raise ValueError('params list length must be equal to number of connections') - set_connection_status(conn_deque, list_of_dict_to_vec(params)) - else: - raise TypeError('params must be a dict or a list of dicts') - except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls('llapi_set_connection_status', '') from None + # params can be a dictionary or a list of dictionaries + if isinstance(params, dict): + set_connection_status(conn_deque, pydict_to_dictionary(params)) + elif isinstance(params, list): + if len(params) != len(conns): + raise ValueError('params list length must be equal to number of connections') + set_connection_status(conn_deque, list_of_dict_to_vec(params)) + else: + raise TypeError('params must be a dict or a list of dicts') From a47b6a9b98165b7d6b6f634365b50c31c1a44b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 30 Mar 2022 10:34:48 +0200 Subject: [PATCH 049/375] Cleaned up nestkernel_api --- pynest/nestkernel_api.pxd | 42 ++++++++++++++++++--------------------- pynest/nestkernel_api.pyx | 14 +++++-------- 2 files changed, 24 insertions(+), 32 deletions(-) diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index e47a2e5dda..e2107ed978 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -27,20 +27,6 @@ from libcpp.deque cimport deque from libcpp.utility cimport pair from libcpp.memory cimport shared_ptr -from cpython.ref cimport PyObject - -cdef extern from "node_collection.h" namespace "nest": - cppclass NodeCollectionPTR: - NodeCollectionPTR() - - NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) except + - -cdef extern from "node_collection.h": - cppclass NodeCollectionDatum: - NodeCollectionDatum(const NodeCollectionDatum&) - - cppclass NodeCollectionIteratorDatum: - NodeCollectionIteratorDatum(const NodeCollectionIteratorDatum&) cdef extern from "dictionary.h" namespace "boost": cppclass any: @@ -51,8 +37,6 @@ cdef extern from "dictionary.h" namespace "boost": cdef extern from "dictionary.h": cppclass dictionary: dictionary() - # ctypedef key_type - # ctypedef mapped_type any& operator[](const string&) cppclass const_iterator: pair[string, any]& operator*() @@ -80,6 +64,25 @@ cdef extern from "connection_id.h" namespace "nest": cppclass ConnectionID: ConnectionID() +cdef extern from "node_collection.h" namespace "nest": + cppclass NodeCollectionPTR: + NodeCollectionPTR() + + NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) except + + +cdef extern from "node_collection.h": + cppclass NodeCollectionDatum: + NodeCollectionDatum(const NodeCollectionDatum&) + + cppclass NodeCollectionIteratorDatum: + NodeCollectionIteratorDatum(const NodeCollectionIteratorDatum&) + +cdef extern from "parameter.h" namespace "nest": + cppclass Parameter: + Parameter() + shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y) except + + shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y, const shared_ptr[Parameter] z) except + + cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) void reset_kernel() @@ -118,13 +121,6 @@ cdef extern from "nest.h" namespace "nest": void cleanup() except + shared_ptr[Parameter] create_parameter( const dictionary& param_dict ) except + -cdef extern from "nest.h" namespace "nest": NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except + NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except + void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except + - -cdef extern from "parameter.h" namespace "nest": - cppclass Parameter: - Parameter() - shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y) except + - shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y, const shared_ptr[Parameter] z) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index f000d46c24..9321292a2c 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -22,7 +22,7 @@ # distutils: language = c++ # -import cython +# import cython # from libc.stdlib cimport malloc, free # from libc.string cimport memcpy @@ -35,14 +35,8 @@ from libcpp.memory cimport shared_ptr from cython.operator cimport dereference as deref from cython.operator cimport preincrement as inc -# from cpython cimport array - -# from cpython.ref cimport PyObject -# from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE - import nest -from nest.lib.hl_api_exceptions import NESTMappedException, NESTErrors, NESTError -from libcpp.memory cimport shared_ptr +from nest.lib.hl_api_exceptions import NESTErrors import numpy @@ -57,6 +51,7 @@ cdef class NodeCollectionObject: cdef _set_nc(self, NodeCollectionPTR nc): self.thisptr = nc + cdef class ConnectionObject: cdef ConnectionID thisobj @@ -67,6 +62,7 @@ cdef class ConnectionObject: cdef _set_connection_id(self, ConnectionID conn_id): self.thisobj = conn_id + cdef class ParameterObject: cdef shared_ptr[Parameter] thisptr @@ -126,7 +122,7 @@ cdef object dictionary_to_pydict(dictionary cdict): inc(it) return tmp -cdef dictionary pydict_to_dictionary(object py_dict) except *: +cdef dictionary pydict_to_dictionary(object py_dict) except *: # Adding "except *" makes cython propagate the error if it is raised. cdef dictionary cdict = dictionary() for key, value in py_dict.items(): if type(value) is int: From 1911fb6e96f0a7c2317acd3e9d49d666c298b423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 31 Mar 2022 11:30:05 +0200 Subject: [PATCH 050/375] Added debug function for printing dictionary types --- libnestutil/dictionary.cpp | 13 +++++++++++++ libnestutil/dictionary.h | 4 ++++ pynest/nestkernel_api.pxd | 1 + 3 files changed, 18 insertions(+) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 7260200e71..6bb6d625d6 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -40,6 +40,19 @@ debug_type( const boost::any& operand ) return operand.type().name(); } +std::string +debug_dict_types( const dictionary& dict ) +{ + std::string s = "[dictionary]\n"; + + for ( auto& kv : dict ) + { + s += kv.first + ": "; + s += debug_type( kv.second ) + "\n"; + } + return s; +} + // int bool is_int( const boost::any& operand ) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 2612481b27..2bd79ccdfa 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -30,6 +30,8 @@ #include "sliexceptions.h" +class dictionary; + /** * @brief Get the typename of the operand. * @@ -38,6 +40,8 @@ */ std::string debug_type( const boost::any& operand ); +std::string debug_dict_types( const dictionary& dict ); + bool is_int( const boost::any& operand ); bool is_uint( const boost::any& operand ); bool is_long( const boost::any& operand ); diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index e2107ed978..504fd17895 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -46,6 +46,7 @@ cdef extern from "dictionary.h": const_iterator begin() const_iterator end() string debug_type(const any&) + string debug_dict_types(const dictionary&) cbool is_int(const any&) cbool is_uint(const any&) cbool is_long(const any&) From afcef96eb1e08d3a826c753f2cfa0ae5296e63f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 31 Mar 2022 11:31:48 +0200 Subject: [PATCH 051/375] Added get_statusdict() function --- nestkernel/nest.cpp | 81 ++++++++++++++++++++++++++++++++++ nestkernel/nest.h | 18 ++++++++ pynest/nest/lib/hl_api_info.py | 6 +++ pynest/nestkernel_api.pxd | 1 + pynest/nestkernel_api.pyx | 5 +++ 5 files changed, 111 insertions(+) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 30276debde..28de67537f 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -47,6 +47,7 @@ #include "model_manager.h" #include "model_manager_impl.h" +#include "config.h" #include "dictionary.h" @@ -110,6 +111,86 @@ install_module( const std::string& ) { } +dictionary +get_statusdict() +{ + dictionary statusdict; + + statusdict[ "version" ] = std::string( NEST_VERSION_STRING ); + statusdict[ "exitcode" ] = EXIT_SUCCESS; + statusdict[ "built" ] = std::string( String::compose( "%1 %2", __DATE__, __TIME__ ) ); + statusdict[ "prgdatadir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DATADIR ); + statusdict[ "prgdocdir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DOCDIR ); + statusdict[ "prefix" ] = std::string( NEST_INSTALL_PREFIX ); + statusdict[ "host" ] = std::string( NEST_HOST ); + statusdict[ "hostos" ] = std::string( NEST_HOSTOS ); + statusdict[ "hostvendor" ] = std::string( NEST_HOSTVENDOR ); + statusdict[ "hostcpu" ] = std::string( NEST_HOSTCPU ); + +#ifdef _OPENMP + statusdict[ "threading" ] = std::string( "openmp" ); +#else + statusdict[ "threading" ] = std::string( "no" ); +#endif + +#ifdef HAVE_MPI + statusdict[ "have_mpi" ] = true; +#else + statusdict[ "have_mpi" ] = false; +#endif + +#ifdef HAVE_GSL + statusdict[ "have_gsl" ] = true; +#else + statusdict[ "have_gsl" ] = false; +#endif + +#ifdef HAVE_MUSIC + statusdict[ "have_music" ] = true; +#else + statusdict[ "have_music" ] = false; +#endif + +#ifdef HAVE_LIBNEUROSIM + statusdict[ "have_libneurosim" ] = true; +#else + statusdict[ "have_libneurosim" ] = false; +#endif + +#ifdef HAVE_SIONLIB + statusdict[ "have_sionlib" ] = true; +#else + statusdict[ "have_sionlib" ] = false; +#endif + +#ifdef NDEBUG + statusdict[ "ndebug" ] = true; +#else + statusdict[ "ndebug" ] = false; +#endif + + dictionary exitcodes; + + exitcodes[ "success" ] = EXIT_SUCCESS; + exitcodes[ "skipped" ] = EXITCODE_SKIPPED; + exitcodes[ "skipped_no_mpi" ] = EXITCODE_SKIPPED_NO_MPI; + exitcodes[ "skipped_have_mpi" ] = EXITCODE_SKIPPED_HAVE_MPI; + exitcodes[ "skipped_no_threading" ] = EXITCODE_SKIPPED_NO_THREADING; + exitcodes[ "skipped_no_gsl" ] = EXITCODE_SKIPPED_NO_GSL; + exitcodes[ "skipped_no_music" ] = EXITCODE_SKIPPED_NO_MUSIC; + exitcodes[ "scripterror" ] = EXITCODE_SCRIPTERROR; + exitcodes[ "abort" ] = NEST_EXITCODE_ABORT; + exitcodes[ "userabort" ] = EXITCODE_USERABORT; + exitcodes[ "segfault" ] = NEST_EXITCODE_SEGFAULT; + exitcodes[ "exception" ] = EXITCODE_EXCEPTION; + exitcodes[ "fatal" ] = EXITCODE_FATAL; + exitcodes[ "unknownerror" ] = EXITCODE_UNKNOWN_ERROR; + + statusdict[ "exitcodes" ] = exitcodes; + + return statusdict; +} + void reset_kernel() { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index bcac1dc453..d2a0686325 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -42,11 +42,29 @@ namespace nest { +// Exit codes +#define EXITCODE_UNKNOWN_ERROR 10 +#define EXITCODE_USERABORT 15 +#define EXITCODE_EXCEPTION 125 +#define EXITCODE_SCRIPTERROR 126 +#define EXITCODE_FATAL 127 + +// The range 200-215 is reserved for test skipping exitcodes. Any new codes must +// also be added to testsuite/do_tests_sh.in. +#define EXITCODE_SKIPPED 200 +#define EXITCODE_SKIPPED_NO_MPI 201 +#define EXITCODE_SKIPPED_HAVE_MPI 202 +#define EXITCODE_SKIPPED_NO_THREADING 203 +#define EXITCODE_SKIPPED_NO_GSL 204 +#define EXITCODE_SKIPPED_NO_MUSIC 205 + void init_nest( int* argc, char** argv[] ); void fail_exit( int exitcode ); void install_module( const std::string& module_name ); +dictionary get_statusdict(); + void reset_kernel(); void enable_dryrun_mode( const index n_procs ); diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py index 91f506cccd..b496a55925 100644 --- a/pynest/nest/lib/hl_api_info.py +++ b/pynest/nest/lib/hl_api_info.py @@ -31,10 +31,12 @@ from ..ll_api import * from .hl_api_helper import * from .hl_api_types import to_json +from .. import nestkernel_api as nestkernel import nest __all__ = [ 'authors', + 'get_statusdict', 'get_argv', 'GetStatus', 'get_verbosity', @@ -128,6 +130,10 @@ def help(obj=None, return_text=False): print(nest.__doc__) +def get_statusdict(): + return nestkernel.llapi_get_statusdict() + + @check_stack def get_argv(): """Return argv as seen by NEST. diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 504fd17895..69c8ffc17d 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -86,6 +86,7 @@ cdef extern from "parameter.h" namespace "nest": cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) + dictionary get_statusdict() except + void reset_kernel() NodeCollectionPTR create( const string model_name, const long n ) except + NodeCollectionPTR create_spatial( const dictionary& ) diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 9321292a2c..1570991a79 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -164,6 +164,11 @@ def catch_cpp_error(func): raise exceptionCls(func.__name__, '') from None return wrapper_catch_cpp_error +@catch_cpp_error +def llapi_get_statusdict(): + cdef dictionary cdict = get_statusdict() + return dictionary_to_pydict(cdict) + def llapi_reset_kernel(): reset_kernel() From 3cfc29cfc5cd87213398fda2d306c77e341f86c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 31 Mar 2022 14:45:57 +0200 Subject: [PATCH 052/375] Moved statusdict to KernelManager --- nestkernel/kernel_manager.cpp | 99 +++++++++++++++++++++++++++++++++++ nestkernel/kernel_manager.h | 2 + nestkernel/nest.cpp | 80 ---------------------------- nestkernel/nest.h | 19 ------- pynest/nestkernel_api.pxd | 1 - pynest/nestkernel_api.pyx | 5 -- 6 files changed, 101 insertions(+), 105 deletions(-) diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp index 63f7bb443a..a814d57d7f 100644 --- a/nestkernel/kernel_manager.cpp +++ b/nestkernel/kernel_manager.cpp @@ -24,6 +24,103 @@ nest::KernelManager* nest::KernelManager::kernel_manager_instance_ = 0; + +dictionary +nest::KernelManager::get_build_info_() +{ + // Exit codes + constexpr unsigned int EXITCODE_UNKNOWN_ERROR = 10; + constexpr unsigned int EXITCODE_USERABORT = 15; + constexpr unsigned int EXITCODE_EXCEPTION = 125; + constexpr unsigned int EXITCODE_SCRIPTERROR = 126; + constexpr unsigned int EXITCODE_FATAL = 127; + + // The range 200-215 is reserved for test skipping exitcodes. Any new codes must + // also be added to testsuite/do_tests_sh.in. + constexpr unsigned int EXITCODE_SKIPPED = 200; + constexpr unsigned int EXITCODE_SKIPPED_NO_MPI = 201; + constexpr unsigned int EXITCODE_SKIPPED_HAVE_MPI = 202; + constexpr unsigned int EXITCODE_SKIPPED_NO_THREADING = 203; + constexpr unsigned int EXITCODE_SKIPPED_NO_GSL = 204; + constexpr unsigned int EXITCODE_SKIPPED_NO_MUSIC = 205; + + dictionary build_info; + + build_info[ "version" ] = std::string( NEST_VERSION_STRING ); + build_info[ "exitcode" ] = EXIT_SUCCESS; + build_info[ "built" ] = std::string( String::compose( "%1 %2", __DATE__, __TIME__ ) ); + build_info[ "data_dir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DATADIR ); + build_info[ "doc_dir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DOCDIR ); + build_info[ "prefix" ] = std::string( NEST_INSTALL_PREFIX ); + build_info[ "host" ] = std::string( NEST_HOST ); + build_info[ "hostos" ] = std::string( NEST_HOSTOS ); + build_info[ "hostvendor" ] = std::string( NEST_HOSTVENDOR ); + build_info[ "hostcpu" ] = std::string( NEST_HOSTCPU ); + +#ifdef _OPENMP + build_info[ "threading" ] = std::string( "openmp" ); +#else + build_info[ "threading" ] = std::string( "no" ); +#endif + +#ifdef HAVE_MPI + build_info[ "have_mpi" ] = true; +#else + build_info[ "have_mpi" ] = false; +#endif + +#ifdef HAVE_GSL + build_info[ "have_gsl" ] = true; +#else + build_info[ "have_gsl" ] = false; +#endif + +#ifdef HAVE_MUSIC + build_info[ "have_music" ] = true; +#else + build_info[ "have_music" ] = false; +#endif + +#ifdef HAVE_LIBNEUROSIM + build_info[ "have_libneurosim" ] = true; +#else + build_info[ "have_libneurosim" ] = false; +#endif + +#ifdef HAVE_SIONLIB + build_info[ "have_sionlib" ] = true; +#else + build_info[ "have_sionlib" ] = false; +#endif + +#ifdef NDEBUG + build_info[ "ndebug" ] = true; +#else + build_info[ "ndebug" ] = false; +#endif + + dictionary exitcodes; + + exitcodes[ "success" ] = EXIT_SUCCESS; + exitcodes[ "skipped" ] = EXITCODE_SKIPPED; + exitcodes[ "skipped_no_mpi" ] = EXITCODE_SKIPPED_NO_MPI; + exitcodes[ "skipped_have_mpi" ] = EXITCODE_SKIPPED_HAVE_MPI; + exitcodes[ "skipped_no_threading" ] = EXITCODE_SKIPPED_NO_THREADING; + exitcodes[ "skipped_no_gsl" ] = EXITCODE_SKIPPED_NO_GSL; + exitcodes[ "skipped_no_music" ] = EXITCODE_SKIPPED_NO_MUSIC; + exitcodes[ "scripterror" ] = EXITCODE_SCRIPTERROR; + exitcodes[ "abort" ] = NEST_EXITCODE_ABORT; + exitcodes[ "userabort" ] = EXITCODE_USERABORT; + exitcodes[ "segfault" ] = NEST_EXITCODE_SEGFAULT; + exitcodes[ "exception" ] = EXITCODE_EXCEPTION; + exitcodes[ "fatal" ] = EXITCODE_FATAL; + exitcodes[ "unknownerror" ] = EXITCODE_UNKNOWN_ERROR; + + build_info[ "test_exitcodes" ] = exitcodes; + + return build_info; +} + void nest::KernelManager::create_kernel_manager() { @@ -174,4 +271,6 @@ nest::KernelManager::get_status( dictionary& dict ) { manager->get_status( dict ); } + + dict[ "build_info" ] = get_build_info_(); } diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h index 92ca4b331f..771121b8b7 100644 --- a/nestkernel/kernel_manager.h +++ b/nestkernel/kernel_manager.h @@ -122,6 +122,8 @@ class KernelManager KernelManager( KernelManager const& ); // do not implement void operator=( KernelManager const& ); // do not implement + dictionary get_build_info_(); + public: /** * Create/destroy and access the KernelManager singleton. diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 28de67537f..6d38ee0998 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -111,86 +111,6 @@ install_module( const std::string& ) { } -dictionary -get_statusdict() -{ - dictionary statusdict; - - statusdict[ "version" ] = std::string( NEST_VERSION_STRING ); - statusdict[ "exitcode" ] = EXIT_SUCCESS; - statusdict[ "built" ] = std::string( String::compose( "%1 %2", __DATE__, __TIME__ ) ); - statusdict[ "prgdatadir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DATADIR ); - statusdict[ "prgdocdir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DOCDIR ); - statusdict[ "prefix" ] = std::string( NEST_INSTALL_PREFIX ); - statusdict[ "host" ] = std::string( NEST_HOST ); - statusdict[ "hostos" ] = std::string( NEST_HOSTOS ); - statusdict[ "hostvendor" ] = std::string( NEST_HOSTVENDOR ); - statusdict[ "hostcpu" ] = std::string( NEST_HOSTCPU ); - -#ifdef _OPENMP - statusdict[ "threading" ] = std::string( "openmp" ); -#else - statusdict[ "threading" ] = std::string( "no" ); -#endif - -#ifdef HAVE_MPI - statusdict[ "have_mpi" ] = true; -#else - statusdict[ "have_mpi" ] = false; -#endif - -#ifdef HAVE_GSL - statusdict[ "have_gsl" ] = true; -#else - statusdict[ "have_gsl" ] = false; -#endif - -#ifdef HAVE_MUSIC - statusdict[ "have_music" ] = true; -#else - statusdict[ "have_music" ] = false; -#endif - -#ifdef HAVE_LIBNEUROSIM - statusdict[ "have_libneurosim" ] = true; -#else - statusdict[ "have_libneurosim" ] = false; -#endif - -#ifdef HAVE_SIONLIB - statusdict[ "have_sionlib" ] = true; -#else - statusdict[ "have_sionlib" ] = false; -#endif - -#ifdef NDEBUG - statusdict[ "ndebug" ] = true; -#else - statusdict[ "ndebug" ] = false; -#endif - - dictionary exitcodes; - - exitcodes[ "success" ] = EXIT_SUCCESS; - exitcodes[ "skipped" ] = EXITCODE_SKIPPED; - exitcodes[ "skipped_no_mpi" ] = EXITCODE_SKIPPED_NO_MPI; - exitcodes[ "skipped_have_mpi" ] = EXITCODE_SKIPPED_HAVE_MPI; - exitcodes[ "skipped_no_threading" ] = EXITCODE_SKIPPED_NO_THREADING; - exitcodes[ "skipped_no_gsl" ] = EXITCODE_SKIPPED_NO_GSL; - exitcodes[ "skipped_no_music" ] = EXITCODE_SKIPPED_NO_MUSIC; - exitcodes[ "scripterror" ] = EXITCODE_SCRIPTERROR; - exitcodes[ "abort" ] = NEST_EXITCODE_ABORT; - exitcodes[ "userabort" ] = EXITCODE_USERABORT; - exitcodes[ "segfault" ] = NEST_EXITCODE_SEGFAULT; - exitcodes[ "exception" ] = EXITCODE_EXCEPTION; - exitcodes[ "fatal" ] = EXITCODE_FATAL; - exitcodes[ "unknownerror" ] = EXITCODE_UNKNOWN_ERROR; - - statusdict[ "exitcodes" ] = exitcodes; - - return statusdict; -} - void reset_kernel() { diff --git a/nestkernel/nest.h b/nestkernel/nest.h index d2a0686325..e4464c350e 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -41,30 +41,11 @@ namespace nest { - -// Exit codes -#define EXITCODE_UNKNOWN_ERROR 10 -#define EXITCODE_USERABORT 15 -#define EXITCODE_EXCEPTION 125 -#define EXITCODE_SCRIPTERROR 126 -#define EXITCODE_FATAL 127 - -// The range 200-215 is reserved for test skipping exitcodes. Any new codes must -// also be added to testsuite/do_tests_sh.in. -#define EXITCODE_SKIPPED 200 -#define EXITCODE_SKIPPED_NO_MPI 201 -#define EXITCODE_SKIPPED_HAVE_MPI 202 -#define EXITCODE_SKIPPED_NO_THREADING 203 -#define EXITCODE_SKIPPED_NO_GSL 204 -#define EXITCODE_SKIPPED_NO_MUSIC 205 - void init_nest( int* argc, char** argv[] ); void fail_exit( int exitcode ); void install_module( const std::string& module_name ); -dictionary get_statusdict(); - void reset_kernel(); void enable_dryrun_mode( const index n_procs ); diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 69c8ffc17d..504fd17895 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -86,7 +86,6 @@ cdef extern from "parameter.h" namespace "nest": cdef extern from "nest.h" namespace "nest": void init_nest( int* argc, char** argv[] ) - dictionary get_statusdict() except + void reset_kernel() NodeCollectionPTR create( const string model_name, const long n ) except + NodeCollectionPTR create_spatial( const dictionary& ) diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 1570991a79..9321292a2c 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -164,11 +164,6 @@ def catch_cpp_error(func): raise exceptionCls(func.__name__, '') from None return wrapper_catch_cpp_error -@catch_cpp_error -def llapi_get_statusdict(): - cdef dictionary cdict = get_statusdict() - return dictionary_to_pydict(cdict) - def llapi_reset_kernel(): reset_kernel() From 035cd16062bceac7f69542c24e2a4d375f02d3ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 31 Mar 2022 15:55:08 +0200 Subject: [PATCH 053/375] Removed dictionary entry for testing --- nestkernel/nest.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 6d38ee0998..3ba1395c46 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -177,13 +177,8 @@ get_kernel_status() assert( kernel().is_initialized() ); dictionary d; - kernel().get_status( d ); - d[ "test_first" ] = 42; - - // kernel().get_status( d ); - return d; } From 77c20b7f3c5ed76b4d5f7ace44102384a9d80b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 31 Mar 2022 15:55:32 +0200 Subject: [PATCH 054/375] Removed unused function get_statusdict --- pynest/nest/lib/hl_api_info.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py index b496a55925..7ac3833a28 100644 --- a/pynest/nest/lib/hl_api_info.py +++ b/pynest/nest/lib/hl_api_info.py @@ -36,7 +36,6 @@ __all__ = [ 'authors', - 'get_statusdict', 'get_argv', 'GetStatus', 'get_verbosity', @@ -130,10 +129,6 @@ def help(obj=None, return_text=False): print(nest.__doc__) -def get_statusdict(): - return nestkernel.llapi_get_statusdict() - - @check_stack def get_argv(): """Return argv as seen by NEST. From eaf36b9354fb7c59425e88bbf25af6cee400b09b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 31 Mar 2022 16:08:38 +0200 Subject: [PATCH 055/375] Updated with queries to statusdict with build_info --- testsuite/pytests/mpi/2/test_connect_arrays_mpi.py | 2 +- testsuite/pytests/mpi/2/test_issue_576.py | 2 +- testsuite/pytests/test_aeif_lsodar.py | 2 +- testsuite/pytests/test_clopath_synapse.py | 2 +- testsuite/pytests/test_connect_arrays.py | 2 +- testsuite/pytests/test_connect_conngen.py | 3 +-- testsuite/pytests/test_glif_cond.py | 2 +- testsuite/pytests/test_labeled_synapses.py | 2 +- testsuite/pytests/test_mc_neuron.py | 2 +- testsuite/pytests/test_recording_backend_ascii.py | 3 +-- testsuite/pytests/test_recording_backends.py | 2 +- testsuite/pytests/test_regression_issue-1409.py | 2 +- testsuite/pytests/test_regression_issue-2125.py | 2 +- testsuite/pytests/test_siegert_neuron.py | 2 +- testsuite/pytests/test_sp/test_disconnect.py | 2 +- testsuite/pytests/test_sp/test_enable_multithread.py | 2 +- testsuite/pytests/test_sp/test_growth_curves.py | 2 +- testsuite/pytests/test_threads.py | 2 +- testsuite/pytests/test_urbanczik_synapse.py | 2 +- testsuite/pytests/test_weight_recorder.py | 2 +- 20 files changed, 20 insertions(+), 22 deletions(-) diff --git a/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py b/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py index c5f1e1ae20..14eabf6fba 100644 --- a/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py +++ b/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py @@ -31,7 +31,7 @@ except ImportError: HAVE_MPI4PY = False -HAVE_MPI = nest.ll_api.sli_func("statusdict/have_mpi ::") +HAVE_MPI = nest.GetKernelStatus("build_info")["have_mpi"] @unittest.skipIf(not HAVE_MPI4PY, 'mpi4py is not available') diff --git a/testsuite/pytests/mpi/2/test_issue_576.py b/testsuite/pytests/mpi/2/test_issue_576.py index 5d7cfef444..78747ee749 100644 --- a/testsuite/pytests/mpi/2/test_issue_576.py +++ b/testsuite/pytests/mpi/2/test_issue_576.py @@ -23,7 +23,7 @@ import nest import unittest -HAVE_GSL = nest.ll_api.sli_func('statusdict/have_gsl ::') +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] @unittest.skipIf(nest.NumProcesses() < 2, 'Requires >= 2 MPI process') diff --git a/testsuite/pytests/test_aeif_lsodar.py b/testsuite/pytests/test_aeif_lsodar.py index d384c2dca7..0caf073d37 100644 --- a/testsuite/pytests/test_aeif_lsodar.py +++ b/testsuite/pytests/test_aeif_lsodar.py @@ -55,7 +55,7 @@ recorded variables and the reference is smaller than a given tolerance. """ -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::") +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] path = os.path.abspath(os.path.dirname(__file__)) # --------------------------------------------------------------------------- # diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py index b80378da87..e63206636f 100644 --- a/testsuite/pytests/test_clopath_synapse.py +++ b/testsuite/pytests/test_clopath_synapse.py @@ -27,7 +27,7 @@ import nest import numpy as np -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::") +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] @nest.ll_api.check_stack diff --git a/testsuite/pytests/test_connect_arrays.py b/testsuite/pytests/test_connect_arrays.py index e31598712c..ca6a8a3c98 100644 --- a/testsuite/pytests/test_connect_arrays.py +++ b/testsuite/pytests/test_connect_arrays.py @@ -26,7 +26,7 @@ nest.set_verbosity('M_WARNING') -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded") +HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no" class TestConnectArrays(unittest.TestCase): diff --git a/testsuite/pytests/test_connect_conngen.py b/testsuite/pytests/test_connect_conngen.py index 2ec590e51c..a87b8bc61e 100644 --- a/testsuite/pytests/test_connect_conngen.py +++ b/testsuite/pytests/test_connect_conngen.py @@ -38,8 +38,7 @@ except ImportError: HAVE_NUMPY = False -nest.ll_api.sli_run("statusdict/have_libneurosim ::") -HAVE_LIBNEUROSIM = nest.ll_api.sli_pop() +HAVE_LIBNEUROSIM = nest.GetKernelStatus("build_info")["have_libneurosim"] @nest.ll_api.check_stack diff --git a/testsuite/pytests/test_glif_cond.py b/testsuite/pytests/test_glif_cond.py index fc5c45201f..e9dd911796 100644 --- a/testsuite/pytests/test_glif_cond.py +++ b/testsuite/pytests/test_glif_cond.py @@ -28,7 +28,7 @@ except ImportError: HAVE_SCIPY = False -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::") +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] @unittest.skipIf(not HAVE_GSL, 'GSL is not available') diff --git a/testsuite/pytests/test_labeled_synapses.py b/testsuite/pytests/test_labeled_synapses.py index bf79392373..7f2aa20671 100644 --- a/testsuite/pytests/test_labeled_synapses.py +++ b/testsuite/pytests/test_labeled_synapses.py @@ -26,7 +26,7 @@ import unittest import nest -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::") +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] @nest.ll_api.check_stack diff --git a/testsuite/pytests/test_mc_neuron.py b/testsuite/pytests/test_mc_neuron.py index b83884f8d2..2c8f89e673 100644 --- a/testsuite/pytests/test_mc_neuron.py +++ b/testsuite/pytests/test_mc_neuron.py @@ -23,7 +23,7 @@ import nest import numpy as np -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::") +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] @unittest.skipIf(not HAVE_GSL, 'GSL is not available') diff --git a/testsuite/pytests/test_recording_backend_ascii.py b/testsuite/pytests/test_recording_backend_ascii.py index 5a12186f1b..667f3e5298 100644 --- a/testsuite/pytests/test_recording_backend_ascii.py +++ b/testsuite/pytests/test_recording_backend_ascii.py @@ -119,8 +119,7 @@ def testFileContent(self): self.assertEqual(len(lines), mm.get("n_events")+3) - nest.ll_api.sr("statusdict/version ::") - version = nest.ll_api.spp() + version = nest.GetKernelStatus("build_info")["version"] self.assertEqual(lines[0], "# NEST version: {}\n".format(version)) header_2 = "# RecordingBackendASCII version:" diff --git a/testsuite/pytests/test_recording_backends.py b/testsuite/pytests/test_recording_backends.py index 304a2d9a31..35c6aaac8c 100644 --- a/testsuite/pytests/test_recording_backends.py +++ b/testsuite/pytests/test_recording_backends.py @@ -22,7 +22,7 @@ import unittest import nest -HAVE_SIONLIB = nest.ll_api.sli_func("statusdict/have_sionlib ::") +HAVE_SIONLIB = nest.GetKernelStatus("build_info")["have_sionlib"] class TestRecordingBackends(unittest.TestCase): diff --git a/testsuite/pytests/test_regression_issue-1409.py b/testsuite/pytests/test_regression_issue-1409.py index c18d079bb9..6c49f6e367 100644 --- a/testsuite/pytests/test_regression_issue-1409.py +++ b/testsuite/pytests/test_regression_issue-1409.py @@ -23,7 +23,7 @@ import numpy as np import unittest -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded") +HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no" @unittest.skipIf(not HAVE_OPENMP, 'NEST was compiled without multi-threading') diff --git a/testsuite/pytests/test_regression_issue-2125.py b/testsuite/pytests/test_regression_issue-2125.py index c1906a96e2..b9a28e2765 100644 --- a/testsuite/pytests/test_regression_issue-2125.py +++ b/testsuite/pytests/test_regression_issue-2125.py @@ -22,7 +22,7 @@ import nest import unittest -HAVE_OPENMP = nest.ll_api.sli_func('is_threaded') +HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no" @unittest.skipIf(not HAVE_OPENMP, 'NEST was compiled without multi-threading') diff --git a/testsuite/pytests/test_siegert_neuron.py b/testsuite/pytests/test_siegert_neuron.py index c3d1323e80..fb2555671c 100644 --- a/testsuite/pytests/test_siegert_neuron.py +++ b/testsuite/pytests/test_siegert_neuron.py @@ -25,7 +25,7 @@ import unittest import numpy as np -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::") +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] @nest.ll_api.check_stack diff --git a/testsuite/pytests/test_sp/test_disconnect.py b/testsuite/pytests/test_sp/test_disconnect.py index 787a255516..b69b29b232 100644 --- a/testsuite/pytests/test_sp/test_disconnect.py +++ b/testsuite/pytests/test_sp/test_disconnect.py @@ -29,7 +29,7 @@ except ImportError: have_mpi4py = False -have_mpi = nest.ll_api.sli_func("statusdict/have_mpi ::") +have_mpi = nest.GetKernelStatus("build_info")["have_mpi"] test_with_mpi = have_mpi and have_mpi4py and nest.num_processes > 1 diff --git a/testsuite/pytests/test_sp/test_enable_multithread.py b/testsuite/pytests/test_sp/test_enable_multithread.py index b5017ebe77..714b5cc8e8 100644 --- a/testsuite/pytests/test_sp/test_enable_multithread.py +++ b/testsuite/pytests/test_sp/test_enable_multithread.py @@ -30,7 +30,7 @@ # and multiple threads are set, or if multiple threads are set and # the enable_structural_plasticity function is called. -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded") +HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no" @unittest.skipIf(not HAVE_OPENMP, 'NEST was compiled without multi-threading') diff --git a/testsuite/pytests/test_sp/test_growth_curves.py b/testsuite/pytests/test_sp/test_growth_curves.py index f6750adfbb..cfe381bf7a 100644 --- a/testsuite/pytests/test_sp/test_growth_curves.py +++ b/testsuite/pytests/test_sp/test_growth_curves.py @@ -28,7 +28,7 @@ import time import sys -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded") +HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no" class SynapticElementIntegrator(object): diff --git a/testsuite/pytests/test_threads.py b/testsuite/pytests/test_threads.py index de3053009f..a0b5a2640c 100644 --- a/testsuite/pytests/test_threads.py +++ b/testsuite/pytests/test_threads.py @@ -34,7 +34,7 @@ class ThreadTestCase(unittest.TestCase): def nest_multithreaded(self): """Return True, if we have a thread-enabled NEST, False otherwise""" - return nest.ll_api.sli_func("statusdict/threading :: (no) eq not") + return nest.GetKernelStatus("build_info")["threading"] != "no" def test_Threads(self): """Multiple threads""" diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py index 29e7e6d9e5..79a57d5580 100644 --- a/testsuite/pytests/test_urbanczik_synapse.py +++ b/testsuite/pytests/test_urbanczik_synapse.py @@ -27,7 +27,7 @@ import nest import numpy as np -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::") +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] @nest.ll_api.check_stack diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py index 957198dada..60ebb2edb3 100644 --- a/testsuite/pytests/test_weight_recorder.py +++ b/testsuite/pytests/test_weight_recorder.py @@ -27,7 +27,7 @@ import nest import numpy as np -HAVE_GSL = nest.ll_api.sli_func("statusdict/have_gsl ::") +HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"] @nest.ll_api.check_stack From e46f0ba8f476bd3b325e2d293aacff042da97987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 1 Apr 2022 13:06:21 +0200 Subject: [PATCH 056/375] Implemented Parameter arithmetic and math functions --- pynest/nest/lib/hl_api_types.py | 44 ++++++------- pynest/nest/math/hl_api_math.py | 14 ++-- pynest/nestkernel_api.pxd | 15 +++++ pynest/nestkernel_api.pyx | 109 ++++++++++++++++++++++++++++++++ 4 files changed, 152 insertions(+), 30 deletions(-) diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 400922e647..b5703b526b 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -994,26 +994,22 @@ def __init__(self, datum): " use the CreateParameter() function to create a Parameter") self._datum = datum - # Generic binary operation - def _binop(self, op, other, params=None): - if isinstance(other, (int, float)): - other = CreateParameter('constant', {'value': float(other)}) - if not isinstance(other, Parameter): - raise NotImplementedError() - - if params is None: - return sli_func(op, self._datum, other._datum) - else: - return sli_func(op, self._datum, other._datum, params) + def _arg_as_parameter(self, arg): + if isinstance(arg, Parameter): + return arg + if isinstance(arg, (int, float)): + # Value for the constant parameter must be float. + return CreateParameter('constant', {'value': float(arg)}) + raise NotImplementedError() def __add__(self, other): - return self._binop("add", other) + return nestkernel.llapi_add_parameter(self._datum, self._arg_as_parameter(other)._datum) def __radd__(self, other): return self + other def __sub__(self, other): - return self._binop("sub", other) + return nestkernel.llapi_subtract_parameter(self._datum, self._arg_as_parameter(other)._datum) def __rsub__(self, other): return self * (-1) + other @@ -1022,37 +1018,37 @@ def __neg__(self): return self * (-1) def __mul__(self, other): - return self._binop("mul", other) + return nestkernel.llapi_multiply_parameter(self._datum, self._arg_as_parameter(other)._datum) def __rmul__(self, other): return self * other def __div__(self, other): - return self._binop("div", other) + return nestkernel.llapi_divide_parameter(self._datum, self._arg_as_parameter(other)._datum) def __truediv__(self, other): - return self._binop("div", other) + return nestkernel.llapi_divide_parameter(self._datum, self._arg_as_parameter(other)._datum) def __pow__(self, exponent): - return sli_func("pow", self._datum, float(exponent)) + return nestkernel.llapi_pow_parameter(self._datum, self._arg_as_parameter(float(exponent))._datum) def __lt__(self, other): - return self._binop("compare", other, {'comparator': 0}) + return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {'comparator': 0}) def __le__(self, other): - return self._binop("compare", other, {'comparator': 1}) + return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {'comparator': 1}) def __eq__(self, other): - return self._binop("compare", other, {'comparator': 2}) + return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {'comparator': 2}) def __ne__(self, other): - return self._binop("compare", other, {'comparator': 3}) + return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {'comparator': 3}) def __ge__(self, other): - return self._binop("compare", other, {'comparator': 4}) + return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {'comparator': 4}) def __gt__(self, other): - return self._binop("compare", other, {'comparator': 5}) + return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {'comparator': 5}) def GetValue(self): """ @@ -1079,7 +1075,7 @@ def GetValue(self): # get out value P.GetValue() """ - return sli_func("GetValue", self._datum) + return nestkernel.llapi_get_param_value(self._datum) def is_spatial(self): return sli_func('ParameterIsSpatial', self._datum) diff --git a/pynest/nest/math/hl_api_math.py b/pynest/nest/math/hl_api_math.py index 682d7f574b..5b87f9fc26 100644 --- a/pynest/nest/math/hl_api_math.py +++ b/pynest/nest/math/hl_api_math.py @@ -19,6 +19,8 @@ # You should have received a copy of the GNU General Public License # along with NEST. If not, see . +from .. import nestkernel_api as nestkernel + __all__ = [ 'exp', @@ -46,7 +48,7 @@ def exp(parameter): Parameter: Object representing the exponential of the parameter. """ - return sli_func("exp", parameter) + return nestkernel.llapi_exp_parameter(parameter._datum) def sin(parameter): @@ -63,7 +65,7 @@ def sin(parameter): Parameter: Object representing the sine of the parameter. """ - return sli_func("sin", parameter) + return nestkernel.llapi_sin_parameter(parameter._datum) def cos(parameter): @@ -80,7 +82,7 @@ def cos(parameter): Parameter: Object representing the cosine of the parameter. """ - return sli_func("cos", parameter) + return nestkernel.llapi_cos_parameter(parameter._datum) def min(parameter, value): @@ -99,7 +101,7 @@ def min(parameter, value): Parameter: Object yielding the smallest value. """ - return sli_func("min", parameter, float(value)) + return nestkernel.llapi_min_parameter(parameter._datum, float(value)) def max(parameter, value): @@ -118,7 +120,7 @@ def max(parameter, value): Parameter: Object yielding the largest value. """ - return sli_func("max", parameter, float(value)) + return nestkernel.llapi_max_parameter(parameter._datum, float(value)) def redraw(parameter, min, max): @@ -141,4 +143,4 @@ def redraw(parameter, min, max): Parameter: Object redrawing the parameter until it can yield a value within the given limits. """ - return sli_func("redraw", parameter, float(min), float(max)) + return nestkernel.llapi_redraw_parameter(parameter._datum, float(min), float(max)) diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 504fd17895..b78046ba7e 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -81,6 +81,20 @@ cdef extern from "node_collection.h": cdef extern from "parameter.h" namespace "nest": cppclass Parameter: Parameter() + shared_ptr[Parameter] multiply_parameter(const shared_ptr[Parameter] first, const shared_ptr[Parameter] second) except + + shared_ptr[Parameter] divide_parameter(const shared_ptr[Parameter] first, const shared_ptr[Parameter] second) except + + shared_ptr[Parameter] add_parameter(const shared_ptr[Parameter] first, const shared_ptr[Parameter] second) except + + shared_ptr[Parameter] subtract_parameter(const shared_ptr[Parameter] first, const shared_ptr[Parameter] second) except + + shared_ptr[Parameter] compare_parameter(const shared_ptr[Parameter] first, const shared_ptr[Parameter] second, const dictionary& d) except + + shared_ptr[Parameter] conditional_parameter(const shared_ptr[Parameter] condition, const shared_ptr[Parameter] if_true, const shared_ptr[Parameter] if_false) except + + shared_ptr[Parameter] min_parameter(const shared_ptr[Parameter] parameter, const double other) except + + shared_ptr[Parameter] max_parameter(const shared_ptr[Parameter] parameter, const double other) except + + shared_ptr[Parameter] redraw_parameter(const shared_ptr[Parameter] parameter, const double min, const double max) except + + shared_ptr[Parameter] exp_parameter(const shared_ptr[Parameter] parameter) except + + shared_ptr[Parameter] sin_parameter(const shared_ptr[Parameter] parameter) except + + shared_ptr[Parameter] cos_parameter(const shared_ptr[Parameter] parameter) except + + shared_ptr[Parameter] pow_parameter(const shared_ptr[Parameter] parameter, const double exponent) except + + shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y) except + shared_ptr[Parameter] dimension_parameter(const shared_ptr[Parameter] x, const shared_ptr[Parameter] y, const shared_ptr[Parameter] z) except + @@ -121,6 +135,7 @@ cdef extern from "nest.h" namespace "nest": void run( const double& t ) except + void cleanup() except + shared_ptr[Parameter] create_parameter( const dictionary& param_dict ) except + + double get_value( const shared_ptr[Parameter]& param ) except + NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except + NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 9321292a2c..80f2ab861f 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -344,6 +344,115 @@ def llapi_create_parameter(object specs): obj._set_parameter(parameter) return nest.Parameter(obj) +@catch_cpp_error +def llapi_get_param_value(ParameterObject parameter): + return get_value(parameter.thisptr) + +@catch_cpp_error +def llapi_multiply_parameter(ParameterObject first, ParameterObject second): + cdef shared_ptr[Parameter] new_parameter + new_parameter = multiply_parameter(first.thisptr, second.thisptr) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_divide_parameter(ParameterObject first, ParameterObject second): + cdef shared_ptr[Parameter] new_parameter + new_parameter = divide_parameter(first.thisptr, second.thisptr) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_add_parameter(ParameterObject first, ParameterObject second): + cdef shared_ptr[Parameter] new_parameter + new_parameter = add_parameter(first.thisptr, second.thisptr) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_subtract_parameter(ParameterObject first, ParameterObject second): + cdef shared_ptr[Parameter] new_parameter + new_parameter = subtract_parameter(first.thisptr, second.thisptr) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_compare_parameter(ParameterObject first, ParameterObject second, object pydict): + cdef shared_ptr[Parameter] new_parameter + cdef dictionary cdict = pydict_to_dictionary(pydict) + new_parameter = compare_parameter(first.thisptr, second.thisptr, cdict) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_conditional_parameter(ParameterObject condition, ParameterObject if_true, ParameterObject if_false): + cdef shared_ptr[Parameter] new_parameter + new_parameter = conditional_parameter(condition.thisptr, if_true.thisptr, if_false.thisptr) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_min_parameter(ParameterObject parameter, double other_value): + cdef shared_ptr[Parameter] new_parameter + new_parameter = min_parameter(parameter.thisptr, other_value) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_max_parameter(ParameterObject parameter, double other_value): + cdef shared_ptr[Parameter] new_parameter + new_parameter = max_parameter(parameter.thisptr, other_value) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_redraw_parameter(ParameterObject parameter, double min_value, double max_value): + cdef shared_ptr[Parameter] new_parameter + new_parameter = redraw_parameter(parameter.thisptr, min_value, max_value) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_exp_parameter(ParameterObject parameter): + cdef shared_ptr[Parameter] new_parameter + new_parameter = exp_parameter(parameter.thisptr) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_sin_parameter(ParameterObject parameter): + cdef shared_ptr[Parameter] new_parameter + new_parameter = sin_parameter(parameter.thisptr) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_cos_parameter(ParameterObject parameter): + cdef shared_ptr[Parameter] new_parameter + new_parameter = cos_parameter(parameter.thisptr) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + +@catch_cpp_error +def llapi_pow_parameter(ParameterObject parameter, double exponent): + cdef shared_ptr[Parameter] new_parameter + new_parameter = pow_parameter(parameter.thisptr, exponent) + obj = ParameterObject() + obj._set_parameter(new_parameter) + return nest.Parameter(obj) + @catch_cpp_error def llapi_dimension_parameter(object list_of_pos_params): cdef shared_ptr[Parameter] dim_parameter From b9eaf898a72f92da7c3583c06e20229da9df3857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 1 Apr 2022 14:54:36 +0200 Subject: [PATCH 057/375] Updated ConnParameter to take shared_ptr Parameter objects --- nestkernel/conn_parameter.cpp | 4 ++-- nestkernel/conn_parameter.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nestkernel/conn_parameter.cpp b/nestkernel/conn_parameter.cpp index bfd78deafd..321f513f43 100644 --- a/nestkernel/conn_parameter.cpp +++ b/nestkernel/conn_parameter.cpp @@ -58,7 +58,7 @@ nest::ConnParameter::create( const boost::any& value, const size_t nthreads ) // Parameter if ( is_parameter( value ) ) { - return new ParameterConnParameterWrapper( boost::any_cast< Parameter* >( value ), nthreads ); + return new ParameterConnParameterWrapper( boost::any_cast< std::shared_ptr< Parameter > >( value ), nthreads ); } // array of integer @@ -71,7 +71,7 @@ nest::ConnParameter::create( const boost::any& value, const size_t nthreads ) } -nest::ParameterConnParameterWrapper::ParameterConnParameterWrapper( Parameter* p, const size_t ) +nest::ParameterConnParameterWrapper::ParameterConnParameterWrapper( std::shared_ptr< Parameter > p, const size_t ) : parameter_( p ) { } diff --git a/nestkernel/conn_parameter.h b/nestkernel/conn_parameter.h index d653d45394..3eec60f3cc 100644 --- a/nestkernel/conn_parameter.h +++ b/nestkernel/conn_parameter.h @@ -400,7 +400,7 @@ class ArrayIntegerParameter : public ConnParameter class ParameterConnParameterWrapper : public ConnParameter { public: - ParameterConnParameterWrapper( Parameter*, const size_t ); + ParameterConnParameterWrapper( std::shared_ptr< Parameter >, const size_t ); double value_double( thread target_thread, RngPtr rng, index snode_id, Node* target ) const; @@ -423,7 +423,7 @@ class ParameterConnParameterWrapper : public ConnParameter } private: - Parameter* parameter_; + std::shared_ptr< Parameter > parameter_; }; } // namespace nest From 209b760e84afb6663d32b3a2b34ad94473a83e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 1 Apr 2022 14:56:08 +0200 Subject: [PATCH 058/375] Updated dictionary converter to take Parameter objects --- pynest/nestkernel_api.pyx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 80f2ab861f..7ebaa4cf8e 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -135,10 +135,12 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *: # Adding "except cdict[key.encode('utf-8')] = value.encode('utf-8') elif type(value) is dict: cdict[key.encode('utf-8')] = pydict_to_dictionary(value) + elif type(value) is nest.Parameter: + cdict[key.encode('utf-8')] = ((value._datum)).thisptr elif type(value) is ParameterObject: cdict[key.encode('utf-8')] = (value).thisptr else: - raise AttributeError(f'value of key ({key}) is not a known type, got {type(value)}') + raise AttributeError(f'when converting Python dictionary: value of key ({key}) is not a known type, got {type(value)}') return cdict cdef object vec_of_dict_to_list(vector[dictionary] cvec): From 29c5e085ab54e1c062eaa379e7bbdf291e37e2af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 1 Apr 2022 14:57:08 +0200 Subject: [PATCH 059/375] Updated function call --- nestkernel/parameter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h index 1b6488ace1..731b35adbb 100644 --- a/nestkernel/parameter.h +++ b/nestkernel/parameter.h @@ -230,7 +230,7 @@ class UniformIntParameter : public Parameter : Parameter( false, true ) , max_( 1.0 ) { - d.update_value( names::max, max_ ); + d.update_integer_value( names::max, max_ ); if ( max_ <= 0 ) { throw BadProperty( "nest::UniformIntParameter: max > 0 required." ); From 028e3a59d21b67ef35b1875205281cb90a2dfb44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 1 Apr 2022 14:58:13 +0200 Subject: [PATCH 060/375] Replaced set_verbosity() body with todo --- pynest/nest/lib/hl_api_info.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py index 7ac3833a28..0034f22a1f 100644 --- a/pynest/nest/lib/hl_api_info.py +++ b/pynest/nest/lib/hl_api_info.py @@ -208,7 +208,10 @@ def set_verbosity(level): 'M_INFO' or 'M_ALL'. """ - sr("{} setverbosity".format(level)) + # TODO-PYNEST-NG: There are no SLI messages anymore, so verbosity is now irrelevant and should be replaced + # when a replacement for message() exists. + # sr("{} setverbosity".format(level)) + pass @check_stack From 9b5c6d6c13623090ca2824013b3cd7a87b089fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 1 Apr 2022 14:58:46 +0200 Subject: [PATCH 061/375] Implemented is_spatial() function --- pynest/nest/lib/hl_api_types.py | 2 +- pynest/nestkernel_api.pxd | 1 + pynest/nestkernel_api.pyx | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index b5703b526b..9a187d7c96 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -1078,7 +1078,7 @@ def GetValue(self): return nestkernel.llapi_get_param_value(self._datum) def is_spatial(self): - return sli_func('ParameterIsSpatial', self._datum) + return nestkernel.llapi_param_is_spatial(self._datum) def apply(self, spatial_nc, positions=None): if positions is None: diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index b78046ba7e..d51a9b82b8 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -136,6 +136,7 @@ cdef extern from "nest.h" namespace "nest": void cleanup() except + shared_ptr[Parameter] create_parameter( const dictionary& param_dict ) except + double get_value( const shared_ptr[Parameter]& param ) except + + cbool is_spatial( const shared_ptr[Parameter]& param ) except + NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except + NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 7ebaa4cf8e..69e2610448 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -350,6 +350,10 @@ def llapi_create_parameter(object specs): def llapi_get_param_value(ParameterObject parameter): return get_value(parameter.thisptr) +@catch_cpp_error +def llapi_param_is_spatial(ParameterObject parameter): + return is_spatial(parameter.thisptr) + @catch_cpp_error def llapi_multiply_parameter(ParameterObject first, ParameterObject second): cdef shared_ptr[Parameter] new_parameter From 93d59fad9db678215832d8b83680d6e89c6a8722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Mon, 4 Apr 2022 11:08:48 +0200 Subject: [PATCH 062/375] Added NodeCollection to possible dictionary conversion targets --- pynest/nestkernel_api.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 69e2610448..c4e7f0d7a7 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -135,6 +135,8 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *: # Adding "except cdict[key.encode('utf-8')] = value.encode('utf-8') elif type(value) is dict: cdict[key.encode('utf-8')] = pydict_to_dictionary(value) + elif type(value) is nest.NodeCollection: + cdict[key.encode('utf-8')] = ((value._datum)).thisptr elif type(value) is nest.Parameter: cdict[key.encode('utf-8')] = ((value._datum)).thisptr elif type(value) is ParameterObject: From 12844d261c178300ed414032293d81f4e6dcf99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Mon, 4 Apr 2022 11:11:38 +0200 Subject: [PATCH 063/375] Updated lookups of NodeCollectionDatum to NodeCollectionPTR --- models/music_cont_out_proxy.cpp | 2 +- models/weight_recorder.cpp | 4 ++-- nestkernel/connection_manager.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/models/music_cont_out_proxy.cpp b/models/music_cont_out_proxy.cpp index 0fffd54fe6..7e2aa1dbab 100644 --- a/models/music_cont_out_proxy.cpp +++ b/models/music_cont_out_proxy.cpp @@ -169,7 +169,7 @@ nest::music_cont_out_proxy::Parameters_::set( const dictionary& d, if ( state.published_ == false ) { - targets_ = d.get< NodeCollectionDatum >( names::targets ); + targets_ = d.get< NodeCollectionPTR >( names::targets ); } else { diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp index 65e39a5a1d..66a20ea910 100644 --- a/models/weight_recorder.cpp +++ b/models/weight_recorder.cpp @@ -88,11 +88,11 @@ nest::weight_recorder::Parameters_::get( dictionary& d ) const void nest::weight_recorder::Parameters_::set( const dictionary& d ) { - auto get_or_create_nc = [&d]( NodeCollectionDatum& nc, const std::string& key ) { + auto get_or_create_nc = [&d]( NodeCollectionPTR& nc, const std::string& key ) { const auto value = d.at( key ); if ( is_nc( value ) ) { - nc = d.get< NodeCollectionDatum >( key ); + nc = d.get< NodeCollectionPTR >( key ); } else if ( is_int_vector( value ) ) { diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 0bac6a52b9..6b10261fa2 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -935,7 +935,7 @@ nest::ConnectionManager::get_connections( const dictionary& params ) if ( params.known( names::source ) ) { - source_a = params.get< NodeCollectionDatum >( names::source ); + source_a = params.get< NodeCollectionPTR >( names::source ); if ( not source_a->valid() ) { throw KernelException( "GetConnection requires valid source NodeCollection." ); @@ -943,7 +943,7 @@ nest::ConnectionManager::get_connections( const dictionary& params ) } if ( params.known( names::target ) ) { - target_a = params.get< NodeCollectionDatum >( names::target ); + target_a = params.get< NodeCollectionPTR >( names::target ); if ( not target_a->valid() ) { throw KernelException( "GetConnection requires valid target NodeCollection." ); From b6444ee34937c773f386dd33d4e8842b036f3b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Mon, 4 Apr 2022 11:15:47 +0200 Subject: [PATCH 064/375] Fixed typo --- nestkernel/connection_manager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 6b10261fa2..d909296e0e 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -969,11 +969,10 @@ nest::ConnectionManager::get_connections( const dictionary& params ) // First we check, whether a synapse model is given. // If not, we will iterate all. - if ( params.known( names::target ) ) + if ( params.known( names::synapse_model ) ) { const auto synmodel_name = params.get< std::string >( names::synapse_model ); const auto& syndict = kernel().model_manager.get_synapsedict(); - // const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( synmodel_name ); if ( syndict.known( synmodel_name ) ) { syn_id = static_cast< size_t >( syndict.get< synindex >( synmodel_name ) ); From a7a7f794945a6c5a29ccf1459051ce494d110109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 5 Apr 2022 16:02:36 +0200 Subject: [PATCH 065/375] Updated SynapseCollection.get() function for multiple keys --- pynest/nest/lib/hl_api_types.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 9a187d7c96..b96e29f784 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -803,18 +803,15 @@ def get(self, keys=None, output=''): return () if keys is None: - cmd = 'GetStatus' + result = nestkernel.llapi_get_connection_status(self._datum) elif is_literal(keys): # Extracting the correct values will be done in restructure_data below - cmd = 'GetStatus' + result = nestkernel.llapi_get_connection_status(self._datum) elif is_iterable(keys): - keys_str = " ".join("/{0}".format(x) for x in keys) - cmd = 'GetStatus {{ [ [ {0} ] ] get }} Map'.format(keys_str) + result = [[d[key] for key in keys] for d in nestkernel.llapi_get_connection_status(self._datum)] else: raise TypeError("keys should be either a string or an iterable") - result = nestkernel.llapi_get_connection_status(self._datum) - # Need to restructure the data. final_result = restructure_data(result, keys) From d01b16d9c66ee139ed053bd10b53306269cfd910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 5 Apr 2022 17:10:18 +0200 Subject: [PATCH 066/375] Added operator<< for dictionary --- libnestutil/dictionary.cpp | 102 +++++++++++++++++++++++++++++++++++++ libnestutil/dictionary.h | 2 + 2 files changed, 104 insertions(+) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 6bb6d625d6..5a52aa3dbe 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -31,6 +31,7 @@ #include "kernel_manager.h" #include "nest_datums.h" #include "parameter.h" +#include "streamers.h" // debug @@ -53,6 +54,107 @@ debug_dict_types( const dictionary& dict ) return s; } +std::ostream& +operator<<( std::ostream& os, const dictionary& dict ) +{ + const auto max_key_length = std::max_element( + dict.begin(), dict.end(), []( const dictionary::value_type s1, const dictionary::value_type s2 ) { + return s1.first.length() < s2.first.length(); + } )->first.length(); + const std::string pre_padding = " "; + os << "dictionary{\n"; + for ( auto& kv : dict ) + { + std::string type; + std::stringstream value_stream; + if ( is_int( kv.second ) ) + { + type = "int"; + value_stream << boost::any_cast< int >( kv.second ) << '\n'; + } + else if ( is_uint( kv.second ) ) + { + type = "unsigned int"; + value_stream << boost::any_cast< unsigned int >( kv.second ) << '\n'; + } + else if ( is_long( kv.second ) ) + { + type = "long"; + value_stream << boost::any_cast< long >( kv.second ) << '\n'; + } + else if ( is_size_t( kv.second ) ) + { + type = "size_t"; + value_stream << boost::any_cast< size_t >( kv.second ) << '\n'; + } + else if ( is_double( kv.second ) ) + { + type = "double"; + value_stream << boost::any_cast< double >( kv.second ) << '\n'; + } + else if ( is_bool( kv.second ) ) + { + type = "bool"; + const auto value = boost::any_cast< bool >( kv.second ); + value_stream << ( value ? "true" : "false" ) << '\n'; + } + else if ( is_string( kv.second ) ) + { + type = "std::string"; + value_stream << "\"" << boost::any_cast< std::string >( kv.second ) << "\"\n"; + } + else if ( is_int_vector( kv.second ) ) + { + type = "std::vector"; + value_stream << boost::any_cast< std::vector< int > >( kv.second ) << '\n'; + } + else if ( is_double_vector( kv.second ) ) + { + type = "std::vector"; + value_stream << boost::any_cast< std::vector< double > >( kv.second ) << '\n'; + } + else if ( is_double_vector_vector( kv.second ) ) + { + type = "vector>"; + value_stream << "vector>" << '\n'; + } + else if ( is_string_vector( kv.second ) ) + { + type = "std::vector"; + value_stream << boost::any_cast< std::vector< std::string > >( kv.second ) << '\n'; + } + else if ( is_any_vector( kv.second ) ) + { + type = "vector"; + value_stream << "vector" << '\n'; + } + else if ( is_dict( kv.second ) ) + { + type = "dictionary"; + value_stream << "dictionary" << '\n'; + } + else if ( is_parameter( kv.second ) ) + { + type = "parameter"; + value_stream << "parameter" << '\n'; + } + else if ( is_nc( kv.second ) ) + { + type = "NodeCollection"; + value_stream << "NodeCollection" << '\n'; + } + else + { + throw TypeMismatch( "Type is not known" ); + } + const auto s = value_stream.str(); + const auto post_padding = max_key_length - kv.first.length() + 5; + os << pre_padding << kv.first << std::setw( post_padding ) << "(" << type << ")" + << " " << std::setw( 25 - type.length() ) << s; + } + return os << "}"; +} + // int bool is_int( const boost::any& operand ) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 2bd79ccdfa..2b7ceb5c1c 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -268,4 +268,6 @@ class dictionary : public std::map< std::string, boost::any > const_iterator find( const std::string& key ) const; }; +std::ostream& operator<<( std::ostream& os, const dictionary& dict ); + #endif /* DICTIONARY_H_ */ From d382c7093f363a5c6b2fb8e16eaa7bbc82819f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 5 Apr 2022 17:10:39 +0200 Subject: [PATCH 067/375] Cleanup --- libnestutil/dictionary.cpp | 1 - nestkernel/nest.cpp | 3 --- 2 files changed, 4 deletions(-) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 5a52aa3dbe..7ae6df9ff1 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -181,7 +181,6 @@ is_size_t( const boost::any& operand ) return operand.type() == typeid( size_t ); } - // double bool is_double( const boost::any& operand ) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 3ba1395c46..03874fe4d8 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -399,9 +399,6 @@ equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ) bool contains( const NodeCollectionPTR nc, const size_t node_id ) { - std::cerr << "NodeCollection:\n"; - nc->print_me( std::cerr ); - std::cerr << "\n"; return nc->contains( node_id ); } From b188f97da125056d84feace9250824836771fe65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 6 Apr 2022 13:58:21 +0200 Subject: [PATCH 068/375] Added inheritance of all constructors from std::map --- libnestutil/dictionary.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 2b7ceb5c1c..98c8c7ac2b 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -80,6 +80,7 @@ class dictionary : public std::map< std::string, boost::any > // * Docstring for each entry private: using maptype_ = std::map< std::string, boost::any >; + using maptype_::maptype_; // Inherit constructors /** * @brief Cast the specified value to the specified type. From 1d7559872b4cc4f18cf9c05223d3340897da0c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 7 Apr 2022 16:19:25 +0200 Subject: [PATCH 069/375] Converted NEST exceptions to std::exceptions --- libnestutil/dictionary.h | 1 + nestkernel/connection_manager.cpp | 2 +- nestkernel/exceptions.cpp | 262 +++++++++++++-------------- nestkernel/exceptions.h | 257 ++++++-------------------- nestkernel/model.cpp | 2 +- nestkernel/node.cpp | 2 +- pynest/nest/lib/hl_api_exceptions.py | 2 +- pynest/nestkernel_api.pyx | 3 +- 8 files changed, 184 insertions(+), 347 deletions(-) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 98c8c7ac2b..f73bb71e9d 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -28,6 +28,7 @@ #include #include +#include "exceptions.h" #include "sliexceptions.h" class dictionary; diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index d909296e0e..5aa765875b 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -289,7 +289,7 @@ nest::ConnectionManager::set_synapse_status( const index source_node_id, source_node_id, target_node_id, lcid, - e.message() ) ); + e.what() ) ); } } diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp index 4820e87dce..93e9e1504c 100644 --- a/nestkernel/exceptions.cpp +++ b/nestkernel/exceptions.cpp @@ -28,11 +28,9 @@ // Generated includes: #include "config.h" -// Includes from sli: -#include "interpret.h" -std::string -nest::UnknownModelName::message() const +const char* +nest::UnknownModelName::what() const noexcept { std::ostringstream msg; msg << "/" << n_.toString() + " is not a known model name. " @@ -42,35 +40,35 @@ nest::UnknownModelName::message() const "without the GNU Scientific Library, which is required for " "the conductance-based neuron models."; #endif - return msg.str(); + return msg.str().c_str(); } -std::string -nest::NewModelNameExists::message() const +const char* +nest::NewModelNameExists::what() const noexcept { std::ostringstream msg; msg << "/" << n_.toString() + " is the name of an existing model and cannot be re-used."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::UnknownModelID::message() const +const char* +nest::UnknownModelID::what() const noexcept { std::ostringstream msg; msg << id_ << " is an invalid model ID. Probably modeldict is corrupted."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::ModelInUse::message() const +const char* +nest::ModelInUse::what() const noexcept { std::string str = "Model " + modelname_ + " is in use and cannot be unloaded/uninstalled."; return str.c_str(); } -std::string -nest::UnknownSynapseType::message() const +const char* +nest::UnknownSynapseType::what() const noexcept { std::ostringstream out; if ( synapsename_.empty() ) @@ -81,11 +79,11 @@ nest::UnknownSynapseType::message() const { out << "Synapse with name " << synapsename_ << " does not exist."; } - return out.str(); + return out.str().c_str(); } -std::string -nest::UnknownNode::message() const +const char* +nest::UnknownNode::what() const noexcept { std::ostringstream out; @@ -98,11 +96,11 @@ nest::UnknownNode::message() const // Empty message } - return out.str(); + return out.str().c_str(); } -std::string -nest::NoThreadSiblingsAvailable::message() const +const char* +nest::NoThreadSiblingsAvailable::what() const noexcept { std::ostringstream out; @@ -115,56 +113,56 @@ nest::NoThreadSiblingsAvailable::message() const // Empty message } - return out.str(); + return out.str().c_str(); } -std::string -nest::LocalNodeExpected::message() const +const char* +nest::LocalNodeExpected::what() const noexcept { std::ostringstream out; out << "Node with id " << id_ << " is not a local node."; - return out.str(); + return out.str().c_str(); } -std::string -nest::NodeWithProxiesExpected::message() const +const char* +nest::NodeWithProxiesExpected::what() const noexcept { std::ostringstream out; out << "Nest expected a node with proxies (eg normal model neuron)," "but the node with id " << id_ << " is not a node without proxies, e.g., a device."; - return out.str(); + return out.str().c_str(); } -std::string -nest::UnknownReceptorType::message() const +const char* +nest::UnknownReceptorType::what() const noexcept { std::ostringstream msg; msg << "Receptor type " << receptor_type_ << " is not available in " << name_ << "."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::IncompatibleReceptorType::message() const +const char* +nest::IncompatibleReceptorType::what() const noexcept { std::ostringstream msg; msg << "Receptor type " << receptor_type_ << " in " << name_ << " does not accept " << event_type_ << "."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::UnknownPort::message() const +const char* +nest::UnknownPort::what() const noexcept { std::ostringstream out; out << "Port with id " << id_ << " does not exist."; - return out.str(); + return out.str().c_str(); } -std::string -nest::IllegalConnection::message() const +const char* +nest::IllegalConnection::what() const noexcept { if ( msg_.empty() ) { @@ -172,12 +170,12 @@ nest::IllegalConnection::message() const } else { - return "Creation of connection is not possible because:\n" + msg_; + return ( "Creation of connection is not possible because:\n" + msg_ ).c_str(); } } -std::string -nest::InexistentConnection::message() const +const char* +nest::InexistentConnection::what() const noexcept { if ( msg_.empty() ) { @@ -185,28 +183,28 @@ nest::InexistentConnection::message() const } else { - return "Deletion of connection is not possible because:\n" + msg_; + return ( "Deletion of connection is not possible because:\n" + msg_ ).c_str(); } } -std::string -nest::UnknownThread::message() const +const char* +nest::UnknownThread::what() const noexcept { std::ostringstream out; out << "Thread with id " << id_ << " is outside of range."; - return out.str(); + return out.str().c_str(); } -std::string -nest::BadDelay::message() const +const char* +nest::BadDelay::what() const noexcept { std::ostringstream out; out << "Delay value " << delay_ << " is invalid: " << message_; - return out.str(); + return out.str().c_str(); } -std::string -nest::UnexpectedEvent::message() const +const char* +nest::UnexpectedEvent::what() const noexcept { if ( msg_.empty() ) { @@ -216,36 +214,38 @@ nest::UnexpectedEvent::message() const " Note that recorders such as spike recorders must be connected as\n\n" " nest.Connect(neurons, spike_det)\n\n" " while meters such as voltmeters must be connected as\n\n" - " nest.Connect(meter, neurons) " ); + " nest.Connect(meter, neurons) " ) + .c_str(); } else { - return "UnexpectedEvent: " + msg_; + return ( "UnexpectedEvent: " + msg_ ).c_str(); } } -std::string -nest::UnsupportedEvent::message() const +const char* +nest::UnsupportedEvent::what() const noexcept { return std::string( "The current synapse type does not support the event type of the sender.\n" - " A common cause for this is a plastic synapse between a device and a neuron." ); + " A common cause for this is a plastic synapse between a device and a neuron." ) + .c_str(); } -std::string -nest::BadProperty::message() const +const char* +nest::BadProperty::what() const noexcept { - return msg_; + return msg_.c_str(); } -std::string -nest::BadParameter::message() const +const char* +nest::BadParameter::what() const noexcept { - return msg_; + return msg_.c_str(); } -std::string -nest::DimensionMismatch::message() const +const char* +nest::DimensionMismatch::what() const noexcept { std::ostringstream out; @@ -262,198 +262,186 @@ nest::DimensionMismatch::message() const out << "Expected dimension size: " << expected_ << "\nProvided dimension size: " << provided_; } - return out.str(); + return out.str().c_str(); } -std::string -nest::DistributionError::message() const +const char* +nest::DistributionError::what() const noexcept { - return std::string(); + return std::string().c_str(); } -std::string -nest::InvalidDefaultResolution::message() const +const char* +nest::InvalidDefaultResolution::what() const noexcept { std::ostringstream msg; msg << "The default resolution of " << Time::get_resolution() << " is not consistent with the value " << val_ << " of property '" << prop_.toString() << "' in model " << model_ << ".\n" << "This is an internal NEST error, please report it at " "https://github.com/nest/nest-simulator/issues"; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::InvalidTimeInModel::message() const +const char* +nest::InvalidTimeInModel::what() const noexcept { std::ostringstream msg; msg << "The time property " << prop_.toString() << " = " << val_ << " of model " << model_ << " is not compatible with the resolution " << Time::get_resolution() << ".\n" << "Please set a compatible value with SetDefaults!"; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::StepMultipleRequired::message() const +const char* +nest::StepMultipleRequired::what() const noexcept { std::ostringstream msg; msg << "The time property " << prop_.toString() << " = " << val_ << " of model " << model_ << " must be a multiple of the resolution " << Time::get_resolution() << "."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::TimeMultipleRequired::message() const +const char* +nest::TimeMultipleRequired::what() const noexcept { std::ostringstream msg; msg << "In model " << model_ << ", the time property " << prop_a_.toString() << " = " << val_a_ << " must be multiple of time property " << prop_b_.toString() << " = " << val_b_ << '.'; - return msg.str(); + return msg.str().c_str(); } #ifdef HAVE_MUSIC -std::string -nest::MUSICPortUnconnected::message() const +const char* +nest::MUSICPortUnconnected::what() const noexcept { std::ostringstream msg; msg << "Cannot use instance of model " << model_ << " because the MUSIC port " << portname_ << " is unconnected."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::MUSICPortHasNoWidth::message() const +const char* +nest::MUSICPortHasNoWidth::what() const noexcept { std::ostringstream msg; msg << "Cannot use instance of model " << model_ << " because the MUSIC port " << portname_ << " has no width specified in configuration file."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::MUSICPortAlreadyPublished::message() const +const char* +nest::MUSICPortAlreadyPublished::what() const noexcept { std::ostringstream msg; msg << "The instance of model " << model_ << " cannot change the MUSIC port / establish connections " << portname_ << " since it is already published."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::MUSICSimulationHasRun::message() const +const char* +nest::MUSICSimulationHasRun::what() const noexcept { std::ostringstream msg; msg << "The instance of model " << model_ << " won't work, since the simulation has already been running"; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::MUSICChannelUnknown::message() const +const char* +nest::MUSICChannelUnknown::what() const noexcept { std::ostringstream msg; msg << "The port " << portname_ << " cannot be mapped in " << model_ << " because the channel " << channel_ << " does not exists."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::MUSICPortUnknown::message() const +const char* +nest::MUSICPortUnknown::what() const noexcept { std::ostringstream msg; msg << "The port " << portname_ << " does not exist."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::MUSICChannelAlreadyMapped::message() const +const char* +nest::MUSICChannelAlreadyMapped::what() const noexcept { std::ostringstream msg; msg << "The channel " << channel_ << " of port " << portname_ << " has already be mapped to another proxy in " << model_; - return msg.str(); + return msg.str().c_str(); } #endif #ifdef HAVE_MPI -std::string -nest::MPIPortsFileUnknown::message() const +const char* +nest::MPIPortsFileUnknown::what() const noexcept { std::ostringstream msg; msg << "The node with ID " << node_id_ << " requires a label," << " which specifies the folder with files containing the MPI ports"; - return msg.str(); + return msg.str().c_str(); } #endif -std::string -nest::GSLSolverFailure::message() const +const char* +nest::GSLSolverFailure::what() const noexcept { std::ostringstream msg; msg << "In model " << model_ << ", the GSL solver " << "returned with exit status " << status_ << ".\n" << "Please make sure you have installed a recent " << "GSL version (> gsl-1.10)."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::NumericalInstability::message() const +const char* +nest::NumericalInstability::what() const noexcept { std::ostringstream msg; msg << "NEST detected a numerical instability while " << "updating " << model_ << "."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::UnmatchedSteps::message() const +const char* +nest::UnmatchedSteps::what() const noexcept { std::ostringstream msg; msg << "Steps for backend device don't match NEST steps: " << "steps expected: " << total_steps_ << " " << "steps executed: " << current_step_ << "."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::BackendPrepared::message() const +const char* +nest::BackendPrepared::what() const noexcept { std::ostringstream msg; msg << "Backend " << backend_ << " may not be prepare()'d multiple times."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::BackendNotPrepared::message() const +const char* +nest::BackendNotPrepared::what() const noexcept { std::ostringstream msg; msg << "Backend " << backend_ << " may not be cleanup()'d without preparation (multiple cleanups?)."; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::KeyError::message() const +const char* +nest::KeyError::what() const noexcept { std::ostringstream msg; msg << "Key '" << key_.toString() << "' not found in map." << "Error encountered with map type: '" << map_type_ << "'" << " when applying operation: '" << map_op_ << "'"; - return msg.str(); + return msg.str().c_str(); } -std::string -nest::InternalError::message() const +const char* +nest::InternalError::what() const noexcept { - return msg_; -} - -std::string -nest::LayerExpected::message() const -{ - return std::string(); -} - -std::string -nest::LayerNodeExpected::message() const -{ - return std::string(); + return msg_.c_str(); } diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h index 67c04d5805..36af2d541e 100644 --- a/nestkernel/exceptions.h +++ b/nestkernel/exceptions.h @@ -23,12 +23,13 @@ #ifndef EXCEPTIONS_H #define EXCEPTIONS_H +#include + // Includes from nestkernel: #include "nest_time.h" // Includes from sli: #include "name.h" -#include "sliexceptions.h" class SLIInterpreter; @@ -55,33 +56,18 @@ class Event; * @ingroup Exceptions * @ingroup KernelExceptions */ -class KernelException : public SLIException +class KernelException : public std::runtime_error { public: - KernelException() - : SLIException( "KernelException" ) - { - } - - KernelException( char const* const what ) - : SLIException( what ) - { - } - - KernelException( const std::string& what ) - : SLIException( what ) + explicit KernelException() + : std::runtime_error( "" ) { } - virtual ~KernelException() throw() + explicit KernelException( const std::string& msg ) + : std::runtime_error( msg ) { } - - virtual std::string - message() const - { - return std::string(); - } }; /** @@ -101,10 +87,7 @@ class UnknownModelName : public KernelException { } - ~UnknownModelName() throw() - { - } - std::string message() const; + const char* what() const noexcept override; }; /** @@ -122,10 +105,8 @@ class NewModelNameExists : public KernelException , n_( n ) { } - ~NewModelNameExists() throw() - { - } - std::string message() const; + + const char* what() const noexcept override; }; /** @@ -145,10 +126,8 @@ class UnknownModelID : public KernelException , id_( id ) { } - ~UnknownModelID() throw() - { - } - std::string message() const; + + const char* what() const noexcept override; }; /** @@ -170,10 +149,7 @@ class ModelInUse : public KernelException { } - ~ModelInUse() throw() - { - } - std::string message() const; + const char* what() const noexcept override; }; /** @@ -201,11 +177,7 @@ class UnknownSynapseType : public KernelException { } - ~UnknownSynapseType() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -233,11 +205,7 @@ class UnknownNode : public KernelException { } - ~UnknownNode() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -265,11 +233,7 @@ class NoThreadSiblingsAvailable : public KernelException { } - ~NoThreadSiblingsAvailable() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; @@ -284,11 +248,7 @@ class LocalNodeExpected : public KernelException { } - ~LocalNodeExpected() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; class NodeWithProxiesExpected : public KernelException @@ -302,11 +262,7 @@ class NodeWithProxiesExpected : public KernelException { } - ~NodeWithProxiesExpected() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -327,10 +283,7 @@ class UnknownReceptorType : public KernelException { } - ~UnknownReceptorType() throw() - { - } - std::string message() const; + const char* what() const noexcept override; }; /** @@ -353,10 +306,7 @@ class IncompatibleReceptorType : public KernelException { } - ~IncompatibleReceptorType() throw() - { - } - std::string message() const; + const char* what() const noexcept override; }; /** @@ -376,11 +326,7 @@ class UnknownPort : public KernelException { } - ~UnknownPort() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -404,11 +350,7 @@ class IllegalConnection : public KernelException { } - ~IllegalConnection() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; private: std::string msg_; @@ -436,11 +378,7 @@ class InexistentConnection : public KernelException { } - ~InexistentConnection() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; private: std::string msg_; @@ -461,11 +399,7 @@ class UnknownThread : public KernelException { } - ~UnknownThread() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -486,11 +420,7 @@ class BadDelay : public KernelException { } - ~BadDelay() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -513,11 +443,7 @@ class UnexpectedEvent : public KernelException { } - ~UnexpectedEvent() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; private: std::string msg_; @@ -538,10 +464,7 @@ class UnsupportedEvent : public KernelException { } - ~UnsupportedEvent() throw() - { - } - std::string message() const; + const char* what() const noexcept override; }; /** @@ -567,11 +490,7 @@ class BadProperty : public KernelException { } - ~BadProperty() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -597,11 +516,7 @@ class BadParameter : public KernelException { } - ~BadParameter() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -641,12 +556,7 @@ class DimensionMismatch : public KernelException { } - - ~DimensionMismatch() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; /** @@ -661,11 +571,8 @@ class DistributionError : public KernelException : KernelException( "DistributionError" ) { } - ~DistributionError() throw() - { - } - std::string message() const; + const char* what() const noexcept override; }; /** @@ -692,11 +599,8 @@ class InvalidDefaultResolution : public KernelException , val_( value ) { } - ~InvalidDefaultResolution() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -728,11 +632,8 @@ class InvalidTimeInModel : public KernelException , val_( value ) { } - ~InvalidTimeInModel() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -762,11 +663,8 @@ class StepMultipleRequired : public KernelException , val_( value ) { } - ~StepMultipleRequired() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -804,11 +702,8 @@ class TimeMultipleRequired : public KernelException , val_b_( value_b ) { } - ~TimeMultipleRequired() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -837,11 +732,8 @@ class GSLSolverFailure : public KernelException , status_( status ) { } - ~GSLSolverFailure() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -865,11 +757,8 @@ class NumericalInstability : public KernelException , model_( model ) { } - ~NumericalInstability() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -895,10 +784,7 @@ class KeyError : public KernelException { } - ~KeyError() throw() - { - } - std::string message() const; + const char* what() const noexcept override; }; /** @@ -912,21 +798,16 @@ class InternalError : public KernelException public: //! @param detailed error message InternalError() - : KernelException( "InternalError" ) - , msg_() + : KernelException() + , msg_( "InternalError" ) { } InternalError( std::string msg ) - : KernelException( "InternalError" ) - , msg_( msg ) + : KernelException( msg ) { } - ~InternalError() throw() - { - } - - std::string message() const; + const char* what() const noexcept override; }; @@ -951,11 +832,8 @@ class MUSICPortUnconnected : public KernelException , portname_( portname ) { } - ~MUSICPortUnconnected() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -982,11 +860,8 @@ class MUSICPortHasNoWidth : public KernelException , portname_( portname ) { } - ~MUSICPortHasNoWidth() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -1013,11 +888,8 @@ class MUSICPortAlreadyPublished : public KernelException , portname_( portname ) { } - ~MUSICPortAlreadyPublished() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -1042,11 +914,8 @@ class MUSICSimulationHasRun : public KernelException , model_( model ) { } - ~MUSICSimulationHasRun() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string model_; @@ -1073,11 +942,8 @@ class MUSICChannelUnknown : public KernelException , model_( model ) { } - ~MUSICChannelUnknown() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string portname_; @@ -1098,11 +964,8 @@ class MUSICPortUnknown : public KernelException , portname_( portname ) { } - ~MUSICPortUnknown() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string portname_; @@ -1128,11 +991,8 @@ class MUSICChannelAlreadyMapped : public KernelException , model_( model ) { } - ~MUSICChannelAlreadyMapped() throw() - { - } - std::string message() const; + const char* what() const noexcept override; private: const std::string portname_; @@ -1151,7 +1011,7 @@ class MPIPortsFileUnknown : public KernelException { } - std::string message() const; + const char* what() const noexcept override; private: const index node_id_; @@ -1167,7 +1027,7 @@ class UnmatchedSteps : public KernelException { } - std::string message() const; + const char* what() const noexcept override; private: const int current_step_; @@ -1187,8 +1047,7 @@ class BackendPrepared : public KernelException { } - - std::string message() const; + const char* what() const noexcept override; private: const std::string backend_; @@ -1207,7 +1066,7 @@ class BackendNotPrepared : public KernelException { } - std::string message() const; + const char* what() const noexcept override; private: const std::string backend_; @@ -1220,11 +1079,6 @@ class LayerExpected : public KernelException : KernelException( "LayerExpected" ) { } - ~LayerExpected() throw() - { - } - - std::string message() const; }; class LayerNodeExpected : public KernelException @@ -1234,11 +1088,6 @@ class LayerNodeExpected : public KernelException : KernelException( "LayerNodeExpected" ) { } - ~LayerNodeExpected() throw() - { - } - - std::string message() const; }; } // namespace nest diff --git a/nestkernel/model.cpp b/nestkernel/model.cpp index c85ac96dae..878eb0810a 100644 --- a/nestkernel/model.cpp +++ b/nestkernel/model.cpp @@ -119,7 +119,7 @@ Model::set_status( dictionary d ) } catch ( BadProperty& e ) { - throw BadProperty( String::compose( "Setting status of model '%1': %2", get_name(), e.message() ) ); + throw BadProperty( String::compose( "Setting status of model '%1': %2", get_name(), e.what() ) ); } } diff --git a/nestkernel/node.cpp b/nestkernel/node.cpp index b892376604..4bad11e1bb 100644 --- a/nestkernel/node.cpp +++ b/nestkernel/node.cpp @@ -181,7 +181,7 @@ Node::set_status_base( const dictionary& dict ) catch ( BadProperty& e ) { throw BadProperty( - String::compose( "Setting status of a '%1' with node ID %2: %3", get_name(), get_node_id(), e.message() ) ); + String::compose( "Setting status of a '%1' with node ID %2: %3", get_name(), get_node_id(), e.what() ) ); } dict.update_value( names::frozen, frozen_ ); diff --git a/pynest/nest/lib/hl_api_exceptions.py b/pynest/nest/lib/hl_api_exceptions.py index 6e4a9fc211..b486d7293d 100644 --- a/pynest/nest/lib/hl_api_exceptions.py +++ b/pynest/nest/lib/hl_api_exceptions.py @@ -102,7 +102,7 @@ def __init__(self, commandname, errormessage, errorname='SLIException'): commandname: command name from SLI. errormessage: message from SLI. """ - message = "{} in PyNEST function {}{}".format(errorname, commandname, errormessage) + message = "{} in PyNEST function {}: {}".format(errorname, commandname, errormessage) NESTErrors.NESTError.__init__(self, message) self.errorname = errorname diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index c4e7f0d7a7..c44862eae3 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -164,8 +164,7 @@ def catch_cpp_error(func): try: return func(*args, **kwargs) except RuntimeError as e: - exceptionCls = getattr(NESTErrors, str(e)) - raise exceptionCls(func.__name__, '') from None + raise NESTErrors.NESTError(f'in {func.__name__}: {e}') from None return wrapper_catch_cpp_error def llapi_reset_kernel(): From 53e812c7eceb6372c31827dc8dc58a8ba777167a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 8 Apr 2022 11:53:40 +0200 Subject: [PATCH 070/375] Migrated and updated SLI exceptions --- libnestutil/block_vector.h | 12 +-- libnestutil/dictionary.h | 5 +- .../dictionary_access_flag_manager.cpp | 5 +- nestkernel/conn_builder.h | 4 +- nestkernel/connection_manager.cpp | 1 - nestkernel/exceptions.h | 74 +++++++++++++++++++ nestkernel/logging_manager.cpp | 1 - nestkernel/nest.cpp | 5 -- nestkernel/spatial.cpp | 3 - 9 files changed, 86 insertions(+), 24 deletions(-) diff --git a/libnestutil/block_vector.h b/libnestutil/block_vector.h index 2394dce91b..85b7a21fa9 100644 --- a/libnestutil/block_vector.h +++ b/libnestutil/block_vector.h @@ -29,7 +29,7 @@ #include #include -#include "sliexceptions.h" +#include "exceptions.h" template < typename value_type_ > class BlockVector; @@ -527,35 +527,35 @@ template < typename value_type_ > inline typename BlockVector< value_type_ >::size_type BlockVector< value_type_ >::max_size() const { - throw NotImplemented( "BlockVector max_size() is not implemented." ); + throw nest::NotImplemented( "BlockVector max_size() is not implemented." ); } template < typename value_type_ > inline typename BlockVector< value_type_ >::reverse_iterator BlockVector< value_type_ >::rbegin() { - throw NotImplemented( "BlockVector rbegin() is not implemented." ); + throw nest::NotImplemented( "BlockVector rbegin() is not implemented." ); } template < typename value_type_ > inline typename BlockVector< value_type_ >::reverse_iterator BlockVector< value_type_ >::rbegin() const { - throw NotImplemented( "BlockVector rbegin() is not implemented." ); + throw nest::NotImplemented( "BlockVector rbegin() is not implemented." ); } template < typename value_type_ > inline typename BlockVector< value_type_ >::reverse_iterator BlockVector< value_type_ >::rend() { - throw NotImplemented( "BlockVector rend() is not implemented." ); + throw nest::NotImplemented( "BlockVector rend() is not implemented." ); } template < typename value_type_ > inline typename BlockVector< value_type_ >::reverse_iterator BlockVector< value_type_ >::rend() const { - throw NotImplemented( "BlockVector rend() is not implemented." ); + throw nest::NotImplemented( "BlockVector rend() is not implemented." ); } ///////////////////////////////////////////////////////////// diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index f73bb71e9d..77170ccac4 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -29,7 +29,6 @@ #include #include "exceptions.h" -#include "sliexceptions.h" class dictionary; @@ -105,7 +104,7 @@ class dictionary : public std::map< std::string, boost::any > std::string msg = std::string( "Failed to cast " ) + key + " from " + debug_type( value ) + " to type " + std::string( typeid( T ).name() ); std::cerr << msg << "\n"; - throw TypeMismatch( msg ); + throw nest::TypeMismatch( msg ); } } @@ -136,7 +135,7 @@ class dictionary : public std::map< std::string, boost::any > std::string msg = std::string( "Failed to cast " ) + key + " from " + debug_type( at( key ) ) + " to an integer type "; std::cerr << msg << "\n"; - throw TypeMismatch( msg ); + throw nest::TypeMismatch( msg ); } public: diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp index 34ce2dcad2..8cac9794c2 100644 --- a/libnestutil/dictionary_access_flag_manager.cpp +++ b/libnestutil/dictionary_access_flag_manager.cpp @@ -28,6 +28,8 @@ #include "dictionary_access_flag_manager.h" +#include "exceptions.h" + void DictionaryAccessFlagManager::all_accessed( const dictionary& dict, const std::string where, @@ -51,8 +53,7 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict, // TODO-PYNEST-NG: special case for blank ("unaccessed elements in function ")? - throw UnaccessedDictionaryEntry( std::string( "unaccessed elements in " ) + what + std::string( ", in function " ) - + where + std::string( ": " ) + missed ); + throw nest::UnaccessedDictionaryEntry( what, where, missed ); } // TODO-PYNEST-NG: clear access_flags_[ &dict ] to reclaim memory? } diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h index af9fc6ff7b..54b7f54ca3 100644 --- a/nestkernel/conn_builder.h +++ b/nestkernel/conn_builder.h @@ -37,13 +37,11 @@ // Includes from nestkernel: #include "conn_parameter.h" +#include "exceptions.h" #include "nest_time.h" #include "node_collection.h" #include "parameter.h" -// Includes from sli: -#include "dictdatum.h" -#include "sliexceptions.h" namespace nest { diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index 5aa765875b..d9478f02d0 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -57,7 +57,6 @@ // Includes from sli: #include "dictutils.h" -#include "sliexceptions.h" #include "token.h" #include "tokenutils.h" diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h index 36af2d541e..d3c02bb62f 100644 --- a/nestkernel/exceptions.h +++ b/nestkernel/exceptions.h @@ -70,6 +70,80 @@ class KernelException : public std::runtime_error } }; +/** + * Throw if a feature is unavailable. + * @ingroup KernelExceptions + */ +class NotImplemented : public KernelException +{ +public: + explicit NotImplemented( const std::string& msg ) + : KernelException( msg ) + { + } +}; + +/** + * Exception to be thrown if a given SLI type does not match the + * expected type. + * @ingroup KernelExceptions + */ + +class TypeMismatch : public KernelException +{ + +public: + explicit TypeMismatch() + : KernelException( "The expected datatype is unknown in the current context." ) + { + } + + explicit TypeMismatch( const std::string& expectedType ) + : KernelException( "Expected datatype: " + expectedType ) + { + } + + explicit TypeMismatch( const std::string& expectedType, const std::string& providedType ) + : KernelException( "Expected datatype: " + expectedType + ", provided datatype: " + providedType ) + { + } +}; + +/** + * Class for packaging exceptions thrown in threads. + * + * This class is used to wrap exceptions thrown in threads. + * It essentially packages the message of the wrapped exception, + * avoiding the need of a clone() operation for each exception type. + * @ingroup KernelExceptions + */ +class WrappedThreadException : public KernelException +{ +public: + explicit WrappedThreadException( const std::exception& e ) + : KernelException( e.what() ) + { + } +}; + +/** + * @brief Not all elements in a dictionary have been accessed. + * + * @param what Which parameter triggers the error + * @param where Which function the error occurs in + * @param missed Dictionary keys that have not been accessed + * + */ +class UnaccessedDictionaryEntry : public KernelException +{ +public: + UnaccessedDictionaryEntry( const std::string& what, const std::string& where, const std::string& missed ) + : KernelException( std::string( "unaccessed elements in " ) + what + std::string( ", in function " ) + where + + std::string( ": " ) + missed ) + { + } +}; + /** * Exception to be thrown if a model with the the specified name * does not exist. diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp index b5e0196191..36258a8fe9 100644 --- a/nestkernel/logging_manager.cpp +++ b/nestkernel/logging_manager.cpp @@ -32,7 +32,6 @@ // Includes from sli: #include "dict.h" #include "dictutils.h" -#include "sliexceptions.h" nest::LoggingManager::LoggingManager() : client_callbacks_() diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 03874fe4d8..f33b562838 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -50,11 +50,6 @@ #include "config.h" #include "dictionary.h" - -// Includes from sli: -#include "sliexceptions.h" -#include "token.h" - namespace nest { diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index 7983ed5c30..2fe962dcd4 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -36,9 +36,6 @@ #include "nestmodule.h" #include "node.h" -// Includes from sli: -#include "sliexceptions.h" - // Includes from spatial: #include "grid_layer.h" #include "layer_impl.h" From d77af78a13bc2ff245dd03db0e0ed67ccd9d43a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Fri, 8 Apr 2022 15:55:07 +0200 Subject: [PATCH 071/375] Cleaned up unused exceptions and removed SLI Name dependency --- nestkernel/exceptions.cpp | 83 ++-------------- nestkernel/exceptions.h | 185 ++++------------------------------- nestkernel/model_manager.cpp | 6 +- nestkernel/recordables_map.h | 2 +- 4 files changed, 30 insertions(+), 246 deletions(-) diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp index 93e9e1504c..c2e064a2c6 100644 --- a/nestkernel/exceptions.cpp +++ b/nestkernel/exceptions.cpp @@ -33,7 +33,7 @@ const char* nest::UnknownModelName::what() const noexcept { std::ostringstream msg; - msg << "/" << n_.toString() + " is not a known model name. " + msg << "/" << model_name_ + " is not a known model name. " "Please check the modeldict for a list of available models."; #ifndef HAVE_GSL msg << " A frequent cause for this error is that NEST was compiled " @@ -47,7 +47,7 @@ const char* nest::NewModelNameExists::what() const noexcept { std::ostringstream msg; - msg << "/" << n_.toString() + " is the name of an existing model and cannot be re-used."; + msg << "/" << model_name_ + " is the name of an existing model and cannot be re-used."; return msg.str().c_str(); } @@ -60,13 +60,6 @@ nest::UnknownModelID::what() const noexcept return msg.str().c_str(); } -const char* -nest::ModelInUse::what() const noexcept -{ - std::string str = "Model " + modelname_ + " is in use and cannot be unloaded/uninstalled."; - return str.c_str(); -} - const char* nest::UnknownSynapseType::what() const noexcept { @@ -116,25 +109,6 @@ nest::NoThreadSiblingsAvailable::what() const noexcept return out.str().c_str(); } - -const char* -nest::LocalNodeExpected::what() const noexcept -{ - std::ostringstream out; - out << "Node with id " << id_ << " is not a local node."; - return out.str().c_str(); -} - -const char* -nest::NodeWithProxiesExpected::what() const noexcept -{ - std::ostringstream out; - out << "Nest expected a node with proxies (eg normal model neuron)," - "but the node with id " - << id_ << " is not a node without proxies, e.g., a device."; - return out.str().c_str(); -} - const char* nest::UnknownReceptorType::what() const noexcept { @@ -187,14 +161,6 @@ nest::InexistentConnection::what() const noexcept } } -const char* -nest::UnknownThread::what() const noexcept -{ - std::ostringstream out; - out << "Thread with id " << id_ << " is outside of range."; - return out.str().c_str(); -} - const char* nest::BadDelay::what() const noexcept { @@ -223,15 +189,6 @@ nest::UnexpectedEvent::what() const noexcept } } -const char* -nest::UnsupportedEvent::what() const noexcept -{ - return std::string( - "The current synapse type does not support the event type of the sender.\n" - " A common cause for this is a plastic synapse between a device and a neuron." ) - .c_str(); -} - const char* nest::BadProperty::what() const noexcept { @@ -265,18 +222,12 @@ nest::DimensionMismatch::what() const noexcept return out.str().c_str(); } -const char* -nest::DistributionError::what() const noexcept -{ - return std::string().c_str(); -} - const char* nest::InvalidDefaultResolution::what() const noexcept { std::ostringstream msg; msg << "The default resolution of " << Time::get_resolution() << " is not consistent with the value " << val_ - << " of property '" << prop_.toString() << "' in model " << model_ << ".\n" + << " of property '" << prop_ << "' in model " << model_ << ".\n" << "This is an internal NEST error, please report it at " "https://github.com/nest/nest-simulator/issues"; return msg.str().c_str(); @@ -286,7 +237,7 @@ const char* nest::InvalidTimeInModel::what() const noexcept { std::ostringstream msg; - msg << "The time property " << prop_.toString() << " = " << val_ << " of model " << model_ + msg << "The time property " << prop_ << " = " << val_ << " of model " << model_ << " is not compatible with the resolution " << Time::get_resolution() << ".\n" << "Please set a compatible value with SetDefaults!"; return msg.str().c_str(); @@ -296,7 +247,7 @@ const char* nest::StepMultipleRequired::what() const noexcept { std::ostringstream msg; - msg << "The time property " << prop_.toString() << " = " << val_ << " of model " << model_ + msg << "The time property " << prop_ << " = " << val_ << " of model " << model_ << " must be a multiple of the resolution " << Time::get_resolution() << "."; return msg.str().c_str(); } @@ -305,8 +256,8 @@ const char* nest::TimeMultipleRequired::what() const noexcept { std::ostringstream msg; - msg << "In model " << model_ << ", the time property " << prop_a_.toString() << " = " << val_a_ - << " must be multiple of time property " << prop_b_.toString() << " = " << val_b_ << '.'; + msg << "In model " << model_ << ", the time property " << prop_a_ << " = " << val_a_ + << " must be multiple of time property " << prop_b_ << " = " << val_b_ << '.'; return msg.str().c_str(); } @@ -404,16 +355,6 @@ nest::NumericalInstability::what() const noexcept return msg.str().c_str(); } -const char* -nest::UnmatchedSteps::what() const noexcept -{ - std::ostringstream msg; - msg << "Steps for backend device don't match NEST steps: " - << "steps expected: " << total_steps_ << " " - << "steps executed: " << current_step_ << "."; - return msg.str().c_str(); -} - const char* nest::BackendPrepared::what() const noexcept { @@ -422,19 +363,11 @@ nest::BackendPrepared::what() const noexcept return msg.str().c_str(); } -const char* -nest::BackendNotPrepared::what() const noexcept -{ - std::ostringstream msg; - msg << "Backend " << backend_ << " may not be cleanup()'d without preparation (multiple cleanups?)."; - return msg.str().c_str(); -} - const char* nest::KeyError::what() const noexcept { std::ostringstream msg; - msg << "Key '" << key_.toString() << "' not found in map." + msg << "Key '" << key_ << "' not found in map." << "Error encountered with map type: '" << map_type_ << "'" << " when applying operation: '" << map_op_ << "'"; return msg.str().c_str(); diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h index d3c02bb62f..411ae8b8f4 100644 --- a/nestkernel/exceptions.h +++ b/nestkernel/exceptions.h @@ -28,11 +28,6 @@ // Includes from nestkernel: #include "nest_time.h" -// Includes from sli: -#include "name.h" - -class SLIInterpreter; - namespace nest { @@ -152,12 +147,12 @@ class UnaccessedDictionaryEntry : public KernelException */ class UnknownModelName : public KernelException { - const Name n_; + const std::string model_name_; public: - UnknownModelName( const Name& n ) + UnknownModelName( const std::string& model_name ) : KernelException( "UnknownModelName" ) - , n_( n ) + , model_name_( model_name ) { } @@ -171,12 +166,12 @@ class UnknownModelName : public KernelException */ class NewModelNameExists : public KernelException { - const Name n_; + const std::string model_name_; public: - NewModelNameExists( const Name& n ) + NewModelNameExists( const std::string& model_name ) : KernelException( "NewModelNameExists" ) - , n_( n ) + , model_name_( model_name ) { } @@ -204,28 +199,6 @@ class UnknownModelID : public KernelException const char* what() const noexcept override; }; -/** - * Exception to be thrown if a (neuron/synapse) model with the the specified ID - * is used within the network and the providing module hence cannot be - * uninstalled. This exception can occur if the user tries to uninstall a - * module. - * @see UnknownModelID - * @ingroup KernelExceptions - */ -class ModelInUse : public KernelException -{ - const std::string modelname_; - -public: - ModelInUse( const std::string& modelname ) - : KernelException( "ModelInUse" ) - , modelname_( modelname ) - { - } - - const char* what() const noexcept override; -}; - /** * Exception to be thrown if the specified * Synapse type does not exist. @@ -311,34 +284,6 @@ class NoThreadSiblingsAvailable : public KernelException }; -class LocalNodeExpected : public KernelException -{ - int id_; - -public: - LocalNodeExpected( int id ) - : KernelException( "LocalNodeExpected" ) - , id_( id ) - { - } - - const char* what() const noexcept override; -}; - -class NodeWithProxiesExpected : public KernelException -{ - int id_; - -public: - NodeWithProxiesExpected( int id ) - : KernelException( "NodeWithProxiesExpected" ) - , id_( id ) - { - } - - const char* what() const noexcept override; -}; - /** * Exception to be thrown if the specified * receptor type does not exist in the node. @@ -458,24 +403,6 @@ class InexistentConnection : public KernelException std::string msg_; }; -/** - * Exception to be thrown if a thread id outside the range encountered. - * @ingroup KernelExceptions - */ -class UnknownThread : public KernelException -{ - int id_; - -public: - UnknownThread( int id ) - : KernelException( "UnknownThread" ) - , id_( id ) - { - } - - const char* what() const noexcept override; -}; - /** * Exception to be thrown if an invalid delay is used in a * connection. @@ -524,23 +451,6 @@ class UnexpectedEvent : public KernelException }; -/** - * Exception to be thrown by a Connection object if - * a connection with an unsupported event type is - * attempted - * @ingroup KernelExceptions - */ -class UnsupportedEvent : public KernelException -{ -public: - UnsupportedEvent() - : KernelException( "UnsupportedEvent" ) - { - } - - const char* what() const noexcept override; -}; - /** * Exception to be thrown if a status parameter * is incomplete or inconsistent. @@ -633,22 +543,6 @@ class DimensionMismatch : public KernelException const char* what() const noexcept override; }; -/** - * Exception to be thrown if a problem with the - * distribution of elements is encountered - * @ingroup KernelExceptions - */ -class DistributionError : public KernelException -{ -public: - DistributionError() - : KernelException( "DistributionError" ) - { - } - - const char* what() const noexcept override; -}; - /** * Exception to be thrown on prototype construction if Time objects * incompatible. This exception is to be thrown by the default constructor of @@ -666,7 +560,7 @@ class InvalidDefaultResolution : public KernelException * @param property name of property conflicting * @param value value of property conflicting */ - InvalidDefaultResolution( const std::string& model, const Name& property, const Time& value ) + InvalidDefaultResolution( const std::string& model, const std::string& property, const Time& value ) : KernelException( "InvalidDefaultResolution" ) , model_( model ) , prop_( property ) @@ -678,7 +572,7 @@ class InvalidDefaultResolution : public KernelException private: const std::string model_; - const Name prop_; + const std::string prop_; const Time val_; }; @@ -699,7 +593,7 @@ class InvalidTimeInModel : public KernelException * @param property name of property conflicting * @param value value of property conflicting */ - InvalidTimeInModel( const std::string& model, const Name& property, const Time& value ) + InvalidTimeInModel( const std::string& model, const std::string& property, const Time& value ) : KernelException( "InvalidTimeInModel" ) , model_( model ) , prop_( property ) @@ -711,7 +605,7 @@ class InvalidTimeInModel : public KernelException private: const std::string model_; - const Name prop_; + const std::string prop_; const Time val_; }; @@ -730,7 +624,7 @@ class StepMultipleRequired : public KernelException * @param property name of property conflicting * @param value value of property conflicting */ - StepMultipleRequired( const std::string& model, const Name& property, const Time& value ) + StepMultipleRequired( const std::string& model, const std::string& property, const Time& value ) : KernelException( "StepMultipleRequired" ) , model_( model ) , prop_( property ) @@ -742,7 +636,7 @@ class StepMultipleRequired : public KernelException private: const std::string model_; - const Name prop_; + const std::string prop_; const Time val_; }; @@ -764,9 +658,9 @@ class TimeMultipleRequired : public KernelException * @param value_b value of divisor */ TimeMultipleRequired( const std::string& model, - const Name& name_a, + const std::string& name_a, const Time& value_a, - const Name& name_b, + const std::string& name_b, const Time& value_b ) : KernelException( "StepMultipleRequired" ) , model_( model ) @@ -781,9 +675,9 @@ class TimeMultipleRequired : public KernelException private: const std::string model_; - const Name prop_a_; + const std::string prop_a_; const Time val_a_; - const Name prop_b_; + const std::string prop_b_; const Time val_b_; }; @@ -845,12 +739,12 @@ class NumericalInstability : public KernelException */ class KeyError : public KernelException { - const Name key_; + const std::string key_; const std::string map_type_; const std::string map_op_; public: - KeyError( const Name& key, const std::string& map_type, const std::string& map_op ) + KeyError( const std::string& key, const std::string& map_type, const std::string& map_op ) : KernelException( "KeyError" ) , key_( key ) , map_type_( map_type ) @@ -1092,22 +986,6 @@ class MPIPortsFileUnknown : public KernelException }; #endif -class UnmatchedSteps : public KernelException -{ -public: - UnmatchedSteps( int steps_left, int total_steps ) - : current_step_( total_steps - steps_left ) - , total_steps_( total_steps ) - { - } - - const char* what() const noexcept override; - -private: - const int current_step_; - const int total_steps_; -}; - class BackendPrepared : public KernelException { public: @@ -1127,24 +1005,6 @@ class BackendPrepared : public KernelException const std::string backend_; }; -class BackendNotPrepared : public KernelException -{ -public: - BackendNotPrepared( const std::string& backend ) - : backend_( backend ) - { - } - - BackendNotPrepared( std::string&& backend ) - : backend_( std::move( backend ) ) - { - } - - const char* what() const noexcept override; - -private: - const std::string backend_; -}; class LayerExpected : public KernelException { @@ -1155,15 +1015,6 @@ class LayerExpected : public KernelException } }; -class LayerNodeExpected : public KernelException -{ -public: - LayerNodeExpected() - : KernelException( "LayerNodeExpected" ) - { - } -}; - } // namespace nest #endif diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index b75d93cbec..411f44862b 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -184,7 +184,7 @@ ModelManager::copy_model( Name old_name, Name new_name, dictionary params ) { if ( modeldict_.known( new_name.toString() ) or synapsedict_.known( new_name.toString() ) ) { - throw NewModelNameExists( new_name ); + throw NewModelNameExists( new_name.toString() ); } index new_id; @@ -202,7 +202,7 @@ ModelManager::copy_model( Name old_name, Name new_name, dictionary params ) } else { - throw UnknownModelName( old_name ); + throw UnknownModelName( old_name.toString() ); } return new_id; @@ -310,7 +310,7 @@ ModelManager::set_model_defaults( Name name, dictionary params ) } else { - throw UnknownModelName( name ); + throw UnknownModelName( name.toString() ); } model_defaults_modified_ = true; diff --git a/nestkernel/recordables_map.h b/nestkernel/recordables_map.h index 09a52692a4..49a9867794 100644 --- a/nestkernel/recordables_map.h +++ b/nestkernel/recordables_map.h @@ -221,7 +221,7 @@ class DynamicRecordablesMap : public std::map< Name, const DataAccessFunctor< Ho // If the Name is not in the map, throw an error if ( it == this->end() ) { - throw KeyError( n, "DynamicRecordablesMap", "erase" ); + throw KeyError( n.toString(), "DynamicRecordablesMap", "erase" ); } Base_::erase( it ); From a0cd5b3478eb25aab8b66c0400c74b525780094c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 3 Aug 2022 13:32:48 +0200 Subject: [PATCH 072/375] Removed SLI includes from nestkernel And moved the allocator `pool` to libnestutil --- libnestutil/CMakeLists.txt | 1 + {sli => libnestutil}/allocator.cpp | 20 +-- {sli => libnestutil}/allocator.h | 2 +- models/ac_generator.cpp | 2 +- models/aeif_cond_alpha_multisynapse.cpp | 4 +- models/aeif_cond_alpha_multisynapse.h | 2 +- models/aeif_cond_beta_multisynapse.cpp | 4 +- models/aeif_cond_beta_multisynapse.h | 2 +- models/correlation_detector.h | 2 +- models/correlomatrix_detector.h | 2 +- models/correlospinmatrix_detector.h | 2 +- models/dc_generator.cpp | 2 +- models/glif_cond.cpp | 4 +- models/glif_cond.h | 2 +- models/iaf_cond_alpha_mc.cpp | 61 +++---- models/iaf_cond_alpha_mc.h | 2 +- models/iaf_psc_alpha_multisynapse.cpp | 4 +- models/iaf_psc_alpha_multisynapse.h | 2 +- models/iaf_psc_exp_multisynapse.cpp | 4 +- models/iaf_psc_exp_multisynapse.h | 2 +- models/modelsmodule.cpp | 2 +- models/multimeter.cpp | 4 +- models/multimeter.h | 8 +- models/music_cont_out_proxy.cpp | 4 +- models/music_cont_out_proxy.h | 8 +- models/music_message_in_proxy.h | 2 +- models/noise_generator.cpp | 2 +- models/pp_cond_exp_mc_urbanczik.cpp | 38 ++-- models/pp_cond_exp_mc_urbanczik.h | 2 +- models/quantal_stp_synapse_impl.h | 6 +- models/sinusoidal_poisson_generator.cpp | 2 +- models/sinusoidal_poisson_generator.h | 2 +- models/spike_dilutor.h | 2 +- models/spike_recorder.h | 2 +- models/spin_detector.h | 2 +- models/step_current_generator.cpp | 2 +- models/step_rate_generator.cpp | 2 +- models/volume_transmitter.h | 2 +- models/weight_recorder.h | 2 +- nest/neststartup.cpp | 10 +- nestkernel/archiving_node.cpp | 2 - nestkernel/archiving_node.h | 2 - nestkernel/clopath_archiving_node.cpp | 2 - nestkernel/clopath_archiving_node.h | 2 - nestkernel/common_synapse_properties.cpp | 6 +- nestkernel/common_synapse_properties.h | 3 - nestkernel/conn_builder.cpp | 17 +- nestkernel/conn_builder.h | 12 +- nestkernel/conn_builder_conngen.cpp | 2 - nestkernel/conn_builder_factory.h | 4 - nestkernel/conn_parameter.cpp | 5 - nestkernel/conn_parameter.h | 3 - nestkernel/connection.h | 6 - nestkernel/connection_creator.cpp | 2 +- nestkernel/connection_id.cpp | 15 -- nestkernel/connection_id.h | 4 - nestkernel/connection_label.h | 3 +- nestkernel/connection_manager.cpp | 36 ---- nestkernel/connection_manager.h | 6 - nestkernel/connector_base.h | 9 +- nestkernel/connector_model.h | 2 - nestkernel/connector_model_impl.h | 2 - nestkernel/delay_checker.h | 2 - nestkernel/device.cpp | 8 +- nestkernel/device.h | 4 +- nestkernel/dynamicloader.cpp | 5 - nestkernel/dynamicloader.h | 4 - nestkernel/event.h | 18 +- nestkernel/event_delivery_manager.cpp | 2 - nestkernel/event_delivery_manager.h | 2 - nestkernel/exceptions.cpp | 9 + nestkernel/exceptions.h | 45 +++++ nestkernel/free_layer.h | 2 - nestkernel/generic_factory.h | 21 ++- nestkernel/genericmodel.h | 4 +- nestkernel/grid_mask.h | 3 - nestkernel/growth_curve.cpp | 8 +- nestkernel/growth_curve.h | 10 +- nestkernel/io_manager.cpp | 39 ++-- nestkernel/io_manager.h | 35 ++-- nestkernel/kernel_manager.h | 2 - nestkernel/layer.cpp | 3 - nestkernel/layer.h | 2 - nestkernel/layer_impl.h | 1 - nestkernel/logging_manager.cpp | 3 - nestkernel/logging_manager.h | 2 - nestkernel/manager_interface.h | 3 +- nestkernel/mask.h | 3 - nestkernel/model.cpp | 6 +- nestkernel/model.h | 15 +- nestkernel/model_manager.cpp | 44 ++--- nestkernel/model_manager.h | 19 +- nestkernel/model_manager_impl.h | 6 +- nestkernel/mpi_manager.cpp | 8 +- nestkernel/mpi_manager.h | 4 +- nestkernel/music_manager.cpp | 2 - nestkernel/music_manager.h | 3 - nestkernel/nest.cpp | 16 +- nestkernel/nest.h | 15 +- nestkernel/nest_datums.cpp | 6 +- nestkernel/nest_datums.h | 15 +- nestkernel/nest_time.cpp | 41 ++--- nestkernel/nestmodule.cpp | 196 ++++++++++----------- nestkernel/nestmodule.h | 4 +- nestkernel/node.cpp | 5 - nestkernel/node.h | 24 ++- nestkernel/node_collection.cpp | 130 +++++++------- nestkernel/node_collection.h | 13 +- nestkernel/node_manager.cpp | 11 +- nestkernel/node_manager.h | 3 - nestkernel/parameter.cpp | 7 +- nestkernel/parameter.h | 6 +- nestkernel/per_thread_bool_indicator.h | 2 - nestkernel/position.h | 17 +- nestkernel/proxynode.cpp | 3 - nestkernel/pseudo_recording_device.h | 3 - nestkernel/random_manager.h | 2 +- nestkernel/recordables_map.h | 39 ++-- nestkernel/recording_backend.cpp | 4 +- nestkernel/recording_backend.h | 12 +- nestkernel/recording_backend_ascii.cpp | 10 +- nestkernel/recording_backend_ascii.h | 24 +-- nestkernel/recording_backend_memory.cpp | 12 +- nestkernel/recording_backend_memory.h | 10 +- nestkernel/recording_backend_mpi.cpp | 4 +- nestkernel/recording_backend_mpi.h | 4 +- nestkernel/recording_backend_screen.cpp | 4 +- nestkernel/recording_backend_screen.h | 4 +- nestkernel/recording_backend_sionlib.cpp | 4 +- nestkernel/recording_backend_sionlib.h | 4 +- nestkernel/recording_device.cpp | 6 +- nestkernel/recording_device.h | 9 +- nestkernel/simulation_manager.cpp | 2 - nestkernel/simulation_manager.h | 2 - nestkernel/sp_manager.h | 10 +- nestkernel/spatial.cpp | 75 ++++---- nestkernel/spatial.h | 23 +-- nestkernel/stimulation_backend.h | 5 +- nestkernel/stimulation_device.cpp | 4 +- nestkernel/stimulation_device.h | 10 +- nestkernel/structural_plasticity_node.cpp | 43 +++-- nestkernel/structural_plasticity_node.h | 22 ++- nestkernel/synaptic_element.cpp | 4 +- nestkernel/synaptic_element.h | 2 - nestkernel/target_table_devices.h | 3 - nestkernel/universal_data_logger.h | 14 +- nestkernel/urbanczik_archiving_node.h | 2 - nestkernel/urbanczik_archiving_node_impl.h | 2 - nestkernel/vp_manager.cpp | 2 - nestkernel/vp_manager.h | 2 - sli/CMakeLists.txt | 1 - sli/aggregatedatum.h | 2 +- sli/arraydatum.cc | 6 +- sli/arraydatum.h | 6 +- sli/booldatum.cc | 2 +- sli/booldatum.h | 2 +- sli/doubledatum.cc | 2 +- sli/doubledatum.h | 2 +- sli/functiondatum.cc | 2 +- sli/functiondatum.h | 2 +- sli/integerdatum.cc | 2 +- sli/integerdatum.h | 2 +- sli/namedatum.cc | 4 +- sli/namedatum.h | 4 +- sli/numericdatum.h | 2 +- sli/stringdatum.cc | 2 +- sli/stringdatum.h | 2 +- sli/symboldatum.cc | 2 +- sli/symboldatum.h | 2 +- sli/triedatum.cc | 2 +- sli/triedatum.h | 2 +- 171 files changed, 717 insertions(+), 954 deletions(-) rename {sli => libnestutil}/allocator.cpp (91%) rename {sli => libnestutil}/allocator.h (99%) diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt index 45513b6aa8..cb2fe37f1b 100644 --- a/libnestutil/CMakeLists.txt +++ b/libnestutil/CMakeLists.txt @@ -18,6 +18,7 @@ # along with NEST. If not, see . set( nestutil_sources + allocator.h allocator.cpp beta_normalization_factor.h block_vector.h dictionary.h dictionary.cpp diff --git a/sli/allocator.cpp b/libnestutil/allocator.cpp similarity index 91% rename from sli/allocator.cpp rename to libnestutil/allocator.cpp index 554039fbfd..ab234896d5 100644 --- a/sli/allocator.cpp +++ b/libnestutil/allocator.cpp @@ -22,7 +22,7 @@ #include "allocator.h" -sli::pool::pool() +nest::pool::pool() : initial_block_size( 1024 ) , growth_factor( 1 ) , block_size( initial_block_size ) @@ -36,7 +36,7 @@ sli::pool::pool() { } -sli::pool::pool( const sli::pool& p ) +nest::pool::pool( const nest::pool& p ) : initial_block_size( p.initial_block_size ) , growth_factor( p.growth_factor ) , block_size( initial_block_size ) @@ -51,7 +51,7 @@ sli::pool::pool( const sli::pool& p ) } -sli::pool::pool( size_t n, size_t initial, size_t growth ) +nest::pool::pool( size_t n, size_t initial, size_t growth ) : initial_block_size( initial ) , growth_factor( growth ) , block_size( initial_block_size ) @@ -66,7 +66,7 @@ sli::pool::pool( size_t n, size_t initial, size_t growth ) } void -sli::pool::init( size_t n, size_t initial, size_t growth ) +nest::pool::init( size_t n, size_t initial, size_t growth ) { assert( instantiations == 0 ); @@ -83,7 +83,7 @@ sli::pool::init( size_t n, size_t initial, size_t growth ) head = 0; } -sli::pool::~pool() +nest::pool::~pool() { chunk* n = chunks; while ( n ) @@ -94,8 +94,8 @@ sli::pool::~pool() } } -sli::pool& -sli::pool::operator=( const sli::pool& p ) +nest::pool& +nest::pool::operator=( const nest::pool& p ) { if ( &p == this ) { @@ -116,7 +116,7 @@ sli::pool::operator=( const sli::pool& p ) } void -sli::pool::grow( size_t nelements ) +nest::pool::grow( size_t nelements ) { chunk* n = new chunk( nelements * el_size ); total += nelements; @@ -134,14 +134,14 @@ sli::pool::grow( size_t nelements ) } void -sli::pool::grow( void ) +nest::pool::grow( void ) { grow( block_size ); block_size *= growth_factor; } void -sli::pool::reserve_additional( size_t n ) +nest::pool::reserve_additional( size_t n ) { const size_t capacity = total - instantiations; if ( capacity < n ) diff --git a/sli/allocator.h b/libnestutil/allocator.h similarity index 99% rename from sli/allocator.h rename to libnestutil/allocator.h index b249fd8804..c280007364 100644 --- a/sli/allocator.h +++ b/libnestutil/allocator.h @@ -31,7 +31,7 @@ #include #include -namespace sli +namespace nest { /** diff --git a/models/ac_generator.cpp b/models/ac_generator.cpp index 27b7f3e74f..ee302650e6 100644 --- a/models/ac_generator.cpp +++ b/models/ac_generator.cpp @@ -48,7 +48,7 @@ template <> void RecordablesMap< ac_generator >::create() { - insert_( Name( names::I ), &ac_generator::get_I_ ); + insert_( names::I, &ac_generator::get_I_ ); } } diff --git a/models/aeif_cond_alpha_multisynapse.cpp b/models/aeif_cond_alpha_multisynapse.cpp index af987401a6..7a93ebbff9 100644 --- a/models/aeif_cond_alpha_multisynapse.cpp +++ b/models/aeif_cond_alpha_multisynapse.cpp @@ -64,12 +64,12 @@ DynamicRecordablesMap< aeif_cond_alpha_multisynapse >::create( aeif_cond_alpha_m host.insert_conductance_recordables(); } -Name +std::string aeif_cond_alpha_multisynapse::get_g_receptor_name( size_t receptor ) { std::stringstream receptor_name; receptor_name << "g_" << receptor + 1; - return Name( receptor_name.str() ); + return receptor_name.str(); } void diff --git a/models/aeif_cond_alpha_multisynapse.h b/models/aeif_cond_alpha_multisynapse.h index cdfdfb887c..001335b634 100644 --- a/models/aeif_cond_alpha_multisynapse.h +++ b/models/aeif_cond_alpha_multisynapse.h @@ -385,7 +385,7 @@ class aeif_cond_alpha_multisynapse : public ArchivingNode // Utility function that inserts the synaptic conductances to the // recordables map - Name get_g_receptor_name( size_t receptor ); + std::string get_g_receptor_name( size_t receptor ); void insert_conductance_recordables( size_t first = 0 ); }; diff --git a/models/aeif_cond_beta_multisynapse.cpp b/models/aeif_cond_beta_multisynapse.cpp index b12770310d..b66865d877 100644 --- a/models/aeif_cond_beta_multisynapse.cpp +++ b/models/aeif_cond_beta_multisynapse.cpp @@ -64,12 +64,12 @@ DynamicRecordablesMap< aeif_cond_beta_multisynapse >::create( aeif_cond_beta_mul host.insert_conductance_recordables(); } -Name +std::string aeif_cond_beta_multisynapse::get_g_receptor_name( size_t receptor ) { std::stringstream receptor_name; receptor_name << "g_" << receptor + 1; - return Name( receptor_name.str() ); + return receptor_name.str(); } void diff --git a/models/aeif_cond_beta_multisynapse.h b/models/aeif_cond_beta_multisynapse.h index 7f4ae73b4c..936eb47d46 100644 --- a/models/aeif_cond_beta_multisynapse.h +++ b/models/aeif_cond_beta_multisynapse.h @@ -389,7 +389,7 @@ class aeif_cond_beta_multisynapse : public ArchivingNode // Utility function that inserts the synaptic conductances to the // recordables map - Name get_g_receptor_name( size_t receptor ); + std::string get_g_receptor_name( size_t receptor ); void insert_conductance_recordables( size_t first = 0 ); }; diff --git a/models/correlation_detector.h b/models/correlation_detector.h index 76f10d092f..21e46d2922 100644 --- a/models/correlation_detector.h +++ b/models/correlation_detector.h @@ -175,7 +175,7 @@ class correlation_detector : public Node return true; } - Name + std::string get_element_type() const { return names::recorder; diff --git a/models/correlomatrix_detector.h b/models/correlomatrix_detector.h index 043d48c773..1fbbe56092 100644 --- a/models/correlomatrix_detector.h +++ b/models/correlomatrix_detector.h @@ -161,7 +161,7 @@ class correlomatrix_detector : public Node return true; } - Name + std::string get_element_type() const { return names::recorder; diff --git a/models/correlospinmatrix_detector.h b/models/correlospinmatrix_detector.h index 688d93f0b3..e1a2fbc6e5 100644 --- a/models/correlospinmatrix_detector.h +++ b/models/correlospinmatrix_detector.h @@ -144,7 +144,7 @@ class correlospinmatrix_detector : public Node return true; } - Name + std::string get_element_type() const { return names::recorder; diff --git a/models/dc_generator.cpp b/models/dc_generator.cpp index 589711e5ce..5a3c3aae7e 100644 --- a/models/dc_generator.cpp +++ b/models/dc_generator.cpp @@ -44,7 +44,7 @@ template <> void RecordablesMap< dc_generator >::create() { - insert_( Name( names::I ), &dc_generator::get_I_ ); + insert_( names::I, &dc_generator::get_I_ ); } } diff --git a/models/glif_cond.cpp b/models/glif_cond.cpp index 5807db51f8..2f8ca6eb23 100644 --- a/models/glif_cond.cpp +++ b/models/glif_cond.cpp @@ -64,12 +64,12 @@ DynamicRecordablesMap< nest::glif_cond >::create( glif_cond& host ) host.insert_conductance_recordables(); } -Name +std::string glif_cond::get_g_receptor_name( size_t receptor ) { std::stringstream receptor_name; receptor_name << "g_" << receptor + 1; - return Name( receptor_name.str() ); + return receptor_name.str(); } void diff --git a/models/glif_cond.h b/models/glif_cond.h index c4ade4f613..a20cedf2af 100644 --- a/models/glif_cond.h +++ b/models/glif_cond.h @@ -425,7 +425,7 @@ class glif_cond : public nest::ArchivingNode // Utility function that inserts the synaptic conductances to the // recordables map - Name get_g_receptor_name( size_t receptor ); + std::string get_g_receptor_name( size_t receptor ); void insert_conductance_recordables( size_t first = 0 ); }; diff --git a/models/iaf_cond_alpha_mc.cpp b/models/iaf_cond_alpha_mc.cpp index fca17b145c..6353f9e916 100644 --- a/models/iaf_cond_alpha_mc.cpp +++ b/models/iaf_cond_alpha_mc.cpp @@ -54,7 +54,7 @@ He pointed out that the problem is avoided by defining the comp_names_ vector with its final size. See also #348. */ -std::vector< Name > nest::iaf_cond_alpha_mc::comp_names_( NCOMP ); +std::vector< std::string > nest::iaf_cond_alpha_mc::comp_names_( NCOMP ); /* ---------------------------------------------------------------- * Receptor dictionary @@ -77,26 +77,17 @@ template <> void RecordablesMap< iaf_cond_alpha_mc >::create() { - insert_( - Name( "V_m.s" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::V_M, iaf_cond_alpha_mc::SOMA > ); - insert_( - Name( "g_ex.s" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_EXC, iaf_cond_alpha_mc::SOMA > ); - insert_( - Name( "g_in.s" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_INH, iaf_cond_alpha_mc::SOMA > ); - - insert_( - Name( "V_m.p" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::V_M, iaf_cond_alpha_mc::PROX > ); - insert_( - Name( "g_ex.p" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_EXC, iaf_cond_alpha_mc::PROX > ); - insert_( - Name( "g_in.p" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_INH, iaf_cond_alpha_mc::PROX > ); - - insert_( - Name( "V_m.d" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::V_M, iaf_cond_alpha_mc::DIST > ); - insert_( - Name( "g_ex.d" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_EXC, iaf_cond_alpha_mc::DIST > ); - insert_( - Name( "g_in.d" ), &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_INH, iaf_cond_alpha_mc::DIST > ); + insert_( "V_m.s", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::V_M, iaf_cond_alpha_mc::SOMA > ); + insert_( "g_ex.s", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_EXC, iaf_cond_alpha_mc::SOMA > ); + insert_( "g_in.s", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_INH, iaf_cond_alpha_mc::SOMA > ); + + insert_( "V_m.p", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::V_M, iaf_cond_alpha_mc::PROX > ); + insert_( "g_ex.p", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_EXC, iaf_cond_alpha_mc::PROX > ); + insert_( "g_in.p", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_INH, iaf_cond_alpha_mc::PROX > ); + + insert_( "V_m.d", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::V_M, iaf_cond_alpha_mc::DIST > ); + insert_( "g_ex.d", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_EXC, iaf_cond_alpha_mc::DIST > ); + insert_( "g_in.d", &iaf_cond_alpha_mc::get_y_elem_< iaf_cond_alpha_mc::State_::G_INH, iaf_cond_alpha_mc::DIST > ); insert_( names::t_ref_remaining, &iaf_cond_alpha_mc::get_r_ ); } @@ -337,7 +328,7 @@ nest::iaf_cond_alpha_mc::Parameters_::get( dictionary& d ) const dd[ names::tau_syn_in ] = tau_synI[ n ]; dd[ names::I_e ] = I_e[ n ]; - d[ comp_names_[ n ].toString() ] = dd; + d[ comp_names_[ n ] ] = dd; } } @@ -349,15 +340,15 @@ nest::iaf_cond_alpha_mc::Parameters_::set( const dictionary& d, Node* node ) update_value_param( d, names::V_reset, V_reset, node ); update_value_param( d, names::t_ref, t_ref, node ); - update_value_param( d, Name( names::g_sp ).toString(), g_conn[ SOMA ], node ); - update_value_param( d, Name( names::g_pd ).toString(), g_conn[ PROX ], node ); + update_value_param( d, names::g_sp, g_conn[ SOMA ], node ); + update_value_param( d, names::g_pd, g_conn[ PROX ], node ); // extract from sub-dictionaries for ( size_t n = 0; n < NCOMP; ++n ) { - if ( d.known( comp_names_[ n ].toString() ) ) + if ( d.known( comp_names_[ n ] ) ) { - auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + auto dd = d.get< dictionary >( comp_names_[ n ] ); update_value_param( d, names::E_L, E_L[ n ], node ); update_value_param( d, names::E_ex, E_ex[ n ], node ); @@ -383,11 +374,11 @@ nest::iaf_cond_alpha_mc::Parameters_::set( const dictionary& d, Node* node ) { if ( C_m[ n ] <= 0 ) { - throw BadProperty( "Capacitance (" + comp_names_[ n ].toString() + ") must be strictly positive." ); + throw BadProperty( "Capacitance (" + comp_names_[ n ] + ") must be strictly positive." ); } if ( tau_synE[ n ] <= 0 || tau_synI[ n ] <= 0 ) { - throw BadProperty( "All time constants (" + comp_names_[ n ].toString() + ") must be strictly positive." ); + throw BadProperty( "All time constants (" + comp_names_[ n ] + ") must be strictly positive." ); } } } @@ -399,8 +390,8 @@ nest::iaf_cond_alpha_mc::State_::get( dictionary& d ) const // Parameters_::get(), so that the per-compartment dictionaries exist for ( size_t n = 0; n < NCOMP; ++n ) { - assert( d.known( comp_names_[ n ].toString() ) ); - auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + assert( d.known( comp_names_[ n ] ) ); + auto dd = d.get< dictionary >( comp_names_[ n ] ); dd[ names::V_m ] = y_[ idx( n, V_M ) ]; // Membrane potential } @@ -412,9 +403,9 @@ nest::iaf_cond_alpha_mc::State_::set( const dictionary& d, const Parameters_&, N // extract from sub-dictionaries for ( size_t n = 0; n < NCOMP; ++n ) { - if ( d.known( comp_names_[ n ].toString() ) ) + if ( d.known( comp_names_[ n ] ) ) { - auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + auto dd = d.get< dictionary >( comp_names_[ n ] ); update_value_param( d, names::V_m, y_[ idx( n, V_M ) ], node ); } } @@ -435,9 +426,9 @@ nest::iaf_cond_alpha_mc::iaf_cond_alpha_mc() // set up table of compartment names // comp_names_.resize(NCOMP); --- Fixed size, see comment on definition - comp_names_[ SOMA ] = Name( "soma" ); - comp_names_[ PROX ] = Name( "proximal" ); - comp_names_[ DIST ] = Name( "distal" ); + comp_names_[ SOMA ] = "soma"; + comp_names_[ PROX ] = "proximal"; + comp_names_[ DIST ] = "distal"; } nest::iaf_cond_alpha_mc::iaf_cond_alpha_mc( const iaf_cond_alpha_mc& n ) diff --git a/models/iaf_cond_alpha_mc.h b/models/iaf_cond_alpha_mc.h index 7bb3a56f89..9818399885 100644 --- a/models/iaf_cond_alpha_mc.h +++ b/models/iaf_cond_alpha_mc.h @@ -455,7 +455,7 @@ class iaf_cond_alpha_mc : public ArchivingNode Buffers_ B_; //! Table of compartment names - static std::vector< Name > comp_names_; + static std::vector< std::string > comp_names_; //! Dictionary of receptor types, leads to seg fault on exit, see #328 // static DictionaryDatum receptor_dict_; diff --git a/models/iaf_psc_alpha_multisynapse.cpp b/models/iaf_psc_alpha_multisynapse.cpp index 394d0c1de5..1008621554 100644 --- a/models/iaf_psc_alpha_multisynapse.cpp +++ b/models/iaf_psc_alpha_multisynapse.cpp @@ -61,12 +61,12 @@ DynamicRecordablesMap< iaf_psc_alpha_multisynapse >::create( iaf_psc_alpha_multi host.insert_current_recordables(); } -Name +std::string iaf_psc_alpha_multisynapse::get_i_syn_name( size_t elem ) { std::stringstream i_syn_name; i_syn_name << "I_syn_" << elem + 1; - return Name( i_syn_name.str() ); + return i_syn_name.str(); } void diff --git a/models/iaf_psc_alpha_multisynapse.h b/models/iaf_psc_alpha_multisynapse.h index 60026831af..b368aaed7b 100644 --- a/models/iaf_psc_alpha_multisynapse.h +++ b/models/iaf_psc_alpha_multisynapse.h @@ -304,7 +304,7 @@ class iaf_psc_alpha_multisynapse : public ArchivingNode // Utility function that inserts the synaptic conductances to the // recordables map - Name get_i_syn_name( size_t elem ); + std::string get_i_syn_name( size_t elem ); void insert_current_recordables( size_t first = 0 ); }; diff --git a/models/iaf_psc_exp_multisynapse.cpp b/models/iaf_psc_exp_multisynapse.cpp index 5e84dcecf1..2ddfc67f64 100644 --- a/models/iaf_psc_exp_multisynapse.cpp +++ b/models/iaf_psc_exp_multisynapse.cpp @@ -61,12 +61,12 @@ DynamicRecordablesMap< iaf_psc_exp_multisynapse >::create( iaf_psc_exp_multisyna host.insert_current_recordables(); } -Name +std::string iaf_psc_exp_multisynapse::get_i_syn_name( size_t elem ) { std::stringstream i_syn_name; i_syn_name << "I_syn_" << elem + 1; - return Name( i_syn_name.str() ); + return i_syn_name.str(); } void diff --git a/models/iaf_psc_exp_multisynapse.h b/models/iaf_psc_exp_multisynapse.h index d9310093da..b455c54d7d 100644 --- a/models/iaf_psc_exp_multisynapse.h +++ b/models/iaf_psc_exp_multisynapse.h @@ -306,7 +306,7 @@ class iaf_psc_exp_multisynapse : public ArchivingNode // Utility function that inserts the synaptic conductances to the // recordables map - Name get_i_syn_name( size_t elem ); + std::string get_i_syn_name( size_t elem ); void insert_current_recordables( size_t first = 0 ); }; diff --git a/models/modelsmodule.cpp b/models/modelsmodule.cpp index cb3b4ea08e..984020e7dd 100644 --- a/models/modelsmodule.cpp +++ b/models/modelsmodule.cpp @@ -182,7 +182,7 @@ ModelsModule::~ModelsModule() const std::string ModelsModule::name( void ) const { - return std::string( "NEST Standard Models Module" ); // Return name of the module + return "NEST Standard Models Module"; // Return name of the module } //------------------------------------------------------------------------------------- diff --git a/models/multimeter.cpp b/models/multimeter.cpp index 48e0b3fc6e..d887276f57 100644 --- a/models/multimeter.cpp +++ b/models/multimeter.cpp @@ -98,7 +98,7 @@ nest::multimeter::Parameters_::get( dictionary& d ) const std::vector< std::string > ad; for ( size_t j = 0; j < record_from_.size(); ++j ) { - ad.push_back( record_from_[ j ].toString() ); + ad.push_back( record_from_[ j ] ); } d[ names::record_from ] = ad; } @@ -163,7 +163,7 @@ nest::multimeter::Parameters_::set( const dictionary& d, const Buffers_& b, Node ArrayDatum ad = d.get< ArrayDatum >( names::record_from ); for ( Token* t = ad.begin(); t != ad.end(); ++t ) { - record_from_.push_back( Name( getValue< std::string >( *t ) ) ); + record_from_.push_back( getValue< std::string >( *t ) ); } } } diff --git a/models/multimeter.h b/models/multimeter.h index 65ec341736..b662e0ff22 100644 --- a/models/multimeter.h +++ b/models/multimeter.h @@ -146,7 +146,7 @@ class multimeter : public RecordingDevice return false; } - Name + std::string get_element_type() const { return names::recorder; @@ -190,9 +190,9 @@ class multimeter : public RecordingDevice struct Parameters_ { - Time interval_; //!< recording interval, in ms - Time offset_; //!< offset relative to 0, in ms - std::vector< Name > record_from_; //!< which data to record + Time interval_; //!< recording interval, in ms + Time offset_; //!< offset relative to 0, in ms + std::vector< std::string > record_from_; //!< which data to record Parameters_(); Parameters_( const Parameters_& ); diff --git a/models/music_cont_out_proxy.cpp b/models/music_cont_out_proxy.cpp index 7e2aa1dbab..57ced34597 100644 --- a/models/music_cont_out_proxy.cpp +++ b/models/music_cont_out_proxy.cpp @@ -103,7 +103,7 @@ nest::music_cont_out_proxy::Parameters_::get( dictionary& d ) const for ( size_t j = 0; j < record_from_.size(); ++j ) { - ad_record_from.push_back( record_from_[ j ].toString() ); + ad_record_from.push_back( record_from_[ j ] ); } d[ names::record_from ] = ad_record_from; @@ -156,7 +156,7 @@ nest::music_cont_out_proxy::Parameters_::set( const dictionary& d, ArrayDatum ad = d.get< ArrayDatum >( names::record_from ); for ( Token* t = ad.begin(); t != ad.end(); ++t ) { - record_from_.push_back( Name( getValue< std::string >( *t ) ) ); + record_from_.push_back( getValue< std::string >( *t ) ); } } diff --git a/models/music_cont_out_proxy.h b/models/music_cont_out_proxy.h index 4d869743fe..7d02579f73 100644 --- a/models/music_cont_out_proxy.h +++ b/models/music_cont_out_proxy.h @@ -174,10 +174,10 @@ class music_cont_out_proxy : public DeviceNode Parameters_(); //!< Sets default parameter values Parameters_( const Parameters_& ); //!< Copy constructor for parameter values - Time interval_; //!< sampling interval, in ms - std::string port_name_; //!< the name of MUSIC port to connect to - std::vector< Name > record_from_; //!< recordables to record from - NodeCollectionPTR targets_; //!< nodes to be observed + Time interval_; //!< sampling interval, in ms + std::string port_name_; //!< the name of MUSIC port to connect to + std::vector< std::string > record_from_; //!< recordables to record from + NodeCollectionPTR targets_; //!< nodes to be observed void get( dictionary& ) const; //!< Store current values in dictionary void set( const dictionary&, const Node&, const State_&, const Buffers_& ); //!< Set values from dictionary diff --git a/models/music_message_in_proxy.h b/models/music_message_in_proxy.h index b330939276..f05fa20d76 100644 --- a/models/music_message_in_proxy.h +++ b/models/music_message_in_proxy.h @@ -107,7 +107,7 @@ class MsgHandler : public MUSIC::MessageHandler operator()( double t, void* msg, size_t size ) { message_times.push_back( t * 1000.0 ); - messages.push_back( std::string( static_cast< char* >( msg ), size ) ); + messages.push_back( static_cast< char* >( msg ), size ); } public: diff --git a/models/noise_generator.cpp b/models/noise_generator.cpp index 1b70442ac8..059b357766 100644 --- a/models/noise_generator.cpp +++ b/models/noise_generator.cpp @@ -46,7 +46,7 @@ template <> void RecordablesMap< noise_generator >::create() { - insert_( Name( names::I ), &noise_generator::get_I_avg_ ); + insert_( names::I, &noise_generator::get_I_avg_ ); } } diff --git a/models/pp_cond_exp_mc_urbanczik.cpp b/models/pp_cond_exp_mc_urbanczik.cpp index de923b0e55..ca26cdfbae 100644 --- a/models/pp_cond_exp_mc_urbanczik.cpp +++ b/models/pp_cond_exp_mc_urbanczik.cpp @@ -53,7 +53,7 @@ He pointed out that the problem is avoided by defining the comp_names_ vector with its final size. See also #348. */ -std::vector< Name > nest::pp_cond_exp_mc_urbanczik::comp_names_( NCOMP ); +std::vector< std::string > nest::pp_cond_exp_mc_urbanczik::comp_names_( NCOMP ); /* ---------------------------------------------------------------- * Receptor dictionary @@ -77,17 +77,17 @@ template <> void RecordablesMap< pp_cond_exp_mc_urbanczik >::create() { - insert_( Name( "V_m.s" ), + insert_( "V_m.s", &pp_cond_exp_mc_urbanczik::get_y_elem_< pp_cond_exp_mc_urbanczik::State_::V_M, pp_cond_exp_mc_urbanczik::SOMA > ); - insert_( Name( "g_ex.s" ), + insert_( "g_ex.s", &pp_cond_exp_mc_urbanczik::get_y_elem_< pp_cond_exp_mc_urbanczik::State_::G_EXC, pp_cond_exp_mc_urbanczik::SOMA > ); - insert_( Name( "g_in.s" ), + insert_( "g_in.s", &pp_cond_exp_mc_urbanczik::get_y_elem_< pp_cond_exp_mc_urbanczik::State_::G_INH, pp_cond_exp_mc_urbanczik::SOMA > ); - insert_( Name( "V_m.p" ), + insert_( "V_m.p", &pp_cond_exp_mc_urbanczik::get_y_elem_< pp_cond_exp_mc_urbanczik::State_::V_M, pp_cond_exp_mc_urbanczik::DEND > ); - insert_( Name( "I_ex.p" ), + insert_( "I_ex.p", &pp_cond_exp_mc_urbanczik::get_y_elem_< pp_cond_exp_mc_urbanczik::State_::I_EXC, pp_cond_exp_mc_urbanczik::DEND > ); - insert_( Name( "I_in.p" ), + insert_( "I_in.p", &pp_cond_exp_mc_urbanczik::get_y_elem_< pp_cond_exp_mc_urbanczik::State_::I_INH, pp_cond_exp_mc_urbanczik::DEND > ); } } @@ -353,7 +353,7 @@ nest::pp_cond_exp_mc_urbanczik::Parameters_::get( dictionary& d ) const dd[ names::tau_syn_in ] = urbanczik_params.tau_syn_in[ n ]; dd[ names::I_e ] = I_e[ n ]; - d[ comp_names_[ n ].toString() ] = dd; + d[ comp_names_[ n ] ] = dd; } } @@ -367,15 +367,15 @@ nest::pp_cond_exp_mc_urbanczik::Parameters_::set( const dictionary& d ) d.update_value( names::beta, urbanczik_params.beta ); d.update_value( names::theta, urbanczik_params.theta ); - d.update_value( Name( names::g_sp ).toString(), urbanczik_params.g_conn[ SOMA ] ); - d.update_value( Name( names::g_ps ).toString(), urbanczik_params.g_conn[ DEND ] ); + d.update_value( names::g_sp, urbanczik_params.g_conn[ SOMA ] ); + d.update_value( names::g_ps, urbanczik_params.g_conn[ DEND ] ); // extract from sub-dictionaries for ( size_t n = 0; n < NCOMP; ++n ) { - if ( d.known( comp_names_[ n ].toString() ) ) + if ( d.known( comp_names_[ n ] ) ) { - auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + auto dd = d.get< dictionary >( comp_names_[ n ] ); dd.update_value( names::E_L, urbanczik_params.E_L[ n ] ); dd.update_value( names::E_ex, E_ex[ n ] ); @@ -407,7 +407,7 @@ nest::pp_cond_exp_mc_urbanczik::Parameters_::set( const dictionary& d ) { if ( urbanczik_params.C_m[ n ] <= 0 ) { - throw BadProperty( "Capacitance (" + comp_names_[ n ].toString() + ") must be strictly positive." ); + throw BadProperty( "Capacitance (" + comp_names_[ n ] + ") must be strictly positive." ); } if ( urbanczik_params.tau_syn_ex[ n ] <= 0 || urbanczik_params.tau_syn_in[ n ] <= 0 ) @@ -424,8 +424,8 @@ nest::pp_cond_exp_mc_urbanczik::State_::get( dictionary& d ) const // Parameters_::get(), so that the per-compartment dictionaries exist for ( size_t n = 0; n < NCOMP; ++n ) { - assert( d.known( comp_names_[ n ].toString() ) ); - auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + assert( d.known( comp_names_[ n ] ) ); + auto dd = d.get< dictionary >( comp_names_[ n ] ); dd[ names::V_m ] = y_[ idx( n, V_M ) ]; // Membrane potential } @@ -437,9 +437,9 @@ nest::pp_cond_exp_mc_urbanczik::State_::set( const dictionary& d, const Paramete // extract from sub-dictionaries for ( size_t n = 0; n < NCOMP; ++n ) { - if ( d.known( comp_names_[ n ].toString() ) ) + if ( d.known( comp_names_[ n ] ) ) { - auto dd = d.get< dictionary >( comp_names_[ n ].toString() ); + auto dd = d.get< dictionary >( comp_names_[ n ] ); dd.update_value( names::V_m, y_[ idx( n, V_M ) ] ); } } @@ -460,8 +460,8 @@ nest::pp_cond_exp_mc_urbanczik::pp_cond_exp_mc_urbanczik() // set up table of compartment names // comp_names_.resize(NCOMP); --- Fixed size, see comment on definition - comp_names_[ SOMA ] = Name( "soma" ); - comp_names_[ DEND ] = Name( "dendritic" ); + comp_names_[ SOMA ] = "soma"; + comp_names_[ DEND ] = "dendritic"; UrbanczikArchivingNode< pp_cond_exp_mc_urbanczik_parameters >::urbanczik_params = &P_.urbanczik_params; } diff --git a/models/pp_cond_exp_mc_urbanczik.h b/models/pp_cond_exp_mc_urbanczik.h index 98328ef91e..857329b456 100644 --- a/models/pp_cond_exp_mc_urbanczik.h +++ b/models/pp_cond_exp_mc_urbanczik.h @@ -521,7 +521,7 @@ class pp_cond_exp_mc_urbanczik : public UrbanczikArchivingNode< pp_cond_exp_mc_u Buffers_ B_; //! Table of compartment names - static std::vector< Name > comp_names_; + static std::vector< std::string > comp_names_; //! Dictionary of receptor types, leads to seg fault on exit, see #328 // static DictionaryDatum receptor_dict_; diff --git a/models/quantal_stp_synapse_impl.h b/models/quantal_stp_synapse_impl.h index a344dff5db..13b3c6f5d7 100644 --- a/models/quantal_stp_synapse_impl.h +++ b/models/quantal_stp_synapse_impl.h @@ -42,11 +42,11 @@ namespace nest * int. */ bool -update_value_int( const dictionary& d, Name propname, int& prop ) +update_value_int( const dictionary& d, std::string propname, int& prop ) { - if ( d.known( propname.toString() ) ) + if ( d.known( propname ) ) { - const auto value = d.at( propname.toString() ); + const auto value = d.at( propname ); if ( is_int( value ) ) { prop = boost::any_cast< int >( value ); diff --git a/models/sinusoidal_poisson_generator.cpp b/models/sinusoidal_poisson_generator.cpp index 481d6fac68..2698e3c836 100644 --- a/models/sinusoidal_poisson_generator.cpp +++ b/models/sinusoidal_poisson_generator.cpp @@ -53,7 +53,7 @@ template <> void RecordablesMap< sinusoidal_poisson_generator >::create() { - insert_( Name( names::rate ), &sinusoidal_poisson_generator::get_rate_ ); + insert_( names::rate, &sinusoidal_poisson_generator::get_rate_ ); } } diff --git a/models/sinusoidal_poisson_generator.h b/models/sinusoidal_poisson_generator.h index 4e3b0c36f7..0a8eb931e7 100644 --- a/models/sinusoidal_poisson_generator.h +++ b/models/sinusoidal_poisson_generator.h @@ -160,7 +160,7 @@ class sinusoidal_poisson_generator : public StimulationDevice return true; } - Name + std::string get_element_type() const override { return names::stimulator; diff --git a/models/spike_dilutor.h b/models/spike_dilutor.h index 09106bd813..9f25a48283 100644 --- a/models/spike_dilutor.h +++ b/models/spike_dilutor.h @@ -86,7 +86,7 @@ class spike_dilutor : public DeviceNode return true; } - Name + std::string get_element_type() const override { return names::stimulator; diff --git a/models/spike_recorder.h b/models/spike_recorder.h index 0586edb074..6e21a8eb59 100644 --- a/models/spike_recorder.h +++ b/models/spike_recorder.h @@ -97,7 +97,7 @@ class spike_recorder : public RecordingDevice return true; } - Name + std::string get_element_type() const { return names::recorder; diff --git a/models/spin_detector.h b/models/spin_detector.h index 89ba38ae74..ba4cc285d0 100644 --- a/models/spin_detector.h +++ b/models/spin_detector.h @@ -110,7 +110,7 @@ class spin_detector : public RecordingDevice return true; } - Name + std::string get_element_type() const { return names::recorder; diff --git a/models/step_current_generator.cpp b/models/step_current_generator.cpp index 76ebe62054..1069b54b24 100644 --- a/models/step_current_generator.cpp +++ b/models/step_current_generator.cpp @@ -40,7 +40,7 @@ template <> void RecordablesMap< step_current_generator >::create() { - insert_( Name( names::I ), &step_current_generator::get_I_ ); + insert_( names::I, &step_current_generator::get_I_ ); } } diff --git a/models/step_rate_generator.cpp b/models/step_rate_generator.cpp index ba3c651515..592b3d1ef9 100644 --- a/models/step_rate_generator.cpp +++ b/models/step_rate_generator.cpp @@ -40,7 +40,7 @@ template <> void RecordablesMap< step_rate_generator >::create() { - insert_( Name( names::rate ), &step_rate_generator::get_rate_ ); + insert_( names::rate, &step_rate_generator::get_rate_ ); } } diff --git a/models/volume_transmitter.h b/models/volume_transmitter.h index 2dc34e370d..d45975f87c 100644 --- a/models/volume_transmitter.h +++ b/models/volume_transmitter.h @@ -122,7 +122,7 @@ class volume_transmitter : public ArchivingNode return false; } - Name + std::string get_element_type() const { return names::other; diff --git a/models/weight_recorder.h b/models/weight_recorder.h index 1060b12819..769aec86e1 100644 --- a/models/weight_recorder.h +++ b/models/weight_recorder.h @@ -100,7 +100,7 @@ class weight_recorder : public RecordingDevice return true; } - Name + std::string get_element_type() const { return names::recorder; diff --git a/nest/neststartup.cpp b/nest/neststartup.cpp index 1c591bc90f..42b0db4a21 100644 --- a/nest/neststartup.cpp +++ b/nest/neststartup.cpp @@ -157,12 +157,12 @@ neststartup( int* argc, char*** argv, SLIInterpreter& engine, std::string module #endif #endif -#ifdef _IS_PYNEST + // #ifdef _IS_PYNEST // add the init-script to the list of module initializers - ArrayDatum* ad = dynamic_cast< ArrayDatum* >( engine.baselookup( engine.commandstring_name ).datum() ); - assert( ad != NULL ); - ad->push_back( new StringDatum( "(" + modulepath + "/pynest-init.sli) run" ) ); -#endif + // ArrayDatum* ad = dynamic_cast< ArrayDatum* >( engine.baselookup( engine.commandstring_name ).datum() ); + // assert( ad != NULL ); + // ad->push_back( new StringDatum( "(" + modulepath + "/pynest-init.sli) run" ) ); + // #endif return engine.startup(); } diff --git a/nestkernel/archiving_node.cpp b/nestkernel/archiving_node.cpp index 5da0d5f975..28b366b3d2 100644 --- a/nestkernel/archiving_node.cpp +++ b/nestkernel/archiving_node.cpp @@ -25,8 +25,6 @@ // Includes from nestkernel: #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" namespace nest { diff --git a/nestkernel/archiving_node.h b/nestkernel/archiving_node.h index 4285f45a91..565dbf16af 100644 --- a/nestkernel/archiving_node.h +++ b/nestkernel/archiving_node.h @@ -34,8 +34,6 @@ #include "node.h" #include "structural_plasticity_node.h" -// Includes from sli: -#include "dictdatum.h" #define DEBUG_ARCHIVER 1 diff --git a/nestkernel/clopath_archiving_node.cpp b/nestkernel/clopath_archiving_node.cpp index e5a50ad876..200f5e6da2 100644 --- a/nestkernel/clopath_archiving_node.cpp +++ b/nestkernel/clopath_archiving_node.cpp @@ -25,8 +25,6 @@ // Includes from nestkernel: #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" namespace nest { diff --git a/nestkernel/clopath_archiving_node.h b/nestkernel/clopath_archiving_node.h index eaf5d0449e..4281036fc1 100644 --- a/nestkernel/clopath_archiving_node.h +++ b/nestkernel/clopath_archiving_node.h @@ -33,8 +33,6 @@ #include "nest_types.h" #include "synaptic_element.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/common_synapse_properties.cpp b/nestkernel/common_synapse_properties.cpp index 3696b0f6a2..94891c1e25 100644 --- a/nestkernel/common_synapse_properties.cpp +++ b/nestkernel/common_synapse_properties.cpp @@ -28,8 +28,6 @@ #include "nest_types.h" #include "node.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { @@ -57,8 +55,8 @@ CommonSynapseProperties::get_status( dictionary& d ) const } else { - ArrayDatum ad; - d[ names::weight_recorder ] = ad; + const auto nc = NodeCollectionPTR(); // TODO-PYNEST-NG: check that this gives an empty NC + d[ names::weight_recorder ] = nc; } } diff --git a/nestkernel/common_synapse_properties.h b/nestkernel/common_synapse_properties.h index 2049f937cd..81d9b6f9fa 100644 --- a/nestkernel/common_synapse_properties.h +++ b/nestkernel/common_synapse_properties.h @@ -29,9 +29,6 @@ #include "nest_types.h" #include "node.h" -// Includes from sli: -#include "dictdatum.h" - namespace nest { diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp index c39d562357..7ee23bfc6e 100644 --- a/nestkernel/conn_builder.cpp +++ b/nestkernel/conn_builder.cpp @@ -34,11 +34,6 @@ #include "node.h" #include "vp_manager_impl.h" -// Includes from sli: -#include "dict.h" -#include "fdstream.h" -#include "name.h" - nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, const dictionary& conn_spec, @@ -300,12 +295,12 @@ nest::ConnBuilder::update_param_dict_( index snode_id, { if ( synapse_parameter.second->provides_long() ) { - param_dicts_[ synapse_indx ][ target_thread ][ synapse_parameter.first.toString() ] = + param_dicts_[ synapse_indx ][ target_thread ][ synapse_parameter.first ] = synapse_parameter.second->value_int( target_thread, rng, snode_id, &target ); } else { - param_dicts_[ synapse_indx ][ target_thread ][ synapse_parameter.first.toString() ] = + param_dicts_[ synapse_indx ][ target_thread ][ synapse_parameter.first ] = synapse_parameter.second->value_double( target_thread, rng, snode_id, &target ); } } @@ -373,7 +368,7 @@ nest::ConnBuilder::set_pre_synaptic_element_name( const std::string& name ) throw BadProperty( "pre_synaptic_element cannot be empty." ); } - pre_synaptic_element_name_ = Name( name ); + pre_synaptic_element_name_ = name; use_pre_synaptic_element_ = not name.empty(); } @@ -385,7 +380,7 @@ nest::ConnBuilder::set_post_synaptic_element_name( const std::string& name ) throw BadProperty( "post_synaptic_element cannot be empty." ); } - post_synaptic_element_name_ = Name( name ); + post_synaptic_element_name_ = name; use_post_synaptic_element_ = not name.empty(); } @@ -522,11 +517,11 @@ nest::ConnBuilder::set_synapse_params( const dictionary& syn_defaults, { if ( param.second->provides_long() ) { - param_dicts_[ synapse_indx ][ tid ][ param.first.toString() ] = 0; + param_dicts_[ synapse_indx ][ tid ][ param.first ] = 0; } else { - param_dicts_[ synapse_indx ][ tid ][ param.first.toString() ] = 0.0; + param_dicts_[ synapse_indx ][ tid ][ param.first ] = 0.0; } } } diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h index 54b7f54ca3..145da73fcb 100644 --- a/nestkernel/conn_builder.h +++ b/nestkernel/conn_builder.h @@ -189,8 +189,8 @@ class ConnBuilder // Name of the pre synaptic and postsynaptic elements for this connection // builder - Name pre_synaptic_element_name_; - Name post_synaptic_element_name_; + std::string pre_synaptic_element_name_; + std::string post_synaptic_element_name_; bool use_pre_synaptic_element_; bool use_post_synaptic_element_; @@ -210,7 +210,7 @@ class ConnBuilder std::vector< std::vector< dictionary > > param_dicts_; private: - typedef std::map< Name, ConnParameter* > ConnParameterMap; + typedef std::map< std::string, ConnParameter* > ConnParameterMap; //! indicate that weight and delay should not be set per synapse std::vector< bool > default_weight_and_delay_; @@ -229,7 +229,7 @@ class ConnBuilder std::vector< ConnParameterMap > synapse_params_; //! synapse-specific parameters that should be skipped when we set default synapse parameters - std::set< Name > skip_syn_params_; + std::set< std::string > skip_syn_params_; /** * Collects all array parameters in a vector. @@ -398,12 +398,12 @@ class SPBuilder : public ConnBuilder std::string get_pre_synaptic_element_name() const { - return pre_synaptic_element_name_.toString(); + return pre_synaptic_element_name_; } std::string get_post_synaptic_element_name() const { - return post_synaptic_element_name_.toString(); + return post_synaptic_element_name_; } /** diff --git a/nestkernel/conn_builder_conngen.cpp b/nestkernel/conn_builder_conngen.cpp index 9517d5773a..d98daf9e44 100644 --- a/nestkernel/conn_builder_conngen.cpp +++ b/nestkernel/conn_builder_conngen.cpp @@ -27,8 +27,6 @@ // Includes from nestkernel: #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" namespace nest { diff --git a/nestkernel/conn_builder_factory.h b/nestkernel/conn_builder_factory.h index e9ad5b0700..0dfbd9077d 100644 --- a/nestkernel/conn_builder_factory.h +++ b/nestkernel/conn_builder_factory.h @@ -29,10 +29,6 @@ // Includes from nestkernel: #include "conn_builder.h" -// Includes from sli: -#include "dictdatum.h" -#include "name.h" -#include "sharedptrdatum.h" namespace nest { diff --git a/nestkernel/conn_parameter.cpp b/nestkernel/conn_parameter.cpp index 321f513f43..ec0740a6b1 100644 --- a/nestkernel/conn_parameter.cpp +++ b/nestkernel/conn_parameter.cpp @@ -28,11 +28,6 @@ #include "kernel_manager.h" #include "nest_names.h" -// Includes from sli: -#include "arraydatum.h" -#include "doubledatum.h" -#include "integerdatum.h" -#include "tokenutils.h" nest::ConnParameter* nest::ConnParameter::create( const boost::any& value, const size_t nthreads ) diff --git a/nestkernel/conn_parameter.h b/nestkernel/conn_parameter.h index 3eec60f3cc..2c4ec660f4 100644 --- a/nestkernel/conn_parameter.h +++ b/nestkernel/conn_parameter.h @@ -34,9 +34,6 @@ #include "nest_datums.h" #include "parameter.h" -// Includes from sli: -#include "token.h" - /** * Base class for parameters provided to connection routines. * diff --git a/nestkernel/connection.h b/nestkernel/connection.h index 0658360bdb..5f907c75ab 100644 --- a/nestkernel/connection.h +++ b/nestkernel/connection.h @@ -38,12 +38,6 @@ #include "spikecounter.h" #include "syn_id_delay.h" -// Includes from sli: -#include "arraydatum.h" -#include "dict.h" -#include "dictutils.h" -#include "doubledatum.h" - namespace nest { diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp index 31a0cf6b63..85f629043b 100644 --- a/nestkernel/connection_creator.cpp +++ b/nestkernel/connection_creator.cpp @@ -21,7 +21,7 @@ */ #include "connection_creator.h" -#include "dictutils.h" + #include "nest.h" namespace nest diff --git a/nestkernel/connection_id.cpp b/nestkernel/connection_id.cpp index 2f8f6dc15c..fd33f44c45 100644 --- a/nestkernel/connection_id.cpp +++ b/nestkernel/connection_id.cpp @@ -27,9 +27,6 @@ #include "dictionary.h" -// Includes from sli: -#include "integerdatum.h" - namespace nest { @@ -74,18 +71,6 @@ ConnectionID::get_dict() const return dict; } -ArrayDatum -ConnectionID::to_ArrayDatum() const -{ - ArrayDatum ad; - ad.push_back( new IntegerDatum( source_node_id_ ) ); - ad.push_back( new IntegerDatum( target_node_id_ ) ); - ad.push_back( new IntegerDatum( target_thread_ ) ); - ad.push_back( new IntegerDatum( synapse_modelid_ ) ); - ad.push_back( new IntegerDatum( port_ ) ); - return ad; -} - bool ConnectionID::operator==( const ConnectionID& c ) const { diff --git a/nestkernel/connection_id.h b/nestkernel/connection_id.h index 3963be04b4..2e651e165d 100644 --- a/nestkernel/connection_id.h +++ b/nestkernel/connection_id.h @@ -25,9 +25,6 @@ #include "dictionary.h" -// Includes from sli: -#include "arraydatum.h" -#include "dictutils.h" namespace nest { @@ -41,7 +38,6 @@ class ConnectionID ConnectionID( const ConnectionID& ) = default; dictionary get_dict() const; - ArrayDatum to_ArrayDatum() const; bool operator==( const ConnectionID& c ) const; void print_me( std::ostream& out ) const; long get_source_node_id() const; diff --git a/nestkernel/connection_label.h b/nestkernel/connection_label.h index ff5b010fe2..5401e1e1ce 100644 --- a/nestkernel/connection_label.h +++ b/nestkernel/connection_label.h @@ -23,8 +23,7 @@ #ifndef CONNECTION_LABEL_H #define CONNECTION_LABEL_H -#include "dictdatum.h" -#include "dictutils.h" + #include "nest_names.h" namespace nest diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp index d9478f02d0..daaff87ded 100644 --- a/nestkernel/connection_manager.cpp +++ b/nestkernel/connection_manager.cpp @@ -55,10 +55,6 @@ #include "target_table_devices_impl.h" #include "vp_manager_impl.h" -// Includes from sli: -#include "dictutils.h" -#include "token.h" -#include "tokenutils.h" nest::ConnectionManager::ConnectionManager() : connruledict_() @@ -419,38 +415,6 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources, delete cb; } -void -nest::ConnectionManager::connect( TokenArray sources, TokenArray targets, const dictionary& syn_spec ) -{ - // Get synapse id - size_t syn_id = 0; - if ( syn_spec.known( names::model ) ) - { - std::string synmodel_name = syn_spec.get< std::string >( names::model ); - const auto& syndict = kernel().model_manager.get_synapsedict(); - - if ( syndict.known( synmodel_name ) ) - { - syn_id = static_cast< size_t >( syndict.get< synindex >( synmodel_name ) ); - } - else - { - throw UnknownModelName( synmodel_name ); - } - } - // Connect all sources to all targets - for ( auto&& source : sources ) - { - auto source_node = kernel().node_manager.get_node_or_proxy( source ); - for ( auto&& target : targets ) - { - auto target_node = kernel().node_manager.get_node_or_proxy( target ); - auto target_thread = target_node->get_thread(); - connect_( *source_node, *target_node, source, target_thread, syn_id, syn_spec ); - } - } -} - void nest::ConnectionManager::update_delay_extrema_() { diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h index c98510c79b..7f006d7fc3 100644 --- a/nestkernel/connection_manager.h +++ b/nestkernel/connection_manager.h @@ -44,10 +44,6 @@ #include "target_table.h" #include "target_table_devices.h" -// Includes from sli: -#include "arraydatum.h" -#include "dict.h" -#include "dictdatum.h" namespace nest { @@ -108,8 +104,6 @@ class ConnectionManager : public ManagerInterface */ void connect( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const std::vector< dictionary >& ); - void connect( TokenArray, TokenArray, const dictionary& ); - /** * Connect two nodes. The source node is defined by its global ID. * The target node is defined by the node. The connection is diff --git a/nestkernel/connector_base.h b/nestkernel/connector_base.h index 971389091f..3f4a88c6f1 100644 --- a/nestkernel/connector_base.h +++ b/nestkernel/connector_base.h @@ -46,9 +46,6 @@ #include "source.h" #include "spikecounter.h" -// Includes from sli: -#include "arraydatum.h" -#include "dictutils.h" namespace nest { @@ -283,8 +280,7 @@ class Connector : public ConnectorBase const index current_target_node_id = C_[ lcid ].get_target( tid )->get_node_id(); if ( current_target_node_id == target_node_id or target_node_id == 0 ) { - conns.push_back( - ConnectionDatum( ConnectionID( source_node_id, current_target_node_id, tid, syn_id_, lcid ) ) ); + conns.push_back( ConnectionID( source_node_id, current_target_node_id, tid, syn_id_, lcid ) ); } } } @@ -306,8 +302,7 @@ class Connector : public ConnectorBase if ( std::find( target_neuron_node_ids.begin(), target_neuron_node_ids.end(), current_target_node_id ) != target_neuron_node_ids.end() ) { - conns.push_back( - ConnectionDatum( ConnectionID( source_node_id, current_target_node_id, tid, syn_id_, lcid ) ) ); + conns.push_back( ConnectionID( source_node_id, current_target_node_id, tid, syn_id_, lcid ) ); } } } diff --git a/nestkernel/connector_model.h b/nestkernel/connector_model.h index a94b6a2fad..48706924e7 100644 --- a/nestkernel/connector_model.h +++ b/nestkernel/connector_model.h @@ -35,8 +35,6 @@ #include "nest_time.h" #include "nest_types.h" -// Includes from sli: -#include "dictutils.h" namespace nest { diff --git a/nestkernel/connector_model_impl.h b/nestkernel/connector_model_impl.h index 1b75c91f3f..f81efef126 100644 --- a/nestkernel/connector_model_impl.h +++ b/nestkernel/connector_model_impl.h @@ -38,8 +38,6 @@ #include "nest_time.h" #include "nest_timeconverter.h" -// Includes from sli: -#include "dictutils.h" namespace nest { diff --git a/nestkernel/delay_checker.h b/nestkernel/delay_checker.h index c47260369c..e5ca111a04 100644 --- a/nestkernel/delay_checker.h +++ b/nestkernel/delay_checker.h @@ -28,8 +28,6 @@ #include "dictionary.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/device.cpp b/nestkernel/device.cpp index 44278c33c7..eb92cd54e8 100644 --- a/nestkernel/device.cpp +++ b/nestkernel/device.cpp @@ -31,8 +31,6 @@ #include "nest_names.h" #include "node.h" -// Includes from sli: -#include "dictutils.h" /* ---------------------------------------------------------------- * Default constructor defining default parameters @@ -83,7 +81,7 @@ nest::Device::Parameters_::get( dictionary& d ) const } void -nest::Device::Parameters_::update_( const dictionary& d, const Name& name, Time& value ) +nest::Device::Parameters_::update_( const dictionary& d, const std::string& name, Time& value ) { /* We cannot update the Time values directly, since updateValue() doesn't support Time objects. We thus read the value in ms into @@ -95,12 +93,12 @@ nest::Device::Parameters_::update_( const dictionary& d, const Name& name, Time& */ double val; - if ( d.update_value( name.toString(), val ) ) + if ( d.update_value( name, val ) ) { const Time t = Time::ms( val ); if ( t.is_finite() and not t.is_grid_time() ) { - throw BadProperty( name.toString() + " must be a multiple " + throw BadProperty( name + " must be a multiple " "of the simulation resolution." ); } value = t; diff --git a/nestkernel/device.h b/nestkernel/device.h index 11b3663b7a..f8b9d110a4 100644 --- a/nestkernel/device.h +++ b/nestkernel/device.h @@ -29,8 +29,6 @@ #include "nest_types.h" #include "node.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { @@ -138,7 +136,7 @@ class Device private: //! Update given Time parameter including error checking - static void update_( const dictionary&, const Name&, Time& ); + static void update_( const dictionary&, const std::string&, Time& ); }; diff --git a/nestkernel/dynamicloader.cpp b/nestkernel/dynamicloader.cpp index 1edb018818..13594f524a 100644 --- a/nestkernel/dynamicloader.cpp +++ b/nestkernel/dynamicloader.cpp @@ -46,11 +46,6 @@ #include "kernel_manager.h" #include "model.h" -// Includes from sli: -#include "integerdatum.h" -#include "interpret.h" -#include "stringdatum.h" - namespace nest { diff --git a/nestkernel/dynamicloader.h b/nestkernel/dynamicloader.h index f9543373b6..714497ca12 100644 --- a/nestkernel/dynamicloader.h +++ b/nestkernel/dynamicloader.h @@ -35,10 +35,6 @@ #include "dictionary.h" -// Includes from sli: -#include "slifunction.h" -#include "slimodule.h" - namespace nest { diff --git a/nestkernel/event.h b/nestkernel/event.h index 2da8eee3db..779f928305 100644 --- a/nestkernel/event.h +++ b/nestkernel/event.h @@ -27,6 +27,7 @@ #include #include #include +#include #include // Includes from nestkernel: @@ -35,9 +36,6 @@ #include "nest_types.h" #include "vp_manager.h" -// Includes from sli: -#include "name.h" - namespace nest { @@ -580,11 +578,11 @@ class DataLoggingRequest : public Event /** Create empty request for use during simulation. */ DataLoggingRequest(); - DataLoggingRequest( const Time&, const std::vector< Name >& ); + DataLoggingRequest( const Time&, const std::vector< std::string >& ); /** Create event for given time interval, offset for interval start, * and vector of recordables. */ - DataLoggingRequest( const Time&, const Time&, const std::vector< Name >& ); + DataLoggingRequest( const Time&, const Time&, const std::vector< std::string >& ); DataLoggingRequest* clone() const; @@ -597,7 +595,7 @@ class DataLoggingRequest : public Event const Time& get_recording_offset() const; /** Access to vector of recordables. */ - const std::vector< Name >& record_from() const; + const std::vector< std::string >& record_from() const; private: //! Interval between two recordings, first is step 1 @@ -610,7 +608,7 @@ class DataLoggingRequest : public Event * @note This pointer shall be NULL unless the event is sent by a connection * routine. */ - std::vector< Name > const* const record_from_; + std::vector< std::string > const* const record_from_; }; inline DataLoggingRequest::DataLoggingRequest() @@ -621,7 +619,7 @@ inline DataLoggingRequest::DataLoggingRequest() { } -inline DataLoggingRequest::DataLoggingRequest( const Time& rec_int, const std::vector< Name >& recs ) +inline DataLoggingRequest::DataLoggingRequest( const Time& rec_int, const std::vector< std::string >& recs ) : Event() , recording_interval_( rec_int ) , record_from_( &recs ) @@ -630,7 +628,7 @@ inline DataLoggingRequest::DataLoggingRequest( const Time& rec_int, const std::v inline DataLoggingRequest::DataLoggingRequest( const Time& rec_int, const Time& rec_offset, - const std::vector< Name >& recs ) + const std::vector< std::string >& recs ) : Event() , recording_interval_( rec_int ) , recording_offset_( rec_offset ) @@ -662,7 +660,7 @@ DataLoggingRequest::get_recording_offset() const return recording_offset_; } -inline const std::vector< Name >& +inline const std::vector< std::string >& DataLoggingRequest::record_from() const { // During simulation, events are created without recordables diff --git a/nestkernel/event_delivery_manager.cpp b/nestkernel/event_delivery_manager.cpp index cd681c2c8c..51f16b90de 100644 --- a/nestkernel/event_delivery_manager.cpp +++ b/nestkernel/event_delivery_manager.cpp @@ -41,8 +41,6 @@ #include "vp_manager.h" #include "vp_manager_impl.h" -// Includes from sli: -#include "dictutils.h" namespace nest { diff --git a/nestkernel/event_delivery_manager.h b/nestkernel/event_delivery_manager.h index f7ca06d4a6..0657adea6d 100644 --- a/nestkernel/event_delivery_manager.h +++ b/nestkernel/event_delivery_manager.h @@ -43,8 +43,6 @@ #include "target_table.h" #include "vp_manager.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp index c2e064a2c6..7253679410 100644 --- a/nestkernel/exceptions.cpp +++ b/nestkernel/exceptions.cpp @@ -378,3 +378,12 @@ nest::InternalError::what() const noexcept { return msg_.c_str(); } + + +const char* +nest::UndefinedName::what() const noexcept +{ + std::ostringstream msg; + msg << "The name " << name_ << " is not defined."; + return msg.str().c_str(); +} diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h index 411ae8b8f4..e599040348 100644 --- a/nestkernel/exceptions.h +++ b/nestkernel/exceptions.h @@ -503,6 +503,35 @@ class BadParameter : public KernelException const char* what() const noexcept override; }; +/** + * Exception to be thrown if a parameter value + * is not acceptable. + */ +class BadParameterValue : public KernelException +{ + std::string msg_; + +public: + //! @param detailed error message + BadParameterValue() + : KernelException( "BadParameterValue" ) + , msg_() + { + } + + BadParameterValue( std::string msg ) + : KernelException( "BadParameterValue" ) + , msg_( msg ) + { + } + + ~BadParameterValue() throw() + { + } + + std::string message() const; +}; + /** * Exception to be thrown if the dimensions * of two or more objects do not agree. @@ -1015,6 +1044,22 @@ class LayerExpected : public KernelException } }; + +class UndefinedName : public KernelException +{ + const std::string name_; + +public: + UndefinedName( std::string name ) + : KernelException( "UndefinedName" ) + , name_( name ) + { + } + + const char* what() const noexcept override; +}; + + } // namespace nest #endif diff --git a/nestkernel/free_layer.h b/nestkernel/free_layer.h index ea09807ced..eac0e2e1a5 100644 --- a/nestkernel/free_layer.h +++ b/nestkernel/free_layer.h @@ -31,8 +31,6 @@ // Includes from nestkernel: #include "nest_names.h" -// Includes from sli: -#include "dictutils.h" // Includes from spatial: #include "layer.h" diff --git a/nestkernel/generic_factory.h b/nestkernel/generic_factory.h index bdd2897cc9..099f736796 100644 --- a/nestkernel/generic_factory.h +++ b/nestkernel/generic_factory.h @@ -27,10 +27,9 @@ #include // Includes from nestkernel: +#include "generic_factory.h" #include "nest_types.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { @@ -49,7 +48,7 @@ class GenericFactory { public: typedef BaseT* ( *CreatorFunction )( const dictionary& d ); - typedef std::map< Name, CreatorFunction > AssocMap; + typedef std::map< std::string, CreatorFunction > AssocMap; /** * Factory function. @@ -57,7 +56,7 @@ class GenericFactory * @param d Dictionary containing parameters for this subtype. * @returns dynamically allocated new object. */ - BaseT* create( const Name& name, const dictionary& d ) const; + BaseT* create( const std::string& name, const dictionary& d ) const; /** * Register a new subtype. The type name must not already exist. The @@ -68,7 +67,7 @@ class GenericFactory * @returns true if subtype was successfully registered. */ template < class T > - bool register_subtype( const Name& name ); + bool register_subtype( const std::string& name ); /** * Register a new subtype. The type name must not already exist. @@ -77,7 +76,7 @@ class GenericFactory * from a const dictionary& containing parameters * @returns true if mask was successfully registered. */ - bool register_subtype( const Name& name, CreatorFunction creator ); + bool register_subtype( const std::string& name, CreatorFunction creator ); private: template < class T > @@ -88,29 +87,29 @@ class GenericFactory template < class BaseT > inline BaseT* -GenericFactory< BaseT >::create( const Name& name, const dictionary& d ) const +GenericFactory< BaseT >::create( const std::string& name, const dictionary& d ) const { typename AssocMap::const_iterator i = associations_.find( name ); if ( i != associations_.end() ) { return ( i->second )( d ); } - throw UndefinedName( name.toString() ); + throw UndefinedName( name ); } template < class BaseT > template < class T > inline bool -GenericFactory< BaseT >::register_subtype( const Name& name ) +GenericFactory< BaseT >::register_subtype( const std::string& name ) { return register_subtype( name, new_from_dict_< T > ); } template < class BaseT > inline bool -GenericFactory< BaseT >::register_subtype( const Name& name, CreatorFunction creator ) +GenericFactory< BaseT >::register_subtype( const std::string& name, CreatorFunction creator ) { - return associations_.insert( std::pair< Name, CreatorFunction >( name, creator ) ).second; + return associations_.insert( std::pair< std::string, CreatorFunction >( name, creator ) ).second; } template < class BaseT > diff --git a/nestkernel/genericmodel.h b/nestkernel/genericmodel.h index b81f6bfc19..56b3c7a646 100644 --- a/nestkernel/genericmodel.h +++ b/nestkernel/genericmodel.h @@ -108,7 +108,7 @@ class GenericModel : public Model /** * Initialize the pool allocator with the node specific properties. */ - void init_memory_( sli::pool& ); + void init_memory_( nest::pool& ); /** * Prototype node from which all instances are constructed. @@ -164,7 +164,7 @@ GenericModel< ElementT >::allocate_( void* adr ) template < typename ElementT > void -GenericModel< ElementT >::init_memory_( sli::pool& mem ) +GenericModel< ElementT >::init_memory_( nest::pool& mem ) { mem.init( sizeof( ElementT ), 1000, 1 ); } diff --git a/nestkernel/grid_mask.h b/nestkernel/grid_mask.h index c89862e0da..b041549858 100644 --- a/nestkernel/grid_mask.h +++ b/nestkernel/grid_mask.h @@ -28,9 +28,6 @@ #include "nest_types.h" #include "nestmodule.h" -// Includes from sli: -#include "dictdatum.h" -#include "dictutils.h" // Includes from spatial: #include "mask.h" diff --git a/nestkernel/growth_curve.cpp b/nestkernel/growth_curve.cpp index 4b2112927d..e63e5b03a3 100644 --- a/nestkernel/growth_curve.cpp +++ b/nestkernel/growth_curve.cpp @@ -36,8 +36,6 @@ #include "nest_names.h" #include "nest_time.h" -// Includes from sli: -#include "dictutils.h" /* ---------------------------------------------------------------- * GrowthCurveLinear @@ -52,7 +50,7 @@ nest::GrowthCurveLinear::GrowthCurveLinear() void nest::GrowthCurveLinear::get( dictionary& d ) const { - d[ names::growth_curve ] = name_.toString(); + d[ names::growth_curve ] = name_; d[ names::eps ] = eps_; } @@ -90,7 +88,7 @@ nest::GrowthCurveGaussian::GrowthCurveGaussian() void nest::GrowthCurveGaussian::get( dictionary& d ) const { - d[ names::growth_curve ] = name_.toString(); + d[ names::growth_curve ] = name_; d[ names::eps ] = eps_; d[ names::eta ] = eta_; } @@ -143,7 +141,7 @@ nest::GrowthCurveSigmoid::GrowthCurveSigmoid() void nest::GrowthCurveSigmoid::get( dictionary& d ) const { - d[ names::growth_curve ] = name_.toString(); + d[ names::growth_curve ] = name_; d[ names::eps ] = eps_; d[ names::psi ] = psi_; } diff --git a/nestkernel/growth_curve.h b/nestkernel/growth_curve.h index a6518219cc..17bc465c67 100644 --- a/nestkernel/growth_curve.h +++ b/nestkernel/growth_curve.h @@ -36,8 +36,6 @@ #include "dictionary.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { @@ -58,22 +56,22 @@ class GrowthCurve virtual double update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const = 0; virtual bool - is( Name n ) + is( std::string n ) { return n == name_; } - Name + std::string get_name() { return name_; } protected: - GrowthCurve( const Name name ) + GrowthCurve( const std::string name ) : name_( name ) { } - const Name name_; + const std::string name_; }; /** @BeginDocumentation diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp index 8908b1deb8..8be7e28622 100644 --- a/nestkernel/io_manager.cpp +++ b/nestkernel/io_manager.cpp @@ -50,8 +50,7 @@ #include "recording_backend_sionlib.h" #endif -// Includes from sli: -#include "dictutils.h" + #include namespace nest @@ -192,7 +191,7 @@ IOManager::set_status( const dictionary& d ) for ( const auto& it : recording_backends_ ) { dictionary recording_backend_status; - if ( recording_backends.update_value( it.first.toString(), recording_backend_status ) ) + if ( recording_backends.update_value( it.first, recording_backend_status ) ) { it.second->set_status( recording_backend_status ); } @@ -212,7 +211,7 @@ IOManager::get_status( dictionary& d ) { dictionary recording_backend_status; it.second->get_status( recording_backend_status ); - recording_backends[ it.first.toString() ] = recording_backend_status; + recording_backends[ it.first ] = recording_backend_status; } d[ names::recording_backends ] = recording_backends; } @@ -279,22 +278,22 @@ IOManager::cleanup() } bool -IOManager::is_valid_recording_backend( const Name& backend_name ) const +IOManager::is_valid_recording_backend( const std::string& backend_name ) const { - std::map< Name, RecordingBackend* >::const_iterator backend; + std::map< std::string, RecordingBackend* >::const_iterator backend; backend = recording_backends_.find( backend_name ); return backend != recording_backends_.end(); } bool -IOManager::is_valid_stimulation_backend( const Name& backend_name ) const +IOManager::is_valid_stimulation_backend( const std::string& backend_name ) const { auto backend = stimulation_backends_.find( backend_name ); return backend != stimulation_backends_.end(); } void -IOManager::write( const Name& backend_name, +IOManager::write( const std::string& backend_name, const RecordingDevice& device, const Event& event, const std::vector< double >& double_values, @@ -304,7 +303,7 @@ IOManager::write( const Name& backend_name, } void -IOManager::enroll_recorder( const Name& backend_name, const RecordingDevice& device, const dictionary& params ) +IOManager::enroll_recorder( const std::string& backend_name, const RecordingDevice& device, const dictionary& params ) { for ( auto& it : recording_backends_ ) { @@ -320,14 +319,16 @@ IOManager::enroll_recorder( const Name& backend_name, const RecordingDevice& dev } void -nest::IOManager::enroll_stimulator( const Name& backend_name, StimulationDevice& device, const dictionary& params ) +nest::IOManager::enroll_stimulator( const std::string& backend_name, + StimulationDevice& device, + const dictionary& params ) { - if ( not is_valid_stimulation_backend( backend_name ) and not backend_name.toString().empty() ) + if ( not is_valid_stimulation_backend( backend_name ) and not backend_name.empty() ) { return; } - if ( backend_name.toString().empty() ) + if ( backend_name.empty() ) { for ( auto& it : stimulation_backends_ ) { @@ -351,28 +352,30 @@ nest::IOManager::enroll_stimulator( const Name& backend_name, StimulationDevice& } void -IOManager::set_recording_value_names( const Name& backend_name, +IOManager::set_recording_value_names( const std::string& backend_name, const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) { recording_backends_[ backend_name ]->set_value_names( device, double_value_names, long_value_names ); } void -IOManager::check_recording_backend_device_status( const Name& backend_name, const dictionary& params ) +IOManager::check_recording_backend_device_status( const std::string& backend_name, const dictionary& params ) { recording_backends_[ backend_name ]->check_device_status( params ); } void -IOManager::get_recording_backend_device_defaults( const Name& backend_name, dictionary& params ) +IOManager::get_recording_backend_device_defaults( const std::string& backend_name, dictionary& params ) { recording_backends_[ backend_name ]->get_device_defaults( params ); } void -IOManager::get_recording_backend_device_status( const Name& backend_name, const RecordingDevice& device, dictionary& d ) +IOManager::get_recording_backend_device_status( const std::string& backend_name, + const RecordingDevice& device, + dictionary& d ) { recording_backends_[ backend_name ]->get_device_status( device, d ); } diff --git a/nestkernel/io_manager.h b/nestkernel/io_manager.h index f7087d29de..06e6b8ed6e 100644 --- a/nestkernel/io_manager.h +++ b/nestkernel/io_manager.h @@ -96,27 +96,30 @@ class IOManager : public ManagerInterface void prepare() override; template < class RBT > - void register_recording_backend( Name ); + void register_recording_backend( std::string ); template < class RBT > - void register_stimulation_backend( Name ); + void register_stimulation_backend( std::string ); - bool is_valid_recording_backend( const Name& ) const; - bool is_valid_stimulation_backend( const Name& ) const; + bool is_valid_recording_backend( const std::string& ) const; + bool is_valid_stimulation_backend( const std::string& ) const; - void - write( const Name&, const RecordingDevice&, const Event&, const std::vector< double >&, const std::vector< long >& ); + void write( const std::string&, + const RecordingDevice&, + const Event&, + const std::vector< double >&, + const std::vector< long >& ); - void enroll_recorder( const Name&, const RecordingDevice&, const dictionary& ); - void enroll_stimulator( const Name&, StimulationDevice&, const dictionary& ); + void enroll_recorder( const std::string&, const RecordingDevice&, const dictionary& ); + void enroll_stimulator( const std::string&, StimulationDevice&, const dictionary& ); - void set_recording_value_names( const Name& backend_name, + void set_recording_value_names( const std::string& backend_name, const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ); + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ); - void check_recording_backend_device_status( const Name&, const dictionary& ); - void get_recording_backend_device_defaults( const Name&, dictionary& ); - void get_recording_backend_device_status( const Name&, const RecordingDevice&, dictionary& ); + void check_recording_backend_device_status( const std::string&, const dictionary& ); + void get_recording_backend_device_defaults( const std::string&, dictionary& ); + void get_recording_backend_device_status( const std::string&, const RecordingDevice&, dictionary& ); private: void set_data_path_prefix_( const dictionary& ); @@ -130,11 +133,11 @@ class IOManager : public ManagerInterface /** * A mapping from names to registered recording backends. */ - std::map< Name, RecordingBackend* > recording_backends_; + std::map< std::string, RecordingBackend* > recording_backends_; /** * A mapping from names to registered stimulation backends */ - std::map< Name, StimulationBackend* > stimulation_backends_; + std::map< std::string, StimulationBackend* > stimulation_backends_; }; } // namespace nest diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h index 771121b8b7..c00921c45d 100644 --- a/nestkernel/kernel_manager.h +++ b/nestkernel/kernel_manager.h @@ -41,8 +41,6 @@ // Includes from libnestutil #include "dictionary_access_flag_manager.h" -// Includes from sli: -#include "dictdatum.h" // clang-format off /** @BeginDocumentation diff --git a/nestkernel/layer.cpp b/nestkernel/layer.cpp index 041dd74480..39e59248c2 100644 --- a/nestkernel/layer.cpp +++ b/nestkernel/layer.cpp @@ -29,9 +29,6 @@ #include "node_collection.h" #include "parameter.h" -// Includes from sli: -#include "dictutils.h" -#include "integerdatum.h" // Includes from spatial: #include "connection_creator_impl.h" diff --git a/nestkernel/layer.h b/nestkernel/layer.h index 6f1462e463..1b4ee1ebe4 100644 --- a/nestkernel/layer.h +++ b/nestkernel/layer.h @@ -33,8 +33,6 @@ #include "nest_names.h" #include "nest_types.h" -// Includes from sli: -#include "dictutils.h" // Includes from spatial: #include "connection_creator.h" diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h index f73c8f642c..3e702f91aa 100644 --- a/nestkernel/layer_impl.h +++ b/nestkernel/layer_impl.h @@ -26,7 +26,6 @@ #include "layer.h" // Includes from nestkernel: -#include "booldatum.h" #include "nest_datums.h" #include "node_collection.h" diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp index 36258a8fe9..e40a863dd4 100644 --- a/nestkernel/logging_manager.cpp +++ b/nestkernel/logging_manager.cpp @@ -29,9 +29,6 @@ // Includes from libnestutil: #include "logging_event.h" -// Includes from sli: -#include "dict.h" -#include "dictutils.h" nest::LoggingManager::LoggingManager() : client_callbacks_() diff --git a/nestkernel/logging_manager.h b/nestkernel/logging_manager.h index e4a3bbd983..2149fc79b0 100644 --- a/nestkernel/logging_manager.h +++ b/nestkernel/logging_manager.h @@ -32,8 +32,6 @@ #include "logging.h" #include "manager_interface.h" -// Includes from sli: -#include "dictdatum.h" // Inclused from nestkernel: #include "nest_names.h" diff --git a/nestkernel/manager_interface.h b/nestkernel/manager_interface.h index 7ec7747243..a01d43439d 100644 --- a/nestkernel/manager_interface.h +++ b/nestkernel/manager_interface.h @@ -26,8 +26,7 @@ // Includes from nestkernel: #include "nest_types.h" -// Includes from sli: -#include "dictdatum.h" +// Includes from libnestutil: #include "dictionary.h" namespace nest diff --git a/nestkernel/mask.h b/nestkernel/mask.h index eba6426f63..bb71d3b3ab 100644 --- a/nestkernel/mask.h +++ b/nestkernel/mask.h @@ -32,9 +32,6 @@ #include "nest_types.h" #include "nestmodule.h" -// Includes from sli: -#include "dictdatum.h" -#include "dictutils.h" // Includes from spatial: #include "position.h" diff --git a/nestkernel/model.cpp b/nestkernel/model.cpp index 878eb0810a..e9a9edec98 100644 --- a/nestkernel/model.cpp +++ b/nestkernel/model.cpp @@ -32,8 +32,6 @@ #include "exceptions.h" #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" namespace nest { @@ -62,7 +60,7 @@ Model::set_threads_( thread t ) } } - std::vector< sli::pool > tmp( t ); + std::vector< pool > tmp( t ); memory_.swap( tmp ); for ( size_t i = 0; i < memory_.size(); ++i ) @@ -81,7 +79,7 @@ Model::reserve_additional( thread t, size_t s ) void Model::clear() { - std::vector< sli::pool > mem; + std::vector< pool > mem; memory_.swap( mem ); set_threads_( 1 ); } diff --git a/nestkernel/model.h b/nestkernel/model.h index 5845ca32cd..85e03686af 100644 --- a/nestkernel/model.h +++ b/nestkernel/model.h @@ -34,8 +34,6 @@ // Includes from nestkernel: #include "node.h" -// Includes from sli: -#include "dictutils.h" namespace nest { @@ -89,8 +87,6 @@ class Model */ Node* allocate( thread t ); - void free( thread t, Node* ); - /** * Deletes all nodes which belong to this model. */ @@ -225,7 +221,7 @@ class Model /** * Initialize the pool allocator with the Node specific values. */ - virtual void init_memory_( sli::pool& ) = 0; + virtual void init_memory_( pool& ) = 0; /** * Allocate a new object at the specified memory position. @@ -250,7 +246,7 @@ class Model /** * Memory for all nodes sorted by threads. */ - std::vector< sli::pool > memory_; + std::vector< pool > memory_; }; @@ -261,13 +257,6 @@ Model::allocate( thread t ) return allocate_( memory_[ t ].alloc() ); } -inline void -Model::free( thread t, Node* n ) -{ - assert( ( size_t ) t < memory_.size() ); - memory_[ t ].free( n ); -} - inline std::string Model::get_name() const { diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index 411f44862b..539efdbf70 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -180,29 +180,29 @@ ModelManager::get_status( dictionary& dict ) } index -ModelManager::copy_model( Name old_name, Name new_name, dictionary params ) +ModelManager::copy_model( std::string old_name, std::string new_name, dictionary params ) { - if ( modeldict_.known( new_name.toString() ) or synapsedict_.known( new_name.toString() ) ) + if ( modeldict_.known( new_name ) or synapsedict_.known( new_name ) ) { - throw NewModelNameExists( new_name.toString() ); + throw NewModelNameExists( new_name ); } index new_id; - if ( modeldict_.known( old_name.toString() ) ) + if ( modeldict_.known( old_name ) ) { - index old_id = modeldict_.get< index >( old_name.toString() ); + index old_id = modeldict_.get< index >( old_name ); new_id = copy_node_model_( old_id, new_name ); set_node_defaults_( new_id, params ); } - else if ( synapsedict_.known( old_name.toString() ) ) + else if ( synapsedict_.known( old_name ) ) { - index old_id = synapsedict_.get< synindex >( old_name.toString() ); + index old_id = synapsedict_.get< synindex >( old_name ); new_id = copy_synapse_model_( old_id, new_name ); set_synapse_defaults_( new_id, params ); } else { - throw UnknownModelName( old_name.toString() ); + throw UnknownModelName( old_name ); } return new_id; @@ -236,16 +236,16 @@ ModelManager::register_node_model_( Model* model, bool private_model ) } index -ModelManager::copy_node_model_( index old_id, Name new_name ) +ModelManager::copy_node_model_( index old_id, std::string new_name ) { Model* old_model = get_model( old_id ); old_model->deprecation_warning( "CopyModel" ); - Model* new_model = old_model->clone( new_name.toString() ); + Model* new_model = old_model->clone( new_name ); models_.push_back( new_model ); index new_id = models_.size() - 1; - modeldict_[ new_name.toString() ] = new_id; + modeldict_[ new_name ] = new_id; #pragma omp parallel { @@ -258,7 +258,7 @@ ModelManager::copy_node_model_( index old_id, Name new_name ) } index -ModelManager::copy_synapse_model_( index old_id, Name new_name ) +ModelManager::copy_synapse_model_( index old_id, std::string new_name ) { size_t new_id = prototypes_[ 0 ].size(); @@ -283,11 +283,11 @@ ModelManager::copy_synapse_model_( index old_id, Name new_name ) for ( thread t = 0; t < static_cast< thread >( kernel().vp_manager.get_num_threads() ); ++t ) { - prototypes_[ t ].push_back( get_synapse_prototype( old_id ).clone( new_name.toString() ) ); + prototypes_[ t ].push_back( get_synapse_prototype( old_id ).clone( new_name ) ); prototypes_[ t ][ new_id ]->set_syn_id( new_id ); } - synapsedict_[ new_name.toString() ] = static_cast< synindex >( new_id ); + synapsedict_[ new_name ] = static_cast< synindex >( new_id ); kernel().connection_manager.resize_connections(); return new_id; @@ -295,22 +295,22 @@ ModelManager::copy_synapse_model_( index old_id, Name new_name ) void -ModelManager::set_model_defaults( Name name, dictionary params ) +ModelManager::set_model_defaults( std::string name, dictionary params ) { index id; - if ( modeldict_.known( name.toString() ) ) + if ( modeldict_.known( name ) ) { - id = modeldict_.get< index >( name.toString() ); + id = modeldict_.get< index >( name ); set_node_defaults_( id, params ); } - else if ( synapsedict_.known( name.toString() ) ) + else if ( synapsedict_.known( name ) ) { - id = synapsedict_.get< synindex >( name.toString() ); + id = synapsedict_.get< synindex >( name ); set_synapse_defaults_( id, params ); } else { - throw UnknownModelName( name.toString() ); + throw UnknownModelName( name ); } model_defaults_modified_ = true; @@ -368,9 +368,9 @@ ModelManager::set_synapse_defaults_( index model_id, const dictionary& params ) // TODO: replace int with index and return value -1 with invalid_index, also // change all pertaining code int -ModelManager::get_model_id( const Name name ) const +ModelManager::get_model_id( const std::string name ) const { - const Name model_name( name ); + const std::string model_name( name ); for ( int i = 0; i < ( int ) models_.size(); ++i ) { assert( models_[ i ] != NULL ); diff --git a/nestkernel/model_manager.h b/nestkernel/model_manager.h index 4b967c8d5b..706ec9510d 100644 --- a/nestkernel/model_manager.h +++ b/nestkernel/model_manager.h @@ -38,8 +38,6 @@ #include "nest_types.h" #include "node.h" -// Includes from sli: -#include "dictutils.h" namespace nest { @@ -157,8 +155,9 @@ class ModelManager : public ManagerInterface * register_prototype_connection */ template < class ModelT > - index - register_node_model( const Name& name, bool private_model = false, std::string deprecation_info = std::string() ); + index register_node_model( const std::string& name, + bool private_model = false, + std::string deprecation_info = std::string() ); /** * Copy an existing model and register it as a new model. @@ -169,7 +168,7 @@ class ModelManager : public ManagerInterface * @return model ID of new Model object. * @see copy_node_model_, copy_synapse_model_ */ - index copy_model( Name old_name, Name new_name, dictionary params ); + index copy_model( std::string old_name, std::string new_name, dictionary params ); /** * Set the default parameters of a model. @@ -177,7 +176,7 @@ class ModelManager : public ManagerInterface * @param params default parameters to be set. * @see set_node_defaults_, set_synapse_defaults_ */ - void set_model_defaults( Name name, dictionary params ); + void set_model_defaults( std::string name, dictionary params ); /** * Register a synape model with a custom Connector model and without any @@ -204,7 +203,7 @@ class ModelManager : public ManagerInterface /** * @return The model id of a given model name */ - int get_model_id( const Name ) const; + int get_model_id( const std::string ) const; /** * @return The Model of a given model ID @@ -275,7 +274,7 @@ class ModelManager : public ManagerInterface /** * Print out the memory information for each node model. - * @see sli::pool + * @see nest::pool */ void memory_info() const; @@ -304,7 +303,7 @@ class ModelManager : public ManagerInterface * @return model ID of new Model object. * @see copy_model(), copy_synapse_model_() */ - index copy_node_model_( index old_id, Name new_name ); + index copy_node_model_( index old_id, std::string new_name ); /** * Copy an existing synapse model and register it as a new model. @@ -313,7 +312,7 @@ class ModelManager : public ManagerInterface * @return model ID of new Model object. * @see copy_model(), copy_node_model_() */ - index copy_synapse_model_( index old_id, Name new_name ); + index copy_synapse_model_( index old_id, std::string new_name ); /** * Set the default parameters of a model. diff --git a/nestkernel/model_manager_impl.h b/nestkernel/model_manager_impl.h index bb81d01897..9d892a78bd 100644 --- a/nestkernel/model_manager_impl.h +++ b/nestkernel/model_manager_impl.h @@ -40,9 +40,9 @@ namespace nest template < class ModelT > index -ModelManager::register_node_model( const Name& name, bool private_model, std::string deprecation_info ) +ModelManager::register_node_model( const std::string& name, bool private_model, std::string deprecation_info ) { - if ( not private_model and modeldict_.known( name.toString() ) ) + if ( not private_model and modeldict_.known( name ) ) { std::string msg = String::compose( "A model called '%1' already exists.\n" @@ -51,7 +51,7 @@ ModelManager::register_node_model( const Name& name, bool private_model, std::st throw NamingConflict( msg ); } - Model* model = new GenericModel< ModelT >( name.toString(), deprecation_info ); + Model* model = new GenericModel< ModelT >( name, deprecation_info ); return register_node_model_( model, private_model ); } diff --git a/nestkernel/mpi_manager.cpp b/nestkernel/mpi_manager.cpp index a794d77373..9764149e7f 100644 --- a/nestkernel/mpi_manager.cpp +++ b/nestkernel/mpi_manager.cpp @@ -36,8 +36,6 @@ #include "mpi_manager_impl.h" #include "nest_types.h" -// Includes from sli: -#include "dictutils.h" #ifdef HAVE_MPI @@ -295,7 +293,7 @@ nest::MPIManager::get_processor_name() } void -nest::MPIManager::communicate( std::vector< long >& local_nodes, std::vector< long >& global_nodes ) +nest::MPIManager::communicate( std::vector< size_t >& local_nodes, std::vector< size_t >& global_nodes ) { size_t np = get_num_processes(); // Get size of buffers @@ -316,11 +314,11 @@ nest::MPIManager::communicate( std::vector< long >& local_nodes, std::vector< lo MPI_Allgatherv( &( *local_nodes.begin() ), local_nodes.size(), - MPI_Type< long >::type, + MPI_Type< size_t >::type, &global_nodes[ 0 ], &num_nodes_per_rank[ 0 ], &displacements[ 0 ], - MPI_Type< long >::type, + MPI_Type< size_t >::type, comm ); } diff --git a/nestkernel/mpi_manager.h b/nestkernel/mpi_manager.h index 76d4c1ca4f..6d05265379 100644 --- a/nestkernel/mpi_manager.h +++ b/nestkernel/mpi_manager.h @@ -48,8 +48,6 @@ #include "spike_data.h" #include "target_data.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { @@ -128,7 +126,7 @@ class MPIManager : public ManagerInterface * gather all send_buffer vectors on other mpi process to recv_buffer * vector */ - void communicate( std::vector< long >& send_buffer, std::vector< long >& recv_buffer ); + void communicate( std::vector< size_t >& send_buffer, std::vector< size_t >& recv_buffer ); void communicate( std::vector< unsigned int >& send_buffer, std::vector< unsigned int >& recv_buffer, diff --git a/nestkernel/music_manager.cpp b/nestkernel/music_manager.cpp index d8713d8080..d8d6d95a5d 100644 --- a/nestkernel/music_manager.cpp +++ b/nestkernel/music_manager.cpp @@ -39,8 +39,6 @@ // Includes from nestkernel: #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" namespace nest { diff --git a/nestkernel/music_manager.h b/nestkernel/music_manager.h index fda1720226..c9b6f15008 100644 --- a/nestkernel/music_manager.h +++ b/nestkernel/music_manager.h @@ -34,9 +34,6 @@ #include "manager_interface.h" #include "nest_types.h" -// Includes from sli: -#include "dict.h" - #ifdef HAVE_MUSIC #include "music_event_handler.h" #include "music_rate_in_handler.h" diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index f33b562838..f20e37ee2b 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -307,11 +307,11 @@ set_connection_status( const ConnectionDatum& conn, const dictionary& dict ) dictionary get_connection_status( const ConnectionDatum& conn ) { - return kernel().connection_manager.get_synapse_status( conn.get_source_node_id(), - conn.get_target_node_id(), - conn.get_target_thread(), - conn.get_synapse_model_id(), - conn.get_port() ); + return kernel().connection_manager.get_synapse_status( conn->get_source_node_id(), + conn->get_target_node_id(), + conn->get_target_thread(), + conn->get_synapse_model_id(), + conn->get_port() ); } NodeCollectionPTR @@ -495,19 +495,19 @@ cleanup() } void -copy_model( const Name& oldmodname, const Name& newmodname, const dictionary& dict ) +copy_model( const std::string& oldmodname, const std::string& newmodname, const dictionary& dict ) { kernel().model_manager.copy_model( oldmodname, newmodname, dict ); } void -set_model_defaults( const Name& modelname, const dictionary& dict ) +set_model_defaults( const std::string& modelname, const dictionary& dict ) { kernel().model_manager.set_model_defaults( modelname, dict ); } dictionary -get_model_defaults( const Name& modelname ) +get_model_defaults( const std::string& modelname ) { // const Token nodemodel = kernel().model_manager.get_modeldict()->lookup( modelname ); // const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( modelname ); diff --git a/nestkernel/nest.h b/nestkernel/nest.h index e4464c350e..18b4a6c723 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -35,10 +35,6 @@ #include "nest_time.h" #include "nest_types.h" -// Includes from sli: -#include "arraydatum.h" -#include "dictdatum.h" - namespace nest { void init_nest( int* argc, char** argv[] ); @@ -164,10 +160,10 @@ void prepare(); */ void cleanup(); -void copy_model( const Name& oldmodname, const Name& newmodname, const dictionary& dict ); +void copy_model( const std::string& oldmodname, const std::string& newmodname, const dictionary& dict ); -void set_model_defaults( const Name& model_name, const dictionary& ); -dictionary get_model_defaults( const Name& model_name ); +void set_model_defaults( const std::string& model_name, const dictionary& ); +dictionary get_model_defaults( const std::string& model_name ); // TODO-PYNEST-NG: static functions? std::shared_ptr< Parameter > create_parameter( const boost::any& ); @@ -177,9 +173,6 @@ std::shared_ptr< Parameter > create_parameter( const int ); std::shared_ptr< Parameter > create_parameter( const dictionary& param_dict ); std::shared_ptr< Parameter > create_parameter( const std::string& name, const dictionary& d ); -template < class T > -bool register_parameter( const Name& name ); - using ParameterFactory = GenericFactory< Parameter >; ParameterFactory& parameter_factory_(); @@ -195,7 +188,7 @@ NodeCollectionPTR node_collection_array_index( NodeCollectionPTR node_collection template < class T > inline bool -register_parameter( const Name& name ) +register_parameter( const std::string& name ) { return parameter_factory_().register_subtype< T >( name ); } diff --git a/nestkernel/nest_datums.cpp b/nestkernel/nest_datums.cpp index f7e7fc6202..06748fb1cd 100644 --- a/nestkernel/nest_datums.cpp +++ b/nestkernel/nest_datums.cpp @@ -23,8 +23,8 @@ #include "nest_datums.h" // instantiate memory management pool -template <> -sli::pool ConnectionDatum::memory( sizeof( nest::ConnectionID ), 10000, 1 ); +// template <> +// nest::pool ConnectionDatum::memory( sizeof( nest::ConnectionID ), 10000, 1 ); // simple type printing template <> @@ -39,7 +39,7 @@ template <> void ConnectionDatum::pprint( std::ostream& out ) const { - print_me( out ); + pprint( out ); } template <> diff --git a/nestkernel/nest_datums.h b/nestkernel/nest_datums.h index 284d5afa5e..a97dd64d5e 100644 --- a/nestkernel/nest_datums.h +++ b/nestkernel/nest_datums.h @@ -40,26 +40,21 @@ #include "position.h" -// Includes from sli: -#include "aggregatedatum.h" -#include "sharedptrdatum.h" -#include "slitype.h" - #ifdef HAVE_LIBNEUROSIM #include typedef sharedPtrDatum< ConnectionGenerator, &nest::NestModule::ConnectionGeneratorType > ConnectionGeneratorDatum; #endif -typedef AggregateDatum< nest::ConnectionID, &nest::NestModule::ConnectionType > ConnectionDatum; +typedef sharedPtrDatum< nest::ConnectionID, &nest::NestModule::ConnectionType > ConnectionDatum; typedef sharedPtrDatum< nest::NodeCollection, &nest::NestModule::NodeCollectionType > NodeCollectionDatum; typedef sharedPtrDatum< nest::nc_const_iterator, &nest::NestModule::NodeCollectionIteratorType > NodeCollectionIteratorDatum; typedef sharedPtrDatum< nest::Parameter, &nest::NestModule::ParameterType > ParameterDatum; -#ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS -template <> -sli::pool ConnectionDatum::memory; -#endif +// #ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS +// template <> +// nest::pool ConnectionDatum::memory; +// #endif template <> void ConnectionDatum::print( std::ostream& ) const; diff --git a/nestkernel/nest_time.cpp b/nestkernel/nest_time.cpp index 98902d6a8d..2e9979aeef 100644 --- a/nestkernel/nest_time.cpp +++ b/nestkernel/nest_time.cpp @@ -31,11 +31,6 @@ // Includes from libnestutil: #include "numerics.h" -// Includes from sli: -#include "doubledatum.h" -#include "integerdatum.h" -#include "token.h" - using namespace nest; /* Obtain time resolution information from configuration @@ -139,24 +134,24 @@ Time::reset_resolution() LIM_MIN = -max; } -double -Time::ms::fromtoken( const Token& t ) -{ - IntegerDatum* idat = dynamic_cast< IntegerDatum* >( t.datum() ); - if ( idat ) - { - return static_cast< double >( idat->get() ); - } - - DoubleDatum* ddat = dynamic_cast< DoubleDatum* >( t.datum() ); - if ( ddat ) - { - return ddat->get(); - } - - throw TypeMismatch( IntegerDatum().gettypename().toString() + " or " + DoubleDatum().gettypename().toString(), - t.datum()->gettypename().toString() ); -} +// double +// Time::ms::fromtoken( const Token& t ) +// { +// IntegerDatum* idat = dynamic_cast< IntegerDatum* >( t.datum() ); +// if ( idat ) +// { +// return static_cast< double >( idat->get() ); +// } + +// DoubleDatum* ddat = dynamic_cast< DoubleDatum* >( t.datum() ); +// if ( ddat ) +// { +// return ddat->get(); +// } + +// throw TypeMismatch( IntegerDatum().gettypename().toString() + " or " + DoubleDatum().gettypename().toString(), +// t.datum()->gettypename().toString() ); +// } tic_t Time::fromstamp( Time::ms_stamp t ) diff --git a/nestkernel/nestmodule.cpp b/nestkernel/nestmodule.cpp index 387df743fa..e6f21c6001 100644 --- a/nestkernel/nestmodule.cpp +++ b/nestkernel/nestmodule.cpp @@ -279,30 +279,30 @@ NestModule::create_mask( const dictionary& params ) // } } -static AbstractMask* -create_doughnut( const DictionaryDatum& d ) -{ - // The doughnut (actually an annulus) is created using a DifferenceMask - // Position< 2 > center( 0, 0 ); - // if ( d.known( names::anchor ) ) - // { - // center = d.get< std::vector< double > >( names::anchor ); - // } - - // const double outer = d.get< double >( names::outer_radius ); - // const double inner = d.get< double >( names::inner_radius ); - // if ( inner >= outer ) - // { - // throw BadProperty( - // "nest::create_doughnut: " - // "inner_radius < outer_radius required." ); - // } - - // BallMask< 2 > outer_circle( center, outer ); - // BallMask< 2 > inner_circle( center, inner ); - - // return new DifferenceMask< 2 >( outer_circle, inner_circle ); -} +// static AbstractMask* +// create_doughnut( const DictionaryDatum& d ) +// { +// // The doughnut (actually an annulus) is created using a DifferenceMask +// // Position< 2 > center( 0, 0 ); +// // if ( d.known( names::anchor ) ) +// // { +// // center = d.get< std::vector< double > >( names::anchor ); +// // } + +// // const double outer = d.get< double >( names::outer_radius ); +// // const double inner = d.get< double >( names::inner_radius ); +// // if ( inner >= outer ) +// // { +// // throw BadProperty( +// // "nest::create_doughnut: " +// // "inner_radius < outer_radius required." ); +// // } + +// // BallMask< 2 > outer_circle( center, outer ); +// // BallMask< 2 > inner_circle( center, inner ); + +// // return new DifferenceMask< 2 >( outer_circle, inner_circle ); +// } /** @BeginDocumentation @@ -333,42 +333,42 @@ create_doughnut( const DictionaryDatum& d ) void NestModule::SetStatus_idFunction::execute( SLIInterpreter* i ) const { - i->assert_stack_load( 2 ); + // i->assert_stack_load( 2 ); - DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); - index node_id = getValue< long >( i->OStack.pick( 1 ) ); + // DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); + // index node_id = getValue< long >( i->OStack.pick( 1 ) ); - // set_node_status( node_id, dict ); + // // set_node_status( node_id, dict ); - i->OStack.pop( 2 ); - i->EStack.pop(); + // i->OStack.pop( 2 ); + // i->EStack.pop(); } void NestModule::SetStatus_CDFunction::execute( SLIInterpreter* i ) const { - i->assert_stack_load( 2 ); + // i->assert_stack_load( 2 ); - DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); - ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.pick( 1 ) ); + // DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); + // ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.pick( 1 ) ); - // set_connection_status( conn, dict ); + // // set_connection_status( conn, dict ); - i->OStack.pop( 2 ); - i->EStack.pop(); + // i->OStack.pop( 2 ); + // i->EStack.pop(); } void NestModule::SetKernelStatus_DFunction::execute( SLIInterpreter* i ) const { - i->assert_stack_load( 1 ); + // i->assert_stack_load( 1 ); - DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); + // DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() ); - // set_kernel_status( dict ); + // // set_kernel_status( dict ); - i->OStack.pop(); - i->EStack.pop(); + // i->OStack.pop(); + // i->EStack.pop(); } void @@ -376,11 +376,11 @@ NestModule::Cva_CFunction::execute( SLIInterpreter* i ) const { ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.top() ); ArrayDatum ad; - ad.push_back( conn.get_source_node_id() ); - ad.push_back( conn.get_target_node_id() ); - ad.push_back( conn.get_target_thread() ); - ad.push_back( conn.get_synapse_model_id() ); - ad.push_back( conn.get_port() ); + // ad.push_back( conn.get_source_node_id() ); + // ad.push_back( conn.get_target_node_id() ); + // ad.push_back( conn.get_target_thread() ); + // ad.push_back( conn.get_synapse_model_id() ); + // ad.push_back( conn.get_port() ); Token result( ad ); i->OStack.top().swap( result ); i->EStack.pop(); @@ -581,7 +581,7 @@ NestModule::GetMetadata_gFunction::execute( SLIInterpreter* i ) const } NodeCollectionMetadataPTR meta = nc->get_metadata(); - DictionaryDatum dict = DictionaryDatum( new Dictionary ); + // DictionaryDatum dict = DictionaryDatum( new Dictionary ); // return empty dict if NC does not have metadata if ( meta.get() ) @@ -592,7 +592,7 @@ NestModule::GetMetadata_gFunction::execute( SLIInterpreter* i ) const } i->OStack.pop(); - i->OStack.push( dict ); + // i->OStack.push( dict ); i->EStack.pop(); } @@ -618,7 +618,7 @@ NestModule::SetDefaults_l_DFunction::execute( SLIInterpreter* i ) const i->assert_stack_load( 2 ); const Name name = getValue< Name >( i->OStack.pick( 1 ) ); - DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // kernel().model_manager.set_model_defaults( name, params ); @@ -652,7 +652,7 @@ NestModule::GetConnections_DFunction::execute( SLIInterpreter* i ) const { i->assert_stack_load( 1 ); - DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // ArrayDatum array = get_connections( dict ); @@ -787,7 +787,7 @@ NestModule::CopyModel_l_l_DFunction::execute( SLIInterpreter* i ) const // fetch existing model name from stack const Name old_name = getValue< Name >( i->OStack.pick( 2 ) ); const Name new_name = getValue< Name >( i->OStack.pick( 1 ) ); - DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // kernel().model_manager.copy_model( old_name, new_name, params ); @@ -892,8 +892,8 @@ NestModule::Disconnect_g_g_D_DFunction::execute( SLIInterpreter* i ) const NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) ); NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) ); - DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); - DictionaryDatum synapse_params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); + // DictionaryDatum synapse_params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // dictionary access checking is handled by disconnect // kernel().sp_manager.disconnect( sources, targets, connectivity, synapse_params ); @@ -1332,11 +1332,11 @@ NestModule::Cvnodecollection_iaFunction::execute( SLIInterpreter* i ) const TokenArray node_ids = getValue< TokenArray >( i->OStack.pick( 0 ) ); - NodeCollectionDatum nodecollection( NodeCollection::create( node_ids ) ); + // NodeCollectionDatum nodecollection( NodeCollection::create( node_ids ) ); - i->OStack.pop(); - i->OStack.push( nodecollection ); - i->EStack.pop(); + // i->OStack.pop(); + // i->OStack.push( nodecollection ); + // i->EStack.pop(); } void @@ -1345,11 +1345,11 @@ NestModule::Cvnodecollection_ivFunction::execute( SLIInterpreter* i ) const i->assert_stack_load( 1 ); IntVectorDatum node_ids = getValue< IntVectorDatum >( i->OStack.pick( 0 ) ); - NodeCollectionDatum nodecollection( NodeCollection::create( node_ids ) ); + // NodeCollectionDatum nodecollection( NodeCollection::create( node_ids ) ); - i->OStack.pop(); - i->OStack.push( nodecollection ); - i->EStack.pop(); + // i->OStack.pop(); + // i->OStack.push( nodecollection ); + // i->EStack.pop(); } void @@ -1357,10 +1357,10 @@ NestModule::Cva_gFunction::execute( SLIInterpreter* i ) const { i->assert_stack_load( 1 ); NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) ); - ArrayDatum node_ids = nodecollection->to_array(); + // ArrayDatum node_ids = nodecollection->to_array(); - i->OStack.pop(); - i->OStack.push( node_ids ); + // i->OStack.pop(); + // i->OStack.push( node_ids ); i->EStack.pop(); } @@ -1709,7 +1709,7 @@ void NestModule::CreateParameter_DFunction::execute( SLIInterpreter* i ) const { i->assert_stack_load( 1 ); - const DictionaryDatum param_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // const DictionaryDatum param_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // ParameterDatum datum = nest::create_parameter( param_dict ); @@ -1843,7 +1843,7 @@ NestModule::Compare_P_P_DFunction::execute( SLIInterpreter* i ) const ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 2 ) ); ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 1 ) ); - DictionaryDatum param3 = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // DictionaryDatum param3 = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // ParameterDatum newparam = compare_parameter( param1, param2, param3 ); @@ -1985,7 +1985,7 @@ NestModule::Apply_P_DFunction::execute( SLIInterpreter* i ) const { i->assert_stack_load( 2 ); - auto positions = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // auto positions = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); auto param = getValue< ParameterDatum >( i->OStack.pick( 1 ) ); // auto result = apply( param, positions ); @@ -2140,8 +2140,8 @@ NestModule::CreateLayer_D_DFunction::execute( SLIInterpreter* i ) const { i->assert_stack_load( 2 ); - DictionaryDatum layer_dict = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); - DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // DictionaryDatum layer_dict = getValue< DictionaryDatum >( i->OStack.pick( 1 ) ); + // DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // NodeCollectionDatum layer = create_layer( layer_dict ); @@ -2190,18 +2190,18 @@ NestModule::GetPosition_gFunction::execute( SLIInterpreter* i ) const const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) ); - ArrayDatum result = get_position( layer ); + // ArrayDatum result = get_position( layer ); - i->OStack.pop( 1 ); - if ( layer->size() == 1 ) - { - i->OStack.push( result[ 0 ] ); - } - else - { - i->OStack.push( result ); - } - i->EStack.pop(); + // i->OStack.pop( 1 ); + // if ( layer->size() == 1 ) + // { + // i->OStack.push( result[ 0 ] ); + // } + // else + // { + // i->OStack.push( result ); + // } + // i->EStack.pop(); } /** @BeginDocumentation @@ -2260,10 +2260,10 @@ NestModule::Displacement_g_gFunction::execute( SLIInterpreter* i ) const throw BadProperty( "NodeCollections must have equal length or one must have size 1." ); } - ArrayDatum result = displacement( layer_to, layer_from ); + // ArrayDatum result = displacement( layer_to, layer_from ); - i->OStack.pop( 2 ); - i->OStack.push( result ); + // i->OStack.pop( 2 ); + // i->OStack.push( result ); i->EStack.pop(); } @@ -2275,10 +2275,10 @@ NestModule::Displacement_a_gFunction::execute( SLIInterpreter* i ) const const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) ); const ArrayDatum point = getValue< ArrayDatum >( i->OStack.pick( 1 ) ); - ArrayDatum result = displacement( layer, point ); + // ArrayDatum result = displacement( layer, point ); - i->OStack.pop( 2 ); - i->OStack.push( result ); + // i->OStack.pop( 2 ); + // i->OStack.push( result ); i->EStack.pop(); } @@ -2353,10 +2353,10 @@ NestModule::Distance_a_gFunction::execute( SLIInterpreter* i ) const const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) ); const ArrayDatum point = getValue< ArrayDatum >( i->OStack.pick( 1 ) ); - Token result = distance( layer, point ); + // Token result = distance( layer, point ); - i->OStack.pop( 2 ); - i->OStack.push( result ); + // i->OStack.pop( 2 ); + // i->OStack.push( result ); i->EStack.pop(); } @@ -2367,10 +2367,10 @@ NestModule::Distance_aFunction::execute( SLIInterpreter* i ) const const ArrayDatum conns = getValue< ArrayDatum >( i->OStack.pick( 0 ) ); - Token result = distance( conns ); + // Token result = distance( conns ); - i->OStack.pop( 1 ); - i->OStack.push( result ); + // i->OStack.pop( 1 ); + // i->OStack.push( result ); i->EStack.pop(); } @@ -2397,7 +2397,7 @@ NestModule::CreateMask_DFunction::execute( SLIInterpreter* i ) const { i->assert_stack_load( 1 ); - const DictionaryDatum mask_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // const DictionaryDatum mask_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // MaskDatum datum = nest::create_mask( mask_dict ); @@ -2663,7 +2663,7 @@ NestModule::ConnectLayers_g_g_DFunction::execute( SLIInterpreter* i ) const const NodeCollectionDatum source = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) ); const NodeCollectionDatum target = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) ); - const DictionaryDatum connection_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); + // const DictionaryDatum connection_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) ); // connect_layers( source, target, connection_dict ); @@ -2743,9 +2743,9 @@ NestModule::DumpLayerNodes_os_gFunction::execute( SLIInterpreter* i ) const i->assert_stack_load( 2 ); const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) ); - OstreamDatum out = getValue< OstreamDatum >( i->OStack.pick( 1 ) ); + // OstreamDatum out = getValue< OstreamDatum >( i->OStack.pick( 1 ) ); - dump_layer_nodes( layer, out ); + // dump_layer_nodes( layer, out ); i->OStack.pop( 1 ); // leave ostream on stack i->EStack.pop(); @@ -2794,12 +2794,12 @@ NestModule::DumpLayerConnections_os_g_g_lFunction::execute( SLIInterpreter* i ) { i->assert_stack_load( 4 ); - OstreamDatum out_file = getValue< OstreamDatum >( i->OStack.pick( 3 ) ); + // OstreamDatum out_file = getValue< OstreamDatum >( i->OStack.pick( 3 ) ); const NodeCollectionDatum source_layer = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) ); const NodeCollectionDatum target_layer = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) ); const Token syn_model = i->OStack.pick( 0 ); - dump_layer_connections( syn_model, source_layer, target_layer, out_file ); + // dump_layer_connections( syn_model, source_layer, target_layer, out_file ); i->OStack.pop( 3 ); // leave ostream on stack i->EStack.pop(); diff --git a/nestkernel/nestmodule.h b/nestkernel/nestmodule.h index ebe6c439cb..443a5f6cb6 100644 --- a/nestkernel/nestmodule.h +++ b/nestkernel/nestmodule.h @@ -107,7 +107,7 @@ class NestModule : public SLIModule * @returns true if the new type was successfully registered, or false * if a mask type with the same name already exists. */ - static bool register_mask( const Name& name, MaskCreatorFunction creator ); + static bool register_mask( const std::string& name, MaskCreatorFunction creator ); /** * Return a Mask object. @@ -817,7 +817,7 @@ NestModule::register_mask() } inline bool -NestModule::register_mask( const Name& name, MaskCreatorFunction creator ) +NestModule::register_mask( const std::string& name, MaskCreatorFunction creator ) { return mask_factory_().register_subtype( name, creator ); } diff --git a/nestkernel/node.cpp b/nestkernel/node.cpp index 4bad11e1bb..fde8cd854a 100644 --- a/nestkernel/node.cpp +++ b/nestkernel/node.cpp @@ -30,11 +30,6 @@ #include "exceptions.h" #include "kernel_manager.h" -// Includes from sli: -#include "arraydatum.h" -#include "dictutils.h" -#include "namedatum.h" - namespace nest { diff --git a/nestkernel/node.h b/nestkernel/node.h index b9b87d8667..a03f1b41de 100644 --- a/nestkernel/node.h +++ b/nestkernel/node.h @@ -41,8 +41,6 @@ #include "deprecation_warning.h" -// Includes from sli: -#include "dictdatum.h" /** @file node.h * Declarations for base class Node @@ -179,14 +177,14 @@ class Node /** * Return the element type of the node. - * The returned Name is a free label describing the class of network + * The returned string is a free label describing the class of network * elements a node belongs to. Currently used values are "neuron", * "recorder", "stimulator", and "other", which are all defined as - * static Name objects in the names namespace. + * static string objects in the names namespace. * This function is overwritten with a corresponding value in the * derived classes */ - virtual Name get_element_type() const; + virtual std::string get_element_type() const; /** * Return global Network ID. @@ -588,7 +586,7 @@ class Node * Return 0.0 if not overridden * @ingroup SP_functions */ - virtual double get_synaptic_elements( Name ) const + virtual double get_synaptic_elements( std::string ) const { return 0.0; } @@ -598,7 +596,7 @@ class Node * Return 0 if not overridden * @ingroup SP_functions */ - virtual int get_synaptic_elements_vacant( Name ) const + virtual int get_synaptic_elements_vacant( std::string ) const { return 0; } @@ -608,7 +606,7 @@ class Node * Return 0 if not overridden * @ingroup SP_functions */ - virtual int get_synaptic_elements_connected( Name ) const + virtual int get_synaptic_elements_connected( std::string ) const { return 0; } @@ -618,10 +616,10 @@ class Node * Return an empty map if not overridden * @ingroup SP_functions */ - virtual std::map< Name, double > + virtual std::map< std::string, double > get_synaptic_elements() const { - return std::map< Name, double >(); + return std::map< std::string, double >(); } /** @@ -644,11 +642,11 @@ class Node * Is used to update the number of connected * synaptic elements (SynapticElement::z_connected_) when a synapse * is formed or deleted. - * @param type Name, name of the synaptic element to connect + * @param type std::string, name of the synaptic element to connect * @param n int number of new connections of the given type * @ingroup SP_functions */ - virtual void connect_synaptic_element( Name, int ) {}; + virtual void connect_synaptic_element( std::string, int ) {}; /** * return the Kminus value at t (in ms). @@ -959,7 +957,7 @@ Node::is_proxy() const return false; } -inline Name +inline std::string Node::get_element_type() const { return names::neuron; diff --git a/nestkernel/node_collection.cpp b/nestkernel/node_collection.cpp index c6df568b3a..a3170721d1 100644 --- a/nestkernel/node_collection.cpp +++ b/nestkernel/node_collection.cpp @@ -110,49 +110,49 @@ NodeCollection::NodeCollection() { } -NodeCollectionPTR -NodeCollection::create( const IntVectorDatum& node_idsdatum ) -{ - if ( node_idsdatum->size() == 0 ) - { - return NodeCollection::create_(); - } - - std::vector< index > node_ids; - node_ids.reserve( node_idsdatum->size() ); - for ( std::vector< long >::const_iterator it = node_idsdatum->begin(); it != node_idsdatum->end(); ++it ) - { - node_ids.push_back( static_cast< index >( getValue< long >( *it ) ) ); - } - - if ( not std::is_sorted( node_ids.begin(), node_ids.end() ) ) - { - throw BadProperty( "Node IDs must be sorted in ascending order" ); - } - return NodeCollection::create_( node_ids ); -} - -NodeCollectionPTR -NodeCollection::create( const TokenArray& node_idsarray ) -{ - if ( node_idsarray.size() == 0 ) - { - return NodeCollection::create_(); - } - - std::vector< index > node_ids; - node_ids.reserve( node_idsarray.size() ); - for ( const auto& node_id_token : node_idsarray ) - { - node_ids.push_back( static_cast< index >( getValue< long >( node_id_token ) ) ); - } - - if ( not std::is_sorted( node_ids.begin(), node_ids.end() ) ) - { - throw BadProperty( "Node IDs must be sorted in ascending order" ); - } - return NodeCollection::create_( node_ids ); -} +// NodeCollectionPTR +// NodeCollection::create( const IntVectorDatum& node_idsdatum ) +// { +// if ( node_idsdatum->size() == 0 ) +// { +// return NodeCollection::create_(); +// } + +// std::vector< index > node_ids; +// node_ids.reserve( node_idsdatum->size() ); +// for ( std::vector< long >::const_iterator it = node_idsdatum->begin(); it != node_idsdatum->end(); ++it ) +// { +// node_ids.push_back( static_cast< index >( getValue< long >( *it ) ) ); +// } + +// if ( not std::is_sorted( node_ids.begin(), node_ids.end() ) ) +// { +// throw BadProperty( "Node IDs must be sorted in ascending order" ); +// } +// return NodeCollection::create_( node_ids ); +// } + +// NodeCollectionPTR +// NodeCollection::create( const TokenArray& node_idsarray ) +// { +// if ( node_idsarray.size() == 0 ) +// { +// return NodeCollection::create_(); +// } + +// std::vector< index > node_ids; +// node_ids.reserve( node_idsarray.size() ); +// for ( const auto& node_id_token : node_idsarray ) +// { +// node_ids.push_back( static_cast< index >( getValue< long >( node_id_token ) ) ); +// } + +// if ( not std::is_sorted( node_ids.begin(), node_ids.end() ) ) +// { +// throw BadProperty( "Node IDs must be sorted in ascending order" ); +// } +// return NodeCollection::create_( node_ids ); +// } NodeCollectionPTR @@ -285,17 +285,17 @@ NodeCollectionPrimitive::NodeCollectionPrimitive() { } -ArrayDatum -NodeCollectionPrimitive::to_array() const -{ - ArrayDatum node_ids; - node_ids.reserve( size() ); - for ( const_iterator it = begin(); it < end(); ++it ) - { - node_ids.push_back( ( *it ).node_id ); - } - return node_ids; -} +// ArrayDatum +// NodeCollectionPrimitive::to_array() const +// { +// ArrayDatum node_ids; +// node_ids.reserve( size() ); +// for ( const_iterator it = begin(); it < end(); ++it ) +// { +// node_ids.push_back( ( *it ).node_id ); +// } +// return node_ids; +// } NodeCollectionPTR NodeCollectionPrimitive::operator+( NodeCollectionPTR rhs ) const @@ -751,17 +751,17 @@ NodeCollectionComposite::MPI_local_begin( NodeCollectionPTR cp ) const return const_iterator( cp, *this, current_part, current_offset, num_processes * step_ ); } -ArrayDatum -NodeCollectionComposite::to_array() const -{ - ArrayDatum node_ids; - node_ids.reserve( size() ); - for ( const_iterator it = begin(); it < end(); ++it ) - { - node_ids.push_back( ( *it ).node_id ); - } - return node_ids; -} +// ArrayDatum +// NodeCollectionComposite::to_array() const +// { +// ArrayDatum node_ids; +// node_ids.reserve( size() ); +// for ( const_iterator it = begin(); it < end(); ++it ) +// { +// node_ids.push_back( ( *it ).node_id ); +// } +// return node_ids; +// } NodeCollectionPTR NodeCollectionComposite::slice( size_t start, size_t stop, size_t step ) const diff --git a/nestkernel/node_collection.h b/nestkernel/node_collection.h index b343fdea88..07ab963c4a 100644 --- a/nestkernel/node_collection.h +++ b/nestkernel/node_collection.h @@ -38,9 +38,6 @@ #include "exceptions.h" #include "nest_types.h" -// Includes from sli: -#include "arraydatum.h" -#include "dictdatum.h" namespace nest { @@ -200,7 +197,7 @@ class NodeCollection * @param node_ids Vector of node IDs from which to create the NodeCollection * @return a NodeCollection pointer to the created NodeCollection */ - static NodeCollectionPTR create( const IntVectorDatum& node_ids ); + // static NodeCollectionPTR create( const IntVectorDatum& node_ids ); /** * Create a NodeCollection from an array of node IDs. Results in a primitive if the @@ -209,7 +206,7 @@ class NodeCollection * @param node_ids Array of node IDs from which to create the NodeCollection * @return a NodeCollection pointer to the created NodeCollection */ - static NodeCollectionPTR create( const TokenArray& node_ids ); + // static NodeCollectionPTR create( const TokenArray& node_ids ); /** * Create a NodeCollection from a single node ID. Results in a primitive. @@ -306,7 +303,7 @@ class NodeCollection * * @return an ArrayDatum containing node IDs */ - virtual ArrayDatum to_array() const = 0; + // virtual ArrayDatum to_array() const = 0; /** * Get the size of the NodeCollection. @@ -446,7 +443,7 @@ class NodeCollectionPrimitive : public NodeCollection const_iterator end( NodeCollectionPTR = NodeCollectionPTR( nullptr ) ) const override; //! Returns an ArrayDatum filled with node IDs from the primitive. - ArrayDatum to_array() const override; + // ArrayDatum to_array() const override; //! Returns total number of node IDs in the primitive. size_t size() const override; @@ -573,7 +570,7 @@ class NodeCollectionComposite : public NodeCollection const_iterator end( NodeCollectionPTR = NodeCollectionPTR( nullptr ) ) const override; //! Returns an ArrayDatum filled with node IDs from the composite. - ArrayDatum to_array() const override; + // ArrayDatum to_array() const override; //! Returns total number of node IDs in the composite. size_t size() const override; diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp index ac52955ef5..d12aa8b49c 100644 --- a/nestkernel/node_manager.cpp +++ b/nestkernel/node_manager.cpp @@ -39,8 +39,6 @@ #include "vp_manager.h" #include "vp_manager_impl.h" -// Includes from sli: -#include "dictutils.h" namespace nest { @@ -309,7 +307,7 @@ NodeManager::add_music_nodes_( Model& model, index min_node_id, index max_node_i NodeCollectionPTR NodeManager::get_nodes( const dictionary& params, const bool local_only ) { - std::vector< long > nodes; + std::vector< size_t > nodes; if ( params.empty() ) { @@ -363,7 +361,7 @@ NodeManager::get_nodes( const dictionary& params, const bool local_only ) if ( not local_only ) { - std::vector< long > globalnodes; + std::vector< size_t > globalnodes; kernel().mpi_manager.communicate( nodes, globalnodes ); for ( size_t i = 0; i < globalnodes.size(); ++i ) @@ -376,14 +374,13 @@ NodeManager::get_nodes( const dictionary& params, const bool local_only ) // get rid of any multiple entries std::sort( nodes.begin(), nodes.end() ); - std::vector< long >::iterator it; + std::vector< size_t >::iterator it; it = std::unique( nodes.begin(), nodes.end() ); nodes.resize( it - nodes.begin() ); } std::sort( nodes.begin(), nodes.end() ); // ensure nodes are sorted prior to creating the NodeCollection - IntVectorDatum nodes_datum( nodes ); - NodeCollectionDatum nodecollection( NodeCollection::create( nodes_datum ) ); + NodeCollectionDatum nodecollection( NodeCollection::create( nodes ) ); return std::move( nodecollection ); } diff --git a/nestkernel/node_manager.h b/nestkernel/node_manager.h index 1221a4a9b6..598031798b 100644 --- a/nestkernel/node_manager.h +++ b/nestkernel/node_manager.h @@ -36,9 +36,6 @@ #include "node_collection.h" #include "sparse_node_array.h" -// Includes from sli: -#include "arraydatum.h" -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/parameter.cpp b/nestkernel/parameter.cpp index 27b4a24a80..7aa96a9bb3 100644 --- a/nestkernel/parameter.cpp +++ b/nestkernel/parameter.cpp @@ -34,10 +34,10 @@ namespace nest { std::vector< double > -Parameter::apply( const NodeCollectionPTR& nc, const TokenArray& token_array ) +Parameter::apply( const NodeCollectionPTR& nc, const std::vector< std::vector< double > >& positions ) { std::vector< double > result; - result.reserve( token_array.size() ); + result.reserve( positions.size() ); RngPtr rng = get_rank_synced_rng(); // Get source layer from the NodeCollection @@ -62,9 +62,8 @@ Parameter::apply( const NodeCollectionPTR& nc, const TokenArray& token_array ) std::vector< double > source_pos = source_layer->get_position_vector( source_lid ); // For each position, calculate the displacement, then calculate the parameter value - for ( auto&& token : token_array ) + for ( auto& target_pos : positions ) { - std::vector< double > target_pos = getValue< std::vector< double > >( token ); if ( target_pos.size() != source_pos.size() ) { throw BadProperty( diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h index 731b35adbb..d5802b8d3a 100644 --- a/nestkernel/parameter.h +++ b/nestkernel/parameter.h @@ -37,7 +37,7 @@ #include "random_generators.h" // Includes from libnestutil: -#include "dictutils.h" + namespace nest { @@ -100,9 +100,9 @@ class Parameter /** * Applies a parameter on a single-node ID NodeCollection and given array of positions. - * @returns array of result values, one per position in the TokenArray. + * @returns array of result values, one per position in the vector. */ - std::vector< double > apply( const NodeCollectionPTR&, const TokenArray& ); + std::vector< double > apply( const NodeCollectionPTR&, const std::vector< std::vector< double > >& ); /** * Check if the Parameter is based on spatial properties. diff --git a/nestkernel/per_thread_bool_indicator.h b/nestkernel/per_thread_bool_indicator.h index 5eca3e007a..75883bcb56 100644 --- a/nestkernel/per_thread_bool_indicator.h +++ b/nestkernel/per_thread_bool_indicator.h @@ -32,8 +32,6 @@ #include "nest_types.h" #include "vp_manager.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/position.h b/nestkernel/position.h index d7bab36502..ac1e4c5de4 100644 --- a/nestkernel/position.h +++ b/nestkernel/position.h @@ -41,9 +41,6 @@ #include "exceptions.h" #include "nest_types.h" -// Includes from sli: -#include "token.h" - namespace nest { @@ -489,13 +486,13 @@ inline const T& Position< D, T >::operator[]( int i ) const return x_[ i ]; } -template < int D, class T > -Token -Position< D, T >::getToken() const -{ - std::vector< T > result = get_vector(); - return Token( result ); -} +// template < int D, class T > +// Token +// Position< D, T >::getToken() const +// { +// std::vector< T > result = get_vector(); +// return Token( result ); +// } template < int D, class T > diff --git a/nestkernel/proxynode.cpp b/nestkernel/proxynode.cpp index 53364d3e9a..278695f4f7 100644 --- a/nestkernel/proxynode.cpp +++ b/nestkernel/proxynode.cpp @@ -26,9 +26,6 @@ #include "connection.h" #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" - namespace nest { diff --git a/nestkernel/pseudo_recording_device.h b/nestkernel/pseudo_recording_device.h index 725bb9fa45..4d17891ed0 100644 --- a/nestkernel/pseudo_recording_device.h +++ b/nestkernel/pseudo_recording_device.h @@ -31,9 +31,6 @@ #include "device.h" #include "nest_types.h" -// Includes from sli: -#include "dictdatum.h" -#include "dictutils.h" namespace nest { diff --git a/nestkernel/random_manager.h b/nestkernel/random_manager.h index 5e50c3ecdb..39fd6f8adc 100644 --- a/nestkernel/random_manager.h +++ b/nestkernel/random_manager.h @@ -34,7 +34,7 @@ #include "manager_interface.h" // Includes from nestkernel: -#include "dictdatum.h" + #include "nest_types.h" #include "random_generators.h" diff --git a/nestkernel/recordables_map.h b/nestkernel/recordables_map.h index 49a9867794..d939f1762e 100644 --- a/nestkernel/recordables_map.h +++ b/nestkernel/recordables_map.h @@ -32,10 +32,6 @@ // Includes from nestkernel: #include "nest_types.h" -// Includes from sli: -#include "arraydatum.h" -#include "name.h" - namespace nest { /** @@ -54,15 +50,15 @@ namespace nest * initialization conflicts with the Name class. Thus, * creation is deferred to the plain constructor of the host * Node class, which is called only once to create the - * model prototype instance. + * model prototype instance. TODO-PYNEST-NG: is this still the case? * * @see multimeter, UniversalDataLogger * @ingroup Devices */ template < typename HostNode > -class RecordablesMap : public std::map< Name, double ( HostNode::* )() const > +class RecordablesMap : public std::map< std::string, double ( HostNode::* )() const > { - typedef std::map< Name, double ( HostNode::* )() const > Base_; + typedef std::map< std::string, double ( HostNode::* )() const > Base_; public: virtual ~RecordablesMap() @@ -87,13 +83,13 @@ class RecordablesMap : public std::map< Name, double ( HostNode::* )() const > * build the list every time, even though that beats the * goal of being more efficient ... */ - ArrayDatum + std::vector< std::string > get_list() const { - ArrayDatum recordables; + std::vector< std::string > recordables; for ( typename Base_::const_iterator it = this->begin(); it != this->end(); ++it ) { - recordables.push_back( new LiteralDatum( it->first ) ); + recordables.push_back( it->first ); } return recordables; @@ -104,7 +100,7 @@ class RecordablesMap : public std::map< Name, double ( HostNode::* )() const > private: //! Insertion functions to be used in create(), adds entry to map and list void - insert_( const Name& n, const DataAccessFct f ) + insert_( const std::string& n, const DataAccessFct f ) { Base_::insert( std::make_pair( n, f ) ); @@ -166,9 +162,9 @@ class DataAccessFunctor * @ingroup Devices */ template < typename HostNode > -class DynamicRecordablesMap : public std::map< Name, const DataAccessFunctor< HostNode > > +class DynamicRecordablesMap : public std::map< std::string, const DataAccessFunctor< HostNode > > { - typedef std::map< Name, const DataAccessFunctor< HostNode > > Base_; + typedef std::map< std::string, const DataAccessFunctor< HostNode > > Base_; public: virtual ~DynamicRecordablesMap() @@ -193,20 +189,20 @@ class DynamicRecordablesMap : public std::map< Name, const DataAccessFunctor< Ho * build the list every time, even though that beats the * goal of being more efficient ... */ - ArrayDatum + std::vector< std::string > get_list() const { - ArrayDatum recordables; + std::vector< std::string > recordables; for ( typename Base_::const_iterator it = this->begin(); it != this->end(); ++it ) { - recordables.push_back( new LiteralDatum( it->first ) ); + recordables.push_back( it->first ); } return recordables; } //! Insertion functions to be used in create(), adds entry to map and list void - insert( const Name& n, const DataAccessFct& f ) + insert( const std::string& n, const DataAccessFct& f ) { Base_::insert( std::make_pair( n, f ) ); } @@ -214,14 +210,13 @@ class DynamicRecordablesMap : public std::map< Name, const DataAccessFunctor< Ho //! Erase functions to be used when setting state, removes entry from map and //! list void - erase( const Name& n ) + erase( const std::string& n ) { - // .toString() required as work-around for #339, remove when #348 is solved. - typename DynamicRecordablesMap< HostNode >::iterator it = this->find( n.toString() ); - // If the Name is not in the map, throw an error + typename DynamicRecordablesMap< HostNode >::iterator it = this->find( n ); + // If the string is not in the map, throw an error if ( it == this->end() ) { - throw KeyError( n.toString(), "DynamicRecordablesMap", "erase" ); + throw KeyError( n, "DynamicRecordablesMap", "erase" ); } Base_::erase( it ); diff --git a/nestkernel/recording_backend.cpp b/nestkernel/recording_backend.cpp index a140cb7d2a..046c947f6b 100644 --- a/nestkernel/recording_backend.cpp +++ b/nestkernel/recording_backend.cpp @@ -22,7 +22,7 @@ #include "recording_backend.h" -const std::vector< Name > nest::RecordingBackend::NO_DOUBLE_VALUE_NAMES; -const std::vector< Name > nest::RecordingBackend::NO_LONG_VALUE_NAMES; +const std::vector< std::string > nest::RecordingBackend::NO_DOUBLE_VALUE_NAMES; +const std::vector< std::string > nest::RecordingBackend::NO_LONG_VALUE_NAMES; const std::vector< double > nest::RecordingBackend::NO_DOUBLE_VALUES; const std::vector< long > nest::RecordingBackend::NO_LONG_VALUES; diff --git a/nestkernel/recording_backend.h b/nestkernel/recording_backend.h index ed459c5230..a4b44d5d14 100644 --- a/nestkernel/recording_backend.h +++ b/nestkernel/recording_backend.h @@ -26,10 +26,6 @@ // C++ includes: #include -// Includes from sli: -#include "dictdatum.h" -#include "name.h" - #include "dictionary.h" namespace nest @@ -158,8 +154,8 @@ class RecordingBackend * @ingroup NESTio */ virtual void set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) = 0; + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) = 0; /** * Prepare the backend at begin of the NEST Simulate function. @@ -320,8 +316,8 @@ class RecordingBackend */ virtual void get_device_status( const RecordingDevice& device, dictionary& params ) const = 0; - static const std::vector< Name > NO_DOUBLE_VALUE_NAMES; - static const std::vector< Name > NO_LONG_VALUE_NAMES; + static const std::vector< std::string > NO_DOUBLE_VALUE_NAMES; + static const std::vector< std::string > NO_LONG_VALUE_NAMES; static const std::vector< double > NO_DOUBLE_VALUES; static const std::vector< long > NO_LONG_VALUES; }; diff --git a/nestkernel/recording_backend_ascii.cpp b/nestkernel/recording_backend_ascii.cpp index e6e55b1b70..9dc8a4d1ec 100644 --- a/nestkernel/recording_backend_ascii.cpp +++ b/nestkernel/recording_backend_ascii.cpp @@ -27,8 +27,6 @@ #include "recording_device.h" #include "vp_manager_impl.h" -// includes from sli: -#include "dictutils.h" #include "recording_backend_ascii.h" @@ -88,8 +86,8 @@ nest::RecordingBackendASCII::disenroll( const RecordingDevice& device ) void nest::RecordingBackendASCII::set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) { const thread t = device.get_thread(); const thread node_id = device.get_node_id(); @@ -232,8 +230,8 @@ nest::RecordingBackendASCII::DeviceData::DeviceData( std::string modelname, std: } void -nest::RecordingBackendASCII::DeviceData::set_value_names( const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) +nest::RecordingBackendASCII::DeviceData::set_value_names( const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) { double_value_names_ = double_value_names; long_value_names_ = long_value_names; diff --git a/nestkernel/recording_backend_ascii.h b/nestkernel/recording_backend_ascii.h index 71ffce5975..6b9e87fb5f 100644 --- a/nestkernel/recording_backend_ascii.h +++ b/nestkernel/recording_backend_ascii.h @@ -164,8 +164,8 @@ class RecordingBackendASCII : public RecordingBackend void disenroll( const RecordingDevice& device ) override; void set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) override; + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) override; void prepare() override; @@ -196,7 +196,7 @@ class RecordingBackendASCII : public RecordingBackend { DeviceData() = delete; DeviceData( std::string, std::string ); - void set_value_names( const std::vector< Name >&, const std::vector< Name >& ); + void set_value_names( const std::vector< std::string >&, const std::vector< std::string >& ); void open_file(); void write( const Event&, const std::vector< double >&, const std::vector< long >& ); void flush_file(); @@ -205,15 +205,15 @@ class RecordingBackendASCII : public RecordingBackend void set_status( const dictionary& ); private: - long precision_; //!< Number of decimal places used when writing decimal values - bool time_in_steps_; //!< Should time be recorded in steps (ms if false) - std::string modelname_; //!< File name up to but not including the "." - std::string vp_node_id_string_; //!< The vp and node ID component of the filename - std::string file_extension_; //!< File name extension without leading "." - std::string label_; //!< The label of the device. - std::ofstream file_; //!< File stream to use for the device - std::vector< Name > double_value_names_; //!< names for values of type double - std::vector< Name > long_value_names_; //!< names for values of type long + long precision_; //!< Number of decimal places used when writing decimal values + bool time_in_steps_; //!< Should time be recorded in steps (ms if false) + std::string modelname_; //!< File name up to but not including the "." + std::string vp_node_id_string_; //!< The vp and node ID component of the filename + std::string file_extension_; //!< File name extension without leading "." + std::string label_; //!< The label of the device. + std::ofstream file_; //!< File stream to use for the device + std::vector< std::string > double_value_names_; //!< names for values of type double + std::vector< std::string > long_value_names_; //!< names for values of type long std::string compute_filename_() const; //!< Compose and return the filename }; diff --git a/nestkernel/recording_backend_memory.cpp b/nestkernel/recording_backend_memory.cpp index 917b6a73fe..2a0505e99e 100644 --- a/nestkernel/recording_backend_memory.cpp +++ b/nestkernel/recording_backend_memory.cpp @@ -77,8 +77,8 @@ nest::RecordingBackendMemory::disenroll( const RecordingDevice& device ) void nest::RecordingBackendMemory::set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) { const thread t = device.get_thread(); const thread node_id = device.get_node_id(); @@ -177,8 +177,8 @@ nest::RecordingBackendMemory::DeviceData::DeviceData() } void -nest::RecordingBackendMemory::DeviceData::set_value_names( const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) +nest::RecordingBackendMemory::DeviceData::set_value_names( const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) { double_value_names_ = double_value_names; double_values_.resize( double_value_names.size() ); @@ -263,12 +263,12 @@ nest::RecordingBackendMemory::DeviceData::get_status( dictionary& d ) const for ( size_t i = 0; i < double_values_.size(); ++i ) { - auto& double_name = init_doublevector( double_value_names_[ i ].toString() ); + auto& double_name = init_doublevector( double_value_names_[ i ] ); double_name.insert( double_name.end(), double_values_[ i ].begin(), double_values_[ i ].end() ); } for ( size_t i = 0; i < long_values_.size(); ++i ) { - auto& long_name = init_intvector( long_value_names_[ i ].toString() ); + auto& long_name = init_intvector( long_value_names_[ i ] ); long_name.insert( long_name.end(), long_values_[ i ].begin(), long_values_[ i ].end() ); } diff --git a/nestkernel/recording_backend_memory.h b/nestkernel/recording_backend_memory.h index d9128a116d..8299ba616a 100644 --- a/nestkernel/recording_backend_memory.h +++ b/nestkernel/recording_backend_memory.h @@ -123,8 +123,8 @@ class RecordingBackendMemory : public RecordingBackend void disenroll( const RecordingDevice& device ) override; void set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) override; + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) override; void prepare() override; @@ -150,7 +150,7 @@ class RecordingBackendMemory : public RecordingBackend struct DeviceData { DeviceData(); - void set_value_names( const std::vector< Name >&, const std::vector< Name >& ); + void set_value_names( const std::vector< std::string >&, const std::vector< std::string >& ); void push_back( const Event&, const std::vector< double >&, const std::vector< long >& ); void get_status( dictionary& ) const; void set_status( const dictionary& ); @@ -161,8 +161,8 @@ class RecordingBackendMemory : public RecordingBackend std::vector< double > times_ms_; //!< times of registered events in ms std::vector< long > times_steps_; //!< times of registered events in steps std::vector< double > times_offset_; //!< offsets of registered events if time_in_steps_ - std::vector< Name > double_value_names_; //!< names for values of type double - std::vector< Name > long_value_names_; //!< names for values of type long + std::vector< std::string > double_value_names_; //!< names for values of type double + std::vector< std::string > long_value_names_; //!< names for values of type long std::vector< std::vector< double > > double_values_; //!< recorded values of type double, one vector per value std::vector< std::vector< long > > long_values_; //!< recorded values of type long, one vector per value bool time_in_steps_; //!< Should time be recorded in steps (ms if false) diff --git a/nestkernel/recording_backend_mpi.cpp b/nestkernel/recording_backend_mpi.cpp index e03bac1405..0de3a39f7f 100644 --- a/nestkernel/recording_backend_mpi.cpp +++ b/nestkernel/recording_backend_mpi.cpp @@ -107,8 +107,8 @@ nest::RecordingBackendMPI::disenroll( const RecordingDevice& device ) void nest::RecordingBackendMPI::set_value_names( const RecordingDevice&, - const std::vector< Name >&, - const std::vector< Name >& ) + const std::vector< std::string >&, + const std::vector< std::string >& ) { // nothing to do } diff --git a/nestkernel/recording_backend_mpi.h b/nestkernel/recording_backend_mpi.h index 6a9927c249..ef3971fcf5 100644 --- a/nestkernel/recording_backend_mpi.h +++ b/nestkernel/recording_backend_mpi.h @@ -109,8 +109,8 @@ class RecordingBackendMPI : public RecordingBackend void disenroll( const RecordingDevice& device ) override; void set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) override; + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) override; void cleanup() override; diff --git a/nestkernel/recording_backend_screen.cpp b/nestkernel/recording_backend_screen.cpp index deb9f35df8..3fdf626686 100644 --- a/nestkernel/recording_backend_screen.cpp +++ b/nestkernel/recording_backend_screen.cpp @@ -71,8 +71,8 @@ nest::RecordingBackendScreen::disenroll( const RecordingDevice& device ) void nest::RecordingBackendScreen::set_value_names( const RecordingDevice&, - const std::vector< Name >&, - const std::vector< Name >& ) + const std::vector< std::string >&, + const std::vector< std::string >& ) { // nothing to do } diff --git a/nestkernel/recording_backend_screen.h b/nestkernel/recording_backend_screen.h index 06033b62db..544e04597b 100644 --- a/nestkernel/recording_backend_screen.h +++ b/nestkernel/recording_backend_screen.h @@ -98,8 +98,8 @@ class RecordingBackendScreen : public RecordingBackend void disenroll( const RecordingDevice& device ) override; void set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) override; + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) override; void prepare() override; diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp index 4e9b7d7a5c..a44767ec6f 100644 --- a/nestkernel/recording_backend_sionlib.cpp +++ b/nestkernel/recording_backend_sionlib.cpp @@ -112,8 +112,8 @@ nest::RecordingBackendSIONlib::disenroll( const RecordingDevice& device ) void nest::RecordingBackendSIONlib::set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) { const thread t = device.get_thread(); const thread node_id = device.get_node_id(); diff --git a/nestkernel/recording_backend_sionlib.h b/nestkernel/recording_backend_sionlib.h index c729ded59b..323a955714 100644 --- a/nestkernel/recording_backend_sionlib.h +++ b/nestkernel/recording_backend_sionlib.h @@ -211,8 +211,8 @@ class RecordingBackendSIONlib : public RecordingBackend void disenroll( const RecordingDevice& device ) override; void set_value_names( const RecordingDevice& device, - const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) override; + const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) override; void prepare() override; diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp index 4b24fce98f..3216a81472 100644 --- a/nestkernel/recording_device.cpp +++ b/nestkernel/recording_device.cpp @@ -49,8 +49,8 @@ nest::RecordingDevice::set_initialized_() } void -nest::RecordingDevice::calibrate( const std::vector< Name >& double_value_names, - const std::vector< Name >& long_value_names ) +nest::RecordingDevice::calibrate( const std::vector< std::string >& double_value_names, + const std::vector< std::string >& long_value_names ) { Device::calibrate(); kernel().io_manager.set_recording_value_names( P_.record_to_, *this, double_value_names, long_value_names ); @@ -72,7 +72,7 @@ void nest::RecordingDevice::Parameters_::get( dictionary& d ) const { d[ names::label ] = label_; - d[ names::record_to ] = record_to_.toString(); + d[ names::record_to ] = record_to_; } void diff --git a/nestkernel/recording_device.h b/nestkernel/recording_device.h index bab4949c96..32e7c93d3d 100644 --- a/nestkernel/recording_device.h +++ b/nestkernel/recording_device.h @@ -35,9 +35,6 @@ #include "node.h" #include "recording_backend.h" -// Includes from sli: -#include "dictdatum.h" -#include "dictutils.h" namespace nest { @@ -134,7 +131,7 @@ class RecordingDevice : public DeviceNode, public Device using Device::calibrate; using Node::calibrate; - void calibrate( const std::vector< Name >&, const std::vector< Name >& ); + void calibrate( const std::vector< std::string >&, const std::vector< std::string >& ); bool is_active( Time const& T ) const override; @@ -160,8 +157,8 @@ class RecordingDevice : public DeviceNode, public Device private: struct Parameters_ { - std::string label_; //!< A user-defined label for symbolic device names. - Name record_to_; //!< The name of the recording backend to use + std::string label_; //!< A user-defined label for symbolic device names. + std::string record_to_; //!< The name of the recording backend to use Parameters_(); Parameters_( const Parameters_& ) = default; diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp index cfdb8a51c2..ebe8271ced 100644 --- a/nestkernel/simulation_manager.cpp +++ b/nestkernel/simulation_manager.cpp @@ -38,8 +38,6 @@ #include "event_delivery_manager.h" #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" nest::SimulationManager::SimulationManager() : clock_( Time::tic( 0L ) ) diff --git a/nestkernel/simulation_manager.h b/nestkernel/simulation_manager.h index 6b617b4da5..c4114634a0 100644 --- a/nestkernel/simulation_manager.h +++ b/nestkernel/simulation_manager.h @@ -37,8 +37,6 @@ #include "nest_time.h" #include "nest_types.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/sp_manager.h b/nestkernel/sp_manager.h index 6ca4e20f7e..0e13fbe50d 100644 --- a/nestkernel/sp_manager.h +++ b/nestkernel/sp_manager.h @@ -42,10 +42,6 @@ #include "nest_types.h" #include "node_collection.h" -// Includes from sli: -#include "arraydatum.h" -#include "dict.h" -#include "dictdatum.h" namespace nest { @@ -79,7 +75,7 @@ class SPManager : public ManagerInterface * @param name which defines the type of NC to be created * @return a new Growth Curve object of the type indicated by name */ - GrowthCurve* new_growth_curve( Name name ); + GrowthCurve* new_growth_curve( std::string name ); /** * Add a growth curve for MSP @@ -213,9 +209,9 @@ SPManager::get_growthcurvedict() } inline GrowthCurve* -SPManager::new_growth_curve( Name name ) +SPManager::new_growth_curve( std::string name ) { - const long nc_id = growthcurvedict_.get< long >( name.toString() ); + const long nc_id = growthcurvedict_.get< long >( name ); return growthcurve_factories_.at( nc_id )->create(); } diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index 2fe962dcd4..66731ef132 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -118,14 +118,14 @@ create_layer( const dictionary& layer_dict ) return layer; } -ArrayDatum +std::vector< std::vector< double > > get_position( NodeCollectionPTR layer_nc ) { AbstractLayerPTR layer = get_layer( layer_nc ); NodeCollectionMetadataPTR meta = layer_nc->get_metadata(); index first_node_id = meta->get_first_node_id(); - ArrayDatum result; + std::vector< std::vector< double > > result; result.reserve( layer_nc->size() ); for ( NodeCollection::const_iterator it = layer_nc->begin(); it < layer_nc->end(); ++it ) @@ -138,7 +138,7 @@ get_position( NodeCollectionPTR layer_nc ) } const long lid = node_id - first_node_id; - Token arr = layer->get_position_vector( lid ); + const auto arr = layer->get_position_vector( lid ); result.push_back( arr ); } @@ -174,17 +174,17 @@ get_position( const index node_id ) return pos_vec; } -ArrayDatum +std::vector< std::vector< double > > displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) { - ArrayDatum layer_to_positions = get_position( layer_to_nc ); + auto layer_to_positions = get_position( layer_to_nc ); AbstractLayerPTR layer_from = get_layer( layer_from_nc ); NodeCollectionMetadataPTR meta = layer_from_nc->get_metadata(); index first_node_id = meta->get_first_node_id(); int counter = 0; - ArrayDatum result; + std::vector< std::vector< double > > result; // If layer_from has size equal to one, but layer_to do not, we want the // displacement between every node in layer_to against the one in layer_from. @@ -199,11 +199,9 @@ displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) const long lid = node_id - first_node_id; // If layer_from has size 1, we need to iterate over the layer_to positions - for ( Token const* it = layer_to_positions.begin(); it != layer_to_positions.end(); ++it ) + for ( auto& pos : layer_to_positions ) { - std::vector< double > pos = getValue< std::vector< double > >( *it ); - Token disp = layer_from->compute_displacement( pos, lid ); - result.push_back( disp ); + result.push_back( layer_from->compute_displacement( pos, lid ) ); } } else @@ -217,10 +215,8 @@ displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) } const long lid = node_id - first_node_id; - - std::vector< double > pos = getValue< std::vector< double > >( layer_to_positions[ counter ] ); - Token disp = layer_from->compute_displacement( pos, lid ); - result.push_back( disp ); + const auto pos = layer_to_positions[ counter ]; + result.push_back( layer_from->compute_displacement( pos, lid ) ); // We only iterate the layer_to positions vector if it has more than one // element. @@ -234,15 +230,15 @@ displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) return result; } -ArrayDatum -displacement( NodeCollectionPTR layer_nc, const ArrayDatum point ) +std::vector< std::vector< double > > +displacement( NodeCollectionPTR layer_nc, const std::vector< std::vector< double > >& point ) { AbstractLayerPTR layer = get_layer( layer_nc ); NodeCollectionMetadataPTR meta = layer_nc->get_metadata(); index first_node_id = meta->get_first_node_id(); int counter = 0; - ArrayDatum result; + std::vector< std::vector< double > > result; for ( NodeCollection::const_iterator it = layer_nc->begin(); it != layer_nc->end(); ++it ) { index node_id = ( *it ).node_id; @@ -253,9 +249,8 @@ displacement( NodeCollectionPTR layer_nc, const ArrayDatum point ) const long lid = node_id - first_node_id; - std::vector< double > pos = getValue< std::vector< double > >( point[ counter ] ); - Token disp = layer->compute_displacement( pos, lid ); - result.push_back( disp ); + const auto pos = point[ counter ]; + result.push_back( layer->compute_displacement( pos, lid ) ); // We only iterate the positions vector if it has more than one // element. @@ -270,7 +265,7 @@ displacement( NodeCollectionPTR layer_nc, const ArrayDatum point ) std::vector< double > distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) { - ArrayDatum layer_to_positions = get_position( layer_to_nc ); + auto layer_to_positions = get_position( layer_to_nc ); AbstractLayerPTR layer_from = get_layer( layer_from_nc ); NodeCollectionMetadataPTR meta = layer_from_nc->get_metadata(); @@ -292,11 +287,9 @@ distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) const long lid = node_id - first_node_id; // If layer_from has size 1, we need to iterate over the layer_to positions - for ( Token const* it = layer_to_positions.begin(); it != layer_to_positions.end(); ++it ) + for ( auto& pos : layer_to_positions ) { - std::vector< double > pos = getValue< std::vector< double > >( *it ); - double disp = layer_from->compute_distance( pos, lid ); - result.push_back( disp ); + result.push_back( layer_from->compute_distance( pos, lid ) ); } } else @@ -311,8 +304,8 @@ distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) const long lid = node_id - first_node_id; - std::vector< double > pos = getValue< std::vector< double > >( layer_to_positions[ counter ] ); - double disp = layer_from->compute_distance( pos, lid ); + const auto pos = layer_to_positions[ counter ]; + const double disp = layer_from->compute_distance( pos, lid ); result.push_back( disp ); // We only iterate the layer_to positions vector if it has more than one @@ -328,7 +321,7 @@ distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) } std::vector< double > -distance( NodeCollectionPTR layer_nc, const ArrayDatum point ) +distance( NodeCollectionPTR layer_nc, const std::vector< std::vector< double > >& point ) { AbstractLayerPTR layer = get_layer( layer_nc ); NodeCollectionMetadataPTR meta = layer_nc->get_metadata(); @@ -346,7 +339,7 @@ distance( NodeCollectionPTR layer_nc, const ArrayDatum point ) const long lid = node_id - first_node_id; - std::vector< double > pos = getValue< std::vector< double > >( point[ counter ] ); + const auto pos = point[ counter ]; double disp = layer->compute_distance( pos, lid ); result.push_back( disp ); @@ -361,21 +354,19 @@ distance( NodeCollectionPTR layer_nc, const ArrayDatum point ) } std::vector< double > -distance( const ArrayDatum conns ) +distance( const std::vector< ConnectionDatum >& conns ) { std::vector< double > result; size_t num_conns = conns.size(); result.reserve( num_conns ); - for ( size_t conn_indx = 0; conn_indx < num_conns; ++conn_indx ) + for ( auto& conn_id : conns ) { - ConnectionDatum conn_id = getValue< ConnectionDatum >( conns.get( conn_indx ) ); - - index src = conn_id.get_source_node_id(); + index src = conn_id->get_source_node_id(); auto src_position = get_position( src ); - index trgt = conn_id.get_target_node_id(); + index trgt = conn_id->get_target_node_id(); if ( not kernel().node_manager.is_local_node_id( trgt ) ) { @@ -416,7 +407,7 @@ create_mask( const dictionary& mask_dict ) return datum; } -BoolDatum +bool inside( const std::vector< double >& point, const MaskDatum& mask ) { return mask->inside( point ); @@ -457,13 +448,13 @@ connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const } void -dump_layer_nodes( NodeCollectionPTR layer_nc, OstreamDatum& out ) +dump_layer_nodes( NodeCollectionPTR layer_nc, std::ostream& out ) { AbstractLayerPTR layer = get_layer( layer_nc ); - if ( out->good() ) + if ( out.good() ) { - layer->dump_nodes( *out ); + layer->dump_nodes( out ); } } @@ -471,14 +462,14 @@ void dump_layer_connections( const Token& syn_model, NodeCollectionPTR source_layer_nc, NodeCollectionPTR target_layer_nc, - OstreamDatum& out ) + std::ostream& out ) { AbstractLayerPTR source_layer = get_layer( source_layer_nc ); AbstractLayerPTR target_layer = get_layer( target_layer_nc ); - if ( out->good() ) + if ( out.good() ) { - source_layer->dump_connections( *out, source_layer_nc, target_layer, syn_model ); + source_layer->dump_connections( out, source_layer_nc, target_layer, syn_model ); } } diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h index d83b7eec76..36da37315b 100644 --- a/nestkernel/spatial.h +++ b/nestkernel/spatial.h @@ -30,13 +30,6 @@ #include "nest_types.h" #include "node_collection.h" -// Includes from sli: -#include "arraydatum.h" -#include "booldatum.h" -#include "dictdatum.h" -#include "iostreamdatum.h" -#include "token.h" - // Includes from spatial: #include "free_layer.h" #include "layer.h" @@ -115,24 +108,24 @@ class LayerMetadata : public NodeCollectionMetadata AbstractLayerPTR get_layer( NodeCollectionPTR layer_nc ); NodeCollectionPTR create_layer( const dictionary& layer_dict ); -ArrayDatum get_position( NodeCollectionPTR layer_nc ); +std::vector< std::vector< double > > get_position( NodeCollectionPTR layer_nc ); std::vector< double > get_position( const index node_id ); -ArrayDatum displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ); -ArrayDatum displacement( NodeCollectionPTR layer_nc, const ArrayDatum point ); +std::vector< std::vector< double > > displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ); +std::vector< std::vector< double > > displacement( NodeCollectionPTR layer_nc, const std::vector< double > point ); std::vector< double > distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ); -std::vector< double > distance( NodeCollectionPTR layer_nc, const ArrayDatum point ); -std::vector< double > distance( const ArrayDatum conns ); +std::vector< double > distance( NodeCollectionPTR layer_nc, const std::vector< std::vector< double > >& point ); +std::vector< double > distance( const std::vector< ConnectionDatum >& conns ); MaskDatum create_mask( const dictionary& mask_dict ); -BoolDatum inside( const std::vector< double >& point, const MaskDatum& mask ); +bool inside( const std::vector< double >& point, const MaskDatum& mask ); MaskDatum intersect_mask( const MaskDatum& mask1, const MaskDatum& mask2 ); MaskDatum union_mask( const MaskDatum& mask1, const MaskDatum& mask2 ); MaskDatum minus_mask( const MaskDatum& mask1, const MaskDatum& mask2 ); void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ); -void dump_layer_nodes( NodeCollectionPTR layer_nc, OstreamDatum& out ); +void dump_layer_nodes( NodeCollectionPTR layer_nc, std::ostream& out ); void dump_layer_connections( const Token& syn_model, NodeCollectionPTR source_layer_nc, NodeCollectionPTR target_layer_nc, - OstreamDatum& out_file ); + std::ostream& out_file ); dictionary get_layer_status( NodeCollectionPTR layer_nc ); } diff --git a/nestkernel/stimulation_backend.h b/nestkernel/stimulation_backend.h index cc23d6321e..1448b162da 100644 --- a/nestkernel/stimulation_backend.h +++ b/nestkernel/stimulation_backend.h @@ -26,10 +26,7 @@ // C++ includes: #include -// Includes from sli: -#include "dictdatum.h" -#include "dictutils.h" -#include "name.h" +// Includes from nestkernel: #include "stimulation_device.h" namespace nest diff --git a/nestkernel/stimulation_device.cpp b/nestkernel/stimulation_device.cpp index 21679e85cc..ebe37ff5d3 100644 --- a/nestkernel/stimulation_device.cpp +++ b/nestkernel/stimulation_device.cpp @@ -90,7 +90,7 @@ nest::StimulationDevice::get_label() const nest::StimulationDevice::Parameters_::Parameters_() : label_() - , stimulus_source_( Name() ) + , stimulus_source_() { } @@ -98,7 +98,7 @@ void nest::StimulationDevice::Parameters_::get( dictionary& d ) const { d[ names::label ] = label_; - d[ names::stimulus_source ] = stimulus_source_.toString(); + d[ names::stimulus_source ] = stimulus_source_; } void diff --git a/nestkernel/stimulation_device.h b/nestkernel/stimulation_device.h index 8427bef1fa..e3a1487504 100644 --- a/nestkernel/stimulation_device.h +++ b/nestkernel/stimulation_device.h @@ -28,8 +28,6 @@ #include "device_node.h" #include "nest_types.h" -// Includes from sli: -#include "dictutils.h" // Includes from libnestutil: #include "compose.hpp" @@ -161,7 +159,7 @@ class StimulationDevice : public DeviceNode, public Device void set_status( const dictionary& ) override; bool has_proxies() const override; - Name get_element_type() const override; + std::string get_element_type() const override; using Device::calibrate; using Device::init_buffers; @@ -198,8 +196,8 @@ class StimulationDevice : public DeviceNode, public Device struct Parameters_ { - std::string label_; //!< A user-defined label for symbolic device names. - Name stimulus_source_; //!< Origin of the stimulation signal. + std::string label_; //!< A user-defined label for symbolic device names. + std::string stimulus_source_; //!< Origin of the stimulation signal. Parameters_(); Parameters_( const Parameters_& ) = default; @@ -220,7 +218,7 @@ class StimulationDevice : public DeviceNode, public Device dictionary backend_params_; }; -inline Name +inline std::string StimulationDevice::get_element_type() const { return names::stimulator; diff --git a/nestkernel/structural_plasticity_node.cpp b/nestkernel/structural_plasticity_node.cpp index 0248a3b9bd..e629da19cf 100644 --- a/nestkernel/structural_plasticity_node.cpp +++ b/nestkernel/structural_plasticity_node.cpp @@ -25,8 +25,6 @@ // Includes from nestkernel: #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" namespace nest { @@ -60,12 +58,12 @@ nest::StructuralPlasticityNode::get_status( dictionary& d ) const d[ names::beta_Ca ] = beta_Ca_; d[ names::synaptic_elements ] = synaptic_elements_d; - for ( std::map< Name, SynapticElement >::const_iterator it = synaptic_elements_map_.begin(); + for ( std::map< std::string, SynapticElement >::const_iterator it = synaptic_elements_map_.begin(); it != synaptic_elements_map_.end(); ++it ) { dictionary synaptic_element_d; - synaptic_elements_d[ it->first.toString() ] = synaptic_element_d; + synaptic_elements_d[ it->first ] = synaptic_element_d; it->second.get( synaptic_element_d ); } } @@ -106,7 +104,7 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) // { // const dictionary synaptic_elements_dict = d.get(names::synaptic_elements_param); - // for ( std::map< Name, SynapticElement >::iterator it = synaptic_elements_map_.begin(); + // for ( std::map< std::string, SynapticElement >::iterator it = synaptic_elements_map_.begin(); // it != synaptic_elements_map_.end(); // ++it ) // { @@ -123,15 +121,16 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d ) } // we replace the existing synaptic_elements_map_ by the new one dictionary synaptic_elements_d; - std::pair< std::map< Name, SynapticElement >::iterator, bool > insert_result; + std::pair< std::map< std::string, SynapticElement >::iterator, bool > insert_result; - synaptic_elements_map_ = std::map< Name, SynapticElement >(); + synaptic_elements_map_ = std::map< std::string, SynapticElement >(); synaptic_elements_d = d.get< dictionary >( names::synaptic_elements ); // TODO-PYNEST-NG: fix // for ( Dictionary::const_iterator i = synaptic_elements_d->begin(); i != synaptic_elements_d->end(); ++i ) // { - // insert_result = synaptic_elements_map_.insert( std::pair< Name, SynapticElement >( i->first, SynapticElement() ) + // insert_result = synaptic_elements_map_.insert( std::pair< std::string, SynapticElement >( i->first, + // SynapticElement() ) // ); // ( insert_result.first->second ).set( synaptic_elements_d.get< dictionary >( i->first ) ); // } @@ -145,9 +144,9 @@ nest::StructuralPlasticityNode::clear_history() } double -nest::StructuralPlasticityNode::get_synaptic_elements( Name n ) const +nest::StructuralPlasticityNode::get_synaptic_elements( std::string n ) const { - std::map< Name, SynapticElement >::const_iterator se_it; + std::map< std::string, SynapticElement >::const_iterator se_it; se_it = synaptic_elements_map_.find( n ); double z_value; @@ -170,9 +169,9 @@ nest::StructuralPlasticityNode::get_synaptic_elements( Name n ) const } int -nest::StructuralPlasticityNode::get_synaptic_elements_vacant( Name n ) const +nest::StructuralPlasticityNode::get_synaptic_elements_vacant( std::string n ) const { - std::map< Name, SynapticElement >::const_iterator se_it; + std::map< std::string, SynapticElement >::const_iterator se_it; se_it = synaptic_elements_map_.find( n ); if ( se_it != synaptic_elements_map_.end() ) @@ -186,9 +185,9 @@ nest::StructuralPlasticityNode::get_synaptic_elements_vacant( Name n ) const } int -nest::StructuralPlasticityNode::get_synaptic_elements_connected( Name n ) const +nest::StructuralPlasticityNode::get_synaptic_elements_connected( std::string n ) const { - std::map< Name, SynapticElement >::const_iterator se_it; + std::map< std::string, SynapticElement >::const_iterator se_it; se_it = synaptic_elements_map_.find( n ); if ( se_it != synaptic_elements_map_.end() ) @@ -201,16 +200,16 @@ nest::StructuralPlasticityNode::get_synaptic_elements_connected( Name n ) const } } -std::map< Name, double > +std::map< std::string, double > nest::StructuralPlasticityNode::get_synaptic_elements() const { - std::map< Name, double > n_map; + std::map< std::string, double > n_map; - for ( std::map< Name, SynapticElement >::const_iterator it = synaptic_elements_map_.begin(); + for ( std::map< std::string, SynapticElement >::const_iterator it = synaptic_elements_map_.begin(); it != synaptic_elements_map_.end(); ++it ) { - n_map.insert( std::pair< Name, double >( it->first, get_synaptic_elements( it->first ) ) ); + n_map.insert( std::pair< std::string, double >( it->first, get_synaptic_elements( it->first ) ) ); } return n_map; } @@ -220,7 +219,7 @@ nest::StructuralPlasticityNode::update_synaptic_elements( double t ) { assert( t >= Ca_t_ ); - for ( std::map< Name, SynapticElement >::iterator it = synaptic_elements_map_.begin(); + for ( std::map< std::string, SynapticElement >::iterator it = synaptic_elements_map_.begin(); it != synaptic_elements_map_.end(); ++it ) { @@ -234,7 +233,7 @@ nest::StructuralPlasticityNode::update_synaptic_elements( double t ) void nest::StructuralPlasticityNode::decay_synaptic_elements_vacant() { - for ( std::map< Name, SynapticElement >::iterator it = synaptic_elements_map_.begin(); + for ( std::map< std::string, SynapticElement >::iterator it = synaptic_elements_map_.begin(); it != synaptic_elements_map_.end(); ++it ) { @@ -243,9 +242,9 @@ nest::StructuralPlasticityNode::decay_synaptic_elements_vacant() } void -nest::StructuralPlasticityNode::connect_synaptic_element( Name name, int n ) +nest::StructuralPlasticityNode::connect_synaptic_element( std::string name, int n ) { - std::map< Name, SynapticElement >::iterator se_it; + std::map< std::string, SynapticElement >::iterator se_it; se_it = synaptic_elements_map_.find( name ); if ( se_it != synaptic_elements_map_.end() ) diff --git a/nestkernel/structural_plasticity_node.h b/nestkernel/structural_plasticity_node.h index 0e4b5702c1..7019ae3f2d 100644 --- a/nestkernel/structural_plasticity_node.h +++ b/nestkernel/structural_plasticity_node.h @@ -33,8 +33,6 @@ #include "node.h" #include "synaptic_element.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { @@ -67,33 +65,33 @@ class StructuralPlasticityNode : public Node double get_Ca_minus() const; /** - * \fn double get_synaptic_elements(Name n) + * \fn double get_synaptic_elements(std::string n) * get the number of synaptic element for the current Node * the number of synaptic elements is a double value but the number of * actual vacant and connected elements is an integer truncated from this * value */ - double get_synaptic_elements( Name n ) const; + double get_synaptic_elements( std::string n ) const; /** - * \fn int get_synaptic_elements_vacant(Name n) + * \fn int get_synaptic_elements_vacant(std::string n) * Get the number of synaptic elements of type n which are available * for new synapse creation */ - int get_synaptic_elements_vacant( Name n ) const; + int get_synaptic_elements_vacant( std::string n ) const; /** - * \fn int get_synaptic_elements_connected(Name n) + * \fn int get_synaptic_elements_connected(std::string n) * get the number of synaptic element of type n which are currently * connected */ - int get_synaptic_elements_connected( Name n ) const; + int get_synaptic_elements_connected( std::string n ) const; /** - * \fn std::map get_synaptic_elements() + * \fn std::map get_synaptic_elements() * get the number of all synaptic elements for the current Node */ - std::map< Name, double > get_synaptic_elements() const; + std::map< std::string, double > get_synaptic_elements() const; /** * \fn void update_synaptic_elements() @@ -113,7 +111,7 @@ class StructuralPlasticityNode : public Node * \fn void connect_synaptic_element() * Change the number of connected synaptic elements by n */ - void connect_synaptic_element( Name name, int n ); + void connect_synaptic_element( std::string name, int n ); void get_status( dictionary& d ) const; void set_status( const dictionary& d ); @@ -166,7 +164,7 @@ class StructuralPlasticityNode : public Node /** * Map of the synaptic elements */ - std::map< Name, SynapticElement > synaptic_elements_map_; + std::map< std::string, SynapticElement > synaptic_elements_map_; }; inline double diff --git a/nestkernel/synaptic_element.cpp b/nestkernel/synaptic_element.cpp index 898eff3178..9a952b224f 100644 --- a/nestkernel/synaptic_element.cpp +++ b/nestkernel/synaptic_element.cpp @@ -33,8 +33,6 @@ #include "exceptions.h" #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" /* ---------------------------------------------------------------- * SynapticElement @@ -128,7 +126,7 @@ nest::SynapticElement::set( const dictionary& d ) if ( d.known( names::growth_curve ) ) { - Name growth_curve_name( d.get< std::string >( names::growth_curve ) ); + std::string growth_curve_name( d.get< std::string >( names::growth_curve ) ); if ( not growth_curve_->is( growth_curve_name ) ) { growth_curve_ = kernel().sp_manager.new_growth_curve( growth_curve_name ); diff --git a/nestkernel/synaptic_element.h b/nestkernel/synaptic_element.h index 7bde7dd3a8..9abbb0b168 100644 --- a/nestkernel/synaptic_element.h +++ b/nestkernel/synaptic_element.h @@ -92,8 +92,6 @@ #include "dictionary.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/target_table_devices.h b/nestkernel/target_table_devices.h index 113ed9c760..ec3e0d43fe 100644 --- a/nestkernel/target_table_devices.h +++ b/nestkernel/target_table_devices.h @@ -34,9 +34,6 @@ #include "event.h" #include "nest_types.h" -// Includes from SLI: -#include "arraydatum.h" -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/universal_data_logger.h b/nestkernel/universal_data_logger.h index 3999909eac..395eabc90a 100644 --- a/nestkernel/universal_data_logger.h +++ b/nestkernel/universal_data_logger.h @@ -274,18 +274,17 @@ nest::UniversalDataLogger< HostNode >::DataLogger_::DataLogger_( const DataLoggi , data_() , next_rec_( 2, 0 ) { - const std::vector< Name >& recvars = req.record_from(); + const std::vector< std::string >& recvars = req.record_from(); for ( size_t j = 0; j < recvars.size(); ++j ) { - // .toString() required as work-around for #339, remove when #348 is solved. - typename RecordablesMap< HostNode >::const_iterator rec = rmap.find( recvars[ j ].toString() ); + typename RecordablesMap< HostNode >::const_iterator rec = rmap.find( recvars[ j ] ); if ( rec == rmap.end() ) { // delete all access information again: the connect either succeeds // for all entries in recvars, or it fails, leaving the logger untouched node_access_.clear(); - throw IllegalConnection( "Cannot connect with unknown recordable " + recvars[ j ].toString() ); + throw IllegalConnection( "Cannot connect with unknown recordable " + recvars[ j ] ); } node_access_.push_back( rec->second ); @@ -533,18 +532,17 @@ nest::DynamicUniversalDataLogger< HostNode >::DataLogger_::DataLogger_( const Da , data_() , next_rec_( 2, 0 ) { - const std::vector< Name >& recvars = req.record_from(); + const std::vector< std::string >& recvars = req.record_from(); for ( size_t j = 0; j < recvars.size(); ++j ) { - // .toString() required as work-around for #339, remove when #348 is solved. - typename DynamicRecordablesMap< HostNode >::const_iterator rec = rmap.find( recvars[ j ].toString() ); + typename DynamicRecordablesMap< HostNode >::const_iterator rec = rmap.find( recvars[ j ] ); if ( rec == rmap.end() ) { // delete all access information again: the connect either succeeds // for all entries in recvars, or it fails, leaving the logger untouched node_access_.clear(); - throw IllegalConnection( "Cannot connect with unknown recordable " + recvars[ j ].toString() ); + throw IllegalConnection( "Cannot connect with unknown recordable " + recvars[ j ] ); } node_access_.push_back( &( rec->second ) ); diff --git a/nestkernel/urbanczik_archiving_node.h b/nestkernel/urbanczik_archiving_node.h index cf08a65682..0cdf9f3afa 100644 --- a/nestkernel/urbanczik_archiving_node.h +++ b/nestkernel/urbanczik_archiving_node.h @@ -33,8 +33,6 @@ #include "nest_types.h" #include "synaptic_element.h" -// Includes from sli: -#include "dictdatum.h" namespace nest { diff --git a/nestkernel/urbanczik_archiving_node_impl.h b/nestkernel/urbanczik_archiving_node_impl.h index 084757a6f8..ef9cb4b9b9 100644 --- a/nestkernel/urbanczik_archiving_node_impl.h +++ b/nestkernel/urbanczik_archiving_node_impl.h @@ -25,8 +25,6 @@ // Includes from nestkernel: #include "kernel_manager.h" -// Includes from sli: -#include "dictutils.h" namespace nest { diff --git a/nestkernel/vp_manager.cpp b/nestkernel/vp_manager.cpp index 4540d45dca..6ac8de9275 100644 --- a/nestkernel/vp_manager.cpp +++ b/nestkernel/vp_manager.cpp @@ -31,8 +31,6 @@ #include "mpi_manager_impl.h" #include "vp_manager_impl.h" -// Includes from sli: -#include "dictutils.h" nest::VPManager::VPManager() #ifdef _OPENMP diff --git a/nestkernel/vp_manager.h b/nestkernel/vp_manager.h index ff01559f15..6abe28dc93 100644 --- a/nestkernel/vp_manager.h +++ b/nestkernel/vp_manager.h @@ -29,8 +29,6 @@ // Includes from nestkernel: #include "nest_types.h" -// Includes from sli: -#include "dictdatum.h" #ifdef _OPENMP // C includes: diff --git a/sli/CMakeLists.txt b/sli/CMakeLists.txt index 7606f64fff..396a5fce26 100644 --- a/sli/CMakeLists.txt +++ b/sli/CMakeLists.txt @@ -18,7 +18,6 @@ # along with NEST. If not, see . set( sli_sources - allocator.h allocator.cpp aggregatedatum.h arraydatum.cc arraydatum.h booldatum.cc booldatum.h diff --git a/sli/aggregatedatum.h b/sli/aggregatedatum.h index fb625252a4..3dde237670 100644 --- a/sli/aggregatedatum.h +++ b/sli/aggregatedatum.h @@ -59,7 +59,7 @@ template < class C, SLIType* slt > class AggregateDatum : public TypedDatum< slt >, public C { protected: - static sli::pool memory; + static nest::pool memory; private: virtual Datum* diff --git a/sli/arraydatum.cc b/sli/arraydatum.cc index 4c75e1dd21..71d09cbf4d 100644 --- a/sli/arraydatum.cc +++ b/sli/arraydatum.cc @@ -29,11 +29,11 @@ // initialization of static members requires template<> // see Stroustrup C.13.1 --- HEP 2001-08-09 template <> -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::memory( sizeof( ArrayDatum ), 10240, 1 ); +nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::memory( sizeof( ArrayDatum ), 10240, 1 ); template <> -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::memory( sizeof( ProcedureDatum ), 10240, 1 ); +nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::memory( sizeof( ProcedureDatum ), 10240, 1 ); template <> -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::memory( +nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::memory( sizeof( AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype > ), 10240, 1 ); diff --git a/sli/arraydatum.h b/sli/arraydatum.h index 6d06173b16..8748a3b340 100644 --- a/sli/arraydatum.h +++ b/sli/arraydatum.h @@ -45,11 +45,11 @@ #ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS template <> -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::memory; +nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::memory; template <> -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::memory; +nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::memory; template <> -sli::pool AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::memory; +nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::memory; #endif template <> diff --git a/sli/booldatum.cc b/sli/booldatum.cc index baa6d2e37f..3a4e8e6be7 100644 --- a/sli/booldatum.cc +++ b/sli/booldatum.cc @@ -26,7 +26,7 @@ #include "name.h" #include "token.h" -sli::pool BoolDatum::memory( sizeof( BoolDatum ), 1024, 1 ); +nest::pool BoolDatum::memory( sizeof( BoolDatum ), 1024, 1 ); const char* BoolDatum::true_string = "true"; const char* BoolDatum::false_string = "false"; diff --git a/sli/booldatum.h b/sli/booldatum.h index b58bd4823a..37977dcc8f 100644 --- a/sli/booldatum.h +++ b/sli/booldatum.h @@ -40,7 +40,7 @@ class Token; class BoolDatum : public GenericDatum< bool, &SLIInterpreter::Booltype > { protected: - static sli::pool memory; + static nest::pool memory; private: Datum* diff --git a/sli/doubledatum.cc b/sli/doubledatum.cc index b40ec9e1e5..4defd8d0a6 100644 --- a/sli/doubledatum.cc +++ b/sli/doubledatum.cc @@ -28,7 +28,7 @@ // initialization of static members requires template<> // see Stroustrup C.13.1 --- HEP 2001-08-09 template <> -sli::pool NumericDatum< double, &SLIInterpreter::Doubletype >::memory( sizeof( DoubleDatum ), 1024, 1 ); +nest::pool NumericDatum< double, &SLIInterpreter::Doubletype >::memory( sizeof( DoubleDatum ), 1024, 1 ); template <> void diff --git a/sli/doubledatum.h b/sli/doubledatum.h index 0be68ed544..0e926cc718 100644 --- a/sli/doubledatum.h +++ b/sli/doubledatum.h @@ -46,7 +46,7 @@ */ #ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS template <> -sli::pool NumericDatum< double, &SLIInterpreter::Doubletype >::memory; +nest::pool NumericDatum< double, &SLIInterpreter::Doubletype >::memory; #endif template <> diff --git a/sli/functiondatum.cc b/sli/functiondatum.cc index 78a916c747..c6b96c3ca8 100644 --- a/sli/functiondatum.cc +++ b/sli/functiondatum.cc @@ -22,7 +22,7 @@ #include "functiondatum.h" -sli::pool FunctionDatum::memory( sizeof( FunctionDatum ), 1024, 1 ); +nest::pool FunctionDatum::memory( sizeof( FunctionDatum ), 1024, 1 ); void FunctionDatum::backtrace( SLIInterpreter* i, int p ) const diff --git a/sli/functiondatum.h b/sli/functiondatum.h index ca3555e26f..8f8f605b11 100644 --- a/sli/functiondatum.h +++ b/sli/functiondatum.h @@ -45,7 +45,7 @@ class FunctionDatum : public TypedDatum< &SLIInterpreter::Functiontype > { - static sli::pool memory; + static nest::pool memory; Name name; diff --git a/sli/integerdatum.cc b/sli/integerdatum.cc index 3d2dd7e414..e00b6db981 100644 --- a/sli/integerdatum.cc +++ b/sli/integerdatum.cc @@ -25,4 +25,4 @@ // initialization of static members requires template<> // see Stroustrup C.13.1 --- HEP 2001-08-09 template <> -sli::pool NumericDatum< long, &SLIInterpreter::Integertype >::memory( sizeof( IntegerDatum ), 10240, 1 ); +nest::pool NumericDatum< long, &SLIInterpreter::Integertype >::memory( sizeof( IntegerDatum ), 10240, 1 ); diff --git a/sli/integerdatum.h b/sli/integerdatum.h index 30513fa4ab..779e85b4aa 100644 --- a/sli/integerdatum.h +++ b/sli/integerdatum.h @@ -45,7 +45,7 @@ */ #ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS template <> -sli::pool NumericDatum< long, &SLIInterpreter::Integertype >::memory; +nest::pool NumericDatum< long, &SLIInterpreter::Integertype >::memory; #endif typedef NumericDatum< long, &SLIInterpreter::Integertype > IntegerDatum; diff --git a/sli/namedatum.cc b/sli/namedatum.cc index ab75c4ba87..4c1cd5cc16 100644 --- a/sli/namedatum.cc +++ b/sli/namedatum.cc @@ -25,6 +25,6 @@ // initialization of static members requires template<> // see Stroustrup C.13.1 --- HEP 2001-08-09 template <> -sli::pool AggregateDatum< Name, &SLIInterpreter::Nametype >::memory( sizeof( NameDatum ), 10240, 1 ); +nest::pool AggregateDatum< Name, &SLIInterpreter::Nametype >::memory( sizeof( NameDatum ), 10240, 1 ); template <> -sli::pool AggregateDatum< Name, &SLIInterpreter::Literaltype >::memory( sizeof( LiteralDatum ), 10240, 1 ); +nest::pool AggregateDatum< Name, &SLIInterpreter::Literaltype >::memory( sizeof( LiteralDatum ), 10240, 1 ); diff --git a/sli/namedatum.h b/sli/namedatum.h index 5e80d3c225..7781c2169f 100644 --- a/sli/namedatum.h +++ b/sli/namedatum.h @@ -57,10 +57,10 @@ */ #ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS template <> -sli::pool AggregateDatum< Name, &SLIInterpreter::Nametype >::memory; +nest::pool AggregateDatum< Name, &SLIInterpreter::Nametype >::memory; template <> -sli::pool AggregateDatum< Name, &SLIInterpreter::Literaltype >::memory; +nest::pool AggregateDatum< Name, &SLIInterpreter::Literaltype >::memory; #endif diff --git a/sli/numericdatum.h b/sli/numericdatum.h index 792ccaffe4..fc57ecd0f3 100644 --- a/sli/numericdatum.h +++ b/sli/numericdatum.h @@ -42,7 +42,7 @@ template < class D, SLIType* slt > class NumericDatum : public GenericDatum< D, slt > { protected: - static sli::pool memory; + static nest::pool memory; using GenericDatum< D, slt >::d; private: diff --git a/sli/stringdatum.cc b/sli/stringdatum.cc index 191037204a..cc2eb676c4 100644 --- a/sli/stringdatum.cc +++ b/sli/stringdatum.cc @@ -32,7 +32,7 @@ // initialization of static members requires template<> // see Stroustrup C.13.1 --- HEP 2001-08-09 template <> -sli::pool AggregateDatum< std::string, &SLIInterpreter::Stringtype >::memory( +nest::pool AggregateDatum< std::string, &SLIInterpreter::Stringtype >::memory( sizeof( AggregateDatum< std::string, &SLIInterpreter::Stringtype > ), 100, 1 ); diff --git a/sli/stringdatum.h b/sli/stringdatum.h index 38a445f09d..47812aed73 100644 --- a/sli/stringdatum.h +++ b/sli/stringdatum.h @@ -66,7 +66,7 @@ */ #ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS template <> -sli::pool AggregateDatum< std::string, &SLIInterpreter::Stringtype >::memory; +nest::pool AggregateDatum< std::string, &SLIInterpreter::Stringtype >::memory; #endif diff --git a/sli/symboldatum.cc b/sli/symboldatum.cc index 01c20b9764..954eaf3532 100644 --- a/sli/symboldatum.cc +++ b/sli/symboldatum.cc @@ -26,4 +26,4 @@ // initialization of static members requires template<> // see Stroustrup C.13.1 --- HEP 2001-08-09 template <> -sli::pool AggregateDatum< Name, &SLIInterpreter::Symboltype >::memory( sizeof( SymbolDatum ), 100, 1 ); +nest::pool AggregateDatum< Name, &SLIInterpreter::Symboltype >::memory( sizeof( SymbolDatum ), 100, 1 ); diff --git a/sli/symboldatum.h b/sli/symboldatum.h index 37e8517a15..2b84ae22c1 100644 --- a/sli/symboldatum.h +++ b/sli/symboldatum.h @@ -45,7 +45,7 @@ */ #ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS template <> -sli::pool AggregateDatum< Name, &SLIInterpreter::Symboltype >::memory; +nest::pool AggregateDatum< Name, &SLIInterpreter::Symboltype >::memory; #endif class SymbolDatum : public AggregateDatum< Name, &SLIInterpreter::Symboltype > diff --git a/sli/triedatum.cc b/sli/triedatum.cc index 05fb364ac7..e4da052d7b 100644 --- a/sli/triedatum.cc +++ b/sli/triedatum.cc @@ -25,7 +25,7 @@ // Includes from sli: #include "interpret.h" -sli::pool TrieDatum::memory( sizeof( TrieDatum ), 1024, 1 ); +nest::pool TrieDatum::memory( sizeof( TrieDatum ), 1024, 1 ); bool TrieDatum::equals( Datum const* dat ) const diff --git a/sli/triedatum.h b/sli/triedatum.h index 42c9829d19..fc817ae823 100644 --- a/sli/triedatum.h +++ b/sli/triedatum.h @@ -38,7 +38,7 @@ class TrieDatum : public TypedDatum< &SLIInterpreter::Trietype > { protected: - static sli::pool memory; + static nest::pool memory; private: Name name; From e8974db124c4db81f610f0e35379187e82763941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Mon, 8 Aug 2022 15:40:48 +0200 Subject: [PATCH 073/375] Added lookup of modeldict and synapsedict --- nestkernel/nest.cpp | 11 +++++++++++ nestkernel/nest.h | 3 +++ pynest/nest/lib/hl_api_models.py | 7 +++---- pynest/nestkernel_api.pxd | 2 ++ pynest/nestkernel_api.pyx | 10 ++++++++++ 5 files changed, 29 insertions(+), 4 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index f20e37ee2b..2ca4b68edc 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -680,5 +680,16 @@ node_collection_array_index( NodeCollectionPTR node_collection, const bool* arra return NodeCollection::create( node_ids ); } +dictionary +get_modeldict() +{ + return kernel().model_manager.get_modeldict(); +} + +dictionary +get_synapsedict() +{ + return kernel().model_manager.get_synapsedict(); +} } // namespace nest diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 18b4a6c723..17d13c19a9 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -57,6 +57,9 @@ std::string pprint_to_string( NodeCollectionPTR nc ); size_t nc_size( NodeCollectionPTR nc ); +dictionary get_modeldict(); +dictionary get_synapsedict(); + void set_kernel_status( const dictionary& dict ); dictionary get_kernel_status(); diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py index 57a8fbbb66..837225463c 100644 --- a/pynest/nest/lib/hl_api_models.py +++ b/pynest/nest/lib/hl_api_models.py @@ -24,6 +24,7 @@ """ from ..ll_api import * +from .. import nestkernel_api as nestkernel from .hl_api_helper import * from .hl_api_types import to_json @@ -78,12 +79,10 @@ def Models(mtype="all", sel=None): models = [] if mtype in ("all", "nodes"): - sr("modeldict") - models += spp().keys() + models += nestkernel.llapi_get_modeldict().keys() if mtype in ("all", "synapses"): - sr("synapsedict") - models += spp().keys() + models += nestkernel.llapi_get_synapsedict().keys() if sel is not None: models = [x for x in models if x.find(sel) >= 0] diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index d51a9b82b8..259c7d63fe 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -121,6 +121,8 @@ cdef extern from "nest.h" namespace "nest": string print_nodes_to_string() string pprint_to_string( NodeCollectionPTR nc ) except + size_t nc_size( NodeCollectionPTR nc ) except + + dictionary get_modeldict() except + + dictionary get_synapsedict() except + dictionary get_kernel_status() except + NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) except + deque[ConnectionID] get_connections( const dictionary& dict ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index c44862eae3..1cff46fdaa 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -232,6 +232,16 @@ def llapi_nc_size(NodeCollectionObject nc): def llapi_to_string(NodeCollectionObject nc): return pprint_to_string(nc.thisptr).decode('utf8') +@catch_cpp_error +def llapi_get_modeldict(): + cdef dictionary cdict = get_modeldict() + return dictionary_to_pydict(cdict) + +@catch_cpp_error +def llapi_get_synapsedict(): + cdef dictionary cdict = get_synapsedict() + return dictionary_to_pydict(cdict) + @catch_cpp_error def llapi_get_kernel_status(): cdef dictionary cdict = get_kernel_status() From 0f8fbd444e9f8258ba8baa51171b5eb9ee51647c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 9 Aug 2022 08:35:14 +0200 Subject: [PATCH 074/375] Restored KernelAttribute --- pynest/nest/__init__.py | 569 +++++++++++++-------------- pynest/nest/lib/hl_api_simulation.py | 36 +- pynest/nest/ll_api.py | 67 +++- 3 files changed, 356 insertions(+), 316 deletions(-) diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py index 614365b0fd..3865d567cf 100644 --- a/pynest/nest/__init__.py +++ b/pynest/nest/__init__.py @@ -42,7 +42,7 @@ # instance later on. Use `.copy()` to prevent pollution with other variables _original_module_attrs = globals().copy() -# from .ll_api import KernelAttribute # noqa TODO-PYNEST-NG: Enable again when it works without SLI +from .ll_api import KernelAttribute # noqa import sys # noqa import types # noqa import importlib # noqa @@ -107,7 +107,6 @@ class NestModule(types.ModuleType): # Lazy load the `spatial` module to avoid circular imports. spatial = _lazy_module_property("spatial") - # TODO-PYNEST-NG: Enable again when KernelAttribute works without SLI # Define the kernel attributes. # # FORMATTING NOTES: @@ -117,289 +116,289 @@ class NestModule(types.ModuleType): # * Do not end docstrings with punctuation. A `.` or `,` is added by the # formatting logic. - # kernel_status = KernelAttribute( - # "dict", "Get the complete kernel status", readonly=True - # ) - # resolution = KernelAttribute( - # "float", "The resolution of the simulation (in ms)", default=0.1 - # ) - # biological_time = KernelAttribute( - # "float", "The current simulation time (in ms)" - # ) - # to_do = KernelAttribute( - # "int", "The number of steps yet to be simulated", readonly=True - # ) - # max_delay = KernelAttribute( - # "float", "The maximum delay in the network", default=0.1 - # ) - # min_delay = KernelAttribute( - # "float", "The minimum delay in the network", default=0.1 - # ) - # ms_per_tic = KernelAttribute( - # "float", "The number of milliseconds per tic", default=0.001 - # ) - # tics_per_ms = KernelAttribute( - # "float", "The number of tics per millisecond", default=1000.0 - # ) - # tics_per_step = KernelAttribute( - # "int", "The number of tics per simulation time step", default=100 - # ) - # T_max = KernelAttribute( - # "float", "The largest representable time value", readonly=True - # ) - # T_min = KernelAttribute( - # "float", "The smallest representable time value", readonly=True - # ) - # rng_types = KernelAttribute( - # "list[str]", - # "List of available random number generator types", - # readonly=True, - # ) - # rng_type = KernelAttribute( - # "str", - # "Name of random number generator type used by NEST", - # default="mt19937_64", - # ) - # rng_seed = KernelAttribute( - # "int", - # ( - # "Seed value used as base for seeding NEST random number generators " - # + r"(:math:`1 \leq s\leq 2^{32}-1`)" - # ), - # default=143202461, - # ) - # total_num_virtual_procs = KernelAttribute( - # "int", "The total number of virtual processes", default=1 - # ) - # local_num_threads = KernelAttribute( - # "int", "The local number of threads", default=1 - # ) - # num_processes = KernelAttribute( - # "int", "The number of MPI processes", readonly=True - # ) - # off_grid_spiking = KernelAttribute( - # "bool", - # "Whether to transmit precise spike times in MPI communication", - # readonly=True, - # ) - # adaptive_spike_buffers = KernelAttribute( - # "bool", - # "Whether MPI buffers for communication of spikes resize on the fly", - # default=True, - # ) - # adaptive_target_buffers = KernelAttribute( - # "bool", - # "Whether MPI buffers for communication of connections resize on the fly", - # default=True, - # ) - # buffer_size_secondary_events = KernelAttribute( - # "int", - # ( - # "Size of MPI buffers for communicating secondary events " - # + "(in bytes, per MPI rank, for developers)" - # ), - # readonly=True, - # ) - # buffer_size_spike_data = KernelAttribute( - # "int", - # "Total size of MPI buffer for communication of spikes", - # default=2, - # ) - # buffer_size_target_data = KernelAttribute( - # "int", - # "Total size of MPI buffer for communication of connections", - # default=2, - # ) - # growth_factor_buffer_spike_data = KernelAttribute( - # "float", - # ( - # "If MPI buffers for communication of spikes resize on the fly, " - # + "grow them by this factor each round" - # ), - # default=1.5, - # ) - # growth_factor_buffer_target_data = KernelAttribute( - # "float", - # ( - # "If MPI buffers for communication of connections resize on the " - # + "fly, grow them by this factor each round" - # ), - # default=1.5, - # ) - # max_buffer_size_spike_data = KernelAttribute( - # "int", - # "Maximal size of MPI buffers for communication of spikes", - # default=8388608, - # ) - # max_buffer_size_target_data = KernelAttribute( - # "int", - # "Maximal size of MPI buffers for communication of connections", - # default=16777216, - # ) - # use_wfr = KernelAttribute( - # "bool", "Whether to use waveform relaxation method", default=True - # ) - # wfr_comm_interval = KernelAttribute( - # "float", - # "Desired waveform relaxation communication interval", - # default=1.0, - # ) - # wfr_tol = KernelAttribute( - # "float", - # "Convergence tolerance of waveform relaxation method", - # default=0.0001, - # ) - # wfr_max_iterations = KernelAttribute( - # "int", - # "Maximal number of iterations used for waveform relaxation", - # default=15, - # ) - # wfr_interpolation_order = KernelAttribute( - # "int", - # "Interpolation order of polynomial used in wfr iterations", - # default=3 - # ) - # max_num_syn_models = KernelAttribute( - # "int", "Maximal number of synapse models supported", readonly=True - # ) - # sort_connections_by_source = KernelAttribute( - # "bool", - # ( - # "Whether to sort connections by their source; increases" - # + " construction time of presynaptic data structures, decreases" - # + " simulation time if the average number of outgoing connections" - # + " per neuron is smaller than the total number of threads" - # ), - # default=True, - # ) - # structural_plasticity_synapses = KernelAttribute( - # "dict", - # ( - # "Defines all synapses which are plastic for the structural" - # + " plasticity algorithm. Each entry in the dictionary is composed" - # + " of a synapse model, the presynaptic element and the" - # + " postsynaptic element" - # ), - # ) - # structural_plasticity_update_interval = KernelAttribute( - # "int", - # ( - # "Defines the time interval in ms at which the structural plasticity" - # + " manager will make changes in the structure of the network (" - # + " creation and deletion of plastic synapses)" - # ), - # default=10000.0, - # ) - # use_compressed_spikes = KernelAttribute( - # "bool", - # ( - # "Whether to use spike compression; if a neuron has targets on" - # + " multiple threads of a process, this switch makes sure that only" - # + " a single packet is sent to the process instead of one packet" - # + " per target thread; requires" - # + " ``nest.sort_connections_by_source = True``" - # ), - # default=True, - # ) - # data_path = KernelAttribute( - # "str", - # "A path, where all data is written to, defaults to current directory", - # ) - # data_prefix = KernelAttribute("str", "A common prefix for all data files") - # overwrite_files = KernelAttribute( - # "bool", "Whether to overwrite existing data files", default=False - # ) - # print_time = KernelAttribute( - # "bool", - # "Whether to print progress information during the simulation", - # default=False, - # ) - # network_size = KernelAttribute( - # "int", "The number of nodes in the network", readonly=True - # ) - # num_connections = KernelAttribute( - # "int", - # "The number of connections in the network", - # readonly=True, - # localonly=True, - # ) - # local_spike_counter = KernelAttribute( - # "int", - # ( - # "Number of spikes fired by neurons on a given MPI rank during the" - # + " most recent call to :py:func:`.Simulate`. Only spikes from" - # + " \"normal\" neurons are counted, not spikes generated by devices" - # + " such as ``poisson_generator``" - # ), - # readonly=True, - # ) - # recording_backends = KernelAttribute( - # "dict[str, dict]", - # ( - # "Dict of backends for recording devices. Each recording backend can" - # + " have a set of global parameters that can be modified through" - # + " this attribute by passing a dictionary with the name of the" - # + " recording backend as key and a dictionary with the global" - # + " parameters to be overwritten as value.\n\n" - # + "Example\n" - # + "~~~~~~~\n\n" - # + "Please note that NEST must be compiled with SionLIB for the" - # + " ``sionlib`` backend to be available.\n\n" - # + ".. code-block:: python\n\n" - # + " nest.recording_backends = dict(sionlib=dict(buffer_size=1024))" - # + "\n\n" - # + ".. seealso:: The valid global parameters are listed in the" - # + " documentation of each recording backend" - # ), - # ) - # dict_miss_is_error = KernelAttribute( - # "bool", - # "Whether missed dictionary entries are treated as errors", - # default=True, - # ) - # keep_source_table = KernelAttribute( - # "bool", - # "Whether to keep source table after connection setup is complete", - # default=True, - # ) - # min_update_time = KernelAttribute( - # "float", - # "Shortest wall-clock time measured so far for a full update step [seconds]", - # readonly=True, - # ) - # max_update_time = KernelAttribute( - # "float", - # "Longest wall-clock time measured so far for a full update step [seconds]", - # readonly=True, - # ) - # update_time_limit = KernelAttribute( - # "float", - # ( - # "Maximum wall-clock time for one full update step [seconds]." - # + " This can be used to terminate simulations that slow down" - # + " significantly. Simulations may still get stuck if the slowdown" - # + " occurs within a single update step" - # ), - # default=float("+inf"), - # ) - - # _kernel_attr_names = set( - # k for k, v in vars().items() if isinstance(v, KernelAttribute) - # ) - # _readonly_kernel_attrs = set( - # k for k, v in vars().items() if isinstance(v, KernelAttribute) and v._readonly - # ) - - # def set(self, **kwargs): - # return self.SetKernelStatus(kwargs) - - # def get(self, *args): - # if len(args) == 0: - # return self.GetKernelStatus() - # if len(args) == 1: - # return self.GetKernelStatus(args[0]) - # else: - # return self.GetKernelStatus(args) + kernel_status = KernelAttribute( + "dict", "Get the complete kernel status", readonly=True + ) + resolution = KernelAttribute( + "float", "The resolution of the simulation (in ms)", default=0.1 + ) + biological_time = KernelAttribute( + "float", "The current simulation time (in ms)" + ) + to_do = KernelAttribute( + "int", "The number of steps yet to be simulated", readonly=True + ) + max_delay = KernelAttribute( + "float", "The maximum delay in the network", default=0.1 + ) + min_delay = KernelAttribute( + "float", "The minimum delay in the network", default=0.1 + ) + ms_per_tic = KernelAttribute( + "float", "The number of milliseconds per tic", default=0.001 + ) + tics_per_ms = KernelAttribute( + "float", "The number of tics per millisecond", default=1000.0 + ) + tics_per_step = KernelAttribute( + "int", "The number of tics per simulation time step", default=100 + ) + T_max = KernelAttribute( + "float", "The largest representable time value", readonly=True + ) + T_min = KernelAttribute( + "float", "The smallest representable time value", readonly=True + ) + rng_types = KernelAttribute( + "list[str]", + "List of available random number generator types", + readonly=True, + ) + rng_type = KernelAttribute( + "str", + "Name of random number generator type used by NEST", + default="mt19937_64", + ) + rng_seed = KernelAttribute( + "int", + ( + "Seed value used as base for seeding NEST random number generators " + + r"(:math:`1 \leq s\leq 2^{32}-1`)" + ), + default=143202461, + ) + total_num_virtual_procs = KernelAttribute( + "int", "The total number of virtual processes", default=1 + ) + local_num_threads = KernelAttribute( + "int", "The local number of threads", default=1 + ) + num_processes = KernelAttribute( + "int", "The number of MPI processes", readonly=True + ) + off_grid_spiking = KernelAttribute( + "bool", + "Whether to transmit precise spike times in MPI communication", + readonly=True, + ) + adaptive_spike_buffers = KernelAttribute( + "bool", + "Whether MPI buffers for communication of spikes resize on the fly", + default=True, + ) + adaptive_target_buffers = KernelAttribute( + "bool", + "Whether MPI buffers for communication of connections resize on the fly", + default=True, + ) + buffer_size_secondary_events = KernelAttribute( + "int", + ( + "Size of MPI buffers for communicating secondary events " + + "(in bytes, per MPI rank, for developers)" + ), + readonly=True, + ) + buffer_size_spike_data = KernelAttribute( + "int", + "Total size of MPI buffer for communication of spikes", + default=2, + ) + buffer_size_target_data = KernelAttribute( + "int", + "Total size of MPI buffer for communication of connections", + default=2, + ) + growth_factor_buffer_spike_data = KernelAttribute( + "float", + ( + "If MPI buffers for communication of spikes resize on the fly, " + + "grow them by this factor each round" + ), + default=1.5, + ) + growth_factor_buffer_target_data = KernelAttribute( + "float", + ( + "If MPI buffers for communication of connections resize on the " + + "fly, grow them by this factor each round" + ), + default=1.5, + ) + max_buffer_size_spike_data = KernelAttribute( + "int", + "Maximal size of MPI buffers for communication of spikes", + default=8388608, + ) + max_buffer_size_target_data = KernelAttribute( + "int", + "Maximal size of MPI buffers for communication of connections", + default=16777216, + ) + use_wfr = KernelAttribute( + "bool", "Whether to use waveform relaxation method", default=True + ) + wfr_comm_interval = KernelAttribute( + "float", + "Desired waveform relaxation communication interval", + default=1.0, + ) + wfr_tol = KernelAttribute( + "float", + "Convergence tolerance of waveform relaxation method", + default=0.0001, + ) + wfr_max_iterations = KernelAttribute( + "int", + "Maximal number of iterations used for waveform relaxation", + default=15, + ) + wfr_interpolation_order = KernelAttribute( + "int", + "Interpolation order of polynomial used in wfr iterations", + default=3 + ) + max_num_syn_models = KernelAttribute( + "int", "Maximal number of synapse models supported", readonly=True + ) + sort_connections_by_source = KernelAttribute( + "bool", + ( + "Whether to sort connections by their source; increases" + + " construction time of presynaptic data structures, decreases" + + " simulation time if the average number of outgoing connections" + + " per neuron is smaller than the total number of threads" + ), + default=True, + ) + structural_plasticity_synapses = KernelAttribute( + "dict", + ( + "Defines all synapses which are plastic for the structural" + + " plasticity algorithm. Each entry in the dictionary is composed" + + " of a synapse model, the presynaptic element and the" + + " postsynaptic element" + ), + ) + structural_plasticity_update_interval = KernelAttribute( + "int", + ( + "Defines the time interval in ms at which the structural plasticity" + + " manager will make changes in the structure of the network (" + + " creation and deletion of plastic synapses)" + ), + default=10000.0, + ) + use_compressed_spikes = KernelAttribute( + "bool", + ( + "Whether to use spike compression; if a neuron has targets on" + + " multiple threads of a process, this switch makes sure that only" + + " a single packet is sent to the process instead of one packet" + + " per target thread; requires" + + " ``nest.sort_connections_by_source = True``" + ), + default=True, + ) + data_path = KernelAttribute( + "str", + "A path, where all data is written to, defaults to current directory", + ) + data_prefix = KernelAttribute("str", "A common prefix for all data files") + overwrite_files = KernelAttribute( + "bool", "Whether to overwrite existing data files", default=False + ) + print_time = KernelAttribute( + "bool", + "Whether to print progress information during the simulation", + default=False, + ) + network_size = KernelAttribute( + "int", "The number of nodes in the network", readonly=True + ) + num_connections = KernelAttribute( + "int", + "The number of connections in the network", + readonly=True, + localonly=True, + ) + local_spike_counter = KernelAttribute( + "int", + ( + "Number of spikes fired by neurons on a given MPI rank during the" + + " most recent call to :py:func:`.Simulate`. Only spikes from" + + " \"normal\" neurons are counted, not spikes generated by devices" + + " such as ``poisson_generator``" + ), + readonly=True, + ) + recording_backends = KernelAttribute( + "dict[str, dict]", + ( + "Dict of backends for recording devices. Each recording backend can" + + " have a set of global parameters that can be modified through" + + " this attribute by passing a dictionary with the name of the" + + " recording backend as key and a dictionary with the global" + + " parameters to be overwritten as value.\n\n" + + "Example\n" + + "~~~~~~~\n\n" + + "Please note that NEST must be compiled with SionLIB for the" + + " ``sionlib`` backend to be available.\n\n" + + ".. code-block:: python\n\n" + + " nest.recording_backends = dict(sionlib=dict(buffer_size=1024))" + + "\n\n" + + ".. seealso:: The valid global parameters are listed in the" + + " documentation of each recording backend" + ), + ) + dict_miss_is_error = KernelAttribute( + "bool", + "Whether missed dictionary entries are treated as errors", + default=True, + ) + keep_source_table = KernelAttribute( + "bool", + "Whether to keep source table after connection setup is complete", + default=True, + ) + min_update_time = KernelAttribute( + "float", + "Shortest wall-clock time measured so far for a full update step [seconds]", + readonly=True, + ) + max_update_time = KernelAttribute( + "float", + "Longest wall-clock time measured so far for a full update step [seconds]", + readonly=True, + ) + update_time_limit = KernelAttribute( + "float", + ( + "Maximum wall-clock time for one full update step [seconds]." + + " This can be used to terminate simulations that slow down" + + " significantly. Simulations may still get stuck if the slowdown" + + " occurs within a single update step" + ), + default=float("+inf"), + ) + + _kernel_attr_names = set( + k for k, v in vars().items() if isinstance(v, KernelAttribute) + ) + _readonly_kernel_attrs = set( + k for k, v in vars().items() if isinstance(v, KernelAttribute) and v._readonly + ) + + def set(self, **kwargs): + return self.SetKernelStatus(kwargs) + + def get(self, *args): + if len(args) == 0: + return self.GetKernelStatus() + if len(args) == 1: + return self.GetKernelStatus(args[0]) + else: + return self.GetKernelStatus(args) def __dir__(self): return list(set(vars(self).keys()) | set(self.__all__)) diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index 259c33ea57..b69be29676 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -219,24 +219,24 @@ def SetKernelStatus(params): # the module level, but have to have it on the function level. import nest # noqa # TODO-PYNEST-NG: Enable again when KernelAttribute works - # raise_errors = params.get('dict_miss_is_error', nest.dict_miss_is_error) - # valids = nest._kernel_attr_names - # readonly = nest._readonly_kernel_attrs - # keys = list(params.keys()) - # for key in keys: - # msg = None - # if key not in valids: - # msg = f'`{key}` is not a valid kernel parameter, ' + \ - # 'valid parameters are: ' + \ - # ', '.join(f"'{p}'" for p in sorted(valids)) - # elif key in readonly: - # msg = f'`{key}` is a readonly kernel parameter' - # if msg is not None: - # if raise_errors: - # raise ValueError(msg) - # else: - # warnings.warn(msg + f' \n`{key}` has been ignored') - # del params[key] + raise_errors = params.get('dict_miss_is_error', nest.dict_miss_is_error) + valids = nest._kernel_attr_names + readonly = nest._readonly_kernel_attrs + keys = list(params.keys()) + for key in keys: + msg = None + if key not in valids: + msg = f'`{key}` is not a valid kernel parameter, ' + \ + 'valid parameters are: ' + \ + ', '.join(f"'{p}'" for p in sorted(valids)) + elif key in readonly: + msg = f'`{key}` is a readonly kernel parameter' + if msg is not None: + if raise_errors: + raise ValueError(msg) + else: + warnings.warn(msg + f' \n`{key}` has been ignored') + del params[key] nestkernel.llapi_set_kernel_status(params) diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py index f170a0035d..d20f085b3e 100644 --- a/pynest/nest/ll_api.py +++ b/pynest/nest/ll_api.py @@ -54,7 +54,7 @@ 'connect_arrays', 'set_communicator', # 'take_array_index', - # 'KernelAttribute', TODO-PYNEST-NG: Enable again when it works without SLI + 'KernelAttribute', ] @@ -90,6 +90,48 @@ def set_communicator(comm): engine.set_communicator(comm) +class KernelAttribute: + """ + Descriptor that dispatches attribute access to the nest kernel. + """ + def __init__(self, typehint, description, readonly=False, default=None, localonly=False): + self._readonly = readonly + self._localonly = localonly + self._default = default + + readonly = readonly and "**read only**" + localonly = localonly and "**local only**" + + self.__doc__ = ( + description + + ("." if default is None else f", defaults to ``{default}``.") + + ("\n\n" if readonly or localonly else "") + + ", ".join(c for c in (readonly, localonly) if c) + + f"\n\n:type: {typehint}" + ) + + def __set_name__(self, cls, name): + self._name = name + self._full_status = name == "kernel_status" + + def __get__(self, instance, cls=None): + if instance is None: + return self + + status_root = nestkernel.llapi_get_kernel_status() + + if self._full_status: + return status_root + else: + return status_root[self._name] + + def __set__(self, instance, value): + if self._readonly: + msg = f"`{self._name}` is a read only kernel attribute." + raise AttributeError(msg) + nestkernel.llapi_set_kernel_status({self._name: value}) + + def init(argv): """Initializes NEST. @@ -141,19 +183,18 @@ def init(argv): print('NEST initialized successfully!') # TODO-PYNEST-NG: Implement welcome in Python # engine.run("pywelcome") - # TODO-PYNEST-NG: Enable again when it works without SLI # Dirty hack to get tab-completion for models in IPython. - # try: - # __IPYTHON__ - # except NameError: - # pass - # else: - # try: - # import keyword - # from .lib.hl_api_models import Models # noqa - # keyword.kwlist += Models() - # except ImportError: - # pass + try: + __IPYTHON__ + except NameError: + pass + else: + try: + import keyword + from .lib.hl_api_models import Models # noqa + keyword.kwlist += Models() + except ImportError: + pass else: raise kernel.NESTErrors.PyNESTError("Initialization of NEST failed.") From 0556f0c80c800501a350fc85a5673a42dbdb1e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 9 Aug 2022 10:13:01 +0200 Subject: [PATCH 075/375] Updated GetDefaults function --- libnestutil/dictionary.cpp | 6 ++++++ libnestutil/dictionary.h | 1 + nestkernel/model.cpp | 6 +++--- nestkernel/nest.cpp | 35 ++++++++++++++------------------ pynest/nest/lib/hl_api_models.py | 25 ++--------------------- pynest/nestkernel_api.pxd | 2 ++ pynest/nestkernel_api.pyx | 7 +++++++ 7 files changed, 36 insertions(+), 46 deletions(-) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 7ae6df9ff1..d09d4170bf 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -208,6 +208,12 @@ is_int_vector( const boost::any& operand ) { return operand.type() == typeid( std::vector< int > ); } +// vector of ints +bool +is_long_vector( const boost::any& operand ) +{ + return operand.type() == typeid( std::vector< long > ); +} // vector of doubles bool diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 77170ccac4..bf494b2861 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -50,6 +50,7 @@ bool is_double( const boost::any& operand ); bool is_bool( const boost::any& operand ); bool is_string( const boost::any& operand ); bool is_int_vector( const boost::any& operand ); +bool is_long_vector( const boost::any& operand ); bool is_double_vector( const boost::any& operand ); bool is_double_vector_vector( const boost::any& operand ); bool is_string_vector( const boost::any& operand ); diff --git a/nestkernel/model.cpp b/nestkernel/model.cpp index e9a9edec98..1c65215aaf 100644 --- a/nestkernel/model.cpp +++ b/nestkernel/model.cpp @@ -132,7 +132,7 @@ Model::get_status( void ) tmp[ t ] = memory_[ t ].get_instantiations(); } - d[ names::instantiations ] = Token( tmp ); + d[ names::instantiations ] = tmp; d[ names::type_id ] = kernel().model_manager.get_model( type_id_ )->get_name(); for ( size_t t = 0; t < tmp.size(); ++t ) @@ -140,14 +140,14 @@ Model::get_status( void ) tmp[ t ] = memory_[ t ].get_total(); } - d[ names::capacity ] = Token( tmp ); + d[ names::capacity ] = tmp; for ( size_t t = 0; t < tmp.size(); ++t ) { tmp[ t ] = memory_[ t ].available(); } - d[ names::available ] = Token( tmp ); + d[ names::available ] = tmp; d[ names::model ] = get_name(); return d; diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 2ca4b68edc..e26c42f862 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -509,28 +509,23 @@ set_model_defaults( const std::string& modelname, const dictionary& dict ) dictionary get_model_defaults( const std::string& modelname ) { - // const Token nodemodel = kernel().model_manager.get_modeldict()->lookup( modelname ); - // const Token synmodel = kernel().model_manager.get_synapsedict()->lookup( modelname ); - dictionary dict; - // TODO-PYNEST-NG: fix when updating models get_status() - - // if ( not nodemodel.empty() ) - // { - // const long model_id = static_cast< long >( nodemodel ); - // Model* m = kernel().model_manager.get_model( model_id ); - // dict = m->get_status(); - // } - // else if ( not synmodel.empty() ) - // { - // const long synapse_id = static_cast< long >( synmodel ); - // dict = kernel().model_manager.get_connector_defaults( synapse_id ); - // } - // else - // { - // throw UnknownModelName( modelname.toString() ); - // } + if ( kernel().model_manager.get_modeldict().known( modelname ) ) + { + const auto model_id = kernel().model_manager.get_modeldict().get< index >( modelname ); + const auto model = kernel().model_manager.get_model( model_id ); + dict = model->get_status(); + } + else if ( kernel().model_manager.get_synapsedict().known( modelname ) ) + { + const auto synapse_id = kernel().model_manager.get_synapsedict().get< index >( modelname ); + dict = kernel().model_manager.get_connector_defaults( synapse_id ); + } + else + { + throw UnknownModelName( modelname ); + } return dict; } diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py index 837225463c..9150c24b7b 100644 --- a/pynest/nest/lib/hl_api_models.py +++ b/pynest/nest/lib/hl_api_models.py @@ -134,17 +134,13 @@ def SetDefaults(model, params, val=None): @check_stack -def GetDefaults(model, keys=None, output=''): +def GetDefaults(model, output=''): """Return default parameters of the given model, specified by a string. Parameters ---------- model : str Name of the model - keys : str or list, optional - String or a list of strings naming model properties. `GetDefaults` then - returns a single value or a list of values belonging to the keys - given. output : str, optional Whether the returned data should be in a format (``output='json'``). Default is ''. @@ -153,11 +149,6 @@ def GetDefaults(model, keys=None, output=''): ------- dict A dictionary of default parameters. - type - If keys is a string, the corrsponding default parameter is returned. - list - If keys is a list of strings, a list of corrsponding default parameters - is returned. str : If `output` is ``json``, returns parameters in JSON format. @@ -167,19 +158,7 @@ def GetDefaults(model, keys=None, output=''): """ - if keys is None: - cmd = "/{0} GetDefaults".format(model) - elif is_literal(keys): - cmd = '/{0} GetDefaults /{1} get'.format(model, keys) - elif is_iterable(keys): - keys_str = " ".join("/{0}".format(x) for x in keys) - cmd = "/{0} GetDefaults [ {1} ] {{ 1 index exch get }}"\ - .format(model, keys_str) + " Map exch pop" - else: - raise TypeError("keys should be either a string or an iterable") - - sr(cmd) - result = spp() + result = nestkernel.llapi_get_defaults(model.encode('utf-8')) if output == 'json': result = to_json(result) diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 259c7d63fe..acaeb3638c 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -55,6 +55,7 @@ cdef extern from "dictionary.h": cbool is_bool(const any&) cbool is_string(const any&) cbool is_int_vector(const any&) + cbool is_long_vector(const any&) cbool is_double_vector(const any&) cbool is_double_vector_vector(const any&) cbool is_string_vector(const any&) @@ -124,6 +125,7 @@ cdef extern from "nest.h" namespace "nest": dictionary get_modeldict() except + dictionary get_synapsedict() except + dictionary get_kernel_status() except + + dictionary get_model_defaults( const string& ) except + NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) except + deque[ConnectionID] get_connections( const dictionary& dict ) except + void set_kernel_status( const dictionary& ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 1cff46fdaa..060f4da760 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -100,6 +100,8 @@ cdef object any_to_pyobj(any operand): return any_cast[string](operand).decode('utf8') if is_int_vector(operand): return any_cast[vector[int]](operand) + if is_long_vector(operand): + return any_cast[vector[long]](operand) if is_double_vector(operand): return any_cast[vector[double]](operand) if is_double_vector_vector(operand): @@ -118,6 +120,7 @@ cdef object dictionary_to_pydict(dictionary cdict): while it != cdict.end(): tmp[deref(it).first.decode('utf8')] = any_to_pyobj(deref(it).second) if tmp[deref(it).first.decode('utf8')] is None: + # If we end up here, the value in the dictionary is of a type that any_to_pyobj() cannot handle. raise RuntimeError('Could not convert: ' + deref(it).first.decode('utf8') + ' of type ' + debug_type(deref(it).second).decode('utf8')) inc(it) return tmp @@ -247,6 +250,10 @@ def llapi_get_kernel_status(): cdef dictionary cdict = get_kernel_status() return dictionary_to_pydict(cdict) +@catch_cpp_error +def llapi_get_defaults(string model_name): + return dictionary_to_pydict(get_model_defaults(model_name)) + @catch_cpp_error def llapi_get_nodes(object params, cbool local_only): cdef dictionary params_dict = pydict_to_dictionary(params) From 8c1b60c0b732ecf57d219b91b8147c4460aaa1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Tue, 9 Aug 2022 11:28:31 +0200 Subject: [PATCH 076/375] Replaced specialized functions with template function is_type() --- libnestutil/dict_util.h | 2 +- libnestutil/dictionary.cpp | 187 +++++++----------------------- libnestutil/dictionary.h | 28 ++--- models/quantal_stp_synapse_impl.h | 4 +- models/weight_recorder.cpp | 4 +- nestkernel/conn_builder.cpp | 6 +- nestkernel/conn_parameter.cpp | 10 +- nestkernel/free_layer.h | 4 +- nestkernel/layer.cpp | 4 +- nestkernel/nest.cpp | 8 +- pynest/nestkernel_api.pxd | 15 +-- pynest/nestkernel_api.pyx | 28 ++--- 12 files changed, 84 insertions(+), 216 deletions(-) diff --git a/libnestutil/dict_util.h b/libnestutil/dict_util.h index 50dcb1e576..9a965f5bc4 100644 --- a/libnestutil/dict_util.h +++ b/libnestutil/dict_util.h @@ -72,7 +72,7 @@ bool update_value_param( dictionary const& d, const std::string& key, T& value, nest::Node* node ) { const auto it = d.find( key ); - if ( it != d.end() and is_parameter( it->second ) ) + if ( it != d.end() and is_type< std::shared_ptr< nest::Parameter > >( it->second ) ) { if ( not node ) { diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index d09d4170bf..9a4cdeb077 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -67,78 +67,78 @@ operator<<( std::ostream& os, const dictionary& dict ) { std::string type; std::stringstream value_stream; - if ( is_int( kv.second ) ) + if ( is_type< int >( kv.second ) ) { type = "int"; value_stream << boost::any_cast< int >( kv.second ) << '\n'; } - else if ( is_uint( kv.second ) ) + else if ( is_type< unsigned int >( kv.second ) ) { type = "unsigned int"; value_stream << boost::any_cast< unsigned int >( kv.second ) << '\n'; } - else if ( is_long( kv.second ) ) + else if ( is_type< long >( kv.second ) ) { type = "long"; value_stream << boost::any_cast< long >( kv.second ) << '\n'; } - else if ( is_size_t( kv.second ) ) + else if ( is_type< size_t >( kv.second ) ) { type = "size_t"; value_stream << boost::any_cast< size_t >( kv.second ) << '\n'; } - else if ( is_double( kv.second ) ) + else if ( is_type< double >( kv.second ) ) { type = "double"; value_stream << boost::any_cast< double >( kv.second ) << '\n'; } - else if ( is_bool( kv.second ) ) + else if ( is_type< bool >( kv.second ) ) { type = "bool"; const auto value = boost::any_cast< bool >( kv.second ); value_stream << ( value ? "true" : "false" ) << '\n'; } - else if ( is_string( kv.second ) ) + else if ( is_type< std::string >( kv.second ) ) { type = "std::string"; value_stream << "\"" << boost::any_cast< std::string >( kv.second ) << "\"\n"; } - else if ( is_int_vector( kv.second ) ) + else if ( is_type< std::vector< int > >( kv.second ) ) { type = "std::vector"; value_stream << boost::any_cast< std::vector< int > >( kv.second ) << '\n'; } - else if ( is_double_vector( kv.second ) ) + else if ( is_type< std::vector< double > >( kv.second ) ) { type = "std::vector"; value_stream << boost::any_cast< std::vector< double > >( kv.second ) << '\n'; } - else if ( is_double_vector_vector( kv.second ) ) + else if ( is_type< std::vector< std::vector< double > > >( kv.second ) ) { type = "vector>"; value_stream << "vector>" << '\n'; } - else if ( is_string_vector( kv.second ) ) + else if ( is_type< std::vector< std::string > >( kv.second ) ) { type = "std::vector"; value_stream << boost::any_cast< std::vector< std::string > >( kv.second ) << '\n'; } - else if ( is_any_vector( kv.second ) ) + else if ( is_type< std::vector< boost::any > >( kv.second ) ) { type = "vector"; value_stream << "vector" << '\n'; } - else if ( is_dict( kv.second ) ) + else if ( is_type< dictionary >( kv.second ) ) { type = "dictionary"; value_stream << "dictionary" << '\n'; } - else if ( is_parameter( kv.second ) ) + else if ( is_type< std::shared_ptr< nest::Parameter > >( kv.second ) ) { type = "parameter"; value_stream << "parameter" << '\n'; } - else if ( is_nc( kv.second ) ) + else if ( is_type< NodeCollectionDatum >( kv.second ) ) { type = "NodeCollection"; value_stream << "NodeCollection" << '\n'; @@ -155,121 +155,12 @@ operator<<( std::ostream& os, const dictionary& dict ) return os << "}"; } -// int -bool -is_int( const boost::any& operand ) -{ - return operand.type() == typeid( int ); -} - -bool -is_uint( const boost::any& operand ) -{ - return operand.type() == typeid( unsigned int ); -} - -// long -bool -is_long( const boost::any& operand ) -{ - return operand.type() == typeid( long ); -} - -bool -is_size_t( const boost::any& operand ) -{ - return operand.type() == typeid( size_t ); -} - -// double -bool -is_double( const boost::any& operand ) -{ - return operand.type() == typeid( double ); -} - -// bool -bool -is_bool( const boost::any& operand ) -{ - return operand.type() == typeid( bool ); -} - -// string -bool -is_string( const boost::any& operand ) -{ - return operand.type() == typeid( std::string ); -} - -// vector of ints -bool -is_int_vector( const boost::any& operand ) -{ - return operand.type() == typeid( std::vector< int > ); -} -// vector of ints -bool -is_long_vector( const boost::any& operand ) -{ - return operand.type() == typeid( std::vector< long > ); -} - -// vector of doubles -bool -is_double_vector( const boost::any& operand ) -{ - return operand.type() == typeid( std::vector< double > ); -} - -// vector of vector of doubles -bool -is_double_vector_vector( const boost::any& operand ) -{ - return operand.type() == typeid( std::vector< std::vector< double > > ); -} - -// vector of strings -bool -is_string_vector( const boost::any& operand ) -{ - return operand.type() == typeid( std::vector< std::string > ); -} - -// vector of boost::any -bool -is_any_vector( const boost::any& operand ) -{ - return operand.type() == typeid( std::vector< boost::any > ); -} - -// dict -bool -is_dict( const boost::any& operand ) -{ - return operand.type() == typeid( dictionary ); -} - -// parameter -bool -is_parameter( const boost::any& operand ) -{ - return operand.type() == typeid( std::shared_ptr< nest::Parameter > ); -} - -// NodeCollection -bool -is_nc( const boost::any& operand ) -{ - return operand.type() == typeid( NodeCollectionDatum ); -} - bool value_equal( const boost::any first, const boost::any second ) { - if ( is_int( first ) ) + if ( is_type< int >( first ) ) { - if ( not is_int( second ) ) + if ( not is_type< int >( second ) ) { return false; } @@ -280,9 +171,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_long( first ) ) + else if ( is_type< long >( first ) ) { - if ( not is_long( second ) ) + if ( not is_type< long >( second ) ) { return false; } @@ -293,9 +184,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_size_t( first ) ) + else if ( is_type< size_t >( first ) ) { - if ( not is_size_t( second ) ) + if ( not is_type< size_t >( second ) ) { return false; } @@ -306,9 +197,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_double( first ) ) + else if ( is_type< double >( first ) ) { - if ( not is_double( second ) ) + if ( not is_type< double >( second ) ) { return false; } @@ -319,9 +210,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_bool( first ) ) + else if ( is_type< bool >( first ) ) { - if ( not is_bool( second ) ) + if ( not is_type< bool >( second ) ) { return false; } @@ -332,9 +223,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_string( first ) ) + else if ( is_type< std::string >( first ) ) { - if ( not is_string( second ) ) + if ( not is_type< std::string >( second ) ) { return false; } @@ -345,9 +236,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_int_vector( first ) ) + else if ( is_type< std::vector< int > >( first ) ) { - if ( not is_int_vector( second ) ) + if ( not is_type< std::vector< int > >( second ) ) { return false; } @@ -358,9 +249,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_double_vector( first ) ) + else if ( is_type< std::vector< double > >( first ) ) { - if ( not is_double_vector( second ) ) + if ( not is_type< std::vector< double > >( second ) ) { return false; } @@ -371,9 +262,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_double_vector_vector( first ) ) + else if ( is_type< std::vector< std::vector< double > > >( first ) ) { - if ( not is_double_vector_vector( second ) ) + if ( not is_type< std::vector< std::vector< double > > >( second ) ) { return false; } @@ -384,9 +275,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_string_vector( first ) ) + else if ( is_type< std::vector< std::string > >( first ) ) { - if ( not is_string_vector( second ) ) + if ( not is_type< std::vector< std::string > >( second ) ) { return false; } @@ -397,9 +288,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_dict( first ) ) + else if ( is_type< dictionary >( first ) ) { - if ( not is_dict( second ) ) + if ( not is_type< dictionary >( second ) ) { return false; } @@ -410,9 +301,9 @@ value_equal( const boost::any first, const boost::any second ) return false; } } - else if ( is_parameter( first ) ) + else if ( is_type< std::shared_ptr< nest::Parameter > >( first ) ) { - if ( not is_parameter( second ) ) + if ( not is_type< std::shared_ptr< nest::Parameter > >( second ) ) { return false; } diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index bf494b2861..0d8b7e8bc2 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -42,22 +42,12 @@ std::string debug_type( const boost::any& operand ); std::string debug_dict_types( const dictionary& dict ); -bool is_int( const boost::any& operand ); -bool is_uint( const boost::any& operand ); -bool is_long( const boost::any& operand ); -bool is_size_t( const boost::any& operand ); -bool is_double( const boost::any& operand ); -bool is_bool( const boost::any& operand ); -bool is_string( const boost::any& operand ); -bool is_int_vector( const boost::any& operand ); -bool is_long_vector( const boost::any& operand ); -bool is_double_vector( const boost::any& operand ); -bool is_double_vector_vector( const boost::any& operand ); -bool is_string_vector( const boost::any& operand ); -bool is_any_vector( const boost::any& operand ); -bool is_dict( const boost::any& operand ); -bool is_parameter( const boost::any& operand ); -bool is_nc( const boost::any& operand ); +template < typename T > +bool +is_type( const boost::any& operand ) +{ + return operand.type() == typeid( T ); +} /** * @brief Check whether two boost::any values are equal. @@ -120,15 +110,15 @@ class dictionary : public std::map< std::string, boost::any > size_t // TODO: or template? cast_to_integer_( const boost::any& value, const std::string& key ) const { - if ( is_size_t( value ) ) + if ( is_type< size_t >( value ) ) { return cast_value_< size_t >( value, key ); } - else if ( is_long( value ) ) + else if ( is_type< long >( value ) ) { return cast_value_< long >( value, key ); } - else if ( is_int( value ) ) + else if ( is_type< int >( value ) ) { return cast_value_< int >( value, key ); } diff --git a/models/quantal_stp_synapse_impl.h b/models/quantal_stp_synapse_impl.h index 13b3c6f5d7..2c8216f5df 100644 --- a/models/quantal_stp_synapse_impl.h +++ b/models/quantal_stp_synapse_impl.h @@ -47,12 +47,12 @@ update_value_int( const dictionary& d, std::string propname, int& prop ) if ( d.known( propname ) ) { const auto value = d.at( propname ); - if ( is_int( value ) ) + if ( is_type< int >( value ) ) { prop = boost::any_cast< int >( value ); return true; } - else if ( is_double( value ) ) + else if ( is_type< double >( value ) ) { prop = static_cast< int >( boost::any_cast< double >( value ) ); return true; diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp index 66a20ea910..5ca8ae9c89 100644 --- a/models/weight_recorder.cpp +++ b/models/weight_recorder.cpp @@ -90,11 +90,11 @@ nest::weight_recorder::Parameters_::set( const dictionary& d ) { auto get_or_create_nc = [&d]( NodeCollectionPTR& nc, const std::string& key ) { const auto value = d.at( key ); - if ( is_nc( value ) ) + if ( is_type< NodeCollectionDatum >( value ) ) { nc = d.get< NodeCollectionPTR >( key ); } - else if ( is_int_vector( value ) ) + else if ( is_type< std::vector< int > >( value ) ) { const auto node_ids = d.get< std::vector< int > >( key ); // TODO-PYNEST-NG: make a NodeCollection::create(vector) variant diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp index 7ee23bfc6e..0c8f7f0d31 100644 --- a/nestkernel/conn_builder.cpp +++ b/nestkernel/conn_builder.cpp @@ -1089,7 +1089,7 @@ nest::FixedInDegreeBuilder::FixedInDegreeBuilder( NodeCollectionPTR sources, throw BadProperty( "Source array must not be empty." ); } auto indegree = conn_spec.at( names::indegree ); - if ( is_parameter( indegree ) ) + if ( is_type< std::shared_ptr< nest::Parameter > >( indegree ) ) { // TODO: Checks of parameter range indegree_ = boost::any_cast< Parameter* >( indegree ); @@ -1253,7 +1253,7 @@ nest::FixedOutDegreeBuilder::FixedOutDegreeBuilder( NodeCollectionPTR sources, throw BadProperty( "Target array must not be empty." ); } auto outdegree = conn_spec.at( names::outdegree ); - if ( is_parameter( outdegree ) ) + if ( is_type< std::shared_ptr< nest::Parameter > >( outdegree ) ) { // TODO: Checks of parameter range outdegree_ = boost::any_cast< Parameter* >( outdegree ); @@ -1546,7 +1546,7 @@ nest::BernoulliBuilder::BernoulliBuilder( NodeCollectionPTR sources, : ConnBuilder( sources, targets, conn_spec, syn_specs ) { auto p = conn_spec.at( names::p ); - if ( is_parameter( p ) ) + if ( is_type< std::shared_ptr< nest::Parameter > >( p ) ) { p_ = boost::any_cast< Parameter* >( p ); // TODO: Checks of parameter range diff --git a/nestkernel/conn_parameter.cpp b/nestkernel/conn_parameter.cpp index ec0740a6b1..7a76ed829a 100644 --- a/nestkernel/conn_parameter.cpp +++ b/nestkernel/conn_parameter.cpp @@ -33,31 +33,31 @@ nest::ConnParameter* nest::ConnParameter::create( const boost::any& value, const size_t nthreads ) { // single double - if ( is_double( value ) ) + if ( is_type< double >( value ) ) { return new ScalarDoubleParameter( boost::any_cast< double >( value ), nthreads ); } // single integer - if ( is_int( value ) ) + if ( is_type< int >( value ) ) { return new ScalarIntegerParameter( boost::any_cast< int >( value ), nthreads ); } // array of doubles - if ( is_double_vector( value ) ) + if ( is_type< std::vector< double > >( value ) ) { return new ArrayDoubleParameter( boost::any_cast< std::vector< double > >( value ), nthreads ); } // Parameter - if ( is_parameter( value ) ) + if ( is_type< std::shared_ptr< nest::Parameter > >( value ) ) { return new ParameterConnParameterWrapper( boost::any_cast< std::shared_ptr< Parameter > >( value ), nthreads ); } // array of integer - if ( is_int_vector( value ) ) + if ( is_type< std::vector< int > >( value ) ) { return new ArrayIntegerParameter( boost::any_cast< std::vector< int > >( value ), nthreads ); } diff --git a/nestkernel/free_layer.h b/nestkernel/free_layer.h index eac0e2e1a5..481d4ed7ea 100644 --- a/nestkernel/free_layer.h +++ b/nestkernel/free_layer.h @@ -117,7 +117,7 @@ FreeLayer< D >::set_status( const dictionary& d ) if ( d.known( names::positions ) ) { const auto positions = d.at( names::positions ); - if ( is_double_vector_vector( positions ) ) + if ( is_type< std::vector< std::vector< double > > >( positions ) ) { // If the positions are created from a layer sliced with step, we need to take that into consideration. // Because the implementation of NodeCollections sliced with step internally keeps the "skipped" nodes, @@ -162,7 +162,7 @@ FreeLayer< D >::set_status( const dictionary& d ) } } } - else if ( is_parameter( positions ) ) + else if ( is_type< std::shared_ptr< nest::Parameter > >( positions ) ) { auto pd = d.get< std::shared_ptr< Parameter > >( names::positions ); auto pos = dynamic_cast< DimensionParameter* >( pd.get() ); diff --git a/nestkernel/layer.cpp b/nestkernel/layer.cpp index 39e59248c2..98cb11ceba 100644 --- a/nestkernel/layer.cpp +++ b/nestkernel/layer.cpp @@ -72,13 +72,13 @@ AbstractLayer::create_layer( const dictionary& layer_dict ) int num_dimensions = 0; const auto positions = layer_dict.at( names::positions ); - if ( is_double_vector_vector( positions ) ) + if ( is_type< std::vector< std::vector< double > > >( positions ) ) { const auto pos = layer_dict.get< std::vector< std::vector< double > > >( names::positions ); length = pos.size(); num_dimensions = pos[ 0 ].size(); } - else if ( is_parameter( positions ) ) + else if ( is_type< std::shared_ptr< nest::Parameter > >( positions ) ) { auto pd = layer_dict.get< std::shared_ptr< Parameter > >( names::positions ); auto pos = dynamic_cast< DimensionParameter* >( pd.get() ); diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index e26c42f862..cb8ca99318 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -533,19 +533,19 @@ get_model_defaults( const std::string& modelname ) std::shared_ptr< Parameter > create_parameter( const boost::any& value ) { - if ( is_double( value ) ) + if ( is_type< double >( value ) ) { return create_parameter( boost::any_cast< double >( value ) ); } - else if ( is_int( value ) ) + else if ( is_type< int >( value ) ) { return create_parameter( boost::any_cast< int >( value ) ); } - else if ( is_dict( value ) ) + else if ( is_type< dictionary >( value ) ) { return create_parameter( boost::any_cast< dictionary >( value ) ); } - else if ( is_parameter( value ) ) + else if ( is_type< std::shared_ptr< nest::Parameter > >( value ) ) { return create_parameter( boost::any_cast< std::shared_ptr< Parameter > >( value ) ); } diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index acaeb3638c..725b057efc 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -47,20 +47,7 @@ cdef extern from "dictionary.h": const_iterator end() string debug_type(const any&) string debug_dict_types(const dictionary&) - cbool is_int(const any&) - cbool is_uint(const any&) - cbool is_long(const any&) - cbool is_size_t(const any&) - cbool is_double(const any&) - cbool is_bool(const any&) - cbool is_string(const any&) - cbool is_int_vector(const any&) - cbool is_long_vector(const any&) - cbool is_double_vector(const any&) - cbool is_double_vector_vector(const any&) - cbool is_string_vector(const any&) - cbool is_any_vector(const any&) - cbool is_dict(const any&) + cbool is_type[T](const any&) cdef extern from "connection_id.h" namespace "nest": cppclass ConnectionID: diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 060f4da760..45edea594b 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -84,33 +84,33 @@ cdef object any_vector_to_list(vector[any] cvec): cdef object any_to_pyobj(any operand): - if is_int(operand): + if is_type[int](operand): return any_cast[int](operand) - if is_uint(operand): + if is_type[uint](operand): return any_cast[uint](operand) - if is_long(operand): + if is_type[long](operand): return any_cast[long](operand) - if is_size_t(operand): + if is_type[size_t](operand): return any_cast[size_t](operand) - if is_double(operand): + if is_type[double](operand): return any_cast[double](operand) - if is_bool(operand): + if is_type[cbool](operand): return any_cast[cbool](operand) - if is_string(operand): + if is_type[string](operand): return any_cast[string](operand).decode('utf8') - if is_int_vector(operand): + if is_type[vector[int]](operand): return any_cast[vector[int]](operand) - if is_long_vector(operand): + if is_type[vector[long]](operand): return any_cast[vector[long]](operand) - if is_double_vector(operand): + if is_type[vector[double]](operand): return any_cast[vector[double]](operand) - if is_double_vector_vector(operand): + if is_type[vector[vector[double]]](operand): return any_cast[vector[vector[double]]](operand) - if is_string_vector(operand): + if is_type[vector[string]](operand): return any_cast[vector[string]](operand) - if is_any_vector(operand): + if is_type[vector[any]](operand): return tuple(any_vector_to_list(any_cast[vector[any]](operand))) - if is_dict(operand): + if is_type[dictionary](operand): return dictionary_to_pydict(any_cast[dictionary](operand)) cdef object dictionary_to_pydict(dictionary cdict): From 29e5b6af15579d55dd896d9528893cdabff38dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 10 Aug 2022 08:49:38 +0200 Subject: [PATCH 077/375] Added guards to avoid race conditions in the access flag manager --- libnestutil/dictionary.h | 4 ++-- libnestutil/dictionary_access_flag_manager.h | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h index 0d8b7e8bc2..a026deb179 100644 --- a/libnestutil/dictionary.h +++ b/libnestutil/dictionary.h @@ -92,7 +92,7 @@ class dictionary : public std::map< std::string, boost::any > } catch ( const boost::bad_any_cast& ) { - std::string msg = std::string( "Failed to cast " ) + key + " from " + debug_type( value ) + " to type " + std::string msg = std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type " + std::string( typeid( T ).name() ); std::cerr << msg << "\n"; throw nest::TypeMismatch( msg ); @@ -124,7 +124,7 @@ class dictionary : public std::map< std::string, boost::any > } // Not an integer type std::string msg = - std::string( "Failed to cast " ) + key + " from " + debug_type( at( key ) ) + " to an integer type "; + std::string( "Failed to cast '" ) + key + "' from " + debug_type( at( key ) ) + " to an integer type "; std::cerr << msg << "\n"; throw nest::TypeMismatch( msg ); } diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h index 5ae4b77200..6bb121d516 100644 --- a/libnestutil/dictionary_access_flag_manager.h +++ b/libnestutil/dictionary_access_flag_manager.h @@ -66,13 +66,19 @@ class DictionaryAccessFlagManager inline void DictionaryAccessFlagManager::init_access_flags( const dictionary& dict ) { - access_flags_[&dict ] = {}; +#pragma omp critical( init_access_flags ) + { + access_flags_[&dict ] = {}; + } } inline void DictionaryAccessFlagManager::register_access( const dictionary& dict, const key_type_& key ) { - access_flags_[&dict ].insert( key ); +#pragma omp critical( register_access ) + { + access_flags_[&dict ].insert( key ); + } } #endif // DICTIONARY_ACCESS_FLAG_MANAGER_H From 59c45111b0adfe2b457290596680579cd99d7844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 10 Aug 2022 08:51:59 +0200 Subject: [PATCH 078/375] Updated conditional function and ComparingParameter --- nestkernel/parameter.h | 2 +- pynest/nest/logic/hl_api_logic.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h index d5802b8d3a..4dc8c0f7d4 100644 --- a/nestkernel/parameter.h +++ b/nestkernel/parameter.h @@ -680,7 +680,7 @@ class ComparingParameter : public Parameter , parameter2_( m2 ) , comparator_( -1 ) { - if ( not d.update_value( names::comparator, comparator_ ) ) + if ( not d.update_integer_value( names::comparator, comparator_ ) ) { throw BadParameter( "A comparator has to be specified." ); } diff --git a/pynest/nest/logic/hl_api_logic.py b/pynest/nest/logic/hl_api_logic.py index 2f22b5a41e..a89f827077 100644 --- a/pynest/nest/logic/hl_api_logic.py +++ b/pynest/nest/logic/hl_api_logic.py @@ -20,6 +20,7 @@ # along with NEST. If not, see . from ..lib.hl_api_types import CreateParameter +from .. import nestkernel_api as nestkernel __all__ = [ 'conditional', @@ -50,4 +51,4 @@ def conditional(condition, param_if_true, param_if_false): if isinstance(param_if_false, (int, float)): param_if_false = CreateParameter( 'constant', {'value': float(param_if_false)}) - return sli_func("conditional", condition, param_if_true, param_if_false) + return nestkernel.llapi_conditional_parameter(condition._datum, param_if_true._datum, param_if_false._datum) From a06179d06ae993abad7285602f6cfbeac31c0963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 11 Aug 2022 12:33:12 +0200 Subject: [PATCH 079/375] Disabled static module --- CMakeLists.txt | 2 +- cmake/WriteStaticModules_h.cmake | 16 ++++++++-------- nest/neststartup.cpp | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ad79fcd2f..3bc38445f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,7 +164,7 @@ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NEST_CXX_COLOR_FLAGS}" ) # requires HAVE_LIBNEUROSIM nest_default_modules() -nest_write_static_module_header( "${PROJECT_BINARY_DIR}/nest/static_modules.h" ) +# nest_write_static_module_header( "${PROJECT_BINARY_DIR}/nest/static_modules.h" ) # check additionals nest_check_exitcode_abort() diff --git a/cmake/WriteStaticModules_h.cmake b/cmake/WriteStaticModules_h.cmake index b73a2c7c6c..c610bea629 100644 --- a/cmake/WriteStaticModules_h.cmake +++ b/cmake/WriteStaticModules_h.cmake @@ -42,14 +42,14 @@ function( NEST_WRITE_STATIC_MODULE_HEADER filename ) file( APPEND "${filename}" "#include \"interpret.h\"\n\n" ) # start `add_static_modules` function - file( APPEND "${filename}" "void add_static_modules( SLIInterpreter& engine )\n{\n" ) - file( APPEND "${filename}" " // Add all in source modules:\n" ) - foreach ( mod ${SLI_MODULES} ) - # get class name, is always in nest namespace - file( STRINGS "${PROJECT_SOURCE_DIR}/${mod}/${mod}module.h" module_class_string REGEX "class.*: public SLIModule" ) - string( REGEX REPLACE "class ([a-zA-Z0-9_]+) : public SLIModule" "\\1" module_class ${module_class_string} ) - file( APPEND "${filename}" " engine.addmodule( new nest::${module_class}() );\n" ) - endforeach () + # file( APPEND "${filename}" "void add_static_modules( SLIInterpreter& engine )\n{\n" ) + # file( APPEND "${filename}" " // Add all in source modules:\n" ) + # foreach ( mod ${SLI_MODULES} ) + # # get class name, is always in nest namespace + # file( STRINGS "${PROJECT_SOURCE_DIR}/${mod}/${mod}module.h" module_class_string REGEX "class.*: public SLIModule" ) + # string( REGEX REPLACE "class ([a-zA-Z0-9_]+) : public SLIModule" "\\1" module_class ${module_class_string} ) + # file( APPEND "${filename}" " engine.addmodule( new nest::${module_class}() );\n" ) + # endforeach () # when we build statically, we need to add headers and addmodule for external modules # just as if it were a in source module. diff --git a/nest/neststartup.cpp b/nest/neststartup.cpp index 42b0db4a21..6e2978b694 100644 --- a/nest/neststartup.cpp +++ b/nest/neststartup.cpp @@ -27,7 +27,7 @@ // Generated includes: #include "config.h" -#include "static_modules.h" +// #include "static_modules.h" // Includes from libnestutil: #include "logging.h" @@ -128,7 +128,7 @@ neststartup( int* argc, char*** argv, SLIInterpreter& engine, std::string module // engine.def( "growthcurvedict", nest::kernel().sp_manager.get_growthcurvedict() ); // now add static modules providing models - add_static_modules( engine ); + // add_static_modules( engine ); /* * The following section concerns shared user modules and is thus only From 776b9293a0010850c3b600d9ce53abfd8272bfe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 11 Aug 2022 12:33:54 +0200 Subject: [PATCH 080/375] Updated UnknownModelName and UnknownSynapseType exceptions --- nestkernel/exceptions.cpp | 36 ++++++++++++++++++++++++++++-------- nestkernel/exceptions.h | 20 ++++++++++++-------- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp index 7253679410..437671c35a 100644 --- a/nestkernel/exceptions.cpp +++ b/nestkernel/exceptions.cpp @@ -29,18 +29,18 @@ #include "config.h" -const char* -nest::UnknownModelName::what() const noexcept +std::string +nest::UnknownModelName::compose_msg_( const std::string& model_name ) const { std::ostringstream msg; - msg << "/" << model_name_ + " is not a known model name. " + msg << model_name + " is not a known model name. " "Please check the modeldict for a list of available models."; #ifndef HAVE_GSL msg << " A frequent cause for this error is that NEST was compiled " "without the GNU Scientific Library, which is required for " "the conductance-based neuron models."; #endif - return msg.str().c_str(); + return msg.str(); } const char* @@ -60,19 +60,39 @@ nest::UnknownModelID::what() const noexcept return msg.str().c_str(); } +std::string +nest::UnknownSynapseType::compose_msg_( const int id ) const +{ + return std::string( "Synapse with id " ) + std::to_string( id ) + std::string( " does not exist." ); +} + +std::string +nest::UnknownSynapseType::compose_msg_( const std::string& name ) const +{ + return std::string( "Synapse with name " ) + name + std::string( " does not exist." ); +} + const char* nest::UnknownSynapseType::what() const noexcept { - std::ostringstream out; + std::cerr << __FILE__ << ":" << __LINE__ << "\n"; + + // std::stringstream out; + std::string msg; if ( synapsename_.empty() ) { - out << "Synapse with id " << synapseid_ << " does not exist."; + // out << "Synapse with id " << synapseid_ << " does not exist."; + msg = std::string( "Synapse with id " ) + std::to_string( synapseid_ ) + std::string( " does not exist." ); } else { - out << "Synapse with name " << synapsename_ << " does not exist."; + msg = std::string( "Synapse with name " ) + synapsename_ + std::string( " does not exist." ); } - return out.str().c_str(); + // std::cerr << "[out]: " << out.str().c_str() << "\n"; + // return out.str().c_str(); + // return "TEST"; + return msg_.c_str(); + // return msg_.c_str(); } const char* diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h index e599040348..8819af978c 100644 --- a/nestkernel/exceptions.h +++ b/nestkernel/exceptions.h @@ -147,16 +147,13 @@ class UnaccessedDictionaryEntry : public KernelException */ class UnknownModelName : public KernelException { - const std::string model_name_; + std::string compose_msg_( const std::string& model_name ) const; public: UnknownModelName( const std::string& model_name ) - : KernelException( "UnknownModelName" ) - , model_name_( model_name ) + : KernelException( compose_msg_( model_name ) ) { } - - const char* what() const noexcept override; }; /** @@ -206,21 +203,28 @@ class UnknownModelID : public KernelException */ class UnknownSynapseType : public KernelException { + std::string compose_msg_( const int id ) const; + std::string compose_msg_( const std::string& name ) const; + int synapseid_; std::string synapsename_; + std::string msg_; + public: UnknownSynapseType( int id ) - : KernelException( "UnknownSynapseType" ) + : KernelException( "UnknownSynapseType id" ) , synapseid_( id ) , synapsename_() + , msg_( compose_msg_( id ) ) { } UnknownSynapseType( std::string name ) - : KernelException( "UnknownSynapseType" ) - , synapseid_() + : KernelException( "UnknownSynapseType name" ) + , synapseid_( -1 ) , synapsename_( name ) + , msg_( compose_msg_( name ) ) { } From e3f99c554edc4a7d3e0e50ebf352b57d7a5fd914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Thu, 11 Aug 2022 12:35:59 +0200 Subject: [PATCH 081/375] Disabled modelsmodule compilation and added synapse models in nest.cpp --- models/CMakeLists.txt | 2 +- nestkernel/nest.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt index 13b097e301..9584b96e4c 100644 --- a/models/CMakeLists.txt +++ b/models/CMakeLists.txt @@ -80,7 +80,7 @@ set( models_sources mat2_psc_exp.h mat2_psc_exp.cpp mcculloch_pitts_neuron.h mcculloch_pitts_neuron.cpp mip_generator.h mip_generator.cpp - modelsmodule.h modelsmodule.cpp + # modelsmodule.h modelsmodule.cpp multimeter.h multimeter.cpp music_cont_in_proxy.h music_cont_in_proxy.cpp music_cont_out_proxy.h music_cont_out_proxy.cpp diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index cb8ca99318..40a38d2b1f 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -36,8 +36,40 @@ #include "iaf_psc_delta.h" #include "iaf_psc_exp.h" #include "parrot_neuron.h" + +#include "bernoulli_synapse.h" +#include "clopath_synapse.h" +#include "common_synapse_properties.h" +#include "cont_delay_synapse.h" +#include "cont_delay_synapse_impl.h" +#include "diffusion_connection.h" +#include "gap_junction.h" +#include "ht_synapse.h" +#include "jonke_synapse.h" +#include "quantal_stp_synapse.h" +#include "quantal_stp_synapse_impl.h" +#include "rate_connection_delayed.h" +#include "rate_connection_instantaneous.h" #include "static_synapse.h" +#include "static_synapse_hom_w.h" +// #include "stdp_dopamine_synapse.h" +#include "stdp_nn_pre_centered_synapse.h" +#include "stdp_nn_restr_synapse.h" +#include "stdp_nn_symm_synapse.h" +// #include "stdp_pl_synapse_hom.h" +#include "stdp_synapse.h" +#include "stdp_synapse_facetshw_hom.h" +#include "stdp_synapse_facetshw_hom_impl.h" +// #include "stdp_synapse_hom.h" +#include "stdp_triplet_synapse.h" +#include "tsodyks2_synapse.h" +#include "tsodyks_synapse.h" +// #include "tsodyks_synapse_hom.h" +#include "urbanczik_synapse.h" +#include "vogels_sprekeler_synapse.h" + #include "weight_recorder.h" +// #include "volume_transmitter.h" #include "spatial.h" @@ -66,8 +98,32 @@ init_nest( int* argc, char** argv[] ) kernel().model_manager.register_node_model< parrot_neuron >( "parrot_neuron" ); kernel().model_manager.register_node_model< weight_recorder >( "weight_recorder" ); - + // kernel().model_manager.register_node_model< volume_transmitter >( "volume_transmitter" ); + + kernel().model_manager.register_connection_model< bernoulli_synapse >( "bernoulli_synapse" ); + kernel().model_manager.register_connection_model< clopath_synapse >( + "clopath_synapse", default_connection_model_flags | RegisterConnectionModelFlags::REQUIRES_CLOPATH_ARCHIVING ); + kernel().model_manager.register_connection_model< cont_delay_synapse >( "cont_delay_synapse" ); + kernel().model_manager.register_connection_model< ht_synapse >( "ht_synapse" ); + kernel().model_manager.register_connection_model< jonke_synapse >( "jonke_synapse" ); + kernel().model_manager.register_connection_model< quantal_stp_synapse >( "quantal_stp_synapse" ); kernel().model_manager.register_connection_model< static_synapse >( "static_synapse" ); + kernel().model_manager.register_connection_model< static_synapse_hom_w >( "static_synapse_hom_w" ); + kernel().model_manager.register_connection_model< stdp_synapse >( "stdp_synapse" ); + // kernel().model_manager.register_connection_model< stdp_synapse_hom >( "stdp_synapse_hom" ); + // kernel().model_manager.register_connection_model< stdp_dopamine_synapse >( "stdp_dopamine_synapse" ); + kernel().model_manager.register_connection_model< stdp_facetshw_synapse_hom >( "stdp_facetshw_synapse_hom" ); + kernel().model_manager.register_connection_model< stdp_nn_restr_synapse >( "stdp_nn_restr_synapse" ); + kernel().model_manager.register_connection_model< stdp_nn_symm_synapse >( "stdp_nn_symm_synapse" ); + kernel().model_manager.register_connection_model< stdp_nn_pre_centered_synapse >( "stdp_nn_pre_centered_synapse" ); + // kernel().model_manager.register_connection_model< stdp_pl_synapse_hom >( "stdp_pl_synapse_hom" ); + kernel().model_manager.register_connection_model< stdp_triplet_synapse >( "stdp_triplet_synapse" ); + kernel().model_manager.register_connection_model< tsodyks_synapse >( "tsodyks_synapse" ); + // kernel().model_manager.register_connection_model< tsodyks_synapse_hom >( "tsodyks_synapse_hom" ); + kernel().model_manager.register_connection_model< tsodyks2_synapse >( "tsodyks2_synapse" ); + kernel().model_manager.register_connection_model< urbanczik_synapse >( + "urbanczik_synapse", default_connection_model_flags | RegisterConnectionModelFlags::REQUIRES_URBANCZIK_ARCHIVING ); + kernel().model_manager.register_connection_model< vogels_sprekeler_synapse >( "vogels_sprekeler_synapse" ); // Add connection rules From 0d17a0420c525ae6cea96f31c461c2433d400a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 17 Aug 2022 12:50:43 +0200 Subject: [PATCH 082/375] Moved all encoding and decoding of strings to Cython --- pynest/nest/lib/hl_api_models.py | 2 +- pynest/nest/lib/hl_api_nodes.py | 2 +- pynest/nestkernel_api.pyx | 45 ++++++++++++++++++-------------- 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py index 9150c24b7b..0fdb56bb5b 100644 --- a/pynest/nest/lib/hl_api_models.py +++ b/pynest/nest/lib/hl_api_models.py @@ -158,7 +158,7 @@ def GetDefaults(model, output=''): """ - result = nestkernel.llapi_get_defaults(model.encode('utf-8')) + result = nestkernel.llapi_get_defaults(model) if output == 'json': result = to_json(result) diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index 176d4a106f..523e6fd1af 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -120,7 +120,7 @@ def Create(model, n=1, params=None, positions=None): if isinstance(params, dict) and params: # if params is a dict and not empty iterable_or_parameter_in_params = any(is_iterable(v) or isinstance(v, Parameter) for k, v in params.items()) - node_ids = nestkernel.llapi_create(model.encode('utf8'), n) + node_ids = nestkernel.llapi_create(model, n) if params is not None and iterable_or_parameter_in_params: try: diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 45edea594b..8d7af27a42 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -97,7 +97,7 @@ cdef object any_to_pyobj(any operand): if is_type[cbool](operand): return any_cast[cbool](operand) if is_type[string](operand): - return any_cast[string](operand).decode('utf8') + return string_to_pystr(any_cast[string](operand)) if is_type[vector[int]](operand): return any_cast[vector[int]](operand) if is_type[vector[long]](operand): @@ -118,10 +118,11 @@ cdef object dictionary_to_pydict(dictionary cdict): cdef dictionary.const_iterator it = cdict.begin() while it != cdict.end(): - tmp[deref(it).first.decode('utf8')] = any_to_pyobj(deref(it).second) - if tmp[deref(it).first.decode('utf8')] is None: + key = string_to_pystr(deref(it).first) + tmp[key] = any_to_pyobj(deref(it).second) + if tmp[key] is None: # If we end up here, the value in the dictionary is of a type that any_to_pyobj() cannot handle. - raise RuntimeError('Could not convert: ' + deref(it).first.decode('utf8') + ' of type ' + debug_type(deref(it).second).decode('utf8')) + raise RuntimeError('Could not convert: ' + key + ' of type ' + string_to_pystr(debug_type(deref(it).second))) inc(it) return tmp @@ -129,21 +130,21 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *: # Adding "except cdef dictionary cdict = dictionary() for key, value in py_dict.items(): if type(value) is int: - cdict[key.encode('utf-8')] = value + cdict[pystr_to_string(key)] = value elif type(value) is float: - cdict[key.encode('utf-8')] = value + cdict[pystr_to_string(key)] = value elif type(value) is bool: - cdict[key.encode('utf-8')] = value + cdict[pystr_to_string(key)] = value elif type(value) is str: - cdict[key.encode('utf-8')] = value.encode('utf-8') + cdict[pystr_to_string(key)] = pystr_to_string(value) elif type(value) is dict: - cdict[key.encode('utf-8')] = pydict_to_dictionary(value) + cdict[pystr_to_string(key)] = pydict_to_dictionary(value) elif type(value) is nest.NodeCollection: - cdict[key.encode('utf-8')] = ((value._datum)).thisptr + cdict[pystr_to_string(key)] = ((value._datum)).thisptr elif type(value) is nest.Parameter: - cdict[key.encode('utf-8')] = ((value._datum)).thisptr + cdict[pystr_to_string(key)] = ((value._datum)).thisptr elif type(value) is ParameterObject: - cdict[key.encode('utf-8')] = (value).thisptr + cdict[pystr_to_string(key)] = (value).thisptr else: raise AttributeError(f'when converting Python dictionary: value of key ({key}) is not a known type, got {type(value)}') return cdict @@ -162,6 +163,12 @@ cdef vector[dictionary] list_of_dict_to_vec(object pylist): vec.push_back(pydict_to_dictionary(pydict)) return vec +cdef object string_to_pystr(string s): + return s.decode('utf-8') + +cdef string pystr_to_string(object s): + return s.encode('utf-8') + def catch_cpp_error(func): def wrapper_catch_cpp_error(*args, **kwargs): try: @@ -174,9 +181,9 @@ def llapi_reset_kernel(): reset_kernel() @catch_cpp_error -def llapi_create(string model, long n): +def llapi_create(model, long n): cdef NodeCollectionPTR gids - gids = create(model, n) + gids = create(pystr_to_string(model), n) obj = NodeCollectionObject() obj._set_nc(gids) return nest.NodeCollection(obj) @@ -225,7 +232,7 @@ def llapi_get_num_mpi_processes(): return get_num_mpi_processes() def llapi_print_nodes(): - return print_nodes_to_string().decode('utf8') + return string_to_pystr(print_nodes_to_string()) @catch_cpp_error def llapi_nc_size(NodeCollectionObject nc): @@ -233,7 +240,7 @@ def llapi_nc_size(NodeCollectionObject nc): @catch_cpp_error def llapi_to_string(NodeCollectionObject nc): - return pprint_to_string(nc.thisptr).decode('utf8') + return string_to_pystr(pprint_to_string(nc.thisptr)) @catch_cpp_error def llapi_get_modeldict(): @@ -251,8 +258,8 @@ def llapi_get_kernel_status(): return dictionary_to_pydict(cdict) @catch_cpp_error -def llapi_get_defaults(string model_name): - return dictionary_to_pydict(get_model_defaults(model_name)) +def llapi_get_defaults(object model_name): + return dictionary_to_pydict(get_model_defaults(pystr_to_string(model_name))) @catch_cpp_error def llapi_get_nodes(object params, cbool local_only): @@ -289,7 +296,7 @@ def llapi_get_nc_status(NodeCollectionObject nc, object key=None): if key is None: return dictionary_to_pydict(statuses) elif isinstance(key, str): - value = any_to_pyobj(statuses[key.encode('utf-8')]) + value = any_to_pyobj(statuses[pystr_to_string(key)]) return value[0] if len(value) == 1 else value else: raise TypeError(f'key must be a string, got {type(key)}') From 11b4c7c5cbe4ba7ba141517f6dd1d87587186e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 17 Aug 2022 12:54:16 +0200 Subject: [PATCH 083/375] Updated CopyModel function --- pynest/nest/lib/hl_api_models.py | 6 +----- pynest/nestkernel_api.pxd | 1 + pynest/nestkernel_api.pyx | 5 +++++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py index 0fdb56bb5b..4a8c5b9971 100644 --- a/pynest/nest/lib/hl_api_models.py +++ b/pynest/nest/lib/hl_api_models.py @@ -184,8 +184,4 @@ def CopyModel(existing, new, params=None): model_deprecation_warning(existing) - if params is not None: - sps(params) - sr("/%s /%s 3 2 roll CopyModel" % (existing, new)) - else: - sr("/%s /%s CopyModel" % (existing, new)) + nestkernel.llapi_copy_model(existing, new, {} if params is None else params) diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 725b057efc..46b819dbcb 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -125,6 +125,7 @@ cdef extern from "nest.h" namespace "nest": void prepare() except + void run( const double& t ) except + void cleanup() except + + void copy_model( const string&, const string&, const dictionary& ) shared_ptr[Parameter] create_parameter( const dictionary& param_dict ) except + double get_value( const shared_ptr[Parameter]& param ) except + cbool is_spatial( const shared_ptr[Parameter]& param ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 8d7af27a42..9d210fa6d5 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -290,6 +290,11 @@ def llapi_run(float t): def llapi_cleanup(): cleanup() +@catch_cpp_error +def llapi_copy_model(oldmodname, newmodname, object params): + cdef dictionary params_dict = pydict_to_dictionary(params) + copy_model(pystr_to_string(oldmodname), pystr_to_string(newmodname), params_dict) + @catch_cpp_error def llapi_get_nc_status(NodeCollectionObject nc, object key=None): cdef dictionary statuses = get_nc_status(nc.thisptr) From e08bfa3a81c767df23eae66d8d86d6214e5e9b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 17 Aug 2022 13:55:59 +0200 Subject: [PATCH 084/375] Initialize kernel when needed in Boost test cases --- testsuite/cpptests/test_parameter.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testsuite/cpptests/test_parameter.h b/testsuite/cpptests/test_parameter.h index 98f0d4cdc4..c19d902f54 100644 --- a/testsuite/cpptests/test_parameter.h +++ b/testsuite/cpptests/test_parameter.h @@ -32,6 +32,7 @@ #include // Includes from nestkernel +#include "kernel_manager.h" #include "nest_datums.h" #include "random_generators.h" @@ -46,6 +47,8 @@ BOOST_AUTO_TEST_SUITE( test_parameter ) */ BOOST_AUTO_TEST_CASE( test_redraw_value_impossible, *boost::unit_test::timeout( 2 ) ) { + nest::KernelManager::create_kernel_manager(); + dictionary d; d[ nest::names::min ] = 0.0; d[ nest::names::max ] = 1.0; @@ -66,6 +69,8 @@ BOOST_AUTO_TEST_CASE( test_redraw_value_impossible, *boost::unit_test::timeout( */ BOOST_AUTO_TEST_CASE( test_uniform_int_returns_integer ) { + nest::KernelManager::create_kernel_manager(); + const int max = 100; const int num_iterations = 1000; From f5c1ac6ce205dd2437deacaa94f1d8480e697e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 17 Aug 2022 14:24:29 +0200 Subject: [PATCH 085/375] Updated ConnectionRules() function --- nestkernel/nest.cpp | 6 ++++++ nestkernel/nest.h | 1 + pynest/nest/lib/hl_api_models.py | 3 +-- pynest/nestkernel_api.pxd | 1 + pynest/nestkernel_api.pyx | 5 +++++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 40a38d2b1f..d32b5b4802 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -743,4 +743,10 @@ get_synapsedict() return kernel().model_manager.get_synapsedict(); } +dictionary +get_connruledict() +{ + return kernel().connection_manager.get_connruledict(); +} + } // namespace nest diff --git a/nestkernel/nest.h b/nestkernel/nest.h index 17d13c19a9..385e6d10ef 100644 --- a/nestkernel/nest.h +++ b/nestkernel/nest.h @@ -59,6 +59,7 @@ size_t nc_size( NodeCollectionPTR nc ); dictionary get_modeldict(); dictionary get_synapsedict(); +dictionary get_connruledict(); void set_kernel_status( const dictionary& dict ); dictionary get_kernel_status(); diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py index 4a8c5b9971..fa3e754315 100644 --- a/pynest/nest/lib/hl_api_models.py +++ b/pynest/nest/lib/hl_api_models.py @@ -103,8 +103,7 @@ def ConnectionRules(): """ - sr('connruledict') - return tuple(sorted(spp().keys())) + return tuple(sorted(nestkernel.llapi_get_connruledict().keys())) @check_stack diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 46b819dbcb..13fbd8f4bf 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -111,6 +111,7 @@ cdef extern from "nest.h" namespace "nest": size_t nc_size( NodeCollectionPTR nc ) except + dictionary get_modeldict() except + dictionary get_synapsedict() except + + dictionary get_connruledict() except + dictionary get_kernel_status() except + dictionary get_model_defaults( const string& ) except + NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 9d210fa6d5..8f59477f2b 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -252,6 +252,11 @@ def llapi_get_synapsedict(): cdef dictionary cdict = get_synapsedict() return dictionary_to_pydict(cdict) +@catch_cpp_error +def llapi_get_connruledict(): + cdef dictionary cdict = get_connruledict() + return dictionary_to_pydict(cdict) + @catch_cpp_error def llapi_get_kernel_status(): cdef dictionary cdict = get_kernel_status() From 127bc122375f12b7ab2b644adf578f7fe7c4409b Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Tue, 29 Nov 2022 14:59:27 +0100 Subject: [PATCH 086/375] Remove Get/SetStatus in favor of only get/set --- .../examples/aeif_cond_beta_multisynapse.py | 20 +- .../receptors_and_current.py | 4 +- .../examples/compartmental_model/two_comps.py | 4 +- pynest/examples/one_neuron_with_noise.py | 9 +- pynest/examples/pong/networks.py | 6 +- pynest/examples/tsodyks_depressing.py | 3 +- pynest/examples/tsodyks_facilitating.py | 3 +- pynest/examples/urbanczik_synapse_example.py | 5 +- pynest/examples/vinit_example.py | 3 +- pynest/nest/lib/hl_api_connections.py | 1 - pynest/nest/lib/hl_api_info.py | 195 ------------------ pynest/nest/lib/hl_api_nodes.py | 3 +- pynest/nest/lib/hl_api_simulation.py | 18 +- pynest/nest/lib/hl_api_types.py | 8 - pynest/nest/voltage_trace.py | 2 +- 15 files changed, 35 insertions(+), 249 deletions(-) diff --git a/pynest/examples/aeif_cond_beta_multisynapse.py b/pynest/examples/aeif_cond_beta_multisynapse.py index 594d320dc5..d1d8763ffe 100644 --- a/pynest/examples/aeif_cond_beta_multisynapse.py +++ b/pynest/examples/aeif_cond_beta_multisynapse.py @@ -29,14 +29,16 @@ import numpy as np import matplotlib.pyplot as plt -neuron = nest.Create('aeif_cond_beta_multisynapse') -nest.SetStatus(neuron, {"V_peak": 0.0, "a": 4.0, "b": 80.5}) -nest.SetStatus(neuron, {'E_rev': [0.0, 0.0, 0.0, -85.0], - 'tau_decay': [50.0, 20.0, 20.0, 20.0], - 'tau_rise': [10.0, 10.0, 1.0, 1.0]}) +neuron = nest.Create('aeif_cond_beta_multisynapse', params={ + "V_peak": 0.0, + "a": 4.0, + "b": 80.5 + 'E_rev': [0.0, 0.0, 0.0, -85.0], + 'tau_decay': [50.0, 20.0, 20.0, 20.0], + 'tau_rise': [10.0, 10.0, 1.0, 1.0], +}) -spike = nest.Create('spike_generator', params={'spike_times': - np.array([10.0])}) +spike = nest.Create('spike_generator', params={'spike_times': np.array([10.0])}) voltmeter = nest.Create('voltmeter') @@ -52,8 +54,8 @@ nest.Simulate(1000.0) -Vms = voltmeter.get("events", "V_m") -ts = voltmeter.get("events", "times") +Vms = voltmeter.events["V_m"] +ts = voltmeter.events["times"] plt.plot(ts, Vms) plt.show() diff --git a/pynest/examples/compartmental_model/receptors_and_current.py b/pynest/examples/compartmental_model/receptors_and_current.py index c7c46c8b5c..74c9d80684 100644 --- a/pynest/examples/compartmental_model/receptors_and_current.py +++ b/pynest/examples/compartmental_model/receptors_and_current.py @@ -60,7 +60,7 @@ ############################################################################### # spike threshold -nest.SetStatus(cm, {'V_th': -50.}) +cm.V_th = -50. ############################################################################### # - GABA receptor in compartment 0 (soma) @@ -106,7 +106,7 @@ nest.Connect(mm, cm) nest.Simulate(400.) -res = nest.GetStatus(mm, 'events')[0] +res = mm.events plt.plot(res['times'], res['v_comp0'], c='b', label='v_comp0') plt.plot(res['times'], res['v_comp1'], c='r', label='v_comp1') diff --git a/pynest/examples/compartmental_model/two_comps.py b/pynest/examples/compartmental_model/two_comps.py index 30d0730890..a9d1d03df4 100644 --- a/pynest/examples/compartmental_model/two_comps.py +++ b/pynest/examples/compartmental_model/two_comps.py @@ -142,8 +142,8 @@ ############################################################################### # simulate the models nest.Simulate(160.) -res_pas = nest.GetStatus(mm_pas, 'events')[0] -res_act = nest.GetStatus(mm_act, 'events')[0] +res_pas = mm_pas.events +res_act = mm_act.events plt.figure('voltage') ############################################################################### diff --git a/pynest/examples/one_neuron_with_noise.py b/pynest/examples/one_neuron_with_noise.py index 1d3f5d13b4..28d18f9d39 100755 --- a/pynest/examples/one_neuron_with_noise.py +++ b/pynest/examples/one_neuron_with_noise.py @@ -54,11 +54,10 @@ voltmeter = nest.Create("voltmeter") ############################################################################### -# Third, the Poisson generator is configured using ``SetStatus``, which expects -# a list of node handles and a list of parameter dictionaries. We set the -# Poisson generators to 8,000 Hz and 15,000 Hz, respectively. Note that we do -# not need to set parameters for the neuron and the voltmeter, since they have -# satisfactory defaults. +# Third, the rates of the Poisson generator are configured. We set the +# generators to 8,000 Hz and 15,000 Hz, respectively. Note that we do +# not need to set parameters for the neuron and the voltmeter, since +# they have satisfactory defaults. noise[0].rate = 80000.0 noise[1].rate = 15000.0 diff --git a/pynest/examples/pong/networks.py b/pynest/examples/pong/networks.py index ec8ce7bd73..f5bb590a33 100644 --- a/pynest/examples/pong/networks.py +++ b/pynest/examples/pong/networks.py @@ -173,11 +173,9 @@ def set_input_spiketrain(self, input_cell, biological_time): # clear all input generators for input_neuron in range(self.num_neurons): - nest.SetStatus(self.input_generators[input_neuron], - {'spike_times': []}) + self.input_generators[input_neuron].spike_times = [] - nest.SetStatus(self.input_generators[input_cell], - {'spike_times': self.input_train}) + self.input_generators[input_cell].spike_times = self.input_train def get_max_activation(self): """Find the motor neuron with the highest activation (number of spikes). diff --git a/pynest/examples/tsodyks_depressing.py b/pynest/examples/tsodyks_depressing.py index 7c2309d33b..f53a8c57f3 100644 --- a/pynest/examples/tsodyks_depressing.py +++ b/pynest/examples/tsodyks_depressing.py @@ -112,8 +112,7 @@ ################################################################################ # Fifth, the ``iaf_psc_exp`` neurons, the ``dc_generator`` and the ``voltmeter`` -# are configured using ``SetStatus``, which expects a list of node handles and -# a parameter dictionary or a list of parameter dictionaries. +# are configured. neurons.set(neuron_param) dc_gen.set(amplitude=I0, start=TIstart, stop=TIend) diff --git a/pynest/examples/tsodyks_facilitating.py b/pynest/examples/tsodyks_facilitating.py index 4114128526..009bbf9159 100644 --- a/pynest/examples/tsodyks_facilitating.py +++ b/pynest/examples/tsodyks_facilitating.py @@ -111,8 +111,7 @@ ############################################################################### # Fifth, the ``iaf_psc_exp`` neurons, the ``dc_generator`` and the ``voltmeter`` -# are configured using ``SetStatus``, which expects a list of node handles and -# a parameter dictionary or a list of parameter dictionaries. +# are configured. neurons.set(neuron_param) dc_gen.set(amplitude=I0, start=TIstart, stop=TIend) diff --git a/pynest/examples/urbanczik_synapse_example.py b/pynest/examples/urbanczik_synapse_example.py index 5d5cd50b6a..4d5b0b8161 100644 --- a/pynest/examples/urbanczik_synapse_example.py +++ b/pynest/examples/urbanczik_synapse_example.py @@ -282,9 +282,8 @@ def h(U, nrn_params): # simulation divided into intervals of the pattern duration for i in np.arange(n_rep_total): # Set the spike times of the pattern for each spike generator - for (sg, t_sp) in zip(sg_prox, t_srs): - nest.SetStatus( - sg, {'spike_times': np.array(t_sp) + i * pattern_duration}) + for sg, t_sp in zip(sg_prox, t_srs): + sg.spike_times = np.array(t_sp) + i * pattern_duration nest.Simulate(pattern_duration) diff --git a/pynest/examples/vinit_example.py b/pynest/examples/vinit_example.py index aaf2d8a0eb..49feb1c6b5 100755 --- a/pynest/examples/vinit_example.py +++ b/pynest/examples/vinit_example.py @@ -52,8 +52,7 @@ # integrate-and-fire dynamics, conductance-based synapses, an additional # spike-frequency adaptation and relative refractory mechanisms as described # in [1]_. Incoming spike events induce a postsynaptic change of -# conductance modeled by an exponential function. ``SetStatus`` allows to -# assign the initial membrane voltage of the current loop run to the neuron. +# conductance modeled by an exponential function. # # ``Create`` is used once more to instantiate a ``voltmeter`` as recording device # which is subsequently connected to the neuron with ``Connect``. diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py index 4a1af9b5f4..9f0e3a7f1a 100644 --- a/pynest/nest/lib/hl_api_connections.py +++ b/pynest/nest/lib/hl_api_connections.py @@ -32,7 +32,6 @@ from .hl_api_connection_helpers import (_process_input_nodes, _connect_layers_needed, _connect_spatial, _process_conn_spec, _process_spatial_projections, _process_syn_spec) -from .hl_api_info import GetStatus from .hl_api_nodes import Create from .hl_api_parallel_computing import NumProcesses from .hl_api_types import NodeCollection, SynapseCollection, Mask, Parameter diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py index bbfe696ac1..d8bf631eda 100644 --- a/pynest/nest/lib/hl_api_info.py +++ b/pynest/nest/lib/hl_api_info.py @@ -36,12 +36,10 @@ __all__ = [ 'authors', 'get_argv', - 'GetStatus', 'get_verbosity', 'help', 'helpdesk', 'message', - 'SetStatus', 'set_verbosity', 'sysinfo', ] @@ -211,196 +209,3 @@ def set_verbosity(level): # sr("{} setverbosity".format(level)) pass - - -def SetStatus(nodes, params, val=None): - """Set parameters of nodes or connections. - - Parameters of nodes or connections, given in `nodes`, is set as specified - by `params`. If `val` is given, `params` has to be a `string` with the - name of an attribute, which is set to `val` on the nodes/connections. `val` - can be a single value or a list of the same size as nodes. - - Parameters - ---------- - nodes : NodeCollection or SynapseCollection - Either a `NodeCollection` representing nodes, or a `SynapseCollection` - of connection handles as returned by - :py:func:`.GetConnections()`. - params : str or dict or list - Dictionary of parameters (either lists or single values) or list of dictionaries of parameters - of same length as `nodes`. If `val` is given, this has to be a string giving - the name of a model property. - val : int, float, list of int, list of float, optional - If given, params has to be the name of a model property. - - Raises - ------ - TypeError - If `nodes` is not a NodeCollection of nodes, a SynapseCollection of synapses, or if the - number of parameters don't match the number of nodes or - synapses. - - Examples - -------- - >>> nodes = nest.Create("iaf_psc_alpha", 3) - - # Set V_m of all nodes to -55.0 - nest.SetStatus(nodes, {"V_m": -55.0}) - - # Same as above - nest.SetStatus(nodes, "V_m", -55.0) - - # Set V_m of the nodes individually to the given values - nest.SetStatus(nodes, {"V_m": [-55.0, -66.0, -77.0]}) - - # Same as above - nest.SetStatus(nodes, "V_m", [-55.0, -66.0, -77.0]) - - # Same as above - nest.SetStatus(nodes, [{"V_m": -55.0}, {"V_m": -66.0}, {"V_m": -77.0}]) - - # Set V_m of all nodes to-55.0 and I_e individually to the given values - nest.SetStatus(nodes, {"V_m": -55.0, "I_e": [0.0, 100.0, 500.0]}) - - See Also - ------- - :py:func:`GetStatus`, - :py:meth:`NodeCollection.get()`, - :py:meth:`NodeCollection.set()` - - """ - - if not isinstance(nodes, (nest.NodeCollection, nest.SynapseCollection)): - raise TypeError("'nodes' must be NodeCollection or a SynapseCollection.") - - if isinstance(params, str) and val is not None: - params = {params: val} - - print("### 4", params) - - - nodes.set(params) - - -def GetStatus(nodes, keys=None, output=''): - """Return the parameter dictionaries of nodes or connections. - - If `keys` is given, a list of values is returned instead. `keys` may - also be a list, in which case the returned list contains lists of - values. - - Parameters - ---------- - nodes : NodeCollection or SynapseCollection - Either a `NodeCollection` representing nodes, or a `SynapseCollection` of - connection handles as returned by :py:func:`.GetConnections()`. - keys : str or list, optional - string or a list of strings naming model properties. - `GetStatus` then returns a single value or a list of values - belonging to the keys given. - output : str, optional - Whether the returned data should be in a selected format - (``output='json'``). - - Returns - ------- - list of dicts : - All parameters in a dict for each node or connection. - list of values : - If `keys` is a string, the value of the corresponding parameter for each node or connection is returned. - list of lists of values : - If `keys` is a list of strings, a list of values of the corresponding parameters for each node or connection - is returned. - str : - If `output` is `json`, the above formats are converted to JSON format before they are returned. - - Raises - ------ - TypeError - If `nodes` or `keys` are on the wrong form. - - See Also - -------- - :py:func:`SetStatus`, - :py:meth:`NodeCollection.set()`, - :py:meth:`NodeCollection.get()` - - Examples - -------- - *For nodes:* - - >>> nest.GetStatus(nodes) - ({'archiver_length': 0, - 'beta_Ca': 0.001, - ... - 'global_id': 1, - ... - 'vp': 0}, - ... - {'archiver_length': 0, - 'beta_Ca': 0.001, - ... - 'global_id': 3, - ... - 'vp': 0}) - - >>> nest.GetStatus(nodes, 'V_m') - (-70.0, -70.0, -70.0) - - >>> nest.GetStatus(nodes, ['V_m', 'C_m']) - ((-70.0, 250.0), (-70.0, 250.0), (-70.0, 250.0)) - - >>> nest.GetStatus(nodes, ['V_m', 'C_m'], output='json') - '[[-70.0, 250.0], [-70.0, 250.0], [-70.0, 250.0]]' - - *For connections:* - - >>> nest.GetStatus(conns) - ({'delay': 1.0, - ... - 'source': 1, - ... - 'weight': 1.0}, - ... - {'delay': 1.0, - ... - 'source': 3, - ... - 'weight': 1.0}) - - >>> nest.GetStatus(conns, 'weight') - (1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) - - >>> nest.GetStatus(conns, ['source', 'delay']) - ((1, 1.0), - ... - (3, 1.0)) - - >>> nest.GetStatus(conns, ['source', 'delay'], output='json') - '[[1, 1.0], [1, 1.0], [1, 1.0], [2, 1.0], [2, 1.0], [2, 1.0], - [3, 1.0], [3, 1.0], [3, 1.0]]' - """ - - if not (isinstance(nodes, nest.NodeCollection) or isinstance(nodes, nest.SynapseCollection)): - raise TypeError("The first input (nodes) must be NodeCollection or a SynapseCollection with connection handles") - - if len(nodes) == 0: - return '[]' if output == 'json' else () - - if keys is None: - result = nodes.get() - elif isinstance(keys, str) or is_iterable(keys): - result = nodes.get(keys) - else: - raise TypeError("keys should be either a string or an iterable") - - if isinstance(result, dict): - # We have taken GetStatus on a layer object, or another NodeCollection with metadata, which returns a - # dictionary from C++, so we need to turn it into a tuple for consistency. - result = (result,) - - if output == 'json': - result = to_json(result) - - return result diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index 00cb66302d..32c5bbea6c 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -30,7 +30,6 @@ from .. import pynestkernel as kernel from .. import nestkernel_api as nestkernel from .hl_api_helper import is_iterable, model_deprecation_warning -from .hl_api_info import SetStatus from .hl_api_types import NodeCollection, Parameter __all__ = [ @@ -132,7 +131,7 @@ def Create(model, n=1, params=None, positions=None): try: node_ids.set(params) except Exception: - warnings.warn("SetStatus() call failed, but nodes have already been " + + warnings.warn("Setting node parameters failed, but nodes have already been " + f"created! The node IDs of the new nodes are: {node_ids}.") raise diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py index 512e72aad7..5f80c1a0ec 100644 --- a/pynest/nest/lib/hl_api_simulation.py +++ b/pynest/nest/lib/hl_api_simulation.py @@ -90,10 +90,10 @@ def Run(t): Be careful about modifying the network or neurons between `Prepare` and `Cleanup` calls. In particular, do not call `Create`, `Connect`, or `SetKernelStatus`. - Calling `SetStatus` to change membrane potential `V_m` of neurons or synaptic - weights (but not delays!) will in most cases work as expected, while changing - membrane or synaptic times constants will not work correctly. If in doubt, assume - that changes may cause undefined behavior and check these thoroughly. + Changing the membrane potential `V_m` of neurons or synaptic weights (but not delays!) + will in most cases work as expected, while changing membrane or synaptic times + constants will not work correctly. If in doubt, assume that changes may cause + undefined behavior and check these thoroughly. See Also -------- @@ -107,9 +107,6 @@ def Run(t): def Prepare(): """Calibrate the system before a `Run` call. Not needed for `Simulate`. - Call before the first `Run` call, or before calling `Run` after changing - the system, calling `SetStatus` or `Cleanup`. - See Also -------- Run, Cleanup @@ -150,10 +147,9 @@ def RunManager(): Notes ----- - - Be careful about modifying the network or neurons inside the `RunManager` context. - In particular, do not call `Create`, `Connect`, or `SetKernelStatus`. Calling `SetStatus` - to change membrane potential `V_m` of neurons or synaptic weights (but not delays!) + Be careful about modifying the network or neurons between `Prepare` and `Cleanup` + calls. In particular, do not call `Create`, `Connect`, or `SetKernelStatus`. + Changing the membrane potential `V_m` of neurons or synaptic weights (but not delays!) will in most cases work as expected, while changing membrane or synaptic times constants will not work correctly. If in doubt, assume that changes may cause undefined behavior and check these thoroughly. diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 46152a2f51..8a9c03289a 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -338,8 +338,6 @@ def get(self, *params, **kwargs): See Also -------- :py:func:`set`, - :py:func:`GetStatus()`, - :py:func:`SetStatus()` Examples -------- @@ -424,8 +422,6 @@ def set(self, params=None, **kwargs): """ Set the parameters of nodes to params. - NB! This is almost the same implementation as `SetStatus`. - If `kwargs` is given, it has to be names and values of an attribute as keyword argument pairs. The values can be single values or list of the same size as the `NodeCollection`. @@ -447,8 +443,6 @@ def set(self, params=None, **kwargs): See Also -------- :py:func:`get`, - :py:func:`SetStatus()`, - :py:func:`GetStatus()` """ if not self: @@ -838,8 +832,6 @@ def set(self, params=None, **kwargs): """ Set the parameters of the connections to `params`. - NB! This is almost the same implementation as SetStatus - If `kwargs` is given, it has to be names and values of an attribute as keyword argument pairs. The values can be single values or list of the same size as the `SynapseCollection`. diff --git a/pynest/nest/voltage_trace.py b/pynest/nest/voltage_trace.py index b466c6e219..488bcb209d 100644 --- a/pynest/nest/voltage_trace.py +++ b/pynest/nest/voltage_trace.py @@ -206,7 +206,7 @@ def from_device(detec, neurons=None, title=None, grayscale=False, plt.ylabel("Membrane potential (mV)") - if nest.GetStatus(detec)[0]['time_in_steps']: + if detec.time_in_steps: plt.xlabel("Steps") else: plt.xlabel("Time (%s)" % timeunit) From c24f493302daeb610aacbdd28ec9e9dd1fd390a1 Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Tue, 29 Nov 2022 22:35:26 +0100 Subject: [PATCH 087/375] Remove debug output --- pynest/nest/lib/hl_api_connection_helpers.py | 2 -- pynest/nest/lib/hl_api_helper.py | 1 - pynest/nest/lib/hl_api_types.py | 8 -------- testsuite/pytests/test_aeif_lsodar.py | 2 -- 4 files changed, 13 deletions(-) diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py index 1b82a6f866..562fbd80c4 100644 --- a/pynest/nest/lib/hl_api_connection_helpers.py +++ b/pynest/nest/lib/hl_api_connection_helpers.py @@ -237,8 +237,6 @@ def fixdict(d): d[k] = v._datum return d - print("### 7", fixdict(projections)) - nestkernel.llapi_connect_layers(pre, post, fixdict(projections)) diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py index 78bef2a1aa..a4d18ead9a 100644 --- a/pynest/nest/lib/hl_api_helper.py +++ b/pynest/nest/lib/hl_api_helper.py @@ -487,7 +487,6 @@ def get_parameters(nc, param): """ # param is single literal if isinstance(param, str): - print("### 6", param) result = nestkernel.llapi_get_nc_status(nc._datum, param) elif is_iterable(param): result = {param_name: get_parameters(nc, param_name) for param_name in param} diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 8a9c03289a..62a22ff2ce 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -406,15 +406,11 @@ def get(self, *params, **kwargs): elif output == 'json': result = to_json(result) - print("### 7", result) - if isinstance(result, dict) and len(self) == 1: new_result = {} for k,v in result.items(): new_result[k] = v[0] if is_iterable(v) and len(v) == 1 else v result = new_result - - print("### 8", result) return result @@ -454,8 +450,6 @@ def set(self, params=None, **kwargs): local_nodes = [self.local] if len(self) == 1 else self.local - print("### 1", params) - if isinstance(params, dict) and all(local_nodes): node_params = self[0].get() @@ -477,8 +471,6 @@ def set(self, params=None, **kwargs): if isinstance(params, dict): params = [params] - print("### 2", params) - nestkernel.llapi_set_nc_status(self._datum, params) def tolist(self): diff --git a/testsuite/pytests/test_aeif_lsodar.py b/testsuite/pytests/test_aeif_lsodar.py index 882cbf7221..999168fe2b 100644 --- a/testsuite/pytests/test_aeif_lsodar.py +++ b/testsuite/pytests/test_aeif_lsodar.py @@ -280,8 +280,6 @@ def test_closeness_nest_lsodar(self): # relative differences: interpolate LSODAR to match NEST times mm0 = next(iter(multimeters.values())) - print(mm0.get()) - nest_times = nest.GetStatus(mm0, "events")[0]["times"] reference = {'V_m': V_interp(nest_times), 'w': w_interp(nest_times)} From 237f2c1dd83bf16b236f847ae7def00eb4294eaf Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Tue, 29 Nov 2022 22:35:51 +0100 Subject: [PATCH 088/375] Remove outdated line --- pynest/nest/lib/hl_api_helper.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py index a4d18ead9a..a5edd7cce0 100644 --- a/pynest/nest/lib/hl_api_helper.py +++ b/pynest/nest/lib/hl_api_helper.py @@ -38,7 +38,6 @@ from string import Template -#### from ..ll_api import check_stack, sli_func, sps, sr, spp from .. import pynestkernel as kernel from .. import nestkernel_api as nestkernel import nest From 61548b39940208bfad5a732e40a651918f25d46b Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Wed, 30 Nov 2022 12:11:31 +0100 Subject: [PATCH 089/375] Remove Get/SetStatus from the PyNEST high-level API --- ...ads.py => test_set_resolution_nthreads.py} | 6 +- testsuite/pytests/test_NodeCollection.py | 33 +++-- testsuite/pytests/test_aeif_lsodar.py | 23 ++-- testsuite/pytests/test_clopath_synapse.py | 8 +- testsuite/pytests/test_compartmental_model.py | 76 ++++++----- testsuite/pytests/test_create.py | 4 +- .../test_current_recording_generators.py | 10 +- testsuite/pytests/test_erfc_neuron.py | 4 +- testsuite/pytests/test_events.py | 4 +- testsuite/pytests/test_facetshw_stdp.py | 3 +- testsuite/pytests/test_getconnections.py | 9 +- testsuite/pytests/test_glif_cond.py | 6 +- testsuite/pytests/test_glif_psc.py | 6 +- testsuite/pytests/test_json.py | 6 +- testsuite/pytests/test_labeled_synapses.py | 5 +- testsuite/pytests/test_mc_neuron.py | 44 +++--- testsuite/pytests/test_nodeParametrization.py | 129 ++---------------- testsuite/pytests/test_parrot_neuron.py | 20 ++- testsuite/pytests/test_parrot_neuron_ps.py | 23 ++-- .../test_poisson_generator_rate_change.py | 16 +-- testsuite/pytests/test_pp_psc_delta.py | 12 +- testsuite/pytests/test_pp_psc_delta_stdp.py | 12 +- testsuite/pytests/test_quantal_stp_synapse.py | 2 +- testsuite/pytests/test_rate_copy_model.py | 8 +- .../test_rate_instantaneous_and_delayed.py | 11 +- testsuite/pytests/test_rate_neuron.py | 37 ++--- .../pytests/test_rate_neuron_communication.py | 24 ++-- testsuite/pytests/test_refractory.py | 16 +-- .../pytests/test_regression_issue-1034.py | 4 +- testsuite/pytests/test_siegert_neuron.py | 9 +- .../pytests/test_sp/test_conn_builder.py | 2 +- .../test_sp/test_disconnect_multiple.py | 12 +- .../pytests/test_sp/test_growth_curves.py | 52 +++---- testsuite/pytests/test_sp/test_sp_manager.py | 2 +- .../pytests/test_sp/test_synaptic_elements.py | 24 ++-- .../test_sp/test_update_synaptic_elements.py | 11 +- ...tus_SetStatus.py => test_layer_get_set.py} | 28 ++-- testsuite/pytests/test_stdp_nn_synapses.py | 4 +- testsuite/pytests/test_stdp_synapse.py | 6 +- testsuite/pytests/test_step_rate_generator.py | 5 +- testsuite/pytests/test_threads.py | 6 +- testsuite/pytests/test_urbanczik_synapse.py | 6 +- testsuite/pytests/test_weight_recorder.py | 20 +-- 43 files changed, 276 insertions(+), 472 deletions(-) rename testsuite/pytests/mpi/4/{test_set_status_resolution_nthreads.py => test_set_resolution_nthreads.py} (89%) rename testsuite/pytests/test_spatial/{test_layer_GetStatus_SetStatus.py => test_layer_get_set.py} (83%) diff --git a/testsuite/pytests/mpi/4/test_set_status_resolution_nthreads.py b/testsuite/pytests/mpi/4/test_set_resolution_nthreads.py similarity index 89% rename from testsuite/pytests/mpi/4/test_set_status_resolution_nthreads.py rename to testsuite/pytests/mpi/4/test_set_resolution_nthreads.py index ae56833bb2..c9de8050ca 100644 --- a/testsuite/pytests/mpi/4/test_set_status_resolution_nthreads.py +++ b/testsuite/pytests/mpi/4/test_set_resolution_nthreads.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# test_set_status_resolution_nthreads.py +# test_set_resolution_nthreads.py # # This file is part of NEST. # @@ -28,7 +28,7 @@ def reset(): nest.ResetKernel() -def testSetStatus_resolution_before_nthreads(reset): +def test_set_resolution_before_nthreads(reset): """Test if resolution can be set before number of threads.""" nest.resolution = 0.5 @@ -38,7 +38,7 @@ def testSetStatus_resolution_before_nthreads(reset): assert(nest.local_num_threads == 4) -def testSetStatus_nthreads_before_resolution(reset): +def test_set_nthreads_before_resolution(reset): """Test if number of threads can be set before resolution.""" nest.local_num_threads = 4 diff --git a/testsuite/pytests/test_NodeCollection.py b/testsuite/pytests/test_NodeCollection.py index 3b747fd5cc..cddbcefd49 100644 --- a/testsuite/pytests/test_NodeCollection.py +++ b/testsuite/pytests/test_NodeCollection.py @@ -534,38 +534,37 @@ def test_connect(self): nest.Connect(n[0], n[1]) self.assertEqual(nest.num_connections, 1) - def test_SetStatus_and_GetStatus(self): + def test_get_set(self): """ - Test that SetStatus and GetStatus works as expected with - NodeCollection + Test that get() and set() work as expected with NodeCollection """ num_nodes = 10 n = nest.Create('iaf_psc_alpha', num_nodes) - nest.SetStatus(n, {'V_m': 3.5}) - self.assertEqual(nest.GetStatus(n, 'V_m')[0], 3.5) + n.set({'V_m': 3.5}) + self.assertEqual(n.get('V_m')[0], 3.5) V_m = [1., 2., 3., 4., 5., 6., 7., 8., 9., 10.] - nest.SetStatus(n, 'V_m', V_m) + n.set({'V_m': V_m}) for i in range(num_nodes): - self.assertEqual(nest.GetStatus(n, 'V_m')[i], V_m[i]) + self.assertEqual(n.get('V_m')[i], V_m[i]) with self.assertRaises(nest.kernel.NESTError): - nest.SetStatus(n, [{'V_m': 34.}, {'V_m': -5.}]) + n.set([{'V_m': 34.}, {'V_m': -5.}]) nest.ResetKernel() nc = nest.Create('iaf_psc_exp', 5) with self.assertRaises(nest.kernel.NESTError): - nest.SetStatus(n, {'V_m': -40.}) + n.set({'V_m': -40.}) with self.assertRaises(nest.kernel.NESTError): - nest.GetStatus(n) + n.get() nest.ResetKernel() n = nest.Create('iaf_psc_alpha', 3) - nest.SetStatus(n, [{'V_m': 10.}, {'V_m': -10.}, {'V_m': -20.}]) - self.assertEqual(nest.GetStatus(n, 'V_m'), (10., -10., -20.)) + n.set([{'V_m': 10.}, {'V_m': -10.}, {'V_m': -20.}]) + self.assertEqual(n.get('V_m'), (10., -10., -20.)) def test_GetConnections(self): """ @@ -645,13 +644,13 @@ def test_senders_and_targets(self): post = nest.Create("parrot_neuron", 5) # Senders and targets lists empty - self.assertFalse(nest.GetStatus(wr, "senders")) - self.assertFalse(nest.GetStatus(wr, "targets")) + self.assertFalse(wr.senders) + self.assertFalse(wr.targets) - nest.SetStatus(wr, {"senders": pre[1:3], "targets": post[3:]}) + wr.set({"senders": pre[1:3], "targets": post[3:]}) - gss = nest.GetStatus(wr, "senders") - gst = nest.GetStatus(wr, "targets") + gss = wr.senders + gst = wr.targets self.assertEqual(gss.tolist(), [3, 4]) self.assertEqual(gst.tolist(), [10, 11]) diff --git a/testsuite/pytests/test_aeif_lsodar.py b/testsuite/pytests/test_aeif_lsodar.py index 999168fe2b..67922425aa 100644 --- a/testsuite/pytests/test_aeif_lsodar.py +++ b/testsuite/pytests/test_aeif_lsodar.py @@ -231,7 +231,7 @@ def compute_difference(self, multimeters, params, reference, recordables): V_lim = (params["V_th"] + params["V_peak"]) / 2. for model, mm in iter(multimeters.items()): - dmm = nest.GetStatus(mm, "events")[0] + dmm = mm.events for record in recordables: # ignore places where a divide by zero would occur rds = np.abs(reference[record] - dmm[record]) @@ -272,15 +272,14 @@ def test_closeness_nest_lsodar(self): multimeters = {model: nest.Create("multimeter") for model in models} # connect them and simulate for model, mm in iter(multimeters.items()): - nest.SetStatus(mm, {"interval": nest.resolution, - "record_from": ["V_m", "w"]}) + mm.set({"interval": nest.resolution, "record_from": ["V_m", "w"]}) nest.Connect(mm, neurons[model]) nest.Simulate(simtime) # relative differences: interpolate LSODAR to match NEST times mm0 = next(iter(multimeters.values())) - nest_times = nest.GetStatus(mm0, "events")[0]["times"] + nest_times = mm0.events["times"] reference = {'V_m': V_interp(nest_times), 'w': w_interp(nest_times)} rel_diff = self.compute_difference(multimeters, aeif_param, reference, @@ -313,15 +312,13 @@ def test_iaf_spike_input(self): for model, mm in iter(multimeters.items()): syn_type = di_syn_types[model] key = syn_type[:syn_type.index('_')] - nest.SetStatus(mm, {"interval": nest.resolution, - "record_from": recordables[syn_type]}) + mm.set({"interval": nest.resolution, "record_from": recordables[syn_type]}) nest.Connect(mm, neurons[model]) weight = 80. if key == "psc" else 1. nest.Connect(pn, neurons[model], syn_spec={'weight': weight}) for syn_type, mm in iter(ref_mm.items()): key = syn_type[:syn_type.index('_')] - nest.SetStatus(mm, {"interval": nest.resolution, - "record_from": recordables[syn_type]}) + mm.set({"interval": nest.resolution, "record_from": recordables[syn_type]}) nest.Connect(mm, refs[syn_type]) weight = 80. if key == "psc" else 1. nest.Connect(pn, refs[syn_type], syn_spec={'weight': weight}) @@ -330,7 +327,7 @@ def test_iaf_spike_input(self): # compute the relative differences and assert tolerance for model in neurons: syn_type = di_syn_types[model] - ref_data = nest.GetStatus(ref_mm[syn_type], "events")[0] + ref_data = ref_mm[syn_type].events key = syn_type[:syn_type.index('_')] rel_diff = self.compute_difference( {model: multimeters[model]}, @@ -359,13 +356,11 @@ def test_iaf_dc_input(self): # connect them and simulate for model, mm in iter(multimeters.items()): syn_type = di_syn_types[model] - nest.SetStatus(mm, {"interval": nest.resolution, - "record_from": ["V_m"]}) + mm.set({"interval": nest.resolution, "record_from": ["V_m"]}) nest.Connect(mm, neurons[model]) nest.Connect(dcg, neurons[model]) for syn_type, mm in iter(ref_mm.items()): - nest.SetStatus(mm, {"interval": nest.resolution, - "record_from": ["V_m"]}) + mm.set({"interval": nest.resolution, "record_from": ["V_m"]}) nest.Connect(mm, refs[syn_type]) nest.Connect(dcg, refs[syn_type]) nest.Simulate(simtime) @@ -373,7 +368,7 @@ def test_iaf_dc_input(self): # compute the relative differences and assert tolerance for model in neurons: syn_type = di_syn_types[model] - ref_data = nest.GetStatus(ref_mm[syn_type], "events")[0] + ref_data = ref_mm[syn_type].events rel_diff = self.compute_difference( {model: multimeters[model]}, aeif_DT0, diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py index e3972c8941..c6afeae01d 100644 --- a/testsuite/pytests/test_clopath_synapse.py +++ b/testsuite/pytests/test_clopath_synapse.py @@ -168,7 +168,7 @@ def test_SynapseDepressionFacilitation(self): nest.Simulate(simulation_time) # Evaluation - w_events = nest.GetStatus(wr)[0]["events"] + w_events = wr.events weights = w_events["weights"] syn_weights.append(weights[-1]) @@ -219,9 +219,9 @@ def test_SynapseFunctionWithAeifModel(self): nest.Simulate(20.) # Evaluation - data = nest.GetStatus(mm) - senders = data[0]['events']['senders'] - voltages = data[0]['events']['V_m'] + data = mm.events + senders = data['senders'] + voltages = data['V_m'] vm1 = voltages[np.where(senders == 1)] vm2 = voltages[np.where(senders == 2)] diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py index e0a69d7032..22bac69b60 100644 --- a/testsuite/pytests/test_compartmental_model.py +++ b/testsuite/pytests/test_compartmental_model.py @@ -221,8 +221,7 @@ def create_tdend_4comp(dt=0.1): # create nest model with two compartments nest.ResetKernel() nest.SetKernelStatus(dict(resolution=dt)) - n_neat = nest.Create('cm_default') - nest.SetStatus(n_neat, {'V_th': 100.}) + n_neat = nest.Create('cm_default', params={'V_th': 100.}) n_neat.V_th = 100. n_neat.compartments = [ @@ -464,8 +463,8 @@ def test_inversion(self, dt=0.1, model_name='1dend_1comp'): bb[ii] += i_amp # run the NEST model for 2 timesteps (input arrives only on second step) - nest.Simulate(3.*dt) - events_neat = nest.GetStatus(m_neat, 'events')[0] + nest.Simulate(3. * dt) + events_neat = m_neat.events v_neat = np.array([events_neat['v_comp%d' % ii][-1] for ii in range(n_comp)]) # construct numpy solution @@ -504,8 +503,8 @@ def test_no_inp_inversion(self, dt=0.1, model_name='2tdend_4comp'): bb[ii] += i_amp # run the NEST model for 1 timestep - nest.Simulate(2.*dt) - events_neat = nest.GetStatus(m_neat, 'events')[0] + nest.Simulate(2. * dt) + events_neat = m_neat.events v_neat = np.array([events_neat['v_comp%d' % ii][0] for ii in range(n_comp)]) # construct numpy solution @@ -532,7 +531,7 @@ def test_attenuation(self, model_name='1dend_1comp', dt=0.1, i_amp=1., t_max=200 # run the NEST model nest.Simulate(t_max) - events_neat = nest.GetStatus(m_neat, 'events')[0] + events_neat = m_neat.events v_neat = np.array([events_neat['v_comp%d' % ii][-1] - events_neat['v_comp%d' % ii][int(t_max/(2.*dt))-1] for ii in range(n_comp)]) @@ -566,7 +565,7 @@ def test_equilibrium(self, dt=0.1, t_max=200., model_name='2tdend_4comp'): # run the NEST model nest.Simulate(t_max) - events_neat = nest.GetStatus(m_neat, 'events')[0] + events_neat = m_neat.events v_neat = np.array([events_neat['v_comp%d' % ii][-1] for ii in range(n_comp)]) # explicit solution for steady state voltage @@ -615,7 +614,7 @@ def test_conductance_input(self, model_name='1dend_1comp', dt=.01, t_max=300.): # run the NEST model nest.Simulate(t_max) - events_neat = nest.GetStatus(m_neat, 'events')[0] + events_neat = m_neat.events v_neat = np.array([events_neat['v_comp%d' % ii][-1] for ii in range(n_comp)]) # explicit solution for steady state voltage @@ -643,12 +642,12 @@ def test_spike_transmission(self, dt=.01): 'e_L': -70.0, } - n_neat_0 = nest.Create('cm_default') - nest.SetStatus(n_neat_0, {"compartments": {"parent_idx": -1, "params": soma_params}}) + n_neat_0 = nest.Create('cm_default', params={"compartments": {"parent_idx": -1, "params": soma_params}}) - n_neat_1 = nest.Create('cm_default') - nest.SetStatus(n_neat_1, {"compartments": {"parent_idx": -1, "params": soma_params}}) - nest.SetStatus(n_neat_1, {"receptors": {"comp_idx": 0, "receptor_type": "AMPA"}}) + n_neat_1 = nest.Create('cm_default', params={ + "compartments": {"parent_idx": -1, "params": soma_params}, + "receptors": {"comp_idx": 0, "receptor_type": "AMPA"} + }) syn_idx = 0 nest.Connect(n_neat_0, n_neat_1, syn_spec={'synapse_model': 'static_synapse', 'weight': .1, @@ -666,13 +665,13 @@ def test_spike_transmission(self, dt=.01): nest.Simulate(100.) - events_neat_0 = nest.GetStatus(m_neat_0, 'events')[0] - events_neat_1 = nest.GetStatus(m_neat_1, 'events')[0] + events_neat_0 = m_neat_0.events + events_neat_1 = m_neat_1.events self.assertTrue(np.any(events_neat_0['v_comp0'] != soma_params['e_L'])) self.assertTrue(np.any(events_neat_1['v_comp0'] != soma_params['e_L'])) - def test_setstatus_combinations(self, dt=0.1): + def test_set_combinations(self, dt=0.1): sg_01 = nest.Create('spike_generator', 1, {'spike_times': [10.]}) sg_02 = nest.Create('spike_generator', 1, {'spike_times': [15.]}) @@ -695,11 +694,12 @@ def test_setstatus_combinations(self, dt=0.1): nest.Connect(sg_02, n_neat_0, syn_spec={'synapse_model': 'static_synapse', 'weight': .1, 'receptor_type': 1}) # set status with single call - n_neat_1 = nest.Create('cm_default') - nest.SetStatus(n_neat_1, {"compartments": [{"parent_idx": -1, "params": SP}, - {"parent_idx": 0, "params": DP[0]}], - "receptors": [{"comp_idx": 0, "receptor_type": "GABA"}, - {"comp_idx": 1, "receptor_type": "AMPA"}]}) + n_neat_1 = nest.Create('cm_default', params={ + "compartments": [{"parent_idx": -1, "params": SP}, + {"parent_idx": 0, "params": DP[0]}], + "receptors": [{"comp_idx": 0, "receptor_type": "GABA"}, + {"comp_idx": 1, "receptor_type": "AMPA"}] + }) nest.Connect(sg_11, n_neat_1, syn_spec={'synapse_model': 'static_synapse', 'weight': .1, 'receptor_type': 0}) nest.Connect(sg_12, n_neat_1, syn_spec={'synapse_model': 'static_synapse', 'weight': .1, 'receptor_type': 1}) @@ -712,12 +712,12 @@ def test_setstatus_combinations(self, dt=0.1): nest.Simulate(100.) - events_neat_0 = nest.GetStatus(m_neat_0, 'events')[0] - events_neat_1 = nest.GetStatus(m_neat_1, 'events')[0] + events_neat_0 = m_neat_0.events + events_neat_1 = m_neat_1.events self.assertTrue(np.allclose(events_neat_0['v_comp0'], events_neat_1['v_comp0'])) - def test_getstatus(self): + def test_get(self): n_neat = nest.Create('cm_default') n_neat.compartments = [ {"parent_idx": -1, "params": SP}, @@ -860,11 +860,12 @@ def test_continuerun(self, dt=0.1): nest.ResetKernel() nest.SetKernelStatus(dict(resolution=dt)) - n_neat = nest.Create('cm_default') - nest.SetStatus(n_neat, {"compartments": [{"parent_idx": -1, "params": SP}, - {"parent_idx": 0, "params": DP[0]}], - "receptors": [{"comp_idx": 0, "receptor_type": "GABA"}, - {"comp_idx": 1, "receptor_type": "AMPA"}]}) + n_neat = nest.Create('cm_default', params={ + "compartments": [{"parent_idx": -1, "params": SP}, + {"parent_idx": 0, "params": DP[0]}], + "receptors": [{"comp_idx": 0, "receptor_type": "GABA"}, + {"comp_idx": 1, "receptor_type": "AMPA"}] + }) sg_1 = nest.Create('spike_generator', 1, {'spike_times': [10.]}) sg_2 = nest.Create('spike_generator', 1, {'spike_times': [15.]}) @@ -877,17 +878,18 @@ def test_continuerun(self, dt=0.1): nest.Simulate(100.) - events_neat_0 = nest.GetStatus(m_neat, 'events')[0] + events_neat_0 = m_neat.events # case 2: two nest.Simulate() calls nest.ResetKernel() nest.SetKernelStatus(dict(resolution=dt)) - n_neat = nest.Create('cm_default') - nest.SetStatus(n_neat, {"compartments": [{"parent_idx": -1, "params": SP}, - {"parent_idx": 0, "params": DP[0]}], - "receptors": [{"comp_idx": 0, "receptor_type": "GABA"}, - {"comp_idx": 1, "receptor_type": "AMPA"}]}) + n_neat = nest.Create('cm_default', params={ + "compartments": [{"parent_idx": -1, "params": SP}, + {"parent_idx": 0, "params": DP[0]}], + "receptors": [{"comp_idx": 0, "receptor_type": "GABA"}, + {"comp_idx": 1, "receptor_type": "AMPA"}] + }) sg_1 = nest.Create('spike_generator', 1, {'spike_times': [10.]}) sg_2 = nest.Create('spike_generator', 1, {'spike_times': [15.]}) @@ -900,7 +902,7 @@ def test_continuerun(self, dt=0.1): nest.Simulate(12.) nest.Simulate(88.) - events_neat_1 = nest.GetStatus(m_neat, 'events')[0] + events_neat_1 = m_neat.events for key in recordables: assert np.allclose(events_neat_0[key], events_neat_1[key]) diff --git a/testsuite/pytests/test_create.py b/testsuite/pytests/test_create.py index c1ef297ca0..a3de25fabf 100644 --- a/testsuite/pytests/test_create.py +++ b/testsuite/pytests/test_create.py @@ -57,7 +57,7 @@ def test_ModelCreateNdict(self): voltage = 12.0 n = nest.Create('iaf_psc_alpha', num_nodes, {'V_m': voltage}) - self.assertEqual(nest.GetStatus(n, 'V_m'), (voltage, ) * num_nodes) + self.assertEqual(n.V_m, (voltage, ) * num_nodes) def test_erroneous_param_to_create(self): """Erroneous param to Create raises exception""" @@ -82,7 +82,7 @@ def test_ModelDicts(self): V_m = (0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0) n = nest.Create('iaf_psc_alpha', num_nodes, [{'V_m': v} for v in V_m]) - self.assertEqual(nest.GetStatus(n, 'V_m'), V_m) + self.assertEqual(n.V_m, V_m) def suite(): diff --git a/testsuite/pytests/test_current_recording_generators.py b/testsuite/pytests/test_current_recording_generators.py index 53e2979d8b..8d94909da3 100644 --- a/testsuite/pytests/test_current_recording_generators.py +++ b/testsuite/pytests/test_current_recording_generators.py @@ -132,23 +132,23 @@ def test_RecordedCurrentVectors(self): nest.Simulate(50) # retrieve vectors - events_Vm = nest.GetStatus(m_Vm)[0]['events'] + events_Vm = m_Vm.events t_Vm = events_Vm['times'] v_Vm = events_Vm['V_m'] - events_ac = nest.GetStatus(m_ac)[0]['events'] + events_ac = m_ac.events t_ac = events_ac['times'] i_ac = events_ac['I'] - events_dc = nest.GetStatus(m_dc)[0]['events'] + events_dc = m_dc.events t_dc = events_dc['times'] i_dc = events_dc['I'] - events_step = nest.GetStatus(m_step)[0]['events'] + events_step = m_step.events t_step = events_step['times'] i_step = events_step['I'] - events_noise = nest.GetStatus(m_noise)[0]['events'] + events_noise = m_noise.events t_noise = events_noise['times'] i_noise = events_noise['I'] diff --git a/testsuite/pytests/test_erfc_neuron.py b/testsuite/pytests/test_erfc_neuron.py index f919096cf6..2dbea40a5c 100644 --- a/testsuite/pytests/test_erfc_neuron.py +++ b/testsuite/pytests/test_erfc_neuron.py @@ -34,8 +34,8 @@ def get_mean_activity(detector, T): returns the mean activity of a single binary neuron connected to a spin detector. """ - states = nest.GetStatus(detector)[0]['events']['state'] - times = nest.GetStatus(detector)[0]['events']['times'] + states = detector.events['state'] + times = detector.events['times'] # add total duration at the end, since we need to take into account # the time between the last state change and end of simulation times = np.hstack((times, T)) diff --git a/testsuite/pytests/test_events.py b/testsuite/pytests/test_events.py index ea1052b886..cf507ede4e 100644 --- a/testsuite/pytests/test_events.py +++ b/testsuite/pytests/test_events.py @@ -42,7 +42,7 @@ def test_EventsVoltage(self): nest.Connect(vm, n) nest.Simulate(10) - d = nest.GetStatus(vm, 'events')[0] + d = vm.events self.assertEqual(len(d['V_m']), 9) @@ -57,7 +57,7 @@ def test_EventsSpikes(self): nest.Connect(n, sr) nest.Simulate(1000) - d = nest.GetStatus(sr, 'events')[0] + d = sr.events self.assertGreater(len(d['times']), 0) diff --git a/testsuite/pytests/test_facetshw_stdp.py b/testsuite/pytests/test_facetshw_stdp.py index d02101b92a..3203f85ed7 100644 --- a/testsuite/pytests/test_facetshw_stdp.py +++ b/testsuite/pytests/test_facetshw_stdp.py @@ -80,10 +80,9 @@ def test_facetshw_stdp(self): 'a_thresh_tl': lut_th_acausal} # build network - stim = nest.Create('spike_generator') + stim = nest.Create('spike_generator', params={'spike_times': spikesIn}) neuronA = nest.Create('parrot_neuron') neuronB = nest.Create('parrot_neuron') - nest.SetStatus(stim, {'spike_times': spikesIn}) nest.SetDefaults(modelName, synapseDict) diff --git a/testsuite/pytests/test_getconnections.py b/testsuite/pytests/test_getconnections.py index 091e262f01..d88736f9d1 100644 --- a/testsuite/pytests/test_getconnections.py +++ b/testsuite/pytests/test_getconnections.py @@ -48,10 +48,8 @@ def test_GetConnections(self): d1 = tuple({"weight": w} for w in weights) c3 = nest.GetConnections(a, a) - nest.SetStatus(c3, d1) - - s1 = nest.GetStatus(c3, "weight") - self.assertEqual(s1, weights) + c3.set(d1) + self.assertEqual(c3.weight, weights) c4 = nest.GetConnections() self.assertEqual(c1, c4) @@ -61,8 +59,7 @@ def test_GetConnections(self): c5 = nest.GetConnections(a, a) c5.set(d1) - s2 = c5.get('weight') - self.assertEqual(s2, weights) + self.assertEqual(c5.get('weight'), weights) c6 = nest.GetConnections() self.assertEqual(c1, c6) diff --git a/testsuite/pytests/test_glif_cond.py b/testsuite/pytests/test_glif_cond.py index e9dd911796..feafc3751b 100644 --- a/testsuite/pytests/test_glif_cond.py +++ b/testsuite/pytests/test_glif_cond.py @@ -88,11 +88,7 @@ def simulate_w_stim(self, model_params): nest.Simulate(1000.) - times = nest.GetStatus(mm, 'events')[0]['times'] - V_m = nest.GetStatus(mm, 'events')[0]['V_m'] - spikes = nest.GetStatus(sr, 'events')[0]['times'] - - return times, V_m, spikes + return mm.events['times'], mm.events['V_m'], sr.events['times'] def ks_assert_spikes(self, spikes, reference_spikes): """Runs a two-sided Kolmogorov-Smirnov statistic test on a set of diff --git a/testsuite/pytests/test_glif_psc.py b/testsuite/pytests/test_glif_psc.py index cf41927d8d..3d6b819cd7 100644 --- a/testsuite/pytests/test_glif_psc.py +++ b/testsuite/pytests/test_glif_psc.py @@ -84,11 +84,7 @@ def simulate_w_stim(self, model_params): nest.Simulate(1000.0) - times = nest.GetStatus(mm, 'events')[0]['times'] - V_m = nest.GetStatus(mm, 'events')[0]['V_m'] - spikes = nest.GetStatus(sr, 'events')[0]['times'] - - return times, V_m, spikes + return mm.events['times'], mm.events['V_m'], sr.events['times'] def ks_assert_spikes(self, spikes, reference_spikes): """ diff --git a/testsuite/pytests/test_json.py b/testsuite/pytests/test_json.py index bbb88fbab9..07a438ae49 100644 --- a/testsuite/pytests/test_json.py +++ b/testsuite/pytests/test_json.py @@ -49,18 +49,18 @@ def test_kernel_status_JSON(self): d_json = nest.to_json(d) self.assertIsInstance(d_json, str) - def test_GetStatus_JSON(self): + def test_get_JSON(self): """JSON data of GetStatus""" for model in nest.node_models: nest.ResetKernel() n = nest.Create(model) - d_json = nest.GetStatus(n, output='json') + d_json = n.get(output='json') self.assertIsInstance(d_json, str) nest.ResetKernel() n = nest.NodeCollection() - d_json = nest.GetStatus(n, output='json') + d_json = n.get(output='json') self.assertIsInstance(d_json, str) self.assertEqual(d_json, '[]') diff --git a/testsuite/pytests/test_labeled_synapses.py b/testsuite/pytests/test_labeled_synapses.py index 6d35464c21..d336d9a480 100644 --- a/testsuite/pytests/test_labeled_synapses.py +++ b/testsuite/pytests/test_labeled_synapses.py @@ -112,8 +112,8 @@ def test_SetLabelToSynapseOnConnect(self): all([x == 123 for x in c.get('synapse_label')]) ) - def test_SetLabelToSynapseSetStatus(self): - """Set a label to a labeled synapse on SetStatus.""" + def test_SetLabelToSynapseSet(self): + """Set a label to a labeled synapse using set().""" for syn in [s for s in nest.synapse_models if s.endswith("_lbl")]: a, r_type = self.default_network(syn) @@ -201,7 +201,6 @@ def test_SetLabelToNotLabeledSynapse(self): # plain connection nest.Connect(a, a, {"rule": "one_to_one", "make_symmetric": symm}, {"synapse_model": syn, "receptor_type": r_type}) - # try set on SetStatus c = nest.GetConnections(a, a) with self.assertRaises(nest.kernel.NESTError): diff --git a/testsuite/pytests/test_mc_neuron.py b/testsuite/pytests/test_mc_neuron.py index 2c8f89e673..d57e173237 100644 --- a/testsuite/pytests/test_mc_neuron.py +++ b/testsuite/pytests/test_mc_neuron.py @@ -104,16 +104,14 @@ def setUpNodes(self): self.mm = nest.Create('multimeter', params={'record_from': rqs, 'interval': 0.1}) self.cgs = nest.Create('dc_generator', 3) - nest.SetStatus(self.cgs, [self.rec_dic_dc_soma, - self.rec_dic_dc_proximal, - self.rec_dic_dc_distal]) + self.cgs.set([self.rec_dic_dc_soma, self.rec_dic_dc_proximal, self.rec_dic_dc_distal]) + self.sgs = nest.Create('spike_generator', 6) - nest.SetStatus(self.sgs, [{'spike_times': self.rec_sp_soma_ex}, - {'spike_times': self.rec_sp_soma_in}, - {'spike_times': self.rec_sp_prox_ex}, - {'spike_times': self.rec_sp_prox_in}, - {'spike_times': self.rec_sp_dist_ex}, - {'spike_times': self.rec_sp_dist_in}]) + self.sgs.set([ + {'spike_times': self.rec_sp_soma_ex}, {'spike_times': self.rec_sp_soma_in}, + {'spike_times': self.rec_sp_prox_ex}, {'spike_times': self.rec_sp_prox_in}, + {'spike_times': self.rec_sp_dist_ex}, {'spike_times': self.rec_sp_dist_in} + ]) def setUpNetwork(self): syns = nest.GetDefaults('iaf_cond_alpha_mc')['receptor_types'] @@ -122,37 +120,29 @@ def setUpNetwork(self): 'distal_inh'] nest.Connect(self.mm, self.n) for i, l in enumerate(label[:3]): - nest.Connect(self.cgs[i], self.n, - syn_spec={'receptor_type': syns[l]}) + nest.Connect(self.cgs[i], self.n, syn_spec={'receptor_type': syns[l]}) for i, l in enumerate(label[3:]): - nest.Connect(self.sgs[i], self.n, - syn_spec={'receptor_type': syns[l]}) + nest.Connect(self.sgs[i], self.n, syn_spec={'receptor_type': syns[l]}) def testNeuron(self): self.setUpNodes() self.setUpNetwork() nest.Simulate(self.t0) - nest.SetStatus(self.n, {'soma': {'I_e': self.I_e}}) + self.n.soma = {'I_e': self.I_e} nest.Simulate(self.t_stim) - rec = nest.GetStatus(self.mm)[0]['events'] + rec = self.mm.events # test membrane potential recorded in the soma - self.assertTrue(np.allclose(rec['V_m.s'][self.I0:self.I1], - self.Vm_soma_test)) + self.assertTrue(np.allclose(rec['V_m.s'][self.I0:self.I1], self.Vm_soma_test)) # test membrane potential in the proximal compartment - self.assertTrue(np.allclose(rec['V_m.p'][self.I0:self.I1], - self.Vm_prox_test)) + self.assertTrue(np.allclose(rec['V_m.p'][self.I0:self.I1], self.Vm_prox_test)) # test membrane potential in the distal compartment - self.assertTrue(np.allclose(rec['V_m.d'][self.I0:self.I1], - self.Vm_dist_test)) + self.assertTrue(np.allclose(rec['V_m.d'][self.I0:self.I1], self.Vm_dist_test)) # test conductance recorded in the soma - self.assertTrue(np.allclose(rec['g_ex.s'][self.I0:self.I1], - self.gex_soma_test)) + self.assertTrue(np.allclose(rec['g_ex.s'][self.I0:self.I1], self.gex_soma_test)) # test conductance in the proximal compartment - self.assertTrue(np.allclose(rec['g_ex.p'][self.I0:self.I1], - self.gex_prox_test)) + self.assertTrue(np.allclose(rec['g_ex.p'][self.I0:self.I1], self.gex_prox_test)) # test conductance in the distal compartment - self.assertTrue(np.allclose(rec['g_ex.d'][self.I0:self.I1], - self.gex_dist_test)) + self.assertTrue(np.allclose(rec['g_ex.d'][self.I0:self.I1], self.gex_dist_test)) def suite(): diff --git a/testsuite/pytests/test_nodeParametrization.py b/testsuite/pytests/test_nodeParametrization.py index 4cb26b4977..a298db4983 100644 --- a/testsuite/pytests/test_nodeParametrization.py +++ b/testsuite/pytests/test_nodeParametrization.py @@ -39,7 +39,7 @@ def test_create_with_list(self): Vm_ref = [-11., -12., -13.] nodes = nest.Create('iaf_psc_alpha', 3, {'V_m': Vm_ref}) - self.assertAlmostEqual(list(nest.GetStatus(nodes, 'V_m')), Vm_ref) + self.assertAlmostEqual(list(nodes.V_m), Vm_ref) def test_create_with_several_lists(self): """Test Create with several lists as parameters""" @@ -47,21 +47,19 @@ def test_create_with_several_lists(self): Cm_ref = 124. Vmin_ref = [-1., -2., -3.] - nodes = nest.Create('iaf_psc_alpha', 3, {'V_m': Vm_ref, - 'C_m': Cm_ref, - 'V_min': Vmin_ref}) + params = {'V_m': Vm_ref, 'C_m': Cm_ref, 'V_min': Vmin_ref} + nodes = nest.Create('iaf_psc_alpha', 3, params) - self.assertAlmostEqual(list(nest.GetStatus(nodes, 'V_m')), Vm_ref) - self.assertAlmostEqual(nest.GetStatus(nodes, 'C_m'), - (Cm_ref, Cm_ref, Cm_ref)) - self.assertAlmostEqual(list(nest.GetStatus(nodes, 'V_min')), Vmin_ref) + self.assertAlmostEqual(list(nodes.V_m), Vm_ref) + self.assertAlmostEqual(list(nodes.C_m), (Cm_ref, Cm_ref, Cm_ref)) + self.assertAlmostEqual(list(nodes.V_min), Vmin_ref) def test_create_with_spike_generator(self): """Test Create with list that should not be split""" spike_times = [10., 20., 30.] sg = nest.Create('spike_generator', 2, {'spike_times': spike_times}) - st = nest.GetStatus(sg, 'spike_times') + st = sg.spike_times self.assertAlmostEqual(list(st[0]), spike_times) self.assertAlmostEqual(list(st[1]), spike_times) @@ -71,7 +69,7 @@ def test_create_with_numpy(self): Vm_ref = [-80., -90., -100.] nodes = nest.Create('iaf_psc_alpha', 3, {'V_m': np.array(Vm_ref)}) - self.assertAlmostEqual(list(nest.GetStatus(nodes, 'V_m')), Vm_ref) + self.assertAlmostEqual(list(nodes.V_m), Vm_ref) def test_create_uniform(self): """Test Create with random.uniform as parameter""" @@ -135,117 +133,6 @@ def test_create_adding(self): self.assertGreaterEqual(vm, -45.) self.assertLessEqual(vm, -25.) - def test_SetStatus_with_dict(self): - """Test SetStatus with dict""" - nodes = nest.Create('iaf_psc_alpha', 3) - Vm_ref = (-60., -60., -60.) - nest.SetStatus(nodes, {'V_m': -60.}) - - self.assertAlmostEqual(nest.GetStatus(nodes, 'V_m'), Vm_ref) - - def test_SetStatus_with_dict_several(self): - """Test SetStatus with multivalue dict""" - nodes = nest.Create('iaf_psc_alpha', 3) - Vm_ref = (-27., -27., -27.) - Cm_ref = (111., 111., 111.) - nest.SetStatus(nodes, {'V_m': -27., 'C_m': 111.}) - - self.assertAlmostEqual(nest.GetStatus(nodes, 'V_m'), Vm_ref) - self.assertAlmostEqual(nest.GetStatus(nodes, 'C_m'), Cm_ref) - - def test_SetStatus_with_list_with_dicts(self): - """Test SetStatus with list of dicts""" - nodes = nest.Create('iaf_psc_alpha', 3) - Vm_ref = (-70., -20., -88.) - nest.SetStatus(nodes, [{'V_m': -70.}, {'V_m': -20.}, {'V_m': -88.}]) - - self.assertAlmostEqual(nest.GetStatus(nodes, 'V_m'), Vm_ref) - - def test_SetStatus_with_dict_with_single_list(self): - """Test SetStatus with dict with list""" - - nodes = nest.Create('iaf_psc_alpha', 3) - Vm_ref = [-30., -40., -50.] - nest.SetStatus(nodes, {'V_m': Vm_ref}) - - self.assertAlmostEqual(list(nest.GetStatus(nodes, 'V_m')), Vm_ref) - - def test_SetStatus_with_dict_with_lists(self): - """Test SetStatus with dict with lists""" - nodes = nest.Create('iaf_psc_alpha', 3) - Vm_ref = [-11., -12., -13.] - Cm_ref = 177. - tau_minus_ref = [22., 24., 26.] - nest.SetStatus(nodes, {'V_m': Vm_ref, - 'C_m': Cm_ref, - 'tau_minus': tau_minus_ref}) - - self.assertAlmostEqual(list(nest.GetStatus(nodes, 'V_m')), Vm_ref) - self.assertAlmostEqual(nest.GetStatus(nodes, 'C_m'), - (Cm_ref, Cm_ref, Cm_ref)) - self.assertAlmostEqual(list(nest.GetStatus(nodes, 'tau_minus')), - tau_minus_ref) - - def test_SetStatus_with_dict_with_single_element_lists(self): - """Test SetStatus with dict with single element lists""" - node = nest.Create('iaf_psc_alpha') - Vm_ref = (-13.,) - Cm_ref = (222.,) - nest.SetStatus(node, {'V_m': [-13.], 'C_m': [222.]}) - - self.assertAlmostEqual(nest.GetStatus(node, 'V_m'), Vm_ref) - self.assertAlmostEqual(nest.GetStatus(node, 'C_m'), Cm_ref) - - def test_SetStatus_with_dict_with_bool(self): - """Test SetStatus with dict with bool""" - nodes = nest.Create('spike_recorder', 3) - withport_ref = (True, True, True) - nest.SetStatus(nodes, {'time_in_steps': True}) - - self.assertEqual(nest.GetStatus(nodes, 'time_in_steps'), withport_ref) - - def test_SetStatus_with_dict_with_list_with_bools(self): - """Test SetStatus with dict with list of bools""" - nodes = nest.Create('spike_recorder', 3) - withport_ref = (True, False, True) - nest.SetStatus(nodes, {'time_in_steps': [True, False, True]}) - - self.assertEqual(nest.GetStatus(nodes, 'time_in_steps'), withport_ref) - - def test_SetStatus_on_spike_generator(self): - """Test SetStatus with dict with list that is not to be split""" - sg = nest.Create('spike_generator') - nest.SetStatus(sg, {'spike_times': [1., 2., 3.]}) - - self.assertEqual(sg.spike_times, [1., 2., 3.]) - - def test_SetStatus_with_dict_with_numpy(self): - """Test SetStatus with dict with numpy""" - nodes = nest.Create('iaf_psc_alpha', 3) - - Vm_ref = np.array([-22., -33., -44.]) - nest.SetStatus(nodes, {'V_m': Vm_ref}) - - self.assertAlmostEqual(list(nest.GetStatus(nodes, 'V_m')), list(Vm_ref)) - - def test_SetStatus_with_random(self): - """Test SetStatus with dict with random.uniform""" - nodes = nest.Create('iaf_psc_alpha', 3) - nest.SetStatus(nodes, {'V_m': nest.random.uniform(-75., -55.)}) - - for vm in nodes.get('V_m'): - self.assertGreater(vm, -75.) - self.assertLess(vm, -55.) - - def test_SetStatus_with_random_as_val(self): - """Test SetStatus with val as random.uniform""" - nodes = nest.Create('iaf_psc_alpha', 3) - nest.SetStatus(nodes, 'V_m', nest.random.uniform(-75., -55.)) - - for vm in nodes.get('V_m'): - self.assertGreater(vm, -75.) - self.assertLess(vm, -55.) - def test_set_with_dict_with_single_list(self): """Test set with dict with list""" nodes = nest.Create('iaf_psc_alpha', 3) diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py index 88bc0098f9..8413087df0 100644 --- a/testsuite/pytests/test_parrot_neuron.py +++ b/testsuite/pytests/test_parrot_neuron.py @@ -55,7 +55,7 @@ def test_ParrotNeuronRepeatSpike(self): nest.Simulate(self.spike_time + 2 * self.delay) # get spike from parrot neuron - events = nest.GetStatus(self.spikes)[0]["events"] + events = self.spikes.events post_time = events['times'][ events['senders'] == self.parrot[0].get('global_id')] @@ -73,7 +73,7 @@ def test_ParrotNeuronIgnoreSpike(self): nest.Simulate(self.spike_time + 2. * self.delay) # get spike from parrot neuron, assert it was ignored - events = nest.GetStatus(self.spikes)[0]["events"] + events = self.spikes.events post_time = events['times'][ events['senders'] == self.parrot.get('global_id')] assert len(post_time) == 0, \ @@ -93,7 +93,7 @@ def test_ParrotNeuronOutgoingMultiplicity(self): nest.Simulate(self.spike_time + 2. * self.delay) # get spikes from parrot neuron, assert two were transmitted - events = nest.GetStatus(self.spikes)[0]["events"] + events = self.spikes.events post_times = events['times'][ events['senders'] == self.parrot.get('global_id')] assert len(post_times) == 2 and post_times[0] == post_times[1], \ @@ -147,11 +147,9 @@ def test_ParrotNeuronIncomingMultiplicity(self): nest.Simulate(t_sim) - n_spikes = nest.GetStatus(spike_rec)[0]['n_events'] - assert n_spikes > spikes_expected - 3 * spikes_std, \ - "parrot_neuron loses spikes." - assert n_spikes < spikes_expected + 3 * spikes_std, \ - "parrot_neuron adds spikes." + n_spikes = spike_rec.n_events + assert n_spikes > spikes_expected - 3 * spikes_std, "parrot_neuron loses spikes." + assert n_spikes < spikes_expected + 3 * spikes_std, "parrot_neuron adds spikes." @nest.ll_api.check_stack @@ -209,12 +207,10 @@ def run_protocol(self, dt): conn_spec = { "rule": "one_to_one", } - nest.Connect(pre_parrot, post_parrot, - syn_spec=syn_spec, conn_spec=conn_spec) + nest.Connect(pre_parrot, post_parrot,syn_spec=syn_spec, conn_spec=conn_spec) # get STDP synapse and weight before protocol - syn = nest.GetConnections( - source=pre_parrot, synapse_model="stdp_synapse") + syn = nest.GetConnections(source=pre_parrot, synapse_model="stdp_synapse") w_pre = syn.get('weight') last_time = max(pre_times[-1], post_times[-1]) diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py index 89087a49b0..3d8196c351 100644 --- a/testsuite/pytests/test_parrot_neuron_ps.py +++ b/testsuite/pytests/test_parrot_neuron_ps.py @@ -65,9 +65,8 @@ def test_ParrotNeuronRepeatSpike(self): nest.Simulate(_round_up(self.spike_time + 2 * self.delay)) # get spike from parrot neuron - events = nest.GetStatus(self.spikes)[0]["events"] - post_time = events['times'][ - events['senders'] == self.parrot[0].get('global_id')] + events = self.spikes.events + post_time = events['times'][events['senders'] == self.parrot[0].get('global_id')] # assert spike was repeated at correct time assert post_time, "Parrot neuron failed to repeat spike." @@ -83,9 +82,8 @@ def test_ParrotNeuronIgnoreSpike(self): nest.Simulate(_round_up(self.spike_time + 2. * self.delay)) # get spike from parrot neuron, assert it was ignored - events = nest.GetStatus(self.spikes)[0]["events"] - post_time = events['times'][ - events['senders'] == self.parrot.get('global_id')] + events = self.spikes.events + post_time = events['times'][events['senders'] == self.parrot.get('global_id')] assert len(post_time) == 0, \ "Parrot neuron failed to ignore spike arriving on port 1" @@ -103,9 +101,8 @@ def test_ParrotNeuronOutgoingMultiplicity(self): nest.Simulate(_round_up(self.spike_time + 2. * self.delay)) # get spikes from parrot neuron, assert two were transmitted - events = nest.GetStatus(self.spikes)[0]["events"] - post_times = events['times'][ - events['senders'] == self.parrot.get('global_id')] + events = self.spikes.events + post_times = events['times'][events['senders'] == self.parrot.get('global_id')] assert len(post_times) == 2 and post_times[0] == post_times[1], \ "Parrot neuron failed to correctly repeat multiple spikes." @@ -160,11 +157,9 @@ def test_ParrotNeuronIncomingMultiplicity(self): nest.Simulate(_round_up(t_sim)) - n_spikes = nest.GetStatus(spike_rec)[0]['n_events'] - assert n_spikes > spikes_expected - 3 * spikes_std, \ - "parrot_neuron loses spikes." - assert n_spikes < spikes_expected + 3 * spikes_std, \ - "parrot_neuron adds spikes." + n_spikes = spike_rec.n_events + assert n_spikes > spikes_expected - 3 * spikes_std, "parrot_neuron loses spikes." + assert n_spikes < spikes_expected + 3 * spikes_std, "parrot_neuron adds spikes." @nest.ll_api.check_stack diff --git a/testsuite/pytests/test_poisson_generator_rate_change.py b/testsuite/pytests/test_poisson_generator_rate_change.py index 39e4325f0b..e981543cb0 100644 --- a/testsuite/pytests/test_poisson_generator_rate_change.py +++ b/testsuite/pytests/test_poisson_generator_rate_change.py @@ -29,7 +29,7 @@ class TestPgRateChange(unittest.TestCase): def _kstest_first_spiketimes(self, sr, start_t, expon_scale, resolution, p_value_lim): - events = nest.GetStatus(sr)[0]['events'] + events = sr.events senders = events['senders'] times = events['times'] min_times = [np.min(times[np.where(senders == s)]) @@ -64,21 +64,17 @@ def test_statistical_rate_change(self): # Second simulation, with rate = 0 rate = 0. - nest.SetStatus(pg, {'rate': rate}) + pg.rate = rate # We need to skip a timestep to not receive the spikes from the # previous simulation run that were sent, but not received. - nest.SetStatus(sr, {'n_events': 0, - 'start': float(sim_time) + resolution, - 'stop': 2. * sim_time}) + sr.set({'n_events': 0, 'start': float(sim_time) + resolution, 'stop': 2. * sim_time}) nest.Simulate(sim_time) - self.assertEqual(nest.GetStatus(sr)[0]['n_events'], 0) + self.assertEqual(sr.n_events, 0) # Third simulation, with rate increased back up to 100 rate = 100. - nest.SetStatus(pg, {'rate': rate}) - nest.SetStatus(sr, {'n_events': 0, - 'start': 2. * sim_time, - 'stop': 3. * sim_time}) + pg.rate = rate + sr.set({'n_events': 0, 'start': 2. * sim_time, 'stop': 3. * sim_time}) nest.Simulate(sim_time) expon_scale = 1000/rate self._kstest_first_spiketimes(sr, 2. * sim_time, expon_scale, resolution, p_value_lim) diff --git a/testsuite/pytests/test_pp_psc_delta.py b/testsuite/pytests/test_pp_psc_delta.py index bdea4180ae..3385f06b36 100644 --- a/testsuite/pytests/test_pp_psc_delta.py +++ b/testsuite/pytests/test_pp_psc_delta.py @@ -55,13 +55,13 @@ def test_rate_and_fixed_dead_time(self): 't_ref_remaining': 0.0 } - nest.SetStatus(nrn, params) + nrn.set(params) sr = nest.Create('spike_recorder') nest.Connect(nrn, sr) nest.Simulate(T) - spikes = nest.GetStatus(sr)[0]['events']['times'] + spikes = sr.events['times'] rate_sim = len(spikes) / (T * 1e-3) rate_ana = 1. / (1. / lam + d * 1e-3) ratio = rate_sim / rate_ana @@ -103,13 +103,13 @@ def test_random_dead_time(self): 't_ref_remaining': 0.0 } - nest.SetStatus(nrn, params) + nrn.set(params) sr = nest.Create('spike_recorder') nest.Connect(nrn, sr) nest.Simulate(T) - spikes = nest.GetStatus(sr)[0]['events']['times'] + spikes = sr.events['times'] rate_sim = len(spikes) / (T * 1e-3) rate_ana = 1. / (1. / lam + d * 1e-3) ratio = rate_sim / rate_ana @@ -162,13 +162,13 @@ def test_adapting_threshold(self): 't_ref_remaining': 0.0 } - nest.SetStatus(nrn, params) + nrn.set(params) sr = nest.Create('spike_recorder') nest.Connect(nrn, sr) nest.Simulate(T) - spikes = nest.GetStatus(sr)[0]['events']['times'] + spikes = sr.events['times'] # This could fail due to bad luck. However, if it passes once, # then it should always do so, since the random numbers are diff --git a/testsuite/pytests/test_pp_psc_delta_stdp.py b/testsuite/pytests/test_pp_psc_delta_stdp.py index ae132cebc8..f50f6b8fe0 100644 --- a/testsuite/pytests/test_pp_psc_delta_stdp.py +++ b/testsuite/pytests/test_pp_psc_delta_stdp.py @@ -52,20 +52,18 @@ def test_pp_psc_delta_stdp(self): print(conn1) print(conn2) - sg_pre = nest.Create('spike_generator') - nest.SetStatus(sg_pre, - {'spike_times': np.arange(Dt, nsteps * Dt, 10. * Dt)}) + sg_pre = nest.Create('spike_generator', params={'spike_times': np.arange(Dt, nsteps * Dt, 10. * Dt)}) nest.Connect(sg_pre, nrn_pre) w1 = np.zeros(nsteps+1) w2 = np.zeros(nsteps+1) - w1[0] = nest.GetStatus(conn1, keys=['weight'])[0][0] - w2[0] = nest.GetStatus(conn2, keys=['weight'])[0][0] + w1[0] = conn1.weight[0] + w2[0] = conn2.weight[0] for i in range(nsteps): nest.Simulate(Dt) - w1[i+1] = nest.GetStatus(conn1, keys=['weight'])[0][0] - w2[i+1] = nest.GetStatus(conn2, keys=['weight'])[0][0] + w1[i+1] = conn1.weight[0] + w2[i+1] = conn2.weight[0] self.assertEqual(list(w1), list(w2)) diff --git a/testsuite/pytests/test_quantal_stp_synapse.py b/testsuite/pytests/test_quantal_stp_synapse.py index ae37ba05c8..5f46de402e 100644 --- a/testsuite/pytests/test_quantal_stp_synapse.py +++ b/testsuite/pytests/test_quantal_stp_synapse.py @@ -80,7 +80,7 @@ def test_QuantalSTPSynapse(self): for t in range(n_trials): t_net = nest.biological_time - nest.SetStatus(source, {"origin": t_net}) + source.origin = t_net nest.Simulate(t_tot) nest.Simulate(.1) # flush the last voltmeter events from the queue diff --git a/testsuite/pytests/test_rate_copy_model.py b/testsuite/pytests/test_rate_copy_model.py index cb9bc8485c..675b58e601 100644 --- a/testsuite/pytests/test_rate_copy_model.py +++ b/testsuite/pytests/test_rate_copy_model.py @@ -85,12 +85,10 @@ def test_rate_copy_model(self): nest.Simulate(simtime) # make sure rates are identical - events = nest.GetStatus(multimeter)[0]['events'] + events = multimeter.events senders = events['senders'] - rate_1 = np.array(events['rate'][ - np.where(senders == rate_neuron_1.get('global_id'))]) - rate_2 = np.array(events['rate'][ - np.where(senders == rate_neuron_2.get('global_id'))]) + rate_1 = np.array(events['rate'][np.where(senders == rate_neuron_1.get('global_id'))]) + rate_2 = np.array(events['rate'][np.where(senders == rate_neuron_2.get('global_id'))]) assert(np.sum(np.abs(rate_2 - rate_1)) < 1e-12) diff --git a/testsuite/pytests/test_rate_instantaneous_and_delayed.py b/testsuite/pytests/test_rate_instantaneous_and_delayed.py index 95c60b7f1c..86cb0dbb86 100644 --- a/testsuite/pytests/test_rate_instantaneous_and_delayed.py +++ b/testsuite/pytests/test_rate_instantaneous_and_delayed.py @@ -84,15 +84,12 @@ def test_rate_instantaneous_and_delayed(self): nest.Simulate(simtime) # make sure shifted rates are identical - events = nest.GetStatus(multimeter)[0]['events'] + events = multimeter.events senders = events['senders'] - rate_1 = np.array(events['rate'][ - np.where(senders == rate_neuron_1.get('global_id'))]) - times_2 = np.array(events['times'][ - np.where(senders == rate_neuron_2.get('global_id'))]) - rate_2 = np.array(events['rate'][ - np.where(senders == rate_neuron_2.get('global_id'))]) + rate_1 = np.array(events['rate'][np.where(senders == rate_neuron_1.get('global_id'))]) + times_2 = np.array(events['times'][np.where(senders == rate_neuron_2.get('global_id'))]) + rate_2 = np.array(events['rate'][np.where(senders == rate_neuron_2.get('global_id'))]) # get shifted rate_2 rate_2 = rate_2[times_2 > delay] diff --git a/testsuite/pytests/test_rate_neuron.py b/testsuite/pytests/test_rate_neuron.py index caf5c483ae..f69e12f881 100644 --- a/testsuite/pytests/test_rate_neuron.py +++ b/testsuite/pytests/test_rate_neuron.py @@ -72,22 +72,16 @@ def test_RateNeuronMean(self): nest.Simulate(self.simtime) # get noise from rate neurons - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events['senders'] - senders_ipn = np.where( - senders == self.rate_neuron_ipn.get('global_id'))[0] - senders_opn = np.where( - senders == self.rate_neuron_opn.get('global_id'))[0] + senders_ipn = np.where(senders == self.rate_neuron_ipn.get('global_id'))[0] + senders_opn = np.where(senders == self.rate_neuron_opn.get('global_id'))[0] mean_rate_ipn = np.mean(events['rate'][senders_ipn]) mean_rate_opn = np.mean(events['rate'][senders_opn]) - self.assertTrue( - np.isclose(mean_rate_ipn, self.neuron_params['mu'], - rtol=self.rtol)) - self.assertTrue( - np.isclose(mean_rate_opn, self.neuron_params['mu'], - rtol=self.rtol)) + self.assertTrue(np.isclose(mean_rate_ipn, self.neuron_params['mu'], rtol=self.rtol)) + self.assertTrue(np.isclose(mean_rate_opn, self.neuron_params['mu'], rtol=self.rtol)) def test_RateNeuronNoise(self): """Check noise of the rate_neurons""" @@ -96,24 +90,18 @@ def test_RateNeuronNoise(self): nest.Simulate(self.simtime) # get noise from rate neurons - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events['senders'] - senders_ipn = np.where( - senders == self.rate_neuron_ipn.get('global_id'))[0] - senders_opn = np.where( - senders == self.rate_neuron_opn.get('global_id'))[0] + senders_ipn = np.where(senders == self.rate_neuron_ipn.get('global_id'))[0] + senders_opn = np.where(senders == self.rate_neuron_opn.get('global_id'))[0] noise_ipn = events['noise'][senders_ipn] std_noise_ipn = np.std(noise_ipn) noise_opn = events['noise'][senders_opn] std_noise_opn = np.std(noise_opn) - self.assertTrue( - np.isclose(std_noise_ipn, self.neuron_params['sigma'], - rtol=self.rtol)) - self.assertTrue( - np.isclose(std_noise_opn, self.neuron_params['sigma'], - rtol=self.rtol)) + self.assertTrue(np.isclose(std_noise_ipn, self.neuron_params['sigma'], rtol=self.rtol)) + self.assertTrue(np.isclose(std_noise_opn, self.neuron_params['sigma'], rtol=self.rtol)) def test_RateNeuronVariance(self): """Check the variance of the rate of the rate_neuron for input noise""" @@ -122,10 +110,9 @@ def test_RateNeuronVariance(self): nest.Simulate(self.simtime) # get variance of the rate - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events['senders'] - senders_ipn = np.where( - senders == self.rate_neuron_ipn.get('global_id'))[0] + senders_ipn = np.where(senders == self.rate_neuron_ipn.get('global_id'))[0] rate = events['rate'][senders_ipn] var_rate = np.var(rate) diff --git a/testsuite/pytests/test_rate_neuron_communication.py b/testsuite/pytests/test_rate_neuron_communication.py index 2f2bfb3880..33c3208f68 100644 --- a/testsuite/pytests/test_rate_neuron_communication.py +++ b/testsuite/pytests/test_rate_neuron_communication.py @@ -132,7 +132,7 @@ def test_RateNeuronDelay(self): nest.Simulate(self.simtime) # get noise from rate neuron - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events['senders'] rate_neuron_1_node_id = self.rate_neuron_1.get('global_id') @@ -154,7 +154,7 @@ def test_RateNeuronWeight(self): nest.Simulate(self.simtime) # get noise from rate neuron - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events['senders'] rate_neuron_1_node_id = self.rate_neuron_1.get('global_id') @@ -172,13 +172,13 @@ def test_RateNeuronNL(self): for g, ls in zip(gs, lin_sums): - nest.SetStatus(self.neurons, {'g': g, 'linear_summation': ls}) + self.neurons.set({'g': g, 'linear_summation': ls}) # simulate nest.Simulate(self.simtime) # get noise from rate neuron - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events['senders'] rate_neuron_1_node_id = self.rate_neuron_1.get('global_id') @@ -196,9 +196,8 @@ def test_RateNeuronNL(self): rates = np.array([rate_1, rate_2, rate_3, rate_4]) # for multiplicative coupling - a = g * self.drive * self.weight * \ - nest.GetStatus(self.rate_neuron_4)[0]['g_ex'] - theta = nest.GetStatus(self.rate_neuron_4)[0]['theta_ex'] + a = g * self.drive * self.weight * self.rate_neuron_4.g_ex + theta = self.rate_neuron_4.theta_ex if ls: @@ -224,7 +223,7 @@ def test_RectifyOutput(self): nest.Simulate(self.simtime) # get activity from rate neuron - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events['senders'] rate_neuron_5_node_id = self.rate_neuron_5.get('global_id') @@ -237,22 +236,21 @@ def test_RectifyOutput(self): def test_ParrotRateNeuron(self): """Check the parrot rate neuron with sigm non-linearity""" - nest.SetStatus(self.parrot_neuron, {'g': 0.1}) + self.parrot_neuron.g = 0.1 # simulate nest.Simulate(self.simtime) # get activity from rate neuron - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events['senders'] parrot_node_id = self.parrot_neuron.get('global_id') parrot_rate = events['rate'][np.where(senders == parrot_node_id)] value = parrot_rate[-1] - g = nest.GetStatus(self.parrot_neuron)[0]['g'] - value_test = (g * self.weight * self.drive)**4 / \ - (0.1**4 + (g * self.weight * self.drive)**4) + g = self.parrot_neuron.g + value_test = (g * self.weight * self.drive)**4 / (0.1**4 + (g * self.weight * self.drive)**4) self.assertTrue(np.isclose(value, value_test)) diff --git a/testsuite/pytests/test_refractory.py b/testsuite/pytests/test_refractory.py index f1cda2805c..da8e928b1c 100644 --- a/testsuite/pytests/test_refractory.py +++ b/testsuite/pytests/test_refractory.py @@ -141,7 +141,7 @@ def compute_reftime(self, model, sr, vm, neuron): t_ref_sim : double Value of the simulated refractory period. ''' - spike_times = nest.GetStatus(sr, "events")[0]["times"] + spike_times = sr.events["times"] if model in neurons_interspike: # Spike emitted at next timestep so substract resolution @@ -149,13 +149,13 @@ def compute_reftime(self, model, sr, vm, neuron): elif model in neurons_interspike_ps: return spike_times[1]-spike_times[0] else: - Vr = nest.GetStatus(neuron, "V_reset")[0] - times = nest.GetStatus(vm, "events")[0]["times"] + Vr = neuron.V_reset + times = vm.events["times"] # Index of the 2nd spike idx_max = np.argwhere(times == spike_times[1])[0][0] name_Vm = "V_m.s" if model in mc_models else "V_m" - Vs = nest.GetStatus(vm, "events")[0][name_Vm] + Vs = vm.events[name_Vm] # Get the index at which the spike occured idx_spike = np.argwhere(times == spike_times[0])[0][0] @@ -193,12 +193,12 @@ def test_refractory_time(self): # trigger almost immediate spiking => t_ref almost equals # interspike if model in neurons_interspike_ps: - nest.SetStatus(cg, "amplitude", 10000000.) + cg.amplitude = 10000000. elif model == 'ht_neuron': # ht_neuron use too long time with a very large amplitude - nest.SetStatus(cg, "amplitude", 2000.) + cg.amplitude = 2000. elif model in neurons_interspike: - nest.SetStatus(cg, "amplitude", 15000.) + cg.amplitude = 15000. # Connect them and simulate nest.Connect(vm, neuron) @@ -211,7 +211,7 @@ def test_refractory_time(self): t_ref_sim = self.compute_reftime(model, sr, vm, neuron) if model in neurons_with_clamping: - t_ref_sim = t_ref_sim - nest.GetStatus(neuron, "t_clamp")[0] + t_ref_sim = t_ref_sim - neuron.t_clamp # Approximate result for precise spikes (interpolation error) if model in neurons_interspike_ps: diff --git a/testsuite/pytests/test_regression_issue-1034.py b/testsuite/pytests/test_regression_issue-1034.py index e4a7ff0451..085df2cabc 100644 --- a/testsuite/pytests/test_regression_issue-1034.py +++ b/testsuite/pytests/test_regression_issue-1034.py @@ -106,7 +106,7 @@ def run_post_trace_test_nest_(self, trace_nest_t = [] t = nest.biological_time trace_nest_t.append(t) - post_tr = nest.GetStatus(post_parrot_ps)[0]['post_trace'] + post_tr = post_parrot_ps.post_trace trace_nest.append(post_tr) for step in range(n_steps): print("\n[py] simulating for " + str(self.delay_) + " ms") @@ -116,7 +116,7 @@ def run_post_trace_test_nest_(self, np.abs(t - np.array(self.pre_spike_times_) - self.delay_) < self.resolution_ / 2.) if show_all_nest_trace_samples or nearby_pre_spike: trace_nest_t.append(t) - post_tr = nest.GetStatus(post_parrot_ps)[0]['post_trace'] + post_tr = post_parrot_ps.post_trace trace_nest.append(post_tr) print("[py] Received NEST trace: " + str(post_tr) + " at time t = " + str(t)) diff --git a/testsuite/pytests/test_siegert_neuron.py b/testsuite/pytests/test_siegert_neuron.py index 053e13f2f4..78ec45c9b7 100644 --- a/testsuite/pytests/test_siegert_neuron.py +++ b/testsuite/pytests/test_siegert_neuron.py @@ -108,23 +108,22 @@ def simulate_fix_input_stats(self, mu, sigma): dt_scaling = np.sqrt((1 + exp_dt) / (1 - exp_dt)) mean = mV_to_pA * mu std = mV_to_pA * sigma * dt_scaling / np.sqrt(2) - nest.SetStatus(self.noise_generator, {"mean": mean, "std": std}) + self.noise_generator.set({"mean": mean, "std": std}) # set initial membrane voltage distribution with stationary statistics - nest.SetStatus(self.iaf_psc_delta, {"V_m": - nest.random.normal(mean=mu, std=sigma/np.sqrt(2))}) + self.iaf_psc_delta.V_m = nest.random.normal(mean=mu, std=sigma/np.sqrt(2)) # simulate nest.Simulate(self.simtime) # get rate prediction from Siegert neuron - events = nest.GetStatus(self.multimeter)[0]["events"] + events = self.multimeter.events senders = events["senders"] rate_mask = np.where(senders == self.siegert_neuron.get("global_id")) rate_prediction = events["rate"][rate_mask][-1] # get rate of integrate-and-fire neuron - n_spikes = nest.GetStatus(self.spike_recorder)[0]["n_events"] + n_spikes = self.spike_recorder.n_events rate_iaf = n_spikes / ((self.simtime - self.start) * 1e-3) / self.N return rate_prediction, rate_iaf diff --git a/testsuite/pytests/test_sp/test_conn_builder.py b/testsuite/pytests/test_sp/test_conn_builder.py index 6e342bb8c6..db58280000 100644 --- a/testsuite/pytests/test_sp/test_conn_builder.py +++ b/testsuite/pytests/test_sp/test_conn_builder.py @@ -41,7 +41,7 @@ def test_synapse_initialisation_one_to_one(self): } }) nest.Connect(neurons, neurons, "one_to_one", syn_dict) - status_list = nest.GetStatus(neurons, 'synaptic_elements') + status_list = neurons.synaptic_elements for status in status_list: self.assertEqual(1, status['SE1']['z_connected']) self.assertEqual(1, status['SE2']['z_connected']) diff --git a/testsuite/pytests/test_sp/test_disconnect_multiple.py b/testsuite/pytests/test_sp/test_disconnect_multiple.py index b9d9284b98..c4c1d06e28 100644 --- a/testsuite/pytests/test_sp/test_disconnect_multiple.py +++ b/testsuite/pytests/test_sp/test_disconnect_multiple.py @@ -76,7 +76,7 @@ def test_multiple_synapse_deletion_all_to_all(self): # Test if the connected synaptic elements before the simulation # are correct - status = nest.GetStatus(neurons, 'synaptic_elements') + status = neurons.synaptic_elements for st_neuron in status: self.assertEqual(10, st_neuron['SE1']['z_connected']) self.assertEqual(10, st_neuron['SE2']['z_connected']) @@ -96,7 +96,7 @@ def test_multiple_synapse_deletion_all_to_all(self): conndictionary, syndictionary ) - status = nest.GetStatus(neurons, 'synaptic_elements') + status = neurons.synaptic_elements for st_neuron in status[0:5]: self.assertEqual(5, st_neuron['SE1']['z_connected']) self.assertEqual(10, st_neuron['SE2']['z_connected']) @@ -129,7 +129,7 @@ def test_multiple_synapse_deletion_one_to_one(self): # Test if the connected synaptic elements before the simulation # are correct - status = nest.GetStatus(neurons, 'synaptic_elements') + status = neurons.synaptic_elements for st_neuron in status: self.assertEqual(10, st_neuron['SE1']['z_connected']) self.assertEqual(10, st_neuron['SE2']['z_connected']) @@ -149,7 +149,7 @@ def test_multiple_synapse_deletion_one_to_one(self): conndictionary, syndictionary ) - status = nest.GetStatus(neurons, 'synaptic_elements') + status = neurons.synaptic_elements for st_neuron in status[0:5]: self.assertEqual(9, st_neuron['SE1']['z_connected']) self.assertEqual(10, st_neuron['SE2']['z_connected']) @@ -208,7 +208,7 @@ def test_single_synapse_deletion_sp(self): # Test if the connected synaptic elements before the simulation # are correct - status = nest.GetStatus(neurons, 'synaptic_elements') + status = neurons.synaptic_elements for st_neuron in status: self.assertEqual(2, st_neuron['SE1']['z_connected']) self.assertEqual(2, st_neuron['SE2']['z_connected']) @@ -221,7 +221,7 @@ def test_single_synapse_deletion_sp(self): assert conns nest.Disconnect( neurons[srcId], neurons[targId], syn_spec=syn_dict) - status = nest.GetStatus(neurons, 'synaptic_elements') + status = neurons.synaptic_elements self.assertEqual(1, status[srcId]['SE1']['z_connected']) self.assertEqual(2, status[srcId]['SE2']['z_connected']) self.assertEqual(2, status[targId]['SE1']['z_connected']) diff --git a/testsuite/pytests/test_sp/test_growth_curves.py b/testsuite/pytests/test_sp/test_growth_curves.py index 089bd8a01e..97253b7dd3 100644 --- a/testsuite/pytests/test_sp/test_growth_curves.py +++ b/testsuite/pytests/test_sp/test_growth_curves.py @@ -292,8 +292,7 @@ def setUp(self): self.pop = nest.Create('iaf_psc_alpha', 10) self.spike_recorder = nest.Create('spike_recorder') nest.Connect(self.pop, self.spike_recorder, 'all_to_all') - noise = nest.Create('poisson_generator') - nest.SetStatus(noise, {"rate": 800000.0}) + noise = nest.Create('poisson_generator', params={"rate": 800000.0}) nest.Connect(noise, self.pop, 'all_to_all') def simulate(self): @@ -309,12 +308,11 @@ def simulate(self): for t_i, t in enumerate(self.sim_steps): for n_i in range(len(self.pop)): - self.ca_nest[n_i][t_i], synaptic_elements = nest.GetStatus( - self.pop[n_i], ('Ca', 'synaptic_elements'))[0] + self.ca_nest[n_i][t_i], synaptic_elements = self.pop[n_i].get(['Ca', 'synaptic_elements']) self.se_nest[n_i][t_i] = synaptic_elements['se']['z'] nest.Simulate(self.sim_step) - tmp = nest.GetStatus(self.spike_recorder, 'events')[0] + tmp = self.spike_recorder.events spikes_all = tmp['times'] senders_all = tmp['senders'] for n_i, n in enumerate(self.pop): @@ -339,21 +337,18 @@ def test_linear_growth_curve(self): tau_ca = 10000.0 growth_rate = 0.0001 eps = 0.10 - nest.SetStatus( - self.pop, - { - 'beta_Ca': beta_ca, - 'tau_Ca': tau_ca, - 'synaptic_elements': { - 'se': { - 'growth_curve': 'linear', - 'growth_rate': growth_rate, - 'eps': eps, - 'z': 0.0 - } + self.pop.set({ + 'beta_Ca': beta_ca, + 'tau_Ca': tau_ca, + 'synaptic_elements': { + 'se': { + 'growth_curve': 'linear', + 'growth_rate': growth_rate, + 'eps': eps, + 'z': 0.0 } } - ) + }) self.se_integrator.append(LinearExactSEI( tau_ca=tau_ca, beta_ca=beta_ca, eps=eps, growth_rate=growth_rate)) self.se_integrator.append(LinearNumericSEI( @@ -381,20 +376,17 @@ def test_gaussian_growth_curve(self): growth_rate = 0.0001 eta = 0.05 eps = 0.10 - nest.SetStatus( - self.pop, - { - 'beta_Ca': beta_ca, - 'tau_Ca': tau_ca, - 'synaptic_elements': { - 'se': { - 'growth_curve': 'gaussian', - 'growth_rate': growth_rate, - 'eta': eta, 'eps': eps, 'z': 0.0 - } + self.pop.set({ + 'beta_Ca': beta_ca, + 'tau_Ca': tau_ca, + 'synaptic_elements': { + 'se': { + 'growth_curve': 'gaussian', + 'growth_rate': growth_rate, + 'eta': eta, 'eps': eps, 'z': 0.0 } } - ) + }) self.se_integrator.append( GaussianNumericSEI(tau_ca=tau_ca, beta_ca=beta_ca, eta=eta, eps=eps, growth_rate=growth_rate)) diff --git a/testsuite/pytests/test_sp/test_sp_manager.py b/testsuite/pytests/test_sp/test_sp_manager.py index bd2ac2245b..c6ca3b0587 100644 --- a/testsuite/pytests/test_sp/test_sp_manager.py +++ b/testsuite/pytests/test_sp/test_sp_manager.py @@ -140,7 +140,7 @@ def test_synapse_creation(self): }) nest.EnableStructuralPlasticity() nest.Simulate(10.0) - status = nest.GetStatus(neurons, 'synaptic_elements') + status = neurons.synaptic_elements for st_neuron in status: assert st_neuron['SE1']['z_connected'] == 10 assert st_neuron['SE2']['z_connected'] == 10 diff --git a/testsuite/pytests/test_sp/test_synaptic_elements.py b/testsuite/pytests/test_sp/test_synaptic_elements.py index 6c4d259f8d..d5383cd18f 100644 --- a/testsuite/pytests/test_sp/test_synaptic_elements.py +++ b/testsuite/pytests/test_sp/test_synaptic_elements.py @@ -22,38 +22,34 @@ import nest import unittest -__author__ = 'naveau' - class TestSynapticElements(unittest.TestCase): def setUp(self): nest.ResetKernel() - def test_set_status(self): + def test_set(self): synaptic_element_dict = { u'SE': {u'z': 15.0, u'growth_curve': u'linear'}} neuron = nest.Create('iaf_psc_alpha', 1) - nest.SetStatus(neuron, {'synaptic_elements': synaptic_element_dict}) - neuron_synaptic_elements = nest.GetStatus( - neuron, 'synaptic_elements')[0] + neuron.set({'synaptic_elements': synaptic_element_dict}) + neuron_synaptic_elements = neuron.synaptic_elements self.assertIn('SE', neuron_synaptic_elements) self.assertDictContainsSubset( synaptic_element_dict[u'SE'], neuron_synaptic_elements[u'SE']) - def test_set_status_overwrite(self): + def test_set_overwrite(self): synaptic_element_dict1 = { u'SE1': {u'z': 15.0, u'growth_curve': u'linear'}} synaptic_element_dict2 = { u'SE2': {u'z': 10.0, u'growth_curve': u'gaussian'}} neuron = nest.Create('iaf_psc_alpha', 1) - nest.SetStatus(neuron, {'synaptic_elements': synaptic_element_dict1}) - nest.SetStatus(neuron, {'synaptic_elements': synaptic_element_dict2}) + neuron({'synaptic_elements': synaptic_element_dict1}) + neuron({'synaptic_elements': synaptic_element_dict2}) - neuron_synaptic_elements = nest.GetStatus( - neuron, 'synaptic_elements')[0] + neuron_synaptic_elements = neuron.synaptic_elements self.assertNotIn('SE1', neuron_synaptic_elements) self.assertIn('SE2', neuron_synaptic_elements) self.assertDictContainsSubset( @@ -66,8 +62,7 @@ def test_set_defaults(self): nest.SetDefaults( 'iaf_psc_alpha', {'synaptic_elements': synaptic_element_dict}) neuron = nest.Create('iaf_psc_alpha', 1) - neuron_synaptic_elements = nest.GetStatus( - neuron, 'synaptic_elements')[0] + neuron_synaptic_elements = neuron.synaptic_elements self.assertIn('SE', neuron_synaptic_elements) self.assertDictContainsSubset( synaptic_element_dict[u'SE'], neuron_synaptic_elements[u'SE']) @@ -84,8 +79,7 @@ def test_set_defaults_overwrite(self): 'iaf_psc_alpha', {'synaptic_elements': synaptic_element_dict2}) neuron = nest.Create('iaf_psc_alpha', 1) - neuron_synaptic_elements = nest.GetStatus( - neuron, 'synaptic_elements')[0] + neuron_synaptic_elements = neuron.synaptic_elements self.assertNotIn('SE1', neuron_synaptic_elements) self.assertIn('SE2', neuron_synaptic_elements) self.assertDictContainsSubset( diff --git a/testsuite/pytests/test_sp/test_update_synaptic_elements.py b/testsuite/pytests/test_sp/test_update_synaptic_elements.py index a31c9d3d48..6eb73a6e47 100644 --- a/testsuite/pytests/test_sp/test_update_synaptic_elements.py +++ b/testsuite/pytests/test_sp/test_update_synaptic_elements.py @@ -54,10 +54,8 @@ def test_update_synaptic_elements(self): 'Axon': new_growth_curve_axonal } - neuron = nest.Create('iaf_psc_alpha', 1) - nest.SetStatus(neuron, {'synaptic_elements': structural_p_elements}) - neuron_synaptic_elements = nest.GetStatus( - neuron, 'synaptic_elements')[0] + neuron = nest.Create('iaf_psc_alpha', 1, {'synaptic_elements': structural_p_elements}) + neuron_synaptic_elements = neuron.synaptic_elements self.assertIn('Den_ex', neuron_synaptic_elements) self.assertIn('Axon', neuron_synaptic_elements) @@ -69,9 +67,8 @@ def test_update_synaptic_elements(self): neuron_synaptic_elements[u'Den_ex']) # Update Axon elements - nest.SetStatus(neuron, 'synaptic_elements_param', elements_to_update) - neuron_synaptic_elements = nest.GetStatus( - neuron, 'synaptic_elements')[0] + neuron.synaptic_elements_param = elements_to_update + neuron_synaptic_elements = neuron.synaptic_elements self.assertIn('Den_ex', neuron_synaptic_elements) self.assertIn('Axon', neuron_synaptic_elements) diff --git a/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py b/testsuite/pytests/test_spatial/test_layer_get_set.py similarity index 83% rename from testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py rename to testsuite/pytests/test_spatial/test_layer_get_set.py index e742293733..f691b2cdce 100644 --- a/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py +++ b/testsuite/pytests/test_spatial/test_layer_get_set.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# test_layer_GetStatus_SetStatus.py +# test_layer_get_set.py # # This file is part of NEST. # @@ -20,7 +20,7 @@ # along with NEST. If not, see . """ -Tests for GetStatus, SetStatus, get and set calls for layer NodeCollections. +Tests for get and set calls for layer NodeCollections. """ import unittest @@ -32,23 +32,21 @@ class GetSetTestCase(unittest.TestCase): def setUp(self): nest.ResetKernel() - def test_LayerSetStatus(self): - """Test SetStatus on layer NodeCollection.""" + def test_LayerSet(self): + """Test Set on layer NodeCollection.""" - layer = nest.Create('iaf_psc_alpha', - positions=nest.spatial.grid( - shape=[3, 3], - extent=[2., 2.], - edge_wrap=True)) + layer_shape = [3, 3] + layer = nest.Create('iaf_psc_alpha', positions=nest.spatial.grid( + shape=layer_shape, + extent=[2., 2.], + edge_wrap=True + )) with self.assertRaises(nest.kernel.NESTErrors.DictError): - nest.SetStatus(layer, {'center': [1., 1.]}) - - nest.SetStatus(layer, 'V_m', -50.) + layer.center = [1., 1.] - self.assertEqual(nest.GetStatus(layer, 'V_m'), - (-50., -50., -50., -50., -50., - -50., -50., -50., -50.)) + layer.V_m = -50. + self.assertEqual(layer.V_m, (-50.,) * layer_shape[0] * layer_shape[1]) def test_LayerSpatial(self): """Test spatial parameter on layer NodeCollection.""" diff --git a/testsuite/pytests/test_stdp_nn_synapses.py b/testsuite/pytests/test_stdp_nn_synapses.py index cdc3ed3733..5226a6cfa5 100644 --- a/testsuite/pytests/test_stdp_nn_synapses.py +++ b/testsuite/pytests/test_stdp_nn_synapses.py @@ -149,10 +149,10 @@ def do_the_nest_simulation(self): nest.Simulate(self.simulation_duration) - all_spikes = nest.GetStatus(spike_recorder, keys='events')[0] + all_spikes = spike_recorder.events pre_spikes = all_spikes['times'][all_spikes['senders'] == presynaptic_neuron.tolist()[0]] post_spikes = all_spikes['times'][all_spikes['senders'] == postsynaptic_neuron.tolist()[0]] - weight = nest.GetStatus(plastic_synapse_of_interest, keys='weight')[0] + weight = plastic_synapse_of_interest.weight return (pre_spikes, post_spikes, weight) def reproduce_weight_drift(self, _pre_spikes, _post_spikes, diff --git a/testsuite/pytests/test_stdp_synapse.py b/testsuite/pytests/test_stdp_synapse.py index ac26431027..2a0a894f15 100644 --- a/testsuite/pytests/test_stdp_synapse.py +++ b/testsuite/pytests/test_stdp_synapse.py @@ -158,12 +158,12 @@ def do_the_nest_simulation(self): nest.Simulate(self.simulation_duration) - all_spikes = nest.GetStatus(spike_recorder, keys='events')[0] + all_spikes = spike_recorder.events pre_spikes = all_spikes['times'][all_spikes['senders'] == presynaptic_neuron.tolist()[0]] post_spikes = all_spikes['times'][all_spikes['senders'] == postsynaptic_neuron.tolist()[0]] - t_hist = nest.GetStatus(wr, "events")[0]["times"] - weight = nest.GetStatus(wr, "events")[0]["weights"] + t_hist = wr.events["times"] + weight = wr.events["weights"] return pre_spikes, post_spikes, t_hist, weight diff --git a/testsuite/pytests/test_step_rate_generator.py b/testsuite/pytests/test_step_rate_generator.py index 1cbbfa9004..90b2fc0738 100644 --- a/testsuite/pytests/test_step_rate_generator.py +++ b/testsuite/pytests/test_step_rate_generator.py @@ -49,8 +49,7 @@ def test_step_rate_generator(self): 'record_from': ['rate'], 'interval': 100.0}) # configure srg - nest.SetStatus(srg, {"amplitude_times": [ - 10.0, 110.0, 210.0], "amplitude_values": rates}) + srg.set({"amplitude_times": [10.0, 110.0, 210.0], "amplitude_values": rates}) # connect srg to neuron nest.Connect(srg, neuron, "one_to_one", @@ -63,7 +62,7 @@ def test_step_rate_generator(self): nest.Simulate(301.) # read data from multimeter - data = nest.GetStatus(mm)[0]['events'] + data = mm.events rates_neuron = np.array( data['rate'][np.where(data['senders'] == neuron.get('global_id'))]) rates_srg = np.array(data['rate'][ diff --git a/testsuite/pytests/test_threads.py b/testsuite/pytests/test_threads.py index a0b5a2640c..d5aa485778 100644 --- a/testsuite/pytests/test_threads.py +++ b/testsuite/pytests/test_threads.py @@ -47,7 +47,7 @@ def test_Threads(self): nest.local_num_threads = 8 n = nest.Create('iaf_psc_alpha', 8) - st = list(nest.GetStatus(n, 'vp')) + st = list(n.vp) st.sort() self.assertEqual(st, [0, 1, 2, 3, 4, 5, 6, 7]) @@ -101,8 +101,8 @@ def test_ThreadsGetEvents(self): nest.Simulate(Simtime) - n_events_sr.append(nest.GetStatus(sr, 'n_events')[0]) - n_events_vm.append(nest.GetStatus(vm, 'n_events')[0]) + n_events_sr.append(sr.n_events) + n_events_vm.append(vm.n_events) ref_vm = N * (Simtime - 1) ref_sr = n_events_sr[0] diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py index 540ec15b78..8c133f831f 100644 --- a/testsuite/pytests/test_urbanczik_synapse.py +++ b/testsuite/pytests/test_urbanczik_synapse.py @@ -182,7 +182,7 @@ def test_SynapseDepressionFacilitation(self): read out devices ''' # multimeter - rec = nest.GetStatus(mm)[0]['events'] + rec = mm.events t = rec['times'] V_w = rec['V_m.p'] @@ -193,14 +193,14 @@ def test_SynapseDepressionFacilitation(self): V_w_star = (g_L*E_L + g_D*V_w) / (g_L + g_D) # weight recorder - data = nest.GetStatus(wr) + data = wr.get() senders = data[0]['events']['senders'] targets = data[0]['events']['targets'] weights = data[0]['events']['weights'] times = data[0]['events']['times'] # spike recorder - data = nest.GetStatus(sr_soma)[0]['events'] + data = sr_soma.events spike_times_soma = data['times'] # compute predicted rate diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py index 60ebb2edb3..3ebd1dbdc4 100644 --- a/testsuite/pytests/test_weight_recorder.py +++ b/testsuite/pytests/test_weight_recorder.py @@ -74,7 +74,7 @@ def testSingleThread(self): nest.Simulate(1) weights = np.append(weights, connections.get("weight")) - wr_weights = nest.GetStatus(wr, "events")[0]["weights"] + wr_weights = wr.events["weights"] self.addTypeEqualityFunc(type(wr_weights), self.is_subset) self.assertEqual(wr_weights, weights) @@ -104,7 +104,7 @@ def testMultipleThreads(self): nest.Simulate(1) weights = np.append(weights, connections.get("weight")) - wr_weights = nest.GetStatus(wr, "events")[0]["weights"] + wr_weights = wr.events["weights"] self.addTypeEqualityFunc(type(wr_weights), self.is_subset) self.assertEqual(wr_weights, weights) @@ -127,7 +127,7 @@ def testDefinedSenders(self): nest.Connect(pre, post, syn_spec="stdp_synapse_rec") nest.Connect(sg, pre) - nest.SetStatus(wr, {"senders": pre[:3]}) + wr.senders = pre[:3] connections = nest.GetConnections(pre[:3], post) senders = np.array([]) @@ -135,7 +135,7 @@ def testDefinedSenders(self): nest.Simulate(1) senders = np.append(senders, connections.get("source")) - wr_senders = nest.GetStatus(wr, "events")[0]["senders"] + wr_senders = wr.events["senders"] self.addTypeEqualityFunc(type(wr_senders), self.is_subset) self.assertEqual(wr_senders, senders) @@ -158,7 +158,7 @@ def testDefinedTargets(self): nest.Connect(pre, post, syn_spec="stdp_synapse_rec") nest.Connect(sg, pre) - nest.SetStatus(wr, {"targets": post[:3]}) + wr.targets = post[:3] connections = nest.GetConnections(pre, post[:3]) targets = np.array([]) @@ -166,7 +166,7 @@ def testDefinedTargets(self): nest.Simulate(1) targets = np.append(targets, connections.get("target")) - wr_targets = nest.GetStatus(wr, "events")[0]["targets"] + wr_targets = wr.events["targets"] self.addTypeEqualityFunc(type(wr_targets), self.is_subset) self.assertEqual(wr_targets, targets) @@ -189,7 +189,7 @@ def testDefinedTargetsAndSenders(self): nest.Connect(pre, post, syn_spec="stdp_synapse_rec") nest.Connect(sg, pre) - nest.SetStatus(wr, {"senders": pre[1:3], "targets": post[:3]}) + wr.set({"senders": pre[1:3], "targets": post[:3]}) # simulate before GetConnections # as order of connections changes at beginning of simulation (sorting) @@ -201,7 +201,7 @@ def testDefinedTargetsAndSenders(self): nest.Simulate(1) targets = np.append(targets, connections.get("target")) - wr_targets = nest.GetStatus(wr, "events")[0]["targets"] + wr_targets = wr.events["targets"] self.addTypeEqualityFunc(type(wr_targets), self.is_subset) self.assertEqual(wr_targets, targets) @@ -237,7 +237,7 @@ def testMultapses(self): nest.Simulate(100) - wr_events = nest.GetStatus(wr, "events")[0] + wr_events = wr.events senders = wr_events["senders"] targets = wr_events["targets"] ports = wr_events["ports"] @@ -290,7 +290,7 @@ def testRPorts(self): nest.Simulate(100) - wr_events = nest.GetStatus(wr, "events")[0] + wr_events = wr.events senders = wr_events["senders"] targets = wr_events["targets"] rports = wr_events["receptors"] From 17cb6a175e75a027a0a42250b7b56a670ba9ad29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 30 Nov 2022 16:52:01 +0100 Subject: [PATCH 090/375] Updated print function --- libnestutil/dictionary.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp index 9cb3eea4ca..811bbfd118 100644 --- a/libnestutil/dictionary.cpp +++ b/libnestutil/dictionary.cpp @@ -36,7 +36,8 @@ * This templated operator streams all elements of a std::vector<>. */ template < typename T > -std::ostream& operator<<( std::ostream& os, const std::vector< T >& vec ) +std::ostream& +operator<<( std::ostream& os, const std::vector< T >& vec ) { os << "vector["; bool first = true; @@ -75,8 +76,9 @@ debug_dict_types( const dictionary& dict ) std::ostream& operator<<( std::ostream& os, const dictionary& dict ) { - const auto max_key_length = std::max_element( - dict.begin(), dict.end(), []( const dictionary::value_type s1, const dictionary::value_type s2 ) { + const auto max_key_length = std::max_element( dict.begin(), + dict.end(), + []( const dictionary::value_type s1, const dictionary::value_type s2 ) { return s1.first.length() < s2.first.length(); } )->first.length(); const std::string pre_padding = " "; @@ -156,6 +158,13 @@ operator<<( std::ostream& os, const dictionary& dict ) type = "parameter"; value_stream << "parameter" << '\n'; } + else if ( is_type< std::shared_ptr< nest::NodeCollection > >( kv.second ) ) + { + type = "NodeCollection"; + const auto nc = boost::any_cast< std::shared_ptr< nest::NodeCollection > >( kv.second ); + nc->print_me( value_stream ); + value_stream << "\n"; + } else { throw TypeMismatch( "Type is not known" ); @@ -363,13 +372,15 @@ dictionary::operator==( const dictionary& other ) const } -boost::any& dictionary::operator[]( const std::string& key ) +boost::any& +dictionary::operator[]( const std::string& key ) { nest::kernel().get_dict_access_flag_manager().register_access( *this, key ); return maptype_::operator[]( key ); } -boost::any& dictionary::operator[]( std::string&& key ) +boost::any& +dictionary::operator[]( std::string&& key ) { nest::kernel().get_dict_access_flag_manager().register_access( *this, key ); return maptype_::operator[]( key ); From 13139d856b8ae2a2ceee0bee3099a6674fb2ea32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 30 Nov 2022 16:52:48 +0100 Subject: [PATCH 091/375] Updated kernel files --- nestkernel/conn_builder.cpp | 18 +++---- nestkernel/conn_parameter.cpp | 6 +-- nestkernel/conn_parameter.h | 41 +++++++-------- nestkernel/connection_creator.cpp | 77 ++++++++++++++-------------- nestkernel/connection_creator.h | 4 +- nestkernel/connector_base_impl.h | 2 +- nestkernel/model_manager.cpp | 8 +-- nestkernel/nest.cpp | 85 +++++++++++++++---------------- nestkernel/spatial.cpp | 6 +-- 9 files changed, 123 insertions(+), 124 deletions(-) diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp index dbfedcac2e..def8d4ce69 100644 --- a/nestkernel/conn_builder.cpp +++ b/nestkernel/conn_builder.cpp @@ -63,7 +63,7 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, skip_syn_params_ = { names::weight, names::delay, names::min_delay, names::max_delay, names::num_connections, names::synapse_model }; - + default_weight_.resize( syn_specs.size() ); default_delay_.resize( syn_specs.size() ); default_weight_and_delay_.resize( syn_specs.size() ); @@ -71,10 +71,10 @@ nest::ConnBuilder::ConnBuilder( NodeCollectionPTR sources, delays_.resize( syn_specs.size() ); synapse_params_.resize( syn_specs.size() ); synapse_model_id_.resize( syn_specs.size() ); - //PYNEST-NG: There is no safety net here. If the list of syn_specs - //is sent empty from the Python level, this will segfault. Maybe - //defaults should be filled here on the C++ level in case they are - //not given? + // PYNEST-NG: There is no safety net here. If the list of syn_specs + // is sent empty from the Python level, this will segfault. Maybe + // defaults should be filled here on the C++ level in case they are + // not given? synapse_model_id_[ 0 ] = kernel().model_manager.get_synapse_model_id( "static_synapse" ); param_dicts_.resize( syn_specs.size() ); @@ -431,11 +431,9 @@ nest::ConnBuilder::loop_over_targets_() const void nest::ConnBuilder::set_synapse_model_( const dictionary& syn_params, const size_t synapse_indx ) { - if ( not syn_params.known( names::synapse_model ) ) - { - throw BadProperty( "Synapse spec must contain synapse model." ); - } - const std::string syn_name = syn_params.get< std::string >( names::synapse_model ); + const std::string syn_name = syn_params.known( names::synapse_model ) + ? syn_params.get< std::string >( names::synapse_model ) + : std::string( "static_synapse" ); // The following call will throw "UnknownSynapseType" if syn_name is not naming a known model const index synapse_model_id = kernel().model_manager.get_synapse_model_id( syn_name ); diff --git a/nestkernel/conn_parameter.cpp b/nestkernel/conn_parameter.cpp index f353947e7f..fb2c80f9b9 100644 --- a/nestkernel/conn_parameter.cpp +++ b/nestkernel/conn_parameter.cpp @@ -54,10 +54,10 @@ nest::ConnParameter::create( const boost::any& value, const size_t nthreads ) return new ParameterConnParameterWrapper( boost::any_cast< ParameterPTR >( value ), nthreads ); } - // array of integer - if ( is_type< std::vector< int > >( value ) ) + // array of longs + if ( is_type< std::vector< long > >( value ) ) { - return new ArrayIntegerParameter( boost::any_cast< std::vector< int > >( value ), nthreads ); + return new ArrayLongParameter( boost::any_cast< std::vector< long > >( value ), nthreads ); } throw BadProperty( std::string( "Cannot handle parameter type. Received " ) + value.type().name() ); diff --git a/nestkernel/conn_parameter.h b/nestkernel/conn_parameter.h index 23d42358ac..9854989318 100644 --- a/nestkernel/conn_parameter.h +++ b/nestkernel/conn_parameter.h @@ -73,7 +73,8 @@ class ConnParameter */ virtual double value_double( thread, RngPtr, index, Node* ) const = 0; virtual long value_int( thread, RngPtr, index, Node* ) const = 0; - virtual void skip( thread, size_t ) const + virtual void + skip( thread, size_t ) const { } virtual bool is_array() const = 0; @@ -235,15 +236,15 @@ class ArrayDoubleParameter : public ConnParameter { public: ArrayDoubleParameter( const std::vector< double >& values, const size_t nthreads ) - : values_( &values ) - , next_( nthreads, values_->begin() ) + : values_( values ) + , next_( nthreads, values_.begin() ) { } void skip( thread tid, size_t n_skip ) const override { - if ( next_[ tid ] < values_->end() ) + if ( next_[ tid ] < values_.end() ) { next_[ tid ] += n_skip; } @@ -256,13 +257,13 @@ class ArrayDoubleParameter : public ConnParameter size_t number_of_values() const override { - return values_->size(); + return values_.size(); } double value_double( thread tid, RngPtr, index, Node* ) const override { - if ( next_[ tid ] != values_->end() ) + if ( next_[ tid ] != values_.end() ) { return *next_[ tid ]++; } @@ -289,12 +290,12 @@ class ArrayDoubleParameter : public ConnParameter { for ( std::vector< std::vector< double >::const_iterator >::iterator it = next_.begin(); it != next_.end(); ++it ) { - *it = values_->begin(); + *it = values_.begin(); } } private: - const std::vector< double >* values_; + const std::vector< double > values_; mutable std::vector< std::vector< double >::const_iterator > next_; }; @@ -313,19 +314,19 @@ class ArrayDoubleParameter : public ConnParameter * throws an error. */ -class ArrayIntegerParameter : public ConnParameter +class ArrayLongParameter : public ConnParameter { public: - ArrayIntegerParameter( const std::vector< int >& values, const size_t nthreads ) - : values_( &values ) - , next_( nthreads, values_->begin() ) + ArrayLongParameter( const std::vector< long >& values, const size_t nthreads ) + : values_( values ) + , next_( nthreads, values_.begin() ) { } void skip( thread tid, size_t n_skip ) const override { - if ( next_[ tid ] < values_->end() ) + if ( next_[ tid ] < values_.end() ) { next_[ tid ] += n_skip; } @@ -338,13 +339,13 @@ class ArrayIntegerParameter : public ConnParameter size_t number_of_values() const override { - return values_->size(); + return values_.size(); } long value_int( thread tid, RngPtr, index, Node* ) const override { - if ( next_[ tid ] != values_->end() ) + if ( next_[ tid ] != values_.end() ) { return *next_[ tid ]++; } @@ -357,7 +358,7 @@ class ArrayIntegerParameter : public ConnParameter double value_double( thread tid, RngPtr, index, Node* ) const override { - if ( next_[ tid ] != values_->end() ) + if ( next_[ tid ] != values_.end() ) { return static_cast< double >( *next_[ tid ]++ ); } @@ -382,15 +383,15 @@ class ArrayIntegerParameter : public ConnParameter void reset() const override { - for ( std::vector< std::vector< int >::const_iterator >::iterator it = next_.begin(); it != next_.end(); ++it ) + for ( std::vector< std::vector< long >::const_iterator >::iterator it = next_.begin(); it != next_.end(); ++it ) { - *it = values_->begin(); + *it = values_.begin(); } } private: - const std::vector< int >* values_; - mutable std::vector< std::vector< int >::const_iterator > next_; + const std::vector< long > values_; + mutable std::vector< std::vector< long >::const_iterator > next_; }; class ParameterConnParameterWrapper : public ConnParameter diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp index 61627cbee8..e9951699f6 100644 --- a/nestkernel/connection_creator.cpp +++ b/nestkernel/connection_creator.cpp @@ -27,7 +27,7 @@ namespace nest { -ConnectionCreator::ConnectionCreator( dictionary dict ) +ConnectionCreator::ConnectionCreator( const dictionary& dict ) : allow_autapses_( true ) , allow_multapses_( true ) , allow_oversized_( false ) @@ -63,37 +63,39 @@ ConnectionCreator::ConnectionCreator( dictionary dict ) // } if ( dict.known( names::kernel ) ) { - kernel_ = create_parameter( dict[ names::kernel ] ); + kernel_ = create_parameter( dict.at( names::kernel ) ); } + // TODO-PYNEST-NG: collocated synapses - // if ( dict.known( names::synapse_parameters ) ) - // { - // // If synapse_parameters exists, we have collocated synapses. - // ArrayDatum* syn_params_dvd = - // dynamic_cast< ArrayDatum* >( ( *dict )[ names::synapse_parameters ].datum() ); - // if ( not syn_params_dvd ) - // { - // throw BadProperty( "synapse_parameters must be list of dictionaries" ); - // } - - // param_dicts_.resize( syn_params_dvd->size() ); - // auto param_dict = param_dicts_.begin(); - // for ( auto synapse_datum = syn_params_dvd->begin(); synapse_datum < syn_params_dvd->end(); - // ++synapse_datum, ++param_dict ) - // { - // auto syn_param = dynamic_cast< dictionary* >( synapse_datum->datum() ); - // extract_params_( *syn_param, *param_dict ); - // } - // } - // else - // { - // If not, we have single synapses. - param_dicts_.resize( 1 ); - param_dicts_[ 0 ].resize( kernel().vp_manager.get_num_threads() ); - extract_params_( dict, param_dicts_[ 0 ] ); - // } + if ( dict.known( names::synapse_parameters ) ) + { + // If synapse_parameters exists, we have collocated synapses. + std::vector< dictionary > syn_params_dvd; + // ArrayDatum* syn_params_dvd = + // dynamic_cast< ArrayDatum* >( ( *dict )[ names::synapse_parameters ].datum() ); + if ( not dict.update_value( names::synapse_parameters, syn_params_dvd ) ) + { + throw BadProperty( "synapse_parameters must be list of dictionaries" ); + } + + param_dicts_.resize( syn_params_dvd.size() ); + auto param_dict = param_dicts_.begin(); + for ( auto syn_param_it = syn_params_dvd.begin(); syn_param_it < syn_params_dvd.end(); + ++syn_param_it, ++param_dict ) + { + // auto syn_param = dynamic_cast< dictionary* >( synapse_datum->datum() ); + extract_params_( *syn_param_it, *param_dict ); + } + } + else + { + // If not, we have single synapses. + param_dicts_.resize( 1 ); + param_dicts_[ 0 ].resize( kernel().vp_manager.get_num_threads() ); + extract_params_( dict, param_dicts_[ 0 ] ); + } - dict.all_entries_accessed("ConnectionCreator", "dict" ); + // dict.all_entries_accessed( "ConnectionCreator", "dict" ); // Set default synapse_model, weight and delay if not given explicitly if ( synapse_model_.empty() ) @@ -148,13 +150,11 @@ ConnectionCreator::ConnectionCreator( dictionary dict ) } void -ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< dictionary >& params ) +ConnectionCreator::extract_params_( const dictionary& dict_datum, std::vector< dictionary >& params ) { - if ( not dict_datum.known( names::synapse_model ) ) - { - dict_datum[ names::synapse_model ] = std::string("static_synapse"); - } - const std::string syn_name = dict_datum.get< std::string >( names::synapse_model ); + const std::string syn_name = dict_datum.known( names::synapse_model ) + ? dict_datum.get< std::string >( names::synapse_model ) + : std::string( "static_synapse" ); // The following call will throw "UnknownSynapseType" if syn_name is not naming a known model const index synapse_model_id = kernel().model_manager.get_synapse_model_id( syn_name ); @@ -163,7 +163,7 @@ ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< diction dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id ); if ( dict_datum.known( names::weight ) ) { - weight_.push_back( create_parameter( dict_datum[ names::weight ] ) ); + weight_.push_back( create_parameter( dict_datum.at( names::weight ) ) ); } else { @@ -172,7 +172,7 @@ ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< diction if ( dict_datum.known( names::delay ) ) { - delay_.push_back( create_parameter( dict_datum[ names::delay ] ) ); + delay_.push_back( create_parameter( dict_datum.at( names::delay ) ) ); } else { @@ -189,7 +189,8 @@ ConnectionCreator::extract_params_( dictionary& dict_datum, std::vector< diction dictionary syn_dict; // Using a lambda function here instead of updateValue because updateValue causes // problems when setting a value to a dictionary-entry in syn_dict. - auto copy_long_if_known = [&syn_dict, &dict_datum]( const std::string& name ) -> void { + auto copy_long_if_known = [ &syn_dict, &dict_datum ]( const std::string& name ) -> void + { if ( dict_datum.known( name ) ) { syn_dict[ name ] = dict_datum.get< long >( name ); diff --git a/nestkernel/connection_creator.h b/nestkernel/connection_creator.h index be3d72be49..b53c7a839a 100644 --- a/nestkernel/connection_creator.h +++ b/nestkernel/connection_creator.h @@ -91,7 +91,7 @@ class ConnectionCreator * be defined by a dictionary, parametertype, or double. * @param dict dictionary containing properties for the connections. */ - ConnectionCreator( dictionary dict ); + ConnectionCreator( const dictionary& dict ); /** * Connect two layers. @@ -130,7 +130,7 @@ class ConnectionCreator std::vector< std::pair< Position< D >, index > >* positions_; }; - void extract_params_( dictionary&, std::vector< dictionary >& ); + void extract_params_( const dictionary&, std::vector< dictionary >& ); template < typename Iterator, int D > void connect_to_target_( Iterator from, diff --git a/nestkernel/connector_base_impl.h b/nestkernel/connector_base_impl.h index 45117feee2..4dc37dff36 100644 --- a/nestkernel/connector_base_impl.h +++ b/nestkernel/connector_base_impl.h @@ -40,7 +40,7 @@ Connector< ConnectionT >::send_weight_event( const thread tid, { // If the pointer to the receiver node in the event is invalid, // the event was not sent, and a WeightRecorderEvent is therefore not created. - if ( cp.get_weight_recorder() and e.receiver_is_valid() ) + if ( cp.get_weight_recorder()->size() != 0 and e.receiver_is_valid() ) { // Create new event to record the weight and copy relevant content. WeightRecorderEvent wr_e; diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp index 71ba2acffe..2b48cb13cb 100644 --- a/nestkernel/model_manager.cpp +++ b/nestkernel/model_manager.cpp @@ -94,7 +94,7 @@ ModelManager::initialize() builtin_node_models_[ i ]->set_threads(); std::string name = builtin_node_models_[ i ]->get_name(); node_models_.push_back( builtin_node_models_[ i ]->clone( name ) ); - modeldict_[ name] = i; + modeldict_[ name ] = i; } // Create proxy nodes, one for each thread and model @@ -278,7 +278,7 @@ ModelManager::copy_synapse_model_( index old_id, std::string new_name ) connection_models_[ t ].push_back( get_connection_model( old_id ).clone( new_name, new_id ) ); } - //PYNEST-NG: Can't new_id be a synindex from the start? + // PYNEST-NG: Can't new_id be a synindex from the start? synapsedict_[ new_name ] = static_cast< synindex >( new_id ); kernel().connection_manager.resize_connections(); @@ -378,7 +378,7 @@ ModelManager::get_synapse_model_id( std::string model_name ) { return synapsedict_.get< synindex >( model_name ); } - + throw UnknownSynapseType( model_name ); } @@ -397,7 +397,7 @@ ModelManager::get_connector_defaults( synindex syn_id ) const } dict[ names::num_connections ] = kernel().connection_manager.get_num_connections( syn_id ); - dict[ names::element_type ] = std::string("synapse"); + dict[ names::element_type ] = std::string( "synapse" ); return dict; } diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp index 11dbc42969..c52136bfbe 100644 --- a/nestkernel/nest.cpp +++ b/nestkernel/nest.cpp @@ -34,35 +34,35 @@ #include "connector_model_impl.h" #include "ac_generator.h" -#include "dc_generator.h" -#include "spike_generator.h" -#include "spike_recorder.h" -#include "poisson_generator.h" -#include "poisson_generator_ps.h" -#include "multimeter.h" -#include "noise_generator.h" #include "aeif_cond_alpha.h" #include "aeif_cond_alpha_multisynapse.h" #include "aeif_cond_beta_multisynapse.h" #include "aeif_psc_delta_clopath.h" #include "cm_default.h" +#include "dc_generator.h" #include "erfc_neuron.h" #include "glif_cond.h" #include "glif_psc.h" #include "hh_psc_alpha_gap.h" #include "ht_neuron.h" +#include "iaf_cond_alpha.h" #include "iaf_cond_alpha_mc.h" -#include "pp_psc_delta.h" #include "lin_rate.h" +#include "multimeter.h" +#include "noise_generator.h" +#include "poisson_generator.h" +#include "poisson_generator_ps.h" +#include "pp_psc_delta.h" +#include "spike_generator.h" +#include "spike_recorder.h" #include "tanh_rate.h" -#include "iaf_cond_alpha.h" -#include "parrot_neuron_ps.h" -#include "step_rate_generator.h" -#include "step_current_generator.h" +#include "aeif_cond_exp.h" #include "hh_psc_alpha_clopath.h" #include "iaf_cond_exp.h" -#include "aeif_cond_exp.h" +#include "parrot_neuron_ps.h" +#include "step_current_generator.h" +#include "step_rate_generator.h" #include "aeif_psc_alpha.h" #include "aeif_psc_delta.h" @@ -74,8 +74,8 @@ #include "iaf_psc_exp.h" #include "iaf_psc_exp_multisynapse.h" -#include "spin_detector.h" #include "pp_cond_exp_mc_urbanczik.h" +#include "spin_detector.h" #include "parrot_neuron.h" @@ -110,8 +110,8 @@ #include "urbanczik_synapse.h" #include "vogels_sprekeler_synapse.h" -#include "weight_recorder.h" #include "volume_transmitter.h" +#include "weight_recorder.h" #include "spatial.h" @@ -172,7 +172,7 @@ init_nest( int* argc, char** argv[] ) kernel().model_manager.register_node_model< aeif_psc_delta >( "aeif_psc_delta" ); kernel().model_manager.register_node_model< aeif_psc_exp >( "aeif_psc_exp" ); kernel().model_manager.register_node_model< threshold_lin_rate_ipn >( "threshold_lin_rate_ipn" ); - + kernel().model_manager.register_node_model< iaf_psc_alpha >( "iaf_psc_alpha" ); kernel().model_manager.register_node_model< iaf_psc_delta >( "iaf_psc_delta" ); kernel().model_manager.register_node_model< iaf_psc_exp >( "iaf_psc_exp" ); @@ -180,8 +180,8 @@ init_nest( int* argc, char** argv[] ) kernel().model_manager.register_node_model< parrot_neuron >( "parrot_neuron" ); kernel().model_manager.register_node_model< spin_detector >( "spin_detector" ); -kernel().model_manager.register_node_model< pp_cond_exp_mc_urbanczik >( "pp_cond_exp_mc_urbanczik" ); - + kernel().model_manager.register_node_model< pp_cond_exp_mc_urbanczik >( "pp_cond_exp_mc_urbanczik" ); + kernel().model_manager.register_node_model< weight_recorder >( "weight_recorder" ); kernel().model_manager.register_node_model< volume_transmitter >( "volume_transmitter" ); @@ -288,7 +288,7 @@ print_nodes_to_string() std::string pprint_to_string( NodeCollectionPTR nc ) { - if (nc) + if ( nc ) { std::stringstream stream; nc->print_me( stream ); @@ -296,7 +296,7 @@ pprint_to_string( NodeCollectionPTR nc ) } else { - //PYNEST-ng: added this, not sure why this can happen now, but could not previously + // PYNEST-ng: added this, not sure why this can happen now, but could not previously std::cout << "pprint_to_string: nc is not assigned" << std::endl; return ""; } @@ -305,7 +305,7 @@ pprint_to_string( NodeCollectionPTR nc ) size_t nc_size( NodeCollectionPTR nc ) { - assert(nc && "NodeCollectionPTR must be initialized."); + assert( nc && "NodeCollectionPTR must be initialized." ); return nc->size(); } @@ -332,7 +332,8 @@ dictionary get_nc_status( NodeCollectionPTR nc ) { dictionary result; - for ( NodeCollection::const_iterator it = nc->begin(); it < nc->end(); ++it ) + size_t node_index = 0; + for ( NodeCollection::const_iterator it = nc->begin(); it < nc->end(); ++it, ++node_index ) { const auto node_status = get_node_status( ( *it ).node_id ); for ( auto& kv_pair : node_status ) @@ -342,13 +343,14 @@ get_nc_status( NodeCollectionPTR nc ) { // key exists auto& v = boost::any_cast< std::vector< boost::any >& >( p->second ); - v.push_back( kv_pair.second ); - // *p = v; + v[ node_index ] = kv_pair.second; } else { // key does not exist yet - result[ kv_pair.first ] = std::vector< boost::any > { kv_pair.second }; + auto new_entry = std::vector< boost::any >( nc->size(), nullptr ); + new_entry[ node_index ] = kv_pair.second; + result[ kv_pair.first ] = new_entry; } } } @@ -360,14 +362,14 @@ set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params ) { if ( params.size() == 1 ) { - params[0].init_access_flags(); + params[ 0 ].init_access_flags(); for ( auto it = nc->begin(); it < nc->end(); ++it ) { - kernel().node_manager.set_status( ( *it ).node_id, params[0] ); + kernel().node_manager.set_status( ( *it ).node_id, params[ 0 ] ); } - params[0].all_entries_accessed( "NodeCollection.set()", "params" ); + params[ 0 ].all_entries_accessed( "NodeCollection.set()", "params" ); } - else if (nc->size() == params.size()) + else if ( nc->size() == params.size() ) { for ( auto it = nc->begin(); it < nc->end(); ++it ) { @@ -379,10 +381,8 @@ set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params ) } else { - std::string msg = - String::compose( "List of dictionaries must be the same size as the NodeCollection (%1), %2 given.", - nc->size(), - params.size() ); + std::string msg = String::compose( + "List of dictionaries must be the same size as the NodeCollection (%1), %2 given.", nc->size(), params.size() ); throw BadParameter( msg ); } } @@ -412,12 +412,12 @@ set_connection_status( const std::deque< ConnectionID >& conns, const dictionary //// const thread tid = conn_dict.get< long >( nest::names::target_thread ); //// const synindex syn_id = conn_dict.get< long >( nest::names::synapse_modelid ); //// const port p = conn_dict.get< long >( nest::names::port ); -//// +//// //// // TODO_PYNEST-NG: Access flags //// // dict->clear_access_flags(); -//// +//// //// kernel().connection_manager.set_synapse_status( source_node_id, target_node_id, tid, syn_id, p, dict ); -//// +//// //// // ALL_ENTRIES_ACCESSED2( *dict, //// // "SetStatus", //// // "Unread dictionary entries: ", @@ -538,12 +538,11 @@ create_spatial( const dictionary& layer_dict ) return create_layer( layer_dict ); } -//std::vector< std::vector< double > > -//get_position( NodeCollectionPTR layer_nc ) +// std::vector< std::vector< double > > +// get_position( NodeCollectionPTR layer_nc ) //{ -// return get_position( layer ); // PYNEST-NG: is this call creating a copy? -//} - +// return get_position( layer ); // PYNEST-NG: is this call creating a copy? +// } NodeCollectionPTR @@ -706,7 +705,7 @@ get_model_defaults( const std::string& component ) try { const index synapse_model_id = kernel().model_manager.get_synapse_model_id( component ); - const auto ret = kernel().model_manager.get_connector_defaults( synapse_model_id ); + const auto ret = kernel().model_manager.get_connector_defaults( synapse_model_id ); return ret; } catch ( UnknownSynapseType& ) @@ -872,7 +871,7 @@ slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR nc ) // If metadata contains node positions and the NodeCollection is sliced, get only positions of the sliced nodes. if ( dict.known( names::positions ) ) { - //PyNEST-NG: Check if TokenArray is the correct type here + // PyNEST-NG: Check if TokenArray is the correct type here const auto positions = dict.get< TokenArray >( names::positions ); if ( nc->size() != positions.size() ) { diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp index 2b13c547a5..3bb877cd65 100644 --- a/nestkernel/spatial.cpp +++ b/nestkernel/spatial.cpp @@ -469,7 +469,7 @@ create_mask( const dictionary& mask_dict ) // return mask; // } - + MaskPTR datum; mask_dict.all_entries_accessed( "CreateMask", "params" ); @@ -509,12 +509,12 @@ connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const connection_dict.init_access_flags(); ConnectionCreator connector( connection_dict ); - connection_dict.all_entries_accessed( "CreateLayers", "params" ); + connection_dict.all_entries_accessed( "ConnectLayers", "connection_dict" ); // Set flag before calling source->connect() in case exception is thrown after some connections have been created. kernel().connection_manager.set_connections_have_changed(); std::cout << "### 10" << std::endl; - + source->connect( source_nc, target, target_nc, connector ); std::cout << "### 11" << std::endl; } From 62aa050e414149cffc27b79c8412dcd707acf1ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 30 Nov 2022 16:53:28 +0100 Subject: [PATCH 092/375] Updated models --- models/quantal_stp_synapse_impl.h | 33 ++----------------------------- models/weight_recorder.cpp | 11 ++++++----- 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/models/quantal_stp_synapse_impl.h b/models/quantal_stp_synapse_impl.h index a383fe5b76..cd06fe0a77 100644 --- a/models/quantal_stp_synapse_impl.h +++ b/models/quantal_stp_synapse_impl.h @@ -33,35 +33,6 @@ namespace nest { -/* Polymorphic version of update_value. - * This code will take either an int or a double and convert it to an - * int. - */ -bool -update_value_int( const dictionary& d, std::string propname, int& prop ) -{ - if ( d.known( propname ) ) - { - const auto value = d.at( propname ); - if ( is_type< int >( value ) ) - { - prop = boost::any_cast< int >( value ); - return true; - } - else if ( is_type< double >( value ) ) - { - prop = static_cast< int >( boost::any_cast< double >( value ) ); - return true; - } - else - { - throw TypeMismatch(); - } - } - - return false; -} - template < typename targetidentifierT > quantal_stp_synapse< targetidentifierT >::quantal_stp_synapse() : ConnectionBase() @@ -102,8 +73,8 @@ quantal_stp_synapse< targetidentifierT >::set_status( const dictionary& d, Conne d.update_value( names::u, u_ ); d.update_value( names::tau_rec, tau_rec_ ); d.update_value( names::tau_fac, tau_fac_ ); - update_value_int( d, names::n, n_ ); - update_value_int( d, names::a, a_ ); + d.update_integer_value( names::n, n_ ); + d.update_integer_value( names::a, a_ ); } } // of namespace nest diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp index 921e5d26e3..b07b2f0525 100644 --- a/models/weight_recorder.cpp +++ b/models/weight_recorder.cpp @@ -61,8 +61,9 @@ nest::weight_recorder::Parameters_::get( dictionary& d ) const void nest::weight_recorder::Parameters_::set( const dictionary& d ) { - auto get_or_create_nc = [&d]( NodeCollectionPTR& nc, const std::string& key ) { - if ( not d.empty() and d.known( key) ) + auto get_or_create_nc = [ &d ]( NodeCollectionPTR& nc, const std::string& key ) + { + if ( not d.empty() and d.known( key ) ) { const auto value = d.at( key ); if ( is_type< NodeCollectionPTR >( value ) ) @@ -71,7 +72,7 @@ nest::weight_recorder::Parameters_::set( const dictionary& d ) } else { - throw TypeMismatch("NodeCollection", debug_type( d.at( key ) ) ); + throw TypeMismatch( "NodeCollection", debug_type( d.at( key ) ) ); } } }; @@ -143,8 +144,8 @@ nest::weight_recorder::handle( WeightRecorderEvent& e ) { // P_senders_ is defined and sender is not in it // or P_targets_ is defined and receiver is not in it - if ( ( P_.senders_.get() and not P_.senders_->contains( e.get_sender_node_id() ) ) - or ( P_.targets_.get() and not P_.targets_->contains( e.get_receiver_node_id() ) ) ) + if ( ( P_.senders_->size() != 0 and not P_.senders_->contains( e.get_sender_node_id() ) ) + or ( P_.targets_->size() != 0 and not P_.targets_->contains( e.get_receiver_node_id() ) ) ) { return; } From 69148995e9b775b95c19d47a7ef802d1349af9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 30 Nov 2022 16:57:50 +0100 Subject: [PATCH 093/375] Updated pynest files --- pynest/nest/lib/hl_api_nodes.py | 7 ++++-- pynest/nest/lib/hl_api_types.py | 35 +++++++++++++---------------- pynest/nestkernel_api.pxd | 3 ++- pynest/nestkernel_api.pyx | 40 ++++++++++++++++++++++++--------- 4 files changed, 53 insertions(+), 32 deletions(-) diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py index 00cb66302d..237bcc1fe4 100644 --- a/pynest/nest/lib/hl_api_nodes.py +++ b/pynest/nest/lib/hl_api_nodes.py @@ -94,7 +94,10 @@ def Create(model, n=1, params=None, positions=None): # we can pass the parameter specification to SLI when the nodes are created. iterable_or_parameter_in_params = True - #PYNEST-NG: can we support the usecase above by passing the dict into ll_create? + if not isinstance(n, int): + raise TypeError('n must be an integer') + + # PYNEST-NG: can we support the usecase above by passing the dict into ll_create? if isinstance(params, dict) and params: # if params is a dict and not empty iterable_or_parameter_in_params = any(is_iterable(v) or isinstance(v, Parameter) for k, v in params.items()) @@ -121,7 +124,7 @@ def Create(model, n=1, params=None, positions=None): layer_specs['center'] = positions.center if positions.extent is not None: layer_specs['extent'] = positions.extent - + layer = nestkernel.llapi_create_spatial(layer_specs) layer.set(params if params else {}) return layer diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py index 46152a2f51..fb3ee4a6a7 100644 --- a/pynest/nest/lib/hl_api_types.py +++ b/pynest/nest/lib/hl_api_types.py @@ -215,17 +215,17 @@ def __add__(self, other): return nestkernel.llapi_join_nc(self._datum, other._datum) def __getitem__(self, key): - if isinstance(key, slice): + if isinstance(key, slice): if key.start is None: start = 1 else: - start = key.start + 1 if key.start >= 0 else max(key.start, -1 * self.__len__()) - if start > self.__len__(): + start = key.start + 1 if key.start >= 0 else key.start + if abs(start) > self.__len__(): raise IndexError('slice start value outside of the NodeCollection') if key.stop is None: stop = self.__len__() else: - stop = min(key.stop, self.__len__()) if key.stop > 0 else key.stop - 1 + stop = key.stop if key.stop > 0 else key.stop - 1 if abs(stop) > self.__len__(): raise IndexError('slice stop value outside of the NodeCollection') step = 1 if key.step is None else key.step @@ -235,7 +235,7 @@ def __getitem__(self, key): return nestkernel.llapi_slice(self._datum, start, stop, step) elif isinstance(key, (int, numpy.integer)): if abs(key + (key >= 0)) > self.__len__(): - raise IndexError('index value outside of the NodeCollection') + raise IndexError('index value outside of the NodeCollection') return self[key:key + 1:1] elif isinstance(key, (list, tuple)): if len(key) == 0: @@ -390,9 +390,15 @@ def get(self, *params, **kwargs): result = get_parameters(self, params[0]) else: # Hierarchical addressing - # TODO-PYNEST-NG: Drop this? Not sure anyone ever used it... + # TODO-PYNEST-NG: Drop this? Not sure anyone ever used it... result = get_parameters_hierarchical_addressing(self, params) + if isinstance(result, dict) and len(self) == 1: + new_result = {} + for k, v in result.items(): + new_result[k] = v[0] if is_iterable(v) and len(v) == 1 else v + result = new_result + if pandas_output: index = self.get('global_id') if len(params) == 1 and isinstance(params[0], str): @@ -408,16 +414,6 @@ def get(self, *params, **kwargs): elif output == 'json': result = to_json(result) - print("### 7", result) - - if isinstance(result, dict) and len(self) == 1: - new_result = {} - for k,v in result.items(): - new_result[k] = v[0] if is_iterable(v) and len(v) == 1 else v - result = new_result - - print("### 8", result) - return result def set(self, params=None, **kwargs): @@ -466,8 +462,8 @@ def set(self, params=None, **kwargs): node_params = self[0].get() iterable_node_param = lambda key: key in node_params and not is_iterable(node_params[key]) - contains_list = [is_iterable(vals) and iterable_node_param(key) for key, vals in params.items()] - + contains_list = [is_iterable(vals) and iterable_node_param(key) for key, vals in params.items()] + if any(contains_list): temp_param = [{} for _ in range(self.__len__())] @@ -485,6 +481,7 @@ def set(self, params=None, **kwargs): print("### 2", params) + print(params) nestkernel.llapi_set_nc_status(self._datum, params) def tolist(self): @@ -819,7 +816,7 @@ def get(self, keys=None, output=''): result = [[d[key] for key in keys] for d in nestkernel.llapi_get_connection_status(self._datum)] else: raise TypeError("keys should be either a string or an iterable") - + # Need to restructure the data. final_result = restructure_data(result, keys) diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd index 721e5909ac..842421a2a6 100644 --- a/pynest/nestkernel_api.pxd +++ b/pynest/nestkernel_api.pxd @@ -45,6 +45,7 @@ cdef extern from "dictionary.h": bint operator!=(const const_iterator&) const_iterator begin() const_iterator end() + cbool known(const string&) string debug_type(const any&) string debug_dict_types(const dictionary&) cbool is_type[T](const any&) @@ -141,4 +142,4 @@ cdef extern from "nest.h" namespace "nest": cdef extern from "spatial.h" namespace "nest": vector[vector[double]] get_position( NodeCollectionPTR layer_nc ) except + vector[double] distance( const vector[ConnectionID]& conns ) except + - void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ) except + \ No newline at end of file + void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ) except + diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx index 0812ef6e0a..dfd7459147 100644 --- a/pynest/nestkernel_api.pyx +++ b/pynest/nestkernel_api.pyx @@ -38,7 +38,7 @@ import nest from nest.lib.hl_api_exceptions import NESTErrors import numpy -cimport numpy +# cimport numpy #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION @@ -110,6 +110,8 @@ cdef object any_to_pyobj(any operand): return any_cast[vector[int]](operand) if is_type[vector[long]](operand): return any_cast[vector[long]](operand) + if is_type[vector[size_t]](operand): + return any_cast[vector[size_t]](operand) if is_type[vector[double]](operand): return any_cast[vector[double]](operand) if is_type[vector[vector[double]]](operand): @@ -158,6 +160,8 @@ cdef is_list_tuple_ndarray_of_int(v): cdef dictionary pydict_to_dictionary(object py_dict) except *: # Adding "except *" makes cython propagate the error if it is raised. cdef dictionary cdict = dictionary() for key, value in py_dict.items(): + if type(value) is tuple: + value = list(value) if type(value) is int or isinstance(value, numpy.integer): cdict[pystr_to_string(key)] = value elif type(value) is float or isinstance(value, numpy.floating): @@ -174,11 +178,13 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *: # Adding "except cdict[pystr_to_string(key)] = list_of_list_to_doublevec(value) elif type(value) is list and type(value[0]) is str: cdict[pystr_to_string(key)] = pylist_to_stringvec(value) + elif type(value) is list and type(value[0]) is dict: + cdict[pystr_to_string(key)] = pylist_to_dictvec(value) elif type(value) is dict: cdict[pystr_to_string(key)] = pydict_to_dictionary(value) elif type(value) is nest.NodeCollection: cdict[pystr_to_string(key)] = ((value._datum)).thisptr - elif type(value) is nest.Parameter: + elif isinstance(value, nest.Parameter): cdict[pystr_to_string(key)] = ((value._datum)).thisptr elif type(value) is ParameterObject: cdict[pystr_to_string(key)] = (value).thisptr @@ -225,6 +231,12 @@ cdef vector[string] pylist_to_stringvec(object pylist): vec.push_back(pystr_to_string(val)) return vec +cdef vector[dictionary] pylist_to_dictvec(object pylist): + cdef vector[dictionary] vec + for val in pylist: + vec.push_back(pydict_to_dictionary(val)) + return vec + cdef object string_to_pystr(string s): return s.decode('utf-8') @@ -292,18 +304,24 @@ def llapi_make_nodecollection(object node_ids): @catch_cpp_error def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params): - + print("aaaaaaaaa", conn_params) + print("bbbbbbbbb", synapse_params) conn_params = conn_params if conn_params is not None else {} synapse_params = synapse_params if synapse_params is not None else {} - + + print(type(synapse_params)) + if ("rule" in conn_params and conn_params["rule"] is None) or "rule" not in conn_params: conn_params["rule"] = "all_to_all" - - if "synapse_model" not in synapse_params: + + if synapse_params is dict and "synapse_model" not in synapse_params: synapse_params["synapse_model"] = "static_synapse" - + cdef vector[dictionary] syn_param_vec - if synapse_params is not None: + if isinstance(synapse_params, nest.CollocatedSynapses): + print(synapse_params.syn_specs) + syn_param_vec = pylist_to_dictvec(synapse_params.syn_specs) + elif synapse_params is not None: syn_param_vec.push_back(pydict_to_dictionary(synapse_params)) connect(pre.thisptr, post.thisptr, @@ -313,7 +331,7 @@ def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object co def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, object projections): print("### 9", projections) connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections)) - + @catch_cpp_error def llapi_slice(NodeCollectionObject nc, long start, long stop, long step): cdef NodeCollectionPTR nc_ptr @@ -394,6 +412,8 @@ def llapi_get_nc_status(NodeCollectionObject nc, object key=None): if key is None: return dictionary_to_pydict(statuses) elif isinstance(key, str): + if not statuses.known(pystr_to_string(key)): + raise KeyError(key) value = any_to_pyobj(statuses[pystr_to_string(key)]) return value[0] if len(value) == 1 else value else: @@ -484,7 +504,7 @@ def llapi_apply_parameter(ParameterObject parameter, object pos_or_nc): return tuple(apply(parameter.thisptr, ((pos_or_nc._datum)).thisptr)) else: return tuple(apply(parameter.thisptr, pydict_to_dictionary(pos_or_nc))) - + @catch_cpp_error def llapi_multiply_parameter(ParameterObject first, ParameterObject second): From d12c228a53061aeadf12b454a8d5ca331f793e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= Date: Wed, 30 Nov 2022 16:59:04 +0100 Subject: [PATCH 094/375] Updated tests --- testsuite/pytests/test_aeif_lsodar.py | 12 +- testsuite/pytests/test_compartmental_model.py | 14 +- testsuite/pytests/test_get_set.py | 10 +- testsuite/pytests/test_multiple_synapses.py | 2 +- testsuite/pytests/test_stack.py | 192 ------------------ testsuite/pytests/test_weight_recorder.py | 11 +- 6 files changed, 26 insertions(+), 215 deletions(-) delete mode 100644 testsuite/pytests/test_stack.py diff --git a/testsuite/pytests/test_aeif_lsodar.py b/testsuite/pytests/test_aeif_lsodar.py index 882cbf7221..4240700fee 100644 --- a/testsuite/pytests/test_aeif_lsodar.py +++ b/testsuite/pytests/test_aeif_lsodar.py @@ -233,14 +233,16 @@ def compute_difference(self, multimeters, params, reference, recordables): for model, mm in iter(multimeters.items()): dmm = nest.GetStatus(mm, "events")[0] for record in recordables: + reference_record = np.array(reference[record]) + dmm_record = np.array(dmm[record]) # ignore places where a divide by zero would occur - rds = np.abs(reference[record] - dmm[record]) - nonzero = np.where(~np.isclose(reference[record], 0.))[0] + rds = np.abs(np.array(reference_record) - np.array(dmm_record)) + nonzero = np.where(~np.isclose(reference_record, 0.))[0] if np.any(nonzero): - rds = rds[nonzero] / np.abs(reference[record][nonzero]) + rds = rds[nonzero] / np.abs(reference_record[nonzero]) # ignore events around spike times for V if it diverges if record == "V_m" and params["Delta_T"] > 0.: - spiking = (dmm[record] > V_lim) + spiking = (dmm_record > V_lim) rds = rds[~spiking] rel_diff[model][record] = np.average(rds) return rel_diff @@ -281,7 +283,7 @@ def test_closeness_nest_lsodar(self): mm0 = next(iter(multimeters.values())) print(mm0.get()) - + nest_times = nest.GetStatus(mm0, "events")[0]["times"] reference = {'V_m': V_interp(nest_times), 'w': w_interp(nest_times)} diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py index e0a69d7032..d12c9e2a38 100644 --- a/testsuite/pytests/test_compartmental_model.py +++ b/testsuite/pytests/test_compartmental_model.py @@ -456,7 +456,7 @@ def test_inversion(self, dt=0.1, model_name='1dend_1comp'): for ii, i_amp in enumerate(i_in): # add current - nest.Connect(nest.Create('dc_generator', {'amplitude': i_amp}), n_neat, + nest.Connect(nest.Create('dc_generator', params={'amplitude': i_amp}), n_neat, syn_spec={'synapse_model': 'static_synapse', 'weight': 1., 'delay': dt, 'receptor_type': ii} ) @@ -496,7 +496,7 @@ def test_no_inp_inversion(self, dt=0.1, model_name='2tdend_4comp'): for ii, i_amp in enumerate(i_in): # add current - nest.Connect(nest.Create('dc_generator', {'amplitude': i_amp}), n_neat, + nest.Connect(nest.Create('dc_generator', params={'amplitude': i_amp}), n_neat, syn_spec={'synapse_model': 'static_synapse', 'weight': 1., 'delay': dt, 'receptor_type': ii} ) @@ -506,7 +506,7 @@ def test_no_inp_inversion(self, dt=0.1, model_name='2tdend_4comp'): # run the NEST model for 1 timestep nest.Simulate(2.*dt) events_neat = nest.GetStatus(m_neat, 'events')[0] - v_neat = np.array([events_neat['v_comp%d' % ii][0] for ii in range(n_comp)]) + v_neat = np.array([events_neat['v_comp%d' % ii] for ii in range(n_comp)]) # construct numpy solution v_sol = np.linalg.solve(aa, bb) @@ -526,7 +526,7 @@ def test_attenuation(self, model_name='1dend_1comp', dt=0.1, i_amp=1., t_max=200 for ii in range(n_comp): (n_neat, m_neat), _, gg = eval('create_%s(dt=dt)' % model_name) # add current - nest.Connect(nest.Create('dc_generator', {'amplitude': i_amp}), n_neat, + nest.Connect(nest.Create('dc_generator', params={'amplitude': i_amp}), n_neat, syn_spec={'synapse_model': 'static_synapse', 'weight': 1., 'delay': t_max/2., 'receptor_type': ii}) @@ -560,7 +560,7 @@ def test_equilibrium(self, dt=0.1, t_max=200., model_name='2tdend_4comp'): el = np.array([SP['e_L']] + [DP[ii]['e_L'] for ii in range(n_comp-1)]) # add current - nest.Connect(nest.Create('dc_generator', {'amplitude': 0.}), n_neat, + nest.Connect(nest.Create('dc_generator', params={'amplitude': 0.}), n_neat, syn_spec={'synapse_model': 'static_synapse', 'weight': 1., 'delay': .1, 'receptor_type': 0}) @@ -654,7 +654,7 @@ def test_spike_transmission(self, dt=.01): nest.Connect(n_neat_0, n_neat_1, syn_spec={'synapse_model': 'static_synapse', 'weight': .1, 'receptor_type': syn_idx}) - dc = nest.Create('dc_generator', {'amplitude': 2.0}) + dc = nest.Create('dc_generator', params={'amplitude': 2.0}) nest.Connect(dc, n_neat_0, syn_spec={'synapse_model': 'static_synapse', 'weight': 1., 'receptor_type': 0}) @@ -799,7 +799,7 @@ def test_error_handling(self): {"parent_idx": -1, "params": SP}, {"parent_idx": 0, "params": SP} ] - dc = nest.Create('dc_generator', {'amplitude': 2.0}) + dc = nest.Create('dc_generator', params={'amplitude': 2.0}) with self.assertRaisesRegex(nest.kernel.NESTError, r"UnknownPort in SLI function Connect_g_g_D_D: " diff --git a/testsuite/pytests/test_get_set.py b/testsuite/pytests/test_get_set.py index 2868fe517c..8150adf162 100644 --- a/testsuite/pytests/test_get_set.py +++ b/testsuite/pytests/test_get_set.py @@ -335,7 +335,7 @@ def test_get_pandas(self): # With data in events nodes = nest.Create('iaf_psc_alpha', 10) - pg = nest.Create('poisson_generator', {'rate': 70000.0}) + pg = nest.Create('poisson_generator', params={'rate': 70000.0}) nest.Connect(pg, nodes) nest.Connect(nodes, single_sr) nest.Connect(nodes, multi_sr, 'one_to_one') @@ -418,7 +418,7 @@ def test_get_JSON(self): # With data in events nodes = nest.Create('iaf_psc_alpha', 10) - pg = nest.Create('poisson_generator', {'rate': 70000.0}) + pg = nest.Create('poisson_generator', params={'rate': 70000.0}) nest.Connect(pg, nodes) nest.Connect(nodes, single_sr) nest.Connect(nodes, multi_sr, 'one_to_one') @@ -532,10 +532,10 @@ def test_get_attribute(self): spatial_nodes = nest.Create('iaf_psc_alpha', positions=nest.spatial.grid([2, 2])) self.assertIsNotNone(spatial_nodes.spatial) spatial_reference = {'network_size': 4, - 'center': (0.0, 0.0), + 'center': [0.0, 0.0], 'edge_wrap': False, - 'extent': (1.0, 1.0), - 'shape': (2, 2)} + 'extent': [1.0, 1.0], + 'shape': [2, 2]} self.assertEqual(spatial_nodes.spatial, spatial_reference) def test_set_attribute(self): diff --git a/testsuite/pytests/test_multiple_synapses.py b/testsuite/pytests/test_multiple_synapses.py index 97261a497c..8a8cbb19d6 100644 --- a/testsuite/pytests/test_multiple_synapses.py +++ b/testsuite/pytests/test_multiple_synapses.py @@ -57,7 +57,7 @@ def test_MultipleSynapses(self): self.assertEqual(2, nest.num_connections) conns = nest.GetConnections() - self.assertEqual([-2, 3], conns.weight) + self.assertEqual((-2, 3), conns.weight) def test_MultipleSynapses_one_to_one(self): """Test co-location of synapses when we use one_to_one as connection rule""" diff --git a/testsuite/pytests/test_stack.py b/testsuite/pytests/test_stack.py deleted file mode 100644 index 3d33c5e9c2..0000000000 --- a/testsuite/pytests/test_stack.py +++ /dev/null @@ -1,192 +0,0 @@ -# -*- coding: utf-8 -*- -# -# test_stack.py -# -# This file is part of NEST. -# -# Copyright (C) 2004 The NEST Initiative -# -# NEST is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# NEST is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with NEST. If not, see . - -""" -Stack tests -""" - -import unittest -import nest - -from array import array - -try: - import numpy - HAVE_NUMPY = True -except ImportError: - HAVE_NUMPY = False - - -@nest.ll_api.check_stack -class StackTestCase(unittest.TestCase): - """Stack tests""" - - def test_stack_checker(self): - def empty_stack(): - nest.ll_api.sli_run('clear') - - def leave_on_stack(): - nest.ll_api.sli_push(1) - - check_empty_stack = nest.ll_api.stack_checker(empty_stack) - check_leave_on_stack = nest.ll_api.stack_checker(leave_on_stack) - - debug = nest.ll_api.get_debug() - # We have to set debug to True to check the stack - nest.ll_api.set_debug(True) - - # This should pass without errors - check_empty_stack() - - try: - self.assertRaises(nest.kernel.NESTError, check_leave_on_stack) - except: # noqa - # Ensure that debug is reset if we get an error. - nest.ll_api.set_debug(debug) - raise - nest.ll_api.set_debug(debug) - - def test_Count(self): - """Object count""" - - nest.ResetKernel() - nest.ll_api.sr('clear') - - for i in range(100): - nest.ll_api.sps(i) - - nest.ll_api.sr('count') - self.assertEqual(nest.ll_api.spp(), 100) - - for i in range(100): - self.assertEqual(nest.ll_api.spp(), (99 - i)) - - nest.ll_api.sr('count') - self.assertEqual(nest.ll_api.spp(), 0) - - def test_PushPop(self): - """Object push and pop""" - - nest.ResetKernel() - - objects = ( - (True, ) * 2, - (False, ) * 2, - - (1, ) * 2, - (-100, ) * 2, - - (3.14, ) * 2, - (-1.7588e11, ) * 2, - - ('string', ) * 2, - - # Literals should be converted to SLI literals - (nest.kernel.SLILiteral('test'), ) * 2, - - # Arrays are converted to tuples on the way out - ((1, 2, 3, 4, 5), ) * 2, - ([1, 2, 3, 4, 5], (1, 2, 3, 4, 5)), - - # Dictionary round trip conversion should be consistent - ({ - 'key': 123, - 'sub_dict': { - nest.kernel.SLILiteral('foo'): 'bar' - } - }, ) * 2, - ) - - for obj_in, obj_out in objects: - nest.ll_api.sps(obj_in) - self.assertEqual(obj_out, nest.ll_api.spp()) - - @unittest.skipIf(not HAVE_NUMPY, 'NumPy package is not available') - def test_PushPop_NumPy(self): - - nest.ResetKernel() - - # Test support for slices and strides - arr = numpy.array(((1, 2, 3, 4, 5), (6, 7, 8, 9, 0))) - - nest.ll_api.sps(arr[1, :]) - self.assertTrue( - (nest.ll_api.spp() == numpy.array((6, 7, 8, 9, 0))).all()) - - nest.ll_api.sps(arr[:, 1]) - self.assertTrue((nest.ll_api.spp() == numpy.array((2, 7))).all()) - - # Test conversion using buffer interface - nest.ll_api.sps(array('l', [1, 2, 3])) - self.assertTrue((nest.ll_api.spp() == numpy.array((1, 2, 3))).all()) - - nest.ll_api.sps(array('d', [1., 2., 3.])) - self.assertTrue((nest.ll_api.spp() == numpy.array((1., 2., 3.))).all()) - - # Test conversion without using buffer interface - if hasattr(numpy, 'int16'): - i16 = numpy.array((1, 2, 3), dtype=numpy.int16) - nest.ll_api.sps(i16) - self.assertTrue((nest.ll_api.spp() == i16).all()) - - # Test support for scalars and zero-dimensional arrays - a1 = numpy.array((1, 2, 3))[1] - a2 = numpy.array((1., 2., 3.))[1] - a3 = numpy.array(2) - a4 = numpy.array(2.) - - for x in (a1, a3): - nest.ll_api.sps(x) - self.assertEqual(nest.ll_api.spp(), 2) - - for x in (a2, a4): - nest.ll_api.sps(x) - self.assertEqual(nest.ll_api.spp(), 2.) - - @unittest.skipIf( - HAVE_NUMPY, 'Makes no sense when NumPy package is available') - def test_PushPop_no_NumPy(self): - - nest.ResetKernel() - - a1 = array('i', [1, 2, 3]) - a2 = array('l', [1, 2, 3]) - a3 = array('f', [1.0, 2.0, 3.0]) - a4 = array('d', [1.0, 2.0, 3.0]) - - for x in (a1, a2, a3, a4): - nest.ll_api.sps(x) - self.assertEqual(x, nest.ll_api.spp()) - - -def suite(): - - suite = unittest.makeSuite(StackTestCase, 'test') - return suite - - -def run(): - runner = unittest.TextTestRunner(verbosity=2) - runner.run(suite()) - - -if __name__ == "__main__": - run() diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py index 60ebb2edb3..bd13c518ad 100644 --- a/testsuite/pytests/test_weight_recorder.py +++ b/testsuite/pytests/test_weight_recorder.py @@ -75,9 +75,10 @@ def testSingleThread(self): weights = np.append(weights, connections.get("weight")) wr_weights = nest.GetStatus(wr, "events")[0]["weights"] + print(wr.get()) self.addTypeEqualityFunc(type(wr_weights), self.is_subset) - self.assertEqual(wr_weights, weights) + self.assertEqual(wr_weights, list(weights)) def testMultipleThreads(self): """Weight Recorder Multi Threaded""" @@ -107,7 +108,7 @@ def testMultipleThreads(self): wr_weights = nest.GetStatus(wr, "events")[0]["weights"] self.addTypeEqualityFunc(type(wr_weights), self.is_subset) - self.assertEqual(wr_weights, weights) + self.assertEqual(wr_weights, list(weights)) def testDefinedSenders(self): """Weight Recorder Defined Subset Of Senders""" @@ -138,7 +139,7 @@ def testDefinedSenders(self): wr_senders = nest.GetStatus(wr, "events")[0]["senders"] self.addTypeEqualityFunc(type(wr_senders), self.is_subset) - self.assertEqual(wr_senders, senders) + self.assertEqual(wr_senders, list(senders)) def testDefinedTargets(self): """Weight Recorder Defined Subset Of Targets""" @@ -169,7 +170,7 @@ def testDefinedTargets(self): wr_targets = nest.GetStatus(wr, "events")[0]["targets"] self.addTypeEqualityFunc(type(wr_targets), self.is_subset) - self.assertEqual(wr_targets, targets) + self.assertEqual(wr_targets, list(targets)) def testDefinedTargetsAndSenders(self): """Weight Recorder Defined Subset Of Targets and Senders""" @@ -204,7 +205,7 @@ def testDefinedTargetsAndSenders(self): wr_targets = nest.GetStatus(wr, "events")[0]["targets"] self.addTypeEqualityFunc(type(wr_targets), self.is_subset) - self.assertEqual(wr_targets, targets) + self.assertEqual(wr_targets, list(targets)) def testMultapses(self): """Weight Recorder Multapses""" From 67fbce1ed00de6abb10c49c268026ee2a0ee74cd Mon Sep 17 00:00:00 2001 From: Jochen Martin Eppler Date: Wed, 30 Nov 2022 18:22:18 +0100 Subject: [PATCH 095/375] REMOVE ALL SLI FILES AS WELL AS THE SLI INTERPRETER ITSELF! Co-authored-by: Markus Diesmann --- CMakeLists.txt | 4 - build_support/include_checker.py | 3 - doc/CMakeLists.txt | 42 - doc/slidoc/index.html | 62 - doc/slihelp_generator/README.md | 4 - doc/slihelp_generator/assets/css/ie.css | 273 - .../assets/css/jquery.mmenu.all.css | 30 - .../assets/css/jss-style.min.css | 1 - doc/slihelp_generator/assets/css/moeppel1.png | Bin 329 -> 0 bytes doc/slihelp_generator/assets/css/moeppel2.png | Bin 528 -> 0 bytes .../assets/css/nest-initiative-logo.png | Bin 7201 -> 0 bytes doc/slihelp_generator/assets/css/prettify.css | 70 - doc/slihelp_generator/assets/css/style.css | 2153 ------- doc/slihelp_generator/assets/images/arrow.png | Bin 275 -> 0 bytes .../assets/js/code-prettify/COPYING | 191 - .../assets/js/code-prettify/lang-apollo.js | 53 - .../assets/js/code-prettify/lang-basic.js | 49 - .../assets/js/code-prettify/lang-clj.js | 64 - .../assets/js/code-prettify/lang-css.js | 160 - .../assets/js/code-prettify/lang-dart.js | 92 - .../assets/js/code-prettify/lang-erlang.js | 94 - .../assets/js/code-prettify/lang-go.js | 59 - .../assets/js/code-prettify/lang-hs.js | 102 - .../assets/js/code-prettify/lang-lasso.js | 67 - .../assets/js/code-prettify/lang-lisp.js | 95 - .../assets/js/code-prettify/lang-llvm.js | 63 - .../assets/js/code-prettify/lang-logtalk.js | 50 - .../assets/js/code-prettify/lang-lua.js | 60 - .../assets/js/code-prettify/lang-matlab.js | 183 - .../assets/js/code-prettify/lang-ml.js | 57 - .../assets/js/code-prettify/lang-mumps.js | 140 - .../assets/js/code-prettify/lang-n.js | 67 - .../assets/js/code-prettify/lang-pascal.js | 49 - .../assets/js/code-prettify/lang-proto.js | 37 - .../assets/js/code-prettify/lang-r.js | 59 - .../assets/js/code-prettify/lang-rd.js | 50 - .../assets/js/code-prettify/lang-rust.js | 81 - .../assets/js/code-prettify/lang-scala.js | 56 - .../assets/js/code-prettify/lang-sql.js | 59 - .../assets/js/code-prettify/lang-swift.js | 58 - .../assets/js/code-prettify/lang-tcl.js | 63 - .../assets/js/code-prettify/lang-tex.js | 49 - .../assets/js/code-prettify/lang-vb.js | 67 - .../assets/js/code-prettify/lang-vhdl.js | 51 - .../assets/js/code-prettify/lang-wiki.js | 55 - .../assets/js/code-prettify/lang-xq.js | 69 - .../assets/js/code-prettify/lang-yaml.js | 45 - .../assets/js/code-prettify/prettify.css | 70 - .../assets/js/code-prettify/prettify.js | 1740 ------ .../assets/js/code-prettify/run_prettify.js | 1995 ------- .../assets/js/highlight/CHANGES.md | 1646 ------ .../assets/js/highlight/LICENSE | 24 - .../assets/js/highlight/README.md | 150 - .../assets/js/highlight/README.ru.md | 142 - .../assets/js/highlight/highlight.pack.js | 2 - .../assets/js/highlight/styles/agate.css | 108 - .../js/highlight/styles/androidstudio.css | 66 - .../js/highlight/styles/arduino-light.css | 88 - .../assets/js/highlight/styles/arta.css | 73 - .../assets/js/highlight/styles/ascetic.css | 45 - .../js/highlight/styles/atelier-cave-dark.css | 83 - .../highlight/styles/atelier-cave-light.css | 85 - .../js/highlight/styles/atelier-dune-dark.css | 69 - .../highlight/styles/atelier-dune-light.css | 69 - .../highlight/styles/atelier-estuary-dark.css | 84 - .../styles/atelier-estuary-light.css | 84 - .../highlight/styles/atelier-forest-dark.css | 69 - .../highlight/styles/atelier-forest-light.css | 69 - .../highlight/styles/atelier-heath-dark.css | 69 - .../highlight/styles/atelier-heath-light.css | 69 - .../styles/atelier-lakeside-dark.css | 69 - .../styles/atelier-lakeside-light.css | 69 - .../highlight/styles/atelier-plateau-dark.css | 84 - .../styles/atelier-plateau-light.css | 84 - .../highlight/styles/atelier-savanna-dark.css | 84 - .../styles/atelier-savanna-light.css | 84 - .../highlight/styles/atelier-seaside-dark.css | 69 - .../styles/atelier-seaside-light.css | 69 - .../styles/atelier-sulphurpool-dark.css | 69 - .../styles/atelier-sulphurpool-light.css | 69 - .../js/highlight/styles/atom-one-dark.css | 96 - .../js/highlight/styles/atom-one-light.css | 96 - .../js/highlight/styles/brown-paper.css | 64 - .../js/highlight/styles/brown-papersq.png | Bin 18198 -> 0 bytes .../js/highlight/styles/codepen-embed.css | 60 - .../js/highlight/styles/color-brewer.css | 71 - .../assets/js/highlight/styles/darcula.css | 77 - .../assets/js/highlight/styles/dark.css | 63 - .../assets/js/highlight/styles/darkula.css | 6 - .../assets/js/highlight/styles/default.css | 99 - .../assets/js/highlight/styles/docco.css | 97 - .../assets/js/highlight/styles/dracula.css | 76 - .../assets/js/highlight/styles/far.css | 71 - .../assets/js/highlight/styles/foundation.css | 88 - .../js/highlight/styles/github-gist.css | 71 - .../assets/js/highlight/styles/github.css | 99 - .../assets/js/highlight/styles/googlecode.css | 89 - .../assets/js/highlight/styles/grayscale.css | 101 - .../js/highlight/styles/gruvbox-dark.css | 108 - .../js/highlight/styles/gruvbox-light.css | 108 - .../assets/js/highlight/styles/hopscotch.css | 83 - .../assets/js/highlight/styles/hybrid.css | 102 - .../assets/js/highlight/styles/idea.css | 97 - .../assets/js/highlight/styles/ir-black.css | 73 - .../js/highlight/styles/kimbie.dark.css | 74 - .../js/highlight/styles/kimbie.light.css | 74 - .../assets/js/highlight/styles/magula.css | 70 - .../assets/js/highlight/styles/mono-blue.css | 59 - .../js/highlight/styles/monokai-sublime.css | 83 - .../assets/js/highlight/styles/monokai.css | 70 - .../assets/js/highlight/styles/obsidian.css | 88 - .../assets/js/highlight/styles/ocean.css | 74 - .../js/highlight/styles/paraiso-dark.css | 72 - .../js/highlight/styles/paraiso-light.css | 72 - .../assets/js/highlight/styles/pojoaque.css | 83 - .../assets/js/highlight/styles/pojoaque.jpg | Bin 1186 -> 0 bytes .../assets/js/highlight/styles/purebasic.css | 96 - .../js/highlight/styles/qtcreator_dark.css | 83 - .../js/highlight/styles/qtcreator_light.css | 83 - .../assets/js/highlight/styles/railscasts.css | 106 - .../assets/js/highlight/styles/rainbow.css | 85 - .../assets/js/highlight/styles/routeros.css | 108 - .../js/highlight/styles/school-book.css | 72 - .../js/highlight/styles/school-book.png | Bin 486 -> 0 bytes .../js/highlight/styles/solarized-dark.css | 84 - .../js/highlight/styles/solarized-light.css | 84 - .../assets/js/highlight/styles/sunburst.css | 102 - .../highlight/styles/tomorrow-night-blue.css | 75 - .../styles/tomorrow-night-bright.css | 74 - .../styles/tomorrow-night-eighties.css | 74 - .../js/highlight/styles/tomorrow-night.css | 75 - .../assets/js/highlight/styles/tomorrow.css | 72 - .../assets/js/highlight/styles/vs.css | 68 - .../assets/js/highlight/styles/vs2015.css | 115 - .../assets/js/highlight/styles/xcode.css | 93 - .../assets/js/highlight/styles/xt256.css | 92 - .../assets/js/highlight/styles/zenburn.css | 80 - .../assets/js/html5shiv.min.js | 4 - .../assets/js/jquery-3.1.1.min.js | 4 - .../assets/js/jquery-migrate-3.0.0.js | 540 -- .../assets/js/jquery.mmenu.all.js | 186 - .../assets/js/jquery.sldr.js | 786 --- .../assets/js/jss-script.min.js | 1 - doc/slihelp_generator/generate_help.py | 148 - doc/slihelp_generator/generate_helpindex.py | 40 - doc/slihelp_generator/helpers.py | 116 - doc/slihelp_generator/templates/cmd.tpl.html | 45 - .../templates/footer.tpl.html | 3 - .../templates/helpindex.tpl.html | 35 - .../templates/nb-code.tpl.json | 11 - .../templates/nb-md.tpl.json | 7 - doc/slihelp_generator/templates/nest.tpl.css | 84 - .../templates/overview-sample-footer.tmpl | 56 - .../templates/overview-sample-header.tmpl | 165 - .../templates/sample-footer.tmpl | 56 - .../templates/sample-header.tmpl | 165 - doc/slihelp_generator/writers.py | 291 - examples/CMakeLists.txt | 9 - examples/EditorSupport/vim/syntax/sli.vim | 74 - examples/nest/ArtificialSynchrony.pl | 158 - examples/nest/ArtificialSynchrony.sli | 227 - examples/nest/Brette_et_al_2007/benchmark.sli | 246 - examples/nest/Brette_et_al_2007/coba.sli | 121 - examples/nest/Brette_et_al_2007/cuba.sli | 127 - examples/nest/Brette_et_al_2007/cuba_ps.sli | 124 - examples/nest/Brette_et_al_2007/cuba_stdp.sli | 320 -- examples/nest/Brette_et_al_2007/hh_coba.sli | 122 - examples/nest/BrodyHopfield.sli | 100 - examples/nest/Potjans_2014/README.txt | 127 - examples/nest/Potjans_2014/microcircuit.sli | 565 -- examples/nest/Potjans_2014/network_params.sli | 190 - .../nest/Potjans_2014/run_microcircuit.sh | 49 - examples/nest/Potjans_2014/sim_params.sli | 121 - examples/nest/Potjans_2014/spike_analysis.py | 192 - examples/nest/balancedneuron-2.sli | 144 - examples/nest/balancedneuron.sli | 88 - examples/nest/brunel-2000.sli | 317 -- examples/nest/brunel-2000_newconnect.sli | 312 -- examples/nest/brunel-2000_newconnect_dc.sli | 320 -- examples/nest/brunel_ps.sli | 312 -- examples/nest/conngen_interface.sli | 67 - examples/nest/correlospinmatrix_detector.sli | 55 - examples/nest/hpc_benchmark.sli | 482 -- examples/nest/multimeter.sli | 63 - examples/nest/music/clocktest.music | 9 - examples/nest/music/conttest.music | 9 - examples/nest/music/conttest.py | 40 - examples/nest/music/eventtest.music | 13 - examples/nest/music/messages0.dat | 2 - examples/nest/music/messages1.dat | 3 - examples/nest/music/minimalmusicsetup.music | 11 - .../music/minimalmusicsetup_receivenest.py | 42 - .../nest/music/minimalmusicsetup_sendnest.py | 46 - examples/nest/music/msgtest.music | 9 - examples/nest/music/msgtest.py | 40 - examples/nest/music/spike_exporter.sli | 93 - .../nest/music/three_neurons_threaded.music | 14 - .../three_neurons_threaded_receivenest.sli | 47 - .../music/three_neurons_threaded_sendnest.sli | 57 - .../nest/structural_plasticity_benchmark.sli | 380 -- lib/CMakeLists.txt | 21 - lib/README.md | 3 - lib/sli/FormattedIO.sli | 327 -- lib/sli/arraylib.sli | 877 --- lib/sli/debug.sli | 367 -- lib/sli/filesystem.sli | 336 -- lib/sli/helpinit.sli | 894 --- lib/sli/library.sli | 517 -- lib/sli/mathematica.sli | 4955 ----------------- lib/sli/misc_helpers.sli | 1309 ----- lib/sli/nest-init.sli | 1526 ----- lib/sli/oosupport.sli | 217 - lib/sli/processes.sli | 1289 ----- lib/sli/ps-lib.sli | 188 - lib/sli/regexp.sli | 532 -- lib/sli/sli-init.sli | 2263 -------- lib/sli/typeinit.sli | 1382 ----- lib/sli/unittest.sli | 1408 ----- libnestutil/CMakeLists.txt | 1 - libnestutil/dictionary.cpp | 4 +- models/CMakeLists.txt | 3 +- models/aeif_cond_alpha.cpp | 2 - models/aeif_cond_exp.cpp | 2 - models/aeif_psc_alpha.cpp | 2 - models/aeif_psc_delta.cpp | 2 - models/aeif_psc_delta_clopath.cpp | 2 - models/aeif_psc_exp.cpp | 2 - models/amat2_psc_exp.cpp | 2 - models/binary_neuron.h | 5 - models/clopath_synapse.h | 3 - models/cm_default.h | 2 +- models/cm_tree.h | 4 - models/cont_delay_synapse_impl.h | 2 - models/correlation_detector.cpp | 5 - models/dc_generator.cpp | 5 - models/gamma_sup_generator.cpp | 4 - models/gif_cond_exp.cpp | 4 - models/gif_psc_exp_multisynapse.cpp | 10 +- models/glif_cond.cpp | 1 - models/glif_psc.h | 2 - models/hh_cond_beta_gap_traub.cpp | 3 - models/hh_cond_exp_traub.cpp | 2 - models/hh_psc_alpha.cpp | 3 - models/hh_psc_alpha_clopath.cpp | 3 - models/hh_psc_alpha_gap.cpp | 3 - models/ht_neuron.h | 4 - models/iaf_chs_2007.cpp | 3 - models/iaf_cond_alpha.cpp | 2 - models/iaf_cond_alpha_mc.h | 3 - models/iaf_cond_exp.cpp | 2 - models/iaf_cond_exp_sfa_rr.cpp | 2 - models/iaf_psc_alpha.cpp | 2 - models/iaf_psc_alpha_canon.cpp | 2 - models/iaf_psc_alpha_ps.cpp | 2 - models/iaf_psc_delta.cpp | 3 - models/iaf_psc_delta_ps.cpp | 2 - models/iaf_psc_exp.cpp | 3 - models/iaf_psc_exp_htum.cpp | 2 - models/iaf_psc_exp_multisynapse.cpp | 5 - models/iaf_psc_exp_ps.cpp | 2 - models/iaf_psc_exp_ps_lossless.cpp | 4 - models/inhomogeneous_poisson_generator.cpp | 1 - models/izhikevich.cpp | 2 - models/jonke_synapse.h | 3 - models/mat2_psc_exp.cpp | 2 - models/modelsmodule.h | 2 - models/multimeter.h | 4 - models/music_cont_in_proxy.h | 2 - models/music_cont_out_proxy.h | 2 - models/music_event_in_proxy.cpp | 7 - models/music_event_out_proxy.cpp | 7 - models/music_message_in_proxy.cpp | 5 - models/music_rate_in_proxy.h | 3 +- models/parrot_neuron.cpp | 2 - models/parrot_neuron_ps.cpp | 2 - models/pp_cond_exp_mc_urbanczik.cpp | 3 - models/pp_cond_exp_mc_urbanczik.h | 3 - models/pp_psc_delta.cpp | 3 - models/ppd_sup_generator.cpp | 1 - models/rate_neuron_ipn_impl.h | 5 - models/rate_neuron_opn_impl.h | 5 - models/rate_transformer_node_impl.h | 5 - models/siegert_neuron.cpp | 3 - models/sinusoidal_gamma_generator.cpp | 1 - models/sinusoidal_poisson_generator.cpp | 1 - models/spike_dilutor.cpp | 3 - models/spike_generator.cpp | 7 - models/spike_recorder.cpp | 3 - models/spin_detector.cpp | 3 - models/stdp_dopamine_synapse.cpp | 2 - models/stdp_nn_pre_centered_synapse.h | 3 - models/stdp_nn_restr_synapse.h | 3 - models/stdp_nn_symm_synapse.h | 3 - models/stdp_pl_synapse_hom.cpp | 3 - models/stdp_synapse.h | 3 - models/step_current_generator.cpp | 1 - models/step_rate_generator.cpp | 1 - models/urbanczik_synapse.h | 3 - models/volume_transmitter.cpp | 2 - models/volume_transmitter.h | 3 - nest/CMakeLists.txt | 106 - nest/README.md | 3 - nest/main.cpp | 48 - nest/neststartup.cpp | 204 - nest/neststartup.h | 71 - nestkernel/CMakeLists.txt | 3 +- nestkernel/connection_creator.h | 6 +- nestkernel/exceptions.cpp | 29 + nestkernel/exceptions.h | 55 + nestkernel/generic_factory.h | 3 + nestkernel/grid_mask.h | 6 +- nestkernel/layer.h | 4 +- nestkernel/layer_impl.h | 2 +- nestkernel/mask.h | 24 +- nestkernel/mask_impl.h | 6 +- nestkernel/model_manager.cpp | 1 + nestkernel/model_manager_impl.h | 1 + nestkernel/nest.cpp | 4 +- nestkernel/nest_names.h | 3 - nestkernel/nest_time.cpp | 19 - nestkernel/nest_time.h | 6 - nestkernel/nestmodule.cpp | 3114 ----------- nestkernel/nestmodule.h | 837 --- nestkernel/node_manager.cpp | 1 + nestkernel/parameter.h | 3 +- nestkernel/position.h | 15 - nestkernel/proxynode.cpp | 3 +- nestkernel/recording_backend_ascii.cpp | 8 +- nestkernel/recording_backend_sionlib.cpp | 3 - nestkernel/simulation_manager.cpp | 1 + nestkernel/spatial.cpp | 3 +- nestkernel/spatial.h | 2 +- nestkernel/synaptic_element.cpp | 2 - pynest/CMakeLists.txt | 57 +- pynest/nest/pynest-init.sli | 120 - pynest/pynestkernel.pxd | 268 - pynest/pynestkernel.pyx | 590 -- pynest/pynestkernel_aux.h | 3 - pynest/pynestkernel_aux.h~ | 70 - sli/CMakeLists.txt | 147 - sli/README.md | 3 - sli/aggregatedatum.h | 180 - sli/arraydatum.cc | 228 - sli/arraydatum.h | 105 - sli/booldatum.cc | 89 - sli/booldatum.h | 88 - sli/callbackdatum.h | 35 - sli/charcode.cc | 62 - sli/charcode.h | 49 - sli/datum.cc | 34 - sli/datum.h | 220 - sli/dict.cc | 226 - sli/dict.h | 339 -- sli/dictdatum.h | 36 - sli/dictstack.cc | 231 - sli/dictstack.h | 406 -- sli/dictutils.cc | 112 - sli/dictutils.h | 375 -- sli/doubledatum.cc | 49 - sli/doubledatum.h | 58 - sli/fdstream.cc | 158 - sli/fdstream.h | 357 -- sli/filesystem.cc | 392 -- sli/filesystem.h | 124 - sli/functional.h | 44 - sli/functiondatum.cc | 31 - sli/functiondatum.h | 183 - sli/genericdatum.h | 129 - sli/get_mem.c | 48 - sli/gnureadline.cc | 128 - sli/gnureadline.h | 69 - sli/integerdatum.cc | 28 - sli/integerdatum.h | 53 - sli/interpret.cc | 1363 ----- sli/interpret.h | 914 --- sli/iostreamdatum.h | 43 - sli/literaldatum.cc | 31 - sli/lockptrdatum.h | 153 - sli/name.cc | 132 - sli/name.h | 180 - sli/namedatum.cc | 30 - sli/namedatum.h | 130 - sli/numericdatum.h | 116 - sli/oosupport.cc | 77 - sli/oosupport.h | 54 - sli/parser.cc | 221 - sli/parser.h | 101 - sli/parserdatum.h | 52 - sli/processes.cc | 955 ---- sli/processes.h | 963 ---- sli/puresli.cc | 79 - sli/scanner.cc | 816 --- sli/scanner.h | 209 - sli/sharedptrdatum.h | 98 - sli/sli_io.cc | 2054 ------- sli/sli_io.h | 474 -- sli/sliactions.cc | 147 - sli/sliactions.h | 113 - sli/sliarray.cc | 4249 -------------- sli/sliarray.h | 645 --- sli/slibuiltins.cc | 442 -- sli/slibuiltins.h | 141 - sli/slicontrol.cc | 2260 -------- sli/slicontrol.h | 658 --- sli/slidata.cc | 1682 ------ sli/slidata.h | 631 --- sli/slidict.cc | 1022 ---- sli/slidict.h | 260 - sli/sliexceptions.cc | 210 - sli/sliexceptions.h | 484 -- sli/slifunction.h | 62 - sli/sligraphics.cc | 378 -- sli/sligraphics.h | 73 - sli/slimath.cc | 1891 ------- sli/slimath.h | 848 --- sli/slimodule.cc | 41 - sli/slimodule.h | 66 - sli/slinames.cpp | 32 - sli/slinames.h | 41 - sli/sliregexp.cc | 214 - sli/sliregexp.h | 124 - sli/slistack.cc | 497 -- sli/slistack.h | 190 - sli/slistartup.cc | 436 -- sli/slistartup.h | 157 - sli/slitype.cc | 70 - sli/slitype.h | 113 - sli/slitypecheck.cc | 357 -- sli/slitypecheck.h | 89 - sli/specialfunctionsmodule.cc | 462 -- sli/specialfunctionsmodule.h | 268 - sli/stringdatum.cc | 115 - sli/stringdatum.h | 99 - sli/symboldatum.cc | 29 - sli/symboldatum.h | 73 - sli/tarrayobj.cc | 692 --- sli/tarrayobj.h | 287 - sli/token.cc | 204 - sli/token.h | 508 -- sli/tokenarray.cc | 174 - sli/tokenarray.h | 503 -- sli/tokenstack.cc | 46 - sli/tokenstack.h | 198 - sli/tokenutils.cc | 357 -- sli/tokenutils.h | 280 - sli/triedatum.cc | 40 - sli/triedatum.h | 163 - sli/typearray.h | 35 - sli/typechk.cc | 295 - sli/typechk.h | 266 - sli/utils.cc | 45 - sli/utils.h | 35 - testsuite/CMakeLists.txt | 20 +- testsuite/cpptests/CMakeLists.txt | 2 - testsuite/mpi_selftests/fail/CMakeLists.txt | 32 - .../fail/crash_distributed_assert_or_die.sli | 51 - ...rash_distributed_collect_assert_or_die.sli | 53 - ...sh_distributed_invariant_assert_or_die.sli | 53 - .../fail/crash_distributed_pass_or_die.sli | 50 - ...rocess_invariant_collect_assert_or_die.sli | 57 - ...process_invariant_events_assert_or_die.sli | 84 - ...d_rank_invariant_collect_assert_or_die.sli | 56 - .../fail/fail_distributed_assert_or_die.sli | 48 - ...fail_distributed_collect_assert_or_die.sli | 49 - ...il_distributed_invariant_assert_or_die.sli | 48 - .../fail/fail_distributed_pass_or_die.sli | 49 - ...rocess_invariant_collect_assert_or_die.sli | 52 - ...process_invariant_events_assert_or_die.sli | 86 - ...d_rank_invariant_collect_assert_or_die.sli | 50 - testsuite/mpi_selftests/pass/CMakeLists.txt | 30 - .../pass/test_distributed_assert_or_die.sli | 48 - ...test_distributed_collect_assert_or_die.sli | 48 - ...st_distributed_invariant_assert_or_die.sli | 48 - .../pass/test_distributed_pass_or_die.sli | 48 - ...rocess_invariant_collect_assert_or_die.sli | 52 - ...process_invariant_events_assert_or_die.sli | 83 - ...d_rank_invariant_collect_assert_or_die.sli | 50 - .../pass/test_parse_message_line.sli | 116 - testsuite/mpitests/CMakeLists.txt | 30 - testsuite/mpitests/README | 69 - testsuite/mpitests/issue-1957.sli | 51 - testsuite/mpitests/issue-1974.sli | 56 - testsuite/mpitests/issue-2119.sli | 66 - testsuite/mpitests/issue-281.sli | 63 - testsuite/mpitests/issue-600.sli | 101 - testsuite/mpitests/test_all_to_all.sli | 50 - .../test_connect_array_all_to_all_mpi.sli | 122 - .../test_connect_array_fixed_indegree_mpi.sli | 119 - ...test_connect_array_fixed_outdegree_mpi.sli | 109 - testsuite/mpitests/test_delay_exchange.sli | 50 - testsuite/mpitests/test_fixed_indegree.sli | 57 - .../mpitests/test_gamma_sup_generator.sli | 70 - testsuite/mpitests/test_gap_junctions_mpi.sli | 101 - testsuite/mpitests/test_get_nodes.sli | 166 - testsuite/mpitests/test_ginzburg_neuron.sli | 74 - testsuite/mpitests/test_global_rng.sli | 61 - testsuite/mpitests/test_iaf_ring.sli | 119 - testsuite/mpitests/test_localonly.sli | 57 - testsuite/mpitests/test_mini_brunel_ps.sli | 196 - testsuite/mpitests/test_mip_generator.sli | 70 - testsuite/mpitests/test_multiple_synapses.sli | 129 - ...est_multiple_synapses_spatial_networks.sli | 145 - testsuite/mpitests/test_multiplicity.sli | 84 - testsuite/mpitests/test_neuron_vp.sli | 51 - testsuite/mpitests/test_neuron_vp_global.sli | 51 - testsuite/mpitests/test_noise_generator.sli | 70 - testsuite/mpitests/test_one_to_one.sli | 50 - .../mpitests/test_pairwise_bernoulli.sli | 50 - .../mpitests/test_parallel_conn_and_rand.sli | 99 - testsuite/mpitests/test_poisson_generator.sli | 70 - .../mpitests/test_poisson_generator_ps.sli | 69 - testsuite/mpitests/test_pp_psc_delta.sli | 73 - testsuite/mpitests/test_ppd_sup_generator.sli | 70 - .../mpitests/test_pulsepacket_generator.sli | 73 - testsuite/mpitests/test_rate_neurons_mpi.sli | 91 - .../test_sinusoidal_gamma_generator_1.sli | 101 - .../test_sinusoidal_gamma_generator_2.sli | 102 - .../test_sinusoidal_gamma_generator_3.sli | 97 - .../test_sinusoidal_gamma_generator_4.sli | 96 - .../test_sinusoidal_poisson_generator_1.sli | 94 - .../test_sinusoidal_poisson_generator_2.sli | 93 - .../test_sinusoidal_poisson_generator_3.sli | 89 - .../test_sinusoidal_poisson_generator_4.sli | 89 - .../test_sinusoidal_poisson_generator_5.sli | 102 - .../test_sinusoidal_poisson_generator_6.sli | 115 - .../test_spatial_distributed_positions.sli | 58 - ...ial_pairwise_bernoulli_on_source_param.sli | 69 - .../test_symmetric_connections_mpi.sli | 115 - testsuite/mpitests/ticket-400.sli | 46 - testsuite/mpitests/ticket-516.sli | 60 - testsuite/mpitests/ticket-955.sli | 64 - ..._to_layer_pairwise_bernoulli_on_source.sli | 77 - ..._to_layer_pairwise_bernoulli_on_target.sli | 77 - ...test_free_layer_to_layer_source_driven.sli | 77 - ...test_free_layer_to_layer_target_driven.sli | 77 - ...pi_test_free_layer_to_sd_target_driven.sli | 77 - ..._to_layer_pairwise_bernoulli_on_source.sli | 78 - ..._to_layer_pairwise_bernoulli_on_target.sli | 78 - ...pi_test_free_pg_to_layer_source_driven.sli | 78 - ...pi_test_free_pg_to_layer_target_driven.sli | 78 - ..._mpi_test_pairwise_bernoulli_on_source.sli | 99 - ..._mpi_test_pairwise_bernoulli_on_target.sli | 99 - testsuite/musictests/CMakeLists.txt | 20 - testsuite/musictests/README.md | 30 - testsuite/musictests/empty.sli | 23 - testsuite/musictests/test_cont_proxy.music | 36 - .../musictests/test_cont_proxy_receiver.sli | 75 - .../musictests/test_cont_proxy_sender.sli | 42 - testsuite/musictests/test_event_proxies.music | 13 - testsuite/musictests/test_event_proxies.sh | 4 - .../test_event_proxies_issue-696.music | 33 - .../test_event_proxies_issue-696_receiver.sli | 44 - .../test_event_proxies_issue-696_sender.sli | 57 - .../test_event_proxies_receiver.sli | 43 - .../musictests/test_event_proxies_sender.sli | 52 - testsuite/musictests/test_message.music | 38 - testsuite/musictests/test_message0.dat | 3 - .../musictests/test_message_receiver.sli | 47 - .../musictests/test_music_failure1.music | 5 - .../musictests/test_music_failure2.music | 11 - testsuite/musictests/test_rate_proxy.music | 35 - .../musictests/test_rate_proxy_receiver.sli | 52 - .../musictests/test_rate_proxy_sender.sli | 44 - testsuite/nest_indirect | 21 - testsuite/nest_serial | 21 - testsuite/regressiontests/issue-105.sli | 194 - testsuite/regressiontests/issue-1085.sli | 84 - testsuite/regressiontests/issue-1100.sli | 60 - testsuite/regressiontests/issue-1140.sli | 82 - testsuite/regressiontests/issue-1212.sli | 63 - testsuite/regressiontests/issue-1242.sli | 53 - testsuite/regressiontests/issue-1305.sli | 63 - testsuite/regressiontests/issue-1366.sli | 60 - testsuite/regressiontests/issue-1610.sli | 53 - testsuite/regressiontests/issue-1640.sli | 91 - testsuite/regressiontests/issue-2052.sli | 59 - testsuite/regressiontests/issue-211.sli | 98 - testsuite/regressiontests/issue-2282.sli | 71 - testsuite/regressiontests/issue-264.sli | 93 - testsuite/regressiontests/issue-311.sli | 76 - testsuite/regressiontests/issue-327.sli | 85 - testsuite/regressiontests/issue-351.sli | 82 - testsuite/regressiontests/issue-368.sli | 161 - testsuite/regressiontests/issue-410.sli | 112 - testsuite/regressiontests/issue-437.sli | 87 - testsuite/regressiontests/issue-521.sli | 78 - testsuite/regressiontests/issue-545.sli | 77 - testsuite/regressiontests/issue-596.sli | 81 - testsuite/regressiontests/issue-659.sli | 64 - testsuite/regressiontests/issue-665.sli | 160 - testsuite/regressiontests/issue-707.sli | 68 - testsuite/regressiontests/issue-708.sli | 90 - testsuite/regressiontests/issue-735.sli | 111 - .../regressiontests/issue-737-threads.sli | 96 - testsuite/regressiontests/issue-737.sli | 81 - testsuite/regressiontests/issue-740.sli | 106 - testsuite/regressiontests/issue-77.sli | 223 - testsuite/regressiontests/issue-832.sli | 168 - testsuite/regressiontests/issue-888.sli | 47 - testsuite/regressiontests/ticket-156.sli | 110 - testsuite/regressiontests/ticket-157.sli | 41 - testsuite/regressiontests/ticket-235.sli | 49 - testsuite/regressiontests/ticket-293.sli | 46 - testsuite/regressiontests/ticket-310.sli | 78 - testsuite/regressiontests/ticket-349.sli | 115 - testsuite/regressiontests/ticket-382.sli | 62 - testsuite/regressiontests/ticket-386.sli | 84 - testsuite/regressiontests/ticket-414.sli | 50 - testsuite/regressiontests/ticket-421.sli | 102 - testsuite/regressiontests/ticket-433.sli | 187 - testsuite/regressiontests/ticket-451.sli | 95 - testsuite/regressiontests/ticket-452.sli | 84 - testsuite/regressiontests/ticket-459.sli | 104 - testsuite/regressiontests/ticket-464.sli | 73 - testsuite/regressiontests/ticket-466.sli | 56 - testsuite/regressiontests/ticket-475.sli | 49 - testsuite/regressiontests/ticket-478.sli | 123 - testsuite/regressiontests/ticket-481.sli | 122 - testsuite/regressiontests/ticket-507.sli | 75 - testsuite/regressiontests/ticket-514.sli | 57 - testsuite/regressiontests/ticket-537.sli | 61 - testsuite/regressiontests/ticket-564.sli | 65 - testsuite/regressiontests/ticket-566.sli | 52 - testsuite/regressiontests/ticket-573.sli | 50 - testsuite/regressiontests/ticket-580.sli | 105 - testsuite/regressiontests/ticket-618.sli | 119 - testsuite/regressiontests/ticket-619.sli | 45 - testsuite/regressiontests/ticket-638.sli | 78 - testsuite/regressiontests/ticket-643.sli | 54 - testsuite/regressiontests/ticket-673.sli | 71 - testsuite/regressiontests/ticket-681.sli | 63 - .../ticket-686-positive-parameters.sli | 191 - testsuite/regressiontests/ticket-689.sli | 53 - .../ticket-692-getconnections-args.sli | 88 - testsuite/regressiontests/ticket-710.sli | 47 - testsuite/regressiontests/ticket-716.sli | 63 - testsuite/regressiontests/ticket-733.sli | 37 - testsuite/regressiontests/ticket-737.sli | 99 - testsuite/regressiontests/ticket-754.sli | 96 - testsuite/regressiontests/ticket-772.sli | 68 - testsuite/regressiontests/ticket-777.sli | 57 - testsuite/regressiontests/ticket-784.sli | 45 - testsuite/regressiontests/ticket-785.sli | 49 - testsuite/regressiontests/ticket-787.sli | 157 - testsuite/regressiontests/ticket-798.sli | 56 - .../regressiontests/ticket-80-175-179.sli | 133 - testsuite/regressiontests/ticket-800.sli | 373 -- testsuite/regressiontests/ticket-85.sli | 121 - testsuite/regressiontests/ticket-881.sli | 98 - testsuite/regressiontests/ticket-903.sli | 64 - testsuite/regressiontests/ticket-921.sli | 91 - testsuite/regressiontests/ticket-926.sli | 58 - testsuite/regressiontests/ticket-933.sli | 65 - testsuite/regressiontests/ticket-941.sli | 147 - testsuite/regressiontests/ticket-949.sli | 50 - testsuite/regressiontests/ticket-959.sli | 64 - testsuite/selftests/CMakeLists.txt | 47 - testsuite/selftests/exitcode0.sli | 23 - testsuite/selftests/exitcode1.sli | 23 - testsuite/selftests/exitcode126.sli | 23 - testsuite/selftests/exitcode2.sli | 23 - testsuite/selftests/exitcode3.sli | 23 - testsuite/selftests/exitcode99.sli | 23 - testsuite/selftests/test_assert_or_die_b.sli | 42 - testsuite/selftests/test_assert_or_die_p.sli | 42 - testsuite/selftests/test_badhandler.sli | 47 - testsuite/selftests/test_crash_or_die.sli | 76 - testsuite/selftests/test_fail.sli | 47 - testsuite/selftests/test_fail_or_die.sli | 42 - .../test_failbutnocrash_or_die_crash.sli | 73 - .../test_failbutnocrash_or_die_pass.sli | 73 - testsuite/selftests/test_goodhandler.sli | 42 - testsuite/selftests/test_lazyhandler.sli | 43 - testsuite/selftests/test_pass.sli | 43 - testsuite/selftests/test_pass_or_die.sli | 42 - .../test_passorfailbutnocrash_or_die.sli | 71 - testsuite/selftests/test_stop.sli | 49 - testsuite/unittests/CMakeLists.txt | 28 - testsuite/unittests/issue-463.sli | 83 - testsuite/unittests/issue-565.sli | 83 - testsuite/unittests/model_node_init.sli | 91 - .../unittests/test_DoubleVector_IntVector.sli | 88 - testsuite/unittests/test_GetConnections.sli | 252 - testsuite/unittests/test_Map.sli | 55 - testsuite/unittests/test_MapIndexed.sli | 49 - testsuite/unittests/test_ac_generator.sli | 108 - testsuite/unittests/test_add_freeze_thaw.sli | 116 - .../test_aeif_cond_alpha_multisynapse.sli | 319 -- .../test_aeif_cond_beta_multisynapse.sli | 512 -- testsuite/unittests/test_amat2_psc_exp.sli | 252 - .../unittests/test_bernoulli_synapse.sli | 113 - testsuite/unittests/test_binary.sli | 170 - .../unittests/test_common_props_setting.sli | 89 - testsuite/unittests/test_compare_delta.sli | 89 - testsuite/unittests/test_cond_exp_models.sli | 143 - testsuite/unittests/test_connect.sli | 220 - .../unittests/test_connect_after_simulate.sli | 128 - .../unittests/test_connect_with_threads.sli | 214 - .../unittests/test_cont_delay_synapse.sli | 121 - testsuite/unittests/test_copymodel.sli | 69 - testsuite/unittests/test_corr_det.sli | 219 - testsuite/unittests/test_corr_matrix_det.sli | 224 - .../test_correlospinmatrix_detector.sli | 91 - .../unittests/test_count_connections.sli | 69 - testsuite/unittests/test_cva.sli | 52 - testsuite/unittests/test_cvi.sli | 57 - testsuite/unittests/test_dcgen_versus_I_e.sli | 133 - .../unittests/test_default_delays_weights.sli | 103 - .../unittests/test_delay_after_res_change.sli | 110 - testsuite/unittests/test_delay_check.sli | 85 - testsuite/unittests/test_dirname.sli | 71 - testsuite/unittests/test_distance.sli | 109 - testsuite/unittests/test_fast_operators.sli | 53 - .../test_free_mask_circ_anchor_00.sli | 274 - .../test_free_mask_circ_anchor_01.sli | 263 - .../test_free_mask_circ_anchor_10.sli | 297 - .../test_free_mask_circ_anchor_11.sli | 297 - .../test_free_mask_donut_anchor_00.sli | 248 - .../test_free_mask_donut_anchor_01.sli | 243 - .../test_free_mask_donut_anchor_10.sli | 271 - .../test_free_mask_donut_anchor_11.sli | 273 - .../unittests/test_free_mask_rect_00.sli | 276 - .../unittests/test_free_mask_rect_01.sli | 258 - .../unittests/test_free_mask_rect_11.sli | 301 - .../unittests/test_free_mask_rect_13.sli | 387 -- .../unittests/test_gamma_sup_generator.sli | 331 -- testsuite/unittests/test_gap_junction.sli | 200 - testsuite/unittests/test_gif_cond_exp.sli | 123 - .../test_gif_cond_exp_multisynapse.sli | 130 - testsuite/unittests/test_gif_pop_psc_exp.sli | 113 - testsuite/unittests/test_gif_psc_exp.sli | 118 - .../test_gif_psc_exp_multisynapse.sli | 125 - .../unittests/test_ginzburg_and_mcculloch.sli | 56 - .../unittests/test_hh_cond_beta_gap_traub.sli | 160 - .../unittests/test_hh_cond_exp_traub.sli | 155 - testsuite/unittests/test_hh_psc_alpha_gap.sli | 160 - testsuite/unittests/test_hpc_synapse.sli | 237 - testsuite/unittests/test_iaf.sli | 180 - testsuite/unittests/test_iaf_1to2.sli | 180 - .../unittests/test_iaf_1to2_default_delay.sli | 185 - testsuite/unittests/test_iaf_1to2_ex.sli | 203 - testsuite/unittests/test_iaf_dc.sli | 148 - testsuite/unittests/test_iaf_dc_aligned.sli | 226 - .../test_iaf_dc_aligned_automatic.sli | 232 - .../unittests/test_iaf_dc_aligned_delay.sli | 221 - .../unittests/test_iaf_dc_aligned_stop.sli | 227 - testsuite/unittests/test_iaf_fudge.sli | 100 - testsuite/unittests/test_iaf_i0.sli | 136 - .../unittests/test_iaf_i0_refractory.sli | 205 - .../unittests/test_iaf_min_delay_create.sli | 97 - .../unittests/test_iaf_min_delay_set.sli | 103 - .../test_iaf_min_delay_simblocks.sli | 109 - .../unittests/test_iaf_ps_dc_accuracy.sli | 348 -- .../unittests/test_iaf_ps_dc_t_accuracy.sli | 210 - .../unittests/test_iaf_ps_psp_accuracy.sli | 206 - .../test_iaf_ps_psp_poisson_accuracy.sli | 299 - ..._iaf_ps_psp_poisson_generator_accuracy.sli | 351 -- .../test_iaf_psc_alpha_multisynapse.sli | 233 - testsuite/unittests/test_iaf_psc_exp.sli | 178 - .../test_iaf_psc_exp_multisynapse.sli | 296 - testsuite/unittests/test_iaf_psc_exp_ps.sli | 172 - .../test_iaf_psc_exp_ps_lossless.sli | 310 -- testsuite/unittests/test_iaf_psp.sli | 223 - .../unittests/test_iaf_psp_normalized.sli | 183 - testsuite/unittests/test_iaf_psp_peak.sli | 118 - testsuite/unittests/test_inh_stdp_synapse.sli | 243 - .../test_inhomogeneous_poisson_generator.sli | 178 - testsuite/unittests/test_lambertw.sli | 126 - testsuite/unittests/test_mat2_psc_exp.sli | 163 - testsuite/unittests/test_max_delay.sli | 48 - testsuite/unittests/test_message.sli | 365 -- testsuite/unittests/test_min_delay.sli | 48 - .../unittests/test_min_delay_tics_reset.sli | 92 - testsuite/unittests/test_mip_corrdet.sli | 138 - testsuite/unittests/test_multimeter.sli | 127 - .../unittests/test_multimeter_freeze_thaw.sli | 171 - .../unittests/test_multimeter_offset.sli | 348 -- .../unittests/test_multimeter_stepping.sli | 133 - .../unittests/test_multimeter_support.sli | 88 - .../unittests/test_multiple_multimeter.sli | 156 - .../test_multiple_random_source_stepping.sli | 89 - .../unittests/test_multisynapse_models.sli | 104 - testsuite/unittests/test_multithreading.sli | 90 - .../test_neurons_handle_multiplicity.sli | 215 - testsuite/unittests/test_node_collection.sli | 1185 ---- testsuite/unittests/test_noise_generator.sli | 124 - testsuite/unittests/test_ntree_split.sli | 97 - testsuite/unittests/test_oversize_mask.sli | 191 - .../test_poisson_generator_campbell_alpha.sli | 87 - .../unittests/test_poisson_generator_ps.sli | 79 - .../unittests/test_poisson_ps_intervals.sli | 88 - .../test_poisson_ps_min_interval.sli | 72 - testsuite/unittests/test_pp_pop_psc_delta.sli | 200 - testsuite/unittests/test_pp_psc_delta.sli | 444 -- .../unittests/test_ppd_sup_generator.sli | 340 -- .../test_psp_amplitude_consistency.sli | 162 - .../unittests/test_pulsepacket_generator.sli | 129 - testsuite/unittests/test_rate_connections.sli | 251 - .../test_reg_mask_circ_anchor_00.sli | 267 - .../test_reg_mask_circ_anchor_01.sli | 256 - .../test_reg_mask_circ_anchor_10.sli | 290 - .../test_reg_mask_circ_anchor_11.sli | 291 - .../test_reg_mask_donut_anchor_00.sli | 241 - .../test_reg_mask_donut_anchor_01.sli | 236 - .../test_reg_mask_donut_anchor_10.sli | 264 - .../test_reg_mask_donut_anchor_11.sli | 266 - .../test_reg_mask_grid_anchor_00.sli | 268 - .../test_reg_mask_grid_anchor_01.sli | 269 - .../test_reg_mask_grid_anchor_02.sli | 241 - .../test_reg_mask_grid_anchor_03.sli | 272 - .../test_reg_mask_grid_anchor_04.sli | 235 - .../test_reg_mask_grid_anchor_05.sli | 162 - .../test_reg_mask_grid_anchor_06.sli | 326 -- .../test_reg_mask_grid_anchor_10.sli | 304 - .../test_reg_mask_grid_anchor_11.sli | 304 - .../test_reg_mask_grid_anchor_13.sli | 304 - .../test_reg_mask_grid_anchor_15.sli | 319 -- testsuite/unittests/test_reg_mask_rect_00.sli | 271 - testsuite/unittests/test_reg_mask_rect_01.sli | 274 - testsuite/unittests/test_reg_mask_rect_02.sli | 269 - testsuite/unittests/test_reg_mask_rect_10.sli | 313 -- testsuite/unittests/test_reg_mask_rect_11.sli | 315 -- testsuite/unittests/test_round.sli | 43 - testsuite/unittests/test_rows_cols_pos.sli | 53 - testsuite/unittests/test_set_Vm.sli | 102 - .../unittests/test_set_delay_extrema.sli | 72 - .../unittests/test_set_start_stop_origin.sli | 174 - testsuite/unittests/test_set_tics.sli | 77 - .../unittests/test_setconnections_threads.sli | 51 - .../test_sinusoidal_gamma_generator.sli | 334 -- .../test_sinusoidal_poisson_generator.sli | 325 -- testsuite/unittests/test_sort.sli | 42 - testsuite/unittests/test_spike_dilutor.sli | 154 - testsuite/unittests/test_spike_generator.sli | 532 -- testsuite/unittests/test_spike_poisson_ps.sli | 111 - .../unittests/test_spike_poisson_ps_base2.sli | 136 - testsuite/unittests/test_spike_rec_reset.sli | 75 - testsuite/unittests/test_spike_recorder.sli | 78 - .../unittests/test_spike_transmission_ps.sli | 119 - .../test_spike_transmission_ps_iaf.sli | 67 - testsuite/unittests/test_spin_detector.sli | 81 - testsuite/unittests/test_stdp_synapse.sli | 238 - .../unittests/test_step_current_generator.sli | 119 - testsuite/unittests/test_steppedsim.sli | 74 - .../unittests/test_symmetric_connections.sli | 234 - testsuite/unittests/test_syn_hom_w.sli | 139 - testsuite/unittests/test_thread_local_ids.sli | 67 - .../unittests/test_threaded_multimeter.sli | 84 - .../test_threaded_spike_recorder.sli | 83 - testsuite/unittests/test_time_input.sli | 96 - .../unittests/test_tsodyks_depressing.sli | 200 - .../unittests/test_tsodyks_facilitating.sli | 200 - testsuite/unittests/test_two_devices.sli | 71 - testsuite/unittests/test_voltmeter_reset.sli | 76 - testsuite/unittests/test_weight_delay.sli | 229 - .../unittests/test_weight_delay_free.sli | 231 - testsuite/unittests/test_wfr_settings.sli | 144 - 857 files changed, 140 insertions(+), 137886 deletions(-) delete mode 100644 doc/slidoc/index.html delete mode 100644 doc/slihelp_generator/README.md delete mode 100755 doc/slihelp_generator/assets/css/ie.css delete mode 100644 doc/slihelp_generator/assets/css/jquery.mmenu.all.css delete mode 100755 doc/slihelp_generator/assets/css/jss-style.min.css delete mode 100644 doc/slihelp_generator/assets/css/moeppel1.png delete mode 100644 doc/slihelp_generator/assets/css/moeppel2.png delete mode 100644 doc/slihelp_generator/assets/css/nest-initiative-logo.png delete mode 100644 doc/slihelp_generator/assets/css/prettify.css delete mode 100755 doc/slihelp_generator/assets/css/style.css delete mode 100755 doc/slihelp_generator/assets/images/arrow.png delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/COPYING delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-apollo.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-basic.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-clj.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-css.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-dart.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-erlang.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-go.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-hs.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-lasso.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-lisp.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-llvm.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-logtalk.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-lua.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-matlab.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-ml.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-mumps.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-n.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-pascal.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-proto.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-r.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-rd.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-rust.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-scala.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-sql.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-swift.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-tcl.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-tex.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-vb.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-vhdl.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-wiki.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-xq.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/lang-yaml.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/prettify.css delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/prettify.js delete mode 100644 doc/slihelp_generator/assets/js/code-prettify/run_prettify.js delete mode 100644 doc/slihelp_generator/assets/js/highlight/CHANGES.md delete mode 100644 doc/slihelp_generator/assets/js/highlight/LICENSE delete mode 100644 doc/slihelp_generator/assets/js/highlight/README.md delete mode 100644 doc/slihelp_generator/assets/js/highlight/README.ru.md delete mode 100644 doc/slihelp_generator/assets/js/highlight/highlight.pack.js delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/agate.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/androidstudio.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/arduino-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/arta.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/ascetic.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-cave-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-cave-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-dune-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-dune-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-estuary-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-estuary-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-forest-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-forest-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-heath-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-heath-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-lakeside-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-lakeside-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-plateau-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-plateau-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-savanna-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-savanna-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-seaside-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-seaside-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-sulphurpool-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atelier-sulphurpool-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atom-one-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/atom-one-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/brown-paper.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/brown-papersq.png delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/codepen-embed.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/color-brewer.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/darcula.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/darkula.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/default.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/docco.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/dracula.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/far.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/foundation.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/github-gist.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/github.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/googlecode.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/grayscale.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/gruvbox-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/gruvbox-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/hopscotch.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/hybrid.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/idea.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/ir-black.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/kimbie.dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/kimbie.light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/magula.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/mono-blue.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/monokai-sublime.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/monokai.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/obsidian.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/ocean.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/paraiso-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/paraiso-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/pojoaque.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/pojoaque.jpg delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/purebasic.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/qtcreator_dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/qtcreator_light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/railscasts.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/rainbow.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/routeros.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/school-book.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/school-book.png delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/solarized-dark.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/solarized-light.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/sunburst.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-blue.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-bright.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-eighties.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/tomorrow.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/vs.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/vs2015.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/xcode.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/xt256.css delete mode 100644 doc/slihelp_generator/assets/js/highlight/styles/zenburn.css delete mode 100644 doc/slihelp_generator/assets/js/html5shiv.min.js delete mode 100644 doc/slihelp_generator/assets/js/jquery-3.1.1.min.js delete mode 100644 doc/slihelp_generator/assets/js/jquery-migrate-3.0.0.js delete mode 100644 doc/slihelp_generator/assets/js/jquery.mmenu.all.js delete mode 100644 doc/slihelp_generator/assets/js/jquery.sldr.js delete mode 100755 doc/slihelp_generator/assets/js/jss-script.min.js delete mode 100755 doc/slihelp_generator/generate_help.py delete mode 100755 doc/slihelp_generator/generate_helpindex.py delete mode 100644 doc/slihelp_generator/helpers.py delete mode 100644 doc/slihelp_generator/templates/cmd.tpl.html delete mode 100644 doc/slihelp_generator/templates/footer.tpl.html delete mode 100644 doc/slihelp_generator/templates/helpindex.tpl.html delete mode 100644 doc/slihelp_generator/templates/nb-code.tpl.json delete mode 100644 doc/slihelp_generator/templates/nb-md.tpl.json delete mode 100644 doc/slihelp_generator/templates/nest.tpl.css delete mode 100644 doc/slihelp_generator/templates/overview-sample-footer.tmpl delete mode 100644 doc/slihelp_generator/templates/overview-sample-header.tmpl delete mode 100644 doc/slihelp_generator/templates/sample-footer.tmpl delete mode 100644 doc/slihelp_generator/templates/sample-header.tmpl delete mode 100644 doc/slihelp_generator/writers.py delete mode 100644 examples/EditorSupport/vim/syntax/sli.vim delete mode 100755 examples/nest/ArtificialSynchrony.pl delete mode 100644 examples/nest/ArtificialSynchrony.sli delete mode 100644 examples/nest/Brette_et_al_2007/benchmark.sli delete mode 100644 examples/nest/Brette_et_al_2007/coba.sli delete mode 100644 examples/nest/Brette_et_al_2007/cuba.sli delete mode 100644 examples/nest/Brette_et_al_2007/cuba_ps.sli delete mode 100644 examples/nest/Brette_et_al_2007/cuba_stdp.sli delete mode 100644 examples/nest/Brette_et_al_2007/hh_coba.sli delete mode 100644 examples/nest/BrodyHopfield.sli delete mode 100644 examples/nest/Potjans_2014/README.txt delete mode 100644 examples/nest/Potjans_2014/microcircuit.sli delete mode 100644 examples/nest/Potjans_2014/network_params.sli delete mode 100644 examples/nest/Potjans_2014/run_microcircuit.sh delete mode 100644 examples/nest/Potjans_2014/sim_params.sli delete mode 100644 examples/nest/Potjans_2014/spike_analysis.py delete mode 100644 examples/nest/balancedneuron-2.sli delete mode 100644 examples/nest/balancedneuron.sli delete mode 100644 examples/nest/brunel-2000.sli delete mode 100644 examples/nest/brunel-2000_newconnect.sli delete mode 100644 examples/nest/brunel-2000_newconnect_dc.sli delete mode 100644 examples/nest/brunel_ps.sli delete mode 100644 examples/nest/conngen_interface.sli delete mode 100644 examples/nest/correlospinmatrix_detector.sli delete mode 100644 examples/nest/hpc_benchmark.sli delete mode 100644 examples/nest/multimeter.sli delete mode 100644 examples/nest/music/clocktest.music delete mode 100644 examples/nest/music/conttest.music delete mode 100755 examples/nest/music/conttest.py delete mode 100644 examples/nest/music/eventtest.music delete mode 100644 examples/nest/music/messages0.dat delete mode 100644 examples/nest/music/messages1.dat delete mode 100644 examples/nest/music/minimalmusicsetup.music delete mode 100755 examples/nest/music/minimalmusicsetup_receivenest.py delete mode 100755 examples/nest/music/minimalmusicsetup_sendnest.py delete mode 100644 examples/nest/music/msgtest.music delete mode 100755 examples/nest/music/msgtest.py delete mode 100644 examples/nest/music/spike_exporter.sli delete mode 100644 examples/nest/music/three_neurons_threaded.music delete mode 100644 examples/nest/music/three_neurons_threaded_receivenest.sli delete mode 100644 examples/nest/music/three_neurons_threaded_sendnest.sli delete mode 100644 examples/nest/structural_plasticity_benchmark.sli delete mode 100644 lib/CMakeLists.txt delete mode 100644 lib/README.md delete mode 100644 lib/sli/FormattedIO.sli delete mode 100644 lib/sli/arraylib.sli delete mode 100644 lib/sli/debug.sli delete mode 100644 lib/sli/filesystem.sli delete mode 100644 lib/sli/helpinit.sli delete mode 100644 lib/sli/library.sli delete mode 100644 lib/sli/mathematica.sli delete mode 100644 lib/sli/misc_helpers.sli delete mode 100644 lib/sli/nest-init.sli delete mode 100644 lib/sli/oosupport.sli delete mode 100644 lib/sli/processes.sli delete mode 100644 lib/sli/ps-lib.sli delete mode 100644 lib/sli/regexp.sli delete mode 100644 lib/sli/sli-init.sli delete mode 100644 lib/sli/typeinit.sli delete mode 100644 lib/sli/unittest.sli delete mode 100644 nest/CMakeLists.txt delete mode 100644 nest/README.md delete mode 100644 nest/main.cpp delete mode 100644 nest/neststartup.cpp delete mode 100644 nest/neststartup.h delete mode 100644 nestkernel/nestmodule.cpp delete mode 100644 nestkernel/nestmodule.h delete mode 100644 pynest/nest/pynest-init.sli delete mode 100644 pynest/pynestkernel.pxd delete mode 100644 pynest/pynestkernel.pyx delete mode 100644 pynest/pynestkernel_aux.h~ delete mode 100644 sli/CMakeLists.txt delete mode 100644 sli/README.md delete mode 100644 sli/aggregatedatum.h delete mode 100644 sli/arraydatum.cc delete mode 100644 sli/arraydatum.h delete mode 100644 sli/booldatum.cc delete mode 100644 sli/booldatum.h delete mode 100644 sli/callbackdatum.h delete mode 100644 sli/charcode.cc delete mode 100644 sli/charcode.h delete mode 100644 sli/datum.cc delete mode 100644 sli/datum.h delete mode 100644 sli/dict.cc delete mode 100644 sli/dict.h delete mode 100644 sli/dictdatum.h delete mode 100644 sli/dictstack.cc delete mode 100644 sli/dictstack.h delete mode 100644 sli/dictutils.cc delete mode 100644 sli/dictutils.h delete mode 100644 sli/doubledatum.cc delete mode 100644 sli/doubledatum.h delete mode 100644 sli/fdstream.cc delete mode 100644 sli/fdstream.h delete mode 100644 sli/filesystem.cc delete mode 100644 sli/filesystem.h delete mode 100644 sli/functional.h delete mode 100644 sli/functiondatum.cc delete mode 100644 sli/functiondatum.h delete mode 100644 sli/genericdatum.h delete mode 100644 sli/get_mem.c delete mode 100644 sli/gnureadline.cc delete mode 100644 sli/gnureadline.h delete mode 100644 sli/integerdatum.cc delete mode 100644 sli/integerdatum.h delete mode 100644 sli/interpret.cc delete mode 100644 sli/interpret.h delete mode 100644 sli/iostreamdatum.h delete mode 100644 sli/literaldatum.cc delete mode 100644 sli/lockptrdatum.h delete mode 100644 sli/name.cc delete mode 100644 sli/name.h delete mode 100644 sli/namedatum.cc delete mode 100644 sli/namedatum.h delete mode 100644 sli/numericdatum.h delete mode 100644 sli/oosupport.cc delete mode 100644 sli/oosupport.h delete mode 100644 sli/parser.cc delete mode 100644 sli/parser.h delete mode 100644 sli/parserdatum.h delete mode 100644 sli/processes.cc delete mode 100644 sli/processes.h delete mode 100644 sli/puresli.cc delete mode 100644 sli/scanner.cc delete mode 100644 sli/scanner.h delete mode 100644 sli/sharedptrdatum.h delete mode 100644 sli/sli_io.cc delete mode 100644 sli/sli_io.h delete mode 100644 sli/sliactions.cc delete mode 100644 sli/sliactions.h delete mode 100644 sli/sliarray.cc delete mode 100644 sli/sliarray.h delete mode 100644 sli/slibuiltins.cc delete mode 100644 sli/slibuiltins.h delete mode 100644 sli/slicontrol.cc delete mode 100644 sli/slicontrol.h delete mode 100644 sli/slidata.cc delete mode 100644 sli/slidata.h delete mode 100644 sli/slidict.cc delete mode 100644 sli/slidict.h delete mode 100644 sli/sliexceptions.cc delete mode 100644 sli/sliexceptions.h delete mode 100644 sli/slifunction.h delete mode 100644 sli/sligraphics.cc delete mode 100644 sli/sligraphics.h delete mode 100644 sli/slimath.cc delete mode 100644 sli/slimath.h delete mode 100644 sli/slimodule.cc delete mode 100644 sli/slimodule.h delete mode 100644 sli/slinames.cpp delete mode 100644 sli/slinames.h delete mode 100644 sli/sliregexp.cc delete mode 100644 sli/sliregexp.h delete mode 100644 sli/slistack.cc delete mode 100644 sli/slistack.h delete mode 100644 sli/slistartup.cc delete mode 100644 sli/slistartup.h delete mode 100644 sli/slitype.cc delete mode 100644 sli/slitype.h delete mode 100644 sli/slitypecheck.cc delete mode 100644 sli/slitypecheck.h delete mode 100644 sli/specialfunctionsmodule.cc delete mode 100644 sli/specialfunctionsmodule.h delete mode 100644 sli/stringdatum.cc delete mode 100644 sli/stringdatum.h delete mode 100644 sli/symboldatum.cc delete mode 100644 sli/symboldatum.h delete mode 100644 sli/tarrayobj.cc delete mode 100644 sli/tarrayobj.h delete mode 100644 sli/token.cc delete mode 100644 sli/token.h delete mode 100644 sli/tokenarray.cc delete mode 100644 sli/tokenarray.h delete mode 100644 sli/tokenstack.cc delete mode 100644 sli/tokenstack.h delete mode 100644 sli/tokenutils.cc delete mode 100644 sli/tokenutils.h delete mode 100644 sli/triedatum.cc delete mode 100644 sli/triedatum.h delete mode 100644 sli/typearray.h delete mode 100644 sli/typechk.cc delete mode 100644 sli/typechk.h delete mode 100644 sli/utils.cc delete mode 100644 sli/utils.h delete mode 100644 testsuite/mpi_selftests/fail/CMakeLists.txt delete mode 100644 testsuite/mpi_selftests/fail/crash_distributed_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/crash_distributed_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/crash_distributed_invariant_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/crash_distributed_pass_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/crash_distributed_process_invariant_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/crash_distributed_process_invariant_events_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/crash_distributed_rank_invariant_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/fail_distributed_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/fail_distributed_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/fail_distributed_invariant_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/fail_distributed_pass_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/fail_distributed_process_invariant_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/fail_distributed_process_invariant_events_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/fail/fail_distributed_rank_invariant_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/pass/CMakeLists.txt delete mode 100644 testsuite/mpi_selftests/pass/test_distributed_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/pass/test_distributed_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/pass/test_distributed_invariant_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/pass/test_distributed_pass_or_die.sli delete mode 100644 testsuite/mpi_selftests/pass/test_distributed_process_invariant_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/pass/test_distributed_process_invariant_events_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/pass/test_distributed_rank_invariant_collect_assert_or_die.sli delete mode 100644 testsuite/mpi_selftests/pass/test_parse_message_line.sli delete mode 100644 testsuite/mpitests/CMakeLists.txt delete mode 100644 testsuite/mpitests/README delete mode 100644 testsuite/mpitests/issue-1957.sli delete mode 100644 testsuite/mpitests/issue-1974.sli delete mode 100644 testsuite/mpitests/issue-2119.sli delete mode 100644 testsuite/mpitests/issue-281.sli delete mode 100644 testsuite/mpitests/issue-600.sli delete mode 100644 testsuite/mpitests/test_all_to_all.sli delete mode 100644 testsuite/mpitests/test_connect_array_all_to_all_mpi.sli delete mode 100644 testsuite/mpitests/test_connect_array_fixed_indegree_mpi.sli delete mode 100644 testsuite/mpitests/test_connect_array_fixed_outdegree_mpi.sli delete mode 100644 testsuite/mpitests/test_delay_exchange.sli delete mode 100644 testsuite/mpitests/test_fixed_indegree.sli delete mode 100644 testsuite/mpitests/test_gamma_sup_generator.sli delete mode 100644 testsuite/mpitests/test_gap_junctions_mpi.sli delete mode 100644 testsuite/mpitests/test_get_nodes.sli delete mode 100644 testsuite/mpitests/test_ginzburg_neuron.sli delete mode 100644 testsuite/mpitests/test_global_rng.sli delete mode 100644 testsuite/mpitests/test_iaf_ring.sli delete mode 100644 testsuite/mpitests/test_localonly.sli delete mode 100644 testsuite/mpitests/test_mini_brunel_ps.sli delete mode 100644 testsuite/mpitests/test_mip_generator.sli delete mode 100644 testsuite/mpitests/test_multiple_synapses.sli delete mode 100644 testsuite/mpitests/test_multiple_synapses_spatial_networks.sli delete mode 100644 testsuite/mpitests/test_multiplicity.sli delete mode 100644 testsuite/mpitests/test_neuron_vp.sli delete mode 100644 testsuite/mpitests/test_neuron_vp_global.sli delete mode 100644 testsuite/mpitests/test_noise_generator.sli delete mode 100644 testsuite/mpitests/test_one_to_one.sli delete mode 100644 testsuite/mpitests/test_pairwise_bernoulli.sli delete mode 100644 testsuite/mpitests/test_parallel_conn_and_rand.sli delete mode 100644 testsuite/mpitests/test_poisson_generator.sli delete mode 100644 testsuite/mpitests/test_poisson_generator_ps.sli delete mode 100644 testsuite/mpitests/test_pp_psc_delta.sli delete mode 100644 testsuite/mpitests/test_ppd_sup_generator.sli delete mode 100644 testsuite/mpitests/test_pulsepacket_generator.sli delete mode 100644 testsuite/mpitests/test_rate_neurons_mpi.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_gamma_generator_1.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_gamma_generator_2.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_gamma_generator_3.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_gamma_generator_4.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_poisson_generator_1.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_poisson_generator_2.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_poisson_generator_3.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_poisson_generator_4.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_poisson_generator_5.sli delete mode 100644 testsuite/mpitests/test_sinusoidal_poisson_generator_6.sli delete mode 100644 testsuite/mpitests/test_spatial_distributed_positions.sli delete mode 100644 testsuite/mpitests/test_spatial_pairwise_bernoulli_on_source_param.sli delete mode 100644 testsuite/mpitests/test_symmetric_connections_mpi.sli delete mode 100644 testsuite/mpitests/ticket-400.sli delete mode 100644 testsuite/mpitests/ticket-516.sli delete mode 100644 testsuite/mpitests/ticket-955.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_source.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_target.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_layer_to_layer_source_driven.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_layer_to_layer_target_driven.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_layer_to_sd_target_driven.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_source.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_target.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_pg_to_layer_source_driven.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_free_pg_to_layer_target_driven.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_source.sli delete mode 100644 testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_target.sli delete mode 100644 testsuite/musictests/CMakeLists.txt delete mode 100644 testsuite/musictests/README.md delete mode 100644 testsuite/musictests/empty.sli delete mode 100644 testsuite/musictests/test_cont_proxy.music delete mode 100644 testsuite/musictests/test_cont_proxy_receiver.sli delete mode 100644 testsuite/musictests/test_cont_proxy_sender.sli delete mode 100644 testsuite/musictests/test_event_proxies.music delete mode 100644 testsuite/musictests/test_event_proxies.sh delete mode 100644 testsuite/musictests/test_event_proxies_issue-696.music delete mode 100644 testsuite/musictests/test_event_proxies_issue-696_receiver.sli delete mode 100644 testsuite/musictests/test_event_proxies_issue-696_sender.sli delete mode 100644 testsuite/musictests/test_event_proxies_receiver.sli delete mode 100644 testsuite/musictests/test_event_proxies_sender.sli delete mode 100644 testsuite/musictests/test_message.music delete mode 100644 testsuite/musictests/test_message0.dat delete mode 100644 testsuite/musictests/test_message_receiver.sli delete mode 100644 testsuite/musictests/test_music_failure1.music delete mode 100644 testsuite/musictests/test_music_failure2.music delete mode 100644 testsuite/musictests/test_rate_proxy.music delete mode 100644 testsuite/musictests/test_rate_proxy_receiver.sli delete mode 100644 testsuite/musictests/test_rate_proxy_sender.sli delete mode 100755 testsuite/nest_indirect delete mode 100755 testsuite/nest_serial delete mode 100644 testsuite/regressiontests/issue-105.sli delete mode 100644 testsuite/regressiontests/issue-1085.sli delete mode 100644 testsuite/regressiontests/issue-1100.sli delete mode 100644 testsuite/regressiontests/issue-1140.sli delete mode 100644 testsuite/regressiontests/issue-1212.sli delete mode 100644 testsuite/regressiontests/issue-1242.sli delete mode 100644 testsuite/regressiontests/issue-1305.sli delete mode 100644 testsuite/regressiontests/issue-1366.sli delete mode 100644 testsuite/regressiontests/issue-1610.sli delete mode 100644 testsuite/regressiontests/issue-1640.sli delete mode 100644 testsuite/regressiontests/issue-2052.sli delete mode 100644 testsuite/regressiontests/issue-211.sli delete mode 100644 testsuite/regressiontests/issue-2282.sli delete mode 100644 testsuite/regressiontests/issue-264.sli delete mode 100644 testsuite/regressiontests/issue-311.sli delete mode 100644 testsuite/regressiontests/issue-327.sli delete mode 100644 testsuite/regressiontests/issue-351.sli delete mode 100644 testsuite/regressiontests/issue-368.sli delete mode 100644 testsuite/regressiontests/issue-410.sli delete mode 100644 testsuite/regressiontests/issue-437.sli delete mode 100644 testsuite/regressiontests/issue-521.sli delete mode 100644 testsuite/regressiontests/issue-545.sli delete mode 100644 testsuite/regressiontests/issue-596.sli delete mode 100644 testsuite/regressiontests/issue-659.sli delete mode 100644 testsuite/regressiontests/issue-665.sli delete mode 100644 testsuite/regressiontests/issue-707.sli delete mode 100644 testsuite/regressiontests/issue-708.sli delete mode 100644 testsuite/regressiontests/issue-735.sli delete mode 100644 testsuite/regressiontests/issue-737-threads.sli delete mode 100644 testsuite/regressiontests/issue-737.sli delete mode 100644 testsuite/regressiontests/issue-740.sli delete mode 100644 testsuite/regressiontests/issue-77.sli delete mode 100644 testsuite/regressiontests/issue-832.sli delete mode 100644 testsuite/regressiontests/issue-888.sli delete mode 100644 testsuite/regressiontests/ticket-156.sli delete mode 100644 testsuite/regressiontests/ticket-157.sli delete mode 100644 testsuite/regressiontests/ticket-235.sli delete mode 100644 testsuite/regressiontests/ticket-293.sli delete mode 100644 testsuite/regressiontests/ticket-310.sli delete mode 100644 testsuite/regressiontests/ticket-349.sli delete mode 100644 testsuite/regressiontests/ticket-382.sli delete mode 100644 testsuite/regressiontests/ticket-386.sli delete mode 100644 testsuite/regressiontests/ticket-414.sli delete mode 100644 testsuite/regressiontests/ticket-421.sli delete mode 100644 testsuite/regressiontests/ticket-433.sli delete mode 100644 testsuite/regressiontests/ticket-451.sli delete mode 100644 testsuite/regressiontests/ticket-452.sli delete mode 100644 testsuite/regressiontests/ticket-459.sli delete mode 100644 testsuite/regressiontests/ticket-464.sli delete mode 100644 testsuite/regressiontests/ticket-466.sli delete mode 100644 testsuite/regressiontests/ticket-475.sli delete mode 100644 testsuite/regressiontests/ticket-478.sli delete mode 100644 testsuite/regressiontests/ticket-481.sli delete mode 100644 testsuite/regressiontests/ticket-507.sli delete mode 100644 testsuite/regressiontests/ticket-514.sli delete mode 100644 testsuite/regressiontests/ticket-537.sli delete mode 100644 testsuite/regressiontests/ticket-564.sli delete mode 100644 testsuite/regressiontests/ticket-566.sli delete mode 100644 testsuite/regressiontests/ticket-573.sli delete mode 100644 testsuite/regressiontests/ticket-580.sli delete mode 100644 testsuite/regressiontests/ticket-618.sli delete mode 100644 testsuite/regressiontests/ticket-619.sli delete mode 100644 testsuite/regressiontests/ticket-638.sli delete mode 100644 testsuite/regressiontests/ticket-643.sli delete mode 100644 testsuite/regressiontests/ticket-673.sli delete mode 100644 testsuite/regressiontests/ticket-681.sli delete mode 100644 testsuite/regressiontests/ticket-686-positive-parameters.sli delete mode 100644 testsuite/regressiontests/ticket-689.sli delete mode 100644 testsuite/regressiontests/ticket-692-getconnections-args.sli delete mode 100644 testsuite/regressiontests/ticket-710.sli delete mode 100644 testsuite/regressiontests/ticket-716.sli delete mode 100644 testsuite/regressiontests/ticket-733.sli delete mode 100644 testsuite/regressiontests/ticket-737.sli delete mode 100644 testsuite/regressiontests/ticket-754.sli delete mode 100644 testsuite/regressiontests/ticket-772.sli delete mode 100644 testsuite/regressiontests/ticket-777.sli delete mode 100644 testsuite/regressiontests/ticket-784.sli delete mode 100644 testsuite/regressiontests/ticket-785.sli delete mode 100644 testsuite/regressiontests/ticket-787.sli delete mode 100644 testsuite/regressiontests/ticket-798.sli delete mode 100644 testsuite/regressiontests/ticket-80-175-179.sli delete mode 100644 testsuite/regressiontests/ticket-800.sli delete mode 100644 testsuite/regressiontests/ticket-85.sli delete mode 100644 testsuite/regressiontests/ticket-881.sli delete mode 100644 testsuite/regressiontests/ticket-903.sli delete mode 100644 testsuite/regressiontests/ticket-921.sli delete mode 100644 testsuite/regressiontests/ticket-926.sli delete mode 100644 testsuite/regressiontests/ticket-933.sli delete mode 100644 testsuite/regressiontests/ticket-941.sli delete mode 100644 testsuite/regressiontests/ticket-949.sli delete mode 100644 testsuite/regressiontests/ticket-959.sli delete mode 100644 testsuite/selftests/CMakeLists.txt delete mode 100644 testsuite/selftests/exitcode0.sli delete mode 100644 testsuite/selftests/exitcode1.sli delete mode 100644 testsuite/selftests/exitcode126.sli delete mode 100644 testsuite/selftests/exitcode2.sli delete mode 100644 testsuite/selftests/exitcode3.sli delete mode 100644 testsuite/selftests/exitcode99.sli delete mode 100644 testsuite/selftests/test_assert_or_die_b.sli delete mode 100644 testsuite/selftests/test_assert_or_die_p.sli delete mode 100644 testsuite/selftests/test_badhandler.sli delete mode 100644 testsuite/selftests/test_crash_or_die.sli delete mode 100644 testsuite/selftests/test_fail.sli delete mode 100644 testsuite/selftests/test_fail_or_die.sli delete mode 100644 testsuite/selftests/test_failbutnocrash_or_die_crash.sli delete mode 100644 testsuite/selftests/test_failbutnocrash_or_die_pass.sli delete mode 100644 testsuite/selftests/test_goodhandler.sli delete mode 100644 testsuite/selftests/test_lazyhandler.sli delete mode 100644 testsuite/selftests/test_pass.sli delete mode 100644 testsuite/selftests/test_pass_or_die.sli delete mode 100644 testsuite/selftests/test_passorfailbutnocrash_or_die.sli delete mode 100644 testsuite/selftests/test_stop.sli delete mode 100644 testsuite/unittests/CMakeLists.txt delete mode 100644 testsuite/unittests/issue-463.sli delete mode 100644 testsuite/unittests/issue-565.sli delete mode 100644 testsuite/unittests/model_node_init.sli delete mode 100644 testsuite/unittests/test_DoubleVector_IntVector.sli delete mode 100644 testsuite/unittests/test_GetConnections.sli delete mode 100644 testsuite/unittests/test_Map.sli delete mode 100644 testsuite/unittests/test_MapIndexed.sli delete mode 100644 testsuite/unittests/test_ac_generator.sli delete mode 100644 testsuite/unittests/test_add_freeze_thaw.sli delete mode 100644 testsuite/unittests/test_aeif_cond_alpha_multisynapse.sli delete mode 100644 testsuite/unittests/test_aeif_cond_beta_multisynapse.sli delete mode 100644 testsuite/unittests/test_amat2_psc_exp.sli delete mode 100644 testsuite/unittests/test_bernoulli_synapse.sli delete mode 100644 testsuite/unittests/test_binary.sli delete mode 100644 testsuite/unittests/test_common_props_setting.sli delete mode 100644 testsuite/unittests/test_compare_delta.sli delete mode 100644 testsuite/unittests/test_cond_exp_models.sli delete mode 100644 testsuite/unittests/test_connect.sli delete mode 100644 testsuite/unittests/test_connect_after_simulate.sli delete mode 100644 testsuite/unittests/test_connect_with_threads.sli delete mode 100644 testsuite/unittests/test_cont_delay_synapse.sli delete mode 100644 testsuite/unittests/test_copymodel.sli delete mode 100644 testsuite/unittests/test_corr_det.sli delete mode 100644 testsuite/unittests/test_corr_matrix_det.sli delete mode 100644 testsuite/unittests/test_correlospinmatrix_detector.sli delete mode 100644 testsuite/unittests/test_count_connections.sli delete mode 100644 testsuite/unittests/test_cva.sli delete mode 100644 testsuite/unittests/test_cvi.sli delete mode 100644 testsuite/unittests/test_dcgen_versus_I_e.sli delete mode 100644 testsuite/unittests/test_default_delays_weights.sli delete mode 100644 testsuite/unittests/test_delay_after_res_change.sli delete mode 100644 testsuite/unittests/test_delay_check.sli delete mode 100644 testsuite/unittests/test_dirname.sli delete mode 100644 testsuite/unittests/test_distance.sli delete mode 100644 testsuite/unittests/test_fast_operators.sli delete mode 100644 testsuite/unittests/test_free_mask_circ_anchor_00.sli delete mode 100644 testsuite/unittests/test_free_mask_circ_anchor_01.sli delete mode 100644 testsuite/unittests/test_free_mask_circ_anchor_10.sli delete mode 100644 testsuite/unittests/test_free_mask_circ_anchor_11.sli delete mode 100644 testsuite/unittests/test_free_mask_donut_anchor_00.sli delete mode 100644 testsuite/unittests/test_free_mask_donut_anchor_01.sli delete mode 100644 testsuite/unittests/test_free_mask_donut_anchor_10.sli delete mode 100644 testsuite/unittests/test_free_mask_donut_anchor_11.sli delete mode 100644 testsuite/unittests/test_free_mask_rect_00.sli delete mode 100644 testsuite/unittests/test_free_mask_rect_01.sli delete mode 100644 testsuite/unittests/test_free_mask_rect_11.sli delete mode 100644 testsuite/unittests/test_free_mask_rect_13.sli delete mode 100644 testsuite/unittests/test_gamma_sup_generator.sli delete mode 100644 testsuite/unittests/test_gap_junction.sli delete mode 100644 testsuite/unittests/test_gif_cond_exp.sli delete mode 100644 testsuite/unittests/test_gif_cond_exp_multisynapse.sli delete mode 100644 testsuite/unittests/test_gif_pop_psc_exp.sli delete mode 100644 testsuite/unittests/test_gif_psc_exp.sli delete mode 100644 testsuite/unittests/test_gif_psc_exp_multisynapse.sli delete mode 100644 testsuite/unittests/test_ginzburg_and_mcculloch.sli delete mode 100644 testsuite/unittests/test_hh_cond_beta_gap_traub.sli delete mode 100644 testsuite/unittests/test_hh_cond_exp_traub.sli delete mode 100644 testsuite/unittests/test_hh_psc_alpha_gap.sli delete mode 100644 testsuite/unittests/test_hpc_synapse.sli delete mode 100644 testsuite/unittests/test_iaf.sli delete mode 100644 testsuite/unittests/test_iaf_1to2.sli delete mode 100644 testsuite/unittests/test_iaf_1to2_default_delay.sli delete mode 100644 testsuite/unittests/test_iaf_1to2_ex.sli delete mode 100644 testsuite/unittests/test_iaf_dc.sli delete mode 100644 testsuite/unittests/test_iaf_dc_aligned.sli delete mode 100644 testsuite/unittests/test_iaf_dc_aligned_automatic.sli delete mode 100644 testsuite/unittests/test_iaf_dc_aligned_delay.sli delete mode 100644 testsuite/unittests/test_iaf_dc_aligned_stop.sli delete mode 100644 testsuite/unittests/test_iaf_fudge.sli delete mode 100644 testsuite/unittests/test_iaf_i0.sli delete mode 100644 testsuite/unittests/test_iaf_i0_refractory.sli delete mode 100644 testsuite/unittests/test_iaf_min_delay_create.sli delete mode 100644 testsuite/unittests/test_iaf_min_delay_set.sli delete mode 100644 testsuite/unittests/test_iaf_min_delay_simblocks.sli delete mode 100644 testsuite/unittests/test_iaf_ps_dc_accuracy.sli delete mode 100644 testsuite/unittests/test_iaf_ps_dc_t_accuracy.sli delete mode 100644 testsuite/unittests/test_iaf_ps_psp_accuracy.sli delete mode 100644 testsuite/unittests/test_iaf_ps_psp_poisson_accuracy.sli delete mode 100644 testsuite/unittests/test_iaf_ps_psp_poisson_generator_accuracy.sli delete mode 100644 testsuite/unittests/test_iaf_psc_alpha_multisynapse.sli delete mode 100644 testsuite/unittests/test_iaf_psc_exp.sli delete mode 100644 testsuite/unittests/test_iaf_psc_exp_multisynapse.sli delete mode 100644 testsuite/unittests/test_iaf_psc_exp_ps.sli delete mode 100644 testsuite/unittests/test_iaf_psc_exp_ps_lossless.sli delete mode 100644 testsuite/unittests/test_iaf_psp.sli delete mode 100644 testsuite/unittests/test_iaf_psp_normalized.sli delete mode 100644 testsuite/unittests/test_iaf_psp_peak.sli delete mode 100644 testsuite/unittests/test_inh_stdp_synapse.sli delete mode 100644 testsuite/unittests/test_inhomogeneous_poisson_generator.sli delete mode 100644 testsuite/unittests/test_lambertw.sli delete mode 100644 testsuite/unittests/test_mat2_psc_exp.sli delete mode 100644 testsuite/unittests/test_max_delay.sli delete mode 100644 testsuite/unittests/test_message.sli delete mode 100644 testsuite/unittests/test_min_delay.sli delete mode 100644 testsuite/unittests/test_min_delay_tics_reset.sli delete mode 100644 testsuite/unittests/test_mip_corrdet.sli delete mode 100644 testsuite/unittests/test_multimeter.sli delete mode 100644 testsuite/unittests/test_multimeter_freeze_thaw.sli delete mode 100644 testsuite/unittests/test_multimeter_offset.sli delete mode 100644 testsuite/unittests/test_multimeter_stepping.sli delete mode 100644 testsuite/unittests/test_multimeter_support.sli delete mode 100644 testsuite/unittests/test_multiple_multimeter.sli delete mode 100644 testsuite/unittests/test_multiple_random_source_stepping.sli delete mode 100644 testsuite/unittests/test_multisynapse_models.sli delete mode 100644 testsuite/unittests/test_multithreading.sli delete mode 100644 testsuite/unittests/test_neurons_handle_multiplicity.sli delete mode 100644 testsuite/unittests/test_node_collection.sli delete mode 100644 testsuite/unittests/test_noise_generator.sli delete mode 100644 testsuite/unittests/test_ntree_split.sli delete mode 100644 testsuite/unittests/test_oversize_mask.sli delete mode 100644 testsuite/unittests/test_poisson_generator_campbell_alpha.sli delete mode 100644 testsuite/unittests/test_poisson_generator_ps.sli delete mode 100644 testsuite/unittests/test_poisson_ps_intervals.sli delete mode 100644 testsuite/unittests/test_poisson_ps_min_interval.sli delete mode 100755 testsuite/unittests/test_pp_pop_psc_delta.sli delete mode 100644 testsuite/unittests/test_pp_psc_delta.sli delete mode 100644 testsuite/unittests/test_ppd_sup_generator.sli delete mode 100644 testsuite/unittests/test_psp_amplitude_consistency.sli delete mode 100644 testsuite/unittests/test_pulsepacket_generator.sli delete mode 100644 testsuite/unittests/test_rate_connections.sli delete mode 100644 testsuite/unittests/test_reg_mask_circ_anchor_00.sli delete mode 100644 testsuite/unittests/test_reg_mask_circ_anchor_01.sli delete mode 100644 testsuite/unittests/test_reg_mask_circ_anchor_10.sli delete mode 100644 testsuite/unittests/test_reg_mask_circ_anchor_11.sli delete mode 100644 testsuite/unittests/test_reg_mask_donut_anchor_00.sli delete mode 100644 testsuite/unittests/test_reg_mask_donut_anchor_01.sli delete mode 100644 testsuite/unittests/test_reg_mask_donut_anchor_10.sli delete mode 100644 testsuite/unittests/test_reg_mask_donut_anchor_11.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_00.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_01.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_02.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_03.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_04.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_05.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_06.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_10.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_11.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_13.sli delete mode 100644 testsuite/unittests/test_reg_mask_grid_anchor_15.sli delete mode 100644 testsuite/unittests/test_reg_mask_rect_00.sli delete mode 100644 testsuite/unittests/test_reg_mask_rect_01.sli delete mode 100644 testsuite/unittests/test_reg_mask_rect_02.sli delete mode 100644 testsuite/unittests/test_reg_mask_rect_10.sli delete mode 100644 testsuite/unittests/test_reg_mask_rect_11.sli delete mode 100644 testsuite/unittests/test_round.sli delete mode 100644 testsuite/unittests/test_rows_cols_pos.sli delete mode 100644 testsuite/unittests/test_set_Vm.sli delete mode 100644 testsuite/unittests/test_set_delay_extrema.sli delete mode 100644 testsuite/unittests/test_set_start_stop_origin.sli delete mode 100644 testsuite/unittests/test_set_tics.sli delete mode 100644 testsuite/unittests/test_setconnections_threads.sli delete mode 100644 testsuite/unittests/test_sinusoidal_gamma_generator.sli delete mode 100644 testsuite/unittests/test_sinusoidal_poisson_generator.sli delete mode 100644 testsuite/unittests/test_sort.sli delete mode 100644 testsuite/unittests/test_spike_dilutor.sli delete mode 100644 testsuite/unittests/test_spike_generator.sli delete mode 100644 testsuite/unittests/test_spike_poisson_ps.sli delete mode 100644 testsuite/unittests/test_spike_poisson_ps_base2.sli delete mode 100644 testsuite/unittests/test_spike_rec_reset.sli delete mode 100644 testsuite/unittests/test_spike_recorder.sli delete mode 100644 testsuite/unittests/test_spike_transmission_ps.sli delete mode 100644 testsuite/unittests/test_spike_transmission_ps_iaf.sli delete mode 100644 testsuite/unittests/test_spin_detector.sli delete mode 100644 testsuite/unittests/test_stdp_synapse.sli delete mode 100644 testsuite/unittests/test_step_current_generator.sli delete mode 100644 testsuite/unittests/test_steppedsim.sli delete mode 100644 testsuite/unittests/test_symmetric_connections.sli delete mode 100644 testsuite/unittests/test_syn_hom_w.sli delete mode 100644 testsuite/unittests/test_thread_local_ids.sli delete mode 100644 testsuite/unittests/test_threaded_multimeter.sli delete mode 100644 testsuite/unittests/test_threaded_spike_recorder.sli delete mode 100644 testsuite/unittests/test_time_input.sli delete mode 100644 testsuite/unittests/test_tsodyks_depressing.sli delete mode 100644 testsuite/unittests/test_tsodyks_facilitating.sli delete mode 100644 testsuite/unittests/test_two_devices.sli delete mode 100644 testsuite/unittests/test_voltmeter_reset.sli delete mode 100644 testsuite/unittests/test_weight_delay.sli delete mode 100644 testsuite/unittests/test_weight_delay_free.sli delete mode 100644 testsuite/unittests/test_wfr_settings.sli diff --git a/CMakeLists.txt b/CMakeLists.txt index fd648ee150..38cdb972e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,11 +222,8 @@ add_subdirectory( doc ) add_subdirectory( bin ) add_subdirectory( examples ) add_subdirectory( build_support ) -add_subdirectory( lib ) add_subdirectory( libnestutil ) add_subdirectory( models ) -add_subdirectory( sli ) -add_subdirectory( nest ) add_subdirectory( nestkernel ) add_subdirectory( thirdparty ) add_subdirectory( testsuite ) @@ -274,7 +271,6 @@ endforeach () # libraries required to link extension modules set( MODULE_LINK_LIBS "-lnestutil" - "-lsli" "-lnestkernel" "${OpenMP_CXX_FLAGS}" "${LTDL_LIBRARIES}" diff --git a/build_support/include_checker.py b/build_support/include_checker.py index 6cb996f7a8..b3322c1eac 100644 --- a/build_support/include_checker.py +++ b/build_support/include_checker.py @@ -55,9 +55,6 @@ // Generated includes: #include "config.h" - - // Includes from sli: - #include "datum.h" """ # We would like to have files that are not actually provided by diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 7123d1d7df..3cd9ef9de6 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -17,48 +17,6 @@ # You should have received a copy of the GNU General Public License # along with NEST. If not, see . -install( DIRECTORY slihelp_generator - DESTINATION ${CMAKE_INSTALL_DATADIR} - ) - -if ( NOT CMAKE_CROSSCOMPILING ) - - # Python is needed to generate the help. If Python does not exist, - # there are problems with the following. - # See https://github.com/nest/nest-simulator/issues/678. - find_package( PythonInterp ) - if ( Python_FOUND ) - - # Extract help from all source files in the source code, put - # them in doc/help and generate a local help index in the - # build directory containing links to the help files. - install( CODE - "execute_process( - COMMAND ${Python_EXECUTABLE} -B generate_help.py \"${PROJECT_SOURCE_DIR}\" \"${PROJECT_BINARY_DIR}\" - WORKING_DIRECTORY \"${PROJECT_SOURCE_DIR}/doc/slihelp_generator\" - )" - ) - - # Copy the local doc/help directory to the global installation - # directory for documentation. - install( DIRECTORY "${PROJECT_BINARY_DIR}/doc/help" - DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}" - OPTIONAL - ) - - # Update the global help index to include all help files in - # the global installation directory for documentation. - install( CODE - "execute_process( - COMMAND ${Python_EXECUTABLE} -B generate_helpindex.py \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}\" - WORKING_DIRECTORY \"${PROJECT_SOURCE_DIR}/doc/slihelp_generator\" - )" - ) - - endif () - -endif () - if ( DOXYGEN_FOUND ) add_custom_target( doc COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/normaldoc.conf" diff --git a/doc/slidoc/index.html b/doc/slidoc/index.html deleted file mode 100644 index 2164fddb38..0000000000 --- a/doc/slidoc/index.html +++ /dev/null @@ -1,62 +0,0 @@ - - - NEST Helpdesk - - - - - - -
- - - - diff --git a/doc/slihelp_generator/README.md b/doc/slihelp_generator/README.md deleted file mode 100644 index ebf8ea42db..0000000000 --- a/doc/slihelp_generator/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# README for the NEST help generator - -The parser goes through all .sli and .cc files to find documentation -and converts it into .html and .hlp files. diff --git a/doc/slihelp_generator/assets/css/ie.css b/doc/slihelp_generator/assets/css/ie.css deleted file mode 100755 index 706f5103ed..0000000000 --- a/doc/slihelp_generator/assets/css/ie.css +++ /dev/null @@ -1,273 +0,0 @@ -/* -Styles for older IE versions (previous to IE9). -*/ - -body { - background-color: #e6e6e6; -} -body.custom-background-empty { - background-color: #fff; -} -body.custom-background-empty .site, -body.custom-background-white .site { - box-shadow: none; - margin-bottom: 0; - margin-top: 0; - padding: 0; -} -.assistive-text, -.site .screen-reader-text { - clip: rect(1px 1px 1px 1px); -} -.full-width .site-content { - float: none; - width: 100%; -} -img.size-full, -img.size-large, -img.header-image, -img.wp-post-image, -img[class*="align"], -img[class*="wp-image-"], -img[class*="attachment-"] { - width: auto; /* Prevent stretching of full-size and large-size images with height and width attributes in IE8 */ -} -.author-avatar { - float: left; - margin-top: 8px; - margin-top: 0.571428571rem; -} -.author-description { - float: right; - width: 80%; -} -.site { - box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); - margin: 48px auto; - max-width: 960px; - overflow: hidden; - padding: 0 40px; -} -.site-content { - float: left; - width: 65.104166667%; -} -body.template-front-page .site-content, -body.attachment .site-content, -body.full-width .site-content { - width: 100%; -} -.widget-area { - float: right; - width: 26.041666667%; -} -.site-header h1, -.site-header h2 { - text-align: left; -} -.site-header h1 { - font-size: 26px; - line-height: 1.846153846; -} -.main-navigation ul.nav-menu, -.main-navigation div.nav-menu > ul { - border-bottom: 1px solid #ededed; - border-top: 1px solid #ededed; - display: inline-block !important; - text-align: left; - width: 100%; -} -.main-navigation ul { - margin: 0; - text-indent: 0; -} -.main-navigation li a, -.main-navigation li { - display: inline-block; - text-decoration: none; -} -.ie7 .main-navigation li a, -.ie7 .main-navigation li { - display: inline; -} -.main-navigation li a { - border-bottom: 0; - color: #6a6a6a; - line-height: 3.692307692; - text-transform: uppercase; -} -.main-navigation li a:hover { - color: #000; -} -.main-navigation li { - margin: 0 40px 0 0; - position: relative; -} -.main-navigation li ul { - margin: 0; - padding: 0; - position: absolute; - top: 100%; - z-index: 1; - height: 1px; - width: 1px; - overflow: hidden; - clip: rect(1px, 1px, 1px, 1px); -} -.ie7 .main-navigation li ul { - clip: inherit; - display: none; - left: 0; - overflow: visible; -} -.main-navigation li ul ul, -.ie7 .main-navigation li ul ul { - top: 0; - left: 100%; -} -.main-navigation ul li:hover > ul, -.main-navigation ul li:focus > ul, -.main-navigation .focus > ul { - border-left: 0; - clip: inherit; - overflow: inherit; - height: inherit; - width: inherit; -} -.ie7 .main-navigation ul li:hover > ul, -.ie7 .main-navigation ul li:focus > ul { - display: block; -} -.main-navigation li ul li a { - background: #efefef; - border-bottom: 1px solid #ededed; - display: block; - font-size: 11px; - line-height: 2.181818182; - padding: 8px 10px; - width: 180px; -} -.main-navigation li ul li a:hover { - background: #e3e3e3; - color: #444; -} -.main-navigation .current-menu-item > a, -.main-navigation .current-menu-ancestor > a, -.main-navigation .current_page_item > a, -.main-navigation .current_page_ancestor > a { - color: #636363; - font-weight: bold; -} -.main-navigation .menu-toggle { - display: none; -} -.entry-header .entry-title { - font-size: 22px; -} -#respond form input[type="text"] { - width: 46.333333333%; -} -#respond form textarea.blog-textarea { - width: 79.666666667%; -} -.template-front-page .site-content, -.template-front-page article { - overflow: hidden; -} -.template-front-page.has-post-thumbnail article { - float: left; - width: 47.916666667%; -} -.entry-page-image { - float: right; - margin-bottom: 0; - width: 47.916666667%; -} -/* IE Front Page Template Widget fix */ -.template-front-page .widget-area { - clear: both; -} -.template-front-page .widget { - width: 100% !important; - border: none; -} -.template-front-page .widget-area .widget, -.template-front-page .first.front-widgets, -.template-front-page.two-sidebars .widget-area .front-widgets { - float: left; - margin-bottom: 24px; - width: 51.875%; -} -.template-front-page .second.front-widgets, -.template-front-page .widget-area .widget:nth-child(odd) { - clear: right; -} -.template-front-page .first.front-widgets, -.template-front-page .second.front-widgets, -.template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { - float: right; - margin: 0 0 24px; - width: 39.0625%; -} -.template-front-page.two-sidebars .widget, -.template-front-page.two-sidebars .widget:nth-child(even) { - float: none; - width: auto; -} -/* add input font for ul { - text-align: right; -} -.rtl .main-navigation ul li ul li, -.rtl .main-navigation ul li ul li ul li { - margin-left: 40px; - margin-right: auto; -} -.rtl .main-navigation li ul ul { - position: absolute; - bottom: 0; - right: 100%; - z-index: 1; -} -.ie7 .rtl .main-navigation li ul ul { - position: absolute; - bottom: 0; - right: 100%; - z-index: 1; -} -.ie7 .rtl .main-navigation ul li { - z-index: 99; -} -.ie7 .rtl .main-navigation li ul { - position: absolute; - bottom: 100%; - right: 0; - z-index: 1; -} -.ie7 .rtl .main-navigation li { - margin-right: auto; - margin-left: 40px; -} -.ie7 .rtl .main-navigation li ul ul ul { - position: relative; - z-index: 1; -} \ No newline at end of file diff --git a/doc/slihelp_generator/assets/css/jquery.mmenu.all.css b/doc/slihelp_generator/assets/css/jquery.mmenu.all.css deleted file mode 100644 index 14ba9a43b3..0000000000 --- a/doc/slihelp_generator/assets/css/jquery.mmenu.all.css +++ /dev/null @@ -1,30 +0,0 @@ -.mm-hidden{display:none!important}.mm-wrapper{overflow-x:hidden;position:relative}.mm-menu{box-sizing:border-box;background:inherit;display:block;padding:0;margin:0;position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.mm-panels,.mm-panels>.mm-panel{background:inherit;border-color:inherit;box-sizing:border-box;margin:0;position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.mm-panels{overflow:hidden}.mm-panel{-webkit-transform:translate(100%,0);-ms-transform:translate(100%,0);transform:translate(100%,0);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;-webkit-transform-origin:top left;-ms-transform-origin:top left;transform-origin:top left}.mm-panel.mm-opened{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-panel.mm-subopened{-webkit-transform:translate(-30%,0);-ms-transform:translate(-30%,0);transform:translate(-30%,0);-webkit-transform:translate3d(-30%,0,0);transform:translate3d(-30%,0,0)}.mm-panel.mm-highest{z-index:1}.mm-panel.mm-noanimation{-webkit-transition:none!important;transition:none!important}.mm-panel.mm-noanimation.mm-subopened{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-panels>.mm-panel{-webkit-overflow-scrolling:touch;overflow:scroll;overflow-x:hidden;overflow-y:auto;padding:0 20px}.mm-panels>.mm-panel.mm-hasnavbar{padding-top:40px}.mm-panels>.mm-panel:not(.mm-hidden){display:block}.mm-panels>.mm-panel:after,.mm-panels>.mm-panel:before{content:'';display:block;height:20px}.mm-vertical .mm-panel{-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.mm-listview .mm-vertical .mm-panel,.mm-vertical .mm-listview .mm-panel{display:none;padding:10px 0 10px 10px}.mm-listview .mm-vertical .mm-panel .mm-listview>li:last-child:after,.mm-vertical .mm-listview .mm-panel .mm-listview>li:last-child:after{border-color:transparent}.mm-vertical li.mm-opened>.mm-panel,li.mm-vertical.mm-opened>.mm-panel{display:block}.mm-listview>li.mm-vertical>.mm-next,.mm-vertical .mm-listview>li>.mm-next{box-sizing:border-box;height:40px;bottom:auto}.mm-listview>li.mm-vertical.mm-opened>.mm-next:after,.mm-vertical .mm-listview>li.mm-opened>.mm-next:after{-webkit-transform:rotate(225deg);-ms-transform:rotate(225deg);transform:rotate(225deg);right:19px}.mm-btn{box-sizing:border-box;width:40px;height:40px;position:absolute;top:0;z-index:1}.mm-clear:after,.mm-clear:before,.mm-close:after,.mm-close:before{content:'';border:2px solid transparent;display:block;width:5px;height:5px;margin:auto;position:absolute;top:0;bottom:0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.mm-clear:before,.mm-close:before{border-right:none;border-bottom:none;right:18px}.mm-clear:after,.mm-close:after{border-left:none;border-top:none;right:25px}.mm-next:after,.mm-prev:before{content:'';border-top:2px solid transparent;border-left:2px solid transparent;display:block;width:8px;height:8px;margin:auto;position:absolute;top:0;bottom:0}.mm-prev:before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);left:23px;right:auto}.mm-next:after{-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg);right:23px;left:auto}.mm-navbar{border-bottom:1px solid;border-color:inherit;text-align:center;line-height:20px;height:40px;padding:0 40px;margin:0;position:absolute;top:0;left:0;right:0}.mm-navbar>*{display:block;padding:10px 0}.mm-navbar a,.mm-navbar a:hover{text-decoration:none}.mm-navbar .mm-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mm-navbar .mm-btn:first-child{left:0}.mm-navbar .mm-btn:last-child{text-align:right;right:0}.mm-panel .mm-navbar{display:none}.mm-panel.mm-hasnavbar .mm-navbar{display:block}.mm-listview,.mm-listview>li{list-style:none;display:block;padding:0;margin:0}.mm-listview{font:inherit;font-size:14px;line-height:20px}.mm-listview a,.mm-listview a:hover{text-decoration:none}.mm-listview>li{position:relative}.mm-listview>li,.mm-listview>li .mm-next,.mm-listview>li .mm-next:before,.mm-listview>li:after{border-color:inherit}.mm-listview>li>a,.mm-listview>li>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:inherit;display:block;padding:10px 10px 10px 20px;margin:0}.mm-listview>li:not(.mm-divider):after{content:'';border-bottom-width:1px;border-bottom-style:solid;display:block;position:absolute;left:0;right:0;bottom:0}.mm-listview>li:not(.mm-divider):after{left:20px}.mm-listview .mm-next{background:rgba(3,2,1,0);width:50px;padding:0;position:absolute;right:0;top:0;bottom:0;z-index:2}.mm-listview .mm-next:before{content:'';border-left-width:1px;border-left-style:solid;display:block;position:absolute;top:0;bottom:0;left:0}.mm-listview .mm-next+a,.mm-listview .mm-next+span{margin-right:50px}.mm-listview .mm-next.mm-fullsubopen{width:100%}.mm-listview .mm-next.mm-fullsubopen:before{border-left:none}.mm-listview .mm-next.mm-fullsubopen+a,.mm-listview .mm-next.mm-fullsubopen+span{padding-right:50px;margin-right:0}.mm-panels>.mm-panel>.mm-listview{margin:20px -20px}.mm-panels>.mm-panel>.mm-listview:first-child,.mm-panels>.mm-panel>.mm-navbar+.mm-listview{margin-top:-20px}.mm-menu{background:#f3f3f3;border-color:rgba(0,0,0,.1);color:rgba(0,0,0,.75)}.mm-menu .mm-navbar a,.mm-menu .mm-navbar>*{color:rgba(0,0,0,.3)}.mm-menu .mm-btn:after,.mm-menu .mm-btn:before{border-color:rgba(0,0,0,.3)}.mm-menu .mm-listview{border-color:rgba(0,0,0,.1)}.mm-menu .mm-listview>li .mm-next:after{border-color:rgba(0,0,0,.3)}.mm-menu .mm-listview>li a:not(.mm-next){-webkit-tap-highlight-color:rgba(255,255,255,.5);tap-highlight-color:rgba(255,255,255,.5)}.mm-menu .mm-listview>li.mm-selected>a:not(.mm-next),.mm-menu .mm-listview>li.mm-selected>span{background:rgba(255,255,255,.5)}.mm-menu .mm-listview>li.mm-opened.mm-vertical>.mm-panel,.mm-menu .mm-listview>li.mm-opened.mm-vertical>a.mm-next,.mm-menu.mm-vertical .mm-listview>li.mm-opened>.mm-panel,.mm-menu.mm-vertical .mm-listview>li.mm-opened>a.mm-next{background:rgba(0,0,0,.05)}.mm-menu .mm-divider{background:rgba(0,0,0,.05)} -.mm-page{box-sizing:border-box;position:relative}.mm-slideout{-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;z-index:1}html.mm-opened{overflow-x:hidden;position:relative}html.mm-blocking{overflow:hidden}html.mm-blocking body{overflow:hidden}html.mm-background .mm-page{background:inherit}#mm-blocker{background:rgba(3,2,1,0);display:none;width:100%;height:100%;position:fixed;top:0;left:0;z-index:2}html.mm-blocking #mm-blocker{display:block}.mm-menu.mm-offcanvas{z-index:0;display:none;position:fixed}.mm-menu.mm-offcanvas.mm-opened{display:block}.mm-menu.mm-offcanvas.mm-no-csstransforms.mm-opened{z-index:10}.mm-menu.mm-offcanvas{width:80%;min-width:140px;max-width:440px}html.mm-opening .mm-menu.mm-opened~.mm-slideout{-webkit-transform:translate(80%,0);-ms-transform:translate(80%,0);transform:translate(80%,0);-webkit-transform:translate3d(80%,0,0);transform:translate3d(80%,0,0)}@media all and (max-width:175px){html.mm-opening .mm-menu.mm-opened~.mm-slideout{-webkit-transform:translate(140px,0);-ms-transform:translate(140px,0);transform:translate(140px,0);-webkit-transform:translate3d(140px,0,0);transform:translate3d(140px,0,0)}}@media all and (min-width:550px){html.mm-opening .mm-menu.mm-opened~.mm-slideout{-webkit-transform:translate(440px,0);-ms-transform:translate(440px,0);transform:translate(440px,0);-webkit-transform:translate3d(440px,0,0);transform:translate3d(440px,0,0)}} -@charset "UTF-8";.mm-sronly{border:0!important;clip:rect(1px,1px,1px,1px)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;white-space:nowrap!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;position:absolute!important} -.mm-menu .mm-listview.mm-border-none>li:after,.mm-menu .mm-listview>li.mm-border-none:after,.mm-menu.mm-border-none .mm-listview>li:after{content:none}.mm-menu .mm-listview.mm-border-full>li:after,.mm-menu .mm-listview>li.mm-border-full:after,.mm-menu.mm-border-full .mm-listview>li:after{left:0!important}.mm-menu .mm-listview.mm-border-offset>li:after,.mm-menu .mm-listview>li.mm-border-offset:after,.mm-menu.mm-border-offset .mm-listview>li:after{right:20px} -.mm-menu.mm-offcanvas.mm-fullscreen{width:100%;min-width:140px;max-width:10000px}html.mm-opening .mm-menu.mm-fullscreen.mm-opened~.mm-slideout{-webkit-transform:translate(100%,0);-ms-transform:translate(100%,0);transform:translate(100%,0);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}@media all and (max-width:140px){html.mm-opening .mm-menu.mm-fullscreen.mm-opened~.mm-slideout{-webkit-transform:translate(140px,0);-ms-transform:translate(140px,0);transform:translate(140px,0);-webkit-transform:translate3d(140px,0,0);transform:translate3d(140px,0,0)}}@media all and (min-width:10000px){html.mm-opening .mm-menu.mm-fullscreen.mm-opened~.mm-slideout{-webkit-transform:translate(10000px,0);-ms-transform:translate(10000px,0);transform:translate(10000px,0);-webkit-transform:translate3d(10000px,0,0);transform:translate3d(10000px,0,0)}}html.mm-right.mm-opening .mm-menu.mm-fullscreen.mm-opened~.mm-slideout{-webkit-transform:translate(-100%,0);-ms-transform:translate(-100%,0);transform:translate(-100%,0);-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}@media all and (max-width:140px){html.mm-right.mm-opening .mm-menu.mm-fullscreen.mm-opened~.mm-slideout{-webkit-transform:translate(-140px,0);-ms-transform:translate(-140px,0);transform:translate(-140px,0);-webkit-transform:translate3d(-140px,0,0);transform:translate3d(-140px,0,0)}}@media all and (min-width:10000px){html.mm-right.mm-opening .mm-menu.mm-fullscreen.mm-opened~.mm-slideout{-webkit-transform:translate(-10000px,0);-ms-transform:translate(-10000px,0);transform:translate(-10000px,0);-webkit-transform:translate3d(-10000px,0,0);transform:translate3d(-10000px,0,0)}}.mm-menu.mm-offcanvas.mm-fullscreen.mm-bottom,.mm-menu.mm-offcanvas.mm-fullscreen.mm-top{height:100%;min-height:140px;max-height:10000px} -.mm-menu.mm-fx-menu-zoom{-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease}html.mm-opened .mm-menu.mm-fx-menu-zoom{-webkit-transform:scale(.7,.7) translate3d(-30%,0,0);transform:scale(.7,.7) translate3d(-30%,0,0);-webkit-transform-origin:left center;-ms-transform-origin:left center;transform-origin:left center}html.mm-opening .mm-menu.mm-fx-menu-zoom{-webkit-transform:scale(1,1) translate3d(0,0,0);transform:scale(1,1) translate3d(0,0,0)}html.mm-right.mm-opened .mm-menu.mm-fx-menu-zoom{-webkit-transform:scale(.7,.7) translate3d(30%,0,0);transform:scale(.7,.7) translate3d(30%,0,0);-webkit-transform-origin:right center;-ms-transform-origin:right center;transform-origin:right center}html.mm-right.mm-opening .mm-menu.mm-fx-menu-zoom{-webkit-transform:scale(1,1) translate3d(0,0,0);transform:scale(1,1) translate3d(0,0,0)}.mm-menu.mm-fx-menu-slide{-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease}html.mm-opened .mm-menu.mm-fx-menu-slide{-webkit-transform:translate(-30%,0);-ms-transform:translate(-30%,0);transform:translate(-30%,0);-webkit-transform:translate3d(-30%,0,0);transform:translate3d(-30%,0,0)}html.mm-opening .mm-menu.mm-fx-menu-slide{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html.mm-right.mm-opened .mm-menu.mm-fx-menu-slide{-webkit-transform:translate(30%,0);-ms-transform:translate(30%,0);transform:translate(30%,0);-webkit-transform:translate3d(30%,0,0);transform:translate3d(30%,0,0)}html.mm-right.mm-opening .mm-menu.mm-fx-menu-slide{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-menu.mm-fx-menu-fade{opacity:0;-webkit-transition:opacity .4s ease;transition:opacity .4s ease}html.mm-opening .mm-menu.mm-fx-menu-fade{opacity:1}.mm-menu .mm-fx-panels-none.mm-panel,.mm-menu.mm-fx-panels-none .mm-panel{-webkit-transition-property:none;transition-property:none}.mm-menu .mm-fx-panels-none.mm-panel.mm-subopened,.mm-menu.mm-fx-panels-none .mm-panel.mm-subopened{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-menu .mm-fx-panels-zoom.mm-panel,.mm-menu.mm-fx-panels-zoom .mm-panel{-webkit-transform-origin:left center;-ms-transform-origin:left center;transform-origin:left center;-webkit-transform:scale(1.5,1.5) translate3d(100%,0,0);transform:scale(1.5,1.5) translate3d(100%,0,0)}.mm-menu .mm-fx-panels-zoom.mm-panel.mm-opened,.mm-menu.mm-fx-panels-zoom .mm-panel.mm-opened{-webkit-transform:scale(1,1) translate3d(0,0,0);transform:scale(1,1) translate3d(0,0,0)}.mm-menu .mm-fx-panels-zoom.mm-panel.mm-subopened,.mm-menu.mm-fx-panels-zoom .mm-panel.mm-subopened{-webkit-transform:scale(.7,.7) translate3d(-30%,0,0);transform:scale(.7,.7) translate3d(-30%,0,0)}.mm-menu .mm-fx-panels-slide-0.mm-panel.mm-subopened,.mm-menu.mm-fx-panels-slide-0 .mm-panel.mm-subopened{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-menu .mm-fx-panels-slide-100.mm-panel.mm-subopened,.mm-menu.mm-fx-panels-slide-100 .mm-panel.mm-subopened{-webkit-transform:translate(-100%,0);-ms-transform:translate(-100%,0);transform:translate(-100%,0);-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.mm-menu .mm-fx-panels-slide-up.mm-panel,.mm-menu.mm-fx-panels-slide-up .mm-panel{-webkit-transform:translate(0,100%);-ms-transform:translate(0,100%);transform:translate(0,100%);-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.mm-menu .mm-fx-panels-slide-up.mm-panel.mm-opened,.mm-menu.mm-fx-panels-slide-up .mm-panel.mm-opened{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-menu .mm-fx-panels-slide-up.mm-panel.mm-subopened,.mm-menu.mm-fx-panels-slide-up .mm-panel.mm-subopened{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li{-webkit-transition:none .4s ease;transition:none .4s ease}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(1){-webkit-transition-delay:50ms;transition-delay:50ms}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(2){-webkit-transition-delay:.1s;transition-delay:.1s}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(3){-webkit-transition-delay:150ms;transition-delay:150ms}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(4){-webkit-transition-delay:.2s;transition-delay:.2s}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(5){-webkit-transition-delay:250ms;transition-delay:250ms}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(6){-webkit-transition-delay:.3s;transition-delay:.3s}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(7){-webkit-transition-delay:350ms;transition-delay:350ms}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(8){-webkit-transition-delay:.4s;transition-delay:.4s}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(9){-webkit-transition-delay:450ms;transition-delay:450ms}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(10){-webkit-transition-delay:.5s;transition-delay:.5s}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(11){-webkit-transition-delay:550ms;transition-delay:550ms}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(12){-webkit-transition-delay:.6s;transition-delay:.6s}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(13){-webkit-transition-delay:650ms;transition-delay:650ms}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(14){-webkit-transition-delay:.7s;transition-delay:.7s}.mm-menu[class*=mm-fx-listitems-] .mm-listview>li:nth-child(15){-webkit-transition-delay:750ms;transition-delay:750ms}.mm-menu.mm-fx-listitems-slide .mm-listview>li{-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;-webkit-transform:translate(50%,0);-ms-transform:translate(50%,0);transform:translate(50%,0);-webkit-transform:translate3d(50%,0,0);transform:translate3d(50%,0,0);opacity:0}html.mm-opening .mm-menu.mm-fx-listitems-slide .mm-panel.mm-opened .mm-listview>li{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.mm-menu.mm-fx-listitems-fade .mm-listview>li{-webkit-transition-property:opacity;transition-property:opacity;opacity:0}html.mm-opening .mm-menu.mm-fx-listitems-fade .mm-panel.mm-opened .mm-listview>li{opacity:1}.mm-menu.mm-fx-listitems-drop .mm-listview>li{-webkit-transition-property:opacity,top;transition-property:opacity,top;opacity:0;top:-25%}html.mm-opening .mm-menu.mm-fx-listitems-drop .mm-panel.mm-opened .mm-listview>li{opacity:1;top:0} -html.mm-iconbar body{overflow-x:hidden}html.mm-iconbar .mm-page{background:inherit;min-height:100vh}html.mm-iconbar .mm-slideout{box-sizing:border-box;padding-right:60px;-webkit-transform:translate(60px,0);-ms-transform:translate(60px,0);transform:translate(60px,0);-webkit-transform:translate3d(60px,0,0);transform:translate3d(60px,0,0)}.mm-menu.mm-iconbar{display:block} -.mm-menu .mm-panels>.mm-panel.mm-listview-justify:after,.mm-menu .mm-panels>.mm-panel.mm-listview-justify:before,.mm-menu.mm-listview-justify .mm-panels>.mm-panel:after,.mm-menu.mm-listview-justify .mm-panels>.mm-panel:before{content:none;display:none}.mm-menu .mm-panels>.mm-panel.mm-listview-justify>.mm-listview,.mm-menu.mm-listview-justify .mm-panels>.mm-panel>.mm-listview{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:100%;margin-top:0;margin-bottom:0}.mm-menu .mm-panels>.mm-panel.mm-listview-justify>.mm-listview>li,.mm-menu.mm-listview-justify .mm-panels>.mm-panel>.mm-listview>li{-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;min-height:40px}.mm-menu .mm-panels>.mm-panel.mm-listview-justify>.mm-listview>li:not(.mm-divider),.mm-menu.mm-listview-justify .mm-panels>.mm-panel>.mm-listview>li:not(.mm-divider){display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.mm-menu .mm-panels>.mm-panel.mm-listview-justify>.mm-listview>li>a:not(.mm-next),.mm-menu .mm-panels>.mm-panel.mm-listview-justify>.mm-listview>li>span,.mm-menu.mm-listview-justify .mm-panels>.mm-panel>.mm-listview>li>a:not(.mm-next),.mm-menu.mm-listview-justify .mm-panels>.mm-panel>.mm-listview>li>span{box-sizing:border-box;-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.mm-listview-small .mm-listview>li>a:not(.mm-next),.mm-listview-small .mm-listview>li>span{padding:7px 10px 7px 20px}.mm-listview-small .mm-listview>li.mm-vertical>.mm-next,.mm-listview-small .mm-vertical>.mm-listview>li>.mm-next{height:34px}.mm-listview-large .mm-listview>li>a:not(.mm-next),.mm-listview-large .mm-listview>li>span{padding:15px 10px 15px 20px}.mm-listview-large .mm-listview>li.mm-vertical>.mm-next,.mm-listview-large .mm-vertical>.mm-listview>li>.mm-next{height:50px}.mm-listview-huge .mm-listview>li>a:not(.mm-next),.mm-listview-huge .mm-listview>li>span{padding:20px 10px 20px 20px}.mm-listview-huge .mm-listview>li.mm-vertical>.mm-next,.mm-listview-huge .mm-vertical>.mm-listview>li>.mm-next{height:60px}.mm-listview .mm-divider{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:10px;text-transform:uppercase;text-indent:20px;line-height:25px}.mm-listview .mm-spacer{padding-top:40px}.mm-listview .mm-spacer>.mm-next{top:40px}.mm-listview .mm-spacer.mm-divider{padding-top:25px}.mm-listview .mm-inset{list-style:inside disc;padding:0 10px 15px 40px;margin:0}.mm-listview .mm-inset>li{padding:5px 0} -.mm-menu .mm-listview.mm-multiline>li>a,.mm-menu .mm-listview.mm-multiline>li>span,.mm-menu .mm-listview>li.mm-multiline>a,.mm-menu .mm-listview>li.mm-multiline>span,.mm-menu.mm-multiline .mm-listview>li>a,.mm-menu.mm-multiline .mm-listview>li>span{text-overflow:clip;white-space:normal} -.mm-menu.mm-opened[class*=mm-pagedim]~#mm-blocker{opacity:0}html.mm-opening .mm-menu.mm-opened[class*=mm-pagedim]~#mm-blocker{opacity:.3;-webkit-transition:opacity .4s ease .4s;transition:opacity .4s ease .4s}.mm-menu.mm-opened.mm-pagedim~#mm-blocker{background:inherit}.mm-menu.mm-opened.mm-pagedim-white~#mm-blocker{background:#fff}.mm-menu.mm-opened.mm-pagedim-black~#mm-blocker{background:#000} -.mm-menu.mm-popup{-webkit-transition:opacity .4s ease;transition:opacity .4s ease;opacity:0;box-shadow:0 2px 10px rgba(0,0,0,.3);height:80%;min-height:140px;max-height:880px;top:50%;left:50%;bottom:auto;right:auto;z-index:2;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.mm-menu.mm-popup.mm-opened~.mm-slideout{-webkit-transform:none!important;-ms-transform:none!important;transform:none!important;z-index:0}.mm-menu.mm-popup.mm-opened~#mm-blocker{-webkit-transition-delay:0s!important;transition-delay:0s!important;z-index:1}html.mm-opening .mm-menu.mm-popup{opacity:1} -.mm-menu.mm-offcanvas.mm-right{left:auto}html.mm-right.mm-opening .mm-menu.mm-opened~.mm-slideout{-webkit-transform:translate(-80%,0);-ms-transform:translate(-80%,0);transform:translate(-80%,0);-webkit-transform:translate3d(-80%,0,0);transform:translate3d(-80%,0,0)}@media all and (max-width:175px){html.mm-right.mm-opening .mm-menu.mm-opened~.mm-slideout{-webkit-transform:translate(-140px,0);-ms-transform:translate(-140px,0);transform:translate(-140px,0);-webkit-transform:translate3d(-140px,0,0);transform:translate3d(-140px,0,0)}}@media all and (min-width:550px){html.mm-right.mm-opening .mm-menu.mm-opened~.mm-slideout{-webkit-transform:translate(-440px,0);-ms-transform:translate(-440px,0);transform:translate(-440px,0);-webkit-transform:translate3d(-440px,0,0);transform:translate3d(-440px,0,0)}}html.mm-front .mm-slideout{-webkit-transform:none!important;-ms-transform:none!important;transform:none!important;z-index:0}html.mm-front #mm-blocker{z-index:1}html.mm-front .mm-menu.mm-offcanvas{z-index:2}.mm-menu.mm-offcanvas.mm-front,.mm-menu.mm-offcanvas.mm-next{-webkit-transition:-webkit-transform .4s ease;transition:-webkit-transform .4s ease;transition:transform .4s ease;transition:transform .4s ease,-webkit-transform .4s ease;-webkit-transform:translate(-100%,0);-ms-transform:translate(-100%,0);transform:translate(-100%,0);-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.mm-menu.mm-offcanvas.mm-front.mm-right,.mm-menu.mm-offcanvas.mm-next.mm-right{-webkit-transform:translate(100%,0);-ms-transform:translate(100%,0);transform:translate(100%,0);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.mm-menu.mm-offcanvas.mm-top{-webkit-transform:translate(0,-100%);-ms-transform:translate(0,-100%);transform:translate(0,-100%);-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.mm-menu.mm-offcanvas.mm-bottom{-webkit-transform:translate(0,100%);-ms-transform:translate(0,100%);transform:translate(0,100%);-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.mm-menu.mm-offcanvas.mm-bottom,.mm-menu.mm-offcanvas.mm-top{width:100%;min-width:100%;max-width:100%}.mm-menu.mm-offcanvas.mm-bottom{top:auto}html.mm-opening .mm-menu.mm-offcanvas.mm-front,html.mm-opening .mm-menu.mm-offcanvas.mm-next{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-menu.mm-offcanvas.mm-bottom,.mm-menu.mm-offcanvas.mm-top{height:80%;min-height:140px;max-height:880px} -.mm-menu.mm-shadow-page:after{content:"";display:block;width:20px;height:120%;position:absolute;left:100%;top:-10%;z-index:100;-webkit-clip-path:polygon(-20px 0,0 0,0 100%,-20px 100%);clip-path:polygon(-20px 0,0 0,0 100%,-20px 100%)}.mm-menu.mm-shadow-page.mm-right:after{left:auto;right:100%}.mm-menu.mm-shadow-page.mm-front:after,.mm-menu.mm-shadow-page.mm-next:after{content:none;display:none}.mm-menu.mm-shadow-page:after{box-shadow:0 0 10px rgba(0,0,0,.3)}.mm-menu.mm-shadow-panels .mm-panel.mm-opened:nth-child(n+2){box-shadow:0 0 10px rgba(0,0,0,.3)} -.mm-menu.mm-theme-dark{background:#333;border-color:rgba(0,0,0,.15);color:rgba(255,255,255,.8)}.mm-menu.mm-theme-dark .mm-navbar a,.mm-menu.mm-theme-dark .mm-navbar>*{color:rgba(255,255,255,.4)}.mm-menu.mm-theme-dark .mm-btn:after,.mm-menu.mm-theme-dark .mm-btn:before{border-color:rgba(255,255,255,.4)}.mm-menu.mm-theme-dark .mm-listview{border-color:rgba(0,0,0,.15)}.mm-menu.mm-theme-dark .mm-listview>li .mm-next:after{border-color:rgba(255,255,255,.4)}.mm-menu.mm-theme-dark .mm-listview>li a:not(.mm-next){-webkit-tap-highlight-color:rgba(0,0,0,.1);tap-highlight-color:rgba(0,0,0,.1)}.mm-menu.mm-theme-dark .mm-listview>li.mm-selected>a:not(.mm-next),.mm-menu.mm-theme-dark .mm-listview>li.mm-selected>span{background:rgba(0,0,0,.1)}.mm-menu.mm-theme-dark .mm-listview>li.mm-opened.mm-vertical>.mm-panel,.mm-menu.mm-theme-dark .mm-listview>li.mm-opened.mm-vertical>a.mm-next,.mm-menu.mm-theme-dark.mm-vertical .mm-listview>li.mm-opened>.mm-panel,.mm-menu.mm-theme-dark.mm-vertical .mm-listview>li.mm-opened>a.mm-next{background:rgba(255,255,255,.05)}.mm-menu.mm-theme-dark .mm-divider{background:rgba(255,255,255,.05)}.mm-menu.mm-theme-dark label.mm-check:before{border-color:rgba(255,255,255,.8)}.mm-menu.mm-theme-dark em.mm-counter{color:rgba(255,255,255,.4)}.mm-menu.mm-theme-dark .mm-fixeddivider span{background:rgba(255,255,255,.05)}.mm-menu.mm-keyboardfocus a:focus{background:rgba(0,0,0,.1)}.mm-menu.mm-shadow-page.mm-theme-dark:after{box-shadow:0 0 20px rgba(0,0,0,.5)}.mm-menu.mm-shadow-panels.mm-theme-dark .mm-panel.mm-opened:nth-child(n+2){box-shadow:0 0 20px rgba(0,0,0,.5)}.mm-menu.mm-theme-dark .mm-search input{background:rgba(255,255,255,.3);color:rgba(255,255,255,.8)}.mm-menu.mm-theme-dark .mm-noresultsmsg{color:rgba(255,255,255,.4)}.mm-menu.mm-theme-dark .mm-indexer a{color:rgba(255,255,255,.4)}.mm-menu.mm-hoverselected.mm-theme-dark .mm-listview>li>a.mm-fullsubopen:hover+span,.mm-menu.mm-hoverselected.mm-theme-dark .mm-listview>li>a:not(.mm-fullsubopen):hover{background:rgba(0,0,0,.1)}.mm-menu.mm-parentselected.mm-theme-dark .mm-listview>li>a.mm-selected.mm-fullsubopen+a,.mm-menu.mm-parentselected.mm-theme-dark .mm-listview>li>a.mm-selected.mm-fullsubopen+span,.mm-menu.mm-parentselected.mm-theme-dark .mm-listview>li>a.mm-selected:not(.mm-fullsubopen){background:rgba(0,0,0,.1)}.mm-menu.mm-theme-dark label.mm-toggle{background:rgba(0,0,0,.15)}.mm-menu.mm-theme-dark label.mm-toggle:before{background:#333}.mm-menu.mm-theme-dark input.mm-toggle:checked~label.mm-toggle{background:#4bd963}.mm-menu.mm-theme-white{background:#fff;border-color:rgba(0,0,0,.1);color:rgba(0,0,0,.6)}.mm-menu.mm-theme-white .mm-navbar a,.mm-menu.mm-theme-white .mm-navbar>*{color:rgba(0,0,0,.3)}.mm-menu.mm-theme-white .mm-btn:after,.mm-menu.mm-theme-white .mm-btn:before{border-color:rgba(0,0,0,.3)}.mm-menu.mm-theme-white .mm-listview{border-color:rgba(0,0,0,.1)}.mm-menu.mm-theme-white .mm-listview>li .mm-next:after{border-color:rgba(0,0,0,.3)}.mm-menu.mm-theme-white .mm-listview>li a:not(.mm-next){-webkit-tap-highlight-color:rgba(0,0,0,.05);tap-highlight-color:rgba(0,0,0,.05)}.mm-menu.mm-theme-white .mm-listview>li.mm-selected>a:not(.mm-next),.mm-menu.mm-theme-white .mm-listview>li.mm-selected>span{background:rgba(0,0,0,.05)}.mm-menu.mm-theme-white .mm-listview>li.mm-opened.mm-vertical>.mm-panel,.mm-menu.mm-theme-white .mm-listview>li.mm-opened.mm-vertical>a.mm-next,.mm-menu.mm-theme-white.mm-vertical .mm-listview>li.mm-opened>.mm-panel,.mm-menu.mm-theme-white.mm-vertical .mm-listview>li.mm-opened>a.mm-next{background:rgba(0,0,0,.05)}.mm-menu.mm-theme-white .mm-divider{background:rgba(0,0,0,.05)}.mm-menu.mm-theme-white label.mm-check:before{border-color:rgba(0,0,0,.6)}.mm-menu.mm-theme-white em.mm-counter{color:rgba(0,0,0,.3)}.mm-menu.mm-theme-white .mm-fixeddivider span{background:rgba(0,0,0,.05)}.mm-menu.mm-keyboardfocus a:focus{background:rgba(0,0,0,.05)}.mm-menu.mm-shadow-page.mm-theme-white:after{box-shadow:0 0 10px rgba(0,0,0,.2)}.mm-menu.mm-shadow-panels.mm-theme-white .mm-panel.mm-opened:nth-child(n+2){box-shadow:0 0 10px rgba(0,0,0,.2)}.mm-menu.mm-theme-white .mm-search input{background:rgba(0,0,0,.05);color:rgba(0,0,0,.6)}.mm-menu.mm-theme-white .mm-noresultsmsg{color:rgba(0,0,0,.3)}.mm-menu.mm-theme-white .mm-indexer a{color:rgba(0,0,0,.3)}.mm-menu.mm-hoverselected.mm-theme-white .mm-listview>li>a.mm-fullsubopen:hover+span,.mm-menu.mm-hoverselected.mm-theme-white .mm-listview>li>a:not(.mm-fullsubopen):hover{background:rgba(0,0,0,.05)}.mm-menu.mm-parentselected.mm-theme-white .mm-listview>li>a.mm-selected.mm-fullsubopen+a,.mm-menu.mm-parentselected.mm-theme-white .mm-listview>li>a.mm-selected.mm-fullsubopen+span,.mm-menu.mm-parentselected.mm-theme-white .mm-listview>li>a.mm-selected:not(.mm-fullsubopen){background:rgba(0,0,0,.05)}.mm-menu.mm-theme-white label.mm-toggle{background:rgba(0,0,0,.1)}.mm-menu.mm-theme-white label.mm-toggle:before{background:#fff}.mm-menu.mm-theme-white input.mm-toggle:checked~label.mm-toggle{background:#4bd963}.mm-menu.mm-theme-black{background:#000;border-color:rgba(255,255,255,.2);color:rgba(255,255,255,.6)}.mm-menu.mm-theme-black .mm-navbar a,.mm-menu.mm-theme-black .mm-navbar>*{color:rgba(255,255,255,.4)}.mm-menu.mm-theme-black .mm-btn:after,.mm-menu.mm-theme-black .mm-btn:before{border-color:rgba(255,255,255,.4)}.mm-menu.mm-theme-black .mm-listview{border-color:rgba(255,255,255,.2)}.mm-menu.mm-theme-black .mm-listview>li .mm-next:after{border-color:rgba(255,255,255,.4)}.mm-menu.mm-theme-black .mm-listview>li a:not(.mm-next){-webkit-tap-highlight-color:rgba(255,255,255,.3);tap-highlight-color:rgba(255,255,255,.3)}.mm-menu.mm-theme-black .mm-listview>li.mm-selected>a:not(.mm-next),.mm-menu.mm-theme-black .mm-listview>li.mm-selected>span{background:rgba(255,255,255,.3)}.mm-menu.mm-theme-black .mm-listview>li.mm-opened.mm-vertical>.mm-panel,.mm-menu.mm-theme-black .mm-listview>li.mm-opened.mm-vertical>a.mm-next,.mm-menu.mm-theme-black.mm-vertical .mm-listview>li.mm-opened>.mm-panel,.mm-menu.mm-theme-black.mm-vertical .mm-listview>li.mm-opened>a.mm-next{background:rgba(255,255,255,.2)}.mm-menu.mm-theme-black .mm-divider{background:rgba(255,255,255,.2)}.mm-menu.mm-theme-black label.mm-check:before{border-color:rgba(255,255,255,.6)}.mm-menu.mm-theme-black em.mm-counter{color:rgba(255,255,255,.4)}.mm-menu.mm-theme-black .mm-fixeddivider span{background:rgba(255,255,255,.2)}.mm-menu.mm-keyboardfocus a:focus{background:rgba(255,255,255,.3)}.mm-menu.mm-shadow-page.mm-theme-black:after{content:none;display:none}.mm-menu.mm-shadow-panels.mm-theme-black .mm-panel.mm-opened:nth-child(n+2){box-shadow:false}.mm-menu.mm-theme-black .mm-search input{background:rgba(255,255,255,.3);color:rgba(255,255,255,.6)}.mm-menu.mm-theme-black .mm-noresultsmsg{color:rgba(255,255,255,.4)}.mm-menu.mm-theme-black .mm-indexer a{color:rgba(255,255,255,.4)}.mm-menu.mm-hoverselected.mm-theme-black .mm-listview>li>a.mm-fullsubopen:hover+span,.mm-menu.mm-hoverselected.mm-theme-black .mm-listview>li>a:not(.mm-fullsubopen):hover{background:rgba(255,255,255,.3)}.mm-menu.mm-parentselected.mm-theme-black .mm-listview>li>a.mm-selected.mm-fullsubopen+a,.mm-menu.mm-parentselected.mm-theme-black .mm-listview>li>a.mm-selected.mm-fullsubopen+span,.mm-menu.mm-parentselected.mm-theme-black .mm-listview>li>a.mm-selected:not(.mm-fullsubopen){background:rgba(255,255,255,.3)}.mm-menu.mm-theme-black label.mm-toggle{background:rgba(255,255,255,.2)}.mm-menu.mm-theme-black label.mm-toggle:before{background:#000}.mm-menu.mm-theme-black input.mm-toggle:checked~label.mm-toggle{background:#4bd963} -.mm-menu .mm-tileview.mm-listview:after,.mm-menu.mm-tileview .mm-listview:after{content:'';display:block;clear:both}.mm-menu .mm-tileview.mm-listview>li,.mm-menu.mm-tileview .mm-listview>li{width:50%;height:0;padding:50% 0 0 0;float:left;position:relative}.mm-menu .mm-tileview.mm-listview>li:after,.mm-menu.mm-tileview .mm-listview>li:after{left:0;top:0;border-right-width:1px;border-right-style:solid;z-index:-1}.mm-menu .mm-tileview.mm-listview>li.mm-tile-xs,.mm-menu.mm-tileview .mm-listview>li.mm-tile-xs{width:12.5%;padding-top:12.5%}.mm-menu .mm-tileview.mm-listview>li.mm-tile-s,.mm-menu.mm-tileview .mm-listview>li.mm-tile-s{width:25%;padding-top:25%}.mm-menu .mm-tileview.mm-listview>li.mm-tile-l,.mm-menu.mm-tileview .mm-listview>li.mm-tile-l{width:75%;padding-top:75%}.mm-menu .mm-tileview.mm-listview>li.mm-tile-xl,.mm-menu.mm-tileview .mm-listview>li.mm-tile-xl{width:100%;padding-top:100%}.mm-menu .mm-tileview.mm-listview>li>a,.mm-menu .mm-tileview.mm-listview>li>span,.mm-menu.mm-tileview .mm-listview>li>a,.mm-menu.mm-tileview .mm-listview>li>span{line-height:1px;text-align:center;padding:50% 10px 0 10px;margin:0;position:absolute;top:0;right:1px;bottom:1px;left:0}.mm-menu .mm-tileview.mm-listview>li>.mm-next,.mm-menu.mm-tileview .mm-listview>li>.mm-next{width:auto}.mm-menu .mm-tileview.mm-listview>li>.mm-next:after,.mm-menu .mm-tileview.mm-listview>li>.mm-next:before,.mm-menu.mm-tileview .mm-listview>li>.mm-next:after,.mm-menu.mm-tileview .mm-listview>li>.mm-next:before{content:none;display:none}.mm-menu.mm-tileview .mm-panel{padding-left:0;padding-right:0}.mm-menu.mm-tileview .mm-panel:after{content:none;display:none}.mm-menu.mm-tileview .mm-listview{margin:0} -html.mm-widescreen body{position:relative}html.mm-widescreen #mm-blocker{display:none!important}html.mm-widescreen .mm-slideout{-webkit-transform:none!important;-ms-transform:none!important;transform:none!important;width:70%!important;margin-left:30%!important}html.mm-widescreen .mm-page{background:inherit;box-sizing:border-box}html.mm-widescreen.mm-blocking,html.mm-widescreen.mm-blocking body{overflow:auto}.mm-menu.mm-widescreen{border-right-width:1px;border-right-style:solid;display:block!important;width:30%!important;min-width:0!important;max-width:none!important;top:0!important;right:auto!important;bottom:0!important;left:0!important;z-index:100!important;-webkit-transform:none!important;-ms-transform:none!important;transform:none!important}.mm-menu.mm-widescreen.mm-pageshadow:after{content:none;display:none} -.mm-menu.mm-autoheight{-webkit-transition:none .4s ease;transition:none .4s ease;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.mm-menu.mm-autoheight:not(.mm-offcanvas){position:relative}.mm-menu.mm-measureheight .mm-panel.mm-vertical.mm-opened,.mm-menu.mm-measureheight .mm-panel:not(.mm-vertical){display:block!important}.mm-menu.mm-measureheight .mm-panels>.mm-panel{bottom:auto!important;height:auto!important} -.mm-columns{-webkit-transition-property:width;transition-property:width}.mm-columns .mm-panels>.mm-panel{right:auto;-webkit-transition-property:width,-webkit-transform;transition-property:width,-webkit-transform;transition-property:width,transform;transition-property:width,transform,-webkit-transform}.mm-columns .mm-panels>.mm-panel.mm-opened,.mm-columns .mm-panels>.mm-panel.mm-subopened{border-left:1px solid;border-color:inherit;display:block!important}.mm-columns .mm-panels>.mm-columns-0{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-columns-0 .mm-panels>.mm-panel{z-index:0}.mm-columns-0 .mm-panels>.mm-panel else{width:100%}.mm-columns-0 .mm-panels>.mm-panel:not(.mm-opened):not(.mm-subopened){-webkit-transform:translate(100%,0);-ms-transform:translate(100%,0);transform:translate(100%,0);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.mm-menu.mm-offcanvas.mm-columns-0{width:80%;min-width:140px;max-width:0}html.mm-opening .mm-menu.mm-columns-0.mm-opened~.mm-slideout{-webkit-transform:translate(80%,0);-ms-transform:translate(80%,0);transform:translate(80%,0);-webkit-transform:translate3d(80%,0,0);transform:translate3d(80%,0,0)}@media all and (max-width:175px){html.mm-opening .mm-menu.mm-columns-0.mm-opened~.mm-slideout{-webkit-transform:translate(140px,0);-ms-transform:translate(140px,0);transform:translate(140px,0);-webkit-transform:translate3d(140px,0,0);transform:translate3d(140px,0,0)}}@media all and (min-width:0px){html.mm-opening .mm-menu.mm-columns-0.mm-opened~.mm-slideout{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}html.mm-right.mm-opening .mm-menu.mm-columns-0.mm-opened~.mm-slideout{-webkit-transform:translate(-80%,0);-ms-transform:translate(-80%,0);transform:translate(-80%,0);-webkit-transform:translate3d(-80%,0,0);transform:translate3d(-80%,0,0)}@media all and (max-width:175px){html.mm-right.mm-opening .mm-menu.mm-columns-0.mm-opened~.mm-slideout{-webkit-transform:translate(-140px,0);-ms-transform:translate(-140px,0);transform:translate(-140px,0);-webkit-transform:translate3d(-140px,0,0);transform:translate3d(-140px,0,0)}}@media all and (min-width:0px){html.mm-right.mm-opening .mm-menu.mm-columns-0.mm-opened~.mm-slideout{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.mm-columns .mm-panels>.mm-columns-1{-webkit-transform:translate(100%,0);-ms-transform:translate(100%,0);transform:translate(100%,0);-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.mm-columns-1 .mm-panels>.mm-panel{z-index:1;width:100%}.mm-columns-1 .mm-panels>.mm-panel else{width:100%}.mm-columns-1 .mm-panels>.mm-panel:not(.mm-opened):not(.mm-subopened){-webkit-transform:translate(200%,0);-ms-transform:translate(200%,0);transform:translate(200%,0);-webkit-transform:translate3d(200%,0,0);transform:translate3d(200%,0,0)}.mm-menu.mm-offcanvas.mm-columns-1{width:80%;min-width:140px;max-width:440px}html.mm-opening .mm-menu.mm-columns-1.mm-opened~.mm-slideout{-webkit-transform:translate(80%,0);-ms-transform:translate(80%,0);transform:translate(80%,0);-webkit-transform:translate3d(80%,0,0);transform:translate3d(80%,0,0)}@media all and (max-width:175px){html.mm-opening .mm-menu.mm-columns-1.mm-opened~.mm-slideout{-webkit-transform:translate(140px,0);-ms-transform:translate(140px,0);transform:translate(140px,0);-webkit-transform:translate3d(140px,0,0);transform:translate3d(140px,0,0)}}@media all and (min-width:550px){html.mm-opening .mm-menu.mm-columns-1.mm-opened~.mm-slideout{-webkit-transform:translate(440px,0);-ms-transform:translate(440px,0);transform:translate(440px,0);-webkit-transform:translate3d(440px,0,0);transform:translate3d(440px,0,0)}}html.mm-right.mm-opening .mm-menu.mm-columns-1.mm-opened~.mm-slideout{-webkit-transform:translate(-80%,0);-ms-transform:translate(-80%,0);transform:translate(-80%,0);-webkit-transform:translate3d(-80%,0,0);transform:translate3d(-80%,0,0)}@media all and (max-width:175px){html.mm-right.mm-opening .mm-menu.mm-columns-1.mm-opened~.mm-slideout{-webkit-transform:translate(-140px,0);-ms-transform:translate(-140px,0);transform:translate(-140px,0);-webkit-transform:translate3d(-140px,0,0);transform:translate3d(-140px,0,0)}}@media all and (min-width:550px){html.mm-right.mm-opening .mm-menu.mm-columns-1.mm-opened~.mm-slideout{-webkit-transform:translate(-440px,0);-ms-transform:translate(-440px,0);transform:translate(-440px,0);-webkit-transform:translate3d(-440px,0,0);transform:translate3d(-440px,0,0)}}.mm-columns .mm-panels>.mm-columns-2{-webkit-transform:translate(200%,0);-ms-transform:translate(200%,0);transform:translate(200%,0);-webkit-transform:translate3d(200%,0,0);transform:translate3d(200%,0,0)}.mm-columns-2 .mm-panels>.mm-panel{z-index:2;width:50%}.mm-columns-2 .mm-panels>.mm-panel else{width:100%}.mm-columns-2 .mm-panels>.mm-panel:not(.mm-opened):not(.mm-subopened){-webkit-transform:translate(300%,0);-ms-transform:translate(300%,0);transform:translate(300%,0);-webkit-transform:translate3d(300%,0,0);transform:translate3d(300%,0,0)}.mm-menu.mm-offcanvas.mm-columns-2{width:80%;min-width:140px;max-width:880px}html.mm-opening .mm-menu.mm-columns-2.mm-opened~.mm-slideout{-webkit-transform:translate(80%,0);-ms-transform:translate(80%,0);transform:translate(80%,0);-webkit-transform:translate3d(80%,0,0);transform:translate3d(80%,0,0)}@media all and (max-width:175px){html.mm-opening .mm-menu.mm-columns-2.mm-opened~.mm-slideout{-webkit-transform:translate(140px,0);-ms-transform:translate(140px,0);transform:translate(140px,0);-webkit-transform:translate3d(140px,0,0);transform:translate3d(140px,0,0)}}@media all and (min-width:1100px){html.mm-opening .mm-menu.mm-columns-2.mm-opened~.mm-slideout{-webkit-transform:translate(880px,0);-ms-transform:translate(880px,0);transform:translate(880px,0);-webkit-transform:translate3d(880px,0,0);transform:translate3d(880px,0,0)}}html.mm-right.mm-opening .mm-menu.mm-columns-2.mm-opened~.mm-slideout{-webkit-transform:translate(-80%,0);-ms-transform:translate(-80%,0);transform:translate(-80%,0);-webkit-transform:translate3d(-80%,0,0);transform:translate3d(-80%,0,0)}@media all and (max-width:175px){html.mm-right.mm-opening .mm-menu.mm-columns-2.mm-opened~.mm-slideout{-webkit-transform:translate(-140px,0);-ms-transform:translate(-140px,0);transform:translate(-140px,0);-webkit-transform:translate3d(-140px,0,0);transform:translate3d(-140px,0,0)}}@media all and (min-width:1100px){html.mm-right.mm-opening .mm-menu.mm-columns-2.mm-opened~.mm-slideout{-webkit-transform:translate(-880px,0);-ms-transform:translate(-880px,0);transform:translate(-880px,0);-webkit-transform:translate3d(-880px,0,0);transform:translate3d(-880px,0,0)}}.mm-columns .mm-panels>.mm-columns-3{-webkit-transform:translate(300%,0);-ms-transform:translate(300%,0);transform:translate(300%,0);-webkit-transform:translate3d(300%,0,0);transform:translate3d(300%,0,0)}.mm-columns-3 .mm-panels>.mm-panel{z-index:3;width:33.34%}.mm-columns-3 .mm-panels>.mm-panel else{width:100%}.mm-columns-3 .mm-panels>.mm-panel:not(.mm-opened):not(.mm-subopened){-webkit-transform:translate(400%,0);-ms-transform:translate(400%,0);transform:translate(400%,0);-webkit-transform:translate3d(400%,0,0);transform:translate3d(400%,0,0)}.mm-menu.mm-offcanvas.mm-columns-3{width:80%;min-width:140px;max-width:1320px}html.mm-opening .mm-menu.mm-columns-3.mm-opened~.mm-slideout{-webkit-transform:translate(80%,0);-ms-transform:translate(80%,0);transform:translate(80%,0);-webkit-transform:translate3d(80%,0,0);transform:translate3d(80%,0,0)}@media all and (max-width:175px){html.mm-opening .mm-menu.mm-columns-3.mm-opened~.mm-slideout{-webkit-transform:translate(140px,0);-ms-transform:translate(140px,0);transform:translate(140px,0);-webkit-transform:translate3d(140px,0,0);transform:translate3d(140px,0,0)}}@media all and (min-width:1650px){html.mm-opening .mm-menu.mm-columns-3.mm-opened~.mm-slideout{-webkit-transform:translate(1320px,0);-ms-transform:translate(1320px,0);transform:translate(1320px,0);-webkit-transform:translate3d(1320px,0,0);transform:translate3d(1320px,0,0)}}html.mm-right.mm-opening .mm-menu.mm-columns-3.mm-opened~.mm-slideout{-webkit-transform:translate(-80%,0);-ms-transform:translate(-80%,0);transform:translate(-80%,0);-webkit-transform:translate3d(-80%,0,0);transform:translate3d(-80%,0,0)}@media all and (max-width:175px){html.mm-right.mm-opening .mm-menu.mm-columns-3.mm-opened~.mm-slideout{-webkit-transform:translate(-140px,0);-ms-transform:translate(-140px,0);transform:translate(-140px,0);-webkit-transform:translate3d(-140px,0,0);transform:translate3d(-140px,0,0)}}@media all and (min-width:1650px){html.mm-right.mm-opening .mm-menu.mm-columns-3.mm-opened~.mm-slideout{-webkit-transform:translate(-1320px,0);-ms-transform:translate(-1320px,0);transform:translate(-1320px,0);-webkit-transform:translate3d(-1320px,0,0);transform:translate3d(-1320px,0,0)}}.mm-columns .mm-panels>.mm-columns-4{-webkit-transform:translate(400%,0);-ms-transform:translate(400%,0);transform:translate(400%,0);-webkit-transform:translate3d(400%,0,0);transform:translate3d(400%,0,0)}.mm-columns-4 .mm-panels>.mm-panel{z-index:4;width:25%}.mm-columns-4 .mm-panels>.mm-panel else{width:100%}.mm-columns-4 .mm-panels>.mm-panel:not(.mm-opened):not(.mm-subopened){-webkit-transform:translate(500%,0);-ms-transform:translate(500%,0);transform:translate(500%,0);-webkit-transform:translate3d(500%,0,0);transform:translate3d(500%,0,0)}.mm-menu.mm-offcanvas.mm-columns-4{width:80%;min-width:140px;max-width:1760px}html.mm-opening .mm-menu.mm-columns-4.mm-opened~.mm-slideout{-webkit-transform:translate(80%,0);-ms-transform:translate(80%,0);transform:translate(80%,0);-webkit-transform:translate3d(80%,0,0);transform:translate3d(80%,0,0)}@media all and (max-width:175px){html.mm-opening .mm-menu.mm-columns-4.mm-opened~.mm-slideout{-webkit-transform:translate(140px,0);-ms-transform:translate(140px,0);transform:translate(140px,0);-webkit-transform:translate3d(140px,0,0);transform:translate3d(140px,0,0)}}@media all and (min-width:2200px){html.mm-opening .mm-menu.mm-columns-4.mm-opened~.mm-slideout{-webkit-transform:translate(1760px,0);-ms-transform:translate(1760px,0);transform:translate(1760px,0);-webkit-transform:translate3d(1760px,0,0);transform:translate3d(1760px,0,0)}}html.mm-right.mm-opening .mm-menu.mm-columns-4.mm-opened~.mm-slideout{-webkit-transform:translate(-80%,0);-ms-transform:translate(-80%,0);transform:translate(-80%,0);-webkit-transform:translate3d(-80%,0,0);transform:translate3d(-80%,0,0)}@media all and (max-width:175px){html.mm-right.mm-opening .mm-menu.mm-columns-4.mm-opened~.mm-slideout{-webkit-transform:translate(-140px,0);-ms-transform:translate(-140px,0);transform:translate(-140px,0);-webkit-transform:translate3d(-140px,0,0);transform:translate3d(-140px,0,0)}}@media all and (min-width:2200px){html.mm-right.mm-opening .mm-menu.mm-columns-4.mm-opened~.mm-slideout{-webkit-transform:translate(-1760px,0);-ms-transform:translate(-1760px,0);transform:translate(-1760px,0);-webkit-transform:translate3d(-1760px,0,0);transform:translate3d(-1760px,0,0)}}.mm-columns.mm-offcanvas.mm-bottom,.mm-columns.mm-offcanvas.mm-top{width:100%;max-width:100%;min-width:100%}html.mm-opening .mm-columns.mm-offcanvas.mm-front,html.mm-opening .mm-columns.mm-offcanvas.mm-next{-webkit-transition-property:width,min-width,max-width,-webkit-transform;transition-property:width,min-width,max-width,-webkit-transform;transition-property:width,min-width,max-width,transform;transition-property:width,min-width,max-width,transform,-webkit-transform} -em.mm-counter{font:inherit;font-size:14px;font-style:normal;text-indent:0;line-height:20px;display:block;margin-top:-10px;position:absolute;right:45px;top:50%}em.mm-counter+a.mm-next{width:90px}em.mm-counter+a.mm-next+a,em.mm-counter+a.mm-next+span{margin-right:90px}em.mm-counter+a.mm-fullsubopen{padding-left:0}em.mm-counter+a.mm-fullsubopen+a,em.mm-counter+a.mm-fullsubopen+span{padding-right:90px}.mm-listview em.mm-counter+.mm-next.mm-fullsubopen+a,.mm-listview em.mm-counter+.mm-next.mm-fullsubopen+span{padding-right:90px}.mm-vertical>.mm-counter{top:12px;margin-top:0}.mm-vertical.mm-spacer>.mm-counter{margin-top:40px}.mm-nosubresults>.mm-counter{display:none}.mm-menu em.mm-counter{color:rgba(0,0,0,.3)} -.mm-divider>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0;line-height:25px}.mm-divider.mm-opened a.mm-next:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.mm-collapsed:not(.mm-uncollapsed){display:none}.mm-fixeddivider{background:inherit;display:none;position:absolute;top:0;left:0;right:0;z-index:10;-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-fixeddivider:after{content:none!important;display:none!important}.mm-hasdividers .mm-fixeddivider{display:block}.mm-menu .mm-fixeddivider span{background:rgba(0,0,0,.05)} -html.mm-opened.mm-dragging .mm-menu,html.mm-opened.mm-dragging .mm-slideout{-webkit-transition-duration:0s;transition-duration:0s} -.mm-menu.mm-dropdown{box-shadow:0 2px 10px rgba(0,0,0,.3);height:80%}html.mm-dropdown .mm-slideout{-webkit-transform:none!important;-ms-transform:none!important;transform:none!important;z-index:0}html.mm-dropdown #mm-blocker{-webkit-transition-delay:0s!important;transition-delay:0s!important;z-index:1}html.mm-dropdown .mm-menu{z-index:2}html.mm-dropdown.mm-opened:not(.mm-opening) .mm-menu.mm-dropdown{display:none}.mm-menu.mm-tip:before{content:'';background:inherit;box-shadow:0 2px 10px rgba(0,0,0,.3);display:block;width:15px;height:15px;position:absolute;z-index:0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.mm-menu.mm-tipleft:before{left:22px}.mm-menu.mm-tipright:before{right:22px}.mm-menu.mm-tiptop:before{top:-8px}.mm-menu.mm-tipbottom:before{bottom:-8px} -.mm-iconpanel .mm-panels>.mm-panel{-webkit-transition-property:left,-webkit-transform;transition-property:left,-webkit-transform;transition-property:transform,left;transition-property:transform,left,-webkit-transform}.mm-iconpanel .mm-panels>.mm-panel.mm-opened,.mm-iconpanel .mm-panels>.mm-panel.mm-subopened{border-left:1px solid;border-color:inherit;display:block!important}.mm-iconpanel .mm-panels>.mm-panel.mm-subopened{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-iconpanel .mm-panel.mm-iconpanel-0{left:0}.mm-iconpanel .mm-panel.mm-iconpanel-1{left:40px}.mm-iconpanel .mm-panel.mm-iconpanel-2{left:80px}.mm-iconpanel .mm-panel.mm-iconpanel-3{left:120px}.mm-iconpanel .mm-panel.mm-iconpanel-4{left:160px}.mm-iconpanel .mm-panel.mm-iconpanel-5{left:200px}.mm-iconpanel .mm-panel.mm-iconpanel-6{left:240px}.mm-subblocker{background:inherit;opacity:0;display:block;max-height:100%;position:absolute;top:0;right:0;left:0;z-index:3;-webkit-transition:opacity .4s ease;transition:opacity .4s ease}.mm-subopened .mm-subblocker{opacity:.6;bottom:-100000px} -.mm-keyboardfocus a:focus{outline:0}.mm-menu.mm-keyboardfocus a:focus{background:rgba(255,255,255,.5)} -.mm-navbars-bottom,.mm-navbars-top{background:inherit;border-color:inherit;border-width:0;overflow:hidden;position:absolute;left:0;right:0;z-index:3}.mm-navbars-bottom>.mm-navbar,.mm-navbars-top>.mm-navbar{border:none;padding:0;position:relative;-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-navbars-top{border-bottom-style:solid;border-bottom-width:1px;top:0}.mm-navbars-bottom{border-top-style:solid;border-top-width:1px;bottom:0}.mm-navbar.mm-hasbtns{padding:0 40px}.mm-navbar[class*=mm-navbar-content-]>*{box-sizing:border-box;display:block;float:left}.mm-navbar .mm-breadcrumbs{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;-webkit-overflow-scrolling:touch;overflow-x:auto;text-align:left;padding:0 0 0 17px}.mm-navbar .mm-breadcrumbs>*{display:inline-block;padding:10px 3px}.mm-navbar .mm-breadcrumbs>a{text-decoration:underline}.mm-navbar.mm-hasbtns .mm-breadcrumbs{margin-left:-40px}.mm-navbar.mm-hasbtns .mm-btn:not(.mm-hidden)+.mm-breadcrumbs{margin-left:0;padding-left:0}.mm-hasnavbar-top-1 .mm-panels{top:40px}.mm-hasnavbar-top-2 .mm-panels{top:80px}.mm-hasnavbar-top-3 .mm-panels{top:120px}.mm-hasnavbar-top-4 .mm-panels{top:160px}.mm-hasnavbar-bottom-1 .mm-panels{bottom:40px}.mm-hasnavbar-bottom-2 .mm-panels{bottom:80px}.mm-hasnavbar-bottom-3 .mm-panels{bottom:120px}.mm-hasnavbar-bottom-4 .mm-panels{bottom:160px}.mm-navbar-size-2{height:80px}.mm-navbar-size-3{height:120px}.mm-navbar-size-4{height:160px}.mm-navbar-content-2>*{width:50%}.mm-navbar-content-3>*{width:33.33%}.mm-navbar-content-4>*{width:25%}.mm-navbar-content-5>*{width:20%}.mm-navbar-content-6>*{width:16.67%} -.mm-menu.mm-rtl{direction:rtl}.mm-menu.mm-rtl.mm-offcanvas{right:auto}.mm-menu.mm-rtl .mm-panel:not(.mm-opened){-webkit-transform:translate(-100%,0);-ms-transform:translate(-100%,0);transform:translate(-100%,0);-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.mm-menu.mm-rtl .mm-panel.mm-subopened{-webkit-transform:translate(30%,0);-ms-transform:translate(30%,0);transform:translate(30%,0);-webkit-transform:translate3d(30%,0,0);transform:translate3d(30%,0,0)}.mm-menu.mm-rtl .mm-navbar .mm-btn:first-child{left:auto;right:0}.mm-menu.mm-rtl .mm-navbar .mm-btn:last-child{right:auto;left:0}.mm-menu.mm-rtl .mm-navbar .mm-next:after{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);left:23px;right:auto}.mm-menu.mm-rtl .mm-navbar .mm-prev:before{-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg);right:23px;left:auto}.mm-menu.mm-rtl .mm-listview>li:not(.mm-divider)::after{left:0;right:20px}.mm-menu.mm-rtl .mm-listview>li>a:not(.mm-next),.mm-menu.mm-rtl .mm-listview>li>span:not(.mm-next){padding-left:10px;padding-right:20px!important;margin-right:0!important}.mm-menu.mm-rtl .mm-listview .mm-next{right:auto;left:0}.mm-menu.mm-rtl .mm-listview .mm-next:before{left:auto;right:0}.mm-menu.mm-rtl .mm-listview .mm-next:after{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);left:23px;right:auto}.mm-menu.mm-rtl .mm-listview .mm-next+a,.mm-menu.mm-rtl .mm-listview .mm-next+span{margin-left:50px}.mm-menu.mm-rtl .mm-listview .mm-next.mm-fullsubopen+a,.mm-menu.mm-rtl .mm-listview .mm-next.mm-fullsubopen+span{padding-left:50px}.mm-menu.mm-rtl em.mm-counter{left:45px;right:auto}.mm-menu.mm-rtl em.mm-counter+a.mm-next+a,.mm-menu.mm-rtl em.mm-counter+a.mm-next+span{margin-left:90px}.mm-menu.mm-rtl .mm-listview em.mm-counter+.mm-fullsubopen+a,.mm-menu.mm-rtl .mm-listview em.mm-counter+.mm-fullsubopen+span{padding-left:90px}.mm-menu.mm-rtl label.mm-check,.mm-menu.mm-rtl label.mm-toggle{left:20px;right:auto!important}.mm-menu.mm-rtl label.mm-toggle+a,.mm-menu.mm-rtl label.mm-toggle+span{padding-left:80px}.mm-menu.mm-rtl label.mm-check+a,.mm-menu.mm-rtl label.mm-check+span{padding-left:60px}.mm-menu.mm-rtl a.mm-next+label.mm-check,.mm-menu.mm-rtl a.mm-next+label.mm-toggle{left:60px}.mm-menu.mm-rtl a.mm-next+label.mm-check+a,.mm-menu.mm-rtl a.mm-next+label.mm-check+span,.mm-menu.mm-rtl a.mm-next+label.mm-toggle+a,.mm-menu.mm-rtl a.mm-next+label.mm-toggle+span{margin-left:50px}.mm-menu.mm-rtl a.mm-next+label.mm-toggle+a,.mm-menu.mm-rtl a.mm-next+label.mm-toggle+span{padding-left:70px}.mm-menu.mm-rtl a.mm-next+label.mm-check+a,.mm-menu.mm-rtl a.mm-next+label.mm-check+span{padding-left:50px}.mm-menu.mm-rtl em.mm-counter+a.mm-next+label.mm-check,.mm-menu.mm-rtl em.mm-counter+a.mm-next+label.mm-toggle{left:100px}.mm-menu.mm-rtl em.mm-counter+a.mm-next+label.mm-check+a,.mm-menu.mm-rtl em.mm-counter+a.mm-next+label.mm-check+span,.mm-menu.mm-rtl em.mm-counter+a.mm-next+label.mm-toggle+a,.mm-menu.mm-rtl em.mm-counter+a.mm-next+label.mm-toggle+span{margin-left:90px}.mm-menu.mm-rtl .mm-panel[class*=mm-iconpanel-]{left:0}.mm-menu.mm-rtl .mm-panel[class*=mm-iconpanel-].mm-subopened{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-menu.mm-rtl.mm-iconpanel .mm-panel{-webkit-transition-property:right,-webkit-transform;transition-property:right,-webkit-transform;transition-property:transform,right;transition-property:transform,right,-webkit-transform}.mm-menu.mm-rtl.mm-iconpanel .mm-panel.mm-iconpanel-0{right:0}.mm-menu.mm-rtl.mm-iconpanel .mm-panel.mm-iconpanel-1{right:40px}.mm-menu.mm-rtl.mm-iconpanel .mm-panel.mm-iconpanel-2{right:80px}.mm-menu.mm-rtl.mm-iconpanel .mm-panel.mm-iconpanel-3{right:120px}.mm-menu.mm-rtl.mm-iconpanel .mm-panel.mm-iconpanel-4{right:160px}.mm-menu.mm-rtl.mm-iconpanel .mm-panel.mm-iconpanel-5{right:200px}.mm-menu.mm-rtl.mm-iconpanel .mm-panel.mm-iconpanel-6{right:240px}.mm-menu.mm-rtl.mm-iconpanel .mm-panel.mm-opened{border-left:none;border-right:1px solid;border-color:inherit} -.mm-search,.mm-search input{box-sizing:border-box}.mm-search{height:40px;padding:7px 10px 0 10px;position:relative}.mm-search input{border:none!important;outline:0!important;box-shadow:none!important;border-radius:4px;font:inherit;font-size:14px;line-height:26px;display:block;box-sizing:border-box;width:100%;height:26px;min-height:26px;max-height:26px;margin:0;padding:0 10px}.mm-search input::-ms-clear{display:none}.mm-search .mm-clear,.mm-search .mm-next{right:0}.mm-panel>.mm-search{width:100%;position:absolute;top:0;left:0}.mm-panel.mm-hassearch{padding-top:40px}.mm-panel.mm-hassearch.mm-hasnavbar{padding-top:80px}.mm-panel.mm-hassearch.mm-hasnavbar>.mm-search{top:40px}.mm-noresultsmsg{text-align:center;font-size:21px;padding:40px 0}.mm-noresults .mm-indexer{display:none!important}li.mm-nosubresults>a.mm-next{display:none}li.mm-nosubresults>a.mm-next+a,li.mm-nosubresults>a.mm-next+span{padding-right:10px}.mm-menu .mm-search input{background:rgba(0,0,0,.05);color:rgba(0,0,0,.75)}.mm-menu .mm-noresultsmsg{color:rgba(0,0,0,.3)} -.mm-indexer{background:inherit;text-align:center;font-size:12px;box-sizing:border-box;width:20px;position:absolute;top:0;bottom:0;right:-100px;z-index:15;-webkit-transition:right .4s ease;transition:right .4s ease;-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.mm-indexer a{text-decoration:none;display:block;height:3.85%}.mm-indexer~.mm-panel.mm-hasindexer{padding-right:40px}.mm-hasindexer .mm-indexer{right:0}.mm-hasindexer .mm-fixeddivider{right:20px}.mm-menu .mm-indexer a{color:rgba(0,0,0,.3)} -.mm-menu.mm-hoverselected .mm-listview>li>a.mm-fullsubopen+a,.mm-menu.mm-hoverselected .mm-listview>li>a.mm-fullsubopen+span,.mm-menu.mm-hoverselected .mm-listview>li>a:not(.mm-fullsubopen),.mm-menu.mm-parentselected .mm-listview>li>a.mm-fullsubopen+a,.mm-menu.mm-parentselected .mm-listview>li>a.mm-fullsubopen+span,.mm-menu.mm-parentselected .mm-listview>li>a:not(.mm-fullsubopen){-webkit-transition:background .4s ease;transition:background .4s ease}.mm-menu.mm-hoverselected .mm-listview>li>a.mm-fullsubopen:hover+span,.mm-menu.mm-hoverselected .mm-listview>li>a:not(.mm-fullsubopen):hover{background:rgba(255,255,255,.5)}.mm-menu.mm-parentselected .mm-listview>li>a.mm-selected.mm-fullsubopen+a,.mm-menu.mm-parentselected .mm-listview>li>a.mm-selected.mm-fullsubopen+span,.mm-menu.mm-parentselected .mm-listview>li>a.mm-selected:not(.mm-fullsubopen){background:rgba(255,255,255,.5)} -input.mm-check,input.mm-toggle{position:absolute;left:-10000px}label.mm-check,label.mm-toggle{margin:0;position:absolute;top:50%;z-index:2}label.mm-check:before,label.mm-toggle:before{content:'';display:block}label.mm-toggle{border-radius:30px;width:50px;height:30px;margin-top:-15px}label.mm-toggle:before{border-radius:30px;width:28px;height:28px;margin:1px}input.mm-toggle:checked~label.mm-toggle:before{float:right}label.mm-check{width:30px;height:30px;margin-top:-15px}label.mm-check:before{border-left:3px solid;border-bottom:3px solid;width:40%;height:20%;margin:25% 0 0 20%;opacity:.1;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}input.mm-check:checked~label.mm-check:before{opacity:1}li.mm-vertical label.mm-check,li.mm-vertical label.mm-toggle{bottom:auto;margin-top:0}li.mm-vertical label.mm-toggle{top:5px}li.mm-vertical label.mm-check{top:5px}label.mm-check,label.mm-toggle{right:20px}label.mm-toggle+a,label.mm-toggle+span{padding-right:80px}label.mm-check+a,label.mm-check+span{padding-right:60px}a.mm-next+label.mm-check,a.mm-next+label.mm-toggle{right:60px}a.mm-next+label.mm-check+a,a.mm-next+label.mm-check+span,a.mm-next+label.mm-toggle+a,a.mm-next+label.mm-toggle+span{margin-right:50px}a.mm-next+label.mm-toggle+a,a.mm-next+label.mm-toggle+span{padding-right:70px}a.mm-next+label.mm-check+a,a.mm-next+label.mm-check+span{padding-right:50px}em.mm-counter+a.mm-next+label.mm-check,em.mm-counter+a.mm-next+label.mm-toggle{right:100px}em.mm-counter+a.mm-next+label.mm-check+a,em.mm-counter+a.mm-next+label.mm-check+span,em.mm-counter+a.mm-next+label.mm-toggle+a,em.mm-counter+a.mm-next+label.mm-toggle+span{margin-right:90px}.mm-menu label.mm-toggle{background:rgba(0,0,0,.1)}.mm-menu label.mm-toggle:before{background:#f3f3f3}.mm-menu input.mm-toggle:checked~label.mm-toggle{background:#4bd963}.mm-menu label.mm-check:before{border-color:rgba(0,0,0,.75)} \ No newline at end of file diff --git a/doc/slihelp_generator/assets/css/jss-style.min.css b/doc/slihelp_generator/assets/css/jss-style.min.css deleted file mode 100755 index ed6b03b894..0000000000 --- a/doc/slihelp_generator/assets/css/jss-style.min.css +++ /dev/null @@ -1 +0,0 @@ -a#scroll-to-top{background:url(../images/arrow.png) no-repeat center center;width:35px;height:35px;position:fixed;right:30px;bottom:30px;text-indent:-9999px;font-size:0;cursor:pointer;outline:0}body.rtl a#scroll-to-top{left:30px}@media only screen and (max-width:480px){a#scroll-to-top{right:0;bottom:0}body.rtl a#scroll-to-top{left:0;bottom:0}} \ No newline at end of file diff --git a/doc/slihelp_generator/assets/css/moeppel1.png b/doc/slihelp_generator/assets/css/moeppel1.png deleted file mode 100644 index 004616bc2cb5485e686dea47072b6aba4ac6a3d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^5Bn64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1T!dAc}; zXiVHX*|3W#P{1YLTuDv)*t2^Hh6Nww9c`K>nhUgcvL2L{sBGGMxaSPZBi=K;spf*s z?|8$)1m-?iJ+&0`p?wi6)+t zT(>w(OSKKXdq?rVxZ&oyH|krvb^A{+ZmG0cBUxYP%31LBkK(!Be!fE{ZVO(0n!bQ7 zr!nzr(BChck9Tf9ac0^os|89=-iK8m$r2ac)F$91=*hU-T~FzyaqNV0@wejDZSHQD TZu~X@`iQ~P)z4*}Q$iB}F2;KM diff --git a/doc/slihelp_generator/assets/css/moeppel2.png b/doc/slihelp_generator/assets/css/moeppel2.png deleted file mode 100644 index 3338959b90fc3b0fb74523222a994ebf0e1a9cb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 528 zcmV+r0`L8aP)gPjc4t@;-bY z=bTr}41hR}SDbTiMdTTPnO&;thcFCJ_>U4Zqup-r0q+2r=o?Tkm&<$JfM&C~s;Xb7 znE!@2=hiBf%CQe1P}Q9ja{zhNzuu?%{KyLcEN6*^^M$7%RUd!?!%UG&e7u3t3r>NB zRMGHf4>I-Sm9 zk|b|LWEsHBxw!!Z2f4QRDm zMG-k8WlYWNh3_N4;zd4|~VbI_f0eS<5bKl^zQ&Wf0^tk SiBO9G0000f7l3aIARavDtL|h5gJA{78v*13Tn;$? zB>erhWAVOnb*I`B+|+@$g5y&Gi~`{AY+o4+hAi~}ege-e$MW=Vl@62_+|)tCU@$EJ zk0CDTAcMhBg2O(T3{PNr+8&#`Z3^xK17`#LA^<)v?jD1|kf#yg9>WLe?@D)A3vTLw z#o+KrbM=hDVAz4j5-i_8$MP+M=z!D#^O(>w7#;?PN02&Tp6IPVN8Hr@6TxxoAr)o@ zgW(C7!1Fg_`GM~ML2&1E4nSSRNdWEL+&Kn=Ax{66Iuqt(`nx% ztKj$-V8EsR*#HvU+$jcwVV_G#IFRUzya7W2o(V0(d4}8sbQ=ipJaFPSAZ?4gd*qEI zAaB4>UzqqQ?(PZ03%KtkVDJR<_OMAn*8#w%ueh&I-inEzVgNAM-Th#+a60xD3$4I4 ze*u!ZH-CS;pTPzIZQR`pMhoYv5eoaRX}*43IkaJd%W$5^SowXeS~p)mt{mDJ0ED`` z7mOB8XryEN7>*LkyrdY;!*TNa4D1$j1?;La7%dPcxC}-Mgb6O=3Pxdy@8K}PWn4K} z%BjHs`1#4~bdrD|{o0bD`IEi1Y7NA90OC{Vm5>5NwE?Qjfyz>#v;fFR2afFl%8Q%5 zduZDU=sp-o>Z_A2M`?(RFnW&CxC6A0VmRQ|0W!t+FwI20R#pE*G>gG_alJ| zi-hdcYVUWz+QsyLOj}^u6F~2g>OP0(fy{JZ{rkY#BbvIXnb<^N?A<`0kw8R@`tur% zz{!Kap`XYvw@OulKF8rW@&&&3HlWY7fI(wsq5N!M|2E*jHlW}laN}QrKBIuj65yA$ zK>82L=O_0BMop#b6&VNkHsuZs4kID3g|Qx}cHrS=tOrUi1DCUaAHN2&GPJj0NmLtP z)~i6rKDPH4=K(9`17{AYZ&MK3u`__b{M~##Ea7?J=l=pfpn7a~4xk~xa z%2MEk+kpxVGris;frl5`KW^<};D^=f+qHu>!JY9eFya>VtzS4!2KeZB2f8L9=QOZ* z4p5r!d|Mm`jJq4S`R{;_&Z~vmDq!OW!1gcnY0uY>1ZLD!fOD}*qPz&0H;G0&OTr?7 zH#h5lt+dck4?Hyp|O2z}ywiFZ{!!fk)p3Zkgkn8!<41Zj#hDfPi4<+q-KXaNRW5 z3oSs`CbpgR`-xrME3^R3*4jH5u%LE%2G9~j)pzA-1XsJX^7W&om`-TB8}y#4Y9%It zrnZg})dqNWH7TE5P5&{#6U!W59so2_44bT9pVZLGhTm~*b@TQ?4oB`kj?)&Q9Pz?s9q?)BI+PnO@HO+F@&bgg_qQQ=Hv&}Pk&DR4*c>hX|knC8iCMOG=&{8 zg#^SNcRmedqya^_>iPi4n=J&&3W4;kK-y;D!U_4~!lQw%{mI;=X3AJDGqPr+0rMx* z5+FJrh-hs#0d*fNZ)qsb12Xs9|6D18ExI6w?wN)+s=cv072`RvHU)rChoz>Iz`xKeY)h#{v5`0b4({J$n@R z{YNqpDuq94#Pxz(lnX3)K>f5ub$Cl6_Z;x@baH~o&oT>Ic@aH)Uz`RU z{uP>hmW4LHeFs?h0C~~XHEH0D4dlo0(euEvxwNge7PSgoYn&_2BcUzQD6|6k+45_> zHc9r+?>Aa`e?FufHPBc(LGW zh^uW*v^cAn8iDuzK@JG6AUK?yQ=a))TO2aO?Rc-?x_Xh}DE@)+LFcxpDkB@@(#OfG zM@N&wpTwt7vq5s zACNt>&O@Ss7_xY;;8v8ly9chJFh?Au@9R$ruf(n-$nClSaY>E^14PFIH{1)XU#eSo zTMQiMn%Rtt@Ls_!FQPS~+-Ou)1{_dfmT?7*jp~kzh#^~}l7qdmp3FSbK!c#rCXI3; z`D^zarY^`}>bT4my%r zX7G)`9dpG|LSc~o%%;v2qHuCX|EYDBRA|YTJai0v=gx4oCMt1{SzJ-Hc4Hb-slA2HkA)ZuBksWpHru7oboUwV$cZ>x?^2HVUGP!!ckL! z*^4MkhTi!3)02Ggjg%NbP1cNr6#0FrZ;${xi+><#k>${uW2&l5eqT&m=fc?xK0xmg zG^+i3E7_bEYzHR(O??{!#;QMd(2eSTCmukDp6Ww21A-}_LnoYDKKl4l!28V)DGToD-?g=S{unUm2HX3>B7u>&%I9mA zBe5&RFb^6}`MfPL_)yh=vO?h3b@toRlB6v#n3PLOA*BLp5=cmo*C_%^yWn>0P2M&g zdf8tO44p`?>I&eY7aIYb#y=51kY0G2&Tb!Z&H;6tOV9?tjyLCPbu(Sc=!CH{dl$~q#n zya`zKoc8oJ#(HgOi8zh~))}D%Y(J!Jp=C*N?g&s; zs-d$?_C_V8j9QeYS5@VdqQ;rPem%%Nt9)aWxY6<9+r^Y0$q~MIUA-Xb0dF!Flv9Kw zJE|Io5@Q4K`RnTYP*FnHObz=s(UMLlvr{=XG6=~eWo31ly6cfm#Al^GQ4>JA!> zRJ=-wf}G~*ilrPtESOn<8p21wTh*6`-my_ zHNsk{tD&Ut$M#b8z(Nfp>A0C>uorIrno62#b-7x7Vt0F#6;gGDA3o8)Hc)&DaPJHH zIE>WQkRwgn7P^)uC;W*83_i513J9XICTiETa##i^ghi19OF@o#S>}QO2FDVjhlG=z zEuu9L8UfkIl&O){0c8cGfm2HUCgAH&KX|KHvH{9Ixp^}Dmln_{>r6i2ut=)N&}|T{ z!L>e=8jUp4Tsi~foFS#f=|7yy@)y&V4E#J#_FrL|7uTLj!1Noft(X-+!g}TqJp_*I z(nkp7;5fRTqo$HJSz3!%j=E~nzMefy*()>mJ1~&xG#G)x=(P2O(L7Mz(>!wY{BhwEk&vctY69m zm*FAAr;sxSKqVsGCG>g`7DY92Zor_qS(To zk8Yz;e12pc@ZE>NBa48}7U^!nqJSPl=*Rl(6;iH9iB3@Ni@lg(fU4Hp$~xJu3m{Dr z5~PrwvVAw@zNBro-xtmR-2bxJye8^T7fQ#oxVG8F;ql@Zm#ckJA zDo4)LNsf0UT50lwVxg_6B$L*G?dI#kaTMy=ZJ_NoYMVY^8XeY9Z~c906*6E-zrUJj zGlAbWiGvrex<)<Ysx<#7aFMUz!zJ3T^gD()$0p&YZ3`JQ{d>nexNNLA+zc zy>te6Y?OIBEQ)gQYQb1Pk|a7_ybjOL zri2IrArazKzcrPlW8f|BpYkGLjfKu6xrgpbIqw*8UBQkot+N)K{zIGeQ@`U zUYf6*46Uw)QUM7;@{w`0e2|;My8HVa`h{%zLZ;H5LrIrlxwINEPTbGk>&5p$_rc<6 zbhb<= zCLD8@SZKF@PU&?8I0JCYBkJ38_xBOlvyo~z0kjP0Gm@snmS(Tg0^sN_>vN?JFgd4y z51+L@&c!gTa*LvwZ+uIW2LSvbiR6iGr(Bp#id1mbl(TdNzik%V=6ek%M-odb!QPFw zlh#RfA8nFd(nWi)5!aKE)}_(2NVFQH>$$K<@%H$8tBmnbEYCMOC2X3vP4*5F9Fg zPg+dM#}`QKB7V>>0W$u?x zVBb&&tXT;B&BCeX{#U5Fg5W}#)SYw#F&4l5JF{)K=O8UV$l$@Z9SapJ&I9I6G;jas zM{)Ux*~6^0$bGIA2P5qL4*2*5^Y)^jNSL&;XCrwYK0eVo}{bmenEzN9*0KoET&VYHHC(@J3d`{wPi zNZ{WZJjN_pzm!VTNb&In-rQ_^)L${*em$Uv|6?8SV63OUUs3rKTU3?;?>w-n=Q ul { - display: none; -} -.main-navigation ul.nav-menu.toggled-on, -.menu-toggle { - display: inline-block; -} - -/* Banner */ -section[role="banner"] { - margin-bottom: 48px; - margin-bottom: 3.428571429rem; -} - -/* Sidebar */ -.widget-area .widget { - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; - margin-bottom: 48px; - margin-bottom: 3.428571429rem; - word-wrap: break-word; -} -.widget-area .widget h3 { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -.widget-area .widget p, -.widget-area .widget li, -.widget-area .widget .textwidget { - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; -} -.widget-area .widget p { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -.widget-area .textwidget ul { - list-style: disc outside; - margin: 0 0 24px; - margin: 0 0 1.714285714rem; -} -.widget-area .textwidget li { - margin-left: 36px; - margin-left: 2.571428571rem; -} -.widget-area .widget a { - color: #757575; -} -.widget-area .widget a:hover { - color: #21759b; -} -.widget-area .widget a:visited { - color: #9f9f9f; -} -.widget-area #s { - width: 53.66666666666%; /* define a width to avoid dropping a wider submit button */ -} - -/* Footer */ -footer[role="contentinfo"] { - border-top: 1px solid #ededed; - clear: both; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 2; - max-width: 960px; - max-width: 68.571428571rem; - margin-top: 24px; - margin-top: 1.714285714rem; - margin-left: auto; - margin-right: auto; - padding: 24px 0; - padding: 1.714285714rem 0; -} -footer[role="contentinfo"] a { - color: #686868; -} -footer[role="contentinfo"] a:hover { - color: #21759b; -} - - -/* =Main content and comment content --------------------------------------------------------------- */ - -.entry-meta { - clear: both; -} -.entry-header { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -.entry-header img.wp-post-image { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -.entry-header .entry-title { - font-size: 20px; - font-size: 1.428571429rem; - line-height: 1.2; - font-weight: normal; -} -.entry-header .entry-title a { - text-decoration: none; -} -.entry-header .entry-format { - margin-top: 24px; - margin-top: 1.714285714rem; - font-weight: normal; -} -.entry-header .comments-link { - margin-top: 24px; - margin-top: 1.714285714rem; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; - color: #757575; -} -.comments-link a, -.entry-meta a { - color: #757575; -} -.comments-link a:hover, -.entry-meta a:hover { - color: #21759b; -} -article.sticky .featured-post { - border-top: 4px double #ededed; - border-bottom: 4px double #ededed; - color: #757575; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 3.692307692; - margin-bottom: 24px; - margin-bottom: 1.714285714rem; - text-align: center; -} -.entry-content, -.entry-summary, -.mu_register { - line-height: 1.714285714; -} -.entry-content h1, -.comment-content h1, -.entry-content h2, -.comment-content h2, -.entry-content h3, -.comment-content h3, -.entry-content h4, -.comment-content h4, -.entry-content h5, -.comment-content h5, -.entry-content h6, -.comment-content h6 { - margin: 24px 0; - margin: 1.714285714rem 0; - line-height: 1.714285714; -} -.entry-content h1, -.comment-content h1 { - font-size: 21px; - font-size: 2.5rem; - line-height: 1.2; -} -.entry-content h2, -.comment-content h2, -.mu_register h2 { - font-size: 18px; - font-size: 1.285714286rem; - line-height: 1.6; -} -.entry-content h3, -.comment-content h3 { - font-size: 16px; - font-size: 1.142857143rem; - line-height: 1.846153846; -} -.entry-content h4, -.comment-content h4 { - font-size: 14px; - font-size: 1rem; - line-height: 1.846153846; -} -.entry-content h5, -.comment-content h5 { - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; -} -.entry-content h6, -.comment-content h6 { - font-size: 12px; - font-size: 0.857142857rem; - line-height: 1.846153846; -} -.entry-content p, -.entry-summary p, -.comment-content p, -.mu_register p { - margin: 0 0 24px; - margin: 0 0 1.714285714rem; - line-height: 1.714285714; -} -.entry-content a:visited, -.comment-content a:visited { - color: #9f9f9f; -} -.entry-content .more-link { - white-space: nowrap; -} -.entry-content ol, -.comment-content ol, -.entry-content ul, -.comment-content ul, -.mu_register ul { - margin: 0 0 24px; - margin: 0 0 1.714285714rem; - line-height: 1.714285714; -} -.entry-content ul ul, -.comment-content ul ul, -.entry-content ol ol, -.comment-content ol ol, -.entry-content ul ol, -.comment-content ul ol, -.entry-content ol ul, -.comment-content ol ul { - margin-bottom: 0; -} -.entry-content ul, -.comment-content ul, -.mu_register ul { - list-style: disc outside; -} -.entry-content ol, -.comment-content ol { - list-style: decimal outside; -} -.entry-content li, -.comment-content li, -.mu_register li { - margin: 0 0 0 36px; - margin: 0 0 0 2.571428571rem; -} -.entry-content blockquote, -.comment-content blockquote { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; - padding: 24px; - padding: 1.714285714rem; - font-style: italic; -} -.entry-content blockquote p:last-child, -.comment-content blockquote p:last-child { - margin-bottom: 0; -} -.entry-content code, -.comment-content code { - font-family: Consolas, Monaco, Lucida Console, monospace; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 2; -} -.entry-content pre, -.comment-content pre { - border: 1px solid #ededed; - color: #666; - font-family: Consolas, Monaco, Lucida Console, monospace; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 1.714285714; - margin: 24px 0; - margin: 1.714285714rem 0; - overflow: auto; - padding: 24px; - padding: 1.714285714rem; -} -.entry-content pre code, -.comment-content pre code { - display: block; -} -.entry-content abbr, -.comment-content abbr, -.entry-content dfn, -.comment-content dfn, -.entry-content acronym, -.comment-content acronym { - border-bottom: 1px dotted #666; - cursor: help; -} -.entry-content address, -.comment-content address { - display: block; - line-height: 1.714285714; - margin: 0 0 24px; - margin: 0 0 1.714285714rem; -} -img.alignleft, -.wp-caption.alignleft { - margin: 12px 24px 12px 0; - margin: 0.857142857rem 1.714285714rem 0.857142857rem 0; -} -img.alignright, -.wp-caption.alignright { - margin: 12px 0 12px 24px; - margin: 0.857142857rem 0 0.857142857rem 1.714285714rem; -} -img.aligncenter, -.wp-caption.aligncenter { - clear: both; - margin-top: 12px; - margin-top: 0.857142857rem; - margin-bottom: 12px; - margin-bottom: 0.857142857rem; -} -.entry-content embed, -.entry-content iframe, -.entry-content object, -.entry-content video { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -.entry-content dl, -.comment-content dl { - margin: 0 24px; - margin: 0 1.714285714rem; -} -.entry-content dt, -.comment-content dt { - font-weight: bold; - line-height: 1.714285714; -} -.entry-content dd, -.comment-content dd { - line-height: 1.714285714; - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -.entry-content table, -.comment-content table { - border-bottom: 1px solid #ededed; - color: #757575; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 2; - margin: 0 0 24px; - margin: 0 0 1.714285714rem; - width: 100%; -} -.entry-content table caption, -.comment-content table caption { - font-size: 16px; - font-size: 1.142857143rem; - margin: 24px 0; - margin: 1.714285714rem 0; -} -.entry-content td, -.comment-content td { - border-top: 1px solid #ededed; - padding: 6px 10px 6px 0; -} -.site-content article { - border-bottom: 4px double #ededed; - margin-bottom: 72px; - margin-bottom: 5.142857143rem; - padding-bottom: 24px; - padding-bottom: 1.714285714rem; - word-wrap: break-word; - -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; -} -.page-links { - clear: both; - line-height: 1.714285714; -} -footer.entry-meta { - margin-top: 24px; - margin-top: 1.714285714rem; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; - color: #757575; -} -.single-author .entry-meta .by-author { - display: none; -} -.mu_register h2 { - color: #757575; - font-weight: normal; -} - - -/* =Archives --------------------------------------------------------------- */ - -.archive-header, -.page-header { - margin-bottom: 48px; - margin-bottom: 3.428571429rem; - padding-bottom: 22px; - padding-bottom: 1.571428571rem; - border-bottom: 1px solid #ededed; -} -.archive-meta { - color: #757575; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 2; - margin-top: 22px; - margin-top: 1.571428571rem; -} - -/* =Single audio/video attachment view --------------------------------------------------------------- */ - -.attachment .entry-content .mejs-audio { - max-width: 400px; -} - -.attachment .entry-content .mejs-container { - margin-bottom: 24px; -} - - -/* =Single image attachment view --------------------------------------------------------------- */ - -.article.attachment { - overflow: hidden; -} -.image-attachment div.attachment { - text-align: center; -} -.image-attachment div.attachment p { - text-align: center; -} -.image-attachment div.attachment img { - display: block; - height: auto; - margin: 0 auto; - max-width: 100%; -} -.image-attachment .entry-caption { - margin-top: 8px; - margin-top: 0.571428571rem; -} - - -/* =Aside post format --------------------------------------------------------------- */ - -article.format-aside h1 { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -article.format-aside h1 a { - text-decoration: none; - color: #4d525a; -} -article.format-aside h1 a:hover { - color: #2e3542; -} -article.format-aside .aside { - padding: 24px 24px 0; - padding: 1.714285714rem; - background: #d2e0f9; - border-left: 22px solid #a8bfe8; -} -article.format-aside p { - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; - color: #4a5466; -} -article.format-aside blockquote:last-child, -article.format-aside p:last-child { - margin-bottom: 0; -} - - -/* =Post formats --------------------------------------------------------------- */ - -/* Image posts */ -article.format-image footer h1 { - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; - font-weight: normal; -} -article.format-image footer h2 { - font-size: 11px; - font-size: 0.785714286rem; - line-height: 2.181818182; -} -article.format-image footer a h2 { - font-weight: normal; -} - -/* Link posts */ -article.format-link header { - padding: 0 10px; - padding: 0 0.714285714rem; - float: right; - font-size: 11px; - font-size: 0.785714286rem; - line-height: 2.181818182; - font-weight: bold; - font-style: italic; - text-transform: uppercase; - color: #848484; - background-color: #ebebeb; - border-radius: 3px; -} -article.format-link .entry-content { - max-width: 80%; - float: left; -} -article.format-link .entry-content a { - font-size: 22px; - font-size: 1.571428571rem; - line-height: 1.090909091; - text-decoration: none; -} - -/* Quote posts */ -article.format-quote .entry-content p { - margin: 0; - padding-bottom: 24px; - padding-bottom: 1.714285714rem; -} -article.format-quote .entry-content blockquote { - display: block; - padding: 24px 24px 0; - padding: 1.714285714rem 1.714285714rem 0; - font-size: 15px; - font-size: 1.071428571rem; - line-height: 1.6; - font-style: normal; - color: #6a6a6a; - background: #efefef; -} - -/* Status posts */ -.format-status .entry-header { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -.format-status .entry-header header { - display: inline-block; -} -.format-status .entry-header h1 { - font-size: 15px; - font-size: 1.071428571rem; - font-weight: normal; - line-height: 1.6; - margin: 0; -} -.format-status .entry-header h2 { - font-size: 12px; - font-size: 0.857142857rem; - font-weight: normal; - line-height: 2; - margin: 0; -} -.format-status .entry-header header a { - color: #757575; -} -.format-status .entry-header header a:hover { - color: #21759b; -} -.format-status .entry-header img { - float: left; - margin-right: 21px; - margin-right: 1.5rem; -} - - -/* =Comments --------------------------------------------------------------- */ - -.comments-title { - margin-bottom: 48px; - margin-bottom: 3.428571429rem; - font-size: 16px; - font-size: 1.142857143rem; - line-height: 1.5; - font-weight: normal; -} -.comments-area article { - margin: 24px 0; - margin: 1.714285714rem 0; -} -.comments-area article header { - margin: 0 0 48px; - margin: 0 0 3.428571429rem; - overflow: hidden; - position: relative; -} -.comments-area article header img { - float: left; - padding: 0; - line-height: 0; -} -.comments-area article header cite, -.comments-area article header time { - display: block; - margin-left: 85px; - margin-left: 6.071428571rem; -} -.comments-area article header cite { - font-style: normal; - font-size: 15px; - font-size: 1.071428571rem; - line-height: 1.42857143; -} -.comments-area cite b { - font-weight: normal; -} -.comments-area article header time { - line-height: 1.714285714; - text-decoration: none; - font-size: 12px; - font-size: 0.857142857rem; - color: #5e5e5e; -} -.comments-area article header a { - text-decoration: none; - color: #5e5e5e; -} -.comments-area article header a:hover { - color: #21759b; -} -.comments-area article header cite a { - color: #444; -} -.comments-area article header cite a:hover { - text-decoration: underline; -} -.comments-area article header h4 { - position: absolute; - top: 0; - right: 0; - padding: 6px 12px; - padding: 0.428571429rem 0.857142857rem; - font-size: 12px; - font-size: 0.857142857rem; - font-weight: normal; - color: #fff; - background-color: #0088d0; - background-repeat: repeat-x; - background-image: -moz-linear-gradient(top, #009cee, #0088d0); - background-image: -ms-linear-gradient(top, #009cee, #0088d0); - background-image: -webkit-linear-gradient(top, #009cee, #0088d0); - background-image: -o-linear-gradient(top, #009cee, #0088d0); - background-image: linear-gradient(top, #009cee, #0088d0); - border-radius: 3px; - border: 1px solid #007cbd; -} -.comments-area .bypostauthor cite span { - position: absolute; - margin-left: 5px; - margin-left: 0.357142857rem; - padding: 2px 5px; - padding: 0.142857143rem 0.357142857rem; - font-size: 10px; - font-size: 0.714285714rem; -} -.comments-area .bypostauthor cite b { - font-weight: bold; -} -a.comment-reply-link, -a.comment-edit-link { - color: #686868; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; -} -a.comment-reply-link:hover, -a.comment-edit-link:hover { - color: #21759b; -} -.commentlist .pingback { - line-height: 1.714285714; - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} - -/* Comment form */ -#respond { - margin-top: 48px; - margin-top: 3.428571429rem; -} -#respond h3#reply-title { - font-size: 16px; - font-size: 1.142857143rem; - line-height: 1.5; -} -#respond h3#reply-title #cancel-comment-reply-link { - margin-left: 10px; - margin-left: 0.714285714rem; - font-weight: normal; - font-size: 12px; - font-size: 0.857142857rem; -} -#respond form { - margin: 24px 0; - margin: 1.714285714rem 0; -} -#respond form p { - margin: 11px 0; - margin: 0.785714286rem 0; -} -#respond form p.logged-in-as { - margin-bottom: 24px; - margin-bottom: 1.714285714rem; -} -#respond form label { - display: block; - line-height: 1.714285714; -} -#respond form input[type="text"], -#respond form textarea { - -moz-box-sizing: border-box; - box-sizing: border-box; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 1.714285714; - padding: 10px; - padding: 0.714285714rem; - width: 100%; -} -#respond form p.form-allowed-tags { - margin: 0; - font-size: 12px; - font-size: 0.857142857rem; - line-height: 2; - color: #5e5e5e; -} -.required { - color: red; -} - - -/* =Front page template --------------------------------------------------------------- */ - -.entry-page-image { - margin-bottom: 14px; - margin-bottom: 1rem; -} -.template-front-page .site-content article { - border: 0; - margin-bottom: 0; -} -.template-front-page .widget-area { - clear: both; - float: none; - width: auto; - padding-top: 24px; - padding-top: 1.714285714rem; - border-top: 1px solid #ededed; -} -.template-front-page .widget-area .widget li { - margin: 8px 0 0; - margin: 0.571428571rem 0 0; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.714285714; - list-style-type: square; - list-style-position: inside; -} -.template-front-page .widget-area .widget li a { - color: #757575; -} -.template-front-page .widget-area .widget li a:hover { - color: #21759b; -} -.template-front-page .widget-area .widget_text img { - float: left; - margin: 8px 24px 8px 0; - margin: 0.571428571rem 1.714285714rem 0.571428571rem 0; -} - - -/* =Widgets --------------------------------------------------------------- */ - -.widget-area .widget ul ul { - margin-left: 12px; - margin-left: 0.857142857rem; -} -.widget_rss li { - margin: 12px 0; - margin: 0.857142857rem 0; -} -.widget_recent_entries .post-date, -.widget_rss .rss-date { - color: #aaa; - font-size: 11px; - font-size: 0.785714286rem; - margin-left: 12px; - margin-left: 0.857142857rem; -} -#wp-calendar { - margin: 0; - width: 100%; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; - color: #686868; -} -#wp-calendar th, -#wp-calendar td, -#wp-calendar caption { - text-align: left; -} -#wp-calendar #next { - padding-right: 24px; - padding-right: 1.714285714rem; - text-align: right; -} -.widget_search label { - display: block; - font-size: 13px; - font-size: 0.928571429rem; - line-height: 1.846153846; -} -.widget_twitter li { - list-style-type: none; -} -.widget_twitter .timesince { - display: block; - text-align: right; -} - - -/* =Plugins ------------------------------------------------ */ - -img#wpstats { - display: block; - margin: 0 auto 24px; - margin: 0 auto 1.714285714rem; -} - - -/* =Media queries --------------------------------------------------------------- */ - -/* Does the same thing as , - * but in the future W3C standard way. -ms- prefix is required for IE10+ to - * render responsive styling in Windows 8 "snapped" views; IE10+ does not honor - * the meta tag. See https://core.trac.wordpress.org/ticket/25888. - */ -@-ms-viewport { - width: device-width; -} -@viewport { - width: device-width; -} - -/* Minimum width of 600 pixels. */ -@media screen and (min-width: 600px) { - .author-avatar { - float: left; - margin-top: 8px; - margin-top: 0.571428571rem; - } - .author-description { - float: right; - width: 80%; - } - .site { - margin: 0 auto; - max-width: 960px; - max-width: 68.571428571rem; - overflow: hidden; - } - .site-content { - float: left; - width: 65.104166667%; - } - body.template-front-page .site-content, - body.attachment .site-content, - body.full-width .site-content { - width: 100%; - } - .widget-area { - float: right; - width: 26.041666667%; - } - .site-header h1, - .site-header h2 { - text-align: left; - } - .site-header h1 { - font-size: 26px; - font-size: 1.857142857rem; - line-height: 1.846153846; - margin-bottom: 0; - } - .main-navigation ul.nav-menu, - .main-navigation div.nav-menu > ul { - border-bottom: 1px solid #ededed; - border-top: 1px solid #ededed; - display: inline-block !important; - text-align: left; - width: 100%; - } - .main-navigation ul { - margin: 0; - text-indent: 0; - } - .main-navigation li a, - .main-navigation li { - display: inline-block; - text-decoration: none; - } - .main-navigation li a { - border-bottom: 0; - color: #6a6a6a; - line-height: 3.692307692; - text-transform: uppercase; - white-space: nowrap; - } - .main-navigation li a:hover, - .main-navigation li a:focus { - color: #000; - } - .main-navigation li { - margin: 0 40px 0 0; - margin: 0 2.857142857rem 0 0; - position: relative; - } - .main-navigation li ul { - margin: 0; - padding: 0; - position: absolute; - top: 100%; - z-index: 1; - height: 1px; - width: 1px; - overflow: hidden; - clip: rect(1px, 1px, 1px, 1px); - } - .main-navigation li ul ul { - top: 0; - left: 100%; - } - .main-navigation ul li:hover > ul, - .main-navigation ul li:focus > ul, - .main-navigation .focus > ul { - border-left: 0; - clip: inherit; - overflow: inherit; - height: inherit; - width: inherit; - } - .main-navigation li ul li a { - background: #efefef; - border-bottom: 1px solid #ededed; - display: block; - font-size: 11px; - font-size: 0.785714286rem; - line-height: 2.181818182; - padding: 8px 10px; - padding: 0.571428571rem 0.714285714rem; - width: 180px; - width: 12.85714286rem; - white-space: normal; - } - .main-navigation li ul li a:hover, - .main-navigation li ul li a:focus { - background: #e3e3e3; - color: #444; - } - .main-navigation .current-menu-item > a, - .main-navigation .current-menu-ancestor > a, - .main-navigation .current_page_item > a, - .main-navigation .current_page_ancestor > a { - color: #636363; - font-weight: bold; - } - .menu-toggle { - display: none; - } - .entry-header .entry-title { - font-size: 22px; - font-size: 1.571428571rem; - } - #respond form input[type="text"] { - width: 46.333333333%; - } - #respond form textarea.blog-textarea { - width: 79.666666667%; - } - .template-front-page .site-content, - .template-front-page article { - overflow: hidden; - } - .template-front-page.has-post-thumbnail article { - float: left; - width: 47.916666667%; - } - .entry-page-image { - float: right; - margin-bottom: 0; - width: 47.916666667%; - } - .template-front-page .widget-area .widget, - .template-front-page.two-sidebars .widget-area .front-widgets { - float: left; - width: 51.875%; - margin-bottom: 24px; - margin-bottom: 1.714285714rem; - } - .template-front-page .widget-area .widget:nth-child(odd) { - clear: right; - } - .template-front-page .widget-area .widget:nth-child(even), - .template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets { - float: right; - width: 39.0625%; - margin: 0 0 24px; - margin: 0 0 1.714285714rem; - } - .template-front-page.two-sidebars .widget, - .template-front-page.two-sidebars .widget:nth-child(even) { - float: none; - width: auto; - } - .commentlist .children { - margin-left: 48px; - margin-left: 3.428571429rem; - } -} - -/* Minimum width of 960 pixels. */ -@media screen and (min-width: 960px) { - body { - background-color: #e6e6e6; - } - body .site { - padding: 0 40px; - padding: 0 2.857142857rem; - margin-top: 48px; - margin-top: 3.428571429rem; - margin-bottom: 48px; - margin-bottom: 3.428571429rem; - box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3); - } - body.custom-background-empty { - background-color: #fff; - } - body.custom-background-empty .site, - body.custom-background-white .site { - padding: 0; - margin-top: 0; - margin-bottom: 0; - box-shadow: none; - } -} - - -/* =Print ------------------------------------------------ */ - -@media print { - body { - background: none !important; - color: #000; - font-size: 10pt; - } - footer a[rel=bookmark]:link:after, - footer a[rel=bookmark]:visited:after { - content: " [" attr(href) "] "; /* Show URLs */ - } - a { - text-decoration: none; - } - .entry-content img, - .comment-content img, - .author-avatar img, - img.wp-post-image { - border-radius: 0; - box-shadow: none; - } - .site { - clear: both !important; - display: block !important; - float: none !important; - max-width: 100%; - position: relative !important; - } - .site-header { - margin-bottom: 72px; - margin-bottom: 5.142857143rem; - text-align: left; - } - .site-header h1 { - font-size: 21pt; - line-height: 1; - text-align: left; - } - .site-header h2 { - color: #000; - font-size: 10pt; - text-align: left; - } - .site-header h1 a, - .site-header h2 a { - color: #000; - } - .author-avatar, - #colophon, - #respond, - .commentlist .comment-edit-link, - .commentlist .reply, - .entry-header .comments-link, - .entry-meta .edit-link a, - .page-link, - .site-content nav, - .widget-area, - img.header-image, - .main-navigation { - display: none; - } - .wrapper { - border-top: none; - box-shadow: none; - } - .site-content { - margin: 0; - width: auto; - } - - .entry-header .entry-title, - .entry-title { - font-size: 21pt; - } - footer.entry-meta, - footer.entry-meta a { - color: #444; - font-size: 10pt; - } - .author-description { - float: none; - width: auto; - } - - /* Comments */ - .commentlist > li.comment { - background: none; - position: relative; - width: auto; - } - .commentlist .avatar { - height: 39px; - left: 2.2em; - top: 2.2em; - width: 39px; - } - .comments-area article header cite, - .comments-area article header time { - margin-left: 50px; - margin-left: 3.57142857rem; - } -} - -/* -* Nest Simulator -*/ - -/* -Theme Name: NEST Simulator theme -Description: Theme for NEST Simulator (child of Twenty Twelve theme) -Author: Jochen Martin Eppler, Susanne Kunkel, Bernd Wiebelt, Steffen Graber -Template: twentytwelve -*/ - -/* @import url("../twentytwelve/style.css");*/ - -/** -* Make it wider -**/ -footer[role="contentinfo"] { - max-width: 1100px; -} -@media screen and (min-width: 600px) { - .site { - max-width: 1100px; - max-width: 78.571428571rem; - } -} -.ie .site { - max-width: 1100px; -} - - - -/* -Main Styles -*/ -h1.site-title { - height: 90px; - left: 0px; - padding: 10px 0 0 0; - text-align: right; - background: none; -} - -.entry-content p, .entry-summary p, .comment-content p, .mu_register p { - margin: 10px 0; -} - -.entry-content ol, .comment-content ol, .entry-content ul, .comment-content ul, .mu_register ul { - margin: 10px 0; -} - -.entry-content h1, .comment-content h1, .entry-content h2, .comment-content h2, .entry-content h3, .comment-content h3, .entry-content h4, .comment-content h4, .entry-content h5, .comment-content h5, .entry-content h6, .comment-content h6 { - margin: 10px 0; -} - -.entry-header .entry-title { - font-size: 2.3rem; - font-weight: bold; -} - -.entry-content h2, .comment-content h2 { - font-size: 1.7rem; - font-weight: bold; -} - -.entry-content blockquote, .comment-content blockquote { - margin: 10px 0; - padding: 0 0 0 30px; -} - -.site-content article { - padding-bottom: 0; - border-bottom: none; -} - -#main { - border-left: 3px solid #f63; - padding-left: 37px; -} - -h1, h2 { - font-family: Courier, Monospace; - color: #f63; - text-transform: lowercase; - background: url('moeppel2.png') no-repeat no-repeat left center; - background-attachment: padding-box; - position: relative; - padding-left: 62px; - left: -62px; -} - -h2 { - background: url('moeppel1.png') no-repeat no-repeat left center; -} -.entry-content code, .comment-content code, .entry-content pre, .comment-content pre { - font-size: 85%; -} - -.papercite_doi img, .papercite_pdf img { - border-radius: 0; - box-shadow: none; - padding-right: 5px; -} - -.entry-content h2, .comment-content h2 { - margin-top: 40px; -} -.entry-content pre { - padding: 16px; -} -/* -Front Page -*/ - -.home .widget img { - box-shadow: none; -} - -/*.home #front { - height: 300px; -}*/ -.home #front #secondary { - border-top: none; - padding-top: 0; -} -/*.home #front #secondary div.first { - width: 50%; -} -.home #front #secondary div.second { - width: 50%; -}*/ -.home #front h1, #front h2 { - background: none; - font-size: 4rem; - font-weight: 600; - line-height: 3.2rem; - letter-spacing: -1px; - padding-top: 10px; -} -/*.home #front h1 { - padding-top: 50px; -}*/ -.home #front h2 { - font-size: 1.5rem; - margin-bottom: 1rem; - text-transform: none; -} -.home #front .widget-area .widget a { - outline: medium none; - color: #21759B; -} -.home #main { - border-left: none; - padding-left: 40px; - padding-right: 40px; -} -.home .nest { - font-family: Courier, Monospace; - color: #f63; - text-transform: lowercase; - font-weight: 600; -} -.home .nestcolon { - letter-spacing: -1rem; -} - -.home #front-teaser ul { - width: 100%; - border-top: 1px solid #EDEDED; - display: block; -} -.home #front-teaser ul li { - display: block; - width: 30%; - float: left; - margin: 10px; -} -.home h3.teaserh { - margin-bottom: 10px; - height: 30px; - line-height: 1.4rem; -} -.home p.teaserp { - padding-left: 3px; - padding-bottom: 6px; - line-height: 1.4rem; -} - -.home #primary { - border-top: 1px solid #EDEDED; -} - -.home .entry-content { - margin-top: 2rem; -} - -.home .entry-content td, .home .comment-content td { - border-top: none; -} - -@media screen and (max-width: 860px){ - .home #front-teaser { - display: none; - } -} -@media screen and (max-width: 600px){ - .home #front #secondary div.second { - display: none; - } - .home #front #secondary div.first { - width: 100%; - } - h1, h2 { - background: none; - } - h1.site-title { - text-align: center; - } - .menu-toggle { - display: none; - } -} - -/* -Footer -*/ - - -footer .site-info { - text-align: center; -} -footer #second-site-navigation { - margin-top: 0; -} -footer #second-site-navigation.main-navigation li { - margin-right: 1rem; -} - -.main-navigation li ul { - z-index: 20000; -} - -/*Neuer Slider*/ - -.advps-slide a img{ - position: relative; - left: 50%; - border: none; - box-shadow: none; -} -.advps-slide .advps-excerpt-one { - margin-left: 12%; -} -.advps-slide .advps-excerpt-one p{ - font-size: 13px; - line-height: 14px; -} - -.advps-slide h2.advs-title { - background: none; - font-size: 16px; -} -.advps-slide-container { - padding-bottom: 50px; - margin: 140px auto 0 auto; - display: block -} -.bx-wrapper .bx-controls-direction a { - -} -.bx-wrapper { - left: -10px; -} -.bx-wrapper .bx-next, .bx-wrapper .bx-prev { - opacity: 0.4; - filter: alpha(opacity=40); -} - - -@media screen and (max-width: 860px){ - .home .advps-slide-container { - display: none; - } -} - -/** -* Search -*/ - -.header-search { - float: right; - margin-top: -40px; - width: 238px; - display: inline-block; - z-index: 9998; - position: relative; -} -.header-search input#s { - width: 150px; -} -@media (max-width: 1050px) { - .header-search { - /* float: none; - margin-top: 10px;*/ - } -} - -@media (max-width: 600px) { - .header-search { - margin-top:10px; - text-align:center; - float:none; - text-align: center; - } - .header-search { - margin:10px auto 0 auto; - } - .header-search { - display: none; - } - .main-navigation { - clear:both; - } -} - -/* Zweispaltiger Inhalt mit Shortcode */ -.entry-content .leftcolumn, .entry-content .rightcolumn {width: 48%; } -.entry-content .leftcolumn {float: left; } -.entry-content .rightcolumn {float: right; } -.entry-content .topcolumn {clear: both; } - -.entry-content img { - -moz-box-shadow: none; - -o-box-shadow: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -/* - * Reference Styles - */ - -a.cmd-a { - display: block; -} -.cmd-key { - font-weight: bold; -} - -/* Mobile Menu */ - -.mm-menu.mm-offcanvas { - z-index: 1000; - display: none; - position: fixed; -} - -@media screen and (max-width: 600px) { - #nest-menu { - display: none !important; - } - #hide { - display: blockquot; - } -} - -@media screen and (min-width: 601px) { - #mm-nest-menu, #hide { - display: none !important; - } -} - - - - diff --git a/doc/slihelp_generator/assets/images/arrow.png b/doc/slihelp_generator/assets/images/arrow.png deleted file mode 100755 index ac6f09d588fbca6f2978d0a39b72341aeb6a4d0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 275 zcmeAS@N?(olHy`uVBq!ia0vp^${@_a3?wz#owI?IO@L2`YbY21c@PFkzopr0Ph`Uxc~qF diff --git a/doc/slihelp_generator/assets/js/code-prettify/COPYING b/doc/slihelp_generator/assets/js/code-prettify/COPYING deleted file mode 100644 index b7f86df200..0000000000 --- a/doc/slihelp_generator/assets/js/code-prettify/COPYING +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2011 Mike Samuel et al - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/doc/slihelp_generator/assets/js/code-prettify/lang-apollo.js b/doc/slihelp_generator/assets/js/code-prettify/lang-apollo.js deleted file mode 100644 index 10df8cde08..0000000000 --- a/doc/slihelp_generator/assets/js/code-prettify/lang-apollo.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @license - * Copyright (C) 2009 Onno Hommes. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview - * Registers a language handler for the AGC/AEA Assembly Language as described - * at http://virtualagc.googlecode.com - *

- * This file could be used by goodle code to allow syntax highlight for - * Virtual AGC SVN repository or if you don't want to commonize - * the header for the agc/aea html assembly listing. - * - * @author ohommes@alumni.cmu.edu - */ - -PR['registerLangHandler']( - PR['createSimpleLexer']( - [ - // A line comment that starts with ; - [PR['PR_COMMENT'], /^#[^\r\n]*/, null, '#'], - // Whitespace - [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'], - // A double quoted, possibly multi-line, string. - [PR['PR_STRING'], /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"'] - ], - [ - [PR['PR_KEYWORD'], /^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,null], - [PR['PR_TYPE'], /^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null], - // A single quote possibly followed by a word that optionally ends with - // = ! or ?. - [PR['PR_LITERAL'], - /^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/], - // Any word including labels that optionally ends with = ! or ?. - [PR['PR_PLAIN'], - /^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i], - // A printable non-space non-special character - [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0()\"\\\';]+/] - ]), - ['apollo', 'agc', 'aea']); diff --git a/doc/slihelp_generator/assets/js/code-prettify/lang-basic.js b/doc/slihelp_generator/assets/js/code-prettify/lang-basic.js deleted file mode 100644 index d60cce31d2..0000000000 --- a/doc/slihelp_generator/assets/js/code-prettify/lang-basic.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @license - * Copyright (C) 2013 Peter Kofler - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Contributed by peter dot kofler at code minus cop dot org - -/** - * @fileoverview - * Registers a language handler for Basic. - * - * To use, include prettify.js and this file in your HTML page. - * Then put your code in an HTML tag like - *

(my BASIC code)
- * - * @author peter dot kofler at code minus cop dot org - */ - -PR.registerLangHandler( - PR.createSimpleLexer( - [ // shortcutStylePatterns - // "single-line-string" - [PR.PR_STRING, /^(?:"(?:[^\\"\r\n]|\\.)*(?:"|$))/, null, '"'], - // Whitespace - [PR.PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0'] - ], - [ // fallthroughStylePatterns - // A line comment that starts with REM - [PR.PR_COMMENT, /^REM[^\r\n]*/, null], - [PR.PR_KEYWORD, /^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/, null], - [PR.PR_PLAIN, /^[A-Z][A-Z0-9]?(?:\$|%)?/i, null], - // Literals .0, 0, 0.0 0E13 - [PR.PR_LITERAL, /^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?/i, null, '0123456789'], - [PR.PR_PUNCTUATION, /^.[^\s\w\.$%"]*/, null] - // [PR.PR_PUNCTUATION, /^[-,:;!<>=\+^\/\*]+/] - ]), - ['basic','cbm']); diff --git a/doc/slihelp_generator/assets/js/code-prettify/lang-clj.js b/doc/slihelp_generator/assets/js/code-prettify/lang-clj.js deleted file mode 100644 index 0758335f36..0000000000 --- a/doc/slihelp_generator/assets/js/code-prettify/lang-clj.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * @license Copyright (C) 2011 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview - * Registers a language handler for Clojure. - * - * - * To use, include prettify.js and this file in your HTML page. - * Then put your code in an HTML tag like - *
(my lisp code)
- * The lang-cl class identifies the language as common lisp. - * This file supports the following language extensions: - * lang-clj - Clojure - * - * - * I used lang-lisp.js as the basis for this adding the clojure specific - * keywords and syntax. - * - * "Name" = 'Clojure' - * "Author" = 'Rich Hickey' - * "Version" = '1.2' - * "About" = 'Clojure is a lisp for the jvm with concurrency primitives and a richer set of types.' - * - * - * I used
Clojure.org Reference as - * the basis for the reserved word list. - * - * - * @author jwall@google.com - */ - -PR['registerLangHandler']( - PR['createSimpleLexer']( - [ - // clojure has more paren types than minimal lisp. - ['opn', /^[\(\{\[]+/, null, '([{'], - ['clo', /^[\)\}\]]+/, null, ')]}'], - // A line comment that starts with ; - [PR['PR_COMMENT'], /^;[^\r\n]*/, null, ';'], - // Whitespace - [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'], - // A double quoted, possibly multi-line, string. - [PR['PR_STRING'], /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"'] - ], - [ - // clojure has a much larger set of keywords - [PR['PR_KEYWORD'], /^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/, null], - [PR['PR_TYPE'], /^:[0-9a-zA-Z\-]+/] - ]), - ['clj']); diff --git a/doc/slihelp_generator/assets/js/code-prettify/lang-css.js b/doc/slihelp_generator/assets/js/code-prettify/lang-css.js deleted file mode 100644 index c6f7c36b0b..0000000000 --- a/doc/slihelp_generator/assets/js/code-prettify/lang-css.js +++ /dev/null @@ -1,160 +0,0 @@ -/** - * @license - * Copyright (C) 2009 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview - * Registers a language handler for CSS. - * - * - * To use, include prettify.js and this file in your HTML page. - * Then put your code in an HTML tag like - *

- *
- *
- * http://www.w3.org/TR/CSS21/grammar.html Section G2 defines the lexical
- * grammar.  This scheme does not recognize keywords containing escapes.
- *
- * @author mikesamuel@gmail.com
- */
-
-// This file is a call to a function defined in prettify.js which defines a
-// lexical scanner for CSS and maps tokens to styles.
-
-// The call to PR['registerLangHandler'] is quoted so that Closure Compiler
-// will not rename the call so that this language extensions can be
-// compiled/minified separately from one another.  Other symbols defined in
-// prettify.js are similarly quoted.
-
-// The call is structured thus:
-// PR['registerLangHandler'](
-//    PR['createSimpleLexer'](
-//        shortcutPatterns,
-//        fallThroughPatterns),
-//    [languageId0, ..., languageIdN])
-
-// Langugage IDs
-// =============
-// The language IDs are typically the file extensions of source files for
-// that language so that users can syntax highlight arbitrary files based
-// on just the extension.  This is heuristic, but works pretty well in
-// practice.
-
-// Patterns
-// ========
-// Lexers are typically implemented as a set of regular expressions.
-// The SimpleLexer function takes regular expressions, styles, and some
-// pragma-info and produces a lexer.  A token description looks like
-//   [STYLE_NAME, /regular-expression/, pragmas]
-
-// Initially, simple lexer's inner loop looked like:
-
-//    while sourceCode is not empty:
-//      try each regular expression in order until one matches
-//      remove the matched portion from sourceCode
-
-// This was really slow for large files because some JS interpreters
-// do a buffer copy on the matched portion which is O(n*n)
-
-// The current loop now looks like
-
-//    1. use js-modules/combinePrefixPatterns.js to 
-//       combine all regular expressions into one 
-//    2. use a single global regular expresion match to extract all tokens
-//    3. for each token try regular expressions in order until one matches it
-//       and classify it using the associated style
-
-// This is a lot more efficient but it does mean that lookahead and lookbehind
-// can't be used across boundaries to classify tokens.
-
-// Sometimes we need lookahead and lookbehind and sometimes we want to handle
-// embedded language -- JavaScript or CSS embedded in HTML, or inline assembly
-// in C.
-
-// If a particular pattern has a numbered group, and its style pattern starts
-// with "lang-" as in
-//    ['lang-js', /}
- * 
  • define style rules. See the example page for examples. - *
  • mark the {@code
    } and {@code } tags in your source with
    - *    {@code class=prettyprint.}
    - *    You can also use the (html deprecated) {@code } tag, but the pretty
    - *    printer needs to do more substantial DOM manipulations to support that, so
    - *    some css styles may not be preserved.
    - * </ol>
    - * That's it.  I wanted to keep the API as simple as possible, so there's no
    - * need to specify which language the code is in, but if you wish, you can add
    - * another class to the {@code <pre>} or {@code <code>} element to specify the
    - * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
    - * starts with "lang-" followed by a file extension, specifies the file type.
    - * See the "lang-*.js" files in this directory for code that implements
    - * per-language file handlers.
    - * <p>
    - * Change log:<br>
    - * cbeust, 2006/08/22
    - * <blockquote>
    - *   Java annotations (start with "@") are now captured as literals ("lit")
    - * </blockquote>
    - * @requires console
    - */
    -
    -// JSLint declarations
    -/*global console, document, navigator, setTimeout, window, define */
    -
    -
    -/**
    - * {@type !{
    - *   'createSimpleLexer': function (Array, Array): (function (JobT)),
    - *   'registerLangHandler': function (function (JobT), Array.<string>),
    - *   'PR_ATTRIB_NAME': string,
    - *   'PR_ATTRIB_NAME': string,
    - *   'PR_ATTRIB_VALUE': string,
    - *   'PR_COMMENT': string,
    - *   'PR_DECLARATION': string,
    - *   'PR_KEYWORD': string,
    - *   'PR_LITERAL': string,
    - *   'PR_NOCODE': string,
    - *   'PR_PLAIN': string,
    - *   'PR_PUNCTUATION': string,
    - *   'PR_SOURCE': string,
    - *   'PR_STRING': string,
    - *   'PR_TAG': string,
    - *   'PR_TYPE': string,
    - *   'prettyPrintOne': function (string, string, number|boolean),
    - *   'prettyPrint': function (?function, ?(HTMLElement|HTMLDocument))
    - * }}
    - * @const
    - */
    -/**
    -* @typedef {!Array.<number|string>}
    -* Alternating indices and the decorations that should be inserted there.
    -* The indices are monotonically increasing.
    -*/
    -var DecorationsT;
    -
    -/**
    -* @typedef {!{
    -*   sourceNode: !Element,
    -*   pre: !(number|boolean),
    -*   langExtension: ?string,
    -*   numberLines: ?(number|boolean),
    -*   sourceCode: ?string,
    -*   spans: ?(Array.<number|Node>),
    -*   basePos: ?number,
    -*   decorations: ?DecorationsT
    -* }}
    -* <dl>
    -*  <dt>sourceNode<dd>the element containing the source
    -*  <dt>sourceCode<dd>source as plain text
    -*  <dt>pre<dd>truthy if white-space in text nodes
    -*     should be considered significant.
    -*  <dt>spans<dd> alternating span start indices into source
    -*     and the text node or element (e.g. {@code <BR>}) corresponding to that
    -*     span.
    -*  <dt>decorations<dd>an array of style classes preceded
    -*     by the position at which they start in job.sourceCode in order
    -*  <dt>basePos<dd>integer position of this.sourceCode in the larger chunk of
    -*     source.
    -* </dl>
    -*/
    -var JobT;
    -
    -/**
    -* @typedef {!{
    -*   sourceCode: string,
    -*   spans: !(Array.<number|Node>)
    -* }}
    -* <dl>
    -*  <dt>sourceCode<dd>source as plain text
    -*  <dt>spans<dd> alternating span start indices into source
    -*     and the text node or element (e.g. {@code <BR>}) corresponding to that
    -*     span.
    -* </dl>
    -*/
    -var SourceSpansT;
    -
    -/** @define {boolean} */
    -var IN_GLOBAL_SCOPE = false;
    -
    -var PR;
    -
    -/**
    - * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
    - * UI events.
    - * If set to {@code false}, {@code prettyPrint()} is synchronous.
    - */
    -window['PR_SHOULD_USE_CONTINUATION'] = true;
    -
    -/**
    - * Pretty print a chunk of code.
    - * @param {string} sourceCodeHtml The HTML to pretty print.
    - * @param {string} opt_langExtension The language name to use.
    - *     Typically, a filename extension like 'cpp' or 'java'.
    - * @param {number|boolean} opt_numberLines True to number lines,
    - *     or the 1-indexed number of the first line in sourceCodeHtml.
    - * @return {string} code as html, but prettier
    - */
    -var prettyPrintOne;
    -/**
    - * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
    - * {@code class=prettyprint} and prettify them.
    - *
    - * @param {Function} opt_whenDone called when prettifying is done.
    - * @param {HTMLElement|HTMLDocument} opt_root an element or document
    - *   containing all the elements to pretty print.
    - *   Defaults to {@code document.body}.
    - */
    -var prettyPrint;
    -
    -
    -(function () {
    -  var win = window;
    -  // Keyword lists for various languages.
    -  // We use things that coerce to strings to make them compact when minified
    -  // and to defeat aggressive optimizers that fold large string constants.
    -  var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
    -  var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +
    -      "double,enum,extern,float,goto,inline,int,long,register,short,signed," +
    -      "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
    -  var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
    -      "new,operator,private,protected,public,this,throw,true,try,typeof"];
    -  var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
    -      "concept,concept_map,const_cast,constexpr,decltype,delegate," +
    -      "dynamic_cast,explicit,export,friend,generic,late_check," +
    -      "mutable,namespace,nullptr,property,reinterpret_cast,static_assert," +
    -      "static_cast,template,typeid,typename,using,virtual,where"];
    -  var JAVA_KEYWORDS = [COMMON_KEYWORDS,
    -      "abstract,assert,boolean,byte,extends,finally,final,implements,import," +
    -      "instanceof,interface,null,native,package,strictfp,super,synchronized," +
    -      "throws,transient"];
    -  var CSHARP_KEYWORDS = [COMMON_KEYWORDS,
    -      "abstract,as,base,bool,by,byte,checked,decimal,delegate,descending," +
    -      "dynamic,event,finally,fixed,foreach,from,group,implicit,in,interface," +
    -      "internal,into,is,let,lock,null,object,out,override,orderby,params," +
    -      "partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong," +
    -      "unchecked,unsafe,ushort,var,virtual,where"];
    -  var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
    -      "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
    -      "throw,true,try,unless,until,when,while,yes";
    -  var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
    -      "abstract,async,await,constructor,debugger,enum,eval,export,function," +
    -      "get,implements,instanceof,interface,let,null,set,undefined,var,with," +
    -      "yield,Infinity,NaN"];
    -  var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
    -      "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
    -      "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
    -  var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
    -      "elif,except,exec,finally,from,global,import,in,is,lambda," +
    -      "nonlocal,not,or,pass,print,raise,try,with,yield," +
    -      "False,True,None"];
    -  var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
    -      "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
    -      "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
    -      "BEGIN,END"];
    -  var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
    -      "function,in,local,set,then,until"];
    -  var ALL_KEYWORDS = [
    -      CPP_KEYWORDS, CSHARP_KEYWORDS, JAVA_KEYWORDS, JSCRIPT_KEYWORDS,
    -      PERL_KEYWORDS, PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
    -  var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
    -
    -  // token style names.  correspond to css classes
    -  /**
    -   * token style for a string literal
    -   * @const
    -   */
    -  var PR_STRING = 'str';
    -  /**
    -   * token style for a keyword
    -   * @const
    -   */
    -  var PR_KEYWORD = 'kwd';
    -  /**
    -   * token style for a comment
    -   * @const
    -   */
    -  var PR_COMMENT = 'com';
    -  /**
    -   * token style for a type
    -   * @const
    -   */
    -  var PR_TYPE = 'typ';
    -  /**
    -   * token style for a literal value.  e.g. 1, null, true.
    -   * @const
    -   */
    -  var PR_LITERAL = 'lit';
    -  /**
    -   * token style for a punctuation string.
    -   * @const
    -   */
    -  var PR_PUNCTUATION = 'pun';
    -  /**
    -   * token style for plain text.
    -   * @const
    -   */
    -  var PR_PLAIN = 'pln';
    -
    -  /**
    -   * token style for an sgml tag.
    -   * @const
    -   */
    -  var PR_TAG = 'tag';
    -  /**
    -   * token style for a markup declaration such as a DOCTYPE.
    -   * @const
    -   */
    -  var PR_DECLARATION = 'dec';
    -  /**
    -   * token style for embedded source.
    -   * @const
    -   */
    -  var PR_SOURCE = 'src';
    -  /**
    -   * token style for an sgml attribute name.
    -   * @const
    -   */
    -  var PR_ATTRIB_NAME = 'atn';
    -  /**
    -   * token style for an sgml attribute value.
    -   * @const
    -   */
    -  var PR_ATTRIB_VALUE = 'atv';
    -
    -  /**
    -   * A class that indicates a section of markup that is not code, e.g. to allow
    -   * embedding of line numbers within code listings.
    -   * @const
    -   */
    -  var PR_NOCODE = 'nocode';
    -
    -  
    -  
    -  /**
    -   * A set of tokens that can precede a regular expression literal in
    -   * javascript
    -   * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
    -   * has the full list, but I've removed ones that might be problematic when
    -   * seen in languages that don't support regular expression literals.
    -   *
    -   * <p>Specifically, I've removed any keywords that can't precede a regexp
    -   * literal in a syntactically legal javascript program, and I've removed the
    -   * "in" keyword since it's not a keyword in many languages, and might be used
    -   * as a count of inches.
    -   *
    -   * <p>The link above does not accurately describe EcmaScript rules since
    -   * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
    -   * very well in practice.
    -   *
    -   * @private
    -   * @const
    -   */
    -  var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
    -  
    -  // CAVEAT: this does not properly handle the case where a regular
    -  // expression immediately follows another since a regular expression may
    -  // have flags for case-sensitivity and the like.  Having regexp tokens
    -  // adjacent is not valid in any language I'm aware of, so I'm punting.
    -  // TODO: maybe style special characters inside a regexp as punctuation.
    -
    -  /**
    -   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
    -   * matches the union of the sets of strings matched by the input RegExp.
    -   * Since it matches globally, if the input strings have a start-of-input
    -   * anchor (/^.../), it is ignored for the purposes of unioning.
    -   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
    -   * @return {RegExp} a global regex.
    -   */
    -  function combinePrefixPatterns(regexs) {
    -    var capturedGroupIndex = 0;
    -  
    -    var needToFoldCase = false;
    -    var ignoreCase = false;
    -    for (var i = 0, n = regexs.length; i < n; ++i) {
    -      var regex = regexs[i];
    -      if (regex.ignoreCase) {
    -        ignoreCase = true;
    -      } else if (/[a-z]/i.test(regex.source.replace(
    -                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
    -        needToFoldCase = true;
    -        ignoreCase = false;
    -        break;
    -      }
    -    }
    -  
    -    var escapeCharToCodeUnit = {
    -      'b': 8,
    -      't': 9,
    -      'n': 0xa,
    -      'v': 0xb,
    -      'f': 0xc,
    -      'r': 0xd
    -    };
    -  
    -    function decodeEscape(charsetPart) {
    -      var cc0 = charsetPart.charCodeAt(0);
    -      if (cc0 !== 92 /* \\ */) {
    -        return cc0;
    -      }
    -      var c1 = charsetPart.charAt(1);
    -      cc0 = escapeCharToCodeUnit[c1];
    -      if (cc0) {
    -        return cc0;
    -      } else if ('0' <= c1 && c1 <= '7') {
    -        return parseInt(charsetPart.substring(1), 8);
    -      } else if (c1 === 'u' || c1 === 'x') {
    -        return parseInt(charsetPart.substring(2), 16);
    -      } else {
    -        return charsetPart.charCodeAt(1);
    -      }
    -    }
    -  
    -    function encodeEscape(charCode) {
    -      if (charCode < 0x20) {
    -        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
    -      }
    -      var ch = String.fromCharCode(charCode);
    -      return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
    -          ? "\\" + ch : ch;
    -    }
    -  
    -    function caseFoldCharset(charSet) {
    -      var charsetParts = charSet.substring(1, charSet.length - 1).match(
    -          new RegExp(
    -              '\\\\u[0-9A-Fa-f]{4}'
    -              + '|\\\\x[0-9A-Fa-f]{2}'
    -              + '|\\\\[0-3][0-7]{0,2}'
    -              + '|\\\\[0-7]{1,2}'
    -              + '|\\\\[\\s\\S]'
    -              + '|-'
    -              + '|[^-\\\\]',
    -              'g'));
    -      var ranges = [];
    -      var inverse = charsetParts[0] === '^';
    -  
    -      var out = ['['];
    -      if (inverse) { out.push('^'); }
    -  
    -      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
    -        var p = charsetParts[i];
    -        if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
    -          out.push(p);
    -        } else {
    -          var start = decodeEscape(p);
    -          var end;
    -          if (i + 2 < n && '-' === charsetParts[i + 1]) {
    -            end = decodeEscape(charsetParts[i + 2]);
    -            i += 2;
    -          } else {
    -            end = start;
    -          }
    -          ranges.push([start, end]);
    -          // If the range might intersect letters, then expand it.
    -          // This case handling is too simplistic.
    -          // It does not deal with non-latin case folding.
    -          // It works for latin source code identifiers though.
    -          if (!(end < 65 || start > 122)) {
    -            if (!(end < 65 || start > 90)) {
    -              ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
    -            }
    -            if (!(end < 97 || start > 122)) {
    -              ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
    -            }
    -          }
    -        }
    -      }
    -  
    -      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
    -      // -> [[1, 12], [14, 14], [16, 17]]
    -      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
    -      var consolidatedRanges = [];
    -      var lastRange = [];
    -      for (var i = 0; i < ranges.length; ++i) {
    -        var range = ranges[i];
    -        if (range[0] <= lastRange[1] + 1) {
    -          lastRange[1] = Math.max(lastRange[1], range[1]);
    -        } else {
    -          consolidatedRanges.push(lastRange = range);
    -        }
    -      }
    -  
    -      for (var i = 0; i < consolidatedRanges.length; ++i) {
    -        var range = consolidatedRanges[i];
    -        out.push(encodeEscape(range[0]));
    -        if (range[1] > range[0]) {
    -          if (range[1] + 1 > range[0]) { out.push('-'); }
    -          out.push(encodeEscape(range[1]));
    -        }
    -      }
    -      out.push(']');
    -      return out.join('');
    -    }
    -  
    -    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
    -      // Split into character sets, escape sequences, punctuation strings
    -      // like ('(', '(?:', ')', '^'), and runs of characters that do not
    -      // include any of the above.
    -      var parts = regex.source.match(
    -          new RegExp(
    -              '(?:'
    -              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
    -              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
    -              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
    -              + '|\\\\[0-9]+'  // a back-reference or octal escape
    -              + '|\\\\[^ux0-9]'  // other escape sequence
    -              + '|\\(\\?[:!=]'  // start of a non-capturing group
    -              + '|[\\(\\)\\^]'  // start/end of a group, or line start
    -              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
    -              + ')',
    -              'g'));
    -      var n = parts.length;
    -  
    -      // Maps captured group numbers to the number they will occupy in
    -      // the output or to -1 if that has not been determined, or to
    -      // undefined if they need not be capturing in the output.
    -      var capturedGroups = [];
    -  
    -      // Walk over and identify back references to build the capturedGroups
    -      // mapping.
    -      for (var i = 0, groupIndex = 0; i < n; ++i) {
    -        var p = parts[i];
    -        if (p === '(') {
    -          // groups are 1-indexed, so max group index is count of '('
    -          ++groupIndex;
    -        } else if ('\\' === p.charAt(0)) {
    -          var decimalValue = +p.substring(1);
    -          if (decimalValue) {
    -            if (decimalValue <= groupIndex) {
    -              capturedGroups[decimalValue] = -1;
    -            } else {
    -              // Replace with an unambiguous escape sequence so that
    -              // an octal escape sequence does not turn into a backreference
    -              // to a capturing group from an earlier regex.
    -              parts[i] = encodeEscape(decimalValue);
    -            }
    -          }
    -        }
    -      }
    -  
    -      // Renumber groups and reduce capturing groups to non-capturing groups
    -      // where possible.
    -      for (var i = 1; i < capturedGroups.length; ++i) {
    -        if (-1 === capturedGroups[i]) {
    -          capturedGroups[i] = ++capturedGroupIndex;
    -        }
    -      }
    -      for (var i = 0, groupIndex = 0; i < n; ++i) {
    -        var p = parts[i];
    -        if (p === '(') {
    -          ++groupIndex;
    -          if (!capturedGroups[groupIndex]) {
    -            parts[i] = '(?:';
    -          }
    -        } else if ('\\' === p.charAt(0)) {
    -          var decimalValue = +p.substring(1);
    -          if (decimalValue && decimalValue <= groupIndex) {
    -            parts[i] = '\\' + capturedGroups[decimalValue];
    -          }
    -        }
    -      }
    -  
    -      // Remove any prefix anchors so that the output will match anywhere.
    -      // ^^ really does mean an anchored match though.
    -      for (var i = 0; i < n; ++i) {
    -        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
    -      }
    -  
    -      // Expand letters to groups to handle mixing of case-sensitive and
    -      // case-insensitive patterns if necessary.
    -      if (regex.ignoreCase && needToFoldCase) {
    -        for (var i = 0; i < n; ++i) {
    -          var p = parts[i];
    -          var ch0 = p.charAt(0);
    -          if (p.length >= 2 && ch0 === '[') {
    -            parts[i] = caseFoldCharset(p);
    -          } else if (ch0 !== '\\') {
    -            // TODO: handle letters in numeric escapes.
    -            parts[i] = p.replace(
    -                /[a-zA-Z]/g,
    -                function (ch) {
    -                  var cc = ch.charCodeAt(0);
    -                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
    -                });
    -          }
    -        }
    -      }
    -  
    -      return parts.join('');
    -    }
    -  
    -    var rewritten = [];
    -    for (var i = 0, n = regexs.length; i < n; ++i) {
    -      var regex = regexs[i];
    -      if (regex.global || regex.multiline) { throw new Error('' + regex); }
    -      rewritten.push(
    -          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
    -    }
    -  
    -    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
    -  }
    -
    -  /**
    -   * Split markup into a string of source code and an array mapping ranges in
    -   * that string to the text nodes in which they appear.
    -   *
    -   * <p>
    -   * The HTML DOM structure:</p>
    -   * <pre>
    -   * (Element   "p"
    -   *   (Element "b"
    -   *     (Text  "print "))       ; #1
    -   *   (Text    "'Hello '")      ; #2
    -   *   (Element "br")            ; #3
    -   *   (Text    "  + 'World';")) ; #4
    -   * </pre>
    -   * <p>
    -   * corresponds to the HTML
    -   * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
    -   *
    -   * <p>
    -   * It will produce the output:</p>
    -   * <pre>
    -   * {
    -   *   sourceCode: "print 'Hello '\n  + 'World';",
    -   *   //                     1          2
    -   *   //           012345678901234 5678901234567
    -   *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
    -   * }
    -   * </pre>
    -   * <p>
    -   * where #1 is a reference to the {@code "print "} text node above, and so
    -   * on for the other text nodes.
    -   * </p>
    -   *
    -   * <p>
    -   * The {@code} spans array is an array of pairs.  Even elements are the start
    -   * indices of substrings, and odd elements are the text nodes (or BR elements)
    -   * that contain the text for those substrings.
    -   * Substrings continue until the next index or the end of the source.
    -   * </p>
    -   *
    -   * @param {Node} node an HTML DOM subtree containing source-code.
    -   * @param {boolean|number} isPreformatted truthy if white-space in
    -   *    text nodes should be considered significant.
    -   * @return {SourceSpansT} source code and the nodes in which they occur.
    -   */
    -  function extractSourceSpans(node, isPreformatted) {
    -    var nocode = /(?:^|\s)nocode(?:\s|$)/;
    -  
    -    var chunks = [];
    -    var length = 0;
    -    var spans = [];
    -    var k = 0;
    -  
    -    function walk(node) {
    -      var type = node.nodeType;
    -      if (type == 1) {  // Element
    -        if (nocode.test(node.className)) { return; }
    -        for (var child = node.firstChild; child; child = child.nextSibling) {
    -          walk(child);
    -        }
    -        var nodeName = node.nodeName.toLowerCase();
    -        if ('br' === nodeName || 'li' === nodeName) {
    -          chunks[k] = '\n';
    -          spans[k << 1] = length++;
    -          spans[(k++ << 1) | 1] = node;
    -        }
    -      } else if (type == 3 || type == 4) {  // Text
    -        var text = node.nodeValue;
    -        if (text.length) {
    -          if (!isPreformatted) {
    -            text = text.replace(/[ \t\r\n]+/g, ' ');
    -          } else {
    -            text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
    -          }
    -          // TODO: handle tabs here?
    -          chunks[k] = text;
    -          spans[k << 1] = length;
    -          length += text.length;
    -          spans[(k++ << 1) | 1] = node;
    -        }
    -      }
    -    }
    -  
    -    walk(node);
    -  
    -    return {
    -      sourceCode: chunks.join('').replace(/\n$/, ''),
    -      spans: spans
    -    };
    -  }
    -
    -  /**
    -   * Apply the given language handler to sourceCode and add the resulting
    -   * decorations to out.
    -   * @param {!Element} sourceNode
    -   * @param {number} basePos the index of sourceCode within the chunk of source
    -   *    whose decorations are already present on out.
    -   * @param {string} sourceCode
    -   * @param {function(JobT)} langHandler
    -   * @param {DecorationsT} out
    -   */
    -  function appendDecorations(
    -      sourceNode, basePos, sourceCode, langHandler, out) {
    -    if (!sourceCode) { return; }
    -    /** @type {JobT} */
    -    var job = {
    -      sourceNode: sourceNode,
    -      pre: 1,
    -      langExtension: null,
    -      numberLines: null,
    -      sourceCode: sourceCode,
    -      spans: null,
    -      basePos: basePos,
    -      decorations: null
    -    };
    -    langHandler(job);
    -    out.push.apply(out, job.decorations);
    -  }
    -
    -  var notWs = /\S/;
    -
    -  /**
    -   * Given an element, if it contains only one child element and any text nodes
    -   * it contains contain only space characters, return the sole child element.
    -   * Otherwise returns undefined.
    -   * <p>
    -   * This is meant to return the CODE element in {@code <pre><code ...>} when
    -   * there is a single child element that contains all the non-space textual
    -   * content, but not to return anything where there are multiple child elements
    -   * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
    -   * is textual content.
    -   */
    -  function childContentWrapper(element) {
    -    var wrapper = undefined;
    -    for (var c = element.firstChild; c; c = c.nextSibling) {
    -      var type = c.nodeType;
    -      wrapper = (type === 1)  // Element Node
    -          ? (wrapper ? element : c)
    -          : (type === 3)  // Text Node
    -          ? (notWs.test(c.nodeValue) ? element : wrapper)
    -          : wrapper;
    -    }
    -    return wrapper === element ? undefined : wrapper;
    -  }
    -
    -  /** Given triples of [style, pattern, context] returns a lexing function,
    -    * The lexing function interprets the patterns to find token boundaries and
    -    * returns a decoration list of the form
    -    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
    -    * where index_n is an index into the sourceCode, and style_n is a style
    -    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
    -    * all characters in sourceCode[index_n-1:index_n].
    -    *
    -    * The stylePatterns is a list whose elements have the form
    -    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
    -    *
    -    * Style is a style constant like PR_PLAIN, or can be a string of the
    -    * form 'lang-FOO', where FOO is a language extension describing the
    -    * language of the portion of the token in $1 after pattern executes.
    -    * E.g., if style is 'lang-lisp', and group 1 contains the text
    -    * '(hello (world))', then that portion of the token will be passed to the
    -    * registered lisp handler for formatting.
    -    * The text before and after group 1 will be restyled using this decorator
    -    * so decorators should take care that this doesn't result in infinite
    -    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
    -    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
    -    * '<script>foo()<\/script>', which would cause the current decorator to
    -    * be called with '<script>' which would not match the same rule since
    -    * group 1 must not be empty, so it would be instead styled as PR_TAG by
    -    * the generic tag rule.  The handler registered for the 'js' extension would
    -    * then be called with 'foo()', and finally, the current decorator would
    -    * be called with '<\/script>' which would not match the original rule and
    -    * so the generic tag rule would identify it as a tag.
    -    *
    -    * Pattern must only match prefixes, and if it matches a prefix, then that
    -    * match is considered a token with the same style.
    -    *
    -    * Context is applied to the last non-whitespace, non-comment token
    -    * recognized.
    -    *
    -    * Shortcut is an optional string of characters, any of which, if the first
    -    * character, gurantee that this pattern and only this pattern matches.
    -    *
    -    * @param {Array} shortcutStylePatterns patterns that always start with
    -    *   a known character.  Must have a shortcut string.
    -    * @param {Array} fallthroughStylePatterns patterns that will be tried in
    -    *   order if the shortcut ones fail.  May have shortcuts.
    -    *
    -    * @return {function (JobT)} a function that takes an undecorated job and
    -    *   attaches a list of decorations.
    -    */
    -  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
    -    var shortcuts = {};
    -    var tokenizer;
    -    (function () {
    -      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
    -      var allRegexs = [];
    -      var regexKeys = {};
    -      for (var i = 0, n = allPatterns.length; i < n; ++i) {
    -        var patternParts = allPatterns[i];
    -        var shortcutChars = patternParts[3];
    -        if (shortcutChars) {
    -          for (var c = shortcutChars.length; --c >= 0;) {
    -            shortcuts[shortcutChars.charAt(c)] = patternParts;
    -          }
    -        }
    -        var regex = patternParts[1];
    -        var k = '' + regex;
    -        if (!regexKeys.hasOwnProperty(k)) {
    -          allRegexs.push(regex);
    -          regexKeys[k] = null;
    -        }
    -      }
    -      allRegexs.push(/[\0-\uffff]/);
    -      tokenizer = combinePrefixPatterns(allRegexs);
    -    })();
    -
    -    var nPatterns = fallthroughStylePatterns.length;
    -
    -    /**
    -     * Lexes job.sourceCode and attaches an output array job.decorations of
    -     * style classes preceded by the position at which they start in
    -     * job.sourceCode in order.
    -     *
    -     * @type{function (JobT)}
    -     */
    -    var decorate = function (job) {
    -      var sourceCode = job.sourceCode, basePos = job.basePos;
    -      var sourceNode = job.sourceNode;
    -      /** Even entries are positions in source in ascending order.  Odd enties
    -        * are style markers (e.g., PR_COMMENT) that run from that position until
    -        * the end.
    -        * @type {DecorationsT}
    -        */
    -      var decorations = [basePos, PR_PLAIN];
    -      var pos = 0;  // index into sourceCode
    -      var tokens = sourceCode.match(tokenizer) || [];
    -      var styleCache = {};
    -
    -      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
    -        var token = tokens[ti];
    -        var style = styleCache[token];
    -        var match = void 0;
    -
    -        var isEmbedded;
    -        if (typeof style === 'string') {
    -          isEmbedded = false;
    -        } else {
    -          var patternParts = shortcuts[token.charAt(0)];
    -          if (patternParts) {
    -            match = token.match(patternParts[1]);
    -            style = patternParts[0];
    -          } else {
    -            for (var i = 0; i < nPatterns; ++i) {
    -              patternParts = fallthroughStylePatterns[i];
    -              match = token.match(patternParts[1]);
    -              if (match) {
    -                style = patternParts[0];
    -                break;
    -              }
    -            }
    -
    -            if (!match) {  // make sure that we make progress
    -              style = PR_PLAIN;
    -            }
    -          }
    -
    -          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
    -          if (isEmbedded && !(match && typeof match[1] === 'string')) {
    -            isEmbedded = false;
    -            style = PR_SOURCE;
    -          }
    -
    -          if (!isEmbedded) { styleCache[token] = style; }
    -        }
    -
    -        var tokenStart = pos;
    -        pos += token.length;
    -
    -        if (!isEmbedded) {
    -          decorations.push(basePos + tokenStart, style);
    -        } else {  // Treat group 1 as an embedded block of source code.
    -          var embeddedSource = match[1];
    -          var embeddedSourceStart = token.indexOf(embeddedSource);
    -          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
    -          if (match[2]) {
    -            // If embeddedSource can be blank, then it would match at the
    -            // beginning which would cause us to infinitely recurse on the
    -            // entire token, so we catch the right context in match[2].
    -            embeddedSourceEnd = token.length - match[2].length;
    -            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
    -          }
    -          var lang = style.substring(5);
    -          // Decorate the left of the embedded source
    -          appendDecorations(
    -              sourceNode,
    -              basePos + tokenStart,
    -              token.substring(0, embeddedSourceStart),
    -              decorate, decorations);
    -          // Decorate the embedded source
    -          appendDecorations(
    -              sourceNode,
    -              basePos + tokenStart + embeddedSourceStart,
    -              embeddedSource,
    -              langHandlerForExtension(lang, embeddedSource),
    -              decorations);
    -          // Decorate the right of the embedded section
    -          appendDecorations(
    -              sourceNode,
    -              basePos + tokenStart + embeddedSourceEnd,
    -              token.substring(embeddedSourceEnd),
    -              decorate, decorations);
    -        }
    -      }
    -      job.decorations = decorations;
    -    };
    -    return decorate;
    -  }
    -
    -  /** returns a function that produces a list of decorations from source text.
    -    *
    -    * This code treats ", ', and ` as string delimiters, and \ as a string
    -    * escape.  It does not recognize perl's qq() style strings.
    -    * It has no special handling for double delimiter escapes as in basic, or
    -    * the tripled delimiters used in python, but should work on those regardless
    -    * although in those cases a single string literal may be broken up into
    -    * multiple adjacent string literals.
    -    *
    -    * It recognizes C, C++, and shell style comments.
    -    *
    -    * @param {Object} options a set of optional parameters.
    -    * @return {function (JobT)} a function that examines the source code
    -    *     in the input job and builds a decoration list which it attaches to
    -    *     the job.
    -    */
    -  function sourceDecorator(options) {
    -    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
    -    if (options['tripleQuotedStrings']) {
    -      // '''multi-line-string''', 'single-line-string', and double-quoted
    -      shortcutStylePatterns.push(
    -          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
    -           null, '\'"']);
    -    } else if (options['multiLineStrings']) {
    -      // 'multi-line-string', "multi-line-string"
    -      shortcutStylePatterns.push(
    -          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
    -           null, '\'"`']);
    -    } else {
    -      // 'single-line-string', "single-line-string"
    -      shortcutStylePatterns.push(
    -          [PR_STRING,
    -           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
    -           null, '"\'']);
    -    }
    -    if (options['verbatimStrings']) {
    -      // verbatim-string-literal production from the C# grammar.  See issue 93.
    -      fallthroughStylePatterns.push(
    -          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
    -    }
    -    var hc = options['hashComments'];
    -    if (hc) {
    -      if (options['cStyleComments']) {
    -        if (hc > 1) {  // multiline hash comments
    -          shortcutStylePatterns.push(
    -              [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
    -        } else {
    -          // Stop C preprocessor declarations at an unclosed open comment
    -          shortcutStylePatterns.push(
    -              [PR_COMMENT, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,
    -               null, '#']);
    -        }
    -        // #include <stdio.h>
    -        fallthroughStylePatterns.push(
    -            [PR_STRING,
    -             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
    -             null]);
    -      } else {
    -        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
    -      }
    -    }
    -    if (options['cStyleComments']) {
    -      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
    -      fallthroughStylePatterns.push(
    -          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
    -    }
    -    var regexLiterals = options['regexLiterals'];
    -    if (regexLiterals) {
    -      /**
    -       * @const
    -       */
    -      var regexExcls = regexLiterals > 1
    -        ? ''  // Multiline regex literals
    -        : '\n\r';
    -      /**
    -       * @const
    -       */
    -      var regexAny = regexExcls ? '.' : '[\\S\\s]';
    -      /**
    -       * @const
    -       */
    -      var REGEX_LITERAL = (
    -          // A regular expression literal starts with a slash that is
    -          // not followed by * or / so that it is not confused with
    -          // comments.
    -          '/(?=[^/*' + regexExcls + '])'
    -          // and then contains any number of raw characters,
    -          + '(?:[^/\\x5B\\x5C' + regexExcls + ']'
    -          // escape sequences (\x5C),
    -          +    '|\\x5C' + regexAny
    -          // or non-nesting character sets (\x5B\x5D);
    -          +    '|\\x5B(?:[^\\x5C\\x5D' + regexExcls + ']'
    -          +             '|\\x5C' + regexAny + ')*(?:\\x5D|$))+'
    -          // finally closed by a /.
    -          + '/');
    -      fallthroughStylePatterns.push(
    -          ['lang-regex',
    -           RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
    -           ]);
    -    }
    -
    -    var types = options['types'];
    -    if (types) {
    -      fallthroughStylePatterns.push([PR_TYPE, types]);
    -    }
    -
    -    var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
    -    if (keywords.length) {
    -      fallthroughStylePatterns.push(
    -          [PR_KEYWORD,
    -           new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
    -           null]);
    -    }
    -
    -    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
    -
    -    var punctuation =
    -      // The Bash man page says
    -
    -      // A word is a sequence of characters considered as a single
    -      // unit by GRUB. Words are separated by metacharacters,
    -      // which are the following plus space, tab, and newline: { }
    -      // | & $ ; < >
    -      // ...
    -
    -      // A word beginning with # causes that word and all remaining
    -      // characters on that line to be ignored.
    -
    -      // which means that only a '#' after /(?:^|[{}|&$;<>\s])/ starts a
    -      // comment but empirically
    -      // $ echo {#}
    -      // {#}
    -      // $ echo \$#
    -      // $#
    -      // $ echo }#
    -      // }#
    -
    -      // so /(?:^|[|&;<>\s])/ is more appropriate.
    -
    -      // http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC3
    -      // suggests that this definition is compatible with a
    -      // default mode that tries to use a single token definition
    -      // to recognize both bash/python style comments and C
    -      // preprocessor directives.
    -
    -      // This definition of punctuation does not include # in the list of
    -      // follow-on exclusions, so # will not be broken before if preceeded
    -      // by a punctuation character.  We could try to exclude # after
    -      // [|&;<>] but that doesn't seem to cause many major problems.
    -      // If that does turn out to be a problem, we should change the below
    -      // when hc is truthy to include # in the run of punctuation characters
    -      // only when not followint [|&;<>].
    -      '^.[^\\s\\w.$@\'"`/\\\\]*';
    -    if (options['regexLiterals']) {
    -      punctuation += '(?!\s*\/)';
    -    }
    -
    -    fallthroughStylePatterns.push(
    -        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
    -        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
    -        [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
    -        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
    -        [PR_LITERAL,
    -         new RegExp(
    -             '^(?:'
    -             // A hex number
    -             + '0x[a-f0-9]+'
    -             // or an octal or decimal number,
    -             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
    -             // possibly in scientific notation
    -             + '(?:e[+\\-]?\\d+)?'
    -             + ')'
    -             // with an optional modifier like UL for unsigned long
    -             + '[a-z]*', 'i'),
    -         null, '0123456789'],
    -        // Don't treat escaped quotes in bash as starting strings.
    -        // See issue 144.
    -        [PR_PLAIN,       /^\\[\s\S]?/, null],
    -        [PR_PUNCTUATION, new RegExp(punctuation), null]);
    -
    -    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
    -  }
    -
    -  var decorateSource = sourceDecorator({
    -        'keywords': ALL_KEYWORDS,
    -        'hashComments': true,
    -        'cStyleComments': true,
    -        'multiLineStrings': true,
    -        'regexLiterals': true
    -      });
    -
    -  /**
    -   * Given a DOM subtree, wraps it in a list, and puts each line into its own
    -   * list item.
    -   *
    -   * @param {Node} node modified in place.  Its content is pulled into an
    -   *     HTMLOListElement, and each line is moved into a separate list item.
    -   *     This requires cloning elements, so the input might not have unique
    -   *     IDs after numbering.
    -   * @param {number|null|boolean} startLineNum
    -   *     If truthy, coerced to an integer which is the 1-indexed line number
    -   *     of the first line of code.  The number of the first line will be
    -   *     attached to the list.
    -   * @param {boolean} isPreformatted true iff white-space in text nodes should
    -   *     be treated as significant.
    -   */
    -  function numberLines(node, startLineNum, isPreformatted) {
    -    var nocode = /(?:^|\s)nocode(?:\s|$)/;
    -    var lineBreak = /\r\n?|\n/;
    -  
    -    var document = node.ownerDocument;
    -  
    -    var li = document.createElement('li');
    -    while (node.firstChild) {
    -      li.appendChild(node.firstChild);
    -    }
    -    // An array of lines.  We split below, so this is initialized to one
    -    // un-split line.
    -    var listItems = [li];
    -  
    -    function walk(node) {
    -      var type = node.nodeType;
    -      if (type == 1 && !nocode.test(node.className)) {  // Element
    -        if ('br' === node.nodeName) {
    -          breakAfter(node);
    -          // Discard the <BR> since it is now flush against a </LI>.
    -          if (node.parentNode) {
    -            node.parentNode.removeChild(node);
    -          }
    -        } else {
    -          for (var child = node.firstChild; child; child = child.nextSibling) {
    -            walk(child);
    -          }
    -        }
    -      } else if ((type == 3 || type == 4) && isPreformatted) {  // Text
    -        var text = node.nodeValue;
    -        var match = text.match(lineBreak);
    -        if (match) {
    -          var firstLine = text.substring(0, match.index);
    -          node.nodeValue = firstLine;
    -          var tail = text.substring(match.index + match[0].length);
    -          if (tail) {
    -            var parent = node.parentNode;
    -            parent.insertBefore(
    -              document.createTextNode(tail), node.nextSibling);
    -          }
    -          breakAfter(node);
    -          if (!firstLine) {
    -            // Don't leave blank text nodes in the DOM.
    -            node.parentNode.removeChild(node);
    -          }
    -        }
    -      }
    -    }
    -  
    -    // Split a line after the given node.
    -    function breakAfter(lineEndNode) {
    -      // If there's nothing to the right, then we can skip ending the line
    -      // here, and move root-wards since splitting just before an end-tag
    -      // would require us to create a bunch of empty copies.
    -      while (!lineEndNode.nextSibling) {
    -        lineEndNode = lineEndNode.parentNode;
    -        if (!lineEndNode) { return; }
    -      }
    -  
    -      function breakLeftOf(limit, copy) {
    -        // Clone shallowly if this node needs to be on both sides of the break.
    -        var rightSide = copy ? limit.cloneNode(false) : limit;
    -        var parent = limit.parentNode;
    -        if (parent) {
    -          // We clone the parent chain.
    -          // This helps us resurrect important styling elements that cross lines.
    -          // E.g. in <i>Foo<br>Bar</i>
    -          // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
    -          var parentClone = breakLeftOf(parent, 1);
    -          // Move the clone and everything to the right of the original
    -          // onto the cloned parent.
    -          var next = limit.nextSibling;
    -          parentClone.appendChild(rightSide);
    -          for (var sibling = next; sibling; sibling = next) {
    -            next = sibling.nextSibling;
    -            parentClone.appendChild(sibling);
    -          }
    -        }
    -        return rightSide;
    -      }
    -  
    -      var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
    -  
    -      // Walk the parent chain until we reach an unattached LI.
    -      for (var parent;
    -           // Check nodeType since IE invents document fragments.
    -           (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
    -        copiedListItem = parent;
    -      }
    -      // Put it on the list of lines for later processing.
    -      listItems.push(copiedListItem);
    -    }
    -  
    -    // Split lines while there are lines left to split.
    -    for (var i = 0;  // Number of lines that have been split so far.
    -         i < listItems.length;  // length updated by breakAfter calls.
    -         ++i) {
    -      walk(listItems[i]);
    -    }
    -  
    -    // Make sure numeric indices show correctly.
    -    if (startLineNum === (startLineNum|0)) {
    -      listItems[0].setAttribute('value', startLineNum);
    -    }
    -  
    -    var ol = document.createElement('ol');
    -    ol.className = 'linenums';
    -    var offset = Math.max(0, ((startLineNum - 1 /* zero index */)) | 0) || 0;
    -    for (var i = 0, n = listItems.length; i < n; ++i) {
    -      li = listItems[i];
    -      // Stick a class on the LIs so that stylesheets can
    -      // color odd/even rows, or any other row pattern that
    -      // is co-prime with 10.
    -      li.className = 'L' + ((i + offset) % 10);
    -      if (!li.firstChild) {
    -        li.appendChild(document.createTextNode('\xA0'));
    -      }
    -      ol.appendChild(li);
    -    }
    -  
    -    node.appendChild(ol);
    -  }
    -
    -  /**
    -   * Breaks {@code job.sourceCode} around style boundaries in
    -   * {@code job.decorations} and modifies {@code job.sourceNode} in place.
    -   * @param {JobT} job
    -   * @private
    -   */
    -  function recombineTagsAndDecorations(job) {
    -    var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
    -    isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
    -    var newlineRe = /\n/g;
    -  
    -    var source = job.sourceCode;
    -    var sourceLength = source.length;
    -    // Index into source after the last code-unit recombined.
    -    var sourceIndex = 0;
    -  
    -    var spans = job.spans;
    -    var nSpans = spans.length;
    -    // Index into spans after the last span which ends at or before sourceIndex.
    -    var spanIndex = 0;
    -  
    -    var decorations = job.decorations;
    -    var nDecorations = decorations.length;
    -    // Index into decorations after the last decoration which ends at or before
    -    // sourceIndex.
    -    var decorationIndex = 0;
    -  
    -    // Remove all zero-length decorations.
    -    decorations[nDecorations] = sourceLength;
    -    var decPos, i;
    -    for (i = decPos = 0; i < nDecorations;) {
    -      if (decorations[i] !== decorations[i + 2]) {
    -        decorations[decPos++] = decorations[i++];
    -        decorations[decPos++] = decorations[i++];
    -      } else {
    -        i += 2;
    -      }
    -    }
    -    nDecorations = decPos;
    -  
    -    // Simplify decorations.
    -    for (i = decPos = 0; i < nDecorations;) {
    -      var startPos = decorations[i];
    -      // Conflate all adjacent decorations that use the same style.
    -      var startDec = decorations[i + 1];
    -      var end = i + 2;
    -      while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
    -        end += 2;
    -      }
    -      decorations[decPos++] = startPos;
    -      decorations[decPos++] = startDec;
    -      i = end;
    -    }
    -  
    -    nDecorations = decorations.length = decPos;
    -  
    -    var sourceNode = job.sourceNode;
    -    var oldDisplay = "";
    -    if (sourceNode) {
    -      oldDisplay = sourceNode.style.display;
    -      sourceNode.style.display = 'none';
    -    }
    -    try {
    -      var decoration = null;
    -      while (spanIndex < nSpans) {
    -        var spanStart = spans[spanIndex];
    -        var spanEnd = /** @type{number} */ (spans[spanIndex + 2])
    -            || sourceLength;
    -  
    -        var decEnd = decorations[decorationIndex + 2] || sourceLength;
    -  
    -        var end = Math.min(spanEnd, decEnd);
    -  
    -        var textNode = /** @type{Node} */ (spans[spanIndex + 1]);
    -        var styledText;
    -        if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
    -            // Don't introduce spans around empty text nodes.
    -            && (styledText = source.substring(sourceIndex, end))) {
    -          // This may seem bizarre, and it is.  Emitting LF on IE causes the
    -          // code to display with spaces instead of line breaks.
    -          // Emitting Windows standard issue linebreaks (CRLF) causes a blank
    -          // space to appear at the beginning of every line but the first.
    -          // Emitting an old Mac OS 9 line separator makes everything spiffy.
    -          if (isIE8OrEarlier) {
    -            styledText = styledText.replace(newlineRe, '\r');
    -          }
    -          textNode.nodeValue = styledText;
    -          var document = textNode.ownerDocument;
    -          var span = document.createElement('span');
    -          span.className = decorations[decorationIndex + 1];
    -          var parentNode = textNode.parentNode;
    -          parentNode.replaceChild(span, textNode);
    -          span.appendChild(textNode);
    -          if (sourceIndex < spanEnd) {  // Split off a text node.
    -            spans[spanIndex + 1] = textNode
    -                // TODO: Possibly optimize by using '' if there's no flicker.
    -                = document.createTextNode(source.substring(end, spanEnd));
    -            parentNode.insertBefore(textNode, span.nextSibling);
    -          }
    -        }
    -  
    -        sourceIndex = end;
    -  
    -        if (sourceIndex >= spanEnd) {
    -          spanIndex += 2;
    -        }
    -        if (sourceIndex >= decEnd) {
    -          decorationIndex += 2;
    -        }
    -      }
    -    } finally {
    -      if (sourceNode) {
    -        sourceNode.style.display = oldDisplay;
    -      }
    -    }
    -  }
    -
    -  /** Maps language-specific file extensions to handlers. */
    -  var langHandlerRegistry = {};
    -  /** Register a language handler for the given file extensions.
    -    * @param {function (JobT)} handler a function from source code to a list
    -    *      of decorations.  Takes a single argument job which describes the
    -    *      state of the computation and attaches the decorations to it.
    -    * @param {Array.<string>} fileExtensions
    -    */
    -  function registerLangHandler(handler, fileExtensions) {
    -    for (var i = fileExtensions.length; --i >= 0;) {
    -      var ext = fileExtensions[i];
    -      if (!langHandlerRegistry.hasOwnProperty(ext)) {
    -        langHandlerRegistry[ext] = handler;
    -      } else if (win['console']) {
    -        console['warn']('cannot override language handler %s', ext);
    -      }
    -    }
    -  }
    -  function langHandlerForExtension(extension, source) {
    -    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
    -      // Treat it as markup if the first non whitespace character is a < and
    -      // the last non-whitespace character is a >.
    -      extension = /^\s*</.test(source)
    -          ? 'default-markup'
    -          : 'default-code';
    -    }
    -    return langHandlerRegistry[extension];
    -  }
    -  registerLangHandler(decorateSource, ['default-code']);
    -  registerLangHandler(
    -      createSimpleLexer(
    -          [],
    -          [
    -           [PR_PLAIN,       /^[^<?]+/],
    -           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
    -           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
    -           // Unescaped content in an unknown language
    -           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
    -           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
    -           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
    -           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
    -           // Unescaped content in javascript.  (Or possibly vbscript).
    -           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
    -           // Contains unescaped stylesheet content
    -           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
    -           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
    -          ]),
    -      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
    -  registerLangHandler(
    -      createSimpleLexer(
    -          [
    -           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
    -           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
    -           ],
    -          [
    -           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
    -           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
    -           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
    -           [PR_PUNCTUATION,  /^[=<>\/]+/],
    -           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
    -           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
    -           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
    -           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
    -           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
    -           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
    -           ]),
    -      ['in.tag']);
    -  registerLangHandler(
    -      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': CPP_KEYWORDS,
    -          'hashComments': true,
    -          'cStyleComments': true,
    -          'types': C_TYPES
    -        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': 'null,true,false'
    -        }), ['json']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': CSHARP_KEYWORDS,
    -          'hashComments': true,
    -          'cStyleComments': true,
    -          'verbatimStrings': true,
    -          'types': C_TYPES
    -        }), ['cs']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': JAVA_KEYWORDS,
    -          'cStyleComments': true
    -        }), ['java']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': SH_KEYWORDS,
    -          'hashComments': true,
    -          'multiLineStrings': true
    -        }), ['bash', 'bsh', 'csh', 'sh']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': PYTHON_KEYWORDS,
    -          'hashComments': true,
    -          'multiLineStrings': true,
    -          'tripleQuotedStrings': true
    -        }), ['cv', 'py', 'python']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': PERL_KEYWORDS,
    -          'hashComments': true,
    -          'multiLineStrings': true,
    -          'regexLiterals': 2  // multiline regex literals
    -        }), ['perl', 'pl', 'pm']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': RUBY_KEYWORDS,
    -          'hashComments': true,
    -          'multiLineStrings': true,
    -          'regexLiterals': true
    -        }), ['rb', 'ruby']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': JSCRIPT_KEYWORDS,
    -          'cStyleComments': true,
    -          'regexLiterals': true
    -        }), ['javascript', 'js', 'ts', 'typescript']);
    -  registerLangHandler(sourceDecorator({
    -          'keywords': COFFEE_KEYWORDS,
    -          'hashComments': 3,  // ### style block comments
    -          'cStyleComments': true,
    -          'multilineStrings': true,
    -          'tripleQuotedStrings': true,
    -          'regexLiterals': true
    -        }), ['coffee']);
    -  registerLangHandler(
    -      createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
    -
    -  /** @param {JobT} job */
    -  function applyDecorator(job) {
    -    var opt_langExtension = job.langExtension;
    -
    -    try {
    -      // Extract tags, and convert the source code to plain text.
    -      var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre);
    -      /** Plain text. @type {string} */
    -      var source = sourceAndSpans.sourceCode;
    -      job.sourceCode = source;
    -      job.spans = sourceAndSpans.spans;
    -      job.basePos = 0;
    -
    -      // Apply the appropriate language handler
    -      langHandlerForExtension(opt_langExtension, source)(job);
    -
    -      // Integrate the decorations and tags back into the source code,
    -      // modifying the sourceNode in place.
    -      recombineTagsAndDecorations(job);
    -    } catch (e) {
    -      if (win['console']) {
    -        console['log'](e && e['stack'] || e);
    -      }
    -    }
    -  }
    -
    -  /**
    -   * Pretty print a chunk of code.
    -   * @param sourceCodeHtml {string} The HTML to pretty print.
    -   * @param opt_langExtension {string} The language name to use.
    -   *     Typically, a filename extension like 'cpp' or 'java'.
    -   * @param opt_numberLines {number|boolean} True to number lines,
    -   *     or the 1-indexed number of the first line in sourceCodeHtml.
    -   */
    -  function $prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
    -    /** @type{number|boolean} */
    -    var nl = opt_numberLines || false;
    -    /** @type{string|null} */
    -    var langExtension = opt_langExtension || null;
    -    /** @type{!Element} */
    -    var container = document.createElement('div');
    -    // This could cause images to load and onload listeners to fire.
    -    // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
    -    // We assume that the inner HTML is from a trusted source.
    -    // The pre-tag is required for IE8 which strips newlines from innerHTML
    -    // when it is injected into a <pre> tag.
    -    // http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie
    -    // http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript
    -    container.innerHTML = '<pre>' + sourceCodeHtml + '</pre>';
    -    container = /** @type{!Element} */(container.firstChild);
    -    if (nl) {
    -      numberLines(container, nl, true);
    -    }
    -
    -    /** @type{JobT} */
    -    var job = {
    -      langExtension: langExtension,
    -      numberLines: nl,
    -      sourceNode: container,
    -      pre: 1,
    -      sourceCode: null,
    -      basePos: null,
    -      spans: null,
    -      decorations: null
    -    };
    -    applyDecorator(job);
    -    return container.innerHTML;
    -  }
    -
    -   /**
    -    * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
    -    * {@code class=prettyprint} and prettify them.
    -    *
    -    * @param {Function} opt_whenDone called when prettifying is done.
    -    * @param {HTMLElement|HTMLDocument} opt_root an element or document
    -    *   containing all the elements to pretty print.
    -    *   Defaults to {@code document.body}.
    -    */
    -  function $prettyPrint(opt_whenDone, opt_root) {
    -    var root = opt_root || document.body;
    -    var doc = root.ownerDocument || document;
    -    function byTagName(tn) { return root.getElementsByTagName(tn); }
    -    // fetch a list of nodes to rewrite
    -    var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
    -    var elements = [];
    -    for (var i = 0; i < codeSegments.length; ++i) {
    -      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
    -        elements.push(codeSegments[i][j]);
    -      }
    -    }
    -    codeSegments = null;
    -
    -    var clock = Date;
    -    if (!clock['now']) {
    -      clock = { 'now': function () { return +(new Date); } };
    -    }
    -
    -    // The loop is broken into a series of continuations to make sure that we
    -    // don't make the browser unresponsive when rewriting a large page.
    -    var k = 0;
    -
    -    var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
    -    var prettyPrintRe = /\bprettyprint\b/;
    -    var prettyPrintedRe = /\bprettyprinted\b/;
    -    var preformattedTagNameRe = /pre|xmp/i;
    -    var codeRe = /^code$/i;
    -    var preCodeXmpRe = /^(?:pre|code|xmp)$/i;
    -    var EMPTY = {};
    -
    -    function doWork() {
    -      var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
    -                     clock['now']() + 250 /* ms */ :
    -                     Infinity);
    -      for (; k < elements.length && clock['now']() < endTime; k++) {
    -        var cs = elements[k];
    -
    -        // Look for a preceding comment like
    -        // <?prettify lang="..." linenums="..."?>
    -        var attrs = EMPTY;
    -        {
    -          for (var preceder = cs; (preceder = preceder.previousSibling);) {
    -            var nt = preceder.nodeType;
    -            // <?foo?> is parsed by HTML 5 to a comment node (8)
    -            // like <!--?foo?-->, but in XML is a processing instruction
    -            var value = (nt === 7 || nt === 8) && preceder.nodeValue;
    -            if (value
    -                ? !/^\??prettify\b/.test(value)
    -                : (nt !== 3 || /\S/.test(preceder.nodeValue))) {
    -              // Skip over white-space text nodes but not others.
    -              break;
    -            }
    -            if (value) {
    -              attrs = {};
    -              value.replace(
    -                  /\b(\w+)=([\w:.%+-]+)/g,
    -                function (_, name, value) { attrs[name] = value; });
    -              break;
    -            }
    -          }
    -        }
    -
    -        var className = cs.className;
    -        if ((attrs !== EMPTY || prettyPrintRe.test(className))
    -            // Don't redo this if we've already done it.
    -            // This allows recalling pretty print to just prettyprint elements
    -            // that have been added to the page since last call.
    -            && !prettyPrintedRe.test(className)) {
    -
    -          // make sure this is not nested in an already prettified element
    -          var nested = false;
    -          for (var p = cs.parentNode; p; p = p.parentNode) {
    -            var tn = p.tagName;
    -            if (preCodeXmpRe.test(tn)
    -                && p.className && prettyPrintRe.test(p.className)) {
    -              nested = true;
    -              break;
    -            }
    -          }
    -          if (!nested) {
    -            // Mark done.  If we fail to prettyprint for whatever reason,
    -            // we shouldn't try again.
    -            cs.className += ' prettyprinted';
    -
    -            // If the classes includes a language extensions, use it.
    -            // Language extensions can be specified like
    -            //     <pre class="prettyprint lang-cpp">
    -            // the language extension "cpp" is used to find a language handler
    -            // as passed to PR.registerLangHandler.
    -            // HTML5 recommends that a language be specified using "language-"
    -            // as the prefix instead.  Google Code Prettify supports both.
    -            // http://dev.w3.org/html5/spec-author-view/the-code-element.html
    -            var langExtension = attrs['lang'];
    -            if (!langExtension) {
    -              langExtension = className.match(langExtensionRe);
    -              // Support <pre class="prettyprint"><code class="language-c">
    -              var wrapper;
    -              if (!langExtension && (wrapper = childContentWrapper(cs))
    -                  && codeRe.test(wrapper.tagName)) {
    -                langExtension = wrapper.className.match(langExtensionRe);
    -              }
    -
    -              if (langExtension) { langExtension = langExtension[1]; }
    -            }
    -
    -            var preformatted;
    -            if (preformattedTagNameRe.test(cs.tagName)) {
    -              preformatted = 1;
    -            } else {
    -              var currentStyle = cs['currentStyle'];
    -              var defaultView = doc.defaultView;
    -              var whitespace = (
    -                  currentStyle
    -                  ? currentStyle['whiteSpace']
    -                  : (defaultView
    -                     && defaultView.getComputedStyle)
    -                  ? defaultView.getComputedStyle(cs, null)
    -                  .getPropertyValue('white-space')
    -                  : 0);
    -              preformatted = whitespace
    -                  && 'pre' === whitespace.substring(0, 3);
    -            }
    -
    -            // Look for a class like linenums or linenums:<n> where <n> is the
    -            // 1-indexed number of the first line.
    -            var lineNums = attrs['linenums'];
    -            if (!(lineNums = lineNums === 'true' || +lineNums)) {
    -              lineNums = className.match(/\blinenums\b(?::(\d+))?/);
    -              lineNums =
    -                lineNums
    -                ? lineNums[1] && lineNums[1].length
    -                  ? +lineNums[1] : true
    -                : false;
    -            }
    -            if (lineNums) { numberLines(cs, lineNums, preformatted); }
    -
    -            // do the pretty printing
    -            var prettyPrintingJob = {
    -              langExtension: langExtension,
    -              sourceNode: cs,
    -              numberLines: lineNums,
    -              pre: preformatted,
    -              sourceCode: null,
    -              basePos: null,
    -              spans: null,
    -              decorations: null
    -            };
    -            applyDecorator(prettyPrintingJob);
    -          }
    -        }
    -      }
    -      if (k < elements.length) {
    -        // finish up in a continuation
    -        win.setTimeout(doWork, 250);
    -      } else if ('function' === typeof opt_whenDone) {
    -        opt_whenDone();
    -      }
    -    }
    -
    -    doWork();
    -  }
    -
    -  /**
    -   * Contains functions for creating and registering new language handlers.
    -   * @type {Object}
    -   */
    -  var PR = win['PR'] = {
    -        'createSimpleLexer': createSimpleLexer,
    -        'registerLangHandler': registerLangHandler,
    -        'sourceDecorator': sourceDecorator,
    -        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
    -        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
    -        'PR_COMMENT': PR_COMMENT,
    -        'PR_DECLARATION': PR_DECLARATION,
    -        'PR_KEYWORD': PR_KEYWORD,
    -        'PR_LITERAL': PR_LITERAL,
    -        'PR_NOCODE': PR_NOCODE,
    -        'PR_PLAIN': PR_PLAIN,
    -        'PR_PUNCTUATION': PR_PUNCTUATION,
    -        'PR_SOURCE': PR_SOURCE,
    -        'PR_STRING': PR_STRING,
    -        'PR_TAG': PR_TAG,
    -        'PR_TYPE': PR_TYPE,
    -        'prettyPrintOne':
    -           IN_GLOBAL_SCOPE
    -             ? (win['prettyPrintOne'] = $prettyPrintOne)
    -             : (prettyPrintOne = $prettyPrintOne),
    -        'prettyPrint': prettyPrint =
    -           IN_GLOBAL_SCOPE
    -             ? (win['prettyPrint'] = $prettyPrint)
    -             : (prettyPrint = $prettyPrint)
    -      };
    -
    -  // Make PR available via the Asynchronous Module Definition (AMD) API.
    -  // Per https://github.com/amdjs/amdjs-api/wiki/AMD:
    -  // The Asynchronous Module Definition (AMD) API specifies a
    -  // mechanism for defining modules such that the module and its
    -  // dependencies can be asynchronously loaded.
    -  // ...
    -  // To allow a clear indicator that a global define function (as
    -  // needed for script src browser loading) conforms to the AMD API,
    -  // any global define function SHOULD have a property called "amd"
    -  // whose value is an object. This helps avoid conflict with any
    -  // other existing JavaScript code that could have defined a define()
    -  // function that does not conform to the AMD API.
    -  var define = win['define'];
    -  if (typeof define === "function" && define['amd']) {
    -    define("google-code-prettify", [], function () {
    -      return PR;
    -    });
    -  }
    -})();
    diff --git a/doc/slihelp_generator/assets/js/code-prettify/run_prettify.js b/doc/slihelp_generator/assets/js/code-prettify/run_prettify.js
    deleted file mode 100644
    index 8833b34f20..0000000000
    --- a/doc/slihelp_generator/assets/js/code-prettify/run_prettify.js
    +++ /dev/null
    @@ -1,1995 +0,0 @@
    -/**
    - * @license
    - * Copyright (C) 2013 Google Inc.
    - *
    - * Licensed under the Apache License, Version 2.0 (the "License");
    - * you may not use this file except in compliance with the License.
    - * You may obtain a copy of the License at
    - *
    - *      http://www.apache.org/licenses/LICENSE-2.0
    - *
    - * Unless required by applicable law or agreed to in writing, software
    - * distributed under the License is distributed on an "AS IS" BASIS,
    - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    - * See the License for the specific language governing permissions and
    - * limitations under the License.
    - */
    -
    -/**
    - * @fileoverview
    - * <div style="white-space: pre">
    - * Looks at query parameters to decide which language handlers and style-sheets
    - * to load.
    - *
    - * Query Parameter     Format           Effect                        Default
    - * +------------------+---------------+------------------------------+--------+
    - * | autorun=         | true | false  | If true then prettyPrint()   | "true" |
    - * |                  |               | is called on page load.      |        |
    - * +------------------+---------------+------------------------------+--------+
    - * | lang=            | language name | Loads the language handler   | Can    |
    - * |                  |               | named "lang-<NAME>.js".      | appear |
    - * |                  |               | See available handlers at    | many   |
    - * |                  |               | https://github.com/google/   | times. |
    - * |                  |               | code-prettify/tree/master/   |        |
    - * |                  |               | src                          |        |
    - * +------------------+---------------+------------------------------+--------+
    - * | skin=            | skin name     | Loads the skin stylesheet    | none.  |
    - * |                  |               | named "<NAME>.css".          |        |
    - * |                  |               | https://cdn.rawgit.com/      |        |
    - * |                  |               | google/code-prettify/master/ |        |
    - * |                  |               | styles/index.html            |        |
    - * +------------------+---------------+------------------------------+--------+
    - * | callback=        | JS identifier | When "prettyPrint" finishes  | none   |
    - * |                  |               | window.exports[js_ident] is  |        |
    - * |                  |               | called.                      |        |
    - * |                  |               | The callback must be under   |        |
    - * |                  |               | exports to reduce the risk   |        |
    - * |                  |               | of XSS via query parameter   |        |
    - * |                  |               | injection.                   |        |
    - * +------------------+---------------+------------------------------+--------+
    - *
    - * Exmaples
    - * .../prettify.js?lang=css&skin=sunburst
    - *   1. Loads the CSS language handler which can be used to prettify CSS
    - *      stylesheets, HTML <style> element bodies and style="..." attributes
    - *      values.
    - *   2. Loads the sunburst.css stylesheet instead of the default prettify.css
    - *      stylesheet.
    - *      A gallery of stylesheets is available at
    - *      https://cdn.rawgit.com/google/code-prettify/master/styles/index.html
    - *   3. Since autorun=false is not specified, calls prettyPrint() on page load.
    - * </div>
    - */
    -
    -/**
    -* @typedef {!Array.<number|string>}
    -* Alternating indices and the decorations that should be inserted there.
    -* The indices are monotonically increasing.
    -*/
    -var DecorationsT;
    -
    -/**
    -* @typedef {!{
    -*   sourceNode: !Element,
    -*   pre: !(number|boolean),
    -*   langExtension: ?string,
    -*   numberLines: ?(number|boolean),
    -*   sourceCode: ?string,
    -*   spans: ?(Array.<number|Node>),
    -*   basePos: ?number,
    -*   decorations: ?DecorationsT
    -* }}
    -* <dl>
    -*  <dt>sourceNode<dd>the element containing the source
    -*  <dt>sourceCode<dd>source as plain text
    -*  <dt>pre<dd>truthy if white-space in text nodes
    -*     should be considered significant.
    -*  <dt>spans<dd> alternating span start indices into source
    -*     and the text node or element (e.g. {@code <BR>}) corresponding to that
    -*     span.
    -*  <dt>decorations<dd>an array of style classes preceded
    -*     by the position at which they start in job.sourceCode in order
    -*  <dt>basePos<dd>integer position of this.sourceCode in the larger chunk of
    -*     source.
    -* </dl>
    -*/
    -var JobT;
    -
    -/**
    -* @typedef {!{
    -*   sourceCode: string,
    -*   spans: !(Array.<number|Node>)
    -* }}
    -* <dl>
    -*  <dt>sourceCode<dd>source as plain text
    -*  <dt>spans<dd> alternating span start indices into source
    -*     and the text node or element (e.g. {@code <BR>}) corresponding to that
    -*     span.
    -* </dl>
    -*/
    -var SourceSpansT;
    -
    -/** @define {boolean} */
    -var IN_GLOBAL_SCOPE = false;
    -
    -(function () {
    -  "use strict";
    -
    -  var win = window;
    -  var doc = document;
    -  var root = doc.documentElement;
    -  var head = doc['head'] || doc.getElementsByTagName("head")[0] || root;
    -
    -  // From http://javascript.nwbox.com/ContentLoaded/contentloaded.js
    -  // Author: Diego Perini (diego.perini at gmail.com)
    -  // Summary: cross-browser wrapper for DOMContentLoaded
    -  // Updated: 20101020
    -  // License: MIT
    -  // Version: 1.2
    -  function contentLoaded(callback) {
    -    var addEventListener = doc['addEventListener'];
    -    var done = false, top = true,
    -        add = addEventListener ? 'addEventListener' : 'attachEvent',
    -        rem = addEventListener ? 'removeEventListener' : 'detachEvent',
    -        pre = addEventListener ? '' : 'on',
    -
    -        init = function(e) {
    -          if (e.type == 'readystatechange' && doc.readyState != 'complete') {
    -            return;
    -          }
    -          (e.type == 'load' ? win : doc)[rem](pre + e.type, init, false);
    -          if (!done && (done = true)) { callback.call(win, e.type || e); }
    -        },
    -
    -        poll = function() {
    -          try {
    -            root.doScroll('left');
    -          } catch(e) {
    -            win.setTimeout(poll, 50);
    -            return;
    -          }
    -          init('poll');
    -        };
    -
    -    if (doc.readyState == 'complete') {
    -      callback.call(win, 'lazy');
    -    } else {
    -      if (doc.createEventObject && root.doScroll) {
    -        try { top = !win.frameElement; } catch(e) { }
    -        if (top) { poll(); }
    -      }
    -      doc[add](pre + 'DOMContentLoaded', init, false);
    -      doc[add](pre + 'readystatechange', init, false);
    -      win[add](pre + 'load', init, false);
    -    }
    -  }
    -
    -  // Given a list of URLs to stylesheets, loads the first that loads without
    -  // triggering an error event.
    -  function loadStylesheetsFallingBack(stylesheets) {
    -    var n = stylesheets.length;
    -    function load(i) {
    -      if (i === n) { return; }
    -      var link = doc.createElement('link');
    -      link.rel = 'stylesheet';
    -      link.type = 'text/css';
    -      if (i + 1 < n) {
    -        // http://pieisgood.org/test/script-link-events/ indicates that many
    -        // versions of IE do not support onerror on <link>s, though
    -        // http://msdn.microsoft.com/en-us/library/ie/ms535848(v=vs.85).aspx
    -        // indicates that recent IEs do support error.
    -        link.error = link.onerror = function () { load(i + 1); };
    -      }
    -      link.href = stylesheets[i];
    -      head.appendChild(link);
    -    }
    -    load(0);
    -  }
    -
    -  var scriptQuery = '';
    -  // Look for the <script> node that loads this script to get its parameters.
    -  // This starts looking at the end instead of just considering the last
    -  // because deferred and async scripts run out of order.
    -  // If the script is loaded twice, then this will run in reverse order.
    -  var scripts = doc.getElementsByTagName('script');
    -  for (var i = scripts.length; --i >= 0;) {
    -    var script = scripts[i];
    -    var match = script.src.match(
    -        /^[^?#]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);
    -    if (match) {
    -      scriptQuery = match[1] || '';
    -      // Remove the script from the DOM so that multiple runs at least run
    -      // multiple times even if parameter sets are interpreted in reverse
    -      // order.
    -      script.parentNode.removeChild(script);
    -      break;
    -    }
    -  }
    -
    -  // Pull parameters into local variables.
    -  var autorun = true;
    -  var langs = [];
    -  var skins = [];
    -  var callbacks = [];
    -  scriptQuery.replace(
    -      /[?&]([^&=]+)=([^&]+)/g,
    -      function (_, name, value) {
    -        value = decodeURIComponent(value);
    -        name = decodeURIComponent(name);
    -        if (name == 'autorun')   { autorun = !/^[0fn]/i.test(value); } else
    -        if (name == 'lang')      { langs.push(value);                } else
    -        if (name == 'skin')      { skins.push(value);                } else
    -        if (name == 'callback')  { callbacks.push(value);            }
    -      });
    -
    -  // Use https to avoid mixed content warnings in client pages and to
    -  // prevent a MITM from rewrite prettify mid-flight.
    -  // This only works if this script is loaded via https : something
    -  // over which we exercise no control.
    -  var LOADER_BASE_URL =
    -     'https://cdn.rawgit.com/google/code-prettify/master/loader';
    -
    -  for (var i = 0, n = langs.length; i < n; ++i) (function (lang) {
    -    var script = doc.createElement("script");
    -
    -    // Excerpted from jQuery.ajaxTransport("script") to fire events when
    -    // a script is finished loading.
    -    // Attach handlers for each script
    -    script.onload = script.onerror = script.onreadystatechange = function () {
    -      if (script && (
    -            !script.readyState || /loaded|complete/.test(script.readyState))) {
    -        // Handle memory leak in IE
    -        script.onerror = script.onload = script.onreadystatechange = null;
    -
    -        --pendingLanguages;
    -        checkPendingLanguages();
    -
    -        // Remove the script
    -        if (script.parentNode) {
    -          script.parentNode.removeChild(script);
    -        }
    -
    -        script = null;
    -      }
    -    };
    -
    -    script.type = 'text/javascript';
    -    script.src = LOADER_BASE_URL
    -      + '/lang-' + encodeURIComponent(langs[i]) + '.js';
    -
    -    // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
    -    head.insertBefore(script, head.firstChild);
    -  })(langs[i]);
    -
    -  var pendingLanguages = langs.length;
    -  function checkPendingLanguages() {
    -    if (!pendingLanguages) {
    -      win.setTimeout(onLangsLoaded, 0);
    -    }
    -  }
    -
    -  var skinUrls = [];
    -  for (var i = 0, n = skins.length; i < n; ++i) {
    -    skinUrls.push(LOADER_BASE_URL
    -        + '/skins/' + encodeURIComponent(skins[i]) + '.css');
    -  }
    -  skinUrls.push(LOADER_BASE_URL + '/prettify.css');
    -  loadStylesheetsFallingBack(skinUrls);
    -
    -  var prettyPrint = (function () {
    -    /**
    -     * @license
    -     * Copyright (C) 2006 Google Inc.
    -     *
    -     * Licensed under the Apache License, Version 2.0 (the "License");
    -     * you may not use this file except in compliance with the License.
    -     * You may obtain a copy of the License at
    -     *
    -     *      http://www.apache.org/licenses/LICENSE-2.0
    -     *
    -     * Unless required by applicable law or agreed to in writing, software
    -     * distributed under the License is distributed on an "AS IS" BASIS,
    -     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    -     * See the License for the specific language governing permissions and
    -     * limitations under the License.
    -     */
    -    
    -    /**
    -     * @fileoverview
    -     * some functions for browser-side pretty printing of code contained in html.
    -     *
    -     * <p>
    -     * For a fairly comprehensive set of languages see the
    -     * <a href="https://github.com/google/code-prettify#for-which-languages-does-it-work">README</a>
    -     * file that came with this source.  At a minimum, the lexer should work on a
    -     * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
    -     * XML, CSS, Javascript, and Makefiles.  It works passably on Ruby, PHP and Awk
    -     * and a subset of Perl, but, because of commenting conventions, doesn't work on
    -     * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
    -     * <p>
    -     * Usage: <ol>
    -     * <li> include this source file in an html page via
    -     *   {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
    -     * <li> define style rules.  See the example page for examples.
    -     * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
    -     *    {@code class=prettyprint.}
    -     *    You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
    -     *    printer needs to do more substantial DOM manipulations to support that, so
    -     *    some css styles may not be preserved.
    -     * </ol>
    -     * That's it.  I wanted to keep the API as simple as possible, so there's no
    -     * need to specify which language the code is in, but if you wish, you can add
    -     * another class to the {@code <pre>} or {@code <code>} element to specify the
    -     * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
    -     * starts with "lang-" followed by a file extension, specifies the file type.
    -     * See the "lang-*.js" files in this directory for code that implements
    -     * per-language file handlers.
    -     * <p>
    -     * Change log:<br>
    -     * cbeust, 2006/08/22
    -     * <blockquote>
    -     *   Java annotations (start with "@") are now captured as literals ("lit")
    -     * </blockquote>
    -     * @requires console
    -     */
    -    
    -    // JSLint declarations
    -    /*global console, document, navigator, setTimeout, window, define */
    -    
    -    
    -    /**
    -     * {@type !{
    -     *   'createSimpleLexer': function (Array, Array): (function (JobT)),
    -     *   'registerLangHandler': function (function (JobT), Array.<string>),
    -     *   'PR_ATTRIB_NAME': string,
    -     *   'PR_ATTRIB_NAME': string,
    -     *   'PR_ATTRIB_VALUE': string,
    -     *   'PR_COMMENT': string,
    -     *   'PR_DECLARATION': string,
    -     *   'PR_KEYWORD': string,
    -     *   'PR_LITERAL': string,
    -     *   'PR_NOCODE': string,
    -     *   'PR_PLAIN': string,
    -     *   'PR_PUNCTUATION': string,
    -     *   'PR_SOURCE': string,
    -     *   'PR_STRING': string,
    -     *   'PR_TAG': string,
    -     *   'PR_TYPE': string,
    -     *   'prettyPrintOne': function (string, string, number|boolean),
    -     *   'prettyPrint': function (?function, ?(HTMLElement|HTMLDocument))
    -     * }}
    -     * @const
    -     */
    -    var PR;
    -    
    -    /**
    -     * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
    -     * UI events.
    -     * If set to {@code false}, {@code prettyPrint()} is synchronous.
    -     */
    -    window['PR_SHOULD_USE_CONTINUATION'] = true;
    -    
    -    /**
    -     * Pretty print a chunk of code.
    -     * @param {string} sourceCodeHtml The HTML to pretty print.
    -     * @param {string} opt_langExtension The language name to use.
    -     *     Typically, a filename extension like 'cpp' or 'java'.
    -     * @param {number|boolean} opt_numberLines True to number lines,
    -     *     or the 1-indexed number of the first line in sourceCodeHtml.
    -     * @return {string} code as html, but prettier
    -     */
    -    var prettyPrintOne;
    -    /**
    -     * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
    -     * {@code class=prettyprint} and prettify them.
    -     *
    -     * @param {Function} opt_whenDone called when prettifying is done.
    -     * @param {HTMLElement|HTMLDocument} opt_root an element or document
    -     *   containing all the elements to pretty print.
    -     *   Defaults to {@code document.body}.
    -     */
    -    var prettyPrint;
    -    
    -    
    -    (function () {
    -      var win = window;
    -      // Keyword lists for various languages.
    -      // We use things that coerce to strings to make them compact when minified
    -      // and to defeat aggressive optimizers that fold large string constants.
    -      var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
    -      var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +
    -          "double,enum,extern,float,goto,inline,int,long,register,short,signed," +
    -          "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
    -      var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
    -          "new,operator,private,protected,public,this,throw,true,try,typeof"];
    -      var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
    -          "concept,concept_map,const_cast,constexpr,decltype,delegate," +
    -          "dynamic_cast,explicit,export,friend,generic,late_check," +
    -          "mutable,namespace,nullptr,property,reinterpret_cast,static_assert," +
    -          "static_cast,template,typeid,typename,using,virtual,where"];
    -      var JAVA_KEYWORDS = [COMMON_KEYWORDS,
    -          "abstract,assert,boolean,byte,extends,finally,final,implements,import," +
    -          "instanceof,interface,null,native,package,strictfp,super,synchronized," +
    -          "throws,transient"];
    -      var CSHARP_KEYWORDS = [COMMON_KEYWORDS,
    -          "abstract,as,async,await,base,bool,by,byte,checked,decimal,delegate,descending," +
    -          "dynamic,event,finally,fixed,foreach,from,group,implicit,in,interface," +
    -          "internal,into,is,let,lock,null,object,out,override,orderby,params," +
    -          "partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong," +
    -          "unchecked,unsafe,ushort,var,virtual,where"];
    -      var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
    -          "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
    -          "throw,true,try,unless,until,when,while,yes";
    -      var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
    -          "debugger,eval,export,function,get,instanceof,null,set,undefined," +
    -          "var,with,Infinity,NaN"];
    -      var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
    -          "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
    -          "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
    -      var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
    -          "elif,except,exec,finally,from,global,import,in,is,lambda," +
    -          "nonlocal,not,or,pass,print,raise,try,with,yield," +
    -          "False,True,None"];
    -      var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
    -          "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
    -          "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
    -          "BEGIN,END"];
    -      var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
    -          "function,in,local,set,then,until"];
    -      var ALL_KEYWORDS = [
    -          CPP_KEYWORDS, CSHARP_KEYWORDS, JAVA_KEYWORDS, JSCRIPT_KEYWORDS,
    -          PERL_KEYWORDS, PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
    -      var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
    -    
    -      // token style names.  correspond to css classes
    -      /**
    -       * token style for a string literal
    -       * @const
    -       */
    -      var PR_STRING = 'str';
    -      /**
    -       * token style for a keyword
    -       * @const
    -       */
    -      var PR_KEYWORD = 'kwd';
    -      /**
    -       * token style for a comment
    -       * @const
    -       */
    -      var PR_COMMENT = 'com';
    -      /**
    -       * token style for a type
    -       * @const
    -       */
    -      var PR_TYPE = 'typ';
    -      /**
    -       * token style for a literal value.  e.g. 1, null, true.
    -       * @const
    -       */
    -      var PR_LITERAL = 'lit';
    -      /**
    -       * token style for a punctuation string.
    -       * @const
    -       */
    -      var PR_PUNCTUATION = 'pun';
    -      /**
    -       * token style for plain text.
    -       * @const
    -       */
    -      var PR_PLAIN = 'pln';
    -    
    -      /**
    -       * token style for an sgml tag.
    -       * @const
    -       */
    -      var PR_TAG = 'tag';
    -      /**
    -       * token style for a markup declaration such as a DOCTYPE.
    -       * @const
    -       */
    -      var PR_DECLARATION = 'dec';
    -      /**
    -       * token style for embedded source.
    -       * @const
    -       */
    -      var PR_SOURCE = 'src';
    -      /**
    -       * token style for an sgml attribute name.
    -       * @const
    -       */
    -      var PR_ATTRIB_NAME = 'atn';
    -      /**
    -       * token style for an sgml attribute value.
    -       * @const
    -       */
    -      var PR_ATTRIB_VALUE = 'atv';
    -    
    -      /**
    -       * A class that indicates a section of markup that is not code, e.g. to allow
    -       * embedding of line numbers within code listings.
    -       * @const
    -       */
    -      var PR_NOCODE = 'nocode';
    -    
    -      
    -      
    -      /**
    -       * A set of tokens that can precede a regular expression literal in
    -       * javascript
    -       * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
    -       * has the full list, but I've removed ones that might be problematic when
    -       * seen in languages that don't support regular expression literals.
    -       *
    -       * <p>Specifically, I've removed any keywords that can't precede a regexp
    -       * literal in a syntactically legal javascript program, and I've removed the
    -       * "in" keyword since it's not a keyword in many languages, and might be used
    -       * as a count of inches.
    -       *
    -       * <p>The link above does not accurately describe EcmaScript rules since
    -       * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
    -       * very well in practice.
    -       *
    -       * @private
    -       * @const
    -       */
    -      var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
    -      
    -      // CAVEAT: this does not properly handle the case where a regular
    -      // expression immediately follows another since a regular expression may
    -      // have flags for case-sensitivity and the like.  Having regexp tokens
    -      // adjacent is not valid in any language I'm aware of, so I'm punting.
    -      // TODO: maybe style special characters inside a regexp as punctuation.
    -    
    -      /**
    -       * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
    -       * matches the union of the sets of strings matched by the input RegExp.
    -       * Since it matches globally, if the input strings have a start-of-input
    -       * anchor (/^.../), it is ignored for the purposes of unioning.
    -       * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
    -       * @return {RegExp} a global regex.
    -       */
    -      function combinePrefixPatterns(regexs) {
    -        var capturedGroupIndex = 0;
    -      
    -        var needToFoldCase = false;
    -        var ignoreCase = false;
    -        for (var i = 0, n = regexs.length; i < n; ++i) {
    -          var regex = regexs[i];
    -          if (regex.ignoreCase) {
    -            ignoreCase = true;
    -          } else if (/[a-z]/i.test(regex.source.replace(
    -                         /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
    -            needToFoldCase = true;
    -            ignoreCase = false;
    -            break;
    -          }
    -        }
    -      
    -        var escapeCharToCodeUnit = {
    -          'b': 8,
    -          't': 9,
    -          'n': 0xa,
    -          'v': 0xb,
    -          'f': 0xc,
    -          'r': 0xd
    -        };
    -      
    -        function decodeEscape(charsetPart) {
    -          var cc0 = charsetPart.charCodeAt(0);
    -          if (cc0 !== 92 /* \\ */) {
    -            return cc0;
    -          }
    -          var c1 = charsetPart.charAt(1);
    -          cc0 = escapeCharToCodeUnit[c1];
    -          if (cc0) {
    -            return cc0;
    -          } else if ('0' <= c1 && c1 <= '7') {
    -            return parseInt(charsetPart.substring(1), 8);
    -          } else if (c1 === 'u' || c1 === 'x') {
    -            return parseInt(charsetPart.substring(2), 16);
    -          } else {
    -            return charsetPart.charCodeAt(1);
    -          }
    -        }
    -      
    -        function encodeEscape(charCode) {
    -          if (charCode < 0x20) {
    -            return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
    -          }
    -          var ch = String.fromCharCode(charCode);
    -          return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
    -              ? "\\" + ch : ch;
    -        }
    -      
    -        function caseFoldCharset(charSet) {
    -          var charsetParts = charSet.substring(1, charSet.length - 1).match(
    -              new RegExp(
    -                  '\\\\u[0-9A-Fa-f]{4}'
    -                  + '|\\\\x[0-9A-Fa-f]{2}'
    -                  + '|\\\\[0-3][0-7]{0,2}'
    -                  + '|\\\\[0-7]{1,2}'
    -                  + '|\\\\[\\s\\S]'
    -                  + '|-'
    -                  + '|[^-\\\\]',
    -                  'g'));
    -          var ranges = [];
    -          var inverse = charsetParts[0] === '^';
    -      
    -          var out = ['['];
    -          if (inverse) { out.push('^'); }
    -      
    -          for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
    -            var p = charsetParts[i];
    -            if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
    -              out.push(p);
    -            } else {
    -              var start = decodeEscape(p);
    -              var end;
    -              if (i + 2 < n && '-' === charsetParts[i + 1]) {
    -                end = decodeEscape(charsetParts[i + 2]);
    -                i += 2;
    -              } else {
    -                end = start;
    -              }
    -              ranges.push([start, end]);
    -              // If the range might intersect letters, then expand it.
    -              // This case handling is too simplistic.
    -              // It does not deal with non-latin case folding.
    -              // It works for latin source code identifiers though.
    -              if (!(end < 65 || start > 122)) {
    -                if (!(end < 65 || start > 90)) {
    -                  ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
    -                }
    -                if (!(end < 97 || start > 122)) {
    -                  ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
    -                }
    -              }
    -            }
    -          }
    -      
    -          // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
    -          // -> [[1, 12], [14, 14], [16, 17]]
    -          ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
    -          var consolidatedRanges = [];
    -          var lastRange = [];
    -          for (var i = 0; i < ranges.length; ++i) {
    -            var range = ranges[i];
    -            if (range[0] <= lastRange[1] + 1) {
    -              lastRange[1] = Math.max(lastRange[1], range[1]);
    -            } else {
    -              consolidatedRanges.push(lastRange = range);
    -            }
    -          }
    -      
    -          for (var i = 0; i < consolidatedRanges.length; ++i) {
    -            var range = consolidatedRanges[i];
    -            out.push(encodeEscape(range[0]));
    -            if (range[1] > range[0]) {
    -              if (range[1] + 1 > range[0]) { out.push('-'); }
    -              out.push(encodeEscape(range[1]));
    -            }
    -          }
    -          out.push(']');
    -          return out.join('');
    -        }
    -      
    -        function allowAnywhereFoldCaseAndRenumberGroups(regex) {
    -          // Split into character sets, escape sequences, punctuation strings
    -          // like ('(', '(?:', ')', '^'), and runs of characters that do not
    -          // include any of the above.
    -          var parts = regex.source.match(
    -              new RegExp(
    -                  '(?:'
    -                  + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
    -                  + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
    -                  + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
    -                  + '|\\\\[0-9]+'  // a back-reference or octal escape
    -                  + '|\\\\[^ux0-9]'  // other escape sequence
    -                  + '|\\(\\?[:!=]'  // start of a non-capturing group
    -                  + '|[\\(\\)\\^]'  // start/end of a group, or line start
    -                  + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
    -                  + ')',
    -                  'g'));
    -          var n = parts.length;
    -      
    -          // Maps captured group numbers to the number they will occupy in
    -          // the output or to -1 if that has not been determined, or to
    -          // undefined if they need not be capturing in the output.
    -          var capturedGroups = [];
    -      
    -          // Walk over and identify back references to build the capturedGroups
    -          // mapping.
    -          for (var i = 0, groupIndex = 0; i < n; ++i) {
    -            var p = parts[i];
    -            if (p === '(') {
    -              // groups are 1-indexed, so max group index is count of '('
    -              ++groupIndex;
    -            } else if ('\\' === p.charAt(0)) {
    -              var decimalValue = +p.substring(1);
    -              if (decimalValue) {
    -                if (decimalValue <= groupIndex) {
    -                  capturedGroups[decimalValue] = -1;
    -                } else {
    -                  // Replace with an unambiguous escape sequence so that
    -                  // an octal escape sequence does not turn into a backreference
    -                  // to a capturing group from an earlier regex.
    -                  parts[i] = encodeEscape(decimalValue);
    -                }
    -              }
    -            }
    -          }
    -      
    -          // Renumber groups and reduce capturing groups to non-capturing groups
    -          // where possible.
    -          for (var i = 1; i < capturedGroups.length; ++i) {
    -            if (-1 === capturedGroups[i]) {
    -              capturedGroups[i] = ++capturedGroupIndex;
    -            }
    -          }
    -          for (var i = 0, groupIndex = 0; i < n; ++i) {
    -            var p = parts[i];
    -            if (p === '(') {
    -              ++groupIndex;
    -              if (!capturedGroups[groupIndex]) {
    -                parts[i] = '(?:';
    -              }
    -            } else if ('\\' === p.charAt(0)) {
    -              var decimalValue = +p.substring(1);
    -              if (decimalValue && decimalValue <= groupIndex) {
    -                parts[i] = '\\' + capturedGroups[decimalValue];
    -              }
    -            }
    -          }
    -      
    -          // Remove any prefix anchors so that the output will match anywhere.
    -          // ^^ really does mean an anchored match though.
    -          for (var i = 0; i < n; ++i) {
    -            if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
    -          }
    -      
    -          // Expand letters to groups to handle mixing of case-sensitive and
    -          // case-insensitive patterns if necessary.
    -          if (regex.ignoreCase && needToFoldCase) {
    -            for (var i = 0; i < n; ++i) {
    -              var p = parts[i];
    -              var ch0 = p.charAt(0);
    -              if (p.length >= 2 && ch0 === '[') {
    -                parts[i] = caseFoldCharset(p);
    -              } else if (ch0 !== '\\') {
    -                // TODO: handle letters in numeric escapes.
    -                parts[i] = p.replace(
    -                    /[a-zA-Z]/g,
    -                    function (ch) {
    -                      var cc = ch.charCodeAt(0);
    -                      return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
    -                    });
    -              }
    -            }
    -          }
    -      
    -          return parts.join('');
    -        }
    -      
    -        var rewritten = [];
    -        for (var i = 0, n = regexs.length; i < n; ++i) {
    -          var regex = regexs[i];
    -          if (regex.global || regex.multiline) { throw new Error('' + regex); }
    -          rewritten.push(
    -              '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
    -        }
    -      
    -        return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
    -      }
    -    
    -      /**
    -       * Split markup into a string of source code and an array mapping ranges in
    -       * that string to the text nodes in which they appear.
    -       *
    -       * <p>
    -       * The HTML DOM structure:</p>
    -       * <pre>
    -       * (Element   "p"
    -       *   (Element "b"
    -       *     (Text  "print "))       ; #1
    -       *   (Text    "'Hello '")      ; #2
    -       *   (Element "br")            ; #3
    -       *   (Text    "  + 'World';")) ; #4
    -       * </pre>
    -       * <p>
    -       * corresponds to the HTML
    -       * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
    -       *
    -       * <p>
    -       * It will produce the output:</p>
    -       * <pre>
    -       * {
    -       *   sourceCode: "print 'Hello '\n  + 'World';",
    -       *   //                     1          2
    -       *   //           012345678901234 5678901234567
    -       *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
    -       * }
    -       * </pre>
    -       * <p>
    -       * where #1 is a reference to the {@code "print "} text node above, and so
    -       * on for the other text nodes.
    -       * </p>
    -       *
    -       * <p>
    -       * The {@code} spans array is an array of pairs.  Even elements are the start
    -       * indices of substrings, and odd elements are the text nodes (or BR elements)
    -       * that contain the text for those substrings.
    -       * Substrings continue until the next index or the end of the source.
    -       * </p>
    -       *
    -       * @param {Node} node an HTML DOM subtree containing source-code.
    -       * @param {boolean|number} isPreformatted truthy if white-space in
    -       *    text nodes should be considered significant.
    -       * @return {SourceSpansT} source code and the nodes in which they occur.
    -       */
    -      function extractSourceSpans(node, isPreformatted) {
    -        var nocode = /(?:^|\s)nocode(?:\s|$)/;
    -      
    -        var chunks = [];
    -        var length = 0;
    -        var spans = [];
    -        var k = 0;
    -      
    -        function walk(node) {
    -          var type = node.nodeType;
    -          if (type == 1) {  // Element
    -            if (nocode.test(node.className)) { return; }
    -            for (var child = node.firstChild; child; child = child.nextSibling) {
    -              walk(child);
    -            }
    -            var nodeName = node.nodeName.toLowerCase();
    -            if ('br' === nodeName || 'li' === nodeName) {
    -              chunks[k] = '\n';
    -              spans[k << 1] = length++;
    -              spans[(k++ << 1) | 1] = node;
    -            }
    -          } else if (type == 3 || type == 4) {  // Text
    -            var text = node.nodeValue;
    -            if (text.length) {
    -              if (!isPreformatted) {
    -                text = text.replace(/[ \t\r\n]+/g, ' ');
    -              } else {
    -                text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
    -              }
    -              // TODO: handle tabs here?
    -              chunks[k] = text;
    -              spans[k << 1] = length;
    -              length += text.length;
    -              spans[(k++ << 1) | 1] = node;
    -            }
    -          }
    -        }
    -      
    -        walk(node);
    -      
    -        return {
    -          sourceCode: chunks.join('').replace(/\n$/, ''),
    -          spans: spans
    -        };
    -      }
    -    
    -      /**
    -       * Apply the given language handler to sourceCode and add the resulting
    -       * decorations to out.
    -       * @param {!Element} sourceNode
    -       * @param {number} basePos the index of sourceCode within the chunk of source
    -       *    whose decorations are already present on out.
    -       * @param {string} sourceCode
    -       * @param {function(JobT)} langHandler
    -       * @param {DecorationsT} out
    -       */
    -      function appendDecorations(
    -          sourceNode, basePos, sourceCode, langHandler, out) {
    -        if (!sourceCode) { return; }
    -        /** @type {JobT} */
    -        var job = {
    -          sourceNode: sourceNode,
    -          pre: 1,
    -          langExtension: null,
    -          numberLines: null,
    -          sourceCode: sourceCode,
    -          spans: null,
    -          basePos: basePos,
    -          decorations: null
    -        };
    -        langHandler(job);
    -        out.push.apply(out, job.decorations);
    -      }
    -    
    -      var notWs = /\S/;
    -    
    -      /**
    -       * Given an element, if it contains only one child element and any text nodes
    -       * it contains contain only space characters, return the sole child element.
    -       * Otherwise returns undefined.
    -       * <p>
    -       * This is meant to return the CODE element in {@code <pre><code ...>} when
    -       * there is a single child element that contains all the non-space textual
    -       * content, but not to return anything where there are multiple child elements
    -       * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
    -       * is textual content.
    -       */
    -      function childContentWrapper(element) {
    -        var wrapper = undefined;
    -        for (var c = element.firstChild; c; c = c.nextSibling) {
    -          var type = c.nodeType;
    -          wrapper = (type === 1)  // Element Node
    -              ? (wrapper ? element : c)
    -              : (type === 3)  // Text Node
    -              ? (notWs.test(c.nodeValue) ? element : wrapper)
    -              : wrapper;
    -        }
    -        return wrapper === element ? undefined : wrapper;
    -      }
    -    
    -      /** Given triples of [style, pattern, context] returns a lexing function,
    -        * The lexing function interprets the patterns to find token boundaries and
    -        * returns a decoration list of the form
    -        * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
    -        * where index_n is an index into the sourceCode, and style_n is a style
    -        * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
    -        * all characters in sourceCode[index_n-1:index_n].
    -        *
    -        * The stylePatterns is a list whose elements have the form
    -        * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
    -        *
    -        * Style is a style constant like PR_PLAIN, or can be a string of the
    -        * form 'lang-FOO', where FOO is a language extension describing the
    -        * language of the portion of the token in $1 after pattern executes.
    -        * E.g., if style is 'lang-lisp', and group 1 contains the text
    -        * '(hello (world))', then that portion of the token will be passed to the
    -        * registered lisp handler for formatting.
    -        * The text before and after group 1 will be restyled using this decorator
    -        * so decorators should take care that this doesn't result in infinite
    -        * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
    -        * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
    -        * '<script>foo()<\/script>', which would cause the current decorator to
    -        * be called with '<script>' which would not match the same rule since
    -        * group 1 must not be empty, so it would be instead styled as PR_TAG by
    -        * the generic tag rule.  The handler registered for the 'js' extension would
    -        * then be called with 'foo()', and finally, the current decorator would
    -        * be called with '<\/script>' which would not match the original rule and
    -        * so the generic tag rule would identify it as a tag.
    -        *
    -        * Pattern must only match prefixes, and if it matches a prefix, then that
    -        * match is considered a token with the same style.
    -        *
    -        * Context is applied to the last non-whitespace, non-comment token
    -        * recognized.
    -        *
    -        * Shortcut is an optional string of characters, any of which, if the first
    -        * character, gurantee that this pattern and only this pattern matches.
    -        *
    -        * @param {Array} shortcutStylePatterns patterns that always start with
    -        *   a known character.  Must have a shortcut string.
    -        * @param {Array} fallthroughStylePatterns patterns that will be tried in
    -        *   order if the shortcut ones fail.  May have shortcuts.
    -        *
    -        * @return {function (JobT)} a function that takes an undecorated job and
    -        *   attaches a list of decorations.
    -        */
    -      function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
    -        var shortcuts = {};
    -        var tokenizer;
    -        (function () {
    -          var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
    -          var allRegexs = [];
    -          var regexKeys = {};
    -          for (var i = 0, n = allPatterns.length; i < n; ++i) {
    -            var patternParts = allPatterns[i];
    -            var shortcutChars = patternParts[3];
    -            if (shortcutChars) {
    -              for (var c = shortcutChars.length; --c >= 0;) {
    -                shortcuts[shortcutChars.charAt(c)] = patternParts;
    -              }
    -            }
    -            var regex = patternParts[1];
    -            var k = '' + regex;
    -            if (!regexKeys.hasOwnProperty(k)) {
    -              allRegexs.push(regex);
    -              regexKeys[k] = null;
    -            }
    -          }
    -          allRegexs.push(/[\0-\uffff]/);
    -          tokenizer = combinePrefixPatterns(allRegexs);
    -        })();
    -    
    -        var nPatterns = fallthroughStylePatterns.length;
    -    
    -        /**
    -         * Lexes job.sourceCode and attaches an output array job.decorations of
    -         * style classes preceded by the position at which they start in
    -         * job.sourceCode in order.
    -         *
    -         * @type{function (JobT)}
    -         */
    -        var decorate = function (job) {
    -          var sourceCode = job.sourceCode, basePos = job.basePos;
    -          var sourceNode = job.sourceNode;
    -          /** Even entries are positions in source in ascending order.  Odd enties
    -            * are style markers (e.g., PR_COMMENT) that run from that position until
    -            * the end.
    -            * @type {DecorationsT}
    -            */
    -          var decorations = [basePos, PR_PLAIN];
    -          var pos = 0;  // index into sourceCode
    -          var tokens = sourceCode.match(tokenizer) || [];
    -          var styleCache = {};
    -    
    -          for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
    -            var token = tokens[ti];
    -            var style = styleCache[token];
    -            var match = void 0;
    -    
    -            var isEmbedded;
    -            if (typeof style === 'string') {
    -              isEmbedded = false;
    -            } else {
    -              var patternParts = shortcuts[token.charAt(0)];
    -              if (patternParts) {
    -                match = token.match(patternParts[1]);
    -                style = patternParts[0];
    -              } else {
    -                for (var i = 0; i < nPatterns; ++i) {
    -                  patternParts = fallthroughStylePatterns[i];
    -                  match = token.match(patternParts[1]);
    -                  if (match) {
    -                    style = patternParts[0];
    -                    break;
    -                  }
    -                }
    -    
    -                if (!match) {  // make sure that we make progress
    -                  style = PR_PLAIN;
    -                }
    -              }
    -    
    -              isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
    -              if (isEmbedded && !(match && typeof match[1] === 'string')) {
    -                isEmbedded = false;
    -                style = PR_SOURCE;
    -              }
    -    
    -              if (!isEmbedded) { styleCache[token] = style; }
    -            }
    -    
    -            var tokenStart = pos;
    -            pos += token.length;
    -    
    -            if (!isEmbedded) {
    -              decorations.push(basePos + tokenStart, style);
    -            } else {  // Treat group 1 as an embedded block of source code.
    -              var embeddedSource = match[1];
    -              var embeddedSourceStart = token.indexOf(embeddedSource);
    -              var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
    -              if (match[2]) {
    -                // If embeddedSource can be blank, then it would match at the
    -                // beginning which would cause us to infinitely recurse on the
    -                // entire token, so we catch the right context in match[2].
    -                embeddedSourceEnd = token.length - match[2].length;
    -                embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
    -              }
    -              var lang = style.substring(5);
    -              // Decorate the left of the embedded source
    -              appendDecorations(
    -                  sourceNode,
    -                  basePos + tokenStart,
    -                  token.substring(0, embeddedSourceStart),
    -                  decorate, decorations);
    -              // Decorate the embedded source
    -              appendDecorations(
    -                  sourceNode,
    -                  basePos + tokenStart + embeddedSourceStart,
    -                  embeddedSource,
    -                  langHandlerForExtension(lang, embeddedSource),
    -                  decorations);
    -              // Decorate the right of the embedded section
    -              appendDecorations(
    -                  sourceNode,
    -                  basePos + tokenStart + embeddedSourceEnd,
    -                  token.substring(embeddedSourceEnd),
    -                  decorate, decorations);
    -            }
    -          }
    -          job.decorations = decorations;
    -        };
    -        return decorate;
    -      }
    -    
    -      /** returns a function that produces a list of decorations from source text.
    -        *
    -        * This code treats ", ', and ` as string delimiters, and \ as a string
    -        * escape.  It does not recognize perl's qq() style strings.
    -        * It has no special handling for double delimiter escapes as in basic, or
    -        * the tripled delimiters used in python, but should work on those regardless
    -        * although in those cases a single string literal may be broken up into
    -        * multiple adjacent string literals.
    -        *
    -        * It recognizes C, C++, and shell style comments.
    -        *
    -        * @param {Object} options a set of optional parameters.
    -        * @return {function (JobT)} a function that examines the source code
    -        *     in the input job and builds a decoration list which it attaches to
    -        *     the job.
    -        */
    -      function sourceDecorator(options) {
    -        var shortcutStylePatterns = [], fallthroughStylePatterns = [];
    -        if (options['tripleQuotedStrings']) {
    -          // '''multi-line-string''', 'single-line-string', and double-quoted
    -          shortcutStylePatterns.push(
    -              [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
    -               null, '\'"']);
    -        } else if (options['multiLineStrings']) {
    -          // 'multi-line-string', "multi-line-string"
    -          shortcutStylePatterns.push(
    -              [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
    -               null, '\'"`']);
    -        } else {
    -          // 'single-line-string', "single-line-string"
    -          shortcutStylePatterns.push(
    -              [PR_STRING,
    -               /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
    -               null, '"\'']);
    -        }
    -        if (options['verbatimStrings']) {
    -          // verbatim-string-literal production from the C# grammar.  See issue 93.
    -          fallthroughStylePatterns.push(
    -              [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
    -        }
    -        var hc = options['hashComments'];
    -        if (hc) {
    -          if (options['cStyleComments']) {
    -            if (hc > 1) {  // multiline hash comments
    -              shortcutStylePatterns.push(
    -                  [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
    -            } else {
    -              // Stop C preprocessor declarations at an unclosed open comment
    -              shortcutStylePatterns.push(
    -                  [PR_COMMENT, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,
    -                   null, '#']);
    -            }
    -            // #include <stdio.h>
    -            fallthroughStylePatterns.push(
    -                [PR_STRING,
    -                 /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
    -                 null]);
    -          } else {
    -            shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
    -          }
    -        }
    -        if (options['cStyleComments']) {
    -          fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
    -          fallthroughStylePatterns.push(
    -              [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
    -        }
    -        var regexLiterals = options['regexLiterals'];
    -        if (regexLiterals) {
    -          /**
    -           * @const
    -           */
    -          var regexExcls = regexLiterals > 1
    -            ? ''  // Multiline regex literals
    -            : '\n\r';
    -          /**
    -           * @const
    -           */
    -          var regexAny = regexExcls ? '.' : '[\\S\\s]';
    -          /**
    -           * @const
    -           */
    -          var REGEX_LITERAL = (
    -              // A regular expression literal starts with a slash that is
    -              // not followed by * or / so that it is not confused with
    -              // comments.
    -              '/(?=[^/*' + regexExcls + '])'
    -              // and then contains any number of raw characters,
    -              + '(?:[^/\\x5B\\x5C' + regexExcls + ']'
    -              // escape sequences (\x5C),
    -              +    '|\\x5C' + regexAny
    -              // or non-nesting character sets (\x5B\x5D);
    -              +    '|\\x5B(?:[^\\x5C\\x5D' + regexExcls + ']'
    -              +             '|\\x5C' + regexAny + ')*(?:\\x5D|$))+'
    -              // finally closed by a /.
    -              + '/');
    -          fallthroughStylePatterns.push(
    -              ['lang-regex',
    -               RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
    -               ]);
    -        }
    -    
    -        var types = options['types'];
    -        if (types) {
    -          fallthroughStylePatterns.push([PR_TYPE, types]);
    -        }
    -    
    -        var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
    -        if (keywords.length) {
    -          fallthroughStylePatterns.push(
    -              [PR_KEYWORD,
    -               new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
    -               null]);
    -        }
    -    
    -        shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
    -    
    -        var punctuation =
    -          // The Bash man page says
    -    
    -          // A word is a sequence of characters considered as a single
    -          // unit by GRUB. Words are separated by metacharacters,
    -          // which are the following plus space, tab, and newline: { }
    -          // | & $ ; < >
    -          // ...
    -    
    -          // A word beginning with # causes that word and all remaining
    -          // characters on that line to be ignored.
    -    
    -          // which means that only a '#' after /(?:^|[{}|&$;<>\s])/ starts a
    -          // comment but empirically
    -          // $ echo {#}
    -          // {#}
    -          // $ echo \$#
    -          // $#
    -          // $ echo }#
    -          // }#
    -    
    -          // so /(?:^|[|&;<>\s])/ is more appropriate.
    -    
    -          // http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC3
    -          // suggests that this definition is compatible with a
    -          // default mode that tries to use a single token definition
    -          // to recognize both bash/python style comments and C
    -          // preprocessor directives.
    -    
    -          // This definition of punctuation does not include # in the list of
    -          // follow-on exclusions, so # will not be broken before if preceeded
    -          // by a punctuation character.  We could try to exclude # after
    -          // [|&;<>] but that doesn't seem to cause many major problems.
    -          // If that does turn out to be a problem, we should change the below
    -          // when hc is truthy to include # in the run of punctuation characters
    -          // only when not followint [|&;<>].
    -          '^.[^\\s\\w.$@\'"`/\\\\]*';
    -        if (options['regexLiterals']) {
    -          punctuation += '(?!\s*\/)';
    -        }
    -    
    -        fallthroughStylePatterns.push(
    -            // TODO(mikesamuel): recognize non-latin letters and numerals in idents
    -            [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
    -            [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
    -            [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
    -            [PR_LITERAL,
    -             new RegExp(
    -                 '^(?:'
    -                 // A hex number
    -                 + '0x[a-f0-9]+'
    -                 // or an octal or decimal number,
    -                 + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
    -                 // possibly in scientific notation
    -                 + '(?:e[+\\-]?\\d+)?'
    -                 + ')'
    -                 // with an optional modifier like UL for unsigned long
    -                 + '[a-z]*', 'i'),
    -             null, '0123456789'],
    -            // Don't treat escaped quotes in bash as starting strings.
    -            // See issue 144.
    -            [PR_PLAIN,       /^\\[\s\S]?/, null],
    -            [PR_PUNCTUATION, new RegExp(punctuation), null]);
    -    
    -        return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
    -      }
    -    
    -      var decorateSource = sourceDecorator({
    -            'keywords': ALL_KEYWORDS,
    -            'hashComments': true,
    -            'cStyleComments': true,
    -            'multiLineStrings': true,
    -            'regexLiterals': true
    -          });
    -    
    -      /**
    -       * Given a DOM subtree, wraps it in a list, and puts each line into its own
    -       * list item.
    -       *
    -       * @param {Node} node modified in place.  Its content is pulled into an
    -       *     HTMLOListElement, and each line is moved into a separate list item.
    -       *     This requires cloning elements, so the input might not have unique
    -       *     IDs after numbering.
    -       * @param {number|null|boolean} startLineNum
    -       *     If truthy, coerced to an integer which is the 1-indexed line number
    -       *     of the first line of code.  The number of the first line will be
    -       *     attached to the list.
    -       * @param {boolean} isPreformatted true iff white-space in text nodes should
    -       *     be treated as significant.
    -       */
    -      function numberLines(node, startLineNum, isPreformatted) {
    -        var nocode = /(?:^|\s)nocode(?:\s|$)/;
    -        var lineBreak = /\r\n?|\n/;
    -      
    -        var document = node.ownerDocument;
    -      
    -        var li = document.createElement('li');
    -        while (node.firstChild) {
    -          li.appendChild(node.firstChild);
    -        }
    -        // An array of lines.  We split below, so this is initialized to one
    -        // un-split line.
    -        var listItems = [li];
    -      
    -        function walk(node) {
    -          var type = node.nodeType;
    -          if (type == 1 && !nocode.test(node.className)) {  // Element
    -            if ('br' === node.nodeName) {
    -              breakAfter(node);
    -              // Discard the <BR> since it is now flush against a </LI>.
    -              if (node.parentNode) {
    -                node.parentNode.removeChild(node);
    -              }
    -            } else {
    -              for (var child = node.firstChild; child; child = child.nextSibling) {
    -                walk(child);
    -              }
    -            }
    -          } else if ((type == 3 || type == 4) && isPreformatted) {  // Text
    -            var text = node.nodeValue;
    -            var match = text.match(lineBreak);
    -            if (match) {
    -              var firstLine = text.substring(0, match.index);
    -              node.nodeValue = firstLine;
    -              var tail = text.substring(match.index + match[0].length);
    -              if (tail) {
    -                var parent = node.parentNode;
    -                parent.insertBefore(
    -                  document.createTextNode(tail), node.nextSibling);
    -              }
    -              breakAfter(node);
    -              if (!firstLine) {
    -                // Don't leave blank text nodes in the DOM.
    -                node.parentNode.removeChild(node);
    -              }
    -            }
    -          }
    -        }
    -      
    -        // Split a line after the given node.
    -        function breakAfter(lineEndNode) {
    -          // If there's nothing to the right, then we can skip ending the line
    -          // here, and move root-wards since splitting just before an end-tag
    -          // would require us to create a bunch of empty copies.
    -          while (!lineEndNode.nextSibling) {
    -            lineEndNode = lineEndNode.parentNode;
    -            if (!lineEndNode) { return; }
    -          }
    -      
    -          function breakLeftOf(limit, copy) {
    -            // Clone shallowly if this node needs to be on both sides of the break.
    -            var rightSide = copy ? limit.cloneNode(false) : limit;
    -            var parent = limit.parentNode;
    -            if (parent) {
    -              // We clone the parent chain.
    -              // This helps us resurrect important styling elements that cross lines.
    -              // E.g. in <i>Foo<br>Bar</i>
    -              // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
    -              var parentClone = breakLeftOf(parent, 1);
    -              // Move the clone and everything to the right of the original
    -              // onto the cloned parent.
    -              var next = limit.nextSibling;
    -              parentClone.appendChild(rightSide);
    -              for (var sibling = next; sibling; sibling = next) {
    -                next = sibling.nextSibling;
    -                parentClone.appendChild(sibling);
    -              }
    -            }
    -            return rightSide;
    -          }
    -      
    -          var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
    -      
    -          // Walk the parent chain until we reach an unattached LI.
    -          for (var parent;
    -               // Check nodeType since IE invents document fragments.
    -               (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
    -            copiedListItem = parent;
    -          }
    -          // Put it on the list of lines for later processing.
    -          listItems.push(copiedListItem);
    -        }
    -      
    -        // Split lines while there are lines left to split.
    -        for (var i = 0;  // Number of lines that have been split so far.
    -             i < listItems.length;  // length updated by breakAfter calls.
    -             ++i) {
    -          walk(listItems[i]);
    -        }
    -      
    -        // Make sure numeric indices show correctly.
    -        if (startLineNum === (startLineNum|0)) {
    -          listItems[0].setAttribute('value', startLineNum);
    -        }
    -      
    -        var ol = document.createElement('ol');
    -        ol.className = 'linenums';
    -        var offset = Math.max(0, ((startLineNum - 1 /* zero index */)) | 0) || 0;
    -        for (var i = 0, n = listItems.length; i < n; ++i) {
    -          li = listItems[i];
    -          // Stick a class on the LIs so that stylesheets can
    -          // color odd/even rows, or any other row pattern that
    -          // is co-prime with 10.
    -          li.className = 'L' + ((i + offset) % 10);
    -          if (!li.firstChild) {
    -            li.appendChild(document.createTextNode('\xA0'));
    -          }
    -          ol.appendChild(li);
    -        }
    -      
    -        node.appendChild(ol);
    -      }
    -    
    -      /**
    -       * Breaks {@code job.sourceCode} around style boundaries in
    -       * {@code job.decorations} and modifies {@code job.sourceNode} in place.
    -       * @param {JobT} job
    -       * @private
    -       */
    -      function recombineTagsAndDecorations(job) {
    -        var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
    -        isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
    -        var newlineRe = /\n/g;
    -      
    -        var source = job.sourceCode;
    -        var sourceLength = source.length;
    -        // Index into source after the last code-unit recombined.
    -        var sourceIndex = 0;
    -      
    -        var spans = job.spans;
    -        var nSpans = spans.length;
    -        // Index into spans after the last span which ends at or before sourceIndex.
    -        var spanIndex = 0;
    -      
    -        var decorations = job.decorations;
    -        var nDecorations = decorations.length;
    -        // Index into decorations after the last decoration which ends at or before
    -        // sourceIndex.
    -        var decorationIndex = 0;
    -      
    -        // Remove all zero-length decorations.
    -        decorations[nDecorations] = sourceLength;
    -        var decPos, i;
    -        for (i = decPos = 0; i < nDecorations;) {
    -          if (decorations[i] !== decorations[i + 2]) {
    -            decorations[decPos++] = decorations[i++];
    -            decorations[decPos++] = decorations[i++];
    -          } else {
    -            i += 2;
    -          }
    -        }
    -        nDecorations = decPos;
    -      
    -        // Simplify decorations.
    -        for (i = decPos = 0; i < nDecorations;) {
    -          var startPos = decorations[i];
    -          // Conflate all adjacent decorations that use the same style.
    -          var startDec = decorations[i + 1];
    -          var end = i + 2;
    -          while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
    -            end += 2;
    -          }
    -          decorations[decPos++] = startPos;
    -          decorations[decPos++] = startDec;
    -          i = end;
    -        }
    -      
    -        nDecorations = decorations.length = decPos;
    -      
    -        var sourceNode = job.sourceNode;
    -        var oldDisplay = "";
    -        if (sourceNode) {
    -          oldDisplay = sourceNode.style.display;
    -          sourceNode.style.display = 'none';
    -        }
    -        try {
    -          var decoration = null;
    -          while (spanIndex < nSpans) {
    -            var spanStart = spans[spanIndex];
    -            var spanEnd = /** @type{number} */ (spans[spanIndex + 2])
    -                || sourceLength;
    -      
    -            var decEnd = decorations[decorationIndex + 2] || sourceLength;
    -      
    -            var end = Math.min(spanEnd, decEnd);
    -      
    -            var textNode = /** @type{Node} */ (spans[spanIndex + 1]);
    -            var styledText;
    -            if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
    -                // Don't introduce spans around empty text nodes.
    -                && (styledText = source.substring(sourceIndex, end))) {
    -              // This may seem bizarre, and it is.  Emitting LF on IE causes the
    -              // code to display with spaces instead of line breaks.
    -              // Emitting Windows standard issue linebreaks (CRLF) causes a blank
    -              // space to appear at the beginning of every line but the first.
    -              // Emitting an old Mac OS 9 line separator makes everything spiffy.
    -              if (isIE8OrEarlier) {
    -                styledText = styledText.replace(newlineRe, '\r');
    -              }
    -              textNode.nodeValue = styledText;
    -              var document = textNode.ownerDocument;
    -              var span = document.createElement('span');
    -              span.className = decorations[decorationIndex + 1];
    -              var parentNode = textNode.parentNode;
    -              parentNode.replaceChild(span, textNode);
    -              span.appendChild(textNode);
    -              if (sourceIndex < spanEnd) {  // Split off a text node.
    -                spans[spanIndex + 1] = textNode
    -                    // TODO: Possibly optimize by using '' if there's no flicker.
    -                    = document.createTextNode(source.substring(end, spanEnd));
    -                parentNode.insertBefore(textNode, span.nextSibling);
    -              }
    -            }
    -      
    -            sourceIndex = end;
    -      
    -            if (sourceIndex >= spanEnd) {
    -              spanIndex += 2;
    -            }
    -            if (sourceIndex >= decEnd) {
    -              decorationIndex += 2;
    -            }
    -          }
    -        } finally {
    -          if (sourceNode) {
    -            sourceNode.style.display = oldDisplay;
    -          }
    -        }
    -      }
    -    
    -      /** Maps language-specific file extensions to handlers. */
    -      var langHandlerRegistry = {};
    -      /** Register a language handler for the given file extensions.
    -        * @param {function (JobT)} handler a function from source code to a list
    -        *      of decorations.  Takes a single argument job which describes the
    -        *      state of the computation and attaches the decorations to it.
    -        * @param {Array.<string>} fileExtensions
    -        */
    -      function registerLangHandler(handler, fileExtensions) {
    -        for (var i = fileExtensions.length; --i >= 0;) {
    -          var ext = fileExtensions[i];
    -          if (!langHandlerRegistry.hasOwnProperty(ext)) {
    -            langHandlerRegistry[ext] = handler;
    -          } else if (win['console']) {
    -            console['warn']('cannot override language handler %s', ext);
    -          }
    -        }
    -      }
    -      function langHandlerForExtension(extension, source) {
    -        if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
    -          // Treat it as markup if the first non whitespace character is a < and
    -          // the last non-whitespace character is a >.
    -          extension = /^\s*</.test(source)
    -              ? 'default-markup'
    -              : 'default-code';
    -        }
    -        return langHandlerRegistry[extension];
    -      }
    -      registerLangHandler(decorateSource, ['default-code']);
    -      registerLangHandler(
    -          createSimpleLexer(
    -              [],
    -              [
    -               [PR_PLAIN,       /^[^<?]+/],
    -               [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
    -               [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
    -               // Unescaped content in an unknown language
    -               ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
    -               ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
    -               [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
    -               ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
    -               // Unescaped content in javascript.  (Or possibly vbscript).
    -               ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
    -               // Contains unescaped stylesheet content
    -               ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
    -               ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
    -              ]),
    -          ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
    -      registerLangHandler(
    -          createSimpleLexer(
    -              [
    -               [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
    -               [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
    -               ],
    -              [
    -               [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
    -               [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
    -               ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
    -               [PR_PUNCTUATION,  /^[=<>\/]+/],
    -               ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
    -               ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
    -               ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
    -               ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
    -               ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
    -               ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
    -               ]),
    -          ['in.tag']);
    -      registerLangHandler(
    -          createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': CPP_KEYWORDS,
    -              'hashComments': true,
    -              'cStyleComments': true,
    -              'types': C_TYPES
    -            }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': 'null,true,false'
    -            }), ['json']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': CSHARP_KEYWORDS,
    -              'hashComments': true,
    -              'cStyleComments': true,
    -              'verbatimStrings': true,
    -              'types': C_TYPES
    -            }), ['cs']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': JAVA_KEYWORDS,
    -              'cStyleComments': true
    -            }), ['java']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': SH_KEYWORDS,
    -              'hashComments': true,
    -              'multiLineStrings': true
    -            }), ['bash', 'bsh', 'csh', 'sh']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': PYTHON_KEYWORDS,
    -              'hashComments': true,
    -              'multiLineStrings': true,
    -              'tripleQuotedStrings': true
    -            }), ['cv', 'py', 'python']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': PERL_KEYWORDS,
    -              'hashComments': true,
    -              'multiLineStrings': true,
    -              'regexLiterals': 2  // multiline regex literals
    -            }), ['perl', 'pl', 'pm']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': RUBY_KEYWORDS,
    -              'hashComments': true,
    -              'multiLineStrings': true,
    -              'regexLiterals': true
    -            }), ['rb', 'ruby']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': JSCRIPT_KEYWORDS,
    -              'cStyleComments': true,
    -              'regexLiterals': true
    -            }), ['javascript', 'js']);
    -      registerLangHandler(sourceDecorator({
    -              'keywords': COFFEE_KEYWORDS,
    -              'hashComments': 3,  // ### style block comments
    -              'cStyleComments': true,
    -              'multilineStrings': true,
    -              'tripleQuotedStrings': true,
    -              'regexLiterals': true
    -            }), ['coffee']);
    -      registerLangHandler(
    -          createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
    -    
    -      /** @param {JobT} job */
    -      function applyDecorator(job) {
    -        var opt_langExtension = job.langExtension;
    -    
    -        try {
    -          // Extract tags, and convert the source code to plain text.
    -          var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre);
    -          /** Plain text. @type {string} */
    -          var source = sourceAndSpans.sourceCode;
    -          job.sourceCode = source;
    -          job.spans = sourceAndSpans.spans;
    -          job.basePos = 0;
    -    
    -          // Apply the appropriate language handler
    -          langHandlerForExtension(opt_langExtension, source)(job);
    -    
    -          // Integrate the decorations and tags back into the source code,
    -          // modifying the sourceNode in place.
    -          recombineTagsAndDecorations(job);
    -        } catch (e) {
    -          if (win['console']) {
    -            console['log'](e && e['stack'] || e);
    -          }
    -        }
    -      }
    -    
    -      /**
    -       * Pretty print a chunk of code.
    -       * @param sourceCodeHtml {string} The HTML to pretty print.
    -       * @param opt_langExtension {string} The language name to use.
    -       *     Typically, a filename extension like 'cpp' or 'java'.
    -       * @param opt_numberLines {number|boolean} True to number lines,
    -       *     or the 1-indexed number of the first line in sourceCodeHtml.
    -       */
    -      function $prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
    -        /** @type{number|boolean} */
    -        var nl = opt_numberLines || false;
    -        /** @type{string|null} */
    -        var langExtension = opt_langExtension || null;
    -        /** @type{!Element} */
    -        var container = document.createElement('div');
    -        // This could cause images to load and onload listeners to fire.
    -        // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
    -        // We assume that the inner HTML is from a trusted source.
    -        // The pre-tag is required for IE8 which strips newlines from innerHTML
    -        // when it is injected into a <pre> tag.
    -        // http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie
    -        // http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript
    -        container.innerHTML = '<pre>' + sourceCodeHtml + '</pre>';
    -        container = /** @type{!Element} */(container.firstChild);
    -        if (nl) {
    -          numberLines(container, nl, true);
    -        }
    -    
    -        /** @type{JobT} */
    -        var job = {
    -          langExtension: langExtension,
    -          numberLines: nl,
    -          sourceNode: container,
    -          pre: 1,
    -          sourceCode: null,
    -          basePos: null,
    -          spans: null,
    -          decorations: null
    -        };
    -        applyDecorator(job);
    -        return container.innerHTML;
    -      }
    -    
    -       /**
    -        * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
    -        * {@code class=prettyprint} and prettify them.
    -        *
    -        * @param {Function} opt_whenDone called when prettifying is done.
    -        * @param {HTMLElement|HTMLDocument} opt_root an element or document
    -        *   containing all the elements to pretty print.
    -        *   Defaults to {@code document.body}.
    -        */
    -      function $prettyPrint(opt_whenDone, opt_root) {
    -        var root = opt_root || document.body;
    -        var doc = root.ownerDocument || document;
    -        function byTagName(tn) { return root.getElementsByTagName(tn); }
    -        // fetch a list of nodes to rewrite
    -        var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
    -        var elements = [];
    -        for (var i = 0; i < codeSegments.length; ++i) {
    -          for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
    -            elements.push(codeSegments[i][j]);
    -          }
    -        }
    -        codeSegments = null;
    -    
    -        var clock = Date;
    -        if (!clock['now']) {
    -          clock = { 'now': function () { return +(new Date); } };
    -        }
    -    
    -        // The loop is broken into a series of continuations to make sure that we
    -        // don't make the browser unresponsive when rewriting a large page.
    -        var k = 0;
    -    
    -        var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
    -        var prettyPrintRe = /\bprettyprint\b/;
    -        var prettyPrintedRe = /\bprettyprinted\b/;
    -        var preformattedTagNameRe = /pre|xmp/i;
    -        var codeRe = /^code$/i;
    -        var preCodeXmpRe = /^(?:pre|code|xmp)$/i;
    -        var EMPTY = {};
    -    
    -        function doWork() {
    -          var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
    -                         clock['now']() + 250 /* ms */ :
    -                         Infinity);
    -          for (; k < elements.length && clock['now']() < endTime; k++) {
    -            var cs = elements[k];
    -    
    -            // Look for a preceding comment like
    -            // <?prettify lang="..." linenums="..."?>
    -            var attrs = EMPTY;
    -            {
    -              for (var preceder = cs; (preceder = preceder.previousSibling);) {
    -                var nt = preceder.nodeType;
    -                // <?foo?> is parsed by HTML 5 to a comment node (8)
    -                // like <!--?foo?-->, but in XML is a processing instruction
    -                var value = (nt === 7 || nt === 8) && preceder.nodeValue;
    -                if (value
    -                    ? !/^\??prettify\b/.test(value)
    -                    : (nt !== 3 || /\S/.test(preceder.nodeValue))) {
    -                  // Skip over white-space text nodes but not others.
    -                  break;
    -                }
    -                if (value) {
    -                  attrs = {};
    -                  value.replace(
    -                      /\b(\w+)=([\w:.%+-]+)/g,
    -                    function (_, name, value) { attrs[name] = value; });
    -                  break;
    -                }
    -              }
    -            }
    -    
    -            var className = cs.className;
    -            if ((attrs !== EMPTY || prettyPrintRe.test(className))
    -                // Don't redo this if we've already done it.
    -                // This allows recalling pretty print to just prettyprint elements
    -                // that have been added to the page since last call.
    -                && !prettyPrintedRe.test(className)) {
    -    
    -              // make sure this is not nested in an already prettified element
    -              var nested = false;
    -              for (var p = cs.parentNode; p; p = p.parentNode) {
    -                var tn = p.tagName;
    -                if (preCodeXmpRe.test(tn)
    -                    && p.className && prettyPrintRe.test(p.className)) {
    -                  nested = true;
    -                  break;
    -                }
    -              }
    -              if (!nested) {
    -                // Mark done.  If we fail to prettyprint for whatever reason,
    -                // we shouldn't try again.
    -                cs.className += ' prettyprinted';
    -    
    -                // If the classes includes a language extensions, use it.
    -                // Language extensions can be specified like
    -                //     <pre class="prettyprint lang-cpp">
    -                // the language extension "cpp" is used to find a language handler
    -                // as passed to PR.registerLangHandler.
    -                // HTML5 recommends that a language be specified using "language-"
    -                // as the prefix instead.  Google Code Prettify supports both.
    -                // http://dev.w3.org/html5/spec-author-view/the-code-element.html
    -                var langExtension = attrs['lang'];
    -                if (!langExtension) {
    -                  langExtension = className.match(langExtensionRe);
    -                  // Support <pre class="prettyprint"><code class="language-c">
    -                  var wrapper;
    -                  if (!langExtension && (wrapper = childContentWrapper(cs))
    -                      && codeRe.test(wrapper.tagName)) {
    -                    langExtension = wrapper.className.match(langExtensionRe);
    -                  }
    -    
    -                  if (langExtension) { langExtension = langExtension[1]; }
    -                }
    -    
    -                var preformatted;
    -                if (preformattedTagNameRe.test(cs.tagName)) {
    -                  preformatted = 1;
    -                } else {
    -                  var currentStyle = cs['currentStyle'];
    -                  var defaultView = doc.defaultView;
    -                  var whitespace = (
    -                      currentStyle
    -                      ? currentStyle['whiteSpace']
    -                      : (defaultView
    -                         && defaultView.getComputedStyle)
    -                      ? defaultView.getComputedStyle(cs, null)
    -                      .getPropertyValue('white-space')
    -                      : 0);
    -                  preformatted = whitespace
    -                      && 'pre' === whitespace.substring(0, 3);
    -                }
    -    
    -                // Look for a class like linenums or linenums:<n> where <n> is the
    -                // 1-indexed number of the first line.
    -                var lineNums = attrs['linenums'];
    -                if (!(lineNums = lineNums === 'true' || +lineNums)) {
    -                  lineNums = className.match(/\blinenums\b(?::(\d+))?/);
    -                  lineNums =
    -                    lineNums
    -                    ? lineNums[1] && lineNums[1].length
    -                      ? +lineNums[1] : true
    -                    : false;
    -                }
    -                if (lineNums) { numberLines(cs, lineNums, preformatted); }
    -    
    -                // do the pretty printing
    -                var prettyPrintingJob = {
    -                  langExtension: langExtension,
    -                  sourceNode: cs,
    -                  numberLines: lineNums,
    -                  pre: preformatted,
    -                  sourceCode: null,
    -                  basePos: null,
    -                  spans: null,
    -                  decorations: null
    -                };
    -                applyDecorator(prettyPrintingJob);
    -              }
    -            }
    -          }
    -          if (k < elements.length) {
    -            // finish up in a continuation
    -            win.setTimeout(doWork, 250);
    -          } else if ('function' === typeof opt_whenDone) {
    -            opt_whenDone();
    -          }
    -        }
    -    
    -        doWork();
    -      }
    -    
    -      /**
    -       * Contains functions for creating and registering new language handlers.
    -       * @type {Object}
    -       */
    -      var PR = win['PR'] = {
    -            'createSimpleLexer': createSimpleLexer,
    -            'registerLangHandler': registerLangHandler,
    -            'sourceDecorator': sourceDecorator,
    -            'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
    -            'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
    -            'PR_COMMENT': PR_COMMENT,
    -            'PR_DECLARATION': PR_DECLARATION,
    -            'PR_KEYWORD': PR_KEYWORD,
    -            'PR_LITERAL': PR_LITERAL,
    -            'PR_NOCODE': PR_NOCODE,
    -            'PR_PLAIN': PR_PLAIN,
    -            'PR_PUNCTUATION': PR_PUNCTUATION,
    -            'PR_SOURCE': PR_SOURCE,
    -            'PR_STRING': PR_STRING,
    -            'PR_TAG': PR_TAG,
    -            'PR_TYPE': PR_TYPE,
    -            'prettyPrintOne':
    -               IN_GLOBAL_SCOPE
    -                 ? (win['prettyPrintOne'] = $prettyPrintOne)
    -                 : (prettyPrintOne = $prettyPrintOne),
    -            'prettyPrint': prettyPrint =
    -               IN_GLOBAL_SCOPE
    -                 ? (win['prettyPrint'] = $prettyPrint)
    -                 : (prettyPrint = $prettyPrint)
    -          };
    -    
    -      // Make PR available via the Asynchronous Module Definition (AMD) API.
    -      // Per https://github.com/amdjs/amdjs-api/wiki/AMD:
    -      // The Asynchronous Module Definition (AMD) API specifies a
    -      // mechanism for defining modules such that the module and its
    -      // dependencies can be asynchronously loaded.
    -      // ...
    -      // To allow a clear indicator that a global define function (as
    -      // needed for script src browser loading) conforms to the AMD API,
    -      // any global define function SHOULD have a property called "amd"
    -      // whose value is an object. This helps avoid conflict with any
    -      // other existing JavaScript code that could have defined a define()
    -      // function that does not conform to the AMD API.
    -      var define = win['define'];
    -      if (typeof define === "function" && define['amd']) {
    -        define("google-code-prettify", [], function () {
    -          return PR;
    -        });
    -      }
    -    })();
    -    return prettyPrint;
    -  })();
    -
    -  // If this script is deferred or async and the document is already
    -  // loaded we need to wait for language handlers to load before performing
    -  // any autorun.
    -  function onLangsLoaded() {
    -    if (autorun) {
    -      contentLoaded(
    -        function () {
    -          var n = callbacks.length;
    -          var callback = n ? function () {
    -            for (var i = 0; i < n; ++i) {
    -              (function (i) {
    -                win.setTimeout(
    -                   function () {
    -                     win['exports'][callbacks[i]].apply(win, arguments);
    -                   }, 0);
    -               })(i);
    -            }
    -          } : void 0;
    -          prettyPrint(callback);
    -        });
    -    }
    -  }
    -  checkPendingLanguages();
    -
    -}());
    diff --git a/doc/slihelp_generator/assets/js/highlight/CHANGES.md b/doc/slihelp_generator/assets/js/highlight/CHANGES.md
    deleted file mode 100644
    index 05473a2656..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/CHANGES.md
    +++ /dev/null
    @@ -1,1646 +0,0 @@
    -## Version 9.12.0
    -
    -New language:
    -
    -- *MikroTik* RouterOS Scripting language by [Ivan Dementev][].
    -
    -New style:
    -
    -- *VisualStudio 2015 Dark* by [Nicolas LLOBERA][]
    -
    -Improvements:
    -
    -- *Crystal* updated with new keywords and syntaxes by [Tsuyusato Kitsune][].
    -- *Julia* updated to the modern definitions by [Alex Arslan][].
    -- *julia-repl* added by [Morten Piibeleht][].
    -- [Stanislav Belov][] wrote a new definition for *1C*, replacing the one that
    -  has not been updated for more than 8 years. The new version supports syntax
    -  for versions 7.7 and 8.
    -- [Nicolas LLOBERA][] improved C# definition fixing edge cases with function
    -  titles detection and added highlighting of `[Attributes]`.
    -- [nnnik][] provided a few correctness fixes for *Autohotkey*.
    -- [Martin Clausen][] made annotation collections in *Clojure* to look
    -  consistently with other kinds.
    -- [Alejandro Alonso][] updated *Swift* keywords.
    -
    -[Tsuyusato Kitsune]: https://github.com/MakeNowJust
    -[Alex Arslan]: https://github.com/ararslan
    -[Morten Piibeleht]: https://github.com/mortenpi
    -[Stanislav Belov]: https://github.com/4ppl
    -[Ivan Dementev]: https://github.com/DiVAN1x
    -[Nicolas LLOBERA]: https://github.com/Nicolas01
    -[nnnik]: https://github.com/nnnik
    -[Martin Clausen]: https://github.com/maacl
    -[Alejandro Alonso]: https://github.com/Azoy
    -
    -
    -## Version 9.11.0
    -
    -New languages:
    -
    -- *Shell* by [Tsuyusato Kitsune][]
    -- *jboss-cli* by [Raphaël Parrëe][]
    -
    -Improvements:
    -
    -- [Joël Porquet] has [greatly improved the definition of *makefile*][5b3e0e6].
    -- *C++* class titles are now highlighted as in other languages with classes.
    -- [Jordi Petit][] added rarely used `or`, `and` and `not` keywords to *C++*.
    -- [Pieter Vantorre][] fixed highlighting of negative floating point values.
    -
    -
    -[Tsuyusato Kitsune]: https://github.com/MakeNowJust
    -[Jordi Petit]: https://github.com/jordi-petit
    -[Raphaël Parrëe]: https://github.com/rparree
    -[Pieter Vantorre]: https://github.com/NuclearCookie
    -[5b3e0e6]: https://github.com/isagalaev/highlight.js/commit/5b3e0e68bfaae282faff6697d6a490567fa9d44b
    -
    -
    -## Version 9.10.0
    -
    -Apologies for missing the previous release cycle. Some thing just can't be
    -automated… Anyway, we're back!
    -
    -New languages:
    -
    -- *Hy* by [Sergey Sobko][]
    -- *Leaf* by [Hale Chan][]
    -- *N1QL* by [Andres Täht][] and [Rene Saarsoo][]
    -
    -Improvements:
    -
    -- *Rust* got updated with new keywords by [Kasper Andersen][] and then
    -  significantly modernized even more by [Eduard-Mihai Burtescu][] (yes, @eddyb,
    -  Rust core team member!)
    -- *Python* updated with f-literals by [Philipp A][].
    -- *YAML* updated with unquoted strings support.
    -- *Gauss* updated with new keywords by [Matt Evans][].
    -- *Lua* updated with new keywords by [Joe Blow][].
    -- *Kotlin* updated with new keywords by [Philipp Hauer][].
    -- *TypeScript* got highlighting of function params and updated keywords by
    -  [Ike Ku][].
    -- *Scheme* now correctly handles \`-quoted lists thanks to [Guannan Wei].
    -- [Sam Wu][] fixed handling of `<<` in *C++* defines.
    -
    -[Philipp A]: https://github.com/flying-sheep
    -[Philipp Hauer]: https://github.com/phauer
    -[Sergey Sobko]: https://github.com/profitware
    -[Hale Chan]: https://github.com/halechan
    -[Matt Evans]: https://github.com/matthewevans
    -[Joe Blow]: https://github.com/mossarelli
    -[Kasper Andersen]: https://github.com/kasma1990
    -[Eduard-Mihai Burtescu]: https://github.com/eddyb
    -[Andres Täht]: https://github.com/andrestaht
    -[Rene Saarsoo]: https://github.com/nene
    -[Philipp Hauer]: https://github.com/phauer
    -[Ike Ku]: https://github.com/dempfi
    -[Guannan Wei]: https://github.com/Kraks
    -[Sam Wu]: https://github.com/samsam2310
    -
    -
    -## Version 9.9.0
    -
    -New languages
    -
    -- *LLVM* by [Michael Rodler][]
    -
    -Improvements:
    -
    -- *TypeScript* updated with annotations and param lists inside constructors, by
    -  [Raphael Parree][].
    -- *CoffeeScript* updated with new keywords and fixed to recognize JavaScript
    -  in \`\`\`, thanks to thanks to [Geoffrey Booth][].
    -- Compiler directives in *Delphi* are now correctly highlighted as "meta".
    -
    -[Raphael Parree]: https://github.com/rparree
    -[Michael Rodler]: https://github.com/f0rki
    -[Geoffrey Booth]: https://github.com/GeoffreyBooth
    -
    -
    -## Version 9.8.0 "New York"
    -
    -This version is the second one that deserved a name. Because I'm in New York,
    -and the release isn't missing the deadline only because it's still Tuesday on
    -West Coast.
    -
    -New languages:
    -
    -- *Clean* by [Camil Staps][]
    -- *Flix* by [Magnus Madsen][]
    -
    -Improvements:
    -
    -- [Kenton Hamaluik][] did a comprehensive update for *Haxe*.
    -- New commands for *PowerShell* from [Nicolas Le Gall][].
    -- [Jan T. Sott][] updated *NSIS*.
    -- *Java* and *Swift* support unicode characters in identifiers thanks to
    -  [Alexander Lichter][].
    -
    -[Camil Staps]: https://github.com/camilstaps
    -[Magnus Madsen]: https://github.com/magnus-madsen
    -[Kenton Hamaluik]: https://github.com/FuzzyWuzzie
    -[Nicolas Le Gall]: https://github.com/darkitty
    -[Jan T. Sott]: https://github.com/idleberg
    -[Alexander Lichter]: https://github.com/manniL
    -
    -
    -## Version 9.7.0
    -
    -A comprehensive bugfix release. This is one of the best things about
    -highlight.js: even boring things keep getting better (even if slow).
    -
    -- VHDL updated with PSL keywords and uses more consistent styling.
    -- Nested C-style comments no longer break highlighting in many languages.
    -- JavaScript updated with `=>` functions, highlighted object attributes and
    -  parsing within template string substitution blocks (`${...}`).
    -- Fixed another corner case with self-closing `<tag/>` in JSX.
    -- Added `HEALTHCHECK` directive in Docker.
    -- Delphi updated with new Free Pascal keywords.
    -- Fixed digit separator parsing in C++.
    -- C# updated with new keywords and fixed to allow multiple identifiers within
    -  generics `<...>`.
    -- Fixed another slow regex in Less.
    -
    -
    -## Version 9.6.0
    -
    -New languages:
    -
    -- *ABNF* and *EBNF* by [Alex McKibben][]
    -- *Awk* by [Matthew Daly][]
    -- *SubUnit* by [Sergey Bronnikov][]
    -
    -New styles:
    -
    -- *Atom One* in both Dark and Light variants  by [Daniel Gamage][]
    -
    -Plus, a few smaller updates for *Lasso*, *Elixir*, *C++* and *SQL*.
    -
    -[Alex McKibben]: https://github.com/mckibbenta
    -[Daniel Gamage]: https://github.com/danielgamage
    -[Matthew Daly]: https://github.com/matthewbdaly
    -[Sergey Bronnikov]: https://github.com/ligurio
    -
    -
    -## Version 9.5.0
    -
    -New languages:
    -
    -- *Excel* by [Victor Zhou][]
    -- *Linden Scripting Language* by [Builder's Brewery][]
    -- *TAP* (Test Anything Protocol) by [Sergey Bronnikov][]
    -- *Pony* by [Joe Eli McIlvain][]
    -- *Coq* by [Stephan Boyer][]
    -- *dsconfig* and *LDIF* by [Jacob Childress][]
    -
    -New styles:
    -
    -- *Ocean Dark* by [Gavin Siu][]
    -
    -Notable changes:
    -
    -- [Minh Nguyễn][] added more built-ins to Objective C.
    -- [Jeremy Hull][] fixed corner cases in C++ preprocessor directives and Diff
    -  comments.
    -- [Victor Zhou][] added support for digit separators in C++ numbers.
    -
    -[Gavin Siu]: https://github.com/gavsiu
    -[Builder's Brewery]: https://github.com/buildersbrewery
    -[Victor Zhou]: https://github.com/OiCMudkips
    -[Sergey Bronnikov]: https://github.com/ligurio
    -[Joe Eli McIlvain]: https://github.com/jemc
    -[Stephan Boyer]: https://github.com/boyers
    -[Jacob Childress]: https://github.com/braveulysses
    -[Minh Nguyễn]: https://github.com/1ec5
    -[Jeremy Hull]: https://github.com/sourrust
    -
    -
    -## Version 9.4.0
    -
    -New languages:
    -
    -- *PureBASIC* by [Tristano Ajmone][]
    -- *BNF* by [Oleg Efimov][]
    -- *Ada* by [Lars Schulna][]
    -
    -New styles:
    -
    -- *PureBASIC* by [Tristano Ajmone][]
    -
    -Improvements to existing languages and styles:
    -
    -- We now highlight function declarations in Go.
    -- [Taisuke Fujimoto][] contributed very convoluted rules for raw and
    -  interpolated strings in C#.
    -- [Boone Severson][] updated Verilog to comply with IEEE 1800-2012
    -  SystemVerilog.
    -- [Victor Zhou][] improved rules for comments and strings in PowerShell files.
    -- [Janis Voigtländer][] updated the definition of Elm to version 0.17 of the
    -  languages. Elm is now featured on the front page of <https://highlightjs.org>.
    -- Special variable `$this` is highlighted as a keyword in PHP.
    -- `usize` and `isize` are now highlighted in Rust.
    -- Fixed labels and directives in x86 assembler.
    -
    -[Tristano Ajmone]: https://github.com/tajmone
    -[Taisuke Fujimoto]: https://github.com/temp-impl
    -[Oleg Efimov]: https://github.com/Sannis
    -[Boone Severson]: https://github.com/BooneJS
    -[Victor Zhou]: https://github.com/OiCMudkips
    -[Lars Schulna]: https://github.com/captain-hanuta
    -[Janis Voigtländer]: https://github.com/jvoigtlaender
    -
    -
    -## Version 9.3.0
    -
    -New languages:
    -
    -- *Tagger Script* by [Philipp Wolfer][]
    -- *MoonScript* by [Billy Quith][]
    -
    -New styles:
    -
    -- *xt256* by [Herbert Shin][]
    -
    -Improvements to existing languages and styles:
    -
    -- More robust handling of unquoted HTML tag attributes
    -- Relevance tuning for QML which was unnecessary eager at seizing other
    -  languages' code
    -- Improve GAMS language parsing
    -- Fixed a bunch of bugs around selectors in Less
    -- Kotlin's got a new definition for annotations, updated keywords and other
    -  minor improvements
    -- Added `move` to Rust keywords
    -- Markdown now recognizes \`\`\`-fenced code blocks
    -- Improved detection of function declarations in C++ and C#
    -
    -[Philipp Wolfer]: https://github.com/phw
    -[Billy Quith]: https://github.com/billyquith
    -[Herbert Shin]: https://github.com/initbar
    -
    -
    -## Version 9.2.0
    -
    -New languages:
    -
    -- *QML* by [John Foster][]
    -- *HTMLBars* by [Michael Johnston][]
    -- *CSP* by [Taras][]
    -- *Maxima* by [Robert Dodier][]
    -
    -New styles:
    -
    -- *Gruvbox* by [Qeole][]
    -- *Dracula* by [Denis Ciccale][]
    -
    -Improvements to existing languages and styles:
    -
    -- We now correctly handle JSX with arbitrary node tree depth.
    -- Argument list for `(lambda)` in Scheme is no longer highlighted as a function
    -  call.
    -- Stylus syntax doesn't break on valid CSS.
    -- More correct handling of comments and strings and other improvements for
    -  VimScript.
    -- More subtle work on the default style.
    -- We now use anonymous modules for AMD.
    -- `macro_rules!` is now recognized as a built-in in Rust.
    -
    -[John Foster]: https://github.com/jf990
    -[Qeole]: https://github.com/Qeole
    -[Denis Ciccale]: https://github.com/dciccale
    -[Michael Johnston]: https://github.com/lastobelus
    -[Taras]: https://github.com/oxdef
    -[Robert Dodier]: https://github.com/robert-dodier
    -
    -
    -## Version 9.1.0
    -
    -New languages:
    -
    -- *Stan* by [Brendan Rocks][]
    -- *BASIC* by [Raphaël Assénat][]
    -- *GAUSS* by [Matt Evans][]
    -- *DTS* by [Martin Braun][]
    -- *Arduino* by [Stefania Mellai][]
    -
    -New Styles:
    -
    -- *Arduino Light* by [Stefania Mellai][]
    -
    -Improvements to existing languages and styles:
    -
    -- Handle return type annotations in Python
    -- Allow shebang headers in Javascript
    -- Support strings in Rust meta
    -- Recognize `struct` as a class-level definition in Rust
    -- Recognize b-prefixed chars and strings in Rust
    -- Better numbers handling in Verilog
    -
    -[Brendan Rocks]: http://brendanrocks.com
    -[Raphaël Assénat]: https://github.com/raphnet
    -[Matt Evans]: https://github.com/matthewevans
    -[Martin Braun]: https://github.com/mbr0wn
    -[Stefania Mellai]: https://github.com/smellai
    -
    -
    -## Version 9.0.0
    -
    -The new major version brings a reworked styling system. Highlight.js now defines
    -a limited set of highlightable classes giving a consistent result across all the
    -styles and languages. You can read a more detailed explanation and background in
    -the [tracking issue][#348] that started this long process back in May.
    -
    -This change is backwards incompatible for those who uses highlight.js with a
    -custom stylesheet. The [new style guide][sg] explains how to write styles
    -in this new world.
    -
    -Bundled themes have also suffered a significant amount of improvements and may
    -look different in places, but all the things now consistent and make more sense.
    -Among others, the Default style has got a refresh and will probably be tweaked
    -some more in next releases. Please do give your feedback in our
    -[issue tracker][issues].
    -
    -New languages in this release:
    -
    -- *Caché Object Script* by [Nikita Savchenko][]
    -- *YAML* by [Stefan Wienert][]
    -- *MIPS Assembler* by [Nebuleon Fumika][]
    -- *HSP* by [prince][]
    -
    -Improvements to existing languages and styles:
    -
    -- ECMAScript 6 modules import now do not require closing semicolon.
    -- ECMAScript 6 classes constructors now highlighted.
    -- Template string support for Typescript, as for ECMAScript 6.
    -- Scala case classes params highlight fixed.
    -- Built-in names introduced in Julia v0.4 added by [Kenta Sato][].
    -- Refreshed Default style.
    -
    -Other notable changes:
    -
    -- [Web workers support][webworkers] added bu [Jan Kühle][].
    -- We now have tests for compressed browser builds as well.
    -- The building tool chain has been switched to node.js 4.x. and is now
    -  shamelessly uses ES6 features all over the place, courtesy of [Jeremy Hull][].
    -- License added to non-compressed browser build.
    -
    -[Jan Kühle]: https://github.com/frigus02
    -[Stefan Wienert]: https://github.com/zealot128
    -[Kenta Sato]: https://github.com/bicycle1885
    -[Nikita Savchenko]: https://github.com/ZitRos
    -[webworkers]: https://github.com/isagalaev/highlight.js#web-workers
    -[Jeremy Hull]: https://github.com/sourrust
    -[#348]: https://github.com/isagalaev/highlight.js/issues/348
    -[sg]: http://highlightjs.readthedocs.org/en/latest/style-guide.html
    -[issues]: https://github.com/isagalaev/highlight.js/issues
    -[Nebuleon Fumika]: https://github.com/Nebuleon
    -[prince]: https://github.com/prince-0203
    -
    -
    -## Version 8.9.1
    -
    -Some last-minute changes reverted due to strange bug with minified browser build:
    -
    -- Scala case classes params highlight fixed
    -- ECMAScript 6 modules import now do not require closing semicolon
    -- ECMAScript 6 classes constructors now highlighted
    -- Template string support for Typescript, as for ECMAScript 6
    -- License added to not minified browser build
    -
    -
    -## Version 8.9.0
    -
    -New languages:
    -
    -- *crmsh* by [Kristoffer Gronlund][]
    -- *SQF* by [Soren Enevoldsen][]
    -
    -[Kristoffer Gronlund]: https://github.com/krig
    -[Soren Enevoldsen]: https://github.com/senevoldsen90
    -
    -Notable fixes and improvements to existing languages:
    -
    -- Added `abstract` and `namespace` keywords to TypeScript by [Daniel Rosenwasser][]
    -- Added `label` support to Dockerfile by [Ladislav Prskavec][]
    -- Crystal highlighting improved by [Tsuyusato Kitsune][]
    -- Missing Swift keywords added by [Nate Cook][]
    -- Improve detection of C block comments
    -- ~~Scala case classes params highlight fixed~~
    -- ~~ECMAScript 6 modules import now do not require closing semicolon~~
    -- ~~ECMAScript 6 classes constructors now highlighted~~
    -- ~~Template string support for Typescript, as for ECMAScript 6~~
    -
    -Other notable changes:
    -
    -- ~~License added to not minified browser build~~
    -
    -[Kristoffer Gronlund]: https://github.com/krig
    -[Søren Enevoldsen]: https://github.com/senevoldsen90
    -[Daniel Rosenwasser]: https://github.com/DanielRosenwasser
    -[Ladislav Prskavec]: https://github.com/abtris
    -[Tsuyusato Kitsune]: https://github.com/MakeNowJust
    -[Nate Cook]: https://github.com/natecook1000
    -
    -
    -## Version 8.8.0
    -
    -New languages:
    -
    -- *Golo* by [Philippe Charrière][]
    -- *GAMS* by [Stefan Bechert][]
    -- *IRPF90* by [Anthony Scemama][]
    -- *Access logs* by [Oleg Efimov][]
    -- *Crystal* by [Tsuyusato Kitsune][]
    -
    -Notable fixes and improvements to existing languages:
    -
    -- JavaScript highlighting no longer fails with ES6 default parameters
    -- Added keywords `async` and `await` to Python
    -- PHP heredoc support improved
    -- Allow preprocessor directives within C++ functions
    -
    -Other notable changes:
    -
    -- Change versions to X.Y.Z SemVer-compatible format
    -- Added ability to build all targets at once
    -
    -[Philippe Charrière]: https://github.com/k33g
    -[Stefan Bechert]: https://github.com/b-pos465
    -[Anthony Scemama]: https://github.com/scemama
    -[Oleg Efimov]: https://github.com/Sannis
    -[Tsuyusato Kitsune]: https://github.com/MakeNowJust
    -
    -
    -## Version 8.7
    -
    -New languages:
    -
    -- *Zephir* by [Oleg Efimov][]
    -- *Elm* by [Janis Voigtländer][]
    -- *XQuery* by [Dirk Kirsten][]
    -- *Mojolicious* by [Dotan Dimet][]
    -- *AutoIt* by Manh Tuan from [J2TeaM][]
    -- *Toml* (ini extension) by [Guillaume Gomez][]
    -
    -New styles:
    -
    -- *Hopscotch* by [Jan T. Sott][]
    -- *Grayscale* by [MY Sun][]
    -
    -Notable fixes and improvements to existing languages:
    -
    -- Fix encoding of images when copied over in certain builds
    -- Fix incorrect highlighting of the word "bug" in comments
    -- Treat decorators different from matrix multiplication in Python
    -- Fix traits inheritance highlighting in Rust
    -- Fix incorrect document
    -- Oracle keywords added to SQL language definition by [Vadimtro][]
    -- Postgres keywords added to SQL language definition by [Benjamin Auder][]
    -- Fix registers in x86asm being highlighted as a hex number
    -- Fix highlighting for numbers with a leading decimal point
    -- Correctly highlight numbers and strings inside of C/C++ macros
    -- C/C++ functions now support pointer, reference, and move returns
    -
    -[Oleg Efimov]: https://github.com/Sannis
    -[Guillaume Gomez]: https://github.com/GuillaumeGomez
    -[Janis Voigtländer]: https://github.com/jvoigtlaender
    -[Jan T. Sott]: https://github.com/idleberg
    -[Dirk Kirsten]: https://github.com/dirkk
    -[MY Sun]: https://github.com/simonmysun
    -[Vadimtro]: https://github.com/Vadimtro
    -[Benjamin Auder]: https://github.com/ghost
    -[Dotan Dimet]: https://github.com/dotandimet
    -[J2TeaM]: https://github.com/J2TeaM
    -
    -
    -## Version 8.6
    -
    -New languages:
    -
    -- *C/AL* by [Kenneth Fuglsang][]
    -- *DNS zone file* by [Tim Schumacher][]
    -- *Ceylon* by [Lucas Werkmeister][]
    -- *OpenSCAD* by [Dan Panzarella][]
    -- *Inform7* by [Bruno Dias][]
    -- *armasm* by [Dan Panzarella][]
    -- *TP* by [Jay Strybis][]
    -
    -New styles:
    -
    -- *Atelier Cave*, *Atelier Estuary*,
    -  *Atelier Plateau* and *Atelier Savanna* by [Bram de Haan][]
    -- *Github Gist* by [Louis Barranqueiro][]
    -
    -Notable fixes and improvements to existing languages:
    -
    -- Multi-line raw strings from C++11 are now supported
    -- Fix class names with dashes in HAML
    -- The `async` keyword from ES6/7 is now supported
    -- TypeScript functions handle type and parameter complexity better
    -- We unified phpdoc/javadoc/yardoc etc modes across all languages
    -- CSS .class selectors relevance was dropped to prevent wrong language detection
    -- Images is now included to CDN build
    -- Release process is now automated
    -
    -[Bram de Haan]: https://github.com/atelierbram
    -[Kenneth Fuglsang]: https://github.com/kfuglsang
    -[Louis Barranqueiro]: https://github.com/LouisBarranqueiro
    -[Tim Schumacher]: https://github.com/enko
    -[Lucas Werkmeister]: https://github.com/lucaswerkmeister
    -[Dan Panzarella]: https://github.com/pzl
    -[Bruno Dias]: https://github.com/sequitur
    -[Jay Strybis]: https://github.com/unreal
    -
    -
    -## Version 8.5
    -
    -New languages:
    -
    -- *pf.conf* by [Peter Piwowarski][]
    -- *Julia* by [Kenta Sato][]
    -- *Prolog* by [Raivo Laanemets][]
    -- *Docker* by [Alexis Hénaut][]
    -- *Fortran* by [Anthony Scemama][] and [Thomas Applencourt][]
    -- *Kotlin* by [Sergey Mashkov][]
    -
    -New styles:
    -
    -- *Agate* by [Taufik Nurrohman][]
    -- *Darcula* by [JetBrains][]
    -- *Atelier Sulphurpool* by [Bram de Haan][]
    -- *Android Studio* by [Pedro Oliveira][]
    -
    -Notable fixes and improvements to existing languages:
    -
    -- ES6 features in JavaScript are better supported now by [Gu Yiling][].
    -- Swift now recognizes body-less method definitions.
    -- Single expression functions `def foo, do: ... ` now work in Elixir.
    -- More uniform detection of built-in classes in Objective C.
    -- Fixes for number literals and processor directives in Rust.
    -- HTML `<script>` tag now allows any language, not just JavaScript.
    -- Multi-line comments are supported now in MatLab.
    -
    -[Taufik Nurrohman]: https://github.com/tovic
    -[Jet Brains]: https://www.jetbrains.com/
    -[Peter Piwowarski]: https://github.com/oldlaptop
    -[Kenta Sato]: https://github.com/bicycle1885
    -[Bram de Haan]: https://github.com/atelierbram
    -[Raivo Laanemets]: https://github.com/rla
    -[Alexis Hénaut]: https://github.com/AlexisNo
    -[Anthony Scemama]: https://github.com/scemama
    -[Pedro Oliveira]: https://github.com/kanytu
    -[Gu Yiling]: https://github.com/Justineo
    -[Sergey Mashkov]: https://github.com/cy6erGn0m
    -[Thomas Applencourt]: https://github.com/TApplencourt
    -
    -
    -## Version 8.4
    -
    -We've got the new [demo page][]! The obvious new feature is the new look, but
    -apart from that it's got smarter: by presenting languages in groups it avoids
    -running 10000 highlighting attempts after first load which was slowing it down
    -and giving bad overall impression. It is now also being generated from test
    -code snippets so the authors of new languages don't have to update both tests
    -and the demo page with the same thing.
    -
    -Other notable changes:
    -
    -- The `template_comment` class is gone in favor of the more general `comment`.
    -- Number parsing unified and improved across languages.
    -- C++, Java and C# now use unified grammar to highlight titles in
    -  function/method definitions.
    -- The browser build is now usable as an AMD module, there's no separate build
    -  target for that anymore.
    -- OCaml has got a [comprehensive overhaul][ocaml] by [Mickaël Delahaye][].
    -- Clojure's data structures and literals are now highlighted outside of lists
    -  and we can now highlight Clojure's REPL sessions.
    -
    -New languages:
    -
    -- *AspectJ* by [Hakan Özler][]
    -- *STEP Part 21* by [Adam Joseph Cook][]
    -- *SML* derived by [Edwin Dalorzo][] from OCaml definition
    -- *Mercury* by [mucaho][]
    -- *Smali* by [Dennis Titze][]
    -- *Verilog* by [Jon Evans][]
    -- *Stata* by [Brian Quistorff][]
    -
    -[Hakan Özler]: https://github.com/ozlerhakan
    -[Adam Joseph Cook]: https://github.com/adamjcook
    -[demo page]: https://highlightjs.org/static/demo/
    -[Ivan Sagalaev]: https://github.com/isagalaev
    -[Edwin Dalorzo]: https://github.com/edalorzo
    -[mucaho]: https://github.com/mucaho
    -[Dennis Titze]: https://github.com/titze
    -[Jon Evans]: https://github.com/craftyjon
    -[Brian Quistorff]: https://github.com/bquistorff
    -[ocaml]: https://github.com/isagalaev/highlight.js/pull/608#issue-46190207
    -[Mickaël Delahaye]: https://github.com/polazarus
    -
    -
    -## Version 8.3
    -
    -We streamlined our tool chain, it is now based entirely on node.js instead of
    -being a mix of node.js, Python and Java. The build script options and arguments
    -remained the same, and we've noted all the changes in the [documentation][b].
    -Apart from reducing complexity, the new build script is also faster from not
    -having to start Java machine repeatedly. The credits for the work go to [Jeremy
    -Hull][].
    -
    -Some notable fixes:
    -
    -- PHP and JavaScript mixed in HTML now live happily with each other.
    -- JavaScript regexes now understand ES6 flags "u" and "y".
    -- `throw` keyword is no longer detected as a method name in Java.
    -- Fixed parsing of numbers and symbols in Clojure thanks to [input from Ivan
    -  Kleshnin][ik].
    -
    -New languages in this release:
    -
    -- *Less* by [Max Mikhailov][]
    -- *Stylus* by [Bryant Williams][]
    -- *Tcl* by [Radek Liska][]
    -- *Puppet* by [Jose Molina Colmenero][]
    -- *Processing* by [Erik Paluka][]
    -- *Twig* templates by [Luke Holder][]
    -- *PowerShell* by [David Mohundro][], based on [the work of Nicholas Blumhardt][ps]
    -- *XL* by [Christophe de Dinechin][]
    -- *LiveScript* by [Taneli Vatanen][] and [Jen Evers-Corvina][]
    -- *ERB* (Ruby in HTML) by [Lucas Mazza][]
    -- *Roboconf* by [Vincent Zurczak][]
    -
    -[b]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
    -[Jeremy Hull]: https://github.com/sourrust
    -[ik]: https://twitter.com/IvanKleshnin/status/514041599484231680
    -[Max Mikhailov]: https://github.com/seven-phases-max
    -[Bryant Williams]: https://github.com/scien
    -[Radek Liska]: https://github.com/Nindaleth
    -[Jose Molina Colmenero]: https://github.com/Moliholy
    -[Erik Paluka]: https://github.com/paluka
    -[Luke Holder]: https://github.com/lukeholder
    -[David Mohundro]: https://github.com/drmohundro
    -[ps]: https://github.com/OctopusDeploy/Library/blob/master/app/shared/presentation/highlighting/powershell.js
    -[Christophe de Dinechin]: https://github.com/c3d
    -[Taneli Vatanen]: https://github.com/Daiz-
    -[Jen Evers-Corvina]: https://github.com/sevvie
    -[Lucas Mazza]: https://github.com/lucasmazza
    -[Vincent Zurczak]: https://github.com/vincent-zurczak
    -
    -
    -## Version 8.2
    -
    -We've finally got [real tests][test] and [continuous testing on Travis][ci]
    -thanks to [Jeremy Hull][] and [Chris Eidhof][]. The tests designed to cover
    -everything: language detection, correct parsing of individual language features
    -and various special cases. This is a very important change that gives us
    -confidence in extending language definitions and refactoring library core.
    -
    -We're going to redesign the old [demo/test suite][demo] into an interactive
    -demo web app. If you're confident front-end developer or designer and want to
    -help us with it, drop a comment into [the issue][#542] on GitHub.
    -
    -[test]: https://github.com/isagalaev/highlight.js/tree/master/test
    -[demo]: https://highlightjs.org/static/test.html
    -[#542]: https://github.com/isagalaev/highlight.js/issues/542
    -[ci]: https://travis-ci.org/isagalaev/highlight.js
    -[Jeremy Hull]: https://github.com/sourrust
    -[Chris Eidhof]: https://github.com/chriseidhof
    -
    -As usually there's a handful of new languages in this release:
    -
    -- *Groovy* by [Guillaume Laforge][]
    -- *Dart* by [Maxim Dikun][]
    -- *Dust* by [Michael Allen][]
    -- *Scheme* by [JP Verkamp][]
    -- *G-Code* by [Adam Joseph Cook][]
    -- *Q* from Kx Systems by [Sergey Vidyuk][]
    -
    -[Guillaume Laforge]: https://github.com/glaforge
    -[Maxim Dikun]: https://github.com/dikmax
    -[Michael Allen]: https://github.com/bfui
    -[JP Verkamp]: https://github.com/jpverkamp
    -[Adam Joseph Cook]: https://github.com/adamjcook
    -[Sergey Vidyuk]: https://github.com/sv
    -
    -Other improvements:
    -
    -- [Erik Osheim][] heavily reworked Scala definitions making it richer.
    -- [Lucas Mazza][] fixed Ruby hashes highlighting
    -- Lisp variants (Lisp, Clojure and Scheme) are unified in regard to naming
    -  the first symbol in parentheses: it's "keyword" in general case and also
    -  "built_in" for built-in functions in Clojure and Scheme.
    -
    -[Erik Osheim]: https://github.com/non
    -[Lucas Mazza]: https://github.com/lucasmazza
    -
    -
    -## Version 8.1
    -
    -New languages:
    -
    -- *Gherkin* by [Sam Pikesley][]
    -- *Elixir* by [Josh Adams][]
    -- *NSIS* by [Jan T. Sott][]
    -- *VIM script* by [Jun Yang][]
    -- *Protocol Buffers* by [Dan Tao][]
    -- *Nix* by [Domen Kožar][]
    -- *x86asm* by [innocenat][]
    -- *Cap’n Proto* and *Thrift* by [Oleg Efimov][]
    -- *Monkey* by [Arthur Bikmullin][]
    -- *TypeScript* by [Panu Horsmalahti][]
    -- *Nimrod* by [Flaviu Tamas][]
    -- *Gradle* by [Damian Mee][]
    -- *Haxe* by [Christopher Kaster][]
    -- *Swift* by [Chris Eidhof][] and [Nate Cook][]
    -
    -New styles:
    -
    -- *Kimbie*, light and dark variants by [Jan T. Sott][]
    -- *Color brewer* by [Fabrício Tavares de Oliveira][]
    -- *Codepen.io embed* by [Justin Perry][]
    -- *Hybrid* by [Nic West][]
    -
    -[Sam Pikesley]: https://github.com/pikesley
    -[Sindre Sorhus]: https://github.com/sindresorhus
    -[Josh Adams]: https://github.com/knewter
    -[Jan T. Sott]: https://github.com/idleberg
    -[Jun Yang]: https://github.com/harttle
    -[Dan Tao]: https://github.com/dtao
    -[Domen Kožar]: https://github.com/iElectric
    -[innocenat]: https://github.com/innocenat
    -[Oleg Efimov]: https://github.com/Sannis
    -[Arthur Bikmullin]: https://github.com/devolonter
    -[Panu Horsmalahti]: https://github.com/panuhorsmalahti
    -[Flaviu Tamas]: https://github.com/flaviut
    -[Damian Mee]: https://github.com/chester1000
    -[Christopher Kaster]: http://christopher.kaster.ws
    -[Fabrício Tavares de Oliveira]: https://github.com/fabriciotav
    -[Justin Perry]: https://github.com/ourmaninamsterdam
    -[Nic West]: https://github.com/nicwest
    -[Chris Eidhof]: https://github.com/chriseidhof
    -[Nate Cook]: https://github.com/natecook1000
    -
    -Other improvements:
    -
    -- The README is heavily reworked and brought up to date by [Jeremy Hull][].
    -- Added [`listLanguages()`][ll] method in the API.
    -- Improved C/C++/C# detection.
    -- Added a bunch of new language aliases, documented the existing ones. Thanks to
    -  [Sindre Sorhus][] for background research.
    -- Added phrasal English words to boost relevance in comments.
    -- Many improvements to SQL definition made by [Heiko August][],
    -  [Nikolay Lisienko][] and [Travis Odom][].
    -- The shorter `lang-` prefix for language names in HTML classes supported
    -  alongside `language-`. Thanks to [Jeff Escalante][].
    -- Ruby's got support for interactive console sessions. Thanks to
    -  [Pascal Hurni][].
    -- Added built-in functions for R language. Thanks to [Artem A. Klevtsov][].
    -- Rust's got definition for lifetime parameters and improved string syntax.
    -  Thanks to [Roman Shmatov][].
    -- Various improvements to Objective-C definition by [Matt Diephouse][].
    -- Fixed highlighting of generics in Java.
    -
    -[ll]: http://highlightjs.readthedocs.org/en/latest/api.html#listlanguages
    -[Sindre Sorhus]: https://github.com/sindresorhus
    -[Heiko August]: https://github.com/auge8472
    -[Nikolay Lisienko]: https://github.com/neor-ru
    -[Travis Odom]: https://github.com/Burstaholic
    -[Jeff Escalante]: https://github.com/jenius
    -[Pascal Hurni]: https://github.com/phurni
    -[Jiyin Yiyong]: https://github.com/jiyinyiyong
    -[Artem A. Klevtsov]: https://github.com/unikum
    -[Roman Shmatov]: https://github.com/shmatov
    -[Jeremy Hull]: https://github.com/sourrust
    -[Matt Diephouse]: https://github.com/mdiep
    -
    -
    -## Version 8.0
    -
    -This new major release is quite a big overhaul bringing both new features and
    -some backwards incompatible changes. However, chances are that the majority of
    -users won't be affected by the latter: the basic scenario described in the
    -README is left intact.
    -
    -Here's what did change in an incompatible way:
    -
    -- We're now prefixing all classes located in [CSS classes reference][cr] with
    -  `hljs-`, by default, because some class names would collide with other
    -  people's stylesheets. If you were using an older version, you might still want
    -  the previous behavior, but still want to upgrade. To suppress this new
    -  behavior, you would initialize like so:
    -
    -  ```html
    -  <script type="text/javascript">
    -    hljs.configure({classPrefix: ''});
    -    hljs.initHighlightingOnLoad();
    -  </script>
    -  ```
    -
    -- `tabReplace` and `useBR` that were used in different places are also unified
    -  into the global options object and are to be set using `configure(options)`.
    -  This function is documented in our [API docs][]. Also note that these
    -  parameters are gone from `highlightBlock` and `fixMarkup` which are now also
    -  rely on `configure`.
    -
    -- We removed public-facing (though undocumented) object `hljs.LANGUAGES` which
    -  was used to register languages with the library in favor of two new methods:
    -  `registerLanguage` and `getLanguage`. Both are documented in our [API docs][].
    -
    -- Result returned from `highlight` and `highlightAuto` no longer contains two
    -  separate attributes contributing to relevance score, `relevance` and
    -  `keyword_count`. They are now unified in `relevance`.
    -
    -Another technically compatible change that nonetheless might need attention:
    -
    -- The structure of the NPM package was refactored, so if you had installed it
    -  locally, you'll have to update your paths. The usual `require('highlight.js')`
    -  works as before. This is contributed by [Dmitry Smolin][].
    -
    -New features:
    -
    -- Languages now can be recognized by multiple names like "js" for JavaScript or
    -  "html" for, well, HTML (which earlier insisted on calling it "xml"). These
    -  aliases can be specified in the class attribute of the code container in your
    -  HTML as well as in various API calls. For now there are only a few very common
    -  aliases but we'll expand it in the future. All of them are listed in the
    -  [class reference][cr].
    -
    -- Language detection can now be restricted to a subset of languages relevant in
    -  a given context — a web page or even a single highlighting call. This is
    -  especially useful for node.js build that includes all the known languages.
    -  Another example is a StackOverflow-style site where users specify languages
    -  as tags rather than in the markdown-formatted code snippets. This is
    -  documented in the [API reference][] (see methods `highlightAuto` and
    -  `configure`).
    -
    -- Language definition syntax streamlined with [variants][] and
    -  [beginKeywords][].
    -
    -New languages and styles:
    -
    -- *Oxygene* by [Carlo Kok][]
    -- *Mathematica* by [Daniel Kvasnička][]
    -- *Autohotkey* by [Seongwon Lee][]
    -- *Atelier* family of styles in 10 variants by [Bram de Haan][]
    -- *Paraíso* styles by [Jan T. Sott][]
    -
    -Miscellaneous improvements:
    -
    -- Highlighting `=>` prompts in Clojure.
    -- [Jeremy Hull][] fixed a lot of styles for consistency.
    -- Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html].
    -- Objective C and C# now properly highlight titles in method definition.
    -- Big overhaul of relevance counting for a number of languages. Please do report
    -  bugs about mis-detection of non-trivial code snippets!
    -
    -[API reference]: http://highlightjs.readthedocs.org/en/latest/api.html
    -
    -[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
    -[api docs]: http://highlightjs.readthedocs.org/en/latest/api.html
    -[variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion
    -[beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d
    -[php-html]: https://twitter.com/highlightjs/status/408890903017689088
    -
    -[Carlo Kok]: https://github.com/carlokok
    -[Bram de Haan]: https://github.com/atelierbram
    -[Daniel Kvasnička]: https://github.com/dkvasnicka
    -[Dmitry Smolin]: https://github.com/dimsmol
    -[Jeremy Hull]: https://github.com/sourrust
    -[Seongwon Lee]: https://github.com/dlimpid
    -[Jan T. Sott]: https://github.com/idleberg
    -
    -
    -## Version 7.5
    -
    -A catch-up release dealing with some of the accumulated contributions. This one
    -is probably will be the last before the 8.0 which will be slightly backwards
    -incompatible regarding some advanced use-cases.
    -
    -One outstanding change in this version is the addition of 6 languages to the
    -[hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and
    -Makefile. It now weighs about 6K more but we're going to keep it under 30K.
    -
    -New languages:
    -
    -- OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud]
    -- [LiveCode Server][lcs] by [Ralf Bitter][revig]
    -- Scilab by [Sylvestre Ledru][sylvestre]
    -- basic support for Makefile by [Ivan Sagalaev][isagalaev]
    -
    -Improvements:
    -
    -- Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}`
    -  regexps.
    -- Clojure now allows a function call in the beginning of s-expressions
    -  `(($filter "myCount") (arr 1 2 3 4 5))`.
    -- Haskell's got new keywords and now recognizes more things like pragmas,
    -  preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
    -  for the implementation and to [Jeremy Hull][sourrust] for guiding it.
    -- Miscellaneous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
    -
    -[mehdid]: https://github.com/mehdid
    -[nbraud]: https://github.com/nbraud
    -[revig]: https://github.com/revig
    -[lcs]: http://livecode.com/developers/guides/server/
    -[sylvestre]: https://github.com/sylvestre
    -[isagalaev]: https://github.com/isagalaev
    -[treep]: https://github.com/treep
    -[sourrust]: https://github.com/sourrust
    -[d]: http://highlightjs.org/download/
    -
    -
    -## New core developers
    -
    -The latest long period of almost complete inactivity in the project coincided
    -with growing interest to it led to a decision that now seems completely obvious:
    -we need more core developers.
    -
    -So without further ado let me welcome to the core team two long-time
    -contributors: [Jeremy Hull][] and [Oleg
    -Efimov][].
    -
    -Hope now we'll be able to work through stuff faster!
    -
    -P.S. The historical commit is [here][1] for the record.
    -
    -[Jeremy Hull]: https://github.com/sourrust
    -[Oleg Efimov]: https://github.com/sannis
    -[1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f
    -
    -
    -## Version 7.4
    -
    -This long overdue version is a snapshot of the current source tree with all the
    -changes that happened during the past year. Sorry for taking so long!
    -
    -Along with the changes in code highlight.js has finally got its new home at
    -<http://highlightjs.org/>, moving from its cradle on Software Maniacs which it
    -outgrew a long time ago. Be sure to report any bugs about the site to
    -<mailto:info@highlightjs.org>.
    -
    -On to what's new…
    -
    -New languages:
    -
    -- Handlebars templates by [Robin Ward][]
    -- Oracle Rules Language by [Jason Jacobson][]
    -- F# by [Joans Follesø][]
    -- AsciiDoc and Haml by [Dan Allen][]
    -- Lasso by [Eric Knibbe][]
    -- SCSS by [Kurt Emch][]
    -- VB.NET by [Poren Chiang][]
    -- Mizar by [Kelley van Evert][]
    -
    -[Robin Ward]: https://github.com/eviltrout
    -[Jason Jacobson]: https://github.com/jayce7
    -[Joans Follesø]: https://github.com/follesoe
    -[Dan Allen]: https://github.com/mojavelinux
    -[Eric Knibbe]: https://github.com/EricFromCanada
    -[Kurt Emch]: https://github.com/kemch
    -[Poren Chiang]: https://github.com/rschiang
    -[Kelley van Evert]: https://github.com/kelleyvanevert
    -
    -New style themes:
    -
    -- Monokai Sublime by [noformnocontent][]
    -- Railscasts by [Damien White][]
    -- Obsidian by [Alexander Marenin][]
    -- Docco by [Simon Madine][]
    -- Mono Blue by [Ivan Sagalaev][] (uses a single color hue for everything)
    -- Foundation by [Dan Allen][]
    -
    -[noformnocontent]: http://nn.mit-license.org/
    -[Damien White]: https://github.com/visoft
    -[Alexander Marenin]: https://github.com/ioncreature
    -[Simon Madine]: https://github.com/thingsinjars
    -[Ivan Sagalaev]: https://github.com/isagalaev
    -
    -Other notable changes:
    -
    -- Corrected many corner cases in CSS.
    -- Dropped Python 2 version of the build tool.
    -- Implemented building for the AMD format.
    -- Updated Rust keywords (thanks to [Dmitry Medvinsky][]).
    -- Literal regexes can now be used in language definitions.
    -- CoffeeScript highlighting is now significantly more robust and rich due to
    -  input from [Cédric Néhémie][].
    -
    -[Dmitry Medvinsky]: https://github.com/dmedvinsky
    -[Cédric Néhémie]: https://github.com/abe33
    -
    -
    -## Version 7.3
    -
    -- Since this version highlight.js no longer works in IE version 8 and older.
    -  It's made it possible to reduce the library size and dramatically improve code
    -  readability and made it easier to maintain. Time to go forward!
    -
    -- New languages: AppleScript (by [Nathan Grigg][ng] and [Dr. Drang][dd]) and
    -  Brainfuck (by [Evgeny Stepanischev][bolk]).
    -
    -- Improvements to existing languages:
    -
    -    - interpreter prompt in Python (`>>>` and `...`)
    -    - @-properties and classes in CoffeeScript
    -    - E4X in JavaScript (by [Oleg Efimov][oe])
    -    - new keywords in Perl (by [Kirk Kimmel][kk])
    -    - big Ruby syntax update (by [Vasily Polovnyov][vast])
    -    - small fixes in Bash
    -
    -- Also Oleg Efimov did a great job of moving all the docs for language and style
    -  developers and contributors from the old wiki under the source code in the
    -  "docs" directory. Now these docs are nicely presented at
    -  <http://highlightjs.readthedocs.org/>.
    -
    -[ng]: https://github.com/nathan11g
    -[dd]: https://github.com/drdrang
    -[bolk]: https://github.com/bolknote
    -[oe]: https://github.com/Sannis
    -[kk]: https://github.com/kimmel
    -[vast]: https://github.com/vast
    -
    -
    -## Version 7.2
    -
    -A regular bug-fix release without any significant new features. Enjoy!
    -
    -
    -## Version 7.1
    -
    -A Summer crop:
    -
    -- [Marc Fornos][mf] made the definition for Clojure along with the matching
    -  style Rainbow (which, of course, works for other languages too).
    -- CoffeeScript support continues to improve getting support for regular
    -  expressions.
    -- Yoshihide Jimbo ported to highlight.js [five Tomorrow styles][tm] from the
    -  [project by Chris Kempson][tm0].
    -- Thanks to [Casey Duncun][cd] the library can now be built in the popular
    -  [AMD format][amd].
    -- And last but not least, we've got a fair number of correctness and consistency
    -  fixes, including a pretty significant refactoring of Ruby.
    -
    -[mf]: https://github.com/mfornos
    -[tm]: http://jmblog.github.com/color-themes-for-highlightjs/
    -[tm0]: https://github.com/ChrisKempson/Tomorrow-Theme
    -[cd]: https://github.com/caseman
    -[amd]: http://requirejs.org/docs/whyamd.html
    -
    -
    -## Version 7.0
    -
    -The reason for the new major version update is a global change of keyword syntax
    -which resulted in the library getting smaller once again. For example, the
    -hosted build is 2K less than at the previous version while supporting two new
    -languages.
    -
    -Notable changes:
    -
    -- The library now works not only in a browser but also with [node.js][]. It is
    -  installable with `npm install highlight.js`. [API][] docs are available on our
    -  wiki.
    -
    -- The new unique feature (apparently) among syntax highlighters is highlighting
    -  *HTTP* headers and an arbitrary language in the request body. The most useful
    -  languages here are *XML* and *JSON* both of which highlight.js does support.
    -  Here's [the detailed post][p] about the feature.
    -
    -- Two new style themes: a dark "south" *[Pojoaque][]* by Jason Tate and an
    -  emulation of*XCode* IDE by [Angel Olloqui][ao].
    -
    -- Three new languages: *D* by [Aleksandar Ružičić][ar], *R* by [Joe Cheng][jc]
    -  and *GLSL* by [Sergey Tikhomirov][st].
    -
    -- *Nginx* syntax has become a million times smaller and more universal thanks to
    -  remaking it in a more generic manner that doesn't require listing all the
    -  directives in the known universe.
    -
    -- Function titles are now highlighted in *PHP*.
    -
    -- *Haskell* and *VHDL* were significantly reworked to be more rich and correct
    -  by their respective maintainers [Jeremy Hull][sr] and [Igor Kalnitsky][ik].
    -
    -And last but not least, many bugs have been fixed around correctness and
    -language detection.
    -
    -Overall highlight.js currently supports 51 languages and 20 style themes.
    -
    -[node.js]: http://nodejs.org/
    -[api]: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api
    -[p]: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/
    -[pojoaque]: http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
    -[ao]: https://github.com/angelolloqui
    -[ar]: https://github.com/raleksandar
    -[jc]: https://github.com/jcheng5
    -[st]: https://github.com/tikhomirov
    -[sr]: https://github.com/sourrust
    -[ik]: https://github.com/ikalnitsky
    -
    -
    -## Version 6.2
    -
    -A lot of things happened in highlight.js since the last version! We've got nine
    -new contributors, the discussion group came alive, and the main branch on GitHub
    -now counts more than 350 followers. Here are most significant results coming
    -from all this activity:
    -
    -- 5 (five!) new languages: Rust, ActionScript, CoffeeScript, MatLab and
    -  experimental support for markdown. Thanks go to [Andrey Vlasovskikh][av],
    -  [Alexander Myadzel][am], [Dmytrii Nagirniak][dn], [Oleg Efimov][oe], [Denis
    -  Bardadym][db] and [John Crepezzi][jc].
    -
    -- 2 new style themes: Monokai by [Luigi Maselli][lm] and stylistic imitation of
    -  another well-known highlighter Google Code Prettify by [Aahan Krish][ak].
    -
    -- A vast number of [correctness fixes and code refactorings][log], mostly made
    -  by [Oleg Efimov][oe] and [Evgeny Stepanischev][es].
    -
    -[av]: https://github.com/vlasovskikh
    -[am]: https://github.com/myadzel
    -[dn]: https://github.com/dnagir
    -[oe]: https://github.com/Sannis
    -[db]: https://github.com/btd
    -[jc]: https://github.com/seejohnrun
    -[lm]: http://grigio.org/
    -[ak]: https://github.com/geekpanth3r
    -[es]: https://github.com/bolknote
    -[log]: https://github.com/isagalaev/highlight.js/commits/
    -
    -
    -## Version 6.1 — Solarized
    -
    -[Jeremy Hull][jh] has implemented my dream feature — a port of [Solarized][]
    -style theme famous for being based on the intricate color theory to achieve
    -correct contrast and color perception. It is now available for highlight.js in
    -both variants — light and dark.
    -
    -This version also adds a new original style Arta. Its author pumbur maintains a
    -[heavily modified fork of highlight.js][pb] on GitHub.
    -
    -[jh]: https://github.com/sourrust
    -[solarized]: http://ethanschoonover.com/solarized
    -[pb]: https://github.com/pumbur/highlight.js
    -
    -
    -## Version 6.0
    -
    -New major version of the highlighter has been built on a significantly
    -refactored syntax. Due to this it's even smaller than the previous one while
    -supporting more languages!
    -
    -New languages are:
    -
    -- Haskell by [Jeremy Hull][sourrust]
    -- Erlang in two varieties — module and REPL — made collectively by [Nikolay
    -  Zakharov][desh], [Dmitry Kovega][arhibot] and [Sergey Ignatov][ignatov]
    -- Objective C by [Valerii Hiora][vhbit]
    -- Vala by [Antono Vasiljev][antono]
    -- Go by [Stephan Kountso][steplg]
    -
    -[sourrust]: https://github.com/sourrust
    -[desh]: http://desh.su/
    -[arhibot]: https://github.com/arhibot
    -[ignatov]: https://github.com/ignatov
    -[vhbit]: https://github.com/vhbit
    -[antono]: https://github.com/antono
    -[steplg]: https://github.com/steplg
    -
    -Also this version is marginally faster and fixes a number of small long-standing
    -bugs.
    -
    -Developer overview of the new language syntax is available in a [blog post about
    -recent beta release][beta].
    -
    -[beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/
    -
    -P.S. New version is not yet available on a Yandex CDN, so for now you have to
    -download [your own copy][d].
    -
    -[d]: /soft/highlight/en/download/
    -
    -
    -## Version 5.14
    -
    -Fixed bugs in HTML/XML detection and relevance introduced in previous
    -refactoring.
    -
    -Also test.html now shows the second best result of language detection by
    -relevance.
    -
    -
    -## Version 5.13
    -
    -Past weekend began with a couple of simple additions for existing languages but
    -ended up in a big code refactoring bringing along nice improvements for language
    -developers.
    -
    -### For users
    -
    -- Description of C++ has got new keywords from the upcoming [C++ 0x][] standard.
    -- Description of HTML has got new tags from [HTML 5][].
    -- CSS-styles have been unified to use consistent padding and also have lost
    -  pop-outs with names of detected languages.
    -- [Igor Kalnitsky][ik] has sent two new language descriptions: CMake & VHDL.
    -
    -This makes total number of languages supported by highlight.js to reach 35.
    -
    -Bug fixes:
    -
    -- Custom classes on `<pre>` tags are not being overridden anymore
    -- More correct highlighting of code blocks inside non-`<pre>` containers:
    -  highlighter now doesn't insist on replacing them with its own container and
    -  just replaces the contents.
    -- Small fixes in browser compatibility and heuristics.
    -
    -[c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
    -[html 5]: http://en.wikipedia.org/wiki/HTML5
    -[ik]: http://kalnitsky.org.ua/
    -
    -### For developers
    -
    -The most significant change is the ability to include language submodes right
    -under `contains` instead of defining explicit named submodes in the main array:
    -
    -    contains: [
    -      'string',
    -      'number',
    -      {begin: '\\n', end: hljs.IMMEDIATE_RE}
    -    ]
    -
    -This is useful for auxiliary modes needed only in one place to define parsing.
    -Note that such modes often don't have `className` and hence won't generate a
    -separate `<span>` in the resulting markup. This is similar in effect to
    -`noMarkup: true`. All existing languages have been refactored accordingly.
    -
    -Test file test.html has at last become a real test. Now it not only puts the
    -detected language name under the code snippet but also tests if it matches the
    -expected one. Test summary is displayed right above all language snippets.
    -
    -
    -## CDN
    -
    -Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
    -[Link up][l]!
    -
    -[yandex]: http://yandex.com/
    -[l]: http://softwaremaniacs.org/soft/highlight/en/download/
    -
    -
    -## Version 5.10 — "Paris".
    -
    -Though I'm on a vacation in Paris, I decided to release a new version with a
    -couple of small fixes:
    -
    -- Tomas Vitvar discovered that TAB replacement doesn't always work when used
    -  with custom markup in code
    -- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
    -
    -
    -## Version 5.9
    -
    -A long-awaited version is finally released.
    -
    -New languages:
    -
    -- Andrew Fedorov made a definition for Lua
    -- a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
    -  Nginx config
    -- [Vladimir Moskva][vm] made a definition for TeX
    -
    -[pl]: http://kung-fu-tzu.ru/
    -[vm]: http://fulc.ru/
    -
    -Fixes for existing languages:
    -
    -- [Loren Segal][ls] reworked the Ruby definition and added highlighting for
    -  [YARD][] inline documentation
    -- the definition of SQL has become more solid and now it shouldn't be overly
    -  greedy when it comes to language detection
    -
    -[ls]: http://gnuu.org/
    -[yard]: http://yardoc.org/
    -
    -The highlighter has become more usable as a library allowing to do highlighting
    -from initialization code of JS frameworks and in ajax methods (see.
    -readme.eng.txt).
    -
    -Also this version drops support for the [WordPress][wp] plugin. Everyone is
    -welcome to [pick up its maintenance][p] if needed.
    -
    -[wp]: http://wordpress.org/
    -[p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
    -
    -
    -## Version 5.8
    -
    -- Jan Berkel has contributed a definition for Scala. +1 to hotness!
    -- All CSS-styles are rewritten to work only inside `<pre>` tags to avoid
    -  conflicts with host site styles.
    -
    -
    -## Version 5.7.
    -
    -Fixed escaping of quotes in VBScript strings.
    -
    -
    -## Version 5.5
    -
    -This version brings a small change: now .ini-files allow digits, underscores and
    -square brackets in key names.
    -
    -
    -## Version 5.4
    -
    -Fixed small but upsetting bug in the packer which caused incorrect highlighting
    -of explicitly specified languages. Thanks to Andrew Fedorov for precise
    -diagnostics!
    -
    -
    -## Version 5.3
    -
    -The version to fulfil old promises.
    -
    -The most significant change is that highlight.js now preserves custom user
    -markup in code along with its own highlighting markup. This means that now it's
    -possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
    -[initial proposal][1] and for making a proof-of-concept patch.
    -
    -Also in this version:
    -
    -- [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
    -  support for CSS @-rules and Ruby symbols.
    -- Yura Zaripov has sent two styles: Brown Paper and School Book.
    -- Oleg Volchkov has sent a definition for [Parser 3][p3].
    -
    -[1]: http://softwaremaniacs.org/forum/highlightjs/6612/
    -[p3]: http://www.parser.ru/
    -[vp]: http://vasily.polovnyov.ru/
    -[vd]: http://dolzhenko.blogspot.com/
    -
    -
    -## Version 5.2
    -
    -- at last it's possible to replace indentation TABs with something sensible
    -  (e.g. 2 or 4 spaces)
    -- new keywords and built-ins for 1C by Sergey Baranov
    -- a couple of small fixes to Apache highlighting
    -
    -
    -## Version 5.1
    -
    -This is one of those nice version consisting entirely of new and shiny
    -contributions!
    -
    -- [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
    -- [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
    -  original visual style for it is now available for all highlight.js languages
    -  under the name "Magula".
    -- [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
    -  languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
    -  the matter.
    -
    -[vooon]: http://vehq.ru/about/
    -[rukeba]: http://rukeba.com/
    -[drake]: http://drakeguan.org/
    -[ke]: http://k-evdokimenko.moikrug.ru/
    -
    -
    -## Version 5.0
    -
    -The main change in the new major version of highlight.js is a mechanism for
    -packing several languages along with the library itself into a single compressed
    -file. Now sites using several languages will load considerably faster because
    -the library won't dynamically include additional files while loading.
    -
    -Also this version fixes a long-standing bug with Javascript highlighting that
    -couldn't distinguish between regular expressions and division operations.
    -
    -And as usually there were a couple of minor correctness fixes.
    -
    -Great thanks to all contributors! Keep using highlight.js.
    -
    -
    -## Version 4.3
    -
    -This version comes with two contributions from [Jason Diamond][jd]:
    -
    -- language definition for C# (yes! it was a long-missed thing!)
    -- Visual Studio-like highlighting style
    -
    -Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
    -
    -[jd]: http://jason.diamond.name/weblog/
    -
    -
    -## Version 4.2
    -
    -The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
    -somewhat experimental meaning that for highlighting "keywords" it doesn't use
    -any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
    -in parentheses wherever it makes sense. I'd like to ask people programming in
    -Lisp to confirm if it's a good idea and send feedback to [the forum][f].
    -
    -Other changes:
    -
    -- Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
    -- [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
    -  test.html
    -- comments now allowed inside Ruby function definition
    -- [MEL][] language from [Shuen-Huei Guan][drake]
    -- whitespace now allowed between `<pre>` and `<code>`
    -- better auto-detection of C++ and PHP
    -- HTML allows embedded VBScript (`<% .. %>`)
    -
    -[f]: http://softwaremaniacs.org/forum/highlightjs/
    -[voldmar]: http://voldmar.ya.ru/
    -[mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
    -[drake]: http://drakeguan.org/
    -
    -
    -## Version 4.1
    -
    -Languages:
    -
    -- Bash from Vah
    -- DOS bat-files from Alexander Makarov (Sam)
    -- Diff files from Vasily Polovnyov
    -- Ini files from myself though initial idea was from Sam
    -
    -Styles:
    -
    -- Zenburn from Vladimir Epifanov, this is an imitation of a
    -  [well-known theme for Vim][zenburn].
    -- Ascetic from myself, as a realization of ideals of non-flashy highlighting:
    -  just one color in only three gradations :-)
    -
    -In other news. [One small bug][bug] was fixed, built-in keywords were added for
    -Python and C++ which improved auto-detection for the latter (it was shame that
    -[my wife's blog][alenacpp] had issues with it from time to time). And lastly
    -thanks go to Sam for getting rid of my stylistic comments in code that were
    -getting in the way of [JSMin][].
    -
    -[zenburn]: http://en.wikipedia.org/wiki/Zenburn
    -[alenacpp]: http://alenacpp.blogspot.com/
    -[bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
    -[jsmin]: http://code.google.com/p/jsmin-php/
    -
    -
    -## Version 4.0
    -
    -New major version is a result of vast refactoring and of many contributions.
    -
    -Visible new features:
    -
    -- Highlighting of embedded languages. Currently is implemented highlighting of
    -  Javascript and CSS inside HTML.
    -- Bundled 5 ready-made style themes!
    -
    -Invisible new features:
    -
    -- Highlight.js no longer pollutes global namespace. Only one object and one
    -  function for backward compatibility.
    -- Performance is further increased by about 15%.
    -
    -Changing of a major version number caused by a new format of language definition
    -files. If you use some third-party language files they should be updated.
    -
    -
    -## Version 3.5
    -
    -A very nice version in my opinion fixing a number of small bugs and slightly
    -increased speed in a couple of corner cases. Thanks to everybody who reports
    -bugs in he [forum][f] and by email!
    -
    -There is also a new language — XML. A custom XML formerly was detected as HTML
    -and didn't highlight custom tags. In this version I tried to make custom XML to
    -be detected and highlighted by its own rules. Which by the way include such
    -things as CDATA sections and processing instructions (`<? ... ?>`).
    -
    -[f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
    -
    -
    -## Version 3.3
    -
    -[Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
    -File export.html contains a little program that shows and allows to copy and
    -paste an HTML code generated by the highlighter for any code snippet. This can
    -be useful in situations when one can't use the script itself on a site.
    -
    -
    -[xonix]: http://xonixx.blogspot.com/
    -
    -
    -## Version 3.2 consists completely of contributions:
    -
    -- Vladimir Gubarkov has described SmallTalk
    -- Yuri Ivanov has described 1C
    -- Peter Leonov has packaged the highlighter as a Firefox extension
    -- Vladimir Ermakov has compiled a mod for phpBB
    -
    -Many thanks to you all!
    -
    -
    -## Version 3.1
    -
    -Three new languages are available: Django templates, SQL and Axapta. The latter
    -two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
    -SQL definition but I'd never started it be it from the ground up :-)
    -
    -The engine itself has got a long awaited feature of grouping keywords
    -("keyword", "built-in function", "literal"). No more hacks!
    -
    -[1]: http://roudakov.ru/
    -
    -
    -## Version 3.0
    -
    -It is major mainly because now highlight.js has grown large and has become
    -modular. Now when you pass it a list of languages to highlight it will
    -dynamically load into a browser only those languages.
    -
    -Also:
    -
    -- Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
    -  RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
    -  languages!
    -- Heuristics for C++ and HTML got better.
    -- I've implemented (at last) a correct handling of backslash escapes in C-like
    -  languages.
    -
    -There is also a small backwards incompatible change in the new version. The
    -function initHighlighting that was used to initialize highlighting instead of
    -initHighlightingOnLoad a long time ago no longer works. If you by chance still
    -use it — replace it with the new one.
    -
    -[RibKit]: http://ribkit.sourceforge.net/
    -
    -
    -## Version 2.9
    -
    -Highlight.js is a parser, not just a couple of regular expressions. That said
    -I'm glad to announce that in the new version 2.9 has support for:
    -
    -- in-string substitutions for Ruby -- `#{...}`
    -- strings from from numeric symbol codes (like #XX) for Delphi
    -
    -
    -## Version 2.8
    -
    -A maintenance release with more tuned heuristics. Fully backwards compatible.
    -
    -
    -## Version 2.7
    -
    -- Nikita Ledyaev presents highlighting for VBScript, yay!
    -- A couple of bugs with escaping in strings were fixed thanks to Mickle
    -- Ongoing tuning of heuristics
    -
    -Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
    -
    -
    -## Version 2.4
    -
    -- Peter Leonov provides another improved highlighting for Perl
    -- Javascript gets a new kind of keywords — "literals". These are the words
    -  "true", "false" and "null"
    -
    -Also highlight.js homepage now lists sites that use the library. Feel free to
    -add your site by [dropping me a message][mail] until I find the time to build a
    -submit form.
    -
    -[mail]: mailto:Maniac@SoftwareManiacs.Org
    -
    -
    -## Version 2.3
    -
    -This version fixes IE breakage in previous version. My apologies to all who have
    -already downloaded that one!
    -
    -
    -## Version 2.2
    -
    -- added highlighting for Javascript
    -- at last fixed parsing of Delphi's escaped apostrophes in strings
    -- in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
    -  Perl
    -
    -
    -## Version 2.0
    -
    -- Ruby support by [Anton Kovalyov][ak]
    -- speed increased by orders of magnitude due to new way of parsing
    -- this same way allows now correct highlighting of keywords in some tricky
    -  places (like keyword "End" at the end of Delphi classes)
    -
    -[ak]: http://anton.kovalyov.net/
    -
    -
    -## Version 1.0
    -
    -Version 1.0 of javascript syntax highlighter is released!
    -
    -It's the first version available with English description. Feel free to post
    -your comments and question to [highlight.js forum][forum]. And don't be afraid
    -if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
    -
    -[forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6
    diff --git a/doc/slihelp_generator/assets/js/highlight/LICENSE b/doc/slihelp_generator/assets/js/highlight/LICENSE
    deleted file mode 100644
    index 422deb7350..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/LICENSE
    +++ /dev/null
    @@ -1,24 +0,0 @@
    -Copyright (c) 2006, Ivan Sagalaev
    -All rights reserved.
    -Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions are met:
    -
    -    * Redistributions of source code must retain the above copyright
    -      notice, this list of conditions and the following disclaimer.
    -    * Redistributions in binary form must reproduce the above copyright
    -      notice, this list of conditions and the following disclaimer in the
    -      documentation and/or other materials provided with the distribution.
    -    * Neither the name of highlight.js nor the names of its contributors 
    -      may be used to endorse or promote products derived from this software 
    -      without specific prior written permission.
    -
    -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
    -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    -DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
    -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    diff --git a/doc/slihelp_generator/assets/js/highlight/README.md b/doc/slihelp_generator/assets/js/highlight/README.md
    deleted file mode 100644
    index 9f76e6bd56..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/README.md
    +++ /dev/null
    @@ -1,150 +0,0 @@
    -# Highlight.js
    -
    -[![Build Status](https://travis-ci.org/isagalaev/highlight.js.svg?branch=master)](https://travis-ci.org/isagalaev/highlight.js)
    -
    -Highlight.js is a syntax highlighter written in JavaScript. It works in
    -the browser as well as on the server. It works with pretty much any
    -markup, doesn’t depend on any framework and has automatic language
    -detection.
    -
    -## Getting Started
    -
    -The bare minimum for using highlight.js on a web page is linking to the
    -library along with one of the styles and calling
    -[`initHighlightingOnLoad`][1]:
    -
    -```html
    -<link rel="stylesheet" href="/path/to/styles/default.css">
    -<script src="/path/to/highlight.pack.js"></script>
    -<script>hljs.initHighlightingOnLoad();</script>
    -```
    -
    -This will find and highlight code inside of `<pre><code>` tags; it tries
    -to detect the language automatically. If automatic detection doesn’t
    -work for you, you can specify the language in the `class` attribute:
    -
    -```html
    -<pre><code class="html">...</code></pre>
    -```
    -
    -The list of supported language classes is available in the [class
    -reference][2].  Classes can also be prefixed with either `language-` or
    -`lang-`.
    -
    -To disable highlighting altogether use the `nohighlight` class:
    -
    -```html
    -<pre><code class="nohighlight">...</code></pre>
    -```
    -
    -## Custom Initialization
    -
    -When you need a bit more control over the initialization of
    -highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4]
    -functions. This allows you to control *what* to highlight and *when*.
    -
    -Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using
    -jQuery:
    -
    -```javascript
    -$(document).ready(function() {
    -  $('pre code').each(function(i, block) {
    -    hljs.highlightBlock(block);
    -  });
    -});
    -```
    -
    -You can use any tags instead of `<pre><code>` to mark up your code. If
    -you don't use a container that preserve line breaks you will need to
    -configure highlight.js to use the `<br>` tag:
    -
    -```javascript
    -hljs.configure({useBR: true});
    -
    -$('div.code').each(function(i, block) {
    -  hljs.highlightBlock(block);
    -});
    -```
    -
    -For other options refer to the documentation for [`configure`][4].
    -
    -
    -## Web Workers
    -
    -You can run highlighting inside a web worker to avoid freezing the browser
    -window while dealing with very big chunks of code.
    -
    -In your main script:
    -
    -```javascript
    -addEventListener('load', function() {
    -  var code = document.querySelector('#code');
    -  var worker = new Worker('worker.js');
    -  worker.onmessage = function(event) { code.innerHTML = event.data; }
    -  worker.postMessage(code.textContent);
    -})
    -```
    -
    -In worker.js:
    -
    -```javascript
    -onmessage = function(event) {
    -  importScripts('<path>/highlight.pack.js');
    -  var result = self.hljs.highlightAuto(event.data);
    -  postMessage(result.value);
    -}
    -```
    -
    -
    -## Getting the Library
    -
    -You can get highlight.js as a hosted, or custom-build, browser script or
    -as a server module. Right out of the box the browser script supports
    -both AMD and CommonJS, so if you wish you can use RequireJS or
    -Browserify without having to build from source. The server module also
    -works perfectly fine with Browserify, but there is the option to use a
    -build specific to browsers rather than something meant for a server.
    -Head over to the [download page][5] for all the options.
    -
    -**Don't link to GitHub directly.** The library is not supposed to work straight
    -from the source, it requires building. If none of the pre-packaged options
    -work for you refer to the [building documentation][6].
    -
    -**The CDN-hosted package doesn't have all the languages.** Otherwise it'd be
    -too big. If you don't see the language you need in the ["Common" section][5],
    -it can be added manually:
    -
    -```html
    -<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
    -```
    -
    -**On Almond.** You need to use the optimizer to give the module a name. For
    -example:
    -
    -```
    -r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
    -```
    -
    -
    -## License
    -
    -Highlight.js is released under the BSD License. See [LICENSE][7] file
    -for details.
    -
    -## Links
    -
    -The official site for the library is at <https://highlightjs.org/>.
    -
    -Further in-depth documentation for the API and other topics is at
    -<http://highlightjs.readthedocs.io/>.
    -
    -Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
    -
    -[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
    -[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
    -[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
    -[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
    -[5]: https://highlightjs.org/download/
    -[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
    -[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
    -[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt
    diff --git a/doc/slihelp_generator/assets/js/highlight/README.ru.md b/doc/slihelp_generator/assets/js/highlight/README.ru.md
    deleted file mode 100644
    index ac481d0718..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/README.ru.md
    +++ /dev/null
    @@ -1,142 +0,0 @@
    -# Highlight.js
    -
    -Highlight.js — это инструмент для подсветки синтаксиса, написанный на JavaScript. Он работает
    -и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не
    -зависит от каких-либо фреймворков и умеет автоматически определять язык.
    -
    -
    -## Начало работы
    -
    -Минимум, что нужно сделать для использования highlight.js на веб-странице — это
    -подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]:
    -
    -```html
    -<link rel="stylesheet" href="/path/to/styles/default.css">
    -<script src="/path/to/highlight.pack.js"></script>
    -<script>hljs.initHighlightingOnLoad();</script>
    -```
    -
    -Библиотека найдёт и раскрасит код внутри тегов `<pre><code>`, попытавшись
    -автоматически определить язык. Когда автоопределение не срабатывает, можно явно
    -указать язык в атрибуте class:
    -
    -```html
    -<pre><code class="html">...</code></pre>
    -```
    -
    -Список поддерживаемых классов языков доступен в [справочнике по классам][2].
    -Класс также можно предварить префиксами `language-` или `lang-`.
    -
    -Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`:
    -
    -```html
    -<pre><code class="nohighlight">...</code></pre>
    -```
    -
    -## Инициализация вручную
    -
    -Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете
    -использовать функции [`highlightBlock`][3] и [`configure`][4]. Таким образом
    -можно управлять тем, *что* и *когда* подсвечивать.
    -
    -Вот пример инициализации, эквивалентной вызову [`initHighlightingOnLoad`][1], но
    -с использованием jQuery:
    -
    -```javascript
    -$(document).ready(function() {
    -  $('pre code').each(function(i, block) {
    -    hljs.highlightBlock(block);
    -  });
    -});
    -```
    -
    -Вы можете использовать любые теги разметки вместо `<pre><code>`. Если
    -используете контейнер, не сохраняющий переводы строк, вам нужно сказать
    -highlight.js использовать для них тег `<br>`:
    -
    -```javascript
    -hljs.configure({useBR: true});
    -
    -$('div.code').each(function(i, block) {
    -  hljs.highlightBlock(block);
    -});
    -```
    -
    -Другие опции можно найти в документации функции [`configure`][4].
    -
    -
    -## Web Workers
    -
    -Подсветку можно запустить внутри web worker'а, чтобы окно
    -браузера не подтормаживало при работе с большими кусками кода.
    -
    -В основном скрипте:
    -
    -```javascript
    -addEventListener('load', function() {
    -  var code = document.querySelector('#code');
    -  var worker = new Worker('worker.js');
    -  worker.onmessage = function(event) { code.innerHTML = event.data; }
    -  worker.postMessage(code.textContent);
    -})
    -```
    -
    -В worker.js:
    -
    -```javascript
    -onmessage = function(event) {
    -  importScripts('<path>/highlight.pack.js');
    -  var result = self.hljs.highlightAuto(event.data);
    -  postMessage(result.value);
    -}
    -```
    -
    -
    -## Установка библиотеки
    -
    -Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать
    -индивидуальную сборку, а также установив модуль на сервере. На
    -[странице загрузки][5] подробно описаны все варианты.
    -
    -**Не подключайте GitHub напрямую.** Библиотека не предназначена для
    -использования в виде исходного кода, а требует отдельной сборки. Если вам не
    -подходит ни один из готовых вариантов, читайте [документацию по сборке][6].
    -
    -**Файл на CDN содержит не все языки.** Иначе он будет слишком большого размера.
    -Если нужного вам языка нет в [категории "Common"][5], можно дообавить его
    -вручную:
    -
    -```html
    -<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
    -```
    -
    -**Про Almond.** Нужно задать имя модуля в оптимизаторе, например:
    -
    -```
    -r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
    -```
    -
    -
    -## Лицензия
    -
    -Highlight.js распространяется под лицензией BSD. Подробнее читайте файл
    -[LICENSE][7].
    -
    -
    -## Ссылки
    -
    -Официальный сайт билиотеки расположен по адресу <https://highlightjs.org/>.
    -
    -Более подробная документация по API и другим темам расположена на
    -<http://highlightjs.readthedocs.io/>.
    -
    -Авторы и контрибьюторы перечислены в файле [AUTHORS.ru.txt][8] file.
    -
    -[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
    -[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
    -[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
    -[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
    -[5]: https://highlightjs.org/download/
    -[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
    -[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
    -[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt
    diff --git a/doc/slihelp_generator/assets/js/highlight/highlight.pack.js b/doc/slihelp_generator/assets/js/highlight/highlight.pack.js
    deleted file mode 100644
    index 95d24c7cb9..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/highlight.pack.js
    +++ /dev/null
    @@ -1,2 +0,0 @@
    -/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */
    -!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value).replace('"',"&quot;")+'"'}s+="<"+t(e)+E.map.call(e.attributes,r).join("")+">"}function u(e){s+="</"+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='<span class="'+a,o=t?"":C;return i+=e+'">',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"<unnamed>")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"<br>":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="</span>",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/</,r:0,c:[{cN:"attr",b:e,r:0},{b:/=\s*/,r:0,c:[{cN:"string",endsParent:!0,v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s"'=<>`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("<!--","-->",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{name:"style"},c:[t],starts:{e:"</style>",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{name:"script"},c:[t],starts:{e:"</script>",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}|	)",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("python",function(e){var r={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},b={cN:"meta",b:/^(>>>|\.\.\.) /},c={cN:"subst",b:/\{/,e:/\}/,k:r,i:/#/},a={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[b],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[b],r:10},{b:/(fr|rf|f)'''/,e:/'''/,c:[b,c]},{b:/(fr|rf|f)"""/,e:/"""/,c:[b,c]},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},{b:/(fr|rf|f)'/,e:/'/,c:[c]},{b:/(fr|rf|f)"/,e:/"/,c:[c]},e.ASM,e.QSM]},s={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},i={cN:"params",b:/\(/,e:/\)/,c:["self",b,s,a]};return c.c=[a,s,b],{aliases:["py","gyp"],k:r,i:/(<\/|->|\?)|=>/,c:[b,s,a,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,i,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"</",c:n.concat([i,{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b:/</,e:/>/,c:["self"]},t.TM]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("cmake",function(e){return{aliases:["cmake.in"],cI:!0,k:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or equal less greater strless strgreater strequal matches"},c:[{cN:"variable",b:"\\${",e:"}"},e.HCM,e.QSM,e.NM]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b:/</,e:/(\/\w+|\w+\/)>/,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("makefile",function(e){var i={cN:"variable",v:[{b:"\\$\\("+e.UIR+"\\)",c:[e.BE]},{b:/\$[@%<?\^\+\*]/}]},r={cN:"string",b:/"/,e:/"/,c:[e.BE,i]},a={cN:"variable",b:/\$\([\w-]+\s/,e:/\)/,k:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},c:[i]},n={b:"^"+e.UIR+"\\s*[:+?]?=",i:"\\n",rB:!0,c:[{b:"^"+e.UIR,e:"[:+?]?=",eE:!0}]},t={cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},l={cN:"section",b:/^[^\s]+:/,e:/$/,c:[i]};return{aliases:["mk","mak"],k:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath",l:/[\w-]+/,c:[e.HCM,i,r,a,n,t,l]}});
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/agate.css b/doc/slihelp_generator/assets/js/highlight/styles/agate.css
    deleted file mode 100644
    index 8d64547c58..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/agate.css
    +++ /dev/null
    @@ -1,108 +0,0 @@
    -/*!
    - * Agate by Taufik Nurrohman <https://github.com/tovic>
    - * ----------------------------------------------------
    - *
    - * #ade5fc
    - * #a2fca2
    - * #c6b4f0
    - * #d36363
    - * #fcc28c
    - * #fc9b9b
    - * #ffa
    - * #fff
    - * #333
    - * #62c8f3
    - * #888
    - *
    - */
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #333;
    -  color: white;
    -}
    -
    -.hljs-name,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-code,
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-tag {
    -  color: #62c8f3;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #ade5fc;
    -}
    -
    -.hljs-string,
    -.hljs-bullet {
    -  color: #a2fca2;
    -}
    -
    -.hljs-type,
    -.hljs-title,
    -.hljs-section,
    -.hljs-attribute,
    -.hljs-quote,
    -.hljs-built_in,
    -.hljs-builtin-name {
    -  color: #ffa;
    -}
    -
    -.hljs-number,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #d36363;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal {
    -  color: #fcc28c;
    -}
    -
    -.hljs-comment,
    -.hljs-deletion,
    -.hljs-code {
    -  color: #888;
    -}
    -
    -.hljs-regexp,
    -.hljs-link {
    -  color: #c6b4f0;
    -}
    -
    -.hljs-meta {
    -  color: #fc9b9b;
    -}
    -
    -.hljs-deletion {
    -  background-color: #fc9b9b;
    -  color: #333;
    -}
    -
    -.hljs-addition {
    -  background-color: #a2fca2;
    -  color: #333;
    -}
    -
    -.hljs a {
    -  color: inherit;
    -}
    -
    -.hljs a:focus,
    -.hljs a:hover {
    -  color: inherit;
    -  text-decoration: underline;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/androidstudio.css b/doc/slihelp_generator/assets/js/highlight/styles/androidstudio.css
    deleted file mode 100644
    index bc8e473b59..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/androidstudio.css
    +++ /dev/null
    @@ -1,66 +0,0 @@
    -/*
    -Date: 24 Fev 2015
    -Author: Pedro Oliveira <kanytu@gmail . com>
    -*/
    -
    -.hljs {
    -  color: #a9b7c6;
    -  background: #282b2e;
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -}
    -
    -.hljs-number,
    -.hljs-literal,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #6897BB;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-deletion {
    -  color: #cc7832;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-link {
    -  color: #629755;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #808080;
    -}
    -
    -.hljs-meta {
    -  color: #bbb529;
    -}
    -
    -.hljs-string,
    -.hljs-attribute,
    -.hljs-addition {
    -  color: #6A8759;
    -}
    -
    -.hljs-section,
    -.hljs-title,
    -.hljs-type {
    -  color: #ffc66d;
    -}
    -
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #e8bf6a;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/arduino-light.css b/doc/slihelp_generator/assets/js/highlight/styles/arduino-light.css
    deleted file mode 100644
    index 4b8b7fd3c9..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/arduino-light.css
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/*
    -
    -Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #FFFFFF;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #434f54;
    -}
    -
    -.hljs-keyword,
    -.hljs-attribute,
    -.hljs-selector-tag,
    -.hljs-doctag,
    -.hljs-name {
    -  color: #00979D;
    -}
    -
    -.hljs-built_in,
    -.hljs-literal,
    -.hljs-bullet,
    -.hljs-code,
    -.hljs-addition {
    -  color: #D35400;
    -}
    -
    -.hljs-regexp,
    -.hljs-symbol,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-link,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo {
    -  color: #00979D;
    -}
    -
    -.hljs-type,
    -.hljs-string,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-quote,
    -.hljs-template-tag,
    -.hljs-deletion {
    -  color: #005C5F;
    -}
    -
    -.hljs-title,
    -.hljs-section {
    -  color: #880000;
    -  font-weight: bold;
    -}
    -
    -.hljs-comment {
    -  color: rgba(149,165,166,.8);
    -}
    -
    -.hljs-meta-keyword {
    -  color: #728E00;
    -}
    -
    -.hljs-meta {
    -  color: #728E00;
    -  color: #434f54;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-function {
    -  color: #728E00;
    -}
    -
    -.hljs-number {
    -  color: #8A7B52;  
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/arta.css b/doc/slihelp_generator/assets/js/highlight/styles/arta.css
    deleted file mode 100644
    index 75ef3a9e59..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/arta.css
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    -Date: 17.V.2011
    -Author: pumbur <pumbur@pumbur.net>
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #222;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #aaa;
    -}
    -
    -.hljs-section {
    -  color: #fff;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-meta {
    -  color: #444;
    -}
    -
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-regexp {
    -  color: #ffcc33;
    -}
    -
    -.hljs-number,
    -.hljs-addition {
    -  color: #00cc66;
    -}
    -
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-link {
    -  color: #32aaee;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #6644aa;
    -}
    -
    -.hljs-title,
    -.hljs-variable,
    -.hljs-deletion,
    -.hljs-template-tag {
    -  color: #bb1166;
    -}
    -
    -.hljs-section,
    -.hljs-doctag,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/ascetic.css b/doc/slihelp_generator/assets/js/highlight/styles/ascetic.css
    deleted file mode 100644
    index 48397e889d..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/ascetic.css
    +++ /dev/null
    @@ -1,45 +0,0 @@
    -/*
    -
    -Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: white;
    -  color: black;
    -}
    -
    -.hljs-string,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-section,
    -.hljs-addition,
    -.hljs-attribute,
    -.hljs-link {
    -  color: #888;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-meta,
    -.hljs-deletion {
    -  color: #ccc;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-section,
    -.hljs-name,
    -.hljs-type,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-cave-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-cave-dark.css
    deleted file mode 100644
    index 65428f3b12..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-cave-dark.css
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/* Base16 Atelier Cave Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Cave Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #7e7887;
    -}
    -
    -/* Atelier-Cave Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #be4678;
    -}
    -
    -/* Atelier-Cave Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #aa573c;
    -}
    -
    -/* Atelier-Cave Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #2a9292;
    -}
    -
    -/* Atelier-Cave Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #576ddb;
    -}
    -
    -/* Atelier-Cave Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #955ae7;
    -}
    -
    -.hljs-deletion,
    -.hljs-addition {
    -  color: #19171c;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #be4678;
    -}
    -
    -.hljs-addition {
    -  background-color: #2a9292;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #19171c;
    -  color: #8b8792;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-cave-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-cave-light.css
    deleted file mode 100644
    index b419f9fd8f..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-cave-light.css
    +++ /dev/null
    @@ -1,85 +0,0 @@
    -/* Base16 Atelier Cave Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Cave Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #655f6d;
    -}
    -
    -/* Atelier-Cave Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #be4678;
    -}
    -
    -/* Atelier-Cave Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #aa573c;
    -}
    -
    -/* Atelier-Cave Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #2a9292;
    -}
    -
    -/* Atelier-Cave Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #576ddb;
    -}
    -
    -/* Atelier-Cave Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #955ae7;
    -}
    -
    -.hljs-deletion,
    -.hljs-addition {
    -  color: #19171c;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #be4678;
    -}
    -
    -.hljs-addition {
    -  background-color: #2a9292;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #efecf4;
    -  color: #585260;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-dune-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-dune-dark.css
    deleted file mode 100644
    index 1684f5225a..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-dune-dark.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Dune Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Dune Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #999580;
    -}
    -
    -/* Atelier-Dune Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #d73737;
    -}
    -
    -/* Atelier-Dune Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #b65611;
    -}
    -
    -/* Atelier-Dune Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #60ac39;
    -}
    -
    -/* Atelier-Dune Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #6684e1;
    -}
    -
    -/* Atelier-Dune Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #b854d4;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #20201d;
    -  color: #a6a28c;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-dune-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-dune-light.css
    deleted file mode 100644
    index 547719de82..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-dune-light.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Dune Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Dune Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #7d7a68;
    -}
    -
    -/* Atelier-Dune Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #d73737;
    -}
    -
    -/* Atelier-Dune Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #b65611;
    -}
    -
    -/* Atelier-Dune Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #60ac39;
    -}
    -
    -/* Atelier-Dune Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #6684e1;
    -}
    -
    -/* Atelier-Dune Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #b854d4;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #fefbec;
    -  color: #6e6b5e;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-estuary-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-estuary-dark.css
    deleted file mode 100644
    index a5e507187e..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-estuary-dark.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/* Base16 Atelier Estuary Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Estuary Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #878573;
    -}
    -
    -/* Atelier-Estuary Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #ba6236;
    -}
    -
    -/* Atelier-Estuary Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #ae7313;
    -}
    -
    -/* Atelier-Estuary Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #7d9726;
    -}
    -
    -/* Atelier-Estuary Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #36a166;
    -}
    -
    -/* Atelier-Estuary Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #5f9182;
    -}
    -
    -.hljs-deletion,
    -.hljs-addition {
    -  color: #22221b;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #ba6236;
    -}
    -
    -.hljs-addition {
    -  background-color: #7d9726;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #22221b;
    -  color: #929181;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-estuary-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-estuary-light.css
    deleted file mode 100644
    index 1daee5d985..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-estuary-light.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/* Base16 Atelier Estuary Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Estuary Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #6c6b5a;
    -}
    -
    -/* Atelier-Estuary Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #ba6236;
    -}
    -
    -/* Atelier-Estuary Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #ae7313;
    -}
    -
    -/* Atelier-Estuary Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #7d9726;
    -}
    -
    -/* Atelier-Estuary Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #36a166;
    -}
    -
    -/* Atelier-Estuary Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #5f9182;
    -}
    -
    -.hljs-deletion,
    -.hljs-addition {
    -  color: #22221b;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #ba6236;
    -}
    -
    -.hljs-addition {
    -  background-color: #7d9726;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #f4f3ec;
    -  color: #5f5e4e;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-forest-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-forest-dark.css
    deleted file mode 100644
    index 0ef4fae317..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-forest-dark.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Forest Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Forest Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #9c9491;
    -}
    -
    -/* Atelier-Forest Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #f22c40;
    -}
    -
    -/* Atelier-Forest Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #df5320;
    -}
    -
    -/* Atelier-Forest Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #7b9726;
    -}
    -
    -/* Atelier-Forest Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #407ee7;
    -}
    -
    -/* Atelier-Forest Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #6666ea;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #1b1918;
    -  color: #a8a19f;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-forest-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-forest-light.css
    deleted file mode 100644
    index bbedde18a0..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-forest-light.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Forest Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Forest Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #766e6b;
    -}
    -
    -/* Atelier-Forest Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #f22c40;
    -}
    -
    -/* Atelier-Forest Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #df5320;
    -}
    -
    -/* Atelier-Forest Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #7b9726;
    -}
    -
    -/* Atelier-Forest Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #407ee7;
    -}
    -
    -/* Atelier-Forest Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #6666ea;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #f1efee;
    -  color: #68615e;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-heath-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-heath-dark.css
    deleted file mode 100644
    index fe01ff721b..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-heath-dark.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Heath Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Heath Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #9e8f9e;
    -}
    -
    -/* Atelier-Heath Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #ca402b;
    -}
    -
    -/* Atelier-Heath Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #a65926;
    -}
    -
    -/* Atelier-Heath Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #918b3b;
    -}
    -
    -/* Atelier-Heath Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #516aec;
    -}
    -
    -/* Atelier-Heath Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #7b59c0;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #1b181b;
    -  color: #ab9bab;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-heath-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-heath-light.css
    deleted file mode 100644
    index ee43786d12..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-heath-light.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Heath Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Heath Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #776977;
    -}
    -
    -/* Atelier-Heath Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #ca402b;
    -}
    -
    -/* Atelier-Heath Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #a65926;
    -}
    -
    -/* Atelier-Heath Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #918b3b;
    -}
    -
    -/* Atelier-Heath Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #516aec;
    -}
    -
    -/* Atelier-Heath Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #7b59c0;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #f7f3f7;
    -  color: #695d69;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-lakeside-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-lakeside-dark.css
    deleted file mode 100644
    index a937d3bf5f..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-lakeside-dark.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Lakeside Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Lakeside Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #7195a8;
    -}
    -
    -/* Atelier-Lakeside Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #d22d72;
    -}
    -
    -/* Atelier-Lakeside Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #935c25;
    -}
    -
    -/* Atelier-Lakeside Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #568c3b;
    -}
    -
    -/* Atelier-Lakeside Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #257fad;
    -}
    -
    -/* Atelier-Lakeside Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #6b6bb8;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #161b1d;
    -  color: #7ea2b4;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-lakeside-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-lakeside-light.css
    deleted file mode 100644
    index 6c7e8f9ef2..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-lakeside-light.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Lakeside Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Lakeside Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #5a7b8c;
    -}
    -
    -/* Atelier-Lakeside Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #d22d72;
    -}
    -
    -/* Atelier-Lakeside Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #935c25;
    -}
    -
    -/* Atelier-Lakeside Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #568c3b;
    -}
    -
    -/* Atelier-Lakeside Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #257fad;
    -}
    -
    -/* Atelier-Lakeside Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #6b6bb8;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #ebf8ff;
    -  color: #516d7b;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-plateau-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-plateau-dark.css
    deleted file mode 100644
    index 3bb052693c..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-plateau-dark.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/* Base16 Atelier Plateau Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Plateau Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #7e7777;
    -}
    -
    -/* Atelier-Plateau Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #ca4949;
    -}
    -
    -/* Atelier-Plateau Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #b45a3c;
    -}
    -
    -/* Atelier-Plateau Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #4b8b8b;
    -}
    -
    -/* Atelier-Plateau Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #7272ca;
    -}
    -
    -/* Atelier-Plateau Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #8464c4;
    -}
    -
    -.hljs-deletion,
    -.hljs-addition {
    -  color: #1b1818;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #ca4949;
    -}
    -
    -.hljs-addition {
    -  background-color: #4b8b8b;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #1b1818;
    -  color: #8a8585;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-plateau-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-plateau-light.css
    deleted file mode 100644
    index 5f0222bec1..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-plateau-light.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/* Base16 Atelier Plateau Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Plateau Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #655d5d;
    -}
    -
    -/* Atelier-Plateau Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #ca4949;
    -}
    -
    -/* Atelier-Plateau Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #b45a3c;
    -}
    -
    -/* Atelier-Plateau Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #4b8b8b;
    -}
    -
    -/* Atelier-Plateau Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #7272ca;
    -}
    -
    -/* Atelier-Plateau Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #8464c4;
    -}
    -
    -.hljs-deletion,
    -.hljs-addition {
    -  color: #1b1818;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #ca4949;
    -}
    -
    -.hljs-addition {
    -  background-color: #4b8b8b;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #f4ecec;
    -  color: #585050;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-savanna-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-savanna-dark.css
    deleted file mode 100644
    index 38f831431c..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-savanna-dark.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/* Base16 Atelier Savanna Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Savanna Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #78877d;
    -}
    -
    -/* Atelier-Savanna Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #b16139;
    -}
    -
    -/* Atelier-Savanna Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #9f713c;
    -}
    -
    -/* Atelier-Savanna Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #489963;
    -}
    -
    -/* Atelier-Savanna Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #478c90;
    -}
    -
    -/* Atelier-Savanna Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #55859b;
    -}
    -
    -.hljs-deletion,
    -.hljs-addition {
    -  color: #171c19;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #b16139;
    -}
    -
    -.hljs-addition {
    -  background-color: #489963;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #171c19;
    -  color: #87928a;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-savanna-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-savanna-light.css
    deleted file mode 100644
    index 1ccd7c6858..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-savanna-light.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/* Base16 Atelier Savanna Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Savanna Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #5f6d64;
    -}
    -
    -/* Atelier-Savanna Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #b16139;
    -}
    -
    -/* Atelier-Savanna Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #9f713c;
    -}
    -
    -/* Atelier-Savanna Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #489963;
    -}
    -
    -/* Atelier-Savanna Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #478c90;
    -}
    -
    -/* Atelier-Savanna Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #55859b;
    -}
    -
    -.hljs-deletion,
    -.hljs-addition {
    -  color: #171c19;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #b16139;
    -}
    -
    -.hljs-addition {
    -  background-color: #489963;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #ecf4ee;
    -  color: #526057;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-seaside-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-seaside-dark.css
    deleted file mode 100644
    index df29949c69..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-seaside-dark.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Seaside Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Seaside Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #809980;
    -}
    -
    -/* Atelier-Seaside Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #e6193c;
    -}
    -
    -/* Atelier-Seaside Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #87711d;
    -}
    -
    -/* Atelier-Seaside Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #29a329;
    -}
    -
    -/* Atelier-Seaside Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #3d62f5;
    -}
    -
    -/* Atelier-Seaside Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #ad2bee;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #131513;
    -  color: #8ca68c;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-seaside-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-seaside-light.css
    deleted file mode 100644
    index 9d960f29f3..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-seaside-light.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Seaside Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Seaside Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #687d68;
    -}
    -
    -/* Atelier-Seaside Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #e6193c;
    -}
    -
    -/* Atelier-Seaside Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #87711d;
    -}
    -
    -/* Atelier-Seaside Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #29a329;
    -}
    -
    -/* Atelier-Seaside Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #3d62f5;
    -}
    -
    -/* Atelier-Seaside Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #ad2bee;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #f4fbf4;
    -  color: #5e6e5e;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-sulphurpool-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-sulphurpool-dark.css
    deleted file mode 100644
    index c2ab7938d8..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-sulphurpool-dark.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Sulphurpool Dark - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Sulphurpool Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #898ea4;
    -}
    -
    -/* Atelier-Sulphurpool Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #c94922;
    -}
    -
    -/* Atelier-Sulphurpool Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #c76b29;
    -}
    -
    -/* Atelier-Sulphurpool Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #ac9739;
    -}
    -
    -/* Atelier-Sulphurpool Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #3d8fd1;
    -}
    -
    -/* Atelier-Sulphurpool Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #6679cc;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #202746;
    -  color: #979db4;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atelier-sulphurpool-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atelier-sulphurpool-light.css
    deleted file mode 100644
    index 96c47d0860..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atelier-sulphurpool-light.css
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/* Base16 Atelier Sulphurpool Light - Theme */
    -/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
    -/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
    -
    -/* Atelier-Sulphurpool Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #6b7394;
    -}
    -
    -/* Atelier-Sulphurpool Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #c94922;
    -}
    -
    -/* Atelier-Sulphurpool Orange */
    -.hljs-number,
    -.hljs-meta,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #c76b29;
    -}
    -
    -/* Atelier-Sulphurpool Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #ac9739;
    -}
    -
    -/* Atelier-Sulphurpool Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #3d8fd1;
    -}
    -
    -/* Atelier-Sulphurpool Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #6679cc;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #f5f7ff;
    -  color: #5e6687;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atom-one-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/atom-one-dark.css
    deleted file mode 100644
    index 1616aafe31..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atom-one-dark.css
    +++ /dev/null
    @@ -1,96 +0,0 @@
    -/*
    -
    -Atom One Dark by Daniel Gamage
    -Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
    -
    -base:    #282c34
    -mono-1:  #abb2bf
    -mono-2:  #818896
    -mono-3:  #5c6370
    -hue-1:   #56b6c2
    -hue-2:   #61aeee
    -hue-3:   #c678dd
    -hue-4:   #98c379
    -hue-5:   #e06c75
    -hue-5-2: #be5046
    -hue-6:   #d19a66
    -hue-6-2: #e6c07b
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  color: #abb2bf;
    -  background: #282c34;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #5c6370;
    -  font-style: italic;
    -}
    -
    -.hljs-doctag,
    -.hljs-keyword,
    -.hljs-formula {
    -  color: #c678dd;
    -}
    -
    -.hljs-section,
    -.hljs-name,
    -.hljs-selector-tag,
    -.hljs-deletion,
    -.hljs-subst {
    -  color: #e06c75;
    -}
    -
    -.hljs-literal {
    -  color: #56b6c2;
    -}
    -
    -.hljs-string,
    -.hljs-regexp,
    -.hljs-addition,
    -.hljs-attribute,
    -.hljs-meta-string {
    -  color: #98c379;
    -}
    -
    -.hljs-built_in,
    -.hljs-class .hljs-title {
    -  color: #e6c07b;
    -}
    -
    -.hljs-attr,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-type,
    -.hljs-selector-class,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-number {
    -  color: #d19a66;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-link,
    -.hljs-meta,
    -.hljs-selector-id,
    -.hljs-title {
    -  color: #61aeee;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-link {
    -  text-decoration: underline;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/atom-one-light.css b/doc/slihelp_generator/assets/js/highlight/styles/atom-one-light.css
    deleted file mode 100644
    index d5bd1d2a9a..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/atom-one-light.css
    +++ /dev/null
    @@ -1,96 +0,0 @@
    -/*
    -
    -Atom One Light by Daniel Gamage
    -Original One Light Syntax theme from https://github.com/atom/one-light-syntax
    -
    -base:    #fafafa
    -mono-1:  #383a42
    -mono-2:  #686b77
    -mono-3:  #a0a1a7
    -hue-1:   #0184bb
    -hue-2:   #4078f2
    -hue-3:   #a626a4
    -hue-4:   #50a14f
    -hue-5:   #e45649
    -hue-5-2: #c91243
    -hue-6:   #986801
    -hue-6-2: #c18401
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  color: #383a42;
    -  background: #fafafa;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #a0a1a7;
    -  font-style: italic;
    -}
    -
    -.hljs-doctag,
    -.hljs-keyword,
    -.hljs-formula {
    -  color: #a626a4;
    -}
    -
    -.hljs-section,
    -.hljs-name,
    -.hljs-selector-tag,
    -.hljs-deletion,
    -.hljs-subst {
    -  color: #e45649;
    -}
    -
    -.hljs-literal {
    -  color: #0184bb;
    -}
    -
    -.hljs-string,
    -.hljs-regexp,
    -.hljs-addition,
    -.hljs-attribute,
    -.hljs-meta-string {
    -  color: #50a14f;
    -}
    -
    -.hljs-built_in,
    -.hljs-class .hljs-title {
    -  color: #c18401;
    -}
    -
    -.hljs-attr,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-type,
    -.hljs-selector-class,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-number {
    -  color: #986801;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-link,
    -.hljs-meta,
    -.hljs-selector-id,
    -.hljs-title {
    -  color: #4078f2;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-link {
    -  text-decoration: underline;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/brown-paper.css b/doc/slihelp_generator/assets/js/highlight/styles/brown-paper.css
    deleted file mode 100644
    index f0197b924c..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/brown-paper.css
    +++ /dev/null
    @@ -1,64 +0,0 @@
    -/*
    -
    -Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background:#b7a68e url(./brown-papersq.png);
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal {
    -  color:#005599;
    -  font-weight:bold;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #363c69;
    -}
    -
    -.hljs-string,
    -.hljs-title,
    -.hljs-section,
    -.hljs-type,
    -.hljs-attribute,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-built_in,
    -.hljs-addition,
    -.hljs-variable,
    -.hljs-template-tag,
    -.hljs-template-variable,
    -.hljs-link,
    -.hljs-name {
    -  color: #2c009f;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-meta,
    -.hljs-deletion {
    -  color: #802022;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-doctag,
    -.hljs-title,
    -.hljs-section,
    -.hljs-type,
    -.hljs-name,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/brown-papersq.png b/doc/slihelp_generator/assets/js/highlight/styles/brown-papersq.png
    deleted file mode 100644
    index 3813903dbf9fa7b1fb5bd11d9534c06667d9056f..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 18198
    zcmZsCRajhYlWil7yGw9LaCaw2kl^kP!M%at?m>cka0u>ctf6s&e8CzTLSrGMaSIUS
    zWM<BsGxPla&EEUH*jKfxYSpUsCh2Is!N;M&0RRB_YN|?l000{N?>7q;>fa~s$OpT>
    zFLY-GO$7j;Wl{{7eE9cF?XPU&ukYpLA870A2vBhFvU6lq^RRVx)N{0T2=<wBlm-A)
    z>eQ4J41(5=2G+8;)w1ZEPMkbF2bGnazV|OLZz2Hb@=WyXBX0)f+0o;fWze0N{t<*y
    ztIiNnZC{LRA&k!$ZY8RSSkRr34SfzyO1FQ1#+`5DKBGKIaW*#IpS|)H)0b)RO)vVT
    zdmZs``V5~Rd=7^niGNRi-KohFdl7;cLNt=6H%jET$<@@a?HPC}DI+UeV-R$j(|Cgb
    zovyEp&h`&JS~h*u+dsTgScW2zDVr4f<Q^WcQ~UfHvU+2PMyM789^pt4^sSp)eW|qF
    zptAV`{mj^akc}`o;i97Aj;-gNz^uB#{(g1C8Y+16=LXlpmrTjy!o7l{2DxLd#%$Fq
    z*C!RYvT-^+DqLyS$8al(DR8yw;raH%#YL7~61fS|U&>~<H^}nkMkrzUR+uSSkosc&
    zriW}SRaW{Z5grh+qIWn{-;NAC^6VW!tb`TP)<g<w_kf?==uKVTweJpsNKxj?wDX+(
    z?ujb7?c3gZUEbc@!cKVa1_}@0;2~LAi^6+>DH;Zx@cQhlKiyzUik!{j?26_bcGl3n
    zz;xi(8ENgs!;6LMT9?9^)|SgIm+Xu<9pAn@Jwvr@j|kU$Ps<;yJK|Ptilz{)cF~50
    z>3}X}-GE2L$gd5vToUcA;ufTe+vCmq6y;EHLIF1Y)!*mMIk7Ufz<IXq&lk3|S_iWy
    z{CLtSo7yuDg*6QChY~i|*YnlYr93LKe=Nn5wLNt=9)oSf9(U2Y+nW7Whu1%4Lk#N-
    z_C-TmWB8OVf>`-6@{%j+0t}5by-kjAimHgt*AfoWQ3<}2%HH1G)X=gxwsGTnqo!jS
    zPp^mHU)Wdo9i$J93f_cGL~o081HVh2MIfFb&r#24&zMhy4-B`@-M4wqKeV5e3rOCk
    zzfxnXb=ed%7QxZsGFZ!Bk=ojIqXM0lz`=t&N`(ieb`uT$vaWG--x!ps=kokELG7^v
    z+{LRR;H>H{+#Sy9)~}T-X{s*WDIF9ko?!YOUr<Zup=MumQG-aUl^ahE4l{N=PPIN~
    zn-l^?RKDuV@=n3+zLOZobbuL=?iq!V`LGHA*RF@Cm+IZ?*xepkW(o__+~GH;_KN|R
    z{fT-8;DoeQk2DTf%YvFF#8I#;KAoMtRc-~lBgdcSguAnaFhZdh`nj;a3^tvVxcjx{
    zOH@{}tY?zc-B^5;0~=dz6e<OSkURs9sA89X!$@OOsat_N^}L#Ipn{m9lD^$apDlZ)
    z+F%}BLotzW`brjYCfTlL$A?!oo1nfet-KU0HB@FSmeE+E%|lk40j*XtPa<1FC2CY|
    zLEP-F%&!)9#+>BL6c1UTt%|c-C%-<d%s%A?9Qw0wD#NMZ2BT4As8=6FW-E-^<mv1o
    z%y4z4`#yG_Q@pM|fvT#@&Eu+CNErvly+g_m;8!<%Lww-az%?q6yKUU#Zy7k09_RcL
    z$a%Kp(M5QWAV}VT&=y5z{L!n=UJ*!IXVmx&`PTj+$H<%c+jQX2En6e{&_?a5V@W9k
    zUwW+qN@cXl(477n;`bSqU8C}}Dy;C$cc01W96giS{|^PZ|H4Mk*w6#R)1L_JLEsA3
    zDAeVj-AhN@jet>R`h{*D&-?xTv6%U;Fy)q@zD7n;Mm&VTYo!f>`4|^@IrUrWqi<2`
    zIK=%8Y<M`hR&&lrT`sgoO2e#xH1^?uW1Q*gnF<R^+{Rd}kov{D)UCW~RDtlYz9!J0
    zvuzG#esVN#MA2q6X0(?Qe}99XcjC9KNVICw+cr$m)_i<qsw_E*igb*Y$g49orOhx4
    zK;VYH(YPe;w9pj~0DlCR58o2A%4Us5R>>k7_cJFc62Fm1dsu5V%^D!kOF(oA;3duw
    z%pO09{DvbtIv+U1{6MQ8Wq|e~4(8R<QVp|BKxY6b@ms$w<mJdEzk;EVq-<vB6xQ$n
    z%BeKbvX1%kg!C|4zjZO@(LO{6MdJ71yKphNKsFdZc#EG*ZP9QKzGXHf|4G?ws|OLo
    zTDm-pO%<N~Xs52%nU|g@e1tpy8c%8nH@?m@ks*j$4u)xFWs?B)RyWC*Xd>FaZSiu$
    z|CJ~BTvRLdM64V<l%{G@ZG=2gV)qsc@-J1H=OzYFczd=+EHftsd^8tBCp<coL8T2A
    zKeBQyr!n=ytc(8y9sJ=kZWl#y_7g0sn4t7UdzY>`xYr`XpzSoka%-H{0)Ro-jT6+}
    zT18|CY&T<`K}73~WMQMkzj<-{e`EjOV2Ch(n321C+#16;>MjIhblly|M?Br0UERMA
    z8yIvk9sVuv0~h)1=S{wY{&V6fDi@0c8|@S!>h`gR_^u~(f!y=uu=3o8U2>$VV-mwV
    zeJKl8K*mz%0O$3!XmmqEd#rW!>oY?U<|?CBsX=UMCSrinA}B9GA5MTUzn%ILQD=}Q
    z^-qc}to5D!{UYEBFfSF{7{}5#I2`7!9Xcs|{e!rTVYvNetFc@43N$#e!DM_Y#5_4V
    z3P*)qJyw97IJGZYj53iEQKK~Zk6QE|wnDAQ6e%ci7WM9yX{3Voy>2v7-{d<kg-Gz=
    zL~i2NYm+Jz{)Vu=O{-|Xa^xvlliPb~{};7-MuwYsXkxG1lj00SnqkGbog9SeL|$gg
    zWwMWn??T^)njDa$U{w%C<B};yZAq!bp`P-!;%1n+g9<43nESZ@blaZWv@Je<*xwVX
    z+svoY8BY(e{M&b#<CrwbPzF;$#Xo|tB+d|-ql+ARHV#xN2m_p(t$_)gsHcFE&2D~t
    zGE}UXiJ|AaEx2^MYaBY}3$%MIQu(rj$Qn;-<4;b7OGW0k6?2`vSVj9zHV^$R`4GmO
    zO>W*|+Zvy7%^(o^DMc&%_Tp}4@Jo%0Bs7ObY$K2QS=1v19slY*WwV!8B05I;*7gc|
    zC}iWT!ocL=zoXCa-*EVkQZPGoFVou4>|(ng{&T`5ns(d;`0IW<cE)-zv>RE4$3aCE
    zX={pif)<o*iDoSpB$}uyh3B!TW;&bzq8ZkN5V!Go6J3<IZ`{x=pnKYSK0qa_%*uG3
    zVZi35uKLvY)6enbqPNS^yzpQ06n)L(>xfKL2J&CwL-rbsVhFX~Ast|24AzGCb$6bP
    zzjP96&p17?0<d_~za()iT`s)+v!iqje}jQB4e}}^qoPp+ch#U8(uuem<AvNDj^gm?
    zz}V3tP009uYV@^_drJXfk|hYe{Oo-DEcU!HCt1_7c%iz3N06fYjt|I>`zA}Cr(1{-
    zBWmAc^Tih%c@PSpJD39Rtvbpc27|&`W}18q&trP3z4xp%4^t5T!T})zWON*!hQ+0C
    zGnKXI-(t5+$xcN_*!vy^Ebcn(`}3GQ=EjrR)jEu#)a!Qo+uU^L6Sf!vtQo@-)YCH_
    zIkq!}#RQ?#H9Na)c>fA?i%F=AwN>+%6IHG_6~07@;tNMw)pj-py?fm5OAkUXC)Brp
    z)eG?cTAV-ODy=aRrlcS^!0S!95GOO@_zy6Yr~oZODHiWB(rYDHVW+oP+iSHanvW_2
    zD+33#kuvw;P&BQf8OM-`63t1%h)cdnm8}>fIrS=425~>gpk!*nOPF^FRJ!}0{NO(e
    z1ANE&sU_mPMS;Pw9^8F*v5!k1Dr?=^%?eWij0f~to7y`V{K(<#9fgxsh1qZ}irc;t
    zApc;fE}TBG^?-(ZYfC3hk)rzA9||a50&`5$fO<eY3cKJBSAkuCMjM_C==EME6Dks^
    zzL=O1{%{4KFMA@$9qabdwjjLOeGqM`bO8jSW-M#y0#*V%h-!j8OjJ-c48C!9ps{gG
    z+obX;M8N7J9hu}!-T~v$m#BL6+rCAZ@~{(|Qp{KA8QP~|Ws!GcNZ6IsjuPg2)Ay@#
    zlkbm<lDRjHuEV?0-rG|2dAN_szeTtjjfi+x8X(NVs%cA~RM$E&0%PK~Dlx@JV(!97
    zB9-b{!&C4hwW4Zvjd5VueJVf4{f7pkLgZvi#QI25A`7?N3{%j1jOL_jn00q#zq*O+
    z)JHKWyez5-4i8t!X6kJXb>MODInB^CQQz-%|FVW(Me6cd&RQ!Em*`8(cOiTV*}I0^
    zkh9#bz+b`^Achh+t!T{E%m*7Spr8X*#NFvrNeQKR9N#NYImXo$orFW}S<u$C_j~T-
    zg9F0XYA~w{k0^t+C3!N6^t9l3zrxxAVY3|1tsn~^0A*24ye}FGou{e!xQ}|mm8~+e
    zK(kVmmvpXAwz(keVcsKxTC+E`EBiqR5Gq;nAH?u~b%Y^-r{_Jw@E(tl%n|YL=VI^k
    zBMMcd@st1`qAKO2Wg@XJAdDC~Qw<oVjqM#%sgT#L8_mbIn#wh-(7}%vswlrRXxYH%
    z<|ss_5^Tty1I<y{-`XOvk8+%Oyu&SxXC!w?1Mr`m1AC0CF)%m_=y^S4#TPvNTKoLC
    zWS?%gi?s!(!KfblG_LxYIv%vz)!Ce6*rb!^cN-d@WP|7lCSMD$L|X**XKL`^Uj18x
    zIFmf$?adp_D-%Up+mKL?AXT#OY^M)`Bh<aLfOO2X-9&aip)XNk+n(aI7NmVPOynVI
    zk{Gs1R0(7~pK_Qz`(i#dz^?<ka%-Jdl!=LpTZxH|#2$28&qwVU`iPR&Y7>#|kp!g)
    zC|mslRtj<WpwH*$1?0vyPMOEsIf9XMH~KDSK79kjc8JAHgVYJbR*Wp&#T$=RC|_a>
    z{<(wk5heSmNTLQPjVu+tu`Ax0<<A#5#ux4wy~Nol)akOY-;exwWwK!-b_@)qlV7$w
    zetK)O5ko-*<1Kt;3=9nLny}iY#7-PfBbuMeL7vh$4l|;veeCVPm^Vu!@#TM1iVU!9
    zVoo(teMS{K_Cz!_rjzR+6dBcb7m6G({++e6)*WJEo!9<Mv%`tX1OcY)zPN{74Ta#+
    zabo}Cu>Jp<3;sv=x5%C^te-lbQRUIA>ktvMAj}|$FYU$Qp}=T~;pv%9btR=dxklUy
    zkR9E*9e)3CPHhghYGI4o&yB<6Ek^@&s6_$^hHm%y;<q2JXN)zzFe^8`IJKdn2s#$7
    z6!_s!!&<P?eKE%-i~G{hpj@<pS*<z8RkV!#kW_z_I`*AM9lyN-^CE#A(_~hf^&~Ee
    z<paf6|9NuFs$!0`MLbU~F3r%m*u>$mG#6s2Gj@yUh|7NNvbZ*-CiW>(<tYM3C0`s^
    zA?3&t82Kk)&HL^$!Flv%wS`ZZNIdhvDw67m;Lj-U8B5QW_0}LGEo9@;;WynGnvllt
    zKUBAARXOXTZLbPvm!dqlSf^{Cvv_^I%67;pSHDWETa(6%b3ArFBn*KzgS982%7L=y
    zSb*z*qJG&*lj1pd2*||o6H{5P*+0zp>`$PB*?kxl)}lSZKB^Wx?u%oy%PiU;Ucb|V
    z|JbtHI`e>wDu43V9mbmTz-O*hsj=x3p@_52uHWdv$KHWXIJ?hAN_O+SE^)}7#rG|6
    z_BKM`Ghwpm2fNaI-XM&&0MIf<WD;>Lw+nk~2$Q9!(m1H({sIm*PjV$tD(vHzF8J^I
    z$5d)V3#P=#{X0~lkvdz*hO?2|P39$67m%BB>cJ;P&i?e>f6oD0A_x(fXnlhN8_iy~
    z=8_i6_?scR{Q@F{<_+s`6F0?)4q>Y!TZURG@z1Xg(XF|Uq<7M}+x3!5CKzKPU%EBw
    zWsc%dMB{e=rbNFynyQz;$Wk>xdNDkRB!r}hPlheoBDRi4NdE0U68C8T=FwmB)E|du
    zu(3Ry^ER}qt8o=s^t;)ka7?Rw9BkK-AbMm!5YyN{n8j%4(FS=#^NXNFzOKvDh-fh_
    ztrMuN#+;}%O*fdC_O-zikI?cL4FkQFbMJ&%;LsLdp2pU1z81byeDrcnfVfSPjd&Tx
    z0uTNCRa&zYgwCK{AP>=r8Sx{G=0I#zQ4SAF*CLY5@Ge_3>$_ebR&z8QuoP^G_nMbA
    zR!J5=NfW+bA;6g4yh|56J$}zRiUEt*T!NqU4MM$Ik(YO<fa!*pqlS%~x5Vh1>5ElC
    z3I>TTR5(&RS-e$~mJ610i3Tb|O!%oihx<r;%EzNWrw(%;e7HcAM1+i2m!U<@3yx_A
    z@BrjnKZyu$_}uiD=n0T$pyaOo8LkmtBoO3sn;jzHnw!Wmh|2+UElz(n$)TVtn!1Zt
    zLPt*`B+x+P=WK)u%SW-pzM&Y971W?PE44Vx(!$L}r$^ffzjr9pWkS%0^O#5c1H7fS
    zULKW}oc`O~pMSpnz2UkxE7^i0d&m_F&EsonY2g#_&}@?5Xq{jEV<N(6<>2Dou=SDi
    zY8QGbi&iMst0x9N)(Qw|m<=v9=H$h=d9q7_RC$8&xiTCpO(nAT)09jNd*kDz)xA=d
    zA>mDJMEO}wm=z8%##p8Epux^Z?6*hT+bBf^Yw~9wh1mOBI2*B_&;n6YqN$_sLi+`r
    zN+}oUEH%!)UEZO0kGwoV{fV0125Liy{XQRjOG;ll15xL$5w(ynu*BE#Y!uUbJlqhC
    z*)p9Akd=!p3VXT;Mo_Zvej_{xJkq)x&0<&B)@Utjud|co5aPb~dM)3OKXKmRzZ}RD
    zt~hR#D>70m`e$6d9RY-q2@W6QANld%I<S55;;N27*Te)k{(3q1=Zui}3!`sEsx<$3
    zka`~a)1<vnEVU<#Mp&OF$SR?x@YH&BZG;E@>vZ*VmwpbdVCzWDJ`&UO%hC*(c9AJ;
    z<Fw_L+~}P#;?LFX6=U+__3^UQg8QE49{J1RQH)f4Z@i-xBAXi%obwJAYYfY%oC|O$
    zmBEM*5R`p`^-^7;%3%0NKBiISX0k)fk&s|UUKP-iI1nuY3gIxgm?UHEnp8#pFmXAs
    z-0Fmb1tN<imBci6=|jcvYM7xI=iz;6SoEw;y50`*hFnhelz}TDIr9Hr80d+($MhyK
    z!Z1=A_}#4Aep2`ZO-OezP)Mv=2ff1_m`ib4*T>8qe|b;=knC|ZRghL9-j+JpIpBjS
    zLIz{G#rkZ%K&UOs1pgA;bi1JjfXryT;9AV*AdF1(P;A$V^MMS0X10gTzoNjJBTB;U
    z#kJ5|QkG?|zHY}$^ddtj_$wAkIcd;Wk|&B6^`fnOL3uIPj@Z+b!gftAC_YE@sh~EY
    z@awBver>U-j(pBMf%*W;OI?#3J3yRO&^PqFHW`#yr|<HN5*1V6<7*_>%#0rDM+^ZV
    zw!IXpiDk0Qo5i<HY~uMDSv#WPCC3L1r8!oCt%KzGPXPVM>L_mNZlA`+m>mgyn-Z9(
    z1VK4OJry2Iq?o90-NhDNVAP3Niev{MJh~PQ7M5U9?Ob1#H}q=Dgn%~Ng=3b;7jX>n
    zADv=?=pgaOIN2G2JCr_(7k0YF#OlE0c}by4_|pb-iJ-CYzLbWw<r^K#=rJHNzDF3~
    zEYIbLJyB5cO;v>Hs2A)ZY;uuYwbQMUa1ed5)1G+DXr$;MC*sQ-N@4$xD327+bTrT^
    z?kmr?X}=Lu2xf<Nh9GBhB<B}i(hZyzCc!9WX&S8UyPAxyPc{wk;(%N}_KJn|{{B#p
    zx61(sX#!>7X5|gkw#k>FEC139#QtL*Y>C)kvvqB=d;fVQ8{+;RhP-)is9rX&jj-Ik
    zT00%|O4wv`6`(<QwZmiMoVuppt!}Q#^NL*Agqa&nMe)?_P_xX3`IZ5v>M(&W*hs2A
    z?qIa9QPvO>*ssTM+$((GcA1>?(C1jm10t6@Dy(k%HtIN+5d!B<k2qQv(35Ye2Zl~A
    z&Fon+6YBHg@i;~Lm}LvKO7N&WuPU0S!i10Z+`i!#*F^1Y1_{B)lHS7EAt|nEW^7Hv
    zZIs`CuC5-ca-Pl?33=+y4`W~P&iD>k;~J%32ZhcKu$-i2gOM1Ek)Av0js<&PBErK4
    zp0BqauJ^Yy7bnHdyGOO!FbWP*qG)O@I>y%wAIOX9eD)7R>ow6xlYRy-h|ZmQaLshv
    zm7r7H)>I5~>_i>NDSv6k)mCwZu$9K6)JGn#ni#>O5}3aMrYt7e67}_&zNlt_@b&$n
    z)VO|sK6qnt57(FA0!{d&$}h!DdNgOgYMn=8${CJ<oF1@0pd2cV%NwECVxVAPw7T15
    zmTtdP+auOaA|sV(P`XiQ*iRLnx4L09flS!i+pZdv^4L$4l1eAo08i=p4hB6yTGnXo
    zwA{hlb*N&+9IIe%`QR63XgvigLQBwix~7%fg2;~k&!<T6a2CP8(0`t%eTL^JIqMp1
    z|6hkt7K+)5;OgNgP<OeRxLV@Q`+=eU(D+)Pk3QfDr6zSteHr@s8dz<{_|>>S2YIAe
    zYh9atd77_K6soYC+WALnJL7SxqnE#(+1G`m^0I56gta@e+L0z>IRG+?>DS@Oe-NlQ
    z-mQ)F{=7b($L)X@jB5Ot*D*>ceMR8793ItK-tTO`iAnNm-xzYn0#;&=gXJYz8<Xj<
    zi+ynPbztvyuhwadre(flpQkggk^85;A%tnEDOaI0l=6A!yf~<L19u+=@%~LO5Huow
    z(fb!48*a?bWkULAo)Iep92Z;fZj;kq+fRm+DRfJ}{A((l7ndYEzC~l2H5x<d6{cSF
    zjXfR;F8D-yuqEcY6ng&VGFMXn)G!WA;9k7pp~HQTA9UUO>KmnUBrL#cb@ELwnkp?O
    z<rzEA*BP7^$AbGBhxry`;QR%SO~vs>ZZ{8tSRklRk}8Ts29G>v-&z?qob#qYSe!ek
    zt^r`X2W(J?(qxhOf%h#^?8D`^&MPbuUE<rgB}g}ksqJvUa$;kd!781Nj$b4{a;FZT
    z^#)PL%o;pe^G+K=P?M^<{GuSG?zQajbs{}|2(@b_GwxoaW+#jOk_q`oxM<7Xe($`u
    zEYd9L^~U$V(}nfr7iaN*yCIk<d%iz}lETnt-beSP86$FL$5eiYx%FHhALC;@-)>9s
    z$80u<1iU&&+mQB<4bZeyBaOB}$!d@`^f4+iXS3;h>rXP~*FRrr)Wki^(q)&E<x3mP
    zCiPB6n+re(61W5?qrRAF_xuw-0YTpto}F3N&!f*yk-<l23&wa=89l|M65LJlJD@t*
    zLAJ4uW;5z8n$BM2docaXJN!4OO^lKzhO;{L^1;J;oua1;7J1a@?JnA2&-><i8ygLb
    zMDD3~l|n_?t%yh2+!s6G0ZT8n(S(GFh6au_vf+HOO!WN_7%quu&xktnvJao4_wEA@
    zYy@ky@rFT=!nVh;RHHh@AUeC_Rvq0iujY`H>wAMt?71xOWwtXa8UsY(_;C*7d*d9Z
    z-#(@Mu>`+6lrEC|=E^q^u&A=e+P9|#`hdP0Rg9`gUbNqm@!-Gg-V6vL;!*U<4ZtIa
    zv@cWy_^m4cV=F@sv3lCwx|?r%lb?NGQobaW&#Mi<9dngpq({-uy?<X8bYhrHzd&4Z
    zY!;p42(tOwMWiY&eRgqF&KHSpg-c4dvwcCwi?HCUE-<2-h}kx>xwAR&#MBUtybddE
    z1Ka>|_TRpK@#mBE#M;ka;RDR*2pXmP#YHG|5qh#YgXDUPD*cs3)<j0y;@=j4p~pqJ
    zQPG<78z|w>>>Co@wnbArjo;_^QGnuQGdUSqu6AMPxBHbW99c9gHFZ*u&-M5cS}n@d
    z@wWUbV?X7y#NTCaqV_t*)w+Vzpte?L^08$=xiju5lCZ4~#~@34qa{rJM!{y~Tqe5H
    z-`N}U;ZKj9jnYas%EXCD=*$|XC$h{m@?;&T(uT--QOR_H^PcjyAP~pc&dS&v#J%KN
    zK|)APC-pnC;EKdibK<GG!r!33O?jjHT2P5c#5qarLr$U9kYI9j|G;c|9^ujVM2D|X
    zw5P2oE8gFE$kicS+qHqsI3(w@@zCREllVcezd}^tXMb(E=MyLtQ~E0y>x8O+Pqef?
    zY3J^)uf~;VDge4m$gh`Aj{?OYnES!Tftm1kjZwLB-5soBf8q9RaPk~e{SqHq+Gh(R
    z<}KbtcWaoIC!do+k`h}5s~QzJ&#Ro?TzU_eO^<L_7Omn7g9T{r(7H!=+FuhNN@rPB
    z;~&KTEpS=0EY+~p;4hZM9m(JtliH7_{E67nW&05^fu`^-6LIzOIEjIDl^%DWZO6Dv
    zsi%+Ej`e1-K@~NxG)~mry-I2kMB6ChSCcYwYS$kvP={@x0ci#%`Q1zs7<o6XZ`X-J
    zu&&!Tj8<>xAgvNoX&oKS7|-8Lm;%2@BRKwb9H4rRICqXPIQLdOMGtG>0(Kh}5xDzW
    z<`R5ub7|^ov6hX(i^R_d6ZdLQ5t}vu@?2|ueBl^W!CoR=LZ1Urel(cC{`jK##xJ5Z
    zW6m&PFV^e{7~mrz4!xy@n!O%C(vIRG0g>FrE1t+=n3;z9D!vWHCUjqMi*QAc4!hId
    zk9MAo2%jf}g*lzYPM7_RYQxo3rJR%jUCd5FoBmmSn@QTM@?QERM*E-uEb}GD!7+W4
    z;ucS;Fa1*ZgF9U&8>R&|tjy3FH;93-Kpof^^nCm9kp4U+SFqwi@6}>$jo4)7x?L*p
    z5e<NgLBlrhpA1IZk>HsG=We;aDoq*x+H6v7x39;dP<1mgK0fQuG+#L+=2<$z#m5Z5
    zCEto{j1wIIxQ(7>!yi2iRgQS~c_6N5JHqo=$`<Z4>q=PD?Y@90#727stD}1n!C~qy
    z1q^LAqT}jq4r2TFIf&-|vYu|DXI}0>^}2ev5jUXZCM+Z<H2PEc!}cksDTJ)dT4Gi_
    zIn3-w>OWL>l4t}d2Pur%y+XM$j(Cc126Ww7ST~4S;g=2q8j3!|OoWynEtKkuUjZ>k
    za%azP+sS^P^KJ=|`TAdnlNkRHqn@0nFWdFe<s`~4P9^t78|9}Q-+1$dm8;9dxVsP!
    z8kelq;Okl7bX$l|^{+^vc)myvzt+wRuEx>MoI4<uZsqpeGFeTpjh1gtfm(G|yxwnj
    z=b+f_Utf;Kk7Tys)wT?bXBt0W2Z_LbN%O2p^31?B7k7Jh+hNC{vXrOlCkRV2Yi^T$
    z1{NYfy3~j1v@U_F+F>-_sH22UA`hq_xA?B;_u;ixDrx%9ajWMqLgzfYCofw8KF`gO
    zWh92d@!_T((;rc7)Y0;~o3^0R^ALS8opgP}hX%hpsuO^eo@L^`#d1RJD{m2kN6wGw
    z5T;|y=;jNZl}W2j;Bc$yGn_%Ti(Jtk4%<zmI=TPkLM$Bu`+OR4_j|5(X6SilsLG$X
    zcId;vw(SCZCdXq|eZX?dTVPhaxzBuUMemFVr;6ZgJbdFv6(_8aZsg8C{u08%mv<>`
    zDK<n{OFDvSie@8%akOPC#ZM!JA)ceoSV2<Tor`idjCQ1gZ+ydh>5cCl`%fdh(p%F!
    zN4;@Huf@ukLx1k|0(qt;@&Xiw=4#8cVPcfFDX~atn}9jl7(Tz#p-Q|4F%ywo(jlv#
    z%qISsaHlw>1|(CS*2KqRSCP8NF(6NfJ>HP|lV`v4llSyqe<E|J5l24&->D!0%X_1>
    zg{vvN5D0m~n!O3#;}}s;n>z%iE0e^EX_%IQaWRp4yx4LOzqV3T+W(;k{udVh!#EJ}
    zgnXu%H1P~HO=bwcbt57%T)u4QT05g9BA!O6PoHP#DPg-80&W|M33F=n@!{4j6>-=9
    z<hAqWVp}XyfyN=oZ7B_bW=4{IF;%){?PLw?TWdV?CMJ$!Q-*V%InBc`tdg2AKJ4{P
    z0{-QIn9Zm#Z?a$Q{bJsG9rO(?ULUFrY;u9P?c%vOTrLU|>l9KJP6S3H+U>;T?}#WA
    z_O%upq*IdOTe9b~q#{Y}07vk515LC)Il|+Aa$f}Tc<VN$!X7Zb>r-&vQOIH)UZ$6&
    z36g&<+>7?MFwXUe`uwpa`gVyIwLJn~p1QK-H&X5vGa};Wdy^Q_m|$Lgl*a(g9EO{h
    z##w%7(g(SjboyvXP~vP72(|N1)ZI{XNa-&bPjF54D`q-}^mUm=DGk7I_a#t~zNU)>
    zJD=vyGTVi2y<U{L&m=!HRbZwWQ)hRWTcIT3njw$#H;fw=v=!7nxFdBX|E5YWT1~Y`
    zYHpUHg-A#nwuGMaO+8sSTpmA@`QG-O=124NHAT89JT&>}*&qMByXD3Tn-Wj|5S#f(
    z1uWJ`3RnO6rh+Yy?c=B~PUJ?nV_{w6l7FulT#(2M_~r)HsCX+L?$5L39mEvBSU`8$
    zYq&EhHXoxg(J-om_c-<sk}HMeU-tnVPy0i6A0tq}<(g?jtIxArPqXlAq}=_R=fi~B
    zgMcm%XYZuuVR)w>f<e=;AaoiUReo^7japP;U-gopFGhk~JsPJ~i+(}-S4lhLpuDou
    z%4<yLHdzwPfB|<}u0ka}u$_$2b#p%y9IONXDbYn?9#?dCRRbL}A^+@gR^0HTKm#Iz
    zElOWY?CGY8qM!&er1<^k`Z8TEqX1poLu>e@=~3q#OG#^kYLhMnV)y;ZF6Gqz_mr2P
    zugbL0xc8{kyxRcLC?m)K&Yj$%)>_B@og|1@e~QPf=dh!p2dBQAtX$a~q4}AI9ArA;
    za(4@-P0mv5dlML~u;DO#U*_mx8yZv31rn3O5F4pLW;#xXKA<~u3@cMIw&h)_VR<hr
    z!9BUkX`tVYVsZnBQyLoK?@el`7pjsMZnW+-rdM%a7fk;yM(^G|FP~#ffZfDXDUnI;
    zG3L{|yxApgedaGdPwRpes$t!ZxLHD@k>G3S-EN>9CM!{YB*|;6wg-K3V?)eR((z#1
    zHyX+Us~H@9)~!8`K-#ZDU>v8HpiaQ|@=VU5MgT@ehzQ(1nZ!M0ZDk{Fb`>pCb0vQE
    z`gX@ZK}6S!(-($v3w8-+L6Xs~;@WTrR}q42gH9p2ncZYDab8*`#p8jbS&H9$DTx{1
    z|8L)r+}X3oIp6b9dN^fZsl0TpRK4NW^TVGZOit8~r*qM+QL3pd7G0|~C`PHxw2PM3
    z->n8iEh)LU)Je%r7nEt|D%&F&(={XI*19z_HKI38aE6Cfm-buU7W|=mo3gMA57~g`
    z7aBx4OS&(O5w@W;2pO@ZVyG;2^F+2cYshx%M2*M@%;(4quYc}>z1WX(9ccb&>8#{j
    zE=VlFg+&2-xsr%AY_}ciz4+<$^}2TO2e)byPmJl?+aOU7{UVx$=ZNQDTQLxsh}+(_
    zak-NBw`v4=+Ydp_L=w^J1&NT$-AbEUuj%8LN7nJzt^APyl$(ght>;(o{)xCqf8IX6
    zq`a-CyPq$UOPJN(oo>$gX?v65Y<IVrD>$GnIq7Fq?=??};kY4#Na69k#iG|Wd|{Tt
    z&uFLgaDQ<f-bY#NK*2`a#nEB^i$K<i5_Q{%$<LupJKT0N_`-X{OF?W{!1NJAm~0u`
    z90aa)SRx2Sa3I6RwT9D8=?$qhuud=4*FtzmnQxw3c3!jU6#Tr2C%>4)`{9^3rX|Bg
    zNY8N2w1??HVsq#}Xk&RcmoQ<y;6(;#7|x1fmj@yz&`|WH(-s-BRWLXV4-35HyVley
    zVTQAu+(g>Bacog;CZ%I-HU?7dT+nZRo?h7BQd5Yrv%sI0rPF^Sk^9@l-_4``bwK!A
    z5Ud{#8B%fMPHat04G9kj%j5>0maQK}jQTzGC!2<9FicZ-#V^ZaC)A?QK9EelA!nP)
    z+Z2DqYAqTsfZ9k1CW9+h;Uao59}OnJ9>r}xs&nHlM5^Y58T*TkM80zn8=UE2e8u{j
    zpH(Cv<_IWBdh<6_f1={d7#R|wGLcIoegMU>82VZLrcn;{FuCmF59Tpu<i#i}Oa^ad
    z$fDiiTwo@;h7K+%9&a`0=up)0!TEh`KX3AS{`5Ddr>7qQ5TEj5`AFXQxx{XS6|0N#
    z3g?J^0RDM8_l@3M4G0f^O03>$S#_it3cdG%7HWo_Xb-<{a&<IuxPG{G;MwU24!(<a
    zP)MR56XYh?+~2I&qkeH6s#3b(VLDf~Yy(rVXGi>XHHzW`(2t54<~-m{AO)J~7AhPI
    zbkz9A9Eq!7aijhY%^=rG`j6?w^hb13^_LKf!X*}jaV$GaXvsies~+H0T#v%OcveHN
    zw6t*A@XdVfqJIPsPwPO4;>%M4C+{dTVU{cOk`3puW6b36K2&z%>btSk&&H>Z;<`p>
    z`FMTMiHw&wO<Bcc{If!ESS4RjvT^h}GielUk8~1rKJJ^m>XcQ$-Y{pG@3aN}s_>;#
    zeQ6GDsqIMA?iz{B1XzIIegeu-#qL_ZBH|eh`L{~J(A{bH*vND8W}io(WZ9s;;m3qZ
    zElXp!ru)Ht+yJJ|dfvRtcX?~Pn_nW{zZbM5z3mB?Hbf_|+7ZC-9yVjR&7mnNul4vE
    z%KEK*b1~tReV{kNh2E=&iwgU8w0kYs3c1o6m;*fZfrF-g?1!~+<-`f!Dj8+i7NJUI
    zcZj}vt?|8iHQ3TdM;gn(X(Vidn!cd{^x{>dX&Vt<c~kY$*=!Jlt$zH<$)D{`Ucajy
    z&;VwxYuf_O)~Jr~=04@ngQFW>^`^_3pu?t)#>x|K0cW=egSMl9#+mqq-8|RdMP1Dw
    zx^5}L#|i6)ERW8LBjm}wD6@3<?Nud{P#@qIK#`tV-h;`V=p69O^mLAGF(TMW6~DOP
    zyDpyxO|p|cePp`grO!8?nQ0#ZY2{(!U(nqA?%<@tbhA;!=~G~ZIe4_6={B1*bUI|h
    zJc&0To~1MU!jryCL?K6{3hjC{&E_}cR>$`!cXl0aV*W>(xz)J2m+v|RNGEXIA%XWv
    z$Hx$v!@W5LfaU7iEY}no2e;*F&dh{F;<$?``JyH&l3RVjA{xC<KlGaMVsbmn>=Rq{
    z6}dLQKK(BW4N!Y)Mzd3h)PX8L3OR6JX82vsk<?!K2=fGX6aY;;A)HZGGb}75<{uxX
    zkhV+ntp7HV{y%c)l^Ai?67k4&6NU3ZyurWYD?w*Qj*(z}17rs@Aw;Q94T!Fg@K!Sn
    zsAbYnXgAJgNnt%$bTut_I2mveeqHC8Faxz$2j&9JB3~`l(8gbSfTOt8G(TUK*Q(lR
    zn7M6$UCb0D0-H=Y_@ozfR2F|pyOD)+$%M{Va&ls>%|<`y{3G<99ycR8(ZD;4@=k|d
    zx1nPOrARPmMi86c#Qn^1g5RVk00)%LY3fdvDm`_|D|ZP>a4hmnJmTiqc40*eItZ0G
    z(Cfxe`6oWB{4L&V2-lf)Dz{MkXQ(A{E}?e1cWU;s-J?xBbGBUgebeTI{+k+LT|P=A
    z;GHDn*981}=hBJAGXPX?iXEu)RoZN2kKn)}Yp)=+)%`(=Hk2z^Csu^a+hNSE9<}O4
    zW9BhF843QW<{+N^4NZ(+Ohu0L$qp9AhpJ?UbX8~fibx(>f<ko>3CRh|ZH~FPW;%L4
    z2Jfb`#^2zr=0rNvM5{6`q6x-M;Q<N0#SuM;>J8B$W1lwJwBT6OTa+L|E?*68NnD-d
    zqirI@#!DTk6=nvBq1t|F2a57+*JomCoPO&bkNHd&fq@7CoA#=ogI<ZG86lOO9TWza
    zOa3ncx>@ER;^g6MTjnNJpU8$17lkcby!fn#Y^cf59qs4;WjW9@I`pu+^=!$XvlzSp
    zHl-BP6qCLifc*pwQ8vDfUY0lgjC>>zTLL$6VLQBKH2U4M(&?%A718nspPj%tmUBw+
    z#X>LH_#p;`9!I5vv6@cVh1b)~bHTXz;!@s>4omWjec#A;((g=Fq_p{u1|<#I-D{h1
    zr%{sZ%zv+3T?)s{c78c|r6Ez1kf5OuR<!e%FZH3R@ys2(iOnrffDi;zFe@cBMPZ}#
    zs$Wo{1&)itUJ&gr?)P<{0_b#pfgA0N_`4D>J<^!_`!;|HxG;mZiSf=CdVqy^)Fpf=
    zR6<3YrraF!c1|tIJ#;9sg<)`+=a+cw8*6)$-yV3w_=*W`MB#~zjz6^LYX4eVoTxdI
    zc3h_Bc-v+z^z5>e3vEp)brfA?bQ>r1^-8x`-ATBNL)9<bX9-R%aS<I@mO9YTx@_@J
    z@?;QUJ#BrrGOlk#&jHnb_{Da$9gIOeJQJZoWumRlYaFdADd{Ghq(F2U3aF+rM*Qu=
    z{vr}dei%tp99#wcVX<|+zNA|00cR#5V&NAV6OCFed83?o&V4f)Yz)JnEl%mb2*LgJ
    zq))r7=SA)YHIpU`%y7^56`#wSWhhSn8f5pyYU2CDX3V?qUSjTFkRdaaghF~~B>9$&
    z<i7A=ti-0W`x|Gu=P_^8An}dce`6IZ6O#HfXuJJovyNQfWFhl|X5W*qtYHI&GN7hD
    z+KTh07-NP17+0C02;6o#B6jU>;rXG-!IBn08OxyuZoj`hcQ)a@7O5;d=o7$6_hSTJ
    z;(^Dr%6p+QhE473G62?L^T{&S2^UB8^~fFHE0@wP^b_T#h%rn7^=(?yQf+N!)<~#c
    zB&mh#W%khdZrGJgs@ixb%h?ad2HG&$G8+QXR6zbUk;$(r4F#>F^1>Br!mAfDkRR@D
    z!K|#|oQj<FEnak?Kq3<@2Yk@3?uUAF%MKQp-ri)?dltM&Nb;3zDJ4aCuLXozF6<uf
    zjk9k;7aVNl4ZD6nf7y}cM-NiW-L5ky9{!^25Nx_5fRi!>Ah)DlY~3|CG`+4@opGIM
    z^i^Z4rXu>d*NVX<Si0H~gd6A-MvG~P(lUxp9Xw5PA2rLSX({wc=au31fwxTVQh~Ia
    zt5qVs=~AMZa#%%;=wcXperc&(evRpI)^$1=_Y%I05s*G{QuhuY-NY-QieofB`^yhI
    zg_~}T?ri%R_{;XV%%zN?*DE+(@Ym8gooZ7%{3sm<dlkfHY_(m$*lMH1I#=-$%lN2o
    zli}b)GkLuqT(<UE0U$x+&|^Js4D=Da)tUC`7`)_vE%+%BcLx#oTSvvE)8}de<TRtI
    zi2+49xnZlr^?%jCke*=-tgK+O4x%c6sSAykJg_uqqf-4w@Kj695uo3f*_Ruzb<=v<
    z{?$gUn)_|7tJb?F1>ngpKK<ky<s<PQz}KKn?8pSD$t|n$<geGgwo|)k4OmfB`jQw9
    z?0LU-=VqjfzQPep9wm;ty@1!dk?YB5K)kxIBeI*=D**1)6&UjPIDQuV)l#&lKlF|y
    zkZ?|Hp2C1&@4`16-G-e&y?_ao%s(0W`C;w^HCNL1QmXc!cE_q;;FDL&w3`&}F9^8c
    zFU^t}+D1~F(Bj{MbCk!ltfB_Qs|ss8^46lwJ-(QEQfUbUYFhKkq`r_2x}jqNNm#3H
    zqTj9TpQBK`{gQ6-<Io|Jz-BrR2elDAuF@({MtJm^6C6H?DT1wa!CiXcF2=#y7k@D2
    zd9%GOjfa*m^AiNepX8EdxcF&i_+k&&-xa|kW@}(tP*>I2U_*K}S3_}=T|7q^w`XB`
    z2D5mfvT(`vMwh8DGJql?=LI15;DsNI&n^nhYwgI&-{a#V-{;<=cJWiZ5HEkDY(4jD
    zc2?xCALMIz@)_iwDG(vRJQ8kP<l+Vwoy?kB5BPyiEC_R&2<|7Wee(Y$j>7xC8|N5n
    z-mb8AOpEdA->ZPnh_c<&o3Jg+X;AwynF(`1Ihpp<naOdzTu&{<jq6!k7HV>9xt|hy
    zu7!?dLSahdVg=JpZk#xq{L7i0<LiK0GU*LgdG1N4P))+NkQk48m_zc2zKcI0^I35+
    zfbG1(u$`5N%GHCWUY*F)hG3~VBWeFl!~Kc#P@Uf0%|(ECR|6*{X8Rbm>Y3(N`w+}g
    zn}vYJKK$VH`HhCBK)g%Cw8flu&$)8+Ef5m{+5}|bRYsP&t~Jk0TLEENO=yT3nr<lm
    z@Zi~Hi?v*t)~m%x#XyA2@56Zi?f$WQ(xOpQ+m+uuZcE}tNvin=5=Yw)-cK$;Zpr*K
    zVdb5N_lpZ<ym>vyfYKk*n#uYjkyI9wC{A(mO8ae&B%;9#dTh)|_V0}&D>^xO(UZ2e
    z2{_|CZ)7#U(3yWf5i9##7`c79OX{6Y8(moRVE~tW6|XopYg$JLlxm|Q3X{o#=h{Lt
    zyCavxXR*2;2qGJ^XJ;nKfb^TpVwPUUM{br*(tWeRu{4Id4v!3gY2#K~T^)u_Zer}E
    zn_7xjY>yK@ouN|9;O0P^ZRT#CcRfGYf%F#Vs;VRb^a|0p^Z(QZ<vLJSPjez4r24#(
    z;S+YY4APm^cJ-}u+PmVLPRVEbwe<_*-WNP?*8Y9+%RT={Z+mnpmN)Z8JHzNX-t>;v
    z_h#9VcRfJ+!d^?N=4N?P&mP&Il_OwCQMpD;0zHfk@ay$}8TVzgO~mUpV_LitM@Q8z
    z?9S+w#)-R7Wl<Jqtbu^+Oi~n!$nu+s02ZOf<4j@X%-U%cf9f~&-C(#s-KB6=hXw{6
    z3>o;vsZz9D@#<Cq3+cao2&D#!x?aJ@En0faklj*k8?qGY2W7NqF`8U&<O2d0SAO`v
    z-@`NS^|91k#Ix*iAf7JVoHz*|f-VJAULIBVzI7XOq%9PKEJ{U_o_Blv5g#1q{%)Yt
    zuHV`t7OdsEDT-d&T)1I8rwj4MqY%~C2oLVJ2;Ey#pY)Y@iCf}yrVI*5khguM+aJ?D
    zi8k08g0MGr24%YWdh&l++)v%RzPJERPF}`GVXT3;Q~SQ3);N&{uLjx_s7gcdjOIR4
    zUR=<qVZ)snd>pj>8Cxn}a*?q4(u0!Y^j5C?U$fc+Q?CL<P4o5nci5lNCx*piDO7p3
    zw7s)X1*lLp08=l03J&gycNVzHUhT)Dhg(-$$ObXIk$=&)DcV)O9^w49G9x3O8?~ET
    z{YEEdco)~jSjott&Coi_j{th-KghVYJ&c8~|2d#UD0n&g5@E1~|8LV>`w3ANg?&_1
    z?FycB-DhP^mg2^y?@lqA_P>^f{|QRaU~igN=blSkS9CZwMjy&9MHhfv%{2!{eynf`
    z$pvnj!j!PJ^$UUrQOmKo@@YFMK}y`iI9Na(F-H2m)K^;G@|^OUI0RWuw$|>Zi>>4v
    zq8|c(foEJT-K`qR-DS<QQpmplNi`({O8SNeecMxWE%*Vy&h5(LR9K#;zv?ll#_(?x
    z@tC)@f+VPd`nOgyNryPs{OP1L^$HKVzP5{%Px7Qs(0FV1;_w5{2P}96%1Uie<Y~-@
    zaV1)4xxWX785&z+zFv!TU)IztsnpwkC7^~V_b@ZTxQPf0QOuT=i%@E1tbEHNlEi7s
    zoMB^98n7I2#oEYI6n)O`vX0@jN3DhjcO_<+6f7pkRp%uamx1%N|ASCRpqYo?Jp`M&
    z!{6CwnC}RG9~=ygpHMjJJT!0U#5q{yUgh*Fp_s?BMbo?NS77C+qRn#5fHzNU%5x!W
    zZ27tg+u5U}YF4ON-9EEIg;mZ}8Hdm1v;2C*jqtCevErWh+ssQ25B{JQ^ON0tVXuaF
    zXC>&5P&JlKeXe6o?f<I!hD$G|QT#FL5|x<?czG-ItCa-8l)GerV?s5785`=lA{;M+
    zkeuiJ@dxim$-nmb<cPb^5%*<jm*n!Z;Hy(tf#{KpBsvss@``UdNeL4&-ImX1-t?!J
    zkKxc71wH`B4KphR*)XnGk9o6mOIxDHR+?w4(LyPrXRs11^*OHU9iD}rp4rDu+N}9%
    z3&J7~+$S9qTpc5vt8Cy!B6VPJ?;cB48kr<eOXpkmrY#+5l+wWb+jk9SJ?{0hLe;O6
    z7wL*k_D|653^agS^OspkT2n08ZYVzPqj#Ilm)FSJ&AB#pN8(}Bt=d}2bcAlX+)?p0
    zL1e1J9sq(0OKNiaIOhMY^R2Y0E}Lw7qrRI>)$qE9Lfsl2!ik}0GeaVk8W1YV42f9!
    zrDpRi_q@-CcyuXkqt%*k_=Sc09&?96Tu==56A9)J#}xMwb)PC2fO#x-Caabw>Rn0y
    z{HI2_IqLYwp=X|p=?Np~=<UJRjui>954+Ml?kfMhR7O0xujiI*!b{uTA~|{_q>bBp
    z=-{T8<|tDq3CTI;lW2D@h@1>&cH*BDa_y{)8j?pQ@ST4-bycb_leaSjIqXOg!I-dI
    zwNUCuLgX|9CoCb|R&9g{#A6D$#nUq#?A;pr8AdUx?+Mg??0rWBc7w@CmP8$GxdE}e
    zzHzq~`$CYEEw*mQui5d*E?e~uhB&}WX3EcR8?CKn>HfFzpYY*7uYx^#J!@o8sI_T#
    z<9>7j4!UEiu=RQ98@44ed!uGToSby}kzEY$x!v2ihKXiyj2);!CRiFr>vI6V7wV&~
    zpF$-W<*Q*jZKoda1CDyKwXd4AY%8NW?9?a@Y<jmp4Jb~hx@`Tnx)fT?5|=(2n7q?}
    zL+k?$%;k_^|2#bCLyFFc`<yhbT0Q+PD)1KLlcigl2(xq<{gAx`StVK9NBRT>y}T{I
    z8l%p<QwEx46v^x@>zl<xyp1Td;Ir1*>#*N&hVTtVAK9|*u$h3nx1=6hC?%PgdUH$1
    zgU4B#9LvX`-GA_Cqke<q(>n?Okqp8ZYE~ymacnbL{jExU#!eyp{f&~&7KrUZ(@I$|
    z*^;qz>W?cO%fU+}`r^A}yw+(=Jny@=CHlQvYr*sZn~<g>Mq?a}U+deU_vMDx=p%_S
    zeq4>UTvg|Ns%zPo!tKDK1jo!MHXs5k!B@$&Iw30U0NMQkIcpzN?DYb2*ymZtS+0tL
    z|7ZN81f&h|3Gcxa1-K}FIu}UC&Q5;*yA>^uZA?ny{4)}sFcUL|IrhZMoeaaeLpX1W
    z;w-j*w2UV02#G(CdabMIPx^&kQ$y&xwe3xF%dn^Zx=-2<iAp6|^VK;0&iq;2n+I;U
    z#cse&zt)^-b;`eH{a<!3_qfJTs!iDCVtT~KQKt$aH7T8tl-f5_r4kH4qq~yrdgL&c
    zkJ}49)If>>R>1)!wONiAju(G&X}wa&e3M9e@y*jUOnq=Da;aeY3U?)V#0wlC4b>zD
    zYg41RpwFSrtQS5)@i*U(!g@ZK3qpF#ekkwhzv36}MIRhhvDIX_{kvF-w-i!URUy&1
    zZ(GVLd13Rxa`n}=54^&rT5t6b{-~*ny>~1i9TpVYZ!wNEQFHytZc3QlVJihZ*&r<0
    z+pVZ@C%9pIE7QsXE_Wp;lEw)G|JA?Qr?Kw4JQlq%?zBMH%<rqGFBhcVOuaWs7im>3
    zQ6JVx`e*&{{{B6UR&7EDCoSR>Ia4d+4zz1c4JkkrJzYuTQJ&qreUvcDtG1l9xOB(^
    zrc~7sn*MO0arcJ>5^dNJY0Dd`dhvNp0zvzsHa0TO=<$99GqoAfRNXiNXf(!*IEnmP
    zr8tbeCb^b*$m_VvC6g&*bjtGqCpo-Ox`{)A5lw;yGH&b+sGu3`p#9`TQsPue)fUR<
    z&`V+$NVA8gzWIS^yrU#20h!!^9m?LW?#vpgS2M(T!&ts|UtGu)ibm12hjYQH3>Qh9
    z&4Gq1i{aI05C~XPmovUh_g2b!EvwQ{JyK_xNk>x&ulaux-hYGOKQD&wmOXCwH|wi#
    z>ZA;Hh-sqvZJyfmPTTsim;OTNb>l5w$r>9)Wr+8Y<E4v4YxmC&%(mx%tN_kOE8Ye<
    zkXQ4yxUj#M>$ptx_kA@kv@KugIc@7s51}<>$GYQ56)Ki`;R>$*#5fm%=a3oHXA{2r
    ze(gE^q7@6M#NOKDk?lQ!5v+|OS})<3Q$-XinH=iC%oZ$K*8mR&EYajonfKIB3qJw`
    zEh)zGw95_xD1yBg7v#8+sMaF^CW02x=1c30XZN3`1|S3xsHPU&%AtideyTVxW^pmN
    zC+CEKwcWLdiPK%WA><$Zk_5~1-n5;YlQ3aqhz90Q0Xyfxt(2@|0?VzodBvU=`;yT2
    z97iv%rVlOZAzEh~-1FWqO$aNkyaLq>*<|?mOs(GR3FT392W{moZ;HD&I)GzNjoj|$
    z6#h>D!~{G0fG#7m_{NwN;WBo+FBYH&u^ak!z=N*W+uPe4om4A>NYVy$G_k2Ag|NAO
    z1wvW{1B!~LG<?~xZCj+`QiJu+^DH%mVP9T8JGVVNJR;fE6}Y{@+QxZmTcl%iyWfB#
    z4>ZRF@(ZG@sG?88UFOlrO7R5%3$!Z0a^39~K+xO1U`7jU^5z(@hy;s>te8_ua9x0Q
    zn(l}+Nj+K~g&_``wy#um;Qzq?f&T;l2mTNIANW7;|84Ov|JCpRS8NUz9_W9coCNv_
    z?xl52VVa7r#b5F5PRa<1$EH=S_I<UR)$HsQrfD>dUhr^0@&t!&FBRvJ)_Pg&>TFXt
    z;Him`;9z20Fs(B_&VW(!)c3<MEbQjBipuz$FG~gfu2)j!M&sQVJFJ{h8rh|rn_)rI
    zI@4qXgv9Y$W}YVMx_3?3)3)vGXRRAh&5py9ShWSJ0%vfT?b{W1W&^=I<8Gp;t#v6k
    zT$5489f<F-u<l`=ms(dGc`7A`>M{jzBor(F1Dq}caD#skevw=^xy`W{jSaVH-|RF^
    zSxJ<1s$c_lG4y9pCj12Kt805nHipE(fmI(remtK}i2v8umpU5=fE&6Kz!tKfD5{zY
    zco!fp1V_e}JZR%cv(4G}(kNtwr>75|O)au*I`|}b#FsjqhIe!NJ-zeaOcKF`RqzgX
    zM*JenjN>g8sc(CV9npdUo7l-3T~TbOt`ob-!+y>EHiCg>^;n^+rmplETdVk@A`cVT
    zA1`NM{`03FQ?x4Ad8O#s9fGCv7?9O}iuG`+X$PzYMAI#+5>jAk1=DDL4Zw~OY#s>1
    zQelFQX}adIQepTSq~Q#Jb(w>Y{qR)gW)Aw04L6*=W|uYVCY8oiUWoVZpBMokVRv`n
    z|G@u&{{#OA{tx^g_&@OfZSgOE^Xp%o&t1c5t;L4bTyJavWpxv!`N2~II|QWnuI)Ob
    zYv3~hzdJ|?XBxHj0LyR7#yX)CPY)MQMfjp;<xK?l;shk6@+{d*R|{(CgT2Amkqx}y
    zezs|wEUjZ%T2yf?EIT=h(zGq0hzQwpKZM~Cg~l%Iy0UYblTN`uXz@~3tYm694^}G!
    zGX^$M^Kb~z0Yl5p%LR~EWnCTsk+PLRtaf%gdj)DR<A|^<mU)ccJwN~Ka=t9H{rdIg
    zeQ@i(?_gDdCm@^|1%gG|$GR>JB;mJUhwT5L@?^+5I~?-#K5{H_o>s$tlw9%!2JAO%
    zwPewi-QXC{!xhKIj#2<sKw-^!!m=OENDVKquN+K;h@IEg7?RE1n^t2b-lr^M<QYq{
    z0_g|Dx~|6>sjTTl)0}n}@N`7N{W=1DLw7kpe!!Zsa-=pa8*m(NH%XbHdb1Xf#@^W+
    z0!Yl(Z&WF*q+t}rJ+X~J$AAkhsNVDQV?(l=i7Q)eikH_fxBDBC;`#gl3*YY74ymO-
    zu^WR8?-b)qS)xc+#&MP};#uWZXjqxtS8$~83O9k&BTMF?%87MjbR|<Ouz^f>K3ytK
    zDO-8yV;5vhR^p`+p+(ZmL}s%bYB1U6cA4RPB%6{$xxo07C&85m{tx^g_&@M};Qzq?
    jf&T;l-xmM>p8x{@D(Mktb)u`N00000NkvXXu0mjf(?NUb
    
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/codepen-embed.css b/doc/slihelp_generator/assets/js/highlight/styles/codepen-embed.css
    deleted file mode 100644
    index 195c4a0784..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/codepen-embed.css
    +++ /dev/null
    @@ -1,60 +0,0 @@
    -/*
    -  codepen.io Embed Theme
    -  Author: Justin Perry <http://github.com/ourmaninamsterdam>
    -  Original theme - https://github.com/chriskempson/tomorrow-theme
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #222;
    -  color: #fff;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #777;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-regexp,
    -.hljs-meta,
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-params,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-link,
    -.hljs-deletion {
    -  color: #ab875d;
    -}
    -
    -.hljs-section,
    -.hljs-title,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-type,
    -.hljs-attribute {
    -  color: #9b869b;
    -}
    -
    -.hljs-string,
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-addition {
    -  color: #8f9c6c;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/color-brewer.css b/doc/slihelp_generator/assets/js/highlight/styles/color-brewer.css
    deleted file mode 100644
    index 7934d986a7..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/color-brewer.css
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    -
    -Colorbrewer theme
    -Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock <mike@ocks.org>
    -Ported by Fabrício Tavares de Oliveira
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #fff;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #000;
    -}
    -
    -.hljs-string,
    -.hljs-meta,
    -.hljs-symbol,
    -.hljs-template-tag,
    -.hljs-template-variable,
    -.hljs-addition {
    -  color: #756bb1;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #636363;
    -}
    -
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-literal,
    -.hljs-bullet,
    -.hljs-link {
    -  color: #31a354;
    -}
    -
    -.hljs-deletion,
    -.hljs-variable {
    -  color: #88f;
    -}
    -
    -
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-title,
    -.hljs-section,
    -.hljs-built_in,
    -.hljs-doctag,
    -.hljs-type,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-strong {
    -  color: #3182bd;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-attribute {
    -  color: #e6550d;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/darcula.css b/doc/slihelp_generator/assets/js/highlight/styles/darcula.css
    deleted file mode 100644
    index be182d0b50..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/darcula.css
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    -
    -Darcula color scheme from the JetBrains family of IDEs
    -
    -*/
    -
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #2b2b2b;
    -}
    -
    -.hljs {
    -  color: #bababa;
    -}
    -
    -.hljs-strong,
    -.hljs-emphasis {
    -  color: #a8a8a2;
    -}
    -
    -.hljs-bullet,
    -.hljs-quote,
    -.hljs-link,
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-literal {
    -  color: #6896ba;
    -}
    -
    -.hljs-code,
    -.hljs-selector-class {
    -  color: #a6e22e;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-section,
    -.hljs-attribute,
    -.hljs-name,
    -.hljs-variable {
    -  color: #cb7832;
    -}
    -
    -.hljs-params {
    -  color: #b9b9b9;
    -}
    -
    -.hljs-string {
    -  color: #6a8759;
    -}
    -
    -.hljs-subst,
    -.hljs-type,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-symbol,
    -.hljs-selector-id,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-template-tag,
    -.hljs-template-variable,
    -.hljs-addition {
    -  color: #e0c46c;
    -}
    -
    -.hljs-comment,
    -.hljs-deletion,
    -.hljs-meta {
    -  color: #7f7f7f;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/dark.css b/doc/slihelp_generator/assets/js/highlight/styles/dark.css
    deleted file mode 100644
    index b4724f5f50..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/dark.css
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -/*
    -
    -Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #444;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-section,
    -.hljs-link {
    -  color: white;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #ddd;
    -}
    -
    -.hljs-string,
    -.hljs-title,
    -.hljs-name,
    -.hljs-type,
    -.hljs-attribute,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-built_in,
    -.hljs-addition,
    -.hljs-variable,
    -.hljs-template-tag,
    -.hljs-template-variable {
    -  color: #d88;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-deletion,
    -.hljs-meta {
    -  color: #777;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-title,
    -.hljs-section,
    -.hljs-doctag,
    -.hljs-type,
    -.hljs-name,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/darkula.css b/doc/slihelp_generator/assets/js/highlight/styles/darkula.css
    deleted file mode 100644
    index f4646c3c5d..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/darkula.css
    +++ /dev/null
    @@ -1,6 +0,0 @@
    -/*
    -  Deprecated due to a typo in the name and left here for compatibility purpose only.
    -  Please use darcula.css instead.
    -*/
    -
    -@import url('darcula.css');
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/default.css b/doc/slihelp_generator/assets/js/highlight/styles/default.css
    deleted file mode 100644
    index f1bfade31e..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/default.css
    +++ /dev/null
    @@ -1,99 +0,0 @@
    -/*
    -
    -Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #F0F0F0;
    -}
    -
    -
    -/* Base color: saturation 0; */
    -
    -.hljs,
    -.hljs-subst {
    -  color: #444;
    -}
    -
    -.hljs-comment {
    -  color: #888888;
    -}
    -
    -.hljs-keyword,
    -.hljs-attribute,
    -.hljs-selector-tag,
    -.hljs-meta-keyword,
    -.hljs-doctag,
    -.hljs-name {
    -  font-weight: bold;
    -}
    -
    -
    -/* User color: hue: 0 */
    -
    -.hljs-type,
    -.hljs-string,
    -.hljs-number,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-quote,
    -.hljs-template-tag,
    -.hljs-deletion {
    -  color: #880000;
    -}
    -
    -.hljs-title,
    -.hljs-section {
    -  color: #880000;
    -  font-weight: bold;
    -}
    -
    -.hljs-regexp,
    -.hljs-symbol,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-link,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo {
    -  color: #BC6060;
    -}
    -
    -
    -/* Language color: hue: 90; */
    -
    -.hljs-literal {
    -  color: #78A960;
    -}
    -
    -.hljs-built_in,
    -.hljs-bullet,
    -.hljs-code,
    -.hljs-addition {
    -  color: #397300;
    -}
    -
    -
    -/* Meta color: hue: 200 */
    -
    -.hljs-meta {
    -  color: #1f7199;
    -}
    -
    -.hljs-meta-string {
    -  color: #4d99bf;
    -}
    -
    -
    -/* Misc effects */
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/docco.css b/doc/slihelp_generator/assets/js/highlight/styles/docco.css
    deleted file mode 100644
    index db366be372..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/docco.css
    +++ /dev/null
    @@ -1,97 +0,0 @@
    -/*
    -Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  color: #000;
    -  background: #f8f8ff;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #408080;
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-subst {
    -  color: #954121;
    -}
    -
    -.hljs-number {
    -  color: #40a070;
    -}
    -
    -.hljs-string,
    -.hljs-doctag {
    -  color: #219161;
    -}
    -
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-section,
    -.hljs-type {
    -  color: #19469d;
    -}
    -
    -.hljs-params {
    -  color: #00f;
    -}
    -
    -.hljs-title {
    -  color: #458;
    -  font-weight: bold;
    -}
    -
    -.hljs-tag,
    -.hljs-name,
    -.hljs-attribute {
    -  color: #000080;
    -  font-weight: normal;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #008080;
    -}
    -
    -.hljs-regexp,
    -.hljs-link {
    -  color: #b68;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #990073;
    -}
    -
    -.hljs-built_in,
    -.hljs-builtin-name {
    -  color: #0086b3;
    -}
    -
    -.hljs-meta {
    -  color: #999;
    -  font-weight: bold;
    -}
    -
    -.hljs-deletion {
    -  background: #fdd;
    -}
    -
    -.hljs-addition {
    -  background: #dfd;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/dracula.css b/doc/slihelp_generator/assets/js/highlight/styles/dracula.css
    deleted file mode 100644
    index d591db6801..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/dracula.css
    +++ /dev/null
    @@ -1,76 +0,0 @@
    -/*
    -
    -Dracula Theme v1.2.0
    -
    -https://github.com/zenorocha/dracula-theme
    -
    -Copyright 2015, All rights reserved
    -
    -Code licensed under the MIT license
    -http://zenorocha.mit-license.org
    -
    -@author Éverton Ribeiro <nuxlli@gmail.com>
    -@author Zeno Rocha <hi@zenorocha.com>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #282a36;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-section,
    -.hljs-link {
    -  color: #8be9fd;
    -}
    -
    -.hljs-function .hljs-keyword {
    -  color: #ff79c6;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #f8f8f2;
    -}
    -
    -.hljs-string,
    -.hljs-title,
    -.hljs-name,
    -.hljs-type,
    -.hljs-attribute,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition,
    -.hljs-variable,
    -.hljs-template-tag,
    -.hljs-template-variable {
    -  color: #f1fa8c;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-deletion,
    -.hljs-meta {
    -  color: #6272a4;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-title,
    -.hljs-section,
    -.hljs-doctag,
    -.hljs-type,
    -.hljs-name,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/far.css b/doc/slihelp_generator/assets/js/highlight/styles/far.css
    deleted file mode 100644
    index 2b3f87b562..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/far.css
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    -
    -FAR Style (c) MajestiC <majestic2k@gmail.com>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #000080;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #0ff;
    -}
    -
    -.hljs-string,
    -.hljs-attribute,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-template-tag,
    -.hljs-template-variable,
    -.hljs-addition {
    -  color: #ff0;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-section,
    -.hljs-type,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-variable {
    -  color: #fff;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-doctag,
    -.hljs-deletion {
    -  color: #888;
    -}
    -
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-literal,
    -.hljs-link {
    -  color: #0f0;
    -}
    -
    -.hljs-meta {
    -  color: #008080;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-title,
    -.hljs-section,
    -.hljs-name,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/foundation.css b/doc/slihelp_generator/assets/js/highlight/styles/foundation.css
    deleted file mode 100644
    index f1fe64b377..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/foundation.css
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/*
    -Description: Foundation 4 docs style for highlight.js
    -Author: Dan Allen <dan.j.allen@gmail.com>
    -Website: http://foundation.zurb.com/docs/
    -Version: 1.0
    -Date: 2013-04-02
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #eee; color: black;
    -}
    -
    -.hljs-link,
    -.hljs-emphasis,
    -.hljs-attribute,
    -.hljs-addition {
    -  color: #070;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong,
    -.hljs-string,
    -.hljs-deletion {
    -  color: #d14;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-quote,
    -.hljs-comment {
    -  color: #998;
    -  font-style: italic;
    -}
    -
    -.hljs-section,
    -.hljs-title {
    -  color: #900;
    -}
    -
    -.hljs-class .hljs-title,
    -.hljs-type {
    -  color: #458;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #336699;
    -}
    -
    -.hljs-bullet {
    -  color: #997700;
    -}
    -
    -.hljs-meta {
    -  color: #3344bb;
    -}
    -
    -.hljs-code,
    -.hljs-number,
    -.hljs-literal,
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #099;
    -}
    -
    -.hljs-regexp {
    -  background-color: #fff0ff;
    -  color: #880088;
    -}
    -
    -.hljs-symbol {
    -  color: #990073;
    -}
    -
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #007700;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/github-gist.css b/doc/slihelp_generator/assets/js/highlight/styles/github-gist.css
    deleted file mode 100644
    index 155f0b9160..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/github-gist.css
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/**
    - * GitHub Gist Theme
    - * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
    - */
    -
    -.hljs {
    -  display: block;
    -  background: white;
    -  padding: 0.5em;
    -  color: #333333;
    -  overflow-x: auto;
    -}
    -
    -.hljs-comment,
    -.hljs-meta {
    -  color: #969896;
    -}
    -
    -.hljs-string,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-strong,
    -.hljs-emphasis,
    -.hljs-quote {
    -  color: #df5000;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-type {
    -  color: #a71d5d;
    -}
    -
    -.hljs-literal,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-attribute {
    -  color: #0086b3;
    -}
    -
    -.hljs-section,
    -.hljs-name {
    -  color: #63a35c;
    -}
    -
    -.hljs-tag {
    -  color: #333333;
    -}
    -
    -.hljs-title,
    -.hljs-attr,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo {
    -  color: #795da3;
    -}
    -
    -.hljs-addition {
    -  color: #55a532;
    -  background-color: #eaffea;
    -}
    -
    -.hljs-deletion {
    -  color: #bd2c00;
    -  background-color: #ffecec;
    -}
    -
    -.hljs-link {
    -  text-decoration: underline;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/github.css b/doc/slihelp_generator/assets/js/highlight/styles/github.css
    deleted file mode 100644
    index 791932b87e..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/github.css
    +++ /dev/null
    @@ -1,99 +0,0 @@
    -/*
    -
    -github.com style (c) Vasily Polovnyov <vast@whiteants.net>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  color: #333;
    -  background: #f8f8f8;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #998;
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-subst {
    -  color: #333;
    -  font-weight: bold;
    -}
    -
    -.hljs-number,
    -.hljs-literal,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag .hljs-attr {
    -  color: #008080;
    -}
    -
    -.hljs-string,
    -.hljs-doctag {
    -  color: #d14;
    -}
    -
    -.hljs-title,
    -.hljs-section,
    -.hljs-selector-id {
    -  color: #900;
    -  font-weight: bold;
    -}
    -
    -.hljs-subst {
    -  font-weight: normal;
    -}
    -
    -.hljs-type,
    -.hljs-class .hljs-title {
    -  color: #458;
    -  font-weight: bold;
    -}
    -
    -.hljs-tag,
    -.hljs-name,
    -.hljs-attribute {
    -  color: #000080;
    -  font-weight: normal;
    -}
    -
    -.hljs-regexp,
    -.hljs-link {
    -  color: #009926;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet {
    -  color: #990073;
    -}
    -
    -.hljs-built_in,
    -.hljs-builtin-name {
    -  color: #0086b3;
    -}
    -
    -.hljs-meta {
    -  color: #999;
    -  font-weight: bold;
    -}
    -
    -.hljs-deletion {
    -  background: #fdd;
    -}
    -
    -.hljs-addition {
    -  background: #dfd;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/googlecode.css b/doc/slihelp_generator/assets/js/highlight/styles/googlecode.css
    deleted file mode 100644
    index 884ad63538..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/googlecode.css
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -/*
    -
    -Google Code style (c) Aahan Krish <geekpanth3r@gmail.com>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: white;
    -  color: black;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #800;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-section,
    -.hljs-title,
    -.hljs-name {
    -  color: #008;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #660;
    -}
    -
    -.hljs-string,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-regexp {
    -  color: #080;
    -}
    -
    -.hljs-literal,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-meta,
    -.hljs-number,
    -.hljs-link {
    -  color: #066;
    -}
    -
    -.hljs-title,
    -.hljs-doctag,
    -.hljs-type,
    -.hljs-attr,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-params {
    -  color: #606;
    -}
    -
    -.hljs-attribute,
    -.hljs-subst {
    -  color: #000;
    -}
    -
    -.hljs-formula {
    -  background-color: #eee;
    -  font-style: italic;
    -}
    -
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #9B703F
    -}
    -
    -.hljs-addition {
    -  background-color: #baeeba;
    -}
    -
    -.hljs-deletion {
    -  background-color: #ffc8bd;
    -}
    -
    -.hljs-doctag,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/grayscale.css b/doc/slihelp_generator/assets/js/highlight/styles/grayscale.css
    deleted file mode 100644
    index 5376f34064..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/grayscale.css
    +++ /dev/null
    @@ -1,101 +0,0 @@
    -/*
    -
    -grayscale style (c) MY Sun <simonmysun@gmail.com>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  color: #333;
    -  background: #fff;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #777;
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-subst {
    -  color: #333;
    -  font-weight: bold;
    -}
    -
    -.hljs-number,
    -.hljs-literal {
    -  color: #777;
    -}
    -
    -.hljs-string,
    -.hljs-doctag,
    -.hljs-formula {
    -  color: #333;
    -  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat;
    -}
    -
    -.hljs-title,
    -.hljs-section,
    -.hljs-selector-id {
    -  color: #000;
    -  font-weight: bold;
    -}
    -
    -.hljs-subst {
    -  font-weight: normal;
    -}
    -
    -.hljs-class .hljs-title,
    -.hljs-type,
    -.hljs-name {
    -  color: #333;
    -  font-weight: bold;
    -}
    -
    -.hljs-tag {
    -  color: #333;
    -}
    -
    -.hljs-regexp {
    -    color: #333;
    -    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-link {
    -  color: #000;
    -  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat;
    -}
    -
    -.hljs-built_in,
    -.hljs-builtin-name {
    -  color: #000;
    -  text-decoration: underline;
    -}
    -
    -.hljs-meta {
    -  color: #999;
    -  font-weight: bold;
    -}
    -
    -.hljs-deletion {
    -  color: #fff;
    -  background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat;
    -}
    -
    -.hljs-addition {
    -  color: #000;
    -  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/gruvbox-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/gruvbox-dark.css
    deleted file mode 100644
    index f563811a86..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/gruvbox-dark.css
    +++ /dev/null
    @@ -1,108 +0,0 @@
    -/*
    -
    -Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #282828;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #ebdbb2;
    -}
    -
    -/* Gruvbox Red */
    -.hljs-deletion,
    -.hljs-formula,
    -.hljs-keyword,
    -.hljs-link,
    -.hljs-selector-tag {
    -  color: #fb4934;
    -}
    -
    -/* Gruvbox Blue */
    -.hljs-built_in,
    -.hljs-emphasis,
    -.hljs-name,
    -.hljs-quote,
    -.hljs-strong,
    -.hljs-title,
    -.hljs-variable {
    -  color: #83a598;
    -}
    -
    -/* Gruvbox Yellow */
    -.hljs-attr,
    -.hljs-params,
    -.hljs-template-tag,
    -.hljs-type {
    -  color: #fabd2f;
    -}
    -
    -/* Gruvbox Purple */
    -.hljs-builtin-name,
    -.hljs-doctag,
    -.hljs-literal,
    -.hljs-number {
    -  color: #8f3f71;
    -}
    -
    -/* Gruvbox Orange */
    -.hljs-code,
    -.hljs-meta,
    -.hljs-regexp,
    -.hljs-selector-id,
    -.hljs-template-variable {
    -  color: #fe8019;
    -}
    -
    -/* Gruvbox Green */
    -.hljs-addition,
    -.hljs-meta-string,
    -.hljs-section,
    -.hljs-selector-attr,
    -.hljs-selector-class,
    -.hljs-string,
    -.hljs-symbol {
    -  color: #b8bb26;
    -}
    -
    -/* Gruvbox Aqua */
    -.hljs-attribute,
    -.hljs-bullet,
    -.hljs-class,
    -.hljs-function,
    -.hljs-function .hljs-keyword,
    -.hljs-meta-keyword,
    -.hljs-selector-pseudo,
    -.hljs-tag {
    -  color: #8ec07c;
    -}
    -
    -/* Gruvbox Gray */
    -.hljs-comment {
    -  color: #928374;
    -}
    -
    -/* Gruvbox Purple */
    -.hljs-link_label,
    -.hljs-literal,
    -.hljs-number {
    -  color: #d3869b;
    -}
    -
    -.hljs-comment,
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-section,
    -.hljs-strong,
    -.hljs-tag {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/gruvbox-light.css b/doc/slihelp_generator/assets/js/highlight/styles/gruvbox-light.css
    deleted file mode 100644
    index ff45468eb2..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/gruvbox-light.css
    +++ /dev/null
    @@ -1,108 +0,0 @@
    -/*
    -
    -Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #fbf1c7;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #3c3836;
    -}
    -
    -/* Gruvbox Red */
    -.hljs-deletion,
    -.hljs-formula,
    -.hljs-keyword,
    -.hljs-link,
    -.hljs-selector-tag {
    -  color: #9d0006;
    -}
    -
    -/* Gruvbox Blue */
    -.hljs-built_in,
    -.hljs-emphasis,
    -.hljs-name,
    -.hljs-quote,
    -.hljs-strong,
    -.hljs-title,
    -.hljs-variable {
    -  color: #076678;
    -}
    -
    -/* Gruvbox Yellow */
    -.hljs-attr,
    -.hljs-params,
    -.hljs-template-tag,
    -.hljs-type {
    -  color: #b57614;
    -}
    -
    -/* Gruvbox Purple */
    -.hljs-builtin-name,
    -.hljs-doctag,
    -.hljs-literal,
    -.hljs-number {
    -  color: #8f3f71;
    -}
    -
    -/* Gruvbox Orange */
    -.hljs-code,
    -.hljs-meta,
    -.hljs-regexp,
    -.hljs-selector-id,
    -.hljs-template-variable {
    -  color: #af3a03;
    -}
    -
    -/* Gruvbox Green */
    -.hljs-addition,
    -.hljs-meta-string,
    -.hljs-section,
    -.hljs-selector-attr,
    -.hljs-selector-class,
    -.hljs-string,
    -.hljs-symbol {
    -  color: #79740e;
    -}
    -
    -/* Gruvbox Aqua */
    -.hljs-attribute,
    -.hljs-bullet,
    -.hljs-class,
    -.hljs-function,
    -.hljs-function .hljs-keyword,
    -.hljs-meta-keyword,
    -.hljs-selector-pseudo,
    -.hljs-tag {
    -  color: #427b58;
    -}
    -
    -/* Gruvbox Gray */
    -.hljs-comment {
    -  color: #928374;
    -}
    -
    -/* Gruvbox Purple */
    -.hljs-link_label,
    -.hljs-literal,
    -.hljs-number {
    -  color: #8f3f71;
    -}
    -
    -.hljs-comment,
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-section,
    -.hljs-strong,
    -.hljs-tag {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/hopscotch.css b/doc/slihelp_generator/assets/js/highlight/styles/hopscotch.css
    deleted file mode 100644
    index 32e60d230a..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/hopscotch.css
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    - * Hopscotch
    - * by Jan T. Sott
    - * https://github.com/idleberg/Hopscotch
    - *
    - * This work is licensed under the Creative Commons CC0 1.0 Universal License
    - */
    -
    -/* Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #989498;
    -}
    -
    -/* Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-deletion {
    -  color: #dd464c;
    -}
    -
    -/* Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params {
    -  color: #fd8b19;
    -}
    -
    -/* Yellow */
    -.hljs-class .hljs-title {
    -  color: #fdcc59;
    -}
    -
    -/* Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #8fc13e;
    -}
    -
    -/* Aqua */
    -.hljs-meta {
    -  color: #149b93;
    -}
    -
    -/* Blue */
    -.hljs-function,
    -.hljs-section,
    -.hljs-title {
    -  color: #1290bf;
    -}
    -
    -/* Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #c85e7c;
    -}
    -
    -.hljs {
    -  display: block;
    -  background: #322931;
    -  color: #b9b5b8;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/hybrid.css b/doc/slihelp_generator/assets/js/highlight/styles/hybrid.css
    deleted file mode 100644
    index 29735a1890..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/hybrid.css
    +++ /dev/null
    @@ -1,102 +0,0 @@
    -/*
    -
    -vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)
    -
    -*/
    -
    -/*background color*/
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #1d1f21;
    -}
    -
    -/*selection color*/
    -.hljs::selection,
    -.hljs span::selection {
    -  background: #373b41;
    -}
    -
    -.hljs::-moz-selection,
    -.hljs span::-moz-selection {
    -  background: #373b41;
    -}
    -
    -/*foreground color*/
    -.hljs {
    -  color: #c5c8c6;
    -}
    -
    -/*color: fg_yellow*/
    -.hljs-title,
    -.hljs-name {
    -  color: #f0c674;
    -}
    -
    -/*color: fg_comment*/
    -.hljs-comment,
    -.hljs-meta,
    -.hljs-meta .hljs-keyword {
    -  color: #707880;
    -}
    -
    -/*color: fg_red*/
    -.hljs-number,
    -.hljs-symbol,
    -.hljs-literal,
    -.hljs-deletion,
    -.hljs-link {
    - color: #cc6666
    -}
    -
    -/*color: fg_green*/
    -.hljs-string,
    -.hljs-doctag,
    -.hljs-addition,
    -.hljs-regexp,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo {
    -  color: #b5bd68;
    -}
    -
    -/*color: fg_purple*/
    -.hljs-attribute,
    -.hljs-code,
    -.hljs-selector-id {
    - color: #b294bb;
    -}
    -
    -/*color: fg_blue*/
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-bullet,
    -.hljs-tag {
    - color: #81a2be;
    -}
    -
    -/*color: fg_aqua*/
    -.hljs-subst,
    -.hljs-variable,
    -.hljs-template-tag,
    -.hljs-template-variable {
    -  color: #8abeb7;
    -}
    -
    -/*color: fg_orange*/
    -.hljs-type,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-quote,
    -.hljs-section,
    -.hljs-selector-class {
    -  color: #de935f;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/idea.css b/doc/slihelp_generator/assets/js/highlight/styles/idea.css
    deleted file mode 100644
    index 3bf1892bd4..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/idea.css
    +++ /dev/null
    @@ -1,97 +0,0 @@
    -/*
    -
    -Intellij Idea-like styling (c) Vasily Polovnyov <vast@whiteants.net>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  color: #000;
    -  background: #fff;
    -}
    -
    -.hljs-subst,
    -.hljs-title {
    -  font-weight: normal;
    -  color: #000;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #808080;
    -  font-style: italic;
    -}
    -
    -.hljs-meta {
    -  color: #808000;
    -}
    -
    -.hljs-tag {
    -  background: #efefef;
    -}
    -
    -.hljs-section,
    -.hljs-name,
    -.hljs-literal,
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-type,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  font-weight: bold;
    -  color: #000080;
    -}
    -
    -.hljs-attribute,
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-link {
    -  font-weight: bold;
    -  color: #0000ff;
    -}
    -
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-link {
    -  font-weight: normal;
    -}
    -
    -.hljs-string {
    -  color: #008000;
    -  font-weight: bold;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-formula {
    -  color: #000;
    -  background: #d0eded;
    -  font-style: italic;
    -}
    -
    -.hljs-doctag {
    -  text-decoration: underline;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #660e7a;
    -}
    -
    -.hljs-addition {
    -  background: #baeeba;
    -}
    -
    -.hljs-deletion {
    -  background: #ffc8bd;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/ir-black.css b/doc/slihelp_generator/assets/js/highlight/styles/ir-black.css
    deleted file mode 100644
    index bd4c755ed8..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/ir-black.css
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    -  IR_Black style (c) Vasily Mikhailitchenko <vaskas@programica.ru>
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #000;
    -  color: #f8f8f8;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-meta {
    -  color: #7c7c7c;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-tag,
    -.hljs-name {
    -  color: #96cbfe;
    -}
    -
    -.hljs-attribute,
    -.hljs-selector-id {
    -  color: #ffffb6;
    -}
    -
    -.hljs-string,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-addition {
    -  color: #a8ff60;
    -}
    -
    -.hljs-subst {
    -  color: #daefa3;
    -}
    -
    -.hljs-regexp,
    -.hljs-link {
    -  color: #e9c062;
    -}
    -
    -.hljs-title,
    -.hljs-section,
    -.hljs-type,
    -.hljs-doctag {
    -  color: #ffffb6;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-literal {
    -  color: #c6c5fe;
    -}
    -
    -.hljs-number,
    -.hljs-deletion {
    -  color:#ff73fd;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/kimbie.dark.css b/doc/slihelp_generator/assets/js/highlight/styles/kimbie.dark.css
    deleted file mode 100644
    index d139cb5d0c..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/kimbie.dark.css
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -/*
    -    Name:     Kimbie (dark)
    -    Author:   Jan T. Sott
    -    License:  Creative Commons Attribution-ShareAlike 4.0 Unported License
    -    URL:      https://github.com/idleberg/Kimbie-highlight.js
    -*/
    -
    -/* Kimbie Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #d6baad;
    -}
    -
    -/* Kimbie Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-meta {
    -  color: #dc3958;
    -}
    -
    -/* Kimbie Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-deletion,
    -.hljs-link {
    -  color: #f79a32;
    -}
    -
    -/* Kimbie Yellow */
    -.hljs-title,
    -.hljs-section,
    -.hljs-attribute {
    -  color: #f06431;
    -}
    -
    -/* Kimbie Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #889b4a;
    -}
    -
    -/* Kimbie Purple */
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-function {
    -  color: #98676a;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #221a0f;
    -  color: #d3af86;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/kimbie.light.css b/doc/slihelp_generator/assets/js/highlight/styles/kimbie.light.css
    deleted file mode 100644
    index 04ff6ed3a2..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/kimbie.light.css
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -/*
    -    Name:     Kimbie (light)
    -    Author:   Jan T. Sott
    -    License:  Creative Commons Attribution-ShareAlike 4.0 Unported License
    -    URL:      https://github.com/idleberg/Kimbie-highlight.js
    -*/
    -
    -/* Kimbie Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #a57a4c;
    -}
    -
    -/* Kimbie Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-meta {
    -  color: #dc3958;
    -}
    -
    -/* Kimbie Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-deletion,
    -.hljs-link {
    -  color: #f79a32;
    -}
    -
    -/* Kimbie Yellow */
    -.hljs-title,
    -.hljs-section,
    -.hljs-attribute {
    -  color: #f06431;
    -}
    -
    -/* Kimbie Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #889b4a;
    -}
    -
    -/* Kimbie Purple */
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-function {
    -  color: #98676a;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #fbebd4;
    -  color: #84613d;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/magula.css b/doc/slihelp_generator/assets/js/highlight/styles/magula.css
    deleted file mode 100644
    index 44dee5e8e1..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/magula.css
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    -Description: Magula style for highligh.js
    -Author: Ruslan Keba <rukeba@gmail.com>
    -Website: http://rukeba.com/
    -Version: 1.0
    -Date: 2009-01-03
    -Music: Aphex Twin / Xtal
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background-color: #f4f4f4;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: black;
    -}
    -
    -.hljs-string,
    -.hljs-title,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-attribute,
    -.hljs-addition,
    -.hljs-variable,
    -.hljs-template-tag,
    -.hljs-template-variable {
    -  color: #050;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #777;
    -}
    -
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-link {
    -  color: #800;
    -}
    -
    -.hljs-deletion,
    -.hljs-meta {
    -  color: #00e;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-doctag,
    -.hljs-title,
    -.hljs-section,
    -.hljs-built_in,
    -.hljs-tag,
    -.hljs-name {
    -  font-weight: bold;
    -  color: navy;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/mono-blue.css b/doc/slihelp_generator/assets/js/highlight/styles/mono-blue.css
    deleted file mode 100644
    index 884c97c767..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/mono-blue.css
    +++ /dev/null
    @@ -1,59 +0,0 @@
    -/*
    -  Five-color theme from a single blue hue.
    -*/
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #eaeef3;
    -}
    -
    -.hljs {
    -  color: #00193a;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-title,
    -.hljs-section,
    -.hljs-doctag,
    -.hljs-name,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-comment {
    -  color: #738191;
    -}
    -
    -.hljs-string,
    -.hljs-title,
    -.hljs-section,
    -.hljs-built_in,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-addition,
    -.hljs-tag,
    -.hljs-quote,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #0048ab;
    -}
    -
    -.hljs-meta,
    -.hljs-subst,
    -.hljs-symbol,
    -.hljs-regexp,
    -.hljs-attribute,
    -.hljs-deletion,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-link,
    -.hljs-bullet {
    -  color: #4c81c9;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/monokai-sublime.css b/doc/slihelp_generator/assets/js/highlight/styles/monokai-sublime.css
    deleted file mode 100644
    index 2864170daf..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/monokai-sublime.css
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    -
    -Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #23241f;
    -}
    -
    -.hljs,
    -.hljs-tag,
    -.hljs-subst {
    -  color: #f8f8f2;
    -}
    -
    -.hljs-strong,
    -.hljs-emphasis {
    -  color: #a8a8a2;
    -}
    -
    -.hljs-bullet,
    -.hljs-quote,
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-literal,
    -.hljs-link {
    -  color: #ae81ff;
    -}
    -
    -.hljs-code,
    -.hljs-title,
    -.hljs-section,
    -.hljs-selector-class {
    -  color: #a6e22e;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-name,
    -.hljs-attr {
    -  color: #f92672;
    -}
    -
    -.hljs-symbol,
    -.hljs-attribute {
    -  color: #66d9ef;
    -}
    -
    -.hljs-params,
    -.hljs-class .hljs-title {
    -  color: #f8f8f2;
    -}
    -
    -.hljs-string,
    -.hljs-type,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-selector-id,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-addition,
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #e6db74;
    -}
    -
    -.hljs-comment,
    -.hljs-deletion,
    -.hljs-meta {
    -  color: #75715e;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/monokai.css b/doc/slihelp_generator/assets/js/highlight/styles/monokai.css
    deleted file mode 100644
    index 775d53f91a..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/monokai.css
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    -Monokai style - ported by Luigi Maselli - http://grigio.org
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #272822; color: #ddd;
    -}
    -
    -.hljs-tag,
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-strong,
    -.hljs-name {
    -  color: #f92672;
    -}
    -
    -.hljs-code {
    -  color: #66d9ef;
    -}
    -
    -.hljs-class .hljs-title {
    -  color: white;
    -}
    -
    -.hljs-attribute,
    -.hljs-symbol,
    -.hljs-regexp,
    -.hljs-link {
    -  color: #bf79db;
    -}
    -
    -.hljs-string,
    -.hljs-bullet,
    -.hljs-subst,
    -.hljs-title,
    -.hljs-section,
    -.hljs-emphasis,
    -.hljs-type,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-addition,
    -.hljs-variable,
    -.hljs-template-tag,
    -.hljs-template-variable {
    -  color: #a6e22e;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-deletion,
    -.hljs-meta {
    -  color: #75715e;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-doctag,
    -.hljs-title,
    -.hljs-section,
    -.hljs-type,
    -.hljs-selector-id {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/obsidian.css b/doc/slihelp_generator/assets/js/highlight/styles/obsidian.css
    deleted file mode 100644
    index 356630fa23..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/obsidian.css
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/**
    - * Obsidian style
    - * ported by Alexander Marenin (http://github.com/ioncreature)
    - */
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #282b2e;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-selector-id {
    -  color: #93c763;
    -}
    -
    -.hljs-number {
    -  color: #ffcd22;
    -}
    -
    -.hljs {
    -  color: #e0e2e4;
    -}
    -
    -.hljs-attribute {
    -  color: #668bb0;
    -}
    -
    -.hljs-code,
    -.hljs-class .hljs-title,
    -.hljs-section {
    -  color: white;
    -}
    -
    -.hljs-regexp,
    -.hljs-link {
    -  color: #d39745;
    -}
    -
    -.hljs-meta {
    -  color: #557182;
    -}
    -
    -.hljs-tag,
    -.hljs-name,
    -.hljs-bullet,
    -.hljs-subst,
    -.hljs-emphasis,
    -.hljs-type,
    -.hljs-built_in,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-addition,
    -.hljs-variable,
    -.hljs-template-tag,
    -.hljs-template-variable {
    -  color: #8cbbad;
    -}
    -
    -.hljs-string,
    -.hljs-symbol {
    -  color: #ec7600;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-deletion {
    -  color: #818e96;
    -}
    -
    -.hljs-selector-class {
    -  color: #A082BD
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-doctag,
    -.hljs-title,
    -.hljs-section,
    -.hljs-type,
    -.hljs-name,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/ocean.css b/doc/slihelp_generator/assets/js/highlight/styles/ocean.css
    deleted file mode 100644
    index 5901581b40..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/ocean.css
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -/* Ocean Dark Theme */
    -/* https://github.com/gavsiu */
    -/* Original theme - https://github.com/chriskempson/base16 */
    -
    -/* Ocean Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #65737e;
    -}
    -
    -/* Ocean Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-deletion {
    -  color: #bf616a;
    -}
    -
    -/* Ocean Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-meta,
    -.hljs-link {
    -  color: #d08770;
    -}
    -
    -/* Ocean Yellow */
    -.hljs-attribute {
    -  color: #ebcb8b;
    -}
    -
    -/* Ocean Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #a3be8c;
    -}
    -
    -/* Ocean Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #8fa1b3;
    -}
    -
    -/* Ocean Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #b48ead;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #2b303b;
    -  color: #c0c5ce;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/paraiso-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/paraiso-dark.css
    deleted file mode 100644
    index e7292401c6..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/paraiso-dark.css
    +++ /dev/null
    @@ -1,72 +0,0 @@
    -/*
    -    Paraíso (dark)
    -    Created by Jan T. Sott (http://github.com/idleberg)
    -    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
    -*/
    -
    -/* Paraíso Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #8d8687;
    -}
    -
    -/* Paraíso Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-meta {
    -  color: #ef6155;
    -}
    -
    -/* Paraíso Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-deletion {
    -  color: #f99b15;
    -}
    -
    -/* Paraíso Yellow */
    -.hljs-title,
    -.hljs-section,
    -.hljs-attribute {
    -  color: #fec418;
    -}
    -
    -/* Paraíso Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #48b685;
    -}
    -
    -/* Paraíso Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #815ba4;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #2f1e2e;
    -  color: #a39e9b;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/paraiso-light.css b/doc/slihelp_generator/assets/js/highlight/styles/paraiso-light.css
    deleted file mode 100644
    index 944857cd8d..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/paraiso-light.css
    +++ /dev/null
    @@ -1,72 +0,0 @@
    -/*
    -    Paraíso (light)
    -    Created by Jan T. Sott (http://github.com/idleberg)
    -    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
    -*/
    -
    -/* Paraíso Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #776e71;
    -}
    -
    -/* Paraíso Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-link,
    -.hljs-meta {
    -  color: #ef6155;
    -}
    -
    -/* Paraíso Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-deletion {
    -  color: #f99b15;
    -}
    -
    -/* Paraíso Yellow */
    -.hljs-title,
    -.hljs-section,
    -.hljs-attribute {
    -  color: #fec418;
    -}
    -
    -/* Paraíso Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #48b685;
    -}
    -
    -/* Paraíso Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #815ba4;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #e7e9db;
    -  color: #4f424c;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/pojoaque.css b/doc/slihelp_generator/assets/js/highlight/styles/pojoaque.css
    deleted file mode 100644
    index 2e07847b2b..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/pojoaque.css
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    -
    -Pojoaque Style by Jason Tate
    -http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
    -Based on Solarized Style from http://ethanschoonover.com/solarized
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  color: #dccf8f;
    -  background: url(./pojoaque.jpg) repeat scroll left top #181914;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #586e75;
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-addition {
    -  color: #b64926;
    -}
    -
    -.hljs-number,
    -.hljs-string,
    -.hljs-doctag,
    -.hljs-regexp {
    -  color: #468966;
    -}
    -
    -.hljs-title,
    -.hljs-section,
    -.hljs-built_in,
    -.hljs-name {
    -  color: #ffb03b;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-class .hljs-title,
    -.hljs-type,
    -.hljs-tag {
    -  color: #b58900;
    -}
    -
    -.hljs-attribute {
    -  color: #b89859;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-link,
    -.hljs-subst,
    -.hljs-meta {
    -  color: #cb4b16;
    -}
    -
    -.hljs-deletion {
    -  color: #dc322f;
    -}
    -
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #d3a60c;
    -}
    -
    -.hljs-formula {
    -  background: #073642;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/pojoaque.jpg b/doc/slihelp_generator/assets/js/highlight/styles/pojoaque.jpg
    deleted file mode 100644
    index 9c07d4ab40b6d77e90ff69f0012bcd33b21d31c3..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 1186
    zcmZXSe^8Tk9LK-kXFs3)f@f?)Cddzw3v4wdZyXQ;4x3=;Ja*N#%n9ik!UGmt9H3k0
    zJST|5jOc(ID$FQt3C?jQZBws#kXolO1lg9Pba9BB=Q+UEBX!nY@6Uhl&+ofe$Q$y5
    z@ci`~)&qzDP(lO<O#w_=Ra{yPARq$(#Dp~sI5{Qw_V+=FlW<^Y6zm5ml}e>iQ5p?p
    z(`j^e7!yUAVHk%K#^GQXn?s0=VLYCI$HRoe=xCuZ>A6<E5Jc&8l!3As3|1J6!wQRd
    z-V(uI9KaVwV1y!skwSq$AdHNO5ej2s5)+pvCcfxj8FB)Q4jMoM2_^spgCq=wu7Iro
    zLP#9>A3@sxEP#XqNFpIb=0)KQ#Nss_tD17;m4@$JKL;LR|K|QF3f%!L5+s(9Ft8SQ
    zG|~pGp<w4_&QCo@xn1P1M0j6PuuaUUx?w)Q15Ksdv-E1Uyr8jff%m|S;O0KGX4?5u
    zcY>EGFW5Z|OA)-O@mNHy-g@7m8JTf?kl@vUKBGmw)Y*9sDRNr3PN!IKefWaydTe1D
    zjzpyzPnD3}hBNaS4aFX7=0&~I*<I1gl);;MHu4&K1%I;}H}}pdeV}msD&8ZuzDzH<
    zjs%}^eZx9tj&Cj4Rem!m7?W9-;wPH|CTw__Q8b>Hu7#4au@qVBglH#-m;QFOx_`=j
    z{EqRY#Eh*yoWP^pa4H>8GH{rO?!_+xwL0(k4yL^D%^nBkJ*UI;Lx;ped8d|f*S_s@
    z3~ilcRC(&NT#9Gn#UD;o^EYSMXDMf%XcUi3>;WXXD-QX3P9wMy<Tt*(wEUr;=}T08
    zwr4iQLXQt-4U$zHxQBaftQf(Yp<ET%udI>P7eA&RS{)h5{??W3^Rq=goFJ>?lA~J-
    zdYe>!xvYLW*fPT0RK7wsJRg^?x#W1*GP9<C`ZfC?$$I3ZovN#F=y~=x<iwqpGc&Fa
    z!>_f`6t>QD_X>0d!owyN>nO2?U5}|3?hX_UZYT@^>S!9eB~bZ9U`q;`U)@L670o1g
    z`Hd<uZEy9yjY6-c(?%?S4=3`QI_=xfg529VWEEJk$>}h<_WR<Zc1@js5HPhhe{UnV
    z+qpwizwrJv_3wqH(KR=Zp2|HqVCv6SNX`wV`OPQRXJj)}%e$t=$MRdar)ZmEr9R!$
    z<l(H`+bxXKz73<WvNG=#;y(f(W{xUg<V#f`{pr)>vUc|n*%v4Hbb-4tJD40iyF^<n
    zrd(ZUzA$o-V2Gj0TB0p$%WvWRao2gif1>q%g*&!6>hkYDvi-<Lx9G?TP4>{Uc4yTM
    zzcthN4Z{ka!+F_KzYV#yWi;c^X^q6g`pD8cp?$Kl?hCz0s^a|mH%P!CF%*<6k^~i`
    zT5Mi-t5-frUcHkk^Qh}+N)Kz1&Bi95`oNc|quI>tUi~BY>xcF9(%tv2i{G6kE9*q~
    qCoAGl20`)w0rdgp9H%Q=M5|p`hOhFz6$I%Y&ncY8>c?7PXyh+SL&XXJ
    
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/purebasic.css b/doc/slihelp_generator/assets/js/highlight/styles/purebasic.css
    deleted file mode 100644
    index 5ce9b9e071..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/purebasic.css
    +++ /dev/null
    @@ -1,96 +0,0 @@
    -/*
    -
    -PureBASIC native IDE style ( version 1.0 - April 2016 )
    -
    -by Tristano Ajmone <tajmone@gmail.com>
    -
    -Public Domain
    -
    -NOTE_1:	PureBASIC code syntax highlighting only applies the following classes:
    -			.hljs-comment
    -			.hljs-function
    -			.hljs-keywords
    -			.hljs-string
    -			.hljs-symbol
    -
    -		Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style.
    -		If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by
    -		a "--- used for PureBASIC ... ---" comment on same line.
    -
    -NOTE_2:	Color names provided in comments were derived using "Name that Color" online tool:
    -			http://chir.ag/projects/name-that-color
    -*/
    -
    -.hljs { /* Common set of rules required by highlight.js (don'r remove!) */
    -	display: block;
    -	overflow-x: auto;
    -	padding: 0.5em;
    -	background: #FFFFDF; /* Half and Half (approx.) */
    -/* --- Uncomment to add PureBASIC native IDE styled font!
    -	font-family: Consolas;
    -*/
    -}
    -
    -.hljs, /* --- used for PureBASIC base color --- */
    -.hljs-type,  /* --- used for PureBASIC Procedures return type --- */
    -.hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */
    -.hljs-name,
    -.hljs-number,
    -.hljs-attr,
    -.hljs-params,
    -.hljs-subst {
    -	color: #000000; /* Black */
    -}
    -
    -.hljs-comment, /* --- used for PureBASIC Comments --- */
    -.hljs-regexp,
    -.hljs-section,
    -.hljs-selector-pseudo,
    -.hljs-addition {
    -	color: #00AAAA; /* Persian Green (approx.) */
    -}
    -
    -.hljs-title, /* --- used for PureBASIC Procedures Names --- */
    -.hljs-tag,
    -.hljs-variable,
    -.hljs-code  {
    -	color: #006666; /* Blue Stone (approx.) */
    -}
    -
    -.hljs-keyword, /* --- used for PureBASIC Keywords --- */
    -.hljs-class,
    -.hljs-meta-keyword,
    -.hljs-selector-class,
    -.hljs-built_in,
    -.hljs-builtin-name {
    -	color: #006666; /* Blue Stone (approx.) */
    -	font-weight: bold;
    -}
    -
    -.hljs-string, /* --- used for PureBASIC Strings --- */
    -.hljs-selector-attr {
    -	color: #0080FF; /* Azure Radiance (approx.) */
    -}
    -
    -.hljs-symbol, /* --- used for PureBASIC Constants --- */
    -.hljs-link,
    -.hljs-deletion,
    -.hljs-attribute {
    -	color: #924B72; /* Cannon Pink (approx.) */
    -}
    -
    -.hljs-meta,
    -.hljs-literal,
    -.hljs-selector-id {
    -	color: #924B72; /* Cannon Pink (approx.) */
    -	font-weight: bold;
    -}
    -
    -.hljs-strong,
    -.hljs-name {
    -	font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -	font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/qtcreator_dark.css b/doc/slihelp_generator/assets/js/highlight/styles/qtcreator_dark.css
    deleted file mode 100644
    index 7aa56a3655..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/qtcreator_dark.css
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    -
    -Qt Creator dark color scheme
    -
    -*/
    -
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #000000;
    -}
    -
    -.hljs,
    -.hljs-subst,
    -.hljs-tag,
    -.hljs-title {
    -  color: #aaaaaa;
    -}
    -
    -.hljs-strong,
    -.hljs-emphasis {
    -  color: #a8a8a2;
    -}
    -
    -.hljs-bullet,
    -.hljs-quote,
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-literal {
    -  color: #ff55ff;
    -}
    -
    -.hljs-code
    -.hljs-selector-class {
    -  color: #aaaaff;
    -}
    -
    -.hljs-emphasis,
    -.hljs-stronge,
    -.hljs-type {
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-function,
    -.hljs-section,
    -.hljs-symbol,
    -.hljs-name {
    -  color: #ffff55;
    -}
    -
    -.hljs-attribute {
    -  color: #ff5555;
    -}
    -
    -.hljs-variable,
    -.hljs-params,
    -.hljs-class .hljs-title {
    -  color: #8888ff;
    -}
    -
    -.hljs-string,
    -.hljs-selector-id,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-type,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-template-tag,
    -.hljs-template-variable,
    -.hljs-addition,
    -.hljs-link {
    -  color: #ff55ff;
    -}
    -
    -.hljs-comment,
    -.hljs-meta,
    -.hljs-deletion {
    -  color: #55ffff;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/qtcreator_light.css b/doc/slihelp_generator/assets/js/highlight/styles/qtcreator_light.css
    deleted file mode 100644
    index 1efa2c660f..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/qtcreator_light.css
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    -
    -Qt Creator light color scheme
    -
    -*/
    -
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #ffffff;
    -}
    -
    -.hljs,
    -.hljs-subst,
    -.hljs-tag,
    -.hljs-title {
    -  color: #000000;
    -}
    -
    -.hljs-strong,
    -.hljs-emphasis {
    -  color: #000000;
    -}
    -
    -.hljs-bullet,
    -.hljs-quote,
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-literal {
    -  color: #000080;
    -}
    -
    -.hljs-code
    -.hljs-selector-class {
    -  color: #800080;
    -}
    -
    -.hljs-emphasis,
    -.hljs-stronge,
    -.hljs-type {
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-function,
    -.hljs-section,
    -.hljs-symbol,
    -.hljs-name {
    -  color: #808000;
    -}
    -
    -.hljs-attribute {
    -  color: #800000;
    -}
    -
    -.hljs-variable,
    -.hljs-params,
    -.hljs-class .hljs-title {
    -  color: #0055AF;
    -}
    -
    -.hljs-string,
    -.hljs-selector-id,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-type,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-template-tag,
    -.hljs-template-variable,
    -.hljs-addition,
    -.hljs-link {
    -  color: #008000;
    -}
    -
    -.hljs-comment,
    -.hljs-meta,
    -.hljs-deletion {
    -  color: #008000;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/railscasts.css b/doc/slihelp_generator/assets/js/highlight/styles/railscasts.css
    deleted file mode 100644
    index 008cdc5bf1..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/railscasts.css
    +++ /dev/null
    @@ -1,106 +0,0 @@
    -/*
    -
    -Railscasts-like style (c) Visoft, Inc. (Damien White)
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #232323;
    -  color: #e6e1dc;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #bc9458;
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #c26230;
    -}
    -
    -.hljs-string,
    -.hljs-number,
    -.hljs-regexp,
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #a5c261;
    -}
    -
    -.hljs-subst {
    -  color: #519f50;
    -}
    -
    -.hljs-tag,
    -.hljs-name {
    -  color: #e8bf6a;
    -}
    -
    -.hljs-type {
    -  color: #da4939;
    -}
    -
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-attr,
    -.hljs-link {
    -  color: #6d9cbe;
    -}
    -
    -.hljs-params {
    -  color: #d0d0ff;
    -}
    -
    -.hljs-attribute {
    -  color: #cda869;
    -}
    -
    -.hljs-meta {
    -  color: #9b859d;
    -}
    -
    -.hljs-title,
    -.hljs-section {
    -  color: #ffc66d;
    -}
    -
    -.hljs-addition {
    -  background-color: #144212;
    -  color: #e6e1dc;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #600;
    -  color: #e6e1dc;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-selector-class {
    -  color: #9b703f;
    -}
    -
    -.hljs-selector-id {
    -  color: #8b98ab;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-link {
    -  text-decoration: underline;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/rainbow.css b/doc/slihelp_generator/assets/js/highlight/styles/rainbow.css
    deleted file mode 100644
    index 905eb8ef18..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/rainbow.css
    +++ /dev/null
    @@ -1,85 +0,0 @@
    -/*
    -
    -Style with support for rainbow parens
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #474949;
    -  color: #d1d9e1;
    -}
    -
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #969896;
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-addition {
    -  color: #cc99cc;
    -}
    -
    -.hljs-number,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo {
    -  color: #f99157;
    -}
    -
    -.hljs-string,
    -.hljs-doctag,
    -.hljs-regexp {
    -  color: #8abeb7;
    -}
    -
    -.hljs-title,
    -.hljs-name,
    -.hljs-section,
    -.hljs-built_in {
    -  color: #b5bd68;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-selector-id,
    -.hljs-class .hljs-title {
    -   color: #ffcc66;
    -}
    -
    -.hljs-section,
    -.hljs-name,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-subst,
    -.hljs-meta,
    -.hljs-link {
    -  color: #f99157;
    -}
    -
    -.hljs-deletion {
    -  color: #dc322f;
    -}
    -
    -.hljs-formula {
    -  background: #eee8d5;
    -}
    -
    -.hljs-attr,
    -.hljs-attribute {
    -  color: #81a2be;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/routeros.css b/doc/slihelp_generator/assets/js/highlight/styles/routeros.css
    deleted file mode 100644
    index ebe23990da..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/routeros.css
    +++ /dev/null
    @@ -1,108 +0,0 @@
    -/*
    -
    - highlight.js style for Microtik RouterOS script
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #F0F0F0;
    -}
    -
    -/* Base color: saturation 0; */
    -
    -.hljs,
    -.hljs-subst {
    -  color: #444;
    -}
    -
    -.hljs-comment {
    -  color: #888888;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-meta-keyword,
    -.hljs-doctag,
    -.hljs-name {
    -  font-weight: bold;
    -}
    -
    -.hljs-attribute {
    -  color: #0E9A00;
    -}    
    -
    -.hljs-function {
    -  color: #99069A;
    -}
    -
    -.hljs-builtin-name {
    -  color: #99069A;
    -}
    -
    -/* User color: hue: 0 */
    -
    -.hljs-type,
    -.hljs-string,
    -.hljs-number,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-quote,
    -.hljs-template-tag,
    -.hljs-deletion {
    -  color: #880000;
    -}
    -
    -.hljs-title,
    -.hljs-section {
    -  color: #880000;
    -  font-weight: bold;
    -}
    -
    -.hljs-regexp,
    -.hljs-symbol,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-link,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo {
    -  color: #BC6060;
    -}
    -
    -
    -/* Language color: hue: 90; */
    -
    -.hljs-literal {
    -  color: #78A960;
    -}
    -
    -.hljs-built_in,
    -.hljs-bullet,
    -.hljs-code,
    -.hljs-addition {
    -  color: #0C9A9A;
    -}
    -
    -
    -/* Meta color: hue: 200 */
    -
    -.hljs-meta {
    -  color: #1f7199;
    -}
    -
    -.hljs-meta-string {
    -  color: #4d99bf;
    -}
    -
    -
    -/* Misc effects */
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/school-book.css b/doc/slihelp_generator/assets/js/highlight/styles/school-book.css
    deleted file mode 100644
    index 964b51d841..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/school-book.css
    +++ /dev/null
    @@ -1,72 +0,0 @@
    -/*
    -
    -School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 15px 0.5em 0.5em 30px;
    -  font-size: 11px;
    -  line-height:16px;
    -}
    -
    -pre{
    -  background:#f6f6ae url(./school-book.png);
    -  border-top: solid 2px #d2e8b9;
    -  border-bottom: solid 1px #d2e8b9;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal {
    -  color:#005599;
    -  font-weight:bold;
    -}
    -
    -.hljs,
    -.hljs-subst {
    -  color: #3e5915;
    -}
    -
    -.hljs-string,
    -.hljs-title,
    -.hljs-section,
    -.hljs-type,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-attribute,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-addition,
    -.hljs-variable,
    -.hljs-template-tag,
    -.hljs-template-variable,
    -.hljs-link {
    -  color: #2c009f;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-deletion,
    -.hljs-meta {
    -  color: #e60415;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal,
    -.hljs-doctag,
    -.hljs-title,
    -.hljs-section,
    -.hljs-type,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/school-book.png b/doc/slihelp_generator/assets/js/highlight/styles/school-book.png
    deleted file mode 100644
    index 956e9790a0e2c079b3d568348ff3accd1d9cac30..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 486
    zcmeAS@N?(olHy`uVBq!ia0y~yV7?7x3vjRjNjAS6Ga$v1?&#~tz_9*=IcwKTAYZb?
    zHKHUqKdq!Zu_%?nF(p4KRlzeiF+DXXH8G{K@MNkD0|R4)r;B4q#jQ7Ycl#YS5MfK$
    z?b^fh#qmaEhFDxvyThwfhdfkOPApt1lr{NA;Vr%uzxJuVIyzm(ed_<E=VqS`p8l-k
    zMtpHz{$@YRySeLE*Ya}$?Ok`{te)BVtcjm@Ca0ycGcY`ur8@;E%+QhxBm}lGGB7yY
    z0680(Z#S8FKUh{@M?@OPNCXi`Y7>8_-0$LLU})H&o5Re&aDemE>EG#(|F^t9_pa-H
    z_Mf?rMVrs}-M?S|?ZdY@c6s41zy8~}@a{v&#Ea7V)wJ$+#K|u$<a;jco6PrHvRYR7
    zd%!Bk+<CfxufI!;xGfPoxmaf1$vs==)R}qJUdyr#eg1fxWvS-#bL&}n`+t3#d9p8N
    z!?kDKTLZga?|R;GcVE5XB+g&IH(a^x?fZ81;t8fvzjU{H8y{PLR#EDh##{B^#6KJN
    zOib&U@Ahrg;rF_q!%YQaoy1Q|n*P>5UvWCdFLwGac}6w{_s*=8A6L7Rfc|9gboFyt
    I=akR{0OLZ+qyPW_
    
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/solarized-dark.css b/doc/slihelp_generator/assets/js/highlight/styles/solarized-dark.css
    deleted file mode 100644
    index b4c0da1f78..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/solarized-dark.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/*
    -
    -Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #002b36;
    -  color: #839496;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #586e75;
    -}
    -
    -/* Solarized Green */
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-addition {
    -  color: #859900;
    -}
    -
    -/* Solarized Cyan */
    -.hljs-number,
    -.hljs-string,
    -.hljs-meta .hljs-meta-string,
    -.hljs-literal,
    -.hljs-doctag,
    -.hljs-regexp {
    -  color: #2aa198;
    -}
    -
    -/* Solarized Blue */
    -.hljs-title,
    -.hljs-section,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #268bd2;
    -}
    -
    -/* Solarized Yellow */
    -.hljs-attribute,
    -.hljs-attr,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-class .hljs-title,
    -.hljs-type {
    -  color: #b58900;
    -}
    -
    -/* Solarized Orange */
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-subst,
    -.hljs-meta,
    -.hljs-meta .hljs-keyword,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-link {
    -  color: #cb4b16;
    -}
    -
    -/* Solarized Red */
    -.hljs-built_in,
    -.hljs-deletion {
    -  color: #dc322f;
    -}
    -
    -.hljs-formula {
    -  background: #073642;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/solarized-light.css b/doc/slihelp_generator/assets/js/highlight/styles/solarized-light.css
    deleted file mode 100644
    index fdcfcc72c4..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/solarized-light.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/*
    -
    -Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #fdf6e3;
    -  color: #657b83;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #93a1a1;
    -}
    -
    -/* Solarized Green */
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-addition {
    -  color: #859900;
    -}
    -
    -/* Solarized Cyan */
    -.hljs-number,
    -.hljs-string,
    -.hljs-meta .hljs-meta-string,
    -.hljs-literal,
    -.hljs-doctag,
    -.hljs-regexp {
    -  color: #2aa198;
    -}
    -
    -/* Solarized Blue */
    -.hljs-title,
    -.hljs-section,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #268bd2;
    -}
    -
    -/* Solarized Yellow */
    -.hljs-attribute,
    -.hljs-attr,
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-class .hljs-title,
    -.hljs-type {
    -  color: #b58900;
    -}
    -
    -/* Solarized Orange */
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-subst,
    -.hljs-meta,
    -.hljs-meta .hljs-keyword,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-link {
    -  color: #cb4b16;
    -}
    -
    -/* Solarized Red */
    -.hljs-built_in,
    -.hljs-deletion {
    -  color: #dc322f;
    -}
    -
    -.hljs-formula {
    -  background: #eee8d5;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/sunburst.css b/doc/slihelp_generator/assets/js/highlight/styles/sunburst.css
    deleted file mode 100644
    index f56dd5e9b6..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/sunburst.css
    +++ /dev/null
    @@ -1,102 +0,0 @@
    -/*
    -
    -Sunburst-like style (c) Vasily Polovnyov <vast@whiteants.net>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #000;
    -  color: #f8f8f8;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #aeaeae;
    -  font-style: italic;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-type {
    -  color: #e28964;
    -}
    -
    -.hljs-string {
    -  color: #65b042;
    -}
    -
    -.hljs-subst {
    -  color: #daefa3;
    -}
    -
    -.hljs-regexp,
    -.hljs-link {
    -  color: #e9c062;
    -}
    -
    -.hljs-title,
    -.hljs-section,
    -.hljs-tag,
    -.hljs-name {
    -  color: #89bdff;
    -}
    -
    -.hljs-class .hljs-title,
    -.hljs-doctag {
    -  text-decoration: underline;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-number {
    -  color: #3387cc;
    -}
    -
    -.hljs-params,
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #3e87e3;
    -}
    -
    -.hljs-attribute {
    -  color: #cda869;
    -}
    -
    -.hljs-meta {
    -  color: #8996a8;
    -}
    -
    -.hljs-formula {
    -  background-color: #0e2231;
    -  color: #f8f8f8;
    -  font-style: italic;
    -}
    -
    -.hljs-addition {
    -  background-color: #253b22;
    -  color: #f8f8f8;
    -}
    -
    -.hljs-deletion {
    -  background-color: #420e09;
    -  color: #f8f8f8;
    -}
    -
    -.hljs-selector-class {
    -  color: #9b703f;
    -}
    -
    -.hljs-selector-id {
    -  color: #8b98ab;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-blue.css b/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-blue.css
    deleted file mode 100644
    index 78e59cc8cb..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-blue.css
    +++ /dev/null
    @@ -1,75 +0,0 @@
    -/* Tomorrow Night Blue Theme */
    -/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
    -/* Original theme - https://github.com/chriskempson/tomorrow-theme */
    -/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
    -
    -/* Tomorrow Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #7285b7;
    -}
    -
    -/* Tomorrow Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-deletion {
    -  color: #ff9da4;
    -}
    -
    -/* Tomorrow Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-meta,
    -.hljs-link {
    -  color: #ffc58f;
    -}
    -
    -/* Tomorrow Yellow */
    -.hljs-attribute {
    -  color: #ffeead;
    -}
    -
    -/* Tomorrow Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #d1f1a9;
    -}
    -
    -/* Tomorrow Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #bbdaff;
    -}
    -
    -/* Tomorrow Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #ebbbff;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #002451;
    -  color: white;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-bright.css b/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-bright.css
    deleted file mode 100644
    index e05af8ae24..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-bright.css
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -/* Tomorrow Night Bright Theme */
    -/* Original theme - https://github.com/chriskempson/tomorrow-theme */
    -/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
    -
    -/* Tomorrow Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #969896;
    -}
    -
    -/* Tomorrow Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-deletion {
    -  color: #d54e53;
    -}
    -
    -/* Tomorrow Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-meta,
    -.hljs-link {
    -  color: #e78c45;
    -}
    -
    -/* Tomorrow Yellow */
    -.hljs-attribute {
    -  color: #e7c547;
    -}
    -
    -/* Tomorrow Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #b9ca4a;
    -}
    -
    -/* Tomorrow Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #7aa6da;
    -}
    -
    -/* Tomorrow Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #c397d8;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: black;
    -  color: #eaeaea;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-eighties.css b/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-eighties.css
    deleted file mode 100644
    index 08fd51c742..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night-eighties.css
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -/* Tomorrow Night Eighties Theme */
    -/* Original theme - https://github.com/chriskempson/tomorrow-theme */
    -/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
    -
    -/* Tomorrow Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #999999;
    -}
    -
    -/* Tomorrow Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-deletion {
    -  color: #f2777a;
    -}
    -
    -/* Tomorrow Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-meta,
    -.hljs-link {
    -  color: #f99157;
    -}
    -
    -/* Tomorrow Yellow */
    -.hljs-attribute {
    -  color: #ffcc66;
    -}
    -
    -/* Tomorrow Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #99cc99;
    -}
    -
    -/* Tomorrow Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #6699cc;
    -}
    -
    -/* Tomorrow Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #cc99cc;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #2d2d2d;
    -  color: #cccccc;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night.css b/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night.css
    deleted file mode 100644
    index ddd270a4e7..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow-night.css
    +++ /dev/null
    @@ -1,75 +0,0 @@
    -/* Tomorrow Night Theme */
    -/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
    -/* Original theme - https://github.com/chriskempson/tomorrow-theme */
    -/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
    -
    -/* Tomorrow Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #969896;
    -}
    -
    -/* Tomorrow Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-deletion {
    -  color: #cc6666;
    -}
    -
    -/* Tomorrow Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-meta,
    -.hljs-link {
    -  color: #de935f;
    -}
    -
    -/* Tomorrow Yellow */
    -.hljs-attribute {
    -  color: #f0c674;
    -}
    -
    -/* Tomorrow Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #b5bd68;
    -}
    -
    -/* Tomorrow Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #81a2be;
    -}
    -
    -/* Tomorrow Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #b294bb;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: #1d1f21;
    -  color: #c5c8c6;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow.css b/doc/slihelp_generator/assets/js/highlight/styles/tomorrow.css
    deleted file mode 100644
    index 026a62fe3b..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/tomorrow.css
    +++ /dev/null
    @@ -1,72 +0,0 @@
    -/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
    -
    -/* Tomorrow Comment */
    -.hljs-comment,
    -.hljs-quote {
    -  color: #8e908c;
    -}
    -
    -/* Tomorrow Red */
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-tag,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-regexp,
    -.hljs-deletion {
    -  color: #c82829;
    -}
    -
    -/* Tomorrow Orange */
    -.hljs-number,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-literal,
    -.hljs-type,
    -.hljs-params,
    -.hljs-meta,
    -.hljs-link {
    -  color: #f5871f;
    -}
    -
    -/* Tomorrow Yellow */
    -.hljs-attribute {
    -  color: #eab700;
    -}
    -
    -/* Tomorrow Green */
    -.hljs-string,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-addition {
    -  color: #718c00;
    -}
    -
    -/* Tomorrow Blue */
    -.hljs-title,
    -.hljs-section {
    -  color: #4271ae;
    -}
    -
    -/* Tomorrow Purple */
    -.hljs-keyword,
    -.hljs-selector-tag {
    -  color: #8959a8;
    -}
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  background: white;
    -  color: #4d4d4c;
    -  padding: 0.5em;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/vs.css b/doc/slihelp_generator/assets/js/highlight/styles/vs.css
    deleted file mode 100644
    index c5d07d3115..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/vs.css
    +++ /dev/null
    @@ -1,68 +0,0 @@
    -/*
    -
    -Visual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name>
    -
    -*/
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: white;
    -  color: black;
    -}
    -
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-variable {
    -  color: #008000;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-built_in,
    -.hljs-name,
    -.hljs-tag {
    -  color: #00f;
    -}
    -
    -.hljs-string,
    -.hljs-title,
    -.hljs-section,
    -.hljs-attribute,
    -.hljs-literal,
    -.hljs-template-tag,
    -.hljs-template-variable,
    -.hljs-type,
    -.hljs-addition {
    -  color: #a31515;
    -}
    -
    -.hljs-deletion,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo,
    -.hljs-meta {
    -  color: #2b91af;
    -}
    -
    -.hljs-doctag {
    -  color: #808080;
    -}
    -
    -.hljs-attr {
    -  color: #f00;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-link {
    -  color: #00b0e8;
    -}
    -
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/vs2015.css b/doc/slihelp_generator/assets/js/highlight/styles/vs2015.css
    deleted file mode 100644
    index d1d9be3caa..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/vs2015.css
    +++ /dev/null
    @@ -1,115 +0,0 @@
    -/*
    - * Visual Studio 2015 dark style
    - * Author: Nicolas LLOBERA <nllobera@gmail.com>
    - */
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #1E1E1E;
    -  color: #DCDCDC;
    -}
    -
    -.hljs-keyword,
    -.hljs-literal,
    -.hljs-symbol,
    -.hljs-name {
    -  color: #569CD6;
    -}
    -.hljs-link {
    -  color: #569CD6;
    -  text-decoration: underline;
    -}
    -
    -.hljs-built_in,
    -.hljs-type {
    -  color: #4EC9B0;
    -}
    -
    -.hljs-number,
    -.hljs-class {
    -  color: #B8D7A3;
    -}
    -
    -.hljs-string,
    -.hljs-meta-string {
    -  color: #D69D85;
    -}
    -
    -.hljs-regexp,
    -.hljs-template-tag {
    -  color: #9A5334;
    -}
    -
    -.hljs-subst,
    -.hljs-function,
    -.hljs-title,
    -.hljs-params,
    -.hljs-formula {
    -  color: #DCDCDC;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #57A64A;
    -  font-style: italic;
    -}
    -
    -.hljs-doctag {
    -  color: #608B4E;
    -}
    -
    -.hljs-meta,
    -.hljs-meta-keyword,
    -.hljs-tag {
    -  color: #9B9B9B;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #BD63C5;
    -}
    -
    -.hljs-attr,
    -.hljs-attribute,
    -.hljs-builtin-name {
    -  color: #9CDCFE;
    -}
    -
    -.hljs-section {
    -  color: gold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -/*.hljs-code {
    -  font-family:'Monospace';
    -}*/
    -
    -.hljs-bullet,
    -.hljs-selector-tag,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-selector-attr,
    -.hljs-selector-pseudo {
    -  color: #D7BA7D;
    -}
    -
    -.hljs-addition {
    -  background-color: #144212;
    -  display: inline-block;
    -  width: 100%;
    -}
    -
    -.hljs-deletion {
    -  background-color: #600;
    -  display: inline-block;
    -  width: 100%;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/xcode.css b/doc/slihelp_generator/assets/js/highlight/styles/xcode.css
    deleted file mode 100644
    index 43dddad84d..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/xcode.css
    +++ /dev/null
    @@ -1,93 +0,0 @@
    -/*
    -
    -XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #fff;
    -  color: black;
    -}
    -
    -.hljs-comment,
    -.hljs-quote {
    -  color: #006a00;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-literal {
    -  color: #aa0d91;
    -}
    -
    -.hljs-name {
    -  color: #008;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable {
    -  color: #660;
    -}
    -
    -.hljs-string {
    -  color: #c41a16;
    -}
    -
    -.hljs-regexp,
    -.hljs-link {
    -  color: #080;
    -}
    -
    -.hljs-title,
    -.hljs-tag,
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-number,
    -.hljs-meta {
    -  color: #1c00cf;
    -}
    -
    -.hljs-section,
    -.hljs-class .hljs-title,
    -.hljs-type,
    -.hljs-attr,
    -.hljs-built_in,
    -.hljs-builtin-name,
    -.hljs-params {
    -  color: #5c2699;
    -}
    -
    -.hljs-attribute,
    -.hljs-subst {
    -  color: #000;
    -}
    -
    -.hljs-formula {
    -  background-color: #eee;
    -  font-style: italic;
    -}
    -
    -.hljs-addition {
    -  background-color: #baeeba;
    -}
    -
    -.hljs-deletion {
    -  background-color: #ffc8bd;
    -}
    -
    -.hljs-selector-id,
    -.hljs-selector-class {
    -  color: #9b703f;
    -}
    -
    -.hljs-doctag,
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/xt256.css b/doc/slihelp_generator/assets/js/highlight/styles/xt256.css
    deleted file mode 100644
    index 58df82cb75..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/xt256.css
    +++ /dev/null
    @@ -1,92 +0,0 @@
    -
    -/*
    -  xt256.css
    -
    -  Contact: initbar [at] protonmail [dot] ch
    -         : github.com/initbar
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  color: #eaeaea;
    -  background: #000;
    -  padding: 0.5;
    -}
    -
    -.hljs-subst {
    -  color: #eaeaea;
    -}
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    -
    -.hljs-builtin-name,
    -.hljs-type {
    -  color: #eaeaea;
    -}
    -
    -.hljs-params {
    -  color: #da0000;
    -}
    -
    -.hljs-literal,
    -.hljs-number,
    -.hljs-name {
    -  color: #ff0000;
    -  font-weight: bolder;
    -}
    -
    -.hljs-comment {
    -  color: #969896;
    -}
    -
    -.hljs-selector-id,
    -.hljs-quote {
    -  color: #00ffff;
    -}
    -
    -.hljs-template-variable,
    -.hljs-variable,
    -.hljs-title {
    -  color: #00ffff;
    -  font-weight: bold;
    -}
    -
    -.hljs-selector-class,
    -.hljs-keyword,
    -.hljs-symbol {
    -  color: #fff000;
    -}
    -
    -.hljs-string,
    -.hljs-bullet {
    -  color: #00ff00;
    -}
    -
    -.hljs-tag,
    -.hljs-section {
    -  color: #000fff;
    -}
    -
    -.hljs-selector-tag {
    -  color: #000fff;
    -  font-weight: bold;
    -}
    -
    -.hljs-attribute,
    -.hljs-built_in,
    -.hljs-regexp,
    -.hljs-link {
    -  color: #ff00ff;
    -}
    -
    -.hljs-meta {
    -  color: #fff;
    -  font-weight: bolder;
    -}
    diff --git a/doc/slihelp_generator/assets/js/highlight/styles/zenburn.css b/doc/slihelp_generator/assets/js/highlight/styles/zenburn.css
    deleted file mode 100644
    index 07be502016..0000000000
    --- a/doc/slihelp_generator/assets/js/highlight/styles/zenburn.css
    +++ /dev/null
    @@ -1,80 +0,0 @@
    -/*
    -
    -Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
    -based on dark.css by Ivan Sagalaev
    -
    -*/
    -
    -.hljs {
    -  display: block;
    -  overflow-x: auto;
    -  padding: 0.5em;
    -  background: #3f3f3f;
    -  color: #dcdcdc;
    -}
    -
    -.hljs-keyword,
    -.hljs-selector-tag,
    -.hljs-tag {
    -  color: #e3ceab;
    -}
    -
    -.hljs-template-tag {
    -  color: #dcdcdc;
    -}
    -
    -.hljs-number {
    -  color: #8cd0d3;
    -}
    -
    -.hljs-variable,
    -.hljs-template-variable,
    -.hljs-attribute {
    -  color: #efdcbc;
    -}
    -
    -.hljs-literal {
    -  color: #efefaf;
    -}
    -
    -.hljs-subst {
    -  color: #8f8f8f;
    -}
    -
    -.hljs-title,
    -.hljs-name,
    -.hljs-selector-id,
    -.hljs-selector-class,
    -.hljs-section,
    -.hljs-type {
    -  color: #efef8f;
    -}
    -
    -.hljs-symbol,
    -.hljs-bullet,
    -.hljs-link {
    -  color: #dca3a3;
    -}
    -
    -.hljs-deletion,
    -.hljs-string,
    -.hljs-built_in,
    -.hljs-builtin-name {
    -  color: #cc9393;
    -}
    -
    -.hljs-addition,
    -.hljs-comment,
    -.hljs-quote,
    -.hljs-meta {
    -  color: #7f9f7f;
    -}
    -
    -
    -.hljs-emphasis {
    -  font-style: italic;
    -}
    -
    -.hljs-strong {
    -  font-weight: bold;
    -}
    diff --git a/doc/slihelp_generator/assets/js/html5shiv.min.js b/doc/slihelp_generator/assets/js/html5shiv.min.js
    deleted file mode 100644
    index 355afd1060..0000000000
    --- a/doc/slihelp_generator/assets/js/html5shiv.min.js
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -/**
    -* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
    -*/
    -!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/assets/js/jquery-3.1.1.min.js b/doc/slihelp_generator/assets/js/jquery-3.1.1.min.js
    deleted file mode 100644
    index 4c5be4c0fb..0000000000
    --- a/doc/slihelp_generator/assets/js/jquery-3.1.1.min.js
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */
    -!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),
    -a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:X.test(a)?JSON.parse(a):a)}function $(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=Z(c)}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),$(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=$(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var _=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,aa=new RegExp("^(?:([+-])=|)("+_+")([a-z%]*)$","i"),ba=["Top","Right","Bottom","Left"],ca=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function ea(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&aa.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var fa={};function ga(a){var b,c=a.ownerDocument,d=a.nodeName,e=fa[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),fa[d]=e,e)}function ha(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ca(d)&&(e[f]=ga(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ha(this,!0)},hide:function(){return ha(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ca(this)?r(this).show():r(this).hide()})}});var ia=/^(?:checkbox|radio)$/i,ja=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c<d;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var oa=/<|&#?\w+;/;function pa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(oa.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ja.exec(f)||["",""])[1].toLowerCase(),i=la[h]||la._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g,h=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&!("click"===a.type&&a.button>=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c<i;c++)d=b[c],e=d.selector+" ",void 0===g[e]&&(g[e]=d.needsContext?r(e,this).index(j)>-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i<b.length&&h.push({elem:j,handlers:b.slice(i)}),h},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==wa()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===wa()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r.nodeName(this,"input"))return this.click(),!1},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ua:va,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:va,isPropagationStopped:va,isImmediatePropagationStopped:va,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ua,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ua,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ua,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&ra.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&sa.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return xa(this,a,b,c,d)},one:function(a,b,c,d){return xa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=va),this.each(function(){r.event.remove(this,a,c,b)})}});var ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/<script|<style|<link/i,Aa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ba=/^true\/(.*)/,Ca=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ha(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ia.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ia(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,ma(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Fa),l=0;l<i;l++)j=h[l],ka.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ca,""),k))}return a}function Ja(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(ma(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&na(ma(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(ya,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d<e;d++)Ha(f[d],g[d]);if(b)if(c)for(f=f||ma(a),g=g||ma(h),d=0,e=f.length;d<e;d++)Ga(f[d],g[d]);else Ga(a,h);return g=ma(h,"script"),g.length>0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(ma(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ia(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(ma(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ka=/^margin/,La=new RegExp("^("+_+")(?!px)[a-z%]+$","i"),Ma=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",qa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,qa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Na(a,b,c){var d,e,f,g,h=a.style;return c=c||Ma(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&La.test(g)&&Ka.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Oa(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Pa=/^(none|table(?!-c[ea]).+)/,Qa={position:"absolute",visibility:"hidden",display:"block"},Ra={letterSpacing:"0",fontWeight:"400"},Sa=["Webkit","Moz","ms"],Ta=d.createElement("div").style;function Ua(a){if(a in Ta)return a;var b=a[0].toUpperCase()+a.slice(1),c=Sa.length;while(c--)if(a=Sa[c]+b,a in Ta)return a}function Va(a,b,c){var d=aa.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Wa(a,b,c,d,e){var f,g=0;for(f=c===(d?"border":"content")?4:"width"===b?1:0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+ba[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+ba[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+ba[f]+"Width",!0,e))):(g+=r.css(a,"padding"+ba[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+ba[f]+"Width",!0,e)));return g}function Xa(a,b,c){var d,e=!0,f=Ma(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),d<=0||null==d){if(d=Na(a,b,f),(d<0||null==d)&&(d=a.style[b]),La.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Wa(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Na(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ua(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=aa.exec(c))&&e[1]&&(c=ea(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ua(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Na(a,b,d)),"normal"===e&&b in Ra&&(e=Ra[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Pa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Xa(a,b,d):da(a,Qa,function(){return Xa(a,b,d)})},set:function(a,c,d){var e,f=d&&Ma(a),g=d&&Wa(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=aa.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Va(a,c,g)}}}),r.cssHooks.marginLeft=Oa(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Na(a,"marginLeft"))||a.getBoundingClientRect().left-da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+ba[d]+b]=f[d]||f[d-2]||f[0];return e}},Ka.test(a)||(r.cssHooks[a+b].set=Va)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=Ma(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function fb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ca(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],_a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ha([a],!0),j=a.style.display||j,k=r.css(a,"display"),ha([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ha([a],!0),m.done(function(){p||ha([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=eb(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function gb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function hb(a,b,c){var d,e,f=0,g=hb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Za||cb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Za||cb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(gb(k,j.opts.specialEasing);f<g;f++)if(d=hb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,eb,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(hb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return ea(c.elem,a,aa.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;d<e;d++)c=a[d],hb.tweeners[c]=hb.tweeners[c]||[],hb.tweeners[c].unshift(b)},prefilters:[fb],prefilter:function(a,b){b?hb.prefilters.unshift(a):hb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:"number"!=typeof e.duration&&(e.duration in r.fx.speeds?e.duration=r.fx.speeds[e.duration]:e.duration=r.fx.speeds._default),null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ca).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=hb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&ab.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(db(b,!0),a,d,e)}}),r.each({slideDown:db("show"),slideUp:db("hide"),slideToggle:db("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Za=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Za=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){$a||($a=a.requestAnimationFrame?a.requestAnimationFrame(bb):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame($a):a.clearInterval($a),$a=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var ib,jb=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)),
    -void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=pa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=mb(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||qa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){var f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Oa(o.pixelPosition,function(a,c){if(c)return c=Na(a,b),La.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r});
    diff --git a/doc/slihelp_generator/assets/js/jquery-migrate-3.0.0.js b/doc/slihelp_generator/assets/js/jquery-migrate-3.0.0.js
    deleted file mode 100644
    index 05b1a803c2..0000000000
    --- a/doc/slihelp_generator/assets/js/jquery-migrate-3.0.0.js
    +++ /dev/null
    @@ -1,540 +0,0 @@
    -/*!
    - * jQuery Migrate - v3.0.0 - 2016-06-09
    - * Copyright jQuery Foundation and other contributors
    - */
    -(function( jQuery, window ) {
    -"use strict";
    -
    -
    -jQuery.migrateVersion = "3.0.0";
    -
    -
    -( function() {
    -
    -	// Support: IE9 only
    -	// IE9 only creates console object when dev tools are first opened
    -	// Also, avoid Function#bind here to simplify PhantomJS usage
    -	var log = window.console && window.console.log &&
    -			function() { window.console.log.apply( window.console, arguments ); },
    -		rbadVersions = /^[12]\./;
    -
    -	if ( !log ) {
    -		return;
    -	}
    -
    -	// Need jQuery 3.0.0+ and no older Migrate loaded
    -	if ( !jQuery || rbadVersions.test( jQuery.fn.jquery ) ) {
    -		log( "JQMIGRATE: jQuery 3.0.0+ REQUIRED" );
    -	}
    -	if ( jQuery.migrateWarnings ) {
    -		log( "JQMIGRATE: Migrate plugin loaded multiple times" );
    -	}
    -
    -	// Show a message on the console so devs know we're active
    -	log( "JQMIGRATE: Migrate is installed" +
    -		( jQuery.migrateMute ? "" : " with logging active" ) +
    -		", version " + jQuery.migrateVersion );
    -
    -} )();
    -
    -var warnedAbout = {};
    -
    -// List of warnings already given; public read only
    -jQuery.migrateWarnings = [];
    -
    -// Set to false to disable traces that appear with warnings
    -if ( jQuery.migrateTrace === undefined ) {
    -	jQuery.migrateTrace = true;
    -}
    -
    -// Forget any warnings we've already given; public
    -jQuery.migrateReset = function() {
    -	warnedAbout = {};
    -	jQuery.migrateWarnings.length = 0;
    -};
    -
    -function migrateWarn( msg ) {
    -	var console = window.console;
    -	if ( !warnedAbout[ msg ] ) {
    -		warnedAbout[ msg ] = true;
    -		jQuery.migrateWarnings.push( msg );
    -		if ( console && console.warn && !jQuery.migrateMute ) {
    -			console.warn( "JQMIGRATE: " + msg );
    -			if ( jQuery.migrateTrace && console.trace ) {
    -				console.trace();
    -			}
    -		}
    -	}
    -}
    -
    -function migrateWarnProp( obj, prop, value, msg ) {
    -	Object.defineProperty( obj, prop, {
    -		configurable: true,
    -		enumerable: true,
    -		get: function() {
    -			migrateWarn( msg );
    -			return value;
    -		}
    -	} );
    -}
    -
    -if ( document.compatMode === "BackCompat" ) {
    -
    -	// JQuery has never supported or tested Quirks Mode
    -	migrateWarn( "jQuery is not compatible with Quirks Mode" );
    -}
    -
    -
    -var oldInit = jQuery.fn.init,
    -	oldIsNumeric = jQuery.isNumeric,
    -	oldFind = jQuery.find,
    -	rattrHashTest = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,
    -	rattrHashGlob = /\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;
    -
    -jQuery.fn.init = function( arg1 ) {
    -	var args = Array.prototype.slice.call( arguments );
    -
    -	if ( typeof arg1 === "string" && arg1 === "#" ) {
    -
    -		// JQuery( "#" ) is a bogus ID selector, but it returned an empty set before jQuery 3.0
    -		migrateWarn( "jQuery( '#' ) is not a valid selector" );
    -		args[ 0 ] = [];
    -	}
    -
    -	return oldInit.apply( this, args );
    -};
    -jQuery.fn.init.prototype = jQuery.fn;
    -
    -jQuery.find = function( selector ) {
    -	var args = Array.prototype.slice.call( arguments );
    -
    -	// Support: PhantomJS 1.x
    -	// String#match fails to match when used with a //g RegExp, only on some strings
    -	if ( typeof selector === "string" && rattrHashTest.test( selector ) ) {
    -
    -		// The nonstandard and undocumented unquoted-hash was removed in jQuery 1.12.0
    -		// First see if qS thinks it's a valid selector, if so avoid a false positive
    -		try {
    -			document.querySelector( selector );
    -		} catch ( err1 ) {
    -
    -			// Didn't *look* valid to qSA, warn and try quoting what we think is the value
    -			selector = selector.replace( rattrHashGlob, function( _, attr, op, value ) {
    -				return "[" + attr + op + "\"" + value + "\"]";
    -			} );
    -
    -			// If the regexp *may* have created an invalid selector, don't update it
    -			// Note that there may be false alarms if selector uses jQuery extensions
    -			try {
    -				document.querySelector( selector );
    -				migrateWarn( "Attribute selector with '#' must be quoted: " + args[ 0 ] );
    -				args[ 0 ] = selector;
    -			} catch ( err2 ) {
    -				migrateWarn( "Attribute selector with '#' was not fixed: " + args[ 0 ] );
    -			}
    -		}
    -	}
    -
    -	return oldFind.apply( this, args );
    -};
    -
    -// Copy properties attached to original jQuery.find method (e.g. .attr, .isXML)
    -var findProp;
    -for ( findProp in oldFind ) {
    -	if ( Object.prototype.hasOwnProperty.call( oldFind, findProp ) ) {
    -		jQuery.find[ findProp ] = oldFind[ findProp ];
    -	}
    -}
    -
    -// The number of elements contained in the matched element set
    -jQuery.fn.size = function() {
    -	migrateWarn( "jQuery.fn.size() is deprecated; use the .length property" );
    -	return this.length;
    -};
    -
    -jQuery.parseJSON = function() {
    -	migrateWarn( "jQuery.parseJSON is deprecated; use JSON.parse" );
    -	return JSON.parse.apply( null, arguments );
    -};
    -
    -jQuery.isNumeric = function( val ) {
    -
    -	// The jQuery 2.2.3 implementation of isNumeric
    -	function isNumeric2( obj ) {
    -		var realStringObj = obj && obj.toString();
    -		return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
    -	}
    -
    -	var newValue = oldIsNumeric( val ),
    -		oldValue = isNumeric2( val );
    -
    -	if ( newValue !== oldValue ) {
    -		migrateWarn( "jQuery.isNumeric() should not be called on constructed objects" );
    -	}
    -
    -	return oldValue;
    -};
    -
    -migrateWarnProp( jQuery, "unique", jQuery.uniqueSort,
    -	"jQuery.unique is deprecated, use jQuery.uniqueSort" );
    -
    -// Now jQuery.expr.pseudos is the standard incantation
    -migrateWarnProp( jQuery.expr, "filters", jQuery.expr.pseudos,
    -	"jQuery.expr.filters is now jQuery.expr.pseudos" );
    -migrateWarnProp( jQuery.expr, ":", jQuery.expr.pseudos,
    -	"jQuery.expr[\":\"] is now jQuery.expr.pseudos" );
    -
    -
    -var oldAjax = jQuery.ajax;
    -
    -jQuery.ajax = function( ) {
    -	var jQXHR = oldAjax.apply( this, arguments );
    -
    -	// Be sure we got a jQXHR (e.g., not sync)
    -	if ( jQXHR.promise ) {
    -		migrateWarnProp( jQXHR, "success", jQXHR.done,
    -			"jQXHR.success is deprecated and removed" );
    -		migrateWarnProp( jQXHR, "error", jQXHR.fail,
    -			"jQXHR.error is deprecated and removed" );
    -		migrateWarnProp( jQXHR, "complete", jQXHR.always,
    -			"jQXHR.complete is deprecated and removed" );
    -	}
    -
    -	return jQXHR;
    -};
    -
    -
    -var oldRemoveAttr = jQuery.fn.removeAttr,
    -	oldToggleClass = jQuery.fn.toggleClass,
    -	rmatchNonSpace = /\S+/g;
    -
    -jQuery.fn.removeAttr = function( name ) {
    -	var self = this;
    -
    -	jQuery.each( name.match( rmatchNonSpace ), function( i, attr ) {
    -		if ( jQuery.expr.match.bool.test( attr ) ) {
    -			migrateWarn( "jQuery.fn.removeAttr no longer sets boolean properties: " + attr );
    -			self.prop( attr, false );
    -		}
    -	} );
    -
    -	return oldRemoveAttr.apply( this, arguments );
    -};
    -
    -jQuery.fn.toggleClass = function( state ) {
    -
    -	// Only deprecating no-args or single boolean arg
    -	if ( state !== undefined && typeof state !== "boolean" ) {
    -		return oldToggleClass.apply( this, arguments );
    -	}
    -
    -	migrateWarn( "jQuery.fn.toggleClass( boolean ) is deprecated" );
    -
    -	// Toggle entire class name of each element
    -	return this.each( function() {
    -		var className = this.getAttribute && this.getAttribute( "class" ) || "";
    -
    -		if ( className ) {
    -			jQuery.data( this, "__className__", className );
    -		}
    -
    -		// If the element has a class name or if we're passed `false`,
    -		// then remove the whole classname (if there was one, the above saved it).
    -		// Otherwise bring back whatever was previously saved (if anything),
    -		// falling back to the empty string if nothing was stored.
    -		if ( this.setAttribute ) {
    -			this.setAttribute( "class",
    -				className || state === false ?
    -				"" :
    -				jQuery.data( this, "__className__" ) || ""
    -			);
    -		}
    -	} );
    -};
    -
    -
    -var internalSwapCall = false;
    -
    -// If this version of jQuery has .swap(), don't false-alarm on internal uses
    -if ( jQuery.swap ) {
    -	jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
    -		var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
    -
    -		if ( oldHook ) {
    -			jQuery.cssHooks[ name ].get = function() {
    -				var ret;
    -
    -				internalSwapCall = true;
    -				ret = oldHook.apply( this, arguments );
    -				internalSwapCall = false;
    -				return ret;
    -			};
    -		}
    -	} );
    -}
    -
    -jQuery.swap = function( elem, options, callback, args ) {
    -	var ret, name,
    -		old = {};
    -
    -	if ( !internalSwapCall ) {
    -		migrateWarn( "jQuery.swap() is undocumented and deprecated" );
    -	}
    -
    -	// Remember the old values, and insert the new ones
    -	for ( name in options ) {
    -		old[ name ] = elem.style[ name ];
    -		elem.style[ name ] = options[ name ];
    -	}
    -
    -	ret = callback.apply( elem, args || [] );
    -
    -	// Revert the old values
    -	for ( name in options ) {
    -		elem.style[ name ] = old[ name ];
    -	}
    -
    -	return ret;
    -};
    -
    -var oldData = jQuery.data;
    -
    -jQuery.data = function( elem, name, value ) {
    -	var curData;
    -
    -	// If the name is transformed, look for the un-transformed name in the data object
    -	if ( name && name !== jQuery.camelCase( name ) ) {
    -		curData = jQuery.hasData( elem ) && oldData.call( this, elem );
    -		if ( curData && name in curData ) {
    -			migrateWarn( "jQuery.data() always sets/gets camelCased names: " + name );
    -			if ( arguments.length > 2 ) {
    -				curData[ name ] = value;
    -			}
    -			return curData[ name ];
    -		}
    -	}
    -
    -	return oldData.apply( this, arguments );
    -};
    -
    -var oldTweenRun = jQuery.Tween.prototype.run;
    -
    -jQuery.Tween.prototype.run = function( percent ) {
    -	if ( jQuery.easing[ this.easing ].length > 1 ) {
    -		migrateWarn(
    -			"easing function " +
    -			"\"jQuery.easing." + this.easing.toString() +
    -			"\" should use only first argument"
    -		);
    -
    -		jQuery.easing[ this.easing ] = jQuery.easing[ this.easing ].bind(
    -			jQuery.easing,
    -			percent, this.options.duration * percent, 0, 1, this.options.duration
    -		);
    -	}
    -
    -	oldTweenRun.apply( this, arguments );
    -};
    -
    -var oldLoad = jQuery.fn.load,
    -	originalFix = jQuery.event.fix;
    -
    -jQuery.event.props = [];
    -jQuery.event.fixHooks = {};
    -
    -jQuery.event.fix = function( originalEvent ) {
    -	var event,
    -		type = originalEvent.type,
    -		fixHook = this.fixHooks[ type ],
    -		props = jQuery.event.props;
    -
    -	if ( props.length ) {
    -		migrateWarn( "jQuery.event.props are deprecated and removed: " + props.join() );
    -		while ( props.length ) {
    -			jQuery.event.addProp( props.pop() );
    -		}
    -	}
    -
    -	if ( fixHook && !fixHook._migrated_ ) {
    -		fixHook._migrated_ = true;
    -		migrateWarn( "jQuery.event.fixHooks are deprecated and removed: " + type );
    -		if ( ( props = fixHook.props ) && props.length ) {
    -			while ( props.length ) {
    -			   jQuery.event.addProp( props.pop() );
    -			}
    -		}
    -	}
    -
    -	event = originalFix.call( this, originalEvent );
    -
    -	return fixHook && fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
    -};
    -
    -jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
    -
    -	jQuery.fn[ name ] = function() {
    -		var args = Array.prototype.slice.call( arguments, 0 );
    -
    -		// If this is an ajax load() the first arg should be the string URL;
    -		// technically this could also be the "Anything" arg of the event .load()
    -		// which just goes to show why this dumb signature has been deprecated!
    -		// jQuery custom builds that exclude the Ajax module justifiably die here.
    -		if ( name === "load" && typeof args[ 0 ] === "string" ) {
    -			return oldLoad.apply( this, args );
    -		}
    -
    -		migrateWarn( "jQuery.fn." + name + "() is deprecated" );
    -
    -		args.splice( 0, 0, name );
    -		if ( arguments.length ) {
    -			return this.on.apply( this, args );
    -		}
    -
    -		// Use .triggerHandler here because:
    -		// - load and unload events don't need to bubble, only applied to window or image
    -		// - error event should not bubble to window, although it does pre-1.7
    -		// See http://bugs.jquery.com/ticket/11820
    -		this.triggerHandler.apply( this, args );
    -		return this;
    -	};
    -
    -} );
    -
    -// Trigger "ready" event only once, on document ready
    -jQuery( function() {
    -	jQuery( document ).triggerHandler( "ready" );
    -} );
    -
    -jQuery.event.special.ready = {
    -	setup: function() {
    -		if ( this === document ) {
    -			migrateWarn( "'ready' event is deprecated" );
    -		}
    -	}
    -};
    -
    -jQuery.fn.extend( {
    -
    -	bind: function( types, data, fn ) {
    -		migrateWarn( "jQuery.fn.bind() is deprecated" );
    -		return this.on( types, null, data, fn );
    -	},
    -	unbind: function( types, fn ) {
    -		migrateWarn( "jQuery.fn.unbind() is deprecated" );
    -		return this.off( types, null, fn );
    -	},
    -	delegate: function( selector, types, data, fn ) {
    -		migrateWarn( "jQuery.fn.delegate() is deprecated" );
    -		return this.on( types, selector, data, fn );
    -	},
    -	undelegate: function( selector, types, fn ) {
    -		migrateWarn( "jQuery.fn.undelegate() is deprecated" );
    -		return arguments.length === 1 ?
    -			this.off( selector, "**" ) :
    -			this.off( types, selector || "**", fn );
    -	}
    -} );
    -
    -
    -var oldOffset = jQuery.fn.offset;
    -
    -jQuery.fn.offset = function() {
    -	var docElem,
    -		elem = this[ 0 ],
    -		origin = { top: 0, left: 0 };
    -
    -	if ( !elem || !elem.nodeType ) {
    -		migrateWarn( "jQuery.fn.offset() requires a valid DOM element" );
    -		return origin;
    -	}
    -
    -	docElem = ( elem.ownerDocument || document ).documentElement;
    -	if ( !jQuery.contains( docElem, elem ) ) {
    -		migrateWarn( "jQuery.fn.offset() requires an element connected to a document" );
    -		return origin;
    -	}
    -
    -	return oldOffset.apply( this, arguments );
    -};
    -
    -
    -var oldParam = jQuery.param;
    -
    -jQuery.param = function( data, traditional ) {
    -	var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
    -
    -	if ( traditional === undefined && ajaxTraditional ) {
    -
    -		migrateWarn( "jQuery.param() no longer uses jQuery.ajaxSettings.traditional" );
    -		traditional = ajaxTraditional;
    -	}
    -
    -	return oldParam.call( this, data, traditional );
    -};
    -
    -var oldSelf = jQuery.fn.andSelf || jQuery.fn.addBack;
    -
    -jQuery.fn.andSelf = function() {
    -	migrateWarn( "jQuery.fn.andSelf() replaced by jQuery.fn.addBack()" );
    -	return oldSelf.apply( this, arguments );
    -};
    -
    -
    -var oldDeferred = jQuery.Deferred,
    -	tuples = [
    -
    -		// Action, add listener, callbacks, .then handlers, final state
    -		[ "resolve", "done", jQuery.Callbacks( "once memory" ),
    -			jQuery.Callbacks( "once memory" ), "resolved" ],
    -		[ "reject", "fail", jQuery.Callbacks( "once memory" ),
    -			jQuery.Callbacks( "once memory" ), "rejected" ],
    -		[ "notify", "progress", jQuery.Callbacks( "memory" ),
    -			jQuery.Callbacks( "memory" ) ]
    -	];
    -
    -jQuery.Deferred = function( func ) {
    -	var deferred = oldDeferred(),
    -		promise = deferred.promise();
    -
    -	deferred.pipe = promise.pipe = function( /* fnDone, fnFail, fnProgress */ ) {
    -		var fns = arguments;
    -
    -		migrateWarn( "deferred.pipe() is deprecated" );
    -
    -		return jQuery.Deferred( function( newDefer ) {
    -			jQuery.each( tuples, function( i, tuple ) {
    -				var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
    -
    -				// Deferred.done(function() { bind to newDefer or newDefer.resolve })
    -				// deferred.fail(function() { bind to newDefer or newDefer.reject })
    -				// deferred.progress(function() { bind to newDefer or newDefer.notify })
    -				deferred[ tuple[ 1 ] ]( function() {
    -					var returned = fn && fn.apply( this, arguments );
    -					if ( returned && jQuery.isFunction( returned.promise ) ) {
    -						returned.promise()
    -							.done( newDefer.resolve )
    -							.fail( newDefer.reject )
    -							.progress( newDefer.notify );
    -					} else {
    -						newDefer[ tuple[ 0 ] + "With" ](
    -							this === promise ? newDefer.promise() : this,
    -							fn ? [ returned ] : arguments
    -						);
    -					}
    -				} );
    -			} );
    -			fns = null;
    -		} ).promise();
    -
    -	};
    -
    -	if ( func ) {
    -		func.call( deferred, deferred );
    -	}
    -
    -	return deferred;
    -};
    -
    -
    -
    -})( jQuery, window );
    diff --git a/doc/slihelp_generator/assets/js/jquery.mmenu.all.js b/doc/slihelp_generator/assets/js/jquery.mmenu.all.js
    deleted file mode 100644
    index 065cbdacce..0000000000
    --- a/doc/slihelp_generator/assets/js/jquery.mmenu.all.js
    +++ /dev/null
    @@ -1,186 +0,0 @@
    -;(function(root, factory) {
    -  if (typeof define === 'function' && define.amd) {
    -    define(['jquery'], factory);
    -  } else if (typeof exports === 'object') {
    -    module.exports = factory(require('jquery'));
    -  } else {
    -    root.jquery_mmenu_all_js = factory(root.jQuery);
    -  }
    -}(this, function(jQuery) {
    -/*
    - * jQuery mmenu v6.1.8
    - * @requires jQuery 1.7.0 or later
    - *
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - * www.frebsite.nl
    - *
    - * License: CC-BY-NC-4.0
    - * http://creativecommons.org/licenses/by-nc/4.0/
    - */
    -!function(e){function t(){e[n].glbl||(r={$wndw:e(window),$docu:e(document),$html:e("html"),$body:e("body")},s={},a={},o={},e.each([s,a,o],function(e,t){t.add=function(e){e=e.split(" ");for(var n=0,i=e.length;n<i;n++)t[e[n]]=t.mm(e[n])}}),s.mm=function(e){return"mm-"+e},s.add("wrapper menu panels panel nopanel highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen noanimation"),s.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return"mm-"+e},a.add("parent child"),o.mm=function(e){return e+".mm"},o.add("transitionend webkitTransitionEnd click scroll resize keydown mousedown mouseup touchstart touchmove touchend orientationchange"),e[n]._c=s,e[n]._d=a,e[n]._e=o,e[n].glbl=r)}var n="mmenu",i="6.1.8";if(!(e[n]&&e[n].version>i)){e[n]=function(e,t,n){return this.$menu=e,this._api=["bind","getInstance","initPanels","openPanel","closePanel","closeAllPanels","setSelected"],this.opts=t,this.conf=n,this.vars={},this.cbck={},this.mtch={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initAddons(),this._initExtensions(),this._initMenu(),this._initPanels(),this._initOpened(),this._initAnchors(),this._initMatchMedia(),"function"==typeof this.___debug&&this.___debug(),this},e[n].version=i,e[n].addons={},e[n].uniqueId=0,e[n].defaults={extensions:[],initMenu:function(){},initPanels:function(){},navbar:{add:!0,title:"Menu",titleLink:"parent"},onClick:{setSelected:!0},slidingSubmenus:!0},e[n].configuration={classNames:{divider:"Divider",inset:"Inset",nolistview:"NoListview",nopanel:"NoPanel",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},e[n].prototype={getInstance:function(){return this},initPanels:function(e){this._initPanels(e)},openPanel:function(t,i){if(this.trigger("openPanel:before",t),t&&t.length&&(t.is("."+s.panel)||(t=t.closest("."+s.panel)),t.is("."+s.panel))){var o=this;if("boolean"!=typeof i&&(i=!0),t.hasClass(s.vertical))t.add(t.parents("."+s.vertical)).removeClass(s.hidden).parent("li").addClass(s.opened),this.openPanel(t.parents("."+s.panel).not("."+s.vertical).first()),this.trigger("openPanel:start",t),this.trigger("openPanel:finish",t);else{if(t.hasClass(s.opened))return;var r=this.$pnls.children("."+s.panel),l=r.filter("."+s.opened);if(!e[n].support.csstransitions)return l.addClass(s.hidden).removeClass(s.opened),t.removeClass(s.hidden).addClass(s.opened),this.trigger("openPanel:start",t),void this.trigger("openPanel:finish",t);r.not(t).removeClass(s.subopened);for(var d=t.data(a.parent);d;)d=d.closest("."+s.panel),d.is("."+s.vertical)||d.addClass(s.subopened),d=d.data(a.parent);r.removeClass(s.highest).not(l).not(t).addClass(s.hidden),t.removeClass(s.hidden),this.openPanelStart=function(){l.removeClass(s.opened),t.addClass(s.opened),t.hasClass(s.subopened)?(l.addClass(s.highest),t.removeClass(s.subopened)):(l.addClass(s.subopened),t.addClass(s.highest)),this.trigger("openPanel:start",t)},this.openPanelFinish=function(){l.removeClass(s.highest).addClass(s.hidden),t.removeClass(s.highest),this.trigger("openPanel:finish",t)},i&&!t.hasClass(s.noanimation)?setTimeout(function(){o.__transitionend(t,function(){o.openPanelFinish.call(o)},o.conf.transitionDuration),o.openPanelStart.call(o)},o.conf.openingInterval):(this.openPanelStart.call(this),this.openPanelFinish.call(this))}this.trigger("openPanel:after",t)}},closePanel:function(e){this.trigger("closePanel:before",e);var t=e.parent();t.hasClass(s.vertical)&&(t.removeClass(s.opened),this.trigger("closePanel",e)),this.trigger("closePanel:after",e)},closeAllPanels:function(e){this.trigger("closeAllPanels:before"),this.$pnls.find("."+s.listview).children().removeClass(s.selected).filter("."+s.vertical).removeClass(s.opened);var t=this.$pnls.children("."+s.panel),n=e&&e.length?e:t.first();this.$pnls.children("."+s.panel).not(n).removeClass(s.subopened).removeClass(s.opened).removeClass(s.highest).addClass(s.hidden),this.openPanel(n,!1),this.trigger("closeAllPanels:after")},togglePanel:function(e){var t=e.parent();t.hasClass(s.vertical)&&this[t.hasClass(s.opened)?"closePanel":"openPanel"](e)},setSelected:function(e){this.trigger("setSelected:before",e),this.$menu.find("."+s.listview).children("."+s.selected).removeClass(s.selected),e.addClass(s.selected),this.trigger("setSelected:after",e)},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift();if(this.cbck[n])for(var i=0,s=this.cbck[n].length;i<s;i++)this.cbck[n][i].apply(e,t)},matchMedia:function(e,t,n){var i={yes:t,no:n};this.mtch[e]=this.mtch[e]||[],this.mtch[e].push(i)},_initAddons:function(){this.trigger("initAddons:before");var t;for(t in e[n].addons)e[n].addons[t].add.call(this),e[n].addons[t].add=function(){};for(t in e[n].addons)e[n].addons[t].setup.call(this);this.trigger("initAddons:after")},_initExtensions:function(){this.trigger("initExtensions:before");var e=this;this.opts.extensions.constructor===Array&&(this.opts.extensions={all:this.opts.extensions});for(var t in this.opts.extensions)this.opts.extensions[t]=this.opts.extensions[t].length?"mm-"+this.opts.extensions[t].join(" mm-"):"",this.opts.extensions[t]&&!function(t){e.matchMedia(t,function(){this.$menu.addClass(this.opts.extensions[t])},function(){this.$menu.removeClass(this.opts.extensions[t])})}(t);this.trigger("initExtensions:after")},_initMenu:function(){this.trigger("initMenu:before");this.conf.clone&&(this.$orig=this.$menu,this.$menu=this.$orig.clone(),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){e(this).attr("id",s.mm(e(this).attr("id")))})),this.opts.initMenu.call(this,this.$menu,this.$orig),this.$menu.attr("id",this.$menu.attr("id")||this.__getUniqueId()),this.$pnls=e('<div class="'+s.panels+'" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu);var t=[s.menu];this.opts.slidingSubmenus||t.push(s.vertical),this.$menu.addClass(t.join(" ")).parent().addClass(s.wrapper),this.trigger("initMenu:after")},_initPanels:function(t){this.trigger("initPanels:before",t),t=t||this.$pnls.children(this.conf.panelNodetype);var n=e(),i=this,a=function(t){t.filter(this.conf.panelNodetype).each(function(){var t=i._initPanel(e(this));if(t){i._initNavbar(t),i._initListview(t),n=n.add(t);var o=t.children("."+s.listview).children("li").children(i.conf.panelNodeType).add(t.children("."+i.conf.classNames.panel));o.length&&a.call(i,o)}})};a.call(this,t),this.opts.initPanels.call(this,n),this.trigger("initPanels:after",n)},_initPanel:function(e){this.trigger("initPanel:before",e);if(e.hasClass(s.panel))return e;if(this.__refactorClass(e,this.conf.classNames.panel,"panel"),this.__refactorClass(e,this.conf.classNames.nopanel,"nopanel"),this.__refactorClass(e,this.conf.classNames.vertical,"vertical"),this.__refactorClass(e,this.conf.classNames.inset,"inset"),e.filter("."+s.inset).addClass(s.nopanel),e.hasClass(s.nopanel))return!1;var t=e.hasClass(s.vertical)||!this.opts.slidingSubmenus;e.removeClass(s.vertical);var n=e.attr("id")||this.__getUniqueId();e.removeAttr("id"),e.is("ul, ol")&&(e.wrap("<div />"),e=e.parent()),e.addClass(s.panel+" "+s.hidden).attr("id",n);var i=e.parent("li");return t?e.add(i).addClass(s.vertical):e.appendTo(this.$pnls),i.length&&(i.data(a.child,e),e.data(a.parent,i)),this.trigger("initPanel:after",e),e},_initNavbar:function(t){if(this.trigger("initNavbar:before",t),!t.children("."+s.navbar).length){var i=t.data(a.parent),o=e('<div class="'+s.navbar+'" />'),r=e[n].i18n(this.opts.navbar.title),l="";if(i&&i.length){if(i.hasClass(s.vertical))return;if(i.parent().is("."+s.listview))var d=i.children("a, span").not("."+s.next);else var d=i.closest("."+s.panel).find('a[href="#'+t.attr("id")+'"]');d=d.first(),i=d.closest("."+s.panel);var c=i.attr("id");switch(r=d.text(),this.opts.navbar.titleLink){case"anchor":l=d.attr("href");break;case"parent":l="#"+c}o.append('<a class="'+s.btn+" "+s.prev+'" href="#'+c+'" />')}else if(!this.opts.navbar.title)return;this.opts.navbar.add&&t.addClass(s.hasnavbar),o.append('<a class="'+s.title+'"'+(l.length?' href="'+l+'"':"")+">"+r+"</a>").prependTo(t),this.trigger("initNavbar:after",t)}},_initListview:function(t){this.trigger("initListview:before",t);var n=this.__childAddBack(t,"ul, ol");this.__refactorClass(n,this.conf.classNames.nolistview,"nolistview"),n.filter("."+this.conf.classNames.inset).addClass(s.nolistview);var i=n.not("."+s.nolistview).addClass(s.listview).children();this.__refactorClass(i,this.conf.classNames.selected,"selected"),this.__refactorClass(i,this.conf.classNames.divider,"divider"),this.__refactorClass(i,this.conf.classNames.spacer,"spacer");var o=t.data(a.parent);if(o&&o.parent().is("."+s.listview)&&!o.children("."+s.next).length){var r=o.children("a, span").first(),l=e('<a class="'+s.next+'" href="#'+t.attr("id")+'" />').insertBefore(r);r.is("span")&&l.addClass(s.fullsubopen)}this.trigger("initListview:after",t)},_initOpened:function(){this.trigger("initOpened:before");var e=this.$pnls.find("."+s.listview).children("."+s.selected).removeClass(s.selected).last().addClass(s.selected),t=e.length?e.closest("."+s.panel):this.$pnls.children("."+s.panel).first();this.openPanel(t,!1),this.trigger("initOpened:after")},_initAnchors:function(){var t=this;r.$body.on(o.click+"-oncanvas","a[href]",function(i){var a=e(this),o=!1,r=t.$menu.find(a).length;for(var l in e[n].addons)if(e[n].addons[l].clickAnchor.call(t,a,r)){o=!0;break}var d=a.attr("href");if(!o&&r&&d.length>1&&"#"==d.slice(0,1))try{var c=e(d,t.$menu);c.is("."+s.panel)&&(o=!0,t[a.parent().hasClass(s.vertical)?"togglePanel":"openPanel"](c))}catch(h){}if(o&&i.preventDefault(),!o&&r&&a.is("."+s.listview+" > li > a")&&!a.is('[rel="external"]')&&!a.is('[target="_blank"]')){t.__valueOrFn(t.opts.onClick.setSelected,a)&&t.setSelected(e(i.target).parent());var f=t.__valueOrFn(t.opts.onClick.preventDefault,a,"#"==d.slice(0,1));f&&i.preventDefault(),t.__valueOrFn(t.opts.onClick.close,a,f)&&t.opts.offCanvas&&"function"==typeof t.close&&t.close()}})},_initMatchMedia:function(){var e=this;this._fireMatchMedia(),r.$wndw.on(o.resize,function(t){e._fireMatchMedia()})},_fireMatchMedia:function(){for(var e in this.mtch)for(var t=window.matchMedia&&window.matchMedia(e).matches?"yes":"no",n=0;n<this.mtch[e].length;n++)this.mtch[e][n][t].call(this)},_getOriginalMenuId:function(){var e=this.$menu.attr("id");return this.conf.clone&&e&&e.length&&(e=s.umm(e)),e},__api:function(){var t=this,n={};return e.each(this._api,function(e){var i=this;n[i]=function(){var e=t[i].apply(t,arguments);return"undefined"==typeof e?n:e}}),n},__valueOrFn:function(e,t,n){return"function"==typeof e?e.call(t[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,t,n){return e.filter("."+t).removeClass(t).addClass(s[n])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__childAddBack:function(e,t){return e.children(t).add(e.filter(t))},__filterListItems:function(e){return e.not("."+s.divider).not("."+s.hidden)},__filterListItemAnchors:function(e){return this.__filterListItems(e).children("a").not("."+s.next)},__transitionend:function(e,t,n){var i=!1,s=function(n){"undefined"!=typeof n&&n.target!=e[0]||(i||(e.off(o.transitionend),e.off(o.webkitTransitionEnd),t.call(e[0])),i=!0)};e.on(o.transitionend,s),e.on(o.webkitTransitionEnd,s),setTimeout(s,1.1*n)},__getUniqueId:function(){return s.mm(e[n].uniqueId++)}},e.fn[n]=function(i,s){t(),i=e.extend(!0,{},e[n].defaults,i),s=e.extend(!0,{},e[n].configuration,s);var a=e();return this.each(function(){var t=e(this);if(!t.data(n)){var o=new e[n](t,i,s);o.$menu.data(n,o.__api()),a=a.add(o.$menu)}}),a},e[n].i18n=function(){var t={};return function(n){switch(typeof n){case"object":return e.extend(t,n),t;case"string":return t[n]||n;case"undefined":default:return t}}}(),e[n].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransitions||Modernizr.csstransitions}(),csstransforms:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms||Modernizr.csstransforms}(),csstransforms3d:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms3d||Modernizr.csstransforms3d}()};var s,a,o,r}}(jQuery),/*
    - * jQuery mmenu offCanvas add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="offCanvas";e[t].addons[n]={setup:function(){if(this.opts[n]){var s=this,a=this.opts[n],r=this.conf[n];o=e[t].glbl,this._api=e.merge(this._api,["open","close","setPage"]),"object"!=typeof a&&(a={}),"top"!=a.position&&"bottom"!=a.position||(a.zposition="front"),a=this.opts[n]=e.extend(!0,{},e[t].defaults[n],a),"string"!=typeof r.pageSelector&&(r.pageSelector="> "+r.pageNodetype),this.vars.opened=!1;var l=[i.offcanvas];"left"!=a.position&&l.push(i.mm(a.position)),"back"!=a.zposition&&l.push(i.mm(a.zposition)),e[t].support.csstransforms||l.push(i["no-csstransforms"]),e[t].support.csstransforms3d||l.push(i["no-csstransforms3d"]),this.bind("initMenu:after",function(){var e=this;this.setPage(o.$page),this._initBlocker(),this["_initWindow_"+n](),this.$menu.addClass(l.join(" ")).parent("."+i.wrapper).removeClass(i.wrapper),this.$menu[r.menuInsertMethod](r.menuInsertSelector);var t=window.location.hash;if(t){var s=this._getOriginalMenuId();s&&s==t.slice(1)&&setTimeout(function(){e.open()},1e3)}}),this.bind("initExtensions:after",function(){for(var e=[i.mm("widescreen"),i.mm("iconbar")],t=0;t<e.length;t++)for(var n in this.opts.extensions)if(this.opts.extensions[n].indexOf(e[t])>-1){!function(t,n){s.matchMedia(t,function(){o.$html.addClass(e[n])},function(){o.$html.removeClass(e[n])})}(n,t);break}}),this.bind("open:start:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!1)}),this.bind("close:finish:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)}),this.bind("initMenu:after:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)})}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("offcanvas slideout blocking modal background opening blocker page no-csstransforms3d"),s.add("style")},clickAnchor:function(e,t){var s=this;if(this.opts[n]){var a=this._getOriginalMenuId();if(a&&e.is('[href="#'+a+'"]')){if(t)return!0;var r=e.closest("."+i.menu);if(r.length){var l=r.data("mmenu");if(l&&l.close)return l.close(),s.__transitionend(r,function(){s.open()},s.conf.transitionDuration),!0}return this.open(),!0}if(o.$page)return a=o.$page.first().attr("id"),a&&e.is('[href="#'+a+'"]')?(this.close(),!0):void 0}}},e[t].defaults[n]={position:"left",zposition:"back",blockUI:!0,moveBackground:!0},e[t].configuration[n]={pageNodetype:"div",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuInsertMethod:"prependTo",menuInsertSelector:"body"},e[t].prototype.open=function(){if(this.trigger("open:before"),!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger("open:after")}},e[t].prototype._openSetup=function(){var t=this,r=this.opts[n];this.closeAllOthers(),o.$page.each(function(){e(this).data(s.style,e(this).attr("style")||"")}),o.$wndw.trigger(a.resize+"-"+n,[!0]);var l=[i.opened];r.blockUI&&l.push(i.blocking),"modal"==r.blockUI&&l.push(i.modal),r.moveBackground&&l.push(i.background),"left"!=r.position&&l.push(i.mm(this.opts[n].position)),"back"!=r.zposition&&l.push(i.mm(this.opts[n].zposition)),o.$html.addClass(l.join(" ")),setTimeout(function(){t.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(i.opened)},e[t].prototype._openFinish=function(){var e=this;this.__transitionend(o.$page.first(),function(){e.trigger("open:finish")},this.conf.transitionDuration),this.trigger("open:start"),o.$html.addClass(i.opening)},e[t].prototype.close=function(){if(this.trigger("close:before"),this.vars.opened){var t=this;this.__transitionend(o.$page.first(),function(){t.$menu.removeClass(i.opened);var a=[i.opened,i.blocking,i.modal,i.background,i.mm(t.opts[n].position),i.mm(t.opts[n].zposition)];o.$html.removeClass(a.join(" ")),o.$page.each(function(){e(this).attr("style",e(this).data(s.style))}),t.vars.opened=!1,t.trigger("close:finish")},this.conf.transitionDuration),this.trigger("close:start"),o.$html.removeClass(i.opening),this.trigger("close:after")}},e[t].prototype.closeAllOthers=function(){o.$body.find("."+i.menu+"."+i.offcanvas).not(this.$menu).each(function(){var n=e(this).data(t);n&&n.close&&n.close()})},e[t].prototype.setPage=function(t){this.trigger("setPage:before",t);var s=this,a=this.conf[n];t&&t.length||(t=o.$body.find(a.pageSelector),a.noPageSelector.length&&(t=t.not(a.noPageSelector.join(", "))),t.length>1&&a.wrapPageIfNeeded&&(t=t.wrapAll("<"+this.conf[n].pageNodetype+" />").parent())),t.each(function(){e(this).attr("id",e(this).attr("id")||s.__getUniqueId())}),t.addClass(i.page+" "+i.slideout),o.$page=t,this.trigger("setPage:after",t)},e[t].prototype["_initWindow_"+n]=function(){o.$wndw.off(a.keydown+"-"+n).on(a.keydown+"-"+n,function(e){if(o.$html.hasClass(i.opened)&&9==e.keyCode)return e.preventDefault(),!1});var e=0;o.$wndw.off(a.resize+"-"+n).on(a.resize+"-"+n,function(t,n){if(1==o.$page.length&&(n||o.$html.hasClass(i.opened))){var s=o.$wndw.height();(n||s!=e)&&(e=s,o.$page.css("minHeight",s))}})},e[t].prototype._initBlocker=function(){var t=this;this.opts[n].blockUI&&(o.$blck||(o.$blck=e('<div id="'+i.blocker+'" class="'+i.slideout+'" />')),o.$blck.appendTo(o.$body).off(a.touchstart+"-"+n+" "+a.touchmove+"-"+n).on(a.touchstart+"-"+n+" "+a.touchmove+"-"+n,function(e){e.preventDefault(),e.stopPropagation(),o.$blck.trigger(a.mousedown+"-"+n)}).off(a.mousedown+"-"+n).on(a.mousedown+"-"+n,function(e){e.preventDefault(),o.$html.hasClass(i.modal)||(t.closeAllOthers(),t.close())}))};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu scrollBugFix add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="scrollBugFix";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];o=e[t].glbl,e[t].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&("boolean"==typeof s&&(s={fix:s}),"object"!=typeof s&&(s={}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),s.fix&&(this.bind("open:start",function(){this.$pnls.children("."+i.opened).scrollTop(0)}),this.bind("initMenu:after",function(){this["_initWindow_"+n]()})))},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e},clickAnchor:function(e,t){}},e[t].defaults[n]={fix:!0},e[t].prototype["_initWindow_"+n]=function(){var t=this;o.$docu.off(a.touchmove+"-"+n).on(a.touchmove+"-"+n,function(e){o.$html.hasClass(i.opened)&&e.preventDefault()});var s=!1;o.$body.off(a.touchstart+"-"+n).on(a.touchstart+"-"+n,"."+i.panels+"> ."+i.panel,function(e){o.$html.hasClass(i.opened)&&(s||(s=!0,0===e.currentTarget.scrollTop?e.currentTarget.scrollTop=1:e.currentTarget.scrollHeight===e.currentTarget.scrollTop+e.currentTarget.offsetHeight&&(e.currentTarget.scrollTop-=1),s=!1))}).off(a.touchmove+"-"+n).on(a.touchmove+"-"+n,"."+i.panels+"> ."+i.panel,function(t){o.$html.hasClass(i.opened)&&e(this)[0].scrollHeight>e(this).innerHeight()&&t.stopPropagation()}),o.$wndw.off(a.orientationchange+"-"+n).on(a.orientationchange+"-"+n,function(){t.$pnls.children("."+i.opened).scrollTop(0).css({"-webkit-overflow-scrolling":"auto"}).css({"-webkit-overflow-scrolling":"touch"})})};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu screenReader add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="screenReader";e[t].addons[n]={setup:function(){var a=this,r=this.opts[n],l=this.conf[n];o=e[t].glbl,"boolean"==typeof r&&(r={aria:r,text:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),r.aria&&(this.bind("initAddons:after",function(){this.bind("initMenu:after",function(){this.trigger("initMenu:after:sr-aria")}),this.bind("initNavbar:after",function(){this.trigger("initNavbar:after:sr-aria",arguments[0])}),this.bind("openPanel:start",function(){this.trigger("openPanel:start:sr-aria",arguments[0])}),this.bind("close:start",function(){this.trigger("close:start:sr-aria")}),this.bind("close:finish",function(){this.trigger("close:finish:sr-aria")}),this.bind("open:start",function(){this.trigger("open:start:sr-aria")}),this.bind("open:finish",function(){this.trigger("open:finish:sr-aria")})}),this.bind("updateListview",function(){this.$pnls.find("."+i.listview).children().each(function(){a.__sr_aria(e(this),"hidden",e(this).is("."+i.hidden))})}),this.bind("openPanel:start",function(e){var t=this.$menu.find("."+i.panel).not(e).not(e.parents("."+i.panel)),n=e.add(e.find("."+i.vertical+"."+i.opened).children("."+i.panel));this.__sr_aria(t,"hidden",!0),this.__sr_aria(n,"hidden",!1)}),this.bind("closePanel",function(e){this.__sr_aria(e,"hidden",!0)}),this.bind("initPanels:after",function(t){var n=t.find("."+i.prev+", ."+i.next).each(function(){a.__sr_aria(e(this),"owns",e(this).attr("href").replace("#",""))});this.__sr_aria(n,"haspopup",!0)}),this.bind("initNavbar:after",function(e){var t=e.children("."+i.navbar);this.__sr_aria(t,"hidden",!e.hasClass(i.hasnavbar))}),r.text&&(this.bind("initlistview:after",function(e){var t=e.find("."+i.listview).find("."+i.fullsubopen).parent().children("span");this.__sr_aria(t,"hidden",!0)}),"parent"==this.opts.navbar.titleLink&&this.bind("initNavbar:after",function(e){var t=e.children("."+i.navbar),n=!!t.children("."+i.prev).length;this.__sr_aria(t.children("."+i.title),"hidden",n)}))),r.text&&(this.bind("initAddons:after",function(){this.bind("setPage:after",function(){this.trigger("setPage:after:sr-text",arguments[0])})}),this.bind("initNavbar:after",function(n){var s=n.children("."+i.navbar),a=s.children("."+i.title).text(),o=e[t].i18n(l.text.closeSubmenu);a&&(o+=" ("+a+")"),s.children("."+i.prev).html(this.__sr_text(o))}),this.bind("initListview:after",function(n){var o=n.data(s.parent);if(o&&o.length){var r=o.children("."+i.next),d=r.nextAll("span, a").first().text(),c=e[t].i18n(l.text[r.parent().is("."+i.vertical)?"toggleSubmenu":"openSubmenu"]);d&&(c+=" ("+d+")"),r.html(a.__sr_text(c))}}))},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("sronly")},clickAnchor:function(e,t){}},e[t].defaults[n]={aria:!0,text:!0},e[t].configuration[n]={text:{closeMenu:"Close menu",closeSubmenu:"Close submenu",openSubmenu:"Open submenu",toggleSubmenu:"Toggle submenu"}},e[t].prototype.__sr_aria=function(e,t,n){e.prop("aria-"+t,n)[n?"attr":"removeAttr"]("aria-"+t,n)},e[t].prototype.__sr_text=function(e){return'<span class="'+i.sronly+'">'+e+"</span>"};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu autoHeight add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="autoHeight";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof s&&s&&(s={height:"auto"}),"string"==typeof s&&(s={height:s}),"object"!=typeof s&&(s={}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),"auto"==s.height||"highest"==s.height){this.bind("initMenu:after",function(){this.$menu.addClass(i.autoheight)});var a=function(t){if(!this.opts.offCanvas||this.vars.opened){var n=Math.max(parseInt(this.$pnls.css("top"),10),0)||0,a=Math.max(parseInt(this.$pnls.css("bottom"),10),0)||0,o=0;this.$menu.addClass(i.measureheight),"auto"==s.height?(t=t||this.$pnls.children("."+i.opened),t.is("."+i.vertical)&&(t=t.parents("."+i.panel).not("."+i.vertical)),t.length||(t=this.$pnls.children("."+i.panel)),o=t.first().outerHeight()):"highest"==s.height&&this.$pnls.children().each(function(){var t=e(this);t.is("."+i.vertical)&&(t=t.parents("."+i.panel).not("."+i.vertical).first()),o=Math.max(o,t.outerHeight())}),this.$menu.height(o+n+a).removeClass(i.measureheight)}};this.opts.offCanvas&&this.bind("open:start",a),"highest"==s.height&&this.bind("initPanels:after",a),"auto"==s.height&&(this.bind("updateListview",a),this.bind("openPanel:start",a),this.bind("closePanel",a))}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("autoheight measureheight"),a.add("resize")},clickAnchor:function(e,t){}},e[t].defaults[n]={height:"default"};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu backButton add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="backButton";e[t].addons[n]={setup:function(){if(this.opts.offCanvas){var s=this,a=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof a&&(a={close:a}),"object"!=typeof a&&(a={}),a=e.extend(!0,{},e[t].defaults[n],a),a.close){var r="#"+s.$menu.attr("id");this.bind("open:finish",function(e){location.hash!=r&&history.pushState(null,document.title,r)}),e(window).on("popstate",function(e){o.$html.hasClass(i.opened)?(e.stopPropagation(),s.close()):location.hash==r&&(e.stopPropagation(),s.open())})}}},add:function(){return window.history&&window.history.pushState?(i=e[t]._c,s=e[t]._d,void(a=e[t]._e)):void(e[t].addons[n].setup=function(){})},clickAnchor:function(e,t){}},e[t].defaults[n]={close:!1};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu counters add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="counters";e[t].addons[n]={setup:function(){var a=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof r&&(r={add:r,update:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),this.bind("initListview:after",function(t){this.__refactorClass(e("em",t),this.conf.classNames[n].counter,"counter")}),r.add&&this.bind("initListview:after",function(t){var n;switch(r.addTo){case"panels":n=t;break;default:n=t.filter(r.addTo)}n.each(function(){var t=e(this).data(s.parent);t&&(t.children("em."+i.counter).length||t.prepend(e('<em class="'+i.counter+'" />')))})}),r.update){var l=function(t){t=t||this.$pnls.children("."+i.panel),t.each(function(){var t=e(this),n=t.data(s.parent);if(n){var o=n.children("em."+i.counter);o.length&&(t=t.children("."+i.listview),t.length&&o.html(a.__filterListItems(t.children()).length))}})};this.bind("initListview:after",l),this.bind("updateListview",l)}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("counter search noresultsmsg")},clickAnchor:function(e,t){}},e[t].defaults[n]={add:!1,addTo:"panels",count:!1},e[t].configuration.classNames[n]={counter:"Counter"};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu columns add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="columns";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof s&&(s={add:s}),"number"==typeof s&&(s={add:!0,visible:s}),"object"!=typeof s&&(s={}),"number"==typeof s.visible&&(s.visible={min:s.visible,max:s.visible}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),s.add){s.visible.min=Math.max(1,Math.min(6,s.visible.min)),s.visible.max=Math.max(s.visible.min,Math.min(6,s.visible.max));for(var a=this.opts.offCanvas?this.$menu.add(o.$html):this.$menu,r="",l=0;l<=s.visible.max;l++)r+=" "+i.columns+"-"+l;r.length&&(r=r.slice(1));var d=function(e){var t=this.$pnls.children("."+i.subopened).length;e&&!e.hasClass(i.subopened)&&t++,t=Math.min(s.visible.max,Math.max(s.visible.min,t)),a.removeClass(r).addClass(i.columns+"-"+t)},c=function(t){t=t||this.$pnls.children("."+i.opened),this.$pnls.children("."+i.panel).removeClass(r).filter("."+i.subopened).add(t).slice(-s.visible.max).each(function(t){e(this).addClass(i.columns+"-"+t)})};this.bind("initMenu:after",function(){this.$menu.addClass(i.columns)}),this.bind("openPanel:start",d),this.bind("openPanel:start",c)}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("columns")},clickAnchor:function(t,s){if(!this.opts[n].add)return!1;if(s){var a=t.attr("href");if(a.length>1&&"#"==a.slice(0,1))try{var o=e(a,this.$menu);if(o.is("."+i.panel))for(var r=parseInt(t.closest("."+i.panel).attr("class").split(i.columns+"-")[1].split(" ")[0],10)+1;r>0;){var l=this.$pnls.children("."+i.columns+"-"+r);if(!l.length){r=-1;break}r++,l.removeClass(i.subopened).removeClass(i.opened).removeClass(i.highest).addClass(i.hidden)}}catch(d){}}}},e[t].defaults[n]={add:!1,visible:{min:1,max:3}};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu dividers add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="dividers";e[t].addons[n]={setup:function(){var s=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof r&&(r={add:r,fixed:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),this.bind("initListview:after",function(e){this.__refactorClass(e.find("li"),this.conf.classNames[n].collapsed,"collapsed")}),r.add&&this.bind("initListview:after",function(t){var n;switch(r.addTo){case"panels":n=t;break;default:n=t.filter(r.addTo)}n.length&&n.find("."+i.listview).find("."+i.divider).remove().end().each(function(){var t="";s.__filterListItems(e(this).children()).each(function(){var n=e.trim(e(this).children("a, span").text()).slice(0,1).toLowerCase();n!=t&&n.length&&(t=n,e('<li class="'+i.divider+'">'+n+"</li>").insertBefore(this))})})}),r.collapse&&this.bind("initListview:after",function(t){t.find("."+i.divider).each(function(){var t=e(this),n=t.nextUntil("."+i.divider,"."+i.collapsed);n.length&&(t.children("."+i.next).length||(t.wrapInner("<span />"),t.prepend('<a href="#" class="'+i.next+" "+i.fullsubopen+'" />')))})}),r.fixed){this.bind("initPanels:after",function(){"undefined"==typeof this.$fixeddivider&&(this.$fixeddivider=e('<ul class="'+i.listview+" "+i.fixeddivider+'"><li class="'+i.divider+'"></li></ul>').prependTo(this.$pnls).children())});var l=function(t){if(t=t||this.$pnls.children("."+i.opened),!t.is(":hidden")){var n=t.children("."+i.listview).children("."+i.divider).not("."+i.hidden),s=t.scrollTop()||0,a="";n.each(function(){e(this).position().top+s<s+1&&(a=e(this).text())}),this.$fixeddivider.text(a),this.$pnls[a.length?"addClass":"removeClass"](i.hasdividers)}};this.bind("open:start",l),this.bind("openPanel:start",l),this.bind("updateListview",l),this.bind("initPanel:after",function(e){e.off(a.scroll+"-"+n+" "+a.touchmove+"-"+n).on(a.scroll+"-"+n+" "+a.touchmove+"-"+n,function(t){l.call(s,e)})})}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("collapsed uncollapsed fixeddivider hasdividers"),a.add("scroll")},clickAnchor:function(e,t){if(this.opts[n].collapse&&t){var s=e.parent();if(s.is("."+i.divider)){var a=s.nextUntil("."+i.divider,"."+i.collapsed);return s.toggleClass(i.opened),a[s.hasClass(i.opened)?"addClass":"removeClass"](i.uncollapsed),!0}}return!1}},e[t].defaults[n]={add:!1,addTo:"panels",fixed:!1,collapse:!1},e[t].configuration.classNames[n]={collapsed:"Collapsed"};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu drag add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){function t(e,t,n){return e<t&&(e=t),e>n&&(e=n),e}function n(n,i,s){var r,l,d,c=this,h={events:"panleft panright",typeLower:"x",typeUpper:"X",open_dir:"right",close_dir:"left",negative:!1},f="width",u=h.open_dir,p=function(e){e<=n.maxStartPos&&(m=1)},v=function(){return e("."+o.slideout)},m=0,b=0,g=0;switch(this.opts.offCanvas.position){case"top":case"bottom":h.events="panup pandown",h.typeLower="y",h.typeUpper="Y",f="height"}switch(this.opts.offCanvas.position){case"right":case"bottom":h.negative=!0,p=function(e){e>=s.$wndw[f]()-n.maxStartPos&&(m=1)}}switch(this.opts.offCanvas.position){case"left":break;case"right":h.open_dir="left",h.close_dir="right";break;case"top":h.open_dir="down",h.close_dir="up";break;case"bottom":h.open_dir="up",h.close_dir="down"}switch(this.opts.offCanvas.zposition){case"front":v=function(){return this.$menu}}var _=this.__valueOrFn(n.node,this.$menu,s.$page);"string"==typeof _&&(_=e(_));var y=new Hammer(_[0],this.opts[a].vendors.hammer);y.on("panstart",function(e){p(e.center[h.typeLower]),s.$slideOutNodes=v(),u=h.open_dir}),y.on(h.events+" panend",function(e){m>0&&e.preventDefault()}),y.on(h.events,function(e){if(r=e["delta"+h.typeUpper],h.negative&&(r=-r),r!=b&&(u=r>=b?h.open_dir:h.close_dir),b=r,b>n.threshold&&1==m){if(s.$html.hasClass(o.opened))return;m=2,c._openSetup(),c.trigger("open:start"),s.$html.addClass(o.dragging),g=t(s.$wndw[f]()*i[f].perc,i[f].min,i[f].max)}2==m&&(l=t(b,10,g)-("front"==c.opts.offCanvas.zposition?g:0),h.negative&&(l=-l),d="translate"+h.typeUpper+"("+l+"px )",s.$slideOutNodes.css({"-webkit-transform":"-webkit-"+d,transform:d}))}),y.on("panend",function(e){2==m&&(s.$html.removeClass(o.dragging),s.$slideOutNodes.css("transform",""),c[u==h.open_dir?"_openFinish":"close"]()),m=0})}function i(e,t,n,i){var s=this,l=e.data(r.parent);if(l){l=l.closest("."+o.panel);var d=new Hammer(e[0],s.opts[a].vendors.hammer),c=null;d.on("panright",function(e){c||(s.openPanel(l),c=setTimeout(function(){clearTimeout(c),c=null},s.conf.openingInterval+s.conf.transitionDuration))})}}var s="mmenu",a="drag";e[s].addons[a]={setup:function(){if(this.opts.offCanvas){var t=this.opts[a],o=this.conf[a];d=e[s].glbl,"boolean"==typeof t&&(t={menu:t,panels:t}),"object"!=typeof t&&(t={}),"boolean"==typeof t.menu&&(t.menu={open:t.menu}),"object"!=typeof t.menu&&(t.menu={}),"boolean"==typeof t.panels&&(t.panels={close:t.panels}),"object"!=typeof t.panels&&(t.panels={}),t=this.opts[a]=e.extend(!0,{},e[s].defaults[a],t),t.menu.open&&this.bind("setPage:after",function(){n.call(this,t.menu,o.menu,d)}),t.panels.close&&this.bind("initPanel:after",function(e){i.call(this,e,t.panels,o.panels,d)})}},add:function(){return"function"!=typeof Hammer||Hammer.VERSION<2?(e[s].addons[a].add=function(){},void(e[s].addons[a].setup=function(){})):(o=e[s]._c,r=e[s]._d,l=e[s]._e,void o.add("dragging"))},clickAnchor:function(e,t){}},e[s].defaults[a]={menu:{open:!1,maxStartPos:100,threshold:50},panels:{close:!1},vendors:{hammer:{}}},e[s].configuration[a]={menu:{width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}},panels:{}};var o,r,l,d}(jQuery),/*
    - * jQuery mmenu dropdown add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="dropdown";e[t].addons[n]={setup:function(){if(this.opts.offCanvas){var r=this,l=this.opts[n],d=this.conf[n];if(o=e[t].glbl,"boolean"==typeof l&&l&&(l={drop:l}),"object"!=typeof l&&(l={}),"string"==typeof l.position&&(l.position={of:l.position}),l=this.opts[n]=e.extend(!0,{},e[t].defaults[n],l),l.drop){var c;this.bind("initMenu:after",function(){if(this.$menu.addClass(i.dropdown),l.tip&&this.$menu.addClass(i.tip),"string"!=typeof l.position.of){var t=this._getOriginalMenuId();t&&t.length&&(l.position.of='[href="#'+t+'"]')}"string"==typeof l.position.of&&(c=e(l.position.of),l.event=l.event.split(" "),1==l.event.length&&(l.event[1]=l.event[0]),"hover"==l.event[0]&&c.on(a.mouseenter+"-"+n,function(){r.open()}),"hover"==l.event[1]&&this.$menu.on(a.mouseleave+"-"+n,function(){r.close()}))}),this.bind("open:start",function(){this.$menu.data(s.style,this.$menu.attr("style")||""),o.$html.addClass(i.dropdown)}),this.bind("close:finish",function(){this.$menu.attr("style",this.$menu.data(s.style)),o.$html.removeClass(i.dropdown)});var h=function(e,t){var n=t[0],s=t[1],a="x"==e?"scrollLeft":"scrollTop",r="x"==e?"outerWidth":"outerHeight",h="x"==e?"left":"top",f="x"==e?"right":"bottom",u="x"==e?"width":"height",p="x"==e?"maxWidth":"maxHeight",v=null,m=o.$wndw[a](),b=c.offset()[h]-=m,g=b+c[r](),_=o.$wndw[u](),y=d.offset.button[e]+d.offset.viewport[e];if(l.position[e])switch(l.position[e]){case"left":case"bottom":v="after";break;case"right":case"top":v="before"}null===v&&(v=b+(g-b)/2<_/2?"after":"before");var C,w;return"after"==v?(C="x"==e?b:g,w=_-(C+y),n[h]=C+d.offset.button[e],n[f]="auto",s.push(i["x"==e?"tipleft":"tiptop"])):(C="x"==e?g:b,w=C-y,n[f]="calc( 100% - "+(C-d.offset.button[e])+"px )",n[h]="auto",s.push(i["x"==e?"tipright":"tipbottom"])),n[p]=Math.min(d[u].max,w),[n,s]},f=function(e){if(this.vars.opened){this.$menu.attr("style",this.$menu.data(s.style));var t=[{},[]];t=h.call(this,"y",t),t=h.call(this,"x",t),this.$menu.css(t[0]),l.tip&&this.$menu.removeClass(i.tipleft+" "+i.tipright+" "+i.tiptop+" "+i.tipbottom).addClass(t[1].join(" "))}};this.bind("open:start",f),o.$wndw.on(a.resize+"-"+n,function(e){f.call(r)}),this.opts.offCanvas.blockUI||o.$wndw.on(a.scroll+"-"+n,function(e){f.call(r)})}}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("dropdown tip tipleft tipright tiptop tipbottom"),a.add("mouseenter mouseleave resize scroll")},clickAnchor:function(e,t){}},e[t].defaults[n]={drop:!1,event:"click",position:{},tip:!0},e[t].configuration[n]={offset:{button:{x:-10,y:10},viewport:{x:20,y:20}},height:{max:880},width:{max:440}};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu fixedElements add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="fixedElements";e[t].addons[n]={setup:function(){if(this.opts.offCanvas){var s=(this.opts[n],this.conf[n]);o=e[t].glbl;var a=function(t){var a=this.conf.classNames[n].fixed,r=t.find("."+a);this.__refactorClass(r,a,"slideout"),r[s.elemInsertMethod](s.elemInsertSelector);var l=this.conf.classNames[n].sticky,d=t.find("."+l);this.__refactorClass(d,l,"sticky"),d=t.find("."+i.sticky),d.length&&(this.bind("open:before",function(){var t=o.$wndw.scrollTop()+s.sticky.offset;d.each(function(){e(this).css("top",parseInt(e(this).css("top"),10)+t)})}),this.bind("close:finish",function(){d.css("top","")}))};this.bind("setPage:after",a)}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("sticky")},clickAnchor:function(e,t){}},e[t].configuration[n]={sticky:{offset:0},elemInsertMethod:"appendTo",elemInsertSelector:"body"},e[t].configuration.classNames[n]={fixed:"Fixed",sticky:"Sticky"};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu iconPanels add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="iconPanels";e[t].addons[n]={setup:function(){var s=this,a=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof a&&(a={add:a}),"number"==typeof a&&(a={add:!0,visible:a}),"object"!=typeof a&&(a={}),a=this.opts[n]=e.extend(!0,{},e[t].defaults[n],a),a.visible++,a.add){for(var r="",l=0;l<=a.visible;l++)r+=" "+i.iconpanel+"-"+l;r.length&&(r=r.slice(1));var d=function(t){t.hasClass(i.vertical)||s.$pnls.children("."+i.panel).removeClass(r).filter("."+i.subopened).removeClass(i.hidden).add(t).not("."+i.vertical).slice(-a.visible).each(function(t){e(this).addClass(i.iconpanel+"-"+t)})};this.bind("initMenu:after",function(){this.$menu.addClass(i.iconpanel)}),this.bind("openPanel:start",d),this.bind("initPanels:after",function(e){d.call(s,s.$pnls.children("."+i.opened))}),this.bind("initListview:after",function(e){e.hasClass(i.vertical)||e.children("."+i.subblocker).length||e.prepend('<a href="#'+e.closest("."+i.panel).attr("id")+'" class="'+i.subblocker+'" />')})}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("iconpanel subblocker")},clickAnchor:function(e,t){}},e[t].defaults[n]={add:!1,visible:3};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu keyboardNavigation add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){function t(t,n){t=t||this.$pnls.children("."+a.opened);var i=e(),s=this.$menu.children("."+a.mm("navbars-top")+", ."+a.mm("navbars-bottom")).children("."+a.navbar);s.find(d).filter(":focus").length||("default"==n&&(i=t.children("."+a.listview).find("a[href]").not("."+a.hidden),i.length||(i=t.find(d).not("."+a.hidden)),i.length||(i=s.find(d).not("."+a.hidden))),i.length||(i=this.$menu.children("."+a.tabstart)),i.first().focus())}function n(e){e||(e=this.$pnls.children("."+a.opened));var t=this.$pnls.children("."+a.panel),n=t.not(e);n.find(d).attr("tabindex",-1),e.find(d).attr("tabindex",0),e.find("."+a.mm("toggle")+", ."+a.mm("check")).attr("tabindex",-1),e.children("."+a.navbar).children("."+a.title).attr("tabindex",-1)}var i="mmenu",s="keyboardNavigation";e[i].addons[s]={setup:function(){if(!e[i].support.touch){var o=this.opts[s];this.conf[s];if(l=e[i].glbl,"boolean"!=typeof o&&"string"!=typeof o||(o={enable:o}),"object"!=typeof o&&(o={}),o=this.opts[s]=e.extend(!0,{},e[i].defaults[s],o),o.enable){var r=e('<button class="'+a.tabstart+'" tabindex="0" type="button" />'),d=e('<button class="'+a.tabend+'" tabindex="0" type="button" />');this.bind("initMenu:after",function(){o.enhance&&this.$menu.addClass(a.keyboardfocus),this["_initWindow_"+s](o.enhance)}),this.bind("initOpened:before",function(){this.$menu.prepend(r).append(d).children("."+a.mm("navbars-top")+", ."+a.mm("navbars-bottom")).children("."+a.navbar).children("a."+a.title).attr("tabindex",-1)}),this.bind("open:start",function(){n.call(this)}),this.bind("open:finish",function(){t.call(this,null,o.enable)}),this.bind("openPanel:start",function(e){n.call(this,e)}),this.bind("openPanel:finish",function(e){t.call(this,e,o.enable)}),this.bind("initOpened:after",function(){this.__sr_aria(this.$menu.children("."+a.mm("tabstart")+", ."+a.mm("tabend")),"hidden",!0)})}}},add:function(){a=e[i]._c,o=e[i]._d,r=e[i]._e,a.add("tabstart tabend keyboardfocus"),r.add("focusin keydown")},clickAnchor:function(e,t){}},e[i].defaults[s]={enable:!1,enhance:!1},e[i].configuration[s]={},e[i].prototype["_initWindow_"+s]=function(t){l.$wndw.off(r.keydown+"-offCanvas"),l.$wndw.off(r.focusin+"-"+s).on(r.focusin+"-"+s,function(t){if(l.$html.hasClass(a.opened)){var n=e(t.target);n.is("."+a.tabend)&&n.parent().find("."+a.tabstart).focus()}}),l.$wndw.off(r.keydown+"-"+s).on(r.keydown+"-"+s,function(t){var n=e(t.target),i=n.closest("."+a.menu);if(i.length){i.data("mmenu");if(n.is("input, textarea"));else switch(t.keyCode){case 13:(n.is(".mm-toggle")||n.is(".mm-check"))&&n.trigger(r.click);break;case 32:case 37:case 38:case 39:case 40:t.preventDefault()}}}),t&&l.$wndw.off(r.keydown+"-"+s).on(r.keydown+"-"+s,function(t){var n=e(t.target),i=n.closest("."+a.menu);if(i.length){var s=i.data("mmenu");if(n.is("input, textarea"))switch(t.keyCode){case 27:n.val("")}else switch(t.keyCode){case 8:var r=n.closest("."+a.panel).data(o.parent);r&&r.length&&s.openPanel(r.closest("."+a.panel));break;case 27:i.hasClass(a.offcanvas)&&s.close()}}})};var a,o,r,l,d="input, select, textarea, button, label, a[href]"}(jQuery),/*
    - * jQuery mmenu lazySubmenus add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="lazySubmenus";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];o=e[t].glbl,"boolean"==typeof s&&(s={load:s}),"object"!=typeof s&&(s={}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),s.load&&(this.bind("initMenu:after",function(){this.$pnls.find("li").children(this.conf.panelNodetype).not("."+i.inset).not("."+i.nolistview).not("."+i.nopanel).addClass(i.lazysubmenu+" "+i.nolistview+" "+i.nopanel)}),this.bind("initPanels:before",function(e){e=e||this.$pnls.children(this.conf.panelNodetype),this.__findAddBack(e,"."+i.lazysubmenu).not("."+i.lazysubmenu+" ."+i.lazysubmenu).removeClass(i.lazysubmenu+" "+i.nolistview+" "+i.nopanel)}),this.bind("initOpened:before",function(){var e=this.$pnls.find("."+this.conf.classNames.selected).parents("."+i.lazysubmenu);e.length&&(e.removeClass(i.lazysubmenu+" "+i.nolistview+" "+i.nopanel),this.initPanels(e.last()))}),this.bind("openPanel:before",function(e){var t=this.__findAddBack(e,"."+i.lazysubmenu).not("."+i.lazysubmenu+" ."+i.lazysubmenu);t.length&&this.initPanels(t)}))},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("lazysubmenu"),s.add("lazysubmenu")},clickAnchor:function(e,t){}},e[t].defaults[n]={load:!1},e[t].configuration[n]={};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu navbar add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="navbars";e[t].addons[n]={setup:function(){var s=this,a=this.opts[n],r=this.conf[n];if(o=e[t].glbl,"undefined"!=typeof a){a instanceof Array||(a=[a]);var l={},d={};a.length&&(e.each(a,function(o){var c=a[o];"boolean"==typeof c&&c&&(c={}),"object"!=typeof c&&(c={}),"undefined"==typeof c.content&&(c.content=["prev","title"]),c.content instanceof Array||(c.content=[c.content]),c=e.extend(!0,{},s.opts.navbar,c);var h=e('<div class="'+i.navbar+'" />'),f=c.height;"number"!=typeof f&&(f=1),f=Math.min(4,Math.max(1,f)),h.addClass(i.navbar+"-size-"+f);var u=c.position;"bottom"!=u&&(u="top"),l[u]||(l[u]=0),l[u]+=f,d[u]||(d[u]=e('<div class="'+i.navbars+"-"+u+'" />')),d[u].append(h);for(var p=0,v=0,m=c.content.length;v<m;v++){var b=e[t].addons[n][c.content[v]]||!1;b?p+=b.call(s,h,c,r):(b=c.content[v],b instanceof e||(b=e(c.content[v])),h.append(b))}p+=Math.ceil(h.children().not("."+i.btn).length/f),p>1&&h.addClass(i.navbar+"-content-"+p),h.children("."+i.btn).length&&h.addClass(i.hasbtns)}),this.bind("initMenu:after",function(){for(var e in l)this.$menu.addClass(i.hasnavbar+"-"+e+"-"+l[e]),this.$menu["bottom"==e?"append":"prepend"](d[e])}))}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("navbars close hasbtns")},clickAnchor:function(e,t){}},e[t].configuration[n]={breadcrumbSeparator:"/"},e[t].configuration.classNames[n]={};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu navbar add-on breadcrumbs content
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="navbars",i="breadcrumbs";e[t].addons[n][i]=function(n,i,s){var a=this,o=e[t]._c,r=e[t]._d;o.add("breadcrumbs separator");var l=e('<span class="'+o.breadcrumbs+'" />').appendTo(n);return this.bind("initNavbar:after",function(t){t.removeClass(o.hasnavbar);for(var n=[],i=e('<span class="'+o.breadcrumbs+'"></span>'),a=t,l=!0;a&&a.length;){if(a.is("."+o.panel)||(a=a.closest("."+o.panel)),!a.hasClass(o.vertical)){var d=a.children("."+o.navbar).children("."+o.title).text();n.unshift(l?"<span>"+d+"</span>":'<a href="#'+a.attr("id")+'">'+d+"</a>"),l=!1}a=a.data(r.parent)}i.append(n.join('<span class="'+o.separator+'">'+s.breadcrumbSeparator+"</span>")).appendTo(t.children("."+o.navbar))}),this.bind("openPanel:start",function(e){l.html(e.children("."+o.navbar).children("."+o.breadcrumbs).html()||"")}),this.bind("initNavbar:after:sr-aria",function(t){t.children("."+o.navbar).children("."+o.breadcrumbs).children("a").each(function(){a.__sr_aria(e(this),"owns",e(this).attr("href").slice(1))})}),0}}(jQuery),/*
    - * jQuery mmenu navbar add-on close content
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="navbars",i="close";e[t].addons[n][i]=function(n,i){var s=e[t]._c,a=(e[t].glbl,e('<a class="'+s.close+" "+s.btn+'" href="#" />').appendTo(n));return this.bind("setPage:after",function(e){a.attr("href","#"+e.attr("id"))}),this.bind("setPage:after:sr-text",function(n){a.html(this.__sr_text(e[t].i18n(this.conf.screenReader.text.closeMenu))),this.__sr_aria(a,"owns",a.attr("href").slice(1))}),-1}}(jQuery),/*
    - * jQuery mmenu navbar add-on next content
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="navbars",i="next";e[t].addons[n][i]=function(i,s){var a,o,r,l=e[t]._c,d=e('<a class="'+l.next+" "+l.btn+'" href="#" />').appendTo(i);return this.bind("openPanel:start",function(e){a=e.find("."+this.conf.classNames[n].panelNext),o=a.attr("href"),r=a.html(),o?d.attr("href",o):d.removeAttr("href"),d[o||r?"removeClass":"addClass"](l.hidden),d.html(r)}),this.bind("openPanel:start:sr-aria",function(e){this.__sr_aria(d,"hidden",d.hasClass(l.hidden)),this.__sr_aria(d,"owns",(d.attr("href")||"").slice(1))}),-1},e[t].configuration.classNames[n].panelNext="Next"}(jQuery),/*
    - * jQuery mmenu navbar add-on prev content
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="navbars",i="prev";e[t].addons[n][i]=function(i,s){var a=e[t]._c,o=e('<a class="'+a.prev+" "+a.btn+'" href="#" />').appendTo(i);this.bind("initNavbar:after",function(e){e.removeClass(a.hasnavbar)});var r,l,d;return this.bind("openPanel:start",function(e){e.hasClass(a.vertical)||(r=e.find("."+this.conf.classNames[n].panelPrev),r.length||(r=e.children("."+a.navbar).children("."+a.prev)),l=r.attr("href"),d=r.html(),l?o.attr("href",l):o.removeAttr("href"),o[l||d?"removeClass":"addClass"](a.hidden),o.html(d))}),this.bind("initNavbar:after:sr-aria",function(e){var t=e.children("."+a.navbar);this.__sr_aria(t,"hidden",!0)}),this.bind("openPanel:start:sr-aria",function(e){this.__sr_aria(o,"hidden",o.hasClass(a.hidden)),this.__sr_aria(o,"owns",(o.attr("href")||"").slice(1))}),-1},e[t].configuration.classNames[n].panelPrev="Prev"}(jQuery),/*
    - * jQuery mmenu navbar add-on searchfield content
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="navbars",i="searchfield";e[t].addons[n][i]=function(n,i){var s=e[t]._c,a=e('<div class="'+s.search+'" />').appendTo(n);return"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=a,0}}(jQuery),/*
    - * jQuery mmenu navbar add-on title content
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="navbars",i="title";e[t].addons[n][i]=function(i,s){var a,o,r,l=e[t]._c,d=e('<a class="'+l.title+'" />').appendTo(i);this.bind("openPanel:start",function(e){e.hasClass(l.vertical)||(r=e.find("."+this.conf.classNames[n].panelTitle),r.length||(r=e.children("."+l.navbar).children("."+l.title)),a=r.attr("href"),o=r.html()||s.title,a?d.attr("href",a):d.removeAttr("href"),d[a||o?"removeClass":"addClass"](l.hidden),d.html(o))});var c;return this.bind("openPanel:start:sr-aria",function(e){if(this.opts.screenReader.text&&(c||(c=this.$menu.children("."+l.navbars+"-top, ."+l.navbars+"-bottom").children("."+l.navbar).children("."+l.prev)),c.length)){var t=!0;"parent"==this.opts.navbar.titleLink&&(t=!c.hasClass(l.hidden)),this.__sr_aria(d,"hidden",t)}}),0},e[t].configuration.classNames[n].panelTitle="Title"}(jQuery),/*
    - * jQuery mmenu pageScroll add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){function t(e){d&&d.length&&d.is(":visible")&&l.$html.add(l.$body).animate({scrollTop:d.offset().top+e}),d=!1}function n(e){try{return!("#"==e||"#"!=e.slice(0,1)||!l.$page.find(e).length)}catch(t){return!1}}var i="mmenu",s="pageScroll";e[i].addons[s]={setup:function(){var o=this,d=this.opts[s],c=this.conf[s];if(l=e[i].glbl,"boolean"==typeof d&&(d={scroll:d}),d=this.opts[s]=e.extend(!0,{},e[i].defaults[s],d),d.scroll&&this.bind("close:finish",function(){t(c.scrollOffset)}),d.update){var o=this,h=[],f=[];o.bind("initListview:after",function(t){o.__filterListItemAnchors(t.find("."+a.listview).children("li")).each(function(){var t=e(this).attr("href");n(t)&&h.push(t)}),f=h.reverse()});var u=-1;l.$wndw.on(r.scroll+"-"+s,function(t){for(var n=l.$wndw.scrollTop(),i=0;i<f.length;i++)if(e(f[i]).offset().top<n+c.updateOffset){u!==i&&(u=i,o.setSelected(o.__filterListItemAnchors(o.$pnls.children("."+a.opened).find("."+a.listview).children("li")).filter('[href="'+f[i]+'"]').parent()));break}})}},add:function(){a=e[i]._c,o=e[i]._d,r=e[i]._e},clickAnchor:function(i,o){if(d=!1,o&&this.opts[s].scroll&&this.opts.offCanvas&&l.$page&&l.$page.length){var r=i.attr("href");n(r)&&(d=e(r),l.$html.hasClass(a.mm("widescreen"))&&t(this.conf[s].scrollOffset))}}},e[i].defaults[s]={scroll:!1,update:!1},e[i].configuration[s]={scrollOffset:0,updateOffset:50};var a,o,r,l,d=!1}(jQuery),/*
    - * jQuery mmenu RTL add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="rtl";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];o=e[t].glbl,"object"!=typeof s&&(s={use:s}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),"boolean"!=typeof s.use&&(s.use="rtl"==(o.$html.attr("dir")||"").toLowerCase()),s.use&&this.bind("initMenu:after",function(){this.$menu.addClass(i.rtl)})},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("rtl")},clickAnchor:function(e,t){}},e[t].defaults[n]={use:"detect"};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu searchfield add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){function t(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",i="searchfield";e[n].addons[i]={setup:function(){var l=this,d=this.opts[i],c=this.conf[i];r=e[n].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),"boolean"==typeof d.resultsPanel&&(d.resultsPanel={add:d.resultsPanel}),d=this.opts[i]=e.extend(!0,{},e[n].defaults[i],d),c=this.conf[i]=e.extend(!0,{},e[n].configuration[i],c),this.bind("close:start",function(){this.$menu.find("."+s.search).find("input").blur()}),this.bind("initPanels:after",function(r){if(d.add){var h;switch(d.addTo){case"panels":h=r;break;default:h=this.$menu.find(d.addTo)}if(h.each(function(){var t=e(this);if(!t.is("."+s.panel)||!t.is("."+s.vertical)){if(!t.children("."+s.search).length){var i=l.__valueOrFn(c.clear,t),a=l.__valueOrFn(c.form,t),r=l.__valueOrFn(c.input,t),h=l.__valueOrFn(c.submit,t),f=e("<"+(a?"form":"div")+' class="'+s.search+'" />'),u=e('<input placeholder="'+e[n].i18n(d.placeholder)+'" type="text" autocomplete="off" />');f.append(u);var p;if(r)for(p in r)u.attr(p,r[p]);if(i&&e('<a class="'+s.btn+" "+s.clear+'" href="#" />').appendTo(f).on(o.click+"-searchfield",function(e){e.preventDefault(),u.val("").trigger(o.keyup+"-searchfield")}),a){for(p in a)f.attr(p,a[p]);h&&!i&&e('<a class="'+s.btn+" "+s.next+'" href="#" />').appendTo(f).on(o.click+"-searchfield",function(e){e.preventDefault(),f.submit()})}t.hasClass(s.search)?t.replaceWith(f):t.prepend(f).addClass(s.hassearch)}if(d.noResults){var v=t.closest("."+s.panel).length;if(v||(t=l.$pnls.children("."+s.panel).first()),!t.children("."+s.noresultsmsg).length){var m=t.children("."+s.listview).first(),b=e('<div class="'+s.noresultsmsg+" "+s.hidden+'" />');b.append(e[n].i18n(d.noResults))[m.length?"insertAfter":"prependTo"](m.length?m:t)}}}}),d.search){if(d.resultsPanel.add){d.showSubPanels=!1;var f=this.$pnls.children("."+s.resultspanel);f.length||(f=e('<div class="'+s.resultspanel+" "+s.noanimation+" "+s.hidden+'" />').appendTo(this.$pnls).append('<div class="'+s.navbar+" "+s.hidden+'"><a class="'+s.title+'">'+e[n].i18n(d.resultsPanel.title)+"</a></div>").append('<ul class="'+s.listview+'" />').append(this.$pnls.find("."+s.noresultsmsg).first().clone()),this._initPanel(f))}this.$menu.find("."+s.search).each(function(){var n,r,c=e(this),h=c.closest("."+s.panel).length;h?(n=c.closest("."+s.panel),r=n):(n=l.$pnls.find("."+s.panel),r=l.$menu),d.resultsPanel.add&&(n=n.not(f));var u=c.children("input"),p=l.__findAddBack(n,"."+s.listview).children("li"),v=p.filter("."+s.divider),m=l.__filterListItems(p),b="a",g=b+", span",_="",y=function(){var t=u.val().toLowerCase();if(t!=_){if(_=t,d.resultsPanel.add&&f.children("."+s.listview).empty(),n.scrollTop(0),m.add(v).addClass(s.hidden).find("."+s.fullsubopensearch).removeClass(s.fullsubopen+" "+s.fullsubopensearch),m.each(function(){var t=e(this),n=b;(d.showTextItems||d.showSubPanels&&t.find("."+s.next))&&(n=g);var i=t.data(a.searchtext)||t.children(n).not("."+s.next).text();i.toLowerCase().indexOf(_)>-1&&t.add(t.prevAll("."+s.divider).first()).removeClass(s.hidden)}),d.showSubPanels&&n.each(function(t){var n=e(this);l.__filterListItems(n.find("."+s.listview).children()).each(function(){var t=e(this),n=t.data(a.child);t.removeClass(s.nosubresults),n&&n.find("."+s.listview).children().removeClass(s.hidden)})}),d.resultsPanel.add)if(""===_)this.closeAllPanels(this.$pnls.children("."+s.subopened).last());else{var i=e();n.each(function(){var t=l.__filterListItems(e(this).find("."+s.listview).children()).not("."+s.hidden).clone(!0);t.length&&(d.resultsPanel.dividers&&(i=i.add('<li class="'+s.divider+'">'+e(this).children("."+s.navbar).children("."+s.title).text()+"</li>")),t.children("."+s.mm("toggle")+", ."+s.mm("check")).remove(),i=i.add(t))}),i.find("."+s.next).remove(),f.children("."+s.listview).append(i),this.openPanel(f)}else e(n.get().reverse()).each(function(t){var n=e(this),i=n.data(a.parent);i&&(l.__filterListItems(n.find("."+s.listview).children()).length?(i.hasClass(s.hidden)&&i.children("."+s.next).not("."+s.fullsubopen).addClass(s.fullsubopen).addClass(s.fullsubopensearch),i.removeClass(s.hidden).removeClass(s.nosubresults).prevAll("."+s.divider).first().removeClass(s.hidden)):h||((n.hasClass(s.opened)||n.hasClass(s.subopened))&&setTimeout(function(){l.openPanel(i.closest("."+s.panel))},(t+1)*(1.5*l.conf.openingInterval)),i.addClass(s.nosubresults)))});r.find("."+s.noresultsmsg)[m.not("."+s.hidden).length?"addClass":"removeClass"](s.hidden),this.trigger("updateListview")}};u.off(o.keyup+"-"+i+" "+o.change+"-"+i).on(o.keyup+"-"+i,function(e){t(e.keyCode)||y.call(l)}).on(o.change+"-"+i,function(e){y.call(l)});var C=c.children("."+s.btn);C.length&&u.on(o.keyup+"-"+i,function(e){C[u.val().length?"removeClass":"addClass"](s.hidden)}),u.trigger(o.keyup+"-"+i)})}}})},add:function(){s=e[n]._c,a=e[n]._d,o=e[n]._e,s.add("clear search hassearch resultspanel noresultsmsg noresults nosubresults fullsubopensearch"),a.add("searchtext"),o.add("change keyup")},clickAnchor:function(e,t){}},e[n].defaults[i]={add:!1,addTo:"panels",placeholder:"Search",noResults:"No results found.",resultsPanel:{add:!1,dividers:!0,title:"Search results"},search:!0,showTextItems:!1,showSubPanels:!0},e[n].configuration[i]={clear:!1,form:!1,input:!1,submit:!1};var s,a,o,r}(jQuery),/*
    - * jQuery mmenu sectionIndexer add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="sectionIndexer";e[t].addons[n]={setup:function(){var s=this,r=this.opts[n];this.conf[n];o=e[t].glbl,"boolean"==typeof r&&(r={add:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),this.bind("initPanels:after",function(t){if(r.add){var o;switch(r.addTo){case"panels":o=t;break;default:o=e(r.addTo,this.$menu).filter("."+i.panel)}o.find("."+i.divider).closest("."+i.panel).addClass(i.hasindexer),this.$indexer||(this.$indexer=e('<div class="'+i.indexer+'" />').prependTo(this.$pnls).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>'),this.$indexer.children().on(a.mouseover+"-"+n+" "+a.touchstart+"-"+n,function(t){var n=e(this).attr("href").slice(1),a=s.$pnls.children("."+i.opened),o=a.find("."+i.listview),r=-1,l=a.scrollTop();a.scrollTop(0),o.children("."+i.divider).not("."+i.hidden).each(function(){r<0&&n==e(this).text().slice(0,1).toLowerCase()&&(r=e(this).position().top)}),a.scrollTop(r>-1?r:l)}));var l=function(e){e=e||this.$pnls.children("."+i.opened),this.$menu[(e.hasClass(i.hasindexer)?"add":"remove")+"Class"](i.hasindexer)};this.bind("openPanel:start",l),this.bind("initPanels:after",l)}})},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("indexer hasindexer"),a.add("mouseover")},clickAnchor:function(e,t){if(e.parent().is("."+i.indexer))return!0}},e[t].defaults[n]={add:!1,addTo:"panels"};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu setSelected add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="setSelected";e[t].addons[n]={setup:function(){var a=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof r&&(r={hover:r,parent:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),"detect"==r.current){var l=function(e){e=e.split("?")[0].split("#")[0];var t=a.$menu.find('a[href="'+e+'"], a[href="'+e+'/"]');t.length?a.setSelected(t.parent(),!0):(e=e.split("/").slice(0,-1),e.length&&l(e.join("/")))};this.bind("initMenu:after",function(){l(window.location.href)})}else r.current||this.bind("initListview:after",function(e){this.$pnls.find("."+i.listview).children("."+i.selected).removeClass(i.selected)});r.hover&&this.bind("initMenu:after",function(){this.$menu.addClass(i.hoverselected)}),r.parent&&(this.bind("openPanel:finish",function(e){this.$pnls.find("."+i.listview).find("."+i.next).removeClass(i.selected);for(var t=e.data(s.parent);t;)t.not("."+i.vertical).children("."+i.next).addClass(i.selected),t=t.closest("."+i.panel).data(s.parent)}),this.bind("initMenu:after",function(){this.$menu.addClass(i.parentselected)}))},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("hoverselected parentselected")},clickAnchor:function(e,t){}},e[t].defaults[n]={current:!0,hover:!1,parent:!1};var i,s,a,o}(jQuery),/*
    - * jQuery mmenu toggles add-on
    - * mmenu.frebsite.nl
    - *
    - * Copyright (c) Fred Heusschen
    - */
    -function(e){var t="mmenu",n="toggles";e[t].addons[n]={setup:function(){var s=this;this.opts[n],this.conf[n];o=e[t].glbl,this.bind("initListview:after",function(t){this.__refactorClass(t.find("input"),this.conf.classNames[n].toggle,"toggle"),this.__refactorClass(t.find("input"),this.conf.classNames[n].check,"check"),t.find("input."+i.toggle+", input."+i.check).each(function(){var t=e(this),n=t.closest("li"),a=t.hasClass(i.toggle)?"toggle":"check",o=t.attr("id")||s.__getUniqueId();n.children('label[for="'+o+'"]').length||(t.attr("id",o),n.prepend(t),e('<label for="'+o+'" class="'+i[a]+'"></label>').insertBefore(n.children("a, span").last()))})})},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("toggle check")},clickAnchor:function(e,t){}},e[t].configuration.classNames[n]={toggle:"Toggle",check:"Check"};var i,s,a,o}(jQuery);
    -return true;
    -}));
    diff --git a/doc/slihelp_generator/assets/js/jquery.sldr.js b/doc/slihelp_generator/assets/js/jquery.sldr.js
    deleted file mode 100644
    index 4a56afd4e4..0000000000
    --- a/doc/slihelp_generator/assets/js/jquery.sldr.js
    +++ /dev/null
    @@ -1,786 +0,0 @@
    -/*
    - * jquery.sldr
    - *
    - * A content slider featuring responsive slides, flexible slide widths, callbacks,
    - * and custom animation hooks.
    - *
    - * Version: 1.1
    - * Minimum requirements: Developed with jQuery 1.10.2, May work with older versions.
    - *
    - * The MIT License (MIT)
    - *
    - * Copyright (c) 2014 Devon Hirth
    - *
    - * Permission is hereby granted, free of charge, to any person obtaining a copy of
    - * this software and associated documentation files (the "Software"), to deal in
    - * the Software without restriction, including without limitation the rights to
    - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
    - * the Software, and to permit persons to whom the Software is furnished to do so,
    - * subject to the following conditions:
    - *
    - * The above copyright notice and this permission notice shall be included in all
    - * copies or substantial portions of the Software.
    - *
    - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
    - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
    - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
    - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    - *
    - */
    -
    -( function( $ ) {
    -
    -var $win = $( window );
    -
    -$.sldr = function( el , options ) {
    -
    -	var base    = this;
    -	base.$el    = $( el );
    -	base.el     = el;
    -	base.$elwrp = $( el ).children();
    -	base.$el.data( "sldr" , base );
    -
    -	/**
    -	 * Plugin Vars
    -	 */
    -	base.callback       = new Array();
    -	base.sldrSlides     = new Array();
    -	base.sldrLoadSlides = new Array();
    -	base.$sliderTimers  = new Array();
    -	base.$resizeTimers  = new Array();
    -	base.$delayTimers   = new Array();
    -
    -	base.wrp            = base.$el.children();
    -	base.elmnts         = base.wrp.children();
    -	base.elmntsHTML     = base.wrp.html();
    -
    -	base.benchcoordinate      = {};
    -	base.prevcoordinate       = {};
    -	base.cursorcoordinate     = {};
    -	base.thiscoordinate       = {};
    -	base.coordinatedifference = 0;
    -	base.dragdifference       = 0;
    -	base.trackmouse           = false;
    -	base.pagescrollY          = 0;
    -
    -	base.transformposition = 0;
    -
    -	/**
    -	 * Initializing function
    -	 * @return void
    -	 */
    -	base.init = function() {
    -
    -		base.config = $.extend( {} , $.sldr.defaultOptions , options );
    -
    -		base.browser();
    -
    -		var sldr       = base.$el;
    -		var wrp        = base.$elwrp;
    -		var elmnts     = wrp.children();
    -		var elmntsHTML = wrp.html();
    -		var postLoad   = false;
    -
    -		/**
    -		 * Build Slide Array
    -		 * @type {Number}
    -		 */
    -		if ( base.sldrSlides == '' ) {
    -
    -			base.callback = {
    -				'sldr'              : base.$el,
    -				'prevFocalIndex'    : '',
    -				'prevSlideNum'      : '',
    -				'currentFocalIndex' : '',
    -				'currentClass'      : '',
    -				'currentID'         : '',
    -				'currentFocalPoint' : '',
    -				'currentSlideNum'   : '',
    -				'shiftWidth'        : '',
    -				'nextFocalIndex'    : '',
    -				'nextSlideNum'      : ''
    -			};
    -
    -			for ( var i = 1; i < elmnts.length + 1; i++ ) {
    -
    -				var slide     = elmnts.eq( i - 1 );
    -				var slideLoad = slide.find( '.sldr-load' )
    -				base.sldrSlides.push({
    -					'sld'        : slide,
    -					'slideNum'   : i,
    -					'id'         : slide.attr( 'id' ),
    -					'class_name' : slide.attr( 'class' ).split(' ')[0],
    -					'html'       : slide.html()
    -				});
    -
    -				if ( slideLoad.hasClass( 'sldr-load' ) ) {
    -					postLoad = true;
    -					base.sldrLoadSlides.push({
    -						'slideNum'   : i,
    -						'id'         : slide.attr( 'id' ),
    -						'class_name' : slide.attr( 'class' ).split(' ')[0],
    -						'html'       : slide.html()
    -					});
    -				}
    -			}
    -		}
    -
    -		/**
    -		 * Do not finish initiating plugin if there is only one slide.
    -		 */
    -		if ( elmnts.length <= 1 ) {
    -			elmnts.eq( 0 ).addClass( base.config.focalClass );
    -			base.sliderInit( { 'slides' : base.sldrSlides , 'callback' : base.callback , 'config' : base.config } );
    -			base.sliderLoaded( { 'slides' : base.sldrSlides , 'callback' : base.callback , 'config' : base.config } );
    -		}
    -
    -		/**
    -		 * Fill Gaps (if any)
    -		 */
    -		if ( elmnts.length > 1 ) base.fillGaps( elmntsHTML );
    -
    -		/**
    -		 * sliderInit Callback
    -		 */
    -		base.sliderInit( { 'slides' : base.sldrSlides , 'callback' : base.callback , 'config' : base.config } );
    -
    -		/**
    -		 * Center Slides
    -		 */
    -		base.focalChange( 1 );
    -		base.resizeElements();
    -
    -		/**
    -		 * Activate Selectors
    -		 */
    -		if ( base.config.selectors != '' ) {
    -			base.config.selectors.eq( 0 ).addClass( base.config.focalClass );
    -			base.config.selectors.click( function(e) {
    -				var th = $( this );
    -				var change  = base.focalChange( th.index() + 1 , 'selectors' );
    -				base.animate( change );
    -				th.siblings().removeClass( base.config.focalClass );
    -				th.addClass( base.config.focalClass );
    -				e.preventDefault();
    -			});
    -
    -			if ( base.config.sldrAuto ) {
    -				base.config.selectors.bind( 'mouseenter' , function() {
    -					base.sliderPause();
    -				});
    -				base.config.selectors.bind( 'mouseleave' , function() {
    -					base.sliderTimer();
    -				});
    -			}
    -		}
    -
    -		if ( base.config.nextSlide != '' ) {
    -			base.config.nextSlide.click( function(e) {
    -				if ( base.config.selectors != '' ) {
    -					base.config.selectors.removeClass( base.config.focalClass );
    -					base.config.selectors.eq( base.callback.nextSlideNum - 1 ).addClass( base.config.focalClass );
    -				}
    -				var change  = base.focalChange( base.callback.nextSlideNum , 'next' );
    -				base.animate( change );
    -				e.preventDefault();
    -			});
    -
    -			if ( base.config.sldrAuto ) {
    -				base.config.nextSlide.bind( 'mouseenter' , function() {
    -					base.sliderPause();
    -				});
    -				base.config.nextSlide.bind( 'mouseleave' , function() {
    -					base.sliderTimer();
    -				});
    -			}
    -		}
    -
    -		if ( base.config.previousSlide != '' ) {
    -			base.config.previousSlide.click( function(e) {
    -				if ( base.config.selectors != '' ) {
    -					base.config.selectors.removeClass( base.config.focalClass );
    -					base.config.selectors.eq( base.callback.prevSlideNum - 1 ).addClass( base.config.focalClass );
    -				}
    -				var change  = base.focalChange( base.callback.prevSlideNum , 'prev' );
    -				base.animate( change );
    -				e.preventDefault();
    -			});
    -
    -			if ( base.config.sldrAuto ) {
    -				base.config.previousSlide.bind( 'mouseenter' , function() {
    -					base.sliderPause();
    -				});
    -				base.config.previousSlide.bind( 'mouseleave' , function() {
    -					base.sliderTimer();
    -				});
    -			}
    -		}
    -
    -		if ( base.config.swipeDragDesktop || base.isMobile() ) {
    -
    -			base.$elwrp.bind( 'mousemove touchmove' , base.coordinateevents );
    -
    -			base.$elwrp.bind( 'mousedown touchstart' , function( event ) {
    -				var xtf;
    -
    -				if ( base.pagescrollY !== window.pageYOffset ) return;
    -
    -				event.preventDefault();
    -				base.trackmouse = true;
    -				base.$elwrp.removeClass( 'animate' );
    -				base.transformposition = parseInt( base.getTranslatePosition( base.$elwrp.css( base.config.cssPrefix + 'transform' ) , 4 ) );
    -				if ( event.originalEvent.touches !== undefined ) {
    -					base.benchcoordinate = { x : event.originalEvent.touches[0].pageX , y : event.originalEvent.touches[0].pageY , trans : base.transformposition };
    -				} else {
    -					base.benchcoordinate = { x : event.clientX , y : event.clientY , trans : base.transformposition };
    -				}
    -				base.prevcoordinate = base.benchcoordinate;
    -				base.coordinateevents( event );
    -			});
    -
    -			base.$elwrp.bind( 'mouseup touchend' , function( event ) {
    -				var change;
    -
    -				if ( base.pagescrollY !== window.pageYOffset ) return;
    -
    -				event.preventDefault();
    -				base.trackmouse = false;
    -				base.coordinatedifference = base.benchcoordinate.x - base.cursorcoordinate.x;
    -				if ( base.coordinatedifference > 0 && base.coordinatedifference > base.$el.width() / base.config.swipeDragCoefficient ) {
    -					change = base.focalChange( base.callback.nextSlideNum , 'next' );
    -				} else if ( base.coordinatedifference < 0 && -(base.coordinatedifference) > base.$el.width() / base.config.swipeDragCoefficient ) {
    -					change = base.focalChange( base.callback.prevSlideNum , 'prev' );
    -				} else if ( base.config.swipeDragSnapBack ) {
    -					base.$elwrp.addClass( 'animate' );
    -					base.$elwrp.css( base.config.cssPrefix + 'transform' , 'translate3d( ' + base.benchcoordinate.trans + 'px , 0 , 0 )' );
    -				}
    -				base.animate( change );
    -			});
    -
    -		}
    -
    -		if ( elmnts.length > 1 ) base.sliderTimer();
    -
    -		/**
    -		 * Activate Resize
    -		 */
    -		$win.bind( 'resize' , function( e ) {
    -			base.$resizeTimers[base.config.sldrNumber] = setTimeout( function() {
    -				base.sliderPause();
    -				base.resizeElements();
    -				if ( elmnts.length > 1 ) base.sliderTimer();
    -			} , base.config.resizeDelay );
    -		});
    -
    -		base.resizeElements();
    -
    -		var change = {
    -			'currentFocalIndex' : base.$el.find( '.' + base.config.focalClass ).index(),
    -			'currentFocalPoint' : base.findFocalPoint(),
    -			'shiftWidth'        : 0
    -		};
    -		base.positionFocus( change );
    -
    -		base.sliderLoaded( { 'slides' : base.sldrSlides , 'callback' : base.callback , 'config' : base.config } );
    -
    -	};
    -
    -	/**
    -	  * change the focus of the slider and animate it
    -	  * @return void
    -	  */
    -	base.animate = function( change ) {
    -		try {
    -			if ( base.config.animate != '' && base.config.animate ) {
    -				base.config.animate( base.$el , change , { 'slides' : base.sldrSlides , 'callback' : base.callback , 'config' : base.config } );
    -			} else {
    -				if ( !change ) return;
    -				var curr, tf, easing;
    -				base.$delayTimers[base.config.sliderNumber] = setTimeout( function() {
    -					base.$elwrp.addClass( 'animate' );
    -					if ( base.config.animateJquery || base.config.isBrowser == 'MSIE 6' || base.config.isBrowser == 'MSIE 7' || base.config.isBrowser == 'MSIE 8' || base.config.isBrowser == 'MSIE 9' || base.config.animate != false ) {
    -						easing = ( $.easing && $.easing.easeInOutQuint ) ? base.config.animateJqueryEasing : 'linear';
    -						base.$elwrp.animate({
    -							marginLeft : base.config.offset - change.currentFocalPoint
    -						} , base.config.animateJqueryTiming , easing );
    -					} else {
    -						curr = base.config.offset - change.currentFocalPoint;
    -						base.$elwrp.css( base.config.cssPrefix + 'transform' , 'translate3d( ' + curr + 'px , 0 , 0 )' );
    -					}
    -					base.slideComplete( { 'slides' : base.sldrSlides , 'callback' : base.callback , 'config' : base.config } );
    -				} , 100 ); // Tiny delay needed for slider to adjust
    -			}
    -		} catch ( err ) { console.log( err.message ); }
    -	};
    -
    -	/**
    -	 * change the focus of the slider without animating it
    -	 * @param  {jquery selector object} the slide object
    -	 * @param  {number} change [description]
    -	 * @return void
    -	 */
    -	base.positionFocus = function( change ) {
    -		try {
    -			if ( !change ) return;
    -			var focus;
    -			base.$elwrp.removeClass( 'animate' );
    -			if ( base.config.animateJquery || base.config.isBrowser == 'MSIE 6' || base.config.isBrowser == 'MSIE 7' || base.config.isBrowser == 'MSIE 8' || base.config.isBrowser == 'MSIE 9' || base.config.animate != false ) {
    -				base.$elwrp.css( 'margin-left' , base.config.offset - change.currentFocalPoint );
    -			} else {
    -				if ( base.$elwrp.css( base.config.cssPrefix + 'transform' ) == 'none' ) base.$elwrp.css( base.config.cssPrefix + 'transform' , 'translate3d( 0 , 0 , 0 )' );
    -				focus = base.config.offset - change.currentFocalPoint;
    -				base.$elwrp.css( base.config.cssPrefix + 'transform' , 'translate3d(' + focus + 'px , 0  , 0 )' );
    -			}
    -			base.$delayTimers[base.config.sliderNumber] = setTimeout( function() {
    -				base.$elwrp.addClass( 'animate' );
    -				base.slideComplete( { 'slides' : base.sldrSlides , 'callback' : base.callback , 'config' : base.config } );
    -			} , base.config.resizeDelay + 1 ); // Tiny delay needed for slider to adjust
    -
    -		} catch ( err ) { console.log( err.message ); }
    -	};
    -
    -
    -	/**********************************************************
    -	 ****************** Positioning Functions *****************
    -	 **********************************************************/
    -
    -	/**
    -	 * Function to move focal point of the slider to previous or next slide.
    -	 * @param  {string} method ['prev' or 'previous' moves the slider backwards. Defaults to next.]
    -	 * @return {object}        The callback of the slider including slide number, slide index, previous, next slides etc.
    -	 */
    -	base.focalChange = function( focalChangeNum , method ) {
    -		try {
    -			method = typeof method !== 'undefined' ? method : 'default';
    -			var elmnts     = base.$elwrp.children();
    -			var focalElmnt = base.$elwrp.find( '> .' + base.config.focalClass );
    -			var focalIndex = focalElmnt.index();
    -			var nextFocalIndex, nextFocalPoint, prevFocalIndex, focalPoint, shiftSlide, shiftSlideClone, shiftSlideWidth, direction, slideClass;
    -
    -			base.slideStart( { 'slides' : base.sldrSlides , 'callback' : base.callback , 'config' : base.config } );
    -
    -			/**
    -			 * Find the nearest index of the focal point we want.
    -			 * @type {integer}
    -			 */
    -			if ( !base.sldrSlides[ focalChangeNum - 1 ] ) return;
    -			slideClass = base.sldrSlides[ focalChangeNum - 1 ].class_name;
    -			slideClass = slideClass.split(' ');
    -			slideClass = slideClass[ 0 ];
    -
    -			if ( focalElmnt.hasClass( slideClass ) ) return false;
    -
    -			closerBehind  = elmnts.eq( focalIndex ).prevAll( '.' + slideClass + ':first' ).index();
    -			closerInFront = elmnts.eq( focalIndex ).nextAll( '.' + slideClass + ':first' ).index();
    -
    -			if (
    -				closerInFront != -1
    -				&& closerInFront - focalIndex < focalIndex - closerBehind
    -				|| closerInFront - focalIndex == focalIndex - closerBehind
    -				&& method != 'prev'
    -			) {
    -				nextFocalIndex = closerInFront;
    -			} else if ( closerBehind != -1 ) {
    -				nextFocalIndex = closerBehind;
    -			} else {
    -				nextFocalIndex = $( '.' + slideClass ).index();
    -			}
    -
    -			nextFocalPoint = elmnts.eq( nextFocalIndex );
    -			elmnts.removeClass( base.config.focalClass );
    -			nextFocalPoint.addClass( base.config.focalClass );
    -
    -			/**
    -			 * Find the range of elments in the slider to cut and paste, making it symmetrical.
    -			 * @type {Object}
    -			 */
    -			direction   = ( nextFocalIndex > parseInt( ( elmnts.length - 1 ) / 2 ) ) ? 'next' : 'prev';
    -			sliceStart  = ( direction == 'prev' ) ? parseInt( ( ( elmnts.length - nextFocalIndex + 1 ) / 2 ) + nextFocalIndex + 2 ) : 0;
    -			sliceEnd    = ( direction == 'prev' ) ? elmnts.length : parseInt( nextFocalIndex * 0.5 ) - 1;
    -			elmntsSlice = elmnts.slice( sliceStart , sliceEnd );
    -			elmntsClone = elmntsSlice.clone();
    -
    -			/**
    -			 * Find the width difference to shift the slider before animating.
    -			 * @type {Number}
    -			 */
    -			shiftSlideWidth = 0;
    -			for ( var i = 0; i < elmntsSlice.length; i++ ) {
    -				shiftSlideWidth = shiftSlideWidth + $( elmntsSlice[ i ] ).width();
    -			}
    -			shiftSlideWidth = ( direction == 'prev' ) ? -( shiftSlideWidth ) : shiftSlideWidth;
    -
    -			/**
    -			 * Shift the slider so the transition will appear seamless
    -			 */
    -			base.$elwrp.removeClass( 'animate' );
    -			if ( base.config.animateJquery || base.config.isBrowser == 'MSIE 6' || base.config.isBrowser == 'MSIE 7' || base.config.isBrowser == 'MSIE 8' || base.config.isBrowser == 'MSIE 9' || base.config.animate != false ) {
    -				// GET MARGIN PROPERTY
    -				curr = parseFloat( base.$elwrp.css( 'margin-left' ) );
    -				base.$elwrp.css( 'margin-left' , curr + shiftSlideWidth + 'px' );
    -			} else {
    -				// GET TRANSFORM PROPERTY
    -				if ( base.$elwrp.css( base.config.cssPrefix + 'transform' ) == 'none' ) base.$elwrp.css( base.config.cssPrefix + 'transform' , 'translate3d( 0 , 0 , 0 )' );
    -				matrixIndex = ( base.config.isIE ) ? 12 : 4;
    -				base.transformposition = parseInt( base.getTranslatePosition( base.$elwrp.css( base.config.cssPrefix + 'transform' ) , matrixIndex ) );
    -				curr = base.transformposition + shiftSlideWidth;
    -				base.$elwrp.css( base.config.cssPrefix + 'transform' , 'translate3d( ' + curr + 'px , 0 , 0 )' );
    -			}
    -
    -			/**
    -			 * Remove/Append/Prepend Slides back to slider.
    -			 */
    -			elmnts.slice( sliceStart , sliceEnd ).remove();
    -			if ( direction == 'prev' || direction == 'previous' ) {
    -				base.$elwrp.prepend( elmntsClone );
    -			} else {
    -				base.$elwrp.append( elmntsClone );
    -			}
    -
    -			/**
    -			 * Update $.sldr.callback.
    -			 * @type {Object}
    -			 */
    -			focalPoint        = base.findFocalPoint();
    -			currentFocalIndex = base.$elwrp.find( '> .' + base.config.focalClass ).index();
    -			nextFocalIndex    = ( currentFocalIndex + 1 == elmnts.length )           ? 0 : currentFocalIndex + 1;
    -			prevFocalIndex    = ( currentFocalIndex - 1 == -1 )                      ? elmnts.length - 1 : currentFocalIndex - 1;
    -			nextSlideNum      = ( focalChangeNum + 1 == base.sldrSlides.length + 1 ) ? 1 : focalChangeNum + 1;
    -			prevSlideNum      = ( focalChangeNum - 1 == 0 )                          ? base.sldrSlides.length : focalChangeNum - 1;
    -
    -			base.callback.sldr              = base.$el;
    -			base.callback.prevFocalIndex    = prevFocalIndex;
    -			base.callback.prevSlideNum      = prevSlideNum;
    -			base.callback.currentFocalIndex = currentFocalIndex;
    -			base.callback.currentClass      = nextFocalPoint.attr( 'class' );
    -			base.callback.currentID         = nextFocalPoint.attr( 'id' );
    -			base.callback.currentFocalPoint = focalPoint;
    -			base.callback.currentSlideNum   = focalChangeNum;
    -			base.callback.shiftWidth        = shiftSlideWidth;
    -			base.callback.nextFocalIndex    = nextFocalIndex;
    -			base.callback.nextSlideNum      = nextSlideNum;
    -
    -			if ( base.config.toggle.length > 0 ) {
    -				base.config.toggle.removeClass( base.config.focalClass );
    -				base.config.toggle.eq( focalChangeNum - 1 ).addClass( base.config.focalClass );
    -			}
    -
    -			return base.callback;
    -
    -		} catch ( err ) { console.log( err.message ); }
    -	};
    -
    -	/**
    -	 * Recursive function to make slider fill the gaps of the stage
    -	 * @param  {object} elmntsHTML The markup to fill gaps with
    -	 * @param  {object} wrp        the container to place the markup in
    -	 * @return {boolean}           returns true when finished
    -	 */
    -	base.fillGaps = function( elmntsHTML ) {
    -		try {
    -			var sldrw     = base.$el.width();
    -			var wrp       = base.$elwrp;
    -			var elmnt     = wrp.children();
    -			var elmntw    = base.findWidth( elmnt );
    -			var lastClass = base.sldrSlides[base.sldrSlides.length - 1].class_name;
    -			if ( elmntw < sldrw * 5 ) {
    -				wrp.find( '.' + lastClass ).after( elmntsHTML );
    -				base.fillGaps( elmntsHTML );
    -			} else {
    -				wrp.css( 'width' , elmntw );
    -				return true;
    -			}
    -		} catch ( err ) { console.log( err.message ); }
    -	};
    -
    -	/**
    -	 * Find the width of a set of elements
    -	 * @return {float} the width of the entire set
    -	 */
    -	base.findWidth = function( elmnt ) {
    -		try {
    -			var wdth = 0;
    -			elmnt.each( function( i ) {
    -				wdth = wdth + $( elmnt[i] ).width();
    -			});
    -			return wdth;
    -		} catch ( err ) { console.log( err.message ); }
    -	};
    -
    -	/**
    -	 * Find the focal point of the slider, by class name 'focalPoint'
    -	 * @return {integer} the x position of the focal point
    -	 */
    -	base.findFocalPoint = function() {
    -		try {
    -			var elmnts          = base.$elwrp.children();
    -			var focalSlide      = base.$el.find( '.'+base.config.focalClass );
    -			var focalSlideWidth = focalSlide.width() / 2;
    -			var focalIndex      = focalSlide.index();
    -			var focalPoint      = focalSlideWidth;
    -			for ( var i = 0; i < focalIndex; i++ ) {
    -				focalPoint = focalPoint + elmnts.eq(i).width();
    -			}
    -			return focalPoint;
    -		} catch ( err ) { console.log( err.message ); }
    -	};
    -
    -	/**
    -	 * Functions to perform when the browser is resized
    -	 * @return void
    -	 */
    -	base.resizeElements = function() {
    -		try {
    -			var elmnts   = base.$elwrp.children();
    -			var elmwdth  = base.findWidth( elmnts );
    -			var wrpwdth  = base.$elwrp.width();
    -			var samewdth = ( base.$el.css( 'width' ) == elmnts.css( 'width' ) ) ? true : false;
    -
    -			if ( base.config.sldrWidth == 'responsive' ) {
    -				elmnts.css( 'width' , base.$el.width() );
    -				if ( elmwdth > wrpwdth ) base.$elwrp.css( 'width' , elmwdth );
    -			} else if ( base.config.sldrWidth != '' ) {
    -				return;
    -			}
    -
    -			if ( base.config.sldrCols !== 1 ) {
    -				elmnts.css( 'width' , base.$el.width() / base.config.sldrCols );
    -			}
    -
    -			if ( samewdth ) return;
    -
    -			base.config.offset = base.$el.width() / 2; // UPDATE THE OFFSET, need to change this to work on the config offset
    -
    -			var change = {
    -				'currentFocalIndex' : base.$el.find( '.' + base.config.focalClass ).index(),
    -				'currentFocalPoint' : base.findFocalPoint(),
    -				'shiftWidth'        : 0
    -			};
    -			base.positionFocus( change );
    -		} catch ( err ) { console.log( err.message ); }
    -	};
    -
    -	/**
    -	 * Updates the previous coordinates if there is movement on click drag or touch drag
    -	 * @return {[type]} [description]
    -	 */
    -	base.coordinateevents = function( event ) {
    -		var curr;
    -		base.pagescrollY = window.pageYOffset;
    -		if ( !base.trackmouse ) return;
    -		event = event || window.event;
    -		if ( event.originalEvent.touches !== undefined ) {
    -			base.cursorcoordinate = { x : event.originalEvent.touches[0].pageX , y : event.originalEvent.touches[0].pageY };
    -		} else {
    -			base.cursorcoordinate = { x : event.clientX , y : event.clientY };
    -		}
    -		base.thiscoordinate = base.cursorcoordinate;
    -		if ( base.prevcoordinate != base.thiscoordinate ) {
    -			matrixIndex = ( base.config.isIE ) ? 12 : 4;
    -			base.transformposition = parseInt( base.getTranslatePosition( base.$elwrp.css( base.config.cssPrefix + 'transform' ) , matrixIndex ) );
    -			curr = base.transformposition - ( base.prevcoordinate.x - base.thiscoordinate.x );
    -			base.$elwrp.css( base.config.cssPrefix + 'transform' , 'translate3d( ' + curr + 'px , 0 , 0 )' );
    -			base.prevcoordinate = base.thiscoordinate;
    -		}
    -	};
    -
    -	/**
    -	 * When the sldr is initiated, before the DOM is manipulated
    -	 * @param  {object} args [the slides, callback, and config of the slider]
    -	 * @return void
    -	 */
    -	base.sliderInit = function( args ) {
    -		if( base.config.sldrInit != '' ) {
    -			base.config.sldrInit( args );
    -		}
    -	};
    -
    -	/**
    -	 * When individual slides are loaded
    -	 * @param  {object} args [the slides, callback, and config of the slider]
    -	 * @return void
    -	 */
    -	base.slideLoaded = function( args ) {
    -		if( base.config.sldLoaded != '' ) {
    -			base.config.sldLoaded( args );
    -		}
    -	};
    -
    -	/**
    -	 * When the slider is loaded, after the DOM is manipulated
    -	 * @param  {object} args [the slides, callback, and config of the slider]
    -	 * @return void
    -	 */
    -	base.sliderLoaded = function( args ) {
    -		if( base.config.sldrLoaded != '' ) {
    -			base.config.sldrLoaded( args );
    -		}
    -	};
    -
    -	/**
    -	 * Before the slides animate
    -	 * @param  {object} args [the slides, callback, and config of the slider]
    -	 * @return void
    -	 */
    -	base.slideStart = function( args ) {
    -		if( base.config.sldrStart != '' ) {
    -			base.config.sldrStart( args );
    -		}
    -	};
    -
    -	/**
    -	 * When the slide has completed animating
    -	 * @param  {object} args [the slides, callback, and config of the slider]
    -	 * @return void
    -	 */
    -	base.slideComplete = function( args ) {
    -		if( base.config.sldrComplete != '' ) {
    -			base.config.sldrComplete( args );
    -		}
    -	};
    -
    -	/**
    -	 * [sliderTimer description]
    -	 * @return void
    -	 */
    -	base.sliderTimer = function() {
    -		if ( base.config.sldrAuto ) {
    -			base.$sliderTimers[base.config.sldrNumber] = setTimeout( function() {
    -				var change  = base.focalChange( base.callback.nextSlideNum , 'next' );
    -				var animate = base.animate( change );
    -				base.sliderTimer( base.$el );
    -				if ( base.config.selectors != '' ) {
    -					var selector = base.config.selectors.eq( base.callback.nextSlideNum - 2 );
    -					selector.siblings().removeClass( base.config.focalClass );
    -					selector.addClass( base.config.focalClass );
    -				}
    -
    -			} , base.config.sldrTime )
    -		}
    -	};
    -
    -	/**
    -	 * Pauses slider by clearing it's timer
    -	 * @return void
    -	 */
    -	base.sliderPause = function() {
    -		if ( base.config.sldrAuto ) {
    -			clearTimeout( base.$sliderTimers[base.config.sldrNumber] );
    -		}
    -	};
    -
    -	/**
    -	 * Check if number is even
    -	 * @param  {number} num Number to check
    -	 * @return boolean
    -	 */
    -	base.evenNumber = function( num ) {
    -		return ( num % 2 == 0 ) ? true : false;
    -	};
    -
    -	/**
    -	 * Disect and return the value of a desired property in 'matrix(0, 0, 0, 0, 0, 0)' string format
    -	 * @param  {string} tf          matrix string
    -	 * @param  {number} matrixindex index of matrix desired
    -	 * @return {string}             matrix value string
    -	 */
    -	base.getTranslatePosition = function( tf , matrixindex ) {
    -		tf  = tf.slice( 7 , -1 ); // remove 'matrix(' and ')' from string
    -		tf  = tf.split( ', ' );   // create array of matrix
    -		return tf[ matrixindex ]; // return value of desired matrix
    -	};
    -
    -	/**
    -	 * Get Browser and Set URL Prefix
    -	 * @return null
    -	 */
    -	base.browser = function() {
    -		if( navigator.userAgent.match('WebKit') != null ) {
    -			base.config.isBrowser = 'Webkit';
    -			base.config.cssPrefix = '-webkit-';
    -		} else if( navigator.userAgent.match('Gecko') != null ) {
    -			base.config.isBrowser = 'Gecko';
    -		} else if( navigator.userAgent.match('MSIE 6') != null ) {
    -			base.config.isBrowser = 'MSIE 6';
    -			base.config.isIE = true;
    -		} else if( navigator.userAgent.match('MSIE 7') != null ) {
    -			base.config.isBrowser = 'MSIE 7';
    -			base.config.isIE = true;
    -		} else if( navigator.userAgent.match('MSIE 8') != null ) {
    -			base.config.isBrowser = 'MSIE 8';
    -			base.config.isIE = true;
    -		} else if( navigator.userAgent.match('MSIE 9') != null ) {
    -			base.config.isBrowser = 'MSIE 9';
    -			base.config.isIE = true;
    -			base.config.cssPrefix = '-ms-';
    -		} else if( navigator.userAgent.match('MSIE 10') != null ) {
    -			base.config.isBrowser = 'MSIE 10';
    -			base.config.isIE = true;
    -		}
    -	};
    -
    -	/**
    -	 * [isMobile description]
    -	 * @return {Boolean} [description]
    -	 */
    -	base.isMobile = function() {
    -      var check = false;
    -      (function (a) {
    -        if (/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) check = true;
    -      })( navigator.userAgent || navigator.vendor || window.opera );
    -      return check;
    -    };
    -
    -    base.init();
    -  };
    -
    -  /**
    -   * [defaultOptions description]
    -   * @type {Object}
    -   */
    -  $.sldr.defaultOptions = {
    -    focalClass           : 'focalPoint',
    -	offset               : $( this ).width() / 2,
    -	selectors            : '',
    -	toggle               : '',
    -	nextSlide            : '',
    -	hashChange           : false,
    -	previousSlide        : '',
    -	resizeDelay          : 1,
    -	sldrNumber           : 0,
    -	sldrStart            : '',
    -	sldrComplete         : '',
    -	sldrInit             : '',
    -	sldLoaded            : '',
    -	sldrLoaded           : '',
    -	sldrWidth            : '',
    -	sldrCols             : 1,
    -	animate              : '',
    -	animateJquery        : false,
    -	animateJqueryTiming  : 750,
    -	animateJqueryEasing  : 'easeInOutQuint',
    -	swipeDragDesktop     : true,
    -	swipeDragCoefficient : 3,
    -	swipeDragSnapBack    : true,
    -	sldrAuto             : false,
    -	sldrTime             : 8000,
    -	isBrowser            : navigator.userAgent,
    -	isIE                 : false,
    -	cssPrefix            : ''
    -  };
    -
    -  /**
    -   * [sldr description]
    -   * @param  {[type]} options [description]
    -   * @return {[type]}         [description]
    -   */
    -  $.fn.sldr = function( options ) {
    -    return this.each( function() {
    -      ( new $.sldr( this , options ) );
    -      $.sldr.defaultOptions.sldrNumber++;
    -    });
    -  };
    -
    -})( jQuery );
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/assets/js/jss-script.min.js b/doc/slihelp_generator/assets/js/jss-script.min.js
    deleted file mode 100755
    index e5dc3f7209..0000000000
    --- a/doc/slihelp_generator/assets/js/jss-script.min.js
    +++ /dev/null
    @@ -1 +0,0 @@
    -jQuery.noConflict(),jQuery(function(o){var t=100,e=o("a#scroll-to-top"),n=600,a="swing";e.hide(),o(window).scroll(function(){var n=o(document).scrollTop();n>t?o(e).stop().fadeTo(300,1):o(e).stop().fadeTo(300,0)}),o(e).click(function(){return o("html, body").animate({scrollTop:0},n,a),!1}),o('a[href*="#"]:not([href="#"]):not([href^="#tab"])').click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")||location.hostname==this.hostname){var t=o(this.hash);o(".primary-header").height()+5;if(t=t.length?t:o("[name="+this.hash.slice(1)+"]"),t.length)return o("html,body").animate({scrollTop:t.offset().top},n,a),!1}})});
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/generate_help.py b/doc/slihelp_generator/generate_help.py
    deleted file mode 100755
    index b05675a97d..0000000000
    --- a/doc/slihelp_generator/generate_help.py
    +++ /dev/null
    @@ -1,148 +0,0 @@
    -#!/usr/bin/env python3
    -# -*- coding: utf-8 -*-
    -#
    -# generate_help.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -"""
    -Generate NEST help files
    -========================
    -
    -Scan all source files for documentation and build the help files.
    -The helpindex is built during installation in a separate step.
    -"""
    -
    -import os
    -import html
    -import io
    -import re
    -import sys
    -import textwrap
    -
    -from writers import coll_data
    -from helpers import check_ifdef, create_helpdirs, cut_it
    -from helpers import delete_helpdir
    -from helpers import help_generation_required
    -
    -if len(sys.argv) != 3:
    -    print("Usage: python3 generate_help.py <source_dir> <build_dir>")
    -    sys.exit(1)
    -
    -source_dir, build_dir = sys.argv[1:]
    -
    -helpdir = os.path.join(build_dir, "doc", "help")
    -delete_helpdir(helpdir)
    -
    -if not help_generation_required():
    -    sys.exit(0)
    -
    -create_helpdirs(helpdir)
    -
    -allfiles = []
    -for dirpath, dirnames, files in os.walk(source_dir):
    -    for f in files:
    -        if f.endswith((".sli", ".cpp", ".cc", ".h", ".py")) and \
    -           not f.startswith(".#"):
    -            allfiles.append(os.path.join(dirpath, f))
    -
    -num = 0
    -full_list = []
    -sli_command_list = []
    -cc_command_list = []
    -index_dic_list = []
    -
    -# which keywords to ignore: can put e.g. doxygen commands here
    -keywords_ignore = ["@ingroup"]
    -
    -keywords = ["Name:", "Synopsis:", "Examples:", "Description:", "Parameters:",
    -            "Options:", "Requires:", "Require:", "Receives:", "Transmits:",
    -            "Sends:", "Variants:", "Bugs:", "Diagnostics:", "Remarks:",
    -            "Availability:", "References:", "SeeAlso:", "Author:", "Authors:",
    -            "FirstVersion:", "Source:"]
    -
    -# Now begin to collect the data for the help files and start generating.
    -dcs = r'\/\**\s*@BeginDocumentation[\s?]*\:?[\s?]*[.?]*\n(.*?)\n*?\*\/'
    -
    -# compile the sli command list
    -for fname in allfiles:
    -    if fname.endswith('.sli'):
    -        f = io.open(fname, encoding='utf-8')
    -        filetext = f.read()
    -        f.close()
    -        items = re.findall(dcs, filetext, re.DOTALL)
    -        for item in items:
    -            for line in item.splitlines():
    -                name_line = re.findall(r"([\s*]?Name[\s*]?\:)(.*)", line)
    -                if name_line:
    -                    # Clean the Name: line!
    -                    name_line_0 = name_line[0][0].strip()
    -                    name_line_1 = name_line[0][1].strip()
    -                    sliname = cut_it(' - ', name_line_1)[0]
    -                    sli_command_list.append(sliname)
    -
    -dcs = r'\/\*[(\*|\s)?]*[\n?]*@BeginDocumentation' \
    -      r'[\s?]*\:?[\s?]*[.?]*\n(.*?)\n*?\*\/'
    -
    -for fname in allfiles:
    -    # .py is for future use
    -    if not fname.endswith('.py'):
    -        f = io.open(fname, encoding='utf-8')
    -        filetext = f.read()
    -        f.close()
    -        # Multiline matching to find codeblock
    -        items = re.findall(dcs, filetext, re.DOTALL)
    -
    -        for item in items:
    -            # remove paragraph if this keyword is to be ignored
    -            for kw in keywords_ignore:
    -                item = re.sub(r"(" + kw + ".+?\n\n|" + kw + ".+?$)", "", item,
    -                              flags=re.DOTALL)
    -            # Check the ifdef in code
    -            require = check_ifdef(item, filetext, dcs)
    -            if require:
    -                item = '\n\nRequire: ' + require + item
    -            alllines = []
    -            s = " ######\n"
    -            for line in item.splitlines():
    -                name_line = re.findall(r"([\s*]?Name[\s*]?\:)(.*)", line)
    -                if name_line:
    -                    # Clean the Name: line
    -                    name_line_0 = name_line[0][0].strip()
    -                    name_line_1 = name_line[0][1].strip()
    -                    line = name_line_0 + ' ' + name_line_1
    -                line = textwrap.dedent(line).strip()
    -                # Tricks for the blanks
    -                line = html.escape(line)
    -                line = re.sub(r'^(\s)*- ', ' &bull; ', line)
    -                line = re.sub(r'^(\s)*@note', ' &bull; ', line)
    -                alllines.append(line)
    -            item = '\n'.join(alllines)
    -            num += 1
    -            documentation = {}
    -            split_items = re.split("(^|\n)(" + "|".join(keywords) + ")", item)
    -            keyword_curr = ""
    -            for i, token in enumerate(split_items):
    -                if token in keywords:
    -                    keyword_curr = token
    -                    documentation[keyword_curr] = ""
    -                else:
    -                    if keyword_curr in documentation:
    -                        documentation[keyword_curr] += " " + token
    -            all_data = coll_data(keywords, documentation, num, helpdir, fname,
    -                                 sli_command_list)
    diff --git a/doc/slihelp_generator/generate_helpindex.py b/doc/slihelp_generator/generate_helpindex.py
    deleted file mode 100755
    index 430061db48..0000000000
    --- a/doc/slihelp_generator/generate_helpindex.py
    +++ /dev/null
    @@ -1,40 +0,0 @@
    -#!/usr/bin/env python3
    -# -*- coding: utf-8 -*-
    -#
    -# generate_helpindex.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -"""
    -Generate NEST helpindex
    -=======================
    -
    -Generate the helpindex containing all help files in the given
    -help_dir.
    -"""
    -
    -import os
    -import sys
    -from writers import write_helpindex
    -
    -if len(sys.argv) != 2:
    -    print("Usage: python3 generate_helpindex.py <help_dir>")
    -    sys.exit(1)
    -
    -help_dir = os.path.join(sys.argv[1], "help")
    -write_helpindex(help_dir)
    diff --git a/doc/slihelp_generator/helpers.py b/doc/slihelp_generator/helpers.py
    deleted file mode 100644
    index c319d10ae0..0000000000
    --- a/doc/slihelp_generator/helpers.py
    +++ /dev/null
    @@ -1,116 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# helpers.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -import re
    -import os
    -import shutil
    -import errno
    -
    -
    -def cut_it(separator, text):
    -    """
    -    Cut it
    -    ------
    -
    -    Cut text by separator.
    -    """
    -    if separator:
    -        return re.split(separator, text)
    -    else:
    -        return [separator, text]
    -
    -
    -def check_ifdef(item, filetext, docstring):
    -    """
    -    Check the 'ifdef' context
    -    -------------------------
    -
    -    If there is an 'ifdef' requirement write it to the data.
    -    """
    -    ifdefstring = r'(\#ifdef((.*?)\n(.*?)\n*))\#endif'
    -    require_reg = re.compile(r'HAVE\_((.*?)*)\n')
    -    # every doc in an #ifdef
    -    ifdefs = re.findall(ifdefstring, filetext, re.DOTALL)
    -    for ifitem in ifdefs:
    -        for str_ifdef in ifitem:
    -            initems = re.findall(docstring, str_ifdef, re.DOTALL)
    -            for initem in initems:
    -                if item == initem:
    -                    features = require_reg.search(str_ifdef)
    -                    return features.group()
    -
    -
    -def makedirs(path):
    -    """
    -    Forgiving version of os.makedirs, emulating the behavior of the
    -    shell command 'mkdir -p'. The function tries to create the
    -    directory at the given path including all subdirectories and
    -    returns silently if the directory already exists.
    -    """
    -    try:
    -        os.makedirs(path)
    -    except OSError as exc:
    -        if exc.errno != errno.EEXIST or not os.path.isdir(path):
    -            raise
    -
    -
    -def create_helpdirs(path):
    -    """
    -    Create the directories for the help files.
    -    """
    -    makedirs(os.path.join(path, 'sli'))
    -    makedirs(os.path.join(path, 'cc'))
    -
    -
    -def delete_helpdir(path):
    -    """
    -    Delete the directories for the help files.
    -    """
    -    try:
    -        shutil.rmtree(path)
    -    except OSError as exc:
    -        if exc.errno != errno.ENOENT:
    -            raise
    -
    -
    -def help_generation_required():
    -    """
    -    Check whether help extraction/installation is required.
    -
    -    The check is based on the setting of the environment variable
    -    NEST_INSTALL_NODOC. If the variable is set, this function returns
    -    False, if not, it returns True.
    -
    -    A corresponding message is printed if print_msg is True. The
    -    message is omitted if print_msg is set to False.
    -    """
    -
    -    blue = "\033[94m"
    -    noblue = "\033[0m"
    -
    -    if "NEST_INSTALL_NODOC" in os.environ:
    -        msg = "Not extracting help information for target 'install-nodoc'."
    -        print(blue + msg + noblue)
    -        return False
    -    else:
    -        msg = "Extracting help information. This may take a little while."
    -        print(blue + msg + noblue)
    -        return True
    diff --git a/doc/slihelp_generator/templates/cmd.tpl.html b/doc/slihelp_generator/templates/cmd.tpl.html
    deleted file mode 100644
    index c8e959419f..0000000000
    --- a/doc/slihelp_generator/templates/cmd.tpl.html
    +++ /dev/null
    @@ -1,45 +0,0 @@
    -<!DOCTYPE html>
    -    <html>
    -        <head>
    -    
    -        <title>NEST Command Index: $title</title>
    -        <style type="text/css">
    -            $css
    -         </style>
    -        </head>
    -        <body>
    -    <h1>Command: $title</h1>
    -
    -    <table class="headerfooter">
    -      <tbody><tr>
    -        <td width="30%" align="center"><a href="../../index.html">
    -            NEST HelpDesk</a></td>
    -        <td width="30%" align="center"><a href="../helpindex.html">
    -            Command Index</a></td>
    -        <td width="30%" align="center"><a href="../../quickref.html">
    -            NEST Quick Reference</a></td>
    -      </tr>
    -    </tbody></table>
    -
    -    <div class="wrap">
    -    <!-- Begin -->
    -    $indexbody
    -    <!-- End -->
    -    </div>
    -
    -
    -    <table class="headerfooter">
    -      <tbody><tr>
    -        <td width="30%" align="center"><a href="../../index.html">
    -            NEST HelpDesk</a></td>
    -        <td width="30%" align="center"><a href="../helpindex.html">
    -            Command Index</a></td>
    -        <td width="30%" align="center"><a href="../../quickref.html">
    -            NEST Quick Reference</a></td>
    -      </tr>
    -    </tbody></table>
    -
    -    $footer
    -
    -    </body>
    -</html>
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/templates/footer.tpl.html b/doc/slihelp_generator/templates/footer.tpl.html
    deleted file mode 100644
    index d64c55dd4c..0000000000
    --- a/doc/slihelp_generator/templates/footer.tpl.html
    +++ /dev/null
    @@ -1,3 +0,0 @@
    - <p style="text-align:center">
    -    &copy; 2004 <a href="https://www.nest-initiative.org">The NEST Initiative</a>
    - </p>
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/templates/helpindex.tpl.html b/doc/slihelp_generator/templates/helpindex.tpl.html
    deleted file mode 100644
    index ce592729be..0000000000
    --- a/doc/slihelp_generator/templates/helpindex.tpl.html
    +++ /dev/null
    @@ -1,35 +0,0 @@
    - <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    - <html>
    -    <head>
    -      <title>NEST Command Index</title>
    -      <style type="text/css">
    -        $css
    -      </style>
    -    </head>
    -    <body bgcolor="white" fgcolor="black">
    -    <h1><a name="top">NEST Command Index</a></h1>
    -    <table class="headerfooter">
    -      <tr>
    -        <td width="50%" align=center>
    -        <a href="../index.html">NEST HelpDesk</a></td>
    -        <td width="50%" align=center>
    -        <a href="../quickref.html">NEST Quick Reference</a></td>
    -      </tr>
    -    </table>
    -
    -    $indexbody
    -
    -    <table class="headerfooter">
    -        <tr>
    -        <td width="30%" align=center>
    -        <a href="../index.html">NEST HelpDesk</a></td>
    -        <td width="30%" align=center><a href="#top">Top</a></td>
    -        <td width="30%" align=center>
    -        <a href="../quickref.html">NEST Quick Reference</a></td>
    -        </tr>
    -    </table>
    -
    -    $footer
    -
    -    </body>
    -</html>
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/templates/nb-code.tpl.json b/doc/slihelp_generator/templates/nb-code.tpl.json
    deleted file mode 100644
    index 3d475cf4f4..0000000000
    --- a/doc/slihelp_generator/templates/nb-code.tpl.json
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -{
    - "cell_type": "code",
    - "execution_count": null,
    - "metadata": {
    -  "collapsed": false
    - },
    - "outputs": [],
    - "source": [
    -   $code_source
    - ]
    -}
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/templates/nb-md.tpl.json b/doc/slihelp_generator/templates/nb-md.tpl.json
    deleted file mode 100644
    index 323f4d72bf..0000000000
    --- a/doc/slihelp_generator/templates/nb-md.tpl.json
    +++ /dev/null
    @@ -1,7 +0,0 @@
    -{
    -  "cell_type": "markdown",
    -  "metadata": {},
    -  "source": [
    -    $md_source
    -  ]
    -}
    \ No newline at end of file
    diff --git a/doc/slihelp_generator/templates/nest.tpl.css b/doc/slihelp_generator/templates/nest.tpl.css
    deleted file mode 100644
    index 451f3acff5..0000000000
    --- a/doc/slihelp_generator/templates/nest.tpl.css
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -body {
    -  padding: 0;
    -  margin: 0;
    -}
    -h1 {
    -  padding: 15px 0 0 15px;
    -}
    -p {
    -  padding-left: 15px;
    -}
    -a {
    -  color: #339;
    -  text-decoration: none;
    -}
    -a:visited {
    -  color: #339;
    -  text-decoration: none;
    -}
    -a:hover {
    -  text-decoration: underline;
    -}
    -h1 a {
    -  color: #000;
    -  text-decoration: none;
    -}
    -table.headerfooter {
    -  margin: 20px 0 20px 0;
    -  background-color: #eee;
    -  width: 100%;
    -  height: 30px;
    -  border-top: 2px solid #ccc;
    -  border-bottom: 2px solid #ccc;
    -  text-align: center;
    -}
    -table.commands {
    -  margin: 15px 0 15px 0;
    -  background-color: #eee;
    -  width: 90%;
    -  border: 2px solid #ccc;
    -  border-spacing: 0px;
    -  border-collapse: collapse;
    -}
    -table.commands td {
    -  border-bottom: 1px solid #ccc;
    -  border-right: 1px dotted #ccc;
    -  padding: 5px 0 5px 10px;
    -  text-align: left;
    -}
    -table.letteridx {
    -  margin: 0;
    -  background-color: #eee;
    -  width: 90%;
    -  border: 2px solid #ccc;
    -  border-spacing: 0px;
    -  border-collapse: collapse;
    -}
    -table.letteridx td {
    -  border-right: 1px solid #ccc;
    -  padding: 5px;
    -  text-align: center;
    -}
    -table.letteridx a {
    -  display: block;
    -  height: 100%;
    -  width: 100%;
    -}
    -td.left{
    -  width:30%;
    -}
    -div.wrap {
    -  padding-left: 15px;
    -}
    -div.doc_header {
    -  font-size: 1.2em;
    -  font-weight: bold;
    -  margin-bottom: 1em;
    -}
    -div.doc_paragraph {
    -  font-size: .8em;
    -  font-family: Courier New, Courier, fixed;
    -  margin-left: 1em;
    -  margin-bottom: 1em;
    -}
    -
    diff --git a/doc/slihelp_generator/templates/overview-sample-footer.tmpl b/doc/slihelp_generator/templates/overview-sample-footer.tmpl
    deleted file mode 100644
    index 2c2b51b271..0000000000
    --- a/doc/slihelp_generator/templates/overview-sample-footer.tmpl
    +++ /dev/null
    @@ -1,56 +0,0 @@
    -                    </div>
    -                </div><!-- .entry-content -->
    -		        <footer class="entry-meta"></footer><!-- .entry-meta -->
    -            </article><!-- #post -->
    -        </div><!-- #content -->
    -	</div><!-- #primary -->
    -        <div id="secondary" class="widget-area" role="complementary">
    -            <aside id="advanced_menu-2" class="widget widget_advanced_menu">
    -                <div class="menu-main-container">
    -                    <ul id="menu-main-side" class="menu">
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../">About NEST</a>
    -                        </li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../download/">Download</a>
    -                        </li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../features/">Features</a>
    -                        </li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children ">
    -                            <a href="../documentation/">Documentation</a>
    -                            <ul class="sub-menu"></ul></li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../publications/">Publications</a></li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../community/">Community</a>
    -                        </li>
    -                    </ul>
    -                </div>
    -            </aside>
    -        </div><!-- #secondary -->
    -        
    -    </div><!-- #main .wrapper -->
    -
    -	<footer id="colophon" role="contentinfo">
    -        <div class="site-info">
    -	        &copy; 2017 by <a href="https://www.nest-initiative.org/" title="The NEST Initiative">The NEST Initiative</a>
    -		</div><!-- .site-info -->
    -        <nav id="second-site-navigation" class="main-navigation" role="navigation">
    -            <div class="menu-second-menu-container">
    -                <ul id="menu-second-menu" class="menu">
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../contributors/">Contributors</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../impressum/">Impressum / Contact</a>
    -                    </li>
    -                </ul>
    -            </div>
    -        </nav><!-- #second site-navigation -->
    -    </footer><!-- #colophon -->
    -</div><!-- #page -->
    -
    -<a id="scroll-to-top" href="#" title="Scroll to Top">Top</a>
    -</body>
    -</html>
    diff --git a/doc/slihelp_generator/templates/overview-sample-header.tmpl b/doc/slihelp_generator/templates/overview-sample-header.tmpl
    deleted file mode 100644
    index daac459495..0000000000
    --- a/doc/slihelp_generator/templates/overview-sample-header.tmpl
    +++ /dev/null
    @@ -1,165 +0,0 @@
    -<!DOCTYPE html>
    -<!--[if IE 7]>
    -<html class="ie ie7" lang="en-US">
    -<![endif]--><!--[if IE 8]>
    -<html class="ie ie8" lang="en-US">
    -<![endif]--><!--[if !(IE 7) | !(IE 8)  ]><!--><html lang="en-US"><!--<![endif]-->
    -<head>
    -    <meta charset="UTF-8"><meta name="viewport" content="width=device-width">
    -    <title>NEST Simulator</title>
    -    <link rel="profile" href="http://gmpg.org/xfn/11">
    -    <link rel="pingback" href="https://www.nest-simulator.org/xmlrpc.php">
    -    <!--[if lt IE 9]>
    -    <script src="../asse../html5shiv.min.js" type="text/javascript"></script>
    -    <![endif]-->
    -    <link rel="stylesheet" id="blogsynthesis_jss_css-css"
    -          href="../assets/css/jss-style.min.css" type="text/css" media="all">
    -    <link rel="stylesheet" id="parent-style-css"
    -          href="../assets/css/style.css" type="text/css" media="all">
    -    <link rel="stylesheet" id="twentytwelve-fonts-css"
    -          href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700&amp;subset=latin,latin-ext" type="text/css" media="all">
    -    <!--[if lt IE 9]>
    -    <link rel='stylesheet' id='twentytwelve-ie-css' href='../assests/css/ie.css'
    -          type='text/css' media='all' />
    -    <![endif]-->
    -    <script type="text/javascript"
    -            src="../asse../jquery-3.1.1.min.js"></script>
    -    <script type="text/javascript"
    -            src="../asse../jquery-migrate-3.0.0.js"></script>
    -    <script type="text/javascript"
    -            src="../asse../jss-script.min.js?ver=4.4"></script>
    -
    -    <script type="text/javascript"
    -            src="../asse../jquery.mmenu.all.js"></script>
    -    <link rel="stylesheet" id="parent-style-css"
    -          href="../assets/css/jquery.mmenu.all.css" type="text/css" media="all">
    -	<script type="text/javascript">
    -	 jQuery(document).ready(function( $ ) {
    -		$("#nest-menu").mmenu({
    -		   "extensions": [
    -			  "fx-menu-zoom"
    -		   ]
    -		}, {
    -		   // configuration
    -		   clone: true
    -		});
    -		$("#hide").click(function(){
    -			$("#mm-nest-menu").toggle();
    -		});
    -	});
    -    </script>
    -<!--
    -    <script type="text/x-mathjax-config">
    -    MathJax.Hub.Config({
    -      tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
    -    });
    -    </script>
    -    <script type="text/javascript" async
    -            src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
    -    </script>
    --->
    -    <style>#responsive-menu .appendLink, #responsive-menu .responsive-menu li a, #responsive-menu #responsive-menu-title a,#responsive-menu .responsive-menu, #responsive-menu div, #responsive-menu .responsive-menu li, #responsive-menu{box-sizing: content-box !important;-moz-box-sizing: content-box !important;-webkit-box-sizing: content-box !important;-o-box-sizing: content-box !important}.RMPushOpen{width: 100% !important;overflow-x: hidden !important;height: 100% !important}.RMPushSlide{position: relative;left: 75%}#responsive-menu{position: absolute;width: 75%;left: -75%;top: 0px;background: #43494C;z-index: 9999;box-shadow: 0px 1px 8px #333333;font-size: 13px !important;max-width: 999px;display: none}#responsive-menu.admin-bar-showing{padding-top: 32px}#click-menu.admin-bar-showing{margin-top: 32px}#responsive-menu #rm-additional-content{padding: 10px 5% !important;width: 90% !important;color: #FFFFFF}#responsive-menu .appendLink{right: 0px !important;position: absolute !important;border: 1px solid #3C3C3C !important;padding: 12px 10px !important;color: #FFFFFF !important;background: #43494C !important;height: 20px !important;line-height: 20px !important;border-right: 0px !important}#responsive-menu .appendLink:hover{cursor: pointer;background: #3C3C3C !important;color: #FFFFFF !important}#responsive-menu .responsive-menu, #responsive-menu div, #responsive-menu .responsive-menu li,#responsive-menu{text-align: left !important}#responsive-menu .RMImage{vertical-align: middle;margin-right: 10px;display: inline-block}#responsive-menu.RMOpened{}#responsive-menu,#responsive-menu input{}#responsive-menu #responsive-menu-title{width: 95% !important;font-size: 14px !important;padding: 20px 0px 20px 5% !important;margin-left: 0px !important;background: #43494C !important;white-space: nowrap !important}#responsive-menu #responsive-menu-title,#responsive-menu #responsive-menu-title a{color: #FFFFFF !important;text-decoration: none !important;overflow: hidden !important}#responsive-menu #responsive-menu-title a:hover{color: #FFFFFF !important;text-decoration: none !important}#responsive-menu .appendLink,#responsive-menu .responsive-menu li a,#responsive-menu #responsive-menu-title a{transition: 1s all;-webkit-transition: 1s all;-moz-transition: 1s all;-o-transition: 1s all}#responsive-menu .responsive-menu{width: 100% !important;list-style-type: none !important;margin: 0px !important}#responsive-menu .responsive-menu li.current-menu-item > a,#responsive-menu .responsive-menu li.current-menu-item > .appendLink,#responsive-menu .responsive-menu li.current_page_item > a,#responsive-menu .responsive-menu li.current_page_item > .appendLink{background: #43494C !important;color: #FFFFFF !important}#responsive-menu .responsive-menu li.current-menu-item > a:hover,#responsive-menu .responsive-menu li.current-menu-item > .appendLink:hover,#responsive-menu .responsive-menu li.current_page_item > a:hover,#responsive-menu .responsive-menu li.current_page_item > .appendLink:hover{background: #43494C !important;color: #FFFFFF !important}#responsive-menu.responsive-menu ul{margin-left: 0px !important}#responsive-menu .responsive-menu li{list-style-type: none !important;position: relative !important}#responsive-menu .responsive-menu ul li:last-child{padding-bottom: 0px !important}#responsive-menu .responsive-menu li a{padding: 12px 0px 12px 5% !important;width: 95% !important;display: block !important;height: 20px !important;line-height: 20px !important;overflow: hidden !important;white-space: nowrap !important;color: #FFFFFF !important;border-top: 1px solid #3C3C3C !important;text-decoration: none !important}#click-menu{text-align: center;cursor: pointer;font-size: 13px !important;display: none;position: absolute;right: 5%;top: 60px;color: #FFFFFF;background: #000000;padding: 5px;z-index: 9999}#responsive-menu #responsiveSearch{display: block !important;width: 95% !important;padding-left: 5% !important;border-top: 1px solid #3C3C3C !important;clear: both !important;padding-top: 10px !important;padding-bottom: 10px !important;height: 40px !important;line-height: 40px !important}#responsive-menu #responsiveSearchSubmit{display: none !important}#responsive-menu #responsiveSearchInput{width: 91% !important;padding: 5px 0px 5px 3% !important;-webkit-appearance: none !important;border-radius: 2px !important;border: 1px solid #3C3C3C !important}#responsive-menu .responsive-menu,#responsive-menu div,#responsive-menu .responsive-menu li{width: 100% !important;margin-left: 0px !important;padding-left: 0px !important}#responsive-menu .responsive-menu li li a{padding-left: 10% !important;width: 90% !important;overflow: hidden !important}#responsive-menu .responsive-menu li li li a{padding-left: 15% !important;width: 85% !important;overflow: hidden !important}#responsive-menu .responsive-menu li li li li a{padding-left: 20% !important;width: 80% !important;overflow: hidden !important}#responsive-menu .responsive-menu li li li li li a{padding-left: 25% !important;width: 75% !important;overflow: hidden !important}#responsive-menu .responsive-menu li a:hover{background: #3C3C3C !important;color: #FFFFFF !important;list-style-type: none !important;text-decoration: none !important}#click-menu #RMX{display: none;font-size: 24px;line-height: 27px !important;height: 27px !important;color: #FFFFFF !important}#click-menu .threeLines{width: 33px !important;height: 27px !important;margin: auto !important}#click-menu .threeLines .line{height: 5px !important;margin-bottom: 6px !important;background: #FFFFFF !important;width: 100% !important}#click-menu .threeLines .line.last{margin-bottom: 0px !important}@media only screen and ( min-width : 0px ) and ( max-width : 600px ){#click-menu{display: block}}</style>
    -
    -
    -	<link rel="stylesheet" id="parent-style-css" href="../assets/css/style.css" type="text/css" media="all">
    -
    - <!--wp code prettify
    -    <link rel="stylesheet" type="text/css" href="../assets/css/prettify.css">
    -    <script type="text/javascript" src="../asse../code-prettify/prettify.js"></script>
    - -->
    -  <link rel="stylesheet" href="../asse../highlight/styles/default.css">
    -  <script src="../asse../highlight/highlight.pack.js"></script>
    -  <script>hljs.initHighlightingOnLoad();</script>
    -  
    -</head>
    -<body class="page page-template-default custom-font-enabled single-author">
    -<div id="page" class="hfeed site">
    -        <header id="masthead" class="site-header" role="banner">
    -        <hgroup>
    -        <h1 class="site-title">
    -            <a href="https://www.nest-simulator.org/"
    -               title="NEST Simulator online">
    -                <img src="https://www.nest-simulator.org/wp-content/uploads/20../nest_logo.png">
    -            </a>
    -        </h1>
    -        </hgroup>
    -        <nav id="site-navigation" class="main-navigation" role="navigation">
    -            <button id="hide">Menu</button>
    -            <a class="assistive-text" href="#content"
    -               title="Skip to content">Skip to content</a>
    -            <div class="menu-main-container" id="nest-menu">
    -                <ul id="menu-main" class="nav-menu">
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page">
    -                        <a href="../index.html">About NEST</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../download/">Download</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../features/">Features</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children ">
    -                        <a href="../documentation/">Documentation</a>
    -                        <ul class="sub-menu">
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../installation/">Installing NEST</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children ">
    -                                <a href="../introduction-to-pynest/">Introduction to PyNEST</a>
    -                                <ul class="sub-menu">
    -                                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                        <a href="../introduction-to-pynest/part-1-neurons-and-simple-neural-networks/">Part 1: Neurons and simple neural networks</a>
    -                                    </li>
    -                                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                        <a href="../introduction-to-pynest/part-2-populations-of-neurons/">Part 2: Populations of neurons</a>
    -                                    </li>
    -                                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                        <a href="../introduction-to-pynest/part-3-connecting-networks-with-synapses/">Part 3: Connecting networks with synapses</a>
    -                                    </li>
    -                                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                        <a href="../introduction-to-pynest/part-4-topologically-structured-networks/">Part 4: Topologically structured networks</a>
    -                                    </li>
    -                                </ul>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../more-example-networks/">Example Networks</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../frequently-asked-questions/">
    -                                    FAQ</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-custom menu-item-object-custom ">
    -                                <a href="https://nest-simulator.readthedocs.io/en/latest/contribute/index.html">Contributing to NEST</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../quickref/">NEST/SLI Quick Reference</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../helpindex/">NEST Command Index</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../pynest-api/">High-level API of
    -                                    PyNEST</a>
    -                            </li>
    -                        </ul>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../publications/">Publications</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../community/">Community</a>
    -                    </li>
    -                </ul>
    -            </div>
    -            <div class="header-search"></div>
    -        </nav><!-- #site-navigation -->
    -    </header><!-- #masthead -->
    -    
    -    <div id="main" class="wrapper">
    -
    -	<div id="primary" class="site-content">
    -        <div id="content" role="main">
    -            <article class=" page type-page status-publish hentry">
    -                <div class="entry-content">
    -			        <div id="mw-content-text" class="mw-content-ltr"
    -                         dir="ltr" lang="en">
    diff --git a/doc/slihelp_generator/templates/sample-footer.tmpl b/doc/slihelp_generator/templates/sample-footer.tmpl
    deleted file mode 100644
    index 9c4dbdf7d5..0000000000
    --- a/doc/slihelp_generator/templates/sample-footer.tmpl
    +++ /dev/null
    @@ -1,56 +0,0 @@
    -                    </div>
    -                </div><!-- .entry-content -->
    -		        <footer class="entry-meta"></footer><!-- .entry-meta -->
    -            </article><!-- #post -->
    -        </div><!-- #content -->
    -	</div><!-- #primary -->
    -        <div id="secondary" class="widget-area" role="complementary">
    -            <aside id="advanced_menu-2" class="widget widget_advanced_menu">
    -                <div class="menu-main-container">
    -                    <ul id="menu-main-side" class="menu">
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../../">About NEST</a>
    -                        </li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../../download/">Download</a>
    -                        </li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../../features/">Features</a>
    -                        </li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children ">
    -                            <a href="../../documentation/">Documentation</a>
    -                            <ul class="sub-menu"></ul></li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../../publications/">Publications</a></li>
    -                        <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                            <a href="../../community/">Community</a>
    -                        </li>
    -                    </ul>
    -                </div>
    -            </aside>
    -        </div><!-- #secondary -->
    -        
    -    </div><!-- #main .wrapper -->
    -
    -	<footer id="colophon" role="contentinfo">
    -        <div class="site-info">
    -	        &copy; 2017 by <a href="https://www.nest-initiative.org/" title="The NEST Initiative">The NEST Initiative</a>
    -		</div><!-- .site-info -->
    -        <nav id="second-site-navigation" class="main-navigation" role="navigation">
    -            <div class="menu-second-menu-container">
    -                <ul id="menu-second-menu" class="menu">
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../../contributors/">Contributors</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../../impressum/">Impressum / Contact</a>
    -                    </li>
    -                </ul>
    -            </div>
    -        </nav><!-- #second site-navigation -->
    -    </footer><!-- #colophon -->
    -</div><!-- #page -->
    -
    -<a id="scroll-to-top" href="#" title="Scroll to Top">Top</a>
    -</body>
    -</html>
    diff --git a/doc/slihelp_generator/templates/sample-header.tmpl b/doc/slihelp_generator/templates/sample-header.tmpl
    deleted file mode 100644
    index ea8617e5d0..0000000000
    --- a/doc/slihelp_generator/templates/sample-header.tmpl
    +++ /dev/null
    @@ -1,165 +0,0 @@
    -<!DOCTYPE html>
    -<!--[if IE 7]>
    -<html class="ie ie7" lang="en-US">
    -<![endif]--><!--[if IE 8]>
    -<html class="ie ie8" lang="en-US">
    -<![endif]--><!--[if !(IE 7) | !(IE 8)  ]><!--><html lang="en-US"><!--<![endif]-->
    -<head>
    -    <meta charset="UTF-8"><meta name="viewport" content="width=device-width">
    -    <title>NEST Simulator</title>
    -    <link rel="profile" href="http://gmpg.org/xfn/11">
    -    <link rel="pingback" href="https://www.nest-simulator.org/xmlrpc.php">
    -    <!--[if lt IE 9]>
    -    <script src="../../assets/js/html5shiv.min.js" type="text/javascript"></script>
    -    <![endif]-->
    -    <link rel="stylesheet" id="blogsynthesis_jss_css-css"
    -          href="../../assets/css/jss-style.min.css" type="text/css" media="all">
    -    <link rel="stylesheet" id="parent-style-css"
    -          href="../../assets/css/style.css" type="text/css" media="all">
    -    <link rel="stylesheet" id="twentytwelve-fonts-css"
    -          href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700&amp;subset=latin,latin-ext" type="text/css" media="all">
    -    <!--[if lt IE 9]>
    -    <link rel='stylesheet' id='twentytwelve-ie-css' href='../../assests/css/ie.css'
    -          type='text/css' media='all' />
    -    <![endif]-->
    -    <script type="text/javascript"
    -            src="../../assets/js/jquery-3.1.1.min.js"></script>
    -    <script type="text/javascript"
    -            src="../../assets/js/jquery-migrate-3.0.0.js"></script>
    -    <script type="text/javascript"
    -            src="../../assets/js/jss-script.min.js?ver=4.4"></script>
    -
    -    <script type="text/javascript"
    -            src="../../assets/js/jquery.mmenu.all.js"></script>
    -    <link rel="stylesheet" id="parent-style-css"
    -          href="../../assets/css/jquery.mmenu.all.css" type="text/css" media="all">
    -	<script type="text/javascript">
    -	 jQuery(document).ready(function( $ ) {
    -		$("#nest-menu").mmenu({
    -		   "extensions": [
    -			  "fx-menu-zoom"
    -		   ]
    -		}, {
    -		   // configuration
    -		   clone: true
    -		});
    -		$("#hide").click(function(){
    -			$("#mm-nest-menu").toggle();
    -		});
    -	});
    -    </script>
    -<!--
    -    <script type="text/x-mathjax-config">
    -    MathJax.Hub.Config({
    -      tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
    -    });
    -    </script>
    -    <script type="text/javascript" async
    -            src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
    -    </script>
    --->
    -    <style>#responsive-menu .appendLink, #responsive-menu .responsive-menu li a, #responsive-menu #responsive-menu-title a,#responsive-menu .responsive-menu, #responsive-menu div, #responsive-menu .responsive-menu li, #responsive-menu{box-sizing: content-box !important;-moz-box-sizing: content-box !important;-webkit-box-sizing: content-box !important;-o-box-sizing: content-box !important}.RMPushOpen{width: 100% !important;overflow-x: hidden !important;height: 100% !important}.RMPushSlide{position: relative;left: 75%}#responsive-menu{position: absolute;width: 75%;left: -75%;top: 0px;background: #43494C;z-index: 9999;box-shadow: 0px 1px 8px #333333;font-size: 13px !important;max-width: 999px;display: none}#responsive-menu.admin-bar-showing{padding-top: 32px}#click-menu.admin-bar-showing{margin-top: 32px}#responsive-menu #rm-additional-content{padding: 10px 5% !important;width: 90% !important;color: #FFFFFF}#responsive-menu .appendLink{right: 0px !important;position: absolute !important;border: 1px solid #3C3C3C !important;padding: 12px 10px !important;color: #FFFFFF !important;background: #43494C !important;height: 20px !important;line-height: 20px !important;border-right: 0px !important}#responsive-menu .appendLink:hover{cursor: pointer;background: #3C3C3C !important;color: #FFFFFF !important}#responsive-menu .responsive-menu, #responsive-menu div, #responsive-menu .responsive-menu li,#responsive-menu{text-align: left !important}#responsive-menu .RMImage{vertical-align: middle;margin-right: 10px;display: inline-block}#responsive-menu.RMOpened{}#responsive-menu,#responsive-menu input{}#responsive-menu #responsive-menu-title{width: 95% !important;font-size: 14px !important;padding: 20px 0px 20px 5% !important;margin-left: 0px !important;background: #43494C !important;white-space: nowrap !important}#responsive-menu #responsive-menu-title,#responsive-menu #responsive-menu-title a{color: #FFFFFF !important;text-decoration: none !important;overflow: hidden !important}#responsive-menu #responsive-menu-title a:hover{color: #FFFFFF !important;text-decoration: none !important}#responsive-menu .appendLink,#responsive-menu .responsive-menu li a,#responsive-menu #responsive-menu-title a{transition: 1s all;-webkit-transition: 1s all;-moz-transition: 1s all;-o-transition: 1s all}#responsive-menu .responsive-menu{width: 100% !important;list-style-type: none !important;margin: 0px !important}#responsive-menu .responsive-menu li.current-menu-item > a,#responsive-menu .responsive-menu li.current-menu-item > .appendLink,#responsive-menu .responsive-menu li.current_page_item > a,#responsive-menu .responsive-menu li.current_page_item > .appendLink{background: #43494C !important;color: #FFFFFF !important}#responsive-menu .responsive-menu li.current-menu-item > a:hover,#responsive-menu .responsive-menu li.current-menu-item > .appendLink:hover,#responsive-menu .responsive-menu li.current_page_item > a:hover,#responsive-menu .responsive-menu li.current_page_item > .appendLink:hover{background: #43494C !important;color: #FFFFFF !important}#responsive-menu.responsive-menu ul{margin-left: 0px !important}#responsive-menu .responsive-menu li{list-style-type: none !important;position: relative !important}#responsive-menu .responsive-menu ul li:last-child{padding-bottom: 0px !important}#responsive-menu .responsive-menu li a{padding: 12px 0px 12px 5% !important;width: 95% !important;display: block !important;height: 20px !important;line-height: 20px !important;overflow: hidden !important;white-space: nowrap !important;color: #FFFFFF !important;border-top: 1px solid #3C3C3C !important;text-decoration: none !important}#click-menu{text-align: center;cursor: pointer;font-size: 13px !important;display: none;position: absolute;right: 5%;top: 60px;color: #FFFFFF;background: #000000;padding: 5px;z-index: 9999}#responsive-menu #responsiveSearch{display: block !important;width: 95% !important;padding-left: 5% !important;border-top: 1px solid #3C3C3C !important;clear: both !important;padding-top: 10px !important;padding-bottom: 10px !important;height: 40px !important;line-height: 40px !important}#responsive-menu #responsiveSearchSubmit{display: none !important}#responsive-menu #responsiveSearchInput{width: 91% !important;padding: 5px 0px 5px 3% !important;-webkit-appearance: none !important;border-radius: 2px !important;border: 1px solid #3C3C3C !important}#responsive-menu .responsive-menu,#responsive-menu div,#responsive-menu .responsive-menu li{width: 100% !important;margin-left: 0px !important;padding-left: 0px !important}#responsive-menu .responsive-menu li li a{padding-left: 10% !important;width: 90% !important;overflow: hidden !important}#responsive-menu .responsive-menu li li li a{padding-left: 15% !important;width: 85% !important;overflow: hidden !important}#responsive-menu .responsive-menu li li li li a{padding-left: 20% !important;width: 80% !important;overflow: hidden !important}#responsive-menu .responsive-menu li li li li li a{padding-left: 25% !important;width: 75% !important;overflow: hidden !important}#responsive-menu .responsive-menu li a:hover{background: #3C3C3C !important;color: #FFFFFF !important;list-style-type: none !important;text-decoration: none !important}#click-menu #RMX{display: none;font-size: 24px;line-height: 27px !important;height: 27px !important;color: #FFFFFF !important}#click-menu .threeLines{width: 33px !important;height: 27px !important;margin: auto !important}#click-menu .threeLines .line{height: 5px !important;margin-bottom: 6px !important;background: #FFFFFF !important;width: 100% !important}#click-menu .threeLines .line.last{margin-bottom: 0px !important}@media only screen and ( min-width : 0px ) and ( max-width : 600px ){#click-menu{display: block}}</style>
    -
    -
    -	<link rel="stylesheet" id="parent-style-css" href="../../assets/css/style.css" type="text/css" media="all">
    -
    - <!--wp code prettify
    -    <link rel="stylesheet" type="text/css" href="../../assets/css/prettify.css">
    -    <script type="text/javascript" src="../../assets/js/code-prettify/prettify.js"></script>
    - -->
    -  <link rel="stylesheet" href="../../assets/js/highlight/styles/default.css">
    -  <script src="../../assets/js/highlight/highlight.pack.js"></script>
    -  <script>hljs.initHighlightingOnLoad();</script>
    -  
    -</head>
    -<body class="page page-template-default custom-font-enabled single-author">
    -<div id="page" class="hfeed site">
    -        <header id="masthead" class="site-header" role="banner">
    -        <hgroup>
    -        <h1 class="site-title">
    -            <a href="https://www.nest-simulator.org/"
    -               title="NEST Simulator online">
    -                <img src="https://www.nest-simulator.org/wp-content/uploads/2015/03/nest_logo.png">
    -            </a>
    -        </h1>
    -        </hgroup>
    -        <nav id="site-navigation" class="main-navigation" role="navigation">
    -            <button id="hide">Menu</button>
    -            <a class="assistive-text" href="#content"
    -               title="Skip to content">Skip to content</a>
    -            <div class="menu-main-container" id="nest-menu">
    -                <ul id="menu-main" class="nav-menu">
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page">
    -                        <a href="../../index.html">About NEST</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../../download/">Download</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../../features/">Features</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children ">
    -                        <a href="../../documentation/">Documentation</a>
    -                        <ul class="sub-menu">
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../../installation/">Installing NEST</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children ">
    -                                <a href="../../introduction-to-pynest/">Introduction to PyNEST</a>
    -                                <ul class="sub-menu">
    -                                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                        <a href="../../introduction-to-pynest/part-1-neurons-and-simple-neural-networks/">Part 1: Neurons and simple neural networks</a>
    -                                    </li>
    -                                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                        <a href="../../introduction-to-pynest/part-2-populations-of-neurons/">Part 2: Populations of neurons</a>
    -                                    </li>
    -                                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                        <a href="../../introduction-to-pynest/part-3-connecting-networks-with-synapses/">Part 3: Connecting networks with synapses</a>
    -                                    </li>
    -                                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                        <a href="../../introduction-to-pynest/part-4-topologically-structured-networks/">Part 4: Topologically structured networks</a>
    -                                    </li>
    -                                </ul>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../../more-example-networks/">Example Networks</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../../frequently-asked-questions/">
    -                                    FAQ</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-custom menu-item-object-custom ">
    -                                <a href="https://nest-simulator.readthedocs.io/en/latest/contribute/index.html">Contributing to NEST</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../../quickref/">NEST/SLI Quick Reference</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../../helpindex/">NEST Command Index</a>
    -                            </li>
    -                            <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                                <a href="../../pynest-api/">High-level API of
    -                                    PyNEST</a>
    -                            </li>
    -                        </ul>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../../publications/">Publications</a>
    -                    </li>
    -                    <li class="menu-item menu-item-type-post_type menu-item-object-page ">
    -                        <a href="../../community/">Community</a>
    -                    </li>
    -                </ul>
    -            </div>
    -            <div class="header-search"></div>
    -        </nav><!-- #site-navigation -->
    -    </header><!-- #masthead -->
    -    
    -    <div id="main" class="wrapper">
    -
    -	<div id="primary" class="site-content">
    -        <div id="content" role="main">
    -            <article class=" page type-page status-publish hentry">
    -                <div class="entry-content">
    -			        <div id="mw-content-text" class="mw-content-ltr"
    -                         dir="ltr" lang="en">
    diff --git a/doc/slihelp_generator/writers.py b/doc/slihelp_generator/writers.py
    deleted file mode 100644
    index 3d5f349415..0000000000
    --- a/doc/slihelp_generator/writers.py
    +++ /dev/null
    @@ -1,291 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# writers.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -"""
    -NEST help writer
    -================
    -
    -Collect all the data and write help files.
    -"""
    -
    -import glob
    -import io
    -import os
    -import re
    -import textwrap
    -from helpers import cut_it
    -from string import Template
    -
    -
    -def write_help_html(doc_dic, helpdir, fname, sli_command_list, keywords):
    -    """
    -    Write html.
    -
    -    Write html for integration in NEST Help-System
    -    """
    -    # Loading Template for commands
    -    ftemplate = io.open('templates/cmd.tpl.html', encoding='utf-8')
    -    templ = ftemplate.read()
    -    ftemplate.close()
    -    # Loading Template for CSS
    -    cssf = io.open('templates/nest.tpl.css', encoding='utf-8')
    -    csstempl = cssf.read()
    -    cssf.close()
    -    # Loading Template for footer
    -    footerf = io.open('templates/footer.tpl.html', encoding='utf-8')
    -    footertempl = footerf.read()
    -    footerf.close()
    -
    -    s = Template(templ)
    -
    -    htmllist = []
    -    hlplist = []
    -
    -    name = ''
    -    for key, value in doc_dic.items():
    -        if key == "Name":
    -            name = value.strip()
    -
    -    for key, value in doc_dic.items():
    -        if key == "FullName":
    -            fullname = value.strip(r"\s\n")
    -            fullname = re.sub(r"(\n)", " <br/> ", fullname)
    -
    -            htmllist.append('''<div class="doc_header">Name:</div>
    -<div class="doc_paragraph">%s - %s</div>''' %
    -                            (name, fullname))
    -            hlpfullname = re.sub(r' <br\/> ', '\n', fullname).strip()
    -            hlplist.append('Name: %s - %s\n' % (name, hlpfullname))
    -
    -    # sorting linked keywords
    -    for word in keywords:
    -        word = word.strip(':')
    -        for key, value in doc_dic.items():
    -            if key == word:
    -                if (key != "Name" and key != "FullName" and
    -                        key != "SeeAlso" and key != "File"):
    -                    # strip whitespace and paragraph breaks at start of entry
    -                    value = re.sub(r"^(\s*(\n))*\s*", "", value)
    -                    # strip whitespace and paragraph breaks at end of entry
    -                    value = re.sub(r"((\n)\s*)*$", "", value)
    -                    value = re.sub(r"(\n)", " <br/> ", value)
    -                    value = re.sub(r"(^|\n) ", "&nbsp;", value)
    -                    htmllist.append('<div class="doc_header">%s: </div>' % key)
    -                    htmllist.append('<div class="doc_paragraph">%s</div>'
    -                                    % value)
    -                    hlpvalue = re.sub(' <br/> ', '\n', value).rstrip()
    -                    hlpvalue = re.sub('\n ', '\n', hlpvalue).rstrip()
    -                    hlpvalue = hlpvalue.lstrip('\n')
    -                    hlpvalue = re.sub(r'\n[\s?]*\n', '\n', hlpvalue).rstrip()
    -                    # Better looking .hlp files
    -                    dedented_text = textwrap.dedent(hlpvalue).strip()
    -                    hlpcontent = ('%s:\n\n%s\n\n' % (key, dedented_text))
    -                    hlplist.append(hlpcontent)
    -
    -    for key, value in doc_dic.items():
    -        if key == "SeeAlso":
    -            htmllist.append('<div class="doc_header">%s: </div>' % key)
    -            hlplist.append('%s:\n' % key)
    -            htmllist.append('<ul>')
    -            for i in value:
    -                see = i.strip("\n ~~")
    -                if see:
    -                    if see in sli_command_list:
    -                        htmllist.append('    <li><a href="../sli/' + see +
    -                                        '.html">' + see + '</a></li>')
    -                        hlplist.append('%s' % see)
    -                    else:
    -                        htmllist.append('    <li><a href="../cc/' + see +
    -                                        '.html">' + see + '</a></li>')
    -                        hlplist.append('%s' % see)
    -            hlplist.append('')
    -            htmllist.append('</ul>')
    -
    -    for key, value in doc_dic.items():
    -        if key == "File":
    -            value = value.strip("\n \n $$")
    -            htmllist.append('''<div class="doc_header">Source:</div>
    -<div class="doc_paragraph">%s</div>''' % value)
    -            hlplist.append('Source:\n\n%s' % value)
    -
    -    htmlstring = (u'\n'.join(htmllist))
    -    cmdindexstring = s.substitute(indexbody=htmlstring, css=csstempl,
    -                                  title=name, footer=footertempl)
    -
    -    if name:  # only, if there is a name
    -        if fname.endswith('.sli'):
    -            path = os.path.join(helpdir, 'sli')
    -        else:
    -            path = os.path.join(helpdir, 'cc')
    -
    -        f_file_name = io.open(os.path.join(path, '{}.html'.format(name)),
    -                              mode='w', encoding='utf-8')
    -        f_file_name.write(cmdindexstring)
    -        f_file_name.write(u'\n')
    -        f_file_name.close()
    -
    -        f_file_name_hlp = io.open(os.path.join(path, '{}.hlp'.format(name)),
    -                                  mode='w', encoding='utf-8')
    -        f_file_name_hlp.write(u'\n'.join(hlplist))
    -        f_file_name_hlp.write(u'\n')
    -        f_file_name_hlp.close()
    -
    -
    -def write_helpindex(helpdir):
    -    """
    -    Writes helpindex.html and helpindex.hlp
    -    ---------------------------------------
    -
    -    """
    -
    -    # We only have to generate a helpindex if the help directory exists
    -    if not os.path.exists(helpdir):
    -        print("Error: Help directory not found: " + helpdir)
    -        return
    -
    -    filelist = glob.glob(os.path.join(helpdir, '*', '*.hlp'))
    -    html_list = []
    -    hlp_list = []
    -
    -    # Loading Template for helpindex.html
    -    ftemplate = io.open(os.path.join('templates', 'helpindex.tpl.html'),
    -                        encoding='utf-8')
    -    templ = ftemplate.read()
    -    ftemplate.close()
    -    # Loading Template for CSS
    -    cssf = io.open(os.path.join('templates', 'nest.tpl.css'),
    -                   encoding='utf-8')
    -    csstempl = cssf.read()
    -    cssf.close()
    -    # Loading Template for footer
    -    footerf = io.open(os.path.join('templates', 'footer.tpl.html'),
    -                      encoding='utf-8')
    -    footertempl = footerf.read()
    -    footerf.close()
    -
    -    s = Template(templ)
    -
    -    alpha = [('A', 'a'), ('B', 'b'), ('C', 'c'), ('D', 'd'), ('E', 'e'),
    -             ('F', 'f'), ('G', 'g'), ('H', 'h'), ('I', 'i'), ('J', 'j'),
    -             ('K', 'k'), ('L', 'l'), ('M', 'm'), ('N', 'n'), ('O', 'o'),
    -             ('P', 'p'), ('Q', 'q'), ('R', 'r'), ('S', 's'), ('T', 't'),
    -             ('U', 'u'), ('V', 'v'), ('W', 'w'), ('X', 'x'), ('Z', 'z'), '-',
    -             ':', '<', '=']
    -
    -    for doubles in alpha:
    -        html_list.append('<center><table class="alpha">')
    -        html_list.append('<table class="letteridx"><tr>')
    -        for x in alpha:
    -            html_list.append('<td><a href="#%s">%s</a></td>' % (x[0], x[0]))
    -        html_list.append('</tr></table></center>')
    -        html_list.append('<center><table class="commands" id="%s">'
    -                         % doubles[0])
    -        for item in sorted(filelist,
    -                           key=lambda name: name.lower().rsplit('/', 1)[1]):
    -            fitem = io.open(item, encoding='utf-8')
    -            itemtext = fitem.read()
    -            fitem.close()
    -            # only the basename of the file
    -            name = os.path.basename(item)[:-4]
    -            # only the first line of itemtext
    -            name_line = itemtext.splitlines()[0]
    -            #
    -            if name_line.rsplit(' - ')[0] == 'Name: ' + name:
    -                fullname = name_line.rsplit(' - ')[1]
    -            else:
    -                fullname = name
    -            # file extension
    -            itemext = item.rsplit('/')[-2]
    -            if name.startswith(doubles) and os.path.isfile(item):
    -                # check if 'name' is available in folder with os.path.isfile(
    -                # checkfile)
    -                html_list.append('<tr><td class="left">')
    -                html_list.append('<a href="%s/%s.html">%s</a></td>' %
    -                                 (itemext, name, name))
    -                html_list.append('<td>%s</td></tr>' % fullname)
    -
    -                # Better Format for the index.hlp
    -                c = len(name)
    -                hlp_list.append(name + '\t' * (16 - min(c, 60) // 4) +
    -                                fullname)
    -            elif not os.path.isfile(item):
    -                print('WARNING: Checkfile ' + item + ' not exist.')
    -
    -        html_list.append('</table></center>')
    -        html_list.append('</table></center>')
    -
    -    # html_list.append(footer)
    -    htmlstring = (u'\n'.join(html_list))
    -    indexstring = s.substitute(indexbody=htmlstring, css=csstempl,
    -                               footer=footertempl)
    -
    -    f_helpindex = io.open(os.path.join(helpdir, 'helpindex.html'), mode='w',
    -                          encoding='utf-8')
    -    f_helpindex.write(indexstring)
    -    f_helpindex.write(u'\n')
    -    f_helpindex.close()
    -
    -    # Todo: using string template for .hlp
    -    f_helphlpindex = io.open(os.path.join(helpdir, 'helpindex.hlp'), mode='w',
    -                             encoding='utf-8')
    -    f_helphlpindex.write(u'\n'.join(hlp_list))
    -    f_helphlpindex.write(u'\n')
    -    f_helphlpindex.close()
    -
    -
    -def coll_data(keywords, documentation, num, helpdir, fname, sli_command_list):
    -    """
    -    Collect data.
    -
    -    Prepare the data for writing the help.
    -    """
    -    see = ""
    -    relfile = fname.strip()
    -    doc_dic = {"Id": str(num), "File": relfile}
    -    iname = None
    -    for k in keywords:
    -        if k in documentation:
    -            if k == "Name:":
    -                iname = documentation[k].split()[0].rstrip("-")
    -                ifullname = documentation[k].strip(" \n").strip()
    -                ifullname = ifullname.lstrip(iname).strip()
    -                ifullname = ifullname.lstrip("- ")
    -                if iname:
    -                    iname = iname.strip('~~')
    -                    doc_dic.update({"Name": iname})
    -                if ifullname:
    -                    doc_dic.update({"FullName": ifullname})
    -            elif k == "SeeAlso:" or k == "See also:" or k == "See Also:":
    -                doc_list = []
    -                see_alsos = cut_it(",", documentation[k])
    -                for i in see_alsos:
    -                    see = i.strip()
    -                    if see:
    -                        doc_list.append(see)
    -                doc_dic.update({"SeeAlso": doc_list})
    -            else:
    -                text = ""
    -                name = k.replace(":", "")
    -                for i in cut_it("\n", documentation[k]):
    -                    text = text + i.strip() + " \n" + ""
    -                if text:
    -                    doc_dic.update({name: text})
    -    write_help_html(doc_dic, helpdir, fname, sli_command_list, keywords)
    diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
    index 45d0c300fb..b1c834a050 100644
    --- a/examples/CMakeLists.txt
    +++ b/examples/CMakeLists.txt
    @@ -20,12 +20,3 @@
     install( FILES run_examples.sh
         DESTINATION ${CMAKE_INSTALL_DOCDIR}
         )
    -
    -install( DIRECTORY nest/
    -    DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples
    -    USE_SOURCE_PERMISSIONS
    -    )
    -
    -install( FILES EditorSupport/vim/syntax/sli.vim
    -    DESTINATION ${CMAKE_INSTALL_DOCDIR}/EditorSupport/vim/syntax
    -    )
    diff --git a/examples/EditorSupport/vim/syntax/sli.vim b/examples/EditorSupport/vim/syntax/sli.vim
    deleted file mode 100644
    index b7a79ffe24..0000000000
    --- a/examples/EditorSupport/vim/syntax/sli.vim
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -" Vim syntax file
    -" Language: nest SLI
    -" Maintainer: Ankur Sinha/Nest initiative
    -" Latest revision: 01 March 2016
    -
    -if exists("b:current_syntax")
    -    finish
    -endif
    -
    -setlocal softtabstop=2
    -setlocal cindent shiftwidth=2
    -setlocal tabstop=2
    -setlocal expandtab
    -setlocal cindent
    -
    -syntax keyword sliTodo TODO XXX FIXME NOTE
    -hi def link sliTodo        Todo
    -
    -syn keyword sliKeyword abort abs abs_d abs_i acos add addpath addtotrie allocations and append AppendTo Apply apropos arange area2 area array arrayload ArrayQ ArrayShape arraystore asin assert available backtrace_off backtrace_on begin bind break breakup callback call capacity case cd ceil cerr cin clear cleardict cleardictstack clic clock cloc clonedict close closeinput CompareFiles CompileMath Connect continue copy CopyFile CopyModel cos count countdictstack counttomark cout Create CreateRDV CreateRNG cst ctermid currentdict currentname cv1d convert 2-dimensional coordinates to 1-dim index cv2d cva cva_d cva_t cvd cvdict cvd_s cv_dv cvnodecollection cvi cvi_s cv_iv cvlit cvn cvo cvs cvs_f cvt_a cvx cycles CyclicValue debug debugoff debugon debug.sli def DeleteFile dexp dict DictQ dictstack Dimensions Directory dirname div Dot1D Dot DoubleQ drand Drop dup2 dup edit elementstates empty end endl endusing environment eof eq_dv eq_iv eq erase Erfc Erf errordict eval EvaluateLiteralInfixes E exch exec ExecFunction ExecMath execstack executive exit exithook exp Export FileNames file FindRoot FiniteQ First FixedPoint Flatten floor flush FoldList Fold forall forallindexed for fork FractionalPart frexp Function gabor_ Gammainc gauss2d_ GaussDiskConv geq GetConnections getc GetDefaults get_d getenv GetGlobalRNG getinterval getline GetMax GetMin GetOption GetOptions getPGRP getPID getPPID get gets GetStatus_dict GetStatus GNUaddhistory GNUreadline good grep gt handleerror HasDifferentMemberQ helpdesk helpindex help iclear ieof ifail ifstream ignore igood in_avail index info info_ds initialize_module Inline insertelement insert inspect Install IntegerPart IntegerQ inv irand iround isatty is_mpi is_threaded is_threaded_with_openmp join joinpath JoinTo kernel keys kill known LambertW0 LambertWm1 LambertW Last LayoutArray ldexp length_a length length_d length_lp length_p length_s leq license LiteralQ ln load LocateFileNames log lookup loop ls lt MakeDirectory Map MapAt MapIndexed MapThread mark MathematicaToSliIndex mathexecutive MatrixQ Max max Mean MemberQ MemoryInfo memory_thisjob_darwin memory_thisjob MergeDictionary MergeLists message Min min mkfifo mod modf Most MoveDirectory MoveFile ms2hms mul namespace neg_d neg_i neg neq Nest nest_indirect NestList nest_serial Node noop not npop NumberQ NumProcesses oclear oeof ofsopen ofstream ogood oldgetline ones operandstack Options OptionsDictionary or osstream ostrstream OuterProduct over page pageoutput parsestdin Partition Part path pclockspersec pclocks pcvs pgetrusage pick pipe Pi Plus pop pow ppage pprint prepend print_error PrintNodes PrintNodesToStream print ProcessorName proxynode pstack ptimes put_d putinterval put pwd quit raiseagain raiseerror RandomArray Random RandomSubset Range Rank rdevdict ReadDouble ReadInt readline ReadList ReadModes readPGM Read ReadWord realtime references regcomp regexdict regexec regex_find regex_find_r regex_find_rf regex_find_s regex_find_sf regex_replace RemoveDirectory removeguard repeatany repeat ReplaceOccurrences ReplacePart replace reserve ResetKernel ResetOptions reset RestoreDictionary restoreestack RestoreOptions restoreostack restore Rest resume reverse rngdict rolld roll rollu rot round run SaveDictionary SaveOptions save ScanThread searchfile searchif searchifstream search seed Select SetAcceptableLatency SetDefaults Set SetDirectory SetFakeNumProcesses setguard setNONBLOCK SetOptions setpath setprecision SetStatus_dict SetStatus setverbosity SFWdumpparameters ShowDefaults ShowOptions ShowStatus shpawn shrink signaldict Sign Simulate sin size sleep_i sleep SLIFunctionWrapper SliToMathematicaIndex Sort spawn spikes Split spoon sqr sqrt stack StandardDeviation start statusdict stopped stop StringQ str SubsetQ sub switchdefault switch symbol symbol_s SyncProcesses sysexec system systemtime Table Take taskset taskset_thisjob TensorRank tic TimeCommunicationAlltoall TimeCommunicationAlltoall TimeCommunicationAlltoallv TimeCommunicationAlltoallv TimeCommunicationOffgrid TimeCommunication TimeCommunication TimeCommunicationv time Times tmpnam toc token_is token token_s ToLowercase ToMathematicaExpression topinfo_d Total ToUppercase Transpose trie trieinfo trim trunc typebind typeinfo type typestack undef unit_conversion UnitStep usertime using validate values Variance variant verbosity volume_transmitter waitPID wait welcome which who whos writePGM xifstream xor zeros
    -
    -hi def link sliKeyword     Keyword
    -
    -syn keyword sliConstant M_INFO M_ERROR M_DEBUG M_WARNING M_STATUS M_FATAL
    -hi def link sliConstant    Constant
    -
    -syn match sliUnit '\<mV\>'
    -syn match sliUnit '\<pF\>'
    -syn match sliUnit '\<pA\>'
    -syn match sliUnit '\<ms\>'
    -syn match sliUnit '\<s\>'
    -syn match sliUnit '\<Hz\>'
    -syn match sliUnit '\<nS\>'
    -hi def link sliUnit      Constant
    -
    -syn match sliNumber '\d\+'
    -syn match sliNumber '[-+]\d\+'
    -syn match sliNumber '[-+]\d\+\.\d*'
    -syn match sliNumber '[-+]\=\d[[:digit:]]*[eE][\-+]\=\d\+'
    -syn match sliNumber '\d[[:digit:]]*[eE][\-+]\=\d\+'
    -syn match sliNumber '[-+]\=\d[[:digit:]]*\.\d*[eE][\-+]\=\d\+'
    -syn match sliNumber '\d[[:digit:]]*\.\d*[eE][\-+]\=\d\+'
    -hi def link sliNumber      Constant
    -
    -" Identifiers
    -syn match sliIdentifier '/\w\+'
    -hi def link sliIdentifier   Identifier
    -
    -" Booleans
    -syn keyword sliBoolean true false
    -hi def link sliBoolean     Boolean
    -
    -" Regions
    -syn region sliFunc start="{" end="}" fold transparent
    -hi def link sliFunc        Function
    -
    -syn region sliDict start="<<" end=">>" fold transparent
    -hi def link sliDict         Structure
    -
    -syn region sliGroup start="(" end=")" fold transparent
    -hi def link sliGroup String
    -
    -syn match sliComment "%.*$"
    -hi def link sliComment     Comment
    -syn region sliCommentBlock start="/\*" end=".*\*/" fold
    -hi def link sliCommentBlock     Comment
    -
    -syn keyword sliConditional if ifelse
    -hi def link sliConditional  Conditional
    -
    -syn keyword sliRepeat forall repeat
    -hi def link sliRepeat Repeat
    -
    -" Finishing touches
    -let b:current_syntax = "sli"
    diff --git a/examples/nest/ArtificialSynchrony.pl b/examples/nest/ArtificialSynchrony.pl
    deleted file mode 100755
    index 731d769117..0000000000
    --- a/examples/nest/ArtificialSynchrony.pl
    +++ /dev/null
    @@ -1,158 +0,0 @@
    -#!/usr/bin/perl
    -
    -print "\n\n";
    -for ($i=1;$i<=80;$i++) {print "#"}; print "\n";
    -print "This script calculates the synchrony of a given set of neurons following the
    -definition of synchrony by Hansel et al. 1998. Furthermore, the script performs
    -this task for all data generated by the corresponding SLI script, i.e. for each
    -couping weight and neuron model the resulting synchrony is calculated.
    -
    -At the end a Gnuplot figure is generated.\n
    -
    -Needs:
    -- Perl
    -- Gnuplot
    -
    -AH 09\n";
    -for ($i=1;$i<=80;$i++) {print "#"}; print "\n";
    -
    -
    -$nr = 128;              # number of neurons
    -$timestart = 5000 ;     # start position
    -$timesteps = 5000 ;     # number of time steps
    -$strength_inc = 0.2;    # weight steps
    -
    -for ($sim = 1; $sim <=2 ; $sim++) {     # 1 = canonical, 2 = grid constrained
    - $cnt_strength = 0;
    - for ($strength=0;$strength<=5.0;$strength+=$strength_inc) {
    -
    -  if ($sim == 1)
    -   { $filename =  "voltmeter-Canon-".$strength."-129-0.dat";}
    -   else
    -   { $filename =  "voltmeter-Grid-".$strength."-129-0.dat";}
    -
    -  print "open ",$filename,"\n";
    -
    -  open (ifile,$filename);               # store data in memory
    -  $line_nr = 0;
    -  for $line (<ifile>) {
    -    @data_l = split (/\s+/,$line);
    -    $Data[$line_nr][0] = $data_l[0];
    -    $Data[$line_nr][1] = $data_l[1];
    -    $Data[$line_nr][2] = $data_l[2];
    -    $line_nr++;
    -  }
    -  $max_line = $line_nr;                 # remember number of data points
    -  close ifile;
    -
    -
    -  ### Calculate A_n(t)
    -  $ii = 1;
    -  $Vi = $neuron;
    -  $data_set=0;
    -
    -  $sum_Vi = 0.0;
    -  $sum_Ai = 0.0;
    -  $sum_sqAi = 0.0;
    -
    -  for ($cnt_array=0;$cnt_array<$max_line;$cnt_array++) {
    -   if (($data_set >= $timestart) && ($data_set <= $timestart+$timesteps)) {
    -    if ($ii == 1) {   # new dataset time t
    -     #print  $sum_Vi/$nr,"\n";
    -     $sum_Ai += $sum_Vi/$nr;
    -     $sum_sqAi += ($sum_Vi/$nr)**2;
    -     $sum_Vi =0;
    -    }
    -    $sum_Vi += $Data[$cnt_array][2];
    -   }
    -
    -   $ii++;                               # next neuron
    -   if ($ii>$nr) {                       # next time step
    -    $data_set++;
    -    $ii=1;
    -   };
    -  }
    -
    -
    -  $Delta_N = ($sum_sqAi-($sum_Ai**2/$timesteps))/($timesteps);    ### CAUTION in denominator correctly /($timesteps-1) but to be comparable to Python '1' omitted
    -
    -  $Delta = 0.0;
    -  for ($neuron = 1; $neuron <= $nr; $neuron++) {
    -   $ii = 1;
    -   $Vi = $neuron;
    -   $data_set=0;
    -
    -   $sum_Vi = 0.0;
    -   $sum_sqVi = 0.0;
    -
    -   for ($cnt_array=0;$cnt_array<$max_line;$cnt_array++)  {
    -    if (($data_set >= $timestart) && ($data_set < $timestart+$timesteps)) {
    -     if ($Vi==$ii) {
    -      $sum_Vi += $Data[$cnt_array][2];
    -      $sum_sqVi += $Data[$cnt_array][2]**2;
    -     }
    -    }
    -    $ii++;
    -    if ($ii>$nr) {
    -     $data_set++;
    -     $ii=1;
    -    };
    -   }
    -
    -   $Delta += ($sum_sqVi-($sum_Vi**2/$timesteps))/($timesteps); ### CAUTION in denominator correctly /($timesteps-1) but to be comparable to Python changed
    -
    -  }
    -
    -  $Delta = $Delta/$nr;
    -  ######print "\nDelta = ",$Delta,"\n";
    -  #####print "\nSigma = ",$Delta_N/$Delta,"\n";
    -
    -  if ($Delta!=0) {
    -   print $Delta_N/$Delta,"\n";
    -   $Plot_Data[$sim][$cnt_strength] = $Delta_N/$Delta;
    -   }
    -   else {
    -   print "Error\n";
    -   $Plot_Data[$sim][$cnt_strength] = 99;
    -   }
    -  $cnt_strength++;
    - }
    - $max_cnt_strength=$cnt_strength;
    -}
    -
    -
    -$filename =  ">ArtificialSynchrony.dat";                # Write results to data file
    -open (ofile,$filename);
    -print ofile "#Strength [pA]\t#Sigma_Canon\t#Sigma_Grid \n";
    -for ($cnt_strength=0;$cnt_strength<$max_cnt_strength;$cnt_strength++) {
    - print ofile $cnt_strength*$strength_inc,"\t$Plot_Data[1][$cnt_strength]\t$Plot_Data[2][$cnt_strength]\n";
    -}
    -close ofile;
    -
    -
    -$filename =  ">ArtificialSynchrony.gnu";                # Generate Gnuplot file to print final data
    -open (ofile,$filename);
    -print ofile 'set terminal postscript enhanced color solid "Times-Roman" 20
    -set encoding iso
    -
    -set title "Network Synchrony of 128 IAF neurons, {/Symbol g} = 0.5, h = 2^{-5} ms" font "Times-Roman, 25"
    -set xlabel "Coupling strength " font "Times-Roman, 25"
    -set ylabel "Synchrony {/Symbol S}" font "Times-Roman, 25"
    -
    -set xtics font "Times-Roman, 25"
    -set ytics font "Times-Roman, 25"
    -
    -
    -set yrange [0:1]
    -set xrange [0:1]
    -plot \'ArtificialSynchrony.dat\' u ($1/3.90625):3 w l title "" lt -1 lw 2, \
    -     \'ArtificialSynchrony.dat\' u ($1/3.90625):3 w p title "alpha" lt -1 pt 8 ps 2, \
    -     \'ArtificialSynchrony.dat\' u ($1/3.90625):2 w l title "" lt -1 lw 2, \
    -     \'ArtificialSynchrony.dat\' u ($1/3.90625):2 w p title "alpha canon" lt -1 pt 6 ps 2';
    -close ofile;
    -
    -
    -system ("gnuplot ArtificialSynchrony.gnu > ArtificialSynchrony.ps && gv ArtificialSynchrony.ps");       # Create plot and show it
    -
    -
    -
    diff --git a/examples/nest/ArtificialSynchrony.sli b/examples/nest/ArtificialSynchrony.sli
    deleted file mode 100644
    index d0f35f278d..0000000000
    --- a/examples/nest/ArtificialSynchrony.sli
    +++ /dev/null
    @@ -1,227 +0,0 @@
    -/*
    - *  ArtificialSynchrony.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -%%%%%%%%%%%%%%%% Write welcome message %%%%%%%%%%%%%%%%%%%%%%
    -(\n\n) =
    -1 1 80 { (#) =only } for ( ) =
    -(Artificial synchrony can be introduced by discrete-time simulation
    -of neuronal networks, because they typically constrain spike times to a
    -grid determined by the computational step size. Hansel et al. (1998) used
    -a small all to all connected network of spiking neurons to demonstrated
    -that this artificial synchrony can be reduced by a finer resolution or by
    -interpolating for the correct spike times. In a further step Morrison et
    -al. (2007) showed that by interpolating the exact spike times and
    -distributing them, not only the artificial synchrony is avoided
    -but even machine precision can be obtained for small time steps.
    -
    -Here, we simulate the 'Hansel' network of 128 all to all connected
    -excitatory I&F neurons with alpha shaped PSC in the
    -1. precise implementation by Morrison et al. (2007).
    -2. grid constrained implementation
    -
    -The synchrony of the network can be calculated from the membrane
    -potentials of each neuron following Hansel et al. (1998).  Thus, by
    -varying the coupling weights and estimating the corresponding
    -synchrony of the network the results of Hansel et al. (1998), Morrison
    -et al. (2007) and Diesmann et al. (2008) can be reproduced.
    -
    -An additional Perl script performs the task to calculate the synchrony
    -and generate the final plot.
    -
    -References:
    -D. Hansel, G. Mato, C. Meunier, and L. Neltner. On numerical
    -simulations of integrate-and-fire neural networks. Neural Computation,
    -10(2):467-483, Feb., 15 1998.
    -
    -A. Morrison, S. Straube, H. E. Plesser, and M. Diesmann. Exact
    -subthreshold integration with continuous spike times in discrete time
    -neural network simulations. Neural Computation, 19(1):47-79, 2007.
    -
    -Diesmann M, Hanuschkin A, Helias M, Kunkel S and Morrison A
    -(2008). The performance of solvers for integrate-and-fire models with
    -exact spike timing.  Frontiers in Neuroinformatics. Conference
    -Abstract: Neuroinformatics 2008.
    -
    -AH 09) =
    -1 1 80 { (#) =only } for (\n\n) =
    -
    -
    -%%%%%%%%%%%%%%%%% Simulation parameter  %%%%%%%%%%%%%%%%%%%%%%%%%
    -(Set Simulation Parameters ) =only
    -/nr 128 def                     % number of neurons in the network
    -
    -/h 2. -5 pow def                % simulation resolution h=2^-5
    -/tics_per_ms 2 5 pow def        % low-level time resolution in tics
    -
    -/C_m 250.0 def                  % membrane capacitance
    -/E_L 0.0 def                    % leaky potential
    -/I_e 575.0 def                  % suprathreshold current
    -/tau_m 10.0 def                 % membrane time constant
    -/V_reset 0.0 def                % reset potential
    -/V_th  20.0 def                 % threshold potential
    -/t_refra 0.25 def               % refractory time
    -/tau_syn_ex 1.648 def           % syn. time constant 3/2ln3
    -/INTERPOL 3 def                 % cubic interpolation (canonical model)
    -
    -/gamma 0.5 def                  % parameter determining the degree of synchrony at the beginning
    -
    -/tofile true def                % write potentials of the neurons to file
    -
    -/delay 0.25 def                 % synaptic delay
    -
    -%% set random number generator seed and random parameter
    -/rng_seed 2000 def
    -/V_m_parameter << /uniform << /min V_reset /max V_th >> >> CreateParameter def
    -(-DONE-) =
    -
    -
    -%%%%%%%%%%%%%%%%% Setup report  %%%%%%%%%%%%%%%%%%%%%%%%%
    -(gamma []: \t) =only gamma =    % The initial synchronization is determined by gamma.
    -(delay [ms]:\t) =only delay =
    -(tau_r [ms]:\t) =only t_refra =
    -
    -%% Calculate spike period T (needed for setup of initial membrane potential)
    - tau_m  C_m   div  /R Set
    - R I_e mul  E_L add  V_reset sub  R I_e mul  E_L add  V_th sub  div  ln  tau_m mul  dup /T Set
    - (ISI [ms]:\t) =only  T =only
    - 1.0 exch div  % now we have the fire rate
    - (, i.e. firingrate [Hz]: ) =only 1000.0 mul =
    -
    -
    -%%%%%%%%%%%%%%%%%  Start Simulation Section   %%%%%%%%%%%%%%%%%%%%%%%%%
    -1 1 2 {
    -/sim Set   % sim = 1 Canon / sim = 2 Grid
    -
    -sim 1 eq {
    - /params <<
    -        /C_m C_m
    -        /E_L E_L
    -        /I_e I_e
    -        /tau_m tau_m
    -        /tau_syn tau_syn_ex
    -        /V_m  E_L
    -        /V_reset V_reset
    -        /V_th  V_th
    -        /t_ref t_refra
    -        /Interpol_Order INTERPOL
    -     >> def
    - }
    - {
    - /params <<
    -        /C_m C_m
    -        /E_L E_L
    -        /I_e I_e
    -        /tau_m tau_m
    -        /tau_syn_ex tau_syn_ex
    -        /V_m  E_L
    -        /V_reset V_reset
    -        /V_th  V_th
    -        /t_ref t_refra
    -     >> def
    - } ifelse
    -
    -
    -() =
    -1 1 40 { (#) =only } for
    -sim 1 eq {(\nRun the canonical simulations first: )= }
    -         {(\nRun the grid constrained simulations now: )= } ifelse
    -
    -userdict begin
    - 0.0 0.2 5.0 {
    -  cvd /strength Set
    -
    -  (weigth [pA]:\t) =only strength =
    -
    -  %set resolution and limits on delays
    -  % limits must be set BEFORE connecting any elements
    -  <<
    -      /resolution h                  % time steps in ms
    -      /tics_per_ms tics_per_ms       % low-level time resolution
    -      /off_grid_spiking true         % precise neuron model
    -      /rng_seed rng_seed             % set rng seed
    -      /overwrite_files true          % overwrite previous output
    -  >> SetKernelStatus
    -
    -  sim 1 eq { /neurons /iaf_psc_alpha_canon nr Create def }
    -           { /neurons /iaf_psc_alpha nr Create def } ifelse
    -
    -  % connect neurons all to all
    -  /autapses_bool true def         % Change to false to avoid self connections
    -  neurons neurons << /rule /all_to_all /allow_autapses autapses_bool >> << /weight strength /delay delay >> Connect
    -
    -  /*                                    % uncomment to verify connections
    -  %% Readout if everything works
    -  neurons {
    -    /ii Set
    -    (\n\nneuron ) = ii = (connects to) =
    -    << /source ii /synapse_model /static_synapse >> GetConnections
    -    { GetStatus /target get } Map ==
    -  } forall
    -  */
    -
    -  %% Set the neuron parameters according to definition
    -  (Set neuron parameters ) =only
    -  neurons {
    -    params SetStatus
    -  } forall
    -  (-DONE-) =
    -
    -  %% Set initial potentials
    -  (Set initial potentials [mV] (Morrison et al. 2007) ) =only
    -  neurons {
    -   /ii Set
    -   R I_e mul                            % like Morrison et al. 2007
    -   1 -1.0 gamma mul ii 1 sub nr cvd div T tau_m div mul mul exp sub mul
    -   %dup =                               % uncomment to print out value of initial potentials
    -
    -   /V_0 Set
    -
    -   %%% Alternatively take just random initial states
    -   % /V_0 V_m_parameter dup def
    -
    -   ii << /V_m  V_0 >> SetStatus         % set initial potential to each neuron
    -  } forall
    -  (-DONE-) =
    -
    -  /record_to tofile { /ascii } { [] } ifelse def
    -
    -  (Create voltmeter ) =only
    -  %% generate spike recorders and voltmeter for each neuron
    -  % spike recorders will generate enormous amounts of data!
    -  % /spike_recorder << /record_to record_to >> Create /detec Set
    -  /voltmeter << /record_to record_to /interval 1.0 >> Create /volt Set
    -
    -  sim 1 eq {volt  <<  /label (voltmeter-Canon-) strength cvs join >> SetStatus}
    -           {volt  <<  /label (voltmeter-Grid-) strength cvs join >> SetStatus} ifelse
    -  (-DONE-) =
    -
    -  % neurons detec 1.0 h Connect         % connect spike_recorder
    -  volt neurons 1.0 h Connect            % connect voltmeter
    -
    -  10000 Simulate                        % simulate for 10s
    -
    -  ResetKernel
    - } for                                  % for each coupling strength
    -end
    -} for                                   % for each neuron model
    diff --git a/examples/nest/Brette_et_al_2007/benchmark.sli b/examples/nest/Brette_et_al_2007/benchmark.sli
    deleted file mode 100644
    index 2d7f09f11b..0000000000
    --- a/examples/nest/Brette_et_al_2007/benchmark.sli
    +++ /dev/null
    @@ -1,246 +0,0 @@
    -/*
    - *  benchmark.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -   Simulator review
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons which exhibits self-sustained
    -   activity after an initial stimulus.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 500
    -   neurons from each population are recorded. The model is based on
    -
    -      T.P. Vogels & L.F. Abbott
    -      Signal Propagation and Logic Gating in Networks of
    -      Integrate-and-Fire Neurons
    -      Journal of Neuroscience, 2005, vol 25, pp 10786-10795.
    -
    -   where neurons are described by the leaky integrate-and-fire
    -   model with conductance based synapses. The synaptic conductances
    -   are decaying exponentials. The Vogels & Abbott model is integrated
    -   on a fixed time grid of 0.1 ms with spike times constrained to this
    -   grid.
    -
    -   The different benchmarks of the FACETS simulator review are variations
    -   of the Vogels & Abbott network model with differences in the model of
    -   the synapse and in the model of the somatic dynamics. The table below
    -   provides an overview
    -
    -   -----------------------------------------------------------------------------
    -       |                     |       synapse model        |
    -     # |  name        | soma | quantity     | time course | spike times
    -   -----------------------------------------------------------------------------
    -     1 | coba.sli     | i&f  | conductance  | exponential | grid-constrained
    -     2 | cuba.sli     | i&f  | current      | exponential | grid-constrained
    -     3 | hh_coba.sli  | HH   | conductance  | exponential | grid-constrained
    -     4 | cuba_ps.sli  | i&f  | current      | delta       | off-grid
    -
    -   Usage:
    -     This file (benchmark.sli) must be used in conjunction with
    -     one of the parameter files above, e.g
    -
    -     nest coba.sli benchmark.sli
    -
    -   If the number of threads is set to greater than one, the benchmarks can
    -   be run in a distributed fashion using mpirun, e.g.
    -
    -     mpirun -np 2 nest coba.sli benchmark.sli
    -
    -   In addition to the four official benchmarks of the FACETS review, a fifth
    -   benchmark has been defined to demonstrate the capabilities of NEST in
    -   simulating large networks with heterogeneous synaptic dynamics. This
    -   benchmark is self contained and can be run from the nest command line
    -   without this file.
    -
    -   -----------------------------------------------------------------------------
    -     5 | cuba_stdp.sli | i&f  | stdp-current | exponential | grid-constrained
    -   -----------------------------------------------------------------------------
    -
    -
    -
    -    Marc-Oliver Gewaltig, Abigail Morrison, Tobias Potjans
    -*/
    -
    -%%% FUNCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Take spike recorder, find total number of spikes registered,
    -% return average rate per neuron in Hz.
    -% NOTE: If you are running with several MPI processes, this
    -%       function only gives an approximation to the true rate.
    -%
    -% spike_det ComputeRate -> rate
    -/ComputeRate
    -{
    -  GetStatus 0 get /n_events get /nspikes Set
    -  % We need to guess how many neurons we record from.
    -  % This assumes an even distribution of nodes across
    -  % processes, which is ok for the Brette_et_al_2007
    -  % benchmarks, but should not be considered a general
    -  % solution.
    -  Nrec cvd NumProcesses div
    -  /nnrn Set
    -
    -  nspikes nnrn simtime mul div
    -  1000 mul         % convert from mHz to Hz, leave on stack
    -  end
    -} bind             % optional, improves performance
    -def
    -
    -
    -%%% CONSTRUCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/BuildNetwork
    -{
    -  % set global kernel parameters
    -  <<
    -     /resolution  dt
    -     /total_num_virtual_procs virtual_processes
    -     /overwrite_files true
    -  >> SetKernelStatus
    -
    -  tic % start timer on construction
    -
    -  % Set initial parameters for all new neurons and devices
    -
    -  model    model_params    SetDefaults
    -
    -  (Creating excitatory population.) =  % show message
    -  /E_neurons model NE Create def
    -
    -  (Creating inhibitory population.) =  % show message
    -  /I_neurons model NI Create def
    -
    -  (Creating excitatory stimulus generator.) =
    -  /E_stimulus stimulus Create def
    -  E_stimulus stimulus_params SetStatus
    -
    -  % one recorder would in principle be enough,
    -  % but by recording the populations separately,
    -  % we save ourselves a lot of sorting work later
    -
    -  (Creating excitatory spike recorder.) =
    -  /E_recorder recorder Create def
    -  E_recorder recorder_params SetStatus
    -
    -  (Creating inhibitory spike recorder.) =
    -  /I_recorder recorder Create def
    -  I_recorder recorder_params SetStatus
    -
    -  % all neurons
    -  /allNeurons E_neurons I_neurons join def
    -
    -  /N allNeurons size def
    -
    -  /CE NE epsilon mul iround def %number of incoming excitatory connections
    -  /CI NI epsilon mul iround def %number of incomining inhibitory connections
    -
    -  % number of synapses---just so we know
    -  /Nsyn
    -    CE CI add  % internal synapses
    -    N mul
    -    Nrec 2 mul % "synapses" to spike recorders
    -    add
    -    Nstim add  % "synapses" from poisson generator
    -  def
    -
    -  % Create custom synapse types with appropriate values for
    -  % our excitatory and inhibitory connections
    -  /static_synapse << /delay delay >> SetDefaults
    -  /static_synapse /syn_ex E_synapse_params CopyModel
    -  /static_synapse /syn_in I_synapse_params CopyModel
    -
    -  (Connecting excitatory population.) =
    -
    -  % E -> E connections
    -  E_neurons   % source population [we pick from this]
    -  E_neurons   % target neurons [for each we pick CE sources]
    -  << /rule  /fixed_indegree /indegree CE >> % number of source neurons to pick
    -  /syn_ex     % synapse model
    -  Connect
    -
    -  % I -> E connections
    -  % as above, but on a single line
    -  I_neurons E_neurons << /rule /fixed_indegree /indegree CI >> /syn_in Connect
    -
    -
    -  (Connecting inhibitory population.) =
    -
    -  % ... as above, just written more compactly
    -  % E -> I
    -  E_neurons I_neurons << /rule /fixed_indegree /indegree CE >> /syn_ex Connect
    -  % I -> I
    -  I_neurons I_neurons << /rule /fixed_indegree /indegree CI >> /syn_in Connect
    -
    -  %Add external stimulus
    -
    -  (Connecting Poisson stimulus.) =
    -  E_stimulus
    -  E_neurons Nstim Take     % pick the first Nstim neurons
    -  /all_to_all
    -  /syn_ex
    -  Connect
    -
    -
    -  % Spike recorders are connected to the first Nrec neurons in each
    -  % population.  Since neurons are equal and connectivity is homogeneously
    -  % randomized, this is equivalent to picking Nrec neurons at random
    -  % from each population
    -
    -  (Connecting spike recorders.) =
    -
    -  E_neurons Nrec Take     % pick the first Nrec neurons
    -  E_recorder Connect
    -
    -  I_neurons Nrec Take     % pick the first Nrec neurons
    -  I_recorder Connect
    -
    -  % read out time used for building
    -
    -  toc /BuildCPUTime Set
    -} def
    -
    -/RunSimulation
    -{
    -  BuildNetwork
    -
    -  % run, measure computer time with tic-toc
    -  tic
    -  (Simulating...) =
    -  simtime Simulate
    -  toc /SimCPUTime Set
    -
    -  % write a little report
    -  (Simulation summary) =
    -  (Number of Neurons : ) =only N =
    -  (Number of Synapses: ) =only Nsyn =
    -  (Excitatory rate   : ) =only E_recorder ComputeRate =only ( Hz) =
    -  (Inhibitory rate   : ) =only I_recorder ComputeRate =only ( Hz) =
    -  (Building time     : ) =only BuildCPUTime =only ( s) =
    -  (Simulation time   : ) =only SimCPUTime   =only ( s\n) =
    -} def
    -
    -/parameters_set lookup {
    -  RunSimulation
    -} {
    -  (Parameters are not set. Please call one of coba.sli, cuba_ps.sli, cuba.sli, cuba_stdp.sli, or hh_coba.sli.) M_ERROR message
    -} ifelse
    diff --git a/examples/nest/Brette_et_al_2007/coba.sli b/examples/nest/Brette_et_al_2007/coba.sli
    deleted file mode 100644
    index dbffc12782..0000000000
    --- a/examples/nest/Brette_et_al_2007/coba.sli
    +++ /dev/null
    @@ -1,121 +0,0 @@
    -/*
    - *  coba.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   Benchmark 1 of the simulator review
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons which exhibits self-sustained
    -   activity after an initial stimulus.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 500
    -   neurons from each population are recorded.  Neurons are modeled
    -   as leaky integrate-and-fire neurons with conductance based synapses
    -   (exponential functions).  The model is based on
    -
    -      T.P. Vogels & L.F. Abbott
    -      Signal Propagation and Logic Gating in Networks of
    -      Integrate-and-Fire Neurons
    -      Journal of Neuroscience, 2005, vol 25, pp 10786-10795.
    -
    -    Marc-Oliver Gewaltig, Abigail Morrison, Tobias Potjans
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -% A dictionary is a list of name value pairs, enclosed in << and >>
    -% Here we use dictionaries to encapsulate the parameters for the different
    -% benchmarks
    -
    -/coba_params
    -<<
    -  /model  /iaf_cond_exp  % the neuron model to use
    -
    -  /model_params
    -   <<
    -     /E_L     -60.0 mV  % resting potential [mV]
    -     /V_th    -50.  mV  % threshold [mV]
    -     /V_reset -60.  mV  % resetpotential [mV]
    -     /t_ref     5.0 ms  % refractory period [ms]
    -     /E_ex      0.0 mV  % excitatory reversal potential [mV]
    -     /E_in    -80.  mV  % inhibitory reversal potential [mV]
    -     /C_m     200.0     % capacity [pF]
    -     /g_L      10.0 nS  % leak conductance [nS]
    -     /tau_syn_ex  5.0 ms % excitatory synaptic time constant [ms]
    -     /tau_syn_in 10.0 ms % inhibitory synapse time constant [ms]
    -   >>
    -
    -  /delay  0.1 ms          % synaptic delay, all connections [ms]
    -
    -  % synaptic strengths, here peak conductance
    -  /E_synapse_params
    -  <<
    -     /weight 6.0  nS     % [nS], excitatory
    -  >>
    -
    -  /I_synapse_params
    -  <<
    -     /weight -67.0 nS     % [nS], inhibitory
    -  >>
    -
    -  /stimulus /poisson_generator
    -  /stimulus_params
    -  <<
    -    /rate 300.0 Hz   % rate of inital poisson stimulus
    -    /start  1.0 ms   % start of Poisson_generator [ms]
    -    /stop  51.0 ms   % stop of Poisson_generator [ms]
    -    /origin 0.0 ms   % origin of time, to calculate start_time [ms]
    -  >>
    -
    -  /recorder /spike_recorder
    -  /recorder_params
    -  <<
    -   /record_to /ascii
    -   /label (coba)
    -  >>
    -
    -  % number of neurons per population to record from
    -  /Nrec 500
    -
    -  %number of neurons to stimulate
    -  /Nstim 50
    -  /simtime 1000.0 ms % simulated time
    -  /dt         0.1 ms % simulation step
    -
    -  /NE 3200       % number of excitatory neurons
    -  /NI  800       % number of inhibitory neurons
    -  /epsilon 0.02  % Connection probability
    -
    -  /virtual_processes 1  % number of virtual processes to use
    -
    ->> def
    -
    -coba_params using % here we activate the definitions in the dictionary
    -
    -/parameters_set true def
    -statusdict/argv :: size 1 gt { 1 get dirname (/) join } { () } ifelse
    -(benchmark.sli) join run
    diff --git a/examples/nest/Brette_et_al_2007/cuba.sli b/examples/nest/Brette_et_al_2007/cuba.sli
    deleted file mode 100644
    index 04a7193179..0000000000
    --- a/examples/nest/Brette_et_al_2007/cuba.sli
    +++ /dev/null
    @@ -1,127 +0,0 @@
    -/*
    - *  cuba.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   Benchmark 2 of the simulator review
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons which exhibits self-sustained
    -   activity after an initial stimulus.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 500
    -   neurons from each population are recorded.  Neurons are modeled
    -   as leaky integrate-and-fire neurons with conductance based synapses
    -   (exponential functions).  The model is based on
    -
    -      T.P. Vogels & L.F. Abbott
    -      Signal Propagation and Logic Gating in Networks of
    -      Integrate-and-Fire Neurons
    -      Journal of Neuroscience, 2005, vol 25, pp 10786-10795.
    -
    -   Note that the simulation time is set 10 times longer than for
    -   benchmark 2 (coba.sli) or benchmark 3 (hh_coba.sli). This is
    -   necessary as the computational load here is much lower, so a
    -   longer simulation time is necessary to make reasonable
    -   measurements.
    -
    -    Marc-Oliver Gewaltig, Abigail Morrison, Tobias Potjans
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -% A dictionary is a list of name value pairs, enclosed in << and >>
    -% Here we use dictionaries to encapsulate the parameters for the different
    -% benchmarks
    -
    -/cuba_params
    -<<
    -  /model  /iaf_psc_exp  % the neuron model to use
    -
    -  /model_params
    -   <<
    -     /E_L      -49.0 mV  % resting membrane potential [mV]
    -                         % see Brette et al, J Comput Neurosci 23:349 (2007), p 393
    -     /V_m      -49.0 mV  % initial membrane potential [mV]
    -     /V_th     -50.0 mV  % Threshold [mV]
    -     /V_reset  -60.0 mV  % Reset Potential [mV]
    -     /C_m      200.0 pF  % Capacity of the membrane [pF]
    -     /tau_m     20.0 ms  % Membrane time constant [ms]
    -     /tau_syn_ex 5.0 ms  % time const. postsynaptic excitatory currents [ms]
    -     /tau_syn_in 10.0 ms % time const. postsynaptic inhibitory currents [ms]
    -     /t_ref       5.0 ms % duration of refractory period [ms]
    -   >>
    -
    -  /delay  0.1 ms         % synaptic delay, all connections [ms]
    -
    -  % synaptic strengths, here peak current
    -  /E_synapse_params
    -  <<
    -     /weight 16.2 pA     % excitatory PSC amplitude
    -  >>
    -
    -  /I_synapse_params
    -  <<
    -     /weight -139.5 pA   % inhibitory PSC amplitude
    -  >>
    -
    -  /stimulus /poisson_generator
    -  /stimulus_params
    -  <<
    -    /rate 300.0 Hz   % rate of inital poisson stimulus
    -    /start  1.0 ms   % start of Poisson_generator [ms]
    -    /stop  51.0 ms   % stop of Poisson_generator [ms]
    -    /origin 0.0 ms   % origin of time, to calculate start_time [ms]
    -  >>
    -
    -  /recorder /spike_recorder
    -  /recorder_params
    -  <<
    -   /record_to /ascii
    -   /label (cuba)
    -  >>
    -
    -  % number of neurons per population to record from
    -  /Nrec 500
    -
    -  %number of neurons to stimulate
    -  /Nstim 50
    -  /simtime 10000.0 ms % simulated time
    -  /dt         0.1 ms % simulation step
    -
    -  /NE 3200       % number of excitatory neurons
    -  /NI  800       % number of inhibitory neurons
    -  /epsilon 0.02  % Connection probability
    -
    -  /virtual_processes 1  % number of virtual processes to use
    -
    ->> def
    -
    -cuba_params using % here we activate the definitions in the dictionary
    -
    -/parameters_set true def
    -statusdict/argv :: size 1 gt { 1 get dirname (/) join } { () } ifelse
    -(benchmark.sli) join run
    diff --git a/examples/nest/Brette_et_al_2007/cuba_ps.sli b/examples/nest/Brette_et_al_2007/cuba_ps.sli
    deleted file mode 100644
    index 910b51cc7b..0000000000
    --- a/examples/nest/Brette_et_al_2007/cuba_ps.sli
    +++ /dev/null
    @@ -1,124 +0,0 @@
    -/*
    - *  cuba_ps.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   Benchmark 4 of the simulator review
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons which exhibits self-sustained
    -   activity after an initial stimulus.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 500
    -   neurons from each population are recorded.  Neurons are modeled
    -   as leaky integrate-and-fire neurons with voltage jump synapses. Spike
    -   times are not constrained to the discrete time grid.
    -   The model is based on
    -
    -      T.P. Vogels & L.F. Abbott
    -      Signal Propagation and Logic Gating in Networks of
    -      Integrate-and-Fire Neurons
    -      Journal of Neuroscience, 2005, vol 25, pp 10786-10795.
    -
    -    Marc-Oliver Gewaltig, Abigail Morrison, Tobias Potjans
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -% A dictionary is a list of name value pairs, enclosed in << and >>
    -% Here we use dictionaries to encapsulate the parameters for the different
    -% benchmarks
    -
    -/cuba_ps_params
    -<<
    -  /model  /iaf_psc_delta  % the neuron model to use
    -
    -  /model_params
    -   <<
    -     /E_L     -49.0 mV  % resting membrane potential [mV]
    -                        % see Brette et al, J Comput Neurosci 23:349 (2007), p 393
    -     /V_m     -49.0 mV  % initial membrane potential [mV]
    -     /V_th    -50.0 mV  % Threshold [mV]
    -     /V_reset -60.0 mV  % Reset Potential [mV]
    -     /C_m     200.0 pF  % Capacity of the membrane [pF]
    -     /tau_m    20.0 ms  % Membrane time constant [ms]
    -     /t_ref     5.0 ms  % duration of refractory period [ms]
    -  >>
    -
    -  /delay  0.125 ms         % synaptic delay, all connections [ms]
    -
    -  % synaptic strengths, here voltage jump
    -  /E_synapse_params
    -  <<
    -     /weight 0.25 mV     % excitatory amplitude
    -  >>
    -
    -  /I_synapse_params
    -  <<
    -     /weight -2.25 pA   % inhibitory amplitude
    -  >>
    -
    -  /stimulus /poisson_generator
    -  /stimulus_params
    -  <<
    -    /rate 300.0 Hz   % rate of inital poisson stimulus
    -    /start  1.0 ms   % start of Poisson_generator [ms]
    -    /stop  51.0 ms   % stop of Poisson_generator [ms]
    -    /origin 0.0 ms   % origin of time, to calculate start_time [ms]
    -  >>
    -
    -  /recorder /spike_recorder
    -  /recorder_params
    -  <<
    -   /record_to /ascii
    -   /label (cuba_ps)
    -  >>
    -
    -  % number of neurons per population to record from
    -  /Nrec 500
    -
    -  %number of neurons to stimulate
    -  /Nstim 50
    -  /simtime 10000.0 ms   % simulated time
    -  /dt         0.125 ms  % simulation step
    -
    -  /NE 3200       % number of excitatory neurons
    -  /NI  800       % number of inhibitory neurons
    -  /epsilon 0.02  % Connection probability
    -
    -  /virtual_processes 1  % number of virtual processes to use
    -
    ->> def
    -
    -cuba_ps_params using % here we activate the definitions in the dictionary
    -
    -  <<
    -     /off_grid_spiking true
    -  >> SetKernelStatus
    -
    -/parameters_set true def
    -statusdict/argv :: size 1 gt { 1 get dirname (/) join } { () } ifelse
    -(benchmark.sli) join run
    diff --git a/examples/nest/Brette_et_al_2007/cuba_stdp.sli b/examples/nest/Brette_et_al_2007/cuba_stdp.sli
    deleted file mode 100644
    index 24547894bc..0000000000
    --- a/examples/nest/Brette_et_al_2007/cuba_stdp.sli
    +++ /dev/null
    @@ -1,320 +0,0 @@
    -/*
    - *  cuba_stdp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   The fifth simulator review benchmark is implemented as a variation of the
    -      * Brunel Network *
    -
    -   (from the docu of brunel.sli)
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 1000
    -   neurons are recorded.  Neurons are modeled as leaky
    -   integrate-and-fire neurons with current-injecting synapses
    -   (exp functions). Excitatory-excitatory synapses implement
    -   multiplicative STDP.
    -   Marc-Oliver Gewaltig, Abigail Morrison, Wiebke Potjans, Tobias Potjans
    -
    -   Usage:
    -   This file (cuba_stdp.sli) is used on its own, e.g.
    -
    -     nest cuba_stdp.sli
    -
    -   If virtual_processes is set to a value greater than one, the benchmarks can
    -   will be run with that number of virtual processes. If you do not use MPI, each
    -   virtual process is mapped to one POSIX thread. You should not use more POSIX
    -   threads per machine than there are processor cores. If you use MPI, you can
    -   run the benchmark in a distributed fashion using mpirun, e.g.
    -
    -     mpirun -np 2 nest cuba_stdp.sli
    -
    -   In this case, the number of MPI processes must divide the number of virtual
    -   processes without remainder. You could, e.g. use 4 virtual processes on a
    -   mini-cluster of 2 machines with 2 CPUs each.
    -
    -
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -% A dictionary is a list of name value pairs, enclosed in << and >>
    -% Here we use dictionaries to encapsulate the parameters for the different
    -% benchmarks
    -
    -/plastic_brunel_params
    -<<
    -
    -  /virtual_processes 1  % number of virtual processes to use
    -  /simtime 2000.0 ms % simulated time
    -  /dt         0.1 ms % simulation step
    -
    -
    -  /NE 9000       % number of excitatory neurons
    -  /NI 2250       % number of inhibitory neurons
    -
    -
    -  /model  /iaf_psc_exp  % the neuron model to use
    -  /model_params
    -   <<
    -   % Set variables for iaf_psc_exp
    -    /E_L     0.0  mV  % Resting membrane potential [mV]
    -    /V_m     0.0  mV  % Initial membrane potential [mV]
    -    /V_th   20.0  mV  % Threshold [mV]
    -    /V_reset 0.0  mV  % Reset Potential [mV]
    -    /C_m   250.0  pF  % Capacity of the membrane [pF]
    -    /tau_m  20.0  ms  % Membrane time constant [ms]
    -                      % V randomly initialized see below
    -   >>
    -
    -  /mean_potential 7.0 mV
    -  /sigma_potential 5.0 mV
    -
    -  /epsilon 0.1           % Connection probability
    -  /delay  1.5 ms         % synaptic delay, static connections [ms]
    -  /JE 35.0 pA            % peak amplitude of PSC [pA]
    -  /g  5.0                % relative strength of inhib. connections
    -
    -  /plastic_synapses true
    -  /stdp_params
    -  <<
    -    /delay 1.5 ms
    -    /alpha 1.05      %STDP asymmetry parameter
    -  >>
    -  /sigma_w 3.0       %initial standard dev. of E->E synapses [pA]
    -
    -  /stimulus /poisson_generator
    -  /stimulus_params
    -  <<
    -    /rate 900.0 4.5 mul Hz % rate of inital poisson stimulus
    -  >>
    -
    -  /recorder /spike_recorder
    -  /recorder_params
    -  <<
    -   /record_to /ascii
    -   /label (cuba_stdp)
    -  >>
    -
    -
    -  /Nrec 500    % number of neurons per population to record from
    -
    ->> def
    -
    -% Here we resolve parameter dependencies, by making the independent
    -% values visible
    -plastic_brunel_params dup using
    -<<
    - /E_synapse_params
    -  <<
    -     /weight JE          % excitatory synaptic conductance
    -  >>
    -
    -  /I_synapse_params
    -  <<
    -     /weight JE g mul -1.0 mul  % inhibitory synaptic current [pA]
    -  >>
    ->> join
    -
    -stdp_params
    -<<
    -  /weight JE
    -  /Wmax 2.0 JE mul       %max strength of E->E synapses [pA]
    ->> join
    -
    -% create one single random number generator
    -% set random number generator seed
    -<< /rng_seed 238 >> SetKernelStatus
    -
    -% normal distribution to draw several quantities from
    -/normal_param << /normal << /mean mean_potential /std sigma_potential >> >> CreateParameter def
    -/v_m_parameter normal_param (-inf) cvd model_params /V_th get redraw def
    -
    -
    -%%% FUNCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Take spike recorder, find total number of spikes registered,
    -% return average rate per neuron in Hz.
    -% NOTE: If you are running with several MPI processes, this
    -%       function only gives an approximation to the true rate.
    -%
    -% spike_det ComputeRate -> rate
    -/ComputeRate
    -{
    -  GetStatus 0 get /n_events get /nspikes Set
    -
    -  % We need to guess how many neurons we record from.
    -  % This assumes an even distribution of nodes across
    -  % processes, as well as homogeneous activity in the
    -  % network. This is ok for this type of symmetric
    -  % network but should not be considered a general
    -  % solution.
    -  plastic_brunel_params /Nrec get cvd NumProcesses div
    -  /nnrn Set
    -
    -  nspikes nnrn plastic_brunel_params /simtime get mul div
    -  1000 mul         % convert from mHz to Hz, leave on stack
    -  end
    -} bind             % optional, improves performance
    -def
    -
    -/BuildNetwork
    -{
    -
    -  tic % start timer on construction
    -  % set global kernel parameters
    -  <<
    -     /resolution  dt
    -     /total_num_virtual_procs virtual_processes
    -     /overwrite_files true
    -  >> SetKernelStatus
    -
    -
    -  model    model_params    SetDefaults
    -  M_INFO (BuildNetwork)
    -  (Creating excitatory population.) message  % show message
    -  /E_neurons model NE Create def
    -
    -  M_INFO (BuildNetwork)
    -  (Creating inhibitory population.) message  % show message
    -  /I_neurons model NI Create def
    -
    -  M_INFO (BuildNetwork)
    -  (Creating excitatory stimulus generator.) message
    -  /E_stimulus stimulus Create def
    -  E_stimulus stimulus_params SetStatus
    -
    -  /I_stimulus stimulus Create def
    -   I_stimulus stimulus_params SetStatus
    -
    -  % one recorder would in principle be enough,
    -  % but by recording the populations separately,
    -  % we save ourselves a lot of sorting work later
    -
    -  M_INFO (BuildNetwork)
    -  (Creating excitatory spike recorder.) message
    -  /E_recorder recorder Create def
    -  E_recorder recorder_params SetStatus
    -
    -  M_INFO (BuildNetwork)
    -  (Creating inhibitory spike recorder.) message
    -  /I_recorder recorder Create def
    -  I_recorder recorder_params SetStatus
    -
    -  % all neurons
    -  /allNeurons E_neurons I_neurons join def
    -
    -  /N allNeurons size def
    -
    -  /CE NE epsilon mul iround def %number of incoming excitatory connections
    -  /CI NI epsilon mul iround def %number of incomining inhibitory connections
    -
    -  M_INFO (BuildNetwork)
    -  (Configuring neuron parameters.) message
    -  allNeurons << /V_m  v_m_parameter >> SetStatus
    -
    -  % Create custom synapse types with appropriate values for
    -  % our excitatory and inhibitory connections
    -  /static_synapse << /delay delay >> SetDefaults
    -  /static_synapse /syn_ex E_synapse_params CopyModel
    -  /static_synapse /syn_in I_synapse_params CopyModel
    -  /stdp_synapse stdp_params SetDefaults
    -
    -  plastic_synapses
    -  {
    -    /synapse_model /stdp_synapse def% plastic
    -  }
    -  {
    -    /synapse_model /syn_ex def
    -  } ifelse
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting stimulus generators.) message
    -
    -  % Connect Poisson generator to neuron
    -  E_stimulus E_neurons << /rule /all_to_all >> << /synapse_model /syn_ex >> Connect
    -  I_stimulus I_neurons << /rule /all_to_all >> << /synapse_model /syn_ex >> Connect
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting excitatory -> excitatory population.) message
    -  /weight_dist << /normal << /mean JE /std sigma_w >> >> CreateParameter def
    -  E_neurons E_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model synapse_model /weight weight_dist >> Connect
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting excitatory -> inhibitory population.) message
    -  E_neurons I_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model /syn_ex >> Connect
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting inhibitory -> excitatory population.) message
    -  I_neurons E_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting inhibitory -> inhibitory population.) message
    -  I_neurons I_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -  % Spike recorders are connected to the first Nrec neurons in each
    -  % population.  Since neurons are equal and connectivity is homogeneously
    -  % randomized, this is equivalent to picking Nrec neurons at random
    -  % from each population
    -  M_INFO (BuildNetwork)
    -  (Connecting spike recorders.) message
    -
    -  E_neurons Nrec Take E_recorder Connect
    -  I_neurons Nrec Take I_recorder Connect
    -
    -  % read out time used for building
    -  toc /BuildCPUTime Set
    - } def % end of buildnetwork
    -
    -{
    -  ResetKernel
    -  M_INFO setverbosity
    -
    -  BuildNetwork
    -  tic
    -
    -  simtime Simulate
    -
    -  toc /SimCPUTime Set
    -   % number of synapses---just so we know
    -  /Nsyn
    -    CE CI add  % internal synapses
    -    N mul
    -    Nrec 2 mul % "synapses" to spike recorders
    -    add
    -    N add      % "synapses" from poisson generator
    -  def
    -
    -  (\nBrunel Network Simulation) =
    -  (Building time     : ) =only BuildCPUTime =only ( s) =
    -  (Simulation time   : ) =only SimCPUTime   =only ( s\n) =
    -  (Number of Neurons : ) =only N =
    -  (Number of Synapses: ) =only Nsyn =
    -  (Excitatory rate   : ) =only E_recorder ComputeRate =only ( Hz) =
    -  (Inhibitory rate   : ) =only I_recorder ComputeRate =only ( Hz) =
    -
    -} exec
    diff --git a/examples/nest/Brette_et_al_2007/hh_coba.sli b/examples/nest/Brette_et_al_2007/hh_coba.sli
    deleted file mode 100644
    index 82c0a429d1..0000000000
    --- a/examples/nest/Brette_et_al_2007/hh_coba.sli
    +++ /dev/null
    @@ -1,122 +0,0 @@
    -/*
    - *  hh_coba.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   Benchmark 3 of the simulator review
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons which exhibits self-sustained
    -   activity after an initial stimulus.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 500
    -   neurons from each population are recorded.  Neurons are modeled
    -   as Hodgkin-Huxley neurons with conductance based synapses
    -   (exponential functions).  The model is based on
    -
    -      T.P. Vogels & L.F. Abbott
    -      Signal Propagation and Logic Gating in Networks of
    -      Integrate-and-Fire Neurons
    -      Journal of Neuroscience, 2005, vol 25, pp 10786-10795.
    -
    -    Marc-Oliver Gewaltig, Abigail Morrison, Tobias Potjans
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -% A dictionary is a list of name value pairs, enclosed in << and >>
    -% Here we use dictionaries to encapsulate the parameters for the different
    -% benchmarks
    -
    -/hh_coba_params
    -<<
    -  /model  /hh_cond_exp_traub  % the neuron model to use
    -
    -  /model_params
    -   <<
    -     /g_Na 20000.0 nS % Sodium conductance [nS]
    -     /g_K   6000.0 nS % K Conductance      [nS]
    -     /g_L     10.0 nS % Leak Conductance   [nS]
    -     /C_m    200.0 pF % Membrane Capacitance [pF]
    -     /E_Na    50.0 mV % reversal potential (Sodium) [mV]
    -     /E_K    -90.0 mV % reversal potential (Potassium) [mV]
    -     /E_L    -60.0 mV % Resting Potential [mV]
    -     /E_ex     0.0 mV % Excitatory reversal potential (mV)
    -     /E_in   -80.0 mV % Inhibitory reversal potential (Potassium) [mV]
    -     /tau_syn_ex   5.0 ms % Excitatory synaptic time constant [ms]
    -     /tau_syn_in  10.0 ms % Inhibitory synaptic time constant [ms]
    -   >>
    -
    -  /delay  0.1 ms         % synaptic delay, all connections [ms]
    -
    -  % synaptic strengths, here peak conductance
    -  /E_synapse_params
    -  <<
    -     /weight 6.0 nS     % excitatory synaptic conductance
    -  >>
    -
    -  /I_synapse_params
    -  <<
    -     /weight -67.0 nS   % inhibitory synaptic conductance
    -  >>
    -
    -  /stimulus /poisson_generator
    -  /stimulus_params
    -  <<
    -    /rate 300.0 Hz % rate of inital poisson stimulus
    -    /start  1.0 ms   % start of Poisson_generator [ms]
    -    /stop  51.0 ms   % stop of Poisson_generator [ms]
    -    /origin 0.0 ms   % origin of time, to calculate start_time [ms]
    -  >>
    -
    -  /recorder /spike_recorder
    -  /recorder_params
    -  <<
    -   /record_to /ascii
    -   /label (hh_coba)
    -  >>
    -
    -  % number of neurons per population to record from
    -  /Nrec 500
    -
    -  %number of neurons to stimulate
    -  /Nstim 50
    -  /simtime 1000.0 ms % simulated time
    -  /dt         0.1 ms % simulation step
    -
    -  /NE 3200       % number of excitatory neurons
    -  /NI  800       % number of inhibitory neurons
    -  /epsilon 0.02  % Connection probability
    -
    -  /virtual_processes 1  % number of virtual processes to use
    -
    ->> def
    -
    -hh_coba_params using % here we activate the definitions in the dictionary
    -
    -/parameters_set true def
    -statusdict/argv :: size 1 gt { 1 get dirname (/) join } { () } ifelse
    -(benchmark.sli) join run
    diff --git a/examples/nest/BrodyHopfield.sli b/examples/nest/BrodyHopfield.sli
    deleted file mode 100644
    index 333f21f487..0000000000
    --- a/examples/nest/BrodyHopfield.sli
    +++ /dev/null
    @@ -1,100 +0,0 @@
    -/*
    - *  BrodyHopfield.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -    Synchronization Behavior
    -
    -    The SLI code in this file reproduces the spike synchronization
    -    behavior of integrate-and-fire neurons in response to a subthreshold
    -    oscillation. This phenomenon is shown in Fig. 1 of
    -
    -        C.D. Brody and J.J. Hopfield
    -        Simple Networks for Spike-Timing-Based Computation,
    -        with Application to Olfactory Processing
    -        Neuron 37, 843-852 (2003)
    -
    -    Neurons receive a weak 35Hz oscillation, a gaussian noise current
    -    and an increasing DC. The time-locking capability is shown to
    -    depend on the input current given.
    -    All parameters are taken from the above paper.
    -
    -   Sven Schrader
    -*/
    -
    -ResetKernel
    -
    -<< /overwrite_files true >> SetKernelStatus
    -
    -/N             1000   def % number of neurons
    -/T             600 ms def % simulation time
    -/bias_begin    140 pA def % increasing bias current to all neurons...
    -/bias_end      200 pA def % ...from neuron 0 to N-1
    -
    -/ac_generator       Create /drive   Set
    -/noise_generator    Create /noise   Set
    -/spike_recorder     Create /sr      Set
    -/iaf_psc_alpha   N  Create /neurons Set
    -
    -sr << /record_to /ascii >> SetStatus
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -drive
    -<<
    -    /amplitude 50. pA
    -    /frequency 35. Hz
    ->> SetStatus
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -noise
    -<<
    -    /mean    0.   pA
    -    /std     200. pA
    ->> SetStatus
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -0 1 N 1 sub {
    -    /i Set neurons i get
    -    <<
    -        /tau_m  20 ms
    -        /V_th   20 mV
    -        /E_L    10 mV
    -        /t_ref   2 ms
    -        /V_reset 0 mV
    -        /C_m   200 pF
    -        /V_m     0 mV
    -        /I_e i bias_end bias_begin sub N div mul bias_begin add
    -    >>
    -    SetStatus
    -} for
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -drive   neurons Connect
    -noise   neurons Connect
    -neurons sr      Connect
    -
    -T Simulate
    diff --git a/examples/nest/Potjans_2014/README.txt b/examples/nest/Potjans_2014/README.txt
    deleted file mode 100644
    index 208f50f71b..0000000000
    --- a/examples/nest/Potjans_2014/README.txt
    +++ /dev/null
    @@ -1,127 +0,0 @@
    -/*
    - *  README.txt
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -Cortical microcircuit simulation: SLI version
    -
    -This is an implementation of the multi-layer microcircuit model of early
    -sensory cortex published by Potjans and Diesmann (2014) The cell-type specific
    -cortical microcircuit: relating structure and activity in a full-scale spiking
    -network model. Cerebral Cortex: doi:10.1093/cercor/bhs358.
    -
    -
    -Files:
    -	- network_params.sli
    -	Script containing model parameters
    -
    -        - sim_params.sli
    -        Script containing simulation and recording parameters
    -
    -	- microcircuit.sli
    -	Simulation script
    -
    -	- run_microcircuit.sh
    -	Bash script. Runs the simulation in the current machine, HPC might be needed.
    -
    -	- spike_analysis.py
    -	Python script for basic analysis
    -
    -The actual simulation script 'microcircuit.sli' does not need to be changed.
    -
    -
    -Instructions:
    -
    -1. Download NEST (https://www.nest-simulator.org/download)
    -
    -2. Compile NEST: https://www.nest-simulator.org/installation
    -   Use the --with-mpi flag to configure with MPI support
    -
    -3. In sim_params.sli adjust the following parameters:
    -
    -   - 'run_mode': test or production
    -   - 'n_compute_nodes': the number of compute nodes
    -   - 'n_mpi_procs_per_node': the number of processes per compute node
    -   - 'n_threads_per_mpi_proc': the number of threads per mpi process
    -   - 'walltime_limit': a run rime time limit for the queuing system
    -   - 'memory_limit' a memory limit for the queuing system
    -   - 't_sim': the simulation time
    -   - 'nest_path': the base directory of the NEST installation
    -   - 'output_dir': a directory for the result data
    -
    -   and choose recordables: cortical spikes, thalamic spikes, voltages
    -
    -4. In network_params.sli:
    -
    -   - Choose the network 'area', which scales the numbers of neurons
    -   - When down-scaling: Choose whether full-scale in-degrees should be used.
    -     Setting 'preserve_K' to true preserves most of the dynamics of the
    -     full-size network, as long as 'area' is not too small
    -   - Choose the external input: Poissonian noise 'bg_rate' and/or DC current
    -     'dc_amplitude'
    -   - Set any thalamic inputs parameters
    -
    -5. Run the simulation by typing ./run_microcircuit.sh in your terminal
    -   (microcircuit.sli and the parameter files need to be in the same folder)
    -
    -6. Output files and basic analysis:
    -
    -   - Spikes are written to .gdf files containing node IDs of the recorded neurons
    -     and corresponding spike times in ms. The node IDs are unordered.
    -     Separate files are written out for each population and virtual process.
    -     File names are formed as spike recorder label + layer index + population
    -     index + spike recorder node ID + virtual process + .gdf
    -   - population_node IDs.dat contains the first and last global ID (node ID) of the
    -     neurons in each population in the order 2/3e, 2/3i, 4e, 4i, 5e, 5i, 6e, 6i
    -   - Voltages are written to .dat files containing node IDs, times in ms, and the
    -     corresponding membrane potentials in mV. File names are formed as
    -     voltmeter label + layer index + population index + spike recorder node ID +
    -     virtual process + .dat
    -
    -   - Run 'spike_analysis.py' with the variable 'datapath' set to the output
    -     folder in order to merge the spike files of each population (including
    -     thalamic ones, if present), sort node IDs, and produce dot plots and firing
    -     rate plots.
    -   - The analysis script does not currently cover voltages.
    -
    -The simulation was successfully tested with MPI 1.4.3.
    -The analysis script works with Python 2.6.6 including packages numpy 1.3.0,
    -matplotlib 0.99.1.1, and glob.
    -
    ----------------------------------------------------
    -
    -Simulation on a single process:
    -
    -1. After compiling NEST (not necessarily with MPI), go to the folder that
    -   includes microcircuit.sli and the parameter files and type 'nest' in your
    -   terminal.
    -
    -2. Adjust 'area' and 'preserve_K' in network_params.sli such that the network
    -   is small enough to fit on your system.
    -
    -3. Set the 'output_path' in user_params.sli to an existing directory.
    -
    -5. Set 'n_compute_nodes' to 1, and 'n_mpi_procs_per_compute_node' and
    -   'n_threads_per_proc' in sim_params.sli to a suitable value for your computer.
    -
    -4. Type '(microcircuit) run' to start the simulation on a single process.
    -
    -A downscaled version ('area' = 0.1) of the network was tested on a single
    -MPI process with two threads with 'preserve_K' = true.
    diff --git a/examples/nest/Potjans_2014/microcircuit.sli b/examples/nest/Potjans_2014/microcircuit.sli
    deleted file mode 100644
    index 9d5962a5b4..0000000000
    --- a/examples/nest/Potjans_2014/microcircuit.sli
    +++ /dev/null
    @@ -1,565 +0,0 @@
    -/*
    - *  microcircuit.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -    Implementation of the multi-layered local cortical network model by
    -
    -    Potjans, Tobias C. and Diesmann, Markus (2014) The cell-type specific
    -    cortical microcircuit: relating structure and activity in a full-scale
    -    spiking network model. Cerebral Cortex. doi:10.1093/cercor/bhs358.
    -
    -    The script defines and executes the following functions in the given sequence:
    -    1. CheckParameters
    -    2. PrepareSimulation
    -    3. DerivedParameters
    -    4. CreateNetworkNodes
    -    5. WritenodeIDsToFile
    -    6. ConnectNetworkNodes
    -
    -    Please see the file README.txt for details.
    -*/
    -
    -% CheckParameters - This function perfoms a (non-exhaustive) check of
    -% parameter dimensions and values.
    -%
    -% In particular, the following is checked:
    -%   - Is the model of type /iaf_psc_exp?
    -%   - Do dimensions of the given probablity matrix match
    -%   - Are the numbers/fractions of neurons to record from
    -%     compatible with the network size
    -%
    -/CheckParameters
    -{
    -    neuron_model /iaf_psc_exp eq not {
    -	Rank 0 eq {
    -           M_WARNING (CheckParameters)
    -           (Unexpected neuron type: ) neuron_model cvs join
    -           (. Script is tuned to /iaf_psc_exp neurons.) join
    -           message
    -	} if
    -    } if
    -
    -    /vm0_type_options <(original) (optimized)> def
    -    Vm0_type (original) eq not
    -    {
    -        Vm0_type (optimized) eq not
    -        {
    -
    -           M_WARNING (CheckParameters)
    -           (') Vm0_type join
    -           (' is not a valid option, replacing it with ') join
    -           vm0_type_options 0 get join
    -           ('; Valid options are ') join
    -           vm0_type_options 0 get join
    -           (' and ') join
    -           vm0_type_options 1 get join
    -           (') join
    -           message
    -
    -           % reset variable to (original)
    -           /Vm0_type vm0_type_options 0 get def
    -        } if
    -    } if
    -
    -    /n_layers full_scale_n_neurons length def
    -    /n_pops_per_layer full_scale_n_neurons Dimensions 1 get def
    -
    -    conn_probs Dimensions 0 get
    -    n_layers n_pops_per_layer mul
    -    eq not {
    -	M_ERROR (CheckParameters)
    -	(/conn_probs does not contain /nlayers * /n_pops_per_layer rows)
    -	message raiseerror
    -    } if
    -
    -    conn_probs Dimensions 1 get
    -    n_layers n_pops_per_layer mul
    -    eq not  {
    -	M_ERROR (CheckParameters)
    -	(/conn_probs does not contain /nlayers * /n_pops_per_layer columns)
    -	message raiseerror
    -    } if
    -
    -    record_fraction_neurons_spikes
    -    {
    -        frac_rec_spikes 1 gt
    -        {
    -	    M_ERROR (CheckParameters)
    -	    (/frac_rec_spikes must be between 0 and 1.)
    -	    message raiseerror
    -        } if
    -    }{
    -        n_rec_spikes full_scale_n_neurons { Min } Map Min area mul gt
    -        {
    -	    M_ERROR (CheckParameters)
    -	    (/n_rec_spikes cannot be larger than the number of neurons in /full_scale_neurons)
    -	    message raiseerror
    -        } if
    -    } ifelse
    -
    -    record_fraction_neurons_voltage
    -    {
    -        frac_rec_voltage 1 gt
    -        {
    -	    M_ERROR (CheckParameters)
    -	    (/frac_rec_voltage must be between 0 and 1.)
    -	    message raiseerror
    -        } if
    -    }{
    -        n_rec_voltage full_scale_n_neurons { Min } Map Min area mul gt
    -        {
    -	    M_ERROR (CheckParameters)
    -	    (/n_rec_voltage cannot be larger than the number of neurons in /full_scale_neurons)
    -	    message raiseerror
    -        } if
    -    } ifelse
    -
    -} def
    -
    -
    -% PrepareSimulation - Set kernel parameters and RNG seeds based on the
    -% settings in sim_params.sli.
    -%
    -/PrepareSimulation
    -{
    -    ResetKernel
    -
    -    % set global kernel parameters
    -    <<
    -       /resolution dt
    -       /total_num_virtual_procs n_vp
    -       /overwrite_files overwrite_existing_files
    -       /rng_seed rng_seed
    -       output_path (.) neq {
    -           /data_path output_path
    -       } if
    -    >> SetKernelStatus
    -} def
    -
    -
    -% DerivedParameters - Compute derived parameters from the ones given
    -% in network_params.sli.
    -%
    -/DerivedParameters
    -{
    -    % compute numbers of neurons for the given surface area
    -    /n_neurons
    -    full_scale_n_neurons { area mul cvi } [2] Map
    -    def
    -
    -    % compute PSC amplitude from PSP amplitude
    -
    -    model_params using
    -    % factor for transforming PSP amplitude to PSC amplitude
    -
    -    /re tau_m tau_syn_ex div def
    -    /de tau_syn_ex tau_m sub def
    -    /ri tau_m tau_syn_in div def
    -    /di tau_syn_in tau_m sub def
    -
    -    /PSC_e_over_PSP_e
    -    (((C_m)^(-1)*tau_m*tau_syn_ex/de*(re^(tau_m/de)-re^(tau_syn_ex/de)))^(-1))
    -    ExecMath def
    -
    -    /PSC_i_over_PSP_i
    -    (((C_m)^(-1)*tau_m*tau_syn_in/di*(ri^(tau_m/di)-ri^(tau_syn_in/di)))^(-1))
    -    ExecMath def
    -    endusing
    -
    -    /PSC_e PSC_e_over_PSP_e PSP_e mul def
    -    /PSC_e_23_4 PSC_e_over_PSP_e PSP_e_23_4 mul def
    -    /PSP_i PSP_e g mul def
    -    /PSC_i PSC_i_over_PSP_i PSP_i mul def
    -
    -    % PSC amplitude for all external input
    -    /PSC_ext PSC_e_over_PSP_e PSP_ext mul def
    -
    -    % array of synaptic current amplitudes
    -    [4 2 4] [PSC_e PSC_i] LayoutArray /PSC_array Set
    -    PSC_array [0 0 1 0]  PSC_e_23_4 put /PSC_array Set
    -
    -    % standard deviations of synaptic current amplitudes
    -    /PSC_sd [PSC_e PSC_i] PSC_rel_sd mul def
    -    /PSC_th_sd PSC_ext PSC_rel_sd mul def
    -
    -    % standard deviations of delays
    -    /delays_sd delays delay_rel_sd mul def
    -    /delay_th_sd delay_th delay_th_rel_sd mul def
    -
    -    % numbers of neurons from which to record spikes and membrane potentials
    -    record_fraction_neurons_spikes
    -    {
    -        /n_neurons_rec_spikes
    -        n_neurons{ frac_rec_spikes mul cvi } [2] Map
    -        def
    -    }{
    -        /n_neurons_rec_spikes
    -        [n_layers n_pops_per_layer] n_rec_spikes LayoutArray
    -        def
    -    } ifelse
    -
    -    record_fraction_neurons_voltage
    -    {
    -        /n_neurons_rec_voltage
    -        n_neurons{ frac_rec_voltage mul cvi } [2] Map
    -        def
    -    }{
    -        /n_neurons_rec_voltage
    -        [n_layers n_pops_per_layer] n_rec_voltage LayoutArray
    -        def
    -    } ifelse
    -
    -} def
    -
    -
    -% the following variables are created here:
    -% neuron_nodeIDs
    -% poisson_nodeIDs
    -% dc_generator_nodeIDs
    -% spike_recorder_nodeIDs
    -% voltmeter_nodeIDs
    -% th_neuron_nodeIDs
    -% th_poisson_nodeID
    -% th_spike_recorder_nodeID
    -/CreateNetworkNodes
    -{
    -    /spikes_record_to          save_cortical_spikes {/ascii}{/memory} ifelse def
    -    /voltages_record_to        save_voltages        {/ascii}{/memory} ifelse def
    -    /thalamic_spikes_record_to save_thalamic_spikes {/ascii}{/memory} ifelse def
    -
    -    neuron_model model_params SetDefaults
    -    % arrays of nodeIDs:
    -    /neuron_nodeIDs         [n_layers n_pops_per_layer] 0 LayoutArray def
    -    /spike_recorder_nodeIDs [n_layers n_pops_per_layer] 0 LayoutArray def
    -    /voltmeter_nodeIDs      [n_layers n_pops_per_layer] 0 LayoutArray def
    -    /poisson_nodeIDs        [n_layers n_pops_per_layer] 0 LayoutArray def
    -    /dc_generator_nodeIDs   [n_layers n_pops_per_layer] 0 LayoutArray def
    -
    -    0 1 n_layers 1 sub {
    -        /layer_index Set
    -
    -        0 1 n_pops_per_layer 1 sub {
    -            /population_index Set
    -
    -	    % create the neurons
    -	    neuron_model % what model
    -	    n_neurons layer_index get population_index get % how many
    -	    Create /population Set
    -
    -	    % store the NodeCollection
    -            neuron_nodeIDs [layer_index population_index] % the position
    -	    population put /neuron_nodeIDs Set
    -
    -            % initialize membrane potentials
    -            population {
    -               Vm0_type (optimized) eq
    -               {
    -                   <<
    -                      /V_m
    -                      << /normal
    -                        <<
    -                          /mean Vm0_mean layer_index get population_index get
    -                          /std Vm0_std layer_index get population_index get
    -                        >>
    -                      >> CreateParameter
    -
    -                   >>
    -               }{
    -                   <<
    -                      /V_m
    -                      << /normal << /mean Vm0_mean /std Vm0_std >> >> CreateParameter
    -                   >>
    -               } ifelse
    -               SetStatus
    -	    } forall
    -
    -            spike_recorder_nodeIDs [layer_index population_index] /spike_recorder <<
    -	       /label spike_recorder_label layer_index cvs join (_) join population_index cvs join
    -	       /record_to spikes_record_to
    -	    >> Create put /spike_recorder_nodeIDs Set
    -
    -	    voltmeter_nodeIDs [layer_index population_index] /voltmeter <<
    -	       /label voltmeter_label layer_index cvs join (_) join population_index cvs join
    -	       /record_to voltages_record_to
    -	    >> Create put /voltmeter_nodeIDs Set
    -
    -	    K_bg layer_index get population_index get /K_bg_ Set
    -
    -	    poisson_nodeIDs [layer_index population_index] /poisson_generator <<
    -	       /rate K_bg_ bg_rate mul
    -            >> Create put /poisson_nodeIDs Set
    -
    -	    dc_generator_nodeIDs [layer_index population_index] /dc_generator <<
    -	       /amplitude K_bg_ dc_amplitude mul
    -	    >>  Create put /dc_generator_nodeIDs Set
    -
    -        } for % loop over e and i populations
    -    } for % loop over layers
    -
    -    % create and configure thalamic neurons (parrots) and their Poisson inputs
    -    n_thal 0 gt {
    -        /parrot_neuron n_thal Create /th_neuron_nodeIDs Set
    -
    -	/poisson_generator <<
    -           /rate th_rate
    -           /start th_start
    -           /stop th_start th_duration add
    -        >> Create /th_poisson_nodeID Set
    -
    -        save_thalamic_spikes {
    -            /spike_recorder Create <<
    -	       /label th_spike_recorder_label
    -	       /record_to thalamic_spikes_record_to
    -	    >> /th_spike_recorder_nodeID Set
    -        } if
    -    } if
    -} def
    -
    -
    -% WritenodeIDsToFile - Save the nodeIDs of the neurons to a file based on
    -% the parameters given in sim_params.sli.
    -%
    -/WritenodeIDsToFile
    -{
    -    Rank 0 eq {
    -
    -    	GetKernelStatus /data_path get empty not {
    -            (/) join
    -        } if
    -
    -	nodeID_filename join
    -	(w) ofsopen ;
    -
    -	neuron_nodeIDs Flatten {
    -            /nodeIDs Set
    -            nodeIDs Min <- (\t) <- nodeIDs Max <- (\n) <-
    -	} forall
    -
    -close
    -    } if
    -} def
    -
    -% ConnectNetworkNodes - Connect the network nodes created in
    -% CreateNetworkNodes based on the probabilities defined in
    -% network_params.sli.
    -%
    -/ConnectNetworkNodes
    -{
    -    tic
    -
    -    0 1 n_layers 1 sub { % target layer
    -        /target_layer Set
    -
    -        0 1 n_pops_per_layer 1 sub { % target population
    -	    /target_pop Set
    -
    -            % get neuron IDs
    -            neuron_nodeIDs target_layer get target_pop get /target_nodes Set
    -
    -            n_neurons target_layer get target_pop get /n_targets Set
    -            full_scale_n_neurons target_layer get target_pop get /full_scale_n_targets Set
    -
    -	    0 1 n_layers 1 sub { % source layer
    -	        /source_layer Set
    -
    -	        0 1 n_pops_per_layer 1 sub { % source population
    -		    /source_pop Set
    -
    -		    % local connections
    -
    -		    % get neuron IDs
    -                    neuron_nodeIDs source_layer get source_pop get /source_nodes Set
    -
    -                    n_neurons source_layer get source_pop get /n_sources Set
    -                    full_scale_n_neurons source_layer get source_pop get /full_scale_n_sources Set
    -
    -                    % get connection probability
    -		    conn_probs
    -		    % pick row (target) in conn_probs
    -		    target_layer n_pops_per_layer mul target_pop add get
    -		    % pick column (source) in conn_probs
    -		    source_layer n_pops_per_layer mul source_pop add get
    -		    /conn_prob Set % probability for this connection
    -
    -                    % Compute numbers of synapses assuming binomial degree
    -                    % distributions and allowing for multapses (see Potjans
    -                    % and Diesmann 2012 Cereb Cortex Eq. 1)
    -                    preserve_K {
    -                        full_scale_n_sources full_scale_n_targets mul /prod Set
    -                        ( log(1.-conn_prob)/log((prod-1.)/prod) ) ExecMath /n_syn_temp Set
    -                        n_syn_temp n_targets mul full_scale_n_targets div
    -                    }{
    -                        n_sources n_targets mul /prod Set
    -                        ( log(1.-conn_prob)/log((prod-1.)/prod) ) ExecMath
    -                    } ifelse
    -                    cvi /n_synapses Set
    -
    -                    n_synapses 0 gt {
    -                        PSC_array target_layer get target_pop get source_layer
    -                        get source_pop get /mean_weight Set
    -
    -                        % fill the weight dictionary for Connect and insert it into the synapse dictionary
    -                        mean_weight 0 gt {
    -                          syn_dict /weight
    -                          << /normal << /mean mean_weight /std PSC_sd source_pop get abs >> >> CreateParameter
    -                          0.0 (inf) cvd redraw
    -                          put
    -                        }{
    -                          syn_dict /weight
    -                          << /normal << /mean mean_weight /std PSC_sd source_pop get abs >> >> CreateParameter
    -                          (-inf) cvd 0.0 redraw
    -                          put
    -                        } ifelse
    -
    -			% fill the delay dictionary for Connect and insert it into the synapse dictionary
    -                        syn_dict /delay
    -                        << /normal << /mean delays source_pop get /std delays_sd source_pop get abs >> >> CreateParameter
    -                        0.1 (inf) cvd redraw
    -                        put
    -
    -			% fill the connectivity dictionary with the number of synapses to be used
    -                        conn_dict /N n_synapses put
    -                        conn_dict /rule /fixed_total_number put
    -
    -                        % Connect the populations
    -                        source_nodes target_nodes conn_dict syn_dict Connect
    -
    -                    } if % n_synapses > 0
    -	        } for % source population
    -	    } for % source layer
    -
    -            n_thal 0 gt
    -            {
    -                % connections from thalamic neurons
    -
    -                C_th target_layer get target_pop get /conn_prob Set
    -
    -                % Compute numbers of synapses assuming binomial degree
    -                % distributions and allowing for multapses (see Potjans and
    -                % Diesmann 2012 Cereb Cortex Eq. 1)
    -                preserve_K {
    -                    /prod n_thal full_scale_n_targets mul def
    -                    ( log(1.-conn_prob)/log((prod-1.)/prod) ) ExecMath /n_syn_temp Set
    -                    n_syn_temp n_targets mul full_scale_n_targets div
    -                }{
    -                    /prod n_thal n_targets mul def
    -                    ( log(1.-conn_prob)/log((prod-1.)/prod) ) ExecMath
    -                } ifelse
    -                cvi /n_synapses Set
    -
    -                n_synapses 0 gt {
    -                    % insert the weight Parameter into the synapse dictionary
    -                    syn_dict /weight
    -                    << /normal << /mean PSC_ext /std PSC_th_sd abs >> >> CreateParameter
    -                    0.0 (inf) cvd redraw
    -                    put
    -
    -                    % insert the delay dictionary into the synapse dictionary
    -                    syn_dict /delay
    -                    << /normal << /mean delay_th /std delay_th_sd abs >> >> CreateParameter
    -                    0.1 (inf) cvd redraw
    -                    put
    -
    -		    % fill the connectivity dictionary with the number of synapses to be used
    -                    conn_dict /N n_synapses put
    -                    conn_dict /rule /fixed_total_number put
    -
    -                    % Connect the thalamus
    -                    th_neuron_nodeIDs target_nodes conn_dict syn_dict Connect
    -
    -                } if % n_synapses > 0
    -            } if % n_thal > 0
    -
    -            % Connect devices
    -
    -            % Connect to the spike recorder
    -            % record from a continuous range of IDs (appropriate for networks without spatial information)
    -            target_nodes n_neurons_rec_spikes target_layer get target_pop get Take
    -            spike_recorder_nodeIDs target_layer get target_pop get
    -            /all_to_all
    -	    Connect
    -
    -            % Connect to the voltmeter
    -            voltmeter_nodeIDs target_layer get target_pop get
    -            % record from a continuous range of IDs
    -            target_nodes n_neurons_rec_voltage target_layer get target_pop get Take
    -            /all_to_all
    -	    Connect
    -
    -            % Connect to the Poisson generators
    -            poisson_nodeIDs target_layer get target_pop get
    -            target_nodes
    -            /all_to_all
    -            << /weight PSC_ext /delay delays 0 get >>
    -            Connect
    -
    -            % Connect to the DC generators
    -            dc_generator_nodeIDs target_layer get target_pop get
    -            target_nodes
    -            /all_to_all
    -            Connect
    -
    -        } for % target population
    -    } for % target layer
    -
    -    n_thal 0 gt {
    -        % Connect thalamic poisson_generator to thalamic neurons (parrots)
    -        th_poisson_nodeID 1 arraystore
    -        th_neuron_nodeIDs
    -        Connect
    -    } if
    -
    -    record_thalamic_spikes n_thal 0 gt and {
    -        % Connect thalamic neurons to spike recorder
    -        th_neuron_nodeIDs
    -        th_spike_recorder_nodeID 1 arraystore
    -        Connect
    -    } if
    -
    -    toc /ConnectTime Set
    -} def
    -
    -
    -% load parameters
    -(sim_params) run
    -(network_params) run
    -
    -% execute functions
    -CheckParameters
    -PrepareSimulation
    -DerivedParameters
    -CreateNetworkNodes
    -WritenodeIDsToFile
    -ConnectNetworkNodes
    -
    -tic
    -  t_sim Simulate
    -toc /SimTime Set
    -
    -Rank 0 eq {
    -    (Connecting took ) ConnectTime cvs join ( s\n) join
    -    (Simulating took ) join SimTime cvs join ( s) join
    -    M_INFO
    -    message
    -} if
    diff --git a/examples/nest/Potjans_2014/network_params.sli b/examples/nest/Potjans_2014/network_params.sli
    deleted file mode 100644
    index 0bf554f2f4..0000000000
    --- a/examples/nest/Potjans_2014/network_params.sli
    +++ /dev/null
    @@ -1,190 +0,0 @@
    -/*
    - *  network_params.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    Contains:
    -    - network parameters
    -    - single-neuron parameters
    -    - stimulus parameters
    -*/
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%%     	Network parameters		%%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% area of network in mm^2; scales numbers of neurons
    -% use 1 for the full-size network (77,169 neurons)
    -/area 0.1 def
    -
    -% whether to use full-scale in-degrees when downscaling the number of neurons
    -% When preserve_K is false, the full-scale connection probabilities are used.
    -% Note that this produces different dynamics compared to the original model.
    -/preserve_K true def
    -
    -/layers [(L23) (L4) (L5) (L6)] def
    -/populations [(e) (i)] def
    -
    -/full_scale_n_neurons
    -  [[20683   % layer 2/3 e
    -    5834 ]  % layer 2/3 i
    -   [21915   % layer 4 e
    -    5479 ]  % layer 4 i
    -   [4850    % layer 5 e
    -    1065 ]  % layer 5 i
    -   [14395   % layer 6 e
    -    2948 ]] % layer 6 i
    -def
    -
    -% mean EPSP amplitude (mV) for all connections except L4e->L2/3e
    -/PSP_e .15 def
    -% mean EPSP amplitude (mv) for L4e->L2/3e connections
    -% see p. 801 of the paper, second paragraph under 'Model Parameterization',
    -% and the caption to Supplementary Fig. 7
    -/PSP_e_23_4 PSP_e 2 mul def
    -% standard deviation of PSC amplitudes relative to mean PSC amplitudes
    -/PSC_rel_sd 0.1 def
    -% IPSP amplitude relative to EPSP amplitude
    -/g -4. def
    -
    -% probabilities for >=1 connection between neurons in the given populations
    -% columns correspond to source populations; rows to target populations
    -% source      2/3e    2/3i    4e      4i      5e      5i      6e      6i
    -/conn_probs [[0.1009  0.1689  0.0437  0.0818  0.0323  0.      0.0076  0.    ]
    -             [0.1346  0.1371  0.0316  0.0515  0.0755  0.      0.0042  0.    ]
    -             [0.0077  0.0059  0.0497  0.135   0.0067  0.0003  0.0453  0.    ]
    -             [0.0691  0.0029  0.0794  0.1597  0.0033  0.      0.1057  0.    ]
    -             [0.1004  0.0622  0.0505  0.0057  0.0831  0.3726  0.0204  0.    ]
    -             [0.0548  0.0269  0.0257  0.0022  0.06    0.3158  0.0086  0.    ]
    -             [0.0156  0.0066  0.0211  0.0166  0.0572  0.0197  0.0396  0.2252]
    -             [0.0364  0.001   0.0034  0.0005  0.0277  0.008   0.0658  0.1443]]
    -	     def
    -
    -% mean dendritic delays for excitatory and inhibitory transmission (ms)
    -/delays [1.5 0.75] def
    -% standard deviation relative to mean delays
    -/delay_rel_sd 0.5 def
    -% connection pattern used in connection calls connecting populations
    -/conn_dict << /rule /fixed_total_number >> def
    -% default synapse dictionary
    -/syn_dict << /synapse_model /static_synapse >> def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%%          Single-neuron parameters		%%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/neuron_model /iaf_psc_exp def  % neuron model. For PSP-to-PSC conversion to
    -                                % be correct, synapses should be current-based
    -                                % with an exponential time course
    -
    -% Initial conditions for the membrane potential, options are:
    -% (original): uniform mean and std for all populations
    -% (optimized): population-specific mean and std, allowing a reduction of the
    -% initial activity burst in the network
    -/Vm0_type (original) def        % choose either (original) or (optimized)
    -Vm0_type (optimized) eq
    -{
    -    % optimized
    -    % mean of initial membrane potential (mV)
    -    /Vm0_mean [[-68.28   % 2/3e
    -                -63.16]  % 2/3i
    -               [-63.33   % 4e
    -                -63.45]  % 4i
    -               [-63.11   % 5e
    -                -61.66]  % 5i
    -               [-66.72   % 6e
    -                -61.43]] % 6i
    -                def
    -    % std of initial membrane potential (mV)
    -    /Vm0_std  [[5.36     % 2/3e
    -                4.57]    % 2/3i
    -               [4.74     % 4e
    -                4.94]    % 4i
    -               [4.94     % 5e
    -                4.55]    % 5i
    -               [5.46     % 6e
    -                4.48]]   % 6i
    -                def
    -}{
    -    % original
    -    /Vm0_mean -58.0 def
    -    /Vm0_std 10.0 def
    -} ifelse
    -
    -% neuron model parameters
    -/model_params  << /tau_m 10.        % membrane time constant (ms)
    -	          /tau_syn_ex 0.5   % excitatory synaptic time constant (ms)
    -                  /tau_syn_in 0.5   % inhibitory synaptic time constant (ms)
    -                  /t_ref 2.         % absolute refractory period (ms)
    -	          /E_L -65.         % resting membrane potential (mV)
    -	          /V_th -50.        % spike threshold (mV)
    -             	  /C_m 250.         % membrane capacitance (pF)
    -	          /V_reset -65.     % reset potential (mV)
    -               >> def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%%           Stimulus parameters		%%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% rate of background Poisson input at each external input synapse (spikes/s)
    -/bg_rate 8. def
    -% DC amplitude at each external input synapse (pA)
    -% This is relevant for reproducing Potjans & Diesmann (2012) Fig. 7.
    -/dc_amplitude 0. def
    -% in-degrees for background input
    -/K_bg [[1600   % 2/3e
    -        1500]  % 2/3i
    -       [2100   % 4e
    -        1900]  % 4i
    -       [2000   % 5e
    -        1900]  % 5i
    -       [2900   % 6e
    -        2100]] % 6i
    -        def
    -
    -% optional additional thalamic input (Poisson)
    -% Set n_thal to 0 to avoid this input.
    -% For producing Potjans & Diesmann (2012) Fig. 10, n_thal=902 was used.
    -% Note that the thalamic rate here reproduces the simulation results
    -% shown in the paper, and differs from the rate given in the text.
    -/n_thal 0 def          % size of thalamic population
    -/th_start 700. def     % onset of thalamic input (ms)
    -/th_duration 10. def   % duration of thalamic input (ms)
    -/th_rate 120. def      % rate of thalamic neurons (spikes/s)
    -/PSP_ext 0.15 def      % mean EPSP amplitude (mV) for external input
    -
    -% connection probabilities for thalamic input
    -/C_th [[0.0       % 2/3e
    -        0.0   ]   % 2/3i
    -       [0.0983    % 4e
    -        0.0619]   % 4i
    -       [0.0       % 5e
    -        0.0   ]   % 5i
    -       [0.0512    % 6e
    -        0.0196]]  % 6i
    -      def
    -
    -% mean delay of thalamic input (ms)
    -/delay_th 1.5 def
    -% standard deviation relative to mean delay of thalamic input
    -/delay_th_rel_sd 0.5 def
    diff --git a/examples/nest/Potjans_2014/run_microcircuit.sh b/examples/nest/Potjans_2014/run_microcircuit.sh
    deleted file mode 100644
    index a695df65de..0000000000
    --- a/examples/nest/Potjans_2014/run_microcircuit.sh
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -#
    -# run_microcircuit.sh
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -# Create output folder (if it does not exist yet) and run the simulation
    -# Adapt this file to your HPC queueing system as needed
    -
    -
    -# Use these variables to submit your job
    -N_COMPUTE_NODES=$(grep '/n_compute_nodes' sim_params.sli | cut -d' ' -f2)
    -N_MPI_PER_COMPUTE_NODE=$(grep '/n_mpi_procs_per_compute_node' sim_params.sli | cut -d' ' -f2)
    -WALLTIME_LIMIT=$(grep '/walltime_limit' sim_params.sli | cut -d'(' -f2 | cut -d ')' -f1)
    -MEMORY_LIMIT=$(egrep '/memory_limit' sim_params.sli | cut -d'(' -f2 | cut -d ')' -f1)
    -STDOUT=$(grep '/std_out' sim_params.sli | cut -d'(' -f2 | cut -d')' -f1)
    -STDERR=$(grep '/std_err' sim_params.sli | cut -d'(' -f2 | cut -d')' -f1)
    -
    -# Resolve paths
    -OUTPUT_PATH=$(grep '/output_path' sim_params.sli | cut -d'(' -f2 | cut -d ')' -f1)
    -OUTPUT_PATH=$(cd $OUTPUT_PATH; pwd)
    -NEST_PATH=$(grep '/nest_path' sim_params.sli | cut -d '(' -f2 | cut -d ')' -f1)
    -
    -# Prepare output directory
    -mkdir -p $OUTPUT_PATH
    -cp 'sim_params.sli' $OUTPUT_PATH
    -cp 'network_params.sli' $OUTPUT_PATH
    -cp 'microcircuit.sli' $OUTPUT_PATH
    -cd $OUTPUT_PATH
    -
    -# Run
    -. $NEST_PATH/bin/nest_vars.sh
    -NEST_DATA_PATH=$OUTPUT_PATH
    -mpirun nest $OUTPUT_PATH/microcircuit.sli
    -unset NEST_DATA_PATH
    diff --git a/examples/nest/Potjans_2014/sim_params.sli b/examples/nest/Potjans_2014/sim_params.sli
    deleted file mode 100644
    index 316d05ceeb..0000000000
    --- a/examples/nest/Potjans_2014/sim_params.sli
    +++ /dev/null
    @@ -1,121 +0,0 @@
    -/*
    - *  sim_params.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    Contains:
    -    - simulation parameters
    -    - recording parameters
    -*/
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%%                           RNG parameters                        %%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%
    -%%   Master seed for random number generators. Actual seeds will be
    -%%      master_seed ... master_seed + 2 * n_vp.
    -%%   Thus different master seeds must be spaced by at least
    -%%      2*n_vp + 1
    -%%   see Gewaltig et al. (2012) for details
    -%%
    -
    -/rng_seed 123456 def   % NEST kernel seed 
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%%                        Simulation parameters                    %%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/t_sim 1000.0 def                    % simulated time (ms)
    -
    -/dt 0.1 def                          % simulation step (ms)
    -
    -/n_compute_nodes 1 def	             % number of compute nodes
    -
    -/n_mpi_procs_per_compute_node 1 def  % number of MPI processes per compute node
    -
    -/n_threads_per_mpi_proc 2 def	     % number of threads per MPI process
    -
    -/walltime_limit (8:0:0) def    	     % walltime limit for simulation
    -
    -/memory_limit (500mb) def            % memory limit for simulation
    -
    -/output_path (.) def                 % output directory for data
    -
    -/n_vp n_compute_nodes n_mpi_procs_per_compute_node mul
    -      n_threads_per_mpi_proc mul def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%%                       Recording parameters                      %%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/overwrite_existing_files true def
    -
    -%% Whether to record spikes from a fixed fraction of neurons in each
    -%% population. If true, /frac_rec_spikes specifies that fraction, if
    -%% false, /n_rec_spikes many neurons are recorded in each population.
    -%% Setting /record_fraction_neurons_spikes to true and /f_rec_spikes
    -%% to 1.0 records all spikes.
    -
    -/record_fraction_neurons_spikes true def
    -/frac_rec_spikes 0.1 def
    -/n_rec_spikes 100 def
    -
    -%% Whether to record voltage from a fixed fraction of neurons in each
    -%% population. Semantics are as for /record_fraction_neurons_spikes.
    -
    -/record_fraction_neurons_voltage true def
    -/frac_rec_voltage 0.02 def
    -/n_rec_voltage 20 def
    -
    -%% Whether to write recorded spikes and membrane potentials to file
    -
    -/save_cortical_spikes true def
    -/save_voltages true def
    -
    -%% Whether to record thalamic spikes (only used when n_thal in
    -%% network_params.sli is not zero) and whether to storem them to file
    -
    -/record_thalamic_spikes true def
    -/save_thalamic_spikes true def
    -
    -%% Prefixes for recorder file names
    -
    -/spike_recorder_label (spikes_) def
    -/voltmeter_label (voltages_) def
    -/th_spike_recorder_label (th_spikes_) def
    -
    -%% Name of the file to which the global IDs of the different
    -%% populations are stored
    -
    -/nodeID_filename (population_nodeIDs.dat) def
    -
    -%% Filenames for redirecting stdout and stderr of the simulation
    -
    -/std_out (output.txt) def
    -/std_err (errors.txt) def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%%                         NEST parameters                         %%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/nest_path (/opt/nest) def  % the base path of the NEST installation
    diff --git a/examples/nest/Potjans_2014/spike_analysis.py b/examples/nest/Potjans_2014/spike_analysis.py
    deleted file mode 100644
    index 7149e32ec8..0000000000
    --- a/examples/nest/Potjans_2014/spike_analysis.py
    +++ /dev/null
    @@ -1,192 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# spike_analysis.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -# Merges spike files, produces raster plots, calculates and plots firing rates
    -
    -import numpy as np
    -import glob
    -import matplotlib.pyplot as plt
    -import os
    -import re
    -
    -datapath = '.'
    -
    -# get simulation time and numbers of neurons recorded from sim_params.sli
    -with open(os.path.join(datapath, 'sim_params.sli'), 'r') as f:
    -    sim_params_contents = f.read()
    -    T = float(re.search(r'/t_sim (.+) def', sim_params_contents).group(1))
    -    record_frac = re.search(r'/record_fraction_neurons_spikes (.+) def', sim_params_contents).group(1) == 'true'
    -
    -    if record_frac:
    -        frac_rec = float(re.search(r'/frac_rec_spikes (.+) def', sim_params_contents).group(1))
    -    else:
    -        n_rec = int(re.search(r'/n_rec_spikes (.+) def', sim_params_contents).group(1))
    -
    -T_start = 200.  # starting point of analysis (to avoid transients)
    -
    -# load node IDs
    -
    -node_ids = np.loadtxt(os.path.join(datapath, 'population_nodeIDs.dat'), dtype=int)
    -print('Global IDs:')
    -print(node_ids)
    -print()
    -
    -# number of populations
    -
    -num_pops = len(node_ids)
    -print('Number of populations:')
    -print(num_pops)
    -print()
    -
    -# first node ID in each population
    -
    -raw_first_node_ids = [node_ids[i][0] for i in np.arange(len(node_ids))]
    -
    -# population sizes
    -
    -pop_sizes = [node_ids[i][1] - node_ids[i][0] + 1 for i in np.arange(len(node_ids))]
    -
    -# numbers of neurons for which spikes were recorded
    -
    -if record_frac:
    -    rec_sizes = [int(pop_sizes[i] * frac_rec) for i in range(len(pop_sizes))]
    -else:
    -    rec_sizes = [n_rec] * len(pop_sizes)
    -
    -# first node ID of each population once device node IDs are dropped
    -
    -first_node_ids = [int(1 + np.sum(pop_sizes[:i]))
    -                  for i in np.arange(len(pop_sizes))]
    -
    -# last node ID of each population once device node IDs are dropped
    -
    -last_node_ids = [int(np.sum(pop_sizes[:i + 1]))
    -                 for i in np.arange(len(pop_sizes))]
    -
    -# convert lists to a nicer format, i.e. [[2/3e, 2/3i], []....]
    -
    -Pop_sizes = [pop_sizes[i:i + 2] for i in range(0, len(pop_sizes), 2)]
    -print('Population sizes:')
    -print(Pop_sizes)
    -print()
    -
    -Raw_first_node_ids = [raw_first_node_ids[i:i + 2] for i in range(0, len(raw_first_node_ids), 2)]
    -First_node_ids = [first_node_ids[i:i + 2] for i in range(0, len(first_node_ids), 2)]
    -Last_node_ids = [last_node_ids[i:i + 2] for i in range(0, len(last_node_ids), 2)]
    -
    -# total number of neurons in the simulation
    -
    -num_neurons = last_node_ids[len(last_node_ids) - 1]
    -print('Total number of neurons:')
    -print(num_neurons)
    -print()
    -
    -# load spikes from gdf files, correct node IDs and merge them in population files,
    -# and store spike trains
    -
    -# will contain neuron id resolved spike trains
    -neuron_spikes = [[] for i in np.arange(num_neurons + 1)]
    -# container for population-resolved spike data
    -spike_data = [[[], []], [[], []], [[], []], [[], []], [[], []], [[], []],
    -              [[], []], [[], []]]
    -
    -counter = 0
    -
    -for layer in ['0', '1', '2', '3']:
    -    for population in ['0', '1']:
    -        output = os.path.join(datapath,
    -                              'population_spikes-{}-{}.gdf'.format(layer,
    -                                                                   population))
    -        file_pattern = os.path.join(datapath,
    -                                    'spikes_{}_{}*'.format(layer, population))
    -        files = glob.glob(file_pattern)
    -        print('Merge ' + str(
    -            len(files)) + ' spike files from L' + layer + 'P' + population)
    -        if files:
    -            merged_file = open(output, 'w')
    -            for file in files:
    -                data = open(file, 'r')
    -                nest_version = next(data)
    -                backend_version = next(data)
    -                column_header = next(data)
    -                for line in data:
    -                    a = line.split()
    -                    a[0] = int(a[0])
    -                    a[1] = float(a[1])
    -                    raw_first_node_id = Raw_first_node_ids[int(layer)][int(population)]
    -                    first_node_id = First_node_ids[int(layer)][int(population)]
    -                    a[0] = a[0] - raw_first_node_id + first_node_id
    -
    -                    if (a[1] > T_start):  # discard data in the start-up phase
    -                        spike_data[counter][0].append(num_neurons - a[0])
    -                        spike_data[counter][1].append(a[1] - T_start)
    -                        neuron_spikes[a[0]].append(a[1] - T_start)
    -
    -                    converted_line = str(a[0]) + '\t' + str(a[1]) + '\n'
    -                    merged_file.write(converted_line)
    -                data.close()
    -            merged_file.close()
    -            counter += 1
    -
    -clrs = ['0', '0.5', '0', '0.5', '0', '0.5', '0', '0.5']
    -plt.ion()
    -
    -# raster plot
    -
    -plt.figure(1)
    -counter = 1
    -for j in np.arange(num_pops):
    -    for i in np.arange(first_node_ids[j], first_node_ids[j] + rec_sizes[j]):
    -        plt.plot(neuron_spikes[i],
    -                 np.ones_like(neuron_spikes[i]) + sum(rec_sizes) - counter,
    -                 'k o', ms=1, mfc=clrs[j], mec=clrs[j])
    -        counter += 1
    -plt.xlim(0, T - T_start)
    -plt.ylim(0, sum(rec_sizes))
    -plt.xlabel(r'time (ms)')
    -plt.ylabel(r'neuron id')
    -plt.savefig(os.path.join(datapath, 'rasterplot.png'))
    -
    -# firing rates
    -
    -rates = []
    -temp = 0
    -
    -for i in np.arange(num_pops):
    -    for j in np.arange(first_node_ids[i], last_node_ids[i]):
    -        temp += len(neuron_spikes[j])
    -    rates.append(temp / (rec_sizes[i] * (T - T_start)) * 1e3)
    -    temp = 0
    -
    -print()
    -print('Firing rates:')
    -print(rates)
    -
    -plt.figure(2)
    -ticks = np.arange(num_pops)
    -plt.bar(ticks, rates, width=0.9, color='k')
    -xticklabels = ['L2/3e', 'L2/3i', 'L4e', 'L4i', 'L5e', 'L5i', 'L6e', 'L6i']
    -plt.setp(plt.gca(), xticks=ticks + 0.5, xticklabels=xticklabels)
    -plt.xlabel(r'subpopulation')
    -plt.ylabel(r'firing rate (spikes/s)')
    -plt.savefig(os.path.join(datapath, 'firing_rates.png'))
    -
    -plt.show()
    diff --git a/examples/nest/balancedneuron-2.sli b/examples/nest/balancedneuron-2.sli
    deleted file mode 100644
    index ac608d61e9..0000000000
    --- a/examples/nest/balancedneuron-2.sli
    +++ /dev/null
    @@ -1,144 +0,0 @@
    -/*
    - *  balancedneuron-2.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - % autorun=true
    -
    -%%
    -% This is an extended version of the simple balancedneuron.sli script.
    -% After finding the rate of the inhibitory background population that
    -% creates the spontaneous target rate of the test neuron, it records
    -% the membrane potential of the test neuron for a short period and the
    -% mean and standard deviation of the test neuron's membrane potential
    -% is computed and printed.
    -% Try changing the value of /ipsc and see what happens.
    -%%
    -
    -(arraylib) run
    -/arraylib using
    -
    -ResetKernel
    -
    - 1000 ms   /t_relax Set % how long to wait for the state to stabiluze before reording the spikes
    - 100 s    /t_sim Set % how long we simulate to compute the rate (1000 sec)
    - 1000 ms   /t_memmeasure Set % how long to measure the membrane potential
    - 16000     /n_ex  Set % size of the excitatory population
    - 4000      /n_in  Set % size of the inhibitory population
    - 2.0   Hz  /r_ex  Set % mean rate of the excitatory population
    - 10.0  pA  /epsc  Set % peak amplitude of excitatory synaptic currents
    - -100.0 pA /ipsc  Set % peak amplitude of inhibitory synaptic currents
    - 1.0   ms  /d     Set % synaptic delay
    - 0.0   Hz  /lower Set % lower bound of the search interval
    - 100.0  Hz /upper Set % upper bound of the search interval
    - 0.01 Hz   /prec  Set % how close need the excitatory rates be
    -
    - M_INFO 1 add setverbosity                 % suppress output from Simulate
    -
    - <<
    -   /data_path (/tmp)
    - >> SetKernelStatus
    -
    - /iaf_psc_alpha     Create /neuron Set % target neuron
    - /poisson_generator Create /ex_pop Set % excitatory population
    - /poisson_generator Create /in_pop Set % inhibitory population
    - /spike_recorder    Create /spikes Set % the spike recorder device
    -
    - neuron
    - <<
    -    /tau_syn_ex 1.0
    -    /tau_syn_in 1.0
    -    /V_th -55.0
    - >> SetStatus
    -
    - ex_pop
    - <<
    -    /rate r_ex n_ex mul % multiply rate and number of neurons
    - >> SetStatus
    -
    - ex_pop neuron epsc d Connect
    - in_pop neuron ipsc d Connect
    - neuron spikes        Connect
    -
    - /OutputRate
    - {
    -   /guess Set % store the function parameter
    -
    -    M_INFO 1 add (blancedneuron) (--------------------------------------------------------------------------------------) message
    -    M_INFO 1 add (blancedneuron) (Setting new rate for the inhibitory background population: ) guess cvs join (Hz/neuron) join message
    -
    -    in_pop
    -    <<
    -    /rate guess n_in mul % set a new rate for the inhibitory population.
    -    >>
    -    SetStatus
    -
    -    M_INFO 1 add (blancedneuron) (Allowing the new state to relax for ) t_relax cvs join (ms...) join message
    -    t_relax  Simulate % let the neuron relax to the new balanced state
    -
    -    spikes
    -    <<
    -       /n_events 0 % reset the event counter of the spike recorder
    -    >> SetStatus
    -
    -    M_INFO 1 add (blancedneuron) (Counting spikes for ) t_sim cvs join (ms...) join message
    -    t_sim  Simulate % simulate and count the spikes
    -
    -    spikes [ /n_events ] get /e Set % read out the event counter
    -    e t_sim 1000.0 div  div  /rate Set % and divide by t_sim
    -    M_INFO 1 add (blancedneuron) (Counted ) e cvs join ( spikes.) join message
    -    M_INFO 1 add (blancedneuron) (==> Rate of the test neuron is ) rate cvs join (Hz.) join message
    -
    -   rate % leave the result as return value
    - } def
    -
    - {OutputRate r_ex sub} lower upper prec FindRoot
    -
    -% measure the mean membrane potential:
    - M_INFO 1 add (blancedneuron) (=============================================================================) message
    - M_INFO 1 add (blancedneuron) (Recording membrane potential for ) t_memmeasure cvs join (ms.) join message
    -
    - % create voltmeter and connect to neuron
    - /voltmeter Create /volts  Set
    - volts neuron Connect
    -
    - t_memmeasure Simulate
    -
    -
    -% ------------------------------------------------------
    -
    - M_INFO 1 add (blancedneuron) (Computing mean and SDev of membrane potential...)  message
    -
    - % obtain membrane potential trace from voltmeter, convert to SLI array for further processing
    - volts [/events /V_m] get cva /potentials Set
    - potentials length /n Set
    -
    - M_INFO 1 add (blancedneuron) n cvs ( numbers.) join message
    -
    -
    -% compute mean and sdev:
    -/mean potentials Mean def
    -/sdev potentials SDev def
    -
    - M_INFO 1 add (blancedneuron) (Mean: ) mean cvs join (mV) join message
    - M_INFO 1 add (blancedneuron) (==> Distance from threshold: ) mean neuron GetStatus 0 get /V_th get sub cvs join (mV) join message
    - M_INFO 1 add (blancedneuron) (SDev: ) sdev cvs join (mV) join message
    -
    -endusing % arr
    diff --git a/examples/nest/balancedneuron.sli b/examples/nest/balancedneuron.sli
    deleted file mode 100644
    index 146361a089..0000000000
    --- a/examples/nest/balancedneuron.sli
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/*
    - *  balancedneuron.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -ResetKernel
    -
    - 1000.   ms /t_relax Set % how long to wait for the state to stabiluze before reording the spikes
    - 100000. ms /t_sim Set % how long we simulate to compute the rate (1000 sec)
    - 16000     /n_ex  Set % size of the excitatory population
    - 4000      /n_in  Set % size of the inhibitory population
    - 5.0   Hz  /r_ex  Set % mean rate of the excitatory population
    - 45.0  pA  /epsc  Set % peak amplitude of excitatory synaptic currents
    - -45.0 pA  /ipsc  Set % peak amplitude of inhibitory synaptic currents
    - 1.0   ms  /d     Set % synaptic delay
    - 5.0   Hz  /lower Set % lower bound of the search interval
    - 25.0  Hz  /upper Set % upper bound of the search interval
    - 0.1  Hz  /prec  Set % how close need the excitatory rates be
    -
    - M_INFO 1 add setverbosity                 % suppress output from Simulate
    -
    - /iaf_psc_alpha     Create /neuron Set % target neuron
    - /poisson_generator Create /ex_pop Set % excitatory population
    - /poisson_generator Create /in_pop Set % inhibitory population
    - /spike_recorder    Create /spikes Set % the spike recorder device
    -
    - ex_pop
    - <<
    -    /rate r_ex n_ex mul % multiply rate and number of neurons
    - >> SetStatus
    -
    - ex_pop neuron epsc d Connect
    - in_pop neuron ipsc d Connect
    - neuron spikes        Connect
    -
    - /OutputRate
    - {
    -   /guess Set % store the function parameter
    -
    -    M_INFO 1 add (blancedneuron) (--------------------------------------------------------------------------------------) message
    -    M_INFO 1 add (blancedneuron) (Setting new rate for the inhibitory background population: ) guess cvs join (Hz/neuron) join message
    -
    -    in_pop
    -    <<
    -    /rate guess n_in mul % set a new rate for the inhibitory population.
    -    >>
    -    SetStatus
    -
    -    M_INFO 1 add (blancedneuron) (Allowing the new state to relax for ) t_relax cvs join (ms...) join message
    -    t_relax  Simulate % let the neuron relax to the new balanced state
    -
    -    spikes
    -    <<
    -       /n_events 0 % reset the event counter of the spike recorder
    -    >> SetStatus
    -
    -    M_INFO 1 add (blancedneuron) (Counting spikes for ) t_sim cvs join (ms...) join message
    -    t_sim  Simulate % simulate and count the spikes
    -
    -    spikes [ /n_events ] get /e Set % read out the event counter
    -    e t_sim 1000.0 div  div  /rate Set % and divide by t_sim
    -    M_INFO 1 add (blancedneuron) (Counted ) e cvs join ( spikes.) join message
    -    M_INFO 1 add (blancedneuron) (==> Rate of the test neuron is ) rate cvs join (Hz.) join message
    -
    -   rate % leave the result as return value
    - } def
    -
    - {OutputRate r_ex sub} lower upper prec FindRoot
    -
    diff --git a/examples/nest/brunel-2000.sli b/examples/nest/brunel-2000.sli
    deleted file mode 100644
    index 74dc974fec..0000000000
    --- a/examples/nest/brunel-2000.sli
    +++ /dev/null
    @@ -1,317 +0,0 @@
    -/*
    - *  brunel-2000.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   Brunel Network
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 50
    -   neurons from each population are recorded.  Neurons are modeled
    -   as leaky integrate-and-fire neurons with current-injecting synapses
    -   (alpha functions).  The model is based on
    -
    -      Nicolas Brunel
    -      Dynamics of sparsely connected networks of excitatory
    -      and inhibitory spiking neurons
    -      Journal of Computational Neuroscience, 2000, vol 8, pp 183-208.
    -
    -   There are two differences to Brunel's model: we use alpha
    -   functions instead of delta for synaptic currents, and our neurons
    -   reset to the resting potential (0 mv) instead of to half-way
    -   between resting potential and threshold.
    -
    -   This example shows how to
    -
    -      - create populations
    -      - instrument a network with injection and recording devices
    -      - record data to files
    -      - define own functions
    -      - set parameters in a simple way
    -      - communicate with the user in a simple way
    -      
    -   This brunel-2000.sli version uses old-style connection commands
    -   that are obsolete in NEST 2.4 and later. It is kept for reference.
    -   Please see brunel-2000_newconnect.sli for a version adapted to
    -   NEST 2.4 and later.
    -
    -   Abigail Morrison, Marc-Oliver Gewaltig, Hans Ekkehard Plesser
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -/order 2500 def     % scales size of network (total 5*order neurons)
    -
    -% case C : asynchronous irregullar
    -/g      5.0 def    % rel strength, inhibitory synapses
    -/eta    2.0 def    % nu_ext / nu_thresh
    -
    -% case D : slow oscillations
    -%/g      4.5  def    % rel strength, inhibitory synapses
    -%/eta    0.95 def    % nu_ext / nu_thresh
    -
    -/simtime  1000.0 def % simulation time [ms]
    -/dt          0.1 def % simulation step length [ms]
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%       NO USER-SERVICABLE PARTS BELOW
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -%%% FUNCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Take spike recorder, find total number of spikes registered,
    -% return average rate per neuron in Hz.
    -% NOTE: If you are running with several MPI processes, this
    -%       function only gives an approximation to the true rate.
    -%
    -% spike_det ComputeRate -> rate
    -/ComputeRate
    -{
    -  << >> begin  % anonymous dictionary for local variables
    -
    -    /sr Set
    -
    -    % We need to guess how many neurons we record from.
    -    % This assumes an even distribution of nodes across
    -    % processes, as well as homogeneous activity in the
    -    % network. So this is really a hack. NEST needs better
    -    % support for rate calculations, such as giving the
    -    % number of neurons recorded from by each spike recorder.
    -
    -    userdict /Nrec get cvd NumProcesses div /nnrn Set
    -    sr /n_events get nnrn userdict /simtime get mul div
    -    1000 mul         % convert from mHz to Hz, leave on stack
    -
    -  end
    -} bind             % optional, improves performance
    -def
    -
    -
    -% Compute the maximum of postsynaptic potential
    -% for a synaptic input current of unit amplitude
    -% (1 pA)
    -/ComputePSPnorm
    -{
    -  % calculate the normalization factor for the PSP
    -  (
    -  a = tauMem / tauSyn;
    -  b = 1.0 / tauSyn - 1.0 / tauMem;
    -  % time of maximum
    -  t_max = 1.0/b * (-LambertWm1(-exp(-1.0/a)/a)-1.0/a);
    -  % maximum of PSP for current of unit amplitude
    -  exp(1.0)/(tauSyn*CMem*b) * ((exp(-t_max/tauMem) - exp(-t_max/tauSyn)) / b - t_max*exp(-t_max/tauSyn))
    -  ) ExecMath
    -}
    -def
    -
    -%%% PREPARATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/NE 4 order mul cvi def  % number of excitatory neurons
    -/NI 1 order mul cvi def  % number of inhibitory neurons
    -/N  NI NE add def        % total number of neurons
    -
    -/epsilon 0.1 def            % connectivity
    -/CE epsilon NE mul cvi def  % number of excitatory synapses on neuron
    -/CI epsilon NI mul cvi def  % number of inhibitory synapses on neuron
    -/C  CE CI add def           % total number of internal synapses per n.
    -/Cext CE def                % number of external synapses on neuron
    -
    -/tauMem 20.0 def    % neuron membrane time constant [ms]
    -/CMem    1.0 def    % membrane capacity [pF]
    -/tauSyn  0.5 def    % synaptic time constant [ms]
    -/tauRef  2.0 def    % refractory time [ms]
    -/E_L     0.0 def    % resting potential [mV]
    -/theta  20.0 def    % threshold
    -
    -
    -% amplitude of PSP given 1pA current
    -ComputePSPnorm /J_max_unit Set
    -
    -% synaptic weights, scaled for our alpha functions, such that
    -% for constant membrane potential, the peak amplitude of the PSP
    -% equals J
    -
    -/delay   1.5 def         % synaptic delay, all connections [ms]
    -/J       0.1 def         % synaptic weight [mV]
    -/JE J J_max_unit div def % synaptic weight [pA]
    -/JI g JE mul neg def     % inhibitory
    -
    -% threshold rate, equivalent rate of events needed to
    -% have mean input current equal to threshold
    -/nu_thresh ((theta * CMem) / (JE*CE*exp(1)*tauMem*tauSyn)) ExecMath def
    -/nu_ext eta nu_thresh mul def     % external rate per synapse
    -/p_rate nu_ext Cext mul 1000. mul def % external input rate per neuron
    -                                        % must be given in Hz
    -
    -% number of neurons per population to record from
    -/Nrec 50 def
    -
    -
    -%%% CONSTRUCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -ResetKernel      % clear all existing network elements
    -M_WARNING setverbosity
    -
    -% Number of threads per program instance. When using MPI, the mpirun
    -% call determines the number of MPI processes (= program instances).
    -% The total number of virtual processes is
    -%     #MPI processes x local_num_threads.
    -%
    -% The number of local_num_threads can be given to the script using
    -% the --userargs commandline switch like this:
    -%     nest --userargs=threads=4 script.sli
    -%
    -% If it is not given, it defaults to 2
    -statusdict/userargs :: size 1 geq
    -{
    -  0 get (=) breakup 1 get int /local_num_threads Set
    -}
    -{
    -  2 /local_num_threads Set
    -} ifelse
    -
    -% set resolution and total/local number of threads
    -<< 
    -    /resolution  dt
    -    /local_num_threads local_num_threads
    -    /overwrite_files true
    ->> SetKernelStatus
    -
    - tic % start timer on construction
    -
    -% Setting neuron default parameters
    -
    -      (Configuring neuron parameters.) =
    -      /iaf_psc_alpha
    -        <<
    -          /tau_m       tauMem
    -          /tau_syn_ex  tauSyn
    -          /tau_syn_in  tauSyn
    -          /t_ref       tauRef
    -          /E_L     E_L
    -          /V_m     E_L
    -          /V_th    theta
    -          /V_reset    10.0 % according to Brunel (2000) p 185
    -          /C_m     1.0     % Yes, capacitance is 1 in the Brunel model
    -        >> SetDefaults
    -
    -      (Creating the network.) =  % show message
    -      
    -      /E_neurons /iaf_psc_alpha NE Create def
    -      /I_neurons /iaf_psc_alpha NI Create def
    -
    -      % list of all neurons
    -      /allNeurons E_neurons I_neurons join def
    -
    -      (Creating Poisson generators.) =
    -      /poisson_generator
    -      <<                % set firing rate
    -        /rate p_rate
    -      >> SetDefaults
    -
    -      /expoisson /poisson_generator Create def
    -      /inpoisson /poisson_generator Create def
    -
    -      % We could do with only one recorder,
    -      % but by recording the populations separately,
    -      % we needn't sort the recordings later
    -      (Creating excitatory spike recorder.) =
    -      /exsr /spike_recorder Create def
    -      exsr
    -      <<
    -        /label (brunel-2-ex-threaded)
    -        /record_to /ascii
    -      >> SetStatus
    -
    -      (Creating inhibitory spike recorder.) =
    -      /insr /spike_recorder Create def
    -      insr
    -      <<
    -        /label (brunel-2-in-threaded)
    -        /record_to /ascii
    -      >> SetStatus
    -
    -      % Create custom synapse types with appropriate values for
    -      % our excitatory and inhibitory connections
    -      /static_synapse_hom_w << /delay delay >> SetDefaults
    -      /static_synapse_hom_w /syn_ex << /weight JE >> CopyModel
    -      /static_synapse_hom_w /syn_in << /weight JI >> CopyModel
    -
    -      (Connecting excitatory neurons.) =
    -      expoisson E_neurons /all_to_all /syn_ex Connect
    -
    -      % E -> E
    -      E_neurons E_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model /syn_ex >> Connect
    -
    -      % I -> I
    -      I_neurons E_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -      (Connecting inhibitory population.) =
    -      inpoisson I_neurons /all_to_all /syn_ex Connect
    -
    -      % E -> I
    -      E_neurons I_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model /syn_ex >> Connect
    -
    -      % I -> I
    -      I_neurons I_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -      % Spike recorders are connected to the first Nrec neurons in each
    -      % population.  Since neurons are equal and connectivity is homogeneously
    -      % randomized, this is equivalent to picking Nrec neurons at random
    -      % from each population
    -      (Connecting spike recorders.) =
    -
    -      E_neurons Nrec Take exsr /all_to_all /static_synapse_hom_w Connect  % pick the first 500 neurons
    -      I_neurons Nrec Take insr /all_to_all /static_synapse_hom_w Connect
    -
    -      toc /BuildCPUTime Set
    -
    -      /syn_ex GetDefaults /num_connections get /n_ex_syn Set
    -      /syn_in GetDefaults /num_connections get /n_in_syn Set
    -
    -%%% SIMULATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -  % run, measure computer time with tic-toc
    -  (Starting simulation.) =
    -  tic
    -  simtime Simulate
    -  toc /SimCPUTime Set
    -
    -  % write a little report
    -  (\nBrunel Network Simulation) =
    -  (Number of Threads : ) =only local_num_threads =
    -  (Number of Neurons : ) =only N =
    -  (Number of Synapses: ) =only GetKernelStatus /num_connections get =
    -  (       Excitatory : ) =only n_ex_syn =
    -  (       Inhibitory : ) =only n_in_syn =
    -  (Excitatory rate   : ) =only exsr ComputeRate =only ( Hz) =
    -  (Inhibitory rate   : ) =only insr ComputeRate =only ( Hz) =
    -  (Building time     : ) =only BuildCPUTime =only ( s) =
    -  (Simulation time   : ) =only SimCPUTime   =only ( s\n) =
    -
    diff --git a/examples/nest/brunel-2000_newconnect.sli b/examples/nest/brunel-2000_newconnect.sli
    deleted file mode 100644
    index 8923c10e92..0000000000
    --- a/examples/nest/brunel-2000_newconnect.sli
    +++ /dev/null
    @@ -1,312 +0,0 @@
    -/*
    - *  brunel-2000_newconnect.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   Brunel Network
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 50
    -   neurons from each population are recorded.  Neurons are modeled
    -   as leaky integrate-and-fire neurons with current-injecting synapses
    -   (alpha functions).  The model is based on
    -
    -      Nicolas Brunel
    -      Dynamics of sparsely connected networks of excitatory
    -      and inhibitory spiking neurons
    -      Journal of Computational Neuroscience, 2000, vol 8, pp 183-208.
    -
    -   There are two differences to Brunel's model: we use alpha
    -   functions instead of delta for synaptic currents, and our neurons
    -   reset to the resting potential (0 mv) instead of to half-way
    -   between resting potential and threshold.
    -
    -   This example shows how to
    -
    -      - create populations
    -      - instrument a network with injection and recording devices
    -      - record data to files
    -      - define own functions
    -      - set parameters in a simple way
    -      - communicate with the user in a simple way
    -      
    -   This brunel-2000_newconnect.sli version shows how to construct
    -   the network using the new Connect function introduced with
    -   NEST 2.4.
    -
    -   Abigail Morrison, Marc-Oliver Gewaltig, Hans Ekkehard Plesser
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -/order 2500 def     % scales size of network (total 5*order neurons)
    -
    -% case C : asynchronous irregullar
    -/g      5.0 def    % rel strength, inhibitory synapses
    -/eta    2.0 def    % nu_ext / nu_thresh
    -
    -% case D : slow oscillations
    -%/g      4.5  def    % rel strength, inhibitory synapses
    -%/eta    0.95 def    % nu_ext / nu_thresh
    -
    -/simtime  1000.0 def % simulation time [ms]
    -/dt          0.1 def % simulation step length [ms]
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%       NO USER-SERVICABLE PARTS BELOW
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -%%% FUNCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Take spike recorder, find total number of spikes registered,
    -% return average rate per neuron in Hz.
    -% NOTE: If you are running with several MPI processes, this
    -%       function only gives an approximation to the true rate.
    -%
    -% spike_det ComputeRate -> rate
    -/ComputeRate
    -{
    -  << >> begin  % anonymous dictionary for local variables
    -
    -    /sr Set
    -
    -    % We need to guess how many neurons we record from.
    -    % This assumes an even distribution of nodes across
    -    % processes, as well as homogeneous activity in the
    -    % network. So this is really a hack. NEST needs better
    -    % support for rate calculations, such as giving the
    -    % number of neurons recorded from by each spike recorder.
    -
    -    userdict /Nrec get cvd NumProcesses div /nnrn Set
    -    sr /n_events get nnrn userdict /simtime get mul div
    -    1000 mul         % convert from mHz to Hz, leave on stack
    -
    -  end
    -} bind             % optional, improves performance
    -def
    -
    -
    -% Compute the maximum of postsynaptic potential
    -% for a synaptic input current of unit amplitude
    -% (1 pA)
    -/ComputePSPnorm
    -{
    -  % calculate the normalization factor for the PSP
    -  (
    -  a = tauMem / tauSyn;
    -  b = 1.0 / tauSyn - 1.0 / tauMem;
    -  % time of maximum
    -  t_max = 1.0/b * (-LambertWm1(-exp(-1.0/a)/a)-1.0/a);
    -  % maximum of PSP for current of unit amplitude
    -  exp(1.0)/(tauSyn*CMem*b) * ((exp(-t_max/tauMem) - exp(-t_max/tauSyn)) / b - t_max*exp(-t_max/tauSyn))
    -  ) ExecMath
    -}
    -def
    -
    -%%% PREPARATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/NE 4 order mul cvi def  % number of excitatory neurons
    -/NI 1 order mul cvi def  % number of inhibitory neurons
    -/N  NI NE add def        % total number of neurons
    -
    -/epsilon 0.1 def            % connectivity
    -/CE epsilon NE mul cvi def  % number of excitatory synapses on neuron
    -/CI epsilon NI mul cvi def  % number of inhibitory synapses on neuron
    -/C  CE CI add def           % total number of internal synapses per n.
    -/Cext CE def                % number of external synapses on neuron
    -
    -/tauMem 20.0 def    % neuron membrane time constant [ms]
    -/CMem    1.0 def    % membrane capacity [pF]
    -/tauSyn  0.5 def    % synaptic time constant [ms]
    -/tauRef  2.0 def    % refractory time [ms]
    -/E_L     0.0 def    % resting potential [mV]
    -/theta  20.0 def    % threshold
    -
    -
    -% amplitude of PSP given 1pA current
    -ComputePSPnorm /J_max_unit Set
    -
    -% synaptic weights, scaled for our alpha functions, such that
    -% for constant membrane potential, the peak amplitude of the PSP
    -% equals J
    -
    -/delay   1.5 def         % synaptic delay, all connections [ms]
    -/J       0.1 def         % synaptic weight [mV]
    -/JE J J_max_unit div def % synaptic weight [pA]
    -/JI g JE mul neg def     % inhibitory
    -
    -% threshold rate, equivalent rate of events needed to
    -% have mean input current equal to threshold
    -/nu_thresh ((theta * CMem) / (JE*CE*exp(1)*tauMem*tauSyn)) ExecMath def
    -/nu_ext eta nu_thresh mul def     % external rate per synapse
    -/p_rate nu_ext Cext mul 1000. mul def % external input rate per neuron
    -                                        % must be given in Hz
    -
    -% number of neurons per population to record from
    -/Nrec 50 def
    -
    -
    -%%% CONSTRUCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -ResetKernel      % clear all existing network elements
    -M_WARNING setverbosity
    -
    -% Number of threads per program instance. When using MPI, the mpirun
    -% call determines the number of MPI processes (= program instances).
    -% The total number of virtual processes is
    -%     #MPI processes x local_num_threads.
    -%
    -% The number of local_num_threads can be given to the script using
    -% the --userargs commandline switch like this:
    -%     nest --userargs=threads=4 script.sli
    -%
    -% If it is not given, it defaults to 2
    -statusdict/userargs :: size 1 geq
    -{
    -  0 get (=) breakup 1 get int /local_num_threads Set
    -}
    -{
    -  2 /local_num_threads Set
    -} ifelse
    -
    -% set resolution and total/local number of threads
    -<< 
    -    /resolution  dt 
    -    /local_num_threads local_num_threads
    -    /overwrite_files true
    ->> SetKernelStatus
    -
    - tic % start timer on construction
    -
    -% Setting neuron default parameters
    -
    -      (Configuring neuron parameters.) =
    -      /iaf_psc_alpha
    -        <<
    -          /tau_m       tauMem
    -          /tau_syn_ex  tauSyn
    -          /tau_syn_in  tauSyn
    -          /t_ref       tauRef
    -          /E_L     E_L
    -          /V_m     E_L
    -          /V_th    theta
    -          /V_reset    10.0 % according to Brunel (2000) p 185
    -          /C_m     1.0     % Yes, capacitance is 1 in the Brunel model
    -        >> SetDefaults
    -
    -      (Creating the network.) =  % show message
    -
    -      /E_neurons /iaf_psc_alpha NE Create def
    -      /I_neurons /iaf_psc_alpha NI Create def
    -
    -      % list of all neurons
    -      /allNeurons E_neurons I_neurons join def
    -
    -      (Creating Poisson generators.) =
    -      /poisson_generator
    -      <<                % set firing rate
    -        /rate p_rate
    -      >> SetDefaults
    -
    -      /expoisson /poisson_generator Create def
    -      /inpoisson /poisson_generator Create def
    -
    -      % We could do with only one recorder,
    -      % but by recording the populations separately,
    -      % we needn't sort the recordings later
    -      (Creating excitatory spike recorder.) =
    -      /exsr /spike_recorder Create def
    -      exsr
    -      <<
    -        /label (brunel-2-ex-threaded)
    -        /record_to /ascii
    -      >> SetStatus
    -
    -      (Creating inhibitory spike recorder.) =
    -      /insr /spike_recorder Create def
    -      insr
    -      <<
    -        /label (brunel-2-in-threaded)
    -        /record_to /ascii
    -      >> SetStatus
    -
    -      % Create custom synapse types with appropriate values for
    -      % our excitatory and inhibitory connections
    -      /static_synapse_hom_w << /delay delay >> SetDefaults
    -      /static_synapse_hom_w /syn_ex << /weight JE >> CopyModel
    -      /static_synapse_hom_w /syn_in << /weight JI >> CopyModel
    -
    -      (Connecting excitatory neurons.) =
    -      expoisson E_neurons /all_to_all /syn_ex Connect
    -
    -      E_neurons E_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model /syn_ex >> Connect
    -
    -      I_neurons E_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -      (Connecting inhibitory population.) =
    -      inpoisson I_neurons /all_to_all /syn_ex Connect
    -
    -      E_neurons I_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model /syn_ex >> Connect
    -      
    -      I_neurons I_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -      % Spike recorders are connected to the first Nrec neurons in each
    -      % population.  Since neurons are equal and connectivity is homogeneously
    -      % randomized, this is equivalent to picking Nrec neurons at random
    -      % from each population
    -      (Connecting spike recorders.) =
    -
    -      E_neurons Nrec Take exsr Connect  % pick the first 500 neurons
    -      I_neurons Nrec Take insr Connect
    -
    -      toc /BuildCPUTime Set
    -
    -      /syn_ex GetDefaults /num_connections get /n_ex_syn Set
    -      /syn_in GetDefaults /num_connections get /n_in_syn Set
    -
    -%%% SIMULATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -  % run, measure computer time with tic-toc
    -  (Starting simulation.) =
    -  tic
    -  simtime Simulate
    -  toc /SimCPUTime Set
    -
    -  % write a little report
    -  (\nBrunel Network Simulation) =
    -  (Number of Threads : ) =only local_num_threads =
    -  (Number of Neurons : ) =only N =
    -  (Number of Synapses: ) =only GetKernelStatus /num_connections get =
    -  (       Excitatory : ) =only n_ex_syn =
    -  (       Inhibitory : ) =only n_in_syn =
    -  (Excitatory rate   : ) =only exsr ComputeRate =only ( Hz) =
    -  (Inhibitory rate   : ) =only insr ComputeRate =only ( Hz) =
    -  (Building time     : ) =only BuildCPUTime =only ( s) =
    -  (Simulation time   : ) =only SimCPUTime   =only ( s\n) =
    -
    diff --git a/examples/nest/brunel-2000_newconnect_dc.sli b/examples/nest/brunel-2000_newconnect_dc.sli
    deleted file mode 100644
    index 296487667e..0000000000
    --- a/examples/nest/brunel-2000_newconnect_dc.sli
    +++ /dev/null
    @@ -1,320 +0,0 @@
    -/*
    - *  brunel-2000_newconnect_dc.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   Current-driven Brunel Network
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons.  Connections within and across
    -   both populations are created at random. The spike output of 50
    -   neurons from each population are recorded. Neurons are modeled
    -   as leaky integrate-and-fire neurons with current-injecting synapses
    -   (alpha functions).  The model is based on
    -
    -      Nicolas Brunel
    -      Dynamics of sparsely connected networks of excitatory
    -      and inhibitory spiking neurons
    -      Journal of Computational Neuroscience, 2000, vol 8, pp 183-208.
    -
    -   There are two differences to Brunel's model: we use alpha
    -   functions instead of delta for synaptic currents, and our neurons
    -   reset to the resting potential (0 mv) instead of to half-way
    -   between resting potential and threshold.
    -
    -   This example shows how to
    -
    -      - create populations
    -      - instrument a network with injection and recording devices
    -      - record data to files
    -      - define own functions
    -      - set parameters in a simple way
    -      - communicate with the user in a simple way
    -      
    -   This brunel-2000_newconnect_dc.sli
    -
    -      - does not have any Poisson generators
    -      - drives neurons by injecting fixed, identical input current to all neurons
    -      - initializes the membrane potential of all neurons to random values
    -      - thus does not consume any random numbers during simulation
    -
    -   This variant of the network is mainly meant for testing purposes. Because this
    -   model does not consume any random numbers during simulation, it should generate
    -   identical spike trains even if details of the neuron update order are modified.
    -
    -   Abigail Morrison, Marc-Oliver Gewaltig, Hans Ekkehard Plesser
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -/order 2500 def     % scales size of network (total 5*order neurons)
    -
    -% case C : asynchronous irregullar
    -/g      5.0 def    % rel strength, inhibitory synapses
    -/eta    2.0 def    % nu_ext / nu_thresh
    -
    -% case D : slow oscillations
    -%/g      4.5  def    % rel strength, inhibitory synapses
    -%/eta    0.95 def    % nu_ext / nu_thresh
    -
    -/simtime  1000.0 def % simulation time [ms]
    -/dt          0.1 def % simulation step length [ms]
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%       NO USER-SERVICABLE PARTS BELOW
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -%%% FUNCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Take spike recorder, find total number of spikes registered,
    -% return average rate per neuron in Hz.
    -% NOTE: If you are running with several MPI processes, this
    -%       function only gives an approximation to the true rate.
    -%
    -% spike_det ComputeRate -> rate
    -/ComputeRate
    -{
    -  << >> begin  % anonymous dictionary for local variables
    -
    -    /sr Set
    -
    -    % We need to guess how many neurons we record from.
    -    % This assumes an even distribution of nodes across
    -    % processes, as well as homogeneous activity in the
    -    % network. So this is really a hack. NEST needs better
    -    % support for rate calculations, such as giving the
    -    % number of neurons recorded from by each spike recorder.
    -
    -    userdict /Nrec get cvd NumProcesses div /nnrn Set
    -    sr /n_events get nnrn userdict /simtime get mul div
    -    1000 mul         % convert from mHz to Hz, leave on stack
    -
    -  end
    -} bind             % optional, improves performance
    -def
    -
    -
    -% Compute the maximum of postsynaptic potential
    -% for a synaptic input current of unit amplitude
    -% (1 pA)
    -/ComputePSPnorm
    -{
    -  % calculate the normalization factor for the PSP
    -  (
    -  a = tauMem / tauSyn;
    -  b = 1.0 / tauSyn - 1.0 / tauMem;
    -  % time of maximum
    -  t_max = 1.0/b * (-LambertWm1(-exp(-1.0/a)/a)-1.0/a);
    -  % maximum of PSP for current of unit amplitude
    -  exp(1.0)/(tauSyn*CMem*b) * ((exp(-t_max/tauMem) - exp(-t_max/tauSyn)) / b - t_max*exp(-t_max/tauSyn))
    -  ) ExecMath
    -}
    -def
    -
    -%%% PREPARATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/NE 4 order mul cvi def  % number of excitatory neurons
    -/NI 1 order mul cvi def  % number of inhibitory neurons
    -/N  NI NE add def        % total number of neurons
    -
    -/epsilon 0.1 def            % connectivity
    -/CE epsilon NE mul cvi def  % number of excitatory synapses on neuron
    -/CI epsilon NI mul cvi def  % number of inhibitory synapses on neuron
    -/C  CE CI add def           % total number of internal synapses per n.
    -/Cext CE def                % number of external synapses on neuron
    -
    -/tauMem 20.0 def    % neuron membrane time constant [ms]
    -/CMem    1.0 def    % membrane capacity [pF]
    -/tauSyn  0.5 def    % synaptic time constant [ms]
    -/tauRef  2.0 def    % refractory time [ms]
    -/E_L     0.0 def    % resting potential [mV]
    -/theta  20.0 def    % threshold
    -
    -/u0_min  -0.5 theta mul def    % Initial membrane potential
    -/u0_max  0.99 theta mul def
    -
    -% amplitude of PSP given 1pA current
    -ComputePSPnorm /J_max_unit Set
    -
    -% synaptic weights, scaled for our alpha functions, such that
    -% for constant membrane potential, the peak amplitude of the PSP
    -% equals J
    -
    -/delay   1.5 def         % synaptic delay, all connections [ms]
    -/J       0.1 def         % synaptic weight [mV]
    -/JE J J_max_unit div def % synaptic weight [pA]
    -/JI g JE mul neg def     % inhibitory
    -
    -% threshold rate, equivalent rate of events needed to
    -% have mean input current equal to threshold
    -/nu_thresh ((theta * CMem) / (JE*CE*exp(1)*tauMem*tauSyn)) ExecMath def
    -/nu_ext eta nu_thresh mul def     % external rate per synapse
    -/p_rate nu_ext Cext mul 1000. mul def % external input rate per neuron
    -                                        % must be given in Hz
    -
    -% equivalent DC current
    -% I0 = rate x weight x \int_0^inf alpha(t) dt
    -% with alpha(t) = e/tauSyn * t * exp(-t/tauSyn)
    -% rate must be given in spikes/ms
    -/I0 p_rate 1000. div JE mul E mul tauSyn mul def
    -
    -
    -% number of neurons per population to record from
    -/Nrec 50 def
    -
    -
    -%%% CONSTRUCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -ResetKernel      % clear all existing network elements
    -M_WARNING setverbosity
    -
    -% Number of threads per program instance. When using MPI, the mpirun
    -% call determines the number of MPI processes (= program instances).
    -% The total number of virtual processes is
    -%     #MPI processes x local_num_threads.
    -%
    -% The number of local_num_threads can be given to the script using
    -% the --userargs commandline switch like this:
    -%     nest --userargs=threads=4 script.sli
    -%
    -% If it is not given, it defaults to 2
    -statusdict/userargs :: size 1 geq
    -{
    -  0 get (=) breakup 1 get int /local_num_threads Set
    -}
    -{
    -  2 /local_num_threads Set
    -} ifelse
    -
    -% set resolution and total/local number of threads
    -<< 
    -    /resolution  dt 
    -    /local_num_threads local_num_threads
    -    /overwrite_files true
    ->> SetKernelStatus
    -
    - tic % start timer on construction
    -
    -% Setting neuron default parameters
    -
    -      (Configuring neuron parameters.) =
    -      /iaf_psc_alpha
    -        <<
    -          /tau_m       tauMem
    -          /tau_syn_ex  tauSyn
    -          /tau_syn_in  tauSyn
    -          /t_ref       tauRef
    -          /E_L         E_L
    -          /V_m         E_L
    -          /V_th        theta
    -          /V_reset     10.0 % according to Brunel (2000) p 185
    -          /C_m         1.0     % Yes, capacitance is 1 in the Brunel model
    -          /I_e         I0
    -        >> SetDefaults
    -
    -      (Creating the network.) =  % show message
    -
    -      /E_neurons /iaf_psc_alpha NE Create def
    -      /I_neurons /iaf_psc_alpha NI Create def
    -
    -      % list of all neurons
    -      /allNeurons E_neurons I_neurons join def
    -
    -      (Configuring neuron parameters.) =
    -
    -      /potential_param << /uniform << /min u0_min /max u0_max >> >> CreateParameter def
    -      allNeurons << /V_m potential_param >> SetStatus
    -
    -      % We could do with only one recorder,
    -      % but by recording the populations separately,
    -      % we needn't sort the recordings later
    -      (Creating excitatory spike recorder.) =
    -      /exsr /spike_recorder Create def
    -      exsr
    -      <<
    -        /label (brunel-2-ex-threaded)
    -        /record_to /ascii
    -      >> SetStatus
    -
    -      (Creating inhibitory spike recorder.) =
    -      /insr /spike_recorder Create def
    -      insr
    -      <<
    -        /label (brunel-2-in-threaded)
    -        /record_to /ascii
    -      >> SetStatus
    -
    -      % Create custom synapse types with appropriate values for
    -      % our excitatory and inhibitory connections
    -      /static_synapse_hom_w << /delay delay >> SetDefaults
    -      /static_synapse_hom_w /syn_ex << /weight JE >> CopyModel
    -      /static_synapse_hom_w /syn_in << /weight JI >> CopyModel
    -
    -      (Connecting excitatory neurons.) =
    -      E_neurons E_neurons << /rule /fixed_indegree /indegree CE >> /syn_ex Connect
    -
    -      I_neurons E_neurons << /rule /fixed_indegree /indegree CI >> /syn_in Connect
    -
    -      (Connecting inhibitory population.) =
    -      E_neurons I_neurons << /rule /fixed_indegree /indegree CE >> /syn_ex Connect
    -      
    -      I_neurons I_neurons << /rule /fixed_indegree /indegree CI >> /syn_in Connect
    -
    -      % Spike recorders are connected to the first Nrec neurons in each
    -      % population.  Since neurons are equal and connectivity is homogeneously
    -      % randomized, this is equivalent to picking Nrec neurons at random
    -      % from each population
    -      (Connecting spike recorders.) =
    -
    -      E_neurons Nrec Take exsr Connect  % pick the first 500 neurons
    -      I_neurons Nrec Take insr Connect
    -
    -      toc /BuildCPUTime Set
    -
    -      /syn_ex GetDefaults /num_connections get /n_ex_syn Set
    -      /syn_in GetDefaults /num_connections get /n_in_syn Set
    -
    -%%% SIMULATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -  % run, measure computer time with tic-toc
    -  (Starting simulation.) =
    -  tic
    -  simtime Simulate
    -  toc /SimCPUTime Set
    -
    -  % write a little report
    -  (\nBrunel Network Simulation) =
    -  (Number of Threads : ) =only local_num_threads =
    -  (Number of Neurons : ) =only N =
    -  (Number of Synapses: ) =only GetKernelStatus /num_connections get =
    -  (       Excitatory : ) =only n_ex_syn =
    -  (       Inhibitory : ) =only n_in_syn =
    -  (Excitatory rate   : ) =only exsr ComputeRate =only ( Hz) =
    -  (Inhibitory rate   : ) =only insr ComputeRate =only ( Hz) =
    -  (Building time     : ) =only BuildCPUTime =only ( s) =
    -  (Simulation time   : ) =only SimCPUTime   =only ( s\n) =
    -
    diff --git a/examples/nest/brunel_ps.sli b/examples/nest/brunel_ps.sli
    deleted file mode 100644
    index 8011d9152f..0000000000
    --- a/examples/nest/brunel_ps.sli
    +++ /dev/null
    @@ -1,312 +0,0 @@
    -/*
    - *  brunel_ps.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - % autorun=true
    -
    -/*
    -   Brunel Network
    -
    -   PS: Identical with Brunel, but precise spiking neurons.
    -
    -   The SLI code in this file creates a sparsely coupled network of
    -   excitatory and inhibitory neurons.  Connections within and across
    -   both populations are created at random.  Both neuron populations
    -   receive Poissonian background input.  The spike output of 500
    -   neurons from each population are recorded.  Neurons are modeled
    -   as leaky integrate-and-fire neurons with current-injecting synapses
    -   (alpha functions).  The model is based on
    -
    -      Nicolas Brunel
    -      Dynamics of sparsely connected networks of excitatory
    -      and inhibitory spiking neurons
    -      Journal of Computational Neuroscience, 2000, vol 8, pp 183-208.
    -
    -   There are two differences to Brunel's model: we use alpha
    -   functions instead of delta for synaptic currents, and our neurons
    -   reset to the resting potential (0 mv) instead of to half-way
    -   between resting potential and threshold.
    -
    -   This example shows how to
    -
    -      - create populations
    -      - instrument a network with injection and recording devices
    -      - record data to files
    -      - define own functions
    -      - set parameters in a simple way
    -      - communicate with the user in a simple way
    -
    -   Abigail Morrison, Marc-Oliver Gewaltig, Hans Ekkehard Plesser
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is placed in the userdict, which is open by default
    -
    -/order 2500 def     % scales size of network (total 5*order neurons)
    -
    -% case C : slow oscillations
    -/g      5.0 def    % rel strength, inhibitory synapses
    -/eta    2.0 def    % nu_ext / nu_thresh
    -
    -% case D : slow oscillations
    -%/g      4.5  def    % rel strength, inhibitory synapses
    -%/eta    0.95 def    % nu_ext / nu_thresh
    -
    -/simtime 1000.0 def % simulation time [ms]
    -/dt         0.1 def % simulation step length [ms]
    -
    -% Number of POSIX threads per program instance.
    -% When using MPI, the mpirun call determines the number
    -% of MPI processes (=program instances). The total number
    -% of virtual processes is #MPI processes x local_num_threads.
    -/local_num_threads 2 def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%       NO USER-SERVICABLE PARTS BELOW
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -%%% FUNCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Take spike recorder, find total number of spikes registered,
    -% return average rate per neuron in Hz.
    -% NOTE: If you are running with several MPI processes, this
    -%       function only gives an approximation to the true rate.
    -%
    -% spike_det ComputeRate -> rate
    -/ComputeRate
    -{
    -  << >> begin  % anonymous dictionary for local variables
    -
    -    /sr Set
    -
    -    % We need to guess how many neurons we record from.
    -    % This assumes an even distribution of nodes across
    -    % processes, as well as homogeneous activity in the
    -    % network. So this is really a hack. NEST needs better
    -    % support for rate calculations, such as giving the
    -    % number of neurons recorded from by each spike recorder.
    -
    -    userdict /Nrec get cvd NumProcesses div /nnrn Set
    -    sr /n_events get nnrn userdict /simtime get mul div
    -    1000 mul         % convert from mHz to Hz, leave on stack
    -
    -  end
    -} bind             % optional, improves performance
    -def
    -
    -% Compute the maximum of postsynaptic potential
    -% for a synaptic input current of unit amplitude
    -% (1 pA)
    -/ComputePSPnorm
    -{
    -  % calculate the normalization factor for the PSP
    -  (
    -  a = tauMem / tauSyn;
    -  b = 1.0 / tauSyn - 1.0 / tauMem;
    -  % time of maximum
    -  t_max = 1.0/b * (-LambertWm1(-exp(-1.0/a)/a)-1.0/a);
    -  % maximum of PSP for current of unit amplitude
    -  exp(1.0)/(tauSyn*CMem*b) * ((exp(-t_max/tauMem) - exp(-t_max/tauSyn)) / b - t_max*exp(-t_max/tauSyn))
    -  ) ExecMath
    -}
    -def
    -
    -%%% PREPARATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/NE 4 order mul cvi def  % number of excitatory neurons
    -/NI 1 order mul cvi def  % number of inhibitory neurons
    -/N  NI NE add def        % total number of neurons
    -
    -/epsilon 0.1 def            % connectivity
    -/CE epsilon NE mul cvi def  % number of excitatory synapses on neuron
    -/CI epsilon NI mul cvi def  % number of inhibitory synapses on neuron
    -/C  CE CI add def           % total number of internal synapses per n.
    -/Cext CE def                % number of external synapses on neuron
    -
    -/tauMem 20.0 def    % neuron membrane time constant [ms]
    -/CMem  250.0 def    % membrane capacity [pF]
    -/tauSyn  0.5 def    % synaptic time constant [ms]
    -/tauRef  2.0 def    % refractory time [ms]
    -/E_L     0.0 def    % resting potential [mV]
    -/theta  20.0 def    % threshold
    -
    -
    -% amplitude of PSP given 1pA current
    -ComputePSPnorm /J_max_unit Set
    -
    -% synaptic weights, scaled for our alpha functions, such that
    -% for constant membrane potential, the peak amplitude of the PSP
    -% equals J
    -
    -/delay   1.5 def         % synaptic delay, all connections [ms]
    -/J       0.1 def         % synaptic weight [mV]
    -/JE J J_max_unit div def % synaptic weight [pA]
    -/JI g JE mul neg def     % inhibitory
    -
    -% threshold rate, equivalent rate of events needed to
    -% have mean input current equal to threshold
    -/nu_thresh ((theta * CMem) / (JE*CE*exp(1)*tauMem*tauSyn)) ExecMath def
    -/nu_ext eta nu_thresh mul def     % external rate per synapse
    -/p_rate nu_ext Cext mul 1000. mul def % external input rate per neuron
    -                                        % must be given in Hz
    -
    -% number of neurons per population to record from
    -/Nrec 500 def
    -
    -% number of synapses---just so we know
    -/Nsyn
    -  C          % internal synapses
    -  1 add      % synapse from PoissonGenerator
    -  N mul
    -  Nrec 2 mul % "synapses" to spike recorders
    -  add
    -def
    -
    -%%% CONSTRUCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -ResetKernel      % clear all existing network elements
    -
    -% set resolution and total/local number of threads
    -<<
    -    /resolution  dt
    -    /local_num_threads local_num_threads
    -    /overwrite_files true
    ->> SetKernelStatus
    -
    -tic % start timer on construction
    -
    -  (Creating excitatory population.) =  % show message
    -  /E_neurons /iaf_psc_alpha_canon NE Create def  % create exitatory neurons
    -
    -  (Creating inhibitory population.) =  % show message
    -  /I_neurons /iaf_psc_alpha_canon NI Create def  % create inhibitory neurons
    -
    -  % all neurons
    -  /allNeurons E_neurons I_neurons join def
    -  
    -  (Creating excitatory Poisson generator.) =
    -  /expoisson /poisson_generator_ps Create def
    -  expoisson
    -  <<                % set firing rate
    -    /rate p_rate
    -  >> SetStatus
    -
    -  (Creating inhibitory Poisson generator.) =
    -  /inpoisson /poisson_generator_ps Create def
    -  inpoisson
    -  <<
    -    /rate  p_rate
    -  >> SetStatus
    -
    -  % one recorder would in principle be enough,
    -  % but by recording the populations separately,
    -  % we save us a lot of sorting work later
    -  (Creating excitatory spike recorder.) =
    -  /exsr /spike_recorder << /record_to /ascii >> Create def
    -
    -  (Creating inhibitory spike recorder.) =
    -  /insr /spike_recorder << /record_to /ascii >> Create def
    -
    -  % Setting neuron parameters after creation is deprecated in NEST 2.0.
    -  % You should set parameters using SetDefaults before creating neurons,
    -  % as this is far more efficient.
    -  % See FacetsBenchmarks/run_benchmark.sli for an example.
    -  (Configuring neuron parameters.) =
    -  allNeurons
    -  {
    -    <<
    -      /tau_m   tauMem
    -      /C_m     CMem
    -      /tau_syn tauSyn
    -      /t_ref   tauRef
    -      /E_L     E_L
    -      /V_th    theta
    -      /V_m     E_L
    -      /V_reset E_L
    -      /C_m     1.0     % capacitance is unity in Brunel model
    -    >> SetStatus
    -
    -  } forall
    -
    -
    -  % Create custom synapse types with appropriate values for
    -  % our excitatory and inhibitory connections
    -  /static_synapse << /delay delay >> SetDefaults
    -  /static_synapse /syn_ex << /weight JE >> CopyModel
    -  /static_synapse /syn_in << /weight JI >> CopyModel
    -
    -  (Connecting excitatory population.) =
    -  expoisson E_neurons /all_to_all /syn_ex Connect
    -
    -  % E -> E connections
    -  % the following is a single call to FixedIndegree connect
    -  E_neurons   % source population [we pick from this]
    -  E_neurons   % target neurons
    -  << /rule /fixed_indegree /indegree CE >> % number of source neurons to pick
    -  << /synapse_model /syn_ex >>    % synapse model
    -  Connect
    -
    -  % I -> E connections
    -  % as above, but on a single line
    -  I_neurons E_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -  (Connecting inhibitory population.) =
    -  inpoisson I_neurons /all_to_all /syn_ex Connect
    -
    -  % ... as above, just written more compact
    -
    -  E_neurons I_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model /syn_ex >> Connect
    -  I_neurons I_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -  % Spike recorders are connected to the first Nrec neurons in each
    -  % population.  Since neurons are equal and connectivity is homogeneously
    -  % randomized, this is equivalent to picking Nrec neurons at random
    -  % from each population
    -  (Connecting spike recorders.) =
    -
    -  E_neurons Nrec Take % pick the first 500 neurons
    -    exsr Connect
    -
    -  I_neurons Nrec Take % pick the first 500 neurons
    -    insr Connect
    -
    -  % read out time used for building
    -
    -toc /BuildCPUTime Set
    -
    -%%% SIMULATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% run, measure computer time with tic-toc
    -(Starting simulation.) =
    -tic
    -simtime Simulate
    -toc /SimCPUTime Set
    -
    -% write a little report
    -(\nBrunel Network Simulation) =
    -(Number of Neurons : ) =only N =
    -(Number of Synapses: ) =only Nsyn =
    -(Excitatory rate   : ) =only exsr ComputeRate =only ( Hz) =
    -(Inhibitory rate   : ) =only insr ComputeRate =only ( Hz) =
    -(Building time     : ) =only BuildCPUTime =only ( s) =
    -(Simulation time   : ) =only SimCPUTime   =only ( s\n) =
    diff --git a/examples/nest/conngen_interface.sli b/examples/nest/conngen_interface.sli
    deleted file mode 100644
    index 933fd45c40..0000000000
    --- a/examples/nest/conngen_interface.sli
    +++ /dev/null
    @@ -1,67 +0,0 @@
    -/*
    - *  conngen_interface.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% 
    -% This example shows how to use the Connection Generator Interface of
    -% libneurosim ([1]) from the SLI level. It connects two small neuronal
    -% populations using a connection pattern specified in the XML notation
    -% of the the Connection Set Algebra (CSA, [2]). The example relies on
    -% the C++ implementation of the CSA ([3]). At the time of writing, this
    -% implementation is not publically available and the example itself is
    -% thus a bit pointless. It is left here for future reference.
    -%
    -%
    -% References:
    -% [1] https://github.com/INCF/libneurosim
    -% [2] https://doi.org/10.1147/rd.521.0031
    -% [3] https://github.com/INCF/libcsa
    -%
    -
    -M_ERROR setverbosity
    -
    -(unittest) run
    -/unittest using
    -
    -% Only run if NEST was compiled with support for libneurosim
    -statusdict/have_libneurosim :: not { /skipped exit_test_gracefully } if
    -
    -% Tell the ConnectionGenerator interface, which implementation to use
    -(CSA) (libcsa.so) CGSelectImplementation
    -
    -% Obtain a connectiongeneratortype object by parsing an XML definition
    -(<?xml version='1.0' encoding='UTF-8'?>\n)
    -(<CSA xmlns="http://software.incf.org/software/csa/1.0">) join
    -(<oneToOne/>) join
    -(</CSA>) join
    -CGParse /cg Set
    -
    -% Another option to obtain the connectiongeneratortype object would be
    -% using CGParseFile to read the specification from a file.
    -
    -/iaf_psc_alpha 8 Create /pre Set
    -/iaf_psc_alpha 8 Create /post Set
    -
    -pre post << /rule /conngen /cg cg >> Connect
    -
    -<< /source pre >> GetConnections
    -{ GetStatus /target get } Map
    -post eq ==
    diff --git a/examples/nest/correlospinmatrix_detector.sli b/examples/nest/correlospinmatrix_detector.sli
    deleted file mode 100644
    index 9dadc45d5c..0000000000
    --- a/examples/nest/correlospinmatrix_detector.sli
    +++ /dev/null
    @@ -1,55 +0,0 @@
    -/*
    - *  correlospinmatrix_detector.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/* simple example of usage for the
    -   correlospinmatrix detector
    -*/
    -
    -/sg1 /spike_generator Create def
    -/sg2 /spike_generator Create def
    -/sg3 /spike_generator Create def
    -
    -/csd /correlospinmatrix_detector Create def
    -/sr /spike_recorder << /record_to /screen >> Create def
    -
    -csd << /N_channels 3 /tau_max 10. /delta_tau 1.0 >> SetStatus
    -
    -sg1 << /spike_times [10. 10. 16.] >> SetStatus  % binary pulse starting at 10. ending at 16.
    -sg2 << /spike_times [15. 15. 20.] >> SetStatus  % binary pulse starting at 15. ending at 20.
    -
    -sg1 GetStatus info
    -
    -sg1 sr << >> << /receptor_type 0 >> Connect
    -
    -% one final event needed so that last down transition will be detected
    -sg3 << /spike_times [25.] >> SetStatus
    -
    -
    -sg1 csd << >> << /receptor_type 0 >> Connect
    -sg2 csd << >> << /receptor_type 1 >> Connect
    -sg3 csd << >> << /receptor_type 2 >> Connect
    -
    -100. Simulate
    -
    -csd GetStatus 0 get /count_covariance get ==
    diff --git a/examples/nest/hpc_benchmark.sli b/examples/nest/hpc_benchmark.sli
    deleted file mode 100644
    index 1ccfab6ccf..0000000000
    --- a/examples/nest/hpc_benchmark.sli
    +++ /dev/null
    @@ -1,482 +0,0 @@
    -/*
    - *  hpc_benchmark.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -   This script produces a balanced random network of scale*11250 neurons in
    -   which the excitatory-excitatory neurons exhibit STDP with
    -   multiplicative depression and power-law potentiation. A mutual
    -   equilibrium is obtained between the activity dynamics (low rate in
    -   asynchronous irregular regime) and the synaptic weight distribution
    -   (unimodal). The number of incoming connections per neuron is fixed
    -   and independent of network size (indegree=11250).
    -
    -   This is the standard network investigated in:
    -   Morrison et al (2007). Spike-timing-dependent plasticity in balanced random
    -     networks. Neural Comput 19(6):1437-67
    -   Helias et al (2012). Supercomputers ready for use as discovery machines for
    -     neuroscience. Front. Neuroinform. 6:26
    -   Kunkel et al (2014). Spiking network simulation code for petascale
    -     computers. Front. Neuroinform. 8:78
    -
    -
    -   The difference between this script and hpc_benchmark_2_16.sli is that this
    -   version is invariant under mpi/thread splits. This affects
    -     - Randomization of the membrane potential (here it is based on the virtual
    -       processes)
    -     - Neurons that are being recorded from (here we always record from the
    -       first Nrec neurons).
    -
    -
    -   A note on scaling
    -   -----------------
    -
    -   This benchmark was originally developed for very large-scale simulations on
    -   supercomputers with more than 1 million neurons in the network and
    -   11.250 incoming synapses per neuron. For such large networks, synaptic input
    -   to a single neuron will be little correlated across inputs and network
    -   activity will remain stable over long periods of time.
    -
    -   The original network size corresponds to a scale parameter of 100 or more.
    -   In order to make it possible to test this benchmark script on desktop
    -   computers, the scale parameter is set to 1 below, while the number of
    -   11.250 incoming synapses per neuron is retained. In this limit, correlations
    -   in input to neurons are large and will lead to increasing synaptic weights.
    -   Over time, network dynamics will therefore become unstable and all neurons
    -   in the network will fire in synchrony, leading to extremely slow simulation
    -   speeds.
    -
    -   Therefore, the presimulation time is reduced to 50 ms below and the
    -   simulation time to 250 ms, while we usually use 100 ms presimulation and
    -   1000 ms simulation time.
    -
    -   For meaningful use of this benchmark, you should use a scale > 10 and check
    -   that the firing rate reported at the end of the benchmark is below 10 spikes
    -   per second.
    -*/
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is placed in the userdict dictionary
    -
    -/nvp 1 def              % total number of virtual processes
    -/scale 1.0 def          % scaling factor of the network size,
    -                        % total network size = scale*11250 neurons
    -/simtime 250. def       % total simulation time in ms
    -/presimtime 50. ms def  % simulation time until reaching equilibrium
    -/dt 0.1 ms def          % simulation step
    -/record_spikes true def % switch to record spikes of excitatory neurons to file
    -/path_name (.) def      % path where all files will have to be written
    -/log_file (log) def     % naming scheme for the log files
    -
    -% -----------------------------------------------------------------------------
    -
    -%%%%%%%%% Define function to convert synapse weight from  mV to pA %%%%%%%%%%%
    -
    -/ConvertSynapseWeight
    -{
    -  /tauMem Set
    -  /tauSyn Set
    -  /CMem Set
    -  % This function is specific to the used neuron model
    -  % Leaky integrate-and-fire neuron with alpha-shaped
    -  % postsynaptic currents
    -  (
    -    % compute time to maximum of V_m after spike input to neuron at rest
    -    a = tauMem / tauSyn;
    -    b = 1.0 / tauSyn - 1.0 / tauMem;
    -    t_rise = 1.0/b * (-LambertWm1(-exp(-1.0/a)/a)-1.0/a);
    -
    -    % maximum of PSP for current of unit amplitude
    -    exp(1.0)/(tauSyn*CMem*b) * ((exp(-t_rise/tauMem) - exp(-t_rise/tauSyn)) / b - t_rise*exp(-t_rise/tauSyn))
    -  ) ExecMath
    -  1 exch div
    -}
    -def
    -
    -% For compatiblity with earlier benchmarks, we require a rise time of
    -% t_rise = 1.700759 ms and we choose tau_syn to achieve this for given
    -% tau_m. This requires numerical inversion of the expression for t_rise
    -% in ConvertSynapseWeight. We computed this value once and hard-code
    -% it here.
    -
    -/tau_syn 0.32582722403722841 ms def
    -
    -% -----------------------------------------------------------------------------
    -
    -/brunel_params
    -<<
    -  /NE 9000 scale mul round cvi   % number of excitatory neurons
    -  /NI 2250 scale mul round cvi   % number of inhibitory neurons
    -
    -  % number of neurons to record spikes from
    -  /Nrec 1000
    -
    -  /model_params
    -  <<
    -    % Set variables for iaf_psc_alpha
    -    /E_L     0.0  mV  % Resting membrane potential (mV)
    -    /C_m   250.0  pF  % Capacity of the membrane (pF)
    -    /tau_m  10.0  ms  % Membrane time constant (ms)
    -    /t_ref   0.5  ms  % duration of refractory period (ms)
    -    /V_th   20.0  mV  % Threshold (mV)
    -    /V_reset 0.0  mV  % Reset Potential (mV)
    -    /tau_syn_ex   tau_syn % time const. postsynaptic excitatory currents (ms)
    -    /tau_syn_in   tau_syn % time const. postsynaptic inhibitory currents (ms)
    -    /tau_minus 30.0 ms %time constant for STDP (depression)
    -    % V can be randomly initialized see below
    -    /V_m 5.7 mV % mean value of membrane potential
    -  >>
    -
    -  /randomize_Vm true
    -  /mean_potential 5.7 mV  % Note that Kunkel et al. (2014) report different values. The values
    -  /sigma_potential 7.2 mV % in the paper were used for the benchmarks on K, the values given
    -                          % here were used for the benchmark on JUQUEEN.
    -
    -  /delay 1.5 ms           % synaptic delay, all connections (ms)
    -
    -   % synaptic weight
    -  /JE 0.14 mV             % peak of EPSP
    -
    -  /sigma_w 3.47 pA        % standard dev. of E->E synapses (pA)
    -  /g  -5.0
    -
    -  /stdp_params
    -  <<
    -    /delay 1.5 ms
    -    /alpha  0.0513
    -    /lambda 0.1           % STDP step size
    -    /mu     0.4           % STDP weight dependence exponent (potentiation)
    -    /tau_plus 15.0        % time constant for potentiation
    -  >>
    -
    -  /eta 1.685              % scaling of external stimulus
    -  /filestem path_name
    -
    -  /max_rank_cout 5  % copy output to cout for ranks 0..max_rank_cout-1
    -  /max_rank_log 30  % write to log files for ranks 0..max_rank_log-1
    -
    ->> def
    -
    -% Here we resolve parameter dependencies, by making the independent
    -% values visible
    -brunel_params dup using
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FUNCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/BuildNetwork
    -{
    -
    -  tic % start timer on construction
    -  % set global kernel parameters
    -  <<
    -     /total_num_virtual_procs nvp
    -     /resolution  dt
    -     /overwrite_files true
    -  >> SetKernelStatus
    -
    -  %------------------------- Creation -----------------------------------------
    -
    -  /iaf_psc_alpha    model_params    SetDefaults
    -
    -  M_INFO (BuildNetwork)
    -  (Creating excitatory population.) message  % show message
    -  /E_neurons /iaf_psc_alpha NE Create def
    -
    -  M_INFO (BuildNetwork)
    -  (Creating inhibitory population.) message  % show message
    -  /I_neurons /iaf_psc_alpha NI Create def
    -
    -  randomize_Vm
    -  {
    -      M_INFO (BuildNetwork)
    -      (Randomzing membrane potentials.) message
    -
    -      /potential_param << /normal << /mean mean_potential /std sigma_potential >> >> CreateParameter def
    -      E_neurons LocalOnly << /V_m potential_param >> SetStatus
    -      I_neurons LocalOnly << /V_m potential_param >> SetStatus
    -  } if
    -
    -  /CE NE scale cvd div iround def % number of incoming excitatory connections
    -  /CI NI scale cvd div iround def % number of incoming inhibitory connections
    -
    -  M_INFO (BuildNetwork)
    -  (Creating excitatory stimulus generator.) message
    -
    -  model_params using
    -
    -  % Convert synapse weight from mV to pA
    -  C_m tau_syn tau_m ConvertSynapseWeight /conversion_factor Set
    -  /JE_pA conversion_factor JE mul def
    -
    -  /nu_thresh V_th CE tau_m C_m div mul JE_pA mul 1.0 exp mul tau_syn mul div def
    -  /nu_ext nu_thresh eta mul def
    -  endusing
    -
    -  /E_stimulus /poisson_generator Create def
    -  E_stimulus
    -  <<
    -     /rate nu_ext CE mul 1000. mul
    -  >> SetStatus
    -
    -  M_INFO (BuildNetwork)
    -  (Creating excitatory spike recorder.) message
    -
    -  record_spikes
    -  {
    -    /recorder_label  filestem (/alpha_) join stdp_params /alpha get cvs join (_spikes) join def
    -    /E_recorder /spike_recorder Create def
    -    E_recorder
    -    <<
    -       /record_to /ascii
    -       /label recorder_label
    -    >> SetStatus
    -  } if
    -
    -  memory_thisjob cvs ( # virt_mem_after_nodes) join logger /log call
    -
    -  toc /BuildNodeTime Set
    -
    -  BuildNodeTime cvs ( # build_time_nodes) join logger /log call
    -
    -  tic
    -
    -  % Create custom synapse types with appropriate values for
    -  % our excitatory and inhibitory connections
    -  /static_synapse_hpc << /delay delay >> SetDefaults
    -  /static_synapse_hpc /syn_std  CopyModel
    -  /static_synapse_hpc /syn_ex << /weight JE_pA >> CopyModel
    -  /static_synapse_hpc /syn_in << /weight JE_pA g mul >> CopyModel
    -
    -  stdp_params /weight JE_pA put
    -  /stdp_pl_synapse_hom_hpc stdp_params SetDefaults
    -
    - %------------------------- Connection -----------------------------------------
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting stimulus generators.) message
    -
    -  % Connect Poisson generator to neuron
    -
    -  E_stimulus E_neurons << /rule (all_to_all) >> << /synapse_model /syn_ex >> Connect
    -  E_stimulus I_neurons << /rule (all_to_all) >> << /synapse_model /syn_ex >> Connect
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting excitatory -> excitatory population.) message
    -
    -  E_neurons E_neurons << /rule (fixed_indegree) /indegree CE /allow_autapses false /allow_multapses true >>
    -                      << /synapse_model /stdp_pl_synapse_hom_hpc >> Connect
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting inhibitory -> excitatory population.) message
    -
    -  I_neurons E_neurons << /rule (fixed_indegree) /indegree CI /allow_autapses false /allow_multapses true >>
    -                      << /synapse_model /syn_in >> Connect
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting excitatory -> inhibitory population.) message
    -
    -  E_neurons I_neurons << /rule (fixed_indegree) /indegree CE /allow_autapses false /allow_multapses true >>
    -                      << /synapse_model /syn_ex >> Connect
    -
    -  M_INFO (BuildNetwork)
    -  (Connecting inhibitory -> inhibitory population.) message
    -
    -  I_neurons I_neurons << /rule (fixed_indegree) /indegree CI /allow_autapses false /allow_multapses true >>
    -                      << /synapse_model /syn_in >> Connect
    -
    -
    -  record_spikes true eq
    -  {
    -    E_neurons size Nrec lt
    -    {
    -      M_ERROR (BuildNetwork)
    -      (The exitatory network is smaller than number of neurons to record from!) message
    -      1 quit_i
    -    } if
    -
    -    M_INFO (BuildNetwork)
    -    (Connecting spike recorders.) message
    -
    -    E_neurons Nrec Take E_recorder << /rule (all_to_all) >> << /synapse_model /syn_std >> Connect
    -  } if
    -
    -  % read out time used for building
    -  toc /BuildEdgeTime Set
    -
    -  BuildEdgeTime cvs ( # build_edge_time ) join logger /log call
    -  memory_thisjob cvs ( # virt_mem_after_edges) join logger /log call
    -
    - } def % end of buildnetwork
    -
    -%-------------------------- Simulation -----------------------------------------
    -
    -/RunSimulation
    -{
    -
    -  % open log file
    -  log_file logger /init call
    -
    -  ResetKernel
    -
    -  memory_thisjob cvs ( # virt_mem_0) join logger /log call
    -
    -  BuildNetwork
    -
    -  tic
    -
    -  presimtime Simulate
    -
    -  toc /PreparationTime Set
    -
    -  memory_thisjob cvs ( # virt_mem_after_presim) join logger /log call
    -  PreparationTime cvs ( # presim_time) join logger /log call
    -
    -  tic
    -
    -  simtime Simulate
    -
    -  toc /SimCPUTime Set
    -
    -  memory_thisjob cvs ( # virt_mem_after_sim) join logger /log call
    -  SimCPUTime cvs ( # sim_time) join logger /log call
    -
    -  GetKernelStatus info
    -
    -  record_spikes true eq
    -  {
    -    E_recorder ComputeRate cvs ( # average rate) join logger /log call
    -  } if
    -
    -
    -  E_neurons size I_neurons size add cvs ( # num_neurons) join logger /log call
    -  GetKernelStatus /num_connections get cvs ( # num_connections) join logger /log call
    -  GetKernelStatus /min_delay get cvs ( # min_delay) join logger /log call
    -  GetKernelStatus /max_delay get cvs ( # max_delay) join logger /log call
    -  GetKernelStatus /local_spike_counter get cvs ( # local_spike_counter) join logger /log call
    -
    -  logger /done call
    -} def
    -
    -% -----------------------------------------------------------------------------
    -
    -% Take spike recorder, find total number of spikes registered,
    -% return average rate per neuron in Hz.
    -% NOTE: If you are running with several MPI processes, this
    -%       function only gives an approximation to the true rate.
    -%
    -% spike_det ComputeRate -> rate
    -/ComputeRate
    -{
    -  << >> begin  % anonymous dictionary for local variables
    -
    -  /sr Set
    -
    -  % We need to guess how many neurons we record from.
    -  % This assumes an even distribution of nodes across
    -  % processes, as well as homogeneous activity in the
    -  % network. So this is really a hack. NEST needs better
    -  % support for rate calculations, such as giving the
    -  % number of neurons recorded from by each spike recorder.
    -
    -  /n_local_neurons Nrec cvd NumProcesses div def
    -  sr /n_events get cvd n_local_neurons simtime mul div
    -  1000 mul         % convert from mHz to Hz, leave on stack
    -
    -  end
    -} bind             % optional, improves performance
    -def
    -
    -% -----------------------------------------------------------------------------
    -
    -/*
    -    This function defines a logger class used to properly log memory and timing
    -    information from network simulations. It is used by hpc_benchmark.sli
    -    to store the information to the log files.
    -*/
    -
    -/logger
    -<<
    -  /line_counter 0
    -
    -  % constructor
    -  % expects file name on stack
    -  /init
    -  {
    -    Rank max_rank_log lt
    -    {
    -      (_) join
    -
    -      % convert rank to string, prepend 0 if necessary to make
    -      % numbers equally wide for all ranks
    -      Rank cvs
    -      dup length max_rank_log cvs length exch sub
    -      {
    -        48 prepend   % 48 is ASCII code for 0
    -      }
    -      repeat
    -      join
    -      (.dat) join
    -
    -      /f exch (w) ofsopen
    -      {
    -        def
    -      }
    -      {
    -        /Logger_init /CannotOpenFile raiseerror
    -      } ifelse
    -
    -    } if
    -  }
    -
    -  % logging function
    -  % expects one operand on stack to write to file
    -  /log
    -  {
    -    /value Set
    -    Rank max_rank_log lt
    -    {
    -      f line_counter <- ( ) <- Rank <- ( ) <- value <- (\n) <- pop
    -      /line_counter line_counter 1 add def
    -    } if
    -    Rank max_rank_cout lt
    -    {
    -      cout Rank <- ( ) <- value <- endl flush pop
    -    } if
    -  }
    -
    -  % closes file
    -  /done
    -  {
    -    Rank max_rank_log lt
    -    {
    -      f close
    -    } if
    -  }
    -
    ->> def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RUN BENCHMARK %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -RunSimulation
    diff --git a/examples/nest/multimeter.sli b/examples/nest/multimeter.sli
    deleted file mode 100644
    index 36b06d96e9..0000000000
    --- a/examples/nest/multimeter.sli
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -/*
    - *  multimeter.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -    This file illustrates recording from a iaf_cond_alpha neuron
    -    using a multimeter.
    -*/
    -
    -ResetKernel
    -
    -% print recordables for illustration
    -(iaf_cond_alpha recordables: ) =only
    -/iaf_cond_alpha GetDefaults /recordables get ==
    -
    -% Create neuron and multimeter
    -/iaf_cond_alpha Create /n Set
    -/multimeter Create /m Set
    -
    -m << /interval 0.1
    -     /record_from [/V_m /g_ex /g_in]
    -  >> SetStatus
    -
    -% connect multimeter to neuron
    -m n Connect
    -
    -% Create spike generators and connect
    -/spike_generator Create dup << /spike_times [10.0 20.0 50.0] >> SetStatus /gex Set
    -/spike_generator Create dup << /spike_times [15.0 25.0 55.0] >> SetStatus /gin Set
    -
    -gex n 200.0 1.0 Connect  % excitatory input
    -gin n -20.0 1.0 Connect  % inhibitory input
    -
    -% simulate
    -100 Simulate
    -
    -% obtain and display data
    -m /events get /me Set
    -
    -me /V_m get ==
    -me /g_ex get ==
    -me /g_in get ==
    -me /times get ==
    diff --git a/examples/nest/music/clocktest.music b/examples/nest/music/clocktest.music
    deleted file mode 100644
    index 690920f3da..0000000000
    --- a/examples/nest/music/clocktest.music
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -stoptime=1.0
    -[from]
    -  np=1
    -  binary=clocksource
    -[to]
    -  np=1
    -  binary=./conttest.py
    -
    -from.clock -> to.contdata [1]
    diff --git a/examples/nest/music/conttest.music b/examples/nest/music/conttest.music
    deleted file mode 100644
    index 126fa10524..0000000000
    --- a/examples/nest/music/conttest.music
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -stoptime=1.0
    -[from]
    -  np=1
    -  binary=constsource
    -[to]
    -  np=1
    -  binary=./conttest.py
    -
    -from.contdata -> to.contdata [10]
    diff --git a/examples/nest/music/conttest.py b/examples/nest/music/conttest.py
    deleted file mode 100755
    index eb8dd5b9b5..0000000000
    --- a/examples/nest/music/conttest.py
    +++ /dev/null
    @@ -1,40 +0,0 @@
    -#!/usr/bin/env python3
    -# -*- coding: utf-8 -*-
    -#
    -# conttest.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -import nest
    -
    -if not nest.ll_api.sli_func("statusdict/have_music ::"):
    -    import sys
    -
    -    print("NEST was not compiled with support for MUSIC, not running.")
    -    sys.exit()
    -
    -mcip = nest.Create('music_cont_in_proxy')
    -nest.SetStatus(mcip, {'port_name': 'contdata'})
    -
    -# Simulate and get vector data with a granularity of 10 ms:
    -time = 0
    -while time < 1000:
    -    nest.Simulate(10)
    -    data = nest.GetStatus(mcip, 'data')
    -    print(data)
    -    time += 10
    diff --git a/examples/nest/music/eventtest.music b/examples/nest/music/eventtest.music
    deleted file mode 100644
    index 51066b31de..0000000000
    --- a/examples/nest/music/eventtest.music
    +++ /dev/null
    @@ -1,13 +0,0 @@
    -
    -stoptime=0.02
    -
    -[from]
    -  binary=nest
    -  np=1
    -  args=spike_exporter.sli
    -
    -[to]
    -  binary=eventlogger
    -  np=1
    -  from.spikes_out -> to.in [10]
    -  args=--timestep 0.001 # make sure that eventlogger uses 1 ms as tick interval
    diff --git a/examples/nest/music/messages0.dat b/examples/nest/music/messages0.dat
    deleted file mode 100644
    index c0f0af883f..0000000000
    --- a/examples/nest/music/messages0.dat
    +++ /dev/null
    @@ -1,2 +0,0 @@
    -0.3	Hello
    -0.7	!
    diff --git a/examples/nest/music/messages1.dat b/examples/nest/music/messages1.dat
    deleted file mode 100644
    index 8268113332..0000000000
    --- a/examples/nest/music/messages1.dat
    +++ /dev/null
    @@ -1,3 +0,0 @@
    -0.5	World
    -0.71	Hello World
    -0.72	!
    diff --git a/examples/nest/music/minimalmusicsetup.music b/examples/nest/music/minimalmusicsetup.music
    deleted file mode 100644
    index c424fd6616..0000000000
    --- a/examples/nest/music/minimalmusicsetup.music
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -stoptime=0.01
    -
    -[from]
    -  binary=./minimalmusicsetup_sendnest.py
    -  np=1
    -
    -[to]
    -  binary=./minimalmusicsetup_receivenest.py
    -  np=1
    -
    -from.spikes_out -> to.spikes_in [1]
    diff --git a/examples/nest/music/minimalmusicsetup_receivenest.py b/examples/nest/music/minimalmusicsetup_receivenest.py
    deleted file mode 100755
    index 679059dcd1..0000000000
    --- a/examples/nest/music/minimalmusicsetup_receivenest.py
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -#!/usr/bin/env python3
    -# -*- coding: utf-8 -*-
    -#
    -# minimalmusicsetup_receivenest.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -import nest
    -
    -if not nest.ll_api.sli_func("statusdict/have_music ::"):
    -    import sys
    -
    -    print("NEST was not compiled with support for MUSIC, not running.")
    -    sys.exit(1)
    -
    -nest.set_verbosity("M_ERROR")
    -
    -meip = nest.Create('music_event_in_proxy')
    -n = nest.Create('iaf_psc_alpha')
    -meip.set({'port_name': 'spikes_in', 'music_channel': 0})
    -nest.Connect(meip, n, 'one_to_one', {'weight': 750.0})
    -
    -vm = nest.Create('voltmeter')
    -vm.record_to = "screen"
    -nest.Connect(vm, n)
    -
    -nest.Simulate(10)
    diff --git a/examples/nest/music/minimalmusicsetup_sendnest.py b/examples/nest/music/minimalmusicsetup_sendnest.py
    deleted file mode 100755
    index 6a71738452..0000000000
    --- a/examples/nest/music/minimalmusicsetup_sendnest.py
    +++ /dev/null
    @@ -1,46 +0,0 @@
    -#!/usr/bin/env python3
    -# -*- coding: utf-8 -*-
    -#
    -# minimalmusicsetup_sendnest.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -import nest
    -
    -if not nest.ll_api.sli_func("statusdict/have_music ::"):
    -    import sys
    -
    -    print("NEST was not compiled with support for MUSIC, not running.")
    -    sys.exit(1)
    -
    -nest.set_verbosity("M_ERROR")
    -
    -sg = nest.Create('spike_generator')
    -n = nest.Create('iaf_psc_alpha')
    -sg.spike_times = [1.0, 1.5, 2.0]
    -nest.Connect(sg, n, 'one_to_one', {'weight': 750.0, 'delay': 1.0})
    -
    -vm = nest.Create('voltmeter')
    -vm.record_to = "screen"
    -nest.Connect(vm, n)
    -
    -meop = nest.Create('music_event_out_proxy')
    -meop.port_name = 'spikes_out'
    -nest.Connect(sg, meop, 'one_to_one', {'music_channel': 0})
    -
    -nest.Simulate(10)
    diff --git a/examples/nest/music/msgtest.music b/examples/nest/music/msgtest.music
    deleted file mode 100644
    index d3fc6bd90e..0000000000
    --- a/examples/nest/music/msgtest.music
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -stoptime=1.0
    -np=1
    -[from]
    -  binary=messagesource
    -  args=messages
    -[to]
    -  binary=./msgtest.py
    -
    -from.out -> to.msgdata [0]
    diff --git a/examples/nest/music/msgtest.py b/examples/nest/music/msgtest.py
    deleted file mode 100755
    index 4abf6e2cf3..0000000000
    --- a/examples/nest/music/msgtest.py
    +++ /dev/null
    @@ -1,40 +0,0 @@
    -#!/usr/bin/env python3
    -# -*- coding: utf-8 -*-
    -#
    -# msgtest.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -import nest
    -
    -if not nest.ll_api.sli_func("statusdict/have_music ::"):
    -    import sys
    -
    -    print("NEST was not compiled with support for MUSIC, not running.")
    -    sys.exit()
    -
    -mmip = nest.Create('music_message_in_proxy')
    -nest.SetStatus(mmip, {'port_name': 'msgdata'})
    -
    -# Simulate and get message data with a granularity of 10 ms:
    -time = 0
    -while time < 1000:
    -    nest.Simulate(10)
    -    data = nest.GetStatus(mmip, 'data')
    -    print(data)
    -    time += 10
    diff --git a/examples/nest/music/spike_exporter.sli b/examples/nest/music/spike_exporter.sli
    deleted file mode 100644
    index a680a19def..0000000000
    --- a/examples/nest/music/spike_exporter.sli
    +++ /dev/null
    @@ -1,93 +0,0 @@
    -/*
    - *  spike_exporter.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -skip_if_without_music
    -
    -% spike exporter
    -% send spikes generated by a group of spike_generators/parrot_neurons
    -% to a MUSIC port
    -% author: Moritz Helias
    -% data: 2008-10-16
    -
    -21.0 /T Set % total simulation time
    -<< /resolution 0.1 >> SetKernelStatus
    -
    -10 /N Set % number of spike generators
    -
    -% create a population containing N parrot_neurons
    -% these are the dummy population to send data to the
    -% music port
    -
    -/parrots /parrot_neuron N Create def
    -
    -% create N spike generators each to feed one of the N parrots
    -
    -/generators /spike_generator N Create def
    -
    -% let the spike generator i
    -% produce a spike at 1.0 + 2.0*i ms
    -% connect it to parrot neuron i
    -
    -/i 0 def
    -generators
    -{
    -  << /spike_times [0.5 i 2.0 mul add] >> SetStatus
    -  /i i 1 add def
    -}
    -forall
    -generators parrots << /rule /one_to_one >> Connect
    -
    -% create a music_event_out_proxy
    -% for the port named "spikes_out"
    -/music_event_out_proxy Create /mo Set
    -mo
    -<<
    -    /port_name (spikes_out)
    ->>
    -SetStatus
    -
    -% connect the parrot neuron i
    -% to the music_event_out_proxy on receiver port (channel) i
    -
    -/i 0 def
    -parrots
    -{
    -  /src Set
    -  [src] cvnodecollection /nc Set
    -  nc GetStatus 0 get /local get
    -  {
    -    nc mo <</rule /one_to_one >> << /receptor_type i >> Connect
    -  }
    -  if
    -
    -  /i i 1 add def
    -}
    -forall
    -
    -% print the indexmap
    -% mapping from local index to
    -% global MUSIC index for each process
    -cout (rank=) <- Rank <- ( ) <- pop
    -mo GetStatus 0 get /index_map get ==
    -
    -% simulate
    -T Simulate
    diff --git a/examples/nest/music/three_neurons_threaded.music b/examples/nest/music/three_neurons_threaded.music
    deleted file mode 100644
    index 5e9290b67b..0000000000
    --- a/examples/nest/music/three_neurons_threaded.music
    +++ /dev/null
    @@ -1,14 +0,0 @@
    -
    -stoptime=0.1
    -
    -[from]
    -  binary=nest
    -  np=1
    -  args=three_neurons_threaded_sendnest.sli
    -
    -[to]
    -  binary=nest
    -  np=1
    -  args=three_neurons_threaded_receivenest.sli
    -  from.spikes_out1 -> to.spikes_in1 [1]
    -  from.spikes_out2 -> to.spikes_in2 [1]
    diff --git a/examples/nest/music/three_neurons_threaded_receivenest.sli b/examples/nest/music/three_neurons_threaded_receivenest.sli
    deleted file mode 100644
    index f1f40d058f..0000000000
    --- a/examples/nest/music/three_neurons_threaded_receivenest.sli
    +++ /dev/null
    @@ -1,47 +0,0 @@
    -/*
    - *  three_neurons_threaded_receivenest.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -skip_if_without_music
    -
    -M_INFO setverbosity
    -
    -<< /local_num_threads 2 /overwrite_files true >> SetKernelStatus
    -
    -/iaf_psc_alpha Create /n2 Set
    -/music_event_in_proxy Create /meip1 Set
    -meip1 << /port_name (spikes_in1) /music_channel 0 >> SetStatus
    -meip1 n2 /all_to_all << /weight 15000.0 >> Connect
    -
    -/music_event_in_proxy Create /meip2 Set
    -meip2 << /port_name (spikes_in2) /music_channel 0 >> SetStatus
    -/iaf_psc_alpha Create /n3 Set
    -meip2 n3 /all_to_all << /weight 15000.0 >> Connect
    -
    -/spike_recorder Create /sr1 Set
    -sr1 << /label (receivenest-n2) /record_to /ascii >> SetStatus
    -n2 sr1 Connect
    -
    -/spike_recorder Create /sr2 Set
    -sr2 << /label (receivenest-n3) /record_to /ascii >> SetStatus
    -n3 sr2 Connect
    -
    -100 Simulate
    diff --git a/examples/nest/music/three_neurons_threaded_sendnest.sli b/examples/nest/music/three_neurons_threaded_sendnest.sli
    deleted file mode 100644
    index 5a5d6069c3..0000000000
    --- a/examples/nest/music/three_neurons_threaded_sendnest.sli
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  three_neurons_threaded_sendnest.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -skip_if_without_music
    -
    -M_INFO setverbosity
    -
    -<< /local_num_threads 2 /overwrite_files true >> SetKernelStatus
    -
    -/spike_generator Create /sg Set
    -sg << /spike_times [1.0 1.5 2.0 ]>> SetStatus
    -
    -/iaf_psc_alpha Create /n1 Set
    -sg n1 /all_to_all << /weight 15000.0 >> Connect
    -
    -/iaf_psc_alpha Create /n2 Set
    -n1 n2 /all_to_all << /weight 15000.0 >> Connect
    -
    -/iaf_psc_alpha Create /n3 Set
    -n2 n3 /all_to_all << /weight 15000.0 >> Connect
    -
    -/music_event_out_proxy Create /meop Set
    -meop << /port_name (spikes_out1) >> SetStatus
    -n1 meop /all_to_all << /music_channel 0 >> Connect
    -
    -/music_event_out_proxy Create /meop Set
    -meop << /port_name (spikes_out2) >> SetStatus
    -n2 meop /all_to_all << /music_channel 0 >> Connect
    -
    -/spike_recorder Create /sr1 Set
    -sr1 << /label (sendnest-n2) /record_to /ascii >> SetStatus
    -n2 sr1 Connect
    -
    -/spike_recorder Create /sr2 Set
    -sr2 << /label (sendnest-n3) /record_to /ascii >> SetStatus
    -n3 sr2 Connect
    -
    -100 Simulate
    diff --git a/examples/nest/structural_plasticity_benchmark.sli b/examples/nest/structural_plasticity_benchmark.sli
    deleted file mode 100644
    index 851bd05509..0000000000
    --- a/examples/nest/structural_plasticity_benchmark.sli
    +++ /dev/null
    @@ -1,380 +0,0 @@
    -/*
    - *  structural_plasticity_benchmark.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% autorun=true
    -
    -/*
    -    This script simulates a network with two populations, 80% Excitatory, 20% Inhibitory,
    -    initially without connections and relies on structuraly plasticity to generate
    -    the connectivity. It uses Gaussian growth curves with different parameters for excitatory
    -    and inhibitory synaptic elements.
    -
    -    Authors: Jakob Jordan, original implementation by Sandra Diaz in PyNEST
    -*/
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is placed in the userdict dictionary
    -
    -/overwrite_files true def
    -/seed 123 def
    -
    -/nvp 1 def              % total number of virtual processes
    -/n_neurons 6000 def     % total number of neurons
    -/gamma 0.8 def          % relative size of excitatory population
    -
    -/psp_e 1.0 def          % PSP of synapses created between neurons in the network (mV)
    -/g -1.0 def             % IPSP amplitude relative to EPSP amplitude
    -/psp_ext 0.0106 def     % mean EPSP amplitude for external input (mV)
    -/bg_rate 10000.0 def    % rate of background Poisson input at each external input synapse (spikes/s)
    -/delay 1. def           % delay of all connections (ms)
    -
    -/simtime 12600. def       % total simulation time (ms)
    -/presimtime 50. ms def  % simulation time until reaching equilibrium (ms)
    -/dt 0.1 ms def          % simulation step size (ms)
    -/record_spikes true def % switch to record spikes of excitatory neurons to file
    -/path_name (.) def      % path where all files will have to be written
    -/log_file (log) def     % naming scheme for the log files
    -
    -% structural plasticity parameters
    -
    -/sp_update_interval 1000. def % update interval of structural plasticity (ms)
    -/sp_record_interval 1000 def  % recording of structural plasticity status (Ca, #Axons) (ms)
    -
    -% Growth curves for synaptic elements of excitatory neurons
    -% Excitatory synaptic elements
    -/growth_curve_e_e <<
    -                      /growth_curve /gaussian
    -                      /growth_rate 0.0001
    -                      /continuous false
    -                      /eta 0.0
    -                      /eps 0.05
    -                  >> def
    -
    -% Inhibitory synaptic elements
    -/growth_curve_e_i <<
    -                      /growth_curve /gaussian
    -                      /growth_rate 0.0001
    -                      /continuous false
    -                      /eta 0.0
    -                      /eps growth_curve_e_e /eps get
    -                  >> def
    -
    -% Growth curves for synaptic elements of inhibitory neurons
    -% Excitatory synaptic elements
    -/growth_curve_i_e <<
    -                      /growth_curve /gaussian
    -                      /growth_rate 0.0004
    -                      /continuous false
    -                      /eta 0.0
    -                      /eps 0.2
    -                  >> def
    -
    -% Inhibitory synaptic elements
    -/growth_curve_i_i <<
    -                      /growth_curve /gaussian
    -                      /growth_rate 0.0001
    -                      /continuous false
    -                      /eta 0.0
    -                      /eps growth_curve_i_e /eps get
    -                  >> def
    -
    -% neuron model parameters
    -
    -/model_params <<
    -                  /tau_m 10.0        % membrane time constant (ms)
    -                  /tau_syn_ex 0.5     % excitatory synaptic time constant (ms)
    -                  /tau_syn_in 0.5     % inhibitory synaptic time constant (ms)
    -                  /t_ref 2.0          % absolute refractory period (ms)
    -                  /E_L -65.0          % resting membrane potential (mV)
    -                  /V_th -50.0         % spike threshold (mV)
    -                  /C_m 250.0          % membrane capacitance (pF)
    -                  /V_reset -65.0      % reset potential (mV)
    -              >> def
    -
    -%%% FUNCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% ------------------------------------------------------------------------------------
    -
    -/*
    -    This function defines a logger class used to properly log memory and timing
    -    information from network simulations. It is used by hpc_benchmark.sli to
    -    store the information to the log files.
    -*/
    -
    -/logger
    -<<
    -    /max_rank_cout 5  % copy output to cout for ranks 0..max_rank_cout-1
    -    /max_rank_log 30  % write to log files for ranks 0..max_rank_log-1
    -    /line_counter 0
    -
    -    % constructor
    -    % expects file name on stack
    -    /init
    -    {
    -	Rank max_rank_log lt {
    -
    -            (_) join
    -
    -	    % convert rank to string, prepend 0 if necessary to make
    -            % numbers equally wide for all ranks
    -            Rank cvs
    -            dup length max_rank_log cvs length exch sub
    -            {
    -	      48 prepend   % 48 is ASCII code for 0
    -            }
    -            repeat
    -            join
    -            (.dat) join
    -
    -            % log to the data_path if that is non-empty
    -            GetKernelStatus /data_path get
    -            empty not {
    -                (/) join exch join
    -            }
    -            {
    -                pop
    -            } ifelse
    -
    -            /f exch (w) ofsopen
    -	    {
    -		def
    -	    }
    -	    {
    -		/Logger_init /CannotOpenFile raiseerror
    -	    }
    -	    ifelse
    -
    -	} if
    -    }
    -
    -    % logging function
    -    % expects one operand on stack to write to file
    -    /log
    -    {
    -      /value Set
    -	Rank max_rank_log lt {
    -	    f line_counter <- ( ) <- Rank <- ( ) <- value <- (\n) <- pop
    -	    /line_counter line_counter 1 add def
    -	} if
    -        Rank max_rank_cout lt {
    -            cout Rank <- ( ) <- value <- endl flush pop
    -            cerr Rank <- ( ) <- value <- endl flush pop
    -	} if
    -    }
    -
    -    % closes file
    -    /done
    -    {
    -	Rank max_rank_log lt {
    -	    f close
    -	} if
    -    }
    -
    ->> def
    -
    -% calculates the psc amplitude from the psp amplitude for alpha synapses
    -/derive_psc_parameters
    -{
    -    model_params using
    -
    -    % factors for transforming PSP amplitude to PSC amplitude
    -    /re tau_m tau_syn_ex div def
    -    /de tau_syn_ex tau_m sub def
    -    /ri tau_m tau_syn_in div def
    -    /di tau_syn_in tau_m sub def
    -
    -    /psc_e_over_psp_e 1. 1. C_m div tau_m mul tau_syn_ex mul de div re tau_m de div pow re tau_syn_ex de div pow sub mul div def
    -    /psc_i_over_psp_i 1. 1. C_m div tau_m mul tau_syn_in mul de div ri tau_m di div pow ri tau_syn_in di div pow sub mul div def
    -
    -    /psc_e psc_e_over_psp_e psp_e mul def
    -    /psc_i psc_e_over_psp_e psp_e g mul mul def
    -    /psc_ext psc_e_over_psp_e psp_ext mul def
    -
    -    endusing
    -
    -} def
    -
    -/derive_network_parameters
    -{
    -    /n_neurons_e n_neurons gamma mul cvi def
    -    /n_neurons_i n_neurons n_neurons_e sub def
    -} def
    -
    -% sets kernel configuration and structural plasticity settings
    -/prepare_kernel
    -{
    -    % open log file
    -    log_file logger /init call
    -
    -    ResetKernel
    -    M_ERROR setverbosity
    -
    -    <<
    -        /resolution dt
    -        /total_num_virtual_procs nvp
    -        /overwrite_files overwrite_files
    -        /rng_seed seed
    -      >> SetKernelStatus
    -
    -    EnableStructuralPlasticity
    -
    -    /static_synapse /synapse_ex CopyModel
    -    /synapse_ex << /weight psc_e /delay delay >> SetDefaults
    -    /static_synapse /synapse_in CopyModel
    -    /synapse_in << /weight psc_i /delay delay >> SetDefaults
    -
    -    <<
    -        /structural_plasticity_update_interval sp_update_interval
    -        /structural_plasticity_synapses <<
    -                                            /synapse_ex <<
    -                                                            /synapse_model /synapse_ex
    -                                                            /post_synaptic_element /den_ex
    -                                                            /pre_synaptic_element /axon_ex
    -                                                        >>
    -                                            /synapse_in <<
    -                                                            /synapse_model /synapse_in
    -                                                            /post_synaptic_element /den_in
    -                                                            /pre_synaptic_element /axon_in
    -                                                        >>
    -                                        >>
    -    >> SetKernelStatus
    -
    -} def
    -
    -% create neurons
    -/create_nodes
    -{
    -    /iaf_psc_alpha n_neurons_e <<
    -                                   /synaptic_elements <<
    -                                                          /den_ex growth_curve_e_e
    -                                                          /den_in growth_curve_e_i
    -                                                          /axon_ex growth_curve_e_e
    -                                                      >>
    -                               >> Create /neurons_e Set
    -
    -    /iaf_psc_alpha n_neurons_i <<
    -                                   /synaptic_elements <<
    -                                                          /den_ex growth_curve_i_e
    -                                                          /den_in growth_curve_i_i
    -                                                          /axon_in growth_curve_i_i
    -                                                      >>
    -                               >> Create /neurons_i Set
    -} def
    -
    -% connects simulation and recording devices
    -/connect_stim_and_recording
    -{
    -    /poisson_generator 1 << /rate bg_rate >> Create /noise Set
    -    noise neurons_e << /rule /all_to_all >> << /weight psc_ext /delay delay >> Connect
    -    noise neurons_i << /rule /all_to_all >> << /weight psc_ext /delay delay >> Connect
    -
    -    record_spikes {
    -        /spike_recorder << /record_to /ascii >> Create /spike_recorder Set
    -        neurons_e spike_recorder Connect
    -        neurons_i spike_recorder Connect
    -    } if
    -} def
    -
    -% records the current Ca concentration for excitatory and inhibitory neurons
    -/record_local_ca_concentration
    -{
    -    /t Set
    -    % get Ca concentration for all local excitatory neurons
    -    /ca_e 0. def
    -    neurons_e LocalOnly {
    -        /Ca get ca_e add /ca_e Set
    -    } forall
    -
    -    % get Ca concentration for all local inhibitory neurons
    -    /ca_i 0. def
    -    neurons_i LocalOnly {
    -        /Ca get ca_i add /ca_i Set
    -    } forall
    -
    -    t cvs ( ) join ca_e cvs join ( # Ca concentration ex) join logger /log call
    -    t cvs ( ) join ca_i cvs join ( # Ca concentration in) join logger /log call
    -} def
    -
    -% records the current number of axonal synaptic elements for excitatory and inhibitory neurons
    -/record_local_number_of_axons
    -{
    -    /t Set
    -    % get synaptic elements from all local excitatory neurons
    -    /syn_e 0 def
    -    neurons_e LocalOnly {
    -        /synaptic_elements get /axon_ex get /z_connected get syn_e add /syn_e Set
    -    } forall
    -
    -    % get synaptic elements from all local inhibitory neurons
    -    /syn_i 0 def
    -    neurons_i LocalOnly {
    -        /synaptic_elements get /axon_in get /z_connected get syn_i add /syn_i Set
    -    } forall
    -
    -    t cvs ( ) join syn_e cvs join ( # axon count ex) join logger /log call
    -    t cvs ( ) join syn_i cvs join ( # axon count in) join logger /log call
    -} def
    -
    -% records the total number of spikes generated locally
    -/record_local_number_of_spikes
    -{
    -    /t Set
    -    t cvs ( ) join GetKernelStatus /local_spike_counter get cvs join ( # local spike count) join logger /log call
    -} def
    -
    -%%% SIMULATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -derive_psc_parameters
    -derive_network_parameters
    -
    -prepare_kernel
    -create_nodes
    -connect_stim_and_recording
    -
    -/runtime 0. def % keeps track of simulation time
    -
    -% simulate for a short time to separate initial transients
    -tic
    -presimtime Simulate
    -toc /presim_duration Set
    -runtime presimtime add /runtime Set
    -runtime cvs ( ) join presim_duration cvs join ( # presim_time) join logger /log call
    -
    -% simulate in multiple steps to allow for recording of network status at particular intervals
    -/sim_duration 0. def % keeps track of wallclock time
    -{
    -    tic
    -    sp_record_interval Simulate
    -    toc sim_duration add /sim_duration Set
    -    runtime sp_record_interval add /runtime Set
    -    runtime cvs ( ) join sim_duration cvs join ( # sim_time) join logger /log call
    -
    -    runtime record_local_ca_concentration
    -    runtime record_local_number_of_axons
    -    runtime record_local_number_of_spikes
    -
    -    runtime sp_record_interval add simtime gt {
    -        exit
    -    } if
    -} loop
    diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
    deleted file mode 100644
    index 8a2ecaf525..0000000000
    --- a/lib/CMakeLists.txt
    +++ /dev/null
    @@ -1,21 +0,0 @@
    -# lib/CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -install( DIRECTORY sli
    -    DESTINATION ${CMAKE_INSTALL_DATADIR}
    -    )
    diff --git a/lib/README.md b/lib/README.md
    deleted file mode 100644
    index 9449493a2d..0000000000
    --- a/lib/README.md
    +++ /dev/null
    @@ -1,3 +0,0 @@
    -# `lib` folder
    -
    -The library files for SLI and NEST. This includes the startup-files and SLI-wrappers for built-in functions.
    diff --git a/lib/sli/FormattedIO.sli b/lib/sli/FormattedIO.sli
    deleted file mode 100644
    index 92a279ae5a..0000000000
    --- a/lib/sli/FormattedIO.sli
    +++ /dev/null
    @@ -1,327 +0,0 @@
    -/*
    - *  FormattedIO.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -%%
    -%% High-level input output fascilities for sli
    -%%
    -
    -%% this file must be run AFTER typeinit and mathematica
    -
    -%% The i/o facilities model those of Mathematica.
    -%%
    -
    -/** @BeginDocumentation 
    -Name: ReadModes - dictionary with type specifiers for read functions
    -Description:
    -The following read modes are available:
    -
    -    /Number   - read a number (as double)
    -    /Word     - read a whitespace separated string
    -    /Double   - read a double
    -    /Integer  - read an integer
    -    /String   - read a newline separated line
    -
    -Author: Marc-Oliver Gewaltig
    -FirstVersion: Jun 17 2000
    -*/
    -/ReadModes
    -  <<
    -    /Number    /ReadDouble load
    -    /Word      /ReadWord   load
    -    /Double    /ReadDouble load
    -    /Integer   /ReadInt    load
    -    /String    /getline    load
    -   >> 
    -def
    -
    -/ArrayQ trie [/arraytype] true  addtotrie
    -             [/anytype]   false addtotrie
    -def
    -
    -/LiteralQ trie [/literaltype] true  addtotrie
    -               [/anytype]   false   addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: Read - read an object of a certain type from a stream
    -Synopsis: istream [type] Read -> istream [result] true
    -                              -> istream false
    -Example: cin [/Number] Read -> cin [1]
    -Description:
    -Author: Marc-Oliver Gewaltig
    -FirstVersion: Jun 17 2000
    -*/
    -
    -/Read
    -[/istreamtype /arraytype]
    -{
    -  mark
    -  3 1 roll
    -  ReadModes begin
    -    {
    -      LiteralQ {cvn} if
    -      exec
    -      {
    -	exch
    -      } if
    -    } forall
    -    counttomark 1 add 1 roll
    -    counttomark arraystore
    -    exch pop    % remove mark
    -  end
    -  size 0 gt {true} {pop false} ifelse
    -} def
    -
    -/** @BeginDocumentation
    -Name: ReadList - read a list of specified format from a stream
    -Synopsis: istream [types] ReadList -> [result]
    -Parameters: istream : an input stream
    -            [types] : an array with one or more of the following type specifiers:
    -                      Number - specifies a real number
    -                      Double - specifies a real number
    -                      Integer- specifies an integer
    -                      Word   - a white space separated string
    -                      String - a text line terminated with a newline character
    - 
    -Description: ReadList reads the rest of a file into an array. If [types] contains
    -             more than one type specifier, the array is constructed from subarray with
    -             elements of the types, specified by  [types].
    -
    - 	     ReadList tries to allocate the result array in advance. The option
    -	     BufferSize can be specified to optimize this behaviour.
    -
    -             The valid type specifiers are defined in the ReadModes dictionary.              
    -         
    -Examples: istream [/Number /Number] ReadList -> [[1 2] [3 4] ...]
    -          istream [/Number] ReadList -> [1 2 3 4 ...] 
    - 
    -References: ReadList approximates the Mathematica function.
    -Author: Marc-Oliver Gewaltig
    -FirstVersion: Jun 17 2000
    -SeeAlso: Read, ReadModes, Export
    -*/
    -
    -/ReadList
    -<< /BufferSize 1000 >> 
    -Options
    -
    -/ReadList
    -[/istreamtype /arraytype]
    -{
    -  {cvn} Map % Convert all literals to names, 
    -  << >> begin
    -  [] /ReadList /BufferSize GetOption reserve_a
    -  %istream [result] array
    -  exch_
    -  size_a 1 eq
    -  {
    -    %istream [result] array
    -    cvx /read Set
    -    exch_
    -    % [result] istream
    -    ReadModes begin
    -    {
    -      read % call the read handler
    -      {
    -        % [] istream obj
    -        3 -1 roll exch_
    -        append_a
    -        exch_
    -      }
    -      {
    -        exit
    -      } ifelse_
    -    } loop
    -    pop_
    -    end
    -  }
    -  {
    -    %istream [] array
    -    /types Set
    -    exch_
    -    {
    -      types Read
    -      {
    -        % [] istream [result] 
    -        3 -1 roll exch_
    -        append_a
    -        exch_
    -      }
    -      {
    -        exit
    -      } ifelse_
    -    } loop
    -    pop_
    -  } ifelse_
    -  end
    -} def
    -
    -/** @BeginDocumentation
    -Name: SaveDictionary - Save contents of a dictionary to a file.
    -Synopsis: dict (fname) SaveDictionary -> -
    -Description: SaveDictionary tries to save the contents of the dicitonary
    - to a file. For this, it reproduces the input syntax of the dictionary.
    - Thus, the resulting file is a readable ASCII-file. 
    - 
    - SaveDictionary only processes those definitions which have a
    - keyboard input form. Currently, the following types are saved
    -   - integertype
    -   - doubletype
    -   - stringtype
    -   - arraytype
    -SeeAlso: RestoreDictionary, MergeDictionary
    -*/
    -
    -/SaveDictionary
    -[/dictionarytype /stringtype]
    -{
    -  (w) file %
    -  exch
    -  cva 2 2 Partition
    -  {
    -    arrayload pop
    -    :out
    -  } forall
    -  close
    -} def
    -
    -/_:out
    -{
    -    rollu
    -    cvlit <--
    -    ( ) <-
    -    exch <--
    -    ( def \n) <-
    -} def
    -  
    -/:out [/ostreamtype /nametype /anytype] {2 npop} def
    -/:out [/ostreamtype /nametype /doubletype] 
    -{
    -    rollu
    -    cvlit <--
    -    ( ) <-
    -    showpoint exch <-
    -    ( def \n) <-
    -} def
    -
    -/:out [/ostreamtype /nametype /integertype] 
    -/_:out load def
    -
    -/:out [/ostreamtype /nametype /stringtype]
    -/_:out load def
    -
    -/:out [/ostreamtype /nametype /arraytype] 
    -/_:out load def
    -
    -%/:out [/ostreamtype /nametype /proceduretype] 
    -%/_:out load def
    -
    -/** @BeginDocumentation
    -Name: MergeDictionary - Merge all definitions of a dictionary with the current dicitonary.
    -Synopsis: dict MergeDictionary -> -
    -SeeAlso: SaveDictionary, RestoreDictionary
    -*/
    -/MergeDictionary
    -[/dictionarytype]
    -{
    -  cva 2 2 Partition
    -  {
    -    arrayload pop
    -    def
    -  } forall
    -} def
    -
    -/** @BeginDocumentation
    -Name: RestoreDictionary - Read a dictionary definition from a file.
    -Synopsis: (fname) RestoreDictionary -> dict
    -SeeAlso: SaveDictionary, MergeDictionary
    -*/
    -/RestoreDictionary [/stringtype]
    -{
    -  << >> begin
    -  (r) file
    -  cvx exec
    -  currentdict 
    -  end
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: Export - save in a foreign file format 
    -Synopsis: 
    -(fname) any         Export -> 
    -(fname) any literal Export ->
    -Examples:    
    -(spike.gdf) [ [1 121] [2 127] ]         Export --> 
    -(hello.dat) [ [3 121 4.3] [9 127 4.2] ] Export --> 
    -Description:
    -The currently supported formats are GDF (.gdf) and Table (.dat), 
    -only the first argument style is currently supported. 
    -Export raises an /UnknownExportFormat error if an unsupported
    -output format is requested.
    -Author: Diesmann
    -FirstVersion: 10.5.2001
    -Remarks: 
    -The Mathematica implementation is much more general.
    -Mathematica does not support GDF. 
    -References:
    -   [1] The Mathematica Book "Export"
    -SeeAlso: ReadList
    -*/
    -/Export
    -{
    - % filename array
    - exch
    - dup
    - (.) breakup Last
    - % array filename (gdf)
    - [(gdf) (dat)] exch  MemberQ   
    - not
    - {exch /Export /UnknownExportFormat raiseerror} if 
    - % array filename
    - (w) file
    - exch
    - % file array 
    - {
    -  dup  
    -  [1 -2] Take 
    -  exch
    -  Last
    -  rollu
    -  {
    -   <- (\t) <-
    -  }
    -  forall
    -  exch <- endl 
    - }
    - forall
    - closeostream
    -} def
    -
    -
    -
    -
    -
    -
    -
    -
    -
    diff --git a/lib/sli/arraylib.sli b/lib/sli/arraylib.sli
    deleted file mode 100644
    index 9b5b34853d..0000000000
    --- a/lib/sli/arraylib.sli
    +++ /dev/null
    @@ -1,877 +0,0 @@
    -/*
    - *  arraylib.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* 
    -    A library of SLI-routines operating on arrays
    -
    -    Authors:
    -    R Kupper
    -    M-O Gewaltig
    -*/
    -
    -/arraylib namespace
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: arraylib::Sum - Return sum of the elements in array.
    -
    -Synopsis: [array] Sum -> number
    -
    -Description:
    -Returns the sum of all elements in the array. The array is expected
    -  to contain only numbers, and is flattened before the computation.
    -
    -Parameters:
    -[array]: array of numbers
    -
    -Examples:
    -[1 2 3 4]   Sum -> 10
    -[1 2 3 4.0] Sum -> 10.0
    -
    -Author: R Kupper
    -
    -FirstVersion: 17-sep-2007
    -
    -Remarks:
    -The array must contain no other elements than numbers.
    -The return type (integer or double) depends on the type of elements.
    -
    -Availability: library "arraylib"
    -
    -SeeAlso: arraylib::Product, arraylib::Mean, arraylib::SDev, arraylib::Var
    -*/
    -
    -/Sum[/arraytype]
    -{
    -  Flatten arrayload 1 sub {add} repeat
    -} bind def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: arraylib::Product - Return product of the elements in array.
    -
    -Synopsis: [array] Product -> number
    -
    -Description:
    -Returns the product of all elements in the array. The array is expected
    -  to contain only numbers, and is flattened before the computation.
    -
    -Parameters:
    -[array]: array of numbers
    -
    -Examples:
    -[1 2 3 4]   Product -> 24
    -[1 2 3 4.0] Product -> 24.0
    -
    -Author: R Kupper
    -
    -FirstVersion: 17-sep-2007
    -
    -Remarks:
    -The array must contain no other elements than numbers.
    -The return type (integer or double) depends on the type of elements.
    -
    -Availability: library "arraylib"
    -
    -SeeAlso: arraylib::Sum, arraylib::Mean, arraylib::SDev, arraylib::Var
    -*/
    -
    -/Product[/arraytype]
    -{
    -  Flatten arrayload 1 sub {mul} repeat
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: arraylib::Mean - Return mean of the elements in array.
    -
    -Synopsis: [array] Mean -> number
    -
    -Description:
    -Returns the sum of all elements in the array. The array is expected
    -  to contain only numbers, and is flattened before the computation.
    -
    -Parameters:
    -[array]: array of numbers
    -
    -Examples:
    -[1 2 3 4] Mean -> 2.5
    -
    -Author: R Kupper
    -
    -FirstVersion: 17-sep-2007
    -
    -Remarks:
    -The array must contain no other elements than numbers.
    -The return type is always double.
    -
    -Availability: library "arraylib"
    -
    -SeeAlso: arraylib::Product, arraylib::Sum, arraylib::SDev, arraylib::Var
    -*/
    -
    -/Mean[/arraytype]
    -{
    -  Flatten size exch
    -  arrayload 1 sub {add} repeat
    -  cvd
    -  exch div  
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: arraylib::Var - Return variance of the elements in array.
    -
    -Synopsis: [array] Var -> number
    -
    -Description:
    -Returns the variance of all elements in the array. The array is expected
    -  to contain only numbers, and is flattened before the computation.
    -
    -Parameters:
    -[array]: array of numbers
    -
    -Examples:
    -[0 1 2]   Var -> 1.0
    -[1 2 3 4] Var -> 1.666667
    -
    -Author: R Kupper
    -
    -FirstVersion: 17-sep-2007
    -
    -Remarks:
    -The array must contain no other elements than numbers.
    -The return type is always double.
    -
    -Availability: library "arraylib"
    -
    -SeeAlso: arraylib::Product, arraylib::Sum, arraylib::Mean, arraylib::SDev
    -*/
    -
    -/Var[/arraytype]
    -{
    -  Flatten
    -  size exch
    -  
    -  dup Mean sub
    -  {sqr} Map Sum
    -
    -  exch 1 sub div
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: arraylib::SDev - Return standard deviation of the elements in array.
    -
    -Synopsis: [array] SDev -> number
    -
    -Description:
    -Returns the standard deviation of all elements in the array. The array is expected
    -  to contain only numbers, and is flattened before the computation.
    -
    -Parameters:
    -[array]: array of numbers
    -
    -Examples:
    -[1 2 3 4] SDev -> 
    -
    -Author: R Kupper
    -
    -FirstVersion: 17-sep-2007
    -
    -Remarks:
    -The array must contain no other elements than numbers.
    -The return type is always double.
    -
    -Availability: library "arraylib"
    -
    -SeeAlso: arraylib::Product, arraylib::Sum, arraylib::Mean, arraylib::Var
    -*/
    -
    -/SDev[/arraytype]
    -{
    -  Var sqrt
    -} bind def
    -
    -
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: arraylib::Reform - Reform the dimensions of a hyperrectengular array
    -
    -Synopsis: [array] [dim1 dim2 ... dimn] Reform -> [reformedArray]
    -
    -Description:
    -"Reform" changes the dimensionality i.e. the nesting of an array. The
    -result is a hyperrectangular array of the given dimensions. The order
    -of elements is not changed.
    -
    -"Reform" relates to "Dimensions" in the following way:
    -Given a hyperrectangular array [a] of "Dimensions" [d], these
    -statements are true:
    -
    -a           d Reform -> a
    -a Flatten   d Reform -> a
    -a dv Reform d Reform -> a, for any valid dimension vector [dv]
    -
    -Diagnostics:
    -If the new dimensionality is not consistent with the numer of elements
    -in the array, /RangeCheck is raised.
    -
    -Availability:
    -"Namespace"-dictionary "arraylib".
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 10.3.2003
    -
    -Remarks:
    -The new dimensionality must not change the number of elements in the
    -whole array, that is, dim1*...*dimn must equal the number of the
    -flattened source array.
    -
    -References:
    -This routine is inspired by IDL's REFORM() routine.
    -
    -SeeAlso: Dimensions, TensorRank, Flatten
    -*/
    -
    -
    -/Reform [/arraytype /arraytype]
    -{
    -  %stack:  [array] [dim1 dim2 ... dimn]
    -  
    -  % first do consistency check:
    -  dup Times
    -  %stack:  [array]  [dim1 dim2 ... dimn] product 
    -  2 pick Flatten size
    -  %stack:  [array]  [dim1 dim2 ... dimn] product [flatarray] size
    -  rolld neq
    -  {
    -    %stack:  [array]  [dim1 dim2 ... dimn] [flatarray]    
    -    M_ERROR (Reform) (New dimensions must not change the number of elements in the array.) message
    -    pop
    -    %stack:  [array]  [dim1 dim2 ... dimn]
    -    /Reform /RangeCheck raiseerror
    -  } if
    -  %stack:  [array]  [dim1 dim2 ... dimn] [flatarray]
    -  rolld pop exch  
    -  %stack:  [flatarray] [dim1 dim2 ... dimn]
    -  % having passed this check, we can discard the first (redundant) dimension:
    -  Rest  
    -  %stack:  [flatarray]  [dim2 ... dimn]  
    -  reverse {Partition} Fold
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: arraylib::getdeep - get an element from a nested container (array, dict, ...).
    -
    -Synopsis:
    -(general form:)
    -nested_container index_array getdeep -> element
    -
    -(specific forms:)
    -[nested_array]        [i1 i2 ... in]    getdeep -> element
    -{nested_procedure}    [i1 i2 ... in]    getdeep -> element
    -{nested_litprocedure} [i1 i2 ... in]    getdeep -> element
    -<<nested_dictionary>> [/n1 /n2 ... /nn] getdeep -> element
    -
    -Description:
    -"Getdeep" resolves to a repeated call to "get". That is, it retrieves
    -a single element from a nested array. The call iterates as deep into
    -the nested structure as is indicated by the number of elements in the
    -index array.
    -In short: The call "a [i1 i2 ... in] getdeep" is identical to
    -"a i1 get i2 get ... in get".
    -
    -Parameters:
    -"Getdeep" can be used on all containers that "get" can be used on.
    -Since strings cannot be nested, it does not make much sense for
    -strings, though.
    -The first argument is a (probably nested) container.
    -The second argument is a flat index array. For all array type containers,
    -this must be an array of integers. For nested dictionaries, this must
    -be an array of literals.
    - The call iterates as deep into
    -the nested structure as is indicated by the number of elements in the
    -index array.
    -
    -Examples:
    -[[1 2 3] [4 5 6] [7 8 9]] [0 2]   getdeep -> 3
    -[[1 2 3] [4 5 6] [7 8 9]] [1]     getdeep -> [4 5 6]
    -<< /a << /b 1  /c 2 >> >> [/a /c] getdeep -> 2
    -
    -Diagnostics:
    -The number of elements in the index array must not exceed the number
    -of nested levels in the container. Otherwise, the nested call to get will
    -raise /ArgumentType.
    -
    -The elements in the index array must be suited to index the container.
    -Otherwise, the nested call to get will raise /ArgumentType.
    -
    -For array containers, the index at position i must be smaller than the
    -number of elements at level i in the container. Otherwise, the nested
    -call to get will raise /RangeCheck.
    -
    -Author: R Kupper
    -
    -FirstVersion: 19-jun-2006
    -
    -Remarks:
    -There currently is no "putdeep" command, but this functionality is
    -provided by "put". See discussion thread on the nest developer list
    -from 19-jun-2006.
    -
    -Availability: library "arraylib"
    -
    -SeeAlso: put, get, Dimensions
    -*/
    -
    -/getdeep[/anytype /arraytype]
    -{
    -  {get} forall
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: arraylib::EdgeTruncate - Truncate 2-d array indices at array edges
    -
    -Synopsis: [2d-indices] height width EdgeTruncate -> [truncated-2d-indices]
    -
    -Description:
    -This function iterates through the given array indices and checks if
    -they lie inside the bounds [0,height) and [0,width), respectively.
    -
    -Indices are modified according to the following rules:
    -
    -1. If both indices lie inside [0,height) and [0,width), respectively,
    -   they are left untouched.
    -2. If either the row index lies outside [0,height), or the column
    -   index lies outside [0,width), the respective index is replaced by "false".
    -
    -Note that by NEST convention, for index pairs, the first index denotes
    -the row, and the second index denotes the column.
    -
    -Dimensions of the index array are preserved.
    -
    -Diagnostics:
    -The index array is expected to be a (nested) array of integer values
    -only. Code will break otherwise.
    -
    -Availability:
    -"Namespace"-dictionary "arraylib".
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 17.3.2003
    -
    -Remarks:
    -The index array is expected to be a (nested) array of integer values only.
    -
    -SeeAlso: arraylib::EdgeWrap, arraylib::EdgeClip, area2
    -
    -*/
    -
    -/EdgeTruncate [/arraytype /integertype /integertype]
    -{
    -  %stack:    [2d-indices] height width
    -  2 arraystore
    -  %stack:    [2d-indices] [height width]
    -
    -  % we store array dimensions before operation and restore it afterwards:  
    -  exch dup Dimensions rollu
    -  
    -  %stack: [Dimensions] [height width] [2d-indices] 
    -
    -  Flatten 2 Partition
    -  %stack: [Dimensions] [height width] [[y1 x1] [y2 x2] ... [yn xn]]
    -
    -
    -  { 
    -    %entry stack: [height width] [yi xi] 
    -    1 pick  2 arraystore
    -    %stack: [height width] [ [yi xi] [height width] ]
    -
    -    {
    -      %entry stack: index maxvalue
    -      1 pick rollu
    -      %stack: index index maxvalue 
    -      geq_ii
    -      {
    -        pop
    -        false        
    -      }
    -      {
    -        %stack: index
    -        dup 0 lt_ii
    -        {
    -          pop
    -          false
    -        } if
    -      } ifelse
    -      %exit stack:  truncated_index      
    -    } MapThread
    -
    -    %exit stack :  [height width] [yi_truncated xi_truncated]
    -  } Map
    -    
    -  %stack: [Dimensions] [height width] [[y1_truncated x1_truncated] [y2_truncated x2_truncated] ... [yn_truncated xn_truncated]]
    -  rolld Reform 
    -  %stack: [height width] [truncated-2d-indices-in-right-dimensions]
    -  exch pop
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: arraylib::EdgeClip - Clip 2-d array indices at array edges
    -
    -Synopsis: [2d-indices] height width EdgeClip -> [clipped-2d-indices]
    -
    -Description: 
    -This function iterates through the given array indices and checks if
    -they lie inside the specified range [0,height) and [0,width),
    -respectively.
    -
    -Indices are modified according to the following rules:
    -
    -1. If both indices lie inside [0,height) and [0,width), respectively,
    -   they are left untouched.
    -2. If the row    index lies below 0, this index is replaced by 0.
    -3. If the row    index lies above "height", this index is replaced by "height".
    -4. If the column index lies below 0, this index is replaced by 0.
    -5. If the column index lies above "width",  this index is replaced by "width".
    -
    -Thus, the indices are effectively hard clipped to the array bounds;
    -that is, to the range [0,height), [0,width) respectively.
    -
    -Note that by NEST convention, for index pairs, the first index denotes
    -the row, and the second index denotes the column.
    -
    -Dimensions of the index array are preserved.
    -
    -Diagnostics:
    -The index array is expected to be a (nested) array of integer values
    -only. Code will break otherwise.
    -
    -Availability:
    -"Namespace"-dictionary "arraylib".
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 17.3.2003
    -
    -Remarks:
    -The index array is expected to be a (nested) array of integer values only.
    -
    -SeeAlso: arraylib::EdgeWrap, arraylib::EdgeTruncate, area2
    -
    -*/
    -
    -/EdgeClip [/arraytype /integertype /integertype]
    -{
    -  %stack:    [2d-indices] height width
    -  2 arraystore
    -  %stack:    [2d-indices] [height width]
    -  {1 sub_ii} Map  
    -  %stack:    [2d-indices] [height-1 width-1]
    -
    -  % we store array dimensions before operation and restore it afterwards:  
    -  exch dup Dimensions rollu
    -  
    -  %stack: [Dimensions] [height-1 width-1] [2d-indices] 
    -
    -  Flatten 2 Partition
    -  %stack: [Dimensions] [height-1 width-1] [[y1 x1] [y2 x2] ... [yn xn]]
    -
    -
    -  { 
    -    %entry stack: [height-1 width-1] [yi xi] 
    -    1 pick  2 arraystore
    -    %stack: [height-1 width-1] [ [yi xi] [height-1 width-1] ]
    -
    -    {
    -      %entry stack: index maxvalue
    -      min_i_i
    -      0 max_i_i
    -      %exit stack:  clipped_index      
    -    } MapThread
    -
    -    %exit stack :  [height-1 width-1] [yi_clipped xi_clipped]
    -  } Map
    -    
    -  %stack: [Dimensions] [height-1 width-1] [[y1_clipped x1_clipped] [y2_clipped x2_clipped] ... [yn_clipped xn_clipped]]
    -  rolld Reform 
    -  %stack: [height-1 width-1] [clipped-2d-indices-in-right-dimensions]
    -  exch pop
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: arraylib::EdgeWrap - Wrap 2-d array indices around edges (toriodal)
    -
    -Synopsis: [2d-indices] height width EdgeWrap -> [wrapped-2d-indices]
    -
    -Description: 
    -This function iterates through the given array indices and checks if
    -they lie inside the specified range [0,height) and [0,width),
    -respectively.
    -
    -Indices are modified according to the following rules:
    -
    -1. If both indices lie inside [0,height) and [0,width), respectively,
    -   they are left untouched.
    -2. If the row    index lies outside [0,height) it is cyclicly wrapped
    -   around. That is, a suitable multiple of "height" is added or
    -   substracted, that makes the index fall inside [0,height).
    -3. If the column index lies outside [0,width) it is cyclicly wrapped
    -   around. That is, a suitable multiple of "width" is added or
    -   substracted, that makes the index fall inside [0,width).
    -
    -Thus, the indices are effectively wrapped around the array edges;
    -that is, they are mapped onto a torus of dimensions height,width.
    -
    -Note that by NEST convention, for index pairs, the first index denotes
    -the row, and the second index denotes the column.
    -
    -Dimensions of the index array are preserved.
    -
    -Diagnostics:
    -The index array is expected to be a (nested) array of integer values
    -only. Code will break otherwise.
    -
    -Availability:
    -"Namespace"-dictionary "arraylib".
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 14.3.2003 (Einstein's birthday)
    -
    -Remarks:
    -The index array is expected to be a (nested) array of integer values only.
    -
    -SeeAlso: arraylib::IndexWrap, arraylib::EdgeTruncate, arraylib::EdgeClip, area2
    -
    -*/
    -
    -/EdgeWrap [/arraytype /integertype /integertype]
    -{
    -  %stack:    [2d-indices] height width
    -  2 arraystore
    -  %stack:    [2d-indices] [height width]
    -    
    -  % we store array dimensions before operation and restore it afterwards:  
    -  exch dup Dimensions rollu
    -  
    -  %stack: [Dimensions] [height width] [2d-indices] 
    -
    -  Flatten 2 Partition
    -  %stack: [Dimensions] [height width] [[y1 x1] [y2 x2] ... [yn xn]]
    -
    -
    -  { 
    -    %entry stack: [height width] [yi xi] 
    -    1 pick  2 arraystore
    -    %stack: [height width] [ [yi xi] [height width] ]
    -
    -    {
    -      %entry stack: index maxvalue
    -      IndexWrap_i_i
    -      %exit stack:  wrapped_index      
    -    } MapThread
    -
    -    %exit stack :  [height width] [yi_wrapped xi_wrapped]
    -  } Map
    -    
    -  %stack: [Dimensions] [height width] [[y1_wrapped x1_wrapped] [y2_wrapped x2_wrapped] ... [yn_wrapped xn_wrapped]]
    -  rolld Reform 
    -  %stack: [height width] [wrapped-2d-indices-in-right-dimensions]
    -  exch pop
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: arraylib::IndexWrap - project a cyclic index value onto interval [0,N).
    -
    -Synopsis:  index N CyclicValue -> normindex
    -
    -Description: 
    -  "IndexWrap" projects a cyclic integer index in the range (-oo,oo),
    -  of periodicy N, onto its norm interval [0,N).
    -    
    -  This function can be used to "wrap around" array indices in order to
    -  index an array
    -
    -  Alternatives: Function IndexWrap_i_i (undocumented) -> behaviour and
    -  synopsis are the same, except that no warnings or error messages are
    -  thrown.
    -
    -Parameters: 
    -  In : index: integer value in (-oo,oo).
    -
    -       N: Peroidicity of the cyclic index.
    -          "index" is projected on the half-open interval [0,N).
    -          N must be positive (and different from 0).
    -
    -  Out: The cyclic equivalent of the given index, regarding period N.
    -
    -Diagnostics:
    -  N must be positive (and different from 0). If N <= 0, /RangeCheck is raised.
    -  Note that the variant IndexWrap_i_i does not do this check for
    -  efficiency, and will break or yield invalid results in this case.
    -
    -Examples:
    -  -6 3 IndexWrap   -> 0        
    -  -5 3 IndexWrap   -> 1         
    -  -4 3 IndexWrap   -> 2        
    -  -3 3 IndexWrap   -> 0         
    -  -2 3 IndexWrap   -> 1         
    -  -1 3 IndexWrap   -> 2         
    -   0 3 IndexWrap   -> 0         
    -   1 3 IndexWrap   -> 1        
    -   2 3 IndexWrap   -> 2         
    -   3 3 IndexWrap   -> 0         
    -   4 3 IndexWrap   -> 1         
    -   5 3 IndexWrap   -> 2         
    -   6 3 IndexWrap   -> 0         
    -
    -Availability:
    -"Namespace"-dictionary "arraylib".
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 14.2.2003 (Einstein's birthday)
    -
    -Remarks: 
    -  This function behaves like Mathematica's Mod function (which is
    -  different from the mathematical definition of MOD).
    -
    -SeeAlso: arraylib::EdgeWrap, mod, CyclicValue
    -*/
    -
    -/IndexWrap_i_i
    -{
    -  %stack:  index N
    -  % index might be negative, so we add a suitable multiple of N:
    -  % posindex = index + (abs(index)/N + 1)*N  with integer div.  
    -
    -  exch 1 pick 1 pick abs_i 1 pick
    -  %stack:  N index N abs(index) N
    -  div_ii 1 add_ii mul_ii add_ii
    -  %stack:  N posindex
    -  % now that we know everything is positive, we can use mod:
    -  exch_ mod
    -} bind def
    -            
    -/IndexWrap [/integertype /integertype]
    -{
    -  dup_ 0 gt_ii 
    -  {
    -    IndexWrap_i_i
    -  }
    -  {
    -    M_ERROR (IndexWrap) (Period N must be positive (and different from 0).) message
    -    /IndexWrap /RangeCheck raiseerror
    -  }ifelse
    -} bind def  
    -
    -
    -/** @BeginDocumentation
    -Name: arraylib::GaborPatch - Return a two-dimensional array with Gabor function.
    -Synopsis:
    -nrows ncols GaborPatch -> [[] .. []]
    -Parameters: 
    -nrows: number of rows of the result matrix.
    -ncols: number of columns of the result matrix.
    -
    -Description:
    -This function returns a matrix of nrows by ncols, with the amplitudes
    -of a Gabor function, computed over the range of [x_min,x_max] by [y_min,y_max].
    -These and other parameters can be set by changing the function's options.
    -
    -An orientation of 0 RAD results in a vertically oriented Gabor.
    -An orientation of Pi/2 results in an horizontally oriented Gabor.
    -Angles are measured counter clockwise from the positive x-axis.
    -
    -The implementation follows the description given by 
    -N. Petkov and R. Kruizinga Biol.Cybern. 76, 83-97 (1997).
    -
    -Note that GaborPatch automatically performs a coordinate transformation
    -from the mathematical x-y plane to the matrix row-column system. 
    -
    -Options:
    -Options which determine the argument range of the Gabor patch.
    -
    -x_min     doubletype  - smallest x coordinate value  [-2Pi]
    -x_max     doubletype  - largest  x coordinate value. [ 2Pi]
    -y_min     doubletype  - smallest y coordinate value. [-2Pi]
    -y_max     doubletype  - largest  y coordinate value. [ 2Pi]
    -
    -Options which determine the Gabor function:
    -
    -lambda      doubletype  - Wavelength of the Gabor in RAD. [ 2Pi]  
    -phase       doubletype  - Phase of the Gabor in RAD.      [ 0.0]
    -orientation doubletype  - Rotation of the Gabor in RAD    [ 0.0]
    -sigma       doubletype  - Width of the Gaussian envelope. [ Pi]
    -gamma       doubletype  - Spatial aspect ratio.           [ 1.0]
    -
    -The options correspond to the status dictionary entries of the
    -gabor_device. Thus, it is possible to use the option dictionary
    -of the GaborPatch to set the properties of a gabor device.
    -
    -Author: Marc-Oliver Gewaltig
    -References: Petkov N and Kruizinga P: Biol. Cybern. 76, 83-96 (1997)
    -SeeAlso: gabor_
    -*/
    -/GaborPatch
    -[/integertype /integertype]
    -{
    -  /arraylib::GaborPatch GetOptions
    -  begin
    -   x_min x_max
    -   y_min y_max 
    -   lambda orientation phase sigma gamma
    -  end
    -  gabor_ 
    -} def
    -
    -
    -%% initialization values correspond to those of the NEST
    -%% gabor_generator device (see file synod2/nest/gabor.cpp).
    -/arraylib::GaborPatch
    -<<
    -  /x_min -2.0 Pi mul
    -  /x_max  2.0 Pi mul
    -  /y_min -2.0 Pi mul
    -  /y_max  2.0 Pi mul
    -  /lambda 2.0 Pi mul
    -  /orientation 0.0
    -  /phase 0.0
    -  /sigma Pi
    -  /gamma 1.0
    ->> Options
    -
    -/** @BeginDocumentation
    -Name: arraylib::GaussPatch - Return a two-dimensional array with Gauss function.
    -Synopsis:
    -nrows ncols GaussPatch -> [[] .. []]
    -Parameters: 
    -nrows: number of rows of the result matrix.
    -ncols: number of columns of the result matrix.
    -
    -Description:
    -This function returns a matrix of nrows by ncols, with the amplitudes
    -of a two dimensional Gauss function, computed over the range of 
    -[x_min,x_max] by [y_min,y_max].
    -These and other parameters can be set by changing the function's options.
    -
    -If the aspect ratio gamma < 1, an orientation of 0 RAD results in 
    -a vertically oriented eliptic Gauss .
    -Angles are measured counter clockwise from the positive x-axis.
    -
    -Note that GaussPatch automatically performs a coordinate transformation
    -from the mathematical x-y plane to the matrix row-column system. 
    -
    -Options:
    -Options which determine the argument range of the Gauss patch.
    -
    -x_min     doubletype  - smallest x coordinate value  [-3.0]
    -x_max     doubletype  - largest  x coordinate value. [ 3.0]
    -y_min     doubletype  - smallest y coordinate value. [-3.0]
    -y_max     doubletype  - largest  y coordinate value. [ 3.0]
    -
    -Options which determine the Gaussian function:
    -
    -orientation doubletype  - Rotation of the Gaussian in RAD [ 0.0]
    -sigma       doubletype  - Width of the Gaussian.          [ 1.0]
    -gamma       doubletype  - Spatial aspect ratio.           [ 1.0]
    -
    -Normalization options:
    -
    -Normalize   booltype    - Normalize the Gaussian to    [false]
    -                          integral 1.0 (before sampling
    -                          to output array)
    -NormalizeSum booltype   - After sampling the Gaussian, [false]
    -                          normalize the output array
    -                          to have total sum of 1.0
    -
    -Author: Marc-Oliver Gewaltig
    -
    -SeeAlso: gauss2d_
    -*/
    -/GaussPatch
    -[/integertype /integertype]
    -{
    -  /arraylib::GaussPatch GetOptions
    -  begin
    -   x_min x_max
    -   y_min y_max 
    -   orientation sigma gamma
    -
    -   gauss2d_
    -
    -   Normalize
    -    {%normalize the integral by a factor (sigma_x*sqrt(2Pi))*(sigma_y*sqrt(2Pi))
    -      % = sigma_x*sigma_y*2Pi
    -      % where sigma_x=sigma, sigma_y=sigma/gamma
    -      2 Pi mul  sigma mul  sigma gamma div mul  div  
    -    } if
    -   NormalizeSum
    -    {%normalize to total sum of array elements
    -     dup Flatten Plus div    
    -    } if
    -
    -   end   
    -} def
    -
    -
    -/arraylib::GaussPatch
    -<<
    -  /x_min -3.0
    -  /x_max  3.0
    -  /y_min -3.0
    -  /y_max  3.0
    -  /orientation 0.0
    -  /sigma 1.0
    -  /gamma 1.0
    -
    -  /Normalize    false
    -  /NormalizeSum false
    ->> Options
    -
    -
    -end % namespace arraylib
    diff --git a/lib/sli/debug.sli b/lib/sli/debug.sli
    deleted file mode 100644
    index 1f555095d8..0000000000
    --- a/lib/sli/debug.sli
    +++ /dev/null
    @@ -1,367 +0,0 @@
    -/*
    - *  debug.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% Debuggin support for SLI
    -/** @BeginDocumentation
    -   
    -   Name: debug.sli - Debugging support for sli 
    -   
    -   Synopsis: 
    -     (debug) run
    -
    -   Description: 
    -     Defines operators which support debugging. All auxiliary operators
    -     are defined in the dictionary debugdict.
    -
    -   Author: 
    -    Marc-Oliver Gewaltig, Honda R&D
    -
    -   FirstVersion: 
    -    July 9 1999
    -
    -   SeeAlso: inspect
    -
    -*/
    -
    -
    -systemdict begin
    -
    -%% Resume operation after a system signal
    -/** @BeginDocumentation
    -   
    -   Name: resume - Resume interrupted SLI program after a system signal.
    -   
    -   Synopsis: resume
    -
    -   Description: 
    -     resume tries to restore the state of the interpreter stacks to
    -     their state immediately before the signal.
    -
    -     The following stacks are restored in this order:
    -     1. operand stack from    errordict /ostack
    -     2. dictionary stack from errordict /ostack
    -     3. execution stack from errordict  /estack
    -
    -   Author: 
    -    Marc-Oliver Gewaltig, Honda R&D
    -
    -   FirstVersion: 
    -    Sept. 10 1999
    -
    -   SeeAlso: raiseerror
    -
    -*/
    -
    -/resume
    -{
    -  errordict dup /errorname known
    -  {
    -    /errorname get 
    -    /SystemSignal eq
    -    {
    -      errordict /errorname undef %% clear error state
    -      errordict /ostack get      %% Restore operand stack
    -      restoreostack
    -      errordict /dstack get      %% Restore dictionary stack
    -      restoredstack
    -      errordict /estack get      %% Restore execution stack
    -      restoreestack              %% Note that this operation does not return!
    -    }
    -    { 
    -      errordict /dstack get      %% Restore dictionary stack
    -      restoredstack      
    -      %(Resume only possible after /SignalError) 100 message
    -    } ifelse
    -  } 
    -  { 
    -    pop
    -    (Resume only possible after /SignalError) 100 message
    -  } ifelse
    -} def
    -
    - /debugdict 
    - <<
    -   /SingleStepMode false
    - >> def
    -
    -/** @BeginDocumentation
    -   
    -   Name: inspect - inspect an object
    -   
    -   Synopsis: any inspect -> -
    -             any  ?      -> -
    -
    -   Description: 
    -     inspect (or ?) displays the contents of an object in a formatted form.
    -     SLI procedures are displayed with indentation according to their 
    -     nesting level. The amount of indentation is controlled by the
    -     value of :INDENTATION, which is defined in debugdir.
    -
    -     The most common usage is to apply inspect to a literal. Inspect
    -     resolves the name in the current dictionary context and gives
    -     a formatted output of the contents.
    -
    -     Numeric values are displayed with the letters (d) or (i) to indicate
    -     the type of the numeral.
    -
    -     The display of arrays is truncated, if they are longer than the
    -     value of :ARRAYLIMIT. the remaining entries are replaced by
    -     an elipsis ( ... ).
    -
    -   Examples:
    -
    -    /stack inspect
    -
    -    /stack : proceduretype := 
    -    {
    -      0i
    -      1i
    -      -count-
    -      3i
    -      -sub_ii-
    -      {
    -        -index-
    -        =
    -      }
    -      -for-
    -    }
    -
    -    SLI ] [10] Range inspect
    -    [ 1i 2i 3i 4i 5i   ...  ]
    -
    -    SLI ] [1. 10.] Range inspect
    -    [ 1d 2d 3d 4d 5d   ...  ]
    -
    -    
    -   Bugs: 
    -     The displays of TypeTrees and Procedures could be more elaborated.
    -     Maybe the next version will show the individual parameter-lists of
    -     a TypeTree.
    -
    -   Author: 
    -     Marc-Oliver Gewaltig, Honda R&D
    -
    -   FirstVersion: 
    -     July 9 1999
    -
    -   Remarks: 
    -    ? can be used as shortcut to inspect
    -
    -   SeeAlso: 
    -
    -*/
    -
    - /inspect
    - {
    -   debugdict begin
    -   inspect
    -   end
    - } bind def
    -
    -/? /inspect load def
    -
    -end
    -
    -debugdict begin
    -
    -/bdef {bind def} bind def
    -
    -/:INDENTATION   2 def
    -/:INDENTCOUNT   0 def
    -/:ARRAYLIMIT    5 def
    -/:FILLCHAR      ( ) def
    -
    -% ostream tab
    -/tab
    -{
    -  :INDENTCOUNT
    -  {
    -    :FILLCHAR <- 
    -  } repeat
    -} bdef
    -
    -/lf
    -{
    -  (\n) <-
    -} bdef
    -
    -/moreindent
    -{
    -  /:INDENTCOUNT dup load :INDENTATION add def
    -} def
    -
    -/lessindent
    -{
    -  /:INDENTCOUNT dup load :INDENTATION sub def
    -} def
    -
    -
    -% ostream proc inspect
    -/:pr_p
    -{
    -  exch % proc ostream
    -  ({) <- endl
    -  moreindent
    -  exch  % ostream proc
    -  cvlit % ostream array
    -  {
    -    % ostream item
    -    exch tab exch pr endl
    -  } forall
    -  lessindent
    -  tab (}) <-
    -} def
    -
    -% ostream litproc pprint
    -/:pr_lp
    -{
    -  exec :pr_p
    -} def
    -
    -% ostream array 
    -/:pr_a
    -{
    -  size 0 eq
    -  { <-- }
    -  {
    -    dup 3 -1 roll
    -    tab ([ ) <- exch
    -    0 :ARRAYLIMIT getinterval
    -    {
    -      pr ( ) <-
    -    } forall
    -    exch length :ARRAYLIMIT gt
    -    {
    -      (  ...  ) <-
    -    } if
    -    (]) <-
    -  } ifelse
    -} bdef
    - 
    -/:pr_d
    -{
    -  exch showpoint exch <- noshowpoint
    -} def
    -
    -/:pr_i
    -{
    -   <-
    -} def
    -
    -/:pr_t
    -{
    -  % stream trie -> stream
    -  1 index exch trieinfo
    -} def
    -
    -/:pr_any /<-- load def
    -
    -/:pr trie
    - [/ostreamtype /anytype]              /:pr_any load addtotrie
    - [/ostreamtype /proceduretype]        /:pr_p   load addtotrie
    - [/ostreamtype /arraytype]            /:pr_a   load addtotrie
    - [/ostreamtype /literalproceduretype] /:pr_lp  load addtotrie
    - [/ostreamtype /doubletype]           /:pr_d   load addtotrie
    - [/ostreamtype /integertype]          /:pr_i   load addtotrie
    - [/ostreamtype /trietype]             /:pr_t   load addtotrie
    -def
    -
    -/pr_any
    -{
    -  :pr
    -} def
    -
    -
    -/pr trie
    - [/ostreamtype /anytype]  /pr_any load addtotrie
    -def
    -
    -/inspect_any
    -{ 
    - debugdict begin
    -  cout exch pr endl ;
    - end
    -} def
    -
    -/inspect_l
    -{ 
    - debugdict begin
    -  dup  cout exch % /lit ostream /lit
    -  <-- ( : ) <- 1 index lookup
    -  {
    -    type <- ( := ) <- lf
    -    exch load 
    -    pr endl ;
    -  }
    -  {
    -    (undefined) <- endl 2 npop
    -  } ifelse
    - end
    -} def
    -
    -/inspect trie
    -[/anytype] /inspect_any load addtotrie
    -[/literaltype] /inspect_l load addtotrie
    -def
    -
    -/?
    -{
    -  inspect
    -} bdef
    -end
    -
    -
    -/** @BeginDocumentation
    -Name: break - interrupt the execution of a procedure for inspection
    -SeeAlso: continue
    -*/
    -
    -/debugprompt
    -{
    -  (break mode ) 
    -  count 1 gt_ii      % counter has to be corrected for operative
    -  {                  % objects on the stack
    -    ([) join_s
    -    count 1 sub_ii cvs join_s
    -  } if
    -  (] ) join_s
    -} bind def
    -
    -/break
    -{		
    - {
    -  {
    -    debugprompt GNUreadline
    -    {
    -      cst cvx_a stopped {handleerror} if
    -    } if
    -  } stopped {handleerror} if % to catch signals
    - } loop
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: continue - continue an interrupted  procedure
    -SeeAlso: break
    -*/
    -
    -/continue /exit load def
    -
    diff --git a/lib/sli/filesystem.sli b/lib/sli/filesystem.sli
    deleted file mode 100644
    index 366779c013..0000000000
    --- a/lib/sli/filesystem.sli
    +++ /dev/null
    @@ -1,336 +0,0 @@
    -/*
    - *  filesystem.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/FileNames_s
    -{
    -  regcomp
    -  FileNames_r
    -} def
    -
    -/FileNames_r
    -{
    -  << >> begin
    -    /Mask Set
    -    Directory
    -    FileNames_
    -    :sort
    -    /FilesList [] def
    -    {
    -      dup Mask exch regex_find
    -      {FilesList exch append  /FilesList Set}
    -      {pop} ifelse
    -    } forall
    -    FilesList
    -  end
    -} def
    -
    -/** @BeginDocumentation
    - Name: FileNames - return contents of current working directory
    - Synopsis: string FileNames -> array
    -           regex  FileNames -> array
    - Description: FileNames reads contents of current working directory
    -    via POSIX commands. Only files matching the regular expression
    -    mask set in string/regex are used.
    - Parameters: string : a mask converted to the regex
    -             regex  : the regular expression used to filter files
    -             array  : an array of strings containing matched files
    - Examples: (.*) FileNames -> all files of current directory
    -           Remember that POSIX regex and those used by ls are not
    -           necessarily the same !
    - Bugs: see remarks
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: Sorting of files done by :sort, a dummy UNIX sorter which
    -    is far from protable!
    - SeeAlso: SetDirectory, Directory, ls, cd
    -*/ 
    -
    -/FileNames trie
    -  [/stringtype] /FileNames_s load addtotrie
    -  [/regextype] /FileNames_r load addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: ls - print contents of current working directory
    - Synopsis: ls -> -
    - Description: Prints the contents of the working directory on stdout.
    -    Don't mess it up with UNIX ls, this is POSIX. No parameters can 
    -    be set like -l, -a !
    -    Any files starting with a . are NOT shown by default.
    -    Use FileNames if you need them.
    - Parameters: -
    - Examples: There's only one usage: 
    -           ls -> see contents of current working directory
    - Bugs: 
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: This is in fact not much more than a wrapper to FileNames,
    -          in addition using a regex to filter out ".anything" files.
    - SeeAlso: FileNames, SetDirectory, Directory, MakeDirectory, RemoveDirectory, cd
    -*/ 
    -
    -/ls  {(^[^\\.]) FileNames {=} forall} def
    -
    -/** @BeginDocumentation
    - Name: SetDirectory - Change working directory
    - Synopsis: string SetDirectory -> boolean
    - Description: Changes the working directory to the given argument,
    -    e.g. the value of '.' in the UNIX world.
    - Parameters: string : The new working directory.
    -             boolean: A flag if operation succeded.
    - Examples: (/home/MyName) SetDirectory -> Commands like ofstream, 
    -                                          FileNames etc. take
    -                                          /home/MyName as a default.
    -           (..) SetDirectory           -> Flip to parent directory.
    - Bugs: -
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: 
    - SeeAlso: FileNames, Directory, MakeDirectory, RemoveDirectory, cd, ls
    -*/ 
    -
    -/SetDirectory trie
    -  [/stringtype] /SetDirectory_ load addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: cd - Change working directory
    - Synopsis: string cd -> -
    - Description: Changes the working directory to the given argument,
    -              e.g. the value of '.' in the UNIX world.
    - Parameters: string : The new working directory.
    -             boolean: A flag if operation succeded.
    - Examples: (..) cd  -> Flip to parent directory.
    - Diagnostics: Raises /UnknownDirectory, if SetDirectory fails. 
    - Bugs: -
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: This is a wrapper to SetDirectory
    - SeeAlso: FileNames, Directory, SetDirectory, MakeDirectory, RemoveDirectory, ls
    -*/ 
    -
    -/cd {dup SetDirectory not {/cd /UnknownDirectory raiseerror} if pop} def
    -
    -/** @BeginDocumentation
    - Name: pwd - Print working directory
    - Synopsis: pwd -> -
    - Description: Prints the working directory.
    -	      For UNIX compatibility.
    - Parameters: -
    - Bugs: -
    - Author: Schrader
    - Remarks: This is a wrapper to Directory
    - SeeAlso: Directory, SetDirectory, MakeDirectory, RemoveDirectory, ls
    -*/ 
    -
    -/pwd {Directory =} def
    -
    -/** @BeginDocumentation
    - Name: MoveFile - Rename a file
    - Synopsis: string1 string2 MoveFile -> boolean
    - Description: Rename a file, e.g. link the file to the new name
    -     and unlink the old filename. If this unlink was the only link
    -     to the file, the old file is effectively deleted.
    -     Note that this is only guaranteed to work if new and old filename
    -     refer to the same directory. Renaming over different directories
    -     might work, but that's not POSIX and thus not portable.
    - Parameters: string1 : Old File
    -             string2 : NewFile
    -             boolean : A flag if operation succeded.
    - Examples: (Simulation1) (obsolete) MoveFile -> The File Simulation1
    -                                                is now called obsolete
    - Bugs: -
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: Since POSIX rename() did not work for some obscur reasons,
    -     MoveFile indeed works by linking the new filename and unlinking
    -     the old one!
    -     But that's exactly what rename() is supposed to do, no damage done...
    - SeeAlso: CopyFile, ofstream, ifstream, DeleteFile, FileNames, MakeDirectory, RemoveDirectory
    -*/ 
    -
    -/MoveFile trie
    -  [/stringtype /stringtype] /MoveFile_ load addtotrie
    -def
    -
    -
    -
    -
    -
    -
    -
    -
    -/** @BeginDocumentation
    - Name: CopyFile - Copy a file
    - Synopsis: (sourcefilename) (targetfilename) CopyFile -> -
    - Description: Copy a file.
    - Examples: (Simulation1) (Sim1Backup) CopyFile
    - Author: R Kupper
    - FirstVersion: 06 aug 2008
    - Diagnostics: Issues informative message and
    -   raises /BadIO if file cannot be copied for any reason.
    - SeeAlso: MoveFile, ofstream, ifstream, DeleteFile, FileNames, MakeDirectory, RemoveDirectory
    -*/ 
    -
    -/CopyFile trie
    -  [/stringtype /stringtype] /CopyFile_ load addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    - Name: DeleteFile - Delete a file
    - Synopsis: string DeleteFile -> boolean
    - Description: Delete a file defined by it's filename. To be exact, it
    -    is unlinked, so if it link to another file, only the link and not
    -    the file is removed. (This is at least what is supposed to happen 
    -    if your POSIX is really POSIX ...)
    -    Mind that regex arguments like (*) DeleteFile are NOT supported.
    -    This was done for safety reasons because the regex flavour of 
    -    POSIX is not exactly like what one might be used to from UNIX, 
    -    which could easily end in a disaster.
    - Parameters: string : Filename of file to be deleted.
    -             boolean : A flag if operation succeded.
    - Examples: (DontNeedYou) DeleteFile -> True, and DontNeedYou is removed
    -                                       from your working directory
    -                                       if this file existed,
    -                                       otherwise False.
    - Bugs: -
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: -
    - SeeAlso: CopyFile, ofstream, ifstream, MoveFile, FileNames, MakeDirectory, RemoveDirectory
    -*/ 
    -
    -/DeleteFile trie
    -  [/stringtype] /DeleteFile_ load addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: MakeDirectory - Create a new directory
    - Synopsis: string MakeDirectory -> boolean
    - Description: MakeDirectory creates the named subdirectory of your
    -    current working directory. 
    - Parameters: string : Name of new subdirectory
    -             boolean : A flag if operation succeded.
    - Examples: (NewSubDir) MakeDirectory -> ./NewSubDir created
    - Bugs: -
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: -
    - SeeAlso: FileNames, MoveDirectory, RemoveDirectory
    -*/ 
    -
    -/MakeDirectory trie
    -  [/stringtype] /MakeDirectory_ load addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: RemoveDirectory - Delete a directory
    - Synopsis: string RemoveDirectory -> boolean
    - Description: RemoveDirectory deletes the named subdirectory of your
    -    current working directory, provided it is empty.
    - Parameters: string : Name of subdirectory to be deleted.
    -             boolean : A flag if operation succeded.
    - Examples: (RemoveMeDir) RemoveDirectory -> True, and
    -            ./RemoveMeDir does not longer exist, provided it ever did
    -            and was empty.
    - Bugs: -
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: -
    - SeeAlso: FileNames, MoveDirectory, RemoveDirectory
    -*/ 
    -
    -/RemoveDirectory trie
    -  [/stringtype] /RemoveDirectory_ load addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: MoveDirectory - Rename a directory
    - Synopsis: string1 string2 MoveDirectory -> boolean
    - Description: MoveDirectory unlinks old directory name and links to
    -      the new name. This is only possible if this directory is empty.
    - Parameters: string1 : Name of old directory
    -             string2 : Name of new directory
    -             boolean : A flag if operation succeded.
    - Examples: (NewSubDir) (Other) MoveDirectory -> True, and ./NewSubDir
    -            is now called ./Other, provided it exists and is empty.
    - Bugs: -
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks: This operator in fact only sequentially calls
    -          RemoveDirectory, MoveDirectory
    -          POSIX statet this would be the same operator like renaming
    -          a file, but that did not work.
    - SeeAlso: FileNames, MoveDirectory, RemoveDirectory, MoveFile
    -*/ 
    -
    -/MoveDirectory trie
    -  [/stringtype /stringtype] {MakeDirectory pop RemoveDirectory pop} addtotrie
    -def
    -
    -/CompareFiles trie
    -  [/stringtype /stringtype] /CompareFiles_s_s load addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -  Name: dirname - strip last component from file name
    -  Synopsis: string dirname -> string
    -  Description: Print NAME with its trailing /component removed;
    -      if NAME contains no /'s, output `.' (meaning the current directory).
    -  Parameters: string: Name of the directory
    -  Examples: (./../test/dir/foo.sli) dirname -> (./../test/dir)
    -  FirstVersion: November 2012
    -  Author: Yury V. Zaytsev and Jochen M. Eppler
    -*/
    -
    -/dirname {
    -
    -  /pth exch def
    -
    -  mark
    -
    -    % Special cases of leading directory separators
    -    pth (/) eq
    -      pth (//) eq or
    -      pth (///) eq or
    -        { (/) } case
    -
    -    % Special cases of lacking directory separators
    -    pth (/) searchif not
    -      pth () eq or
    -      pth (.) eq or
    -      pth (..) eq or
    -        { (.) } case
    -
    -    {
    -      % General case
    -      (/{1,3}[^/]+/{0,3}$) regexdict/REG_EXTENDED :: regcomp () pth regex_replace
    -
    -      % Special case of non-empty path plus leading directory separator
    -      dup () eq { pop (/) } if
    -    }
    -
    -  switchdefault
    -
    -} def
    diff --git a/lib/sli/helpinit.sli b/lib/sli/helpinit.sli
    deleted file mode 100644
    index 593c6d9e93..0000000000
    --- a/lib/sli/helpinit.sli
    +++ /dev/null
    @@ -1,894 +0,0 @@
    -/*
    - *  helpinit.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* 
    -    Sli-commands initializing Online-help.
    -
    -*/
    -
    -
    -/HelpRoot    statusdict /prgdocdir get (/help)       join def
    -/HelpdeskURL statusdict /prgdocdir get (/index.html) join def
    -/HelpExtension (.hlp)  def
    -/TextIndexFilename (helpindex.hlp)  def
    -/CPPHelpRoot    HelpRoot (/) join (cc)  join def
    -/SLIHelpRoot    HelpRoot (/) join (sli) join def
    -/HelpSearchPath [CPPHelpRoot SLIHelpRoot]    def
    -
    -/SimpleKeyword
    -  ((Name:|Synopsis:|Description:|Parameters:|Options:|Examples:|Bugs:|Diagnostics:|Author:|FirstVersion:|Remarks:|Availability:|References:|Source:|Sends:|Receives:|Transmits:))
    -regcomp def
    -
    -/ReferencingKeyword
    -  ((SeeAlso:|Variants:))
    -regcomp def
    -
    -/InvariantsKeyword
    -  ((Examples:))
    -regcomp def
    -
    -
    -/** @BeginDocumentation
    -Name: ppage - print a file to cout in chunks of 20 lines.
    -
    -Description:
    -This is a "poor man's pager" implemented in SLI. It can be used when
    -no external pager program is available.
    -
    -Synopsis:
    -      ifstream   ppage -> -
    -      (filename) ppage -> - 
    -
    -Diagnostics:
    -If a filename is given and does not exist, /FileOpenError is raised.
    -If an ifstream is given, it will be closed by ppage.
    -
    -Author: Marc-Oliver Gewaltig, R Kupper
    -
    -FirstVersion: 27-sep-2007
    -
    -SeeAlso: page
    -*/
    -/ppage [/istreamtype]
    -{
    -  {
    -    () =  
    -    20
    -    {
    -        getline
    -        { (> ) =only = } {exit} ifelse
    -    } repeat
    -    igood not {exit} if
    -    () =    
    -    (Press <RETURN> to continue or "q <RETURN>" to quit. ) readline
    -    {      
    -     0 get 113 eq {exit} if 
    -    } if
    -  } loop
    -  closeistream
    -  () =  
    -} def  
    -
    -/ppage [/stringtype]
    -{
    -  dup
    -  ifstream not
    -  {
    -    /ppage /FileOpenError raiseerror    
    -  } if
    -  ppage  
    -  pop  
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: page - Conveniently display contents of a long file
    -
    -Synopsis: (filename) page -> - 
    -
    -Description:
    -  The "page" command is used by NEST's online-help system to display
    -  the help pages. It displays the contents of a file, either through a
    -  built-in pager, or an external pager program.
    -
    -Options:
    -  /command - UNIX command to display a file (default: see below)
    -  
    -    /command can be either false or a string.
    -    If /command is set to false, "page" uses the simple built-in
    -    pager "ppage" for display.
    -  
    -    If it is set to the name of a UNIX program, "page" will execute
    -    this program as a child process, passing the name of the
    -    file as argument.
    -  
    -    /command defaults to the contents of the $PAGER environment
    -    variable. If this variable is not set, it defaults to (more).
    -  
    -  /wait - whether to wait for the UNIX program to finish. (default: true)
    -  
    -    If /wait is set to true, the "page" command will not return until
    -    the UNIX process is terminated. Use this setting for all pager
    -    programs that write to stdout.
    -  
    -    If /wait is set to false, "page" will return immediately after
    -    creating the child process. Use this setting for all pager programs
    -    that open up their own window.
    -  
    -    The value of /wait is ignored, if /command is set to false.
    -
    -Examples:
    -  The following example displays the license agreement that came with
    -  your copy of NEST:
    -
    -  "statusdict /prgdatadir get (/LICENSE) join page"
    -
    -Bugs: The string contained in /command is processed by "breakup" to separate
    -      the command from its parameters. Be aware that there is a bug in the
    -      "breakup"-routine, which makes it impossible to pass a parameter
    -      containing blanks by enclosing it in quotation marks.
    -
    -      WARNING: Setting the /wait option to false with a pager
    -      program that writes to stdout will screw up your SLI prompt.
    -
    -Author: R Kupper
    -
    -FirstVersion: Apr 22 1999, reworked 27-sep-2007
    -
    -Remarks: If /wait is set to false, the "system"-command is called in
    -          no-care-mode. Be aware that this may be an expensive operation
    -          depending on the ressources your SLI-process occupies.
    -          (see description of "system").
    -         Even if /wait is set to true, creation of a child process may
    -          be expensive. To avoid any overhead caused by process creation, set /command
    -          to false.
    -
    -SeeAlso: help, helpindex, license, system
    -*/
    -
    -/page <<
    -    /command  (PAGER) getenv not {(more)} if
    -    /wait     true
    ->> Options
    -
    -/page [/stringtype]
    -{
    -  /page /command GetOption false eq not % Is there a Pager program to use?
    -  {%yes, there is a Pager
    -    /page /wait GetOption % Shall we wait for its termination?
    -    {%yes, we shall wait for termination of pager process
    -      /page /command GetOption ( ) breakup exch append 0 system % Spawn Pager Program to display text
    -      2 npop % Wait for Pager process to terminate and clear stack
    -    }
    -    {%no, we shall not wait for termination of pager process
    -      /page /command GetOption ( ) breakup exch append 1 system % Spawn orphaned Pager process to display text
    -    }
    -    ifelse
    -  }
    -  {%no, there is no Pager. So use our built-in poor man's pager:
    -    ppage
    -  }
    -  ifelse
    -} def  
    -
    -
    -/** @BeginDocumentation
    - Name: help - prints help text for a given command
    -
    - Synopsis: /name help -> -
    -
    - Description:
    -   help displays the online help file of the command /name.
    -   This documantation is created during installation.
    -
    -   help uses the command "page" to display its information.
    -   Type
    -       /page help
    -   to learn how to customize the output of this command.
    -
    - Parameters: 
    -   /name is the command you want to read a help about.
    -
    - Examples: 
    -   /help help %prints this text.
    -   /page help %learn how to customize the output of the help command
    -   /ThisIsDefinitelyNoCommand help %raises a NoHelpInformationError.
    -
    - Bugs: 
    -
    - Author: Diesmann, Hehl, R Kupper
    -
    - FirstVersion: 26.3.1999
    -
    - Remarks:
    -  help uses the command "page" to display its information.
    -  Type
    -      /page help
    -  to learn how to customize the output of this command.
    -
    -  Commented 13 April, 1999
    -
    -  Developers are kindly requested to use our conventional header for
    -  commenting any new and all those older commands.
    -
    - SeeAlso: page, helpindex, helpdesk, apropos, which
    -*/
    -
    -/help_l
    -{
    - cvs HelpExtension join
    -  HelpSearchPath exch LocateFileNames  %Find *.hlp-File in HelpSearchPath
    -  dup [] eq not %Was a help file found?
    -
    -  {%yes, a helpfile was found
    -    0 get page    
    -  }
    -  {%no, no helpfile was found
    -	/help /NoHelpInformationError raiseerror
    -  } ifelse
    -} bind def
    -
    -/help_any
    -{
    -   /help help_l
    -  /help /LiteralExpected raiseerror
    -} def
    -
    -/help_ trie
    -  [/literaltype] /help_l load addtotrie
    -  [/stringtype] {cvlit help_l} addtotrie
    -  [/anytype] /help_any load addtotrie
    -def
    -
    -/help
    -{
    -  count 0 eq
    -  {
    -    :helptext    
    -  }
    -  {  
    -    help_
    -  } ifelse
    -} def
    -
    -
    -/** @BeginDocumentation
    - Name: helpindex - displays a list of all commands
    -
    - Synopsis: helpindex -> -
    -
    - Description:
    -   helpindex prints a list of all commands together with a short summary
    -   of their usage.
    -
    -   helpindex uses the command "page" to display its information.
    -   Type
    -       /page help
    -   to learn how to customize the output of this command.
    -
    - Parameters: none
    -
    - Examples:
    -   helpindex --> lists all commands
    -
    - Bugs: Should work with a string parameter giving some letters or
    - keywords, e.g. (ma) helpindex --> list of all commands beginning with ma
    - or (file) helpindex --> list of all commands for filehandling!
    -
    - Author: Hehl
    -
    - FirstVersion: April 20, 1999
    -
    - Remarks: 
    -  helpindex uses the command "page" to display its information.
    -  Type
    -      /page help
    -  to learn how to customize the output of this command.
    -
    - SeeAlso: help, apropos, which
    -*/ 
    -
    -/helpindex
    -{
    - HelpRoot (/) join TextIndexFilename join
    -  page
    -} bind def
    -
    -/* Documentation (not included in helpdesk)
    -
    - Name: :sort - dummy sorting via UNIX
    - Synopsis: array :sort -> array
    - Description:
    -   alphabetically sorts array via UNIX-sort. Don't know what happens
    -   to non-string arrays.
    - Parameters:
    - Examples: 
    - Bugs: 
    - Author: Hehl
    - FirstVersion: May 19th, 1999
    - Remarks: Waiting for our real sorting mechanism as discussed on our
    - 17/18 May meeting ...
    - SeeAlso: 
    -*/ 
    -
    -/:sort_a
    -{  << >> begin
    -    (sort) spawn /i Set /o Set
    -    {
    -      o exch <- endl ;
    -    } forall
    -    o closeostream
    -    [] i
    -    {
    -      getline not
    -      {exit} if
    -      /zeile Set
    -      exch zeile append exch
    -    } loop  
    -    closeistream
    -  end
    -} bind def
    -
    -
    -/:sort trie
    -  [/arraytype] /:sort_a load addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: helpdesk - Display on-line help in external browser
    -
    -Description:
    -  "helpdesk" opens a browser window with the SLI Online help. The
    -  browser executable to use must be specified by the user as a command
    -  option. (See "SetOptions" on how to do this.)
    -
    -Options:
    -  /command - UNIX command to use as browser (default: firefox)
    -  
    -    /command is initially set to (firefox).
    -  
    -  /wait - whether to wait for the UNIX program to finish. (default: false)
    -  
    -    If /wait is set to true, the "helpdesk" command will not return until
    -    the UNIX process is terminated. Use this setting for all browsers that
    -    use the terminal exclusively.
    -  
    -    If /wait is set to false, "helpdesk" will return immediately after
    -    creating the child process. Use this setting for all browsers  that
    -    open up their own window.
    -  
    -    The value of /wait is ignored if /command is set to false.
    -
    -Author: Gewaltig, Eppler, Kupper
    -
    -SeeAlso: SetOptions, help, helpindex
    -*/
    -
    -/helpdesk <<
    -    /command (firefox)
    -    /wait    false
    ->> Options
    -
    -/:helpdesk_complete_command
    -{
    -  /helpdesk /command GetOption
    -  (^darwin) statusdict/hostos :: regex_find
    -  {
    -    % OSX, must use open -a <cmd> <url>
    -    (open -a ) exch join
    -  }
    -  if
    -  ( ) join
    -  HelpdeskURL join
    -} def
    -
    -/helpdesk
    -{
    -  /helpdesk /command GetOption false eq not
    -  {
    -    /helpdesk /wait GetOption 
    -    {
    -      {
    -	:helpdesk_complete_command 0 system
    -	2 npop
    -      } stopped
    -    }
    -    {
    -      :helpdesk_complete_command 1 system 
    -    } ifelse
    -  }
    -  {
    -    M_ERROR (MissingOptionError) (NEST does not know how to connect to your browser. Please see the file helpinit.sli to learn how to tell NEST about your browser.) message
    -    /helpdesk /MissingOptionError raiseerror    
    -  } ifelse
    -} def
    -
    -
    -/** @BeginDocumentation
    - Name: edit - Open a file in an external editor
    -
    - Synopsis: (filename) edit -> -
    -
    - Options:
    -  /command - UNIX command to edit a file (default: see below)
    -    /command can be either false or a string.
    -    If /command is set to false, "edit" will issue a message that informs
    -    about how to set the editor
    -  
    -    If it is set to the name of a UNIX program, "edit" will execute
    -    this program as a child process, passing the name of the
    -    file as argument.
    -  
    -    /command defaults to the contents of the $EDITOR environment
    -    variable. If this variable is not set, it defaults to false.
    -  
    -  /wait - whether to wait for the UNIX program to finish. (default: true)
    -  
    -    If /wait is set to true, the "edit" command will not return until
    -    the UNIX process is terminated. Use this setting for all editors
    -    that use the terminal exclusively.
    -  
    -    If /wait is set to false, "edit" will return immediately after
    -    creating the child process. Use this setting for all editors that
    -    open up their own window.
    -  
    -    The value of /wait is ignored, if /command is set to false.
    -
    - Description:
    -   Opens the file specified by filename.
    -
    - Parameters: 
    -   The name of a file to be edited (or created, if non-existent).
    -
    - Examples: (helloworld.sli) edit
    -
    - Bugs: 
    -
    - Author: Schrader
    -
    - FirstVersion:
    -
    - Remarks: The location of the file is only specified by the parameter;
    -   SLISearchPath is not scanned as e.g. in 'run'.
    -
    - SeeAlso: page, run
    -*/ 
    -
    -/edit <<
    -    /command (EDITOR) getenv not {false} if
    -    /wait    true
    ->> Options
    -
    -/edit [/stringtype]
    -{
    - /edit /command GetOption false eq not
    - { % yes, there is an Editor
    -  /edit /wait GetOption 
    -  { % yes, we shall wait for termination of editor process
    -   /edit /command GetOption ( ) join exch join 0 system
    -   2 npop
    -  }
    -  { % no, we shall not wait for termination of editor process
    -   /edit /command GetOption ( ) join exch join 1 system 
    -  }
    -  ifelse
    - }
    - {
    -   /edit MissingOptionError
    - }ifelse
    -} bind def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% experimental code for invariants and test driven 
    -% implementation
    -% 
    -
    -/** @BeginDocumentation
    - Name: --> - longrightarrow, usually delayed comparison
    - Synopsis: --> -> /-->
    - Description:
    -  The symbol --> is used in the example sections of the NEST 
    -  documentation to indicate the transformation an operator 
    -  performs to its arguments. The SLI operator --> is defined 
    -  to just reproduce itself. This enables NEST to evaluate the 
    -  example sections as regular SLI code. As a result, the arguments
    -  of the documented operator and its results are separated by 
    -  the literaal /-->. A parser for infix notation can then apply
    -  the documented operator to the values on the left side of -->
    -  and compare the results to the values on the right side of -->
    - 
    - Examples: 
    -    [8 --> 6] --> 8 /--> cvx exec 6  3 arraystore 
    - Author: Diesmann
    - FirstVersion: 080506
    - Remarks: 
    -  The idea of --> is to contribute to a notation for test driven
    -  programming and user documentation which keeps the syntactic 
    -  clutter at a minimum. 
    -
    - SeeAlso: helpdesk, EvaluateLiteralInfixes
    -*/ 
    -/--> /--> def
    -
    -
    -
    -/** @BeginDocumentation
    - Name: EvaluateLiteralInfixes - Evaluates an array of infix expressions  
    - Synopsis: array -> array
    - Description:
    -  The function evaluates an array of expressions assuming that every 
    -  literal is an infix operator. Inside this function --> is defined as 
    -  eq, the comparison for equality.
    - Examples: 
    -   [ 5 /add 6 /sub 2] EvaluateLiteralInfixes --> [9]
    -   [ 5 --> 6 true ] EvaluateLiteralInfixes   --> [false true]
    - Author: Diesmann
    - FirstVersion: 080506
    - Remarks:
    -  With the further development of test driven programming and unit
    -  testing in NEST, the function may develop into a more complete 
    -  parser for infix notation
    - SeeAlso: helpdesk, -->
    -*/ 
    -/EvaluateLiteralInfixes
    -{
    - << /--> /eq load >> begin
    -
    - % source array with infix expression
    - container
    - % source []
    - {
    -  % loop over source array until empty
    -  exch empty
    -  {pop exit } if
    -  % target source
    -  dup First exch Rest
    -  % target f source
    -  rollu
    -  % source target f
    -
    -  dup type
    -  /literaltype eq           % handle literal operators
    -  {  
    -   % source target f
    -   % f is a literal
    -   exch dup Most exch Last
    -   % source f target a
    -   4 -1 roll
    -   % f target a source
    -   dup Rest exch First
    -   % f target a source b
    -   exch
    -   % f target a b source 
    -   5 1 roll
    -   % source f target a b
    -   4 -1 roll
    -   % source target a b f
    -   cvn exec
    -   % source target abf
    -   append
    -   % source target
    -  }
    -  {                          % handle all operands
    -   % source target f
    -   % f is not a literal
    -   append
    -   % source target
    -  }
    -  ifelse
    - } loop
    - % target
    -
    - end
    -} def
    -
    -
    -/** @BeginDocumentation
    - Name: validate - Check if a function is consistent with all its examples
    - Synopsis: /literal -> boolean
    - Description:
    -
    -The function validate checks whether the examples in the documentation
    -of the function specified by the literal argument work as documented.
    -Every example in the example section is expected to result in a boolean
    -value. validate only returns true if the result of all examples is true.
    -In order to make the documentation of examples more readable validate 
    -supports a special (infix) syntax for the examples:
    -      a1 ... an --> b1 ...bm
    -is translated to 
    -      a b eq 
    -assuming that the sequence ai collapses to a and the sequence bj to b.
    -Thus, --> has delayed execution time and is only processed after all 
    -expressions in the example section have been executed once. The -->
    -expressions can be freely mixed with regular SLI code boolean 
    -expressions like
    -      a b eq    
    -The documentation of function Part contains several examples.
    -
    -Before a function can be validated it needs to be registered with the 
    -help system. This is required because in SLI several functions can be 
    -defined in the same source file. Thus, only after processing the source
    -file SLI is aware of the functions implemented by this file. The help
    -system of SLI stores the path to the implementing file with the 
    -documentation of each function. Therefore, SLI can lookup the source 
    -code for each function without searching.
    -
    -The typical workflow in test driven programming in SLI is as follows:
    - 1. create a new file myfunctions.sli
    - 2. write documentation including examples for one or
    -    more functions, e.g. /myfunc1
    - 3. run make installcheck
    - 4. implement /myfunc1
    - 5. call /myfunc1 validate
    - 6. continue with 4 (not 3) until validate is successful
    -
    -The algorithm of function validate is as follows:
    - 1. find the help file (.hlp) for the specified function.
    - 2. obtain the source file implementing the function
    -    from the help file
    - 3. update the help file of the function
    - 4. construct target path for test files
    - 5. write some header
    - 6. copy the invariants
    - 7. write some footer
    - 8. run the test file
    -
    - Examples: 
    -    /Part validate     --> true 
    -%   /validate validate --> true   % infinite recursion
    - Author: Diesmann
    - FirstVersion: 080503
    - Remarks: 
    - The function is experimental. It constitutes a first attempt to
    - provide support for test driven programming in NEST. A variant of 
    - this function could easily print a detailed report of the test results
    - and the intermediate generation of a test script is not necessary.
    - In the present implementation validate updates the plain text help file
    - (.hlp) but not the hypertext help (.html).
    - SeeAlso: EvaluateLiteralInfixes, -->, Part, helpdesk
    -*/ 
    -/validate [/literaltype]
    -{
    -
    - % string name of function
    - cvs /c Set
    - % file name of test
    - (test_) c join (.sli) join /cf Set
    -
    - % locate the help file
    - c HelpExtension join
    - HelpSearchPath exch LocateFileNames First
    - /f Set
    -
    - % construct target path for test files
    - %
    -
    - %% this code writes directly into the unittests directory
    - % f (nest/help) search 
    - % pop /base Set pop pop
    - % base (nest/unittests/) join cf join /tf Set
    -
    - %% this alternative code uses a temporary file
    - % tmpnam (.sli) join /tf Set
    -
    - % tf (w) file /t Set
    -
    - %% this alternative code uses a string stream
    - osstream pop /t Set
    -
    -
    - % write header to test file
    - t 
    -  (true [\n\n) print ;
    -
    -
    - % extract invariants from .hlp file and 
    - % write to test file.
    - false /copystate Set
    - f (r) file
    - { 
    -  getline
    -  not {close exit} if
    -  /Line Set
    -
    -  SimpleKeyword Line 1 0 regexec 0 eq
    -  {false /copystate Set } if pop
    -
    -  ReferencingKeyword Line 1 0 regexec 0 eq
    -  {false /copystate Set } if pop
    -
    -  copystate 
    -  {
    -   t Line print (\n) print ;
    -  }
    -  if
    -
    -  InvariantsKeyword Line 1 0 regexec 0 eq
    -  {true /copystate Set } if pop
    -
    -
    - }
    - loop
    -
    - % write footer to test file
    - %
    - t (] EvaluateLiteralInfixes {and} Fold\n) print ;
    -
    - %% close new test file and execute
    - % t close
    - % tf run
    -
    - %% alternative version with string stream
    - t str isstream pop cvx exec
    -
    -} def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: apropos - Search the command index for a regular expression.
    -
    -Synopsis: (regexp) apropos -> -
    -          /regexp  apropos -> -
    -
    -
    -Description:
    -Apropos prints out all lines of the helpindex that match the regular
    -expression. The regular expression can be a simple string.
    -The search is case invariant. Apropos uses extended regular
    -expressions.
    -
    -Parameters:
    -  regexp: Regular expression, either as a string or literal.
    -
    -Examples:
    -  SLI ] /apropos apropos
    -  apropos              Search the command index for a regular expression.
    -  
    -  SLI ] /Apropos apropos
    -  apropos              Search the command index for a regular expression.
    -  
    -  SLI ] /Express* apropos
    -  apropos              Search the command index for a regular expression.
    -  EvaluateLiteralInfixes Evaluates an array of infix expressions
    -  ExecMath             execute a math expression.
    -  grep                 extract lines matching a regular expression pattern
    -  regcomp              Create a regular expression
    -  regexec              compare string and regular expression
    -  testsuite::test_iaf_psp_peak test of closed form expression for peak
    -  ToMathematicaExpression converts SLI data to Mathematica input
    -  
    -  SLI ] (regular expression) apropos
    -  apropos              Search the command index for a regular expression.
    -  regcomp              Create a regular expression
    -  regexec              compare string and regular expression
    -  
    -  SLI ] /DoWhatIWant apropos
    -  DoWhatIWant: nothing appropriate.
    -
    -Diagnostics:
    -Raises /CannotConvertToRegexp if the expression cannot be converted
    -to a regular expression (see :regerror).
    -Raises /FileNotFound if the help index file cannot be found.
    -
    -Author: R Kupper
    -
    -FirstVersion: 2008-jul-15
    -
    -SeeAlso: helpindex, help, which, regcomp
    -*/
    -/apropos[/stringtype /e]
    -{  
    -  /flags
    -  regexdict/REG_ICASE :: 
    -  regexdict/REG_EXTENDED :: add 
    -  def    
    -
    -  e flags regcomp /regexp Set
    -
    -  % open the helpindex text file:
    -  /helpindexfile HelpRoot (/) join TextIndexFilename join def
    -
    -  helpindexfile ifstream not
    -  {
    -    M_ERROR (apropos) (Cannot find the helpindex file. I thought it was here: ) helpindexfile join (. Is your installation broken?) join message
    -    funcname /FileNotFound raiseerror
    -  } if
    -
    -  /found false def  
    -
    -  {
    -    getline not {exit} if
    -    /line Set
    -    regexp line regex_find
    -    {
    -      line =
    -      /found true def      
    -    } if
    -  } loop
    -  pop % the stream  
    -  
    -  found not
    -  {
    -    e =only (: nothing appropriate.) =
    -  } if
    -
    -} SLIFunctionWrapper
    -
    -/apropos[/literaltype] {cvs apropos} def
    -
    -
    -/** @BeginDocumentation
    -Name: which - Display the name of a command's source file.
    -
    -Synopsis: /command which -> 
    -
    -Description:
    -"which" displays the name of the file containing the documentation
    -header for /command. This is most likely the location, where the
    -command was defined.
    -
    -Parameters:
    -/command - commandname, as listed by "helpindex", including a
    -           possible namespace prefix (see examples)
    -
    -Examples:
    - /which which
    - -> Source: /home/kupper/nest2/lib/sli/helpinit.sli
    -
    - /MemoryInfo which
    - -> Source: /home/kupper/nest2/nestkernel/nestmodule.cpp
    -
    - /unittest::pass_or_die which
    - -> Source: /home/kupper/nest2/lib/sli/unittest.sli
    -
    -Diagnostics:
    -Raises /NoHelpInformationError if the command is undocumented.
    -
    -Author: R Kupper
    -
    -FirstVersion: 23-jul-2008
    -
    -Availability: Standard SLI
    -
    -SeeAlso: helpindex, help, apropos
    -*/
    -
    -/which[/literaltype /c]
    -{
    -  /helpfilename c cvs HelpExtension join def
    -  
    -  helpfilename HelpSearchPath exch LocateFileNames  %Find *.hlp-File in HelpSearchPath
    -
    -  dup [] eq not %Was a help file found?
    -  {%yes, a helpfile was found
    -    0 get (^[[:space:]]*Source: ) grep
    -    {=} forall
    -  }
    -  {%no, no helpfile was found
    -    pop    
    -    funcname /NoHelpInformationError raiseerror
    -  } ifelse
    -} SLIFunctionWrapper
    -
    diff --git a/lib/sli/library.sli b/lib/sli/library.sli
    deleted file mode 100644
    index 41400027dc..0000000000
    --- a/lib/sli/library.sli
    +++ /dev/null
    @@ -1,517 +0,0 @@
    -/*
    - *  library.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -systemdict begin
    -
    -/** @BeginDocumentation
    -Name: namespace - Open a namespace
    -
    -Synopsis:
    -/name namespace ...your.code... end -> -
    -
    -Description: 
    -"namespace" provides to SLI the concept of namespaces,
    -  as known from C++. 
    -
    -The command changes the current scope to the namespace of the given
    -  name, i.e.,
    -  - all following symbol definitions go to this namespace
    -  - all symbols that were previously defined in this namespace become
    -    known
    -The namespace must be closed by an "end" statement.
    -
    -The symbols defined in a namespace persist across closing and
    -  re-opening of the namespace. Namespaces can be nested.
    -
    -For alternative ways of accessing a namespace,
    -  see "using" and "call".
    -
    -Parameters:
    -  /name - the namespace to open
    -
    -Examples:
    -/myspace namespace % this opens namespace "myspace"
    -  /var 23 def      % this creates the variable "myspace::var"
    -  /func {(This is stupid.) =} def % this creates the function "myspace::func"
    -end                % this closes the namespace "myspace"
    -
    -/myspace namespace % this re-opens the namespace "myspace"
    -  who              % this shows the variables defined in the namespace
    -end                % this closes the namespace "myspace"
    -
    -myspace /func call % this calls "myspace::func"
    -
    -Diagnostics:
    -If the named object is not a dictionary, TypeMismatchError is raised.
    -
    -Author:
    -Ruediger Kupper
    -
    -FirstVersion:
    -21-jul-2003
    -
    -Remarks:
    -Currently, namespaces are implemented as
    -  dictionaries. Namespaces may become more tightly
    -  integrated with the SLI interpreter in future.
    -The idea is to define a set of symbols not in the global user
    -  dictionary, but in a separate dictionary that has the name of the
    -  namespace. Thus, symbols in different namespaces can have
    -  identical names, and are effectively disambiguated by the current
    -  dictionary context.
    -Note that the namespace dictionary is looked up and created in the
    -  current scope. This is to allow for nested namespaces.
    -
    -Availability: SLI2.0
    -
    -References:
    -[1] Ruediger Kupper, SLI library management,
    -    HRI-EU Report 06/05, Honda Research Institute Europe GmbH, 2006.
    -
    -SeeAlso: call, using, endusing
    -*/
    -  /namespace[/literaltype]
    -  {
    -    %stack: /name
    -    dup
    -    lookup
    -    {%stack: /name dict
    -      dup type /dictionarytype neq
    -      {
    -        pop
    -        M_ERROR (namespace) (Object is not a dictionary.) message
    -        /namespace /TypeMismatchError raiseerror          
    -      } if        
    -      begin
    -        pop
    -    }
    -        {%stack: /name
    -          << >> dup rolld Set
    -          begin
    -        } ifelse        
    -  } bind def
    -
    -  
    -
    -/** @BeginDocumentation
    -Name: using - Make symbols of a namespace or dictionary available in the current scope.
    -
    -Synopsis:
    -/namespace     using ...your.code... endusing -> -
    -<<dictionary>> using ...your.code... endusing -> -
    -
    -Description:
    -The 'using' statement provides read access to a namespace or
    -  dictionary, without changing the current scope for new symbol
    -  definitions.
    -
    -The 'using' statement must be closed by 'endusing'.
    -
    -**********************************************************************
    -* IMPORTANT:                                                         *
    -* The 'using' statement puts the specified namespace                 *
    -* or dictionary in the second position of the dictionary stack. This *
    -* means that LOCAL SYMBOLS WILL SHADOW SYMBOLS OF THE SAME NAME FROM *
    -* THE SPECIFIED NAMESPACE OR DICTIONARY. This makes the 'using'      *
    -* statement unsafe in all situations where you do not have explicit  *
    -* control of the current dictionary. YOU MAY END UP CALLING A        *
    -* FOREIGN SYMBOL.                                                    *
    -* There are two ways to avoid this problem:                          *
    -* (a) use 'namespace' or 'call', which provide read/write access to  *
    -*           the namespace or dictionary and don't have the shadowing *
    -*           problem.                                                 *
    -* (b) put an empty dictionary on the dictionary stack at the         *
    -*           beginning of your routine, providing a local symbol      *
    -*           scope for your routine. The 'SLIFunctionWrapper'         *
    -*           command does this for you automatically.                 *
    -**********************************************************************
    -
    -Parameters:
    - /name          - name of the the namespace to use
    - <<dictionary>> - dictionary to use         
    -
    -Examples:
    - % the following makes the routines of the unittest library available to the current scope:
    - (unittest) run
    - /unittest using
    -   ..your code..
    - endusing
    -
    -Diagnostics:
    -If the name is not known,  UndefinedNameError is raised.
    -If the name is not bound to a dictionary, TypeMismatchError is raised.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 6-aug-2003
    -
    -Remarks:
    -Please note that 'using'/'endusing' is implemented by the opening and
    -closing of dictionaries. Code between 'using' and 'endusing' should
    -hence have completely matched 'begin' and 'end' statements, or special
    -care must be taken when using non-matched 'begin'/'end' constructs
    -inside a 'using' context.
    -
    -Availability: SLI2.0
    -
    -References:
    -[1] Ruediger Kupper, SLI library management,
    -    HRI-EU Report 06/05, Honda Research Institute Europe GmbH, 2006.
    -
    -SeeAlso: endusing, namespace, call
    -*/
    -/using[/dictionarytype]
    -{
    -  %stack: dict
    -  currentdict
    -  exch begin begin       
    -} bind def
    -
    -/using[/literaltype]
    -{
    -  %stack: /name
    -  dup  
    -  lookup not
    -  { 
    -    M_ERROR (using) (A namespace or dictionary of the given name is not known.) message
    -    /using /UndefinedNameError raiseerror          
    -  } if
    -
    -  %stack: /name dict
    -  dup type /dictionarytype neq
    -  {
    -    pop
    -    M_ERROR (using) (Object is not a namespace or dictionary.) message
    -    /using /TypeMismatchError raiseerror          
    -  } if        
    -  
    -  %stack: /name dict
    -  exch pop
    -  
    -  %stack: dict
    -  % call the dictionary variant  
    -  using
    -} bind def  
    -
    -
    -
    -/** @BeginDocumentation
    -Name: endusing - Close the scope of a 'using' context.
    -
    -Synopsis: /namespacename using ...your.code... endusing -> -
    -
    -Description:
    -'endusing' must be used to close a 'using' statement.
    -For further information, see 'using'.
    -
    -Examples:
    - % the following makes the routines of the unittest library available to the current scope:
    - (unittest) run
    - /unittest using
    -   ..your code..
    - endusing
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 6-aug-2003
    -
    -Remarks:
    -Please note that 'using'/'endusing' is implemented by the opening and
    -closing of dictionaries. Code between 'using' and 'endusing' should
    -hence have completely matched 'begin' and 'end' statements, or special
    -care must be taken when using non-matched 'begin'/'end' constructs
    -inside a 'using' context.
    -
    -Availability: SLI2.0
    -
    -References:
    -[1] Ruediger Kupper, SLI library management,
    -    HRI-EU Report 06/05, Honda Research Institute Europe GmbH, 2006.
    -
    -SeeAlso: using, namespace, call
    -*/
    -/endusing
    -{
    -  end
    -  end
    -} bind def
    -
    -
    -
    -% ========= Implementation of :: begins here =========
    -%           (sorry, this is a length piece of code)
    -
    -/** @BeginDocumentation
    -Name: :: - execute a symbol from a nested namespace
    -
    -Synopsis: A/name ::       -> executes A::name (symbol "name" from namespace "A")
    -          A/B/name ::     -> executes A::B::name
    -          A/B/C/name ::   -> executes A::B::C::name
    -          A/B/C/D/name :: -> executes A::B::C::D::name
    -
    -
    -Description:
    -The :: operator looks up and executes a symbol from a nested namespace.
    -
    -The normal rules for symbol execution apply, i.e.
    -  - if the symbol is a variable, its value is returned.
    -  - if the symbol is a routine, it is executed.
    -
    -The symbol is executed in the full nested context, i.e.
    -  if you call a routine "A/B/C/routine ::", the routine can
    -  access symbols from namespaces "A", "B" and "C" as if
    -  the namespaces had been opened in this order.
    -  "A/B/.../name ::" is equivalent to:
    -  /A namespace
    -    /B namespace
    -      ...
    -        name
    -      ...
    -    end
    -  end
    -
    -The lookup is safe in the sense that, if the symbol cannot be found,
    -the scope will stay unchanged, so that the user can safely recover
    -from the error. If however the called symbol is a routine and this
    -routine raises an error, the user will find the interpreter at the
    -scope of the nested routine.
    -
    -Parameters:
    -A,B,C,D: nested namespaces
    -name: name of the symbol to look up and execute
    -
    -Examples:
    -SLI ] /A namespace
    -SLI ]   /B namespace
    -SLI ]     /myvar 23 def
    -SLI ]   end
    -SLI ] end
    -SLI ] A/B/myvar :: =
    -   -> 23
    -
    -SLI ] /X namespace
    -SLI ]   /var_in_x 23.5 def
    -SLI ]   /Y namespace
    -SLI ]     /func {var_in_x =} def
    -SLI ]   end
    -SLI ] end
    -SLI ] X/Y/func ::
    -   -> 23.5
    -
    -Diagnostics:
    -If the symbol cannot be found at the specified nested position,
    -/UnknownMember is raised. In this case, the operand and dictionary
    -stacks will stay unchanged, so that the user can safely recover from
    -the error.
    -
    -If the called symbol is a routine and this routine raises an error,
    -the scope will be that of the nested routine.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 17-jun-2008
    -
    -Remarks:
    -Currently implemented up to a depth of four nested namespaces.
    -
    -SeeAlso: namespace, call
    -*/
    -
    -% --------- parameter checking routines for :: ----------------
    -/::checknestedlookup[/dictionarytype /A
    -                     /arraytype      /symbols]
    -% Returns true if the nested lookup worked for all symbols.
    -% Prints a message and returns false if the nested symbol cannot be looked up.
    -{
    -  % all members of the array must be literals
    -
    -  /result true def  
    -
    -  /ns A def % current namespace
    -  
    -  % first check the namspaces:  
    -  symbols Most % all but last symbol (the namespaces)  
    -  {
    -    1 add /depth Set
    -    /nextnslit Set 
    -        
    -    % check if /nextnslit is a member of ns and if ot refers to a dictionary:
    -    % The following test yields true if symbol is known and a dictionary, false, else.    
    -    ns nextnslit known
    -    {
    -      ns nextnslit get  type /dictionarytype  eq
    -    }
    -    {
    -      false      
    -    } ifelse  
    -   
    -    not { % symbol is either unknown or not a dictionary
    -      M_ERROR (Nested symbol lookup (::))
    -      (At depth )
    -      depth cvs join
    -      (: /) join
    -      nextnslit cvs join
    -      ( is not a nested namespace.) join
    -      message      
    -
    -      % set result to false and exit the forall loop:
    -      /result false def
    -      exit
    -    } if
    -
    -    % okay, iterate:
    -    /ns  ns nextnslit get  def
    -  } forallindexed  
    -
    -  % continue only if result is still true:  
    -  result {
    -    % now check the last symbol:
    -    ns  symbols Last  known  not
    -    { % symbol is not known
    -      M_ERROR (Nested symbol lookup (::)) 
    -      (At depth )
    -      depth 1 add cvs join
    -      (: /) join
    -      symbols Last cvs join
    -      ( is not a member of this nested namespace.) join
    -      message
    -
    -      % set result to false:
    -      /result false def
    -    } if
    -  } if
    -
    -  % leave the result on the stack
    -  result
    -} bind SLIFunctionWrapper
    -
    -/::checknestedlookupandraise
    -% Call ::checknestedlookup appropriately and raise an error if it returns false.
    -{
    -  % <<A>> /literals.../literals  n_literals
    -  arraystore
    -  % <<A>> [/literals.../literals]
    -  2 copy
    -  % <<A>> [/literals.../literals] <<A>> [/literals.../literals]
    -  ::checknestedlookup not
    -  { % check not passed. restore stack and raise error
    -    % <<A>> [/literals.../literals]
    -    arrayload pop
    -    /:: /UnknownMember raiseerror
    -  } if
    -  % test passed, restore stack:
    -  arrayload pop
    -} bind def
    -
    -% --------- :: routines that really do the work ----------------
    -/::depth1_%[/dictionarytype /literaltype]
    -/call load def
    -
    -/::depth2_%[/dictionarytype /literaltype /literaltype]
    -%           <<A>>           /B           /C
    -{
    -  3 -2 roll
    -  % /C <<A>> /B  
    -  1 index begin %open namespace A
    -    % /C <<A>> /B
    -    get % get /B from <<A>>
    -    % /C <<B>>
    -    exch
    -    % <<B>> /C
    -    ::depth1_ %recurse
    -  end %close namespace A
    -} bind def
    -
    -/::depth3_%[/dictionarytype /literaltype /literaltype /literaltype]
    -%           <<A>>           /B           /C           /D
    -{
    -  4 -2 roll
    -  % /C /D <<A>> /B
    -  1 index begin %open namespace A
    -    % /C /D <<A>> /B
    -    get %get /B from <<A>>
    -    % /C /D <<B>>
    -    rollu
    -    % <<B>> /C /D
    -    ::depth2_ %recurse   
    -  end %close namespace A
    -} bind def
    -
    -/::depth4_%[/dictionarytype /literaltype /literaltype /literaltype /literaltype]
    -%           <<A>>           /B           /C           /D           /E
    -{
    -  5 -2 roll
    -  % /C /D /E <<A>> /B
    -  1 index begin %open namespace A
    -    % /C /D /E <<A>> /B
    -    get %get /B from <<A>>
    -    % /C /D /E <<B>>
    -    4 1 roll
    -    % <<B>> /C /D /E
    -    ::depth3_ %recurse   
    -  end %close namespace A
    -} bind def
    -
    -% --------- safe type tries for the different variants of ::  ----------------
    -/::[/dictionarytype /literaltype]
    -/::depth1_ load def
    -
    -/::[/dictionarytype /literaltype /literaltype]
    -{2 ::checknestedlookupandraise  ::depth2_} bind def
    -
    -/::[/dictionarytype /literaltype /literaltype /literaltype]
    -{3 ::checknestedlookupandraise  ::depth3_} bind def
    -
    -/::[/dictionarytype /literaltype /literaltype /literaltype /literaltype]
    -{4 ::checknestedlookupandraise  ::depth4_} bind def
    -
    -% ========= Implementation of :: ends here =========
    -
    -
    -
    -/** @BeginDocumentation
    -Name: initialize_module - Initialize module by executing commandstring
    -
    -Synopsis:
    -commandstring initialize_module -> -
    -
    -Description:
    -Executes the command string provided by a module to initialize it.
    - */
    -		/initialize_module[/stringtype]
    -		{
    -		  << >> begin
    -		  /initializer Set
    -		  systemdict begin
    -		  { initializer
    -		    M_DEBUG (sli-init) (Executing module initializer: ) 3 index join message
    -		    cvx exec } stopped
    -		  { 
    -		    M_FATAL (sli-init) (While executing module initializer: {) initializer join (}) join message
    -		    handleerror
    -		    start
    -		  } if
    -		  end end
    -		} bind def
    -
    -end % systemdict
    -
    diff --git a/lib/sli/mathematica.sli b/lib/sli/mathematica.sli
    deleted file mode 100644
    index 3d2d5952f8..0000000000
    --- a/lib/sli/mathematica.sli
    +++ /dev/null
    @@ -1,4955 +0,0 @@
    -/*
    - *  mathematica.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -%% Mathematica style global Options
    -
    -/** @BeginDocumentation
    -Name: OptionsDictionary - Dictionary for global options
    -Synopsis: none
    -
    -Description:
    -This dictionary contains the global option for
    -certain functions. Within the dictionary each
    -function name is associated with a dictionary
    -which contains the options for that function.
    -
    -Note that the accessibility, i.e. the dicitonary
    -in which a function is defined is not accounted for.
    -
    -It is suggested that you use a C++-like notation to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Diagnostics: None.
    -Author: M. O. Gewaltig
    -
    -SeeAlso: GetOption, GetOptions, ShowOptions, SetOptions, Options, ResetOptions, SaveOptions, RestoreOptions
    -*/
    -
    -/OptionsDictionary << >> def
    -
    -/** @BeginDocumentation
    -Name: Options - Define a new set of options for a given name.
    -Synopsis: /f  optiondict Options -> --
    -
    -Description:
    -Options defines a set of options for a name.
    -The options are supplied in a dictionary. Old
    -option values are overwritten by this operation.
    -Options should be used to initially define a
    -set of options for a given name. Use SetOptions
    -to modify one or more options from this set.
    -
    -In addition to the supplied options, Options adds
    -the options /DefaultOptions with the original option
    -values.
    -
    -It is suggested that you use a C++-like notation to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Diagnostics: None
    -Author: M. O. Gewaltig
    -
    -SeeAlso: GetOption, GetOptions, ShowOptions, SetOptions, ResetOptions, SaveOptions, RestoreOptions, OptionsDictionary
    -*/
    -
    -/Options
    -trie [/literaltype /dictionarytype]
    -{
    -  systemdict
    -  begin
    -   OptionsDictionary
    -   begin
    -    2 copy
    -    def
    -   end
    -   begin % Open Options
    -    /DefaultOptions currentdict clonedict exch pop def
    -   end
    -   pop
    -  end
    -} bind addtotrie def
    -
    -/** @BeginDocumentation
    -Name: SetOptions - Set options for a given name
    -Synopsis: /f  optiondict SetOptions -> --
    -
    -Description:
    -SetOptions set all option values given in
    -the supplied dictionary. Options which are not listed
    -in this dicitonary are not modified.
    -Note that only those options can be modified which were
    -initially defined by the Options command.
    -
    -Use the option /DefaultOptions to retrieve the default
    -values for all options.
    -
    -Usually, a C++-like notation is used to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Diagnostics: SetOptions gives a warning message for each unknown
    -             options it encounters.
    -
    -Author: M. O. Gewaltig
    -
    -SeeAlso: GetOption, GetOptions, ShowOptions, Options, ResetOptions, SaveOptions, RestoreOptions, OptionsDictionary
    -*/
    -
    -/SetOptions
    -trie [/literaltype /dictionarytype]
    -{
    -  1 index GetOptions
    -    begin
    -    cva 2 2 Partition
    -    {
    -      arrayload pop
    -      exch cvlit
    -      dup DefaultOptions exch known
    -      {
    -        exch def
    -      }
    -      {
    -        M_WARNING exch (SetOptions) exch cvs (Unknown option for command ') 5 index cvs join (': ) join exch join message
    -        pop
    -      } ifelse
    -    } forall
    -    pop
    -    end
    -} bind addtotrie def
    -
    -/** @BeginDocumentation
    -Name: GetOptions - Get all options for a given name
    -Synopsis: /f  GetOptions -> optiondict
    -
    -Description:
    -Usually, a C++-like notation is used to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Diagnostics:
    -Raises /NoOptionsAvailable if there are no
    -options associated with the name.
    -
    -Author: M. O. Gewaltig
    -
    -SeeAlso: GetOption, ShowOptions, SetOptions, Options, ResetOptions, SaveOptions, RestoreOptions, OptionsDictionary
    -*/
    -
    -/GetOptions
    -{
    -  systemdict
    -  begin
    -    OptionsDictionary 1 index known
    -    {
    -      OptionsDictionary exch get
    -    }
    -    {
    -    end	/GetOptions /NoOptionsAvailable raiseerror
    -    } ifelse
    -  end
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: ShowOptions - Display all options for a given name
    -Synopsis: /f  ShowOptions -> --
    -
    -Description:
    -Usually, a C++-like notation is used to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Diagnostics: None
    -Author: M. O. Gewaltig
    -SeeAlso: GetOption, GetOptions, SetOptions, Options, ResetOptions, SaveOptions, RestoreOptions, OptionsDictionary
    -*/
    -
    -/ShowOptions
    -{
    -  GetOptions info
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: GetOption - get the value of a procedure option
    -Synopsis: /f /opt GetOption -> val
    -
    -Description:
    -Retrieves the value for a specific option
    -of a function.
    -
    -Usually, a C++-like notation is used to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Diagnostics: Raises UnknownOption if the supplied option
    -             is unknown.
    -
    -SeeAlso: GetOptions, ShowOptions, SetOptions, Options, ResetOptions, SaveOptions, RestoreOptions, OptionsDictionary
    -*/
    -
    -/GetOption
    -{
    -  1 index GetOptions % /f /opt << >>
    -  dup 2 index known
    -  {
    -    1 index get
    -    3 1 roll 2 npop
    -  }
    -  {
    -    2 npop
    -    /GetOption /UnknownOption raiseerror
    -  } ifelse
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: SaveOptions - temporarily save options of a command
    -
    -Synopsis:
    -  /f SaveOptions -> -
    -
    -Description:
    -
    -Usually, a C++-like notation is used to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 7.3.2003
    -
    -SeeAlso: GetOption, GetOptions, ShowOptions, SetOptions, Options, ResetOptions, RestoreOptions, OptionsDictionary
    -*/
    -
    -/SaveOptions [/literaltype]
    -{
    -  %stack: /f
    -  GetOptions clonedict
    -  %stack: <<options>> <<copy-of-options>>
    -  dup /DefaultOptions undef
    -  /SavedOptions exch put
    -} def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: RestoreOptions - Restore the temporaryly saved options of a command
    -
    -Synopsis:
    -  /f RestoreOptions -> -
    -
    -Description:
    -
    -Usually, a C++-like notation is used to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 7.3.2003
    -
    -SeeAlso: GetOption, GetOptions, ShowOptions, SetOptions, Options, ResetOptions, SaveOptions, OptionsDictionary
    -*/
    -
    -/RestoreOptions [/literaltype]
    -{
    -  %stack: /f
    -  dup dup /SavedOptions GetOption
    -  %stack: /f /f <<saved-options>>
    -  SetOptions
    -  %stack: /f
    -  GetOptions /SavedOptions undef
    -} def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: ResetOptions - Reset all options of a command to their default values.
    -
    -Synopsis:
    -  /f ResetOptions -> -
    -
    -Description:
    -
    -Usually, a C++-like notation is used to indicate the
    -availability of the function, if the function is defined in some
    -"namespace" dictionary.
    -For example: "arr::Mean".
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 28.3.2003, by copy-paste-and-modify from RestoreOptions
    -
    -SeeAlso: GetOption, GetOptions, ShowOptions, SetOptions, Options, SaveOptions, RestoreOptions, OptionsDictionary
    -*/
    -
    -/ResetOptions [/literaltype]
    -{
    -  %stack: /f
    -  dup /DefaultOptions GetOption
    -  %stack: /f <<default-options>>
    -  SetOptions
    -} def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: JoinTo - Join an object to a container
    -
    -Synopsis:
    -array literal JoinTo -> --
    -dict  literal JoinTo -> --
    -Description:
    - Assignment like AddTo. Compared to Mathematica the order of
    - arguments is reversed here, because its more readable to
    - have the l-value close to the assignment operator,
    - like in ... // Set[x,#]& .
    - Allows for optimization of code.
    -Examples:
    -/j [4 5] def [6 7 8] /j JoinTo j --> [4 5 6 7 8]
    -/j << /C_m 250.0 /Tau_m 10.0 >> def
    -<< /Tau_m 25.0 /I_e 130.0 >> /j JoinTo j --> << /C_m 250.0 /Tau_m 25.0 /I_e 130.0 >>
    -
    -SeeAlso: Set, AppendTo, MergeDictionary
    -*/
    -/JoinTo_cont
    -{
    - dup load
    - 3 -1 roll
    - join
    - def
    -} bind def
    -
    -/JoinTo_ald
    -{
    - 2 copy    % v l d l d
    - 5 2 roll  % l d v l d
    - exch      % l d v d l
    - get_d     % l d v a
    - exch      % l d a v
    - join      % l d av
    - exch      % l av d
    - rollu     % d l av
    - put_d
    -} def
    -
    -/JoinTo_d
    -{
    -  load     % d2 d1
    -  exch     % d1 d2
    -  join_d
    -} def
    -
    -/JoinTo trie
    -[/arraytype /literaltype /dictionarytype] /JoinTo_ald load addtotrie
    -[/stringtype /literaltype /dictionarytype] /JoinTo_ald load addtotrie
    -[/arraytype /literaltype] /JoinTo_cont load addtotrie
    -[/stringtype /literaltype] /JoinTo_cont load addtotrie
    -[/dictionarytype /literaltype] /JoinTo_d load addtotrie
    -def
    -
    -
    -%
    -%  /j << /C_m 250.0 /Tau_m 10.0 >> def
    -%   j << /Tau_m 25.0 /I_e 130.0 >> join_d
    -%
    -%  --> << /C_m 250.0 /Tau_m 25.0 /I_e 130.0 >>
    -%
    -/join_d
    -{
    - % d1 d2
    -  cva 2 2 Partition
    -  {
    -    1 index exch
    -    arrayload pop
    -    put
    -  } forall
    - pop
    -} def
    -
    -
    -/join
    - /join load
    - [/dictionarytype /dictionarytype] /join_d load addtotrie
    -def
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: AppendTo - Append an object to a container
    -
    -Synopsis: any literal AppendTo -> --
    -
    -Description:
    - Assignment like AddTo. Compared to Mathematica the order of
    - arguments is reversed here, because its more readable to
    - have the l-value close to the assignment operator,
    - like in ... // Set[x,#]& .
    - Allows for optimization of code.
    -Examples: /j [4 5] def  7 /j AppendTo j --> [4 5 7]
    -Author: Diesmann
    -FirstVersion: 8.5.01
    -SeeAlso: Set, JoinTo
    -*/
    -/AppendTo
    -[/anytype /literaltype]
    -{
    - dup load
    - 3 -1 roll
    - append
    - def
    -}
    -def
    -
    -/AppendTo
    -[/anytype /literaltype /dictionarytype]
    -{
    - 2 copy    % v l d l d
    - 5 2 roll  % l d v l d
    - exch      % l d v d l
    - get_d     % l d v a
    - exch      % l d a v
    - append    % l d av
    - exch      % l av d
    - rollu     % d l av
    - put_d
    -} def
    -
    -
    -
    -
    -% documentation in sli/slicontrol.cc
    -/Set_ /Set load def
    -
    -/Set trie
    -  [/anytype /literaltype] /Set_ load addtotrie
    -def
    -
    -/Set
    -[/arraytype /arraytype]
    -{
    -2 arraystore Transpose
    -{
    - arrayload ;
    - Set
    -}
    -forall
    -
    -}
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: ReplacePart - replaces particular elements of an array
    -Synopsis: array1 any integer ReplacePart -> array3
    -          array1 any array2  ReplacePart
    -Description:
    - Replaces the elements of array1 specified by the integer or
    - by array2 with the 2nd argument any and returns the resulting
    - array.
    -Parameters:
    - The integer specifies a position in array1. array2 specifies a
    - multi-dimensional position [i, j,...] in array1 or a list of
    - positions [ [i1,j1,...], [i2,j2,...], ...].
    -Examples:
    - [3, {-11, 5}, {9}, 7] 4 2 ReplacePart
    -  -> [3 4 [9] 7]
    - [3 [-11 5] [9] 7] 4 [2 1] ReplacePart
    -  -> [3 [4 5] [9] 7]
    - [3 [-11 5] [9] 7] 4 [[2] [4]] ReplacePart
    -  -> [3 4 [9] 4]
    - [3 [-11 5] [9] 7] 4 [[2 1] [3 1]] ReplacePart
    -  -> [3 [4 5] [4] 7]
    -
    -Author: Diesmann
    -FirstVersion: 2007.11.28
    -Remarks:
    - The variant of this function with four arguments is not implemented
    -SeeAlso: MapAt, ReplaceOccurrences, Part
    -References:
    -   [1] The Mathematica Book V4.0 "Part"
    -*/
    -
    -/ReplacePart [/arraytype /anytype /integertype]
    -{
    - % a v i
    - ReplacePart_i_
    -} def
    -
    -/ReplacePart_i_
    -{
    - % a v i
    - exch
    - % a i v
    - rollu
    - % v a i
    - 2 copy
    - % v a i a i
    - [1] exch 1 sub append
    - % v a i a [1 i-1]
    - Take
    - % v a i al
    - rollu
    - % v al a i
    -  2 copy exch length lt
    -  {
    -    [-1] exch 1 add prepend
    -    %  v al a [i+1 -1]
    -    Take
    -  }
    -  {
    -    2 npop
    -    []
    -  } ifelse
    -
    - % v al ar
    - rolld
    - % al ar v
    - prepend
    - % al var
    - join
    -} def
    -
    -/ReplacePart [/arraytype /anytype /arraytype]
    -{
    - % a v i
    - dup First
    - % a v i First(i)
    - ArrayQ
    - {
    -  % a v i First(i)
    -  pop
    -  % a v i, First(i) is an array: i is list of indices
    -  {
    -   % a v k, with k iterating over First(i)
    -   1 index
    -   % a v k v
    -   4 1 roll
    -   % v a v k
    -   ReplacePart_a_
    -   % v a
    -   exch
    -   % a v
    -  }
    -  forall
    -  % a v
    -  pop
    -  % a
    - }
    - {
    -  % a v i First(i)
    -  pop
    -  % a v i, First(i) is not an array: i is mult-dim index
    -  ReplacePart_a_
    - }
    - ifelse
    -} def
    -
    -/ReplacePart_a_
    -{
    - % a v i, i is multi-dim index
    - dup length
    - 1 eq
    - {
    -  % a v i, i has length 1
    -  First
    -  % a v ii
    -  ReplacePart_i_
    - }
    - {
    -  % a v i, i has more than 1 element
    -  exch
    -  % a i v
    -  rollu
    -  % v a i
    -  dup Rest
    -  % v a i ir
    -  rollu
    -  % v ir a i
    -  First
    -  % v ir a First(i)
    -  2 copy 2 copy
    -  % v ir a i a i a i
    -  [1] exch 1 sub append
    -  % v ir a i a i a [1 i-1]
    -  Take
    -  % v ir a i a i al
    -  5 1 roll
    -  % v ir al a i a i
    -  [-1] exch 1 add prepend
    -  % v ir al a i a [i+1 -1]
    -  Take
    -  % v ir al a i ar
    -  rollu
    -  % v ir al ar a i
    -  MathematicaToSliIndex_i get
    -  % v ir al ar ai
    -  5 -2 roll
    -  % al ar  ai v ir
    -  ReplacePart_a_
    -  % al ar vi
    -  prepend
    -  % al viar
    -  join
    -  % a
    - }
    - ifelse
    -} def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: ReplaceOccurrences - replace the occurences of a key in a container
    -Synopsis:  l1 l2 l3 ReplaceOccurrences l4
    -Description:
    - Replaces all occurences of l2 in l1 by l3 and
    - returns the result. Works for strings and arrays.
    -
    -Examples:
    -  (L: 'Where?') (') ('') ReplaceOccurrences (L: ''Where?'')
    -  [4 5 6 7 5 8 9] [5] [-1 -2]  ReplaceOccurrences
    -Author: -unknown- Diesmann? Hehl?
    -*/
    -
    -/ReplaceOccurrences
    -{
    -<< >>
    -begin
    - container /r Set_            % create empty object
    - /v Set_                      % save replacement
    - {
    -  search
    -  exch_                        % get pre save boolean
    -  /r JoinTo                   % append pre to r
    -  {r v join /r Set_     }      % append '' if ' leave post and match
    -  {exit}                      % ready
    -  ifelse
    - } loop
    - r
    -end
    -} bind def
    -
    -
    -
    -% Map:   string procedure Map array
    -% ----
    -%
    -% Example:
    -%    (1 2 3) {1 add} Map_s --> (2!3!4)
    -%
    -
    -/Map_s
    -{
    - mark
    - 3 1 roll
    - forall_s
    - counttomark
    - () exch
    - {
    -   exch append
    - } repeat
    - reverse exch pop
    -
    -} bind def
    -
    -
    -% a p a
    -% presently less general than the Mathematica version.
    -% the level specification is restriced to [n], 130222 MD
    -/MapAtLevel
    -{
    - 0 get 
    - MapRecursion
    -} def
    -
    -/MapRecursion
    -{
    -        % a p i
    - dup    % a p i i
    - 1 gt   % a p i b
    - {
    -         % a p i
    -  1 sub  % a p i
    -  rolld  % p i a
    -
    -  {
    -             % p i ai 
    -   rollu     % ai p i
    -   2 copy    % ai p i p i
    -   5 -1 roll % p i p i ai
    -   rollu     % p i ai p i
    -   MapRecursion
    -  } Map
    -          % p i a
    -  rollu   % a p i 
    -  2 npop  % a
    - }
    - {pop Map}
    - ifelse
    -} def
    -
    -
    -/Map_ /Map load def
    -/Map trie
    -[/arraytype /proceduretype] /Map_ load addtotrie
    -[/arraytype /proceduretype /arraytype] /MapAtLevel load addtotrie
    -[/stringtype /proceduretype] /Map_s load addtotrie
    -def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: MapAt - applies a function to some of the elements of its argument
    -Synopsis: array1 proc array2 MapAt -> array3
    -Description:
    - MapAt successively applies proc to the elements of array1
    - specified by array2 and replaces the original values by the
    - return value of proc. The return value array3 has exactly the
    - same shape as the first argument array1.
    -
    - Compared to languages like Matlab MapAt constitutes an lhs
    - assignment operator for constructs like a(i)=f(a(i)), where
    - i may be an array of indices. However, unlike in Matlab no
    - temporary object a(i) for the rhs expression is created.
    - Consequently, if the index ii occurs in array i n times the
    - final value of a(ii) returned by MapAt is the cumulative effect
    - of f operating n times on the original value of a(ii):
    -   a(ii) <- f(f(...f(a(ii))...))
    -             n times
    - In Matlab the result is f(a(ii)), independent of n.
    - The behavior of MapAt is, for example, useful in counting
    - processes like the construction of a histogram as shown in the
    - last example of the examples section.
    -
    - Parameters:
    -  array1 is an arbitrarily shaped array. In particular
    -  it does not need to be rectangular.
    -  array2 specifies a multi-dimensional position [i, j,...]
    -  in array1 or a list of positions [ [i1,j1,...], [i2,j2,...], ...].
    -  The same element may be specified multiple times in array2 at
    -  arbitrary positions.
    -
    -  The first element on each level has index 1. Indices can also
    -  be specified counting from the end of the array, in this case the
    -  last element has index -1. Positive and negative indices can
    -  arbitrarily be intermixed.
    -
    -Examples:
    -
    -  [3 4 5 6 7] {dup mul} -2 MapAt
    -   -> [3 4 5 36 7]
    -  [3 [-9 -12] 5 6 7] {dup mul} [2 2] MapAt
    -   -> [3 [-9 144] 5 6 7]
    -  [3 4 5 6 7] {dup mul} [[1] [3]] MapAt
    -   -> [9 4 25 6 7]
    -  [[3 9] 4 [5 -11] 6 7] {dup mul} [[1 2] [3 1]] MapAt
    -   -> [[3 81] 4 [25 -11] 6 7]
    -
    -  [0 0 0 0 0] {1 add} [2 4 5 2 3 2 2 5] 1 1 Partition MapAt
    -   -> [0 4 1 1 2]
    -
    -Author: Diesmann
    -FirstVersion: 2007.08.12
    -Remarks:
    - This function is an implementation of Mathematica's MapAt function.
    - Mathematica-style functions in SLI use Mathematica index notation.
    -SeeAlso: ReplacePart, Part, Map, Partition
    -References:
    - [1] The Mathematica Book V4.0 "Part"
    -*/
    -
    -/MapAt [/arraytype /proceduretype /integertype]
    -{
    - % a f i
    - MapAt_i_
    -} def
    -
    -/MapAt_i_
    -{
    - % a f i
    - exch
    - % a i f
    - rollu
    - % f a i
    - 2 copy
    - % f a i a i
    - 5 2 roll
    - % a i f a i
    - MathematicaToSliIndex_i get
    - % a i f ai
    - exch
    - % a i ai f
    - exec
    - % a i v
    - exch
    - % a v i
    - ReplacePart_i_
    -} def
    -
    -
    -/MapAt [/arraytype /proceduretype /arraytype]
    -{
    - % a f i
    - dup First
    - % a f i First(i)
    - ArrayQ
    - {
    -  % a f i First(i)
    -  pop
    -  % a f i, First(i) is an array: i is list of indices
    -  {
    -   % a f k, with k iterating over First(i)
    -   1 index
    -   % a f k f
    -   4 1 roll
    -   % f a f k
    -   MapAt_a_
    -   % f a
    -   exch
    -   % a f
    -  }
    -  forall
    -  % a f
    -  pop
    -  % a
    - }
    - {
    -  % a f i First(i)
    -  pop
    -  % a f i, First(i) is not an array: i is mult-dim index
    -  exch
    -  % a i f
    -  2 index
    -  % a i f a
    -  2 index
    -  % a i f a i
    -  Part
    -  % a i f ai
    -  exch
    -  % a i ai f
    -  exec
    -  % a i aif
    -  exch
    -  % a aif i
    -  ReplacePart_a_
    - }
    - ifelse
    -} def
    -
    -/MapAt_a_
    -{
    - % a f i, i is multi-dim index
    - dup length
    - 1 eq
    - {
    -  % a f i, i has length 1
    -  First
    -  % a f ii
    -  MapAt_i_
    - }
    - {
    -  % a f i, i has more than 1 element
    -  exch
    -  % a i f
    -  2 index
    -  % a i f a
    -  2 index
    -  % a i f a i
    -  First
    -  % a i f a ii
    -  MathematicaToSliIndex_i get
    -  % a i f ai
    -  exch
    -  % a i ai f
    -  2 index
    -  % a i ai f i
    -  Rest
    -  % a i ai f ir
    -  MapAt_a_
    -  % a i aif
    -  exch
    -  % a aif i
    -  First
    -  % a aif ii
    -  ReplacePart_i_
    - }
    - ifelse
    -} def
    -
    -
    -
    -/** @BeginDocumentation
    - Name: Range - Generate array with range of numbers
    - Synopsis:  [N] Range  -> [1 ... N]
    -            [N1 N2] Range -> [N1 ... N2]
    -            [N1 N2 d] Range -> [N1 N1+d N1+2d ...]
    - Description:
    -    Range accepts an array which contains either
    -    1) a single integer
    -    2) an interval specified by two integers or two doubles
    -    3) an interval and a stepsize, specified by three integers or
    -       three doubles.
    -
    -    Range generates an array with numbers which are in the specified
    -    range. The type of the result corresponds to the type used for
    -    specifying the interval.
    -
    -    Range returns an empty array if the set specified by N1, N2 and d
    -    does not contain any element. This behavior is essential if
    -    Range is used in combination with functional operators like
    -    FoldList and NestList.
    -
    - Examples:
    -          [5] Range    -> [1 2 3 4 5]
    -        [2 5] Range    -> [2 3 4 5]
    -        [5 2] Range    -> []
    -        [5 2 -1] Range -> [5 4 3 2]
    -        [1.0 10.0 2.5] Range -> [1 3.5 6 8.5]
    - Bugs:
    - Author: Gewaltig, Diesmann
    - Remarks: Resembles the function Range of Mathematica
    - SeeAlso: LayoutArray, Table, array, zeros, ones, Map
    -*/
    -
    -/Range_ /Range load def
    -/Range trie
    -[/arraytype] /Range_ load addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    - Name: Table - Generate an array according to a given function
    - Synopsis:  [N]       {f} Table  -> [f(1) ... f(N)]
    -            [N1 N2]   {f} Table  -> [f(N1) ...f(N2)]
    -            [N1 N2 d] {f} Table -> [ f(N1) f(N1+d) f(N1+2d) ...]
    - Description:
    -    Table accepts an array which contains either
    -    1) a single integer
    -    2) in interval specified by two integers or two doubles
    -    3) an interval and a stepsize, specified by three integers or
    -       three doubles.
    -    and a procedure object which is to be applied. From the
    -    interval specification an array of numbers is generated, using Range.
    -    The supplied procedure is the applied to each number in the array.
    -
    - Examples:
    -          [5] {2 mul} Table  -> [2 4 6 8 10]
    -        [2 5] {2 mul} Table  -> [4 6 8 10]
    -        [1.0 10.0 2.5] {2 mul} Table  -> [2.0 7.0 12.0 17.0]
    - Bugs:
    - Author: Gewaltig
    - Remarks: Resembles the function Table of Mathematica
    - References:
    - SeeAlso: Map, MapIndexed, Range, LayoutArray, array, forall, forallindexed
    -*/
    -
    -/Table_
    -{
    - mark
    - 3 1 roll
    - exch_ Range exch_
    - forall_a
    - counttomark
    - arraystore
    - exch_ pop_
    -} bind def
    -
    -/Table trie
    -[/arraytype /proceduretype] /Table_ load addtotrie def
    -
    -/** @BeginDocumentation
    -
    -   Name: MapIndexed - Apply a function  to each element of a list/string
    -
    -   Synopsis:
    -     [v1 ... vn] {f} MapIndexed -> [ f(v1,1) ... f(vn,n) ]
    -
    -   Parameters:
    -     [v1 ... vn] - list of n arbitrary objects or string.
    -
    -     {f}         - function of two arguments and one return value.
    -
    -   Description:
    -     For each element of the input array, MapIndexed calls f with
    -     two arguments, the current index and the element. It replaces
    -     the element with the result of f.
    -     MapIndexed works similar to Map, however, in adition to the
    -     element its index within the array is also passed to the function.
    -     Note that the index starts with 1, according to Mathematica convention.
    -     This is unlike in forallindexed where in accordance with Postscript 
    -     array indices start with 0.
    -     The result of MapIndexed is a list with the same number of values as the
    -     argument list.
    -     If f does not return a value, MapIndexed fails.
    -     If f returns more than one value, the result of MapIndexed is
    -     undefined.
    -
    -     Alternatives: Function MapIndexed_a for lists and  MapIndexed_s
    -     for strings (both undocumented) -> behaviour and synopsis are
    -     the same.
    -
    -   Examples:
    -
    -   [1 2 3 4 5]  {add} MapIndexed -> [2 4 6 8 10]
    -   (abcd) {add} MapIndexed -> (bdfh)
    -
    -   Diagnostics: None
    -
    -   Bugs:
    -
    -   Author:
    -    Marc-Oliver Gewaltig
    -
    -   References: The Mathematica Book
    -
    -   SeeAlso: Map, Table, forall, forallindexed
    -
    -*/
    -
    -/*
    -/MapIndexed_a
    -{
    -  mark
    -  3 1 roll
    -  {1 add} exch join  % Mathematica indices start at 1
    -  forallindexed_a
    -  counttomark
    -  arraystore
    -  exch_ pop_
    -} bind def
    -*/
    -
    -/MapIndexed_s
    -{
    - mark
    - 3 1 roll
    - {1 add} exch join  % Mathematica indices start at 1
    - forallindexed_s
    - counttomark
    - () exch_
    - {
    -   exch_ append_s
    - } repeat_
    - reverse exch_ pop_
    -} bind def
    -
    -/MapIndexed trie
    -[/arraytype /proceduretype] /MapIndexed_a load addtotrie
    -[/stringtype /proceduretype] /MapIndexed_s load addtotrie
    -def
    -
    -/MapThread trie
    - [/arraytype /proceduretype] /MapThread_a load addtotrie
    -def
    -
    -% * List Operations
    -/** @BeginDocumentation
    -Name: First - Return the first element of an array or string.
    -
    -Synopsis: string First -> char
    -array First -> arrayelement
    -
    -Examples: (train) First -> 104
    -[1 2 3] First -> 1
    -[(this) (is) (an) (example)] First -> (this)
    -
    -Author: docu edited by Sirko Straube
    -
    -SeeAlso: Last, Rest, Most
    -*/
    -
    -/First { 0 get }    bind def
    -
    -/** @BeginDocumentation
    -Name: Last - Return the last element of an array or string
    -
    -Synopsis: string Last -> char
    -array Last -> arrayelement
    -
    -Examples: (train) Last -> 110
    -[1 2 3] Last -> 3
    -[(this) (is) (an) (example)] Last -> (example)
    -
    -Author: docu edited by Sirko Straube
    -
    -SeeAlso: First, Rest, Most
    -*/
    -/Last  { size 1 sub_ii get } bind def
    -
    -/** @BeginDocumentation
    -Name: Rest - Remove the first element of an array or string and return
    -the rest.
    -
    -Synopsis: string Rest -> string
    -array Rest -> array
    -
    -Examples: (train) Rest -> (rain)
    -[1 2 3] Rest -> [2 3]
    -[(this) (is) (an) (example)] Rest -> [(is) (an) (example)]
    -
    -Author: docu edited by Sirko Straube
    -
    -SeeAlso: First, Last, Most
    -*/
    -/Rest  { 0 1 erase} bind def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: Most - Remove the last element of an array or string and return the rest.
    -Synopsis: string Most -> string
    -array Most -> array
    -
    -Examples: (computer) Most -> (compute)
    -[1 2 3] Most -> [1 2]
    -[(this) (is) (an) (example)] Rest -> [(this) (is) (an)]
    -
    -Remarks:
    -In 2003 this function did not exist in Mathematica and was
    -introduced as LRest by Kupper. Mathematica 5 introduced the
    -function and its SLI Name was changed for compatibility
    -(Apr 2008, Diesmann).
    -
    -Author: Ruediger Kupper, docu edited by Sirko Straube
    -
    -FirstVersion: 10.3.2003
    -SeeAlso: First, Last, Rest
    -*/
    -/Most [/arraytype]  { size 1 sub 1 erase } bind def
    -/Most [/stringtype] { size 1 sub 1 erase } bind def
    -
    -/LRest
    -{
    - M_WARNING (LRest) (LRest deprecated, use Most for Mathematica compatibility) message
    - Most
    -}
    -def
    -
    -
    -/Flatten_ /Flatten load def
    -
    -% a
    -/Flatten_a
    -{
    - /Flatten_ load  % a p
    - FixedPoint__p
    -} def
    -
    -% a i
    -/Flatten_a_i
    -{
    - /Flatten_ load  % a n p
    - exch            % a p n
    - FixedPoint__p_i
    -} def
    -
    -/** @BeginDocumentation
    -Name: Flatten - flatten out a nested list
    -Synopsis:
    -         array         Flatten -> array
    -         array integer Flatten -> array
    -Description:
    -Flatten called with one argument flattens out all levels of
    -the argument. Flatten called with two arguments flattens out
    -the first n levels.
    -Examples:
    -        [3 [4 [5 [6]]] 7] Flatten   -->  [3 4 5 6 7]
    -        [3 [4 [5 [6]]] 7] 1 Flatten -->  [3 4 [5 [6]] 7]
    -        [3 [4 [5 [6]]] 7] 2 Flatten -->  [3 4 5 [6] 7]
    -Author: Gewaltig, Diesmann
    -FirstVersion: Gewaltig
    -References:
    -  [1] The Mathematica Book V4.0 "Flatten"
    -SeeAlso: Partition, FixedPoint
    -*/
    -
    -/Flatten trie
    -[/arraytype /integertype]
    - /Flatten_a_i load  addtotrie
    -[/arraytype ]
    - /Flatten_a load  addtotrie
    -def
    -
    -
    -% x f
    -/FixedPoint__p
    -{
    - exch    % f x
    - {
    -  dup    % f x x
    -  2 pick % f x x f
    -  exec   % f x f(x)
    -  dup    % f x f(x) f(x)
    -  rolld  % f f(x) f(x) x
    -  eq     % f f(x) bool
    -  {
    -   exit
    -  }
    -  if     % f f(x)
    - } loop
    - exch pop % f(x)
    -} def
    -
    -
    -% x f n
    -/FixedPoint__p_i
    -{
    - rollu
    - exch
    - rolld   % f x n
    - {
    -  dup    % f x x
    -  2 pick % f x x f
    -  exec   % f x f(x)
    -  dup    % f x f(x) f(x)
    -  rolld  % f f(x) f(x) x
    -  eq     % f f(x) bool
    -  {
    -   exit
    -  }
    -  if     % f f(x)
    - } repeat
    - exch pop   % f(x)
    -} def
    -
    -/** @BeginDocumentation
    -Name: FixedPoint - applies a procedure repeatedly until the result is an invariant
    -Synopsis:
    -         any proc         FixedPoint -> any
    -         any proc integer FixedPoint -> any
    -Description:
    -FixedPoint called with three arguments applies the procedure not more
    -than n times. The first argument is the initial value.
    -Examples:
    - (kaeschperle) {Rest (_) join} FixedPoint   --> (___________)
    - (kaeschperle) {Rest (_) join} 1 FixedPoint --> (aeschperle_)
    - (kaeschperle) {Rest (_) join} 3 FixedPoint --> (schperle___)
    -Remarks:
    -Compared to Mathematica the first two arguments are reversed
    -for better conformance with RPN.
    -Author: Diesmann
    -FirstVersion: May 21 2001
    -References:
    -  [1] The Mathematica Book V4.0 "Flatten"
    -SeeAlso: Flatten
    -*/
    -
    -/FixedPoint trie
    -[/anytype /proceduretype /integertype]
    - /FixedPoint__p_i load  addtotrie
    -[/anytype /proceduretype ]
    - /FixedPoint__p load  addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -
    -   Name: Partition - Partition list into n element pieces
    -
    -   Synopsis:
    -     array n Partition
    -     array n d Partition
    -
    -   Description:
    -     Partition works like the corresponding Mathematica function. Partition
    -     creates subarrays with n elements, and offset d.
    -
    -   Parameters:
    -     n - length of subarray.
    -     d - offset of subarray, defaults to n.
    -   Examples:
    -
    -   [1 2 3 4 5 6 7 8 9 10]  2 2 Partition -> [[1 2] [3 4] [5 6] [7 8] [9 10]]
    -   [1 2 3 4 5 6 7 8 9 10]  1 2 Partition -> [[1] [3] [5] [7] [9] [10]]
    -   [1 2 3 4 5 6 7 8 9 10]  2 1 Partition ->
    -              [[1 2] [2 3] [3 4] [4 5] [5 6] [6 7] [7 8] [8 9] [9 10]]
    -
    -   [4 5 6 7 8] 2     Partition  ->  [[4 5] [6 7]]
    -   [4 5 6]     2 5   Partition  ->  [[4 5]]
    -   [4 5 6]     5 1   Partition  ->  []
    -   [4 5 6]     5 7   Partition  ->  []
    -
    -
    -   Diagnostics:
    -     Raises error if n<0 or d<1
    -
    -   Remarks: Still implements only part of Mathematica's functionality.
    -
    -   Author: Gewaltig, Diesmann
    -
    -   FirstVersion:  Jun 29 1999, Marc-Oliver Gewaltig
    -
    -   References: "The Mathematica Book"
    -   SeeAlso: Flatten
    -*/
    -/Partition trie
    -[/arraytype /integertype /integertype] /Partition_a_i_i load addtotrie
    -[/arraytype /integertype ] {dup} /Partition_a_i_i load append addtotrie
    -def
    -
    -
    -
    -
    -%% array TensorRank -> n
    -/TensorRank_
    -{
    -  1
    -  {
    -    exch_ 0 get_a
    -    dup_ type
    -    /arraytype neq
    -    {
    -      pop_ exit
    -    } if
    -    exch_ 1 add_ii
    -  } loop
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: TensorRank - Determine the level to which an array is a full vector
    -Synopsis: [array] TensorRank -> n
    -Examples:
    -           [1 2 3] TensorRank -> 1
    -           [[1 2] [3 4]] TensorRank -> 2
    -SeeAlso: Dimensions
    -*/
    -/TensorRank trie
    - [/arraytype] /TensorRank_ load addtotrie
    -def
    -
    -/TensorRank [/intvectortype] {; 1} def
    -/TensorRank [/doublevectortype] {; 1} def
    -
    -/** @BeginDocumentation
    -Name: Dimensions - determine dimenstions of a (hyper-rectangular) SLI array
    -Synopsis: [array] Dimensions -> [d1 d2 ... dn]
    -Description:
    -Dimensions corresponds to the Mathematica function of
    -the same name. It takes a sli array and returns a list with
    -dimensions [d1 d2 ... dn] where di gives the dimension of the
    -array at level i.
    -The length of the dimensions-list corresponds to the TensorRank of
    -the array.
    -Remarks: Dimensions assumes that the array is hyper-rectangular
    -      (rectangle,cuboid, ...), i.e., all subarrays at a given level
    -      have the same number of elements.
    -      Dimensions does not check, if the array really is hyper-rectangular. It
    -      will not fail if this is not the case. Instead, the dimensions
    -      that are returned correspond to the number of elements of the
    -      first subarray in each level.
    -
    -Examples:
    -SLI ] [1 2 3]                    Dimensions -> [3]
    -SLI ] [[1 2 3] [4 5 6]]          Dimensions -> [2 3]
    -SLI ] [[[1 2][3 4]][[5 6][7 8]]] Dimensions -> [2 2 2]
    -
    -SeeAlso: TensorRank, MatrixQ
    -*/
    -
    -/Dimensions
    -trie [/arraytype]
    -{
    -  [] exch_
    -  %% [] obj
    -  {
    -    %% [] obj
    -    dup_ type
    -    %% [] obj type
    -    /arraytype neq
    -    { pop_ exit } if
    -    size_a
    -    dup
    -    0 gt
    -    {
    -     %% [] array s
    -     exch_ 0 get_a
    -     %% [] s obj
    -     3 1 roll
    -     %% obj [] s
    -     append_a exch_
    -    }
    -    {
    -     %% [] array s
    -     exch_ pop
    -     append_a
    -     exit
    -    } ifelse
    -  } loop
    -} bind addtotrie def
    -
    -/Dimensions [/intvectortype] { length 1 arraystore } def
    -/Dimensions [/doublevectortype] { length 1 arraystore } def
    -
    -/** @BeginDocumentation
    -Name: MatrixQ - Test whether a nested array i a matrix
    -Synopsis: [array] MatrixQ -> true | false
    -Examples: [1 2 3] MatrixQ -> true
    -          [[1 2] [3 4]] MatrixQ -> true
    -          [[1] [2 3]] MatrixQ ->False
    -Bugs: This version fails on the third example
    -Author: Marc-Oliver Gewaltig
    -*/
    -/MatrixQ
    -trie [/arraytype]
    -{
    -  dup type
    -  /arraytype eq
    -  {
    -    %% array
    -    dup Dimensions
    -    %% array [dims]
    -    length 1 eq
    -    {
    -      true exch
    -      {
    -	MatrixQ not and
    -      } forall
    -    }
    -    {
    -      %% array
    -      true exch
    -      {
    -        MatrixQ and
    - %       dup =
    -      } forall
    -    } ifelse
    -  }
    -  {
    -    pop false
    -  } ifelse
    -} bind addtotrie
    -[/anytype] {pop false} addtotrie
    - def
    -
    -/MatrixQ [/intvectortype] false def
    -/MatrixQ [/doublevectortype] false def
    -
    -/** @BeginDocumentation
    -  Name: FindRoot - numerically find a root in an interval
    -  Synopsis: proc double1 double2 double3 FindRoot -> double
    -  Description:
    -     Numerically searches for a root of a function
    -     specified by proc in the interval [double1, double2].
    -     The search stops when the absolute value of proc
    -     is less or equal double3.
    -  Parameters:
    -  Examples:
    -    cout 15 setprecision                   % for display only
    -    {dup mul 2 sub} -3.0 7.0 0.00000000001 FindRoot
    -  Bugs:
    -   - should raise error when there is no sign reversal
    -   - tracing should be optional
    -   - specification of precision should be optional
    -  Author: Diesmann, Hehl
    -  FirstVersion: 29.7.1999
    -  Remarks:
    -   FindRoot currenly supports only a single method for
    -   root finding: the "bisection method" (see [2]). The
    -   Mathematica implementation uses different methods (see [1]).
    -  SeeAlso:
    -  References:
    -   [1] The Mathematica Book "FindRoot"
    -   [2] Numerical Recipes in C. 2nd ed. sec. 9.1
    -       "Bracketing and Bisection"
    -*/
    -
    -/FindRoot
    -{
    - << >> begin
    - /prec Set
    - /xmax Set
    - /xmin Set
    - /f    Set
    -
    - xmin f xmax f gt {xmin xmax /xmin Set /xmax Set} if
    -
    - {
    -  /x xmax xmin add 2 div def
    -  x ==
    -  x f /y Set
    -  y prec gt
    -  {/xmax x def}
    -  {
    -   y prec neg lt
    -   {/xmin x def}
    -   {x exit }
    -   ifelse
    -  }
    -  ifelse
    - } loop
    -end
    -} def
    -
    -
    -
    -
    -%---------------------------------------------------------------------------------- <- end of line (C84) is maximum width for LaTeX-include1
    -/** @BeginDocumentation
    -
    -Name: MathematicaToSliIndex - Convert Mathematica-like indices to SLI indices
    -
    -Synopsis: [array] mathematicaIndex MathematicaToSliIndex -> [array] sliIndex
    -
    -Description:
    -   "MathematicaToSliIndex" converts Mathematica-like indices
    -   to SLI indices.
    -   For an array of size N, valid SLI indices are in the range 0..N-1
    -   while valid Matematica indices are in the range -N..-1, 1..N
    -   (negative indices indicating backward indexing from the end of the
    -   array).
    -
    -   The given array is left untouched, solely its length is taken to
    -   correctly map negative Mathematica indices to the correct SLI
    -   indices.
    -
    -   Alternatives: Function MathematicaToSliIndex_i if index is a
    -   number (example 1) and  MathematicaToSliIndex_a if index is an
    -   array (example 2) (both undocumented) -> behaviour and synopsis are
    -   the same.
    -
    -Examples:
    -   [3 5 6 9 11] -2       MathematicaToSliIndex -> [3 5 6 9 11] 3
    -   [3 5 6 9 11] [ -2 2 ] MathematicaToSliIndex -> [3 5 6 9 11] [3 1]
    -
    -Author: Markus Diesmann
    -
    -Remarks: Commented Ruediger Kupper
    -
    -SeeAlso: SliToMathematicaIndex
    -
    -*/
    -
    -% array integer MathematicaToSliIndex
    -/MathematicaToSliIndex_i
    -{
    - dup
    - 0 lt
    - {exch size 3 -1 roll add}
    - {1 sub}
    - ifelse
    -} bind def
    -
    -/MathematicaToSliIndex_a
    -{
    - { MathematicaToSliIndex_i } Map
    -}
    -bind def
    -
    -
    -/MathematicaToSliIndex trie
    - [/arraytype /integertype ] /MathematicaToSliIndex_i load addtotrie
    - [/arraytype /arraytype ]   /MathematicaToSliIndex_a load addtotrie
    - [/stringtype /integertype ] /MathematicaToSliIndex_i load addtotrie
    - [/stringtype /arraytype ]   /MathematicaToSliIndex_a load addtotrie
    -def
    -
    -%---------------------------------------------------------------------------------- <- end of line (C84) is maximum width for LaTeX-include1
    -/** @BeginDocumentation
    -
    -Name: SliToMathematicaIndex - Convert SLI indices to Mathematica-like indices
    -
    -Synopsis: sliIndex MathematicaToSliIndex -> mathematicaIndex
    -
    -Description:
    -   "SliToMathematicaIndex" converts SLI indices to Mathematica-like
    -   indices.
    -   For an array of size N, valid SLI indices are in the range 0..N-1 while
    -   valid Matematica indices are in the range -N..-1, 1..N (negative
    -   indices indicating backward indexing from the end of the array).
    -
    -   Note that this routine will always return positive indices.
    -
    -Examples:
    -     3     SliToMathematicaIndex -> 4
    -   [ 3 1 ] SliToMathematicaIndex -> [ 4 2 ]
    -
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 11.3.2003
    -
    -Remarks:
    -   Note the difference in the argument list compared to
    -   "MathematicaToSliIndex". Only one argument, the index(array)
    -   itself, is needed.
    -
    -   The implementation is _most_ simple (add 1 to the index), but the
    -   Routine is supplied for symmetry reasons.
    -
    -   Note that this routine will always return positive indices. Hence,
    -   the sequence
    -   [array] MathematicaToSliIndex SliToMathematicaIndex
    -   is NOT identity.
    -
    -SeeAlso: MathematicaToSliIndex
    -
    -*/
    -
    -/SliToMathematicaIndex [/integertype]
    -{
    -  1 add
    -} bind def
    -
    -/SliToMathematicaIndex [/arraytype]
    -{
    -  {SliToMathematicaIndex} Map
    -} bind def
    -
    -
    -
    -
    -
    -/Part_a
    -{
    -  dup
    -  First
    -  3 -1 roll exch
    -  %
    -  % indexarray array First[indexarray]
    -  %
    -  dup /All eq
    -  {
    -   pop size [1] exch append Range
    -  }
    -  if
    -  %
    -  %
    -  dup type /arraytype eq
    -  {
    -   {
    -    1 index exch
    -    MathematicaToSliIndex_i get    % generalization: work with container and forall
    -    %
    -    % indexarray array subarray
    -    %
    -    2 index Rest
    -    empty {pop} {Part} ifelse
    -
    -   } Map
    -   %
    -   % indexarray array subarray
    -   %
    -   3 1 roll pop pop
    -  }
    -  {
    -    MathematicaToSliIndex_i get
    -    exch Rest
    -    empty {pop} {Part} ifelse
    -  }
    -  ifelse
    -
    -} def
    -
    -/** @BeginDocumentation
    -  Name: Part - returns a sub-array of an array
    -  Synopsis: array1 array2 Part -> array3
    -  Description:
    -   Part returns a sub-array of array1 specified by
    -   array2. This function is an implementation of
    -   Mathematica's Part function. It can also be used
    -   to rearrange or copy parts of array1. Note,
    -   Mathematica-style functions in SLI use Mathematica
    -   index notation.
    -  Parameters:
    -   array1 is an arbitrarily shaped array. In particular
    -   it does not need to be rectangular.
    -
    -   array2 is an array [i,j, ...] where the i,j specify the
    -   selected elements on each level. Any i,j can itself be
    -   an array [i1,i2,....] specifying a list of elements on
    -   that level. When i is the literal /All, all elements on
    -   the corresponding level are returned. The first element
    -   on each level has index 1. Indices can also be specified
    -   counting from the end of the array, in this case the last
    -   element has index -1. Positive and neative indices can
    -   arbitrarily be intermixed.
    -
    -   Alternatives: Function Part_a (undocumented) -> behaviour and
    -   synopsis are the same.
    -
    -  Examples:
    -
    -
    -   [ [3 5 6 9] [11 4 7 2] [-9 1 8 10] ]  [ [1 3] [2 3] ] Part  --> [[5 6] [1 8]]
    -   [ [3 [-12 -19] 6 9] [11 4 7 2] [-9 1 8 10] ]  [ 1 2 2] Part --> -19  
    -   [3 4 5 6 7] [-2] Part                                   --> 6 
    -   [3 [-9 -12] 5 6 7] [2] Part                             --> [-9 -12]
    -   [3 [-9 -12] 5 6 7] [2 2] Part                           --> -12
    -   [3 [-9 -12] 5 6 7] [[2 3]] Part                         --> [[-9 -12] 5] 
    -   [3 [-9 -12] 5 6 7] [[2 3 2]] Part                       --> [[-9 -12] 5 [-9 -12]]
    -   [ [3 5 6 9] [11 4 7 2] [-9 1 8 10] ]  [ 1 []  ] Part    --> [] 
    -   [ [3 5 6 9] [11 4 7 2] [-9 1 8 10] ]  [ [] 1 ] Part     --> [] 
    -   [3 [5 -12] 6 9]  [ [ 2 ] ] Part                         --> [[5 -12]] 
    -   [3 [5 -12] 6 9]  [ [ 2 ] 2] Part                        --> [-12] 
    -   [ [3 5 6 9] [11 4 7 2] [-9 1 8 10] ]  [ /All [3 2]  ] Part --> [[6 5] [7 4] [8 1]]
    -
    -  Bugs:
    -  Author: Diesmann
    -  FirstVersion: 29.9.1999
    -
    -  Remarks:
    -   Literal /All plays the role of the index specifier ':'
    -   in Matlab when used without arguments. Note, that
    -   Matlab in addition provides specifier 'end'.
    -   This is not necessary in the formalism of Mathematica
    -   because indices counting from the end of the array can be
    -   expressed by negative values.
    -  SeeAlso: MathematicaToSliIndex
    -  References:
    -   [1] The Mathematica Book V4.0 "Part"
    -*/
    -/Part trie
    - [/arraytype /arraytype ] /Part_a load addtotrie
    - [/stringtype /arraytype ] /Part_a load addtotrie
    -def
    -
    -
    -/Transpose_ /Transpose load def
    -/Transpose trie
    -[/arraytype ] /Transpose_ load addtotrie
    -def
    -
    -
    -%% array n  Take - take first n elements of array
    -%% array -n Take - take last n elements of array
    -/Take_a_i
    -{
    -  dup 0 geq
    -  {
    -    0 exch_  getinterval
    -  }
    -  {
    -      dup neg rollu MathematicaToSliIndex rolld
    -      getinterval
    -  } ifelse
    -
    -} bind def
    -
    -/switchbegin mark def
    -
    -/Take_a_a
    -{
    -  dup TensorRank
    -  1 eq
    -  {
    -   size
    -   switchbegin
    -   1 index 1 eq
    -   {
    -     pop arrayload pop
    -     MathematicaToSliIndex
    -     get
    -   } case
    -
    -   1 index 2 eq
    -   {
    -     pop arrayload pop
    -
    -%
    -%    a i j
    -     rollu                         % j a i
    -     MathematicaToSliIndex         % j a im
    -     rollu                         % im j a
    -     exch                          % im a j
    -     MathematicaToSliIndex         % im a jm
    -
    -     rolld                         % a jm im
    -     dup                           % a jm im im
    -     rollu                         % a im jm im
    -     sub 1 add   
    -     dup 0 lt			    % if 2nd parameter < 0, set it to zero to force getinterval 
    -     {				    % to return empty array as requested by Take in this case
    -       pop 0 
    -     } if 
    -    
    -     getinterval
    -     
    -   } case
    -
    -   1 index 3 eq
    -   {
    -     pop
    -     dup rollu Most MathematicaToSliIndex rolld Last append
    -     Range     % a r
    -     exch      % r a
    -     container % r a c 
    -     rolld     % a c r
    -     {
    -       2 index
    -       exch
    -       get
    -       append
    -     } forall
    -     exch pop
    -   } case
    -
    -   {
    -      pop
    -      /Take /IllegalSequenceSpecification raiseerror
    -   }
    -  switchdefault
    - }
    - {
    -   %% array sarr
    -   {Range} Map
    -   Part
    - } ifelse
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: Take - extract element sequences from a container
    -Synopsis:
    - array  n Take                  return the first n elements
    - array -n Take                  return the last n elements
    - array [n1 n2] Take             return elements n1 through n2
    - array [n1 n2 s] Take           return elements n1 through n2 in steps of s
    - array [[seq1]...[seqn]] Take   return a nested list in which elements
    -                                specified by seqi are taken at level i in list.
    -
    -Operations are the same on strings.
    -The implementation of Take uses the command container to abstract
    -the container type.
    -
    -Note that Take handles indices ranging from -N to N where 
    -    N is the length of the original container and asking for index 0 
    -    will return an empty array.
    -
    -If the specified indices do not exist in the container, Take throws a RangeCheck error.
    -
    -If n2 < n1, Take returns an empty container.
    -
    -
    -Examples:
    - [4 9 -7 3 2 11] 2 Take    --> [4 9]
    - [4 9 -7 3 2 11] -2 Take   --> [2 11]
    - [1 2 3 4 5] [-2] Take     --> 4
    - [1 2 3 4 5] [1 -2] Take   --> [1 2 3 4]
    - [1 2 3 4 5] [1 -2 2] Take --> [1 3]
    - [1 2 3 4 5] [1 -1 2] Take --> [1 3 5]
    -% [1 2 3 4 5] [1 6] Take    --> [Error]: RangeCheck 
    - (HAL) {1 add} Map     --> (IBM)
    - (HAL) 2 Take          --> (HA)
    - (HAL) -2 Take         --> (AL)
    - (HALLO) [-2] Take     --> 76
    - (HALLO) [1 -2] Take   --> (HALL)
    - (HALLO) [1 -2 2] Take --> (HL)
    - (HALLO) [1 -1 2] Take --> (HLO)
    -
    -Author: Diesmann
    -Bugs:
    - The scheme for a list of sequences is not fully consistent with Mathematica.
    - See Drop for a more advanced implementation.
    -References:
    -   [1] The Mathematica Book V4.0 "Take"
    -SeeAlso: Drop, Part, MathematicaToSliIndex, getinterval, get
    -*/
    -
    -/Take trie
    -[/arraytype /integertype] /Take_a_i load addtotrie
    -[/arraytype /arraytype]   /Take_a_a load addtotrie
    -[/stringtype /integertype] /Take_a_i load addtotrie
    -[/stringtype /arraytype]   /Take_a_a load addtotrie
    -def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: Drop - remove element sequences from an array
    -Synopsis:
    - array  n Drop                  remove the first n elements
    - array -n Drop                  remove the last n elements
    - array [n] Drop                 remove the nth element
    - array [n1 n2] Drop             remove elements n1 through n2
    - array [n1 n2 s] Drop           remove elements n1 through n2 in steps of s
    - array {[seq1]...[seqn]} Drop   return a nested list in which elements
    -                                specified by seqi are removed at level i in list.
    -Examples:
    - [4 9 -7 3 2 11] 2 Drop    --> [-7 3 2 11]
    - [4 9 -7 3 2 11] -2 Drop   --> [4 9 -7 3]
    - [1 2 3 4 5] [-2] Drop     --> [1 2 3 5]
    - [1 2 3 4 5] [1 -2] Drop   --> [5]
    - [1 2 3 4 5] [1 -2 2] Drop --> [2 4 5]
    - [1 2 3 4 5] [1 -1 2] Drop --> [2 4]
    -
    - [[-9 -12] [6 7]] {[2] [1]} Drop --> [[-12]]
    -
    -Author: Diesmann
    -FirstVersion: 2007.11.28
    -Bugs:
    - The list of sequences is represented by a procedure. This has delayed
    - evaluation which may cause undesired effects. Should be replaced in a
    - future versionby a new container type for parameter lists of undefined
    - length. Candidate delimiters are <...> with cva as the only access method.
    - Just using [...] as the container is ambiguous.
    -References:
    -   [1] The Mathematica Book V4.0 "Take"
    -SeeAlso: Take, Part, MathematicaToSliIndex, erase
    -*/
    -
    -/Drop [/arraytype /integertype]
    -{
    - Drop_sequence_a_i_
    -}
    -def
    -
    -/Drop [/arraytype /arraytype]
    -{
    - % a [i]
    - Drop_sequence_a_a_
    -}
    -def
    -
    -/Drop_preposti_
    -{
    - % a [i]  -> pre_a post_a ai
    -
    - 2 copy            % a [i] a [i]
    -
    - Take              % a [i] ai
    - rollu             % ai a [i]
    - First             % ai a i
    -
    -
    - dup               % a i i
    - 1 sub
    - [1] exch append   % a i [1 i-1]
    - 2 index           % a i [1 i-1] a
    - exch Take         % a i pre_a
    - rollu             % pre_a a i
    - 1 add             % pre_a a i+1
    - 1 index length    % pre_a a i+1 l
    - 2 arraystore      % pre_a a [i+1 l]
    - Take              % pre_a post_a
    -
    - rolld             % pre_a post_a ai
    -}
    -def
    -
    -
    -
    -/Drop [/arraytype /proceduretype]
    -{
    - /mark exch  exec counttomark arraystore exch pop
    - Drop_sequences_
    -}
    -def
    -
    -
    -/Drop_sequence_ [/arraytype /integertype]
    -{
    - Drop_sequence_a_i_
    -}
    -def
    -
    -/Drop_sequence_ [/arraytype /arraytype]
    -{
    - Drop_sequence_a_a_
    -}
    -def
    -
    -
    -/Drop_sequence_a_i_
    -{
    - % 1 2 | 3 4 5:  2 Drop == -length +  2 = -3 Take
    - %              -3 Drop ==  length + -3 =  2 Take
    - dup Sign neg   % a n -s
    - 2 index length % a n -s l
    - mul            % a n l
    - add            % a n
    - Take
    -}
    -def
    -
    -% array seq -> array explicit_range
    -/MathematicaSequenceToExplicitRange_a_a_
    -{
    - size  % a s
    - dup 1 eq
    - {
    -  pop MathematicaToSliIndex
    - }
    - {
    -  dup 2 eq
    -  {
    -   pop MathematicaToSliIndex Range
    -  }
    -  {
    -   pop dup rollu Most MathematicaToSliIndex rolld Last append Range
    -  }
    -  ifelse
    - }
    - ifelse
    -}
    -def
    -
    -/Drop_sequence_a_a_
    -{                       % a s
    - MathematicaSequenceToExplicitRange_a_a_  % a s(explicit and <-sorted)
    - {                      % a si i
    -  sub                   % a si(corrected for previous erasions)
    -  1 erase
    - } forallindexed
    -}
    -def
    -
    -/Drop_sequences_
    -{
    -           % a p
    - empty
    - {
    -  pop
    - }
    - {                  % a p
    -  exch              % p a
    -  1 index           % p a p
    -  First             % p a s
    -  Drop_sequence_    % p as
    -  exch              % as p
    -  Rest              % as pr
    -  exch              % pr ar
    -  {                 % pr ai
    -   1 index          % pr ai pr
    -   Drop_sequences_  % ar
    -  } Map             % pr aar
    -  exch              % aar pr
    -  pop               % aar
    - }
    - ifelse
    -}
    -def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: NestList - gives a list of the results of applying f to x 0 through n times.
    -Synopsis: x f n NestList ->  [x, x f,  x f f,..., x f1 ... fn]
    -Parameters: x - any object to which f can be applied
    -            f - an executable object.
    -Description: NestList repeatedly applies f to the supplied argument and returns
    -             the result als well as all intermediate results in a list.
    -             Note that f must expect and return exactly one argument.
    -Examples:   1 {2 mul} 3 NestList -> [1 2 4 8]
    -SeeAlso: Map, forall
    -*/
    -%% x proc n NetList -> [x proc, x proc proc, x proc1 ... procn]
    -/NestList trie
    -[/anytype /anytype /integertype]
    -{
    -  [] 1 index 1 add reserve % reserve array-space for n+1 elements
    -  4 -1 roll append         % add initial value to the array
    -  exch
    -  %% proc [x] n            % iterate over n
    -  {
    -    dup Last               % extract the last lement from the array
    -    2 index exec           % apply function and
    -    append                 % append the result to the array
    -  } repeat
    -  exch pop                 % remove spare function object
    -} bind addtotrie def
    -
    -
    -/** @BeginDocumentation
    -Name: Nest - apply a function n times
    -Synopsis: x f n Nest -> f( ...n times... f(f(x)) ...)
    -Examples:0.2 {dup 1 exch sub mul 3.3 mul} 10 Nest
    -Author: Diesmann
    -FirstVersion: 9.2.01
    -Remarks:Nest is a restricted variant of repeat.
    -It is implemented to demonstrate the use of repeat as a
    -functional operator and for compatibility with Mathematica.
    -SeeAlso: repeat, forall, NestList, Fold
    -*/
    -%% x f n Nest
    -/Nest trie
    -[/anytype /proceduretype /integertype]
    -{
    - exch repeat
    -} bind addtotrie def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: Fold - result of repeatedly applying a function with two arguments
    -Synopsis: x [a b c ...] f Select -> f( ...n times... f(f(f(x,a),b),c) ...)
    -Examples: 1 [2 x] Range {mul} Fold
    -         computes faculty of integer x
    -Author: Diesmann
    -FirstVersion: 9.2.01
    -Remarks:Fold is a restricted variant of forall.
    -It is implemented to demonstrate the use of forall as a
    -functional operator and for compatibility with Mathematica.
    -SeeAlso: forall, repeat, FoldList, Nest
    -*/
    -%% x a p
    -/Fold [/anytype /arraytype /proceduretype] /forall load def
    -/Fold [/anytype /intvectortype /proceduretype] /forall load def
    -/Fold [/anytype /doublevectortype /proceduretype] /forall load def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: FoldList - repeatedly apply a function with two parameters
    -Synopsis: x [a b c ...] f FoldList -> [f(x,a) f(f(x,a),b) ...]
    -Examples: 0 [1 2 3 4] {add} FoldList gives the cumulative sums of the list.
    -         0 [1 2 3 4] {add} FoldList -> [0 1 3 6 10]
    -Remarks: This function is Mathematica compatible.
    -SeeAlso: NestList, Fold, Map, forall
    -*/
    -%% x array f FoldList
    -/FoldList trie
    -[/anytype /arraytype /anytype]
    -{
    -  exch
    -  % x f array
    -  []
    -  % x f array []
    -  4 -1 roll append
    -  % f array [x]
    -  exch
    -  % f [x] array
    -  {
    -    1 index Last
    -    % f [x] ai x
    -    exch
    -    % x ai
    -    3 index exec
    -    % f [x] f(x,ai)
    -    append
    -  } forall
    -  exch pop
    -} bind addtotrie def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: Select - reduces an array to elements which fulfill a criterion
    -Synopsis: array proc Select -> array
    -Examples:[4 -2 0.3 -1.7 -3 0 7] {0 lt} Select -> [-2 -1.7 -3]
    -         [4 -2 0.3 -1.7 -3 0 7] {0 gt} Select -> [ 4  0.3  7]
    -Remarks: Mathematica compatible
    -Author: Diesmann
    -FirstVersion: 9.2.01
    -SeeAlso: Take, Split
    -*/
    -%% a f Select
    -/Select trie
    -[/arraytype /proceduretype]
    -{
    - exch
    - container
    - rollu exch
    - {dup} exch join { {append } {pop} ifelse } join
    - forall
    -}  bind addtotrie def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: Split - splits array into subarrays of sequences of identical elements
    -Synopsis: array  Split     -> [array1 ... arrayn]
    -          array proc Split -> [array1 ... arrayn]
    -Examples:
    -         [1 1 1 2 2 3 3 3 3 4 4 4] Split -> [[1 1 1] [2 2] [3 3 3 3] [4 4 4]]
    -         [1.1 1.3 1.7 2.1 2.3 2.7] {floor exch floor eq} Split ->
    -             [[1.1 1.3 1.7] [2.1 2.3 2.7]]
    -         [1] Split -> [[1]]
    -         [] Split  -> []
    -Remarks: Mathematica compatible
    -Author: Diesmann
    -FirstVersion: 13.2.01
    -SeeAlso: Take, Select
    -*/
    -/Split_
    -{
    - exch
    - container
    - exch
    - empty
    - {
    -  rollu pop pop
    - }
    - {
    -  dup [[1]] Part exch
    -  2 1 Partition
    -
    -  {                    % 1. part of forall's argument
    -   dup arrayload pop
    -  }
    -
    -  5 -1 roll            % 2. part, the criterion
    -  join
    -
    -  {                    % 3. part
    -   {1 get append}
    -   {rollu append exch [[2]] Part }
    -   ifelse
    -  }
    -  join
    -
    -  forall
    -
    -  append
    - } ifelse
    -
    -} bind def
    -
    -/Split trie
    - [/arraytype /proceduretype] /Split_ load addtotrie
    - [/arraytype ] { {eq} } /Split_ load  join  addtotrie
    -def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: MergeLists - merges sorted lists
    -Synopsis: array array      MergeLists  -> array
    -          array array proc MergeLists  -> array
    -Examples:
    -  [1 3 5] [2 7] MergeLists -> [1 2 3 5 7]
    -  [[-9 1] [1 3] [4 5]]  [[3 2] [0 7]] {exch 1 get exch 1 get lt} MergeLists ->
    -         [[-9 1] [3 2] [1 3] [4 5] [0 7]]
    -Description:
    - MergeLists is unlike Union which removes repeated elements and does
    - not require the arguments to be sorted. However, the result of
    - Union is also sorted. MergeLists does not appear in Mathematica V4.0,
    - Union does.
    -Author: Diesmann
    -FirstVersion: 8.5.01
    -References:
    -   [1] The Mathematica Book V4.0 "Union"
    -SeeAlso: Select, Split
    -*/
    -/MergeLists_
    -{
    - % l1 l2 crit
    -
    - {% part 1 of loop procedure
    -
    -  % loop invariant is:
    -  %  [result] [remainder l1] [remainder l2]
    -
    -  empty      {pop join exit} if
    -  exch empty {pop join exit} { exch } ifelse
    -
    -  % get first element of l1 and l2
    -  %
    -  1 pick First
    -  1 pick First
    -
    -  % [] l1 l2 e1 e2
    - }
    -
    - exch % l1 l2 p1 crit
    -
    - {% part 2 of loop procedure
    -  { % e1 < e2
    -    % [] l1 l2
    -
    -   rollu
    -   dup First
    -   exch rollu
    -   append
    -
    -   rollu
    -   Rest
    -   exch
    -
    -  }
    -  { % e1 >= e2
    -    % [] l1 l2
    -
    -   rolld exch
    -   dup First
    -   rolld exch
    -   append
    -
    -   rollu
    -   Rest
    -
    -  }
    -  ifelse
    - }
    -            % l1 l2 p1 crit p2
    - join join  % l1 l2 p
    -
    - exch container rolld
    - 4 2 roll
    - rolld
    -
    -%  container rollu  % [] l1 l2 p
    -
    - loop
    -
    -} def
    -
    -
    -/MergeLists trie
    - [/arraytype /arraytype /proceduretype] /MergeLists_ load addtotrie
    - [/arraytype /arraytype ] { {lt} } /MergeLists_ load join  addtotrie
    -def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -  Name: Times - represents/computes product of terms
    -  Synopsis: array Times -> double
    -                        -> integer
    -  Description:
    -   Times represents or computes the product of its
    -   arguments v1,-,vn. The arguments are supplied
    -   by an array [v1, -,vn]. The product of an empty
    -   argument list is defined to be unity.
    -   Times is an implementation of Mathematica's Times [1].
    -  Parameters:
    -  Examples:
    -%
    -         [4 3 2 5 6] Times --> 720
    -         [] Times          --> 1
    -
    -  Bugs:
    -   not yet protected by trie
    -  Author: Diesmann
    -  FirstVersion: 31.5.2000
    -  Remarks:
    -  SeeAlso: Plus
    -  References:
    -   [1] The Mathematica Book "Times"
    -*/
    -/Times { 1 exch { mul } forall } bind def
    -
    -
    -/** @BeginDocumentation
    -  Name: Plus - represents/computes sum of terms
    -  Synopsis: array Plus -> double
    -                       -> integer
    -  Description:
    -   Plus represents or computes the sum of its
    -   arguments v1,-,vn. The arguments are supplied
    -   by an array [v1, -,vn]. The sum of an empty
    -   argument list is defined to be zero.
    -   Plus is an implementation of Mathematica's Plus [1].
    -  Parameters:
    -  Examples:
    -
    -         [4 3 2 5 6] Plus -->  20
    -         [ ] Plus         -->   0
    -
    -  Bugs:
    -   not yet protected by trie
    -  Author: Diesmann
    -  FirstVersion: 31.5.2000
    -  Remarks:
    -  SeeAlso: Times
    -  References:
    -   [1] The Mathematica Book "Plus"
    -*/
    -/Plus { 0 exch { add } forall } bind def
    -
    -% v1 vn n astore
    -/astore
    -{
    - length arraystore
    - (astore is obsolete:\n)
    - (In contrast to PostScript SLI arrays are dynamic\n)
    - (use arraystore instead.) join join M_INFO message
    -} def
    -
    -
    -/aload
    -{
    - arrayload array
    - (aload is obsolete:\n)
    - (In contrast to PostScript SLI arrays are dynamic\n)
    - (use arrayload instead.) join join M_INFO message
    -} def
    -
    -/** @BeginDocumentation
    -  Name: Dot - product of vectors, matrices, and tensors
    -  Synopsis: array array Dot -> array
    -                              -> double
    -                              -> integer
    -  Description:
    -
    -    A B Dot contracts the last index in A with the first
    -    index in B. Indices in mathematical notation, leftmost
    -    index describes first level objects. For peole used to
    -    strict (row,column) notation as in Matlab [2] effects
    -    of this generalized product may be surprising (see
    -    examples (1) to (3).
    -    Dot is an implementation of Mathematica's Dot [1].
    -  Parameters:
    -  Examples:
    -
    - (1)
    -   [ 4 3 7 ] [ 2 5 8] Dot ==79
    -
    - (2)
    -   [ 4 3 7 ] [ [ 2] [ 5 ] [ 8 ] ] Dot ==  [79]
    -
    - (3)
    -   [ [ 4 ] [ 3 ] [ 7 ] ] [  2  5   8  ] Dot ==  [8 6 14]
    -      Error: /DimensionMismatch in Dup
    - (4)
    -   [ [ 5 3 2 ] [ 5 4 1 ] ] [ [ 2 ] [ 3 ] [ 9 ] ] Dot == [[37] [31]]
    -
    - (5)
    -   [ [ 5 3 2 ] [ 5 4 1 ] ] [ 2  3 9  ] Dot ==   [37 31]
    -
    - (6)
    -   [ 7 8 ] [ [ 5 3 2 ] [ 5 4 1 ] ]  Dot == [75 53 22]
    -
    - (7)
    -   [  [ 5 3 ]  [ 1 2 ] [ 5 4 ] ]
    -   [ [ [ 2 1 ]  [ 5 3 ] [ 3  4 ] [ 7 5 ]] [ [ 3 1 ]  [ 7 4] [8 9] [1 8] ] ]
    -    Dot ==
    -   [ [ [19 8] [46 27] [39 47] [38 49] ]
    -     [ [8 3]  [19 11] [19 22] [9 21]  ]
    -     [ [22 9] [53 31] [47 56] [39 57] ]
    -    ]
    -
    -  Bugs: Bad performace: TensorRank should be rewritten in C++
    -   not yet protected by trie
    -  Author: Diesmann
    -  FirstVersion: 31.5.2000
    -  Remarks:
    -  SeeAlso: Times, Plus, OuterProduct
    -  References:
    -   [1] The Mathematica Book "Dot"
    -   [2] The MathWorks, Matlab User's Guide
    -*/
    -/Dot  % A B Dot
    -{
    - dup Dimensions First  2 index Dimensions  Last neq
    - {/Dot /DimensionMismatch raiseerror } if
    - exch
    - dup TensorRank 1 eq  % of A
    - {
    -  exch_ dup_ TensorRank 1 eq  % of B
    -  {
    -    Dot1D
    -  }
    -  {
    -   Transpose_   % of B
    -   {1 index exch_ Dot } Map_ exch_ pop_
    -  }
    -  ifelse_
    - }
    - { % B A
    -  { 1 index Dot } Map_ exch_ pop_
    - }
    - ifelse_
    -} bind def
    -
    -/** @BeginDocumentation
    -   Name: Dot1D - Compute the inner product of two vectors.
    -   Synopsis: array array Dot1D -> num
    -   Description: 
    -   Dot1D expects two one dimensional arrays or vectors and computes the
    -   inner product of the two arguments.
    -   Dot1D works equally well for arrays, doublevectors and intvectors.
    -
    -   Example:
    -    <. 1 2 3 .> <. 1 2 3 .> Dot1D -> 14
    -   SeeAlso: Dot, OuterProduct
    -   Author: Marc-Oliver Gewaltig
    -   FirstVersion: Dec 18 2012
    -*/
    -/Dot1D
    -{
    -  mul
    -  0 exch
    -  { add } forall
    -} def
    -
    -
    -/** @BeginDocumentation
    -  Name: OuterProduct - outer product
    -  Synopsis: array array OuterProduct -> array
    -
    -  Description:
    -   A B OuterProduct computes the outer product of A
    -   and B by forming all possible combinations of the
    -   lowest level elements (rightmost indices) in both
    -   lists.
    -   OuterProduct is compatible to Mathematica's
    -   Outer[Times,A,B] [1]
    -  Parameters:
    -  Examples:
    -
    -    [3 4 5] [6 7 8 9] OuterProduct ->
    -       [
    -        [18 21 24 27]
    -        [24 28 32 36]
    -        [30 35 40 45]
    -       ]
    -
    -  Bugs:
    -   not yet protected by trie
    -  Author: Marc-Oliver Gewaltig, Diesmann
    -  FirstVersion: 31.5.2000, rewritten Dec 18 2012
    -  
    -  Remarks:
    -  SeeAlso: Times, Dot
    -  References:
    -   [1] The Mathematica Book "Outer"
    -*/
    -/OuterProduct
    -{
    - exch
    - { 1 index mul } Map 
    - exch pop
    -} bind def
    -
    -
    -/** @BeginDocumentation
    -Name: LayoutArray - build a multidimensional array
    -Synopsis: [d1 d2 ...] val LayoutArray -> [...]
    -Parameters: [d1 d2 ...] - Array with dimensions.
    -            val         - initialisation value for array entries
    -Description:
    -  LayoutArray generates a multi-dimensional array which is
    -  initialised to val.
    -
    -Examples:
    -   [5] 1 LayoutArray -> [1 1 1 1 1]
    -   [2 3] 1.0 LayoutArray -> [ [1.0 1.0 1.0] [1.0 1.0 1.0]]
    -
    -Author: Marc-oliver Gewaltig
    -FirstVersion: 20.6.02
    -SeeAlso: ArrayShape, Range, Table, Dimensions, array
    -*/
    -/LayoutArray
    -{
    -  << >> begin
    -  /val exch def
    -  size /n_dim Set
    - /dim  Set
    -  n_dim 1 eq
    -  {
    -    [ dim 0 get {val} repeat ]
    -  }
    -  {
    -    dim 0 get array
    -    { ;
    -      dim Rest val LayoutArray
    -    } Map
    -  } ifelse
    - end
    -} bind def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: ArrayShape - reduce a multidimensional array to a desired shape
    -Synopsis: array1 [d1 d2 ...] LayoutArray -> array2
    -Parameters:
    - array1      - array to operate on
    - [d1 d2 ...] - array with specification of dimensions, where
    -               di is an integer or /All
    - array2      - reduced array1
    -Description:
    - The function is useful if an operation needs to be performed on an
    - array of data which contains rows with insufficient data and rows
    - with trailing superfluous entries.
    -
    - The algorithm is as follows:
    -  - if dim empty return []
    -  - take first d1 elements of a if available
    -    return [] otherwise
    -  - forall these elements
    -     - do nothing if [d2 ...dn] empty
    -     - otherwise apply [d2 ...dn] and remove
    -       if result is []
    -
    -Examples:
    - [ [ 3 6 9] 100 [ 8 2 3 7 1] ] [2] ArrayShape
    -  -> [[3 6 9] 100]
    - [ [ 3 6 9] [ 8 2 3 7 1] ] [/All 2] ArrayShape
    -  -> [[3 6] [8 2]]
    - [ [ 3 6 9] [ 8 2 3 7 1] ] [/All 3] ArrayShape
    -  -> [[3 6 9] [8 2 3]]
    - [ [ 3 6 9] [ 8 2 3 7 1] ] [/All 4] ArrayShape
    -  -> [[8 2 3 7]]
    -
    - [[[ 6 2 3] [-7 4 5] ] [[8 3 2] [2 -9 -5] 3 7 1]] [/All 2 3] ArrayShape
    -  -> [[[6 2 3] [-7 4 5]] [[8 3 2] [2 -9 -5]]]
    -
    -Remarks:
    - The Mathematica function ArrayDepth (not implemented) tests whether its
    - argument has the required dimensions. This is unlike the function Dimensions
    - which assumes that all elements of the array at a given level have identical
    - shape and, therefore, inspects only the first element at each level.
    -Author: Diesmann
    -FirstVersion: 2007.11.28
    -SeeAlso: LayoutArray, Part, Table, Dimensions
    -*/
    -
    -/ArrayShape
    -{
    - empty  % array dims
    - {
    -  exch pop  % return empty array
    - }
    - {
    -  dup Rest rollu  % array dims
    -  First           % dims_remain array dims
    -                  % dims_remain array dim
    -
    -  dup /All eq {pop dup length} if  % dims_remain array dim
    -  dup 2 index length  % dims_remain array dim dim length
    -
    -  leq
    -  { % array has sufficient length
    -   Take                      % dims_remain array dim
    -   1 index                   % dims_remain array
    -   length                    % dims_remain array dims_remain
    -   0 eq                      % dims_remain array length
    -   {                         % dims_remain array
    -    exch pop                 % remove dims_remain
    -   }
    -   {
    -    container        % dims_remain array
    -    exch             % dims_remain array []
    -    {
    -     2 index         % dims_remain result_array array_element
    -     ArrayShape      % dims_remain result_array array_element dims_remain
    -     empty           % dims_remain result_array array_element
    -     {pop}
    -     {append}
    -     ifelse
    -    }
    -    forall
    -    exch pop         % dims_remain result_array
    -   }
    -   ifelse
    -  }
    -  {
    -   pop       % dims_remain array dim
    -   container % dims_remain array
    -   rollu     % dims_remain array []
    -   pop       % [] dims_remain array
    -   pop       % [] dims_remain
    -  }
    -  ifelse
    - }
    - ifelse
    -} def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: add - add two numbers or vectors
    -Synopsis: n1 n2  add -> n3
    -          a1 a2  add -> a3
    -Description: add can be used to add numbers and arrays.
    -
    -  If applied to numbers, add returns the sum of the numbers. If one
    -  of the arguments is a double, the result is also a double.
    -
    -  Applied to arrays, add perfoms a per-component addition of the two
    -  arrays. The components must be numbers, however, integer and double
    -  values may be mixed.
    -
    -  Note that the two arrays must be of the same size.
    -
    -
    -Examples:
    -           1 2   add -> 3
    -           1.0 2 add -> 3.0
    -           [1 2] [3 4] add -> [4 6]
    -           1 [3 4] add -> [4 5]
    -Author: M-O Gewaltig
    -SeeAlso: Dot, Plus, Times
    -*/
    -
    -
    -/add_a_a
    -{
    -  2 arraystore
    -  { add } MapThread
    -}  bind def
    -
    -/add_i_a
    -{
    -  {
    -    1 index add
    -  } Map
    -  exch pop
    -} bind def
    -
    -/add_a_i
    -{
    -  exch_ add_i_a
    -} bind def
    -
    -/add [/arraytype /arraytype] /add_a_a load def
    -/add [/doubletype /arraytype] /add_i_a load def
    -/add [/arraytype /doubletype] /add_a_i load def
    -/add [/integertype /arraytype] /add_i_a load def
    -/add [/arraytype /integertype] /add_a_i load def
    -
    -/** @BeginDocumentation
    -Name: sub - subtract two numbers or vectors
    -
    -Synopsis: n1 n2  sub -> n3
    -          a1 a2  sub -> a3
    -
    -Description: sub can be used to subtract numbers and arrays.
    -
    -  If applied to numbers, sub returns the difference of the numbers. If one
    -  of the arguments is a double, the result is also a double.
    -
    -  Applied to arrays, sub perfoms a per-component subtraction of the two
    -  arrays. The components must be numbers, however, integer and double
    -  values may be mixed.
    -
    -  Note that the two arrays must be of the same size.
    -
    -
    -Examples:
    -           5 2   sub -> 3
    -           5.0 2 sub -> 3.0
    -           [5 7] [3 4] sub -> [2 3]
    -           [3 4] 1 sub -> [2 3]
    -
    -Author: docu by Sirko Straube (adopted from add)
    -
    -SeeAlso: add, mul, div
    -*/
    -
    -/sub_a_a
    -{
    -  2 arraystore
    -  { sub } MapThread
    -}  bind def
    -
    -/sub_i_a
    -{
    -  {
    -    1 index exch_ sub
    -  } Map
    -  exch pop
    -} bind def
    -
    -/sub_a_i
    -{
    -  exch_
    -  {
    -    1 index sub
    -  } Map
    -  exch_ pop
    -} bind def
    -
    -/sub [/arraytype /arraytype] /sub_a_a load def
    -/sub [/doubletype /arraytype] /sub_i_a load def
    -/sub [/arraytype /doubletype] /sub_a_i load def
    -/sub [/integertype /arraytype] /sub_i_a load def
    -/sub [/arraytype /integertype] /sub_a_i load def
    -
    -/** @BeginDocumentation
    -Name: mul - multiply two numbers or vectors (point-wise)
    -
    -Synopsis: int int mul -> int
    -int double mul -> double
    -array int/double mul -> array
    -
    -Examples: 3 4 mul -> 12
    -3.33 3 mul -> 9.99
    -[1 2.2 3] 4 mul -> [4 8.8 12]
    -
    -Author: docu by Sirko Straube
    -
    -SeeAlso: add, sub, div, Dot
    -*/
    -/mul_a_a
    -{
    -  2 arraystore
    -  { mul } MapThread
    -}  bind def
    -
    -/mul_i_a
    -{
    -  {
    -    1 index mul
    -  } Map
    -  exch pop
    -} bind def
    -
    -/mul_a_i
    -{
    -  exch_ mul_i_a
    -} bind def
    -
    -/mul [/arraytype /arraytype] /mul_a_a load def
    -/mul [/doubletype /arraytype] /mul_i_a load def
    -/mul [/arraytype /doubletype] /mul_a_i load def
    -/mul [/integertype /arraytype] /mul_i_a load def
    -/mul [/arraytype /integertype] /mul_a_i load def
    -
    -/** @BeginDocumentation
    -Name: div - divide two numbers or vectors (point-wise)
    -
    -Synopsis: int int div -> int
    -int double div -> double
    -array int/double div -> array
    -
    -Examples: 9 2 div -> 4
    -9 3.3 div -> 2.727273
    -[10 11.5 12] 4 div -> [2 2.875 3]
    -
    -Author: docu by Sirko Straube
    -
    -SeeAlso: add, sub, mul, Dot
    -*/
    -/div_a_a
    -{
    -  2 arraystore
    -  { div } MapThread
    -}  bind def
    -
    -/div_i_a
    -{
    -  {
    -    1 index div
    -  } Map
    -  exch pop
    -} bind def
    -
    -/div_a_i
    -{
    -  exch_ div_i_a
    -} bind def
    -
    -/div [/arraytype /arraytype] /div_a_a load def
    -/div [/doubletype /arraytype] /div_i_a load def
    -/div [/arraytype /doubletype] /div_a_i load def
    -/div [/integertype /arraytype] /div_i_a load def
    -/div [/arraytype /integertype] /div_a_i load def
    -
    -/** @BeginDocumentation
    -Name: ArrayQ - returns true if top object is an array
    -SeeAlso: NumberQ, LiteralQ
    -*/
    -
    -/ArrayQ trie [/arraytype] true  addtotrie
    -             [/anytype]   false addtotrie
    -def
    -/** @BeginDocumentation
    -Name: LiteralQ - returns true if top object is a literal
    -SeeAlso: NumberQ, ArrayQ, StringQ
    -*/
    -/LiteralQ trie [/literaltype] true  addtotrie
    -               [/anytype]   false   addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: NumberQ - returns true if top object is a number (int or double)
    -Synopsis: int    NumberQ -> true
    -          double NumberQ -> true
    -          any    NumberQ -> false
    -SeeAlso: IntegerQ, DoubleQ, LiteralQ, ArrayQ, StringQ
    -*/
    -
    -/NumberQ trie
    - [/integertype] true  addtotrie
    - [/doubletype]  true  addtotrie
    - [/anytype]     false addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: IntegerQ - returns true if top object is an integer (int)
    -Synopsis: int    IntegerQ -> true
    -          any    IntegerQ -> false
    -SeeAlso: NumberQ, DoubleQ, LiteralQ, ArrayQ, StringQ
    -*/
    -/IntegerQ trie
    - [/integertype] true  addtotrie
    - [/anytype]     false addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: DoubleQ - returns true if top object is a double
    -Synopsis: double DoubleQ -> true
    -          any    DoubleQ -> false
    -SeeAlso: IntegerQ, DoubleQ, FiniteQ, LiteralQ, ArrayQ, StringQ
    -*/
    -/DoubleQ trie
    - [/doubletype] true  addtotrie
    - [/anytype]    false addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: FiniteQ - returns true if top object is finite number
    -Synopsis: double FiniteQ -> true/false
    -          int    FiniteQ -> true
    -Description:
    -For numeric arguments, returns true if the value is finite
    -(neither +inf, -inf, or nan). Integers are always finite.
    -It is an error to call this function on anything except numbers.
    -SeeAlso: IntegerQ, DoubleQ, LiteralQ, ArrayQ, StringQ
    -*/
    -/FiniteQ trie
    - [/doubletype]  /finite_q_d load addtotrie
    - [/integertype] true       addtotrie
    - [/anytype]     { /FiniteQ /IllegalArgument raiseerror } addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: StringQ - returns true if top object is a string
    -Synposis: string StringQ -> true
    -          any    StringQ -> false
    -SeeAlso: NumberQ, LiteralQ, ArrayQ
    -*/
    -/StringQ trie [/stringtype] true  addtotrie
    -       	      [/anytype]    false addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: DictQ - returns true if top object is a dictionary
    -Synposis: dictionary DictQ -> true
    -          any        DictQ -> false
    -SeeAlso: NumberQ, LiteralQ, ArrayQ
    -*/
    -/DictQ trie 
    -  [/dictionarytype] true addtotrie
    -  [/anytype]        false addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: MemberQ - checks if array contains a specific element
    -Synopsis:
    -array any MemberQ -> true
    -                  -> false
    -Examples:
    -[3 8 2 9 -1] 2 MemberQ --> true
    -[3 8 9 -1]   2 MemberQ --> false
    -Author: Diesmann
    -FirstVersion: 10.5.2001
    -Remarks: The Mathematica implementation is much more general
    -References:
    -   [1] The Mathematica Book "MemberQ"
    -SeeAlso: LiteralQ, NumberQ, ArrayQ, MatrixQ, HasDifferentMemberQ
    -*/
    -/MemberQ
    -{
    - << >> begin
    -  /member Set
    -  /array Set
    -
    - false
    - array {/member load eq {pop true exit} if} forall
    - end
    -} def
    -
    -/** @BeginDocumentation
    -Name: HasDifferentMemberQ - checks if array contains different element(s)
    -Synopsis:
    -array any HasDifferentMemberQ -> true
    -                          -> false
    -Examples:
    -[3 8 2 9 -1] 2 HasDifferentMemberQ --> true
    -[2 2 2]      2 HasDifferentMemberQ --> false
    -Author: Plesser, based on MemberQ
    -FirstVersion: 20 Sept 2010
    -SeeAlso: LiteralQ, NumberQ, ArrayQ, MatrixQ, MemberQ
    -*/
    -/HasDifferentMemberQ
    -{
    - << >> begin
    -  /member Set
    -  /array Set
    -
    - false
    - array {/member load neq {pop true exit} if} forall
    - end
    -} def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/** @BeginDocumentation
    -   Name: SubsetQ - Test if one dictinary is a subset of another
    -
    -   Synopsis:
    -   dict1 dict2 SubsetQ -> bool
    -
    -   Parameters:
    -   dict1 - dictionary
    -   dict2 - dictionary
    -
    -   Description:
    -   The functions returns true, if all entries of dict2 are present in dict1
    -   with the same values.
    -
    -   Examples:
    -   << /a 1 /b 2 /c 2 >> << /c 2 >> SubsetQ -> true
    -*/
    -
    -/SubsetQ
    -[/dictionarytype /dictionarytype]
    -{
    -  << >> begin
    -  cva 2 Partition
    -  /properties Set
    -  /object Set
    -
    -  true
    -  properties
    -  {
    -    arrayload ;
    -    /val Set
    -    cvlit /key Set
    -    object dup key known
    -    {
    -      key get
    -      val eq and
    -    }
    -    {
    -     pop pop false exit
    -    } ifelse
    -  } forall
    -  end
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: ToMathematicaExpression - converts SLI data to Mathematica input
    -Synopsis:
    -any ToMathematicaExpression -> string
    -
    -Description:
    -An error is raised for unsupported SLI data types. In particular,
    -the function also converts heterogeneous arrays and dictionaries.
    -
    -Examples:
    -
    -[3.4 (hello) [2 3] ] ToMathematicaExpression -->
    -     ({ImportString["3.4","List"][[1]], "hello", {2, 3}})
    -<< /i 6 /s (hello) >> ToMathematicaExpression -->
    -     ({i -> 6, s -> "hello"})
    -
    -Author: Diesmann
    -Remarks:
    -The conversion of doubles does not yet guarantee the existence
    -of the decimal point and an appropriate number of digits.
    -References:
    -   [1] The Mathematica Book
    -*/
    -/ToMathematicaExpression
    -{
    - dup                           % we need type and value
    - <<
    -   /arraytype
    -     {
    -      ({) exch empty not
    -      {
    -       {                        % we at least one element to operate on
    -        dup Rest exch           % save the reminder of the array
    -        First                   % get the next element to operate on
    -        ToMathematicaExpression % convert to Mathematica input format
    -        rolld exch join exch    % append to converted part
    -        empty
    -        {exit} if               % last element does not need a separator
    -        (, )                    % separator
    -        rolld exch join exch    % append to converted part
    -       } loop
    -      } if
    -      pop                       % the empty array is still on the stack
    -      (}) join
    -     }
    -   /dictionarytype
    -     {
    -      cva 2 Partition           % create a list of tuples
    -      ({) exch empty not
    -      {
    -       {                        % we at least one element to operate on
    -        dup Rest exch           % save the reminder of the array
    -        First                   % get the next element to operate on
    -
    -        dup 0 get cvs           % convert the name of the key
    -        ( -> ) join exch        % append the rule symbol
    -        1 get
    -        ToMathematicaExpression % convert to Mathematica input format
    -        join                    % append value in Mathematica input format
    -
    -        rolld exch join exch    % append to converted part
    -        empty
    -        {exit} if               % last element does not need a separator
    -        (, )                    % separator
    -        rolld exch join exch    % append to converted part
    -       } loop
    -      } if
    -      pop                       % the empty array is still on the stack
    -      (}) join
    -     }
    -   /stringtype
    -     { (") exch join (") join }
    -   /booltype
    -     { {(True)} {(False)} ifelse }
    -   /integertype
    -     { cvs }
    -   /doubletype
    -     { cvs (ImportString[") exch join (","List"][[1]]) join }
    -   /literaltype
    -     { cvs }
    - >>
    - dup rolld type known not       % argument not in the list of convertible types?
    - {
    -  /ToMathematicaExpression      % supply the error handler with appropriate
    -  /NoMathematicaRepresentation  % information about the problem
    -  raiseerror
    - } if
    - exch dup rollu type get exec   % apply conversion rule
    -} def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: UnitStep - The unit step function (aka Heavyside function)
    -
    -Synopsis:
    -              x  UnitStep -> 0   ;if  x <  0
    -                          -> 1   ;if  x >= 0
    -     [x1 x2 ...] UnitStep -> 0   ;if xi <  0 for any xi in [x]
    -                          -> 1   ;if xi >= 0 for all xi in [x]
    -
    -Description:
    -     "x UnitStep" represents the unit step function,
    -     equal to 0 for x<0 and 1 for x>=0.
    -
    -     "[x1 x2 ...] UnitStep" represents the multidimensional unit step
    -     function which is 1 only if none of the xi are negative.
    -
    -     Alternatives: Function UnitStep_i for integers, UnitStep_d for
    -     doubles, UnitStep_ia for integer arrays, UnitStep_da for double
    -     arrays (all undocumented) -> behavior and synopsis are the same,
    -     except that no warnings or error messages are thrown.
    -
    -Diagnostics:
    -     When called on an empty array, /ArgumentType is raised.
    -
    -     When first element of the array is not of type integer or double,
    -     /ArgumentType is raised.
    -
    -     Will break if called on an array containing non-numerical values.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 13.3.2003
    -
    -Remarks:
    -     This is the SLI version of the Mathematica function "UnitStep".
    -     Documentation taken from the Mathematica Book.
    -
    -     Implementation of the type variants can be found in file
    -     synod2/sli/slimath.cc.
    -SeeAlso: Sign, abs
    -References:
    -     The Mathematica Book
    -
    -*/
    -
    -/UnitStep [/integertype] /UnitStep_i load def
    -/UnitStep [/doubletype]  /UnitStep_d load def
    -/UnitStep [/arraytype]
    -{
    -  size 0 eq
    -  {
    -    M_ERROR (UnitStep) (Array must not be empty.) message
    -    /UnitStep /ArgumentType raiseerror
    -  } if
    -
    -  dup 0 get type
    -  mark
    -  1 pick /integertype eq {pop UnitStep_ia exit} case
    -  1 pick /doubletype  eq {pop UnitStep_da exit} case
    -  {
    -    pop
    -    M_ERROR (UnitStep) (Array must be a homogeneous integer or double array.) message
    -    /UnitStep /ArgumentType raiseerror
    -  }
    -  switchdefault
    -} bind def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: Sign - returns the sign of its argument
    -Synopsis:
    - integer Sign -1,0, or 1
    - double  Sign -1,0, or 1
    -Parameters:
    - The return value is always an integer
    -Description:
    - The C++ standard library does not define a sign function because
    - there is no general agreement on the return value for 0. The function
    - Sign implements the decision made for Mathematica: if the argument is
    - 0, Sign returns 0.
    -Author: Diesmann
    -FirstVersion: 2007.11.28
    -References:
    -   [1] The Mathematica Book "Sign"
    -SeeAlso: UnitStep, abs
    -*/
    -
    -/Sign
    -{
    - dup
    - 0 eq
    - {pop 0 }
    - {0 gt {1}{-1} ifelse }
    - ifelse
    -}
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: IntegerPart - Return integer part of the argument.
    -Synopsis: double IntegerPart -> integerpart
    -Description:
    -     In effect sets all digits to the right of the decimal point to
    -     zero. The sign is preserved. The output value is of type integer.
    -Parameters:
    -     The input value must be of type double,
    -     the output value is of type double.
    -Examples:
    -     -2.3 IntegerPart -> -2.0
    -SeeAlso: FractionalPart
    -
    -*/
    -/IntegerPart trie
    - [/doubletype] { int_d double_i } addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: FractionalPart - Return fractional part of the argument.
    -Synopsis: double FractionalPart -> fractionalpartpart
    -Description:
    -     In effect sets all digits to the left of the decimal point to
    -     zero. The sign is preserved. The output value is of type double.
    -Parameters:
    -     The input value must be of type double,
    -     the output value is of type double.
    -Examples:
    -     -2.3 FractionalPart -> -0.3
    -SeeAlso: IntegerPart
    -
    -*/
    -/FractionalPart trie
    - [/doubletype] {dup_ int_d double_i sub_dd} addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: Max - returns the largest element of an array
    -Synopsis:
    - array Max -> max element
    -Parameters:
    - array
    -Description:
    -  This function finds the largest element in a list, DoubleVector or IntVector. To process
    -  heterogeneous arrays, the operator gt must be supported between any pair of objects in
    -  the list.
    -
    -Examples:
    - [8 4 3 6 9 5] Max --> 9
    -Remarks:
    - Replacess arr::Max in future versions.
    -Author: Gewaltig
    -FirstVersion: 2008.2.12 (Diesmann)
    -References:
    -   [1] The Mathematica Book "Max"
    -SeeAlso: Min, Sort
    -*/
    -/Max
    -{
    -   size 0 eq
    -   {  
    -     /Max /RangeCheck raiseerror
    -   } if
    -   dup 0 get  % start value as sentinel
    -   exch 
    -   { 
    -      dup 2 index gt % compare current element with sentinel
    -     { 
    -       exch pop % if element is greater than sentinel, make it new sentinel
    -     } 
    -     {
    -        pop  %else discard
    -     } ifelse 
    -   } forall 
    -} def
    -
    -/** @BeginDocumentation
    -Name: Min - returns the smallest element of an array
    -Synopsis:
    - array Min -> min element
    -Parameters:
    - array
    -Description:
    - This function finds the smallest element in a list, DoubleVector or intVector.
    - To process heterogeneous arrays, the operator lt must be supported between
    - any pair of objects in the list.
    -
    -Examples:
    - [8 4 3 6 9 5] Min --> 3
    -Remarks:
    - Replacess arr::Min in future versions.
    -
    -Author: Gewaltig
    -FirstVersion: 2008.2.12 (Diesmann)
    -References:
    -   [1] The Mathematica Book "Min"
    -SeeAlso: Max, Sort, Mean, Variance
    -*/
    -/Min
    -{
    -   size 0 eq
    -   {  
    -     /Min /RangeCheck raiseerror
    -   } if
    -   dup 0 get  % start value as sentinel
    -   exch 
    -   { 
    -      dup 2 index lt % compare current element with sentinel
    -     { 
    -       exch pop % if element is less than sentinel, make it new sentinel
    -     } 
    -     {
    -        pop  %else discard
    -     } ifelse 
    -   } forall 
    -}
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: Total - returns the sum of the elements of an array
    -Synopsis:
    - array Total -> sum of elements
    -Parameters:
    - array
    -Description:
    - The function is implemented in SLI and based on the
    - overloaded operator add.
    -Examples:
    - [8 4 3 6 9 5] Total --> 35
    -Remarks:
    - The Mathematica version is more general.
    - Replacess arr::Sum in future versions.
    -Author: Diesmann
    -FirstVersion: 2009.2.22
    -References:
    -   [1] The Mathematica Book "Total"
    -SeeAlso: Max, Sort, Mean, Variance
    -*/
    -/Total
    -{
    - 0 exch {add} Fold
    -} def
    -
    -/** @BeginDocumentation
    -Name: Mean - returns the mean of the elements of an array
    -Synopsis:
    - array Mean -> double, mean of elements
    -Parameters:
    - array
    -Description:
    - The function is implemented in SLI and based on the
    - operator Total.
    -Examples:
    - [8 4 3 6 9 5] Mean --> 5.833
    -Remarks:
    - The Mathematica version is more general
    - Replaces arr:Mean in future versions.
    -Author: Diesmann
    -FirstVersion: 2009.2.22
    -References:
    -   [1] The Mathematica Book "Mean"
    -SeeAlso: Max, Sort, Total, Variance
    -*/
    -/Mean
    -{
    - size cvd exch Total exch div
    -} def
    -
    -/** @BeginDocumentation
    -Name: Variance - returns the variance of the elements of an array
    -Synopsis:
    - array Variance -> double, unbiased estimate of variance of elements
    -Parameters:
    - array
    -Description:
    - The function is implemented in SLI using Mean and Total
    -Examples:
    - [8 4 3 6 9 5] Variance --> 5.366
    -Remarks:
    - The Mathematica version is more general.
    - Replaces arr::Var in future versions.
    -Author: Diesmann
    -FirstVersion: 2009.2.22
    -References:
    -   [1] The Mathematica Book "Variance"
    -SeeAlso: Max, Sort, Total, Mean, StandardDeviation
    -*/
    -/Variance
    -{
    - dup size 1 sub cvd rollu
    - Mean
    - sub
    - {sqr} Map
    - Total
    - exch
    - div
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: StandardDeviation - returns the standard deviation of the elements of an array
    -Synopsis:
    - array StandardDeviation -> double, standard deviation
    -Parameters:
    - array
    -Description:
    - The function is implemented in SLI using Variance
    -Examples:
    - [8 4 3 6 9 5] StandardDeviation --> 2.3166
    -Remarks:
    - The Mathematica version is more general.
    - Replaces arr::SDev in future versions.
    -Author: Diesmann
    -FirstVersion: 2009.2.22
    -References:
    -   [1] The Mathematica Book "StandardDeviation"
    -SeeAlso: Max, Sort, Total, Variance
    -*/
    -/StandardDeviation
    -{
    - Variance sqrt
    -} def
    -
    -
    -
    -
    -
    -% the following two definitions are used to make escaping of
    -% SLI strings in Mathematica easier
    -% Diesmann, 1.4.2003
    -%
    -/NewLine (\n) def
    -/DoublyEscapedNewLine (\\\\n) def
    -
    -
    -
    -/** @BeginDocumentation
    -  Name: CompileMath - converts traditional math to postfix notation
    -  Synopsis: string CompileMath -> proc
    -  Description:
    -   CompileMath converts a string containing a mathematical expression
    -   in traditional infix notation to a procedure using the
    -   standard postfix notation of SLI. The algorithm is:
    -    1. replace traditonal operators like "-" and "+" with
    -       SLI literals like /sub and /add
    -    2. decompose the string into tokens using the standard
    -       SLI scanner
    -    3. compile the sequence of tokens to a SLI postfix expression
    -       using the predictive recursive-descent parser described in
    -       chapter 2 of the Dragon Book.
    -   The result is the unevaluated expression. This enables the user
    -   to store the expression for later reevaluation.
    -  Parameters:
    -   string, is the mathematical expression
    -   proc, is the unevaluated expression in SLI postfix notation
    -  Examples:
    -    ( 5 + 3 * 7 )      CompileMath  exec  --> 26
    -    ( 5 * (3 + 7) )    CompileMath  exec  --> 50
    -    ( 5 + x * 7 )      CompileMath        --> {5 x 7 mul add}
    -    ( 3 + exp 5 )      CompileMath        --> {3 5 exp add}
    -    ( 3 + exp (  x ) ) CompileMath        --> {3 x exp add}
    -    ( 3 + exp ( -x ) ) CompileMath        --> {3 x neg exp add}
    -    ( 3 * exp (sin 2)) CompileMath        --> {3 2 sin exp mul}
    -    ( 3 * exp sin 2 )  CompileMath        --> {3 2 sin exp mul}
    -    (4 * - 7)          CompileMath exec   --> -28
    -    (2^3)              CompileMath        --> {2 3 pow}
    -    (5+3*2^3)          CompileMath        --> {5 3 2 3 pow mul add}
    -    (5+3*2^3-4)        CompileMath        --> {5 3 2 3 pow mul add 4 sub}
    -    (5+3*2^3/4)        CompileMath        --> {5 3 2 3 pow mul 4 div add}
    -    (5+3*2^-3)         CompileMath        --> {5 3 2 3 neg pow mul add}
    -    (4)                CompileMath        --> {4}
    -    ()                 CompileMath        --> {}
    -    (a=7+3)            CompileMath        --> {/a 7 3 add dup rolld Set}
    -    (a=7+3;)           CompileMath        --> {/a 7 3 add dup rolld Set pop}
    -    (a=7+3;6)          CompileMath        --> {/a 7 3 add dup rolld Set pop 6}
    -    (a=7+4;b=2*exp(-2.0/10)) CompileMath  --> {/a 7 4 add dup rolld Set pop /b 2 2.0 neg 10 div exp mul dup rolld Set}
    -    (Function({x+2},'x)) CompileMath      --> {{x 2 add} /x Function}
    -    (f=Function({x+2},'x)) CompileMath    --> {/f {x 2 add} /x Function dup rolld Set}
    -    (f={#+2})              CompileMath    --> {/f {<< >> begin /# Set # 2 add end} dup rolld Set}
    -    (f={#1-#2})            CompileMath    --> {/f {<< >> begin /#2 Set /#1 Set #1 #2 sub end} dup rolld Set}
    -    ({#1-#2})            CompileMath exec --> {<< >> begin /#2 Set /#1 Set #1 #2 sub end}
    -    ([4,3,2])              CompileMath    --> {[4 3 2]}
    -    (x=7+[4,3,2]*2)        CompileMath    --> {/x 7 [ 4 3 2 ] 2 mul add dup rolld Set}
    -    ([])                   CompileMath    --> {[]}
    -    (<< 'x : [-3, 9]*2, 'y : 7 >>) CompileMath --> {<< /x [ 3 neg 9 ] 2 mul /y 7 >>}
    -    (<< >>)                CompileMath    --> {<< >>}
    -    (5+3 // Function( {2*x+1},'x)  ) CompileMath exec  --> 17
    -    (1+(5+3 // Function( {2*x+1},'x))  ) CompileMath exec  --> 18
    -    ( [ 3, [ 2, 1], -9] // Flatten) CompileMath exec --> [3 2 1 -9]
    -    ( [ 3, [ 2, 1], -9] // Flatten // {Select(#,{#<3})}  ) CompileMath exec --> [2 1 -9]
    -    (5+3 // {#+1}  ) CompileMath exec --> 9
    -    (7 5 // {#1-#2}) CompileMath exec --> 2
    -
    -  Bugs:
    -   The present version fails for doubles with negative exponents
    -   because the lexer just replaces all "-" with /sub. A slightly
    -   smarter lexer using a regular expression can solve this problem.
    -  Remarks:
    -   The function can be improved by using a more powerful parsing
    -   scheme. The predictive recursive parsing scheme is used here
    -   as an educational example.
    -  Author: Diesmann
    -  FirstVersion: 090117
    -
    -  SeeAlso: Inline, ExecMath, cst, cvx, exec
    -  References:
    -   [1] The Dragon Book, 1988, chapter 2
    -*/
    -
    -({)  symbol pop /BeginProcedureSymbol Set pop
    -(})  symbol pop /EndProcedureSymbol Set pop
    -([)  symbol pop /BeginArraySymbol Set pop
    -(])  symbol pop /EndArraySymbol Set pop
    -([)  token pop  /BeginArrayToken Set pop
    -(])  token pop  /EndArrayToken Set pop
    -(<<)  symbol pop /BeginDictionarySymbol Set pop
    -(>>)  symbol pop /EndDictionarySymbol Set pop
    -
    -
    -% for debugging, displays call sequence
    -/pdef
    -{
    -% % l p
    -% 1 index {==} exch prepend exch join
    - def
    -}
    -def
    -
    -/CompileMath
    -{
    -<</out [] >> begin currentdict /cdict Set
    -
    -/lexan
    -{
    - [
    -  (/)  ( /div )       % this first because "/" leads literals
    -  (/div  /div) (/pipe)   % for //
    -  (')  ( /lit /)      % operator /literal followed by SLI notation literal value
    -  (^)  ( /pow )
    -  (**) ( /pow )   % as in python
    -  (*)  ( /mul )
    -  (-)  ( /sub )
    -  (+)  ( /add )
    -  (x) 0 40 put ( /openparenthesis )
    -  (x) 0 41 put ( /closeparenthesis )
    -  (<<) ( /BeginDictionary )
    -  (>>) ( /EndDictionary )
    -  (==) ( /eq )
    -  (!=) ( /neq )
    -  (<=) ( /leq )
    -  (<)  ( /lt )
    -  (>=) ( /geq )
    -  (>)  ( /gt )
    -  (=)  ( /def )
    -  (;)  ( /sepexpr )
    -  (,)  ( /comma )
    -  (:)  ( /colon )
    -  (" /openparenthesis )  (x) 0 40 put
    -  ( /closeparenthesis ") (x) 0 41 put
    -
    -  (#)  ( /argument )
    - ] 2 Partition
    -
    - {arrayload pop ReplaceOccurrences} Fold
    -
    - css   % alternative: do this stepwise with symbol
    -}
    -def
    -
    -
    -/gettoken {
    - in empty not
    - {
    -  First
    -  cdict /in in Rest put_d
    - } if
    -} def
    -
    -/match
    -{
    - /lookahead load eq         % avoid immediate lookup of identifier
    - {cdict /lookahead gettoken put_d}
    - { /match /SyntaxError raiseerror }
    - ifelse
    -} def
    -
    -/seq
    -{
    - delayedexpr
    - {
    -  lookahead /comma eq
    -  {
    -   /comma match seq  % no output for comma
    -  }
    -  {
    -   exit
    -  }
    -  ifelse
    - } loop
    -} pdef
    -
    -
    -% algorithm to compile a pure function:
    -% -------------------------------------
    -%
    -% (1) match the BeginProcedureSymbol
    -% (2) determine the current length of the compiled code
    -% (3) compile the body of the function
    -% (4) extract the previously compiled code from out
    -% (5) determine length of compiled body
    -% (6) extract code of compiled body from out
    -% (7) make it a literal procedure object
    -% (8) append procedure object to previously compiled code
    -% (9) store result in out variable
    -%
    -%
    -
    -/purefunction
    -{
    - BeginProcedureSymbol match
    -   out length                          % length
    -
    -   <</args [] >> begin                 % dictionary to store argument names of the pure function
    -                                       % in the #1, ..., #n notation. In case of only a single argument
    -                                       % the # is sufficient 
    -% expr
    -     expr_sequence                        % length
    -
    -     dup out exch Take                   % length first
    -     exch                                % first length
    -     out length sub  out exch Take       % first last
    -     cvx
    -
    -
    -     args length 0 gt
    -     {
    -      {<< >> begin} 
    -      args Sort Reverse { cvlit append (Set) cvn append } forall
    -
    -      exch join {end} join
    -     }
    -     if
    -
    -     cvlp_p                             % first proc  (7)
    -
    -     append /out cdict                   % v l d  (8)
    -     exch                                % v d l
    -     rolld                               % d l v
    -     put_d
    -
    -  end
    -
    - EndProcedureSymbol match
    -} pdef
    -
    -
    -/expr_sequence
    -{
    - {
    -  /lookahead load EndProcedureSymbol eq {exit} if
    -
    -  expr
    -  /lookahead load /sepexpr eq
    -  {
    -   /sepexpr  match /pop cvn /out cdict AppendTo
    -  }
    -  if
    -
    - } loop
    -} pdef
    -
    -
    -/delayedexpr
    -{
    - /lookahead load BeginProcedureSymbol eq
    - {
    -  purefunction
    - }
    - {
    -  litarg
    - }
    - ifelse
    -} pdef
    -
    -
    -/litarg
    -{
    - /lookahead load /lit eq
    - {
    -  /lit match
    -  lookahead /out cdict AppendTo  % the current symbol is the literal
    -  lookahead match
    - }
    - {
    -  expr
    - }
    - ifelse
    -} pdef
    -
    -
    -% An expression is an inequality followed by a piped sequence
    -% of operations on the result of the inequality:
    -%    ie // a // b // c ...
    -% The operations are either specified by an individual function name or direct
    -% generators of pure functions:
    -%    ie // Flatten
    -%    ie // Function({x+1},'x)
    -%    ie // {#+1}
    -%
    -/expr
    -{
    - inequality
    -
    - {
    -  /lookahead load /pipe eq
    -  {
    -   /pipe match
    -   /lookahead load type /nametype eq
    -   {
    -    /lookahead load /Function cvn eq
    -    {
    -     inequality /exec cvn /out cdict AppendTo
    -    }
    -    {
    -     /lookahead load /out cdict AppendTo
    -     /lookahead load match
    -    }
    -    ifelse % pure function starting with 'Function'
    -   }
    -   {
    -    purefunction /exec cvn /out cdict AppendTo
    -   }
    -   ifelse  % nametype
    -  }
    -  {
    -   exit
    -  }
    -  ifelse
    -
    - } loop     % /pipe
    -} pdef
    -
    -
    -
    -/inequality
    -{
    - equality
    - {
    -  /lookahead load /lt eq
    -  {
    -   /lt match equality /lt cvn /out cdict AppendTo
    -  }
    -  {
    -   /lookahead load /leq eq
    -   {
    -    /leq match equality /leq cvn /out cdict AppendTo
    -   }
    -   {
    -    /lookahead load /gt eq
    -    {
    -     /gt match equality /gt cvn /out cdict AppendTo
    -    }
    -    {
    -     /lookahead load /geq eq
    -     {
    -      /geq match equality /geq cvn /out cdict AppendTo
    -     }
    -     {
    -      exit
    -     }
    -     ifelse
    -    }
    -    ifelse
    -   }
    -   ifelse
    -  }
    -  ifelse
    -
    - } loop     % /lt, /leq, /gt, /geq
    -} pdef
    -
    -
    -/equality
    -{
    - sum
    - {
    -  /lookahead load /eq eq
    -  {
    -   /eq match sum /eq cvn /out cdict AppendTo
    -  }
    -  {
    -   /lookahead load /neq eq
    -   {
    -    /neq match sum /neq cvn /out cdict AppendTo
    -   }
    -   {
    -    exit
    -   }
    -   ifelse
    -  }
    -  ifelse
    - } loop     % /eq, /neq
    -} pdef
    -
    -
    -
    -/sum
    -{
    - term
    - {
    -  /lookahead load /add eq
    -  {
    -   /add match term /add cvn /out cdict AppendTo
    -  }
    -  {
    -   /lookahead load /sub eq
    -   {
    -    /sub match term /sub cvn /out cdict AppendTo
    -   }
    -   {
    -    exit
    -   }
    -   ifelse
    -  }
    -  ifelse
    - } loop     % /add, /sub
    -} pdef
    -
    -
    -
    -/factor
    -{
    - signedfactor power
    -} pdef
    -
    -/power
    -{
    - {
    -  /lookahead load /pow eq
    -  {
    -   /pow match signedfactor /pow cvn /out cdict AppendTo
    -  }
    -  {
    -   exit
    -  }
    -  ifelse
    - } loop
    -} pdef
    -
    -
    -/signedfactor
    -{
    - /lookahead load /sub eq
    - {
    -  /sub match unsignedfactor /neg cvn /out cdict AppendTo
    - }
    - {
    -  unsignedfactor
    - } ifelse
    -} pdef
    -
    -
    -/array
    -{
    - /BeginArrayToken load /out cdict AppendTo
    - lookahead match
    -
    - /lookahead load /EndArraySymbol load eq
    - {
    -  /EndArrayToken load /out cdict AppendTo
    -  lookahead match
    - }
    - {
    -
    -  {
    -   expr % delayedexpr     % expr
    -   lookahead /comma eq
    -   {
    -    /comma  match
    -   }
    -   {
    -    exit
    -   }
    -   ifelse
    -  }
    -  loop
    -
    -  lookahead /EndArraySymbol load eq
    -  {
    -   /EndArrayToken load /out cdict AppendTo
    -   lookahead match
    -  }
    -  {
    -   /array /EndArrayExpectedError raiseerror
    -  }
    -  ifelse
    -
    - }
    - ifelse
    -
    -} pdef
    -
    -
    -/dictionaryentry
    -{
    - litarg
    -
    - lookahead /colon eq
    - {
    -  lookahead match
    - }
    - {
    -  /dictionaryentry /ColonExpectedError raiseerror
    - }
    - ifelse
    -
    - expr
    -
    -} pdef
    -
    -
    -
    -/dictionary
    -{
    - /BeginDictionarySymbol load /out cdict AppendTo
    - lookahead match
    -
    - lookahead /EndDictionary eq
    - {
    -  /EndDictionarySymbol load /out cdict AppendTo
    -  lookahead match
    - }
    - {
    -
    -  {
    -   dictionaryentry
    -   lookahead /comma eq
    -   {
    -    /comma  match
    -   }
    -   {
    -    exit
    -   }
    -   ifelse
    -  }
    -  loop
    -
    -  lookahead /EndDictionary eq
    -  {
    -   /EndDictionarySymbol load /out cdict AppendTo
    -   lookahead match
    -  }
    -  {
    -   /array /EndDictionaryExpectedError raiseerror
    -  }
    -  ifelse
    -
    - }
    - ifelse
    -
    -} pdef
    -
    -
    -
    -
    -
    -/unsignedfactor    %  x =
    -{
    - /lookahead load type /nametype eq % avoid immediate lookup of identifiers
    - {
    -  /lookahead load                   % leave id on stack
    -  /lookahead load match  assign  % factorarg /out AppendTo % assign  % /out AppendTo
    - }
    - {
    -  lookahead /argument eq
    -  {
    -   /argument match
    -   lookahead type /integertype eq
    -   {
    -    (#) lookahead cvs join dup cvn /out cdict AppendTo
    -    /args AppendTo
    -    lookahead match
    -   }
    -   {
    -    (#) cvn /out cdict AppendTo
    -%   /argument match
    -   (#) /args AppendTo 
    -%  1 /n_args Set
    -   }
    -   ifelse
    -  }
    -  {
    -   lookahead /openparenthesis eq
    -   {
    -    /openparenthesis match expr /closeparenthesis match
    -   }
    -   {
    -    lookahead type /integertype eq
    -    lookahead type /doubletype  eq or
    -    lookahead type /stringtype  eq or
    -    {
    -     lookahead /out cdict AppendTo
    -     lookahead match
    -    }
    -    {
    -     lookahead /BeginArraySymbol load eq
    -     {
    -      array
    -     }
    -     {
    -      lookahead /BeginDictionary eq
    -      {
    -       dictionary
    -      }
    -      {
    -       lookahead /BeginProcedureSymbol load eq
    -       {
    -        purefunction
    -       }
    -       {
    -        /unsignedfactor /SyntaxError raiseerror
    -       } ifelse
    -      } ifelse
    -     } ifelse
    -    } ifelse
    -   } ifelse
    -  } ifelse
    - } ifelse
    -} pdef
    -
    -
    -/assign
    -{
    - /lookahead load /def eq
    - {
    -  % the id is still on the stack, make literal for assignment
    -  cvlit /out cdict AppendTo /def match delayedexpr {dup rolld Set} cvlit /out cdict JoinTo
    -              % version without return value:
    -              %                       /def cvn /out AppendTo
    - }
    - { % the id is still on the stack
    -  factorarg /out cdict AppendTo
    - }
    - ifelse
    -} pdef
    -
    -
    -/factorarg
    -{
    - /lookahead load type /nametype eq % avoid immediate lookup of identifiers
    - {
    -  /lookahead load
    -  /lookahead load match factorarg /out cdict AppendTo
    - }
    - {
    -  lookahead /openparenthesis eq
    -  {
    -   /openparenthesis match
    -   /lookahead load /closeparenthesis eq
    -   {
    -    /closeparenthesis match
    -   }
    -   {
    -    seq /closeparenthesis match
    -   }
    -   ifelse
    -  }
    -  {
    -   lookahead type /integertype eq
    -   lookahead type /doubletype  eq or
    -   lookahead type /stringtype  eq or
    -   {
    -    lookahead /out cdict AppendTo
    -    lookahead match
    -   }
    -   {
    -    lookahead /BeginArraySymbol load eq
    -    {
    -     array
    -    }
    -    {
    -     lookahead /BeginDictionary eq
    -     {
    -      dictionary
    -     }
    -     if                      % epsilon
    -    } ifelse
    -   } ifelse
    -  } ifelse
    - } ifelse
    -
    -} pdef
    -
    -
    -
    -%
    -/term
    -{
    - factor
    - {
    -  /lookahead load /mul eq
    -  {
    -   /mul match factor /mul cvn /out cdict AppendTo
    -  }
    -  {
    -   /lookahead load /div eq
    -   {
    -    /div match factor /div cvn /out cdict AppendTo
    -   }
    -   {
    -    exit
    -   }
    -   ifelse
    -  }
    -  ifelse
    -
    - } loop
    -} pdef
    -
    -
    -/statement
    -{
    - {
    -  /lookahead load [] eq {exit} if
    -
    -  expr
    -  /lookahead load /sepexpr eq
    -  {
    -   /sepexpr  match /pop cvn /out cdict AppendTo
    -  }
    -  if
    -
    - } loop
    -} pdef
    -
    -
    -
    -%
    -% main of CompileMath
    -%
    -
    -lexan /in Set
    -
    -gettoken /lookahead Set
    -
    -statement  % expr
    -
    -
    -out cvx
    -
    -end
    -}
    -def
    -
    -/** @BeginDocumentation
    - Name: ExecMath - execute a math expression.
    - Synopsis: (expr) ExecMath -> val
    - Description:
    -  ExecMath is equivalent to the sequence
    -  CompileMath exec
    - SeeAlso: CompileMath, Inline
    -*/
    -/ExecMath
    -{
    -  CompileMath exec
    -} def
    -
    -
    -/fsprompt
    -{
    -  (fSLI )
    -  count 1 gt_ii      % counter has to be corrected for operative
    -  {                  % objects on the stack
    -    ([) join_s
    -    count 1 sub_ii cvs join_s
    -  } if
    -  (] ) join_s
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: mathexecutive - start interactive math session
    -Description:
    -Starts an interactive shell similar to the standard shell of SLI
    -provided by the command executive. You can leave the shell by
    -typing exit.
    -
    -In contrast to executive, mathexecutive accepts an infix mathematical
    -notation. The input is compiled with command CompileMath prior to
    -execution.  See the documentation of CompileMath for the details of
    -the syntax.
    -
    -Remarks:
    -The syntax accepted by this command is experimental, be prepared for
    -substantial changes.
    -
    -Author: Diesmann
    -FirstVersion: March 2010
    -SeeAlso: executive, exit, CompileMath
    -*/
    -
    -
    -%% check whether GNU readline is installed. If so,
    -%% use it for the executive command.
    -
    -systemdict /GNUreadline known
    -{
    -
    - /mathexecutive
    - {
    -  (The syntax accepted by this command is experimental,\nsee the documentation of CompileMath for details.)
    -   M_WARNING  message
    -  {  %% loop with stopped context to catch signals
    -   {
    -    callback
    -    fsprompt GNUreadline
    -    {
    -      dup GNUaddhistory
    -      CompileMath stopped  {handleerror} if
    -    } if
    -   } stopped {handleerror} if % to catch signals
    -  } loop
    -% exithook
    - } bind def
    -
    -}
    -{
    -
    - /mathexecutive
    - {
    -  (The syntax accepted by this command is experimental,\nsee the documentation of CompileMath for details.)
    -  M_WARNING  message
    -  {
    -   {
    -     callback
    -     fsprompt readline
    -     {
    -      CompileMath stopped {handleerror} if
    -     } if
    -   } stopped {handleerror} if % to catch signals
    -  } loop
    -%  exithook
    - } bind def
    -
    -} ifelse
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: Inline - Replace names in a procedure with their definitions.
    -
    -Synopsis:
    -   {proc} <<dict>> Inline -> {proc'}
    -
    -Parameters:
    -   {proc}    - procedure to be transformed
    -   <<dict>>  - dictionary with names and definitions for the names to be inlined.
    -   {proc'}   - the transformed procedure with all names replaced.
    -
    -Description:
    -
    -Transform the input procedure {proc} such that all names that are
    -defined in <<dict>> are placed by their definitions.
    -
    -Inline can be used to inline the code of procedures or to replace
    -names of constants with their literal values. All names that are not
    -defined in <<dict>> are unchanged.
    -
    -Inline is particularly useful in combination with CompileMath.
    -
    -Inline is similar to bind, but there are two big differences:
    -1. bind uses the current dictstack to determine which names are placed.
    -2. bind only replaces names that refer to C++-functions or tries.
    -
    -Examples:
    -SLI ] {a b add} <</a 1 /b 2 >> Inline ==
    -{1 2 add}
    -
    -SLI ] {1 2 3 stack} << /stack dup load  >> Inline ==
    -{1 2 3 0 1 -count- 3 -sub_ii- /{-index- =} -for-}
    -
    -Version: January 19 2008
    -Author: marc-Oliver Gewaltig
    -SeeAlso: bind, CompileMath
    -*/
    -/:Inline
    -{
    -   [
    -     exch  % swap position of mark and array
    -     cvlit % convert procedure to array
    -     {
    -       dup
    -       type /nametype eq
    -       {
    -         dup cvlit
    -         currentdict exch known
    -         {
    -           cvlit currentdict exch get
    -           dup type /proceduretype eq
    -           {
    -             cvlit arrayload pop
    -           } if
    -         } if
    -       }
    -       {
    -         dup type /literalproceduretype eq
    -         {
    -	   exec
    -           currentdict
    -           Inline cvlp
    -         } if
    -       } ifelse
    -
    -     } forall
    -   ] cvx
    -} def
    -
    -/Inline
    -[/proceduretype /dictionarytype]
    -{
    -  begin
    -    :Inline
    -  end
    -} def
    -
    -/** @BeginDocumentation
    -Name: Apply - calls a function with the elements of an array as arguments
    -Synopsis: array proc Apply -> any
    -Description:
    - Apply interprets the elements of the input array a as the list
    - of arguments of the supplied function f,
    -   f(a(1),a(2), ...,a(n))
    -
    - This is to be distinguished from Map which individually applies
    - the function to the elements of the array,
    -   [f(a(1),f(a(2), ...,f(a(n))] 
    -
    -Parameters:
    -  array is an arbitrarily shaped heterogeneous array. 
    -  proc is any procedure object (pure function).
    -
    -Examples:
    -
    -  [1 2] {add} Apply --> 3
    -  [1 2] {dup mul} Map --> [1 4]
    -  [(hell world) 4 (o)] {insert} Apply --> (hello world)
    -
    -Author: Diesmann
    -FirstVersion: unknown, documented 121124
    -Remarks:
    - This function is an implementation of Mathematica's Apply function.
    -SeeAlso: Map, MapAt, MapThread
    -References:
    - [1] The Mathematica Book V4.0 "Apply"
    -*/
    -% a f
    -/Apply
    -{
    - exch       % f a
    - arrayload  % f a1 ... an n
    - 1 add      % f a1 ... an n+1
    - -1 roll    % a1 ... an f
    - exec
    -}
    -def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: Function - creates pure function with named arguments
    -
    -Synopsis:
    -   {proc} literal_1 ... literal_n    Function -> proc'
    -   string literal_1 ... literal_n    Function -> proc'
    -   [literal_1 ... literal_n] {proc}  Function -> proc'
    -   [literal_1 ... literal_n] string  Function -> proc'
    -
    -
    -Parameters:
    -   proc       - code body using variables
    -   string     - code body using variables in infix notation
    -   literal_i  - the name of the ith argument
    -   proc'      - pure function with named arguments
    -
    -Description:
    - Pure functions are one of the most powerful features of SLI. They are
    - first class objects and can be assembled at run time like arrays. Some
    - times pure functions are constructed for one time execution, however more
    - often they are used as arguments of functional operators like Map and Fold
    - executing the pure function many times.
    - If a pure function has several arguments or a particular argument is used many
    - times in the code managing the location of the arguments on the stack can be
    - cumbersome. In these situations operator Function is helpful, it assigns each
    - argument of the pure function to a formal name which can be used in the body
    - of function. If the pure function is specified as a string, Compile Math is
    - called for conversion to rpn. Note that the example combining Function and Map
    - is efficient. The pure function is constructed from the string only once but
    - executed 4 times with different arguments. In the alternative syntax the variables
    - are declared by an array prior to the body of the function. This notation increases
    - the readability of definitions of  named functions because in most programming
    - languages the declaration of variables preceeds the function body. In combination
    - with operator def also the type of the arguments can be specified. The definition
    - of a function without arguments is useful if the body of the function introduces
    - local variables and therefore profits from the automatic restriction of scope by
    - operator Function. This is shown in the last example. Without the empty array the
    - arguments of Function would not be unique.
    - The availability of the alternative version ExecFunction with immediate execution
    - highlights the fact that a pure function with named arguments maybe used
    - for clarity even in situations where it needs to be evaluated only once.
    -
    -Examples:
    - 2   {x 1 x add mul} /x    Function exec --> 6
    - 2 3 {x 1 x add mul} /x /y Function exec --> 6
    - 2 3 {x y x add mul} /x /y Function exec --> 10
    - 2 3   ( x*(y+x) )   /x /y Function exec --> 10
    -
    - ( x*(y+x) ) /x /y Function --> {<< >> begin /y Set /x Set x y x add mul end}
    -
    - [2. 3. 4. 5.]  (x + (1+x)^3) /x Function Map --> [29. 67. 129. 221.]
    -
    - /f ( x*(y+x) )  /x /y  Function def
    - /f [/x /y] ( x*(y+x) ) Function def
    -
    - /f [/doubletype /doubletype] [/x /y] (y+x^2) Function def
    - /f [/doubletype /doubletype] [/x /y] {y x dup mul add} Function def
    -
    -
    - /f [] (x=sin(0.7);x^2-3*x) Function def
    -
    -
    -Version: 090302
    -Author: Diesmann
    -References:
    -   [1] The Mathematica Book "Function"
    -SeeAlso: CompileMath, Inline, ExecFunction
    -*/
    -/Function_
    -{
    - {<< >> begin}
    -
    - {
    -  exch
    -  dup type
    -  /literaltype neq
    -  {
    -   dup type
    -   /stringtype eq
    -   {
    -    CompileMath
    -   } if
    -   exit
    -  } if
    -  append {Set} join
    - } loop
    -
    - join
    - {end} join
    -}
    -def
    -
    -/Function
    -[/literaltype]
    -{
    - Function_
    -} def
    -
    -/Function
    -[/arraytype /anytype]
    -{
    - exch arrayload pop Function_
    -}
    -def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: ExecFunction - immediately execute a pure function with named arguments
    -Synopsis:
    -   {proc} literal_1 ... literal_n ExecFunction -> val
    -   string literal_1 ... literal_n ExecFunction -> val
    -
    -Description:
    -  ExecFunction is equivalent to the sequence
    -  Function exec
    -Examples:
    - 2   {x 1 x add mul} /x    ExecFunction --> 6
    - 2 3 {x 1 x add mul} /x /y ExecFunction --> 6
    - 2 3 {x y x add mul} /x /y ExecFunction --> 10
    - 2 3   ( x*(y+x) )   /x /y ExecFunction --> 10
    -
    -Version: 090304
    -Author: Diesmann
    - SeeAlso: Function, CompileMath, Inline
    -*/
    -/ExecFunction
    -{
    - Function exec
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: LambertW - simple iteration implementing the Lambert-W function
    -Synopsis:
    -   double double LambertW -> double
    -Parameters:
    -The first parameter is the argument of the Lambert-W function, the
    -second argument is the start value of the iteration. 0.0 is a good initial
    -value for the principal branch of the Lambert-W function. -2.0 is a good
    -choice to select the non-principal branch.
    -
    -Description:
    -The Lambert-W function is the inverse function of x=W*exp(W). For real values of
    -x and W, the function W(x) is defined on [-1/e,\infty). On the interval [-1/e,0)
    -it is double valued. The two branches coincide at W(-1/e)=-1. The so called
    -principal branch LambertW0 continuously grows (W>=-1) and crosses the origin (0,0).
    -The non-principal branch LambertWm1 is defined on [-1/e,0) and declines to -\infty for
    -growing x.
    -
    -LambertW uses Halley's method described in [1] (see also [2]) to
    -implement the functions for the two branches LambertW0 and LambertWm1
    -if NEST has no access to the GSL [3].
    -
    -Version: 090818
    -Author: Diesmann
    -References:
    -[1] Corless, R. M., Gonnet, G. H., Hare, D. E. G., Jeffrey, D. J., & Knuth, D. E.
    -    (1996). On the lambert w function. Advances in Computational Mathematics 5,
    -     329--359.
    -[2] Wikipedia (2009). Lambert W function ---wikipedia, the free encyclopedia.
    -[3] Galassi, M., Davies, J., Theiler, J., Gough, B., Jungman, G., Booth, M.,
    -    & Rossi, F. (2006). GNU Scientific Library Reference Manual (2nd Ed.).
    -    Network Theory Limited.
    -
    -SeeAlso: LambertWm1, LambertW0, testsuite::test_lambertw, CompileMath
    -*/
    -/LambertW
    -[/doubletype /doubletype] [/x /start]
    -{
    - 1e-12 /prec Set
    - start /w    Set
    - 100   % maxiters
    - (we=w*E**w; w1e=(w+1)*E**w; abs((x-we)/w1e)) CompileMath
    - {prec leq {w exit} if }
    - (w=w-(we - x) / (w1e - (w + 2) * (we - x) / (2*w + 2));) CompileMath
    -
    - join join
    - repeat
    -}
    -Function def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: LambertW0 - principal branch of the Lambert-W function
    -Synopsis:
    -   double LambertW0 -> double
    -Description:
    -The Lambert-W function [1] is the inverse function of x=W*exp(W). For real values of
    -x and W, the function W(x) is defined on [-1/e,\infty). On the interval [-1/e,0)
    -it is double valued. The two branches coincide at W(-1/e)=-1. The so called
    -principal branch LambertW0 continuously grows (W>=-1) and crosses the origin (0,0).
    -The non-principal branch LambertWm1 is defined on [-1/e,0) and declines to -\infty for
    -growing x.
    -
    -NEST uses the GSL [2] implementations of LambertW0 and LambertWm1 if available and
    -falls back to to the iterative scheme LambertW suggested in [1] if not.
    -The GSL interfaces for LambertW0 and LambertWm1 are in the SpecialFunctionsModule
    -of SLI.
    -
    -Examples:
    -
    -The Lambert-W function has applications in many areas as described in [1] and [3].
    -For example, the solution of
    -     exp(s) = 1 + a*s
    -with respect to s can be written in closed form as
    -  s=1/a * (-aW(-exp(-1/a)/a) -1 )
    -
    -Version: 090818
    -Author: Diesmann
    -References:
    -[1] Corless, R. M., Gonnet, G. H., Hare, D. E. G., Jeffrey, D. J., & Knuth, D. E.
    -    (1996). On the lambert w function. Advances in Computational Mathematics 5,
    -     329--359.
    -[2] Galassi, M., Davies, J., Theiler, J., Gough, B., Jungman, G., Booth, M.,
    -    & Rossi, F. (2006). GNU Scientific Library Reference Manual (2nd Ed.).
    -    Network Theory Limited.
    -[3] Wikipedia (2009). Lambert W function ---wikipedia, the free encyclopedia.
    -
    -
    -SeeAlso: LambertWm1, LambertW, testsuite::test_lambertw
    -*/
    -statusdict/have_gsl :: not
    -{
    - /LambertW0  [/doubletype] {0.  LambertW} def
    -}
    -if
    -
    -/** @BeginDocumentation
    -Name: LambertWm1 - non-principal branch of the Lambert-W function
    -Synopsis:
    -   double LambertWm1 -> double
    -Description:
    -The Lambert-W function [1] is the inverse function of x=W*exp(W). For real values of
    -x and W, the function W(x) is defined on [-1/e,\infty). On the interval [-1/e,0)
    -it is double valued. The two branches coincide at W(-1/e)=-1. The so called
    -principal branch LambertW0 continuously grows (W>=-1) and crosses the origin (0,0).
    -The non-principal branch LambertWm1 is defined on [-1/e,0) and declines to -\infty for
    -growing x.
    -
    -NEST uses the GSL [2] implementations of LambertW0 and LambertWm1 if available and
    -falls back to to the iterative scheme LambertW suggested in [1] if not.
    -The GSL interfaces for LambertW0 and LambertWm1 are in the SpecialFunctionsModule
    -of SLI.
    -
    -Examples:
    -
    -The Lambert-W function has applications in many areas as described in [1] and [3].
    -For example, the problem of finding the location of the maximum of the postsynaptic
    -potential generated by an alpha-function shaped current can be reduced to the
    -equation
    -     exp(s) = 1 + a*s .
    -Here, s is the location of the maximum in scaled time s=b*t, where
    -b= 1/tau_alpha - 1/tau_m and a is the ratio of the time constants tau_m/tau_alpha.
    -In terms of the Lambda_W function the solution is
    -  s=1/a * (-aW(-exp(-1/a)/a) -1 ) .
    -The solution is guaranteed to live on the non-principal branch because the scaled time
    -needs to be positive. This requires W < -1/a which is trivially fulfilled for the
    -non-principal branch and there is no solution on the principal branch.
    -
    -
    -Version: 090818
    -Author: Diesmann
    -References:
    -[1] Corless, R. M., Gonnet, G. H., Hare, D. E. G., Jeffrey, D. J., & Knuth, D. E.
    -    (1996). On the lambert w function. Advances in Computational Mathematics 5,
    -     329--359.
    -[2] Galassi, M., Davies, J., Theiler, J., Gough, B., Jungman, G., Booth, M.,
    -    & Rossi, F. (2006). GNU Scientific Library Reference Manual (2nd Ed.).
    -    Network Theory Limited.
    -[3] Wikipedia (2009). Lambert W function ---wikipedia, the free encyclopedia.
    -SeeAlso: LambertW0, LambertW, testsuite::test_lambertw
    -*/
    -statusdict/have_gsl :: not
    -{
    - /LambertWm1 [/doubletype] {-2. LambertW} def
    -}
    -if
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: ScanThread - execute a function to corresponding elements of n arrays
    -Synopsis: [[a11 ... a1n]...[am1 ... amn]] {f} ScanThread -> -
    -Description: ScanThread applies the given function to corresponding elements
    -             of m argument arrays. This is similar to MapThread, but no results
    -	     are returned.
    -
    -Parameters: the first parameter is a list of m arrays of equal size n.
    -            The second parameter is a procedure which takes m arguments and
    -	    returns nothing.
    -
    -Examples:   [[(a) (b) (c)] [1 2 3]] { exch (: ) join exch cvs join == } ScanThread
    -
    -	    generates the following output and leaves nothing on the stack.
    -
    -References: This function implements the simple version of Mathematica's ScanThread
    -SeeAlso: MapThread, forall, Map, MapIndexed, NestList, FoldList
    -*/
    -
    -/ScanThread
    -[/arraytype /proceduretype]
    -{
    -  << >> begin
    -    /proc Set
    -    /args Set
    -
    -    args length 0 gt
    -    {
    -      % ensure all arrays have equal length
    -      args { length } Map
    -      dup First /l0 Set
    -      Rest true exch { l0 eq and } Fold
    -      not
    -      {
    -        /ScanThread /ArraysMustHaveEqualLength raiseerror
    -      } if
    -
    -      args Transpose
    -      { arrayload ; proc } forall
    -    }
    -    if
    -  end
    -} def
    -
    -%% Functions on Integer and double vectors
    -
    -/cva [/intvectortype] /intvector2array load def
    -/cva [/doublevectortype] /doublevector2array load def
    -
    -/** @BeginDocumentation
    -   Name: cv_iv - convert array of integers to an IntVector.
    - */
    -/cv_iv[/arraytype]  { {cvi} Map array2intvector } def
    -
    -/** @BeginDocumentation
    -   Name: cv_dv - convert array of integers to a DoubleVector.
    - */
    -
    -/cv_dv[/arraytype] { {cvd} Map array2doublevector } def
    -
    -/neg [/intvectortype] /neg_iv load def
    -/neg [/doublevectortype] /neg_dv load def
    -/inv_ /inv load def
    -
    -/inv [/doublevectortype] /inv_dv load def
    -/inv [/doubletype] /inv_ load def
    -
    -/add [/intvectortype /intvectortype] /add_iv_iv load def
    -/add [/integertype /intvectortype] /add_i_iv load def
    -/add [/intvectortype /integertype] {exch_ add_i_iv} def
    -/add [/doublevectortype /doublevectortype] /add_dv_dv load def
    -/add [/doubletype /doublevectortype] /add_d_dv load def
    -/add [/doublevectortype /doubletype] {exch_ add_d_dv} def
    -/sub [/intvectortype /intvectortype] /sub_iv_iv load def
    -/sub [/integertype /intvectortype] { neg_iv add_i_iv} def
    -/sub [/intvectortype /integertype] { neg_i exch_ add_i_iv} def
    -/sub [/doublevectortype /doublevectortype] /sub_dv_dv load def
    -/mul [/intvectortype /intvectortype] /mul_iv_iv load def
    -/mul [/integertype /intvectortype] /mul_i_iv load def
    -/mul [/intvectortype /integertype] {exch_ mul_i_iv} def
    -/mul [/doubletype /intvectortype]  /mul_d_iv load def
    -/mul [/intvectortype /doubletype ]  {exch_ mul_d_iv} def
    -/mul [/doubletype /doublevectortype] /mul_d_dv load def
    -/mul [/doublevectortype /doubletype] {exch_ mul_d_dv} def
    -/mul [/doublevectortype /doublevectortype] /mul_dv_dv load def
    -/div [/intvectortype /integertype] { exch_ { 1 index div_ii } Map exch_ ; } def
    -/div [/intvectortype /intvectortype] /div_iv_iv load def
    -/div [/doublevectortype /doublevectortype] /div_dv_dv load def
    -/div [/doubletype /doublevectortype] { inv_dv mul_d_dv } def
    -/div [/doublevectortype /doubletype] { inv_d exch_ mul_d_dv}  def
    -
    -/add [/intvectortype /arraytype] {cv_iv add_iv_iv} def
    -/mul [/intvectortype /arraytype] {cv_iv mul_iv_iv} def
    -/sub [/intvectortype /arraytype] {cv_iv sub_iv_iv} def
    -/div [/intvectortype /arraytype] {cv_iv div_iv_iv} def
    -
    -/add [/arraytype /intvectortype] {exch cv_iv add_iv_iv} def
    -/mul [/arraytype /intvectortype] {exch cv_iv mul_iv_iv} def
    -/dub [/arraytype /intvectortype] {exch cv_iv exch sub_iv_iv} def
    -/div [/arraytype /intvectortype] {exch cv_iv exch div_iv_iv} def
    -
    -/add [/doublevectortype /arraytype] {cv_dv add_dv_dv} def
    -/mul [/doublevectortype /arraytype] {cv_dv mul_dv_dv} def
    -/sub [/doublevectortype /arraytype] {cv_dv sub_dv_dv} def
    -/div [/doublevectortype /arraytype] {cv_dv div_dv_dv} def
    -
    -/add [/arraytype /doublevectortype] {exch cv_dv add_dv_dv} def
    -/mul [/arraytype /doublevectortype] {exch cv_dv mul_dv_dv} def
    -/dub [/arraytype /doublevectortype] {exch cv_dv exch sub_dv_dv} def
    -/div [/arraytype /doublevectortype] {exch cv_dv exch div_dv_dv} def
    -
    -/length [/doublevectortype] /length_dv load def
    -/length [/intvectortype] /length_iv load def
    -/size [/intvectortype] {dup length_iv} def
    -/size [/doublevectortype] {dup length_dv} def
    -
    -/eq [/intvectortype /intvectortype] /eq_iv load def
    -/eq [/doublevectortype /doublevectortype] /eq_dv load def
    -
    -/neq [/intvectortype /intvectortype] {eq not} def
    -/neq [/doublevectortype /doublevectortype] {eq not} def
    -
    -/forall [/doublevectortype /proceduretype] /forall_dv load def
    -/forall [/intvectortype /proceduretype] /forall_iv load def
    -
    -/Map [/doublevectortype /proceduretype] /Map_ load def
    -/Map [/intvectortype /proceduretype] /Map_ load def
    - 
    -/arrayload_ /arrayload load def
    -
    -/arrayload [/arraytype] /arrayload_ load def
    -/arrayload [/intvectortype] {intvector2array arrayload_} def
    -/arrayload [/doublevectortype] {doublevector2array arrayload_} def
    -
    -/get [/doublevectortype /integertype] /get_dv_i load def
    -/get [/doublevectortype /intvectortype] /get_dv_iv load def
    -/get [/intvectortype /integertype] /get_iv_i load def
    -/get [/intvectortype /intvectortype] /get_iv_iv load def
    -/get [/intvectortype /arraytype] {cv_iv get_iv_iv} def
    -/get [/doublevectortype /arraytype] {cv_iv get_dv_iv} def
    -
    -/put  [/doublevectortype /integertype /doubletype] /put_dv_i_d load def
    -/put  [/intvectortype /integertype /integertype] /put_iv_i_i load def
    -
    -/** @BeginDocumentation
    -Name: zeros - Return a DoubleVector filled with zeros.
    -Synapsis: n zeros -> [. 0. 0. ... .]
    -Author: Marc-Oliver Gewaltig
    -FirstVersion: Dec. 4 2012
    -SeeAlso: ones, arange
    -*/
    -/zeros [/integertype] /zeros_dv load def
    -
    -/** @BeginDocumentation
    -Name: ones - Return a DoubleVector filled with ones.
    -Synapsis: n ones -> [. 1. 1. ... .]
    -Author: Marc-Oliver Gewaltig
    -FirstVersion: Dec. 4 2012
    -SeeAlso: zeros, arange
    -*/
    -
    -/ones [/integertype] /ones_dv load def
    -
    -/** @BeginDocumentation
    -Name: arange - Return a Int/DoubleVector filled with a range of numbers.
    -Synapsis: [n] arange -> [ 1  ... 10 ]
    -          [a b] arange -> [a ... b]
    -          [a b s] arange -> [a a+s ...]
    -Description:
    -arange is identical to Range, except that the returned object is a DoubleVector or IntVector, depending on the type of the
    -range specification.
    -
    -Author: Marc-Oliver Gewaltig
    -FirstVersion: Dec. 4 2012
    -SeeAlso: zeros, ones, Range, array, LayoutArray, Table
    -*/
    -/arange_ /arange load def
    -/arange [/arraytype] /arange_ load def
    -
    -/getinterval [/intvectortype /integertype /integertype]
    -{
    -   2 arraystore arange 
    -   get_iv_iv 
    -} def 
    -
    -/getinterval [/doublevectortype /integertype /integertype]
    -{
    -   2 arraystore arange 
    -   get_dv_iv 
    -} def 
    -
    -/<. mark def
    -/<# mark def
    -
    -/.> { ] cv_dv } bind def
    -/#> { ] cv_iv } bind def
    -
    -/< mark def
    -/** @BeginDocumentation
    -Name: <> - Construct an array or vector, depending on the element type.
    -Synopsis: < obj1 ... obj n > -> [obj1, ... , objn]
    -          < int1 ... intn >  -> <# int1 ... intn #>
    -          < double1 ... doublen > -> <. d1 ... dn .>
    -Description:
    -Create an array, intvector, or doublevector, depending on the type of the entered elements.
    -This constructor uses the type of the first element in the sequence to determine the target type. All other
    -elements will be converted.
    -FirstVersion: Dec 18 2012
    -Author: Marc-Oliver Gewaltig
    -*/ 
    -/> 
    -{
    -  counttomark arraystore exch ;
    -  dup 0 get type 
    -  switchbegin
    -  1 index /doubletype eq { pop cv_dv exit} case
    -  1 index /integertype eq { pop cv_iv exit} case
    -  { pop } switchdefault
    -
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/* Begin(LOESCHMISCH!)Documentation
    -
    -Name:
    -
    -Synopsis:
    -
    -Description:
    -
    -Parameters: In :
    -            Out:
    -
    -Examples:
    -
    -Diagnostics:
    -
    -Bugs:
    -
    -Author:
    -
    -FirstVersion:
    -
    -Remarks:
    -
    -References:
    -
    -Variants:
    -
    -SeeAlso:
    -
    -*/
    -
    -%% NOTE: There must be a carriage return after the last line, i.e., here:
    diff --git a/lib/sli/misc_helpers.sli b/lib/sli/misc_helpers.sli
    deleted file mode 100644
    index 9661710966..0000000000
    --- a/lib/sli/misc_helpers.sli
    +++ /dev/null
    @@ -1,1309 +0,0 @@
    -/*
    - *  misc_helpers.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* 
    -    A library of handy SLI-routines
    -
    -*/
    -
    -
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -   
    -Name: message - Display an information message
    -
    -Synopsis:
    -(Message) Priority        message -> -
    -Priority (From) (Message) message ->
    -
    -where "Priority" may be any positive integer, or one of the following:
    -M_DEBUG, M_STATUS, M_INFO, M_DEPRECATED, M_WARNING, M_ERROR, M_FATAL
    -
    -Description: 
    -Display a message, if priority is higher than current verbosity-level. 
    -message uses the message mechanism which is provided
    -by the SLIInterpreter class.
    -
    -The output consists of a time-stamp (date and time), the name of the
    -calling function, the priority level and the message text.
    -
    -
    -% month dd hh:mm::ss from[pl] messagetext
    -
    -Where
    -   month - abbreviated month (Jan-Dec)
    -   dd    - day in month (01-31)
    -   hh    - hour (00-23)
    -   mm    - minute (00-61)
    -   ss    - seconds (00-61)
    -   from  - name of the caller, defaults to (SLI) in the short form
    -   pl    - priority level of the message
    -   
    -The time-stamp is useful during long-running simulations.  
    -
    -All output is sent to the stream defined in M_OUT which is
    -set to cout by default.
    -
    -The verbosity level can be controlled by the functions
    -verbosity and setverbosity. For compatibility, the function
    -shutupto is still supported as alias to setverbosity.
    -
    -Parameters: 
    -In : (MyMessage: Message to display
    -     Priority  : Priority level of message (integer).
    -Opt: (From)    : Name of the caller of class of message.
    -
    -Examples: Short form:
    -          1. (Still alive) M_DEBUG message
    -              issues something like
    -          % Jul 21 16:23:12 SLI[5] Still alive  
    -
    -          1. (Something happened) M_STATUS message
    -              issues something like
    -          % Jul 21 16:23:12 SLI[5] Still alive  
    -
    -          3. (Your last action had no effect) M_INFO message
    -              issues something like
    -          % Jul 21 16:24:12 SLI[10] Your last action had no effect 
    -
    -          4. (Function is deprecated) M_DEPRECATED message
    -              issues something like
    -          % Jul 21 16:24:12 SLI[18] Function is deprecated 
    -
    -          5. (Result may be invalid) M_WARNING message
    -              issues something like
    -          % Jul 21 16:24:24 SLI[20] Result may be invalid  
    -
    -          6. (This should never happen!) M_ERROR message
    -              issues something like
    -          % Jul 21 16:24:36 SLI[30] This should never happen!
    -
    -          7. (It's all broken, let's go home.) M_FATAL message
    -              issues something like
    -          % Jul 21 16:24:36 SLI[40] It's all broken, let's go home.
    -
    - Long form:
    -          1. M_DEBUG (DEBUGMESSAGE) (This should never happen!) message
    -              issues something like
    -          % Jul 21 16:24:36 DEBUGMESSAGE[30] This should never happen!
    -            
    - Depending on the verbosity-level, the output may be suppressed.
    -
    -Bugs: 
    -
    -Author: R Kupper, 
    -        M.O. Gewaltig,
    -
    -FirstVersion: Apr 9 1999
    -
    -Remarks: 
    -         M_* values are defined in system dictionary.
    -         You may introduce new priority levels in the user dictionary if convenient.
    -         Standard values are: M_ALL        = 0
    -                              M_DEBUG      = 5
    -                              M_STATUS     = 7
    -                              M_INFO       = 10
    -                              M_PROGRESS   = 15
    -                              M_DEPRECATED = 18
    -                              M_WARNING    = 20
    -                              M_ERROR      = 30
    -                              M_FATAL      = 40
    -                              M_QUIET      = 100
    -         Standard output:     M_OUT        = cout
    -
    -SeeAlso: setverbosity
    -*/
    -
    -% Define constants and variables used by message/shutupto
    -systemdict begin %this is unnessessary, if misc_helpers.sli is called from sli-init.sli
    -  %               but that's not sure, and it won't harm anyway...
    -
    -  %Define error levels:
    -  /M_ALL        0 def
    -  /M_DEBUG      5 def
    -  /M_STATUS     7 def
    -  /M_INFO       10 def
    -  /M_PROGRESS   15 def
    -  /M_DEPRECATED 18 def
    -  /M_WARNING    20 def
    -  /M_ERROR      30 def
    -  /M_FATAL      40 def
    -  /M_QUIET      100 def
    -  
    -end %systemdict
    -
    -
    -/message trie
    -[/stringtype /integertype]
    -{
    - exch (SLI) exch message_
    -} bind addtotrie
    -[ /integertype /stringtype /stringtype]
    -{
    -  message_
    -} bind addtotrie
    -def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -   
    -Name:  setverbosity - Set verbosity level for message
    -       shutupto - Set quiet level for message
    -       
    -Synopsis:
    -
    -VerbosityLevel setverbosity -> -
    -
    -M_DEBUG        setverbosity -> -
    -M_STATUS       setverbosity -> -
    -M_INFO         setverbosity -> -
    -M_DEPRECATED   setverbosity -> -
    -M_WARNING      setverbosity -> -
    -M_ERROR        setverbosity -> -
    -M_FATAL        setverbosity -> -
    -
    -Description: 
    -
    -Set verbosity level for message.
    -Only messages of priority equal to or greater than the specified
    -level will be issued by the "message" command. 
    -
    -Parameters: 
    -
    -  VerbosityLevel:
    -     The new verbosity-level for message-display (see "message").
    -     You may use any poitive integer here. For conveniency,
    -     there exist five predifined error levels in systemdict:
    -     M_ALL=0,  display all messages
    -     M_DEBUG=5,  display debugging messages and above
    -     M_STATUS=7,  display status messages and above
    -     M_INFO=10, display information messages and above
    -     M_DEPRECATED=18, display deprecation warnings and above
    -     M_WARNING=20, display warning messages and above
    -     M_ERROR=30, display error messages and above
    -     M_FATAL=40, display failure messages and above
    -     M_QUIET=100, suppress all messages
    -
    -     Thus, by calling "M_WARNING=20 setverbosity" you
    -     indicate that you are interested in seeing error messages and
    -     more important messages only.
    -
    -Side Effects: Change verbosity level of the SLI interpreter.
    -
    -Examples: 
    -  1. M_INFO    setverbosity
    -     % Don't display any debugging- or status-messages, only informational and
    -     % above.
    -  2. M_ERROR setverbosity
    -     % Do inform me about severe errors only.
    -
    -Bugs: 
    -
    -Author: R Kupper
    -
    -FirstVersion: Apr 9 1999,
    -              Modified by Marc-Oliver Gewaltig, July 21 1999
    -              Modified by Ruediger Kupper, March 19 2003
    -
    -Remarks:
    -  M_* values are defined in system dictionary.
    -  You may introduce new priority levels in the user dictionary if convenient.
    -  Standard values are: M_ALL     = 0
    -                       M_DEBUG   = 5
    -                       M_STATUS  = 7
    -                       M_INFO    = 10
    -                       M_DEPRECATED = 18
    -                       M_WARNING = 20
    -                       M_ERROR   = 30
    -                       M_FATAL   = 40
    -                       M_QUIET   = 100
    -  Standard output:     M_OUT     = cout
    -
    -SeeAlso: message, verbosity
    -*/
    -
    -/shutupto trie
    -[/integertype] /setverbosity_i load addtotrie
    -def
    -
    -
    -
    -/*
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -   
    -   Name: trim - Delete leading/trailing elements in a container.
    -   
    -   Synopsis: MyStr Character Flag={0|1|2} trim -> TrimmedStr
    -             MyArr Element   Flag={0|1|2} trim -> TrimmedArr
    -
    -   Description: The trim function returns a copy of MyStr (MyArr) with
    -                leading and/or trailing Characters (Elements) removed.
    -
    -   Parameters: In : MyStr(string): The String to be strimmed
    -                    MyArr(array): The array to be trimmed
    -                    
    -               Optional In: Character(string): The character to remove
    -                            Element(any)   : The element to remove
    -                            
    -                            Flag(int) : A value that controls the action
    -                                       of trim. If Flag is zero,
    -                                       trailing elements are removed.
    -                                       Leading elements are removed if it is
    -                                       equal to 1. Both are removed if it is
    -                                       equal to 2.
    -
    -               Out: TrimmedStr(string)/TrimmedArr(array):
    -                                       a copy of MyStr (MyArr) with
    -                                       leading and/or trailing Characters (Elements) removed.
    -
    -   Examples: (--hello-you---) (-) 0 trim -> (hello-you---)
    -             (--hello-you---) (-) 1 trim -> (--hello-you)
    -             (--hello-you---) (-) 2 trim -> (hello-you)
    -
    -   Bugs: array-type-trie doesn't work (why?)
    -
    -   Author: R Kupper
    -
    -   FirstVersion: Apr 10 1999
    -
    -   Remarks: Inspired by IDL's STRTRIM-Function.
    -            If Flag doesn't equal 0, 1 or 2, it defaults to 0 and
    -             a warning message is issued
    -            If trim is called on an empty container, a debugging message is issued
    -            Set shutup-level to hide messages! (see shutup)
    -
    -   Procedure: a. Flag=0: Scan string for first non-occurance of character,
    -                         then delete string up to this position.
    -              b. Flag=1 executes a. on the reversed string
    -              c. Flag=3 executes a. and b.
    -
    -   SeeAlso: reverse, message
    -*/
    -
    -% This function will work for strings AND for arrays, as search does:
    -/trim_sa
    -{% stack: str char flag
    -  
    -  dup dup 0 lt exch 2 gt or {(trim: WARNING - Flag not 0,1,2. Assuming 0.) M_WARNING message pop 0} if 
    -  
    -  %stack: str char flag
    -  2 index size 0 eq %stack: str char flag str {true|false}
    -  %check for empty str:
    -  {% str is the empty string
    -	%stack: str char flag str
    -	(trim: DEBUG-INFO - Trim was called on an empty container. No action.) M_DEBUG message 3 npop
    -	%stack: str
    -  }
    -  
    -  
    -  {% str is not empty
    -	% stack: str char flag str
    -	pop
    -	
    -	% stack: str char flag
    -	dup 0 eq % stack: str char flag {true|false}
    -	{%flag=0, stack: str char 0
    -	  pop %stack: str char
    -	  exch dup %stack: char str str
    -	  size exch %stack: char str size str
    -	  size 1 sub %stack: char str size str (size-1)
    -	  
    -	  0 exch 1 exch %stack: char str size str 0 1 (size-1)
    -	  {
    -		%loop entry - stack: char str size str i
    -		exch 1 index %stack: char str size i str i
    -		get %stack: char str size i str[i]
    -		4 index %stack: char str size i str[i] char
    -
    -		eq %stack: char str size i {true|false}
    -		{ %str[i] equals char. Do nothing.
    -		  %stack: char str size i
    -		  pop 1 index %stack: char str size str		
    -		}
    -		{ %str[i] is first character unequal to char:
    -		  %leave i on the stack and exit for-loop
    -		  %stack: char str size i
    -		  exch pop 1 index %stack: char str i str
    -		  exit % exit for-loop.
    -		}
    -		ifelse
    -		
    -	  }
    -	  for
    -	  %at this point, the stack will be
    -	  % char str i    str, if no-char was found at position i
    -	  % char str size str, if no-char was NOT found at all (i.e. str is a string of chars)
    -	  % so all we have to do, is erase up to the given position:
    -	  pop 0 exch %stack: char str 0 {i|size}
    -	  erase %stack: char resultstr    ,where resultstr may be the empty string.
    -	  exch pop %stack: resultstr
    -	  % READY!
    -	  
    -	}%end: flag=0
    -  
    -	{
    -	  1 eq % stack: str char {true|false}
    -	  {%flag=1, stack: str char
    -		exch
    -		reverse
    -		exch
    -		0 trim_sa % execute trim 0 on reversed string
    -		reverse
    -	  }%end: flag=1
    -	  
    -	  {%flag=2, stack: str char
    -		exch 1 index %stack: char str char
    -		0 trim_sa %stack: char newstr
    -		exch 1 trim_sa % 2 is a combination of 0 and 1
    -	  }%end: flag=2
    -	  ifelse
    -	}
    -	ifelse
    -
    -  } % end: str was not the empty string
    -  ifelse
    -
    -}
    -bind def
    -
    -/trim trie
    -[/stringtype /stringtype  /integertype] { exch 0 get exch trim_sa } bind addtotrie %if character is given as string, change to ASCII-code
    -[/stringtype /integertype /integertype] /trim_sa load addtotrie %string, ASCII-code, flag
    -[/arraytype  /anytype     /integertype] /trim_sa load addtotrie
    -def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -   
    -   Name: breakup - Break a string or an array at given Substrings or SubArrays, or to given lengths.
    -   
    -   Synopsis: MyStr BreakStr breakup -> StrArr
    -             MyArr BreakArr breakup -> ArrArr
    -             MyStr SecLen   breakup -> StrArr
    -             MyArr SecLen   breakup -> ArrArr
    -
    -   Description: Break a string or an array at given Substrings or SubArrays, or to sections
    -                of given length. In the latter case, the last section may be shorter, if
    -                the section length does not evenly divide the string/array length.
    -
    -   Parameters: In : MyStr(string)/MyArr(array): String/Array to break up.
    -                    BreakStr(string)/BreakArr(array): Substring/Subarray defining break points.
    -                    SecLen(int): Length of sections to form
    -               Out: StrArr(array of strings)/ArrArr(array of arrays): array of partial strings/arrays (see example below)
    -
    -   Examples: 1. (home/kupper/synod) (/) breakup -> [(home) (kupper) (synod)]
    -             2. (Theresnospaceinhere) ( ) breakup -> [(Theresnospaceinhere)]
    -             3. [23 5 0 17 0] [0]   breakup -> [ [23 5] [17] [] ]
    -             4. [23 5 0 17 0] [5 0] breakup -> [ [23] [17 0] ]
    -             5. (abcdef) 3 breakup -> [(abc) (def)]
    -             6. (abcdef) 4 breakup -> [(abcd) (ef)]
    -             7  [1 2 3 4] 2 breakup -> [[1 2] [3 4]]
    -
    -   Bugs: 
    -
    -   Author: R Kupper, H E Plesser
    -
    -   FirstVersion: Apr 10 1999
    -
    -   Remarks: Inspired by IDL's STRBREAK-function
    -
    -   Procedure: Recursive call of "search"
    -
    -   SeeAlso: trim
    -*/
    -
    -% This function will work for strings AND for arrays, as search does:
    -/breakup_sa
    -{
    -  % stack: str be array
    -  3 1 roll % stack: array str be
    -  search % break at first occurence of breaking element
    -  % stack: array strend be {strbegin true|false}
    -  {
    -	% element found
    -	4 -1 roll exch % stack: strend be array strbegi
    -	append %stack: strend be array
    -	breakup_sa % RECURSION!
    -  }
    -  { 
    -	%element not found
    -	append %that's it!
    -  }
    -  ifelse
    -}
    -bind def
    -
    -/breakup_sa_i
    -{
    -  /seclen Set
    -
    -  empty 
    -  { 
    -    1 arraystore 
    -  }
    -  { 
    -    /strarr Set
    -    [ 0 strarr length 1 sub seclen ] { seclen strarr rollu getinterval } Table
    -  } ifelse
    -} bind def
    -
    -/breakup trie
    -[/stringtype /stringtype] { [] breakup_sa } addtotrie
    -[/arraytype  /arraytype ] { [] breakup_sa } addtotrie
    -[/stringtype /integertype] { breakup_sa_i } addtotrie
    -[/arraytype  /integertype] { breakup_sa_i } addtotrie
    -def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -   
    -   Name: reverse - Reverse a string or array.
    -   
    -   Synopsis: MyStr reverse -> rtSyM
    -             MyArr reverse -> rrAyM
    -
    -   Description: Reverse a string or array.
    -
    -   Parameters: In : MyStr(string)/MyArr(array)
    -               Out: rtSyM(string)/rrAyM(array): The reverse of MyStr/MyArr
    -
    -   Examples: (Madam I'm Adam) reverse -> (madA m'I madaM)
    -             (Lagerregal)     reverse -> (lagerregaL)
    -             (Aide-moi o media) reverse -> (aidem  o iom-ediA)
    -             [1 2 3] reverse -> [3 2 1]
    -
    -   Bugs: 
    -
    -   Author: R Kupper
    -
    -   FirstVersion: Apr 11 1999
    -
    -   Remarks: There is no "forallindexed" for strings. why?
    -            Apr 13 1999:
    -             -Name changed from "revert" to "reverse" on Apr 13 1999.-
    -             -Name "revert" will still be valid, but will issue a warning message.-
    -             String-Handling has been changed to a call to the C++-coded function "Revert".
    -             The command "Reverse" can also be used for arrays.
    -
    -   SeeAlso: trim
    -*/
    -
    -% This function will work for strings AND for arrays, as search does:
    -/reverse_sa
    -{
    -  %stack: str / arr
    -  container %stack: str () / arr []
    -  1 index %stack: str () str
    -  size exch pop %stack: str () size
    -  reserve %reserve enough space in new container
    -  %stack: str ()
    -  exch %stack: () str
    -  {
    -	%stack: () str[i]
    -	prepend
    -  }
    -  forall
    -}
    -bind def
    -
    -/reverse trie
    -[/stringtype] /reverse_sa load addtotrie
    -%There already is a C++-coded version called "Reverse" for Arrays:
    -%[/arraytype]  /reverse_sa load addtotrie
    -[/arraytype] /Reverse load addtotrie
    -def
    -
    -%----------------------------------------------------------------------------
    -/revert
    -{
    -  (WARNING: "revert"-function has been ranamed to "reverse" on Apr 13 1999.\n            Change call to "reverse" to avoid this warning message!)
    -    M_WARNING message
    -  reverse
    -}
    -def
    -
    -/** @BeginDocumentation
    -   Name: searchif - check wether a substring is contained within a string  
    -   Synopsis: string1 string2 searchif -> bool
    -             array1  array2  searchif -> bool
    -   Description: 
    -     calls search and removes the substrings/-arrays generated
    -     thereby. Neither string/array will be conserved (!),
    -     bool contains success or failure.
    -   Parameters: string1/array1: The object where to search into.
    -               string2/array2: The subobject to look for.
    -               bool is true on success, otherwise false
    -   Examples: (Hello world!) (Hello) searchif -> true
    -             [1 3 2 5 2] [3 2]      searchif -> true
    -   Bugs: Does not have optimal performance; search creates subobjects
    -         which are not needed for serachif.
    -   Author: Hehl
    -   FirstVersion: April 15, 1999
    -   Remarks: 
    -   SeeAlso: search
    -*/
    -
    -/searchif_sa
    -{
    -  exch dup 3 -1 roll             % save string1
    -  search                         % search
    -  {
    -    4 npop true                  % success: do some clean up
    -  } 
    -  {
    -    pop pop false                % failure: somewhat less to cleanup
    -  } ifelse
    -} bind def
    -
    -/searchif trie
    -[/stringtype /stringtype] /searchif_sa load addtotrie
    -[/arraytype  /arraytype] /searchif_sa load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -
    -Name: oldgetline - "old", ignorant version of getline
    -
    -Synopsis: istream getline -> istream string
    -
    -Description: 
    -  Reads a string from the supplied stream. If an error occured
    -  during the read process, an empty string is returned.
    -
    -  This function is for compatibility. Eventually, all
    -  occurences of oldgetline should convert to the new,
    -  more save version of getline.
    -
    -Diagnostics: NO ERRORS are raised!
    -
    -Author: Marc-Oliver Gewaltig
    -
    -FirstVersion: July 9 1999
    -
    -Remarks: 
    -
    -SeeAlso: getline, readline
    -*/
    -
    -/oldgetline
    -{
    -  getline 
    -  not
    -  { () } if
    -} bind def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: ignore - ignore any waiting data on an istream
    -
    -Synopsis: istream ignore -> istream
    -
    -Description: "ignore" reads input form the given istream line by line
    -             and discards it.
    -
    -Parameters: In : istream: the stream to ignore data in.
    -            Out: istream:  "     "    "    "    "   "
    -
    -Diagnostics:
    -
    -Examples: cin ignore
    -          myfifo ignore
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: 1999. New version using setNONBLOCK: Oct 22 1999
    -
    -Remarks: After a call to "ignore", the state of the stream is always "good", and
    -         blocking I/O is selected for that stream (O_NONBLOCK==false).
    -
    -SeeAlso: available
    -
    -*/
    -
    -/ignore trie
    -
    -[/istreamtype]
    -{ 
    -  true setNONBLOCK % select non-blocking I/O
    -  {% read until EOF
    -    getline not {exit} if  % read it
    -    pop     % forget it
    -  } loop 
    -  iclear % reset streamstate to good
    -  false setNONBLOCK % select blocking I/O
    -} bind
    -addtotrie
    -
    -def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: CyclicValue - project a cyclic value onto it's norm interval (e.g. angle on [0,360))
    -
    -Synopsis: 
    -  value [b1 b2] CyclicValue -> normvalue
    -  value  b1 b2  CyclicValue -> normvalue 
    -
    -  See below for the meaning of b1, b2!  
    -
    -Description: 
    -  For a given value and a given norm interval, "CyclicValue" returns
    -  the value's norm equivalent. This is useful for all values with a
    -  cyclic definition, such as angles.  
    -  The output is always of type double, regardless of the input type.
    -
    -  Alternatives: Function CyclicValue_d_d_d if you use it with three doubles
    -  (interval = double1 - double2), CyclicValue_d_a if you use it with
    -  double and array (both undocumented) -> behaviour and synopsis are the same.
    -
    -Parameters: 
    -  In :  value:   value in (-oo, oo)
    -
    -        b1, b2:  norm interval.
    -                 This interval is half-open: [.), or (.], depending on
    -                 the following rules:
    -
    -                 b1 must not equal b2.                   
    -                 b1 always denotes the closed end of the interval.
    -                 b2 always denotes the open   end of the interval.                 
    -                 If b1<b2, the norm interval used is [b1,b2).
    -                 If b1>b2, the norm interval used is (b2,b1].
    -
    -                 See below for examples.  
    -        
    -  Out:  The value's norm equivalent in the interval [b1, b2).
    -        The output is always of type double, regardless of the input
    -        type.
    -
    -Diagnostics:
    -    b1 must not equal b2. This is not checked for efficency reasons!
    -    If b1=b2, code will break with /DivisionByZero during execution.
    -
    -Examples:
    -  %% project angle in degrees onto [0,360):
    -  -3601 [0 360] CyclicValue -> 359.0
    -
    -  %% project angle in radians onto [-pi,pi):
    -  23.0 [Pi -1 mul  Pi] CyclicValue -> -2.13274
    -
    -  %% this demonstrates the handling of open/closed interval ends:
    -  %%   project number onto [1,4):
    -  1 [1 4] CyclicValue -> 1
    -  2 [1 4] CyclicValue -> 2
    -  3 [1 4] CyclicValue -> 3   
    -  4 [1 4] CyclicValue -> 1   
    -  %%   project number onto (1,4]:
    -  1 [4 1] CyclicValue -> 4
    -  2 [4 1] CyclicValue -> 2
    -  3 [4 1] CyclicValue -> 3   
    -  4 [4 1] CyclicValue -> 4   
    -    
    -Author: Ruediger Kupper
    -
    -FirstVersion: 13.3.2003
    -
    -Remarks:
    -  Variant *_d_d_d is fastest. Prefer this variant over *_d_a in time
    -  critical applications.    
    -
    -  Inspired by IDL/NASE commandfunction cyclic_value().
    -
    -SeeAlso: mod, floor
    -*/
    -
    -%% Shall be equivalent to the following IDL code:
    -%%
    -%%Function Cyclic_Value, val, int
    -%%   min = int[0]
    -%%   max = int[1]
    -%%   interval = double(max-min)
    -%%   return, val - floor(double(val-min)/interval)*interval
    -%%End
    -
    -
    -/CyclicValue_d_d_d
    -{
    -  %stack:  value min max
    -  1 pick sub_dd
    -  %stack:  value min interval  %%interval=max-min
    -  dup_ rolld
    -  %stack:  value interval interval min
    -  3 pick
    -  %stack:  value interval interval min value
    -  exch sub_dd exch_ div_dd floor_d mul_dd sub_dd  
    -} bind def
    -
    -/CyclicValue_d_a
    -{
    -  %stack:  value_d [min max]
    -  {double} Map arrayload pop  
    -  %stack:  value_d min_d max_d
    -  CyclicValue_d_d_d  
    -} bind def
    -
    -/CyclicValue [/doubletype /doubletype /doubletype] /CyclicValue_d_d_d load def
    -
    -/CyclicValue [/doubletype /doubletype /integertype] {double_i CyclicValue_d_d_d} bind def
    -/CyclicValue [/doubletype /integertype /doubletype] {rollu double_i rolld CyclicValue_d_d_d} bind def
    -/CyclicValue [/integertype /doubletype /doubletype] {rolld double_i rollu CyclicValue_d_d_d} bind def
    -
    -/CyclicValue [/doubletype /integertype /integertype] {double_i rollu double_i rolld CyclicValue_d_d_d} bind def
    -/CyclicValue [/integertype /integertype /doubletype] {rolld double_i rolld double_i rolld CyclicValue_d_d_d} bind def
    -/CyclicValue [/integertype /doubletype /integertype] {double_i rolld double_i rollu CyclicValue_d_d_d} bind def
    -
    -/CyclicValue [/integertype /integertype /integertype] {double_i rolld double_i rolld double_i rolld CyclicValue_d_d_d} bind def
    -
    -/CyclicValue [/integertype /arraytype] {exch_ double_i exch CyclicValue_d_a} bind def
    -/CyclicValue [/doubletype  /arraytype] /CyclicValue_d_a load def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -
    -Name: SLIFunctionWrapper - Define a SLI function with lots of comfort.
    -
    -Synopsis: 
    -/funcname [/trietypes] [/variablenames] {procedure} SLIFunctionWrapper -> FunctionResult
    -/funcname [/trietypes   /variablenames] {procedure} SLIFunctionWrapper -> FunctionResult
    -
    -Description:
    -    SLIFunctionWrapper provides a very convenient way to define and manage
    -    a SLI function. Much like the command "def", it has a way to
    -    define the parameter list of the function. In addition, before the
    -    actual routine is called, its parameters will be popped from the
    -    stack and assigned to names, which then are provided to the
    -    routine in a local dictionary. Furthermore, SLIFunctionWrapper
    -    rids the user from the need to restore the operand stack before
    -    raising an error, the routine will take care of that.
    -    All this is achieved by putting the actual user routine inside a
    -    wrapper routine, which is assigned to the given name. The wrapper
    -    routine will perform all sorts of bureaucracy, then call the
    -    actual routine, and clean up the stack if necessary afterwards.
    -
    -    The function's definition resembles the ones in C++.
    -    Please see examples below for demonstrations.
    -
    -    IMPORTANT:
    -    Please see remarks below for a SET OF RULES THE USER ROUTINE MUST
    -    ADHERE TO!    
    -
    -Parameters:
    -/funcname         - The function name (will be assigned to the
    -                    wrpper function).                   
    -[/trietypes
    -  /variablenames] - List of parameters and their names. This may
    -                    either be two separate arrays of literals, the first one defining
    -                    the variable types, the second one their names, or
    -                    a single array of literals, consisting of pairs of
    -                    type and name. See examples below. The resulting call looks pretty
    -                    much like a function definition in C++.
    -{procedure}       - The actual procedure to be called from the wrapper.
    -
    -Examples:
    -
    -The following defines a function called "myfunc", taking two arguments
    -of type integer and double. The function will have a type trie for
    -parameter typechacking, as well as a local dictionary. The arguments
    -will be known as "x" and "y" inside the local dictionary of the
    -function.
    -
    -  /myfunc [/integertype /x  /doubletype /y]
    -    {
    -      (see how my local dictionary looks like:) = who
    -    } SLIFunctionWrapper
    -
    -The parameterlist could have also been specified like this:
    -
    -  /myfunc [/integertype /doubletype] [/x /y] {...} SLIFunctionWrapper
    -
    -This defines functions expecting no parameters:
    -
    -  /f  []    {...} SLIFunctionWrapper
    -  /f2 [] [] {...} SLIFunctionWrapper
    -  
    -The routine can litter is local dictionary as it likes. The dictionary
    -will automatically be closed when the routine ends:
    -
    -  /f []
    -    {
    -      /this 23 def
    -      /will 0.0 def
    -      /be 1 def
    -      /forgotten -3 def     
    -    } SLIFunctionWrapper
    -
    -If the routine raises an error, the local dictionary is closed, and
    -the stack will be automatically restored to the condition it was
    -before the function call:
    -
    -    /f []
    -    {
    -      /myvar 0.0 def
    -      % push rubbish on the stack:
    -      1 2 3 4 5 6 7
    -      % now raise an error:
    -      funcname /Error raiseerror      
    -    } SLIFunctionWrapper
    -
    -    SLI ] (a) (b) f
    -    Error: /Error in f
    -    SLI [2] pstack
    -    (b)
    -    (a)
    -
    -If a nested routine causes an error, the stack is NOT restored, and
    -the local dictionary is NOT closed:
    -
    -    /f []
    -    {
    -      /myvar 0.0 def
    -      % push rubbish on the stack:
    -      1 2 3 4 5 6 7
    -      % now cause an error:
    -      0 0 div     
    -    } SLIFunctionWrapper
    -
    -    SLI ] (a) (b) f
    -    Error: /DivisionByZero in div_ii
    -    SLI [12] who
    -    --------------------------------------------------
    -    Name                     Type                Value
    -    --------------------------------------------------
    -    myvar                    doubletype          0
    -    --------------------------------------------------
    -    Total number of entries: 1
    -
    -Diagnostics:
    -Several messages of priority M_DEBUG are issued to let the programmer
    -know what happens. They may be turned off using "setverbosity".
    -
    -Author:
    -Ruediger Kupper
    -
    -FirstVersion:
    -21.3.2003
    -
    -Remarks:
    -Rules the user routine MUST adhere to:
    -  The user routine must not leave any "mark" on the stack if it fails.
    -  The user routine must not make any assumptions on the contents of the
    -    stack, that lie deeper than the level at which it took control
    -  The user routine must not modify any contents of the operand stack,
    -    that lie deeper than the level at which it took control.
    -  The user routine must restore the dictionary stack to the state it was
    -    when it took control, before it ends or fails.
    -  The user routine must not re-define the variable /funcname.
    -  When raising an error, /funcname must be specified as the routine name
    -    (i.e., the name that was specified in the call to SLIFunctionWrapper).
    -
    -No "bind" is performed on the procedure. If namebinding is wanted, the
    -user has to call "bind" explicitely before passing the procedure.
    -
    -The type-specifyer-array(s) may be empty, indicating that the routine
    -does not expect any parameters.
    -
    -The following names are known by the user routine, being defined in an
    -enclosing dictionary (not the routine's local dictionary):
    -  /funcname  - The wrapper's name, as specified in the call to
    -               SLIFunctionWrapper.
    -  /localdict - The user routine's local dictionary.
    -               It is already open when the routine takes control,
    -               and shall not be closed by the user rotuine.
    -  /n_params  - Number of parameters to the user routine.
    -  /rvarnames - Array containing the names of the local variables defined
    -               in the local dictionary, in reversed order.
    -  /function  - The user routine object.
    -
    -Convenience comes at a cost. The wrapper routine causes considerable
    -overhead. Do not use this technique for routines that will be used at
    -time-critical positions, e.g. inside loops.
    - 
    -Availability:
    -SLI2.0
    -
    -References:
    -[1] Ruediger Kupper, SLI library management,
    -    HRI-EU Report 06/05, Honda Research Institute Europe GmbH, 2006.
    -
    -SeeAlso: def, raiseerror, setverbosity, SFWdumpparameters
    -*/
    -
    -
    -%% this is the version that takes separate arrays for variable types and names:
    -/SLIFunctionWrapper [/literaltype /arraytype /arraytype /proceduretype]
    -{
    -  %stack:  /functionname [trietypes] [variablenames] {procedure}
    -  << >> begin %use local variables for SLIFunctionWrapper  
    -
    -    /function Set    
    -    reverse /rvarnames Set %% we need them in reversed order.
    -    /trietypes Set
    -    /funcname Set
    -
    -    trietypes length /n_params Set
    -
    -    %consistency check (length):  
    -    rvarnames length n_params neq
    -    {
    -      M_ERROR (SLIFunctionWrapper) (Trietype array and variable name array must be of same size.) message
    -      end %use local variables for SLIFunctionWrapper   
    -      /SLIFunctionWrapper /DimensionMismatch raiseerror      
    -    } if
    -
    -  %consistency check (types)
    -  trietypes {
    -    type /literaltype neq
    -    {
    -      M_ERROR (SLIFunctionWrapper) (Trietype array must contain literals only.) message
    -      end %use local variables for SLIFunctionWrapper   
    -      /SLIFunctionWrapper /TypeMismatch raiseerror      
    -    } if
    -  } forall    
    -  rvarnames {
    -    type /literaltype neq
    -    {
    -      M_ERROR (SLIFunctionWrapper) (Variable name array must contain literals only.) message
    -      end %use local variables for SLIFunctionWrapper   
    -      /SLIFunctionWrapper /TypeMismatch raiseerror      
    -    } if
    -  } forall  
    -    
    -  %end consistency checks  
    -
    -
    -
    -  
    -  % we now will define the wrapper routine that
    -  % actually calls the user routine  
    -  M_DEBUG (SLIFunctionWrapper) (Defining wrapper ') funcname cvs join ('.) join message    
    -
    -  funcname trietypes
    -  %stack: funcname trietypes
    -
    -  % The following will be the function that is actually bound
    -  % to the given name. We need a way to "hard code"
    -  % the parameters that need to be know inside this procedure, but
    -  % which are only known here, in SLIFunctionWrapper.
    -  % The way to do this is to use "append" in order to construct the
    -  % procedure.
    -  {
    -   %stack: var1 .. varn    
    -   % we use local variables in the wrapper:
    -    << >> begin
    -  }
    -  % now the trick to hard-code the parameters:
    -   /funcname load append {/funcname Set} join
    -   /n_params load append {/n_params Set} join
    -   /rvarnames load append {/rvarnames Set} join
    -   /function load cvlit append {cvx /function Set} join
    -  % now the rest of the routine, which will be joined afterwards. It
    -  % can now use the parameters "n_params", "rvarnames" and "function".      
    -  {
    -    %stack: var1 .. varn    
    -
    -    % we store the parameters in "our" dictionary,    
    -    % in order to have the originals in case of an error:
    -    n_params arraystore /params Set
    -    % we push a mark
    -    mark
    -    % we push the parameters again
    -    params arrayload pop    
    -
    -    %stack: mark  var1 .. varn 
    -    
    -    % we give the user routine a "private" dictionary
    -    % it will be known in the wrapper's dictionary by the name /localdict    
    -    /localdict << >> def
    -    localdict begin
    -
    -      % in this private dictionary,
    -      % we read the variables off the stack:
    -      % (rvarnames contains the desired variable names in reverse order)
    -      rvarnames {Set} forall    
    -      
    -      %stack: mark
    -
    -    % now call the user function, in a stopped context:
    -    /function load stopped
    -    { % the function stopped!
    -      %stack: mark lots-of-rubbish /name-of-routine-that-caused-error
    -
    -      % each error handler has to do this:      
    -      errordict /newerror false put   
    -
    -      % There are two possibilities:
    -      % 1. The error was raised by "our" routine.
    -      %    In this case, we need to restore the stack.      
    -      % 2. The error was unexpectedly raised in a routine
    -      %    that was called from "our" routine.
    -      %    In this case, the current state of the stack,
    -      %    as well as the local variables should stay as
    -      %    they are, to be inspected by the user.
    -      %stack: mark lots-of-rubbish /name-of-routine-that-caused-error
    -      funcname eq
    -      {% error was raised by "our" routine:
    -
    -        % close its private dictionary
    -        end
    -        M_DEBUG (SLIFunctionWrapper) (User routine ') funcname cvs join (' stopped.) join message
    -        M_DEBUG (SLIFunctionWrapper) (Reason: The routine raised an error.) message
    -        M_DEBUG (SLIFunctionWrapper) (Action: Restoring the stack.) message      
    -        %stack: mark lots-of-rubbish
    -        % throw away all the rubbish it left, including our mark.
    -        counttomark 1 add_ii npop
    -        %stack: 
    -        % restores the stack to the state before calling the
    -        % function.
    -        params arrayload pop   
    -        %stack: var1 .. varn    
    -        % close local variable dict of wrapper:
    -        end      
    -        % "It is now safe to turn off the computer."     
    -        M_DEBUG (SLIFunctionWrapper) (Stack restored. Re-raising the error.) message
    -        raiseagain        
    -      }
    -      { % error was raised by another routine:
    -        
    -        M_WARNING (SLIFunctionWrapper) (User routine ') funcname cvs join (' stopped.) join message
    -        M_WARNING (SLIFunctionWrapper) (Reason: A nested routine raised an error.) message
    -        M_WARNING (SLIFunctionWrapper) (Action: Leaving stack and variable context unchanged for inspection.) message
    -        M_DEBUG (SLIFunctionWrapper) (Re-raising the error.) message
    -        M_ERROR (SLIFunctionWrapper) (In function ') funcname cvs join (':) join message
    -        raiseagain        
    -      } ifelse
    -    }
    -    {
    -      % the function operated normally.
    -      %stack: mark  valuable-results
    -      % close its private dictionary
    -      end
    -      M_DEBUG (SLIFunctionWrapper) (User routine ') funcname cvs join (' exited normally.) join message     
    -      %stack: mark  valuable-results
    -      % remove the mark from the stack
    -      counttomark 1 add_ii -1 roll pop
    -      %stack: valuable-results
    -      % close local variable dict of wrapper:
    -      end      
    -      % "It is now safe to turn off the computer."     
    -    } ifelse
    -    
    -  } join
    -  %stack: functionname typetries {wrapperroutine}
    -  end %local variables for SLIFunctionWrapper, 
    -      %because function shall be defined in the outer dict.
    -  bind def
    -
    -
    -  %okay, we defined the wrapper routine, that's it.  
    -} bind def
    -
    -
    -%% this is the version that takes one array of combined variable types and names:
    -/SLIFunctionWrapper [/literaltype /arraytype /proceduretype]
    -    {%stack:  /functionname [type1 name1 ... typen namen] {procedure}
    - 
    -      % first handle the special case of an empty array:
    -      1 index length 0 eq
    -      { % parameter list is empty
    -        [] exch % stack: /functionname [] [] {procedure} 
    -        SLIFunctionWrapper
    -      }      
    -      { % parameter list is not empty:
    -        %stack:  /functionname [type1 name1 ... typen namen] {procedure}
    -        rollu
    -        %stack: {procedure} /functionname [/type1 /name1 ... /typen /namen]
    -        
    -        %consistency check (number of elements)
    -        size dup 2 div 2 mul neq
    -        {
    -          M_ERROR (SLIFunctionWrapper) (Single variable array must consist of pairs: /variabletype /variablename.) message
    -          /SLIFunctionWrapper /DimensionMismatch raiseerror      
    -        } if      
    -        %stack: {procedure} /functionname [/type1 /name1 ... /typen /namen]
    -       
    -        %consistency check (types)
    -        dup {
    -          type /literaltype neq
    -          {
    -            M_ERROR (SLIFunctionWrapper) (Variable names and types must be literals only.) message
    -            /SLIFunctionWrapper /TypeMismatch raiseerror      
    -          } if
    -        } forall         
    -        %stack: {procedure} /functionname [/type1 /name1 .. /typen /namen]
    -        
    -        % end consistency checks      
    -        % form separate name/type-arrays from the combined one and call the other form of SLIFunctionWrapper:      
    -        
    -        %stack: {procedure} /functionname [/type1 /name1 .. /typen /namen]
    -        dup size 1 sub [ 0 rolld   2 ]
    -        %stack: {procedure} /functionname [/type1 /name1 .. /typen /namen] [/type1 /name1 .. /typen /namen] [0 size-1 2]
    -        Range get
    -        %stack: {procedure} /functionname [/type1 /name1 .. /typen /namen] [/type1 .. /typen]
    -        exch size 1 sub [ 1 rolld   2 ]  
    -        %stack: {procedure} /functionname [/type1 .. /typen] [/type1 /name1 .. /typen /namen] [1 size-1 2]
    -        Range get
    -        %stack: {procedure} /functionname [/type1 .. /typen] [/var1 .. /varn]
    -        4 -1 roll
    -        %stack: /functionname [/type1 .. /typen] [/var1 .. /varn] {procedure}      
    -        SLIFunctionWrapper
    -      } ifelse      
    -    } bind def
    -
    -
    -/** @BeginDocumentation
    -Name: SFWdumpparameters - Dump parameters of a SLIFunctionWrapper routine.
    -
    -Synopsis: SWFdumpparameters -> -
    -
    -Description:
    -Debugging aid for SLIFunctionWrapper. This routine can be called from
    -any routine defined using SLIFunctionWrapper. It
    -dumps all parameters and their values to the
    -standard output.
    -
    -Examples:
    -/myfunc [/integertype /doubletype] [/x /y]
    -  { (hello) =
    -    SFW_dumpparameters
    -    (hello) =
    -  } SLIFunctionWrapper
    -
    -SLI ] 1 1.0 myfunc
    -hello
    -Dumping parameters for SLIFunctionWrapper routine /myfunc
    -   y = 1.000000e+00
    -   x = 1
    -hello
    -
    -Diagnostics:
    -Issues a warning, if no enclosing SLIFunctionWrapper was found.
    -
    -Author: R. Kupper
    -
    -FirstVersion: 6-Dec-2006
    -
    -References:
    -[1] Ruediger Kupper, SLI library management,
    -    HRI-EU Report 06/05, Honda Research Institute Europe GmbH, 2006.
    -
    -SeeAlso: SLIFunctionWrapper
    -*/
    -/SFWdumpparameters
    -    {
    -      /funcname lookup not
    -      { 
    -        M_WARNING (SFWdumpparameters) (No enclosing SLIFunctionWrapper was found.) message
    -      }
    -      { 
    -        pop              
    -        (Dumping parameters for SLIFunctionWrapper routine ) =only funcname ==
    -        rvarnames {dup (   ) =only =only ( = ) =only load ==} forall 
    -      } ifelse
    -    } def
    -
    -
    -/** @BeginDocumentation
    -Name: pageoutput - Display the output of a procedure through "page".
    -
    -Synopsis: {procedure} pageoutput -> result_of_procedure
    -
    -Description:
    -"pageoutput" executes the procedure that is passed as an argument. It
    -captures any printed output that the procedure generates and
    -displays it via the "page" command (see documentation of "page").
    -
    -"pageoutput" redirects SLI's standard output at the level of the
    -file descriptor. This is a very low-level operation, and captures
    -*all* output that the SLI process sends to stdout. This includes any
    -output from SLI commands, from the simulation kernel, and all error
    -messages that go to stdout.
    -
    -If the procedure raises an error, the error message is included in
    -the paged output, and the file descriptors are restored, so that
    -subsequent output goes to the SLI prompt again.
    -
    -Examples:
    -{(This is my output.) =} pageoutput
    -{MemoryInfo} pageoutput
    -{whos} pageoutput
    -{mydir info} pageoutput
    -
    -Bugs:
    -"pageoutput" creates a temporary file that is passed to the "page"
    -command. The pager may be executed in a subprocess of SLI. Since we
    -do not know how long it takes the pager process to open the file, we
    -cannot delete it right after calling "page". Hence, the temporary
    -file remains forever. Currently it is unclear how the temporary file
    -can be removed at a later time. This bug is filed as ticket #262.
    -
    -Diagnostics:
    -Any error messages that the procedure raises go to the paged output.
    -In case of errors, the file descriptors are correctly restored.
    -
    -Author: R Kupper
    -
    -FirstVersion: 22-jul-2008
    -
    -SeeAlso: page
    -*/
    -/pageoutput[/proceduretype /p]
    -{
    -  % create two temporary files for writing:  
    -  /fname tmpnam def  /f fname (w) file def
    -  /gname tmpnam def  /g gname (w) file def
    -
    -  % f will be the temporary storage for the cout file descriptor.
    -  % duplicate systemdict::cout to f.
    -  % (Subsequent writes to f would write to standard output, but we will not do this).
    -  systemdict /cout get f dup2
    -
    -  % now duplicate g to systemdict::cout.
    -  % Subsequent writes to standard output (even from the C-level) will go to file g.
    -  g systemdict /cout get dup2
    -
    -  % now call the procedure. We catch all errors to restore the standard output in any case!  
    -  {p exec} stopped {handleerror} if % if there was an error, call the normal handler
    -
    -  f systemdict /cout get dup2 % restore previous destination of systemdict::cout
    -
    -  f close % close file f
    -  fname DeleteFile pop % we don't need it any more
    -  
    -  g close % close file g
    -  gname page % show its contents
    -  %gname DeleteFile pop 
    -} SLIFunctionWrapper
    -
    -
    -/*
    -%% NOTE: There must be a carriage return after the last line in each file, i.e., here:
    -*/
    diff --git a/lib/sli/nest-init.sli b/lib/sli/nest-init.sli
    deleted file mode 100644
    index 4995235540..0000000000
    --- a/lib/sli/nest-init.sli
    +++ /dev/null
    @@ -1,1526 +0,0 @@
    -/*
    - *  nest-init.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%% NEST Kernel 2 initialisation
    -%%
    -%% (C) 2000-2006 The NEST Initiative
    -%%
    -%%  Authors Marc-Oliver Gewaltig <marc-oliver.gewaltig@honda-ri.de>
    -%%          Markus Diesmann <diesmann@fz-juelich.de>
    -%%          Jochen Martin Eppler <eppler@fz-juelich.de>
    -%%
    -
    -M_DEBUG (nest-init.sli) (Initializing SLI support for NEST Kernel.) message
    -% see nestmodule.cpp
    -
    -% Add NEST example directory to search-path
    -statusdict /prgdocdir get (/examples)                  join addpath
    -statusdict /prgdocdir get (/examples/FacetsBenchmarks) join addpath
    -
    -/test {
    -  statusdict/prgdatadir :: (/testsuite/do_tests.sh ) join
    -  statusdict/prefix :: (/bin/nest) join
    -  join system ; ;
    -} def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% add new functions to trie if it exists, else create new
    -/SetStatus dup lookup not
    -{
    -  trie
    -} if
    -[/integertype /dictionarytype] /SetStatus_id load addtotrie
    -[/connectiontype /dictionarytype] /SetStatus_CD load addtotrie
    -def
    -
    -% add new functions to trie if it exists, else create new
    -/GetStatus dup lookup not
    -{
    -  trie
    -} if
    -[/integertype] /GetStatus_i load addtotrie
    -[/connectiontype] /GetStatus_C load addtotrie
    -[/arraytype] /GetStatus_a load addtotrie
    -def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% These variants of get access network elements represented by
    -% a node_id like dictionaries. In particular, if a node_id returns a dictionary,
    -% get can be used to access the contents of the nested objects.
    -% 071108, Diesmann
    -%
    -/get [/integertype /literaltype] {exch GetStatus exch get} def
    -/get [/integertype /arraytype] {exch GetStatus exch get_d_a} def
    -
    -% Same as above for connections
    -% 100922, Diesmann
    -/get [/connectiontype /literaltype] {exch GetStatus exch get} def
    -/get [/connectiontype /arraytype] {exch GetStatus exch get_d_a} def
    -
    -% The following version allows extraction of a node ID from a NodeCollection
    -/get [/nodecollectiontype /integertype] { get_g_i } def
    -
    -% This version gets all values from all nodes. The same as GetStatus, but
    -% concatenates into a single dictionary.
    -/get [/nodecollectiontype]
    -{
    -  GetStatus
    -  /status_dict << >> def
    -
    -  size 1 neq
    -  { % If not a single value NodeCollection. We have a list of dictionaries.
    -
    -    % The first thing we do is set the keys in the dictionary based on the
    -    % first node ID in the NodeCollection, and set the corresponding value in an
    -    % array.
    -    dup First {status_dict rollu 1 arraystore put_d} forall
    -
    -    status_dict keys /ks Set
    -
    -    % Then, we put the values for the rest of the NodeCollection in the right
    -    % place in the dictionary.
    -    /counter 1 def
    -    Rest
    -    {
    -      dup
    -      {
    -        /v Set
    -        /k Set
    -        % Check if we have a composite NodeCollection by checking if k is part
    -        % of dict keys.
    -        ks k MemberQ
    -        {
    -          % If primitive, add value to dictionary array
    -          status_dict k get [v] join /val_array Set
    -        }
    -        {
    -          % If composite, set values for previous node IDs to None, and add value.
    -          [counter] /None LayoutArray [v] join /val_array Set
    -          ks [k] join /ks Set
    -        } ifelse
    -
    -        % Add value array to status dictionary.
    -        status_dict k val_array put_d
    -      } forall
    -
    -      % If we have a composite nc and there have been values for previous node IDs
    -      % that is not part of this particular dictionary, we must set a None
    -      % value for this value.
    -      keys /dict_keys Set
    -      ks
    -      {
    -        /k Set
    -        dict_keys k MemberQ not
    -        {
    -          status_dict k get [/None] join /val_array Set
    -          status_dict k val_array put_d
    -        } if
    -      } forall
    -
    -      counter 1 add /counter Set
    -    } forall
    -
    -    status_dict
    -  }
    -  {
    -    0 get
    -  } ifelse
    -} def
    -
    -% Get parameter value of all node IDs in NodeCollection
    -/get [/nodecollectiontype /literaltype]
    -{
    -  /value Set
    -  /nodecollection Set
    -
    -  nodecollection size 1 eq
    -  { % if size == 1
    -    nodecollection GetStatus 0 get value get
    -  }
    -  { % if size > 1
    -    nodecollection GetStatus { value get } Map
    -  } ifelse
    -} def
    -
    -% Get parameter values of NodeCollection from an array of parameters
    -/get [/nodecollectiontype /arraytype]
    -{
    -  exch
    -  dup size 1 eq not{ /get /InvalidNodeCollectionError raiseerror }if
    -  0 get_g_i GetStatus exch get_d_a
    -} def
    -
    -% Get metadata values of NodeCollection
    -/GetMetadata [/nodecollectiontype]
    -  /GetMetadata_g load
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Slicing of NodeCollections with Take
    -% Since n Take means take first n elements, while [n] Take means return
    -%      n-th element, we need to be a bit careful, handling the letter case
    -%      here at the SLI level and mapping the former to the two-element case
    -% Note that Take indexes from 1, with -1 the last element
    -/Take [/nodecollectiontype /integertype]
    - {
    -   << >> begin
    -     /n Set
    -     /c Set
    -     n 0 geq
    -     {
    -       [ 1 n ]
    -     }
    -     {
    -       n neg c size gt { c n /Take /RangeError raiseerror } if
    -
    -       c size dup n add 1 add exch
    -       2 arraystore
    -     }
    -     ifelse
    -     c
    -     exch
    -     Take
    -   end
    -}
    -def
    -
    -/Take [/nodecollectiontype /arraytype]
    -{
    -  << >> begin
    -  /slice Set
    -  /coll Set
    -
    -  % Because Take expects arguments with one-based indexing, while Take_g_a expects
    -  % arguments with zero-based indexing, we need to adjust arguments before calling Take_g_a.
    -  slice length 1 eq
    -  {
    -    slice 0 get dup 2 arraystore /slice Set
    -  } if
    -
    -  slice arrayload
    -  2 eq
    -  {
    -    1 /step Set
    -  }
    -  {
    -    /step Set
    -  } ifelse
    -
    -  % We assume that we have two or three elements now.
    -  % Have to adjust slice to zero-indexing.
    -  /stp Set
    -  /strt Set
    -
    -  % With one-based indexing, 0 is not a valid index.
    -  strt 0 eq
    -  { % strt == 0
    -    /Take /RangeError raiseerror
    -  } if
    -
    -  % For positive start values, start is adjusted one down for zero-based indexing.
    -  % The stop value goes from inclusive to exclusive, so positive stop values do not have to be adjusted.
    -  strt 0 gt
    -  { % strt > 0
    -    % adjust to zero-indexing
    -    strt 1 sub /strt Set
    -  } if
    -
    -  % Negative one-based start values are converted to positive zero-based start values.
    -  strt 0 lt
    -  { % strt < 0
    -    strt coll size add /strt Set
    -  } if
    -
    -  % Negative one-based stop values are converted to positive zero-based stop values.
    -  % Because we go from inclusive to exclusive stop value, stop is adjusted one up.
    -  stp -1 leq
    -  {
    -    stp coll size add 1 add /stp Set
    -  } if
    -
    -  strt stp step 3 arraystore
    -  coll exch
    -  Take_g_a
    -
    -  end
    -} def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/* BeginDocumentation
    -   Name: LocalOnly - Get only local elements of a NodeCollection.
    -
    -   Synopsis:
    -   nodecollection    LocalOnly --> local_nodecollection
    -
    -   Parameters:
    -   nodecollection          - NodeCollection in which to find local elements
    -   local_nodecollection    - NodeCollection with only local elements
    -
    -   Description:
    -   This function gets only the local elements in a NodeCollection.
    -   The resulting elements are returned in a new NodeCollection. If
    -   there are no local elements, an empty NodeCollection is returned.
    -
    -   Author: Håkon Mørk
    -   FirstVersion: November 2017
    -*/
    -/LocalOnly [/nodecollectiontype]
    -{
    -   << >> begin
    -     /nc Set
    -     Rank nc 0 get NumProcesses mod sub NumProcesses add NumProcesses mod 1 add
    -     dup nc size leq
    -     {
    -       nc size NumProcesses 3 arraystore nc exch Take
    -     }
    -     {
    -       pop
    -       [] cvnodecollection
    -     } ifelse
    -   end
    -} def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Return array containing only those node IDs for which procedure returns true
    -%
    -% Note:
    -% Returns array so that we can return an empty array if no node matches.
    -/Select [/nodecollectiontype /proceduretype]
    -{
    -  /predicate Set
    -  mark exch
    -  {
    -    dup
    -    predicate not
    -    {
    -      pop
    -    }
    -    if
    -  }
    -  forall
    -  counttomark
    -  arraystore
    -  exch pop
    -  currentdict /predicate undef
    -} bind def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Min and Max for NodeCollections
    -%
    -
    -/Min trie
    -[/nodecollectiontype] { 0 get } addtotrie
    -[/anytype] /Min load addtotrie
    -def
    -
    -/Max trie
    -[/nodecollectiontype] { dup size 1 sub get } addtotrie
    -[/anytype] /Max load addtotrie
    -def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% Parameterization
    -
    -
    -/mul [/parametertype /parametertype]
    -  /mul_P_P load
    -def
    -
    -/div [/parametertype /parametertype]
    -  /div_P_P load
    -def
    -
    -/add [/parametertype /parametertype]
    -  /add_P_P load
    -def
    -
    -/sub [/parametertype /parametertype]
    -  /sub_P_P load
    -def
    -
    -/compare [/parametertype /parametertype /dictionarytype]
    -  /compare_P_P_D load
    -def
    -
    -/conditional [/parametertype /parametertype /parametertype]
    -  /conditional_P_P_P load
    -def
    -
    -/min [/parametertype /doubletype]
    -  /min_P_d load
    -def
    -
    -/max [/parametertype /doubletype]
    -  /max_P_d load
    -def
    -
    -/redraw [/parametertype /doubletype /doubletype]
    -  /redraw_P_d_d load
    -def
    -
    -/exp [/parametertype]
    -  /exp_P load
    -def
    -
    -/sin [/parametertype]
    -  /sin_P load
    -def
    -
    -/cos [/parametertype]
    -  /cos_P load
    -def
    -
    -/pow [/parametertype /doubletype]
    -  /pow_P_d load
    -def
    -
    -/dimension2d [/parametertype /parametertype]
    -  /dimension2d_P_P load
    -def
    -
    -/dimension3d [/parametertype /parametertype /parametertype]
    -  /dimension3d_P_P_P load
    -def
    -
    -/CreateParameter trie
    -[/dictionarytype] /CreateParameter_D load addtotrie
    -[/doubletype] /CreateParameter_D load addtotrie
    -def
    -
    -/GetValue [/parametertype]
    -  /GetValue_P load
    -def
    -
    -/ParameterIsSpatial [/parametertype]
    -  /IsSpatial_P load
    -def
    -
    -/Apply [/parametertype /dictionarytype]
    -  /Apply_P_D load
    -def
    -
    -/Apply [/parametertype /nodecollectiontype]
    -  /Apply_P_g load
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/Simulate trie
    -[/integertype] {cvd Simulate} addtotrie
    -[/doubletype]  /Simulate_d load addtotrie
    -def
    -
    -/Run trie
    -[/integertype] {cvd Run} addtotrie
    -[/doubletype]  /Run_d load addtotrie
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -
    -% oosupport.sli already defines conversions for dict
    -/cvdict [/connectiontype]
    - /cvdict_C load
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/** @BeginDocumentation
    -   Name: cvnodecollection - Create a container of node IDs.
    -
    -   Synopsis:
    -   list_of_node_ids          cvnodecollection -> nodecollection
    -   first_node_id    last_node_id cvnodecollection -> nodecollection
    -
    -   Parameters:
    -   list_of_node_ids    - an array or intvector of node IDs, or a nodecollection
    -   first_node_id       - an integer definig the first node ID of the range
    -   last_node_id        - an integer definig the last node ID of the range
    -
    -   Description:
    -   This function creates a nodecollection object, which is a unified
    -   representation for multiple node IDs of neurons or devices. To
    -   save memory in the case of contiguous ranges of node IDs, it is
    -   possible to just use the first and last index of the range to
    -   initialize the nodecollection.
    -
    -   Author: Jochen Martin Eppler
    -   FirstVersion: April 2014
    -
    -   SeeAlso: cv_iv, Connect
    -*/
    -
    -/cvnodecollection trie
    -  [/integertype /integertype] /cvnodecollection_i_i load addtotrie
    -  [/arraytype]                /cvnodecollection_ia  load addtotrie
    -  [/intvectortype]            /cvnodecollection_iv  load addtotrie
    -  [/nodecollectiontype]        {}                        addtotrie
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% add conversion from NodeCollection
    -/cva [/nodecollectiontype]
    -  /cva_g load
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/NodeCollectionQ trie
    -  [/nodecollectiontype] true addtotrie
    -  [/anytype] false addtotrie
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% convert to list of node_id-modelid pairs
    -/cva_node_id_mid trie def
    -/cva_node_id_mid [/nodecollectiontype]
    -{
    - << >> begin
    -  dup
    -  :beginiterator_g /iter Set
    -  :enditerator_g /enditer Set
    -
    -  mark
    -  {
    -    iter :getnodeidmodelid_q
    -    iter :next_q
    -    enditer :lt_q_q not { exit } if
    -  }
    -  loop
    -  counttomark
    -  arraystore
    -  exch pop
    -
    -  end
    -}
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% join for NodeCollections
    -/join [/nodecollectiontype /nodecollectiontype]
    -  /join_g_g load
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% forall, forallindexed and Map for node collections --- brutal implementations
    -
    -/forall [/nodecollectiontype /proceduretype]
    -{
    -  /func Set
    -  dup
    -  :beginiterator_g /iter Set
    -  :enditerator_g /enditer Set
    -
    -  {
    -    iter :getnodeid_q
    -    func
    -    iter :next_q
    -    enditer :lt_q_q not { exit } if
    -  }
    -  loop
    -
    -  % Delete local variables; we do not use a local dictionary
    -  % here in case func should change variables.
    -  currentdict /func undef
    -  currentdict /iter undef
    -  currentdict /enditer undef
    -
    -} bind def
    -
    -/forallindexed [/nodecollectiontype /proceduretype]
    -{
    -  /func Set
    -  dup
    -  :beginiterator_g /iter Set
    -  :enditerator_g /enditer Set
    -
    -  /:n 0 def
    -  {
    -    iter :getnodeid_q
    -    :n
    -    func
    -    iter :next_q
    -    /:n :n 1 add def
    -    enditer :lt_q_q not { exit } if
    -  }
    -  loop
    -
    -  % Delete local variables; we do not use a local dictionary
    -  % here in case func should change variables.
    -  currentdict /func undef
    -  currentdict /iter undef
    -  currentdict /enditer undef
    -  currentdict /:n undef
    -
    -} bind def
    -
    -/Map [/nodecollectiontype /proceduretype]
    -{
    -  << >> begin
    -  /func Set
    -  dup
    -  :beginiterator_g /iter Set
    -  :enditerator_g /enditer Set
    -
    -  mark
    -  {
    -    iter :getnodeid_q
    -    func
    -    iter :next_q
    -    enditer :lt_q_q not { exit } if
    -  }
    -  loop
    -  counttomark
    -  arraystore
    -  exch pop
    -
    -  end
    -} bind def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% NodeCollection membership
    -
    -/InCollection [/nodecollectiontype /integertype]
    -  /MemberQ_g_i load
    -def
    -
    -/Find [/nodecollectiontype /integertype]
    -  /Find_g_i load
    -def
    -
    -/eq [/nodecollectiontype /nodecollectiontype] /eq_g load def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% typeinit.sli already defines size functions for other types
    -/size [/nodecollectiontype]
    -  /size_g load
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% GetStatus / SetStatus for NodeCollection
    -
    -/GetStatus [/nodecollectiontype]
    -  /GetStatus_g load
    -def
    -
    -/SetStatus [/nodecollectiontype /dictionarytype]
    -{
    -  1 pick ValidQ_g not { /SetStatus /InvalidNodeCollectionError raiseerror } if
    -  exch { 1 pick SetStatus_id } forall
    -  pop % dictionary
    -}
    -def
    -
    -/SetStatus [/nodecollectiontype /arraytype]
    -{
    -  1 pick ValidQ_g not { /SetStatus /InvalidNodeCollectionError raiseerror } if
    -  << >> begin
    -  /params Set
    -  /nc Set
    -
    -  params length nc size neq
    -  {
    -    nc params /SetStatus /IncompatibleLengths raiseerror
    -  }
    -  if
    -
    -  nc :beginiterator_g /iter Set
    -  nc :enditerator_g /enditer Set
    -
    -  params
    -  {
    -    iter :getnodeid_q exch
    -    SetStatus_id
    -    iter :next_q pop
    -  }
    -  forall
    -
    -  end
    -}
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/GetResolution {
    -    GetKernelStatus /resolution get
    -} def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/** @BeginDocumentation
    -   Name: GetNodes - Return IDs of all nodes that fulfill the conditions given in
    -                    the dictionary, or all nodes if no dictionary given. Returns
    -                    only mpi local nodes if local_bool is true.
    -   Synopsis:
    -     <<dict>> local_bool GetNodes -> NodeCollection
    -   Parameters:
    -     <<dict>>   - Dictionary of selection properties
    -     local_bool - Bool indicating whether or not we want only local nodes.
    -   Returns:
    -     NodeCollection  - NodeCollection with the node IDs of all nodes or all mpi
    -                      local nodes if local_bool is true.
    -   Description:
    -   This function recursively traverses all nodes and returns the global
    -   ids of all nodes in increasing order of node_id if local_bool is false, if not, it
    -   returns local nodes. If a dictionary is provided, only those nodes which fulfill
    -   the given criteria are returned.
    -*/
    -
    -/GetNodes trie
    -  [/dictionarytype /booltype] { GetNodes_D_b } bind addtotrie
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -%     Create and variants
    -%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/Create_l
    -{
    -  1 Create_l_i
    -} def
    -
    -/Create_l_D
    -{
    -  1 exch Create_l_i_D
    -} def
    -
    -/Create_l_i_D
    -{
    -  << >> begin
    -
    -    /params Set
    -    /n Set
    -    /model Set
    -
    -    model GetDefaults /element_type get /recorder neq
    -    {
    -      % For stimulators and neurons, we store the old parameters that
    -      % are given in params, then set params as model defaults, create
    -      % the nodes and restore the old parameters.
    -
    -      model GetDefaults /oldparams Set
    -      /tmp << >> def
    -
    -      % get implicitly checks if params contains 'illegal' keys
    -      params keys { /key Set tmp key oldparams key get put } forall
    -      tmp /oldparams Set
    -
    -      model params SetDefaults
    -      model n Create_l_i
    -      model oldparams SetDefaults
    -    }
    -    {
    -      % For recorders, we can't use the more efficient method
    -      % above. The reason for this is that recording backend
    -      % properties might differ between backends and the backend might
    -      % be changed away from the default during the call to Create,
    -      % resulting in lookup errors.
    -
    -      model n Create_l_i
    -      dup params SetStatus
    -    } ifelse
    -
    -  end % local namespace
    -} def
    -
    -
    -/Create trie
    -  [/literaltype                             ] /Create_l     load addtotrie
    -  [/literaltype /integertype                ] /Create_l_i   load addtotrie
    -  [/literaltype              /dictionarytype] /Create_l_D   load addtotrie
    -  [/literaltype /integertype /dictionarytype] /Create_l_i_D load addtotrie
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -%     Model handling
    -%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/CopyModel_l_l
    -{
    -  << >> CopyModel_l_l_D
    -} bind def
    -
    -/CopyModel trie
    -  [/literaltype /literaltype                ] /CopyModel_l_l   load addtotrie
    -  [/literaltype /literaltype /dictionarytype] /CopyModel_l_l_D load addtotrie
    -def
    -
    -/SetDefaults
    -  [/literaltype /dictionarytype] /SetDefaults_l_D load
    -def
    -
    -/GetDefaults
    -  [/literaltype] /GetDefaults_l load
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/** @BeginDocumentation
    -   Name: ShowDefaults - Show the default parameters of a model.
    -
    -   Synopsis:
    -   /modelname ShowDefaults -> -
    -
    -   Description:
    -   ShowDefaults retrieves the dictionary of default values from the
    -   specified model and displays it, using info. ShowDefaults is
    -   equivalent to the sequence "GetDefaults info"
    -
    -   SeeAlso: GetDefaults, info
    -*/
    -
    -/ShowDefaults
    -{
    -  GetDefaults info
    -} def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -%     Connect and its variants
    -%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -
    -/** @BeginDocumentation
    -   Name: Connect - Establish a connection between two nodes or lists of nodes.
    -
    -   Synopsis:
    -   sources targets                        Connect
    -   sources targets weight delay           Connect
    -   sources targets weight delay syn_model Connect
    -   sources targets conn_rule              Connect
    -   sources targets conn_spec              Connect
    -   sources targets conn_rule syn_model    Connect
    -   sources targets conn_spec syn_model    Connect
    -   sources targets conn_rule syn_spec     Connect
    -   sources targets conn_spec syn_spec     Connect
    -
    -   Parameters:
    -   sources    nodecollection  - the node IDs of the sources
    -   targets    nodecollection  - the node IDs of the targets
    -   weight     double          - the weight of the connection
    -   delay      double          - the delay of the connection
    -   conn_rule  literal         - the name of the connection rule
    -   conn_spec  dict            - dictionary with connectivity specification (see Options)
    -   syn_model  literal         - the name of the synapse model
    -   syn_spec   dict            - dictionary with synapse model specification (see Options)
    -
    -   Options:
    -   /conn_spec - dictionary with connectivity specification, must at least contain /rule
    -
    -                The following options may be given for all connection rules;
    -                not all rules support all options and many rules add rule-specific options.
    -
    -                allow_autapses  bool  - allow self-connections (default: true)
    -                allow_multapses bool  - allow multiple connections between pairs
    -                                        of neurons (default: true)
    -                symmetric       bool  - also create connection in opposite direction to
    -                                      obtain symmetric connections (default: false)
    -
    -   /syn_spec  - dictionary with synapse specification, must at least contain /model
    -
    -   Description:
    -   Connects sources to targets according to the given connectivity
    -   specification conn_spec. Some connection rules impose requirements.
    -   E.g. /one_to_one requires that sources and targets have the same
    -   number of elements. Others may have additional parameters,
    -   e.g. connection probability /p for /pairwise_binomial.
    -
    -   The variants with only literal arguments /conn_rule or /syn_model
    -   are shorthand for the corresponding calls with connectivity or
    -   synapse specification dictionaries as explained in the Options
    -   section.  The literals are expanded to << /rule /conn_rule >> and
    -   << /synapse_model /syn_model >>, respectively.
    -
    -   Parameters for connectivity rules must have fixed values.
    -
    -   Parameters for synapses may be fixed single values, arrays or random deviate
    -   specifications.
    -
    -   A list of available connection rules can be obtained from the
    -   kernel status dictionary by inspecting the key /connection_rules.
    -
    -   SeeAlso: cvnodecollection, GetOptions
    -
    -   Author: Hannah Bos, Hans Ekkehard Plesser, Jochen Martin Eppler
    -
    -   FirstVersion: January 2014
    -*/
    -
    -%%% Options for Connect
    -
    -/Connect <<
    -  /conn_spec << /rule /all_to_all >>
    -  /syn_spec << /synapse_model /static_synapse >>
    ->> Options
    -
    -
    -%%% Helper functions for Connect
    -
    -% Expects a synapse or connection specification dictionary on the
    -% stack and extends it by the defaults from Connect's Options for
    -% all keys from the given spec in the Options for Connect that are
    -% missing in the given dictionary.
    -% Usage: dict /lit, where lit is the name of the spec in the Options
    -/:Connect_complete_dict {
    -    << >> begin
    -    /optname Set
    -    /Connect optname GetOption keys {
    -    	dup /key Set
    -	exch dup 3 2 roll known not {
    -	  dup key /Connect optname GetOption key get put
    -        } if
    -    } forall
    -    end
    -} def
    -
    -
    -%%% Variants of Connect
    -
    -/Connect trie
    -
    -  % We create the type trie for the different variants using a loop
    -  [/arraytype /intvectortype /nodecollectiontype] {
    -      /node_idlisttype Set
    -
    -      % Variant: sources targets Connect
    -      % Connect nodes from two sets of node IDs using the default rule and
    -      % synapse model
    -      [node_idlisttype node_idlisttype] {
    -          cvnodecollection exch  % convert targets to nodecollection
    -          cvnodecollection exch  % convert sources to nodecollection
    -          /Connect /conn_spec GetOption  % use default conn_spec
    -          /Connect /syn_spec GetOption   % use default syn_spec
    -          Connect_g_g_D_D
    -      } bind addtotrie
    -
    -      % Variant: sources targets weight delay Connect
    -      % Connect nodes from two sets of node IDs using the default rule and
    -      % synapse model but with the given weight and delay
    -      [node_idlisttype node_idlisttype /doubletype /doubletype] {
    -          mark 3 1 roll         % put a mark before weight and delay
    -          /weight 3 1 roll      % add a label for the weight
    -          /delay 2 1 roll       % add a label for the delay
    -          >>                    % create the syn_spec dictionary
    -          /syn_spec :Connect_complete_dict    % fill in missing defaults
    -          /Connect /conn_spec GetOption exch  % use default conn_spec
    -          4 2 roll              % bring sources and targets to top
    -          cvnodecollection exch  % convert targets to nodecollection
    -          cvnodecollection exch  % convert sources to nodecollection
    -          4 2 roll              % bring sources and targets to bottom
    -          Connect_g_g_D_D
    -      } bind addtotrie
    -
    -
    -      % Variant: sources targets weight delay syn_model Connect
    -      % Connect nodes from two sets of node IDs using the default rule and
    -      % the given weight, delay and synapse model
    -	[node_idlisttype node_idlisttype /doubletype /doubletype /literaltype] {
    -          mark 4 1 roll         % put a mark before weight and delay
    -          /weight 4 1 roll      % add a label for the weight
    -          /delay 3 1 roll       % add a label for the delay
    -        /synapse_model 2 1 roll  % add a label for the synapse model
    -          >>                    % create the syn_spec dictionary
    -          /syn_spec :Connect_complete_dict    % fill in missing defaults
    -          /Connect /conn_spec GetOption exch  % use default conn_spec
    -          4 2 roll              % bring sources and targets to top
    -          cvnodecollection exch  % convert targets to nodecollection
    -          cvnodecollection exch  % convert sources to nodecollection
    -          4 2 roll              % bring sources and targets to bottom
    -          Connect_g_g_D_D
    -      } bind addtotrie
    -
    -      % Variant: sources targets conn_rule Connect
    -      % Connect nodes from two sets of node IDs using the given rule and
    -      % default synapse model
    -      [node_idlisttype node_idlisttype /literaltype] {
    -	  mark exch /rule exch >>  % create the conn_spec dictionary
    -	  /conn_spec :Connect_complete_dict  % fill in missing defaults
    -	  3 1 roll                 % bring sources and targets to top
    -	  cvnodecollection exch     % convert targets to nodecollection
    -	  cvnodecollection exch     % convert sources to nodecollection
    -	  3 2 roll                 % bring sources and targets to bottom
    -	  /Connect /syn_spec GetOption  % use default syn_spec
    -	  Connect_g_g_D_D
    -      } bind addtotrie
    -
    -      % Variant: sources targets conn_spec Connect
    -      % Connect nodes from two sets of node IDs using the given connectivity
    -      % specification and default synapse model
    -      [node_idlisttype node_idlisttype /dictionarytype] {
    -	  /conn_spec :Connect_complete_dict  % fill in missing defaults
    -	  3 1 roll              % bring sources and targets to top
    -	  cvnodecollection exch  % convert targets to nodecollection
    -	  cvnodecollection exch  % convert sources to nodecollection
    -	  3 2 roll              % bring sources and targets to bottom
    -	  /Connect /syn_spec GetOption  % use default syn_spec
    -	  Connect_g_g_D_D
    -      } bind addtotrie
    -
    -      % Variant: sources targets conn_rule syn_model Connect
    -      % Connect nodes from two sets of node IDs using the given rule and
    -      % synapse model
    -      [node_idlisttype node_idlisttype /literaltype /literaltype] {
    -    	  mark exch /synapse_model exch >>  % create the syn_spec dictionary
    -	  /syn_spec :Connect_complete_dict   % fill in missing defaults
    -	  exch                      % exchange syn_spec and conn_spec
    -	  mark exch /rule exch >>   % create the conn_spec dictionary
    -	  /conn_spec :Connect_complete_dict  % fill in missing defaults
    -	  exch                      % exchange syn_spec and conn_spec
    -	  4 2 roll                  % bring sources and targets to top
    -	  cvnodecollection exch      % convert targets to nodecollection
    -	  cvnodecollection exch      % convert sources to nodecollection
    -	  4 2 roll                  % bring sources and targets to bottom
    -	  Connect_g_g_D_D
    -      } bind addtotrie
    -
    -      % Variant: sources targets conn_spec syn_model Connect
    -      % Connect nodes from two sets of node IDs using the given rule and
    -      % synapse specification
    -      [node_idlisttype node_idlisttype /literaltype /dictionarytype] {
    -	  /syn_spec :Connect_complete_dict   % fill in missing defaults
    -	  exch                     % exchange syn_spec and conn_spec
    -	  mark exch /rule exch >>  % create the conn_spec dictionary
    -	  /conn_spec :Connect_complete_dict  % fill in missing defaults
    -	  exch                     % exchange syn_spec and conn_spec
    -	  4 2 roll                 % bring sources and targets to top
    -	  cvnodecollection exch     % convert targets to nodecollection
    -	  cvnodecollection exch     % convert sources to nodecollection
    -	  4 2 roll                 % bring sources and targets to bottom
    -	  Connect_g_g_D_D
    -      } bind addtotrie
    -
    -      % Variant: sources targets conn_rule syn_spec Connect
    -      % Connect nodes from two sets of node IDs using the given connectivity
    -      % specification and synapse model
    -      [node_idlisttype node_idlisttype /dictionarytype /literaltype] {
    -    	  mark exch /synapse_model exch >>  % create the syn_spec dictionary
    -	  /syn_spec :Connect_complete_dict   % fill in missing defaults
    -	  exch                      % exchange syn_spec and conn_spec
    -	  /conn_spec :Connect_complete_dict  % fill in missing defaults
    -	  exch                      % exchange syn_spec and conn_spec
    -	  4 2 roll                  % bring sources and targets to top
    -	  cvnodecollection exch      % convert targets to nodecollection
    -	  cvnodecollection exch      % convert sources to nodecollection
    -	  4 2 roll                  % bring sources and targets to bottom
    -	  Connect_g_g_D_D
    -      } bind addtotrie
    -
    -      % Variant: sources targets conn_spec syn_spec Connect
    -      % Connect nodes from two sets of node IDs using the given connectivity
    -      % and synapse specifications
    -      [node_idlisttype node_idlisttype /dictionarytype /dictionarytype] {
    -        /syn_spec :Connect_complete_dict   % fill in missing defaults
    -        exch                   % exchange syn_spec and conn_spec
    -        /conn_spec :Connect_complete_dict  % fill in missing defaults
    -        exch                   % exchange syn_spec and conn_spec
    -        4 2 roll               % bring sources and targets to top
    -        cvnodecollection exch  % convert targets to nodecollection
    -        cvnodecollection exch  % convert sources to nodecollection
    -        4 2 roll               % bring sources and targets to bottom
    -        Connect_g_g_D_D
    -      } bind addtotrie
    -
    -      % Variant: sources targets conn_spec syn_vector Connect
    -      % Connect nodes from two sets of NodeCollections using the given connectivity specification
    -      % and a list of synapse specifications
    -      [node_idlisttype node_idlisttype /dictionarytype /arraytype] {
    -        /test_syn_specs Set
    -        test_syn_specs
    -        {
    -          /syn_spec :Connect_complete_dict
    -          pop
    -        } forall
    -        test_syn_specs
    -        Connect_g_g_D_a
    -      } bind addtotrie
    -
    -  } forall
    -
    -def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -
    -/** @BeginDocumentation
    -   Name: GetConnections - Retrieve connections between nodes
    -
    -   Synopsis:
    -   << /source [snode_id1 snode_id2 ...]
    -      /target [tnode_id1 tnode_id2 ...]
    -      /synapse_model /smodel
    -      /synapse_label label      >> GetConnections -> [ conn1 conn2 ... ]
    -
    -   Parameters:
    -   A dictionary that may contain the following fields (all are optional):
    -   /source  - array with node IDs of presynaptic nodes whose connections are sought.
    -              If not given, all neurons are searched as sources.
    -   /target  - array with node IDs of postsynaptic nodes whose connections are sought.
    -              If not given, all neurons are searched as targets.
    -   /synapse_model - literal specifying synapse model
    -                    If not given, connections of all synapse models are returned.
    -   /synapse_label - integer specifying synapse label
    -                    If not given, connections of all synapse labels are returned.
    -
    -   Description:
    -   1. If called with an empty dictionary, GetConnections returns all connections of the
    -      network, as a list of arrays (IntVectorDatum), one array per connection.
    -   2. Each array (connection object) has the following elements:
    -      [source-node_id target-node_id target-thread synapse-model-id port]
    -      where synapse-model-id corresponds to the position of the model in the list
    -      of models available from the /synapse_models property of the kernel status dictionary.
    -   3. The optional dictionary elements /source and /target can be used to filter
    -      for specific pre- and postsynaptic neurons, respectively.
    -   4. The optional parameter /synapse_model can be used to filter for a specific synapse model.
    -   5. The optional parameter /synapse_label can be used to filter for a specific synapse label.
    -   6. In a parallel simulation, GetConnections only returns connections with *targets*
    -      on the MPI process executing the function.
    -
    -   Remarks:
    -   1. The /synapse_label property can only be assigned to synapse models with names ending
    -      with '_lbl'. All other synapses have the default synapse_label UNLABELED_CONNECTION (-1).
    -   2. The "port" enumerates connections per source, thread and synapse model. It is
    -      mainly important for NEST internally.
    -   3. In OpenMP mode, GetConnections works thread-parallel for better performance.
    -   4. Connection objects can be converted to SLI lists with cva.
    -   5. Connection objects can be passed to SetStatus, and GetStatus
    -*/
    -/GetConnections [/dictionarytype]
    -{
    -  /pdict Set
    -  [ /source /target ]
    -  {
    -    /key Set
    -    pdict key known
    -    {
    -      pdict key get
    -      NodeCollectionQ exch ; not
    -      {
    -	      key cvs ( argument must be NodeCollection) join M_ERROR message
    -	      /GetConnections /ArgumentError raiseerror
    -      }
    -      if
    -    }
    -    if
    -  }
    -  forall
    -  pdict GetConnections_D
    -}
    -def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/** @BeginDocumentation
    -   Name: elementstates - dictionary with symbolic element state tag
    -
    -   Description:
    -   Each element has a state which can be accessed via it's status dictionary.
    -   The state is defined as a superposition of the following values:
    -   /valid       1
    -   /busy        2
    -   /updated     4
    -   /suspended   8
    -   /frozen     16
    -   /buffers_initialized 32
    -   /err        64
    -   valid      - the default state of an element.
    -   busy       - indicates that this element needs more than one cycle to
    -                update and is not yet fully updated.
    -   updated    - indicates, that the element was updated in the current cycle.
    -                once the update cycle is completed, all updated flags are
    -		changed to valid.
    -		This flag shoulds only be set if the update cycle was
    -		interrupted or suspended.
    -   suspended  - indicates, that the update of this element was suspended. The
    -                next call to simulate will continue with this element.
    -   frozen     - if this state is set, the update cycle skips this element. In
    -                effect, the element keeps its state intact as if it was "frozen".
    -		This is the only state which can directly be set by the user.
    -   buffers_initialized - the buffers of the node have been initialized
    -   err        - some unspecified error condition has occured.
    -
    -   Examples: elementstates info
    -
    -   Availability: NEST
    -*/
    -
    -/elementstates
    -<<
    -  /valid       1
    -  /busy        2
    -  /updated     4
    -  /suspended   8
    -  /frozen     16
    -  /buffers_initialized 32
    -  /err        64
    ->> def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/** @BeginDocumentation
    -   Name: unit_conversion - Conversion factors for SI units.
    -
    -   Description:
    -   Some SLI functions and tools expect numerical arguments which carry SI units.
    -   function/tool        expected unit
    -   ----------------------------------
    -   Simulate             ms
    -   current generators   pA
    -   voltmeters           mV
    -   ac_generator         Hz
    -
    -   As SLI does not know any unit conversion scheme, numerical values
    -   need to be specified in the appropriate units. However, it improves
    -   readability, if a hint to the unit is specified in the program code,
    -   such as "333 pA", instead of just "333".
    -   Furthermore, it may be convenient to have other units converted to the
    -   ones expected by the routines. (For example, "ms" converts from milliseconds
    -   to timesteps, taking into account the current network resolution, see
    -   example below.)
    -
    -   The following conversion factors are known (developers: please add others in
    -   nest-init.sli as required):
    -   ms, pA, mV, Hz, spikes
    -
    -   Examples:
    -   The following call always simulates 1000 ms of network time,
    -
    -   1000 ms Simulate
    -
    -   Author: (unknown), documented by Ruediger Kupper, 18-jul-2003
    -
    -   Availability: This is just a description. unit_conversion is no SLI command.
    -   SeeAlso: Hz, ms, pA, mV, spikes, cvd, cvi
    -*/
    -
    -%% Some auxiliary definitions, just for readibility
    -
    -/** @BeginDocumentation
    -   Name: ms - Specification in ms (for readability)
    -   SeeAlso: unit_conversion, ms2hms
    -*/
    -/ms /cvd load def
    -
    -/** @BeginDocumentation
    -   Name: s - Specification in s (for readability)
    -   SeeAlso: unit_conversion, ms2hms
    -*/
    -/s {1000.0 mul} bind def
    -
    -/** @BeginDocumentation
    -   Name: pA - Specification in pA (for readability)
    -   SeeAlso: unit_conversion
    -*/
    -/pA /cvd load def
    -
    -/** @BeginDocumentation
    -   Name: nS - Specification in nS (for readability)
    -   SeeAlso: unit_conversion
    -*/
    -/nS /cvd load def
    -/** @BeginDocumentation
    -   Name: pF - Specification in pF (for readability)
    -   SeeAlso: unit_conversion
    -*/
    -/pF /cvd load def
    -
    -/** @BeginDocumentation
    -   Name: mV - Specification in mV (for readability)
    -   SeeAlso: unit_conversion
    -*/
    -/mV /cvd load def
    -
    -/** @BeginDocumentation
    -   Name: Hz - Specification in Hz (for readability)
    -   SeeAlso: unit_conversion
    -*/
    -/Hz /cvd load def
    -
    -/** @BeginDocumentation
    -   Name: spikes - Specification in spikes (for readability)
    -   SeeAlso: unit_conversion
    -*/
    -/spikes /cvi load def
    -
    -/double /cvd load def
    -
    -/int    /cvi load def
    -
    -
    -/** @BeginDocumentation
    -   Name: SubsetQ - Test if one dictionary is a subset of another
    -
    -   Synopsis:
    -   dict1 dict2 SubsetQ -> bool
    -
    -   Parameters:
    -   dict1 - dictionary
    -   dict2 - dictionary
    -
    -   Description:
    -   The functions returns true, if all entries of dict2 are present in dict1
    -   with the same values.
    -
    -   Examples:
    -   << /a 1 /b 2 /c 2 >> << /c 2 >> SubsetQ -> true
    -*/
    -/SubsetQ
    -[/dictionarytype /dictionarytype]
    -{
    -  << >> begin
    -  cva 2 Partition
    -  /properties Set
    -  /object Set
    -
    -  true
    -  properties
    -  {
    -    arrayload ;
    -    /val Set
    -    cvlit /key Set
    -    object dup key known
    -    {
    -      key get
    -      val eq and
    -    }
    -    {
    -     pop pop false exit
    -    } ifelse
    -  } forall
    -  end
    -} bind def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/** @BeginDocumentation
    -   Name: ShowStatus - Show the status dictionary of a network node.
    -
    -   Synopsis:
    -   node_id ShowStatus -> -
    -
    -   Description:
    -   ShowStatus retrieves the status dictionary of the specified node
    -   and displays it, using info.
    -   ShowStatus is equivalent to the sequence "GetStatus info"
    -
    -   SeeAlso: GetStatus, info
    -*/
    -
    -/ShowStatus
    -{
    -  GetStatus info
    -} def
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -/** @BeginDocumentation
    -   Name: TimeCommunication - returns average time taken for MPI_Allgather over n calls with m bytes
    -   Synopsis:
    -   n m [bool] TimeCommunication -> time
    -   Availability: NEST 2.0
    -   Author: Abigail Morrison
    -   FirstVersion: August 2009
    -   Description:
    -   The function allows a user to test how much time a call the Allgather costs
    -   If boolean third argument is passed and true, time offgrid spike communication.
    -   SeeAlso: TimeCommunicationOffgrid
    - */
    -/TimeCommunication trie
    -[/integertype /integertype /booltype] /TimeCommunication_i_i_b load addtotrie
    -[/integertype /integertype] { false TimeCommunication_i_i_b } bind addtotrie
    -def
    -
    -/TimeCommunicationv trie
    -[/integertype /integertype] /TimeCommunicationv_i_i load addtotrie
    -def
    -
    -  /** @BeginDocumentation
    -     Name: TimeCommunicationOffgrid - returns average time taken for MPI_Allgather over n calls with m bytes when communication offgrid spikes
    -     Synopsis:
    -     n m [bool] TimeCommunication -> time
    -     Availability: NEST 2.0
    -     Author: Abigail Morrison
    -     FirstVersion: August 2009
    -     Description:
    -     The function allows a user to test how much time a call the Allgather costs
    -     SeeAlso: TimeCommunication
    -   */
    -/TimeCommunicationOffgrid trie
    -[/integertype /integertype] { true TimeCommunication_i_i_b } bind addtotrie
    -
    -def
    -  /** @BeginDocumentation
    -     Name: TimeCommunicationAlltoall - returns average time taken for MPI_Alltoall over n calls with m bytes
    -     Synopsis:
    -     n m TimeCommunicationAlltoall -> time
    -     Availability: 10kproject (>r11254)
    -     Author: Jakob Jordan (modified TimeCommunication)
    -     FirstVersion: June 2014
    -     Description:
    -     The function allows a user to test how much time a call to MPI_Alltoall costs
    -     SeeAlso: TimeCommunication
    -   */
    -/TimeCommunicationAlltoall trie
    -[/integertype /integertype] /TimeCommunicationAlltoall_i_i load addtotrie
    -def
    -
    -  /** @BeginDocumentation
    -     Name: TimeCommunicationAlltoallv - returns average time taken for MPI_Alltoallv over n calls with m bytes
    -     Synopsis:
    -     n m TimeCommunicationAlltoallv -> time
    -     Availability: 10kproject (>r11300)
    -     Author: Jakob Jordan (modified TimeCommunication)
    -     FirstVersion: July 2014
    -     Description:
    -     The function allows a user to test how much time a call to MPI_Alltoallv costs
    -     SeeAlso: TimeCommunication
    -   */
    -/TimeCommunicationAlltoallv trie
    -[/integertype /integertype] /TimeCommunicationAlltoallv_i_i load addtotrie
    -def
    -
    -/cva [/connectiontype] /cva_C load def
    -
    -/abort
    -{
    -  statusdict /exitcodes get /userabort get
    -  statusdict /is_mpi get { MPI_Abort }{ quit_i } ifelse
    -} bind def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -%     Functions relating to spatial positions
    -%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/ConnectLayers [/nodecollectiontype /nodecollectiontype /dictionarytype]
    -  /ConnectLayers_g_g_D load
    -def
    -
    -/CreateLayerParams [/dictionarytype /dictionarytype]
    -  /CreateLayer_D_D load
    -def
    -
    -/CreateLayer [/dictionarytype]
    -{
    -  << >> CreateLayerParams
    -} def
    -
    -/GetPosition [/nodecollectiontype]
    -  /GetPosition_g load
    -def
    -
    -% nc_from, nc_to
    -/Displacement [/nodecollectiontype /nodecollectiontype]
    -  /Displacement_g_g load
    -def
    -
    -/Displacement [/arraytype /nodecollectiontype]
    -  /Displacement_a_g load
    -def
    -
    -% nc_from, nc_to
    -/Distance [/nodecollectiontype /nodecollectiontype]
    -  /Distance_g_g load
    -def
    -
    -/Distance [/arraytype /nodecollectiontype]
    -    /Distance_a_g load
    -def
    -
    -/Distance [/arraytype]
    -    /Distance_a load
    -def
    -
    -/GetLayerStatus [/nodecollectiontype]
    -    /GetLayerStatus_g load
    -def
    -
    -/DumpLayerNodes [/ostreamtype /nodecollectiontype]
    -  { DumpLayerNodes_os_g } bind
    -def
    -
    -/DumpLayerConnections [/ostreamtype /nodecollectiontype /nodecollectiontype /literaltype]
    -  /DumpLayerConnections_os_g_g_l load
    -def
    -
    -/CreateMask [/dictionarytype]
    -  /CreateMask_D load
    -def
    -
    -/Inside [/arraytype /masktype]
    -  /Inside_a_M load
    -def
    -
    -/Inside [/arraytype /dictionarytype]
    -  { CreateMask Inside_M_a } bind
    -def
    -
    -/and [/masktype /masktype]
    -  /and_M_M load
    -def
    -
    -/or [/masktype /masktype]
    -  /or_M_M load
    -def
    -
    -/sub [/masktype /masktype]
    -  /sub_M_M load
    -def
    -
    -/cvdict [/masktype]
    -  /cvdict_M load
    -def
    -
    -/get [/masktype /literaltype] {exch cvdict_M exch get} def
    -/get [/masktype /arraytype] {exch cvdict_M exch get} def
    -
    -/SelectNodesByMask [/nodecollectiontype /arraytype /masktype]
    -  /SelectNodesByMask_g_a_M load
    -def
    -
    -
    -% Install modules in environment variable NEST_MODULES. Modules have
    -% to be separated by colon.
    -(NEST_MODULES) getenv { (:) breakup { Install } forall } if
    diff --git a/lib/sli/oosupport.sli b/lib/sli/oosupport.sli
    deleted file mode 100644
    index 98a8a1a0bc..0000000000
    --- a/lib/sli/oosupport.sli
    +++ /dev/null
    @@ -1,217 +0,0 @@
    -/*
    - *  oosupport.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: call - Execute object from a dictionary.
    -Synopsis: dict /f call -> -
    -Description: In SLI, an object-oriented programming style can be
    - implemented by using dictionaries as objects. 
    - These object dictionaries then contain functions as well as data.
    - The command call can be used to call a "member" of an object.
    -
    - In calling the member-functions, the following steps are performed:
    - 1. the object-dictionary is pushed on the dictionary stack
    - 2. the name is executed in the new dictionary context
    - 3. the object-dictionary is poped off the dictionary stack.
    - Thus, during the execution of the function, the entire namespace of the
    - object-dictionary is accessible.
    -
    - The invocation of call is, thus, comparable but not equivalent
    - to the following sequence of SLI commands:
    - /call
    - { 
    -    exch
    -    begin
    -    load exec
    -    end
    - } def	 
    -
    -Diagnostics: If the called member is not part of the object dictionary,
    -  an UnknownMember error is raised.
    -
    -References:
    -[1] Ruediger Kupper, SLI library management,
    -    HRI-EU Report 06/05, Honda Research Institute Europe GmbH, 2006.
    -
    -SeeAlso: namespace, using
    -*/
    -/call_ /call load def
    -/call trie
    - [/dictionarytype /literaltype] /call_ load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name:cvo - Label a dictionary for usage as an object in oo-programming
    -Synopsis:dict cvo -> dict
    -Parameters:The operator modfies its argument
    -Description:In SLI dictionaries are used to represent the elements of the
    -object oriented programming paradigm. This is natural because the key value
    -pairs can specify functions as well as other data. Certain SLI operators like
    -SetStatus and GetStatus take C++ objects like nodes and random number distributions
    -as arguments but also SLI dictionaries. This enables the same algorithms to operate
    -on C++ and SLI objects. In order to avoid confusion with dictionaries not intended
    -to be used as an object, some operators require the dictionary to be labeld as 
    -an object. If the dictionary is not labeles an error is issued. The operator cvdict
    -removes the label; cvd is the inverse operator of cvo.
    -Examples:
    -<< /c 0 /inc {/c c 1 add def} >> cvo dup  << /c 3 >> SetStatus /c get --> 3
    -
    -{<< /c 0 /inc {/c c 1 add def} >> << /c 3 >> SetStatus} stopped 
    -                                         {3 npop true} {false} ifelse --> true
    -
    -Remarks:The labeling is done by inserting the key /__is_object with value true. 
    -The dictionary is only recognized as labeled if the key exists and its value is 
    -true. However, usage of this key is considered to be an implementation detail and
    -may change in future versions of SLI.
    -
    -Author:Diesmann
    -FirstVersion: 2008-08-23
    -SeeAlso: cvdict, call, SetStatus, GetStatus
    -*/
    -/cvo [/dictionarytype] {dup /__is_object true put} def
    -
    -/** @BeginDocumentation
    -Name:cvdict - Convert argument to a dictionary
    -Synopsis:  dict  cvdict -> dict
    -           array cvdict -> dict
    -Parameters: 
    -- a dictionary which may be labeled for oo-programming
    -- a flat array of even length containing key value pairs
    -Description: 
    -In case the argument is labeled as a dictionary used as 
    -an object in oo-programming, this label is removed. cvdict does not
    -clone its argument. This is the inverse function of cvo.
    -In case the argument is an array the resulting new dictionary contains
    -the key value pairs .
    -Examples:
    - [/a 1 /b 2] cvdict -->  << /a 1 /b 2 >>
    -Author:Diesmann
    -FirstVersion: 2008-08-23
    -SeeAlso: cvo, clonedict
    -*/
    -/cvdict [/dictionarytype] 
    -{
    - dup /__is_object undef
    -}
    -def
    -
    -/cvdict [/arraytype]
    -{
    - << >> dup begin exch arrayload 2 div  {def} repeat
    -}
    -def
    -
    -
    -/** @BeginDocumentation
    -Name:SetStatus_dict - Modify a dictionary used as an object in oo-programming
    -Synopsis:dict dict SetStatus -> -
    -Parameters:The operator modfies the first argument
    -Description: The operator overloads SetStatus and inserts the key value pairs 
    -of the second dictionary into the first dictionary. This is the same functionality 
    -as the one of operator join. However, SetStatus raises an error if the first 
    -dictionary has not been labeled by operator cvo as an object of oo-programming 
    -before. The idea is that use of SetStatus should be reserved for objects of
    -oo-programming not regular dictionaries to enhance the readability of SLI code. 
    -See the documentation of operator cvo for more details.
    -Examples:
    -  << >> cvo dup << /c 1 >> SetStatus /c get --> 1
    -  << >>     dup << /c 1 >> join      /c get --> 1
    -{ << >>         << /c 1 >> SetStatus } stopped  
    -                   {3 npop true} {false} ifelse  --> true
    -Author:Helias, Diesmann
    -FirstVersion: 2006-06-26
    -SeeAlso: GetStatus_dict, cvo, cvd, call 
    -*/
    -/SetStatus_dict
    -{
    - exch  % rdv parameters
    - dup
    - /__is_object known
    - {dup /__is_object get} {false} ifelse  % check if value is true
    - { % first dictionary is labeled for usage as an object 
    -  exch
    -  join_d
    - }
    - { % first dictionary is not used as a object
    - exch                   % restore stack layout
    - M_ERROR (SetStatus)
    - (SetStatus was called on a dictionary which is not labeled as an object. )
    - (Please use the operator join if your intention is to merge two dictionaries. ) join
    - (If a dictionary contains functions and is intended to be used as an object, ) join
    - (please use operator cvo to label it as an object) join message
    - /SetStatus /ObjectDictionaryExpected raiseerror
    - }
    - ifelse
    -} def
    -
    -% add new functions to trie if it exists, else create new
    -/SetStatus [/dictionarytype /dictionarytype] /SetStatus_dict load def
    -
    -
    -/** @BeginDocumentation
    -Name:GetStatus_dict - Return status of a dictionary used as an object in oo-programming
    -Synopsis:dict GetStatus -> dict
    -Parameters:The argument is a dictionary used as an object in oo-programming
    -Description: The operator overloads GetStatus and returns a new dictionary with
    -the key value pairs of the argument. The functionality is similar to the one
    -of operator clonedict but the return value does not inherit the labeling as an
    -object. In this way the relationship between the output dictionary and the input 
    -dictionary is the same as for non dictionary arguments of GetStatus. However, 
    -GetStatus raises an error if the argument dictionary has not been labeled by 
    -operator cvo as an object of oo-programming before. The idea is that use of 
    -GetStatus should be reserved for objects of oo-programming not regular dictionaries 
    -to enhance the readability of SLI code. See the documentation of operator cvo for 
    -more details.
    -Examples:
    -<< /c 1 >> dup cvo GetStatus eq --> false
    -{ << /c 1 >> GetStatus } stopped
    -          {2 npop true} {pop false} ifelse  --> true
    -
    -Author:Diesmann
    -FirstVersion: 2006-08-24
    -SeeAlso: SetStatus_dict, clonedict, cvo, cvdict, call 
    -*/
    -
    -/GetStatus_dict
    -{
    - dup
    - /__is_object known
    - {dup /__is_object get} {false} ifelse  % check if value is true
    - { % dictionary is labeled for usage as an object 
    - clonedict exch pop cvdict
    - }
    - { % dictionary is not used as a object
    - M_ERROR (GetStatus)
    - (GetStatus was called on a dictionary which is not labeled as an object. )
    - (Please use the operator clonedict if your intention is to clone a dictionary. ) join
    - (If a dictionary contains functions and is intended to be used as an object, ) join
    - (please use operator cvo to label it as an object) join message
    - /SetStatus /ObjectDictionaryExpected raiseerror
    - }
    - ifelse
    -
    -}
    -def
    -
    -/GetStatus [/dictionarytype] /GetStatus_dict load def
    -
    -
    diff --git a/lib/sli/processes.sli b/lib/sli/processes.sli
    deleted file mode 100644
    index b19eb2fea7..0000000000
    --- a/lib/sli/processes.sli
    +++ /dev/null
    @@ -1,1289 +0,0 @@
    -/*
    - *  processes.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: is_mpi - flag in statusdict indicating whether interpreter was compiled with MPI 
    -
    -Synopsis: statusdict/is_mpi :: -> boolean
    -
    -Description:
    -The C++ startup of a SLI interpreter which is not compiled with MPI support may 
    -be completely unaware of distributed computing and may therefore not define the /is_mpi 
    -flag. In order to simplify user code, processes.sli sets /is_mpi to false if it is
    -not defined.
    -
    -Author: Diesmann
    -
    -FirstVersion: 090412
    -
    -SeeAlso: statusdict
    -*/
    -statusdict /is_mpi known not {statusdict /is_mpi false put} if
    -
    -
    -%-----------------------------------------------------------------------+
    -%This will make the C++-Functions defined in file processes.h typesafe: |
    -%For a documentation of these functions, see file processes.h!          |
    -%-----------------------------------------------------------------------+
    -
    -% ---"waitPID"---
    -/waitPID_i_b /waitPID load def % rename waitPID to waitPID_ib             
    -
    -/waitPID trie
    -[/integertype /booltype] /waitPID_i_b load addtotrie
    -def
    -% ---------------
    -
    -% ----"kill"-----
    -/kill_i_i /kill load def % rename kill to kill_ii
    -/kill_i_l
    -{ 
    -  dup signaldict exch known         %do we know the name of the signal?
    -  {signaldict exch get kill_i_i}       %yes, so send it, using "kill_ii"
    -  {/kill /UnknownSignal raiseerror} %no, so raise error.
    -  ifelse
    -} bind
    -
    -def
    -/kill trie
    -[/integertype /integertype] /kill_i_i load addtotrie
    -[/integertype /literaltype] /kill_i_l load addtotrie 
    -def
    -% ---------------
    -
    -% ---"available"---
    -/available_is /available load def % rename available to available_is             
    -/available trie
    -[/istreamtype] /available_is load addtotrie
    -def
    -% ---------------
    -
    -% ---"mkfifo"---
    -/mkfifo_s /mkfifo load def % rename mkfifo to mkfifo_s             
    -/mkfifo trie
    -[/stringtype] /mkfifo_s load addtotrie
    -def
    -% ---------------
    -
    -% ---"setNONBLOCK"---
    -/setNONBLOCK_is_b /setNONBLOCK load def % rename setNONBLOCK to setNONBLOCK_Ib             
    -/setNONBLOCK trie
    -[/istreamtype /booltype] /setNONBLOCK_is_b load addtotrie
    -def
    -% ---------------
    -
    -% ---"fork"---
    -/fork_ /fork load def % rename fork to fork_             
    -/fork {
    -  % first check if forks are allowed:  
    -  statusdict /argv get First (/) breakup Last (sli) neq
    -  statusdict /have_mpi get
    -  and {% this is not a sli executable, and MPI has been linked!
    -    M_ERROR (fork) 
    -      (MPI has been linked to this executable, and MPI does not support forks.)
    -      (If you need system calls, you may either\n) join
    -      ( * call the "sli" executable (it is never linked to MPI), or\n) join
    -      ( * compile NEST without MPI support.) join message
    -    /fork /ForkDisallowed  raiseerror
    -  } if
    -
    -  fork_
    -
    -} bind def
    -% ---------------
    -
    -%---------------------------------------------------------------------------
    -
    -
    -/** @BeginDocumentation
    -
    -Name: spoon - execute a parallel SLI-process 
    -  
    -Synopsis: Command spoon -> Child_PID      %for parent process 
    -                        -> quit Command   %for child  process 
    -
    -Description: Basic process management: execute a parallel SLI-process
    -
    -Parameters: In:  Command (any): (However, Command is most likely to be a literal
    -                                 procedure...)
    -                                Command will be executed by the child process,
    -                                which will terminate after execution.  
    -                                It will be ignored by the parent process. 
    -            Out: For parent process: Child_PID (integer): The child's process-ID. 
    -                 For child  process: none. 
    -
    -Examples: { (I am the child!) = } spoon (I am the parent!) = 
    -         
    -          Try this several times. You will notice the child message to appear 
    -          before or after the parent message "by chance". (Even after the parent's
    -I-prompt...)
    -
    -Bugs: 
    -
    -Author: R Kupper
    -
    -FirstVersion: Mar 18 1999
    -
    -Remarks: A parallel process is forked.
    -         Parent and child will execute in parallel. There is no way to know which
    -         will start being executed first.
    -         Child inherits all open files, including stdin and stdout, from parent!
    -         If a SLI error is raised inside the child process, an error
    -         message is issued and the process is terminated, in oder not
    -         to leave two interactive SLI processes waiting for user
    -         input. A copy of the error message is printed to cerr, in
    -         case the standrad message stream M_OUT is redirected to a
    -         pipe (i.e. by the spawn command).
    - 
    -
    -Procedure: Call fork.
    -           Check if you are parent/child by test of (PID eq 0).
    -           If parent: discard (pop) Command, leave: (child)PID.
    -           If child : discard (pop) 0-PID, execute Command, quit.
    -
    -SeeAlso: fork
    -
    -*/
    -
    -/spoon
    -trie 
    -
    -[/anytype] %stack: Command
    -{
    -  fork %stack: Command PID.      (PID is 0 for child, Child_PID for parent)
    -  
    -  dup 0 eq %stack: Command PID true/false.
    -  
    -  % if child:
    -  {
    -    %stack: Command PID
    -    pop %stack: Command
    -    {exec} stopped %protect from errors!
    -    {% an error occured.
    -     % define error message:
    -       /errormessage
    -       (SLI CHILD PROCESS ) getPID cvs join
    -       ( CAUSED AN ERROR AND WILL BE TERMINATED:\n/) join
    -      errordict /errorname get
    -      % if it is a system error, get proper description:
    -      dup /SystemError eq {pop errordict /sys_errname get} if
    -      cvs join ( in ) join
    -      errordict /commandname get cvs join
    -      def
    -
    -      %print it:
    -      M_FATAL (spoon) errormessage message
    -      %print it again to cerr, in case other stream is redirected (spawn!)
    -      /M_OUT cerr def
    -      M_FATAL (spoon) errormessage message
    -    } if
    -    quit
    -  }
    -  % if parent:
    -  {
    -    %stack: Command PID
    -    exch pop %stack: PID.
    -  }
    -  ifelse
    -
    -} bind addtotrie
    -
    -def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: sysexec - Transfer control to a UNIX-command
    -
    -Synopsis: CommandArray  sysexec -> -
    -          CommandString sysexec -> -
    -
    -Description: Transfer control to a UNIX-Command. The command may be
    -             executed in a specified program environment. The command
    -             may be given either as a string containing the command
    -             name and all options, or as an array of strings,
    -             specifying the command name and every single option.
    -
    -	     Alternatives: Functions sysexec_a for arrays, sysexec_s
    -	     for strings (both undocumented) -> behaviour and synopsis 
    -	     are the same.
    -
    -Parameters: In : CommandArray
    -                 (array of strings): An array containing the command to execute.
    -                                     The first element is interpreted as the
    -                                     command, the remaining elements as it's
    -                                     parameters.
    -                 CommandString 
    -                 (string)          : A standard UNIX command string, containing
    -                                     the command name and it's parameters to
    -                                     execute.
    -
    -            Out: -whatever will be will be-
    -
    -Examples: These two calls are equivalent:
    -          1. [ (ls) (-l) (/home/kupper) ] sysexec
    -          2. (ls -l /home/kupper) sysexec
    -
    -          This call is NOT equivalent to the above (see remarks below):
    -          3. [ (ls) (-l /home/kupper) ] sysexec
    -
    -
    -          4. {(ls -l /home/kupper) sysexec} spoon
    -
    -          Look at the program environment of the new command:
    -          5. {(printenv) sysexec} spoon
    -          It was inherited from the SLI process.
    -          
    -
    -Bugs: Will break down if given an array containing non-strings.
    -      
    -      This call is NOT quivalent to example 3, as one should expect:
    -      (ls "-l /home/kupper") sysexec.
    -      The reason is the breakup-command not recognizing ".
    -
    -Author: R Kupper
    -
    -FirstVersion: Mar 18 1999
    -
    -Remarks: A call to sysexec WILL NOT RETURN, as control is literally transfered to
    -         the UNIX command.
    -
    -         Given an array of strings, each element is treated as -one- parameter.
    -         That's why example 3. is equivalent to the UNIX-call
    -         ls "-l /home/kupper".
    -
    -SeeAlso: spoon, breakup, environment
    -
    -*/
    -
    -/sysexec_s
    -{
    -  ( ) 0 trim ( ) breakup sysexec_a
    -} bind
    -def
    -  
    -/sysexec [/arraytype]  /sysexec_a load def
    -/sysexec [/stringtype] /sysexec_s load def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: wait - Wait for any child process to terminate
    -
    -Synopsis: NoHangFlag wait -> Status NormalExitFlag PIDout
    -                          -> 0   
    -
    -Description: Wait is the same as "waitPID", but it waits for any
    -             child process.
    -
    -	     Alternatives: Function wait_b (undocumented) -> behaviour and
    -	     synopsis are the same, except that no warnings or error
    -	     messages are thrown.
    -
    -Parameters: In : NoHangFlag(boolean): -see waitPID-
    -            Out: Status(integer)
    -                 NormalExitFlag(boolean)
    -                 PIDout(integer): -see waitPID-
    -
    -Examples: false wait %wait for the next child to terminate
    -
    -Bugs: 
    -
    -Author: R Kupper
    -
    -FirstVersion: Apr 23 1999
    -
    -Remarks: This is not a SLI-interface to the system's "wait()"-function,
    -          but a thin wrapper to waitPID. The behaviour is exactly the
    -          same, however.
    -
    -SeeAlso: waitPID, spawn, system, spoon, fork
    -
    -*/
    -
    -/wait_b
    -{
    -  -1 exch waitPID
    -} bind
    -def
    -
    -/wait trie
    -[/booltype] /wait_b load addtotrie
    -def
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: system - execute a UNIX command in a parallel process.
    -
    -Synopsis: CommandString              system }    { Flag=0 or omitted:
    -          CommandArray               system }    {  Status NormalExitFlag   
    -                                            } -> {
    -          CommandString Flag         system }    { Flag=1: -      
    -          CommandArray  Flag         system }    { 
    -                                            }    { Flag=2: ChildPID
    -          CommandString Flag Precode system }    
    -          CommandArray  Flag Precode system }
    -
    -Description: "system" creates a child process of the current SLI process
    -             and executes the given command in that child process.
    -             Depending on the value of "Flag", the parent process will
    -             wait for the child to terminate or continue execution in
    -             parallel.
    -             The command may be given either as a string containing
    -             the command name and all options, or as an array of
    -             strings, specifying the command name and every single
    -             option.
    -             If you are interested in communicating to the child process
    -             via pipes, see "spawn" or "shpawn".
    -
    -	     Alternatives: Functions system_as_i_p with array or
    -	     string and integer(flag) and precode, system_as_di_i_p 
    -	     with array or string and dictionary followed by
    -	     integer(flag) and precode (both undocumented) -> behaviour and
    -	     synopsis are the same.
    -
    -Parameters: In : CommandString(string)/CommandArray(array of string):
    -                      The UNIX command to execute.
    -                      Either a string containing the command and all
    -                      parameters, or an array of strings, containing the
    -                      command and the parameters in separate (see "sysexec").
    -
    -                 Flag: 0: Wait for termination of child process.
    -                           A flag indicating if the child process exited
    -                           normally or abnormally, and the exit status is
    -                           left on the stack.
    -                       1: Return immediately. This is the "no-care-mode".
    -                           An orphaned grandchild process is created.
    -                               I.e. a child is forked, which again forks
    -                           a child and then exits. The orphaned grandchild
    -                           is inherited by the init-process immediately,
    -                           which will perform any waiting.
    -                           This is a legal way of producing a child you don't
    -                           have to wait for. (However, see remarks below.)
    -                           - All ressources occupied by the child process will
    -                             be automatically released with its termination. -
    -                          No result is left on the stack.
    -                       2: Return immediately.
    -                           Create a normal child process and return immediately,
    -                           leaving it's PID on the stack.
    -                           ! The parent has to call "wait" or "waitPID" in order
    -                             to free the ressources occupied by the child process
    -                             after it's termination !
    -                      
    -                       The "Flag" parameter may be omitted in which case
    -                        it defaults to zero.
    -
    -                 Precode(executable procedure):
    -                       -This parameter is for internal use with the "spawn"
    -                        command. However, it is documented here for there may be 
    -                        unexpected applications.-
    -                       In "Precode" there can be supplied a sequence of SLI
    -                       commands that will be executed by the child process
    -                       prior to calling "sysexec". The main application
    -                       is to instruct the child process to redirect it's
    -                       standard input/output to a pipe, as does the "spawn"
    -                       command (for a example, see the code of "spawn").
    -
    -                       
    -            Out: NormalExitFlag(boolean):
    -                       True, if the child terminated normally, i.e. by a call to
    -                       exit() or by returning from main(). In that case, the exit
    -                       code is reported in the Status argument (see below).
    -                       False, if the child terminated due to a signal that was
    -                       not caught. In that case, the number of that signal is
    -                       reported in the Status argument (see below).
    -     	    
    -                 Status(integer):
    -                       If NormalExitFlag is true, this reports the child's exit
    -                       code, i.e. the low-order eight bits of the status argument
    -                       that the child passed to exit(), or the value the child
    -                       process returned from main().
    -                       If NormalExitFlag is false, this reports the number of the
    -                       signal that caused the termination of the child process.
    -                       Look up this number in signaldict, to know what it means.
    -
    -                 ChildPID(integer): The process ID of the newly created child.
    -
    -Examples: 1. (ls) system % This is the same as: (ls) 0 system
    -          2. (xterm) 1 system
    -          3. %The follwing asks SLI to make itself, do something else in parallel
    -             %and report make's exit code:
    -             (make --silent) 2 system /MyChild Set
    -             <do anything in parallel>
    -             MyChild false waitPID %wait for child to terminate
    -             pop pop (make returned exit code: ) =only =
    -
    -Bugs: Be aware of citation-mark-bug in breakup (see "breakup")
    -
    -Author: R Kupper
    -
    -FirstVersion: Apr 23 1999
    -
    -Remarks: The no-care-mode (Flag=2) gives no way to know about the
    -         child`s exit code. If you need to care about the exit code,
    -         use Flag=0, which will leave it on the stack, or use Flag=1
    -         and get the exit code by calling "wait" or "waitPID".
    -
    -         If you are interested in communicating to the child process
    -         via pipes, see "spawn" or "shpawn".
    -
    -To Do:   It should be possible to spawn a parallel SLI Process. This
    -         should be supported by a future version. Actually, as this is
    -         the more general case, the spoon/system/spawn chain of commands
    -         could be restructured. 
    -
    -SeeAlso: spawn, sysexec, spoon, fork, waitPID, wait, breakup, environment
    -
    -*/
    -
    -/system_as_i_p %as: array or string
    -{
    -  << >> begin % use local variables (for switch)
    -    /PreCode Set % Store pre-sysexec-code in PreCode
    -	/Flag Set % Store flag in /Flag
    -    %stack: CommStr
    -	mark
    -	Flag 0 eq { {sysexec} exch prepend % stack: {CommStr sysexec}
    -                /PreCode load prepend  % stack: {PreCode CommStr sysexec}
    -                spoon false waitPID pop
    -                end exit
    -              }
    -	case
    -	Flag 1 eq { {sysexec} exch prepend % stack: {CommStr sysexec}
    -                /PreCode load prepend  % stack: {PreCode CommStr sysexec}
    -                /a Set      % store { PreCode CommStr sysexec } in /a
    -                { {a} spoon } spoon false waitPID 3 npop % create orphaned child
    -                end exit
    -              }
    -	case
    -	Flag 2 eq { {sysexec} exch prepend % stack: {CommStr sysexec}
    -                /PreCode load prepend  % stack: {PreCode CommStr sysexec}
    -                spoon
    -                end exit
    -              }
    -	case
    -	{Flag end /system /FlagOutOfRange raiseerror}
    -	switchdefault
    -} bind
    -def
    -
    -% define trie structure:
    -/system [/arraytype                             ] {0 {} system_as_i_p} def
    -/system [/stringtype                            ] {0 {} system_as_i_p} def
    -
    -/system [/arraytype  /integertype               ] {  {} system_as_i_p} def
    -/system [/stringtype /integertype               ] {  {} system_as_i_p} def
    -
    -/system [/arraytype  /integertype /proceduretype] /system_as_i_p load def
    -/system [/stringtype /integertype /proceduretype] /system_as_i_p load def
    -
    -%-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: dup2 - Duplicate a filestream's file descriptor onto another's
    -
    -Synopsis: istream1 istream2 dup2 -> -
    -          ostream1 ostream2 dup2 -> -
    -
    -Description: "dup2" is a wrapper to the "dup2()" UNIX system call.
    -             This is a low-level file operation. It does not operate on
    -             filestreams, but on the underlying UNIX file descriptors.
    -             
    -             Operation:
    -              1. "dup2" gets the file descriptors fd1 and fd2, to which
    -                 the two streams are bound. (See remarks below!)
    -              2. System function dup2(fd1, fd2) is called. This means:
    -                  o If fd1 equals fd2, nothing is done.
    -                  o If not, the file associated with fd2, if any, is closed.
    -                    fd2 is then attached to the same file as fd1. It refers
    -                    to the same open file as fd1 and shares any locks.
    -                     Thus, the values of fd1 and fd2 stay unchanged, but
    -                    fd2 refers to a different file after the call.
    -                     Respectively, C++-stream2 stays unchanged in every
    -                    detail (buffer, value of undelying file descriptor, ...)
    -                    but is actually connected to a different file.
    -
    -             "dup2" will usually be called on "cin", "cout" or "cerr" after 
    -             a "fork" or "spoon" and prior to calling "sysexec". This is
    -             used to redirect the standard channels of the newly created
    -             process to a file, pipe or fifo. For a typical call see
    -             examples below.
    -              In a UNIX environment, each process expects the standard
    -             channels stdin, stdout, stderr to be associated to three 
    -             special file descriptors (usually 0, 1 and 2). Thus, if a parent
    -             process redirects one of these descriptors explicitely, a
    -             child process will inherit this redirection and read/write
    -             to a file when accessing cin/cout/cerr/clog WITHOUT
    -             NOTICING.
    -
    -	     Alternatives: Functions dup2_is_is for two istreams, 
    -	     dup2_os_os for two osstreams (both undocumented) 
    -	     -> behaviour and synopsis are the same.
    -
    -Parameters: In: i/ostream1: The stream to duplicate. This stream and it's
    -                            undelying filedescriptor will stay unchanged.
    -                i/ostream2: The stream to be re-directed. The file
    -                            associated to this stream will be closed, and
    -                            this stream will be associated to the same file
    -                            as i/ostream1.
    -
    -Examples: 1. myostream cout dup2 %subsequent writes to cout will be
    -                                 %redirected to myostream
    -          2. myistream cin  dup2 %subsequent reads from cin will read
    -                                 %from myinstream
    -          3. % The "dup2" in 1. would better be preceeded by a "flush":
    -             mystream cout flush dup2
    -          4. % A typical case: redirect output of a child process to a pipe.
    -             % (This is what the "spawn" command does):
    -             pipe %create a pipe
    -             {
    -               cout flush dup2 %The child redirects its cout to the
    -                               %write end of the pipe
    -               closeistream    %It closes the read end of the pipe, for
    -                               %it is not needed.
    -               (ls) sysexec    %The child transfers control to "ls".
    -                               %"ls" will write to it's cout, i.e., to
    -                               %the pipe.
    -             } spoon pop       %we are not interested in the child's PID...
    -             closeostream      %The parent closes the write end of the
    -                               %pipe, for it is not needed.
    -             % The parent may now read the output of "ls" from the read end
    -             % of the pipe.
    -
    -
    -Diagnostics: System Errors: EBADF (Invalid file descriptor)
    -                            EINTR (Function was interrupted by a signal)
    -
    -Bugs:
    -
    -Author: R Kupper
    -
    -FirstVersion: May 05 1999
    -
    -Remarks: This is a typesafe wrapper to "dup2_is_is" and "dup2_os_os"
    -         which operate on two input streams and two output streams
    -         respectively. The code for these functions can be found in
    -         file "synod2/sli/processes.{h|cc}".
    -
    -          It sure is not a bad idea to flush ostream2 prior to the
    -         call, as it will be connected to another file afterwards, but
    -         any buffered data stays unchanged!
    -
    -          Getting the file descriptors from C++-filestreams is not yet
    -         supported by a POSIX call. (There is such a call for C-filestreams,
    -         however). The code used here may be implementation dependent and
    -         not fully portable! As soon as there is a reliably portable way
    -         to detect file descriptors from a C++-filestream (or convert a C++
    -         stream to a C stream), the respective code found in function
    -         Processes::fd(), file "synod2/sli/processes.cc", should be changed.
    -
    -SeeAlso: pipe, mkfifo
    -
    -*/
    -/dup2 trie
    -[/istreamtype /istreamtype] /dup2_is_is load addtotrie
    -[/ostreamtype /ostreamtype] /dup2_os_os load addtotrie
    -[/istreamtype /ostreamtype] /dup2_is_os load addtotrie
    -[/ostreamtype /istreamtype] /dup2_os_is load addtotrie
    -def
    -
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: spawn - Spawn a UNIX process and redirect stdin and stdout.
    -
    -Synopsis: CommandString      spawn }    { Flag=0: Status NormalExitFlag	      
    -          CommandArray       spawn }    { 				        
    -                                   }    { Flag=1 or omitted:   		  
    -          CommandString      spawn } -> {           ear(write) mouth(read)
    -          CommandArray       spawn }    {				  
    -                                   }    { Flag=2:			  
    -          CommandString Flag spawn }    {  ChildPID ear(write) mouth(read)
    -          CommandArray  Flag spawn }
    -
    -Description: "spawn" does exectly what "system" does (see there).
    -             If Flag is 1 or 2, in addition, it redirects the spawned
    -             processes standard input and output to pipes that are then
    -             accesssible from the parent process.
    -             If you are interested in monitoring the information flow across
    -             the pipes, see "shpawn".
    -
    -	     Alternatives: Functions spawn_as_i with array or string
    -	     followed bey an integer (flag), spawn_as_di_i with array
    -	     or string and dictionary followed by an integer (both
    -	     undocumented) -> behaviour and synopsis are the same.
    -
    -Parameters: In : CommandString(string), CommandArray(array of string):
    -                     See "system"
    -
    -                 Flag(0|1|2)  (Default=1):
    -                   The Flag parameter is passed to "system":
    -                             0: "spawn" behaves absolut identical to
    -                                "system" (see documentation).
    -                  1 or omitted: "system" is called in no-care-mode
    -                                 (see documentation). Pipes to standard
    -                                 input and output of the new Process are
    -                                 established.
    -                             2: "system" is called with Flag=2.
    -                                 (see documentation). Pipes to standard
    -                                 input and output of the new Process are
    -                                 established. The Child's PID is returned,
    -                                 for the user has to call "waitPID" expli-
    -                                 citely.
    -
    -            Out: Status(integer), NormalExitFlag(boolean): See "system"
    -
    -                 ChildPID(integer): Process ID of the child process.
    -                                  Remember to call wait on this PID!
    -                 ear(ostream): The write end of the pipe that is connected
    -                            to the child's standard input. You can access
    -                            the child's standard input by writing to "ear".
    -                 mouth(istream): The read end of the pipe that is connected
    -                            to the child's standard output. You can access
    -                            the child's standard output by reading from "mouth".
    -
    -Examples: 1. %Spawn "ls" and read output from the pipe:
    -             (ls) spawn %spawn ls in no-care-mode
    -             exch closeostream %we do not need to write to ls!
    -             { eof {exit} {getline =} ifelse } loop %read and display data.
    -             closeistream %close connection
    -
    -          2. %Spawn "idl" and display output in SLI's callback cycle:
    -             (idl) spawn  %spawn IDL in no-care-mode
    -             /IDL_mouth Set
    -             /IDL_ear   Set
    -             %This procedure reads data from idl as long as it is available
    -             %and displays it on the screen:
    -             /IDL_talks
    -             {
    -               IDL_mouth
    -               { available 
    -                 {getline =}
    -                 {exit}
    -                 ifelse
    -               } loop pop
    -             } def
    -            %Hang this Procedure into callback cycle:
    -            /IDL_talks load setcallback
    -
    -            %You may now issue IDL commands by sending them to IDL_ear
    -            %Output will be displayed on the screen:
    -            IDL_ear (help, !VERSION, /STRUCT) <- endl
    -
    -          3.%Instead of using SLI's callback cycle to display the output,
    -            %we could have used a parallel SLI process instead:
    -            { IDL_mouth {getline =} loop } spoon
    -            %In this case we even don not care about blocking...
    -
    -Diagnostics: -see section "Bugs"-
    -
    -Bugs: No error message is raised, if Flag=1 or Flag=2 and the given
    -      UNIX-command does not exist. To be correct, an error -is- raised,
    -      but it is raised in a child process of SLI, and -after- standard
    -      output has been redirected. The error message can be read from
    -      the "mouth"-pipe!
    -      "spawn" always returns successful if Flag=1 or Flag=2. However,
    -      excution of the UNIX command may have failed in the child process.
    -      This may be a bug or a feature, whatever you like best ;->
    -
    -Author: R Kupper
    -
    -FirstVersion: May 06 1999 
    -
    -Remarks: "spawn" uses "system"'s Precode-Feature. (Caution - sophisticated
    -         programming style!!! ;->)
    -         For further remarks, see documentatin of "system".
    -
    -         If you are interested in monitoring the information flow across
    -         the pipes, see "shpawn".
    -
    -To Do:   In some cases, we will not need both the standard input and
    -         output redirected, but only one of them. In future versions,
    -         "spawn" may have the option to redirect only one of them.
    -         Respectively, there should by the option to redirect standard
    -         error as well. Possible calling sequence:
    -          command Flag stdinflag stdoutflag stderrflag spawn
    -         with stdinflag, stoutflag true as default, stderrflag false.
    -
    -         It should be possible to spawn a parallel SLI Process. This
    -         should be supported by a future version. Actually, as this is
    -         the more general case, the spoon/system/spawn chain of commands
    -         could be restructured. 
    -          
    -SeeAlso: system, pipe, available, wait, environment
    -
    -*/
    -
    -% We will use the following code at two positions, so we store it in two
    -% helper routines:
    -/:spawn_Open_pipes_define_Precode_call_system
    -{%stack: CommStr
    -  pipe %open up a pipe Parent>Child  stack: CommStr >read_end >write_end
    -  pipe %open up a pipe Parent<Child  stack: CommStr >read_end >write_end <read_end <write_end
    -  5 -1 roll %stack: >read_end >write_end <read_end <write_end CommStr
    -  Flag %stack: >read_end >write_end <read_end <write_end CommStr Flag
    -  {%Precode for system: This will be executed immediately before the "sysexec":
    -    cout flush dup2 %The child redirects its cout to the write end of the <pipe
    -    closeistream    %It closes the read end of the <pipe, for it is not needed.
    -    closeostream    %It closes the write end of the >pipe, for it is not needed.
    -    cin dup2        %The child redirects its cin to the read end of the >pipe
    -  }%end of precode
    -  %stack:  >read_end >write_end <read_end <write_end CommStr Flag Precode
    -  system %stack: >read_end >write_end <read_end <write_end results_of_system
    -} bind def
    -/:spawn_Open_pipes_define_Precode_call_system_withdict
    -{%stack: CommStr EnvDict
    -  pipe %open up a pipe Parent>Child  stack: CommStr EnvDict >read_end >write_end
    -  pipe %open up a pipe Parent<Child  stack: CommStr EnvDict >read_end >write_end <read_end <write_end
    -  6 -2 roll %stack: >read_end >write_end <read_end <write_end CommStr EnvDict
    -  Flag %stack: >read_end >write_end <read_end <write_end CommStr EnvDict Flag
    -  {%Precode for system: This will be executed immediately before the "sysexec":
    -    cout flush dup2 %The child redirects its cout to the write end of the <pipe
    -    closeistream    %It closes the read end of the <pipe, for it is not needed.
    -    closeostream    %It closes the write end of the >pipe, for it is not needed.
    -    cin dup2        %The child redirects its cin to the read end of the >pipe
    -  }%end of precode
    -  %stack:  >read_end >write_end <read_end <write_end CommStr EnvDict Flag Precode
    -  system %stack: >read_end >write_end <read_end <write_end results_of_system
    -} bind def
    -
    -
    -/spawn_as_i %as: array or string
    -{
    -  << >> begin % use local variables (for switch)
    -    %stack: CommStr Flag
    -    /Flag Set % Store flag in /Flag
    -    %stack: CommStr
    -
    -    mark
    -	Flag 0 eq {
    -                Flag system %flag==0 - just call "system"
    -                end exit
    -              }
    -	case
    -    Flag 1 eq { %flag!=0 - open up pipes, define precode, call "system"           
    -                :spawn_Open_pipes_define_Precode_call_system %call system with the precode. Flag==1, so it leaves no result.
    -                %stack: >read_end >write_end <read_end <write_end
    -                closeostream %Parent closes the write end of the <pipe, for it is not needed.
    -                %stack: >read_end >write_end <read_end
    -                3 -1 roll %stack: >write_end <read_end >read_end
    -                closeistream %Parent closes the read end of the >pipe, for it is not needed.
    -                %stack  : >write_end <read_end
    -                %that is: ear mouth
    -                end exit
    -              }
    -	case
    -	Flag 2 eq { %flag!=0 - open up pipes, define precode, call "system"
    -                :spawn_Open_pipes_define_Precode_call_system %call system with the precode. Flag==2, so PID is left as result.
    -                %stack: >read_end >write_end <read_end <write_end ChildPID
    -                5 1 roll %stack: ChildPID >read_end >write_end <read_end <write_end
    -                closeostream %Parent closes the write end of the <pipe, for it is not needed.
    -                %stack: ChildPID >read_end >write_end <read_end
    -                3 -1 roll %stack: ChildPID >write_end <read_end >read_end
    -                closeistream %Parent closes the read end of the >pipe, for it is not needed.
    -                %stack  : ChildPID >write_end <read_end
    -                %that is: ChildPID ear mouth
    -                end exit
    -              }
    -	case
    -	{Flag end /spawn /FlagOutOfRange raiseerror}
    -	switchdefault
    -  
    -} bind
    -def
    -
    -%define trie structure:
    -/spawn [/arraytype              ] {1 spawn_as_i} def
    -/spawn [/stringtype             ] {1 spawn_as_i} def
    -
    -/spawn [/arraytype  /integertype] /spawn_as_i load def
    -/spawn [/stringtype /integertype] /spawn_as_i load def  
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: shpawn - Spawn a UNIX process using a shell and redirect stdin and stdout.
    -
    -Synopsis: CommandString      shpawn }    { Flag=0: Status NormalExitFlag      
    -          CommandArray       shpawn }    {				        
    -                                    }    { Flag=1 or omitted:       	    
    -          CommandString Flag shpawn } -> {         ear(write) mouth(read)
    -          CommandArray  Flag shpawn }    {         			    
    -				         { Flag=2: ChildPID ear(write) mouth(read)
    -
    -Description: "shpawn" does the same as "spawn" does (see there).
    -
    -             However, the command is not executed directly but is passed
    -             to a shell which then will process the command.
    -             This way it is possible to use the full functionality of a
    -             shell, e.g. wildcard extension, alias, piping, ...
    -
    -             By default, /bin/sh is used as the shell binary, and a login
    -             shell is requested by giving the -l flag. These values can be
    -             changed in the options dictionary, see sections "Options" below.
    -
    -             In addition, the piping facility of the shell can be used to
    -             monitor the standard input and standard output of the
    -             invoked command. Monitoring can conveniently be turned on
    -             for stdin and stdout independently, via the options
    -             dictionary.
    -             See sections "Options" and "Remarks" below.
    -
    -Parameters: -see "spawn"-
    -
    -Options:
    -    Options-name: /shpawn
    -    
    -    Option            type        default   description
    -   ----------------  ----------  --------  ------------------------------
    -    /terminal         string      $TERM     Terminal command to be used for
    -                                            monitoring stdin and stdout.
    -
    -    /monitor-stdin    booltype    false     True, if the standard input of
    -                                            the invoked command shall be
    -                                            monitored in a terminal window.
    -
    -    /monitor-stout    booltype    false     True, if the standard output of
    -                                            the invoked command shall be
    -                                            monitored in a terminal window.
    -
    -    /sh-binary        string      (/bin/sh) Path to the shell binary to use.
    -                                            This binary must accept the flag -c
    -                                            for execution of a command.
    -
    -    /sh-flags         stringarray []        Flags added wehn calling the shell
    -                                            binary. Flags must be given as separate
    -                                            string elements (e.g. [(-l)].
    -                                            The array may be empty.
    -                                            The flag -c is automatically added
    -                                            to this list of flags by the routine.
    -                               
    -
    -
    -Examples: %try these examples with "spawn" as well to see the difference:
    -          1. (echo $PATH) 0 shpawn
    -          2. (rm synod2/lib/help/cc/*.hlp) 0 shpawn
    -          3. (ls | sort) 0 shpawn
    -
    -Diagnostics: -see "spawn"-
    -
    -Bugs: -see "spawn"-
    -
    -Author: R Kupper
    -
    -FirstVersion: May 19 1999
    -
    -Remarks: "shpawn" invokes "/sh-binary" from the options dictionary
    -         (/bin/sh by default) and passes the given command after
    -         a "-c" flag. This means the specified shell binary must
    -         support this -c flag.
    -
    -         The monitoring option for stdin and stdout exploits the
    -         piping deature of the shell, by piping information through
    -         instances of the "tee" command, which writes it to a file.
    -         (tee infile | command | tee outfile).
    -         These files are then monitored in separate subprocesses, using
    -         "tail" in a terminal window. The terminal command to be used is
    -         defined in the Options of shpawn.
    -         See manpages of sh, tee, tail, xterm/konsole for references.
    -         The monitoring option creates two files named
    -         /tmp/SLI-shpawn-monitor-stdin and /tmp/SLI-shpawn-monitor-stdout,
    -         which will persist after command execution terminated, so
    -         that their contents may be analyzed.
    -
    -SeeAlso: spawn, system, environment
    -
    -*/
    -
    -/shpawn <<
    -    /terminal (TERM) getenv not {false} if
    -    /monitor-stdin  false
    -    /monitor-stdout false
    -    /sh-binary      (/bin/sh)
    -    /sh-flags       []
    ->> Options
    -
    -%define a helper procedure:
    -/:shpawn_comarray_to_string
    -{ %stack: comarray
    -  dup 0 get exch %stack: command comarray           - Rem. Jun 21: Why that complicated? (Can't remember...)
    -  0 1 erase %stack: command optionarray             - Rem. Jun 21: Why not just turn the whole array into a string?
    -  {( ) exch join join} forall %stack: commandstring - Rem. Jun 21: leading or trailing blanks would -not- disturb the call!
    -  %stack: commandstring
    -} bind
    -def
    -
    -%define another helper routine:
    -/:shpawn_add_monitors
    -{ %stack: (commandstring)
    -  << >> begin %local vars
    -    /commandstring Set    
    -    commandstring    
    -    %stack: (commandstring)
    -
    -    /shpawn /monitor-stdin GetOption
    -    {%stack:
    -      (/tmp/SLI-shpawn-monitor-stdin) DeleteFile pop
    -      (touch /tmp/SLI-shpawn-monitor-stdin) system pop pop
    -      
    -      /shpawn /terminal GetOption
    -      ( -T ) join (STDIN:  ) commandstring join  ( ) (_) ReplaceOccurrences  join
    -      %stack: (commandstring) (konsole -T 'stdin: commandstring')
    -      ( -e tail --follow /tmp/SLI-shpawn-monitor-stdin) join
    -      %stack: (commandstring) (konsole -T 'stdin: commandstring' -e tail --follow /tmp/SLI-shpawn-monitor-stdin)
    -      1 system
    -      %stack: (commandstring)       
    -
    -      (tee /tmp/SLI-shpawn-monitor-stdin | ) exch join 
    -      %stack: (tee /tmp/SLI-shpawn-monitor-stdin | commandstring)
    -    } if  
    -
    -    %stack: (commandstring) OR (prepended commandstring)
    -    
    -    /shpawn /monitor-stdout GetOption
    -    {%stack: (ev. prepended commandstring)
    -      (/tmp/SLI-shpawn-monitor-stdout) DeleteFile pop
    -      (touch /tmp/SLI-shpawn-monitor-stdout) system pop pop
    -      
    -      /shpawn /terminal GetOption
    -      ( -T ) join (STDOUT:  ) commandstring join  ( ) (_) ReplaceOccurrences  join
    -      %stack: (ev. prepended commandstring) (konsole -T 'stdout: commandstring')
    -      ( -e tail --follow /tmp/SLI-shpawn-monitor-stdout) join
    -      %stack: (ev. prepended commandstring) (konsole -T 'stdout: commandstring' -e tail --follow /tmp/SLI-shpawn-monitor-stdout)
    -      1 system
    -      %stack: (ev. prepended commandstring)
    -      
    -      (| tee /tmp/SLI-shpawn-monitor-stdout) join    
    -      %stack: (ev. prepended commandstring | tee /tmp/SLI-shpawn-monitor-stdout)
    -    } if
    -
    -    %stack: (commandstring)
    -    % OR    
    -    %stack: (tee /tmp/SLI-shpawn-monitor-stdin | commandstring | tee /tmp/SLI-shpawn-monitor-stdout)
    -    % OR    
    -    % ...etc.
    -  end %local vars 
    -} bind def
    -
    -/:shpawn_create_command_and_flags
    -{
    -  /shpawn GetOptions begin
    -    sh-binary 1 arraystore
    -    sh-flags join
    -    (-c) append    
    -  end
    -} bind def
    -
    -
    -%define trie structure:
    -/shpawn [/arraytype] 
    -  { %stack: comarray
    -    :shpawn_comarray_to_string %stack: commandstring
    -    :shpawn_add_monitors
    -    :shpawn_create_command_and_flags exch append %stack: [(/bin/sh) (-c) commandstring]
    -    1 spawn_as_i
    -  } def
    -
    -/shpawn [/stringtype] 
    -  {
    -    :shpawn_add_monitors
    -    :shpawn_create_command_and_flags exch append 1 spawn_as_i
    -  } def
    -
    -/shpawn [/arraytype /integertype] 
    -  { exch %stack: flag comarray
    -    :shpawn_comarray_to_string %stack: flag commandstring
    -    :shpawn_add_monitors
    -    :shpawn_create_command_and_flags exch append %stack: flag [(/bin/sh) (-c) commandstring]
    -    exch spawn_as_i
    -  } def
    -
    -/shpawn [/stringtype /integertype] 
    -  {
    -    exch
    -    :shpawn_add_monitors
    -    :shpawn_create_command_and_flags exch append exch spawn_as_i
    -  } def
    -%END: define trie structure for shpawn.
    -
    -%----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -
    -Name: isatty - Determine if a stream is connected to a terminal.
    -
    -Synopsis: stream isatty -> false|true
    -
    -Description: Alternatives: Functions isatty_is for istreams, isatty_os
    -for osstreams (both undocumented) -> behaviour and synopsis are the same.
    -
    -Remarks: This is a wrapper to the POSIX kernel function istty().
    -
    -SeeAlso: ctermid
    -
    -*/
    -
    -/isatty [/istreamtype] /isatty_is load def
    -/isatty [/ostreamtype] /isatty_os load def
    -
    -
    -/** @BeginDocumentation
    -Name: taskset - Binds a process to a processor.
    -Synopsis:
    - proc pid taskset -> -
    -
    -Parameters:
    - proc - This integer value identifies a certain processing unit of the
    -        system the current job is running on. On a system with multi-core
    -        processors each core is assigned a different integer.
    - pid  - This integer value identifies the process that should be bound
    -        to the procesing unit proc.
    -
    -Description:
    -This function is a SLI interface to the UNIX command taskset.
    -
    -Author: Diesmann
    -FirstVersion: September 9th, 2006
    -SeeAlso: taskset_thisjob, Rank, NumProcesses
    -*/
    -
    -/taskset [/stringtype /integertype]
    -{
    - exch
    - osstream pop
    - (taskset -cp ) <-
    - exch <-
    - ( ) <-
    - exch <-
    - str system
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: taskset_thisjob - Binds the current process to a processor.
    -Synopsis:
    - proc taskset_thisjob -> -
    -
    -Parameters:
    - proc - This integer value identifies a certain processing unit of the
    -        system the current job is running on. On a system with multi-core
    -        processors each core is assigned a different integer.
    -
    -Description:
    -This function is a SLI interface to the UNIX command taskset.
    -The command is particularly useful for assigning the different jobs 
    -of a distributed simulation to different processors or computing cores 
    -independent of the MPI implementation used. Binding of jobs is helpful 
    -in benchmarking to quantify the effects of hardware shared by computing 
    -cores and the influence of the job scheduling og the operating system.
    - 
    -Examples:
    -Consider a particular computer system with 4 processors with 2 computing
    -cores each. The operating system assigns the identifiers 0 to 7
    -to the 8 cores starting with 0 for the first core on the first processor,
    -1 for the second core on the first processor, followed by 2 for the 
    -first core on the second processor, and so on. The task now is to
    -make sure that a distributed simulation with 4 MPI jobs uses only a 
    -single core on each processor. This can be achieved by inserting the 
    -following command as the first line of the simulation script:
    -
    -
    - [1 3 5 7] Rank get taskset_thisjob
    -
    -or alternatively,
    -
    - Rank 2 mul 1 add taskset_thisjob
    -
    -In this examples only odd core identifiers are used because it
    -is assumed that the operating system has a tendency to interrogate
    -core 0 for availability.
    -
    -Following this strategy more general schemes can be designed to 
    -minimize the use of shared hardware on the basis of the architecture 
    -of a given computer system.
    -
    -Author: Diesmann
    -FirstVersion: September 9th, 2006
    -SeeAlso: taskset, Rank, NumProcesses
    -*/
    -/taskset_thisjob [/stringtype]
    -{
    - getPID taskset
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: memory_thisjob - report virtual memory size for current NEST process
    -Synopsis:
    - memory_thisjob -> vmsize
    -
    -Description:
    -This function returns the virtual memory size (VmSize) for the current NEST
    -process by checking the /proc filesystem. VmSize is reported in kB. 
    -*/
    -
    -/memory_thisjob
    -{
    -  /os statusdict /hostos get def
    -
    -  mark 
    -  os (darwin) searchif { :memory_thisjob_darwin exit } case
    -  os (linux)  searchif { :memory_thisjob_linux  exit } case
    -  true { (I do not know how to check memory under ) os join M_ERROR message
    -          /memory_thisjob /UnknowOS raiseerror
    -          exit 
    -       } case
    -  switch 
    -} def
    -
    -/:memory_thisjob_linux
    -{
    - (/proc/) getPID cvs join (/status) join ifstream 
    - not
    - {
    -    (No information available on the NEST process from the /proc filesystem. ) M_ERROR message
    -    /memory_thisjob_linux /ProcOpenFailed raiseerror
    - }
    - if
    -
    - { eof {exit} {getline {dup (VmSize:) searchif {exch exit} {pop} ifelse } if} ifelse } loop
    -
    -
    - closeistream %close connection
    -
    - 0 7 erase 
    - size 3 sub 3 erase    % assuming kb  may be unsafe
    - cvi
    -} def
    -
    -/hardware_memory_thisjob
    -{
    -    (/proc/) getPID cvs join (/status) join ifstream
    -    not
    -    {
    -        (No information available on the NEST process from the /proc filesystem. ) M_ERROR message
    -	/hardware_memory_thisjob /ProcOpenFailed raiseerror
    -    }
    -    if
    -
    -    { eof {exit} {getline {dup (VmHWM:) searchif {exch exit} {pop} ifelse } if} ifelse } loop
    -
    -
    -    closeistream %close connection
    -
    -    0 6 erase
    -    size 3 sub 3 erase    % assuming kb  may be unsafe
    -    cvi
    -} def
    -
    -
    -% experimental, MD 090413
    -statusdict/exitcodes :: /restart_serial 4 put
    -
    -
    -
    -/** @BeginDocumentation
    -Name: nest_serial  - Returns a non-distributed call of nest as a string
    -
    -Synopsis:  (sli-filename) nest_serial -> (string with shell command)
    -
    -Description:
    -If NEST was compiled with MPI it may be unsafe to directly call the
    -binary to obtain a non-distributed version. The command nest_serial
    -looks up the appropriate way to call nest and returns a suitable
    -command as a string. If NEST was not compiled with MPI, it just
    -returns the absolute path to the "nest" executable, else it returns
    -the "mpirun" command with the -np 1 equivalent.
    -
    -Diagnostics:
    -This function issues an error if NEST was compiled with MPI but is not aware of 
    -a safe method to call a non-distributed version of nest.
    -
    -Examples:
    - (hello.sli) nest_serial -> (mpirun -mca btl self,tcp -np 1 /home/dummy/nest/bin/nest hello.sli)
    -
    -Author: Diesmann
    -
    -FirstVersion: 090711
    -
    -SeeAlso: nest_indirect
    -*/
    -/nest_serial
    -[/stringtype]
    -{
    - statusdict/have_mpi :: 
    - {
    -  1 exch
    -  (') statusdict/prefix :: (/bin/nest' ) join join exch
    -  mpirun
    - }
    - {
    -  (') statusdict /prefix get (/bin/nest' ) join join
    -  exch (') exch (') join join join
    - } ifelse 
    -} def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: nest_indirect  - Returns a nest call as a string able to spawn distributed simulations
    -
    -Synopsis:  (sli-filename) nest_indirect -> (string with shell command)
    -
    -Description:
    -If a task requires multiple distributed simulations with different
    -numbers of processors NEST needs to be compiled with support for distributed 
    -computing and be aware of the corresponding method to start itself. However,
    -some libraries for distributed computing do not support the nested call of 
    -further processes. Therefore, nest_indirect provides a serial environment 
    -for the preparation of the distributed simulations. If NEST was not compiled
    -with MPI, this function quits with fatal error, else it returns "sli".
    -
    -
    -Diagnostics:
    -This function quits nest with a fatal error if there is no support for 
    -distributed computing.
    -
    -Examples:
    - (hello.sli) nest_indirect -> (/home/dummy/nest/bin/sli hello.sli)
    -
    -Author: Diesmann
    -
    -FirstVersion: 090711
    -
    -SeeAlso: nest_serial
    -*/
    -/nest_indirect
    -[/stringtype]
    -{
    - statusdict/have_mpi :: not
    - {
    -  M_FATAL (nest_indirect) (The nest binary has no support for distributed computing.) message
    -  M_FATAL (nest_indirect) (Please recompile with e.g. MPI.) message
    -  statusdict/exitcodes/fatal :: quit_i
    - } if
    -
    - (') statusdict /prefix get (/bin/sli' ) join join
    - exch (') exch (') join join join
    -} def
    -
    diff --git a/lib/sli/ps-lib.sli b/lib/sli/ps-lib.sli
    deleted file mode 100644
    index ef94e858a8..0000000000
    --- a/lib/sli/ps-lib.sli
    +++ /dev/null
    @@ -1,188 +0,0 @@
    -/*
    - *  ps-lib.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%% Library for PS conforming operators which are not 
    -%% strictly needed by the startup process.
    -/** @BeginDocumentation
    -Name: array - construct array with n zeros (PS)
    -Synopsis: int array -> array
    -Examples: 10 array ->[0 0 0 0 0 0 0 0 0 0]
    -SeeAlso: Range, LayoutArray, Table, arraystore
    -*/
    -
    -/array trie
    -[/integertype]
    -{
    -  [] exch
    -  {
    -    0 append_a
    -  } repeat_
    -} bind addtotrie def
    -
    -
    -% PostScript's operator putinterval
    -%
    -% call:  array  integer array  putinterval array
    -%        string integer string putinterval string
    -%
    -/** @BeginDocumentation
    -Name: putinterval - replace sections of an array/string 
    -
    -Synopsis: string int string putinterval -> string
    -array int array putinterval -> array
    -
    -Examples:(hello) 2 (xx) putinterval -> (hexxo)
    -[1 2 3 4 5] 2 [(xx) 99] putinterval -> [1 2 (xx) 99 5]
    -
    -Author: docu by Sirko Straube
    -
    -References: Postscript language
    -
    -SeeAlso: getinterval
    -
    -*/
    -
    -/putinterval
    -{
    - size exch replace
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: trunc - Truncate decimals of a double
    -
    -Synopsis: double trunc -> int
    -
    -Examples: 3.123456 trunc -> 3
    -
    -Author: docu by Sirko Straube
    -
    -SeeAlso: floor, ceil
    -*/
    -
    -/trunc trie
    - [/doubletype] { int_d double_i } addtotrie
    -def 
    -
    -/** @BeginDocumentation
    -Name: round - Round double to the nearest integer
    -Synopsis: double round -> double
    -	integer round -> double
    -
    -Description: Alternatives: Function round_d (undocumented) 
    --> behaviour and synopsis are the same.
    -
    -Examples:
    -1.4 round  --> 1.0
    -1.5 round  --> 2.0
    -2   round  --> 2.0
    -
    -Remarks: 
    -round_d is currently defined in SLI,
    -could be implemented in C++ for efficiency.
    -
    -On 130610 it was decided that round applied to an integer
    -should be the identity function.
    -
    -Update: In a later discussion, it was decided to make round
    -return a double in this case as well.
    -
    -
    -Author: introduced non-trie-variant round_d, Ruediger Kupper.
    -
    -SeeAlso: iround, floor, ceil, cvi
    -*/
    -
    -/round trie
    - [/doubletype]  /round_d load addtotrie
    - [/integertype]  {cvd} addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: iround - Round and convert double to the nearest integer
    -Synopsis: double iround -> int
    -Description: 
    -Round the argument to the nearest integer and converts it to type int.
    -Examples: 
    -
    -Remarks: 
    -
    -Author: introduced non-trie-variant round_d, Ruediger Kupper.
    -
    -SeeAlso: iround, floor, ceil
    -*/
    -
    -
    -/iround_d {round_d int_d} bind def
    -/iround trie
    - [/doubletype]  /iround_d load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: ceil - Return nearest integer larger than or equal to the argument.
    -
    -Description: Alternatives: Function ceil_d (undocumented) 
    --> behaviour and synopsis are the same.
    -
    -Parameters:
    -The input argument must be of type integer or double.
    -The output argument has the same type as the input argument.
    -Examples: 2.87 ceil -> 3
    -1.001 ceil -> 2 
    -Remarks:
    -Note that for integer arguments, this function equals identity.
    -
    -Author: Ruediger Kupper, docu edited by Sirko Straube 
    -FirstVersion: 13.3.2003
    -SeeAlso: floor
    -*/
    -
    -/ceil trie
    - [/doubletype] /ceil_d load addtotrie
    - [/integertype] {} addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: floor - Return nearest integer smaller than or equal to the argument.
    -
    -Description: Alternatives: Function floor_d (undocumented) 
    --> behaviour and synopsis are the same.
    -
    -Parameters:
    -The input argument must be of type integer or double.
    -The output argument has the same type as the input argument.
    -Examples: 1.1 floor == -> 1
    -2.9 floor == -> 2
    -Remarks:
    -Note that for integer arguments, this function equals identity.
    -
    -Author: Ruediger Kupper, docu edited by Sirko Straube
    -FirstVersion: 13.3.2003
    -SeeAlso: ceil
    -*/
    -
    -/floor trie
    - [/doubletype]  /floor_d load addtotrie
    - [/integertype] {} addtotrie
    -def 
    -
    -
    diff --git a/lib/sli/regexp.sli b/lib/sli/regexp.sli
    deleted file mode 100644
    index dad779b682..0000000000
    --- a/lib/sli/regexp.sli
    +++ /dev/null
    @@ -1,532 +0,0 @@
    -/*
    - *  regexp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: regcomp - Create a regular expression 
    -Synopsis: string integer regcomp -> regex
    -          string         regcomp -> regex
    -Description:
    -regcomp will prepare a regular expression to be used with regexec.
    -Any allowed flags are found in dictionary regexdict.
    -Parameters: in:  string: defining the regular expression,
    -                 integer: flag, see Remarks. If in doubt, choose second
    -                          call of regcomp which presets integer to REG_EXTENDED.
    -           out:  the regular expression object
    -
    -Examples: 1) (.*) regcomp -> <regextype>
    -          2) regexdict begin 
    -             (\() REG_EXTENDED regcomp -> <ERROR>
    -Diagnostics: 
    -If the string cannot be converted to a regular expression,
    -an error message is displayed and /InvalidRegexError is raised.
    -
    -Variants:
    -The variant "regcomp_" never raises an error, but returns:
    - -> regex true
    - -> regex integer false
    -In case of an error, the regex error code is returned as an integer.
    -This error code can be translated to a string using ":regerror" (see there).
    -
    -Author: Diesmann & Hehl, R Kupper (added error handling)
    -
    -FirstVersion: 27.9.99
    -
    -Remarks: See man regcomp for futher details on POSIX regcomp.
    -
    -SeeAlso: regexec, :regerror
    -*/ 
    -
    -/regcomp [/stringtype /integertype]
    -{
    -  % The regcomp_ function does not itself raise an error.
    -  % In case of an error, it returns an error code and false.
    -  % This error code can be decoded by :regerror.
    -  %
    -  % Synopsis: string integer regcomp_ -> regex true  
    -  %                                      regex integer false
    -  %           string regcomp          -> regex true
    -  %                                      regex integer false
    -  regcomp_ not
    -  {
    -    :regerror % leaves a string on stack
    -    M_ERROR (regcomp) rolld message
    -    /regcomp /InvalidRegexError raiseerror
    -  } if
    -} def
    -
    -/regcomp [/stringtype] {regexdict /REG_EXTENDED get regcomp} def
    -
    -
    -/** @BeginDocumentation
    -Name: :regerror - return message of what went wrong with "regcomp_"
    -Synopsis: regex integer -> string
    -Description: :regerror will decode the integer error code and return the related 
    -      error description.
    -Parameters: in:  regex: a regular expression generated by "regcomp_"
    -                 integer code of what went wrong.
    -           out:  string of error description.
    -
    -Examples:  preparation: 
    -           (\() regcomp_     -> <regextype> 8 False
    -           pop
    -           now there's a wrong regex and an errorcode on the stack
    -           :regerror = -> Unmatched ( or \(
    -           
    -Bugs: no known ;-)
    -Diagnostics: no errors raised - this _is_ a command to check an error!
    -Author: Diesmann & Hehl
    -FirstVersion: 27.9.99
    -
    -Remarks:
    -See man regerror for further details on POSIX regerror.
    -Note that the command "regcomp" performs automatic error checking. You should
    -probably use "regcomp", not "regcomp_".
    -
    -SeeAlso: regexec, regcomp
    -*/ 
    -
    -/:regerror trie
    -  [/regextype /integertype] /regerror_ load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -
    -Name: regexdict - dictionary with flags and codes for regular expressions
    -Synopsis: -
    -Description: This dictionary provides flags and codes signaling 
    -    properties of or results from regular expression evaluations.
    -SeeAlso: regexec
    -*/
    -
    -/** @BeginDocumentation
    -Name: regexec - compare string and regular expression 
    -Synopsis: regex string integer integer -> array integer
    -          regex string 0       integer -> integer
    -
    -Description: regexec evaluates the given regular expression and looks whether it 
    -    is contained within a given string. It returns failure/success and the 
    -    offsets of the position where the regular expression was matched. 
    -    The same is true for any paranthesized subexpression: Those offsets are
    -    stored in an array up to the chosen depth.
    -    Flags and other codes REG_... are found in dictionary regexdict.
    -Parameters: in: string is the string where te regular expression should be 
    -                looked for; regex is a regular expression generated by regcomp
    -                first integer is the depth of paranthesized subexpression offsets
    -                that should be returned,
    -                second integer is a flag, for details see POSIX regexec
    -                (set to zero if in doubt!)
    -           out: integer is 0 if it matched, nonzero else (POSIX regexec error code)
    -                array: an array of [beginoffset,endoffset] arrays indicating
    -                the matches of the regex an any paranthesized subregexes within
    -                the string.
    - 
    -Examples:   1) (simple) regcomp -> <regextype>
    -               (   simple   ) 0 0 regexec -> 0  % this 0 indicating success
    -            2) (simple) regcomp -> <regextype>
    -               (   simple   ) 1 0 regexec -> [[3 9]] 0 
    -               % this 3,9 are begin and end offsets of matched regex!
    -            3) ((parenthesize)+.*example) regcomp -> <regextype>
    -               (This is a parenthesize using example) 2 0 regexec -> [[10 36] [10 22]] 0
    -               
    -            4) This is a more complex example showing how more and more parenthesized
    -               expressions are returned
    -               
    -               /rx (:(passed|result|error):([0-9]+):(.*):) regcomp def
    -               /st (:result:4:this is the result:) def
    -               
    -               rx st 0 0 regexec -> 0
    -               rx st 1 0 regexec -> [[0 29]] 0
    -               rx st 2 0 regexec -> [[0 29] [1 7]] 0
    -               rx st 4 0 regexec -> [[0 29] [1 7] [8 9] [10 28]] 0
    - 
    -Diagnostics: no errors raised
    -Author: Diesmann & Hehl
    -FirstVersion: 27.9.99
    -Remarks: See man regexec for further details on POSIX regexec.
    -SeeAlso: regexec, regcomp
    -*/ 
    -
    -/regexec trie
    - [/regextype /stringtype /integertype /integertype] /regexec_ load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: regex_find_sf - Check if a regex is included in a stream 
    -Synopsis: string istream -> boolean
    -Description: Takes the first argument. Converts to regex
    -   and calls regexec to find out if this regex matches the
    -   stream. Reports success/failure in a boolean true/false.
    -Parameters: in: first argument  : a string which will be converted
    -                                  to a regex by a regcomp call.
    -                second argument : an istream where this
    -                                  regex should be matched.
    -           out: true/false telling if there is/is no match. 
    -Examples: See examples of regex_find, exchange second string with a file.
    -Bugs: - 
    -Diagnostics: Will raise an /InvalidRegexError if regcomp cannot
    -    compile the regex. Try immidiate 
    -    :regerror = to find out why!
    -Author: Hehl
    -FirstVersion: 1.10.99
    -Remarks: Does _not_ return any information about the matched
    -         expression more than matched/not matched; use lower
    -         level commands regcomp, regexec if in need!
    -SeeAlso: regexec, regcomp, regex_replace
    -*/ 
    -
    -/regex_find_sf
    -{
    -   exch regcomp  
    -   exch regex_find_rf
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: regex_find_rf - Check if a regex is included in a stream 
    -Synopsis: regex istream -> boolean
    -Description: Takes the first argument. Calls regexec to find out
    -             if this regex matches the stream. Reports 
    -             success/failure in a boolean true/false.
    -Parameters: in: first argument  : a regex generated by regcomp
    -                second argument : an istream where this
    -                                  regex should be matched.
    -           out: true/false telling if there is a/is no match. 
    -Examples: See examples of regex_find, exchange second string with a file.
    -Bugs: - 
    -Diagnostics: no errors raised
    -Author: Hehl
    -FirstVersion: 1.10.99
    -Remarks: Does _not_ return any information about the matched
    -         expression more than matched/not matched; use lower
    -         level commands regcomp, regexec if in need!
    -SeeAlso: regexec, regcomp, regex_replace
    -*/ 
    -
    -/regex_find_rf
    -{
    -  << >> begin 
    -    /Where Set
    -    /TheRegex Set
    -    /regex_found false def
    -    { 
    -      Where getline not {pop exit} if
    -      exch pop TheRegex exch regex_find_r
    -      {/regex_found true def exit} if
    -    } loop
    -    regex_found
    -  end
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: regex_find_s - Check if a regex is included in a string
    -Synopsis: string string  -> boolean
    -Description: Takes the first argument. Converts to regex and calls
    -    regexec to find out if this regex matches the string. Reports
    -    success/failure in a boolean true/false.
    -Parameters: in: first argument  :a string which will be converted
    -                                 to a regex by a regcomp call.
    -                second argument : a string where this
    -                                  regex should be matched.
    -           out: true/false telling if there is/is no match. 
    -Examples: (hello) (is there a hello hiding) regex_find -> true
    -          (hello) (is there a HeLlO hiding) regex_find -> false
    -Bugs: - 
    -Diagnostics: Will raise an /InvalidRegexError if regcomp cannot 
    -             compile the regex. Try immidiate 
    -             :regerror = to find out why!
    -Author: Hehl
    -FirstVersion: 1.10.99
    -Remarks: Compiles regex and calls regex_find_s.
    -         Does _not_ return any information about the matched
    -         expression more than matched/not matched; use lower
    -         level commands regcomp, regexec if in need!
    -SeeAlso: regexec, regcomp, regex_replace
    -*/ 
    -
    -/regex_find_s
    -{
    -  exch regcomp 
    -  exch regex_find_r
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: regex_find_r - Check if a regex is included in a string
    -Synopsis: regex  string  -> boolean
    -Description: Takes the first argument and calls regexec to find out if
    -       this regex matches the string. Reports success/failure in a
    -       boolean true/false.
    -Parameters: in: first argument  : a regex generated by regcomp
    -                second argument : a string where this
    -                                  regex should be matched.
    -           out: true/false telling if there is/is no match. 
    -Examples: (hello) regexdict /REG_ICASE get regcomp pop
    -          (is there a HeLlO hiding)         regex_find -> true 
    -Bugs: - 
    -Diagnostics: no errors raised
    -Author: Hehl
    -FirstVersion: 1.10.99
    -Remarks: Does _not_ return any information about the matched
    -         expression more than matched/not matched; use lower
    -         level commands regcomp, regexec if in need!
    -SeeAlso: regexec, regcomp, regex_replace
    -*/ 
    -
    -/regex_find_r
    -{
    -  0 0 regexec
    -  0 eq {true}{false}ifelse
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: regex_find - Check if a regex is included in a string or stream 
    -Synopsis: string istream -> boolean
    -          string string  -> boolean
    -          regex  istream -> boolean
    -          regex  string  -> boolean
    -Description: Takes the first argument. Converts to regex, if
    -   necessary, and calls regexec to find out if this regex matches the
    -   string/stream. Reports success/failure in a boolean true/false.
    -Parameters: in: first argument  : a regex generated by regcomp
    -                               OR a string which will be converted
    -                                 to a regex by a regcomp call.
    -                second argument : an istream or a string where this
    -                                  regex should be matched.
    -           out: true/false telling if there is/is no match. 
    -Examples: (hello) (is there a hello hiding) regex_find -> true
    -          (hello) (is there a HeLlO hiding) regex_find -> false
    -          
    -          (hello) regexdict /REG_ICASE get regcomp pop
    -          (is there a HeLlO hiding)         regex_find -> true 
    -Bugs: - 
    -Diagnostics: If called with a string as first argument, will raise an
    -    /InvalidRegexError if regcomp cannot compile the regex. Try
    -    immidiate :regerror = to find out why!
    -Author: Hehl
    -FirstVersion: 1.10.99
    -Remarks: Does _not_ return any information about the matched
    -         expression more than matched/not matched; use lower
    -         level commands regcomp, regexec if in need!
    -SeeAlso: regexec, regcomp, regex_replace
    -*/ 
    -
    -/regex_find trie
    -  [/stringtype /istreamtype] /regex_find_sf load addtotrie
    -  [/regextype /istreamtype] /regex_find_rf load addtotrie
    -  [/stringtype /stringtype] /regex_find_s load addtotrie
    -  [/regextype /stringtype] /regex_find_r load addtotrie
    -def
    -
    -/regex_replace_sf
    -{
    -  4 -1 roll
    -  regcomp 
    -  4 1 roll regex_replace_rf
    -} bind def
    -
    -/regex_replace_rf
    -{
    -  << >> begin
    -    /DestFile Set
    -    /SourceFile Set
    -    /ReplaceString Set
    -    /TheRegex Set
    -    {
    -      SourceFile getline not {pop exit} if
    -      exch pop
    -      TheRegex ReplaceString 3 -1 roll regex_replace
    -      DestFile exch <- endl ;
    -    } loop
    -  end
    -} bind def
    -
    -/regex_replace_s
    -{  3 -1 roll
    -  regcomp 
    -  3 1 roll regex_replace_r
    -} bind def
    -
    -/regex_replace_r
    -{
    -  << >> begin
    -    /SourceString Set
    -    /ReplaceString Set
    -    /Regex Set
    -    /DestString () def
    -    {
    -      Regex SourceString 1 0 regexec 0 eq not
    -      {pop exit}
    -      { 
    -         0 get /offsets Set
    -         SourceString offsets 0 get 
    -         SourceString length offsets 0 get sub
    -         erase_s ReplaceString join_s
    -         DestString exch join /DestString Set
    -         SourceString 0 offsets 1 get erase_s
    -         /SourceString Set
    -      } ifelse
    -    } loop 
    -    DestString SourceString join_s
    -  end 
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: regex_replace - replace all occurences of a regex
    -Synopsis: string string istreamtype ostreamtype -> -
    -          regex  string istreamtype ostreamtype -> -
    -          string string string -> string
    -          regex  string string -> string
    -Description: regex_replace tries to match the regex in
    -  istream/string.  Any occurence of regex is replaced by 
    -  the given string.
    -Parameters: in: first argument  : a regex generated by regcomp
    -                               OR a string which will be converted
    -                                  to a regex by a regcomp call.
    -                second argument : the string with which regex should
    -                                  be replaced.
    -                third argument  : an istream or a string where this
    -                                  regex should be matched.
    -                fourth argument (if any): an ostream where the changes
    -                                  are saved.
    -           out: either a string or, if called with streams, the
    -                                ostream will now contain replaced stream.
    -
    -Examples: 
    -Bugs: 
    -Diagnostics: if called with a string as first argument, will raise an
    -   /InvalidRegexError if regcomp fails to compile a regex.
    -Author: Hehl
    -FirstVersion: 4.10.99
    -Remarks: 
    -SeeAlso: regexec, regcomp, regex_find
    -*/ 
    -
    -/regex_replace trie
    -  [/stringtype /stringtype /istreamtype /ostreamtype] 
    -    /regex_replace_sf load addtotrie
    -  [/regextype /stringtype /istreamtype/ostreamtype] 
    -    /regex_replace_rf load addtotrie
    -  [/stringtype /stringtype /stringtype] /regex_replace_s load addtotrie
    -  [/regextype /stringtype /stringtype] /regex_replace_r load addtotrie
    -def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: grep - extract lines matching a regular expression pattern
    -
    -Synopsis: 
    -               (filename) (expression) grep -> [(line1) (line2) ...]
    -[(string1) (string2) ...] (expression) grep -> [(match1) (match2) ...]
    -
    -Description:
    -"grep" is similar to the Unix command "grep".
    -It performs a regular expression match, either on the lines of a
    -file, or on the strings in an array of strings. A valid regular
    -expression must be passed as a string as second argument.
    -
    -"grep" returns an array of matching lines or strings. It returns the
    -full lines or strings that matched. If not match was found, the
    -empty array is returned.
    -
    -Parameters:
    -(filename)      - name of the file to search for the pattern
    -[(string1) ...] - array of strings to search for the pattern
    -[(match1)  ...] - result: array of matching strings
    -
    -Options: 
    -By default, "grep" uses extended regular expressions and performs
    -case sensitive matching on the single lines or strings. This
    -behaviour can be customized via the "SetOptions" command.
    -
    -"grep" has the following options that can be set via the
    -"SetOptions" command:
    -
    - /flags_regcomp (integer) - flags passed to the "regcomp" command.
    -                            Must be the logical AND of any of
    -                            regexdict::REG_{EXTENDED,ICASE,NOSUB,NEWLINE}.
    -                            Default: REG_EXTENDED
    -
    - /flags_regexec (integer) - flags passed to the "regexec" command.
    -                            Must be the logical AND of any of
    -                            regexdict::REG_{NOTBOL,NOTEOL}.
    -                            Default: 0
    -
    -Please read the Unix manpage for "regcomp" for explanation of these
    -flags.
    -
    -To perform case insensitive matches, add regexdict::REG_ICASE to
    -/flags_regcomp.
    -                           
    -Examples:
    -[(hello) (world)] (^hell)       grep -> [(hello)]
    -[(hello) (world)] (not in here) grep -> []
    -[(hello) (world)] ()            grep -> [(hello) (world)]
    -statusdict /prgdocdir get (LICENSE) joinpath (http) grep -> [(or visit https://www.nest-simulator.org)]
    -
    -Diagnostics:
    -Raises /InvalidRegexError if the expression string is not a valid
    -regular expression.
    -
    -Author: R Kupper
    -
    -FirstVersion: 23-jul-2008
    -
    -Availability: standard SLI
    -
    -References:
    -Unix manpage for "regcomp"
    -
    -SeeAlso: regex_find, regcomp, regexec, regexdict
    -*/
    -
    -/grep << /flags_regcomp regexdict/REG_EXTENDED ::
    -         /flags_regexec 0                         >> Options
    -
    -/grep[/stringtype /filename
    -      /stringtype /regexstr]
    -{
    -  /regex  regexstr  /grep /flags_regcomp GetOption  regcomp  def
    -  /result [] def
    -  
    -  filename (r) file
    -  {
    -    getline not {exit} if
    -    /line Set      
    -    regex line 0  /grep /flags_regexec GetOption  regexec
    -    0 eq {/result result line append def} if      
    -  } loop
    -  pop % the stream
    -  result  
    -} SLIFunctionWrapper
    -
    -/grep[/arraytype /a
    -      /stringtype /regexstr]
    -{
    -  /regex  regexstr  /grep /flags_regcomp GetOption  regcomp  def
    -  /result [] def
    -  
    -  a {
    -    /line Set      
    -    regex line 0  /grep /flags_regexec GetOption  regexec
    -    0 eq {/result result line append def} if      
    -  } forall
    -  result  
    -} SLIFunctionWrapper
    diff --git a/lib/sli/sli-init.sli b/lib/sli/sli-init.sli
    deleted file mode 100644
    index 0bed1dcaf4..0000000000
    --- a/lib/sli/sli-init.sli
    +++ /dev/null
    @@ -1,2263 +0,0 @@
    -/*
    - *  sli-init.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* 
    -    SLI Interpeter initalization
    -
    -*/
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%%%
    -%%%  Note on Dictionary Stack Initialization
    -%%% 
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -% At startup, two dictionaries are to be on the dictionary stack:
    -%
    -% userdict   <----
    -% systemdict
    -% 
    -% The interpreter first pushes the system dictionary. Since all
    -% modules have to be initialized in the system dictionary,
    -% the user dictionary can only be pushed once the bootstraping
    -% starts, i.e. at the beginning of this file.
    -% 
    -% The operator end will prevent these two dictionaries
    -% from being removed from the stack. This is according to PS.
    -%
    -% After userdict has been pushed, we have to activate
    -% systemdict in order to have all new operators defined in there.
    -%
    -userdict begin    % initialize DictStack. This begin has NO end!!
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -systemdict begin  
    -
    -%% Only initialize those type tries here which are
    -%% immediately needed. All others are loaded from
    -%% typeinit.sli at the end of this initialization.
    -
    -/** @BeginDocumentation
    - Name: length - counts elements of a container object
    - Synopsis: proc/literal/array/string/dict length -> int
    - Description:
    -   length counts type-dependent elements, e.g. characters of a string,
    -   entries of a dictonary, number of command of a procedure.
    -
    -   Alternatives: Functions length_p, length_lp, length_a, length_s, 
    -   length_d (documented:SeeAlso) 
    -
    - Parameters: 
    -   One of the types proc, literal, array, string, dict
    -   Returns integer with number of elements.
    - Examples: 
    -   (Hello world!)      length --> 12
    -   {(Hello world!) ==} length --> 2
    - Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: ??
    - SeeAlso: length_p, length_lp, length_a, length_s, length_d, capacity, size
    -*/ 
    -
    -/length trie
    -  [/proceduretype ]        /length_p  load addtotrie
    -  [/literalproceduretype ] /length_lp load addtotrie
    -  [/arraytype ]            /length_a  load addtotrie
    -  [/stringtype ]           /length_s  load addtotrie
    -  [/dictionarytype ]       /length_d  load addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: get - retrieve element indexed Object of a container
    - Synopsis:
    -  array/proc/litproc/string int --> obj
    -  dict literal                  --> obj
    -  dict array                    --> obj
    - Description:
    -   get will call the various typedependend get operators, returning
    -   the specified object. There are many possibilities for the
    -   combination of types, see examples.
    -
    -   Alternatives: Functions get_a for arrays, get_p for procedures,
    -   get_lp for literal procedures, get_s for strings, get_d and get_d_a
    -   for dictionaries (all undocumented) 
    -   -> behavior and synopsis are the same. 
    -
    - Parameters: 
    -   array/proc/litproc/string/dict is the container,
    -   int/literal is the index for the lookup.
    -   The object returned depends on the container contents.
    -
    -  For arrays it is also possible to use an array of indices.
    -  In this case, individual indices may appear more than once.
    -
    -  For dictionaries the interpretation of the array argument is identical to
    -  the one of the index array of operator Part. This is useful to extract
    -  data from nested dictionaries and arranging them for further numerical
    -  processing. The array elements are sequentially applied from left to right
    -  to the object resulting from the get operation of the previous element. 
    -  If an array element is itself an array, its elements are simultaneously
    -  applied to the argument and the result is an array of the same size.
    -  
    -  Applications of SLI like the NEST kernel may impliment variants
    -  of get to provide a homogeneous interface to further containers.
    -  
    - Examples: 
    -   (Hello World!)      0                  get --> 184
    -   [(Hello) 1 /a 12]   1                  get --> 1
    -   {(Hello World!) ==} 1                  get --> ==
    -   systemdict          /get               get --> +get+    
    -   [/a /b /c /d] [0 2]                    get -> [/a /c]
    -   << /a 3 /c 2 >>  /c                    get --> 2
    -   << /a 3 /c 2 >>  [/c]                  get --> 2
    -   << /a 3 /c 2 >>  [[/c]]                get --> [2]
    -   << /a 3 /c 2 >>  [[/c /a /a]]          get --> [2 3 3]
    -   << /a << /b 3 /c 2 >> >>  [/a /c]      get --> 2
    -   << /a << /b 3 /c 2 >> >>  [/a [/b /c]] get --> [3 2]
    -   
    - Author: Gewaltig, Diesmann
    - FirstVersion: ??
    -
    - SeeAlso: get_d, put, Part, getinterval
    -*/ 
    -
    -
    -/get_d_a
    -{
    - {
    -  dup type
    -  /arraytype eq  
    -  {                  % d a
    -   {                 % d l
    -    exch dup         % l d d
    -    rolld            % d d l
    -    get_d
    -   }
    -   Map exch pop
    -  }  
    -  {get_d}
    -  ifelse
    - }
    - forall
    -} def
    -
    -/get trie
    -  [/arraytype      /integertype] /get_a load addtotrie
    -  [/arraytype      /arraytype]   /get_a_a load addtotrie
    -  [/proceduretype  /integertype] /get_p load addtotrie
    -  [/literalproceduretype /integertype] /get_lp load addtotrie
    -  [/stringtype     /integertype] /get_s load addtotrie
    -  [/dictionarytype /literaltype] /get_d load addtotrie
    -  [/dictionarytype /arraytype] /get_d_a load addtotrie
    -def
    -
    -
    -
    -/** @BeginDocumentation
    - Name: put - put indexed object into container
    - Synopsis: 
    -           array/proc int any         --> array/proc
    -           array  array any           --> array
    -           string/array/proc int int  --> string/array/proc
    -           litproc int any            --> litproc
    -           dict literal any           --> -
    - Description:
    -   put will call appropriate typedepending put operator. The indexed
    -   object of the container will be replaced by the new one.
    -
    -   Alternatives: Functions put_a for arrays, put_p for procedures,
    -   put_lp for literal procedures, put_s for strings (all undocumented)
    -   and put_d for dictionaries (SeeAlso) 
    -   -> behaviour and synopsis are the same. 
    -
    -
    - Parameters: 
    -    First parameter is the container,
    -    Second the index,
    -    third the object to put.
    -    The modified container is returned.
    - Examples: 
    -   (Hello Wxrld!)      7 111    put --> (Hello World!)
    -   [(Hello) 1 /a 12]   2 /here  put --> [Hello 1 here 12]
    -   [[1 2][3 4]]    [1 1] 6      put --> [[1 2] [3 6]]
    -   {(Hello World!) ==} (Bye!) 1 put --> {(Bye!) ==}
    -   systemdict          /MyLit 5 put --> -  % MyLit equals integer 5 now!    
    - 
    - Author: Gewaltig, Diesmann
    - FirstVersion: ??
    - Remarks: Commented Hehl April 21, 1999
    - 
    - SeeAlso: get, put_d
    - 
    -*/ 
    -
    -
    -/put trie
    -  [/arraytype            /integertype  /integertype]  /put_a     load addtotrie
    -  [/arraytype            /arraytype    /anytype ]     /put_a_a_t load addtotrie
    -  [/arraytype            /integertype  /anytype ]     /put_a     load addtotrie
    -  [/literalproceduretype /integertype  /anytype]      /put_lp    load addtotrie
    -  [/dictionarytype       /literaltype  /anytype]      /put_d     load addtotrie
    -  [/proceduretype        /integertype  /anytype ]     /put_p     load addtotrie
    -  [/stringtype           /integertype  /integertype]  /put_s     load addtotrie
    -
    -% The following seemingly redundant definitions fix a deficiency of /anytype
    -% We must manually add the functions to the branches which have specific types 
    -  [/arraytype            /arraytype    /integertype ] /put_a_a_t load addtotrie
    -  [/arraytype            /arraytype    /doubletype ]  /put_a_a_t load addtotrie
    -  [/proceduretype        /integertype  /integertype ] /put_p     load addtotrie
    -  [/proceduretype        /integertype  /doubletype ]  /put_p     load addtotrie
    -  [/literalproceduretype /integertype  /integertype]  /put_lp    load addtotrie
    -  [/literalproceduretype /integertype  /doubletype]   /put_lp    load addtotrie
    -  [/dictionarytype       /literaltype  /integertype]  /put_d     load addtotrie
    -  [/dictionarytype       /literaltype  /doubletype]   /put_d     load addtotrie 
    -def
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% Initialize Error Dictionary
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -/init_errordict
    -{
    -  errordict /recordstacks true  put_d %% Enable stack snapshot on error
    -  errordict /newerror     false put_d %% Initialize
    -  errordict /commandname    () put_d
    -  errordict /oldcommandname () put_d
    -  errordict /olderrorname   () put_d
    -  errordict /oldestack      () put_d
    -  errordict /estack [ ] put_d
    -  errordict /dstack [ ] put_d
    -  errordict /ostack [ ] put_d
    -} def
    -
    -init_errordict 
    -
    -/raiseerror trie
    -  [/literaltype /literaltype] /raiseerror load addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: bind - recursively replaces executable operator names by their values.
    - Synopsis: proc bind --> proc
    - Description:
    -   bind iterates through the given procedure object and replaces names which are bound to
    -   tries or functions by their values.
    -   bind works recursively and processes any nested procedure object it encounters.
    -   bind uses the current dictionary context to perform its operation. Thus, changing
    -   the dictionary context after bound was applied has no effect on the name-lookup 
    -   of operators during the execution of the procedure.
    -
    -   bind removes some execution overhead which is due to name-lookup. Thus, a bound procedure
    -   executes 10%-50% faster.
    -
    - Parameters: proc - procedure to be bound
    - Examples: {1 2 add} bind --> {1 2 +add+}
    -             if you know the arguments are integer,
    -             {1 2 add_ii} will be the fastest choice, but there will be no
    -             sli-level typechecking any more!
    -  Bugs: 
    - Author: Gewaltig
    - FirstVersion: ???
    - Remarks: Commented Hehl April 20, 1999
    -  compare RedBook 2nd ed. page 370
    - SeeAlso: trie, addtotrie
    -*/ 
    -
    -/bind
    -{
    -  0 1 2 index length 1 sub_ii
    -  {
    -    2 copy 
    -    get dup 
    -    type /nametype eq
    -    {
    -      cvlit_n lookup
    -      {
    -        dup type dup
    -        /functiontype eq exch /trietype eq or 
    -        { put }{ pop pop } ifelse
    -      } 
    -     { pop } ifelse
    -    }
    -    {
    -      dup type dup
    -      /literalproceduretype eq exch 
    -      /proceduretype  eq
    -      or
    -      { bind put } { pop pop } ifelse
    -    } ifelse
    -  } for
    -} def
    -/bind dup load bind def
    -
    -/** @BeginDocumentation
    - Name: = - Print object to screen.
    - Synopsis: any = --> -
    - Description:
    -   Displays topmost operand stack object and pops it. In contrast to
    -   == operator, = will only give part of the information if the object
    -   is not of simple kind (for example, there's no difference for
    -   integers, but there is one for procedures!)
    - Parameters: any
    - Examples: 
    - SLI ] 12 =
    - 12
    - SLI ] {1211} =
    - <proceduretype>
    - SLI ]
    -
    - Author: Gewaltig, Diesmann
    - FirstVersion: ???
    - Remarks: Commented Hehl April 20, 1999
    -  compare RedBook 2nd ed. page 362
    - SeeAlso: ==, =only, ==only
    -*/ 
    -
    -/=
    -{ 
    -   cout exch <- endl ;
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: == - Print object to screen in syntax-form.
    - Synopsis: any == --> -
    - Description:
    -   Displays topmost operand stack object and pops it. In contrast to
    -   = operator, == will try to represent any printable object, not only
    -   objects of simple kind (for example, there's no difference for
    -   integers, but there is one for procedures!)
    - Parameters: any
    - Examples: 
    - SLI ] 12 ==
    - 12
    - SLI ] {1211} ==
    - {1211}
    - SLI ]
    -
    - Author: Gewaltig, Diesmann
    - FirstVersion: ???
    - Remarks: Commented Hehl April 20, 1999
    -  compare RedBook 2nd ed. page 362
    - SeeAlso: =, =only, ==only
    -*/ 
    -
    -/==
    -{ 
    -   cout exch <-- endl ;
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: =only - Print object to screen without linefeed
    - Synopsis: any =only --> -
    - Description: like =, but without a linefeed.
    - Parameters: any
    - Examples: 
    - SLI ] 12 =only
    - 12SLI ] {1211} =only
    - <proceduretype>SLI ]
    -             
    - Author: Gewaltig, Diesmann
    - FirstVersion: ???
    - Remarks: Commented Hehl April 20, 1999
    -  compare RedBook 2nd ed. page 362
    - SeeAlso: =, ==, ==only
    -*/ 
    -
    -/=only
    -{ 
    -   cout exch <- ;
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: ==only - Print syntax form of object to screen without linefeed
    - Synopsis: any ==only --> -
    - Description: like ==, but without linefeed
    - Parameters: any
    - Examples: 
    - SLI ] 12 ==only
    - 12SLI ] {1211} ==only
    - {1211}SLI ]
    - 
    - Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: ???
    - Remarks: Commented Hehl April 20, 1999
    -  compare RedBook 2nd ed. page 362
    - SeeAlso: =, ==, =only
    -*/ 
    -
    -/==only
    -{ 
    -   cout exch <-- ;
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: stack - Display operand stack
    - Synopsis: stack --> - 
    - Description:
    -   Displays operand stack using = operator on each object.
    - Parameters: -
    - Examples: 1 2 3 stack 
    -         --> 3
    -             2
    -             1
    -           {123} stack --> <proceduretype>  
    - Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: ???
    - Remarks: Commented Hehl April 20, 1999
    -  compare RedBook 2nd ed. page 522
    - SeeAlso: pstack, typestack, =, ==
    -*/ 
    -
    -/stack
    -{
    -  0 1 count 3 sub_ii
    -  {
    -    index
    -    =
    -  }
    -  for
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: typestack - Display types of operand stack
    - Synopsis: typestack --> - 
    - Description:
    -   Displays operand stack, showing Type as well as value of each object.
    - Parameters: -
    - Examples: {1} {2} {3} typestack 
    -proceduretype:{3}
    -proceduretype:{2}
    -proceduretype:{1}
    -
    - Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: ???
    - Remarks: Commented Hehl April 20, 1999
    - SeeAlso: stack, pstack, =, ==
    -*/ 
    -
    -/typestack
    -{
    -  0 1 count 3 sub_ii
    -  {
    -    index
    -    dup type =only (:) =only ==  
    -  }
    -  for
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: pstack - Display operand stack in syntax form.
    - Synopsis: pstack --> - 
    - Description:
    -   Displays operand stack using == on each object.
    - Parameters: -
    - Examples: {1} {2} {3} stack 
    -         --> {3}
    -             {2}
    -             {1}
    - Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: ???
    - Remarks: Commented Hehl April 20, 1999
    -  compare RedBook 2nd ed. page 465
    - SeeAlso: stack, typestack, =, ==
    -*/ 
    -
    -/pstack
    -{
    -  0 1 count 3 sub_ii
    -  {
    -    index
    -    ==
    -  }
    -  for
    -} bind def
    -
    -
    -/** @BeginDocumentation
    -Name: pick - copy element from stack level n
    -Synopsis: on ..ok .. o0 k pick -> on ..ok .. o0 ok
    -Examples: 1 2 3 4 5 6 7 3 pick -> 4
    -SeeAlso: over, index
    -*/
    -/pick /index load def 
    -
    -%% Routines for benchmarking
    -%% ptimes, realtime, usertime, systemtime, tic, toc
    -
    -/** @BeginDocumentation
    - Name: ptimes - returns real, user, and system time
    - Synopsis:  ptimes -> [rtimes utimes stimes cutimes cstimes] 
    - Description: 
    - Calls the POSIX times() function to obtain real, user,
    - and system time in seconds, as well as user and system times
    - counts for all child processes.  Real time has arbitrary origin,
    - i.e., only differences are meaningful.
    -
    - Remarks: results for user and system time may not be reliable if more
    - than one thread is used.
    -
    - Author: Hans Ekkehard Plesser
    - FirstVersion: 2003-07-29
    - References: man 2 times
    - SeeAlso: realtime, usertime, systemtime, tic, toc, pclockspersec, pclocks
    -*/ 
    -/ptimes
    -{
    -  pclocks pclockspersec cvd div
    -} def
    -
    -/** @BeginDocumentation
    - Name: realtime - returns realtime 
    - Synopsis:  realtime -> rtime
    - Description: 
    - Calls the POSIX times() function to obtain real time in seconds. 
    - Real time has arbitrary origin, i.e., only differences are meaningful.
    -
    - Author: Hans Ekkehard Plesser
    - FirstVersion: 2003-07-29
    - References: man 2 times
    - SeeAlso: ptimes, usertime, systemtime, tic, toc, pclockspersec, pclocks
    -*/ 
    -/realtime
    -{
    -  ptimes 0 get 
    -} def  
    -
    -/** @BeginDocumentation
    - Name: usertime - returns usertime for current process 
    - Synopsis:  usertime -> utime
    - Description: 
    - Calls the POSIX times() function to obtain usertime for the current
    - process in seconds.  The value might not be meaningful if more than
    - one thread is used.
    -
    - Author: Hans Ekkehard Plesser
    - FirstVersion: 2003-07-29
    - References: man 2 times
    - SeeAlso: ptimes, realtime, systemtime, tic, toc, pclockspersec, pclocks
    -*/ 
    -/usertime
    -{
    -  ptimes 1 get 
    -} bind def  
    -
    -/** @BeginDocumentation
    - Name: systemtime - returns system time for current process 
    - Synopsis:  systemtime -> stime
    - Description: 
    - Calls the POSIX times() function to obtain system time for the current
    - process in seconds.  The value might not be meaningful if more than
    - one thread is used.
    -
    - Author: Hans Ekkehard Plesser
    - FirstVersion: 2003-07-29
    - References: man 2 times
    - SeeAlso: ptimes, realtime, systemtime, tic, toc, pclockspersec, pclocks
    -*/ 
    -/systemtime
    -{
    -  ptimes 2 get 
    -} bind def  
    -
    -
    -/** @BeginDocumentation
    - Name: tic - start timing script execution
    - Synopsis:  tic -> -
    - Description: 
    - Records the current real time obtained from the POSIX times() function
    - as starting point for timing script execution.  
    -
    - Author: Hans Ekkehard Plesser
    - FirstVersion: 2003-07-29
    - SeeAlso: toc, realtime, ptimes
    -*/ 
    -/tic
    -{
    - systemdict begin
    -   /:tictime realtime def
    - end
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: toc - Return wall clock time elapsed since tic was called.
    - Synopsis:  toc -> runtime
    - Description: 
    - Determines the wall clock (real) time elapsed since tic was called
    - last, in seconds.  Resolution is given by pclockspersec.
    -
    - Author: Hans Ekkehard Plesser
    - FirstVersion: 2003-07-29
    - SeeAlso: tic, realtime, ptimes, pclockspersec, clic, cloc
    -*/
    -/toc
    -{
    - systemdict begin
    -  realtime :tictime sub_dd 
    - end
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: clock - returns realtime 
    - Synopsis:  clock -> double
    - Description: 
    - Same as realtime, for backward compatibilty only.
    -
    - Author: Hans Ekkehard Plesser
    - FirstVersion: 2003-07-29
    - SeeAlso: realtime
    -*/ 
    -/clock { realtime } bind def
    -
    -/** @BeginDocumentation
    - Name: sleep - Pauses current process.
    - Synopsis:  t sleep -> -
    - Description: 
    -  Pauses the process for t seconds. t can be integer or double.
    -  Resolution is given by pclockspersec.
    - Examples:
    -  5 sleep %wait for 5 seconds
    -  tic 2.75 sleep toc = %should print 2.75
    - Author: Schrader
    - SeeAlso: realtime, tic, toc, ptimes, pclockspersec, clic, cloc
    -*/
    -
    -/sleep trie
    -  [/integertype] { cvd sleep_d } bind addtotrie
    -  [/doubletype]  /sleep_d load addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: ms2hms - Convert milliseconds to an array  [h min sec].
    - Synopsis: ms ms2hms -> [h min sec]
    - Converts the given number of milliseconds into
    - an array containing the corresponding number
    - of hours minutes and seconds
    - SeeAlso: tic, toc
    -*/
    -
    -/ms2hms
    -{
    - << >> begin
    -  1000.0 div /sec exch def
    -  sec cvi 3600 div /hours exch def
    -  sec hours 3600 mul sub /sec exch def % remainder
    -  sec cvi 60 div /min exch def
    -  sec min 60 mul sub /sec exch def % remainder
    -  hours min sec 3 arraystore
    - end
    -} bind def
    -
    -%% clic/cloc can be used to measure the number of
    -%% milliseconds per interpreter cycle.
    -%% The result includes also the cycles taken up by the 
    -%% involved routines.
    -
    -/** @BeginDocumentation
    -  Name: clic - Start measuring interpreter cycles.
    -  Description:	    
    -  clic/cloc can be used to measure the number of
    -  milliseconds per interpreter cycle.
    -  The result includes also the cycles taken up by the 
    -  SeeAlso: cloc, tic, toc
    -*/
    -/clic
    -{ 
    - systemdict begin
    -  /:cliccycles cycles def   
    - end
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: cloc - Return elapsed interpreter cycles since clic was called.
    - SeeAlso: clic, tic, toc
    -*/
    -
    -/cloc
    -{
    - systemdict begin
    -  cycles :cliccycles sub_ii :clicclocs sub_ii 
    - end
    -} bind def
    -
    -%% Calibrate offset imposed by clic/cloc
    -/:clicclocs 0 def
    -/:clicclocs clic cloc def
    -
    -/** @BeginDocumentation
    - Name: reset - Reset the SLI interpreter
    - Description:
    - reset re-initializes most of the SLI interpreter by clearing the operand stack, the dictionary stack, 
    - and the userdict. reset also clears the error state.
    - Non-standard symbols and data defined in any of the other dictionaries, such as the statusdict or systemdict remain unchanged.
    - 
    - SeeAlso: ResetKernel
    -*/
    -
    -/reset
    -{
    -  errordict /new_error false put_d 
    -  init_errordict
    -  clear % operand stack
    -  cleardictstack
    -  userdict cleardict
    -} bind def
    -
    -
    -
    -% ******************************
    -% * Dictionary Query Functions
    -% * 
    -
    -/** @BeginDocumentation
    -
    -   Name: who - list contents of  the top-level dicitonary
    -
    -   Synopsis: who -> -
    -
    -   Description:
    -     who prints the contents of the current top-level dictionary
    -     to the standard output.
    -
    -   Remarks: taken from Matlab. 
    -            The listing would be more legible with a pager. If you
    -            want to pass the output to a stream, use topinfo_d instead.
    -
    -   Author: Gewaltig
    -
    -   SeeAlso:  info_ds, dictstack, info, topinfo_d, who
    -*/
    -
    -/who
    -{
    -  cout topinfo_d
    -} bind def
    -
    -/** @BeginDocumentation
    -
    -   Name: whos - list contents of all dictionaries on the dicitonary stack
    -
    -   Synopsis: whos -> -
    -
    -   Description:
    -     whos prints the contents of all dictionaries which are cunnrently
    -     on the dictionary stack to the standard output. 
    -     Dictionaries are printed from bottom to top, i.e. 
    -     systemdict then userdict and then all additional dictionaries (if any).
    -
    -   Remarks: taken from Matlab. 
    -            The listing would be more legible with a pager. If you
    -            want to pass the output to a stream, use info_ds instead.
    -
    -   Author: Gewaltig
    -
    -   SeeAlso:  info_ds, dictstack, info, topinfo_d, who
    -*/
    -
    -/whos
    -{
    -  cout info_ds
    -} bind def
    -
    -% * dict info
    -% * Prints the contents of the given dictionary
    -% * This one is documented in slidict.cc
    -
    -/info trie 
    -[/dictionarytype]
    -{
    -  cout exch info_d
    -} bind addtotrie
    -[/arraytype]
    -{
    -  /dictarray Set
    -  dictarray length 1 eq dictarray 0 get type /dictionarytype eq and
    -  {
    -    dictarray 0 get cout exch info_d
    -  }
    -  {
    -    (Argument of info must be a single element array containing a dictionary) M_ERROR message
    -  } ifelse
    -} bind addtotrie
    -[/trietype]
    -{
    -  cout 
    -(This type trie contains the following overloaded functions:\n\n) <- 
    -  exch trieinfo_os_t
    -} bind addtotrie def
    -
    -%%
    -%% Conversion Operators
    -%%
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% PostScript style conversion to string
    -%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -/** @BeginDocumentation
    - Name: cvs - Convert object to string
    - Description: cvs converts every object into a string
    - Examples: 23 cvs -> (23)
    - {3 2 mul dup} cvs -> (<proceduretype>)
    - (hello) cvs -> (hello)
    - Author: docu by Sirko Straube
    - SeeAlso: pcvs, print, pprint, cst, cva, cv1d, cv2d, cvd, cvi, cvlit, cvn, cvt_a
    -*/
    -/cvs
    -{
    - ostrstream pop  % unsafe, better check boolean
    - exch
    - <-
    - str
    -} bind def
    -
    -/** @BeginDocumentation
    - Name: pcvs - Convert object to string (long version)
    - Description: pcvs converts every object into a string (long version)
    - Examples: 23 pcvs -> (23)
    - {3 2 mul dup} pcvs -> ({3 2 mul dup})
    - (hello) pcvs -> ((hello))
    - Author: R Kupper by copy-and-modify from cvs
    - SeeAlso: cvs, print, pprint
    -*/
    -/pcvs
    -{
    - ostrstream pop  % unsafe, better check boolean
    - exch
    - <--
    - str
    -} bind def
    -
    -
    -/** @BeginDocumentation
    - Name: cvs_f - Formatted conversion of double to string 
    - 
    - Synopsis:
    - x q cvs_f -> str
    - x [p q] cvs_f -> str
    -
    - Description: 
    -
    - x q cvs_f -> str 
    - converts a double (or integer) number x into a string str with a specified number q of digits after the decimal point
    -
    - x [p q] cvs_f -> str
    - puts in addition p minus IntegerPart(x) zeros in front of the string (nothing happens if p is smaller than the length of x's integer part).
    -
    - Examples: 
    -
    - 2.3456 3 cvs_f -> (2.346)
    - 2.3456 0 cvs_f -> (2)
    - 2.3456 neg 2 cvs_f -> (-2.35)
    - 2.3456 [2 3] cvs_f -> (02.346)
    - 2.3456 neg [2 3] cvs_f -> (-02.346)
    - 222.3456 [2 3] cvs_f -> (222.346)
    -
    - Author: Tom Tetzlaff
    - SeeAlso: cvs
    -*/
    -
    -/cvs_f {
    -  /n Set    % number of desired digits after decimal point
    -  /x Set    % some double number
    -  n 1 arraystore Flatten length 1 eq 
    -  { 
    -    % x n cvs_f  
    -    n 0 eq   
    -    {x round cvs } 
    -    {
    -      x 0. eq 
    -      { (0.) n {(0) join} repeat }
    -      {    
    -	x abs 10. n pow mul round 
    -	{dup 1e9 lt} assert
    -	int cvs /xstr Set
    -        xstr length n lt { () n xstr length sub  {(0) join} repeat xstr join /xstr Set } if 
    -	xstr 0 xstr length n sub getinterval /bd Set  % integer digits 
    -	xstr xstr length n sub xstr length getinterval /ad Set % digits after decimal point
    -	bd (.) ad join join    
    -	bd () eq {(0) exch join} if
    -        x 0 lt {(-) exch join} if % add minus sign if x<0 
    -      } ifelse  
    -    } ifelse        
    -  }
    -  {
    -    {n 1 arraystore Flatten length 2 eq} assert   
    -    % x [n1 n2] cvs_f
    -    n First /n1 Set
    -    n Last /n2 Set      
    -    x abs 10. n2 pow mul round 
    -    {dup 1e9 lt} assert
    -    int cvs /xstr Set
    -    xstr length n2 lt { () n xstr length sub  {(0) join} repeat xstr join /xstr Set } if 
    -    xstr 0 xstr length n2 sub getinterval /bd Set  % integer digits 
    -    bd length 0 eq { (0) /bd Set} if 
    -    xstr xstr length n2 sub xstr length getinterval /ad Set % digits after decimal point
    -    () n1 bd length sub {(0) join} repeat bd join (.) ad join join    
    -    bd () eq {(0) exch join} if
    -    x 0 lt {(-) exch join} if	% add minus sign if x<0 
    -  } ifelse
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: statusdict - dictionary with platform dependent status
    -information.
    -Description: 
    -The status dictionary contains various platform dependend status
    -information. Among others, it contains the following useful things:
    - 
    -  argv        arraytype   full list of commandline arguments given to NEST
    -  userargs    arraytype   user supplied arguments, usable by scripts
    -  interactive booltype    does this NEST session read its commands from an interactive prompt?
    -  files       arraytype   list of files to execute, as specified on the commandline
    -  prgdatadir  stringtype  path to the installation directory
    -  prgdocdir   stringtype  path to the documentation directory
    -
    -  have_mpi    booltype    this flag is always defined and indicates whether an 
    -                          MPI library is available to the NEST system or not. 
    -                          The flag does not indicate whether the interpreter  
    -                          actually has MPI support.
    -  is_mpi      booltype    this flag may not be defined if the interpreter does not
    -                          have MPI support. If the value of the flag is true, the 
    -                          interpreter has support for parallel computing. 
    -  
    -View the whole contents of the status dictionary with 'statusdict info'.
    -SeeAlso: info, LocateFileNames, searchifstream, searchfile
    -*/
    -statusdict 
    -begin
    -  /userargs [] def
    -  /interactive true def
    -  /files [] def
    -end
    -
    -
    -/SLISearchPath
    -  [ statusdict /prgdatadir get_d (/sli) join_s ]
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: joinpath - Join filename and path strings, adding the slash.
    -
    -Synopsis: (path) (filename) joinpath -> (path/filename)
    -
    -Author: R Kupper (replacing U Hehls ill-named "exch joinpath")
    -
    -FirstVersion: 17-jul-2008
    -
    -SeeAlso: join
    -*/
    -/joinpath trie [/stringtype /stringtype]
    -{
    -  exch (/) join_s
    -  exch join_s
    -} bind addtotrie def
    -
    -
    -/** @BeginDocumentation
    - Name: searchfile - tries to open a file for reading using one of
    -       the pathes given within an array of pathnames.
    - Synopsis: (filename) [pathnames] searchfile -> istream true
    -                                         -> false
    - Description:
    -   searchfile concatenates every pathname with the filename and
    -   calls ifstream until ifstream was able to open the file or until no
    -   other path is left. In ordinary cases you will not call searchfile,
    -   but searchifstream. Call searchfile if you want to use customized
    -   search pathes.
    - Diagnostics:
    -   The routine issues debugging messages of priority M_DEBUG
    -   displaying the search status.
    - Parameters:
    -   string is the filename, while array contains pathname strings.
    - Examples: test.dat [(./) (~/) (/home/synod/)] tries to open test.dat for
    -   reading using the current, your user, and the /home/synod/ path one
    -   after the other. It opens the first test.dat found along the way,
    -   or returns false if there is no one in neither path.
    -  References:
    - Bugs: 
    - Author: Gewaltig, Diesmann, R Kupper
    - FirstVersion: 1995
    - Remarks: commented April 13, 1999 Hehl 
    -          added debugging output 4-dec-2007 R Kupper
    - SeeAlso: ifstream, searchifstream, LocateFileNames
    -        
    -*/ 
    -
    -%% we have two versions of this routine: :searchfile_nodebug and
    -%% :searchfile_debug. One issues debugging
    -%% messages, the other doesn't. At this point in the initialization
    -%% cycle, the 'message' command is not yet available. Hence we first
    -%% define /searchfile to be /:searchfile_nodebug.
    -%% As soon as 'msc_helper.sli' has been loded
    -%% below, we will redefine /searchifle to be :/searchfile_debug.
    -%% (see below)
    -/:searchfile_nodebug
    -{
    -  false 3 1 roll
    -  {
    -    1 index
    -    joinpath
    -    ifstream
    -    {% found
    -      true 4 -2 roll pop exit
    -    } if
    -} forall_a
    -  pop
    -} bind def
    -/:searchfile_debug
    -{
    -  1 index M_DEBUG (searchfile) (Locating file ) 4 -1 roll join (:) join message
    -  false 3 1 roll
    -  {
    -    1 index
    -    joinpath
    -    dup
    -    ifstream
    -    {% found
    -      M_DEBUG (searchfile) (  searching for ) 5 -1 roll join ( ... yes) join message
    -      true 4 -2 roll pop exit
    -    }
    -    {% not found
    -      M_DEBUG (searchfile) (  searching for ) 4 -1 roll join ( ... no) join message
    -    } ifelse    
    -  } forall_a
    -  pop
    -} bind def
    -/searchfile /:searchfile_nodebug load def
    -
    -/** @BeginDocumentation
    - Name: LocateFileNames - Look up complete pathnames of given file in given search path.
    - Synopsis: stringarray string LocateFileNames -> stringarray
    - Description: 
    -   Tries to locate a file specified in string using the search path of
    -   the stringarray. Returns an array of complete filenames including
    -   pathname.
    - Parameters:
    -   stringarray : a search path
    -   string      : filename
    -   stringarray : Returned matches     
    - Examples: 
    -   SLISearchPath (sli-init.sli) LocateFileNames
    -   --> [(SLIHOME/lib/sli/sli-init.sli)]
    -
    - Author: Hehl
    - FirstVersion: April 16, 1999
    -
    - SeeAlso:  searchfile, searchifstream
    -*/ 
    -/LocateFileNames
    -{ << >> /TheFile 3 -1 roll  def 
    -        /FileMatches [] def
    -  begin
    -    {
    -      TheFile joinpath
    -      dup
    -      ifstream
    -      {
    -        pop                      % we don't really want a file handler!        
    -        FileMatches exch append 
    -        /FileMatches exch def    % store match in resulting array
    -      } 
    -      {pop} ifelse
    -    } forall
    -    FileMatches                  % push result
    -  end
    -} bind def
    -
    -
    -/** @BeginDocumentation
    - Name: searchifstream - searches SLI's search path for a file
    - Synopsis: string searchifstream -> istreamtype true
    -                                 -> false
    - Description: 
    -   searchifstream calls searchfile to open the file specified in
    -   string for reading. Searchfile will use the Search path mechanism,
    -   trying any path in SLISearchPath.
    -   If searchfile fails, operator tries to add .sli to the name.
    -   Returns a pointer to the stream for reading and true to
    -   indicate success if filename or filename.sli is a valid file,
    -   otherwise returns false.
    - Parameters:
    -   string is a filename with full path information or a file found
    -   within one of the Pathes specified in SLISearchPath.
    - Examples: 
    -   (sli-init.sli) searchifstream opens sli-init.sli for reading 
    -   since the path to system sli files is contained in SLISearchPath.
    - References:
    - Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: 1995
    - Remarks: commented April 12, 1999
    -          Hehl 
    - SeeAlso:  ifstream, searchfile, LocateFileNames
    -        
    -*/ 
    -/searchifstream
    -{
    -  SLISearchPath
    -  2 copy               % first try plain
    -  searchfile           % filename. Then
    -  dup                  % add extension
    -  not_b                % .sli
    -  {
    -    pop                % remove extra true
    -    exch
    -    (.sli) join_s
    -    exch
    -    searchfile
    -  }
    -  {
    -    4 2 roll pop pop
    -  } ifelse
    -} bind def
    -
    -
    -/** @BeginDocumentation
    - Name: file - opens file for reading or writing
    - Synopsis: string1 string2 file -> ostreamtype
    -                                -> istreamtype
    - Description:
    -  file is the PostScript operator used to open files
    -  for reading or writing. If opening is successful the
    -  appropriate streamtype is returned. If opening fails 
    -  /FileOpenError is raised. 
    -  If the file name contains path information "/", the 
    -  operator tries to open the specified file directly,
    -  otherwise if the file should be opened for reading
    -  the operator uses the searchpath to locate the file.
    - Parameters:  
    -  string1 is the file name, string2 is a modifier (r) or 
    -  (w) which specifies if the file should be opened for 
    -  reading or writing. 
    - Examples: 
    -  (sli-init.sli) (r) file type == -> istreamtype
    - References:
    -   compare RedBook 2nd ed. page 414
    - Author: Gewaltig, Diesmann
    - FirstVersion: 1995
    - Remarks: commented April 12, 1999
    -           Hehl, Diesmann 
    - SeeAlso:  close, ofstream, ifstream, searchifstream
    -*/ 
    -/file trie [/stringtype /stringtype]
    -{
    -  2 copy      % save parameters in case an error occurs.
    -  (w) eq
    -  {
    -    ofstream  % never search if file is for write access
    -  }
    -  {
    -    dup           % pick filenamename
    -    (/) search_s  % see if name contains path information
    -    { 
    -      3 npop
    -      ifstream  % if so, try to open file directly
    -    }
    -    {
    -      pop
    -      searchifstream % if not, search file in pathlist
    -    } ifelse
    -  } ifelse
    -  not_b
    -  { 
    -    2 copy (w) eq
    -    {
    -      (Could not open the following file for writing: ")
    -    }
    -    {
    -      (Could not open the following file for reading: ") 
    -    }
    -    ifelse 
    -    exch join (".) join /error_description Set
    -
    -    errordict begin  
    -      /message error_description def
    -    end
    -
    -    /file /FileOpenError raiseerror
    -  } 
    -  {
    -    3 1 roll % remove extra copy of parameters
    -    2 npop
    -  }ifelse
    -} bind addtotrie def
    -
    -
    -/** @BeginDocumentation
    - Name: run - execute a sli file
    - Synopsis: string run -> -
    - Description:
    -   Opens the file specified via file operator and executes it.
    - Parameters: 
    -   string is the filename, either with complete path or found within
    -   one of the SLISerachPath pathes. 
    -   The extension (.sli) may be omitted.
    -
    - Examples: 
    -   (MySli.sli) run            --> execute file MySli, assuming it
    -                                  exists in the search path entries.
    -   (~/MySliRoutines/DoIt) run --> execute file, ignoring search pathes
    - Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: ??
    - Remarks: Commented Hehl April 21, 1999
    - SeeAlso: exec, file
    -*/ 
    -
    -/run trie [/stringtype] 
    -{
    - dup 
    - (.sli) search_s
    - {
    -   3 npop
    - }
    - {
    -   pop (.sli) join_s
    - } ifelse
    - (r) file cvx_f exec
    -} bind addtotrie def
    -
    -
    -/** @BeginDocumentation
    - Name: addpath - add a path to SLISearchPath
    - Synopsis: string addpath -> -
    - Description:
    -   The new path will be appended to SLISearchPathvariable. There is no
    -   check if path really exists.
    - Parameters: 
    -   string is path's name.
    - Examples: 
    -     (~/MySliRoutines) addpath --> sli files will additionally be looked
    -                                   for in ~/MySliRoutines now.
    - Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: ??
    - Remarks: Commented Hehl April 21, 1999
    - SeeAlso: searchfile, path, setpath
    -*/ 
    -
    -/addpath trie [/stringtype] 
    -{
    -  systemdict begin
    -  SLISearchPath
    -  exch_ append_a 
    -  /SLISearchPath exch_ def_
    -  end
    -} bind addtotrie def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% patharray (string) setpath ->
    -% Append string to path array
    -%
    -% (string) patharray setpath
    -% Prepend string to patharray
    -% 
    -% Side Effects: sets SLISeachPath in systemdict.
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -/** @BeginDocumentation
    - Name: setpath -  Append string to path array
    - SeeAlso: addpath, path
    -*/
    -
    -/setpath trie
    -[/arraytype /stringtype]
    -{
    -  systemdict begin
    -  append_a /SLISearchPath exch_ def
    -  end
    -} bind addtotrie
    -[/stringtype /arraytype]
    -{
    -  systemdict begin
    -  exch_ prepend_a /SLISearchPath exch_ def
    -  end
    -} bind addtotrie
    -[/arraytype /arraytype]
    -{
    -  systemdict begin
    -  join /SLISearchPath exch_ def
    -  end
    -} bind addtotrie
    -def
    -
    -/** @BeginDocumentation
    - Name: path -  Return current search path as array
    - SeeAlso: addpath, setpath
    -*/
    -
    -/path
    -{
    -  systemdict /SLISearchPath get_d
    -} bind def
    -
    -%%%%%%%%%%%%%%%%%%% Error Handling %%%%%%%%%%%%%%%%%%%%%
    -
    -/** @BeginDocumentation  
    -Name: handleerror - Default error handler
    -Description: 
    -  handleerror is the default error handler. 
    -  It issues error messages according to the
    -  state of the errordict.
    -  The command that caused the error is left at the
    -  top of the dicitonary stack.
    -
    -  An error is raised by the command 
    -     /func /error raiseerror
    -
    - The flag newerror helps to distinguish between interrupts caused 
    - by call of stop and interrupts raised by raiseerror.
    - It also helps to find errors in the handler itself. This is
    - why it should be re-set to false at the very end of the handler!
    -             
    -Examples:  To catch errors from an unknown function f, 
    -           one can write:
    -
    -           {f} stopped {handleerror} if
    -
    -References: The Red Book
    -SeeAlso: raiseerror, raiseagain, stopped, stop, errordict
    -*/
    -
    -/handleerror
    -{
    -  errordict /newerror get          % check error state
    -  {
    -    print_error
    -    errordict /newerror false put  % Re-set error state
    -  }
    -  {                                % this catches extra stops
    -    (\n Software Interrupt \n) =   % issued by the user
    -  } ifelse                         % or a user function
    -  %  cleardictstack                % clean up dictionary stack 
    -} bind def
    -
    -
    -/MissingOptionError
    -{ 
    -  /errorname Set
    -  M_ERROR errorname cvs (An option for the command is missing. Please see the) message
    -  M_ERROR errorname cvs (documentation of ') errorname cvs join (' and 'Options' for details.) join message
    -  errorname /MissingOptionError raiseerror
    -} def
    -
    -/MissingOptionError trie
    -  [/literaltype] /MissingOptionError load addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: assert - assert that procedure returns true
    -Synopsis: {assertion} assert -> -
    -Remarks: assertion is a boolean
    -Author: docu by Sirko Straube
    -*/
    -/assert
    -{
    - << exch /func exch >> 
    - begin
    -
    -  func not
    -  { 
    -     cerr (Assertion ) <-/func load <-- ( failed.) <- endl pop
    -     /assert /FailedAssertion raiseerror
    -  } if
    - end
    -} bind def 
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% cst stands for convert string to token   %
    -% it gets a string as argument and returns %
    -% an executable array.                     %
    -% addapted to SYNOD2, Apr. 98, D&G         %
    -% First Version: 19. July 1995             %
    -%                Diesmann & Gewaltig       %
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -/** @BeginDocumentation
    -Name: cst - Convert string to array of tokens
    -Synopsis: string cst -> array
    -Examples: (hello) cst -> [hello]
    -Author: docu by Sirko Straube
    -SeeAlso: cv1d, cv2d, cva, cvd_s, cvi_s, cvlit, cvn, cvs, cvt_a
    -*/
    -
    -/cst
    -{
    -  []                   % create array
    -  {                    % begin of evaluation loop
    -    exch               % make string the top element 
    -    token_s              % get token from string
    -    not_b
    -    { exit } if        % exit loop if string is empty
    -    3 -1 roll          % move array on top
    -    exch
    -    append_a             % append token to array
    -  } loop        
    -                       % now only the array is left
    -} bind def
    -
    -/css
    -{
    -  []                   % create array
    -  {                    % begin of evaluation loop
    -    exch               % make string the top element 
    -    symbol_s              % get token from string
    -    not_b
    -    { exit } if        % exit loop if string is empty
    -    3 -1 roll          % move array on top
    -    exch
    -    append_a             % append token to array
    -  } loop        
    -                       % now only the array is left
    -} bind def
    -
    -
    -%
    -% prompt 
    -% -------
    -% flushes the standard output and  
    -% displays a prompt. If the operand stack 
    -% is not empty, its count is also shown   
    -%
    -% In synod 1.x we used the routine of GS,
    -% here it is rewritten with new operators
    -%            April 17. 1998, Diesmann 
    -%
    -
    -/sprompt
    -{
    -  (SLI ) 
    -  count 1 gt_ii      % counter has to be corrected for operative
    -  {                  % objects on the stack
    -    ([) join_s
    -    count 1 sub_ii cvs join_s
    -  } if
    -  (] ) join_s
    -} bind def
    -
    -/prompt
    -{
    -  cout sprompt <- flush ;
    -} bind def
    -
    -/batchprompt_
    -{
    -  cout (]) <- endl ;
    -} bind def
    -
    -/batchprompt /batchprompt_ load def
    -
    -%
    -% (prompt) readline (input) true
    -%                           false
    -
    -/** @BeginDocumentation
    -Name: readline - read and edit a line from standard input
    -
    -Synopsis: any readline -> any true
    -                       -> false
    -
    -Description: readline takes anything from the prompt as a string and prints it.
    -If something is added, readline pushes the additional phrase as string
    -plus a true on the stack (that means readline reads a line from
    -standard input). If nothing is added false is pushed.
    -
    -Author: docu by Sirko Straube
    -
    -SeeAlso: GNUreadline
    -*/
    -        
    -/readline
    -{
    - cout exch  
    - <- ;      % readline takes prompt string as argument
    - cin
    - getline_is
    - not 
    - {
    -   %% cin
    -   pop
    -   false
    - }
    - {
    -   %% cin string
    -   dup () eq
    -   {
    -      2 npop false
    -   }
    -   {
    -     exch pop true
    -   } ifelse
    - } ifelse 
    -} bind def
    -
    -
    -
    -/quit_i trie
    -[/integertype]
    -{
    -  statusdict /exitcode rolld put
    -  quit  
    -} addtotrie def
    -
    -
    -
    -/abort
    -{
    -  statusdict /exitcodes get /userabort get
    -  quit_i
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: save - save interpreter state in a state dictionary
    -Synopsis: save -> statedict true
    -Description: 
    -
    -Experimental function to save the interpreter state into a state dictionary.
    -The state can then be restored, using the command restore.
    -After restore, execution will resume with the next command after 'save'. 
    -The boolean return value can be used to branch execution after saving or restoring the state.
    -
    -Examples:
    -
    -save and restore can be used to implement non-local jumps within procedures and even between procedures. 
    -A saved state defines a jump position to which the execution can return by calling restore for this state.
    -
    -
    -
    -SeeAlso: restore
    -Author: Marc-Oliver Gewaltig
    -*/
    -/save
    -{
    -  (save) =
    -  << >> begin
    -  operandstack /ostack Set
    -  execstack [1 -4] Take /estack Set
    -  errordict /errdict Set
    -  currentdict end
    -  dup /dstack dictstack put_d  
    -  true
    -} def
    -  
    -/** @BeginDocumentation
    -Name: restore - restore interpreter state from state dictionary
    -synopsis: statedict restore -> false
    -Description: 
    -
    -Experimental function to restore the interpreter state from a previously stored state
    -dictionary, created by the command save.
    -After restore, execution will resume with the next command after 'save'. 
    -The boolean return value can be used to branch execution after saving or restoring the state.
    -
    -Bugs: Currently, the state of the dictionary stack cannot be restored.
    -
    -SeeAlso: save
    -Author: Marc-Oliver Gewaltig
    -*/
    -
    -/restore
    -{
    -  begin
    -  currentdict /ostack get restoreostack false
    -  currentdict /errdict get systemdict /errordict rolld put
    -  currentdict end
    -  %dup /dstack get restoredstack
    -  /estack get restoreestack
    -} def
    -
    -/** @BeginDocumentation
    -Name: exithook - Procedure executed if the executive mode is left.
    -
    -Description:
    -The task of exithook is to handle accidental exits from the
    -interactive executive session. The most common reason is the use of
    -'exit' when the user wants to quit the interpreter.
    -
    -By default, exithook will quit the interpreter. For debugging it is
    -often useful to be able to access the fallback input which has no
    -prompt. For doing this, replace the exithook function in sli-init.sli
    -by the following code: /exithook {} def
    -
    -SeeAlso: quit, exit, executive
    -*/
    - 
    -/exithook
    -{
    -  quit
    -} def
    -
    -/** @BeginDocumentation
    -Name: callback - Function to execute before each input prompt.
    -Description: 
    -callback is a procedure which is called in the executive mode, before
    -the input prompt appears.
    -It can be used for debugging. For example, during development, the user
    -might want to see the contents of the stack after each input.
    -
    -callback is only called in the executive mode. It cannot be used to 
    -trace the execution of a procedure. If this is what you want to do,
    -use debug instead.
    - 
    -Examples:
    -The following definition will display the stack before each prompt.
    -
    -/callback {stack} def
    -
    -The following definition will clear the callback.
    -
    -/callback {} def
    -
    -SeeAlso: executive, debug, break, continue
    -*/
    -
    -/callback {} def
    -
    -/** @BeginDocumentation
    -Name: executive - Start interactive interpreter session.
    -SeeAlso: callback, exithook, quit, exit
    -*/
    -
    -
    -%% check whether GNU readline is installed. If so,
    -%% use it for the executive command.
    - 
    -systemdict /GNUreadline known
    -{
    - 
    - /executive
    - {
    -  {  %% loop with stopped context to catch signals
    -   {
    -    callback
    -    sprompt GNUreadline
    -    {
    -      dup GNUaddhistory
    -      cst cvx_a stopped  {handleerror} if
    -    } if
    -   } stopped {handleerror} if % to catch signals
    -  } loop
    - exithook   
    - } bind def
    -
    -}
    -{
    -
    - /executive
    - {
    -  {
    -   {
    -     callback
    -     sprompt readline
    -     {
    -       cst cvx_a stopped {handleerror} if
    -     } if
    -   } stopped {handleerror} if % to catch signals
    -  } loop
    -  exithook
    - } bind def
    -
    -} ifelse
    -
    -
    -/:helptext
    -{
    -  (Type 'helpindex' to see the list of commands.) =
    -  (Type 'helpdesk' to access the online documentation in a browser.) =
    -  (Type '/<command> help' to get help on a command.) =
    -  (Type '/help help' to learn more about the online help system.) =
    -  (Type 'quit' or CTRL-D to quit NEST.) =
    -  (Type 'sysinfo' to see details on the system configuration.) =
    -  (Type 'authors' for information about the makers of NEST.) =
    -  (Type 'license' to display the license agreement that came with your copy of NEST.) =
    -  (For more information visit https://www.nest-simulator.org.) =
    -  (Type 'help' to see this text again.) =
    -  () =  
    -} def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% Display Welcome Message      %
    -% Now DOCUMENTED               %
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -/** @BeginDocumentation
    -Name: welcome - Print SLI welcome message
    -
    -Description:
    -After the startup process of the interpreter is finished, welcome is
    -called to print the familiar greeting message.
    -*/
    -
    -/:warnings {} def % little helper to display warnings AFTER the welcome message.
    -/:addwarnings % add a piece of code to the /:warnings procedure
    -{
    -  systemdict begin
    -    /:warnings load
    -    exch append
    -    /:warnings Set
    -  end  
    -} def 
    -
    -/welcome
    -{
    -   () =
    -   statusdict/argv :: 0 get reverse 0 3 getinterval
    -   (ils) eq
    -   {
    -     (               -- S L I --) =
    -   }
    -   {
    -     (              -- N E S T --) =
    -   } ifelse
    -   (  Copyright (C) 2004 The NEST Initiative) = () =
    -   ( Version: ) =only statusdict/version :: =
    -   ( Built: ) =only statusdict/built :: =
    -   () =
    -
    -   ( This program is provided AS IS and comes with) =
    -   ( NO WARRANTY. See the file LICENSE for details.) =
    -   () =
    -
    -   ( Problems or suggestions?) =
    -   (   Visit https://www.nest-simulator.org) =
    -   () =
    -
    -   ( Type 'help' to get more information.) =
    -   ( Type 'quit' or press CTRL-D to quit.) =
    -   () =
    -   :warnings
    -} def
    -
    -/shortwelcome
    -{
    -   statusdict/argv :: 0 get reverse 0 3 getinterval
    -   (ils) eq
    -   {
    -       (SLI ) =only
    -   }
    -   {
    -       (NEST ) =only
    -   } ifelse
    -   statusdict/version :: =only
    -   ( (C) 2004 The NEST Initiative) =
    -} def
    -
    -
    -/sysinfo
    -{
    -  statusdict begin
    -    cout  (Built on ) <- built <- ( for ) <- host <- endl
    -    (Architecture: ) <- statusdict /architecture get /long get 8 mul
    -    <- ( bit) <- endl
    -    (Searching files in: ) <- path <-- endl
    -    pop
    -  end
    -} def
    -
    -/authors
    -{
    -  cout endl
    -  (NEST has been created and is maintained by the ) <- 
    -  (members of the NEST Initiative:) <- endl endl
    -  (For a list of associated institutions and contributors,) <- endl
    -  (visit us at https://www.nest-initiative.org.) <- endl endl ;
    -    
    -} def
    -
    -/** @BeginDocumentation
    -Name: license - Display the NEST license.
    -
    -Description:
    -Displays the license agreement that came with your copy of NEST.
    -
    -Remarks:
    -license uses the command "pager" to display its information.
    -Type
    -    /pager help
    -to learn how to customize the output of this command.
    -
    -SeeAlso: page
    -*/
    -/license
    -{
    -  statusdict /prgdocdir get (/LICENSE) join page
    -} def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%% Encapsulate builtins in type-trie structures
    -%% 
    -
    -(typeinit.sli) run
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%
    -%% Please place all other libraries below
    -%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% Helper routines                         %
    -% (see misc_helpers.sli)                  %
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -(misc_helpers.sli) run
    -
    -%% We now have the 'message' command available, so we can now switch
    -%% to the version of /searchfile that issues debugging messages:
    -/searchfile /:searchfile_debug load def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% ENVVAR :pathlist -> array               %
    -% UNDOCUMENTED                            %
    -%% (note: depends on misc_helpers.sli for "breakup")
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/:pathlist trie
    -[/stringtype]
    -{
    -  getenv   
    -  {
    -    (:) breakup % breakup is defined very late
    -  }
    - { 
    -   [ ] 
    - } ifelse
    -} bind addtotrie def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% SLI library handling                    %
    -%                                         %
    -% This should be initialized as early as  %
    -% possible, so that other initialization  %
    -% files can use the library management!   %
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -(library.sli) run
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%% PS conforming operators      %%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -(ps-lib) run
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%    Module Initialization     %% 
    -%%                              %%   
    -%%   now execute all module     %%
    -%%   commandstrings.            %% 
    -%%   These are defined in the   %%
    -%%   module classes and called  %%
    -%%   by the interpreter.        %%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -M_STATUS (sli-init) (Executing module initializers...) message
    -moduleinitializers
    -{ 
    -  initialize_module 
    -} forall
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%% Mathematica Style Formatted IO % 
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -(FormattedIO.sli) run
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%    Debugging Features        %% 
    -%%                              %%   
    -%%   run after modules are      %%
    -%%   initialized                %%   
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -(debug.sli) run
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%    Online Help System        %% 
    -%%                              %%   
    -%%   run after modules are      %%
    -%%   initialized                %%   
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -(helpinit.sli) run
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%%
    -%% Below this point, the interpreter is completely
    -%% set up. All following code evaluate commandline
    -%% arguments and user startup file.
    -%%
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/* 
    - Documentation (not included in helpdesk)
    - Name: :commandline - evaluates sli commandline arguments argv
    - Synopsis: - :commandline -> true  (interactive session)
    -                          -> [filenames] false (non-interactive session)
    - Description:
    -
    -   :commandline scans for the following commandline arguments (short
    -   forms given in backets): --version (-v), --help (-h), --batch (-).
    -   The argument -c has to be followed by a string, which is executed
    -   in a stopped context, before sli quits.
    -
    -   All other commandline arguments are interpreted as file names that
    -   are executed in the sequence of their appearance on the commandline
    -   using the run command. Execution takes place in a stopped context
    -   using the standard error handler handleerror.  After execution of
    -   the last argument the interpreter terminates by invocation of the
    -   quit command.
    -
    -   If :commandline encounters the argument --batch or - it starts
    -   reading and executing tokens from stdin using :parsestdin without
    -   any support for commandline editing and limitations on the length
    -   of an input line. This is useful if sli is used as a computational
    -   engine called by some other application. Batch mode is protected by
    -   a stopped context using the standard error handler handleerror.
    -
    - Parameters: 
    -   :commandline does not take any arguments. It evaluates argv which
    -   resides in the statusdict.
    - Examples:
    - Bugs: 
    - Author: Eppler, Gewaltig
    - Remarks: Commented Diesmann July 8, 2000
    - SeeAlso: statusdict, argv, executive, start, :parsestdin, run
    -*/ 
    -/:commandline
    -{
    -  systemdict begin
    -  /scripterror statusdict /exitcodes get /scripterror get def
    -  end
    -  statusdict /argv get Rest
    -
    -  << >> begin
    -
    -    /printhelp false def
    -    /printversion false def
    -    /batch false def
    -    /runcommand false def
    -
    -    {
    -      {
    -        % get the next argument from argv
    -	empty { exit } if
    -	dup First exch Rest exch
    -
    -	dup (--help) eq over (-h) eq or
    -	{
    -	  /printhelp true def
    -	  pop exit	
    -	} if
    -
    -	dup (--version) eq over (-v) eq or
    -	{
    -	  /printversion true def
    -	  pop exit	
    -	} if
    -
    -	dup (--batch) eq over (-) eq or
    -	{
    -	  /batch true def
    -	  pop exit	
    -	} if
    -
    -	size 11 geq
    -	{
    -	  dup 0 11 getinterval (--userargs=) eq
    -	  {
    -	    size 11 sub         % stack: (--userargs=...) size-11
    -	    11 exch getinterval % stack: (...)
    -	    (:) breakup
    -	    statusdict /userargs rolld put
    -	    exit	
    -	  } if
    -	} if
    -
    -	dup (-c) eq
    -	{
    -	  pop
    -	  empty { M_ERROR (:commandline) (Option '-c' needs an extra argument) message quit } if
    -	  dup First exch Rest exch /command Set
    -          /runcommand true def
    -	  exit
    -	} if
    -
    -	% options --debug and --verbosity were alreay handled in the
    -	% constructor of SLIStartup, here we just skip over them to
    -	% prevent their addition to the files-to-be-executed list
    -	dup (--debug) eq over (-d) eq or { pop exit } if
    -	size 12 geq { dup 0 12 getinterval (--verbosity=) eq { pop exit } if } if
    -
    -	% the argument is not an option, so we take it as a file to execute:
    -	statusdict begin
    -	  /interactive false def
    -	  files exch append /files Set
    -	end
    -
    -      } loop
    -
    -      empty { pop exit } if 
    -    } loop
    -
    -    % Following are the helper functions that are executed according
    -    % to the flags set above. Their order is used to prioritize the
    -    % options.
    -
    -    printhelp
    -    {
    -      (usage: nest [options] [ - | file [file ...] ]) =
    -      (  file1 file2 ... filen     read SLI code from file1 to filen in ascending order) =
    -      (                            Quits with exit code ) scripterror cvs join ( on error.) join =
    -      (  -   --batch               read SLI code from stdin/pipe.) =
    -      (                            Quits with exit code ) scripterror cvs join ( on error.) join =
    -      (  -c cmd                    Execute cmd and exit) =
    -      (  -h  --help                print usage and exit) =
    -      (  -v  --version             print version information and exit) =
    -      (      --userargs=arg1:...   put user defined arguments in statusdict::userargs) =
    -      (  -d  --debug               start in debug mode (implies --verbosity=ALL) ) =
    -      (      --verbosity=ALL       turn on all messages.) =
    -      (      --verbosity=DEBUG|STATUS|INFO|WARNING|ERROR|FATAL) =
    -      (                            show messages of this priority and above.) =
    -      (      --verbosity=QUIET     turn off all messages.) =
    -      quit
    -    } if
    -
    -    printversion
    -    {
    -      statusdict begin
    -	cout (NEST version ) <- version <- (, built on ) <- built <- ( for ) <- host <- endl
    -	(Copyright (C) 2004 The NEST Initiative) <- endl endl
    -      end
    -      quit
    -    } if
    -
    -    batch
    -    {
    -      statusdict /interactive false put
    -      {cin cvx exec quit} stopped { handleerror scripterror quit_i } if
    -    } if
    -
    -    runcommand
    -    {
    -      statusdict /interactive false put
    -      {command cvx exec quit} stopped { handleerror scripterror quit_i } if
    -    } if
    -
    -  end
    -
    -  % put the value of interactive on the stack
    -  statusdict/interactive ::
    -  dup not
    -  {
    -    % put the files to execute on the stack if not running interactively
    -    statusdict/files :: exch
    -  } if
    -
    -} bind def
    -
    -
    -/** @BeginDocumentation
    - Name: start - interpreter start symbol
    - Synopsis: - start -> -
    - Description:
    -   The full featured life of the interpreter begins after 
    -   boot-strapping with sli-init.sli by pushing the start symbol.
    -   When no commandline arguments are present the start symbol
    -   prepares for an interactive session in the shell with the
    -   help of the executive command. When command line arguments 
    -   are present a non-interactive session is assumed and the start 
    -   symbol prepares for recognition of these 
    -   arguments with the help of the :commandline command.     
    -   When executing files and an error is raised that is not 
    -   caught by the script, quit with the exit code scripterror, which
    -   is defined in the exitcodes dictionary in statusdict.
    - Parameters: 
    -   start does not take any arguments. It evaluates the length 
    -   of argv which resides in the statusdict.
    - Examples:
    -  Bugs: 
    - Author: Gewaltig, Diesmann
    - FirstVersion: similar code appeared in sli-1
    - Remarks: Commented Diesmann July 8, 2000
    - SeeAlso: executive, statusdict
    -*/ 
    -
    -/start {
    -  {
    -    :commandline
    -    { % we have an interactive session
    -      welcome
    -      executive
    -    }
    -    { % we have a non-interactive session
    -      shortwelcome
    -
    -      % Execute in stopped context so we can detect uncaught errors
    -      % We also check if /newerror is set in errordict. This in case
    -      % an error occured in a stopped context without proper error 
    -      % handler.
    -      { { run } forall } stopped { handleerror scripterror quit_i } if
    -      quit    
    -    } ifelse
    -    
    -  } stopped { handleerror } if
    -
    -} def
    -
    -
    -/* Private function, no user documentation
    -
    -Name: ::evalstring - execute SLI code given as string in stopped context
    -
    -Description:
    -This function is used by SLIInterpreter::execute(const std::string &cmdline).
    -
    -SeeAlso: eval
    -*/
    -/::evalstring
    -{
    -  cvx stopped {handleerror} if
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: environment - return dictionary of environment variables
    -Synopsis: enviromnent -> dict
    -Description: 
    -Returns dictionary with the environment variables of the process that
    -invoked NEST. It is a shortcut for statusdict/environment ::, provided
    -for backward compatibility.
    -SeeAlso: statusdict
    -*/
    -/environment 
    -{
    -  statusdict/environment ::
    -} def
    -
    -end % systemdict
    -
    -(SLIUSER) :pathlist path setpath % prepend user directories    
    -(.) path setpath                % prepend current directory
    -
    -
    -/** @BeginDocumentation
    -Name: is_threaded - returns true if NEST/SLI was compiled with thread support
    -Synopsis: is_threaded -> bool
    -Description:
    -Returns true if NEST/SLI was compiled with support for threads, and returns
    -false otherwise.
    -SeeAlso: statusdict
    -*/
    -/is_threaded 
    -{
    -  % We must test against "no", if threads are supported threading is a 
    -  % string containing the threading model.
    -  statusdict/threading :: (no) neq 
    -} def
    -
    -/** @BeginDocumentation
    -Name: is_threaded_with_openmp - returns true if NEST/SLI was compiled with OpenMP support
    -Synopsis: is_threaded_with_openmp -> bool
    -Description:
    -Returns true if NEST/SLI was compiled with support for OpenMP threads, and returns
    -false otherwise.
    -SeeAlso: statusdict
    -*/
    -/is_threaded_with_openmp
    -{
    -  statusdict/threading :: ToLowercase (openmp) searchif
    -} def
    -
    -% Add directories in environment variable SLI_PATH to the search path
    -% for SLI files. Directories have to be separated by colon.
    -(SLI_PATH) getenv { (:) breakup { addpath } forall } if
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::exit_test_gracefully - End test script and report it as skipped
    -Synopsis: literal exit_test_gracefully -> -
    -Description:
    -This function will terminate NEST/SLI with a return code signaling that a
    -test was skipped. It should be used to leave test scripts that have special
    -prerequisites.
    -Parameters:
    -literal - Reason for exit
    -Example:
    -/unittest using
    -is_threaded not { /skipped_no_threading exit_test_gracefully } if
    -SeeAlso: skip_if_no_mpi, skip_if_have_mpi, skip_if_not_threaded, skip_if_without_gsl, skip_if_without_music 
    -*/
    -/exit_test_gracefully[/literaltype]
    -{
    -  statusdict/exitcodes :: exch get quit_i
    -} bind def
    -
    -
    -/** @BeginDocumentation
    -Name: skip_if_* - End script and report it as skipped
    -Synopsis: skip_if_* -> -
    -Description:
    -These functions will terminate NEST/SLI with a return code signaling that the
    -script was skipped. It should be used to leave test/example scripts that have
    -special prerequisites.
    -SeeAlso: exit_test_gracefully
    -*/
    -
    -/skip_if_no_mpi { statusdict/is_mpi :: not { /skipped_no_mpi exit_test_gracefully } if } def
    -/skip_if_have_mpi { statusdict/is_mpi :: { /skipped_have_mpi exit_test_gracefully } if } def
    -/skip_if_not_threaded { is_threaded not { /skipped_no_threading exit_test_gracefully } if } def
    -/skip_if_without_gsl { statusdict/have_gsl :: not { /skipped_no_gsl exit_test_gracefully } if } def
    -/skip_if_without_music { statusdict/have_music :: not { /skipped_no_music exit_test_gracefully } if } def
    -
    -
    -/mpirun
    -[/integertype /stringtype /stringtype]
    -[/numproc     /executable /scriptfile]
    -{
    - () [
    -  statusdict/mpiexec :: ( )
    -  statusdict/mpiexec_numproc_flag :: ( )
    -  numproc cvs ( )
    -  (SLI_MPIEXEC_PREFLAGS) getenv not {()} if ( )
    -  statusdict/mpiexec_preflags :: ( )
    -  executable ( )
    -  statusdict/mpiexec_postflags :: ( )
    -  scriptfile
    - ] {join} Fold
    -} Function def
    diff --git a/lib/sli/typeinit.sli b/lib/sli/typeinit.sli
    deleted file mode 100644
    index 0419c83136..0000000000
    --- a/lib/sli/typeinit.sli
    +++ /dev/null
    @@ -1,1382 +0,0 @@
    -/*
    - *  typeinit.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* 
    -    SLI Interpeter initalization
    -
    -
    -*/
    -
    -%% Initialization of TypeTrie wrappers to
    -%% builtin functions
    -
    -/def_ /def load def
    -
    -/** @BeginDocumentation
    -Name: def - define a variable or function
    -Synopsis: /name obj def -> -
    -          /name [/type1 .. /typen] any def -> -
    -
    -Description:
    -def creates an association between /name and obj
    -in the current dictionary. 
    -
    -First variant:
    -  The first variant unconditionally creates the association. Any
    -  existing association will be overwritten.
    -
    -Second variant:
    -  The second variant creates a user-defined function with automatic
    -  parameter checking. The second parameter must be an array of valid
    -  type-specifiers. The last parameter must be a procedure object. If
    -  the name is already bound to a trie, the new definition is added
    -  to the trie, otherwise a trie is created.
    -
    -  If the array of type-specifiers is empty, it is checked, if there
    -  already exists a trie for this name. If so, the definition would be
    -  ambiguous, and an error is raised. If not, the first variant of
    -  def is called.
    -
    -  Note that no name binding via bind is performed.
    -
    -Examples:
    -SLI ] /a 1 def
    -SLI ] a =
    -1 
    -
    -SLI ] /f [/integertype /integertype] {add_ii} def
    -SLI ] 1 2 f
    -SLI [1] =
    -3
    -SLI ] 1 2.0 f
    -TypeTrie::lookup error at parameter level 0
    -Operand      : 2
    -Operand type : doubletype
    -Expected type: integertype
    -Error: /ArgumentType in f
    -SLI ]  /f [/integertype /doubletype] {add_id} def
    -SLI ] 1 2.0 f =
    -2
    -SLI ] 1 2 f
    -SLI [1] =
    -3
    -
    -Remarks:
    -Ambiguous type trie definitions are not always detected! Only if the
    -new parameter list is longer than an existing one, a warning is issued
    -(but no error is raised). This needs improvement.
    -
    -Author'sRemark: Maybe the trie variant should be called deffun, like in lisp.
    -
    -Author: Marc-oliver Gewaltig
    -SeeAlso: bind, type, Set, undef
    -*/
    -
    -%% this is the variant that checks/creates/appends to the type trie:
    -/:def_
    -  {%stack: /funcname [/typearray] object
    -
    -    %if the typearray is empty, we fall back to the original "raw" version of def:    
    -    1 index length 0 eq
    -
    -    {% the typearray was empty, use "raw" def:   
    -      %stack:  /funcname [/typearray] object
    -
    -      % check if this name is already bound to a trie
    -      % if so, definition is ambigouous!      
    -      2 index              % fetch name
    -      lookup           % check if is already defined
    -      {% the name is already defined
    -        % stack: /funcname [/typearray] object lookedupobject
    -        typeinfo exch pop /trietype eq % as a trie?
    -        {% Yes, so definition would be ambigouous!
    -          M_FATAL (def) (Ambiguous function definition!) message
    -          M_FATAL (def) (A type trie has previously been assigned to this name,) message
    -          M_FATAL (def) (so there exist variants of this functions expecting parameters.) message
    -          M_FATAL (def) (A variant not expecting any parameters cannot be assigned!) message
    -          /def /AmbiguousParameterListError raiseerror
    -        } if
    -      } if
    -      % if we got here, the name was eithe defined, but was no trie,
    -      % or it is not known, so it will get redefined!
    -      %stack: /funcname [/typearray] object
    -      exch pop
    -      def_       % use original "raw" version of def
    -    } 
    -    {% the typearray was not empty, do the trie:
    -      %stack:  /funcname [/typearray] object
    -      2 index              % fetch name
    -      dup lookup           % check if is already defined
    -      {
    -        typeinfo /trietype neq % as a trie?
    -        {                      % No, then
    -          pop trie             % remove the element and create a new trie
    -        } if
    -      } 
    -      {          % the name was not yet defined, so
    -        trie     % create a new trie
    -      } ifelse
    -      exch pop   % remove the spare literal object
    -      3 1 roll   % and bring arguments in right order
    -      addtotrie
    -      def_       % use original "raw" Version of def
    -    } ifelse
    -  } bind def_  
    -    
    -/def trie
    -  [/literaltype /anytype] /def_ load addtotrie
    -  [/literaltype /proceduretype] /def load addtotrie
    -  [/literaltype /arraytype /proceduretype] /:def_ load addtotrie
    -  [/literaltype /arraytype /anytype] /:def_ load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: trieinfo - print the function variants of a type-trie.
    -Synopsis: ostream trieinfo -> -
    -*/
    -/trieinfo [/ostreamtype /trietype] /trieinfo_os_t load def
    -
    -%%
    -%% Note that for the stack functions, the tries are obsolete!
    -%%
    -/dup_  /dup load def
    -/exch_ /exch load def
    -/pop_  /pop load def
    -/;_    /; load def
    - 
    -/undef_ /undef load def
    -
    -/known_ /known load def
    -/known [/dictionarytype /literaltype] /known_ load def
    -/known [/integertype /literaltype] {exch GetStatus exch } /known_ load append_p  def
    -
    -/container trie
    -  [/arraytype ]  {[]} addtotrie
    - [/stringtype ] {()} addtotrie
    -def
    -
    -/add trie
    -  [/integertype /integertype] /add_ii load addtotrie
    -  [/doubletype  /integertype] /add_di load addtotrie
    -  [/integertype /doubletype]  /add_id load addtotrie
    -  [/doubletype  /doubletype]  /add_dd load addtotrie
    -def
    -
    -/sub trie
    -  [/integertype /integertype] /sub_ii load addtotrie
    -  [/doubletype  /integertype] /sub_di load addtotrie
    -  [/integertype /doubletype]  /sub_id load addtotrie
    -  [/doubletype  /doubletype]  /sub_dd load addtotrie
    -def
    -
    -/mul trie
    -  [/integertype /integertype] /mul_ii load addtotrie
    -  [/doubletype  /integertype] /mul_di load addtotrie
    -  [/integertype /doubletype]  /mul_id load addtotrie
    -  [/doubletype  /doubletype]  /mul_dd load addtotrie
    -def
    -
    -/div trie
    -  [/integertype /integertype] /div_ii load addtotrie
    -  [/doubletype  /integertype] /div_di load addtotrie
    -  [/integertype /doubletype]  /div_id load addtotrie
    -  [/doubletype  /doubletype]  /div_dd load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: max - return the greater of two values
    -
    -Synopsis: val1 val2 max -> result
    -
    -Description: 
    -This function returns the greater of two values, by removing the other
    -one from the stack. Hence, the output type is the same as the
    -respective input type (integer or double).
    -
    -Alternatives: Functions  max_i_i, max_i_d, max_d_i, max_d_d (all
    -undocumented), where i is standing for integer and for double as
    -arguments -> behaviour and synopsis are the same.
    -
    -Parameters: 
    -val1, val2: numeric values (integer or double)
    -result    : the greater of the two values (keeping its type, integer
    -            or double)
    -
    -Examples:
    -  1   2   max -> 2
    -  1   2.0 max -> 2.0
    -  1.0 2   max -> 2
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 17.3.2003
    -
    -SeeAlso: min, gt, lt, geq, leq
    -*/
    -/max trie
    -  [/integertype /integertype] /max_i_i load addtotrie
    -  [/doubletype  /integertype] /max_d_i load addtotrie
    -  [/integertype /doubletype]  /max_i_d load addtotrie
    -  [/doubletype  /doubletype]  /max_d_d load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: min - return the smaller of two values
    -
    -Synopsis: val1 val2 min -> result
    -
    -Description: 
    -This function returns the smaller of two values, by removing the other
    -one from the stack. Hence, the output type is the same as the
    -respective input type (integer or double).
    -
    -Alternatives: Functions  min_i_i, min_i_d, min_d_i, min_d_d (all
    -undocumented), where i is standing for integer and for double as
    -arguments -> behaviour and synopsis are the same.
    -
    -
    -Parameters: 
    -val1, val2: numeric values (integer or double)
    -result    : the smaller of the two values (keeping its type, integer
    -            or double)
    -
    -Examples:
    -  1   2   min -> 1
    -  1   2.0 min -> 1
    -  1.0 2   min -> 1.0
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 17.3.2003
    -
    -SeeAlso: max, gt, lt, geq, leq
    -*/
    -
    -/min trie
    -  [/integertype /integertype] /min_i_i load addtotrie
    -  [/doubletype  /integertype] /min_d_i load addtotrie
    -  [/integertype /doubletype]  /min_i_d load addtotrie
    -  [/doubletype  /doubletype]  /min_d_d load addtotrie
    -def
    -
    -/sin trie
    -  [/doubletype] /sin_d load addtotrie
    -  [/integertype] {cvd sin_d} addtotrie
    -def
    -
    -/asin trie
    -  [/doubletype] /asin_d load addtotrie
    -  [/integertype] {cvd asin_d} addtotrie
    -def
    -
    -/cos trie
    -  [/doubletype] /cos_d load addtotrie
    -  [/integertype] {cvd cos_d} addtotrie
    -def
    -
    -/acos trie
    -  [/doubletype] /acos_d load addtotrie
    -  [/integertype] {cvd acos_d} addtotrie
    -def
    -
    -/exp trie
    -  [/doubletype] /exp_d load addtotrie
    -  [/integertype] {cvd exp_d} bind addtotrie
    -def
    -
    -/ln trie
    -  [/doubletype] /ln_d load addtotrie
    -  [/integertype] {cvd ln_d} bind addtotrie
    -def
    -
    -/log trie
    -  [/doubletype] /log_d load addtotrie
    -  [/integertype] {cvd log_d} bind addtotrie
    -def
    -
    -/sqr trie
    -  [/doubletype] /sqr_d load addtotrie
    -  [/integertype] {cvd sqr_d} bind addtotrie
    -def
    -
    -/sqrt trie
    -  [/doubletype] /sqrt_d load addtotrie
    -  [/integertype] {cvd sqrt_d} bind addtotrie
    -def
    -
    -/pow trie
    -  [/doubletype /doubletype] /pow_dd load addtotrie
    -  [/integertype /doubletype] {exch cvd exch pow_dd} bind addtotrie
    -
    -  % integer exponent is special: exponend may be negative
    -  [/doubletype /integertype] /pow_di load addtotrie
    -  [/integertype /integertype] {exch cvd exch pow_di} bind addtotrie
    -def
    -
    -/modf trie
    -  [/doubletype ] /modf_d load addtotrie
    -def
    -
    -/frexp trie
    -  [/doubletype ] /frexp_d load addtotrie
    -def
    -
    -/ldexp trie
    -  [/doubletype /integertype] /ldexp_di load addtotrie
    -def
    -
    -/dexp trie
    -  [/integertype] /dexp_i load addtotrie
    -def
    -
    -
    -/eq_ /eq load def
    -/eq trie
    -  [/anytype /anytype] /eq_ load addtotrie
    -def
    -
    -/neq_ /neq load def
    -/neq trie
    -  [/anytype /anytype] /neq_ load addtotrie
    -def
    -
    -/not trie
    -  [/booltype   ] /not_b load addtotrie
    -  [/integertype] /not_i load addtotrie
    -def
    -
    -/xor_ /xor load def
    -/xor trie
    -  [/booltype /booltype] /xor_ load addtotrie
    -def
    -
    -/and_bb /and load def
    -/and trie
    -  [/booltype  /booltype ]     /and_bb load addtotrie
    -  [/integertype /integertype] /and_ii load addtotrie
    -def_
    -
    -/or_bb /or load def
    -/or trie
    -  [/booltype  /booltype ]     /or_bb load addtotrie
    -  [/integertype /integertype] /or_ii load addtotrie
    -def_
    -
    -/gt trie
    -  [/integertype /integertype] /gt_ii load addtotrie
    -  [/doubletype  /integertype] /gt_di load addtotrie
    -  [/integertype /doubletype]  /gt_id load addtotrie
    -  [/doubletype  /doubletype]  /gt_dd load addtotrie
    -  [/stringtype  /stringtype]  /gt_ss load addtotrie
    -def
    -
    -/lt trie
    -  [/integertype /integertype] /lt_ii load addtotrie
    -  [/doubletype  /integertype] /lt_di load addtotrie
    -  [/integertype /doubletype]  /lt_id load addtotrie
    -  [/doubletype  /doubletype]  /lt_dd load addtotrie
    -  [/stringtype  /stringtype]  /lt_ss load addtotrie
    -def
    -
    -/leq trie
    -  [/integertype /integertype] /leq_ii load addtotrie
    -  [/doubletype  /integertype] /leq_di load addtotrie
    -  [/integertype /doubletype]  /leq_id load addtotrie  
    -  [/doubletype  /doubletype]  /leq_dd load addtotrie  
    -  [/stringtype  /stringtype]  {2 copy eq 3 1 roll lt or} addtotrie
    -def
    -
    -/geq trie
    -  [/integertype /integertype] /geq_ii load addtotrie
    -  [/doubletype  /integertype] /geq_di load addtotrie
    -  [/integertype /doubletype]  /geq_id load addtotrie  
    -  [/doubletype  /doubletype]  /geq_dd load addtotrie  
    -  [/stringtype  /stringtype]  {2 copy eq 3 1 roll gt or} addtotrie
    -def
    -
    -/forall_di
    -{ 
    -  %stack: <<dict>> {proc}  
    -  {
    -    %stack: {proc} [/key_i value_i]
    -    arrayload pop
    -  } exch join
    -  %stack: <<dict>> {arrayload pop proc}  
    -
    -  exch  
    -  %stack: {arrayload pop proc} <<dict>>  
    -  cva
    -  2 Partition
    -
    -  %stack: {arrayload pop proc} [[/key_1 value_1] [/key_2 value_2] ...] 
    -  exch forall
    -  
    -} bind def
    -/forall trie
    -  [/arraytype      /proceduretype] /forall_a    load addtotrie
    -  [/stringtype     /proceduretype] /forall_s    load addtotrie
    -  [/dictionarytype /proceduretype] /forall_di   load addtotrie
    -def
    -
    -/forallindexed trie
    -  [/arraytype  /proceduretype] /forallindexed_a load addtotrie
    -  [/stringtype /proceduretype] /forallindexed_s load addtotrie
    -def
    -
    -/getinterval trie
    -  [/arraytype      /integertype /integertype] /getinterval_a load addtotrie
    -  [/stringtype     /integertype /integertype] /getinterval_s load addtotrie
    -def
    -
    -/join trie
    -  [/arraytype      /arraytype]     /join_a load addtotrie
    -  [/stringtype     /stringtype]    /join_s load addtotrie
    -  [/proceduretype  /proceduretype] /join_p load addtotrie
    -def
    -
    -/insert trie
    -  [/arraytype      /integertype /arraytype]     /insert_a load addtotrie
    -  [/stringtype     /integertype /stringtype]    /insert_s load addtotrie
    -%  [/proceduretype  /proceduretype] /join_p load addtotrie
    -def
    -
    -/replace trie
    -  [/arraytype  /integertype /integertype /arraytype]  /replace_a load addtotrie
    -  [/stringtype /integertype /integertype /stringtype] /replace_s load addtotrie
    -def
    -
    -/erase trie
    -  [/arraytype  ]   {size 0 neq {size 0 exch erase_a} if}  bind addtotrie
    -  [/proceduretype]   {size 0 neq {size 0 exch erase_p} if}  bind addtotrie
    -  [/stringtype ]   {size 0 neq {size 0 exch erase_s} if}  bind addtotrie
    -  [/arraytype  /integertype /integertype ]  /erase_a load addtotrie
    -  [/proceduretype  /integertype /integertype ]  /erase_p load addtotrie
    -  [/stringtype /integertype /integertype ]  /erase_s load addtotrie
    -def
    -
    -/insertelement trie
    -  [/arraytype      /integertype /anytype]     /insertelement_a load addtotrie
    -  [/stringtype     /integertype /integertype] /insertelement_s load addtotrie
    -def
    -
    -/prepend trie
    -  [/arraytype      /anytype]       /prepend_a load addtotrie
    -  [/arraytype      /integertype]   /prepend_a load addtotrie
    -  [/proceduretype  /anytype]       /prepend_p load addtotrie
    -  [/proceduretype  /integertype]   /prepend_p load addtotrie
    -  [/stringtype     /integertype]   /prepend_s load addtotrie
    -def
    -
    -/append trie
    -  [/arraytype      /anytype]       /append_a load addtotrie  
    -  [/arraytype      /integertype]   /append_a load addtotrie
    -  [/proceduretype  /anytype]       /append_p load addtotrie
    -  [/proceduretype  /integertype]   /append_p load addtotrie
    -  [/stringtype     /integertype]   /append_s load addtotrie
    -%  [/proceduretype  /proceduretype] /join_p load addtotrie
    -def
    -
    -/search trie
    -  [/arraytype  /arraytype  ]   /search_a load addtotrie
    -  [/stringtype /stringtype ]   /search_s load addtotrie
    -def
    -
    -/capacity trie
    - [/arraytype  ]    /capacity_a load addtotrie
    - [/stringtype ]    /capacity_s load addtotrie
    -def
    -
    -/size trie
    - [/arraytype  ]    /size_a load addtotrie
    - [/stringtype ]    /size_s load addtotrie
    -def
    -
    -/reserve trie
    - [/arraytype  /integertype]    /reserve_a load addtotrie
    - [/stringtype /integertype]    /reserve_s load addtotrie
    -def
    -
    -/:resize trie
    - [/arraytype  /integertype]    /:resize_a load addtotrie
    - [/stringtype /integertype]    /:resize_s load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: empty - Tests if a string or array is empty.
    -Synopsis: array empty -> array  bool
    -          string empty-> string bool
    -          dict empty -> dict bool
    -Description: empty returns true if the supplied string/array is
    -of length 0, or the supplied dict has no entries.
    -Examples: (hello) empty -> (hello) false
    -SeeAlso: length, size
    -*/
    -/empty trie
    - [/arraytype     ]    /empty_a load addtotrie
    - [/dictionarytype]    /empty_D load addtotrie
    - [/stringtype    ]    /empty_s load addtotrie
    -def
    -
    -/shrink trie
    - [/arraytype  ]    /shrink_a load addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: references - Returns the number of references to a reference counted object.
    -Synopsis: array references -> array  integer
    -          dict  references -> dict   integer
    -Description: references returns the number of references to
    -a reference counted object including potential self references.
    -Examples: << /x 0 >> dup references -> dict dict 2
    -               [ 0 ] dup references -> array array 2
    -*/
    -/references trie
    - [/arraytype  ]    /references_a load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -Name: cvx - convert array/string to procedure 
    -
    -Synopsis: array/string cvx -> <proceduretype>
    -
    -Description: Alternatives: Function cvx_a for arrays (undocumented) 
    --> behaviour and synopsis are the same.
    -
    -Examples: (hello) cvx -> <proceduretype>
    -
    -Author: docu by Sirko Straube
    -
    -SeeAlso: cst, cv1d, cv2d, cva, cvd, cvi, cvlit, cvn, cvs, cvt_a
    -*/
    -
    -/cvx trie
    -[/arraytype]   /cvx_a load addtotrie
    -[/istreamtype] /cvx_f load addtotrie
    -[/stringtype]  {cst cvx_a} bind addtotrie
    -[/anytype]    {}           addtotrie % ignore all other types
    -def
    -
    -/** @BeginDocumentation
    -
    -   Name: cvi - Convert double/string to integer
    -
    -   Synopsis: double cvi -> integer
    -             string cvi -> integer
    -
    -   Description: If cvi is executed with a double, the resulting
    -   integer is the number without digits after decimal point (the same
    -   result as floor), if it is executed with a
    -   string that contains letters 0 is returned. If the string
    -   contains a double or integer, the corresponding integer is
    -   returned.
    -
    -   Alternatives: Function int (undocumented) -> behaviour and
    -   synopsis are the same.
    -
    -
    -   Examples:
    -   3.33 cvi      --> 3
    -   2    cvi      --> 2
    -   (23) cvi      --> 23
    -   (23.2323) cvi --> 23
    -   (hello) cvi   --> 0
    -
    -   Diagnostics:
    -   no errors are issued.
    -
    -   Author: docu by Sirko Straube
    -
    -   SeeAlso:  floor, cst, cv1d, cv2d, cva_d, cva_t, cvd, cvi_s, cvlit, cvn, cvs, cvt_a
    -*/
    -
    -/cvi trie
    - [/integertype] {} addtotrie
    - [/doubletype]  /int_d load addtotrie
    - [/stringtype] /cvi_s load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -
    -   Name: cvd - Convert integer/string to double
    -
    -   Synopsis: integer cvd -> double
    -             string cvd -> double
    -
    -   Description: If cvd is executed with an integer, the resulting
    -   double contains zeros after decimal point, if it is executed with a
    -   string that contains letters 0.0 is returned. If the string
    -   contains a double or integer, the corresponding double is returned.
    -
    -   Alternatives: Function double (undocumented) -> behaviour and
    -   synopsis are the same.
    -
    -   Examples:
    -   3 cvd -> 3.0
    -   (23) cvd -> 23.0
    -   (23.2323) cvd -> 23.2323
    -   (hello) cvd -> 0.0
    -
    -   Diagnostics:
    -   no errors are issued.
    -
    -   Author: docu by Sirko Straube
    -
    -   SeeAlso:  cst, cv1d, cv2d, cva_d, cva_t, cvd_s, cvi, cvlit, cvn, cvs, cvt_a
    -
    -*/
    -
    -/cvd trie
    - [/integertype] /double_i load addtotrie
    - [/doubletype]  {}  addtotrie
    - [/stringtype] /cvd_s load addtotrie
    -def
    -
    -/exec_ /exec load def
    -/exec trie
    - [/anytype] /exec load addtotrie
    -def
    -
    -/trie_ /trie load def
    -/trie trie
    -[/literaltype] /trie load addtotrie
    -def
    -
    -/addtotrie_ /addtotrie load def
    -/addtotrie trie
    -[/trietype /arraytype /anytype] /addtotrie load addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: eval - evaluate a string of SLI code
    -Synopsis: string eval -> obj1 ... objn
    -
    -Description:
    -Reads a string and evaluates its content. The resulting objects are
    -pushed onto the stack.
    -
    -As in regular batch mode the interpreter reads tokens from a 
    -stream, a string stream in this case, and immediately executes the 
    -incoming language constructs.
    -
    -A similar function to eval also occurs in Python.
    -
    -Examples: 
    - (1 2 add) eval              --> 3
    - ([1 2 3] /peter 5 def) eval --> [1 2 3]
    -
    -Author: Jochen M. Eppler
    -FirstVersion: June 2013
    -SeeAlso: cvx, exec, cst, token
    -*/
    -
    -/* Implementation notes:
    -   An alternative implementation is cvx exec. Here cvx calls cst to
    -   first create an array of token from the string which is then converted
    -   to a procedure.
    -
    -   The function ::evalstring uses cvx and executs the procedure in a 
    -   separate stopped context using the standard error handler.
    - */
    -/eval [/stringtype] {
    -  isstream pop cvx exec
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: token -  read a token from a stream or string
    -Synopsis: string token -> post any true
    -			  false	  
    -istream token -> istream any true
    -                 istream false 
    -
    -Description: reads a token from a string or stream and 
    -pushes true and extracted token plus rest-string/stream
    -on the stack (if successful).
    -
    -Examples: 
    - (1 2 hello) token -> true 1 (2 hello)
    - ({1 2 add}) token -> true {1 2 add} ()
    -
    -Author: docu by Markus Diesmann and Sirko Straube
    -SeeAlso: token_s, token_is
    -*/
    -
    -
    -/token trie
    -[/stringtype] /token_s load addtotrie
    -[/istreamtype] /token_is load addtotrie
    -def
    -
    -
    -/** @BeginDocumentation
    -Name: symbol -  read a symbol from a string
    -Synopsis: string symbol -> post any true
    -                           false	  
    -
    -Description: reads a symbol from a string  and 
    -pushes true, the extracted symbol, and the remainder
    -of the string. In contrast to the function token,
    -procedures are not assembled but the individual symbols
    -are returned. This enables the implementation of 
    -alternative parsers. 
    -
    -Examples: 
    - (1 2 hello) symbol -> true 1 (2 hello)
    - ({1 2 add}) symbol -> true /BeginProcedureSymbol (1 2 add})
    -
    -FirstVersion: 100107
    -Author: Diesmann
    -SeeAlso: token
    -*/
    -
    -/symbol trie [/stringtype] /symbol_s load addtotrie def
    -
    -/** @BeginDocumentation
    - Name: good - check good status of a stream
    - Synopsis: streamhandle good -> streamhandle true
    -                             -> streamhandle false
    - Description:
    -    This function provides a direct interface to
    -    the C++ stream::good() member function. 
    - Author: Diesmann
    - FirstVersion: 26.3.1999
    - SeeAlso: igood, ogood
    -*/ 
    -/good trie
    - [/istreamtype] { igood } addtotrie
    - [/ostreamtype] { ogood } addtotrie
    -def 
    -
    -
    -/** @BeginDocumentation
    - Name: eof - check eof status of a stream
    - Synopsis: streamhandle eof -> streamhandle true
    -                            -> streamhandle false
    - Description:
    -    This function provides a direct interface to
    -    the C++ stream::eof() member function. 
    - Author: Diesmann, Hehl
    - FirstVersion: 19.4.1999
    - SeeAlso: ieof, oeof
    -*/ 
    -/eof trie
    - [/istreamtype] { ieof } addtotrie
    - [/ostreamtype] { oeof } addtotrie
    -def 
    -
    -
    -/** @BeginDocumentation
    - Name: close - close a stream
    - Synopsis: stream close -> -
    - Description: This function closes a stream. This may be an istream
    -              or an ostream.
    - Parameters: stream(istreamtype|ostreamtype): The stream to close
    - Author: R Kupper
    - FirstVersion: May 19 1999
    - Remarks: This is just a trie-wrapper for "closeistream" and "closeostream".
    - SeeAlso: ifstream, ofstream, ostrstream
    -*/ 
    -/close trie
    - [/istreamtype] { closeistream } addtotrie
    - [/ostreamtype] { closeostream } addtotrie
    -def 
    -
    -%% Wrappers for stream functions.
    -
    -/<--_ /<-- load def
    -/<-- trie [/ostreamtype /anytype] /<--_ load addtotrie def
    -/<-_ /<- load def
    -/<- trie [/ostreamtype /anytype] /<-_ load addtotrie def
    -/endl_ /endl load def
    -/endl trie [/ostreamtype] /endl_ load addtotrie def
    -
    -%% typesave wrappers. Documentation and definition is
    -%% in sli-init.sli
    -
    -/=_ /= load def
    -/= trie
    -[/anytype] /=_ load addtotrie 
    -def
    -
    -/==_ /== load def
    -/== trie
    -[/anytype] /==_ load addtotrie 
    -def
    -%%%%%
    -
    -/** @BeginDocumentation
    - Name: abs - absolute value
    - Synopsis:  value abs -> value
    -           
    - Description:
    -    implemented by C/C++ 
    -      long   labs(long) and 
    -      double fabs(double)
    -
    -      Alternatives: Functions abs_i for integers, abs_d for doubles 
    -      (SeeAlso) -> behaviour and synopsis are the same. 
    -
    - Examples: 
    -	   -3 abs -> 3
    -	    3 abs -> 3
    -	   -3.456 abs -> 3.456
    - 
    - Remarks: If you are not sure, if the value is of type double or
    - integer, use abs. 
    - If e.g. abs_d gets an integer as argument, NEST will exit throwing an assertion.    
    -
    - Author: Diesmann, docu by Sirko Straube
    - FirstVersion: 27.4.1999
    - References: Stroustrup 3rd ed p 660, p 661 
    -
    - SeeAlso: abs_i, abs_d
    - 
    -*/ 
    -/abs trie
    - [/integertype] { abs_i } addtotrie
    - [/doubletype]  { abs_d } addtotrie
    -def 
    -
    -/** @BeginDocumentation
    - Name: neg - reverse sign of value
    - Synopsis:  value neg -> value
    -           
    - Description:
    -    implemented by C/C++ 
    -     - operator
    -
    -     Alternatives: Functions neg_i for integers, neg_d for doubles 
    -     (SeeAlso) -> behaviour and synopsis are the same. 
    -
    - Author: Diesmann
    - FirstVersion: 29.7.1999
    - Remarks:
    -  This function is called CHS in HP48S and
    -  related dialects.
    - SeeAlso: neg_i, neg_d
    -*/ 
    -/neg trie
    - [/integertype] /neg_i load addtotrie
    - [/doubletype]  /neg_d load addtotrie
    - [/booltype]    /not_b load addtotrie
    -def 
    -
    -/** @BeginDocumentation
    -
    -   Name: cva - Converts argument to an array
    -
    -   Synopsis: dict         cva -> array
    -             trie         cva -> array
    -             array        cva -> array
    -             intvector    cva -> array
    -             doublevector cva -> array
    -
    -   Description: cva converts the argument to an array. The 
    -   array is shaped close to a form usable to recreate the original
    -   data type. In case the argument is already an array, cva is 
    -   applied recursively.
    -
    -   Examples:
    -
    -   << /a 1 /b 2>> cva         --> [/a 1 /b 2]
    -   /square trie [/doubletype] { dup mul } addtotrie exch pop cva --> [/doubletype [{dup mul}]]
    -   [ << /a 1 >> << /b 2>>] cva --> [[/a 1] [/b 2]]
    -   [1 3 -5 2] cv_iv cva        --> [1 3 -5 2]
    -   [1. 3. -5. 2.] cv_dv cva    --> [1. 3. -5. 2.]
    -
    -   Author:   Marc-oliver Gewaltig
    -
    -   SeeAlso:  <<>>, trie, cst, cv1d, cv2d, cva_d, cva_t, cvd, cvi, cvlit, cvn, cvs, cvt_a
    -*/
    -
    -/trieheads_iter
    -{
    - dup length 3 eq
    - {
    -  dup First exch
    -  Last
    -  trieheads_iter
    -  exch prepend
    - }
    - {
    -  First [] exch append
    - }
    - ifelse 
    -} def
    -
    -
    -% trie trieheads
    -/trieheads
    -{
    - cva trieheads_iter
    -} def
    -
    -
    -% MemberQ
    -% type trie triematches -> true, false
    -/triematches
    -{
    - trieheads
    - exch MemberQ 
    -} def
    -
    -
    -/cva trie
    -[/dictionarytype] /cva_d load addtotrie
    -[/trietype] {cva_t exch pop} addtotrie
    -[/arraytypetype] {} addtotrie
    -[/intvectortype] /intvector2array load addtotrie
    -[/doublevectortype] /doublevector2array load addtotrie
    -[/arraytype] { {dup type /cva load triematches {cva} if} Map } addtotrie
    -def
    -
    -
    -%%%%%%
    -% commands "keys" and "values" implemented and documented
    -% in slidict.{cc,h}:
    -%%%%%%
    -/keys  [/dictionarytype] /keys load   def
    -/values[/dictionarytype] /values load def
    -
    -
    -/getline trie
    -[/istreamtype] /getline_is load addtotrie
    -def
    -
    -/** @BeginDocumentation
    -
    -   Name: cvlit - Convert name/string/procedure to literal/array
    -
    -   Synopsis: 
    -   string cvlit -> literal          
    -   name   cvlit -> literal          
    -   proc   cvlit -> array  
    -
    -   Description: 
    -   cvlit converts a given name/string to a 
    -   literal, a given function to an array.
    -
    -   Examples:
    -   (joe)   cvlit -> /joe
    -   { 5 = } cvlit -> [5 =]
    -
    -   Diagnostics:
    -   no errors are issued.
    -
    -   Remarks:
    -   The name follows the convention of PostScript and stands for
    -   ConVert to Literal.
    -   This is a typesafe wrapper to cvlit_n/cvlit_p.
    -
    -   Author:
    -   Marc-oliver Gewaltig, docu by HEP
    -
    -   SeeAlso:  cst, cva, cv1d, cv2d, cvd, cvi, cvn, cvs, cvt_a
    -
    -*/
    -/cvlit trie
    -[/nametype]      /cvlit_n  load addtotrie
    -[/proceduretype] /cvlit_p  load addtotrie
    -[/stringtype] {cvn_s cvlit_n} bind addtotrie
    -[/literaltype] {}  addtotrie
    -def
    -
    -/** @BeginDocumentation
    -
    -   Name: cvn - Convert literal/string to name
    -
    -   Synopsis: 
    -   string  cvn -> name
    -   literal cvn -> name
    -
    -   Description: 
    -   cvn converts a given literal/string to a name.
    -
    -   Examples:
    -   (joe) cvn -> joe
    -   /joe  cvn -> joe
    -
    -   Diagnostics:
    -   no errors are issued.
    -
    -   Remarks:
    -   The name follows the convention of PostScript and stands for
    -   ConVert to Name.
    -   This is a typesafe wrapper to cvn_l/cvn_s.
    -
    -   Author:
    -   Marc-oliver Gewaltig, docu by HEP
    -
    -   SeeAlso: cst, cva, cv1d, cv2d, cvd, cvi, cvlit, cvs, cvt_a
    -
    -*/
    -/cvn trie
    -[/literaltype] /cvn_l load addtotrie
    -[/stringtype]  /cvn_s load addtotrie
    -[/nametype]    {}      addtotrie
    -def
    -
    -% {} cvlp /{}
    -/cvlp trie
    -[/proceduretype] /cvlp_p  load addtotrie
    -def
    -
    -/setverbosity trie
    -[/integertype] /setverbosity_i load addtotrie
    -def
    -
    -/repeat_ /repeat load def
    -/repeat trie
    -  [/integertype /proceduretype] /repeat_ load addtotrie
    -def
    -
    -%% This is a workaround for the currently missing
    -%% float version of for. It automatically converts
    -%% all ints to double and checks for argumenttype errors
    -
    -/for_a
    -{
    -  4 1 roll          %% move procedure out of the way
    -  3
    -  {
    -    3 1 roll
    -    dup_ type /integertype eq
    -    {
    -      cvd
    -    } 
    -    {
    -      dup type /doubletype neq
    -      {
    -	/for /ArgumentType raiseerror
    -      } if
    -    } ifelse
    -  } repeat_
    -  exch_ 
    -  3 arraystore Range  %% construct list of numbers according to the parameters
    -  exch_
    -  forall_a
    -} bind def
    -
    -/for_i /for load def
    -/for trie
    -  [/integertype /integertype /integertype /proceduretype]
    -  /for_i load addtotrie
    -  [/anytype /anytype /integertype /proceduretype] %% Use Workaround
    -  /for_a load addtotrie
    -  [/anytype /integertype /integertype /proceduretype] %% Use Workaround
    -  /for_a load addtotrie
    -  [/anytype /anytype /anytype /proceduretype] %% Use Workaround
    -  /for_a load addtotrie
    -def
    -
    -/begin_ /begin load def
    -
    -/case_ /case load def
    -/case trie [/booltype /proceduretype] /case_ load addtotrie def
    -
    -/ifelse_ /ifelse load def
    -/if_ /if load def
    -
    -
    -/** @BeginDocumentation
    -Name: variant - return specific variant of function
    -Synopsis: funcname signature variant -> anytype  true
    -                               false
    -Description:
    - The operator variant checks whether a variant of the function
    - matching a particular signature is available. If so, this variant and
    - the value true are returned. If not, the return value is false. If
    - the literal specifying the function does not refer to a trie the
    - function has only a single variant and no information about the
    - signature. In this case, the unique variant is returned.  The
    - operator variant can be used to optimize SLI code for speed in
    - situations where it is guaranteed that a particular variant of a
    - function is needed. Here, replacing the overloaded function by the
    - specific variant removes the overhead of type checking. A typical
    - situation in which the data types of the arguments are known is a
    - function call inside a function with a specified signature (see
    - example below). Another situation is machine generated SLI code where
    - the machine, for example a compiler, is requested to emit optimized
    - code restricted to particular data type.
    -  
    -   /incr [/doubletype]
    -   {
    -    1.0 add
    -   } 
    -   << /add /add [/doubletype /doubletype] variant pop >> Inline 
    -   def 
    -
    -Parameters:
    -   funcname, is a literal specifying the name of the function.
    -             Usually the literal refers to a trie with several 
    -             variants.
    -   signature, is an array of literals defining the signature 
    -              of the variant searched for
    -Examples: 
    -
    - /add [/doubletype /doubletype] variant pop --> /add_dd load 
    - /add [/doubletype /stringtype] variant     --> false
    - /add [/stringtype /doubletype] variant     --> false
    - /ArrayQ [/anytype]             variant pop --> false
    - /f {(hello) ==} def 
    -              /f [/integertype] variant pop --> {(hello) ==}
    -
    -Author: Diesmann
    -FirstVersion: 090201
    - 
    -SeeAlso: Inline, CompileMath, def, addtotrie, cva
    -*/ 
    -
    -% the recursive part of operator variant
    -% signature atrie
    -/:variant
    -{
    - empty 
    - {
    -  pop pop false
    - }
    - {
    -  size 1 eq 
    -  {
    -   % the trie has no type to check
    -   % s a
    -   exch pop
    -   First
    -   true
    -  }
    -  {
    -   % the trie has a type to check
    -   % s a
    -   dup First     % s a af
    -   2 index Last  % s a af sl
    -   eq 
    -   {
    -    % the head element of the trie corresponds to 
    -    % the last element in the signature
    -    % s a
    -    % remove the last element of the signature
    -    exch Most exch
    -    % s a
    -    % reduce the trie to its second element
    -    Rest First
    -    % s a
    -    :variant
    -   }
    -   {
    -    % the head element of the trie does not correspond to 
    -    % the last element in the signature
    -    % s a
    -    size 3 eq
    -    {
    -     % the trie has alternatives available
    -     % s a
    -     Last  % s ar
    -     :variant
    -    }
    -    {
    -     % the trie does not have alternatives available
    -     % s a
    -     pop pop false
    -    }
    -    ifelse  % alternative?
    -   }
    -   ifelse  % head element corresponds
    -  }
    -  ifelse % trie has type to check
    - } 
    - ifelse % trie empty
    -}
    -def
    -
    -
    -% function signature
    -/variant [/literaltype /arraytype]
    -{
    - exch load dup type /trietype eq
    - {
    -  cva  exch pop % signature atrie
    - :variant
    - }
    - {
    -  % no trie, all signatures fit
    -  exch 
    -  pop
    -  true
    - }
    - ifelse
    -}
    -def 
    -
    -
    -/** @BeginDocumentation
    -Name: typebind - optimizes procedure for certain data type
    -Synopsis: proc dict typebind -> proc
    -                               
    -Description:
    - The operator is called on a procedure and optimizes the function
    - calls in this procedure by removing type checking of the overloaded 
    - functions according to the information in the dictionary. The dictionary 
    - specifies the names of the functions for which the type of the arguments 
    - is knon and the expected combination of argument types. typebind uses this 
    - information to replace the function calls in the procedure by the appropriate 
    - variant. This reduces the number of interpreter cycles required to evaluate
    - the procedure. However, the bigger effect is the reduction of run time. 
    - The operator typebind can be used to optimize SLI code for speed in
    - situations where it is guaranteed that a particular variant of a
    - function is needed. Here, replacing the overloaded function by the
    - specific variant removes the overhead of type checking. A typical
    - situation in which the data types of the arguments are known is a
    - function call inside a function with a specified signature (see
    - example below). Another situation is machine generated SLI code where
    - the machine, for example a compiler, is requested to emit optimized
    - code restricted to particular data type.
    -  
    -   /incr [/doubletype]
    -   {
    -    1.0 add
    -   } 
    -   << /add [/doubletype /doubletype] >> typebind 
    -   def 
    -
    - The example below achieves a reduction of interpreter cycles by 20%
    - but a reduction of rune time by 60%.
    -
    -Parameters:
    -   proc, is the procedure to be optimized
    -   dict, contains as keys the names of the operators that should
    -         be constrained to a certain combination of argument types.
    -         The value associated to the key is an array specifying the
    -         data type of each argument.
    -
    -Examples: 
    -
    - The following is the closed form expression of a postsynaptic potential at
    - at time t
    -
    - ( 
    -   weight * E/tau_syn * 1./C_m 
    -     * (   (exp(-t/tau_m)-exp(-t/tau_syn)) / (1./tau_syn - 1./tau_m)^2. 
    -         -        t*exp(-t/tau_syn)        / (1./tau_syn - 1./tau_m) 
    -      ) 
    - )
    - CompileMath /v Set
    -
    - The expression operates on doubles. Therefore we optimize with
    -
    - /v load 
    -  << 
    -     /add [/doubletype /doubletype] 
    -     /sub [/doubletype /doubletype] 
    -     /mul [/doubletype /doubletype] 
    -     /div [/doubletype /doubletype] 
    -     /pow [/doubletype /doubletype] 
    -     /exp [/doubletype ] 
    -     /neg [/doubletype ] 
    -  >> typebind /v_d Set
    -
    - We can further optimize by replacing all symbolic constants by the 
    - corresponding values
    -
    - /v_d load
    -  << 
    -    /weight    3.2
    -    /tau_syn   0.5
    -    /tau_m    10.0
    -    /C_m     250.0
    -    /t         1.345
    -    /E         E
    -  >> Inline /v_c Set
    -
    - Let us now explore the required number of interpreter cycles and the run time
    - of the three versions
    -
    - clic v cloc   
    - clic v_d cloc 
    - clic v_c cloc 
    - tic 500000 {v pop}   repeat toc 
    - tic 500000 {v_d pop} repeat toc 
    - tic 500000 {v_c pop} repeat toc 
    -
    - The results are:
    -                       v    v_d   v_c
    -   ----------------------------------
    -   cycles             138   112    97
    -    reduction factor        1.2   1.4
    -                            20%   30%
    -   ----------------------------------
    -   time               20.8  8.3   6.5
    -    reduction factor        2.5   3.2
    -                            60%   69%
    -   ----------------------------------
    -
    -Remarks:
    - typebind may be implemented by Inline, see the documentation of variant.
    -
    -
    -Author: Diesmann
    -FirstVersion: 090210
    - 
    -SeeAlso: variant, Inline, CompileMath, def, clic, tic
    -*/ 
    -/typebind [/proceduretype /dictionarytype]
    -{
    - % p d
    - exch 
    - % d p
    - cvlit
    - {
    -  dup type /nametype eq
    -  {
    -   % d n
    -   2 copy
    -   % d n d n
    -   cvlit
    -   known
    -   % d n b
    -   {
    -    % d n
    -    cvlit
    -    2 copy
    -    % d nl d nl
    -    get  
    -    % d nl k
    -    variant 
    -    pop      % assuming that the variant exists
    -    % d v
    -   }
    -   if % element is in dictionary
    -  }
    -  if    % element is a name
    - } Map
    - % d a
    - cvx
    - % d p
    - exch pop
    - % p
    -} def
    -
    -
    -
    -
    -% end of file
    diff --git a/lib/sli/unittest.sli b/lib/sli/unittest.sli
    deleted file mode 100644
    index cdebfbe9ce..0000000000
    --- a/lib/sli/unittest.sli
    +++ /dev/null
    @@ -1,1408 +0,0 @@
    -/*
    - *  unittest.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%% NEST Library for the testsuite
    -%%
    -%% (C) 2007-2012 The NEST Collaboration
    -%%        
    -%%  Authors   Jochen Martin Eppler
    -%%            eppler@biologie.uni-freiburg.de
    -%%            Markus Diesmann
    -%%            diesmann@brain.riken.jp
    -%%            Hans Ekkehard Plesser
    -%%            hans.ekkehard.plesser@umb.no
    -%%
    -
    -/unittest namespace
    -
    -/** @BeginDocumentation
    -Name: unittest::assert_or_die - Check condition and quit with exit code 1 if it fails
    -
    -Synopsis: {condition}        assert_or_die -> -
    -          bool               assert_or_die -> -
    -          {condition} string assert_or_die -> -
    -          bool        string assert_or_die -> -
    -
    -Diagnostics:
    -This function will quit nest if condition is false (exit code 1),
    -or if the condition raises an error (exit code 2).
    -It will print an error message to cerr, too.
    -If a string argument is given, it will be included in the message.
    -
    -Examples:
    -/unittest (7378) require
    -/unittest using
    -  {1 1 eq} assert_or_die
    -  {1 0 eq} (1 != 0) assert_or_die
    -  {1 /hello add 1 eq} assert_or_die
    -endusing
    -
    -Author: R. Kupper, J. M. Eppler
    -
    -FirstVersion: 07/30/2007
    -
    -Availability: SLI-2.0
    -
    -SeeAlso: unittest::fail_or_die, unittest::pass_or_die, assert, quit
    -*/
    -
    -/assert_or_die[/booltype]
    -{
    -  not
    -  {
    -    M_FATAL (unittest::assert_or_die)
    -    (Assertion failed) 
    -    /die_message lookup { (: ) exch join join } if
    -    (.) join message
    -
    -    M_FATAL (unittest::assert_or_die)
    -    (Exiting with code 1.) message
    -    1 quit_i
    -  } if
    -} bind def
    -
    -/assert_or_die[/proceduretype]
    -{
    - << exch /func exch >>
    - begin
    -
    -   /func load pass_or_die
    -   % check if the condition returned a boolean:   
    -   dup type /booltype eq not
    -   {
    -      M_FATAL (unittest::assert_or_die)
    -      (Expression did not resolve to a boolean)
    -      /die_message lookup { (: ) exch join join } if
    -      (.\nExpression:\n) join /func load pcvs join  message
    -
    -      M_FATAL (unittest::assert_or_die)
    -     (Exiting with code 2.) message
    -
    -     2 quit_i    
    -   } if
    -   
    -   not
    -   {
    -     M_FATAL (unittest::assert_or_die)
    -     (Assertion failed)     
    -     /die_message lookup { (: ) exch join join } if
    -     (.\nAssertion:\n) join /func load pcvs join  message
    -
    -     M_FATAL (unittest::assert_or_die)
    -     (Exiting with code 1.) message
    -
    -     1 quit_i
    -  } if
    -
    - end
    -} bind def
    -
    -/assert_or_die[/booltype /stringtype]
    -{
    -  << >> 
    -  begin
    -    /die_message Set
    -    assert_or_die
    -  end
    -} bind def
    -
    -/assert_or_die[/proceduretype /stringtype]
    -{
    -  << >> 
    -  begin
    -    /die_message Set
    -    assert_or_die
    -  end
    -} bind def
    -
    -/** @BeginDocumentation
    -Name: unittest::pass_or_die - Execute a code block and quit with exit code 2 if it fails.
    -
    -Synopsis: {code}        pass_or_die -> -
    -          {code} string pass_or_die -> -
    -
    -Diagnostics:
    -This function will quit nest if the code block raises any error.
    -It will print an error message to cerr, too. If string is given, it will be 
    -included in the error message.
    -
    -Examples:
    -/unittest (7378) require
    -/unittest using
    -  {1 1 add} pass_or_die
    -  {1 /hello add} (testing /hello) pass_or_die
    -endusing
    -
    -Author: R. Kupper
    -
    -FirstVersion: 2-jul-2008
    -
    -Availability: SLI-2.0
    -
    -SeeAlso: unittest::assert_or_die, unittest::fail_or_die, stopped, assert, quit
    -*/
    -
    -/pass_or_die[/proceduretype]
    -{
    -  << exch /func exch >>
    -  begin
    -
    -  /func load stopped
    -  {
    -    handleerror    
    -
    -    M_FATAL (unittest::pass_or_die)
    -    (Code block did not pass)
    -    /die_message lookup { (: ) exch join join } if
    -    (.\nCode block:\n) join /func load pcvs join  message
    -
    -    M_FATAL (unittest::pass_or_die) (Exiting with code 2.) message
    -    2 quit_i
    -  } if
    -  end
    -} bind def
    -
    -/pass_or_die[/proceduretype /stringtype]
    -{
    -  << >> 
    -  begin
    -    /die_message Set
    -    pass_or_die
    -  end
    -} bind def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::fail_or_die - Execute a code block and exit with exit code 3 if it does not raise an error.
    -
    -Synopsis: { code } fail_or_die -> -
    -          { code } string fail_or_die -> -
    -
    -Description:
    -This procedure is provided to test that certain errors are raised, e.g., when
    -illegal values are set.
    -
    -Diagnostics:
    -This function will quit nest if the code does NOT raise an error 
    -(exit code 3). It will print an error message to cerr, too.
    -
    -Examples:
    -/unittest (7391) require
    -/unittest using
    -  { 1 0 div } fail_or_die    
    -  { << /resolution 0 >> SetKernelStatus} fail_or_die
    -endusing
    -
    -Author: H. E. Plesser
    -
    -FirstVersion: 07/02/2008
    -
    -Availability: SLI-2.0
    -
    -SeeAlso: unittest::assert_or_die, unittest::pass_or_die, assert, quit
    -*/
    -/fail_or_die[/proceduretype]
    -{
    -  << exch /func exch >>
    -  begin
    -    
    -    /func load stopped not  % got a problem if we were NOT stopped
    -    {
    -      M_FATAL (unittest::fail_or_die)
    -      (Code block failed to raise an error)
    -      /die_message lookup { (: ) exch join join } if
    -      (.\nCode block:\n) join /func load pcvs join  message
    -
    -      M_FATAL (unittest::fail_or_die) (Exiting with code 3.) message
    -
    -      3 quit_i
    -    } 
    -    if
    -
    -    % clear errordict, gleaned from /handleerror
    -    errordict /message undef
    -    errordict /command undef
    -    errordict begin /newerror false def end
    -
    -    % restore stack
    -    errordict /ostack get restoreostack
    -  end
    -
    -} bind def 
    -
    -/fail_or_die[/proceduretype /stringtype]
    -{
    -  << >> 
    -  begin
    -    /die_message Set
    -    fail_or_die
    -  end
    -} bind def
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::failbutnocrash_or_die - Execute a code block and exit with exit code 3 if it does not raise a scripterror
    -
    -Synopsis: { code } [string] failbutnocrash_or_die -> -
    -
    -Description:
    -The procedure tests that a specific error, a scripterror, is raised. An example
    -is a call of operator add in a situation where the operand stack is empty. add
    -raises a StackUnderflow error in this case which is a scripterror and the desired
    -behavior. There are several alternative and undesired behaviors of the code block
    -in question. add may return without raising an error, this is not the expected behavior
    -and therefore failbutnocrash_or_die reports a problem. However, other scenarios 
    -are that the code block causes an assertion to fail or that it causes a segmentation
    -fault. In contrast to fail_or_die, failbutnocrash_or_die survives such a crash of
    -the code block to be tested. This is achieved by probing the code block in a separate
    -nest instance and inspecting the result. The procedure uses the symbolic exit codes
    -defined in statusdict::exitcodes, scripterror is one of them.
    -
    -Diagnostics:
    -This function will quit nest  (exit code 3) if the code does NOT raise an error of the 
    -scripterror type. It will print an error message to cerr, too.
    -
    -Examples:
    - {add}     (add ok) failbutnocrash_or_die  -> success
    - {1 0 div} failbutnocrash_or_die  -> success
    - {add_dd}  failbutnocrash_or_die  -> quit
    -
    -Author: Diesmann
    -
    -FirstVersion: 090209
    -
    -Availability: SLI-2.0
    -
    -SeeAlso: unittest::fail_or_die, assert, quit
    -*/
    -/failbutnocrash_or_die [/proceduretype]
    -{
    - << exch /func exch >>
    -  begin
    -
    - (echo ")
    - /func load pcvs join
    - ( exec" | ) join 
    - (') statusdict /argv get First (') join join join
    - ( -) join /command Set
    -
    -% command ==
    -
    - command 0 shpawn
    - pop         % don't know what to do with the boolean returnd by shpawn
    -
    - statusdict/exitcodes/scripterror :: eq
    - {
    -  % nest terminated with a SLI error, e.g. StackUnderflow
    -  % this is the desired behavior
    - }
    - {
    -  % nest chrashed, for example with return values 
    -  %  statusdict/exitcodes/abort ::    (e.g. caused by failed assertion)
    -  %  statusdict/exitcodes/segfault :: (e.g illegal access of memory)
    -  % or nest completed successfully
    -  % this is the undesired behavior
    -   M_FATAL (unittest::failbutnocrash_or_die)
    -   (Code block failed to raise an error)
    -   /die_message lookup { (: ) exch join join } if
    -   (.\nCode block:\n) join /func load pcvs join  message
    -
    -  M_FATAL (unittest::failbutnocrash_or_die) (Exiting with code 3.) message
    -
    -  3 quit_i  
    -
    - }
    - ifelse
    -
    -  end
    -} def
    -
    -/failbutnocrash_or_die[/proceduretype /stringtype]
    -{
    -  << >> 
    -  begin
    -    /die_message Set
    -    failbutnocrash_or_die
    -  end
    -} bind def
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::passorfailbutnocrash_or_die - Execute a code block and exit with exit code 3 if it crashes
    -
    -Synopsis: { code } [string] passorfailbutnocrash_or_die -> -
    -
    -Description:
    -This procedure executes the code. Anything except a crash (e.g. due to uncaught C++ exception such
    -as a segfault) is considered a pass.
    -
    -Diagnostics:
    -This function will quit nest  (exit code 3) if the code crashed.
    -
    -Examples:
    - { 1 0 add } passorfailbutnocrash_or_die -> success   % code passes
    - { 1 0 div } passorfailbutnocrash_or_die -> success   % code fails, but does not crash
    -
    -Author: Diesmann, Plesser
    -
    -FirstVersion: 2014-11-12
    -
    -SeeAlso: unittest::failbutnocrash_or_die, assert, quit
    -*/
    -/passorfailbutnocrash_or_die [/proceduretype]
    -{
    - << exch /func exch >>
    -  begin
    -
    - (echo ")
    - /func load pcvs join
    - ( exec" | ) join 
    - (') statusdict /argv get First (') join join join
    - ( -) join /command Set
    -
    -% command ==
    -
    - command 0 shpawn
    - pop         % don't know what to do with the boolean returnd by shpawn
    -
    - % check exitcode returned by shpawn
    - statusdict/exitcodes :: [[/success /scripterror]] get
    - exch
    - MemberQ
    - {
    -  % nest terminated with success or a SLI error, e.g. StackUnderflow
    -  % this is the desired behavior
    - }
    - {
    -  % nest chrashed, for example with return values 
    -  %  statusdict/exitcodes/abort ::    (e.g. caused by failed assertion)
    -  %  statusdict/exitcodes/segfault :: (e.g illegal access of memory)
    -  % or nest completed successfully
    -  % this is the undesired behavior
    -   M_FATAL (unittest::passorfailbutnocrash_or_die)
    -   (Code block crashed)
    -   /die_message lookup { (: ) exch join join } if
    -   (.\nCode block:\n) join /func load pcvs join  message
    -
    -  M_FATAL (unittest::passorfailbutnocrash_or_die) (Exiting with code 2.) message
    -
    -  3 quit_i  
    -
    - }
    - ifelse
    -
    -  end
    -} def
    -
    -/passorfailbutnocrash_or_die[/proceduretype /stringtype]
    -{
    -  << >> 
    -  begin
    -    /die_message Set
    -    passorfailbutnocrash_or_die
    -  end
    -} bind def
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::crash_or_die - Execute a code block and exit with exit code 3 if nest does not crash
    -
    -Synopsis: { code } [string] crash_or_die -> -
    -
    -Description:
    -
    -The procedure tests that the code block crashes nest. An example
    -is a call of operator add_dd in a situation where the operand stack is empty. 
    -add_dd does not check whether the operand stack contains enough data, no exception
    -is raised. Therefore, the assertion in the C++ implementation of add_dd that the
    -operand stack contains at least 2 elements fails and nest terminates with the exit
    -code statusdict::exitcodes::abort. This is the desired behavior and therefore 
    -crash_or_die reports success. There are several alternative and undesired behaviors 
    -of the code block in question. add_dd may raise a StackUnderflow error, return without 
    -raising an error, or crash because of a segmentation fault. This is not the expected behavior 
    -and therefore crash_or_die reports a problem. Like failbutnocrash_or_die, crash_or_die 
    -survives a crash of the code block by probing the code block in a separate nest instance 
    -and inspecting the result. The procedure uses the symbolic exit codes defined in 
    -statusdict::exitcodes, abort is one of them.
    -This test does not work if nest is compiled with the NDEBUG flag set and it is not
    -safe to just test for a crash because nest may become inconsistent without crashing. 
    -Therefore, crah_or_die always reports success if the NDEBUG flag is set.
    -
    -Diagnostics:
    -This function will quit nest (exit code 3) if the code does NOT crash nest
    -with exit code abort. It will print an error message to cerr, too.
    -
    -Examples:
    - {add_dd} (add_dd)  crash_or_die  -> success
    - {add}      crash_or_die  -> quit
    -
    -
    -Author: Diesmann
    -
    -FirstVersion: 090209
    -
    -Availability: SLI-2.0
    -
    -SeeAlso: unittest::failbutnocrash_or_die, assert, quit
    -*/
    -/crash_or_die [/proceduretype]
    -{
    - << exch /func exch >>
    - begin
    - statusdict/ndebug :: not
    - {
    -
    -  (echo ")
    -  /func load pcvs join
    -  ( exec" | ) join 
    -  (') statusdict /argv get First (') join join join
    -  ( -) join /command Set
    -
    -  command 0 shpawn
    -  pop         % don't know what to do with the boolean returnd by shpawn
    -
    -  statusdict/exitcodes/abort :: eq
    -  {
    -   % nest terminated with abort, usually a failed assertion
    -   % this is the desired behavior
    -  }
    -  {
    -   % nest chrashed, for example with return values 
    -   %  statusdict/exitcodes/scripterror ::    (a SLI exception)
    -   %  statusdict/exitcodes/segfault :: (e.g illegal access of memory)
    -   % or nest completed successfully
    -   % this is the undesired behavior
    -   M_FATAL (unittest::crash_or_die)
    -   (Code block failed to crash)
    -   /die_message lookup { (: ) exch join join } if
    -   (.\nCode block:\n) join /func load pcvs join  message
    -
    -   M_FATAL (unittest::crash_or_die) (Exiting with code 3.) message
    -
    -   3 quit_i  
    -  }
    -  ifelse
    - } if   % of ndebug
    - end
    -} def
    -
    -/crash_or_die[/proceduretype /stringtype]
    -{
    -  << >> 
    -  begin
    -    /die_message Set
    -    crash_or_die
    -  end
    -} bind def
    -
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::ToUnitTestPrecision  - reduce argument to specified precision.
    -   
    -Synopsis:
    -   double integer ToUnitTestPrecision -> double or integer
    -   array  integer ToUnitTestPrecision -> array
    -   other  integer ToUnitTestPrecision -> other
    -   
    -Description:
    -Reduces its double argument to the precision specified by the integer.
    -If the first argument is an array, ToUnitTestPrecision is recursively
    -applied to all elements of the array. Any other first argument is
    -returned unchanged. This is useful in processing heterogeneous arrays.
    -ToUnitTestPrecision uses a C++ output stream to carry out the reduction
    -of precision and  manipulator setprecision() is used to set the precision.
    -The contents of the stream is converted back to a numerical object by
    -operator token. This guarantees that for the conversion from text to double
    -the same algorithm
    -is used for the argument of  ToUnitTestPrecision and the reference data,
    -usually explicitly specified in the test file as an array. 
    -The double argument may contain an integral value or be converted to and
    -integral value due to the required precision. In this case the output
    -operator of the stream may decide to represent the value as an integer,
    -i. e. without a decimal point, trailing zeros, or an exponent. This often
    -increases the readability of reference data arrays (see e.g. test_iaf). The
    -SLI interpreter function then returns an object of type integer.
    -The operators token and cvd use the same algorithm for converting text to
    -to a numerical value. However cvd always return a double.
    -ToUnitTestPrecision is not an efficient algorithm for rounding numerical
    -values. The idea rather is to have an algorithm which is guaranteed to be
    -compatible with the text stream output of a simulation.
    -
    -
    -Examples:
    -    7.83635342928 6 ToUnitTestPrecision  -->    7.83635
    -  -32.38763534    6 ToUnitTestPrecision  -->  -32.3876
    -        (flower)  6 ToUnitTestPrecision  -->   (flower)
    -  [7.83635342928 (flower) -32.38763534]
    -                  6 ToUnitTestPrecision   --> [7.83635 (flower) -32.3876]
    -  -70             6 ToUnitTestPrecision type --> /integertype
    -  -70.0           6 ToUnitTestPrecision type --> /integertype
    -  
    -Author: Markus Diesmann
    -
    -FirstVersion: 071108
    -
    -SeeAlso: unittest::assert_or_die, token, cvd, testsuite::test_iaf
    -*/
    -
    -/ToUnitTestPrecision [/doubletype /integertype]
    -{
    - osstream pop exch setprecision exch <- str token rolld pop pop
    -} def
    -
    -/ToUnitTestPrecision [/arraytype /integertype]
    -{
    - exch {1 index ToUnitTestPrecision} Map exch pop
    -} def
    -
    -/ToUnitTestPrecision [/anytype /integertype]
    -{
    - pop % do nothing
    -} def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::InflateUnitTestData  - reformat compressed reference data
    -Synopsis:
    - array1 array2 InflateUnitTestData -> array3
    -Parameters:
    - array1 - array of sorted simulation step sizes [h1,...,hn]
    -          All simulation step sizes must be multiples of the
    -	  smallest one h1.
    - array2 - array of reference data with one row per data point.
    -          the last element v in each row is the value of the recorded
    -	  quantity. The first element in each row is the time stamp
    -	  t1 of the smallest step size. The time stamps of larger
    -	  step sizes are located between t1 and v if the temporal
    -	  position coincides with t1.
    - array3 - array of length n with one entry per step size h1,...,hn.
    -          Each entry is a two-dimensional vector of tuples [ti,vi],
    -	  where ti is a time stamp and vi the corresponding value of
    -	  the recorded quantity.
    -Description:
    - The idea of the compressed data format is to represent the reference
    - data in a compact human readable format at the end of the testsuite
    - files. Although redundant, the time stamps of all step sizes
    - corresponding to a particular reference data point are listed. 
    -Examples:
    -% h=   (in ms)
    -[ 0.1   0.2    0.5   1.0 ]
    -%
    -% time                    voltage
    -[
    -[  1                     -69.4229]    
    -[  2     1               -68.8515]    
    -[  3                     -68.2858]    
    -[  4     2               -67.7258]
    -[  5           1         -67.1713]
    -[  6     3               -66.6223]
    -[  7                     -66.0788]
    -[  8     4               -65.5407]
    -[  9                     -65.008]
    -[ 10     5     2    1    -64.4806]
    -[ 11                     -63.9584]
    -]
    - 
    -
    - 
    -Author: Markus Diesmann
    -FirstVersion: 071128
    -SeeAlso: unittest::ToUnitTestPrecision
    -*/
    -
    -/InflateUnitTestData
    -{
    - <</di [] >> begin
    - /d Set /h Set
    -
    - h 1 Drop h [1] Part div {round cvi} Map /hm Set
    -
    - d [/All [1 -1]] Part /di AppendTo
    -
    - hm
    - {
    -  /m Set          % multipler of highest resolution
    -
    -  d [[1 -1] 1] Part           % first and last entry at highest resolution
    -  {cvd m div ceil cvi m mul} 
    -    1 MapAt                   % reduce to first entry available at this resolution
    -  d [1 1] Part sub 1 add      % index in data array
    -  m append /r Set             % distance between available data points 
    -  
    -
    -  d r Take [/All [2 -1]] Part /di AppendTo
    -
    -  d {[2] Drop } r Range 1 1 Partition MapAt /d Set
    - }
    - forall
    -
    - [h di] Transpose
    - end
    -} def
    -
    -
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::mpirun_self - calls a distributed version of nest on the calling file
    -
    -Synopsis: integer mpirun_self -> -
    -
    -Description:
    -
    -The command starts a distributed version of nest with the file
    -containing the call of mpirun_self.  The argument of mpirun_self is
    -the number of jobs that should participate in the distributed
    -computation,
    -
    -Examples:
    -
    -
    -Author: Diesmann
    -
    -FirstVersion: 090716
    -
    -SeeAlso: unittest::distributed_assert_or_die, nest_indirect
    -*/
    -/mpirun_self
    -{
    - statusdict/prefix :: (/bin/nest ) join
    - statusdict/files :: First
    - mpirun shpawn exch pop  % keep only istream
    -}
    -def
    -
    -/* 
    -Name: :exec_test_function - Execute test function in distributed job
    -
    -Synopsis: array func exec_test_function -> -
    -
    -Description:
    -The array argument is ignored. The test function func is executed and the 
    -result sent back to the calling process via stdout (shpawn piping). The test
    -function must leave exactly one element on the stack.
    -*/
    -/:exec_test_function
    -{
    -  exch pop          % don't need the list of number of jobs
    -  mark exch exec    % execute the test function
    -                    % if the test function terminates with an exception,
    -                    % execution will terminate here, and no result
    -                    % will be sent below    
    -  counttomark /stackload Set
    -  stackload 1 eq 
    -  {
    -    % handle case with one result special, since we need result from stack    
    -    /result :send_distributed
    -  }
    -  {
    -    stackload 0 eq 
    -      { /passed :send_distributed } 
    -      { /error  :send_distributed }  % more than one item left on stack
    -    ifelse
    -  } ifelse
    -  % remove all remaining return values including the mark
    -  counttomark npop pop
    -}
    -def
    -
    -/* 
    -Name: :send_distributed - Package and send message from parallel run
    -
    -Synposis: [result] flag :send_distributed -> - 
    -
    -Description:
    -
    -This function packages builds a message from a parallel process and dispatches it
    -via pipe to the controlling process.
    -
    -flag   - one of /passed, /result and /error
    -result - any data (no nested dicts), will be used only if flag is /result
    -
    -The message dispatched to the controlling process is a string with the format
    -
    -   :FLAG:RANK:[RESULT AS STRING]:
    -
    -where FLAG is (passed), (result) or (error), RANK is the MPI rank of
    -the executing process and RESULT AS STRING is present only for the
    -/result flag an is the result of calling pcvs on the result argument
    -to send_distributed.  This message is suitable for collection by
    -:collect_distributed_results.
    -
    -Remarks: result can be a dict, but must not contain dicts
    -
    -SeeAlso: unittest:mpirun_self
    -*/
    -/:send_distributed
    -{
    -  /flag Set
    -  (:) flag cvs join (:) join Rank cvs join (:) join
    -  flag /result eq 
    -  { 
    -    % if result is dict, serialize as array 
    -    exch    
    -    DictQ { cva /:serialized:dict exch 2 arraystore } if    
    -    pcvs join 
    -  } if
    -  (:) join
    -  =
    -} def
    -
    -% compile input line regexp once while installing unittest library
    -% used by :parse_input_line
    -/:message_line_regexp (:(passed|result|error):([0-9]+):(.*):) regcomp def
    -
    -% string [begin end] :extract_regexp_match -> string[begin:end]  (pythonic indexing)
    -/:extract_regexp_match
    -{
    -  arrayload 2 eq assert 
    -  1 pick sub  % stack: string start length
    -  getinterval
    -} def
    -
    -/* 
    - Name: :parse_message_line - Parse one input line for message and return flag and result
    -
    - Synposis: string :parse_message_line -> [flag rank [result]] true
    -                                       false
    -
    - Description:
    - Parses string to see if it is a message from :send_distributed. Returns false if
    - no match, otherwise, returns an array containing the messag flag (/passed, /result, /error),
    - the rank of the sending process (as int) and, for flag /result, the result as string.
    - */
    -/:parse_message_line
    -{
    -  << >> begin
    -    /line Set
    -
    -    mark  % so we can clear any mess left in case of errors
    -
    -    % The argument value 4 is for regexec per r9713. Once #560 is fixed, it 
    -    % may need to be changed.
    -    :message_line_regexp line 4 0 regexec
    -
    -    % The remaining analysis is done in a stopped context, so we avoid the need for
    -    % deeply nested if-elses.
    -    {
    -      0 neq { pop stop } if  % regexp did not match, remove meaningless match array
    -
    -      /matches Set  % array of matches: [total regexp, flag, rank, result]
    -
    -      % ensure that regexp matched entire line
    -      matches 0 get arrayload % get start and end of total match
    -      2 eq (unittest:::parse_message_line: clean message line) assert_or_die  
    -      line length eq exch 0 eq and not { stop }  if  
    -
    -      % extract flag and check it is valid
    -      /flag line matches 1 get :extract_regexp_match cvlit def
    -      [/passed /result /error] flag MemberQ not { stop } if
    -
    -      % extract rank and check it is valid
    -      /rank line matches 2 get :extract_regexp_match cvi def
    -      rank 0 lt { stop } if
    -
    -      % extract result, must be empty unless flag==/result
    -      /result line matches 3 get :extract_regexp_match def
    -      result length 0 gt flag /result neq and { stop } if
    -
    -      % We now know that
    -      %   - flag is valid
    -      %   - rank is non-negative int
    -      %   - if flag is not /result, then result is empty
    -      % i.e., the message is correctly formatted
    -
    -      % convert result to SLI objects; empty array for empty string
    -      result cst % convert to token string
    -      empty not  % test array for emptyness, not string, to handle strings of spaces
    -      { cvx_a exec } if   % otherwise, leave empty array 
    -      /result Set
    -      % if result is serialized dict, de-serialize
    -      result ArrayQ 
    -      { 
    -        empty not
    -        {
    -	  First /:serialized:dict eq 
    -	  { 
    -            result length 2 eq 
    -            (unittest:::parse_message_line: deserialization structure ok) assert_or_die
    -	    result 1 get dup length 2 mod 0 eq 
    -            (unittest:::parse_message_line: proper key-value pairs) assert_or_die
    -	    2 Partition   % split array to key-value pairs
    -	    /result << >> def         % insert into result dict   
    -	    { result exch arrayload ; put } forall	
    -	  } if
    -	}
    -	{
    -	  pop
    -	} ifelse
    -      }
    -      {
    -        pop
    -      } ifelse     
    -
    -      % We leave the output array on the stack. We do NOT push a bool to
    -      % signal status, that is indicated by the fact that we did not call stop
    -      [ flag rank result ]
    -    } 
    -    stopped
    -    {
    -      % stopped, either explicitly above or due to error; 
    -      % we clean up if error and signal that we did not parse a message
    -      errordict /newerror get { errordict /newerror false put } if
    -      counttomark npop pop
    -      false
    -    }
    -    {
    -      % not stopped, we got proper result, flag true
    -      counttomark 1 eq assert  % only result error on stack
    -      exch pop                 % remove mark      
    -      true      
    -    } ifelse
    -} def 
    -
    -
    -/* 
    -Name: :collect_distributed_results - Collects results from spawned parallel runs
    -
    -Synopsis: istream num_procs mode :collect_distributed_results -> array status
    -
    -Description:
    -
    -The input argument to :collect_distributed_results are the istream
    -returned by mpirun_self and the number of mpi processes started.
    -:collect_distributed_results reads from this istream the output of all
    -ranks in the parallel process executed by mpirun_self. The individual
    -processes should send results by calling :send_distributed.
    -
    -If mode is 
    -  /none no MPI process should send a result 
    -  /one  precisely one MPI process should send a result
    -  /each each MPI process should send a result
    -In any case, all MPI process should pass.
    -
    -The array returned contains one string result sent, in arbitrary order. 
    -status is true if the requirements according to mode are fulfilled. status
    -may be false if one or several parallel processes have crashed.
    -
    -SeeAlso: unittest::mpirun_self
    -*/
    -/:collect_distributed_results
    -{  
    -  << >> begin  
    -  /mode Set
    -  /nproc Set
    -  nproc array /pass_count   Set  % array with one element per rank  
    -  nproc array /result_count Set  % array with one element per rank  
    -  [ exch
    -    { 
    -      eof 
    -      {
    -	exit
    -      } 
    -      {
    -	getline
    -	{
    -          :parse_message_line
    -	  { 
    -            arrayload 3 eq 
    -            (unittest:::collect_distributed_results: good parse) assert_or_die
    -	    
    -	    /res Set /rank Set /flag Set
    -            [/passed /result] flag MemberQ   % executed correctly, count as pass
    -            {
    -	      % hike result counter for rank	    
    -	      /pass_count pass_count dup rank get 1 add rank exch put def
    -	    } if
    -            /result flag eq   % got result
    -            {
    -	      % hike result counter for rank	    
    -	      /result_count result_count dup rank get 1 add rank exch put def
    -	      res exch % leave result on stack	    
    -	    } if
    -	  } if
    -	} if 
    -      } ifelse 
    -    } loop pop
    -  ]
    -
    -  % pass count must be exactly one for all ranks
    -  /ones_array nproc array 1 add def
    -  pass_count ones_array eq 
    -
    -  % test whether mode requirements are fulfilled
    -  mark
    -    mode /each eq { result_count ones_array eq exit } case
    -    mode /one  eq { result_count Plus 1 eq exit     } case
    -    mode /none eq { result_count Plus 0 eq exit     } case
    -  switch
    -  and
    -
    -  mode /none eq { exch pop } if  % drop empty result array
    -
    -  end  
    -
    -} def
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::distributed_assert_or_die - Checks whether code is independent of number of number of jobs
    -
    -Synopsis: array proc proc distributed_assert_or_die -> -
    -          array proc distributed_assert_or_die -> -
    -
    -Description:
    -
    -The array specifies a list of numbers of
    -jobs. distributed_assert_or_die executes the procedure specified as
    -the second argument in parallel for all of the numbers of jobs given
    -in the arrays. This means that distributed_assert_or_die carries out
    -as many distributed simulations as there are entries in the array. 
    -
    -In each of the simulations a single job is expected to return a
    -value on the stack. It is of no importance which job returns the
    -value.  After completion of all simulations distributed_assert_or_die
    -compares the results of all the simulations using the second proc
    -as the test function. If no second proc is given distributed_assert_or_die
    -requires that all results are "true".
    -
    -A variant of this function  distributed_invariant_assert_or_die
    -requires all results to be identical.
    -
    -distributed_assert_or_die assumes that it is called from a file and
    -that this file contains only a single call of
    -distributed_assert_or_die because all distributed instances of the
    -simulator will rerun this file.  In addition distributed_assert_or_die
    -assumes that the test file is run with a version of nest capable of
    -spawning further instances of nest.  This can be assured by using
    -nest_indirect instead of the nest binary directly. The test file
    -should not make the call of distributed_assert_or_die or the
    -termination of the test file depending on the status flags is_mpi or
    -have_mpi. This would interfere with the proper functioning of
    -distributed_assert_or_die and the status flags have already been
    -checked by nest_indirect at this point.
    -
    -Author: Diesmann
    -
    -FirstVersion: 090715
    -
    -SeeAlso: unittest::distributed_invariant_assert_or_die, nest_indirect, unittest::mpirun_self, unittest::assert_or_die
    -*/
    -/distributed_assert_or_die 
    -[/arraytype /proceduretype /proceduretype]
    -{
    - rollu    % safe the test function
    - statusdict/is_mpi ::   % are we in a distributed job ?
    - {
    -   % we are in a distributed job    
    -   :exec_test_function    
    - }
    - {
    -   % we are in the wrapper dispatching and collecting
    -   % we need to launch the distributed jobs
    -   pop                 % don't need the test function
    -   {
    -     /num_procs Set
    -     (N_MPI: ) =only num_procs =   % display number of processes
    - 
    -     num_procs mpirun_self
    -     num_procs /one :collect_distributed_results
    -     % got a result from one MPI process
    -     (unittest::distributed_assert_or_die: collected results) assert_or_die          
    -    } Map
    -   1 Flatten              % unpack, so we have flat list with one item per process     
    -   exch 
    -   (unittest::distributed_assert_or_die: results ok) assert_or_die  % using the test function
    - }
    - ifelse 
    -}
    -def
    -
    -/distributed_assert_or_die 
    -[/arraytype /proceduretype]
    -{
    - { true exch { and } Fold } distributed_assert_or_die  % all runs return true 
    -}
    -def 
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::distributed_invariant_assert_or_die - Checks whether code is independent of number of number of jobs
    -
    -Synopsis: array proc distributed_invariant_assert_or_die -> -
    -       
    -Description:
    -
    -The array specifies a list of numbers of
    -jobs. distributed_assert_or_die executes the procedure specified as
    -the second argument in parallel for all of the numbers of jobs given
    -in the arrays. This means that distributed_invariant_assert_or_die carries out
    -as many distributed simulations as there are entries in the array. 
    -
    -In each of the simulations a single job is expected to return a
    -value on the stack. It is of no importance which job returns the
    -value.  After completion of all simulations distributed_invariant_assert_or_die
    -checks whether the results of all runs are identical.
    -
    -See distributed_assert_or_die for further documentation and 
    -implementation details.
    -
    -Author: Diesmann
    -
    -FirstVersion: 100925
    -
    -SeeAlso: unittest::distributed_assert_or_die, nest_indirect, unittest::mpirun_self, unittest::assert_or_die
    -*/
    -/distributed_invariant_assert_or_die
    -[/arraytype /proceduretype]
    -{
    - {Split length 1 eq} distributed_assert_or_die    % all runs return same result
    -}
    -def 
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::distributed_collect_assert_or_die - Checks whether result is independent of number of number of jobs
    -
    -Synopsis: array proc proc distributed_collect assert_or_die -> -
    -          array proc      distributed_collect assert_or_die -> -
    -
    -Description:
    -
    -The array specifies a list of numbers of
    -jobs. distributed_collect_assert_or_die executes the procedure specified as
    -the second argument in parallel for all of the numbers of jobs given
    -in the arrays. This means that distributed_collect_assert_or_die carries out
    -as many distributed simulations as there are entries in the array. 
    -
    -In each of the simulations all jobs are expected to return a value on
    -the stack. The order in which the jobs are completed is of no
    -importance.  After completion of all simulations
    -distributed_collect_assert_or_die compares the sets of results of all
    -the simulations using the comparison function supplied by the second 
    -procedure. If the second procedure is not given it requires that all
    -jobs of all runs return true.
    -
    -A variant of this function distributed_collect_assert_or_die
    -requires that the contents of all sets of results is identical. The
    -order of the results in each set is irrelevant.
    -
    -distributed_collect_assert_or_die assumes that it is called from a
    -file and that this file contains only a single call of
    -distributed_collect_assert_or_die because all distributed instances of
    -the simulator will rerun this file.  In addition the function assumes
    -that the test file is run with a version of nest capable of spawning
    -further instances of nest.  This can be assured by using nest_indirect
    -instead of the nest binary directly. The test file should not make the
    -call of distributed_collect_assert_or_die or the termination of the
    -test file depending on the status flags is_mpi or have_mpi. This would
    -interfere with the proper control flow and the status flags have
    -already been checked by nest_indirect at this point.
    -
    -Author: Diesmann
    -
    -FirstVersion: 100925
    -
    -SeeAlso: unittest::distributed_assert_or_die, unittest::distributed_collect_assert_or_die, nest_indirect, unittest::mpirun_self, unittest::assert_or_die
    -*/
    -/distributed_collect_assert_or_die 
    -[/arraytype /proceduretype /proceduretype]
    -{
    -  rollu  % save the test function
    -  statusdict/is_mpi ::   
    -  {
    -    % we are in a distributed job    
    -    :exec_test_function    
    -  }
    -  {
    -    % we are in the wrapper dispatching and collecting
    -    % we need to launch the distributed jobs
    -    pop                 % don't need the test function
    -    {
    -      /num_procs Set
    -      (N_MPI: ) =only num_procs =   % display number of processes
    -
    -      num_procs mpirun_self
    -      num_procs /each :collect_distributed_results
    -      (unittest::distributed_collect_assert_or_die: collected results)
    -      assert_or_die          % got a result from each MPI process
    -    } Map
    -    exch
    -    (unittest::distributed_collect_assert_or_die: results ok) assert_or_die  % using the test function
    -  }
    -  ifelse 
    -}
    -def
    -
    -
    -/distributed_collect_assert_or_die 
    -[/arraytype /proceduretype]
    -{
    - { {true exch {and} Fold}  Map  true exch {and} Fold } 
    -
    - distributed_collect_assert_or_die   % all runs return true for all jobs 
    -}
    -def 
    -
    -/** @BeginDocumentation
    -Name: unittest::distributed_process_invariant_collect_assert_or_die - Checks whether the pooled results of all ranks are equal, independent of the number of MPI processes
    -
    -Synopsis: array proc distributed_process_invariant_collect_assert_or_die -> -
    -      
    -Description:
    -
    -The array specifies a list of numbers of
    -jobs. distributed_process_invariant_collect_assert_or_die executes the
    -procedure specified as the second argument in parallel for all of the
    -numbers of jobs given in the arrays. This means that
    -distributed_process_invariant_collect_assert_or_die carries out as many
    -distributed simulations as there are entries in the array.
    -
    -In each of the simulations all jobs are expected to return a value on
    -the stack. The order in which the jobs are completed is of no
    -importance.  After completion of all simulations
    -distributed_process_invariant_ collect_assert_or_die requires that the
    -contents of all sets of results, pooled across ranks, is
    -identical. The order of the results in each set is irrelevant.
    -
    -See distributed_collect_assert_or_die for further documentation and
    -implementation details and distributed_rank_invariant_collect_assert_or_die for 
    -a version requiring identical output from each rank.
    -
    -Author: Diesmann
    -
    -FirstVersion: 100925
    -
    -SeeAlso: unittest::distributed_assert_or_die, unittest::distributed_collect_assert_or_die, nest_indirect, unittest::mpirun_self, unittest::assert_or_die
    -*/
    -/distributed_process_invariant_collect_assert_or_die
    -[/arraytype /proceduretype]
    -{
    -  
    -  {   
    -    { 1 Flatten } Map   % combine results across ranks for each process
    -    /results Set
    -
    -    % build reference from results of one process;
    -    % create dictionary with individual results as keys and number as values
    -    /reference << >> def
    -    results First 
    -    {
    -      pcvs cvlit /key Set
    -      reference key known
    -      {
    -        reference dup key get 1 add   % add one
    -        key exch put	
    -      }
    -      {
    -        reference key 1 put           % add new key with value one
    -      } ifelse
    -    } forall
    -
    -    % now check for identical counts in results from all other processes
    -    results Rest
    -    {
    -      /counts reference clonedict exch pop def
    -      {
    -        pcvs cvlit /key Set
    -        counts key known
    -        {
    -	  counts dup key get 1 sub   % subtract one
    -	  key exch put	
    -	}
    -        {
    -          counts /error 99 put       % flag error
    -          exit
    -	}
    -        ifelse
    -      } forall      
    -      counts /error known
    -      { 
    -        false   % something went wrong
    -      }
    -      {
    -        true counts values { 0 eq and } Fold  % ensure all counts are zero
    -      }
    -      ifelse
    -    } Map    
    -    % ensure all processes gave true
    -    true exch { and } Fold
    -  }    
    -  distributed_collect_assert_or_die  % all runs return same collected result
    -}
    -def 
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::distributed_process_invariant_events_assert_or_die - Checks whether the pooled event dictionaries from all ranks are equal, independent of the number of MPI processes
    -
    -Synopsis: array proc distributed_process_invariant_events_assert_or_die -> -
    -      
    -Description:
    -
    -The array specifies a list of numbers of
    -jobs. distributed_process_invariant_events_assert_or_die executes the
    -procedure specified as the second argument in parallel for all of the
    -numbers of jobs given in the arrays. This means that
    -distributed_process_invariant_events_assert_or_die carries out as many
    -distributed simulations as there are entries in the array.
    -
    -In each of the simulations all jobs are expected to return a single
    -events dictionary (from a recording device) on the stack.
    -the stack. The order in which the jobs are completed is of no
    -importance.  After completion of all simulations
    -distributed_process_invariant_events_assert_or_die requires that the
    -pooled contents of the events dictionaries is invariant under the
    -number of MPI processes.
    -
    -See distributed_collect_assert_or_die for further documentation and
    -implementation details and distributed_rank_invariant_collect_assert_or_die for 
    -a version requiring identical output from each rank.
    -
    -Author: Plesser
    -
    -FirstVersion: 2012-05-22
    -
    -SeeAlso: unittest::distributed_assert_or_die, unittest::distributed_collect_assert_or_die, nest_indirect, unittest::mpirun_self, unittest::assert_or_die
    -*/
    -/distributed_process_invariant_events_assert_or_die
    -[/arraytype /proceduretype]
    -{
    -  {  % evaluation function; called with array of arrays of event dicts on stack  
    -    /results Set
    -
    -    % ensure that all dicts have identical keys
    -    results Flatten
    -    dup First keys dup /keylits Set
    -    /nkeys keylits length def
    -    { cvs } Map Sort () exch { join } Fold /refkeys Set % string of sorted keys
    -    true exch Rest { keys { cvs } Map Sort () exch { join } Fold refkeys eq and } Fold
    -    (unittest::distributed_process_invariant_assert_or_die: consistent keys) assert_or_die
    -
    -    % For each run, go through events dicts and convert to arrays of strings, with one string per event,
    -    % combining data from all keys for that event (fixed order of keys), then combine across
    -    % ranks for each run and sort
    -    results { [] exch { /d Set [ keylits { d exch get } forall ] 
    -                               { nkeys arraystore () exch { cvs (_) join join } Fold } MapThread join
    -                      } Fold Sort 
    -            } Map
    -
    -    % we now have array of arrays, should be identical
    -    dup First /reference Set
    -    Rest true exch { reference eq and } Fold
    -  }    
    -  distributed_collect_assert_or_die  % all runs return same collected result
    -}
    -def 
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::distributed_rank_invariant_collect_assert_or_die - Checks whether all ranks produce equal results, independent of the number of MPI processes
    -
    -Synopsis: array proc distributed_rank_invariant_collect_assert_or_die -> -
    -      
    -Description:
    -
    -The array specifies a list of numbers of
    -jobs. distributed_rank_invariant_collect_assert_or_die executes the
    -procedure specified as the second argument in parallel for all of the
    -numbers of jobs given in the arrays. This means that
    -distributed_rank_invariant_collect_assert_or_die carries out as many
    -distributed simulations as there are entries in the array.
    -
    -In each of the simulations all jobs are expected to return a value on
    -the stack. The order in which the jobs are completed is of no
    -importance.  After completion of all simulations
    -distributed_rank_invariant_collect_assert_or_die requires that the
    -contents of the results of all ranks are identical, independent of
    -the number of processes.
    -
    -See distributed_collect_assert_or_die for further documentation and
    -implementation details and distributed_process_invariant_collect_assert_or_die for 
    -a version requiring identical output from each rank.
    -
    -Author: Diesmann
    -
    -FirstVersion: 100925
    -
    -SeeAlso: unittest::distributed_assert_or_die, unittest::distributed_collect_assert_or_die, nest_indirect, unittest::mpirun_self, unittest::assert_or_die
    -*/
    -/distributed_rank_invariant_collect_assert_or_die
    -[/arraytype /proceduretype]
    -{
    -  { % evaluation function
    -    1 Flatten                 % flat array of results from each rank, irrespective of process
    -    dup First /reference Set  % take first as reference
    -    Rest                      % results from all other ranks
    -    true exch { reference eq and } Fold     % check if all equal reference
    -  } distributed_collect_assert_or_die  
    -}
    -def 
    -
    -
    -/** @BeginDocumentation
    -Name: unittest::distributed_pass_or_die - Checks whether code runs for different numbers of jobs
    -
    -Synopsis: array proc distributed_pass_or_die -> -
    -
    -Description:
    -proc is executed for the different numbers of jobs specified in the
    -array. distributed_pass_or_die only checks whether proc completes
    -without errors and does not leave anything on the stack.
    -
    -Author: Diesmann
    -
    -FirstVersion: 100918
    -
    -SeeAlso:  unittest::distributed_assert_or_die, nest_indirect, unittest::mpirun_self, unittest::assert_or_die
    -*/
    -
    -/distributed_pass_or_die
    -{
    -  statusdict/is_mpi ::   % are we in a distributed job ?
    -  {
    -    :exec_test_function    
    -  }
    -  {
    -    % we are in the wrapper dispatching and collecting
    -    % we need to launch the distributed jobs
    -    pop                 % don't need the test function
    -    {
    -      /num_procs Set
    -      (N_MPI: ) =only num_procs =   % display number of processes
    -      
    -      num_procs mpirun_self
    -      num_procs /none :collect_distributed_results
    -      (unittest::distributed_pass_or_die: collected results) assert_or_die % got a result from each MPI process
    -    } forall
    -    % if we get here, all assert_or_dies passed above, so all is fine
    -  }
    -  ifelse 
    -}
    -def
    -
    -end % /unittest namespace
    diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt
    index 11d8cffdff..c5e400ffb2 100644
    --- a/libnestutil/CMakeLists.txt
    +++ b/libnestutil/CMakeLists.txt
    @@ -53,7 +53,6 @@ target_include_directories( nestutil PRIVATE
         ${PROJECT_SOURCE_DIR}/libnestutil
         ${PROJECT_BINARY_DIR}/libnestutil
         ${PROJECT_SOURCE_DIR}/nestkernel
    -    ${PROJECT_SOURCE_DIR}/sli
         ${PROJECT_SOURCE_DIR}/thirdparty
         ${Boost_INCLUDE_DIRS}
         )
    diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp
    index 9cb3eea4ca..69e288d4db 100644
    --- a/libnestutil/dictionary.cpp
    +++ b/libnestutil/dictionary.cpp
    @@ -23,11 +23,13 @@
     #include <algorithm>
     #include <boost/any.hpp>
     #include <iostream>
    +#include <iomanip>
     #include <map>
     #include <string>
     #include <vector>
     
     #include "dictionary.h"
    +
     #include "kernel_manager.h"
     #include "parameter.h"
     
    @@ -158,7 +160,7 @@ operator<<( std::ostream& os, const dictionary& dict )
         }
         else
         {
    -      throw TypeMismatch( "Type is not known" );
    +      throw nest::TypeMismatch( "Type is not known" );
         }
         const auto s = value_stream.str();
         const auto post_padding = max_key_length - kv.first.length() + 5;
    diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt
    index af5ad8bd52..f49de77033 100644
    --- a/models/CMakeLists.txt
    +++ b/models/CMakeLists.txt
    @@ -148,13 +148,12 @@ set_target_properties( models
         VERSION ${NEST_VERSION}
         SOVERSION 3
         )
    -target_link_libraries( models nestutil sli_lib nestkernel )
    +target_link_libraries( models nestutil nestkernel )
     
     target_include_directories( models PRIVATE
         ${PROJECT_SOURCE_DIR}/thirdparty
         ${PROJECT_SOURCE_DIR}/libnestutil
         ${PROJECT_BINARY_DIR}/libnestutil
    -    ${PROJECT_SOURCE_DIR}/sli
         ${PROJECT_SOURCE_DIR}/nestkernel
         )
     
    diff --git a/models/aeif_cond_alpha.cpp b/models/aeif_cond_alpha.cpp
    index 32a5935fc1..dbc5785152 100644
    --- a/models/aeif_cond_alpha.cpp
    +++ b/models/aeif_cond_alpha.cpp
    @@ -40,8 +40,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/aeif_cond_exp.cpp b/models/aeif_cond_exp.cpp
    index 56d64e8394..07571e3a4e 100644
    --- a/models/aeif_cond_exp.cpp
    +++ b/models/aeif_cond_exp.cpp
    @@ -40,8 +40,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/aeif_psc_alpha.cpp b/models/aeif_psc_alpha.cpp
    index 621621c38d..9ff422ae7b 100644
    --- a/models/aeif_psc_alpha.cpp
    +++ b/models/aeif_psc_alpha.cpp
    @@ -40,8 +40,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/aeif_psc_delta.cpp b/models/aeif_psc_delta.cpp
    index 2fa807b5a4..f68d413c79 100644
    --- a/models/aeif_psc_delta.cpp
    +++ b/models/aeif_psc_delta.cpp
    @@ -40,8 +40,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/aeif_psc_delta_clopath.cpp b/models/aeif_psc_delta_clopath.cpp
    index 24925d69eb..4bc5078bad 100644
    --- a/models/aeif_psc_delta_clopath.cpp
    +++ b/models/aeif_psc_delta_clopath.cpp
    @@ -40,8 +40,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/aeif_psc_exp.cpp b/models/aeif_psc_exp.cpp
    index 4f0459c383..6405087d5c 100644
    --- a/models/aeif_psc_exp.cpp
    +++ b/models/aeif_psc_exp.cpp
    @@ -40,8 +40,6 @@
     #include "nest_names.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/amat2_psc_exp.cpp b/models/amat2_psc_exp.cpp
    index f915fcebb1..e662bac152 100644
    --- a/models/amat2_psc_exp.cpp
    +++ b/models/amat2_psc_exp.cpp
    @@ -32,8 +32,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/binary_neuron.h b/models/binary_neuron.h
    index 1a757eb473..da3197937d 100644
    --- a/models/binary_neuron.h
    +++ b/models/binary_neuron.h
    @@ -45,11 +45,6 @@
     #include "ring_buffer.h"
     #include "universal_data_logger.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
     
     namespace nest
     {
    diff --git a/models/clopath_synapse.h b/models/clopath_synapse.h
    index 36485f4c46..746aa74892 100644
    --- a/models/clopath_synapse.h
    +++ b/models/clopath_synapse.h
    @@ -33,9 +33,6 @@
     #include "event.h"
     #include "ring_buffer.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/cm_default.h b/models/cm_default.h
    index ed88a0be65..45b2466203 100644
    --- a/models/cm_default.h
    +++ b/models/cm_default.h
    @@ -277,7 +277,7 @@ class cm_default : public ArchivingNode
       the vector 'recordables_values' stores pointers to all state variables
       present in the model
       */
    -  std::vector< Name > recordables_names;
    +  std::vector< std::string > recordables_names;
       std::vector< double* > recordables_values;
     
       //! Mapping of recordables names to access functions
    diff --git a/models/cm_tree.h b/models/cm_tree.h
    index 12c9b537de..a40793f98a 100644
    --- a/models/cm_tree.h
    +++ b/models/cm_tree.h
    @@ -40,10 +40,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     namespace nest
     {
    diff --git a/models/cont_delay_synapse_impl.h b/models/cont_delay_synapse_impl.h
    index 2373fe7f77..1e2072debe 100644
    --- a/models/cont_delay_synapse_impl.h
    +++ b/models/cont_delay_synapse_impl.h
    @@ -30,8 +30,6 @@
     #include "connector_model.h"
     #include "event.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
     
     namespace nest
     {
    diff --git a/models/correlation_detector.cpp b/models/correlation_detector.cpp
    index 6b8beb9400..5f27ad95ef 100644
    --- a/models/correlation_detector.cpp
    +++ b/models/correlation_detector.cpp
    @@ -31,11 +31,6 @@
     #include "dict_util.h"
     #include "logging.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     /* ----------------------------------------------------------------
      * Default constructors defining default parameters and state
    diff --git a/models/dc_generator.cpp b/models/dc_generator.cpp
    index 79abb80a31..7e663bd175 100644
    --- a/models/dc_generator.cpp
    +++ b/models/dc_generator.cpp
    @@ -30,11 +30,6 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -
     namespace nest
     {
     RecordablesMap< dc_generator > dc_generator::recordablesMap_;
    diff --git a/models/gamma_sup_generator.cpp b/models/gamma_sup_generator.cpp
    index 55bbdd4a34..242796b654 100644
    --- a/models/gamma_sup_generator.cpp
    +++ b/models/gamma_sup_generator.cpp
    @@ -33,10 +33,6 @@
     #include "event_delivery_manager_impl.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "doubledatum.h"
    -
     
     /* ----------------------------------------------------------------
      * Constructor of internal states class
    diff --git a/models/gif_cond_exp.cpp b/models/gif_cond_exp.cpp
    index 80eeaa693d..84969bb68b 100644
    --- a/models/gif_cond_exp.cpp
    +++ b/models/gif_cond_exp.cpp
    @@ -37,10 +37,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     namespace nest
     {
    diff --git a/models/gif_psc_exp_multisynapse.cpp b/models/gif_psc_exp_multisynapse.cpp
    index e9cc5bb073..b0cbdcedab 100644
    --- a/models/gif_psc_exp_multisynapse.cpp
    +++ b/models/gif_psc_exp_multisynapse.cpp
    @@ -23,22 +23,16 @@
     #include "gif_psc_exp_multisynapse.h"
     
     // Includes from libnestutil:
    +#include "compose.hpp"
     #include "dict_util.h"
     #include "numerics.h"
    +#include "propagator_stability.h"
     
     // Includes from nestkernel:
     #include "exceptions.h"
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -
    -#include "compose.hpp"
    -#include "propagator_stability.h"
     
     namespace nest
     {
    diff --git a/models/glif_cond.cpp b/models/glif_cond.cpp
    index 0940766ce6..cbc34e7476 100644
    --- a/models/glif_cond.cpp
    +++ b/models/glif_cond.cpp
    @@ -35,7 +35,6 @@
     // Includes from nestkernel:
     #include "exceptions.h"
     #include "kernel_manager.h"
    -#include "name.h"
     #include "universal_data_logger_impl.h"
     
     using namespace nest;
    diff --git a/models/glif_psc.h b/models/glif_psc.h
    index d361d8f903..bd47baf2c0 100644
    --- a/models/glif_psc.h
    +++ b/models/glif_psc.h
    @@ -30,8 +30,6 @@
     #include "ring_buffer.h"
     #include "universal_data_logger.h"
     
    -#include "dictdatum.h"
    -
     /* BeginUserDocs: integrate-and-fire, current-based
     
     Short description
    diff --git a/models/hh_cond_beta_gap_traub.cpp b/models/hh_cond_beta_gap_traub.cpp
    index b3dc839a3f..251dd4bfee 100644
    --- a/models/hh_cond_beta_gap_traub.cpp
    +++ b/models/hh_cond_beta_gap_traub.cpp
    @@ -43,9 +43,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     nest::RecordablesMap< nest::hh_cond_beta_gap_traub > nest::hh_cond_beta_gap_traub::recordablesMap_;
     
    diff --git a/models/hh_cond_exp_traub.cpp b/models/hh_cond_exp_traub.cpp
    index 584236b43e..e700f8c8f8 100644
    --- a/models/hh_cond_exp_traub.cpp
    +++ b/models/hh_cond_exp_traub.cpp
    @@ -40,8 +40,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     nest::RecordablesMap< nest::hh_cond_exp_traub > nest::hh_cond_exp_traub::recordablesMap_;
     
    diff --git a/models/hh_psc_alpha.cpp b/models/hh_psc_alpha.cpp
    index d0da627ae3..15766dda97 100644
    --- a/models/hh_psc_alpha.cpp
    +++ b/models/hh_psc_alpha.cpp
    @@ -38,9 +38,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     
     nest::RecordablesMap< nest::hh_psc_alpha > nest::hh_psc_alpha::recordablesMap_;
     
    diff --git a/models/hh_psc_alpha_clopath.cpp b/models/hh_psc_alpha_clopath.cpp
    index f20e710846..39b827fe8a 100644
    --- a/models/hh_psc_alpha_clopath.cpp
    +++ b/models/hh_psc_alpha_clopath.cpp
    @@ -38,9 +38,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     
     nest::RecordablesMap< nest::hh_psc_alpha_clopath > nest::hh_psc_alpha_clopath::recordablesMap_;
     
    diff --git a/models/hh_psc_alpha_gap.cpp b/models/hh_psc_alpha_gap.cpp
    index 9a137b5010..bd23887302 100644
    --- a/models/hh_psc_alpha_gap.cpp
    +++ b/models/hh_psc_alpha_gap.cpp
    @@ -39,9 +39,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     nest::RecordablesMap< nest::hh_psc_alpha_gap > nest::hh_psc_alpha_gap::recordablesMap_;
     
    diff --git a/models/ht_neuron.h b/models/ht_neuron.h
    index 0459ee1968..a8141d8fc8 100644
    --- a/models/ht_neuron.h
    +++ b/models/ht_neuron.h
    @@ -44,10 +44,6 @@
     #include "ring_buffer.h"
     #include "universal_data_logger.h"
     
    -// Includes from
    -
    -// Includes from sli:
    -#include "stringdatum.h"
     
     namespace nest
     {
    diff --git a/models/iaf_chs_2007.cpp b/models/iaf_chs_2007.cpp
    index b2c79058ea..12df5272c2 100644
    --- a/models/iaf_chs_2007.cpp
    +++ b/models/iaf_chs_2007.cpp
    @@ -31,9 +31,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_cond_alpha.cpp b/models/iaf_cond_alpha.cpp
    index 1a1ae34a5f..5883d6d350 100644
    --- a/models/iaf_cond_alpha.cpp
    +++ b/models/iaf_cond_alpha.cpp
    @@ -38,8 +38,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_cond_alpha_mc.h b/models/iaf_cond_alpha_mc.h
    index b6ba3339e5..7fccfd97be 100644
    --- a/models/iaf_cond_alpha_mc.h
    +++ b/models/iaf_cond_alpha_mc.h
    @@ -45,9 +45,6 @@
     #include "ring_buffer.h"
     #include "universal_data_logger.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "name.h"
     
     namespace nest
     {
    diff --git a/models/iaf_cond_exp.cpp b/models/iaf_cond_exp.cpp
    index 7863796cd6..8d045b7215 100644
    --- a/models/iaf_cond_exp.cpp
    +++ b/models/iaf_cond_exp.cpp
    @@ -38,8 +38,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_cond_exp_sfa_rr.cpp b/models/iaf_cond_exp_sfa_rr.cpp
    index efa530fb11..4133d5e2a7 100644
    --- a/models/iaf_cond_exp_sfa_rr.cpp
    +++ b/models/iaf_cond_exp_sfa_rr.cpp
    @@ -38,8 +38,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_psc_alpha.cpp b/models/iaf_psc_alpha.cpp
    index dbc9132b10..5051520117 100644
    --- a/models/iaf_psc_alpha.cpp
    +++ b/models/iaf_psc_alpha.cpp
    @@ -36,8 +36,6 @@
     #include "ring_buffer_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     nest::RecordablesMap< nest::iaf_psc_alpha > nest::iaf_psc_alpha::recordablesMap_;
     
    diff --git a/models/iaf_psc_alpha_canon.cpp b/models/iaf_psc_alpha_canon.cpp
    index ea4b7ab8a5..c4ba4033ed 100644
    --- a/models/iaf_psc_alpha_canon.cpp
    +++ b/models/iaf_psc_alpha_canon.cpp
    @@ -35,8 +35,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_psc_alpha_ps.cpp b/models/iaf_psc_alpha_ps.cpp
    index 0a6bd35255..40657e11e8 100644
    --- a/models/iaf_psc_alpha_ps.cpp
    +++ b/models/iaf_psc_alpha_ps.cpp
    @@ -36,8 +36,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_psc_delta.cpp b/models/iaf_psc_delta.cpp
    index a37be8112a..961004fb18 100644
    --- a/models/iaf_psc_delta.cpp
    +++ b/models/iaf_psc_delta.cpp
    @@ -36,9 +36,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    diff --git a/models/iaf_psc_delta_ps.cpp b/models/iaf_psc_delta_ps.cpp
    index 4776655de1..ea1cf230d9 100644
    --- a/models/iaf_psc_delta_ps.cpp
    +++ b/models/iaf_psc_delta_ps.cpp
    @@ -37,8 +37,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/iaf_psc_exp.cpp b/models/iaf_psc_exp.cpp
    index 143e0c4c57..103c174fcd 100644
    --- a/models/iaf_psc_exp.cpp
    +++ b/models/iaf_psc_exp.cpp
    @@ -34,9 +34,6 @@
     #include "ring_buffer_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     /* ----------------------------------------------------------------
      * Recordables map
      * ---------------------------------------------------------------- */
    diff --git a/models/iaf_psc_exp_htum.cpp b/models/iaf_psc_exp_htum.cpp
    index 10343442d2..e633e02f07 100644
    --- a/models/iaf_psc_exp_htum.cpp
    +++ b/models/iaf_psc_exp_htum.cpp
    @@ -33,8 +33,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_psc_exp_multisynapse.cpp b/models/iaf_psc_exp_multisynapse.cpp
    index e2f3e36f6e..996ac12e1d 100644
    --- a/models/iaf_psc_exp_multisynapse.cpp
    +++ b/models/iaf_psc_exp_multisynapse.cpp
    @@ -17,12 +17,10 @@
      *
      *  You should have received a copy of the GNU General Public License
      *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
      */
     
     #include "iaf_psc_exp_multisynapse.h"
     
    -
     // Includes from libnestutil:
     #include "dict_util.h"
     #include "numerics.h"
    @@ -33,9 +31,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_psc_exp_ps.cpp b/models/iaf_psc_exp_ps.cpp
    index ee28289bbe..1edd20024f 100644
    --- a/models/iaf_psc_exp_ps.cpp
    +++ b/models/iaf_psc_exp_ps.cpp
    @@ -36,8 +36,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/iaf_psc_exp_ps_lossless.cpp b/models/iaf_psc_exp_ps_lossless.cpp
    index 82f12fd363..fd0b4de6af 100644
    --- a/models/iaf_psc_exp_ps_lossless.cpp
    +++ b/models/iaf_psc_exp_ps_lossless.cpp
    @@ -34,10 +34,6 @@
     #include "propagator_stability.h"
     #include "regula_falsi.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/inhomogeneous_poisson_generator.cpp b/models/inhomogeneous_poisson_generator.cpp
    index a79989128d..dcd0696307 100644
    --- a/models/inhomogeneous_poisson_generator.cpp
    +++ b/models/inhomogeneous_poisson_generator.cpp
    @@ -296,7 +296,6 @@ nest::inhomogeneous_poisson_generator::set_data_from_stimulation_backend( std::v
             "The size of the data for the inhomogeneous_poisson_generator needs to be even [(time,rate) pairs]" );
         }
         dictionary d;
    -    ( new Dictionary );
         std::vector< double > times_ms;
         std::vector< double > rate_values;
         const size_t n_spikes = P_.rate_times_.size();
    diff --git a/models/izhikevich.cpp b/models/izhikevich.cpp
    index 8e6b0f883a..825c4ad6e3 100644
    --- a/models/izhikevich.cpp
    +++ b/models/izhikevich.cpp
    @@ -35,8 +35,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/jonke_synapse.h b/models/jonke_synapse.h
    index 7b92a53329..fdaa4e01a9 100644
    --- a/models/jonke_synapse.h
    +++ b/models/jonke_synapse.h
    @@ -32,9 +32,6 @@
     #include "connector_model.h"
     #include "event.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/mat2_psc_exp.cpp b/models/mat2_psc_exp.cpp
    index c86e82b9b5..3bd6c24251 100644
    --- a/models/mat2_psc_exp.cpp
    +++ b/models/mat2_psc_exp.cpp
    @@ -32,8 +32,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Recordables map
    diff --git a/models/modelsmodule.h b/models/modelsmodule.h
    index 1f696e3141..3bcf904fb0 100644
    --- a/models/modelsmodule.h
    +++ b/models/modelsmodule.h
    @@ -29,8 +29,6 @@
     // Includes from nestkernel:
     #include "nest_impl.h"
     
    -// Includes from sli:
    -#include "slimodule.h"
     
     namespace nest
     {
    diff --git a/models/multimeter.h b/models/multimeter.h
    index 505516835a..f33c7a4769 100644
    --- a/models/multimeter.h
    +++ b/models/multimeter.h
    @@ -34,10 +34,6 @@
     #include "nest_timeconverter.h"
     #include "recording_device.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -#include "name.h"
    -
     /* BeginUserDocs: device, recorder
     
     Short description
    diff --git a/models/music_cont_in_proxy.h b/models/music_cont_in_proxy.h
    index 46951003cf..34e0c7dd46 100644
    --- a/models/music_cont_in_proxy.h
    +++ b/models/music_cont_in_proxy.h
    @@ -41,8 +41,6 @@
     #include "device_node.h"
     #include "nest_types.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
     
     namespace nest
     {
    diff --git a/models/music_cont_out_proxy.h b/models/music_cont_out_proxy.h
    index 064a5966d0..acb83e3ddc 100644
    --- a/models/music_cont_out_proxy.h
    +++ b/models/music_cont_out_proxy.h
    @@ -44,8 +44,6 @@
     #include "nest_types.h"
     #include "node_collection.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
     
     namespace nest
     {
    diff --git a/models/music_event_in_proxy.cpp b/models/music_event_in_proxy.cpp
    index 1075e55b83..b6d8376a8d 100644
    --- a/models/music_event_in_proxy.cpp
    +++ b/models/music_event_in_proxy.cpp
    @@ -27,13 +27,6 @@
     // External includes:
     #include <music.hh>
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -
     // Includes from libnestutil:
     #include "compose.hpp"
     #include "logging.h"
    diff --git a/models/music_event_out_proxy.cpp b/models/music_event_out_proxy.cpp
    index 5a4b840f9c..8ae399c052 100644
    --- a/models/music_event_out_proxy.cpp
    +++ b/models/music_event_out_proxy.cpp
    @@ -27,13 +27,6 @@
     // C++ includes:
     #include <numeric>
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -
     // Includes from libnestutil:
     #include "compose.hpp"
     #include "logging.h"
    diff --git a/models/music_message_in_proxy.cpp b/models/music_message_in_proxy.cpp
    index 1790a30eca..88607b49e1 100644
    --- a/models/music_message_in_proxy.cpp
    +++ b/models/music_message_in_proxy.cpp
    @@ -27,11 +27,6 @@
     // External includes:
     #include <music.hh>
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -
     // Includes from libnestutil:
     #include "compose.hpp"
     #include "logging.h"
    diff --git a/models/music_rate_in_proxy.h b/models/music_rate_in_proxy.h
    index a6cef82fa2..846e9f3404 100644
    --- a/models/music_rate_in_proxy.h
    +++ b/models/music_rate_in_proxy.h
    @@ -39,8 +39,7 @@
     #include "nest_types.h"
     #include "node.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    +
     
     /* BeginUserDocs: device, rate, MUSIC
     
    diff --git a/models/parrot_neuron.cpp b/models/parrot_neuron.cpp
    index 352e5e3ac4..248769ecf9 100644
    --- a/models/parrot_neuron.cpp
    +++ b/models/parrot_neuron.cpp
    @@ -31,8 +31,6 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/parrot_neuron_ps.cpp b/models/parrot_neuron_ps.cpp
    index 004ff0f12d..1183ba69ad 100644
    --- a/models/parrot_neuron_ps.cpp
    +++ b/models/parrot_neuron_ps.cpp
    @@ -30,8 +30,6 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/pp_cond_exp_mc_urbanczik.cpp b/models/pp_cond_exp_mc_urbanczik.cpp
    index a3e1c969d4..081439c00e 100644
    --- a/models/pp_cond_exp_mc_urbanczik.cpp
    +++ b/models/pp_cond_exp_mc_urbanczik.cpp
    @@ -37,9 +37,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     std::vector< std::string > nest::pp_cond_exp_mc_urbanczik::comp_names_( NCOMP );
     nest::RecordablesMap< nest::pp_cond_exp_mc_urbanczik > nest::pp_cond_exp_mc_urbanczik::recordablesMap_;
    diff --git a/models/pp_cond_exp_mc_urbanczik.h b/models/pp_cond_exp_mc_urbanczik.h
    index 744d4e069a..dfc172bf99 100644
    --- a/models/pp_cond_exp_mc_urbanczik.h
    +++ b/models/pp_cond_exp_mc_urbanczik.h
    @@ -47,9 +47,6 @@
     #include "urbanczik_archiving_node.h"
     #include "urbanczik_archiving_node_impl.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "name.h"
     
     namespace nest
     {
    diff --git a/models/pp_psc_delta.cpp b/models/pp_psc_delta.cpp
    index 483cb22398..74f453221f 100644
    --- a/models/pp_psc_delta.cpp
    +++ b/models/pp_psc_delta.cpp
    @@ -38,9 +38,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/ppd_sup_generator.cpp b/models/ppd_sup_generator.cpp
    index fba73142bb..f573a6942b 100644
    --- a/models/ppd_sup_generator.cpp
    +++ b/models/ppd_sup_generator.cpp
    @@ -301,7 +301,6 @@ nest::ppd_sup_generator::set_data_from_stimulation_backend( std::vector< double
             "[dead_time, rate, n_proc, frequency, relative_amplitude]." );
         }
         dictionary d;
    -    ( new Dictionary );
         d[ names::dead_time ] = input_param[ 0 ];
         d[ names::rate ] = input_param[ 1 ];
         d[ names::n_proc ] = input_param[ 2 ];
    diff --git a/models/rate_neuron_ipn_impl.h b/models/rate_neuron_ipn_impl.h
    index 191e2e4737..0d2730f848 100644
    --- a/models/rate_neuron_ipn_impl.h
    +++ b/models/rate_neuron_ipn_impl.h
    @@ -42,11 +42,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
     
     namespace nest
     {
    diff --git a/models/rate_neuron_opn_impl.h b/models/rate_neuron_opn_impl.h
    index f122c07757..3868247096 100644
    --- a/models/rate_neuron_opn_impl.h
    +++ b/models/rate_neuron_opn_impl.h
    @@ -41,11 +41,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
     
     namespace nest
     {
    diff --git a/models/rate_transformer_node_impl.h b/models/rate_transformer_node_impl.h
    index 551e5bffc7..df845d7257 100644
    --- a/models/rate_transformer_node_impl.h
    +++ b/models/rate_transformer_node_impl.h
    @@ -43,11 +43,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
     
     namespace nest
     {
    diff --git a/models/siegert_neuron.cpp b/models/siegert_neuron.cpp
    index 111a42d198..9ba05554ed 100644
    --- a/models/siegert_neuron.cpp
    +++ b/models/siegert_neuron.cpp
    @@ -38,9 +38,6 @@
     #include "kernel_manager.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     struct my_params
     {
    diff --git a/models/sinusoidal_gamma_generator.cpp b/models/sinusoidal_gamma_generator.cpp
    index cf0210f90e..1db59ea5d0 100644
    --- a/models/sinusoidal_gamma_generator.cpp
    +++ b/models/sinusoidal_gamma_generator.cpp
    @@ -378,7 +378,6 @@ nest::sinusoidal_gamma_generator::set_data_from_stimulation_backend( std::vector
             "[frequency, phase, order, rate, amplitude, individual_spike_trains]." );
         }
         dictionary d;
    -    ( new Dictionary );
         d[ names::frequency ] = input_param[ 0 ];
         d[ names::phase ] = input_param[ 1 ];
         d[ names::order ] = input_param[ 2 ];
    diff --git a/models/sinusoidal_poisson_generator.cpp b/models/sinusoidal_poisson_generator.cpp
    index 338b42c08e..424ff81d49 100644
    --- a/models/sinusoidal_poisson_generator.cpp
    +++ b/models/sinusoidal_poisson_generator.cpp
    @@ -315,7 +315,6 @@ nest::sinusoidal_poisson_generator::set_data_from_stimulation_backend( std::vect
             "[rate, frequency, phase, amplitude, individual_spike_trains]." );
         }
         dictionary d;
    -    ( new Dictionary );
         d[ names::rate ] = input_param[ 0 ];
         d[ names::frequency ] = input_param[ 1 ];
         d[ names::phase ] = input_param[ 2 ];
    diff --git a/models/spike_dilutor.cpp b/models/spike_dilutor.cpp
    index 1960fa7812..c3468992a7 100644
    --- a/models/spike_dilutor.cpp
    +++ b/models/spike_dilutor.cpp
    @@ -30,9 +30,6 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Default constructors defining default parameter
    diff --git a/models/spike_generator.cpp b/models/spike_generator.cpp
    index ddb7c4b8c4..3ebcf6d696 100644
    --- a/models/spike_generator.cpp
    +++ b/models/spike_generator.cpp
    @@ -30,12 +30,6 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "dict.h"
    -#include "dictutils.h"
    -
     
     /* ----------------------------------------------------------------
      * Default constructors defining default parameters and state
    @@ -411,7 +405,6 @@ nest::spike_generator::set_data_from_stimulation_backend( std::vector< double >&
       {
     
         dictionary d;
    -    ( new Dictionary );
         std::vector< double > times_ms;
         const size_t n_spikes = P_.spike_stamps_.size();
         times_ms.reserve( n_spikes + input_spikes.size() );
    diff --git a/models/spike_recorder.cpp b/models/spike_recorder.cpp
    index 5fcc2d5147..be765a7aca 100644
    --- a/models/spike_recorder.cpp
    +++ b/models/spike_recorder.cpp
    @@ -30,9 +30,6 @@
     #include "event_delivery_manager_impl.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     nest::spike_recorder::spike_recorder()
       : RecordingDevice()
    diff --git a/models/spin_detector.cpp b/models/spin_detector.cpp
    index a879375032..48571062e9 100644
    --- a/models/spin_detector.cpp
    +++ b/models/spin_detector.cpp
    @@ -30,9 +30,6 @@
     #include "event_delivery_manager_impl.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
     
     nest::spin_detector::spin_detector()
       : last_in_node_id_( 0 )
    diff --git a/models/stdp_dopamine_synapse.cpp b/models/stdp_dopamine_synapse.cpp
    index e46ab52887..5ad34729a2 100644
    --- a/models/stdp_dopamine_synapse.cpp
    +++ b/models/stdp_dopamine_synapse.cpp
    @@ -28,8 +28,6 @@
     #include "event.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
     
     namespace nest
     {
    diff --git a/models/stdp_nn_pre_centered_synapse.h b/models/stdp_nn_pre_centered_synapse.h
    index becaf3959e..1d1a3b3761 100644
    --- a/models/stdp_nn_pre_centered_synapse.h
    +++ b/models/stdp_nn_pre_centered_synapse.h
    @@ -32,9 +32,6 @@
     #include "connector_model.h"
     #include "event.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/stdp_nn_restr_synapse.h b/models/stdp_nn_restr_synapse.h
    index 186a896109..780f5a996e 100644
    --- a/models/stdp_nn_restr_synapse.h
    +++ b/models/stdp_nn_restr_synapse.h
    @@ -32,9 +32,6 @@
     #include "connector_model.h"
     #include "event.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/stdp_nn_symm_synapse.h b/models/stdp_nn_symm_synapse.h
    index b85d7c29d8..c697eb1e14 100644
    --- a/models/stdp_nn_symm_synapse.h
    +++ b/models/stdp_nn_symm_synapse.h
    @@ -32,9 +32,6 @@
     #include "connector_model.h"
     #include "event.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/stdp_pl_synapse_hom.cpp b/models/stdp_pl_synapse_hom.cpp
    index b8183b86ac..89122c57dd 100644
    --- a/models/stdp_pl_synapse_hom.cpp
    +++ b/models/stdp_pl_synapse_hom.cpp
    @@ -27,9 +27,6 @@
     #include "connector_model.h"
     #include "event.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -
     
     namespace nest
     {
    diff --git a/models/stdp_synapse.h b/models/stdp_synapse.h
    index 0d6bfb143f..17c9105b50 100644
    --- a/models/stdp_synapse.h
    +++ b/models/stdp_synapse.h
    @@ -32,9 +32,6 @@
     #include "connector_model.h"
     #include "event.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/step_current_generator.cpp b/models/step_current_generator.cpp
    index 0a68716166..d4f6e8b525 100644
    --- a/models/step_current_generator.cpp
    +++ b/models/step_current_generator.cpp
    @@ -335,7 +335,6 @@ nest::step_current_generator::set_data_from_stimulation_backend( std::vector< do
             "The size of the data for the step_current_generator needs to be even [(time,amplitude) pairs] " );
         }
         dictionary d;
    -    ( new Dictionary );
         std::vector< double > times_ms;
         std::vector< double > amplitudes_pA;
         const size_t n_step = P_.amp_time_stamps_.size();
    diff --git a/models/step_rate_generator.cpp b/models/step_rate_generator.cpp
    index 1a0a5cc952..5c70b28e1b 100644
    --- a/models/step_rate_generator.cpp
    +++ b/models/step_rate_generator.cpp
    @@ -348,7 +348,6 @@ nest::step_rate_generator::set_data_from_stimulation_backend( std::vector< doubl
             "The size of the data for the step_rate_generator needs to be even [(time,rate) pairs] " );
         }
         dictionary d;
    -    ( new Dictionary );
         std::vector< double > times_ms;
         std::vector< double > amplitudes_Hz;
         const size_t n_step = P_.amp_time_stamps_.size();
    diff --git a/models/urbanczik_synapse.h b/models/urbanczik_synapse.h
    index bbc9cc19b5..0f36f84cb8 100644
    --- a/models/urbanczik_synapse.h
    +++ b/models/urbanczik_synapse.h
    @@ -33,9 +33,6 @@
     #include "event.h"
     #include "ring_buffer.h"
     
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
     
     namespace nest
     {
    diff --git a/models/volume_transmitter.cpp b/models/volume_transmitter.cpp
    index 515bcf9ab5..7ede18f704 100644
    --- a/models/volume_transmitter.cpp
    +++ b/models/volume_transmitter.cpp
    @@ -32,8 +32,6 @@
     // Includes from libnestutil:
     #include "dict_util.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * Default constructor defining default parameters
    diff --git a/models/volume_transmitter.h b/models/volume_transmitter.h
    index 04959dfac1..6cc99d9782 100644
    --- a/models/volume_transmitter.h
    +++ b/models/volume_transmitter.h
    @@ -30,9 +30,6 @@
     #include "ring_buffer.h"
     #include "spikecounter.h"
     
    -// Includes from sli:
    -#include "namedatum.h"
    -
     
     namespace nest
     {
    diff --git a/nest/CMakeLists.txt b/nest/CMakeLists.txt
    deleted file mode 100644
    index 476c0fafb3..0000000000
    --- a/nest/CMakeLists.txt
    +++ /dev/null
    @@ -1,106 +0,0 @@
    -# nest/CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -set( nest_sources
    -    neststartup.cpp neststartup.h
    -    )
    -
    -add_executable( nest main.cpp ${nest_sources} )
    -
    -if ( NOT APPLE )
    -    set_target_properties( nest
    -        PROPERTIES
    -        LINK_FLAGS "-Wl,--no-as-needed"
    -        )
    -endif ()
    -
    -add_library( nest_lib ${nest_sources} )
    -
    -if ( NOT APPLE )
    -    set_target_properties( nest_lib
    -        PROPERTIES
    -        OUTPUT_NAME nest
    -        LINK_FLAGS "-Wl,--no-as-needed"
    -        )
    -else ()
    -    set_target_properties( nest_lib
    -        PROPERTIES
    -        OUTPUT_NAME nest
    -
    -        # delay lookup of symbols from libpython when building with MPI4Py
    -        LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup"
    -        )
    -endif ()
    -
    -set_target_properties( nest_lib
    -    PROPERTIES
    -    VERSION ${NEST_VERSION}
    -    SOVERSION 3
    -    )
    -
    -target_link_libraries( nest
    -    nestutil nestkernel sli_lib sli_readline
    -    ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES} OpenMP::OpenMP_CXX )
    -
    -target_link_libraries( nest_lib
    -    nestutil nestkernel sli_lib ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES}
    -    OpenMP::OpenMP_CXX )
    -
    -target_include_directories( nest PRIVATE
    -    ${PROJECT_SOURCE_DIR}/thirdparty
    -    ${PROJECT_BINARY_DIR}/nest
    -    ${PROJECT_BINARY_DIR}/libnestutil
    -    ${PROJECT_SOURCE_DIR}/libnestutil
    -    ${PROJECT_SOURCE_DIR}/sli
    -    ${PROJECT_SOURCE_DIR}/nestkernel
    -    ${SLI_MODULE_INCLUDE_DIRS}
    -    )
    -
    -
    -target_compile_definitions( nest PRIVATE
    -    -D_BUILD_NEST_CLI
    -)
    -
    -target_include_directories( nest_lib PRIVATE
    -    ${PROJECT_SOURCE_DIR}/thirdparty
    -    ${PROJECT_BINARY_DIR}/nest
    -    ${PROJECT_SOURCE_DIR}/libnestutil
    -    ${PROJECT_BINARY_DIR}/libnestutil
    -    ${PROJECT_SOURCE_DIR}/sli
    -    ${PROJECT_SOURCE_DIR}/nestkernel
    -    ${SLI_MODULE_INCLUDE_DIRS}
    -    ${Python_INCLUDE_DIRS}
    -    )
    -
    -
    -if ( HAVE_PYTHON )
    -  target_compile_definitions( nest_lib PRIVATE
    -      -D_IS_PYNEST
    -      )
    -endif ()
    -
    -install( TARGETS nest nest_lib
    -    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
    -    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
    -    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    -    )
    -
    -FILTER_HEADERS("${nest_sources}" install_headers )
    -install( FILES ${install_headers}
    -    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest)
    diff --git a/nest/README.md b/nest/README.md
    deleted file mode 100644
    index 1229411639..0000000000
    --- a/nest/README.md
    +++ /dev/null
    @@ -1,3 +0,0 @@
    -# `nest` folder
    -
    -This directory contains the code to build the nest executable. Basically main.cpp just collects all necessary objects and links the executable against the necessary libraries.
    diff --git a/nest/main.cpp b/nest/main.cpp
    deleted file mode 100644
    index a10eaf3518..0000000000
    --- a/nest/main.cpp
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  main.cpp
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -// Includes from nest:
    -#include "neststartup.h"
    -
    -// Includes from sli:
    -#include "interpret.h"
    -
    -int
    -main( int argc, char* argv[] )
    -{
    -  /**
    -   * Create the interpreter object. Due to its dependence
    -   * on various static objects (e.g. of class Name), the
    -   * interpreter engine MUST NOT be global.
    -   */
    -  SLIInterpreter engine;
    -
    -  neststartup( &argc, &argv, engine );
    -
    -  // start the interpreter session
    -  int exitcode = engine.execute();
    -
    -  nestshutdown( exitcode );
    -
    -  return exitcode;
    -}
    diff --git a/nest/neststartup.cpp b/nest/neststartup.cpp
    deleted file mode 100644
    index fedf7d89fa..0000000000
    --- a/nest/neststartup.cpp
    +++ /dev/null
    @@ -1,204 +0,0 @@
    -/*
    - *  neststartup.cpp
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "neststartup.h"
    -
    -
    -// Generated includes:
    -#include "config.h"
    -//#include "static_modules.h"
    -
    -// Includes from libnestutil:
    -#include "logging_event.h"
    -
    -// Includes from nestkernel:
    -// #include "dynamicloader.h"
    -#include "kernel_manager.h"
    -#include "nest.h"
    -#include "nestmodule.h"
    -
    -// Includes from sli:
    -#include "filesystem.h"
    -#include "interpret.h"
    -#include "oosupport.h"
    -#include "processes.h"
    -#include "sliarray.h"
    -#include "sligraphics.h"
    -#include "sliregexp.h"
    -#include "slistartup.h"
    -#include "specialfunctionsmodule.h"
    -
    -#if defined( _BUILD_NEST_CLI ) && defined( HAVE_READLINE )
    -#include <gnureadline.h>
    -#endif
    -
    -SLIInterpreter* sli_engine;
    -
    -SLIInterpreter&
    -get_engine()
    -{
    -  assert( sli_engine );
    -  return *sli_engine;
    -}
    -
    -void
    -sli_logging( const nest::LoggingEvent& e )
    -{
    -  sli_engine->message( static_cast< int >( e.severity ), e.function.c_str(), e.message.c_str() );
    -}
    -
    -int
    -#ifndef _IS_PYNEST
    -neststartup( int* argc, char*** argv, SLIInterpreter& engine )
    -#else
    -neststartup( int* argc, char*** argv, SLIInterpreter& engine, std::string modulepath )
    -#endif
    -{
    -  // nest::init_nest( argc, argv );
    -
    -  sli_engine = &engine;
    -  register_logger_client( sli_logging );
    -
    -// We disable synchronization between stdio and istd::ostreams
    -// this has to be done before any in- or output has been done.
    -/*
    - * TODO: This block looks to me as if it would evaluate to the same stuff
    - *       in all cases. Can it be removed (or simplified, if I'm wrong ;-)
    - */
    -#ifdef __GNUC__
    -#if __GNUC__ < 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ < 1 )
    -  // Broken with GCC 3.1 and higher.
    -  // cin.get() never returns, or leaves cin in a broken state.
    -  std::ios::sync_with_stdio( false );
    -#endif
    -#else
    -  // This is for all other compilers
    -  std::ios::sync_with_stdio( false );
    -#endif
    -
    -  addmodule< OOSupportModule >( engine );
    -
    -#if defined( _BUILD_NEST_CLI ) && defined( HAVE_READLINE )
    -  addmodule< GNUReadline >( engine );
    -#endif
    -
    -  addmodule< SLIArrayModule >( engine );
    -  addmodule< SpecialFunctionsModule >( engine ); // safe without GSL
    -  addmodule< SLIgraphics >( engine );
    -  engine.addmodule( new SLIStartup( *argc, *argv ) );
    -  addmodule< Processes >( engine );
    -  addmodule< RegexpModule >( engine );
    -  addmodule< FilesystemModule >( engine );
    -
    -  // register NestModule class
    -  // addmodule< nest::NestModule >( engine );
    -
    -  // this can make problems with reference counting, if
    -  // the intepreter decides cleans up memory before NEST is ready
    -  // engine.def( "modeldict", nest::kernel().model_manager.get_modeldict() );
    -  // engine.def( "synapsedict", nest::kernel().model_manager.get_synapsedict() );
    -  // engine.def( "connruledict", nest::kernel().connection_manager.get_connruledict() );
    -  // engine.def( "growthcurvedict", nest::kernel().sp_manager.get_growthcurvedict() );
    -
    -  // now add static modules providing models
    -  // add_static_modules( engine );
    -
    -/*
    - * The following section concerns shared user modules and is thus only
    - * included if we built with libtool and libltdl.
    - *
    - * One may want to link user modules statically, but for convenience
    - * they still register themselves with the DyamicLoadModule during static
    - * initialization. At the same time, we need to create the DynamicLoaderModule,
    - * since the compiler might otherwise optimize DynamicLoaderModule::registerLinkedModule() away.
    - */
    -#ifdef HAVE_LIBLTDL
    -  // dynamic loader module for managing linked and dynamically loaded extension
    -  // modules
    -  // PYNEST-NG  nest::DynamicLoaderModule* pDynLoader = new nest::DynamicLoaderModule( engine );
    -
    -  // initialize all modules that were linked at compile time.
    -  // These modules were registered via DynamicLoader::registerLinkedModule
    -  // from their constructor
    -  // pDynLoader->initLinkedModules( engine );
    -
    -  // interpreter will delete module on destruction
    -  //engine.addmodule( pDynLoader );
    -#endif
    -
    -  return engine.startup();
    -}
    -
    -void
    -nestshutdown( int exitcode )
    -{
    -  nest::kernel().finalize();
    -  nest::kernel().mpi_manager.mpi_finalize( exitcode );
    -  nest::KernelManager::destroy_kernel_manager();
    -}
    -
    -#if defined( HAVE_LIBNEUROSIM ) && defined( _IS_PYNEST )
    -Datum*
    -CYTHON_unpackConnectionGeneratorDatum( PyObject* obj )
    -{
    -  Datum* ret = nullptr;
    -  ConnectionGenerator* cg = nullptr;
    -
    -  cg = PNS::unpackConnectionGenerator( obj );
    -  if ( cg )
    -  {
    -    ret = static_cast< Datum* >( new ConnectionGeneratorDatum( cg ) );
    -  }
    -
    -  return ret;
    -}
    -#endif
    -
    -#ifdef _IS_PYNEST
    -#ifdef HAVE_MPI4PY
    -
    -#include <mpi4py/mpi4py.h>
    -
    -void
    -set_communicator( PyObject* pyobj )
    -{
    -  import_mpi4py();
    -
    -  // If object is not a mpi4py communicator, bail
    -  if ( not PyObject_TypeCheck( pyobj, &PyMPIComm_Type ) )
    -  {
    -    throw nest::KernelException( "set_communicator: argument is not a mpi4py communicator" );
    -  }
    -
    -  nest::kernel().mpi_manager.set_communicator( *PyMPIComm_Get( pyobj ) );
    -}
    -
    -#else // ! HAVE_MPI4PY
    -
    -void
    -set_communicator( PyObject* )
    -{
    -  throw nest::KernelException( "set_communicator: NEST not compiled with MPI4PY" );
    -}
    -
    -#endif
    -#endif //_IS_PYNEST
    diff --git a/nest/neststartup.h b/nest/neststartup.h
    deleted file mode 100644
    index 72b790ecd1..0000000000
    --- a/nest/neststartup.h
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    - *  neststartup.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef NEST_STARTUP_H
    -#define NEST_STARTUP_H
    -
    -// Generated includes:
    -#include "config.h"
    -
    -#if defined( HAVE_LIBNEUROSIM ) && defined( _IS_PYNEST )
    -#include "datum.h"
    -#include <neurosim/pyneurosim.h>
    -#define CYTHON_isConnectionGenerator( x ) PNS::isConnectionGenerator( x )
    -Datum* CYTHON_unpackConnectionGeneratorDatum( PyObject* );
    -#else
    -#define CYTHON_isConnectionGenerator( x ) 0
    -#define CYTHON_unpackConnectionGeneratorDatum( x ) nullptr
    -#endif
    -
    -class SLIInterpreter;
    -
    -#ifdef _IS_PYNEST
    -#define CYTHON_DEREF( x ) ( *x )
    -#define CYTHON_ADDR( x ) ( &x )
    -#include <string>
    -int neststartup( int* argc, char*** argv, SLIInterpreter& engine, std::string modulepath = "" );
    -#else  // #ifdef _IS_PYNEST
    -int neststartup( int* argc, char*** argv, SLIInterpreter& engine );
    -#endif // #ifdef _IS_PYNEST
    -
    -void nestshutdown( int exitcode );
    -
    -SLIInterpreter& get_engine();
    -
    -#ifdef _IS_PYNEST
    -#include <Python.h>
    -// Call only with GIL
    -void set_communicator( PyObject* );
    -
    -inline bool
    -nest_has_mpi4py()
    -{
    -#ifdef HAVE_MPI4PY
    -  return true;
    -#else
    -  return false;
    -#endif // HAVE_MPI4PY
    -}
    -
    -#endif // _IS_PYNEST
    -
    -#endif // #ifndef NEST_STARTUP_H
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index 099d6c04bb..9230f53969 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -189,7 +189,7 @@ set_target_properties( nestkernel
         SOVERSION 3
         )
     target_link_libraries( nestkernel
    -    nestutil sli_lib
    +    nestutil
         ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES}
         )
     
    @@ -197,7 +197,6 @@ target_include_directories( nestkernel PRIVATE
         ${PROJECT_SOURCE_DIR}/thirdparty
         ${PROJECT_SOURCE_DIR}/libnestutil
         ${PROJECT_BINARY_DIR}/libnestutil
    -    ${PROJECT_SOURCE_DIR}/sli
         ${PROJECT_SOURCE_DIR}/nestkernel
         ${PROJECT_SOURCE_DIR}/nestkernel/spatial
         ${PROJECT_SOURCE_DIR}/models
    diff --git a/nestkernel/connection_creator.h b/nestkernel/connection_creator.h
    index 0f20f679bc..d18b1cae6f 100644
    --- a/nestkernel/connection_creator.h
    +++ b/nestkernel/connection_creator.h
    @@ -28,11 +28,9 @@
     
     // Includes from nestkernel:
     #include "kernel_manager.h"
    -#include "nest_names.h"
    -#include "nestmodule.h"
    -
    -// Includes from spatial:
     #include "mask.h"
    +#include "nest_names.h"
    +#include "ntree.h"
     #include "position.h"
     
     namespace nest
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index de48128134..bd96a62565 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -320,6 +320,35 @@ nest::NumericalInstability::what() const noexcept
       return msg.str().c_str();
     }
     
    +const char*
    +nest::NamingConflict::what() const noexcept
    +{
    +  return msg_.c_str();
    +}
    +
    +const char*
    +nest::RangeCheck::what() const noexcept
    +{
    +  if ( size_ > 0 )
    +  {
    +    std::ostringstream out;
    +    out << "Array with length " << size_ << " expected.";
    +    return out.str().c_str();
    +  }
    +  else
    +  {
    +    // TODO-PYNEST-NG: Fix usage, the comment below has been there already
    +    // Empty message. Added due to incorrect use of RangeCheck in nest.cpp
    +    return "";
    +  }
    +}
    +
    +const char*
    +nest::IOError::what() const noexcept
    +{
    +  return std::string().c_str();
    +}
    +
     const char*
     nest::KeyError::what() const noexcept
     {
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 5f365beeb6..99aa84a767 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -837,6 +837,61 @@ class NumericalInstability : public KernelException
       const std::string model_;
     };
     
    +/**
    + * Throw if an existing name is attempted to be redefined.
    + * This is relevant mainly when a newly loaded module attempts to
    + * redefine a model, synapse or function name.
    + * @ingroup KernelExceptions
    + */
    +class NamingConflict : public KernelException
    +{
    +public:
    +  NamingConflict( const std::string& msg )
    +    : KernelException( "NamingConflict" )
    +    , msg_( msg )
    +  {
    +  }
    +
    +  const char* what() const noexcept override;
    +
    +private:
    +  std::string msg_;
    +};
    +
    +/**
    + * Exception to be thrown if a given array has the wrong size.
    + * @ingroup KernelExceptions
    + */
    +class RangeCheck : public KernelException
    +{
    +public:
    +  RangeCheck( int size = 0 )
    +    : KernelException( "RangeCheck" )
    +    , size_( size )
    +  {
    +  }
    +
    +  const char* what() const noexcept override;
    +
    +private:
    +  int size_;
    +};
    +
    +/**
    + * Exception to be thrown if an error occured in an I/O operation.
    + * @ingroup KernelExceptions
    + */
    +class IOError : public KernelException
    +{
    +public:
    +  IOError()
    +    : KernelException( "IOError" )
    +  {
    +  }
    +
    +  const char* what() const noexcept override;
    +};
    +
     /**
      * Exception to be thrown if when trying to delete an entry from
      * DynamicRecordablesMap that does not exist.
    diff --git a/nestkernel/generic_factory.h b/nestkernel/generic_factory.h
    index 099f736796..9b831ea6d5 100644
    --- a/nestkernel/generic_factory.h
    +++ b/nestkernel/generic_factory.h
    @@ -30,6 +30,9 @@
     #include "generic_factory.h"
     #include "nest_types.h"
     
    +// Includes from nestutil:
    +#include "dictionary.h"
    +
     
     namespace nest
     {
    diff --git a/nestkernel/grid_mask.h b/nestkernel/grid_mask.h
    index d285d745d4..e6b2d29a04 100644
    --- a/nestkernel/grid_mask.h
    +++ b/nestkernel/grid_mask.h
    @@ -24,13 +24,9 @@
     #define GRID_MASK_H
     
     // Includes from nestkernel:
    +#include "mask.h"
     #include "nest_names.h"
     #include "nest_types.h"
    -#include "nestmodule.h"
    -
    -
    -// Includes from spatial:
    -#include "mask.h"
     #include "position.h"
     
     namespace nest
    diff --git a/nestkernel/layer.h b/nestkernel/layer.h
    index 6405022cd2..cedb49344d 100644
    --- a/nestkernel/layer.h
    +++ b/nestkernel/layer.h
    @@ -166,7 +166,7 @@ class AbstractLayer
       virtual void dump_connections( std::ostream& out,
         NodeCollectionPTR node_collection,
         AbstractLayerPTR target_layer,
    -    const Token& syn_model ) = 0;
    +    const std::string& syn_model ) = 0;
     
       void set_node_collection( NodeCollectionPTR );
       NodeCollectionPTR get_node_collection();
    @@ -404,7 +404,7 @@ class Layer : public AbstractLayer
       void dump_connections( std::ostream& out,
         NodeCollectionPTR node_collection,
         AbstractLayerPTR target_layer,
    -    const Token& syn_model ) override;
    +    const std::string& syn_model ) override;
     
     protected:
       /**
    diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h
    index beb419ea57..1565ed4a57 100644
    --- a/nestkernel/layer_impl.h
    +++ b/nestkernel/layer_impl.h
    @@ -298,7 +298,7 @@ void
     Layer< D >::dump_connections( std::ostream& out,
       NodeCollectionPTR node_collection,
       AbstractLayerPTR target_layer,
    -  const Token& syn_model )
    +  const std::string& syn_model )
     {
       std::vector< std::pair< Position< D >, index > >* src_vec = get_global_positions_vector( node_collection );
     
    diff --git a/nestkernel/mask.h b/nestkernel/mask.h
    index cb038650d8..fe65ea4181 100644
    --- a/nestkernel/mask.h
    +++ b/nestkernel/mask.h
    @@ -23,15 +23,17 @@
     #ifndef MASK_H
     #define MASK_H
     
    +// C++ includes:
    +#include <memory>
    +
     // Includes from libnestutil:
    +#include "dictionary.h"
     #include "numerics.h"
     
     // Includes from nestkernel:
     #include "exceptions.h"
     #include "nest_names.h"
     #include "nest_types.h"
    -#include "nestmodule.h"
    -
     
     // Includes from spatial:
     #include "position.h"
    @@ -251,7 +253,7 @@ class BoxMask : public Mask< D >
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     protected:
       /**
    @@ -352,7 +354,7 @@ class BallMask : public Mask< D >
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     protected:
       Position< D > center_;
    @@ -457,7 +459,7 @@ class EllipseMask : public Mask< D >
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     private:
       void create_bbox_();
    @@ -728,14 +730,14 @@ class AnchoredMask : public Mask< D >
     };
     
     template <>
    -inline Name
    +inline std::string
     BoxMask< 2 >::get_name()
     {
       return names::rectangular;
     }
     
     template <>
    -inline Name
    +inline std::string
     BoxMask< 3 >::get_name()
     {
       return names::box;
    @@ -889,14 +891,14 @@ inline BoxMask< D >::BoxMask( const Position< D >& lower_left,
     }
     
     template <>
    -inline Name
    +inline std::string
     BallMask< 2 >::get_name()
     {
       return names::circular;
     }
     
     template <>
    -inline Name
    +inline std::string
     BallMask< 3 >::get_name()
     {
       return names::spherical;
    @@ -920,14 +922,14 @@ BallMask< D >::BallMask( const dictionary& d )
     }
     
     template <>
    -inline Name
    +inline std::string
     EllipseMask< 2 >::get_name()
     {
       return names::elliptical;
     }
     
     template <>
    -inline Name
    +inline std::string
     EllipseMask< 3 >::get_name()
     {
       return names::ellipsoidal;
    diff --git a/nestkernel/mask_impl.h b/nestkernel/mask_impl.h
    index 603ceac0f7..298832b61d 100644
    --- a/nestkernel/mask_impl.h
    +++ b/nestkernel/mask_impl.h
    @@ -133,7 +133,7 @@ BoxMask< D >::get_dict() const
     {
       dictionary d;
       dictionary maskd;
    -  d[ get_name().toString() ] = maskd;
    +  d[ get_name() ] = maskd;
       maskd[ names::lower_left ] = lower_left_.get_vector();
       maskd[ names::upper_right ] = upper_right_.get_vector();
       maskd[ names::azimuth_angle ] = azimuth_angle_;
    @@ -209,7 +209,7 @@ BallMask< D >::get_dict() const
     {
       dictionary d;
       dictionary maskd;
    -  d[ get_name().toString() ] = maskd;
    +  d[ get_name() ] = maskd;
       maskd[ names::radius ] = radius_;
       maskd[ names::anchor ] = center_.get_vector();
       return d;
    @@ -287,7 +287,7 @@ EllipseMask< D >::get_dict() const
     {
       dictionary d;
       dictionary maskd;
    -  d[ get_name().toString() ] = maskd;
    +  d[ get_name() ] = maskd;
       maskd[ names::major_axis ] = major_axis_;
       maskd[ names::minor_axis ] = minor_axis_;
       maskd[ names::polar_axis ] = polar_axis_;
    diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp
    index 71ba2acffe..94d046d8b3 100644
    --- a/nestkernel/model_manager.cpp
    +++ b/nestkernel/model_manager.cpp
    @@ -25,6 +25,7 @@
     // C++ includes:
     #include <algorithm>
     #include <iostream>
    +#include <iomanip>
     #include <vector>
     
     // Includes from libnestutil:
    diff --git a/nestkernel/model_manager_impl.h b/nestkernel/model_manager_impl.h
    index 4d9e92eedb..638a089356 100644
    --- a/nestkernel/model_manager_impl.h
    +++ b/nestkernel/model_manager_impl.h
    @@ -30,6 +30,7 @@
     #include "string_utils.h"
     
     // Includes from nestkernel:
    +#include "exceptions.h"
     #include "connection_label.h"
     #include "kernel_manager.h"
     #include "nest.h"
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 9eb86c4921..3e1a5eaea4 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -884,10 +884,10 @@ slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR nc )
       if ( dict.known( names::positions ) )
       {
         //PyNEST-NG: Check if TokenArray is the correct type here
    -    const auto positions = dict.get< TokenArray >( names::positions );
    +    const auto positions = dict.get< std::vector < std::vector < double > > >( names::positions );
         if ( nc->size() != positions.size() )
         {
    -      TokenArray sliced_points;
    +      std::vector < std::vector < double > > sliced_points;
           // Iterate only local nodes
           NodeCollection::const_iterator nc_begin = nc->has_proxies() ? nc->MPI_local_begin() : nc->begin();
           NodeCollection::const_iterator nc_end = nc->end();
    diff --git a/nestkernel/nest_names.h b/nestkernel/nest_names.h
    index e645d2bb73..93c1cffe6e 100644
    --- a/nestkernel/nest_names.h
    +++ b/nestkernel/nest_names.h
    @@ -29,9 +29,6 @@
     // C++ includes:
     #include <string>
     
    -// Includes from sli:
    -#include "name.h"
    -
     namespace nest
     {
     
    diff --git a/nestkernel/nest_time.cpp b/nestkernel/nest_time.cpp
    index 2e9979aeef..b9713c2a1d 100644
    --- a/nestkernel/nest_time.cpp
    +++ b/nestkernel/nest_time.cpp
    @@ -134,25 +134,6 @@ Time::reset_resolution()
       LIM_MIN = -max;
     }
     
    -// double
    -// Time::ms::fromtoken( const Token& t )
    -// {
    -//   IntegerDatum* idat = dynamic_cast< IntegerDatum* >( t.datum() );
    -//   if ( idat )
    -//   {
    -//     return static_cast< double >( idat->get() );
    -//   }
    -
    -//   DoubleDatum* ddat = dynamic_cast< DoubleDatum* >( t.datum() );
    -//   if ( ddat )
    -//   {
    -//     return ddat->get();
    -//   }
    -
    -//   throw TypeMismatch( IntegerDatum().gettypename().toString() + " or " + DoubleDatum().gettypename().toString(),
    -//     t.datum()->gettypename().toString() );
    -// }
    -
     tic_t
     Time::fromstamp( Time::ms_stamp t )
     {
    diff --git a/nestkernel/nest_time.h b/nestkernel/nest_time.h
    index 6950abaf41..6adc73fc68 100644
    --- a/nestkernel/nest_time.h
    +++ b/nestkernel/nest_time.h
    @@ -38,8 +38,6 @@
     // Includes from nestkernel:
     #include "nest_types.h"
     
    -class Token;
    -
     namespace nest
     {
     class Time;
    @@ -266,10 +264,6 @@ class Time
           : t( t )
         {
         }
    -
    -    static double fromtoken( const Token& t );
    -    explicit ms( const Token& t )
    -      : t( fromtoken( t ) ) {};
       };
     
       struct ms_stamp
    diff --git a/nestkernel/nestmodule.cpp b/nestkernel/nestmodule.cpp
    deleted file mode 100644
    index 537cb04d85..0000000000
    --- a/nestkernel/nestmodule.cpp
    +++ /dev/null
    @@ -1,3114 +0,0 @@
    -/*
    - *  nestmodule.cpp
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "nestmodule.h"
    -
    -// C++ includes:
    -#include <iostream>
    -
    -// Includes from libnestutil:
    -#include "logging.h"
    -
    -// Includes from nestkernel:
    -#include "conn_builder.h"
    -#include "conn_builder_conngen.h"
    -#include "connection_creator_impl.h"
    -#include "connection_manager_impl.h"
    -#include "free_layer.h"
    -#include "genericmodel.h"
    -#include "grid_layer.h"
    -#include "grid_mask.h"
    -#include "kernel_manager.h"
    -#include "layer.h"
    -#include "layer_impl.h"
    -#include "mask.h"
    -#include "mask_impl.h"
    -#include "model_manager_impl.h"
    -#include "nest.h"
    -#include "nest_datums.h"
    -#include "nest_types.h"
    -#include "node.h"
    -#include "parameter.h"
    -#include "sp_manager_impl.h"
    -#include "spatial.h"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "doubledatum.h"
    -#include "interpret.h"
    -#include "sliexceptions.h"
    -#include "stringdatum.h"
    -#include "tokenutils.h"
    -
    -namespace nest
    -{
    -#ifdef HAVE_LIBNEUROSIM
    -SLIType NestModule::ConnectionGeneratorType;
    -#endif
    -SLIType NestModule::ConnectionType;
    -SLIType NestModule::MaskType;
    -SLIType NestModule::NodeCollectionType;
    -SLIType NestModule::NodeCollectionIteratorType;
    -SLIType NestModule::ParameterType;
    -
    -// At the time when NestModule is constructed, the SLI Interpreter
    -// must already be initialized. NestModule relies on the presence of
    -// the following SLI datastructures: Name, Dictionary
    -
    -NestModule::NestModule()
    -{
    -}
    -
    -NestModule::~NestModule()
    -{
    -  // The network is deleted outside NestModule, since the
    -  // dynamicloadermodule also needs it
    -
    -  ConnectionType.deletetypename();
    -  NodeCollectionType.deletetypename();
    -  NodeCollectionIteratorType.deletetypename();
    -  ParameterType.deletetypename();
    -}
    -
    -// The following concerns the new module:
    -
    -const std::string
    -NestModule::name() const
    -{
    -  return std::string( "NEST Kernel 2" ); // Return name of the module
    -}
    -
    -const std::string
    -NestModule::commandstring() const
    -{
    -  return std::string( "(nest-init) run" );
    -}
    -
    -// ParameterDatum
    -// NestModule::create_parameter( const Token& t )
    -// {
    -//   // t can be an existing ParameterDatum, a DoubleDatum containing a
    -//   // constant value for this parameter, or a Dictionary containing
    -//   // parameters
    -//   ParameterDatum* pd = dynamic_cast< ParameterDatum* >( t.datum() );
    -//   if ( pd )
    -//   {
    -//     return *pd;
    -//   }
    -
    -//   // If t is a DoubleDatum, create a ConstantParameter with this value
    -//   DoubleDatum* dd = dynamic_cast< DoubleDatum* >( t.datum() );
    -//   if ( dd )
    -//   {
    -//     return new ConstantParameter( *dd );
    -//   }
    -
    -//  // If t is a IntegerDatum, create a ConstantParameter with this value
    -//  IntegerDatum* id = dynamic_cast< IntegerDatum* >( t.datum() );
    -//  if ( id )
    -//  {
    -//    return new ConstantParameter( static_cast< double >( *id ) );
    -//  }
    -//
    -//  DictionaryDatum* dictd = dynamic_cast< DictionaryDatum* >( t.datum() );
    -//  if ( dictd )
    -//  {
    -
    -//     // The dictionary should only have a single key, which is the name of
    -//     // the parameter type to create.
    -//     if ( ( *dictd )->size() != 1 )
    -//     {
    -//       throw BadProperty( "Parameter definition dictionary must contain one single key only." );
    -//     }
    -
    -//     Name n = ( *dictd )->begin()->first;
    -//     DictionaryDatum pdict = *dictd.get<DictionaryDatum>(n.toString());
    -//     return create_parameter( n, pdict );
    -//   }
    -//   else
    -//   {
    -//     throw BadProperty( "Parameter must be parametertype, constant or dictionary." );
    -//   }
    -// }
    -
    -// Parameter*
    -// NestModule::create_parameter( const Name& name, const DictionaryDatum& d )
    -// {
    -//   // The parameter factory will create the parameter
    -//   Parameter* param = parameter_factory_().create( name, d );
    -
    -//   return param;
    -// }
    -
    -GenericFactory< Parameter >&
    -NestModule::parameter_factory_()
    -{
    -  static GenericFactory< Parameter > factory;
    -  return factory;
    -}
    -
    -
    -GenericFactory< AbstractMask >&
    -NestModule::mask_factory_()
    -{
    -  static GenericFactory< AbstractMask > factory;
    -  return factory;
    -}
    -
    -MaskDatum
    -NestModule::create_mask( const dictionary& params )
    -{
    -  // TODO-PYNEST-NG: move and convert to use dictionary
    -  // // t can be either an existing MaskDatum, or a Dictionary containing
    -  // // mask parameters
    -  // MaskDatum* maskd = dynamic_cast< MaskDatum* >( t.datum() );
    -  // if ( maskd )
    -  // {
    -  //   return *maskd;
    -  // }
    -  // else
    -  // {
    -
    -  //   DictionaryDatum* dd = dynamic_cast< DictionaryDatum* >( t.datum() );
    -  //   if ( not dd )
    -  //   {
    -  //     throw BadProperty( "Mask must be masktype or dictionary." );
    -  //   }
    -  //
    -  //   // The dictionary should contain one key which is the name of the
    -  //   // mask type, and optionally the key 'anchor'. To find the unknown
    -  //   // mask type key, we must loop through all keys. The value for the
    -  //   // anchor key will be stored in the anchor_token variable.
    -  //   Token anchor_token;
    -  //   bool has_anchor = false;
    -  //   AbstractMask* mask = nullptr;
    -
    -  //   for ( Dictionary::iterator dit = ( *dd )->begin(); dit != ( *dd )->end(); ++dit )
    -  //   {
    -
    -  //     if ( dit->first == names::anchor )
    -  //     {
    -
    -  //       anchor_token = dit->second;
    -  //       has_anchor = true;
    -  //     }
    -  //     else
    -  //     {
    -
    -  //       if ( mask )
    -  //       { // mask has already been defined
    -  //         throw BadProperty( "Mask definition dictionary contains extraneous items." );
    -  //       }
    -  //       mask = create_mask( dit->first, getValue< DictionaryDatum >( dit->second ) );
    -  //     }
    -  //   }
    -
    -  //   if ( has_anchor )
    -  //   {
    -
    -  //     // The anchor may be an array of doubles (a spatial position).
    -  //     // For grid layers only, it is also possible to provide an array of longs.
    -  //     try
    -  //     {
    -  //       std::vector< long > anchor = getValue< std::vector< long > >( anchor_token );
    -
    -  //       switch ( anchor.size() )
    -  //       {
    -  //       case 2:
    -  //         try
    -  //         {
    -  //           GridMask< 2 >& grid_mask_2d = dynamic_cast< GridMask< 2 >& >( *mask );
    -  //           grid_mask_2d.set_anchor( Position< 2, int >( anchor[ 0 ], anchor[ 1 ] ) );
    -  //         }
    -  //         catch ( std::bad_cast& e )
    -  //         {
    -  //           throw BadProperty( "Mask must be 2-dimensional grid mask." );
    -  //         }
    -  //         break;
    -  //       case 3:
    -  //         try
    -  //         {
    -  //           GridMask< 3 >& grid_mask_3d = dynamic_cast< GridMask< 3 >& >( *mask );
    -  //           grid_mask_3d.set_anchor( Position< 3, int >( anchor[ 0 ], anchor[ 1 ], anchor[ 2 ] ) );
    -  //         }
    -  //         catch ( std::bad_cast& e )
    -  //         {
    -  //           throw BadProperty( "Mask must be 3-dimensional grid mask." );
    -  //         }
    -  //         break;
    -  //       }
    -  //     }
    -  //     catch ( TypeMismatch& e )
    -  //     {
    -  //       std::vector< double > anchor = getValue< std::vector< double > >( anchor_token );
    -  //       AbstractMask* amask;
    -
    -  //       switch ( anchor.size() )
    -  //       {
    -  //       case 2:
    -  //         amask = new AnchoredMask< 2 >( dynamic_cast< Mask< 2 >& >( *mask ), anchor );
    -  //         break;
    -  //       case 3:
    -  //         amask = new AnchoredMask< 3 >( dynamic_cast< Mask< 3 >& >( *mask ), anchor );
    -  //         break;
    -  //       default:
    -  //         throw BadProperty( "Anchor must be 2- or 3-dimensional." );
    -  //       }
    -
    -  //       delete mask;
    -  //       mask = amask;
    -  //     }
    -  //   }
    -
    -  //   return mask;
    -  // }
    -}
    -
    -// static AbstractMask*
    -// create_doughnut( const DictionaryDatum& d )
    -// {
    -//   // The doughnut (actually an annulus) is created using a DifferenceMask
    -//   // Position< 2 > center( 0, 0 );
    -//   // if ( d.known( names::anchor ) )
    -//   // {
    -//   //   center = d.get< std::vector< double > >( names::anchor );
    -//   // }
    -
    -//   // const double outer = d.get< double >( names::outer_radius );
    -//   // const double inner = d.get< double >( names::inner_radius );
    -//   // if ( inner >= outer )
    -//   // {
    -//   //   throw BadProperty(
    -//   //     "nest::create_doughnut: "
    -//   //     "inner_radius < outer_radius required." );
    -//   // }
    -
    -//   // BallMask< 2 > outer_circle( center, outer );
    -//   // BallMask< 2 > inner_circle( center, inner );
    -
    -//   // return new DifferenceMask< 2 >( outer_circle, inner_circle );
    -// }
    -
    -
    -/** @BeginDocumentation
    -   Name: SetStatus - sets the value of properties of a node, connection, or object
    -
    -   Synopsis:
    -   node_id   dict SetStatus -> -
    -   conn  dict SetStatus -> -
    -   obj   dict SetStatus -> -
    -
    -   Description:
    -   SetStatus changes properties of a node (specified by its node_id), a connection
    -   (specified by a connection object), or an object as used in object-oriented
    -   programming in SLI (see cvo for more). Properties can be inspected with GetStatus.
    -
    -   Note that many properties are read-only and cannot be changed.
    -
    -   Examples:
    -   /dc_generator Create /dc_gen Set  %Creates a dc_generator, which is a node
    -   dc_gen GetStatus info %view properties (amplitude is 0)
    -   dc_gen << /amplitude 1500. >> SetStatus
    -   dc_gen GetStatus info % amplitude is now 1500
    -
    -   Author: docu by Sirko Straube
    -
    -   SeeAlso: ShowStatus, GetStatus, GetKernelStatus, info, Set, SetStatus_dict
    -*/
    -void
    -NestModule::SetStatus_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  // i->assert_stack_load( 2 );
    -
    -  // DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() );
    -  // index node_id = getValue< long >( i->OStack.pick( 1 ) );
    -
    -  // // set_node_status( node_id, dict );
    -
    -  // i->OStack.pop( 2 );
    -  // i->EStack.pop();
    -}
    -
    -void
    -NestModule::SetStatus_CDFunction::execute( SLIInterpreter* i ) const
    -{
    -  // i->assert_stack_load( 2 );
    -
    -  // DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() );
    -  // ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.pick( 1 ) );
    -
    -  // // set_connection_status( conn, dict );
    -
    -  // i->OStack.pop( 2 );
    -  // i->EStack.pop();
    -}
    -
    -void
    -NestModule::SetKernelStatus_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  // i->assert_stack_load( 1 );
    -
    -  // DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.top() );
    -
    -  // // set_kernel_status( dict );
    -
    -  // i->OStack.pop();
    -  // i->EStack.pop();
    -}
    -
    -void
    -NestModule::Cva_CFunction::execute( SLIInterpreter* i ) const
    -{
    -  ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.top() );
    -  ArrayDatum ad;
    -  // ad.push_back( conn.get_source_node_id() );
    -  // ad.push_back( conn.get_target_node_id() );
    -  // ad.push_back( conn.get_target_thread() );
    -  // ad.push_back( conn.get_synapse_model_id() );
    -  // ad.push_back( conn.get_port() );
    -  Token result( ad );
    -  i->OStack.top().swap( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::SetStatus_aaFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  // ArrayDatum dict_a = getValue< ArrayDatum >( i->OStack.top() );
    -  // ArrayDatum conn_a = getValue< ArrayDatum >( i->OStack.pick( 1 ) );
    -
    -  // if ( ( dict_a.size() != 1 ) and ( dict_a.size() != conn_a.size() ) )
    -  // {
    -  //   throw RangeCheck();
    -  // }
    -  // if ( dict_a.size() == 1 ) // Broadcast
    -  // {
    -  //   DictionaryDatum dict = getValue< DictionaryDatum >( dict_a[ 0 ] );
    -  //   const size_t n_conns = conn_a.size();
    -  //   for ( size_t con = 0; con < n_conns; ++con )
    -  //   {
    -  //     ConnectionDatum con_id = getValue< ConnectionDatum >( conn_a[ con ] );
    -  //     dict->clear_access_flags();
    -  //     kernel().connection_manager.set_synapse_status( con_id.get_source_node_id(),
    -  //       con_id.get_target_node_id(),
    -  //       con_id.get_target_thread(),
    -  //       con_id.get_synapse_model_id(),
    -  //       con_id.get_port(),
    -  //       dict );
    -
    -  //     ALL_ENTRIES_ACCESSED( *dict, "SetStatus", "Unread dictionary entries: " );
    -  //   }
    -  // }
    -  // else
    -  // {
    -  //   const size_t n_conns = conn_a.size();
    -  //   for ( size_t con = 0; con < n_conns; ++con )
    -  //   {
    -  //     DictionaryDatum dict = getValue< DictionaryDatum >( dict_a[ con ] );
    -  //     ConnectionDatum con_id = getValue< ConnectionDatum >( conn_a[ con ] );
    -  //     dict->clear_access_flags();
    -  //     kernel().connection_manager.set_synapse_status( con_id.get_source_node_id(),
    -  //       con_id.get_target_node_id(),
    -  //       con_id.get_target_thread(),
    -  //       con_id.get_synapse_model_id(),
    -  //       con_id.get_port(),
    -  //       dict );
    -
    -  //     ALL_ENTRIES_ACCESSED( *dict, "SetStatus", "Unread dictionary entries: " );
    -  //   }
    -  // }
    -
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: GetStatus - return the property dictionary of a node, connection, or object
    -
    -   Synopsis:
    -   node_id   GetStatus -> dict
    -   conn  GetStatus -> dict
    -   obj   GetStatus -> dict
    -
    -   Description:
    -   GetStatus returns a dictionary with the status information
    -   for a node (specified by its node_id), a connection (specified by a connection
    -   object), or an object as used in object-oriented programming in SLI (see cvo for more).
    -
    -   The interpreter exchanges data with the network element using
    -   its status dictionary. To abbreviate the access pattern
    -        node_id GetStatus /lit get
    -   a variant of get implicitly calls GetStatus
    -        node_id /lit get .
    -   In this way network elements and dictionaries can be accessed
    -   with the same syntax. Sometimes access to nested data structures in
    -   the status dictionary is required. In this case the advanced addressing
    -   scheme of get is useful in which the second argument is an array of
    -   literals. See the documentation of get for details.
    -
    -   The information contained in the property dictionary depends on the
    -   concrete node model.
    -
    -   Please refer to the model documentation for details.
    -
    -   Standard entries for nodes:
    -
    -   global_id   - local ID of the node
    -   model       - literal, defining the current node
    -   frozen      - frozen nodes are not updated
    -   thread      - the thread the node is allocated on
    -   vp          - the virtual process a node belongs to
    -
    -   Note that the standard entries cannot be modified directly.
    -
    -   Author: Marc-Oliver Gewaltig
    -   Availability: NEST
    -   SeeAlso: ShowStatus, info, SetStatus, get, GetStatus_dict,
    -   GetKernelStatus
    -*/
    -void
    -NestModule::GetStatus_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  NodeCollectionDatum nc = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -  if ( not nc->valid() )
    -  {
    -    throw KernelException(
    -      "InvalidNodeCollection: note that ResetKernel invalidates all previously created NodeCollections." );
    -  }
    -
    -  size_t nc_size = nc->size();
    -  ArrayDatum result;
    -
    -  result.reserve( nc_size );
    -
    -  for ( NodeCollection::const_iterator it = nc->begin(); it < nc->end(); ++it )
    -  {
    -    index node_id = ( *it ).node_id;
    -    // DictionaryDatum dict = get_node_status( node_id );
    -    // result.push_back( dict );
    -  }
    -
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::GetStatus_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  index node_id = getValue< long >( i->OStack.pick( 0 ) );
    -  // DictionaryDatum dict = get_node_status( node_id );
    -
    -  i->OStack.pop();
    -  // i->OStack.push( dict );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::GetStatus_CFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.pick( 0 ) );
    -
    -  // DictionaryDatum result_dict = kernel().connection_manager.get_synapse_status( conn.get_source_node_id(),
    -  //   conn.get_target_node_id(),
    -  //   conn.get_target_thread(),
    -  //   conn.get_synapse_model_id(),
    -  //   conn.get_port() );
    -
    -  i->OStack.pop();
    -  // i->OStack.push( result_dict );
    -  i->EStack.pop();
    -}
    -
    -// [intvector1,...,intvector_n]  -> [dict1,.../dict_n]
    -void
    -NestModule::GetStatus_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  const ArrayDatum conns = getValue< ArrayDatum >( i->OStack.pick( 0 ) );
    -  size_t n_results = conns.size();
    -  ArrayDatum result;
    -  result.reserve( n_results );
    -  for ( size_t nt = 0; nt < n_results; ++nt )
    -  {
    -    ConnectionDatum con_id = getValue< ConnectionDatum >( conns.get( nt ) );
    -    // DictionaryDatum result_dict = kernel().connection_manager.get_synapse_status( con_id.get_source_node_id(),
    -    //   con_id.get_target_node_id(),
    -    //   con_id.get_target_thread(),
    -    //   con_id.get_synapse_model_id(),
    -    //   con_id.get_port() );
    -    // result.push_back( result_dict );
    -  }
    -
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::GetMetadata_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  NodeCollectionDatum nc = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -  if ( not nc->valid() )
    -  {
    -    throw KernelException(
    -      "InvalidNodeCollection: note that ResetKernel invalidates all previously created NodeCollections." );
    -  }
    -
    -  NodeCollectionMetadataPTR meta = nc->get_metadata();
    -  // DictionaryDatum dict = DictionaryDatum( new Dictionary );
    -
    -  // return empty dict if NC does not have metadata
    -  if ( meta.get() )
    -  {
    -    // meta->get_status( dict );
    -    // slice_positions_if_sliced_nc( dict, nc );
    -
    -    // dict[ names::network_size ] = nc->size();
    -  }
    -
    -  i->OStack.pop();
    -  // i->OStack.push( dict );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::GetKernelStatus_Function::execute( SLIInterpreter* i ) const
    -{
    -  // DictionaryDatum dict = get_kernel_status();
    -
    -  // i->OStack.push( dict );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: SetDefaults - Set the default values for a node or synapse model.
    -  Synopsis: /modelname dict SetDefaults -> -
    -  SeeAlso: GetDefaults
    -  Author: Jochen Martin Eppler
    -  FirstVersion: September 2008
    -*/
    -void
    -NestModule::SetDefaults_l_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  // const std::string name = getValue< std::string >( i->OStack.pick( 1 ) );
    -  // DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -  // 
    -  // set_model_defaults( name, params );
    -
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: GetDefaults - Return the default values for a node or synapse model.
    -  Synopsis: /modelname GetDefaults -> dict
    -  SeeAlso: SetDefaults
    -  Author: Jochen Martin Eppler
    -  FirstVersion: September 2008
    -*/
    -void
    -NestModule::GetDefaults_lFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  // const std::string modelname = getValue< std::string >( i->OStack.pick( 0 ) );
    -
    -  // DictionaryDatum dict = get_model_defaults( modelname );
    -
    -  // i->OStack.pop();
    -  // i->OStack.push( dict );
    -  // i->EStack.pop();
    -}
    -
    -void
    -NestModule::GetConnections_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  // DictionaryDatum dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // ArrayDatum array = get_connections( dict );
    -
    -  i->OStack.pop();
    -  // i->OStack.push( array );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: Simulate - simulate n milliseconds
    -
    -   Synopsis:
    -   n(int) Simulate -> -
    -
    -   Description: Simulate the network for n milliseconds.
    -
    -   SeeAlso: Run, Prepare, Cleanup, unit_conversion
    -*/
    -void
    -NestModule::SimulateFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  const double time = i->OStack.top();
    -
    -  simulate( time );
    -
    -  // successful end of simulate
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: Run - simulate n milliseconds
    -
    -   Synopsis:
    -   n(int) Run -> -
    -
    -   Description: Simulate the network for n milliseconds.
    -   Call prepare before, and cleanup after.
    -   t m mul Simulate = Prepare m { t Run } repeat Cleanup
    -
    -   Note: Run must only be used after Prepare is called, and
    -   before Cleanup to finalize state (close files, etc).
    -   Any changes made between Prepare and Cleanup may cause
    -   undefined behavior and incorrect results.
    -
    -   SeeAlso: Simulate, unit_conversion, Prepare, Cleanup
    -*/
    -void
    -NestModule::RunFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  const double time = i->OStack.top();
    -
    -  run( time );
    -
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    -   Name: Prepare - prepare the network for a simulation
    -
    -   Synopsis:
    -   Prepare -> -
    -
    -   Description: sets up network calibration before run is called
    -   any number of times
    -
    -   Note: Run must only be used after Prepare is called, and
    -   before Cleanup to finalize state (close files, etc).
    -   Any changes made between Prepare and Cleanup may cause
    -   undefined behavior and incorrect results.
    -
    -   SeeAlso: Run, Cleanup, Simulate
    -*/
    -void
    -NestModule::PrepareFunction::execute( SLIInterpreter* i ) const
    -{
    -  prepare();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: Cleanup - cleanup the network after a simulation
    -
    -   Synopsis:
    -   Cleanup -> -
    -
    -   Description: tears down a network after run is called
    -   any number of times
    -
    -   Note: Run must only be used after Prepare is called, and
    -   before Cleanup to finalize state (close files, etc).
    -   Any changes made between Prepare and Cleanup may cause
    -   undefined behavior and incorrect results.
    -
    -   SeeAlso: Run, Prepare, Simulate
    -*/
    -void
    -NestModule::CleanupFunction::execute( SLIInterpreter* i ) const
    -{
    -  cleanup();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: CopyModel - copy a model to a new name, set parameters for copy, if
    -   given
    -   Synopsis:
    -   /model /new_model param_dict -> -
    -   /model /new_model            -> -
    -   Parameters:
    -   /model      - literal naming an existing model
    -   /new_model  - literal name of the copy to create, must not exist before
    -   /param_dict - parameters to set in the new_model
    -   Description:
    -   A copy of model is created and registered under the name new_model.
    -   If a parameter dictionary is given, the parameters are set in new_model.
    - */
    -void
    -NestModule::CopyModel_l_l_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 3 );
    -
    -  // fetch existing model name from stack
    -  const Name old_name = getValue< Name >( i->OStack.pick( 2 ) );
    -  const Name new_name = getValue< Name >( i->OStack.pick( 1 ) );
    -  // DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // kernel().model_manager.copy_model( old_name, new_name, params );
    -
    -  i->OStack.pop( 3 );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: Create - create nodes
    -
    -   Synopsis:
    -   /model          Create -> NodeCollection
    -   /model n        Create -> NodeCollection
    -   /model   params Create -> NodeCollection
    -   /model n params Create -> NodeCollection
    -
    -   Parameters:
    -   /model - literal naming the modeltype
    -   n      - the desired number of nodes
    -   params - parameters for the newly created node(s)
    -
    -   Returns:
    -   node_ids   - NodeCollection representing nodes created
    -
    -   Description:
    -   Create generates n new network objects of the supplied model
    -   type. If n is not given, a single node is created. params is a
    -   dictionary with parameters for the new nodes.
    -*/
    -void
    -NestModule::Create_l_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  // check for stack load
    -  i->assert_stack_load( 2 );
    -
    -  // extract arguments
    -  const long n_nodes = getValue< long >( i->OStack.pick( 0 ) );
    -  if ( n_nodes <= 0 )
    -  {
    -    throw RangeCheck();
    -  }
    -
    -  const std::string modname = getValue< std::string >( i->OStack.pick( 1 ) );
    -
    -  NodeCollectionDatum nodes_created = create( modname, n_nodes );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( nodes_created );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::GetNodes_D_b::execute( SLIInterpreter* i ) const
    -{
    -  // check for stack load
    -  i->assert_stack_load( 2 );
    -
    -  // extract arguments
    -  // const bool local_only = getValue< bool >( i->OStack.pick( 0 ) );
    -  // const DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 1 ) );
    -
    -  // NodeCollectionDatum nodes = get_nodes( params, local_only );
    -
    -  i->OStack.pop( 2 );
    -  // i->OStack.push( nodes );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: ResetKernel - Put the simulation kernel back to its initial state.
    -   Description:
    -   This function re-initializes the simulation kernel, returning it to the
    -   same state as after NEST has started.
    -   In particular,
    -   - all network nodes
    -   - all connections
    -   - all user-defined neuron and synapse models
    -   are deleted, and
    -   - time
    -   - random generators
    -   are reset. The only exception is that dynamically loaded modules are not
    -   unloaded. This may change in a future version of NEST. The SLI interpreter
    -   is not affected by ResetKernel.
    -   Availability: NEST
    -   Author: Marc-oliver Gewaltig
    -   SeeAlso: reset, ResetOptions
    -*/
    -void
    -NestModule::ResetKernelFunction::execute( SLIInterpreter* i ) const
    -{
    -  reset_kernel();
    -  i->EStack.pop();
    -}
    -
    -// Disconnect for nodecollection nodecollection conn_spec syn_spec
    -void
    -NestModule::Disconnect_g_g_D_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 4 );
    -
    -  NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) );
    -  NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) );
    -  // DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) );
    -  // DictionaryDatum synapse_params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // dictionary access checking is handled by disconnect
    -  // kernel().sp_manager.disconnect( sources, targets, connectivity, synapse_params );
    -
    -  i->OStack.pop( 4 );
    -  i->EStack.pop();
    -}
    -
    -// Disconnect for arraydatum
    -void
    -NestModule::Disconnect_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  const ArrayDatum conns = getValue< ArrayDatum >( i->OStack.pick( 0 ) );
    -
    -  disconnect( conns );
    -
    -  i->OStack.pop( 1 );
    -  i->EStack.pop();
    -}
    -
    -// Connect for nodecollection nodecollection conn_spec syn_spec
    -// See lib/sli/nest-init.sli for details
    -void
    -NestModule::Connect_g_g_D_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  // kernel().connection_manager.sw_construction_connect.start();
    -
    -  i->assert_stack_load( 4 );
    -
    -  // NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) );
    -  // NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) );
    -  // DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) );
    -  // DictionaryDatum synapse_params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // // dictionary access checking is handled by connect
    -  // kernel().connection_manager.connect( sources, targets, connectivity, { synapse_params } );
    -
    -  // i->OStack.pop( 4 );
    -  // i->EStack.pop();
    -
    -  // kernel().connection_manager.sw_construction_connect.stop();
    -}
    -
    -void
    -NestModule::Connect_g_g_D_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // kernel().connection_manager.sw_construction_connect.start();
    -
    -  i->assert_stack_load( 4 );
    -
    -  // NodeCollectionDatum sources = getValue< NodeCollectionDatum >( i->OStack.pick( 3 ) );
    -  // NodeCollectionDatum targets = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) );
    -  // DictionaryDatum connectivity = getValue< DictionaryDatum >( i->OStack.pick( 1 ) );
    -  // ArrayDatum synapse_params_arr = getValue< ArrayDatum >( i->OStack.pick( 0 ) );
    -  // std::vector< DictionaryDatum > synapse_params;
    -
    -  // for ( auto syn_param : synapse_params_arr )
    -  // {
    -  //   synapse_params.push_back( getValue< DictionaryDatum >( syn_param ) );
    -  // }
    -
    -  // // dictionary access checking is handled by connect
    -  // kernel().connection_manager.connect( sources, targets, connectivity, synapse_params );
    -
    -  // i->OStack.pop( 4 );
    -  // i->EStack.pop();
    -
    -  // kernel().connection_manager.sw_construction_connect.stop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: MemoryInfo - Report current memory usage.
    -   Description:
    -   MemoryInfo reports the current utilization of the memory manager for all
    -   models, which are used at least once. The output is sorted ascending
    -   according according to the name of the model is written to stdout. The unit
    -   of the data is byte. Note that MemoryInfo only gives you information about
    -   the memory requirements of the static model data inside of NEST. It does not
    -   tell anything about the memory situation on your computer.
    -   Synopsis:
    -   MemoryInfo -> -
    -   Availability: NEST
    -   Author: Jochen Martin Eppler
    -*/
    -void
    -NestModule::MemoryInfoFunction::execute( SLIInterpreter* i ) const
    -{
    -  kernel().model_manager.memory_info();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: PrintNodes - Print nodes in the network.
    -   Synopsis:
    -   -  PrintNodes -> -
    -   Description:
    -   Print node ID ranges and model names of the nodes in the network. Print the
    -   information directly to screen.
    -*/
    -
    -void
    -NestModule::PrintNodesFunction::execute( SLIInterpreter* i ) const
    -{
    -  // print_nodes_to_stream();
    -  std::cout << std::endl;
    -  i->EStack.pop();
    -}
    -
    -/* BeginDocumentation
    -   Name: PrintNodesToStream - Redirect printing of nodes in the network.
    -   Synopsis:
    -   -  PrintNodesToStream -> -
    -   Description:
    -   Returns string output that can be used to print information about the nodes
    -   in the network.
    -   The string is the information directly printed by PrintNodes.
    -*/
    -
    -void
    -NestModule::PrintNodesToStreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  std::stringstream out;
    -  // print_nodes_to_stream( out );
    -
    -  i->OStack.push( out.str() );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: Rank - Return the MPI rank of the process.
    -   Synopsis: Rank -> int
    -   Description:
    -   Returns the rank of the MPI process (MPI_Comm_rank) executing the
    -   command. This function is mainly meant for logging and debugging
    -   purposes. It is highly discouraged to use this function to write
    -   rank-dependent code in a simulation script as this can break NEST
    -   in funny ways, of which dead-locks are the nicest.
    -   Availability: NEST 2.0
    -   Author: Jochen Martin Eppler
    -   FirstVersion: January 2006
    -   SeeAlso: NumProcesses, SyncProcesses, ProcessorName
    -*/
    -void
    -NestModule::RankFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->OStack.push( kernel().mpi_manager.get_rank() );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: NumProcesses - Return the number of MPI processes.
    -   Synopsis: NumProcesses -> int
    -   Description:
    -   Returns the number of MPI processes (MPI_Comm_size). This
    -   function is mainly meant for logging and debugging purposes.
    -   Availability: NEST 2.0
    -   Author: Jochen Martin Eppler
    -   FirstVersion: January 2006
    -   SeeAlso: Rank, SyncProcesses, ProcessorName
    -*/
    -void
    -NestModule::NumProcessesFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->OStack.push( kernel().mpi_manager.get_num_processes() );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: SetFakeNumProcesses - Set a fake number of MPI processes.
    -   Synopsis: n_procs SetFakeNumProcesses -> -
    -   Description:
    -   Sets the number of MPI processes to n_procs. Used for benchmarking purposes
    -   of memory consumption only.
    -   Please note:
    -   - Simulation of the network will not be possible after setting fake
    -     processes.
    -   - It is not possible to use this function when running a script on multiple
    -     actual MPI processes.
    -   - The setting of the fake number of processes has to happen before the kernel
    -     reset and before the setting of the local number of threads.
    -     After calling SetFakeNumProcesses, it is obligatory to call either
    -     ResetKernel or SetStatus on the Kernel for the setting of the fake
    -     number of processes to come into effect.
    -
    -   A typical use case would be to test if a neuronal network fits on a machine
    -   of given size without using the actual resources.
    -
    -   Example:
    -             %%% Set fake number of processes
    -             100 SetFakeNumProcesses
    -
    -             %%% Build network
    -             /iaf_psc_alpha 100 Create
    -             [1 100] Range /n Set
    -
    -             << /source n /target n >> Connect
    -
    -             %%% Measure memory consumption
    -             memory_thisjob ==
    -
    -       Execute this script with
    -             mpirun -np 1 nest example.sli
    -
    -   Availability: NEST 2.2
    -   Author: Susanne Kunkel
    -   FirstVersion: July 2011
    -   SeeAlso: NumProcesses
    -*/
    -void
    -NestModule::SetFakeNumProcesses_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  long n_procs = getValue< long >( i->OStack.pick( 0 ) );
    -
    -  enable_dryrun_mode( n_procs );
    -
    -  i->OStack.pop( 1 );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: SyncProcesses - Synchronize all MPI processes.
    -   Synopsis: SyncProcesses -> -
    -   Availability: NEST 2.0
    -   Author: Alexander Hanuschkin
    -   FirstVersion: April 2009
    -   Description:
    -   This function allows to synchronize all MPI processes at any
    -   point in a simulation script. Internally, the function uses
    -   MPI_Barrier(). Note that during simulation the processes are
    -   automatically synchronized without the need for user interaction.
    -   SeeAlso: Rank, NumProcesses, ProcessorName
    -*/
    -void
    -NestModule::SyncProcessesFunction::execute( SLIInterpreter* i ) const
    -{
    -  kernel().mpi_manager.synchronize();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: TimeCommunication - returns average time taken for MPI_Allgather over n
    -   calls with m bytes
    -   Synopsis:
    -   n m TimeCommunication -> time
    -   Availability: NEST 2.0
    -   Author: Abigail Morrison
    -   FirstVersion: August 2009
    -   Description:
    -   The function allows a user to test how much time a call the Allgather costs
    -*/
    -void
    -NestModule::TimeCommunication_i_i_bFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 3 );
    -  long samples = getValue< long >( i->OStack.pick( 2 ) );
    -  long num_bytes = getValue< long >( i->OStack.pick( 1 ) );
    -  bool offgrid = getValue< bool >( i->OStack.pick( 0 ) );
    -
    -  double time = 0.0;
    -  if ( offgrid )
    -  {
    -    time = kernel().mpi_manager.time_communicate_offgrid( num_bytes, samples );
    -  }
    -  else
    -  {
    -    time = kernel().mpi_manager.time_communicate( num_bytes, samples );
    -  }
    -
    -  i->OStack.pop( 3 );
    -  i->OStack.push( time );
    -  i->EStack.pop();
    -}
    -/** @BeginDocumentation
    -   Name: TimeCommunicationv - returns average time taken for MPI_Allgatherv over
    -   n calls with m
    -   bytes
    -   Synopsis:
    -   n m TimeCommunication -> time
    -   Availability: NEST 2.0
    -   Author:
    -   FirstVersion: August 2012
    -   Description:
    -   The function allows a user to test how much time a call the Allgatherv costs
    -   Does not work for offgrid!!!
    -*/
    -void
    -NestModule::TimeCommunicationv_i_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  long samples = getValue< long >( i->OStack.pick( 1 ) );
    -  long num_bytes = getValue< long >( i->OStack.pick( 0 ) );
    -
    -
    -  double time = 0.0;
    -
    -  time = kernel().mpi_manager.time_communicatev( num_bytes, samples );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( time );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: TimeCommunicationAlltoall - returns average time taken for MPI_Alltoall
    -   over n calls with m
    -   bytes
    -   Synopsis:
    -   n m TimeCommunicationAlltoall -> time
    -   Availability: 10kproject (>r11254)
    -   Author: Jakob Jordan
    -   FirstVersion: June 2014
    -   Description:
    -   The function allows a user to test how much time a call to MPI_Alltoall costs
    -   SeeAlso: TimeCommunication
    - */
    -void
    -NestModule::TimeCommunicationAlltoall_i_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  long samples = getValue< long >( i->OStack.pick( 1 ) );
    -  long num_bytes = getValue< long >( i->OStack.pick( 0 ) );
    -
    -
    -  double time = 0.0;
    -
    -  time = kernel().mpi_manager.time_communicate_alltoall( num_bytes, samples );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( time );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: TimeCommunicationAlltoallv - returns average time taken for
    -   MPI_Alltoallv over n calls with
    -   m bytes
    -   Synopsis:
    -   n m TimeCommunicationAlltoallv -> time
    -   Availability: 10kproject (>r11300)
    -   Author: Jakob Jordan
    -   FirstVersion: July 2014
    -   Description:
    -   The function allows a user to test how much time a call to MPI_Alltoallv
    -   costs
    -   SeeAlso: TimeCommunication
    - */
    -void
    -NestModule::TimeCommunicationAlltoallv_i_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  long samples = getValue< long >( i->OStack.pick( 1 ) );
    -  long num_bytes = getValue< long >( i->OStack.pick( 0 ) );
    -
    -
    -  double time = 0.0;
    -
    -  time = kernel().mpi_manager.time_communicate_alltoallv( num_bytes, samples );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( time );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: ProcessorName - Returns a unique specifier for the actual node.
    -   Synopsis: ProcessorName -> string
    -   Availability: NEST 2.0
    -   Author: Alexander Hanuschkin
    -   FirstVersion: April 2009
    -   Description:
    -   This function returns the name of the processor it was called
    -   on (MPI_Get_processor_name). See MPI documentation for more details. If NEST
    -   is not compiled with MPI support, this function returns the hostname of
    -   the machine as returned by the POSIX function gethostname().
    -   Examples:
    -   (I'm process ) =only Rank 1 add =only ( of ) =only NumProcesses =only ( on
    -   machine ) =only
    -   ProcessorName =
    -   SeeAlso: Rank, NumProcesses, SyncProcesses
    -*/
    -void
    -NestModule::ProcessorNameFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->OStack.push( kernel().mpi_manager.get_processor_name() );
    -  i->EStack.pop();
    -}
    -
    -#ifdef HAVE_MPI
    -/** @BeginDocumentation
    -   Name: abort - Abort all NEST processes gracefully.
    -   Parameters:
    -   exitcode - The exitcode to quit with
    -   Description:
    -   This function can be run by the user to end all NEST processes as
    -   gracefully as possible. If NEST is compiled without MPI support,
    -   this will just call quit_i. If compiled with MPI support, it will
    -   call MPI_Abort, which will kill all processes of the application
    -   and thus prevents deadlocks. The exitcode is userabort in both
    -   cases (see statusdict/exitcodes).
    -   Availability: NEST 2.0
    -   Author: Jochen Martin Eppler
    -   FirstVersion: October 2012
    -   SeeAlso: quit, Rank, SyncProcesses, ProcessorName
    -*/
    -void
    -NestModule::MPIAbort_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  long exitcode = getValue< long >( i->OStack.pick( 0 ) );
    -  kernel().mpi_manager.mpi_abort( exitcode );
    -  i->EStack.pop();
    -}
    -#endif
    -
    -void
    -NestModule::Cvdict_CFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  ConnectionDatum conn = getValue< ConnectionDatum >( i->OStack.pick( 0 ) );
    -  // DictionaryDatum dict = conn.get_dict();
    -
    -  i->OStack.pop();
    -  // i->OStack.push( dict );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Cvnodecollection_i_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  const long first = getValue< long >( i->OStack.pick( 1 ) );
    -  const long last = getValue< long >( i->OStack.pick( 0 ) );
    -
    -  NodeCollectionDatum nodecollection = new NodeCollectionPrimitive( first, last );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( nodecollection );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Cvnodecollection_iaFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  TokenArray node_ids = getValue< TokenArray >( i->OStack.pick( 0 ) );
    -
    -  // NodeCollectionDatum nodecollection( NodeCollection::create( node_ids ) );
    -
    -  // i->OStack.pop();
    -  // i->OStack.push( nodecollection );
    -  // i->EStack.pop();
    -}
    -
    -void
    -NestModule::Cvnodecollection_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  IntVectorDatum node_ids = getValue< IntVectorDatum >( i->OStack.pick( 0 ) );
    -  // NodeCollectionDatum nodecollection( NodeCollection::create( node_ids ) );
    -
    -  // i->OStack.pop();
    -  // i->OStack.push( nodecollection );
    -  // i->EStack.pop();
    -}
    -
    -void
    -NestModule::Cva_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -  // ArrayDatum node_ids = nodecollection->to_array();
    -
    -  // i->OStack.pop();
    -  // i->OStack.push( node_ids );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Size_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  i->OStack.pop();
    -  i->OStack.push( nodecollection->size() );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::ValidQ_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  i->OStack.pop();
    -  i->OStack.push( nodecollection->valid() );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Join_g_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  NodeCollectionDatum left = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -  NodeCollectionDatum right = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  NodeCollectionDatum combined = left + right;
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( combined );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::MemberQ_g_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -  const long node_id = getValue< long >( i->OStack.pick( 0 ) );
    -
    -  const bool res = nodecollection->contains( node_id );
    -  i->OStack.pop( 2 );
    -  i->OStack.push( res );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Find_g_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -  const long node_id = getValue< long >( i->OStack.pick( 0 ) );
    -
    -  const auto res = nodecollection->find( node_id );
    -  i->OStack.pop( 2 );
    -  i->OStack.push( res );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::eq_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -  NodeCollectionDatum nodecollection_other = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -
    -  const bool res = nodecollection->operator==( nodecollection_other );
    -  i->OStack.pop( 2 );
    -  i->OStack.push( res );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::BeginIterator_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  NodeCollectionIteratorDatum it = new nc_const_iterator( nodecollection->begin( nodecollection ) );
    -
    -  i->OStack.pop();
    -  i->OStack.push( it );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::EndIterator_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  NodeCollectionIteratorDatum it = new nc_const_iterator( nodecollection->end( nodecollection ) );
    -
    -  i->OStack.pop();
    -  i->OStack.push( it );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::GetNodeID_qFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  NodeCollectionIteratorDatum it = getValue< NodeCollectionIteratorDatum >( i->OStack.pick( 0 ) );
    -
    -  index node_id = ( **it ).node_id;
    -
    -  i->OStack.pop();
    -  i->OStack.push( node_id );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::GetNodeIDModelID_qFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  NodeCollectionIteratorDatum it = getValue< NodeCollectionIteratorDatum >( i->OStack.pick( 0 ) );
    -
    -  ArrayDatum gm_pair;
    -  const NodeIDTriple& gp = **it;
    -  gm_pair.push_back( gp.node_id );
    -  gm_pair.push_back( gp.model_id );
    -
    -  i->OStack.pop();
    -  i->OStack.push( gm_pair );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Next_qFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  NodeCollectionIteratorDatum it = getValue< NodeCollectionIteratorDatum >( i->OStack.pick( 0 ) );
    -
    -  ++( *it );
    -
    -  // leave iterator on stack
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Eq_q_qFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  NodeCollectionIteratorDatum it_l = getValue< NodeCollectionIteratorDatum >( i->OStack.pick( 1 ) );
    -  NodeCollectionIteratorDatum it_r = getValue< NodeCollectionIteratorDatum >( i->OStack.pick( 0 ) );
    -
    -  const bool res = not it_l->operator!=( *it_r );
    -
    -  // leave iterator on stack
    -  i->OStack.pop( 2 );
    -  i->OStack.push( res );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Lt_q_qFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  NodeCollectionIteratorDatum it_l = getValue< NodeCollectionIteratorDatum >( i->OStack.pick( 1 ) );
    -  NodeCollectionIteratorDatum it_r = getValue< NodeCollectionIteratorDatum >( i->OStack.pick( 0 ) );
    -
    -  const bool res = it_l->operator<( *it_r );
    -
    -  // leave iterator on stack
    -  i->OStack.pop( 2 );
    -  i->OStack.push( res );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Get_g_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -  long idx = getValue< long >( i->OStack.pick( 0 ) );
    -
    -  const size_t g_size = nodecollection->size();
    -  if ( idx < 0 )
    -  {
    -    idx = g_size + idx;
    -  }
    -  if ( not( 0 <= idx and idx < static_cast< long >( g_size ) ) )
    -  {
    -    throw RangeCheck();
    -  }
    -
    -  const index node_id = ( *nodecollection )[ idx ];
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( node_id );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::Take_g_a - slice a NodeCollection
    -
    -  Synopsis:
    -  nc array Take_g_a -> NodeCollection
    -
    -  Parameters:
    -  nc - NodeCollection to be sliced
    -  array - array of the form [start stop step]
    -
    -  Description:
    -  Slice a `NodeCollection` using pythonic slicing conventions:
    -  - Include elements from and including `start` to but excluding `stop`.
    -  - `step` is the step length in the slice and must be positive.
    -  - Negative values for `start` and `stop` count from the end of the `NodeCollection`,  i.e., -1 is the last element.
    -*/
    -void
    -NestModule::Take_g_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  NodeCollectionDatum nodecollection = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -  TokenArray slice = getValue< TokenArray >( i->OStack.pick( 0 ) );
    -
    -  if ( slice.size() != 3 )
    -  {
    -    throw DimensionMismatch( 3, slice.size() );
    -  }
    -
    -  const size_t g_size = nodecollection->size();
    -  long start = slice[ 0 ];
    -  long stop = slice[ 1 ];
    -  long step = slice[ 2 ];
    -
    -  if ( step < 1 )
    -  {
    -    throw BadParameter( "Slicing step must be strictly positive." );
    -  }
    -
    -  // If start or stop are counted backwards from the end with negative keys, they must be adjusted.
    -  if ( start < 0 )
    -  {
    -    start += g_size;
    -    stop = stop == 0 ? g_size : stop;
    -  }
    -
    -  if ( stop < 0 )
    -  {
    -    stop += g_size;
    -  }
    -
    -  NodeCollectionDatum sliced_nc = nodecollection->slice( start, stop, step );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( sliced_nc );
    -  i->EStack.pop();
    -}
    -
    -
    -#ifdef HAVE_MUSIC
    -/** @BeginDocumentation
    -   Name: SetAcceptableLatency - set the acceptable latency of a MUSIC input port
    -
    -   Synopsis:
    -   (spikes_in) 0.5 SetAcceptableLatency -> -
    -
    -   Parameters:
    -   port_name - the name of the MUSIC input port
    -   latency   - the acceptable latency (ms) to set for the port
    -
    -   Author: Jochen Martin Eppler
    -   FirstVersion: April 2009
    -   Availability: Only when compiled with MUSIC
    -   SeeAlso: music_event_in_proxy
    -*/
    -void
    -NestModule::SetAcceptableLatencyFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  std::string port_name = getValue< std::string >( i->OStack.pick( 1 ) );
    -  double latency = getValue< double >( i->OStack.pick( 0 ) );
    -
    -  kernel().music_manager.set_music_in_port_acceptable_latency( port_name, latency );
    -
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::SetMaxBufferedFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  std::string port_name = getValue< std::string >( i->OStack.pick( 1 ) );
    -  int maxBuffered = getValue< long >( i->OStack.pick( 0 ) );
    -
    -  kernel().music_manager.set_music_in_port_max_buffered( port_name, maxBuffered );
    -
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -}
    -#endif
    -
    -/**
    - * Enable Structural Plasticity within the simulation. This allows
    - * dynamic rewiring of the network based on mean electrical activity.
    - * Please note that, in the current implementation of structural plasticity,
    - * spikes could occasionally be delivered via connections that were not present
    - * at the time of the spike.
    - * @param i
    - */
    -void
    -NestModule::EnableStructuralPlasticity_Function::execute( SLIInterpreter* i ) const
    -{
    -  kernel().sp_manager.enable_structural_plasticity();
    -
    -  i->EStack.pop();
    -}
    -/**
    - * Disable Structural Plasticity in the network.
    - * @param i
    - */
    -void
    -NestModule::DisableStructuralPlasticity_Function::execute( SLIInterpreter* i ) const
    -{
    -  kernel().sp_manager.disable_structural_plasticity();
    -
    -  i->EStack.pop();
    -}
    -
    -/**
    - * Set epsilon that is used for comparing spike times in STDP.
    - * Spike times in STDP synapses are currently represented as double
    - * values. The epsilon defines the maximum distance between spike
    - * times that is still considered 0.
    - *
    - * Note: See issue #894
    - */
    -void
    -NestModule::SetStdpEps_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  const double stdp_eps = getValue< double >( i->OStack.top() );
    -
    -  kernel().connection_manager.set_stdp_eps( stdp_eps );
    -
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    -  Name: CreateParameter
    -*/
    -void
    -NestModule::CreateParameter_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  // const DictionaryDatum param_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // ParameterDatum datum = nest::create_parameter( param_dict );
    -
    -  i->OStack.pop( 1 );
    -  // i->OStack.push( datum );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Mul_P_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = multiply_parameter( param1, param2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Div_P_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = divide_parameter( param1, param2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Add_P_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = add_parameter( param1, param2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Exp_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = exp_parameter( param );
    -
    -  i->OStack.pop( 1 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Sin_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = sin_parameter( param );
    -
    -  i->OStack.pop( 1 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Cos_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = cos_parameter( param );
    -
    -  i->OStack.pop( 1 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Pow_P_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  double exponent = getValue< double >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = pow_parameter( param, exponent );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Sub_P_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = subtract_parameter( param1, param2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -NestModule::Compare_P_P_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 3 );
    -
    -  ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 2 ) );
    -  ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  // DictionaryDatum param3 = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // ParameterDatum newparam = compare_parameter( param1, param2, param3 );
    -
    -  i->OStack.pop( 3 );
    -  // i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -NestModule::Conditional_P_P_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 3 );
    -
    -  ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 2 ) );
    -  ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  ParameterDatum param3 = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = conditional_parameter( param1, param2, param3 );
    -
    -  i->OStack.pop( 3 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Min_P_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  double other_value = getValue< double >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = min_parameter( param, other_value );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Max_P_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  double other_value = getValue< double >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = max_parameter( param, other_value );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Redraw_P_d_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 3 );
    -
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 2 ) );
    -  double min = getValue< double >( i->OStack.pick( 1 ) );
    -  double max = getValue< double >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = redraw_parameter( param, min, max );
    -
    -  i->OStack.pop( 3 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Dimension2d_P_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = dimension_parameter( param1, param2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Dimension3d_P_P_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 3 );
    -
    -  ParameterDatum param1 = getValue< ParameterDatum >( i->OStack.pick( 2 ) );
    -  ParameterDatum param2 = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -  ParameterDatum param3 = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  ParameterDatum newparam = dimension_parameter( param1, param2, param3 );
    -
    -  i->OStack.pop( 3 );
    -  i->OStack.push( newparam );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: GetValue
    -*/
    -void
    -NestModule::GetValue_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  double value = get_value( param );
    -
    -  i->OStack.pop( 1 );
    -  i->OStack.push( value );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::IsSpatial_PFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  auto param = getValue< ParameterDatum >( i->OStack.pick( 0 ) );
    -
    -  bool parameter_is_spatial = is_spatial( param );
    -
    -  i->OStack.pop( 1 );
    -  i->OStack.push( parameter_is_spatial );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: Apply
    -*/
    -void
    -NestModule::Apply_P_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  // auto positions = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -  auto param = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -
    -  // ADL requires explicit namespace qualification to avoid confusion with std::apply() in C++17
    -  // See https://github.com/llvm/llvm-project/issues/53084#issuecomment-1007969489
    -  auto result = nest::apply( param, positions );
    -
    -  i->OStack.pop( 2 );
    -  // i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Apply_P_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  NodeCollectionDatum nc = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -  ParameterDatum param = getValue< ParameterDatum >( i->OStack.pick( 1 ) );
    -
    -  // ADL requires explicit namespace qualification to avoid confusion with std::apply() in C++17
    -  // See https://github.com/llvm/llvm-project/issues/53084#issuecomment-1007969489
    -  auto result = nest::apply( param, nc );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -#ifdef HAVE_LIBNEUROSIM
    -
    -/** @BeginDocumentation
    -Name: CGParse - Call ConnectionGenerator::fromXML() and return a
    -ConnectionGenerator
    -
    -Synopsis:
    -xml_string CGParse -> cg
    -
    -Parameters:
    -xml_string - The XML string to parse.
    -
    -Description:
    -Return a ConnectionGenerator created by deserializing the given
    -XML string. The library to parse the XML string can be selected using
    -CGSelectImplementation
    -
    -Availability: Only if compiled with libneurosim support
    -Author: Jochen Martin Eppler
    -FirstVersion: September 2013
    -SeeAlso: CGParseFile, CGSelectImplementation
    -*/
    -void
    -NestModule::CGParse_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  StringDatum xml = getValue< StringDatum >( i->OStack.pick( 0 ) );
    -  ConnectionGeneratorDatum cgd = ConnectionGenerator::fromXML( xml );
    -
    -  i->OStack.pop( 1 );
    -  i->OStack.push( cgd );
    -}
    -
    -/** @BeginDocumentation
    -Name: CGParseFile - Call ConnectionGenerator::fromXMLFile() and return a
    -ConnectionGenerator
    -
    -Synopsis:
    -xml_filename CGParseFile -> cg
    -
    -Parameters:
    -xml_filename - The XML file to read.
    -
    -Description:
    -Return a ConnectionGenerator created by deserializing the given
    -XML file. The library to parse the XML file can be selected using
    -CGSelectImplementation
    -
    -Availability: Only if compiled with libneurosim support
    -Author: Jochen Martin Eppler
    -FirstVersion: February 2014
    -SeeAlso: CGParse, CGSelectImplementation
    -*/
    -void
    -NestModule::CGParseFile_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  StringDatum xml = getValue< StringDatum >( i->OStack.pick( 0 ) );
    -  ConnectionGeneratorDatum cgd = ConnectionGenerator::fromXMLFile( xml );
    -
    -  i->OStack.pop( 1 );
    -  i->OStack.push( cgd );
    -}
    -
    -/** @BeginDocumentation
    -Name: CGSelectImplementation - Call
    -ConnectionGenerator::selectCGImplementation()
    -
    -Synopsis:
    -tag library CGParse -> -
    -
    -Parameters:
    -tag     - The XML tag to associate with a library.
    -library - The library to provide the parsing for CGParse
    -
    -Description:
    -Select a library to provide a parser for XML files and associate
    -an XML tag with the library.
    -
    -Availability: Only if compiled with libneurosim support
    -Author: Jochen Martin Eppler
    -FirstVersion: September 2013
    -SeeAlso: CGParse, CGParseFile
    -*/
    -void
    -NestModule::CGSelectImplementation_s_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  StringDatum library = getValue< StringDatum >( i->OStack.pick( 0 ) );
    -  StringDatum tag = getValue< StringDatum >( i->OStack.pick( 1 ) );
    -
    -  ConnectionGenerator::selectCGImplementation( tag, library );
    -
    -  i->OStack.pop( 1 );
    -  i->EStack.pop();
    -}
    -
    -#endif /* #ifdef HAVE_LIBNEUROSIM */
    -
    -//
    -// SLI functions for spatial networks
    -//
    -
    -/** @BeginDocumentation
    -  Name: nest::CreateLayer - create nodes with spatial properties
    -
    -  Synopsis:
    -  dict CreateLayer -> layer
    -
    -  Parameters:
    -  dict - dictionary with layer specification
    -
    -  Description: Creates a NodeCollection which contains information
    -  about the spatial position of its nodes. Positions can be organized
    -  in one of two layer classes: grid-based layers, in which each element
    -  is placed at a location in a regular grid, and free layers, in which
    -  elements can be placed arbitrarily in space.  Which kind of layer
    -  this command creates depends on the elements in the supplied
    -  specification dictionary.
    -
    -  Author: Håkon Enger, Kittel Austvoll
    -*/
    -void
    -NestModule::CreateLayer_D_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  // DictionaryDatum layer_dict = getValue< DictionaryDatum >( i->OStack.pick( 1 ) );
    -  // DictionaryDatum params = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // NodeCollectionDatum layer = create_layer( layer_dict );
    -
    -  // for ( auto&& node_id_triple : *layer )
    -  // {
    -  //   // set_node_status( node_id_triple.node_id, params );
    -  // }
    -
    -  i->OStack.pop( 2 );
    -  // i->OStack.push( layer );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::GetPosition - retrieve position of input node
    -
    -  Synopsis: NodeCollection GetPosition -> [array]
    -
    -  Parameters:
    -  layer      - NodeCollection for layer with layer nodes
    -
    -  Returns:
    -  [array]    - spatial position of node [x y]
    -
    -  Description: Retrieves spatial 2D position of layer node(s).
    -
    -  Examples:
    -
    -  %%Create layer
    -  << /rows 5
    -     /columns 4
    -     /elements /iaf_psc_alpha
    -  >> /dictionary Set
    -
    -  dictionary CreateLayer /src Set
    -
    -  src [4] Take GetPosition
    -
    -  Author: Kittel Austvoll
    -*/
    -
    -void
    -NestModule::GetPosition_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  // ArrayDatum result = get_position( layer );
    -
    -  //   i->OStack.pop( 1 );
    -  //   if ( layer->size() == 1 )
    -  //   {
    -  //     i->OStack.push( result[ 0 ] );
    -  //   }
    -  //   else
    -  //   {
    -  //     i->OStack.push( result );
    -  //   }
    -  //   i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::Displacement - compute displacement vector
    -
    -  Synopsis: layer from_node_id to_node_id Displacement -> [double vector]
    -            layer from_pos to_node_id Displacement -> [double vector]
    -
    -  Parameters:
    -  layer           - NodeCollection for layer
    -  from_node_id    - int, node_id of node in a spatial NodeCollection
    -  from_pos        - double vector, position in layer
    -  to_node_id      - int, node_id of node in a spatial NodeCollection
    -
    -  Returns:
    -  [double vector] - vector pointing from position "from" to position "to"
    -
    -  Description:
    -  This function returns a vector connecting the position of the "from_node_id"
    -  node or the explicitly given "from_pos" position and the position of the
    -  "to_node_id" node. Nodes must be parts of a spatial NodeCollection.
    -
    -  The "from" position is projected into the layer of the "to_node_id" node. If
    -  this layer has periodic boundary conditions (EdgeWrap is true), then the
    -  shortest displacement vector is returned, taking into account the
    -  periodicity. Fixed grid layers are in this case extended so that the
    -  nodes at the edges of the layer have a distance of one grid unit when
    -  wrapped.
    -
    -  Example:
    -
    -  << /rows 5
    -     /columns 4
    -     /elements /iaf_psc_alpha
    -  >> CreateLayer
    -  /layer Set
    -
    -  layer [4] Take layer [5] Take Displacement
    -  [[0.2 0.3]] layer [5] Take Displacement
    -
    -  Author: Håkon Enger, Hans E Plesser, Kittel Austvoll
    -
    -  See also: Distance, GetPosition
    -*/
    -void
    -NestModule::Displacement_g_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  const NodeCollectionDatum layer_to = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  const NodeCollectionDatum layer_from = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -
    -  if ( layer_to->size() != 1 and layer_from->size() != 1 and not( layer_to->size() == layer_from->size() ) )
    -  {
    -    throw BadProperty( "NodeCollections must have equal length or one must have size 1." );
    -  }
    -
    -  // ArrayDatum result = displacement( layer_to, layer_from );
    -
    -  // i->OStack.pop( 2 );
    -  // i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Displacement_a_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -  const ArrayDatum point = getValue< ArrayDatum >( i->OStack.pick( 1 ) );
    -
    -  // ArrayDatum result = displacement( layer, point );
    -
    -  // i->OStack.pop( 2 );
    -  // i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::Distance - compute distance between nodes
    -
    -  Synopsis: layer from_node_id to_node_id Distance -> double
    -            layer from_pos to_node_id Distance -> double
    -
    -  Parameters:
    -  layer       - NodeCollection for layer
    -  from_node_id    - int, node_id of node in a spatial NodeCollection
    -  from_pos    - double vector, position in layer
    -  to_node_id      - int, node_id of node in a spatial NodeCollection
    -
    -  Returns:
    -  double - distance between nodes or given position and node
    -
    -  Description:
    -  This function returns the distance between the position of the "from_node_id"
    -  node or the explicitly given "from_pos" position and the position of the
    -  "to_node_id" node. Nodes must be parts of a spatial NodeCollection.
    -
    -  The "from" position is projected into the layer of the "to_node_id" node. If
    -  this layer has periodic boundary conditions (EdgeWrap is true), then the
    -  shortest distance is returned, taking into account the
    -  periodicity. Fixed grid layers are in this case extended so that the
    -  nodes at the edges of the layer have a distance of one grid unit when
    -  wrapped.
    -
    -  Example:
    -
    -  /layer
    -  << /rows 5
    -     /columns 4
    -     /elements /iaf_psc_alpha
    -  >> CreateLayer def
    -
    -  layer [4] Take layer [5] Take Distance
    -  [[ 0.2 0.3 ]] layer [5] Take Distance
    -
    -  Author: Hans E Plesser, Kittel Austvoll
    -
    -  See also: Displacement, GetPosition
    -*/
    -void
    -NestModule::Distance_g_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  const NodeCollectionDatum layer_to = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  const NodeCollectionDatum layer_from = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -
    -  if ( layer_to->size() != 1 and layer_from->size() != 1 and not( layer_to->size() == layer_from->size() ) )
    -  {
    -    throw BadProperty( "NodeCollections must have equal length or one must have size 1." );
    -  }
    -
    -  Token result = distance( layer_to, layer_from );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Distance_a_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -  const ArrayDatum point = getValue< ArrayDatum >( i->OStack.pick( 1 ) );
    -
    -  // Token result = distance( layer, point );
    -
    -  // i->OStack.pop( 2 );
    -  // i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Distance_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  const ArrayDatum conns = getValue< ArrayDatum >( i->OStack.pick( 0 ) );
    -
    -  // Token result = distance( conns );
    -
    -  // i->OStack.pop( 1 );
    -  // i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::CreateMask - create a spatial mask
    -
    -  Synopsis:
    -  << /type dict >> CreateMask -> mask
    -
    -  Parameters:
    -  /type - mask type
    -  dict  - dictionary with mask specifications
    -
    -  Description: Masks can be used when creating connections between nodes
    -  with spatial parameters. A mask describes which area of the pool layer
    -  shall be searched for nodes to connect for any given node in the driver
    -  layer. This command creates a mask object which may be combined with other
    -  mask objects using Boolean operators. The mask is specified in a dictionary.
    -
    -  Author: Håkon Enger
    -*/
    -void
    -NestModule::CreateMask_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  // const DictionaryDatum mask_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // MaskDatum datum = nest::create_mask( mask_dict );
    -
    -  i->OStack.pop( 1 );
    -  // i->OStack.push( datum );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::Inside - test if a point is inside a mask
    -
    -  Synopsis:
    -  point mask Inside -> bool
    -
    -  Parameters:
    -  point - array of coordinates
    -  mask - mask object
    -
    -  Returns:
    -  bool - true if the point is inside the mask
    -*/
    -void
    -NestModule::Inside_a_MFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  std::vector< double > point = getValue< std::vector< double > >( i->OStack.pick( 1 ) );
    -  MaskDatum mask = getValue< MaskDatum >( i->OStack.pick( 0 ) );
    -
    -  bool ret = inside( point, mask );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( Token( BoolDatum( ret ) ) );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::And_M_MFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  MaskDatum mask1 = getValue< MaskDatum >( i->OStack.pick( 1 ) );
    -  MaskDatum mask2 = getValue< MaskDatum >( i->OStack.pick( 0 ) );
    -
    -  MaskDatum newmask = intersect_mask( mask1, mask2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newmask );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Or_M_MFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  MaskDatum mask1 = getValue< MaskDatum >( i->OStack.pick( 1 ) );
    -  MaskDatum mask2 = getValue< MaskDatum >( i->OStack.pick( 0 ) );
    -
    -  MaskDatum newmask = union_mask( mask1, mask2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newmask );
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Sub_M_MFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  MaskDatum mask1 = getValue< MaskDatum >( i->OStack.pick( 1 ) );
    -  MaskDatum mask2 = getValue< MaskDatum >( i->OStack.pick( 0 ) );
    -
    -  MaskDatum newmask = minus_mask( mask1, mask2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( newmask );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::ConnectLayers - connect two layers
    -
    -  Synopsis: sourcelayer targetlayer connection_dict
    -  ConnectLayers -> -
    -
    -  Description: Connects nodes in two topological layers.
    -
    -  The parameters set in the input dictionary decides the nature
    -  of the connection pattern being created. Please see parameter
    -  list below for a detailed description of these variables.
    -
    -  The connections are created by iterating through either the
    -  source or the target layer, consecutively connecting each node
    -  to a region in the opposing layer.
    -
    -  Parameters:
    -  sourcelayer  - NodeCollection for source layer
    -  targetlayer  - NodeCollection for target layer
    -
    -  connection_dict - dictionary containing any of the following
    -                    elements:
    -
    -  ------------------------------------------------------------------
    -  Connection dictionary parameters:
    -  ------------------------------------------------------------------
    -  Parameter name: connection-type
    -
    -  Type: string
    -
    -  Parameter description:
    -
    -  Decides the type of connection pattern being created (i.e.
    -  convergent or divergent topological connection). A convergent
    -  topological connection is a connection between a source region
    -  and a target node. A divergent topological connection is a
    -  connection between a source node and a target region. A convergent
    -  topological connection can also be called a receptive field connection.
    -  A divergent topological connection can also be called a projective
    -  field connection. A one-to-one connection can be created by setting
    -  the size of the source or target region equal to one. The connection
    -  type has particular effect on the connection pattern when used together
    -  with the number_of_connections variable.
    -
    -
    -  Parameter name: mask
    -
    -  Type: dictionary
    -
    -  Parameter description:
    -
    -  The mask defines the region used in the connection type described
    -  above. There exists a selection of many different region sizes and
    -  shapes. Examples are the grid region, the rectangular, circular or
    -  doughnut region.
    -
    -  The grid region takes an optional anchor parameter. The anchor
    -  parameter indicates which node of the grid region is aligned with
    -  the source node.
    -
    -
    -  Parameter name: weights, delays and kernel
    -
    -  Type: dictionary
    -
    -  Parameter description:
    -
    -  These parameters can be initialised in many ways. Either as a constant
    -  value, with the help of a dictionary, or in an array (only for fixed
    -  grid layers). The dictionary can be of type gaussian, 2D gaussian,
    -  linear, exponential and other.
    -
    -
    -  Parameter name: source
    -
    -  Type: dictionary
    -
    -  Parameter description:
    -
    -  The source dictionary enables us to give further detail on
    -  how the nodes in the source layer used in the connection function
    -  should be processed.
    -
    -  Parameters:
    -  model*             literal
    -  lid^               integer
    -
    -  *modeltype (i.e. /iaf_psc_alpha) of nodes that should be connected to
    -  in the layer. All nodes are used if this variable isn't set.
    -  ^Nesting depth of nodes that should be connected to. All layers are used
    -  if this variable isn't set.
    -
    -
    -  Parameter name: target
    -
    -  Type: dictionary
    -
    -  Parameter description:
    -
    -  See description for source dictionary.
    -
    -
    -  Parameter name: number_of_connections
    -
    -  Type: integer
    -
    -  Parameter description:
    -
    -  Maximum number of connections that each iterating node is allowed.
    -  The actual connections being created are picked at random from all
    -  the candidate connections.
    -
    -
    -      Parameter name: synapse_model
    -
    -      Type: literal
    -
    -      Parameter description:
    -
    -      The synapse model to be used for creating the connection.
    -.
    -  Parameter name: allow_autapses
    -
    -  Type: bool
    -
    -  Parameter description: Used together with the number_of_connections option to
    -  indicate if autapses are allowed.
    -
    -
    -  Parameter name: allow_multapses
    -
    -  Type: bool
    -
    -  Parameter description: Used together with the number_of_connections option to
    -  indicate if multapses are allowed.
    -
    -  ------------------------------------------------------------------
    -
    -  Example:
    -
    -  %Create source layer with CreateLayer
    -  << /rows 15
    -     /columns 43
    -     /extent [1.0 2.0]
    -     /elements /iaf_psc_alpha
    -  >> /src_dictionary Set
    -
    -  src_dictionary CreateLayer /src Set
    -
    -  %Create target layer with CreateLayer
    -  %%Create layer
    -  << /rows 34
    -     /columns 71
    -     /extent [3.0 1.0]
    -     /elements /iaf_psc_alpha
    -  >> /tgt_dictionary Set
    -
    -  tgt_dictionary CreateLayer /tgt Set
    -
    -  <<  /connection_type (convergent)
    -      /mask << /grid << /rows 2 /columns 3 >>
    -               /anchor << /row 4 /column 2 >> >>
    -      /weight 2.3
    -      /delay [2.3 1.2 3.2 1.3 2.3 1.2]
    -      /kernel << /gaussian << /sigma 1.2 /p_center 1.41 >> >>
    -      /synapse_model /stdp_synapse
    -
    -  >> /parameters Set
    -
    -  src tgt parameters ConnectLayers
    -
    -  Author: Håkon Enger, Kittel Austvoll
    -
    -  SeeAlso: nest::CreateLayer
    -*/
    -void
    -NestModule::ConnectLayers_g_g_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  kernel().connection_manager.sw_construction_connect.start();
    -
    -  i->assert_stack_load( 3 );
    -
    -  const NodeCollectionDatum source = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) );
    -  const NodeCollectionDatum target = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -  // const DictionaryDatum connection_dict = getValue< DictionaryDatum >( i->OStack.pick( 0 ) );
    -
    -  // connect_layers( source, target, connection_dict );
    -
    -  i->OStack.pop( 3 );
    -  i->EStack.pop();
    -
    -  kernel().connection_manager.sw_construction_connect.stop();
    -}
    -
    -/** @BeginDocumentation
    -
    -  Name: nest::GetLayerStatus - return information about layer
    -
    -  Synopsis:
    -  layer GetLayerStatus -> dict
    -
    -  Parameters:
    -  layer - NodeCollection representing layer
    -
    -  Returns:
    -  Status dictionary with information about layer
    - */
    -void
    -NestModule::GetLayerStatus_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -
    -  // DictionaryDatum result = get_layer_status( layer );
    -
    -  i->OStack.pop( 1 );
    -  // i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::DumpLayerNodes - write information about layer nodes to file
    -
    -  Synopsis: ostream layer DumpLayerNodes -> ostream
    -
    -  Parameters:
    -  ostream - open output stream
    -  layer   - NodeCollection for layer
    -
    -  Description:
    -  Write information about each element in the given layer to the
    -  output stream. The file format is one line per element with the
    -  following contents:
    -
    -  node ID x-position y-position [z-position]
    -
    -  X and y position are given as physical coordinates in the extent,
    -  not as grid positions. The number of decimals can be controlled by
    -  calling setprecision on the output stream before calling DumpLayerNodes.
    -
    -  Remarks:
    -  In distributed simulations, this function should only be called for
    -  MPI rank 0. If you call it on several MPI ranks, you must use a
    -  different file name on each.
    -
    -  Examples:
    -
    -  /my_layer << /rows 5 /columns 4 /elements /iaf_psc_alpha >> CreateLayer def
    -
    -  (my_layer_dump.lyr) (w) file
    -  my_layer DumpLayerNodes
    -  close
    -
    -  Author: Kittel Austvoll, Hans Ekkehard Plesser
    -
    -  SeeAlso: nest::DumpLayerConnections, setprecision
    -*/
    -void
    -NestModule::DumpLayerNodes_os_gFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  const NodeCollectionDatum layer = getValue< NodeCollectionDatum >( i->OStack.pick( 0 ) );
    -  // OstreamDatum out = getValue< OstreamDatum >( i->OStack.pick( 1 ) );
    -
    -  // dump_layer_nodes( layer, out );
    -
    -  i->OStack.pop( 1 ); // leave ostream on stack
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: nest::DumpLayerConnections - prints a list of the connections of the
    -                                         nodes in the layer to file
    -
    -  Synopsis: ostream source_layer synapse_model DumpLayerConnections ->
    -                                                                         ostream
    -
    -  Parameters:
    -  ostream          - open outputstream
    -  source_layer     - NodeCollection for layer
    -  synapse_model    - synapse model (literal)
    -
    -  Description:
    -  Dumps information about all connections of the given type having their source
    -  in the given layer to the given output stream. The data format is one line per
    -  connection as follows:
    -
    -  source_node_id target_node_id weight delay displacement[x,y,z]
    -
    -  where displacement are up to three coordinates of the vector from the source
    -  to the target node. If targets do not have positions (eg. spike recorders
    -  outside any layer), NaN is written for each displacement coordinate.
    -
    -  Remarks:
    -  For distributed simulations
    -  - this function will dump the connections with local targets only.
    -  - the user is responsible for writing to a different output stream (file)
    -    on each MPI process.
    -
    -  Examples:
    -
    -  (out.cnn) (w) file layer_node_id /static_synapse PrintLayerConnections close
    -
    -  Author: Kittel Austvoll, Hans Ekkehard Plesser
    -
    -  SeeAlso: nest::DumpLayerNodes
    -*/
    -
    -void
    -NestModule::DumpLayerConnections_os_g_g_lFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 4 );
    -
    -  // OstreamDatum out_file = getValue< OstreamDatum >( i->OStack.pick( 3 ) );
    -  const NodeCollectionDatum source_layer = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) );
    -  const NodeCollectionDatum target_layer = getValue< NodeCollectionDatum >( i->OStack.pick( 1 ) );
    -  const Token syn_model = i->OStack.pick( 0 );
    -
    -  // dump_layer_connections( syn_model, source_layer, target_layer, out_file );
    -
    -  i->OStack.pop( 3 ); // leave ostream on stack
    -  i->EStack.pop();
    -}
    -
    -void
    -NestModule::Cvdict_MFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  MaskDatum mask = getValue< MaskDatum >( i->OStack.pick( 0 ) );
    -  // DictionaryDatum dict = mask->get_dict();
    -
    -  i->OStack.pop();
    -  // i->OStack.push( dict );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -NestModule::SelectNodesByMask_g_a_MFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 3 );
    -
    -  const NodeCollectionDatum layer_nc = getValue< NodeCollectionDatum >( i->OStack.pick( 2 ) );
    -  std::vector< double > anchor = getValue< std::vector< double > >( i->OStack.pick( 1 ) );
    -  MaskDatum mask = getValue< MaskDatum >( i->OStack.pick( 0 ) );
    -
    -  std::vector< index > mask_node_ids;
    -
    -  const int dim = anchor.size();
    -
    -  if ( dim != 2 and dim != 3 )
    -  {
    -    throw BadProperty( "Center must be 2- or 3-dimensional." );
    -  }
    -
    -  AbstractLayerPTR abstract_layer = get_layer( layer_nc );
    -
    -  if ( dim == 2 )
    -  {
    -    Layer< 2 >* layer = dynamic_cast< Layer< 2 >* >( abstract_layer.get() );
    -    if ( not layer )
    -    {
    -      throw TypeMismatch( "2D layer", "other type" );
    -    }
    -
    -    MaskedLayer< 2 > ml = MaskedLayer< 2 >( *layer, mask, false, layer_nc );
    -
    -    for ( Ntree< 2, index >::masked_iterator it = ml.begin( Position< 2 >( anchor[ 0 ], anchor[ 1 ] ) ); it != ml.end();
    -          ++it )
    -    {
    -      mask_node_ids.push_back( it->second );
    -    }
    -  }
    -  else
    -  {
    -    Layer< 3 >* layer = dynamic_cast< Layer< 3 >* >( abstract_layer.get() );
    -    if ( not layer )
    -    {
    -      throw TypeMismatch( "3D layer", "other type" );
    -    }
    -
    -    MaskedLayer< 3 > ml = MaskedLayer< 3 >( *layer, mask, false, layer_nc );
    -
    -    for ( Ntree< 3, index >::masked_iterator it = ml.begin( Position< 3 >( anchor[ 0 ], anchor[ 1 ], anchor[ 2 ] ) );
    -          it != ml.end();
    -          ++it )
    -    {
    -      mask_node_ids.push_back( it->second );
    -    }
    -  }
    -
    -  i->OStack.pop( 3 );
    -  i->OStack.push( mask_node_ids );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -NestModule::init( SLIInterpreter* i )
    -{
    -  assert( false );
    -  //   ConnectionType.settypename( "connectiontype" );
    -  //   ConnectionType.setdefaultaction( SLIInterpreter::datatypefunction );
    -
    -  //   MaskType.settypename( "masktype" );
    -  //   MaskType.setdefaultaction( SLIInterpreter::datatypefunction );
    -
    -  //   NodeCollectionType.settypename( "nodecollectiontype" );
    -  //   NodeCollectionType.setdefaultaction( SLIInterpreter::datatypefunction );
    -
    -  //   NodeCollectionIteratorType.settypename( "nodecollectioniteratortype" );
    -  //   NodeCollectionIteratorType.setdefaultaction( SLIInterpreter::datatypefunction );
    -
    -  //   ParameterType.settypename( "parametertype" );
    -  //   ParameterType.setdefaultaction( SLIInterpreter::datatypefunction );
    -
    -  //   // register interface functions with interpreter
    -
    -  //   i->createcommand( "SetStatus_id", &setstatus_idfunction );
    -  //   i->createcommand( "SetStatus_CD", &setstatus_CDfunction );
    -  //   i->createcommand( "SetStatus_aa", &setstatus_aafunction );
    -  //   i->createcommand( "SetKernelStatus", &setkernelstatus_Dfunction );
    -
    -  //   i->createcommand( "GetStatus_g", &getstatus_gfunction );
    -  //   i->createcommand( "GetStatus_i", &getstatus_ifunction );
    -  //   i->createcommand( "GetStatus_C", &getstatus_Cfunction );
    -  //   i->createcommand( "GetStatus_a", &getstatus_afunction );
    -  //   i->createcommand( "GetMetadata_g", &getmetadata_gfunction );
    -  //   i->createcommand( "GetKernelStatus", &getkernelstatus_function );
    -
    -  //   i->createcommand( "GetConnections_D", &getconnections_Dfunction );
    -  //   i->createcommand( "cva_C", &cva_cfunction );
    -
    -  //   i->createcommand( "Simulate_d", &simulatefunction );
    -  //   i->createcommand( "Run_d", &runfunction );
    -  //   i->createcommand( "Prepare", &preparefunction );
    -  //   i->createcommand( "Cleanup", &cleanupfunction );
    -
    -  //   i->createcommand( "CopyModel_l_l_D", &copymodel_l_l_Dfunction );
    -  //   i->createcommand( "SetDefaults_l_D", &setdefaults_l_Dfunction );
    -  //   i->createcommand( "GetDefaults_l", &getdefaults_lfunction );
    -
    -  //   i->createcommand( "Create_l_i", &create_l_ifunction );
    -
    -  //   i->createcommand( "GetNodes_D_b", &getnodes_D_bfunction );
    -
    -  //   i->createcommand( "mul_P_P", &mul_P_Pfunction );
    -  //   i->createcommand( "div_P_P", &div_P_Pfunction );
    -  //   i->createcommand( "add_P_P", &add_P_Pfunction );
    -  //   i->createcommand( "sub_P_P", &sub_P_Pfunction );
    -
    -  //   i->createcommand( "compare_P_P_D", &compare_P_P_Dfunction );
    -  //   i->createcommand( "conditional_P_P_P", &conditional_P_P_Pfunction );
    -
    -  //   i->createcommand( "min_P_d", &min_P_dfunction );
    -  //   i->createcommand( "max_P_d", &max_P_dfunction );
    -  //   i->createcommand( "redraw_P_d_d", &redraw_P_d_dfunction );
    -
    -  //   i->createcommand( "exp_P", &exp_Pfunction );
    -  //   i->createcommand( "sin_P", &sin_Pfunction );
    -  //   i->createcommand( "cos_P", &cos_Pfunction );
    -  //   i->createcommand( "pow_P_d", &pow_P_dfunction );
    -
    -  //   i->createcommand( "dimension2d_P_P", &dimension2d_P_Pfunction );
    -  //   i->createcommand( "dimension3d_P_P_P", &dimension3d_P_P_Pfunction );
    -
    -  //   i->createcommand( "CreateParameter_D", &createparameter_Dfunction );
    -
    -  //   i->createcommand( "GetValue_P", &getvalue_Pfunction );
    -  //   i->createcommand( "IsSpatial_P", &isspatial_Pfunction );
    -  //   i->createcommand( "Apply_P_D", &apply_P_Dfunction );
    -  //   i->createcommand( "Apply_P_g", &apply_P_gfunction );
    -
    -  //   i->createcommand( "Connect_g_g_D_D", &connect_g_g_D_Dfunction );
    -  //   i->createcommand( "Connect_g_g_D_a", &connect_g_g_D_afunction );
    -
    -  //   i->createcommand( "ResetKernel", &resetkernelfunction );
    -
    -  //   i->createcommand( "MemoryInfo", &memoryinfofunction );
    -
    -  //   i->createcommand( "PrintNodes", &printnodesfunction );
    -  //   i->createcommand( "PrintNodesToStream", &printnodestostreamfunction );
    -
    -  //   i->createcommand( "Rank", &rankfunction );
    -  //   i->createcommand( "NumProcesses", &numprocessesfunction );
    -  //   i->createcommand( "SetFakeNumProcesses", &setfakenumprocesses_ifunction );
    -  //   i->createcommand( "SyncProcesses", &syncprocessesfunction );
    -  //   i->createcommand( "TimeCommunication_i_i_b", &timecommunication_i_i_bfunction );
    -  //   i->createcommand( "TimeCommunicationv_i_i", &timecommunicationv_i_ifunction );
    -  //   i->createcommand( "TimeCommunicationAlltoall_i_i", &timecommunicationalltoall_i_ifunction );
    -  //   i->createcommand( "TimeCommunicationAlltoallv_i_i", &timecommunicationalltoallv_i_ifunction );
    -  //   i->createcommand( "ProcessorName", &processornamefunction );
    -  // #ifdef HAVE_MPI
    -  //   i->createcommand( "MPI_Abort", &mpiabort_ifunction );
    -  // #endif
    -
    -  //   i->createcommand( "cvdict_C", &cvdict_Cfunction );
    -
    -  //   i->createcommand( "cvnodecollection_i_i", &cvnodecollection_i_ifunction );
    -  //   i->createcommand( "cvnodecollection_ia", &cvnodecollection_iafunction );
    -  //   i->createcommand( "cvnodecollection_iv", &cvnodecollection_ivfunction );
    -  //   i->createcommand( "cva_g", &cva_gfunction );
    -  //   i->createcommand( "size_g", &size_gfunction );
    -  //   i->createcommand( "ValidQ_g", &validq_gfunction );
    -  //   i->createcommand( "join_g_g", &join_g_gfunction );
    -  //   i->createcommand( "MemberQ_g_i", &memberq_g_ifunction );
    -  //   i->createcommand( "Find_g_i", &find_g_ifunction );
    -  //   i->createcommand( "eq_g", &eq_gfunction );
    -  //   i->createcommand( ":beginiterator_g", &beginiterator_gfunction );
    -  //   i->createcommand( ":enditerator_g", &enditerator_gfunction );
    -  //   i->createcommand( ":getnodeid_q", &getnodeid_qfunction );
    -  //   i->createcommand( ":getnodeidmodelid_q", &getnodeidmodelid_qfunction );
    -  //   i->createcommand( ":next_q", &next_qfunction );
    -  //   i->createcommand( ":eq_q_q", &eq_q_qfunction );
    -  //   i->createcommand( ":lt_q_q", &lt_q_qfunction );
    -  //   i->createcommand( "get_g_i", &get_g_ifunction );
    -  //   i->createcommand( "Take_g_a", &take_g_afunction );
    -
    -  // #ifdef HAVE_MUSIC
    -  //   i->createcommand( "SetAcceptableLatency", &setacceptablelatency_l_dfunction );
    -  //   i->createcommand( "SetMaxBuffered", &setmaxbuffered_l_ifunction );
    -  // #endif
    -  //   i->createcommand( "EnableStructuralPlasticity", &enablestructuralplasticity_function );
    -  //   i->createcommand( "DisableStructuralPlasticity", &disablestructuralplasticity_function );
    -  //   i->createcommand( "Disconnect_g_g_D_D", &disconnect_g_g_D_Dfunction );
    -  //   i->createcommand( "Disconnect_a", &disconnect_afunction );
    -
    -  //   i->createcommand( "SetStdpEps", &setstdpeps_dfunction );
    -
    -  //   // SLI functions for spatial networks
    -  //   i->createcommand( "CreateLayer_D_D", &createlayer_D_Dfunction );
    -  //   i->createcommand( "GetPosition_g", &getposition_gfunction );
    -  //   i->createcommand( "Displacement_g_g", &displacement_g_gfunction );
    -  //   i->createcommand( "Displacement_a_g", &displacement_a_gfunction );
    -  //   i->createcommand( "Distance_g_g", &distance_g_gfunction );
    -  //   i->createcommand( "Distance_a_g", &distance_a_gfunction );
    -  //   i->createcommand( "Distance_a", &distance_afunction );
    -  //   i->createcommand( "CreateMask_D", &createmask_Dfunction );
    -  //   i->createcommand( "Inside_a_M", &inside_a_Mfunction );
    -  //   i->createcommand( "and_M_M", &and_M_Mfunction );
    -  //   i->createcommand( "or_M_M", &or_M_Mfunction );
    -  //   i->createcommand( "sub_M_M", &sub_M_Mfunction );
    -  //   i->createcommand( "ConnectLayers_g_g_D", &connectlayers_g_g_Dfunction );
    -  //   i->createcommand( "GetLayerStatus_g", &getlayerstatus_gfunction );
    -  //   i->createcommand( "DumpLayerNodes_os_g", &dumplayernodes_os_gfunction );
    -  //   i->createcommand( "DumpLayerConnections_os_g_g_l", &dumplayerconnections_os_g_g_lfunction );
    -  //   i->createcommand( "cvdict_M", &cvdict_Mfunction );
    -  //   i->createcommand( "SelectNodesByMask_g_a_M", &selectnodesbymask_g_a_Mfunction );
    -
    -
    -  //   // Add connection rules
    -  //   kernel().connection_manager.register_conn_builder< OneToOneBuilder >( "one_to_one" );
    -  //   kernel().connection_manager.register_conn_builder< AllToAllBuilder >( "all_to_all" );
    -  //   kernel().connection_manager.register_conn_builder< FixedInDegreeBuilder >( "fixed_indegree" );
    -  //   kernel().connection_manager.register_conn_builder< FixedOutDegreeBuilder >( "fixed_outdegree" );
    -  //   kernel().connection_manager.register_conn_builder< BernoulliBuilder >( "pairwise_bernoulli" );
    -  //   kernel().connection_manager.register_conn_builder< SymmetricBernoulliBuilder >( "symmetric_pairwise_bernoulli" );
    -  //   kernel().connection_manager.register_conn_builder< FixedTotalNumberBuilder >( "fixed_total_number" );
    -  // #ifdef HAVE_LIBNEUROSIM
    -  //   kernel().connection_manager.register_conn_builder< ConnectionGeneratorBuilder >( "conngen" );
    -  // #endif
    -
    -  //   // Add MSP growth curves
    -  //   kernel().sp_manager.register_growth_curve< GrowthCurveSigmoid >( "sigmoid" );
    -  //   kernel().sp_manager.register_growth_curve< GrowthCurveGaussian >( "gaussian" );
    -  //   kernel().sp_manager.register_growth_curve< GrowthCurveLinear >( "linear" );
    -
    -  //   Token statusd = i->baselookup( Name( "statusdict" ) );
    -  //   DictionaryDatum dd = getValue< DictionaryDatum >( statusd );
    -  //   dd->insert( Name( "kernelname" ), new StringDatum( "NEST" ) );
    -  //   dd->insert( Name( "is_mpi" ), new BoolDatum( kernel().mpi_manager.is_mpi_used() ) );
    -
    -  //   register_parameter< ConstantParameter >( "constant" );
    -  //   register_parameter< UniformParameter >( "uniform" );
    -  //   register_parameter< UniformIntParameter >( "uniform_int" );
    -  //   register_parameter< NormalParameter >( "normal" );
    -  //   register_parameter< LognormalParameter >( "lognormal" );
    -  //   register_parameter< ExponentialParameter >( "exponential" );
    -  //   register_parameter< NodePosParameter >( "position" );
    -  //   register_parameter< SpatialDistanceParameter >( "distance" );
    -  //   register_parameter< GaussianParameter >( "gaussian" );
    -  //   register_parameter< Gaussian2DParameter >( "gaussian2d" );
    -  //   register_parameter< GammaParameter >( "gamma" );
    -  //   register_parameter< ExpDistParameter >( "exp_distribution" );
    -
    -  // #ifdef HAVE_LIBNEUROSIM
    -  //   i->createcommand( "CGParse", &cgparse_sfunction );
    -  //   i->createcommand( "CGParseFile", &cgparsefile_sfunction );
    -  //   i->createcommand( "CGSelectImplementation", &cgselectimplementation_s_sfunction );
    -  // #endif
    -
    -  //   register_mask< BallMask< 2 > >();
    -  //   register_mask< BallMask< 3 > >();
    -  //   register_mask< EllipseMask< 2 > >();
    -  //   register_mask< EllipseMask< 3 > >();
    -  //   register_mask< BoxMask< 2 > >();
    -  //   register_mask< BoxMask< 3 > >();
    -  //   register_mask( "doughnut", create_doughnut );
    -  //   register_mask< GridMask< 2 > >();
    -}
    -
    -} // namespace nest
    diff --git a/nestkernel/nestmodule.h b/nestkernel/nestmodule.h
    deleted file mode 100644
    index 080bc11db1..0000000000
    --- a/nestkernel/nestmodule.h
    +++ /dev/null
    @@ -1,837 +0,0 @@
    -/*
    - *  nestmodule.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef NESTMODULE_H
    -#define NESTMODULE_H
    -
    -// Includes from nestkernel:
    -#include "event.h"
    -#include "exceptions.h"
    -#include "generic_factory.h"
    -#include "ntree.h"
    -#include "parameter.h"
    -#include "position.h"
    -
    -// Includes from sli:
    -#include "dict.h"
    -#include "sharedptrdatum.h"
    -#include "slifunction.h"
    -#include "slimodule.h"
    -#include "slitype.h"
    -
    -
    -namespace nest
    -{
    -class AbstractLayer;
    -class AbstractMask;
    -template < int D >
    -class Layer;
    -
    -class Node;
    -class Parameter;
    -
    -/**
    - * SLI interface of the NEST kernel.
    - * This class implements the SLI functions which connect the NEST
    - * kernel with the interpreter.
    - */
    -
    -class NestModule : public SLIModule
    -{
    -public:
    -#ifdef HAVE_LIBNEUROSIM
    -  static SLIType ConnectionGeneratorType;
    -#endif
    -  static SLIType ConnectionType;
    -  static SLIType MaskType;
    -  static SLIType NodeCollectionType;
    -  static SLIType NodeCollectionIteratorType;
    -  static SLIType ParameterType;
    -
    -  NestModule();
    -  ~NestModule() override;
    -
    -  void init( SLIInterpreter* ) override;
    -
    -  const std::string commandstring() const override;
    -  const std::string name() const override;
    -
    -  // static sharedPtrDatum< Parameter, &ParameterType > create_parameter( const Token& );
    -  // static Parameter* create_parameter( const Name& name, const DictionaryDatum& d );
    -
    -  using ParameterFactory = GenericFactory< Parameter >;
    -  using ParameterCreatorFunction = GenericFactory< Parameter >::CreatorFunction;
    -
    -  template < class T >
    -  static bool register_parameter( const Name& name );
    -
    -  using MaskFactory = GenericFactory< AbstractMask >;
    -  using MaskCreatorFunction = GenericFactory< AbstractMask >::CreatorFunction;
    -
    -  /**
    -   * Register an AbstractMask subclass as a new mask type. The name will
    -   * be found using the function T::get_name()
    -   * @returns true if the new type was successfully registered, or false
    -   *          if a mask type with the same name already exists.
    -   */
    -  template < class T >
    -  static bool register_mask();
    -
    -  /**
    -   * Register a new mask type with the given name, with a supplied
    -   * function to create mask objects of this type.
    -   * @param name    name of the new mask type.
    -   * @param creator function creating objects of this type. The function
    -   *                will be called with the parameter dictionary as
    -   *                argument and should return a pointer to a new Mask
    -   *                object.
    -   * @returns true if the new type was successfully registered, or false
    -   *          if a mask type with the same name already exists.
    -   */
    -  static bool register_mask( const std::string& name, MaskCreatorFunction creator );
    -
    -  /**
    -   * Return a Mask object.
    -   * @param t Either an existing MaskDatum, or a Dictionary containing
    -   *          mask parameters. The dictionary should contain a key with
    -   *          the name of the mask type, with a dictionary of parameters
    -   *          as value, and optionally an anchor.
    -   * @returns Either the MaskDatum given as argument, or a new mask.
    -   */
    -  static sharedPtrDatum< AbstractMask, &NestModule::MaskType > /*MaskDatum*/ create_mask( const dictionary& params );
    -
    -  /**
    -   * Create a new Mask object using the mask factory.
    -   * @param name Mask type to create.
    -   * @param d    Dictionary with parameters specific for this mask type.
    -   * @returns dynamically allocated new Mask object.
    -   */
    -  static AbstractMask* create_mask( const Name& name, const dictionary& d );
    -
    -  /**
    -   * @defgroup NestSliInterface SLI Interface functions of the NEST kernel.
    -   * This group contains the functions that form the SLI interface
    -   * of the NEST kernel.
    -   *
    -   * @section namemangling Name mangling
    -   * All function names are mangled, so that type checking can occur
    -   * using type tries in the SLI interpreter. No unmangled names
    -   * should be introduced.
    -   *
    -   * Name mangling is based on the following principles:
    -   * -# For each argument expected, _# is appended to the function name
    -   * in the order in which arguments are expected on the stack,
    -   * i.e., deepest first.
    -   * -# # is a (sequence of) lowercase letter for plain data types,
    -   * an uppercase letter for compound types.
    -   * -# For compound types, a lowercase letter can be appended to indicate
    -   * the type of the elements expected (eg. Ai for array of int).
    -   *
    -   * @subsection plaintypes Codes for plain data types
    -   * - @c i  : int (actually long)
    -   * - @c d  : double
    -   * - @c u  : numeric (long or double)
    -   * - @c s  : string
    -   * - @c l  : literal
    -   * - @c f  : function
    -   * - @c is : input stream
    -   * - @c os : output stream
    -   * - @c t  : any token
    -   * - @c C  : connectiontype
    -   * - @c cg : connectiongeneratortype
    -   * - @c g  : node collection
    -   * - @c q  : node collection iterator
    -   *
    -   * @subsection compoundtypes Codes for compund data types
    -   * - @c A  : array
    -   * - @c D  : dictionary
    -   * - @c V  : vector
    -   *
    -   * @section conventions Conventions
    -   * -# All interface functions expect and return nodes as vectors
    -   *    of node IDs (Vi).
    -   * -# Functions must document how they loop over node ID vectors and
    -   *    how the function is applied to NodeCollections provided as
    -   *    arguments.
    -   * -# Functions that do not require overloading on the SLI level,
    -   *    need not carry their argument list in the SLI function
    -   *    name and need not be wrapped by SLI tries.
    -   * -# Functions which expect a model or synapse type as argument,
    -   *    must be given this argument as a literal, e.g.,
    -        @verbatim
    -        /iaf_psc_alpha 6 Create
    -        @endverbatim
    -   * -# The network is accessed using the get_network() accessor
    -   *    function.
    -   * -# Each interface function shall verify that there are enough
    -   *    elements on the stack using (replace n by correct integer)
    -   *    @verbatim
    -   *    i->assert_stack_load(n);
    -   *    @endverbatim
    -   * -# Errors should trigger C++ exceptions. They will be caught
    -   *    in the main interpreter loop.
    -   *
    -   * @section slidoc SLI Documentation
    -   * SLI documentation should be provided in nestmodule.cpp, ahead of each
    -   * group of related functions.
    -   */
    -
    -  //@{
    -
    -  class GetStatus_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getstatus_gfunction;
    -
    -  class GetStatus_iFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getstatus_ifunction;
    -
    -  class GetStatus_CFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getstatus_Cfunction;
    -
    -  class GetStatus_aFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getstatus_afunction;
    -
    -  class GetMetadata_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getmetadata_gfunction;
    -
    -  class GetKernelStatus_Function : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getkernelstatus_function;
    -
    -  class SetStatus_idFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } setstatus_idfunction;
    -
    -  class SetStatus_CDFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } setstatus_CDfunction;
    -
    -  class SetKernelStatus_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } setkernelstatus_Dfunction;
    -
    -  class Cva_CFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } cva_cfunction;
    -
    -  class SetStatus_aaFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } setstatus_aafunction;
    -
    -  class SetDefaults_l_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } setdefaults_l_Dfunction;
    -
    -  class GetDefaults_lFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getdefaults_lfunction;
    -
    -  class CopyModel_l_l_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } copymodel_l_l_Dfunction;
    -
    -  class GetConnections_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getconnections_Dfunction;
    -
    -  class SimulateFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } simulatefunction;
    -
    -  class PrepareFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } preparefunction;
    -
    -  class RunFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } runfunction;
    -
    -  class CleanupFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } cleanupfunction;
    -
    -  class Create_l_iFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } create_l_ifunction;
    -
    -  class GetNodes_D_b : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getnodes_D_bfunction;
    -
    -  class Disconnect_g_g_D_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } disconnect_g_g_D_Dfunction;
    -
    -  class Disconnect_aFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const;
    -  } disconnect_afunction;
    -
    -  class Connect_g_g_D_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } connect_g_g_D_Dfunction;
    -
    -  class Connect_g_g_D_aFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } connect_g_g_D_afunction;
    -
    -  class ResetKernelFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } resetkernelfunction;
    -
    -  class MemoryInfoFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } memoryinfofunction;
    -
    -  class PrintNodesFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } printnodesfunction;
    -
    -  class PrintNodesToStreamFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } printnodestostreamfunction;
    -
    -  class RankFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } rankfunction;
    -
    -  class NumProcessesFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } numprocessesfunction;
    -
    -  class SetFakeNumProcesses_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } setfakenumprocesses_ifunction;
    -
    -  class SyncProcessesFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } syncprocessesfunction;
    -
    -  class TimeCommunication_i_i_bFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } timecommunication_i_i_bfunction;
    -
    -  class TimeCommunicationv_i_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } timecommunicationv_i_ifunction;
    -
    -  class TimeCommunicationAlltoall_i_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } timecommunicationalltoall_i_ifunction;
    -
    -  class TimeCommunicationAlltoallv_i_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } timecommunicationalltoallv_i_ifunction;
    -
    -  class ProcessorNameFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } processornamefunction;
    -
    -#ifdef HAVE_MPI
    -  class MPIAbort_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } mpiabort_ifunction;
    -#endif
    -
    -  class Cvdict_CFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } cvdict_Cfunction;
    -
    -  class Cvnodecollection_i_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } cvnodecollection_i_ifunction;
    -
    -  class Cvnodecollection_iaFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } cvnodecollection_iafunction;
    -
    -  class Cvnodecollection_ivFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } cvnodecollection_ivfunction;
    -
    -  class Cva_gFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } cva_gfunction;
    -
    -  class Size_gFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } size_gfunction;
    -
    -  class ValidQ_gFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } validq_gfunction;
    -
    -  class Join_g_gFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } join_g_gfunction;
    -
    -  class MemberQ_g_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } memberq_g_ifunction;
    -
    -  class Find_g_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } find_g_ifunction;
    -
    -  class eq_gFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } eq_gfunction;
    -
    -  class BeginIterator_gFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } beginiterator_gfunction;
    -
    -  class EndIterator_gFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } enditerator_gfunction;
    -
    -  class GetNodeID_qFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } getnodeid_qfunction;
    -
    -  class GetNodeIDModelID_qFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } getnodeidmodelid_qfunction;
    -
    -  class Next_qFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } next_qfunction;
    -
    -  class Eq_q_qFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } eq_q_qfunction;
    -
    -  class Lt_q_qFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } lt_q_qfunction;
    -
    -  class Get_g_iFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } get_g_ifunction;
    -
    -  class Take_g_aFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const override;
    -  } take_g_afunction;
    -
    -#ifdef HAVE_MUSIC
    -  class SetAcceptableLatencyFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } setacceptablelatency_l_dfunction;
    -
    -  class SetMaxBufferedFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } setmaxbuffered_l_ifunction;
    -#endif
    -
    -  class EnableStructuralPlasticity_Function : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } enablestructuralplasticity_function;
    -
    -  class DisableStructuralPlasticity_Function : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } disablestructuralplasticity_function;
    -
    -  class SetStdpEps_dFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } setstdpeps_dfunction;
    -
    -  class Mul_P_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } mul_P_Pfunction;
    -
    -  class Div_P_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } div_P_Pfunction;
    -
    -  class Add_P_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } add_P_Pfunction;
    -
    -  class Sub_P_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } sub_P_Pfunction;
    -
    -  class Compare_P_P_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } compare_P_P_Dfunction;
    -
    -  class Conditional_P_P_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } conditional_P_P_Pfunction;
    -
    -  class Min_P_dFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } min_P_dfunction;
    -
    -  class Max_P_dFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } max_P_dfunction;
    -
    -  class Redraw_P_d_dFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } redraw_P_d_dfunction;
    -
    -  class Exp_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } exp_Pfunction;
    -
    -  class Sin_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } sin_Pfunction;
    -
    -  class Cos_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } cos_Pfunction;
    -
    -  class Pow_P_dFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } pow_P_dfunction;
    -
    -  class Dimension2d_P_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } dimension2d_P_Pfunction;
    -
    -  class Dimension3d_P_P_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } dimension3d_P_P_Pfunction;
    -
    -  class CreateParameter_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } createparameter_Dfunction;
    -
    -  class GetValue_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getvalue_Pfunction;
    -
    -  class IsSpatial_PFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } isspatial_Pfunction;
    -
    -  class Apply_P_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } apply_P_Dfunction;
    -
    -  class Apply_P_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } apply_P_gfunction;
    -
    -#ifdef HAVE_LIBNEUROSIM
    -  class CGParse_sFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } cgparse_sfunction;
    -
    -  class CGParseFile_sFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } cgparsefile_sfunction;
    -
    -  class CGSelectImplementation_s_sFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  } cgselectimplementation_s_sfunction;
    -#endif
    -
    -  //
    -  // SLI functions for spatial networks
    -  //
    -
    -  class CreateLayer_D_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } createlayer_D_Dfunction;
    -
    -  class GetPosition_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getposition_gfunction;
    -
    -  class Displacement_g_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } displacement_g_gfunction;
    -
    -  class Displacement_a_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } displacement_a_gfunction;
    -
    -  class Distance_g_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } distance_g_gfunction;
    -
    -  class Distance_a_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } distance_a_gfunction;
    -
    -  class Distance_aFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } distance_afunction;
    -
    -  class ConnectLayers_g_g_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } connectlayers_g_g_Dfunction;
    -
    -  class CreateMask_DFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } createmask_Dfunction;
    -
    -  class GetLayerStatus_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } getlayerstatus_gfunction;
    -
    -  class Inside_a_MFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } inside_a_Mfunction;
    -
    -  class And_M_MFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } and_M_Mfunction;
    -
    -  class Or_M_MFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } or_M_Mfunction;
    -
    -  class Sub_M_MFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } sub_M_Mfunction;
    -
    -  class DumpLayerNodes_os_gFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } dumplayernodes_os_gfunction;
    -
    -  class DumpLayerConnections_os_g_g_lFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } dumplayerconnections_os_g_g_lfunction;
    -
    -  class Cvdict_MFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } cvdict_Mfunction;
    -
    -  class SelectNodesByMask_g_a_MFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  } selectnodesbymask_g_a_Mfunction;
    -
    -private:
    -  static ParameterFactory& parameter_factory_();
    -  static MaskFactory& mask_factory_();
    -
    -  //@}
    -};
    -
    -template < class T >
    -inline bool
    -NestModule::register_parameter( const Name& name )
    -{
    -  return parameter_factory_().register_subtype< T >( name );
    -}
    -
    -template < class T >
    -inline bool
    -NestModule::register_mask()
    -{
    -  return mask_factory_().register_subtype< T >( T::get_name() );
    -}
    -
    -inline bool
    -NestModule::register_mask( const std::string& name, MaskCreatorFunction creator )
    -{
    -  return mask_factory_().register_subtype( name, creator );
    -}
    -
    -// inline AbstractMask*
    -// NestModule::create_mask( const Name& name, const dictionary& d )
    -// {
    -//   return mask_factory_().create( name, d );
    -// }
    -
    -} // namespace
    -
    -#endif
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index 938b8f519b..8e647599db 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -24,6 +24,7 @@
     
     // C++ includes:
     #include <set>
    +#include <iomanip>
     
     // Includes from libnestutil:
     #include "compose.hpp"
    diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h
    index 65a4f04594..10b7bfcb90 100644
    --- a/nestkernel/parameter.h
    +++ b/nestkernel/parameter.h
    @@ -28,9 +28,10 @@
     #include <limits>
     
     // Includes from nestkernel:
    +#include "generic_factory.h"
     #include "nest_names.h"
     #include "nest_types.h"
    -#include "nestmodule.h"
    +#include "node.h"
     #include "node_collection.h"
     #include "random_generators.h"
     
    diff --git a/nestkernel/position.h b/nestkernel/position.h
    index a82fab17c5..349bdc22cb 100644
    --- a/nestkernel/position.h
    +++ b/nestkernel/position.h
    @@ -118,12 +118,6 @@ class Position
        */
       const T& operator[]( int i ) const;
     
    -  /**
    -   * Moves Position variables into an array.
    -   * @returns array of positions stored as a token object.
    -   */
    -  Token getToken() const;
    -
       const std::vector< T > get_vector() const;
       void get_vector( std::vector< T >& vector ) const;
     
    @@ -488,15 +482,6 @@ Position< D, T >::operator[]( int i ) const
       return x_[ i ];
     }
     
    -// template < int D, class T >
    -// Token
    -// Position< D, T >::getToken() const
    -// {
    -//   std::vector< T > result = get_vector();
    -//   return Token( result );
    -// }
    -
    -
     template < int D, class T >
     const std::vector< T >
     Position< D, T >::get_vector() const
    diff --git a/nestkernel/proxynode.cpp b/nestkernel/proxynode.cpp
    index b370f88008..4d74ac9e94 100644
    --- a/nestkernel/proxynode.cpp
    +++ b/nestkernel/proxynode.cpp
    @@ -86,8 +86,7 @@ void
     proxynode::get_status( dictionary& d ) const
     {
       const Model* model = kernel().model_manager.get_node_model( model_id_ );
    -  const Name element_type = model->get_prototype().get_element_type();
    -  d[ names::element_type ] = element_type.toString();
    +  d[ names::element_type ] = model->get_prototype().get_element_type();
     }
     
     
    diff --git a/nestkernel/recording_backend_ascii.cpp b/nestkernel/recording_backend_ascii.cpp
    index c021b02093..e3e61fd670 100644
    --- a/nestkernel/recording_backend_ascii.cpp
    +++ b/nestkernel/recording_backend_ascii.cpp
    @@ -20,6 +20,12 @@
      *
      */
     
    +
    +#include "recording_backend_ascii.h"
    +
    +// C++ includes:
    +#include <iomanip>
    +
     // Includes from libnestutil:
     #include "compose.hpp"
     
    @@ -28,8 +34,6 @@
     #include "vp_manager_impl.h"
     
     
    -#include "recording_backend_ascii.h"
    -
     const unsigned int nest::RecordingBackendASCII::ASCII_REC_BACKEND_VERSION = 2;
     
     nest::RecordingBackendASCII::RecordingBackendASCII()
    diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp
    index fb0e5b6678..bc28f0c903 100644
    --- a/nestkernel/recording_backend_sionlib.cpp
    +++ b/nestkernel/recording_backend_sionlib.cpp
    @@ -32,9 +32,6 @@
     // Includes from libnestutil:
     #include "compose.hpp"
     
    -// Includes from nest:
    -#include "../nest/neststartup.h"
    -
     // Includes from nestkernel:
     #include "recording_device.h"
     #include "vp_manager_impl.h"
    diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp
    index 89c85de8a0..60022c6977 100644
    --- a/nestkernel/simulation_manager.cpp
    +++ b/nestkernel/simulation_manager.cpp
    @@ -27,6 +27,7 @@
     
     // C++ includes:
     #include <limits>
    +#include <iomanip>
     #include <vector>
     
     // Includes from libnestutil:
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index 2b13c547a5..a8ec305abd 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -34,7 +34,6 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     #include "nest.h"
    -#include "nestmodule.h"
     #include "node.h"
     
     // Includes from spatial:
    @@ -531,7 +530,7 @@ dump_layer_nodes( NodeCollectionPTR layer_nc, std::ostream& out )
     }
     
     void
    -dump_layer_connections( const Token& syn_model,
    +dump_layer_connections( const std::string& syn_model,
       NodeCollectionPTR source_layer_nc,
       NodeCollectionPTR target_layer_nc,
       std::ostream& out )
    diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h
    index 87e648c24b..66f42ca6b8 100644
    --- a/nestkernel/spatial.h
    +++ b/nestkernel/spatial.h
    @@ -121,7 +121,7 @@ MaskPTR union_mask( const MaskPTR mask1, const MaskPTR mask2 );
     MaskPTR minus_mask( const MaskPTR mask1, const MaskPTR mask2 );
     void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict );
     void dump_layer_nodes( NodeCollectionPTR layer_nc, std::ostream& out );
    -void dump_layer_connections( const Token& syn_model,
    +  void dump_layer_connections( const std::string& syn_model,
       NodeCollectionPTR source_layer_nc,
       NodeCollectionPTR target_layer_nc,
       std::ostream& out_file );
    diff --git a/nestkernel/synaptic_element.cpp b/nestkernel/synaptic_element.cpp
    index abb7d57217..c6c8fb69c1 100644
    --- a/nestkernel/synaptic_element.cpp
    +++ b/nestkernel/synaptic_element.cpp
    @@ -33,8 +33,6 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
     
     /* ----------------------------------------------------------------
      * SynapticElement
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 20778cb3d9..94c314ac45 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -21,78 +21,28 @@ if ( HAVE_PYTHON )
     
       if ( CYTHON_FOUND )
         include( UseCython )
    -    set_source_files_properties(
    -        pynestkernel.pyx
    -        PROPERTIES CYTHON_IS_CXX TRUE )
    -    set_source_files_properties(
    -        nestkernel_api.pyx
    -        PROPERTIES CYTHON_IS_CXX TRUE )
    -
    -    cython_add_module( pynestkernel pynestkernel.pyx )
    +    set_source_files_properties( nestkernel_api.pyx PROPERTIES CYTHON_IS_CXX TRUE )
         cython_add_module( nestkernel_api nestkernel_api.pyx )
       else ()
    -    # require the source pynest/pynestkernel.cxx precompiled
    -    set( pynestkernel_generated_file "NOTFOUND" )
    -    if ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/pynestkernel.cxx )
    -      set( pynestkernel_generated_file pynestkernel.cxx )
    -    elseif ( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/pynestkernel.cpp )
    -      set( pynestkernel_generated_file pynestkernel.cpp )
    -    endif ()
    -
    -    if ( pynestkernel_generated_file STREQUAL "NOTFOUND" )
    -      message( FATAL_ERROR "You have configured NEST to build the Python bindings PyNEST, but "
    -          "either there is no Cython version found on your system or you decided to "
    -          "not have NEST cythonize the bindings. Either install Cython (>=0.19.2) or cythonize the "
    -          "PyNEST bindings yourself on a system with a suitable version of Cython (>=0.19.2):\n"
    -          "    cd <NEST sources>/pynest\n"
    -          "    cythonize pynestkernel.pyx\n"
    -          "And copy the file `pynestkernel.cpp` into ${CMAKE_CURRENT_SOURCE_DIR}/pynest ." )
    -    endif ()
    -    python_add_module( pynestkernel ${pynestkernel_generated_file} pynestkernel.pxd )
    -    if ( APPLE )
    -      set_target_properties( pynestkernel PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
    -    else ()
    -      set_target_properties( pynestkernel PROPERTIES LINK_FLAGS "-Wl,--no-as-needed")
    -      target_link_libraries( pynestkernel ${Python_LIBRARIES} )
    -    endif ()
    +    message( FATAL_ERROR "Building PyNEST requires Cython." )
       endif ()
     
    -  target_link_libraries( pynestkernel
    -      nest_lib nestutil nestkernel sli_lib
    -      ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES}
    -      )
    -
       target_link_libraries( nestkernel_api
    -      nest_lib nestutil nestkernel sli_lib
    +      nestutil nestkernel
           ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES}
           )
     
    -  target_include_directories( pynestkernel PRIVATE
    -      ${PROJECT_BINARY_DIR}/libnestutil
    -      ${PROJECT_SOURCE_DIR}/libnestutil
    -      ${PROJECT_SOURCE_DIR}/pynest
    -      ${PROJECT_SOURCE_DIR}/nestkernel
    -      ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    -      ${PROJECT_SOURCE_DIR}/sli
    -      ${PROJECT_SOURCE_DIR}/thirdparty
    -      ${SLI_MODULE_INCLUDE_DIRS}
    -      ${Python_INCLUDE_DIRS}
    -      )
       target_include_directories( nestkernel_api PRIVATE
           ${PROJECT_BINARY_DIR}/libnestutil
           ${PROJECT_SOURCE_DIR}/libnestutil
           ${PROJECT_SOURCE_DIR}/pynest
           ${PROJECT_SOURCE_DIR}/nestkernel
           ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    -      ${PROJECT_SOURCE_DIR}/sli
           ${PROJECT_SOURCE_DIR}/thirdparty
           ${SLI_MODULE_INCLUDE_DIRS}
           ${Python_INCLUDE_DIRS}
           )
     
    -  target_compile_definitions( pynestkernel PRIVATE
    -      -D_IS_PYNEST
    -      )
       target_compile_definitions( nestkernel_api PRIVATE
           -D_IS_PYNEST
           )
    @@ -101,7 +51,6 @@ if ( HAVE_PYTHON )
           DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest
           PATTERN "versionchecker.py.in" EXCLUDE
       )
    -  install( TARGETS pynestkernel DESTINATION ${PYEXECDIR}/nest/ )
       install( TARGETS nestkernel_api DESTINATION ${PYEXECDIR}/nest/ )
       install( CODE "
           execute_process(
    diff --git a/pynest/nest/pynest-init.sli b/pynest/nest/pynest-init.sli
    deleted file mode 100644
    index ff6a2a862d..0000000000
    --- a/pynest/nest/pynest-init.sli
    +++ /dev/null
    @@ -1,120 +0,0 @@
    -/*
    - *  pynest-init.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -Name: sli_func - execute sli code on array of arguments
    -Synopsis: [arg1 arg2 ... argN] (function code) sli_func -> [res1 res2 ...]
    -Arguments: The first arg is an array containing arguments to the
    -           function. The array contents is pushed onto the stack.
    -
    -	   The second arg is SLI code that is a string containing
    -	   SLI code that is executed. Anything left on the stack
    -	   is stored in an array as result.
    -Remarks: This function is for use by the python sli_func().
    -SeeAlso: sli_func_litconv
    - */
    -/sli_func
    -[/arraytype /stringtype]
    -{
    - << >> begin   % work in local dictionary to avoid side effects
    -   /mark rollu
    -   cvx                        % convert string to SLI procedure
    -   {arrayload pop} prepend    % code prepare arguments
    -   exec             
    -   counttomark                % count number of return values
    -   arraystore 
    -   exch pop         % remove the mark
    - end
    -}
    -def
    -
    -/*
    -Name: sli_func_litconv - execute sli code on array of arguments
    -Synopsis: [arg1 arg2 ... argN] (function code) sli_func_litconv -> [res1 res2 ...]
    -Arguments: If argn is a string and its first char is /, it is 
    -	   converted to a literal before loaded onto the stack.
    -Remarks: same as sli_func, but string args beginnig with / are converted to literals
    -SeeAlso: sli_func_litconv
    - */
    -/sli_func_litconv
    -[/arraytype /stringtype]
    -{
    - << >> begin   % work in local dictionary to avoid side effects
    -   /mark rollu
    -   cvx                        % convert string to SLI procedure
    -   {
    -     { StringQ { dup First 47 eq { Rest cvlit } if } if } Map
    -     arrayload pop
    -   } prepend    % code prepare arguments
    -   exec             
    -   counttomark                % count number of return values
    -   arraystore 
    -   exch pop         % remove the mark
    - end
    -}
    -def
    -
    -
    -
    -/pywelcome
    -{
    -  () =
    -  (              -- N E S T --) =
    -  (  Copyright (C) 2004 The NEST Initiative) = () =
    -  ( Version: ) =only statusdict/version :: =
    -  ( Built: ) =only statusdict/built :: =
    -  () =
    -
    -  ( This program is provided AS IS and comes with) =
    -  ( NO WARRANTY. See the file LICENSE for details.) =
    -  () =
    -
    -  ( Problems or suggestions?) =
    -  (   Visit https://www.nest-simulator.org) =
    -  () =
    -
    -  ( Type 'nest.help()' to find out more about NEST.) =
    -  () =
    -  :warnings
    -} def
    -
    -
    -/runprotected
    -{
    -  stopped dup
    -  {
    -    errordict /newerror get 
    -    {
    -      errordict /message known 
    -      { (: ) errordict /message get join errordict /message undef}
    -      { () } ifelse
    -      errordict /errorname get cvs
    -      3 2 roll % get the error flag to the top again
    -      errordict /newerror false put  % Tell NEST that the error is handled already
    -    }
    -    {
    -      (Software Interrupt)
    -    }
    -    ifelse
    -  } if
    -  not % invert the return value of stopped
    -} bind def
    diff --git a/pynest/pynestkernel.pxd b/pynest/pynestkernel.pxd
    deleted file mode 100644
    index 5b7b87ee7a..0000000000
    --- a/pynest/pynestkernel.pxd
    +++ /dev/null
    @@ -1,268 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# pynestkernel.pxd
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -from libcpp cimport bool as cbool
    -
    -from libcpp.string cimport string
    -from libcpp.vector cimport vector
    -from libcpp.utility cimport pair
    -
    -from cpython.ref cimport PyObject
    -
    -## cdef extern from "name.h":
    -##     cppclass Name:
    -##         string toString() except +
    -## 
    -## cdef extern from "datum.h":
    -##     cppclass Datum:
    -##         Name gettypename() except +
    -## 
    -## cdef extern from "token.h":
    -##     cppclass Token:
    -##         Datum* datum() except +
    -## 
    -## cdef extern from "namedatum.h":
    -##     cppclass LiteralDatum:
    -##         LiteralDatum(const string&) except +
    -##         string toString() except +
    -## 
    -## cdef extern from "booldatum.h":
    -##     cppclass BoolDatum:
    -##         BoolDatum(cbool) except +
    -##         bint get() except +
    -## 
    -## cdef extern from "integerdatum.h":
    -##     cppclass IntegerDatum:
    -##         IntegerDatum(long) except +
    -##         long get() except +
    -## 
    -## cdef extern from "doubledatum.h":
    -##     cppclass DoubleDatum:
    -##         DoubleDatum(double) except +
    -##         double get() except +
    -## 
    -## cdef extern from "stringdatum.h":
    -##     cppclass StringDatum:
    -##         StringDatum(const string&) except +
    -
    -cdef extern from "mask.h" namespace "nest":
    -    cppclass MaskPTR:
    -        MaskPTR()
    -
    -cdef extern from "parameter.h":
    -    cppclass ParameterPTR:
    -        ParameterPTR()
    -
    -cdef extern from "node_collection.h" namespace "nest":
    -    cppclass NodeCollectionPTR:
    -        NodeCollectionPTR()
    -
    -## cdef extern from "node_collection.h":
    -##     cppclass NodeCollectionDatum:
    -##         NodeCollectionDatum(const NodeCollectionDatum&)
    -## 
    -##     cppclass NodeCollectionIteratorDatum:
    -##         NodeCollectionIteratorDatum(const NodeCollectionIteratorDatum&)
    -
    -cdef extern from "connection_id.h" namespace "nest":
    -    cppclass ConnectionID:
    -        ConnectionID(long, long, long, long) except +
    -        ConnectionID(long, long, long, long, long) except +
    -
    -## cdef extern from "nest_datums.h":
    -##     cppclass ConnectionDatum:
    -##         ConnectionDatum(const ConnectionID&) except +
    -##         ConnectionDatum(const ConnectionDatum&) except +
    -##         long get_source_node_id()
    -##         long get_target_node_id()
    -##         long get_target_thread()
    -##         long get_synapse_model_id()
    -##         long get_port()
    -
    -##    cppclass NodeCollectionIteratorDatum:
    -##        NodeCollectionIteratorDatum(const NodeCollectionIteratorDatum&)
    -
    -
    -cdef extern from "arraydatum.h":
    -##    cppclass ArrayDatum:
    -##        ArrayDatum() except +
    -##        size_t size()
    -##        void reserve(size_t) except +
    -##        void push_back(Datum*) except +
    -##        Token* begin()
    -##        Token* end()
    -
    -    cppclass IntVectorDatum:
    -        IntVectorDatum(vector[long]*) except +
    -
    -    cppclass DoubleVectorDatum:
    -        DoubleVectorDatum(vector[double]*) except +
    -
    -cdef extern from "dict.h":
    -    cppclass Dictionary:
    -        Dictionary() except +
    -
    -## cdef extern from "dictdatum.h":
    -##     cppclass TokenMap:
    -##         cppclass const_iterator:
    -##             const_iterator operator++()
    -##             bint operator!=(const_iterator)
    -##             Name first
    -##             Token second
    -## 
    -##     cppclass DictionaryDatum:
    -##         DictionaryDatum(Dictionary *) except +
    -##         void insert(const string&, Datum*) except +
    -##         TokenMap.const_iterator begin()
    -##         TokenMap.const_iterator end()
    -## 
    -## cdef extern from "tokenstack.h":
    -##     cppclass TokenStack:
    -##         void push(Datum*) except +
    -##         void pop()
    -##         cbool empty()
    -## 
    -##         # Supposed to be used only through the addr_tok macro
    -##         Token* top()
    -
    -cdef extern from "dictionary.h" namespace "boost":
    -    cppclass any:
    -        any()
    -        any& operator=[T](T&)
    -    T any_cast[T](any& operand)
    -
    -cdef extern from "dictionary.h":
    -    cppclass dictionary:
    -        dictionary()
    -        # ctypedef key_type
    -        # ctypedef mapped_type
    -        any& operator[](const string&)
    -        cppclass const_iterator:
    -            pair[string, any]& operator*()
    -            const_iterator operator++()
    -            bint operator==(const const_iterator&)
    -            bint operator!=(const const_iterator&)
    -        const_iterator begin()
    -        const_iterator end()
    -    string debug_type(const any&)
    -    cbool is_int(const any&)
    -    cbool is_long(const any&)
    -    cbool is_size_t(const any&)
    -    cbool is_double(const any&)
    -    cbool is_bool(const any&)
    -    cbool is_string(const any&)
    -    cbool is_int_vector(const any&)
    -    cbool is_double_vector(const any&)
    -    cbool is_string_vector(const any&)
    -    cbool is_any_vector(const any&)
    -    cbool is_dict(const any&)
    -
    -cdef extern from "mpi_manager.h" namespace "nest":
    -    cppclass MPIManager:
    -        void mpi_finalize( int exitcode ) except +
    -
    -cdef extern from "kernel_manager.h" namespace "nest":
    -    KernelManager& kernel()
    -    cppclass KernelManager:
    -        KernelManager()
    -        void destroy_kernel_manager()
    -        MPIManager mpi_manager
    -
    -cdef extern from "nest.h" namespace "nest":
    -    void init_nest( int* argc, char** argv[] )
    -    void reset_kernel()
    -    NodeCollectionPTR create( const string model_name, const long n ) except +
    -
    -    NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except +
    -
    -    NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) except +
    -    void connect(NodeCollectionPTR sources,
    -                 NodeCollectionPTR targets,
    -                 const dictionary& connectivity,
    -                 const vector[dictionary]& synapse_params ) except +
    -    string pprint_to_string( NodeCollectionPTR nc )
    -    size_t nc_size( NodeCollectionPTR nc )
    -    dictionary get_kernel_status()
    -    void set_kernel_status( const dictionary& ) except +
    -    dictionary get_nc_status( NodeCollectionPTR nc )
    -    void set_nc_status( NodeCollectionPTR nc, dictionary& params ) except +
    -    void simulate( const double& t )
    -
    -cdef extern from "pynestkernel_aux.h":
    -    CYTHON_isConnectionGenerator( x )
    -    CYTHON_unpackConnectionGenerator( PyObject* obj )
    -    CYTHON_DEREF( x )
    -    CYTHON_ADDR( x )
    -
    -# TODO-PYNEST-NG: Move these from neststartup to mpimanager
    -# cdef extern from "neststartup.h":
    -#     cbool nest_has_mpi4py()
    -#     void c_set_communicator "set_communicator" (object) with gil
    -
    -cdef extern from "nest.h" namespace "nest":
    -    # Datum* node_collection_array_index(const Datum* node_collection, const long* array, unsigned long n) except +
    -    # Datum* node_collection_array_index(const Datum* node_collection, const cbool* array, unsigned long n) except +
    -    void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except +
    -
    -cdef extern from *:
    -
    -    # Real support for CSA has to be implemented below the Cython level,
    -    # or else we won't be able to distribute pre-generated kernels
    -    #
    -##    cbool isConnectionGenerator "CYTHON_isConnectionGenerator" (PyObject*)
    -##    ConnectionGenerator* unpackConnectionGenerator "CYTHON_unpackConnectionGenerator" (PyObject*) except +
    -
    -##    Token* addr_tok "CYTHON_ADDR" (Token*)
    -
    -##     StringDatum* deref_str "CYTHON_DEREF" (StringDatum*)
    -##     DictionaryDatum* deref_dict "CYTHON_DEREF" (DictionaryDatum*)
    -
    -##    TokenMap.const_iterator deref_tmap "CYTHON_DEREF" (TokenMap.const_iterator)
    -
    -    vector[long]* deref_ivector "&*CYTHON_DEREF" (IntVectorDatum*)
    -    vector[double]* deref_dvector "&*CYTHON_DEREF" (DoubleVectorDatum*)
    -
    -
    -ctypedef fused vector_value_t:
    -    long
    -    double
    -
    -ctypedef IntVectorDatum* sli_vector_int_ptr_t
    -ctypedef DoubleVectorDatum* sli_vector_double_ptr_t
    -
    -ctypedef fused sli_vector_ptr_t:
    -    sli_vector_int_ptr_t
    -    sli_vector_double_ptr_t
    -
    -ctypedef int [:] buffer_int_1d_t
    -ctypedef long [:] buffer_long_1d_t
    -
    -ctypedef float [:] buffer_float_1d_t
    -ctypedef double [:] buffer_double_1d_t
    -
    -ctypedef fused numeric_buffer_t:
    -    object
    -
    -    buffer_int_1d_t
    -    buffer_long_1d_t
    -
    -    buffer_float_1d_t
    -    buffer_double_1d_t
    diff --git a/pynest/pynestkernel.pyx b/pynest/pynestkernel.pyx
    deleted file mode 100644
    index ba9b09ed71..0000000000
    --- a/pynest/pynestkernel.pyx
    +++ /dev/null
    @@ -1,590 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# pynestkernel.pyx
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -#
    -# distutils: language = c++
    -#
    -
    -import cython
    -
    -from libc.stdlib cimport malloc, free
    -from libc.string cimport memcpy
    -
    -from libcpp.string cimport string
    -from libcpp.vector cimport vector
    -
    -from cython.operator cimport dereference as deref
    -from cython.operator cimport preincrement as inc
    -
    -from cpython cimport array
    -
    -from cpython.ref cimport PyObject
    -from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE
    -
    -import nest
    -from nest.lib.hl_api_exceptions import NESTMappedException, NESTErrors, NESTError
    -
    -
    -cdef string SLI_TYPE_BOOL = b"booltype"
    -cdef string SLI_TYPE_INTEGER = b"integertype"
    -cdef string SLI_TYPE_DOUBLE = b"doubletype"
    -cdef string SLI_TYPE_STRING = b"stringtype"
    -cdef string SLI_TYPE_LITERAL = b"literaltype"
    -cdef string SLI_TYPE_ARRAY = b"arraytype"
    -cdef string SLI_TYPE_DICTIONARY = b"dictionarytype"
    -cdef string SLI_TYPE_CONNECTION = b"connectiontype"
    -cdef string SLI_TYPE_VECTOR_INT = b"intvectortype"
    -cdef string SLI_TYPE_VECTOR_DOUBLE = b"doublevectortype"
    -cdef string SLI_TYPE_MASK = b"masktype"
    -cdef string SLI_TYPE_PARAMETER = b"parametertype"
    -cdef string SLI_TYPE_NODECOLLECTION = b"nodecollectiontype"
    -cdef string SLI_TYPE_NODECOLLECTIONITERATOR = b"nodecollectioniteratortype"
    -
    -
    -DEF CONN_ELMS = 5
    -
    -cdef unicode CONN_NAME_SRC = u"source"
    -cdef unicode CONN_NAME_SYN = u"synapse_modelid"
    -cdef unicode CONN_NAME_PRT = u"port"
    -cdef unicode CONN_NAME_THREAD = u"target_thread"
    -
    -CONN_LEN = CONN_ELMS
    -
    -
    -cdef ARRAY_LONG = array.array('l')
    -cdef ARRAY_DOUBLE = array.array('d')
    -
    -
    -cdef bint HAVE_NUMPY = False
    -
    -try:
    -    import numpy
    -    HAVE_NUMPY = True
    -except ImportError:
    -    pass
    -
    -
    -####cdef class SLIDatum:
    -####
    -####    cdef Datum* thisptr
    -####    cdef readonly unicode dtype
    -####
    -####    def __cinit__(self):
    -####
    -####        self.dtype = u""
    -####	
    -####        self.thisptr = NULL
    -####
    -####    def __dealloc__(self):
    -####
    -####        if self.thisptr is not NULL:
    -####            del self.thisptr
    -####
    -####    def __repr__(self):
    -####
    -####        if self.thisptr is not NULL:
    -####            return "<SLIDatum: {0}>".format(self.dtype)
    -####        else:
    -####            return "<SLIDatum: unassociated>"
    -####
    -####    cdef _set_datum(self, Datum* dat, unicode dtype):
    -####
    -####        self.dtype = dtype
    -####        self.thisptr = dat
    -####
    -####
    -####cdef class SLILiteral:
    -####
    -####    cdef readonly object name
    -####    cdef object _hash
    -####
    -####    def __init__(self, name):
    -####        self.name = str(name)
    -####        self._hash = None
    -####
    -####    def __hash__(self):
    -####
    -####        if self._hash is None:
    -####            self._hash = hash(self.name)
    -####
    -####        return self._hash
    -####
    -####    def __repr__(self):
    -####        return "<SLILiteral: {0}>".format(self.name)
    -####
    -####    def __str__(self):
    -####        return "{0}".format(self.name)
    -####
    -####    def __richcmp__(self, other, int op):
    -####
    -####        if isinstance(other, SLILiteral):
    -####            obj = other.name
    -####        else:
    -####            obj = other
    -####
    -####        if op == Py_LT:
    -####            return self.name < obj
    -####        elif op == Py_EQ:
    -####            return self.name == obj
    -####        elif op == Py_GT:
    -####            return self.name > obj
    -####        elif op == Py_LE:
    -####            return self.name <= obj
    -####        elif op == Py_NE:
    -####            return self.name != obj
    -####        elif op == Py_GE:
    -####            return self.name >= obj
    -
    -
    -cdef class NESTEngine:
    -
    -    def __dealloc__(self):
    -
    -        kernel().mpi_manager.mpi_finalize( 0 );
    -        kernel().destroy_kernel_manager();
    -
    -    def set_communicator(self, comm):
    -        pass
    -        # extract mpi_comm from mpi4py
    -        # TODO-PYNEST-NG: enable again after moving pertaining functions
    -        #if nest_has_mpi4py():
    -        #    c_set_communicator(comm)
    -        #else:
    -        #    raise NESTError("set_communicator: NEST not compiled with MPI4PY")
    -
    -    def init(self, argv):
    -
    -        cdef int argc = <int> len(argv)
    -        if argc <= 0:
    -            raise NESTErrors.PyNESTError("argv can't be empty")
    -
    -        # Create c-style argv arguments from sys.argv
    -        cdef char** argv_chars = <char**> malloc((argc+1) * sizeof(char*))
    -        if argv_chars is NULL:
    -            raise NESTErrors.PyNESTError("couldn't allocate argv_char")
    -        try:
    -            # argv must be null terminated. openmpi depends on this
    -            argv_chars[argc] = NULL
    -
    -            # Need to keep a reference to encoded bytes issue #377
    -            # argv_bytes = [byte...] which internally holds a reference
    -            # to the c string in argv_char = [c-string... NULL]
    -            # the `byte` is the utf-8 encoding of sys.argv[...]
    -            argv_bytes = [argvi.encode() for argvi in argv]
    -            for i, argvi in enumerate(argv_bytes):
    -                argv_chars[i] = argvi # c-string ref extracted
    -
    -            init_nest(&argc, &argv_chars)
    -
    -            # TODO-PYNEST-NG
    -            # nest::kernel().model_manager.get_modeldict()
    -            # nest::kernel().model_manager.get_synapsedict()
    -            # nest::kernel().connection_manager.get_connruledict()
    -            # nest::kernel().sp_manager.get_growthcurvedict()
    -
    -            # If using MPI, argv might now have changed, so rebuild it
    -            del argv[:]
    -            # Convert back from utf8 char* to utf8 str
    -            argv.extend(str(argvi.decode()) for argvi in argv_chars[:argc])
    -        finally:
    -            free(argv_chars)
    -
    -        return True
    -
    -    # def take_array_index(self, node_collection, array):
    -    #     if not (isinstance(node_collection, SLIDatum) and (<SLIDatum> node_collection).dtype == SLI_TYPE_NODECOLLECTION.decode()):
    -    #         raise TypeError('node_collection must be a NodeCollection, got {}'.format(type(node_collection)))
    -    #     if not isinstance(array, numpy.ndarray):
    -    #         raise TypeError('array must be a 1-dimensional NumPy array of ints or bools, got {}'.format(type(array)))
    -    #     if not array.ndim == 1:
    -    #         raise TypeError('array must be a 1-dimensional NumPy array, got {}-dimensional NumPy array'.format(array.ndim))
    -
    -    #     # Get pointers to the first element in the Numpy array
    -    #     cdef long[:] array_long_mv
    -    #     cdef long* array_long_ptr
    -
    -    #     cdef cbool[:] array_bool_mv
    -    #     cdef cbool* array_bool_ptr
    -
    -    #     cdef Datum* nc_datum = python_object_to_datum(node_collection)
    -
    -    #     try:
    -    #         if array.dtype == numpy.bool:
    -    #             # Boolean C-type arrays are not supported in NumPy, so we use an 8-bit integer array
    -    #             array_bool_mv = numpy.ascontiguousarray(array, dtype=numpy.uint8)
    -    #             array_bool_ptr = &array_bool_mv[0]
    -    #             new_nc_datum = node_collection_array_index(nc_datum, array_bool_ptr, len(array))
    -    #             return sli_datum_to_object(new_nc_datum)
    -    #         elif numpy.issubdtype(array.dtype, numpy.integer):
    -    #             array_long_mv = numpy.ascontiguousarray(array, dtype=numpy.int64)
    -    #             array_long_ptr = &array_long_mv[0]
    -    #             new_nc_datum = node_collection_array_index(nc_datum, array_long_ptr, len(array))
    -    #             return sli_datum_to_object(new_nc_datum)
    -    #         else:
    -    #             raise TypeError('array must be a NumPy array of ints or bools, got {}'.format(array.dtype))
    -    #     except RuntimeError as e:
    -    #         exceptionCls = getattr(NESTErrors, str(e))
    -    #         raise exceptionCls('take_array_index', '') from None
    -
    -    def connect_arrays(self, sources, targets, weights, delays, synapse_model, syn_param_keys, syn_param_values):
    -        """Calls connect_arrays function, bypassing SLI to expose pointers to the NumPy arrays"""
    -        if not HAVE_NUMPY:
    -            raise NESTErrors.PyNESTError("NumPy is not available")
    -
    -        if not (isinstance(sources, numpy.ndarray) and sources.ndim == 1) or not numpy.issubdtype(sources.dtype, numpy.integer):
    -            raise TypeError('sources must be a 1-dimensional NumPy array of integers')
    -        if not (isinstance(targets, numpy.ndarray) and targets.ndim == 1) or not numpy.issubdtype(targets.dtype, numpy.integer):
    -            raise TypeError('targets must be a 1-dimensional NumPy array of integers')
    -        if weights is not None and not (isinstance(weights, numpy.ndarray) and weights.ndim == 1):
    -            raise TypeError('weights must be a 1-dimensional NumPy array')
    -        if delays is not None and  not (isinstance(delays, numpy.ndarray) and delays.ndim == 1):
    -            raise TypeError('delays must be a 1-dimensional NumPy array')
    -        if syn_param_keys is not None and not ((isinstance(syn_param_keys, numpy.ndarray) and syn_param_keys.ndim == 1) and
    -                                              numpy.issubdtype(syn_param_keys.dtype, numpy.string_)):
    -            raise TypeError('syn_param_keys must be a 1-dimensional NumPy array of strings')
    -        if syn_param_values is not None and not ((isinstance(syn_param_values, numpy.ndarray) and syn_param_values.ndim == 2)):
    -            raise TypeError('syn_param_values must be a 2-dimensional NumPy array')
    -
    -        if not len(sources) == len(targets):
    -            raise ValueError('Sources and targets must be arrays of the same length.')
    -        if weights is not None:
    -            if not len(sources) == len(weights):
    -                raise ValueError('weights must be an array of the same length as sources and targets.')
    -        if delays is not None:
    -            if not len(sources) == len(delays):
    -                raise ValueError('delays must be an array of the same length as sources and targets.')
    -        if syn_param_values is not None:
    -            if not len(syn_param_keys) == syn_param_values.shape[0]:
    -                raise ValueError('syn_param_values must be a matrix with one array per key in syn_param_keys.')
    -            if not len(sources) == syn_param_values.shape[1]:
    -                raise ValueError('syn_param_values must be a matrix with arrays of the same length as sources and targets.')
    -
    -        # Get pointers to the first element in each NumPy array
    -        cdef long[::1] sources_mv = numpy.ascontiguousarray(sources, dtype=numpy.int64)
    -        cdef long* sources_ptr = &sources_mv[0]
    -
    -        cdef long[::1] targets_mv = numpy.ascontiguousarray(targets, dtype=numpy.int64)
    -        cdef long* targets_ptr = &targets_mv[0]
    -
    -        cdef double[::1] weights_mv
    -        cdef double* weights_ptr = NULL
    -        if weights is not None:
    -            weights_mv = numpy.ascontiguousarray(weights, dtype=numpy.double)
    -            weights_ptr = &weights_mv[0]
    -
    -        cdef double[::1] delays_mv
    -        cdef double* delays_ptr = NULL
    -        if delays is not None:
    -            delays_mv = numpy.ascontiguousarray(delays, dtype=numpy.double)
    -            delays_ptr = &delays_mv[0]
    -
    -        # Storing parameter keys in a vector of strings
    -        cdef vector[string] param_keys_ptr
    -        if syn_param_keys is not None:
    -            for i, key in enumerate(syn_param_keys):
    -                param_keys_ptr.push_back(key)
    -
    -        cdef double[:, ::1] param_values_mv
    -        cdef double* param_values_ptr = NULL
    -        if syn_param_values is not None:
    -            param_values_mv = numpy.ascontiguousarray(syn_param_values, dtype=numpy.double)
    -            param_values_ptr = &param_values_mv[0][0]
    -
    -        cdef string syn_model_string = synapse_model.encode('UTF-8')
    -
    -        try:
    -            connect_arrays( sources_ptr, targets_ptr, weights_ptr, delays_ptr, param_keys_ptr, param_values_ptr, len(sources), syn_model_string )
    -        except RuntimeError as e:
    -            exceptionCls = getattr(NESTErrors, str(e))
    -            raise exceptionCls('connect_arrays', '') from None
    -
    -####cdef inline Datum* python_object_to_datum(obj) except NULL:
    -####
    -####    cdef Datum* ret = NULL
    -####
    -####    cdef ArrayDatum* ad = NULL
    -####    cdef DictionaryDatum* dd = NULL
    -####
    -####    cdef string obj_str
    -####
    -####    if isinstance(obj, bool):
    -####        ret = <Datum*> new BoolDatum(obj)
    -####    elif isinstance(obj, (int, long)):
    -####        ret = <Datum*> new IntegerDatum(obj)
    -####    elif isinstance(obj, float):
    -####        ret = <Datum*> new DoubleDatum(obj)
    -####    elif isinstance(obj, bytes):
    -####        obj_str = obj
    -####        ret = <Datum*> new StringDatum(obj_str)
    -####    elif isinstance(obj, unicode):
    -####        obj_str = obj.encode()
    -####        ret = <Datum*> new StringDatum(obj_str)
    -####    elif isinstance(obj, SLILiteral):
    -####        obj_str = obj.name.encode()
    -####        ret = <Datum*> new LiteralDatum(obj_str)
    -####    elif isinstance(obj, (tuple, list, xrange)):
    -####        ad = new ArrayDatum()
    -####        ad.reserve(len(obj))
    -####        for x in obj:
    -####            ad.push_back(python_object_to_datum(x))
    -####        ret = <Datum*> ad
    -####    elif isinstance(obj, dict):
    -####        dd = new DictionaryDatum(new Dictionary())
    -####        for k, v in obj.items():
    -####            obj_str = str(k).encode()
    -####            deref_dict(dd).insert(obj_str, python_object_to_datum(v))
    -####        ret = <Datum*> dd
    -####    elif HAVE_NUMPY and (
    -####        isinstance(obj, numpy.integer) or                   # integral scalars
    -####        isinstance(obj, numpy.floating) or                  # floating point scalars
    -####        (isinstance(obj, numpy.ndarray) and obj.ndim == 0)  # zero-rank arrays
    -####    ):
    -####        ret = python_object_to_datum(obj.item())
    -####    elif isinstance(obj, SLIDatum):
    -####        if (<SLIDatum> obj).dtype == SLI_TYPE_MASK.decode():
    -####            ret = <Datum*> new MaskDatum(deref(<MaskDatum*> (<SLIDatum> obj).thisptr))
    -####        elif (<SLIDatum> obj).dtype == SLI_TYPE_PARAMETER.decode():
    -####            ret = <Datum*> new ParameterDatum(deref(<ParameterDatum*> (<SLIDatum> obj).thisptr))
    -####        elif (<SLIDatum> obj).dtype == SLI_TYPE_NODECOLLECTION.decode():
    -####            ret = <Datum*> new NodeCollectionDatum(deref(<NodeCollectionDatum*> (<SLIDatum> obj).thisptr))
    -####        elif (<SLIDatum> obj).dtype == SLI_TYPE_NODECOLLECTIONITERATOR.decode():
    -####            ret = <Datum*> new NodeCollectionIteratorDatum(deref(<NodeCollectionIteratorDatum*> (<SLIDatum> obj).thisptr))
    -####        elif (<SLIDatum> obj).dtype == SLI_TYPE_CONNECTION.decode():
    -####            ret = <Datum*> new ConnectionDatum(deref(<ConnectionDatum*> (<SLIDatum> obj).thisptr))
    -####        else:
    -####            raise NESTErrors.PyNESTError("unknown SLI datum type: {0}".format((<SLIDatum> obj).dtype))
    -####    elif isConnectionGenerator(<PyObject*> obj):
    -####        ret = unpackConnectionGeneratorDatum(<PyObject*> obj)
    -####        if ret is NULL:
    -####            raise NESTErrors.PyNESTError("failed to unpack passed connection generator object")
    -####    elif isinstance(obj, nest.CollocatedSynapses):
    -####        ret = python_object_to_datum(obj.syn_specs)
    -####    else:
    -####
    -####        try:
    -####            ret = python_buffer_to_datum[buffer_int_1d_t, long](obj)
    -####        except (ValueError, TypeError):
    -####            pass
    -####
    -####        try:
    -####            ret = python_buffer_to_datum[buffer_long_1d_t, long](obj)
    -####        except (ValueError, TypeError):
    -####            pass
    -####
    -####        try:
    -####            ret = python_buffer_to_datum[buffer_float_1d_t, double](obj)
    -####        except (ValueError, TypeError):
    -####            pass
    -####
    -####        try:
    -####            ret = python_buffer_to_datum[buffer_double_1d_t, double](obj)
    -####        except (ValueError, TypeError):
    -####            pass
    -####
    -####        # NumPy < 1.5.0 doesn't support PEP-3118 buffer interface
    -####        #
    -####        if ret is NULL and HAVE_NUMPY and isinstance(obj, numpy.ndarray) and obj.ndim == 1:
    -####            if numpy.issubdtype(obj.dtype, numpy.integer):
    -####                ret = python_buffer_to_datum[object, long](obj)
    -####            elif numpy.issubdtype(obj.dtype, numpy.floating):
    -####                ret = python_buffer_to_datum[object, double](obj)
    -####            else:
    -####                raise NESTErrors.PyNESTError("only vectors of integers or floats are supported")
    -####
    -####        if ret is NULL:
    -####            try:
    -####                if isinstance( obj._datum, SLIDatum ) or isinstance( obj._datum[0], SLIDatum):
    -####                    ret = python_object_to_datum( obj._datum )
    -####            except:
    -####                pass
    -####
    -####        if ret is not NULL:
    -####            return ret
    -####        else:
    -####            raise NESTErrors.PyNESTError("unknown Python type: {0}".format(type(obj)))
    -####
    -####    if ret is NULL:
    -####        raise NESTErrors.PyNESTError("conversion resulted in a null pointer")
    -####
    -####    return ret
    -####
    -####@cython.boundscheck(False)
    -####cdef inline Datum* python_buffer_to_datum(numeric_buffer_t buff, vector_value_t _ = 0) except NULL:
    -####
    -####    cdef size_t i, n
    -####
    -####    cdef Datum* dat = NULL
    -####    cdef vector[vector_value_t]* vector_ptr = new vector[vector_value_t]()
    -####
    -####    if vector_value_t is long:
    -####        dat = <Datum*> new IntVectorDatum(vector_ptr)
    -####    elif vector_value_t is double:
    -####        dat = <Datum*> new DoubleVectorDatum(vector_ptr)
    -####    else:
    -####        raise NESTErrors.PyNESTError("unsupported specialization: {0}".format(vector_value_t))
    -####
    -####    n = len(buff)
    -####
    -####    vector_ptr.reserve(n)
    -####
    -####    for i in range(n):
    -####        vector_ptr.push_back(<vector_value_t> buff[i])
    -####
    -####    return <Datum*> dat
    -####
    -####
    -####cdef inline object sli_datum_to_object(Datum* dat):
    -####
    -####    if dat is NULL:
    -####        raise NESTErrors.PyNESTError("datum is a null pointer")
    -####
    -####    cdef string obj_str
    -####    cdef object ret = None
    -####    cdef ignore_none = False
    -####
    -####    cdef string datum_type = dat.gettypename().toString()
    -####
    -####    if datum_type == SLI_TYPE_BOOL:
    -####        ret = (<BoolDatum*> dat).get()
    -####    elif datum_type == SLI_TYPE_INTEGER:
    -####        ret = (<IntegerDatum*> dat).get()
    -####    elif datum_type == SLI_TYPE_DOUBLE:
    -####        ret = (<DoubleDatum*> dat).get()
    -####    elif datum_type == SLI_TYPE_STRING:
    -####        ret = (<string> deref_str(<StringDatum*> dat)).decode('utf-8')
    -####    elif datum_type == SLI_TYPE_LITERAL:
    -####        obj_str = (<LiteralDatum*> dat).toString()
    -####        ret = obj_str.decode()
    -####        if ret == 'None':
    -####            ret = None
    -####            ignore_none = True
    -####    elif datum_type == SLI_TYPE_ARRAY:
    -####        ret = sli_array_to_object(<ArrayDatum*> dat)
    -####    elif datum_type == SLI_TYPE_DICTIONARY:
    -####        ret = sli_dict_to_object(<DictionaryDatum*> dat)
    -####    elif datum_type == SLI_TYPE_CONNECTION:
    -####        datum = SLIDatum()
    -####        (<SLIDatum> datum)._set_datum(<Datum*> new ConnectionDatum(deref(<ConnectionDatum*> dat)), SLI_TYPE_CONNECTION.decode())
    -####        ret = nest.SynapseCollection(datum)
    -####    elif datum_type == SLI_TYPE_VECTOR_INT:
    -####        ret = sli_vector_to_object[sli_vector_int_ptr_t, long](<IntVectorDatum*> dat)
    -####    elif datum_type == SLI_TYPE_VECTOR_DOUBLE:
    -####        ret = sli_vector_to_object[sli_vector_double_ptr_t, double](<DoubleVectorDatum*> dat)
    -####    elif datum_type == SLI_TYPE_MASK:
    -####        datum = SLIDatum()
    -####        (<SLIDatum> datum)._set_datum(<Datum*> new MaskDatum(deref(<MaskDatum*> dat)), SLI_TYPE_MASK.decode())
    -####        ret = nest.Mask(datum)
    -####    elif datum_type == SLI_TYPE_PARAMETER:
    -####        datum = SLIDatum()
    -####        (<SLIDatum> datum)._set_datum(<Datum*> new ParameterDatum(deref(<ParameterDatum*> dat)), SLI_TYPE_PARAMETER.decode())
    -####        ret = nest.Parameter(datum)
    -####    elif datum_type == SLI_TYPE_NODECOLLECTION:
    -####        datum = SLIDatum()
    -####        (<SLIDatum> datum)._set_datum(<Datum*> new NodeCollectionDatum(deref(<NodeCollectionDatum*> dat)), SLI_TYPE_NODECOLLECTION.decode())
    -####        ret = nest.NodeCollection(datum)
    -####    elif datum_type == SLI_TYPE_NODECOLLECTIONITERATOR:
    -####        ret = SLIDatum()
    -####        (<SLIDatum> ret)._set_datum(<Datum*> new NodeCollectionIteratorDatum(deref(<NodeCollectionIteratorDatum*> dat)), SLI_TYPE_NODECOLLECTIONITERATOR.decode())
    -####    else:
    -####        raise NESTErrors.PyNESTError("unknown SLI type: {0}".format(datum_type.decode()))
    -####
    -####    if ret is None and not ignore_none:
    -####        raise NESTErrors.PyNESTError("conversion resulted in a None object")
    -####
    -####    return ret
    -####
    -####cdef inline object sli_array_to_object(ArrayDatum* dat):
    -####
    -####    # the size of dat has to be explicitly cast to int to avoid
    -####    # compiler warnings (#1318) during cythonization
    -####    cdef tmp = [None] * int(dat.size())
    -####
    -####    # i and n have to be cast to size_t (unsigned long int) to avoid
    -####    # compiler warnings (#1318) in the for loop below
    -####    cdef size_t i, n
    -####    cdef Token* tok = dat.begin()
    -####
    -####    n = len(tmp)
    -####    if not n:
    -####        return ()
    -####
    -####    if tok.datum().gettypename().toString() == SLI_TYPE_CONNECTION:
    -####        for i in range(n):
    -####            datum = SLIDatum()
    -####            (<SLIDatum> datum)._set_datum(<Datum*> new ConnectionDatum(deref(<ConnectionDatum*> tok.datum())), SLI_TYPE_CONNECTION.decode())
    -####            tmp[i] = datum
    -####            # Increment
    -####            inc(tok)
    -####        return nest.SynapseCollection(tmp)
    -####    else:
    -####        for i in range(n):
    -####            tmp[i] = sli_datum_to_object(tok.datum())
    -####            inc(tok)
    -####        return tuple(tmp)
    -####
    -####cdef inline object sli_dict_to_object(DictionaryDatum* dat):
    -####
    -####    cdef tmp = {}
    -####
    -####    cdef string key_str
    -####    cdef const Token* tok = NULL
    -####
    -####    cdef TokenMap.const_iterator dt = deref_dict(dat).begin()
    -####
    -####    while dt != deref_dict(dat).end():
    -####        key_str = deref_tmap(dt).first.toString()
    -####        tok = &deref_tmap(dt).second
    -####        tmp[key_str.decode()] = sli_datum_to_object(tok.datum())
    -####        inc(dt)
    -####
    -####    return tmp
    -####
    -####cdef inline object sli_vector_to_object(sli_vector_ptr_t dat, vector_value_t _ = 0):
    -####
    -####    cdef vector_value_t* array_data = NULL
    -####    cdef vector[vector_value_t]* vector_ptr = NULL
    -####
    -####    if sli_vector_ptr_t is sli_vector_int_ptr_t and vector_value_t is long:
    -####        vector_ptr = deref_ivector(dat)
    -####        arr = array.clone(ARRAY_LONG, vector_ptr.size(), False)
    -####        array_data = arr.data.as_longs
    -####        if HAVE_NUMPY:
    -####            ret_dtype = numpy.int_
    -####    elif sli_vector_ptr_t is sli_vector_double_ptr_t and vector_value_t is double:
    -####        vector_ptr = deref_dvector(dat)
    -####        arr = array.clone(ARRAY_DOUBLE, vector_ptr.size(), False)
    -####        array_data = arr.data.as_doubles
    -####        if HAVE_NUMPY:
    -####            ret_dtype = numpy.float_
    -####    else:
    -####        raise NESTErrors.PyNESTError("unsupported specialization")
    -####
    -####    # skip when vector_ptr points to an empty vector
    -####    if vector_ptr.size() > 0:
    -####        memcpy(array_data, &vector_ptr.front(), vector_ptr.size() * sizeof(vector_value_t))
    -####
    -####    if HAVE_NUMPY:
    -####        if vector_ptr.size() > 0:
    -####            return numpy.frombuffer(arr, dtype=ret_dtype)
    -####        else:
    -####            # Compatibility with NumPy < 1.7.0
    -####            return numpy.array([], dtype=ret_dtype)
    -####    else:
    -####        return arr
    diff --git a/pynest/pynestkernel_aux.h b/pynest/pynestkernel_aux.h
    index 4ba7dcfbab..dc69ea59a5 100644
    --- a/pynest/pynestkernel_aux.h
    +++ b/pynest/pynestkernel_aux.h
    @@ -34,9 +34,6 @@
     // Includes from conngen:
     #include "conngenmodule.h"
     
    -// Includes from sli:
    -#include "datum.h"
    -
     #define CYTHON_isConnectionGenerator( x ) PNS::isConnectionGenerator( x )
     
     Datum*
    diff --git a/pynest/pynestkernel_aux.h~ b/pynest/pynestkernel_aux.h~
    deleted file mode 100644
    index e8f8c1eb76..0000000000
    --- a/pynest/pynestkernel_aux.h~
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    - *  pynestkernel_aux.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef PYNESTKERNEL_AUX_H
    -#define PYNESTKERNEL_AUX_H
    -
    -// Generated includes:
    -#include "config.h"
    -
    -#if defined( HAVE_LIBNEUROSIM )
    -
    -// External includes:
    -#include <neurosim/pyneurosim.h>
    -
    -// Includes from conngen:
    -#include "conngenmodule.h"
    -
    -// Includes from sli:
    -#include "datum.h"
    -
    -#define CYTHON_isConnectionGenerator( x ) PNS::isConnectionGenerator( x )
    -
    -Datum*
    -CYTHON_unpackConnectionGeneratorDatum( PyObject* obj )
    -{
    -  Datum* ret = NULL;
    -  ConnectionGenerator* cg = NULL;
    -
    -  cg = PNS::unpackConnectionGenerator( obj );
    -  if ( cg != NULL )
    -  {
    -    ret = static_cast< Datum* >( new nest::ConnectionGeneratorDatum( cg ) );
    -  }
    -
    -  return ret;
    -}
    -//Datum* CYTHON_unpackConnectionGeneratorDatum( PyObject* );
    -
    -#else // #if defined( HAVE_LIBNEUROSIM )
    -
    -#define CYTHON_isConnectionGenerator( x ) 0
    -#define CYTHON_unpackConnectionGeneratorDatum( x ) NULL
    -
    -#endif // #if defined( HAVE_LIBNEUROSIM )
    -
    -#define CYTHON_DEREF( x ) ( *x )
    -#define CYTHON_ADDR( x ) ( &x )
    -
    -
    -
    -#endif // #ifndef PYNESTKERNEL_AUX_H
    diff --git a/sli/CMakeLists.txt b/sli/CMakeLists.txt
    deleted file mode 100644
    index 32e5ee36b1..0000000000
    --- a/sli/CMakeLists.txt
    +++ /dev/null
    @@ -1,147 +0,0 @@
    -# sli/CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -set( sli_sources
    -    aggregatedatum.h
    -    arraydatum.cc arraydatum.h
    -    booldatum.cc booldatum.h
    -    callbackdatum.h
    -    charcode.cc charcode.h
    -    datum.cc datum.h
    -    dict.cc dict.h
    -    dictdatum.h
    -    dictstack.cc dictstack.h
    -    dictutils.cc dictutils.h
    -    doubledatum.cc doubledatum.h
    -    fdstream.cc fdstream.h
    -    filesystem.cc filesystem.h
    -    functional.h
    -    functiondatum.cc functiondatum.h
    -    genericdatum.h
    -    get_mem.c
    -    integerdatum.cc integerdatum.h
    -    interpret.cc interpret.h
    -    iostreamdatum.h
    -    literaldatum.cc
    -    lockptrdatum.h
    -    sharedptrdatum.h
    -    name.cc name.h
    -    slinames.h slinames.cpp
    -    namedatum.cc namedatum.h
    -    numericdatum.h
    -    oosupport.cc oosupport.h
    -    parser.cc parser.h
    -    parserdatum.h
    -    processes.cc processes.h
    -    scanner.cc scanner.h
    -    sli_io.cc sli_io.h
    -    sliactions.cc sliactions.h
    -    sliarray.cc sliarray.h
    -    slibuiltins.cc slibuiltins.h
    -    slicontrol.cc slicontrol.h
    -    slidata.cc slidata.h
    -    slidict.cc slidict.h
    -    sliexceptions.cc sliexceptions.h
    -    slifunction.h
    -    sligraphics.cc sligraphics.h
    -    slimath.cc slimath.h
    -    slimodule.cc slimodule.h
    -    sliregexp.cc sliregexp.h
    -    slistack.cc slistack.h
    -    slistartup.cc slistartup.h
    -    slitype.cc slitype.h
    -    slitypecheck.cc slitypecheck.h
    -    specialfunctionsmodule.cc specialfunctionsmodule.h
    -    stringdatum.cc stringdatum.h
    -    symboldatum.cc symboldatum.h
    -    tarrayobj.cc tarrayobj.h
    -    token.cc token.h
    -    tokenarray.cc tokenarray.h
    -    tokenstack.cc tokenstack.h
    -    tokenutils.cc tokenutils.h
    -    triedatum.cc triedatum.h
    -    typearray.h
    -    typechk.cc typechk.h
    -    utils.cc utils.h
    -    )
    -
    -
    -# Prevent problems with Conda path substitution (see #2348) 
    -set_source_files_properties( slistartup.cc PROPERTIES COMPILE_OPTIONS "-O0" )
    -
    -add_library( sli_lib ${sli_sources} )
    -
    -set_target_properties( sli_lib
    -    PROPERTIES
    -    VERSION ${NEST_VERSION}
    -    SOVERSION 3
    -    )
    -
    -target_link_libraries( sli_lib nestutil OpenMP::OpenMP_CXX )
    -
    -# Make a separate target for linking against readline, so that
    -# pynestkernel does not need to link against readline and make
    -# loading different readlines a problem for Python. See this
    -# pull request for more information:
    -# https://github.com/nest/nest-simulator/pull/323
    -add_library( sli_readline gnureadline.cc gnureadline.h )
    -
    -set_target_properties( sli_readline
    -    PROPERTIES
    -    VERSION ${NEST_VERSION}
    -    SOVERSION 3
    -    )
    -
    -target_link_libraries( sli_readline sli_lib nestutil ${READLINE_LIBRARIES} OpenMP::OpenMP_CXX )
    -
    -# add the executable
    -# add_executable( sli puresli.cc )
    -# target_link_libraries( sli sli_lib sli_readline ${GSL_LIBRARIES} OpenMP::OpenMP_CXX )
    -
    -# target_include_directories( sli PRIVATE
    -#     ${PROJECT_SOURCE_DIR}/thirdparty
    -#     ${PROJECT_SOURCE_DIR}/libnestutil
    -#     ${PROJECT_BINARY_DIR}/libnestutil
    -#     )
    -
    -target_include_directories( sli_lib PRIVATE
    -    ${PROJECT_SOURCE_DIR}/thirdparty
    -    ${PROJECT_SOURCE_DIR}/libnestutil
    -    ${PROJECT_BINARY_DIR}/libnestutil
    -    )
    -set_target_properties( sli_lib
    -    PROPERTIES
    -    OUTPUT_NAME sli
    -    )
    -
    -target_include_directories( sli_readline PRIVATE
    -    ${PROJECT_SOURCE_DIR}/thirdparty
    -    ${PROJECT_SOURCE_DIR}/libnestutil
    -    ${PROJECT_BINARY_DIR}/libnestutil
    -    )
    -
    -install( TARGETS sli_readline sli_lib # sli
    -    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
    -    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
    -    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    -    )
    -
    -FILTER_HEADERS("${sli_sources}" install_headers )
    -install( FILES ${install_headers} gnureadline.h
    -    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest)
    diff --git a/sli/README.md b/sli/README.md
    deleted file mode 100644
    index 406e1a81a6..0000000000
    --- a/sli/README.md
    +++ /dev/null
    @@ -1,3 +0,0 @@
    -# `sli` folder
    -
    -Implementation files of the integrated simulation language interpreter.
    diff --git a/sli/aggregatedatum.h b/sli/aggregatedatum.h
    deleted file mode 100644
    index d504c929a3..0000000000
    --- a/sli/aggregatedatum.h
    +++ /dev/null
    @@ -1,180 +0,0 @@
    -/*
    - *  aggregatedatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef AGGREGATEDATUM_H
    -#define AGGREGATEDATUM_H
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from libnestutil:
    -#include "allocator.h"
    -
    -// Includes from sli:
    -#include "datum.h"
    -
    -/*
    -    Datum template for aggregate data types.
    -*/
    -
    -/************************************************
    - The AggregateDatum template should be used for all
    - Datum objects which contain class objects (i.e. no
    - trivial types like int, long, char, etc.)
    -
    - AggregateDatum inherits some virtual functions from
    - its base class Datum which must be supplied.
    - Usually destruction should be trivial, though a
    - virtual destructor must be supplied.
    -
    - In order to avoid ambiguities with potential
    - base classes, no virtual operators should be used
    - in the Datum class, rather "unique" virtual
    - function names should be used.
    -
    - Particularly, the operator<< should not be defined
    - for base class Datum.
    -*************************************************/
    -
    -template < class C, SLIType* slt >
    -class AggregateDatum : public TypedDatum< slt >, public C
    -{
    -protected:
    -  static nest::pool memory;
    -
    -private:
    -  virtual Datum*
    -  clone() const
    -  {
    -    return new AggregateDatum< C, slt >( *this );
    -  }
    -
    -public:
    -  AggregateDatum()
    -  {
    -    TypedDatum< slt >::unset_executable();
    -  }
    -  AggregateDatum( const AggregateDatum< C, slt >& d )
    -    : TypedDatum< slt >( d )
    -    , C( d )
    -  {
    -  }
    -  AggregateDatum( const C& c )
    -    : TypedDatum< slt >()
    -    , C( c )
    -  {
    -  }
    -
    -  virtual ~AggregateDatum()
    -  {
    -  }
    -
    -  bool
    -  equals( const Datum* dat ) const
    -  {
    -    // The following construct works around the problem, that
    -    // a direct dynamic_cast<const GenericDatum<D> * > does not seem
    -    // to work.
    -
    -    const AggregateDatum< C, slt >* ddc = dynamic_cast< AggregateDatum< C, slt >* >( const_cast< Datum* >( dat ) );
    -    if ( not ddc )
    -    {
    -      return false;
    -    }
    -
    -    return static_cast< C >( *ddc ) == static_cast< C >( *this );
    -  }
    -
    -  static void*
    -  operator new( size_t size )
    -  {
    -    if ( size != memory.size_of() )
    -    {
    -      return ::operator new( size );
    -    }
    -    return memory.alloc();
    -  }
    -
    -  static void
    -  operator delete( void* p, size_t size )
    -  {
    -    if ( not p )
    -    {
    -      return;
    -    }
    -    if ( size != memory.size_of() )
    -    {
    -      ::operator delete( p );
    -      return;
    -    }
    -    memory.free( p );
    -  }
    -
    -  virtual void print( std::ostream& out ) const;
    -  virtual void pprint( std::ostream& out ) const;
    -  virtual void list( std::ostream& out, std::string prefix, int length ) const;
    -
    -  virtual void
    -  input_form( std::ostream& out ) const
    -  {
    -    print( out );
    -  }
    -
    -  virtual void
    -  info( std::ostream& out ) const
    -  {
    -    print( out );
    -  }
    -};
    -
    -template < class C, SLIType* slt >
    -void
    -AggregateDatum< C, slt >::print( std::ostream& out ) const
    -{
    -  out << *dynamic_cast< C* >( const_cast< AggregateDatum< C, slt >* >( this ) );
    -}
    -
    -template < class C, SLIType* slt >
    -void
    -AggregateDatum< C, slt >::pprint( std::ostream& out ) const
    -{
    -  print( out );
    -}
    -
    -template < class C, SLIType* slt >
    -void
    -AggregateDatum< C, slt >::list( std::ostream& out, std::string prefix, int length ) const
    -{
    -  if ( length == 0 )
    -  {
    -    prefix = "-->" + prefix;
    -  }
    -  else
    -  {
    -    prefix = "   " + prefix;
    -  }
    -
    -  out << prefix;
    -  print( out );
    -}
    -
    -#endif
    diff --git a/sli/arraydatum.cc b/sli/arraydatum.cc
    deleted file mode 100644
    index 71d09cbf4d..0000000000
    --- a/sli/arraydatum.cc
    +++ /dev/null
    @@ -1,228 +0,0 @@
    -/*
    - *  arraydatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "arraydatum.h"
    -
    -// C++ includes:
    -#include <iterator>
    -
    -
    -// initialization of static members requires template<>
    -// see Stroustrup C.13.1 --- HEP 2001-08-09
    -template <>
    -nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::memory( sizeof( ArrayDatum ), 10240, 1 );
    -template <>
    -nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::memory( sizeof( ProcedureDatum ), 10240, 1 );
    -template <>
    -nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::memory(
    -  sizeof( AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype > ),
    -  10240,
    -  1 );
    -
    -
    -template <>
    -void
    -AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::pprint( std::ostream& out ) const
    -{
    -  out << '[';
    -  Token* i = this->begin();
    -  while ( i != this->end() )
    -  {
    -    ( *i )->pprint( out );
    -    ++i;
    -    if ( i != this->end() )
    -    {
    -      out << ' ';
    -    }
    -  }
    -  out << ']';
    -}
    -
    -template <>
    -void
    -AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::print( std::ostream& out ) const
    -{
    -  out << '<' << this->gettypename() << '>';
    -}
    -
    -template <>
    -void
    -AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::pprint( std::ostream& out ) const
    -{
    -  out << '{';
    -  Token* i = this->begin();
    -  while ( i != this->end() )
    -  {
    -    ( *i )->pprint( out );
    -    ++i;
    -    if ( i != this->end() )
    -    {
    -      out << ' ';
    -    }
    -  }
    -  out << '}';
    -}
    -
    -template <>
    -void
    -AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::list( std::ostream& out,
    -  std::string prefix,
    -  int line ) const
    -{
    -  int lc = 0;
    -
    -
    -  prefix = "   " + prefix;
    -
    -  out << prefix << '{' << std::endl;
    -  Token* i = this->begin();
    -
    -  while ( i != this->end() )
    -  {
    -    if ( lc != line )
    -    {
    -      ( *i )->list( out, prefix, -1 );
    -    }
    -    else
    -    {
    -      ( *i )->list( out, prefix, 0 );
    -    }
    -    out << std::endl;
    -    ++lc;
    -    ++i;
    -  }
    -  out << prefix << '}';
    -}
    -
    -template <>
    -void
    -AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::print( std::ostream& out ) const
    -{
    -  out << '<' << this->gettypename() << '>';
    -}
    -
    -template <>
    -void
    -AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::pprint( std::ostream& out ) const
    -{
    -  out << "/{";
    -  Token* i = this->begin();
    -  while ( i != this->end() )
    -  {
    -    ( *i )->pprint( out );
    -    ++i;
    -    if ( i != this->end() )
    -    {
    -      out << ' ';
    -    }
    -  }
    -  out << '}';
    -}
    -
    -template <>
    -void
    -AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::list( std::ostream& out,
    -  std::string prefix,
    -  int line ) const
    -{
    -
    -  Token* i = this->begin();
    -
    -  if ( line == 0 )
    -  {
    -    out << "-->" << prefix << '{' << std::endl;
    -  }
    -  else
    -  {
    -    out << "   " << prefix << '{' << std::endl;
    -  }
    -  prefix = "   " + prefix;
    -
    -  while ( i != this->end() )
    -  {
    -    ( *i )->list( out, prefix, -1 );
    -    out << std::endl;
    -    ++i;
    -  }
    -  out << prefix << '}';
    -}
    -
    -template <>
    -void
    -AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::print( std::ostream& out ) const
    -{
    -  out << '<' << this->gettypename() << '>';
    -}
    -
    -template <>
    -void
    -lockPTRDatum< std::vector< long >, &SLIInterpreter::IntVectortype >::pprint( std::ostream& out ) const
    -{
    -  std::vector< long >* v = this->get();
    -  out << "<# ";
    -  if ( v->size() < 30 )
    -  {
    -    for ( size_t i = 0; i < v->size(); ++i )
    -    {
    -      out << ( *v )[ i ] << " ";
    -    }
    -  }
    -  else
    -  {
    -    for ( size_t i = 0; i < 30; ++i )
    -    {
    -      out << ( *v )[ i ] << " ";
    -    }
    -    out << "... ";
    -  }
    -
    -  out << "#>";
    -  this->unlock();
    -}
    -
    -template <>
    -void
    -lockPTRDatum< std::vector< double >, &SLIInterpreter::DoubleVectortype >::pprint( std::ostream& out ) const
    -{
    -  std::vector< double >* v = this->get();
    -  out << "<. ";
    -
    -  out.setf( std::ios::scientific );
    -  if ( v->size() < 30 )
    -  {
    -    for ( size_t i = 0; i < v->size(); ++i )
    -    {
    -      out << ( *v )[ i ] << " ";
    -    }
    -  }
    -  else
    -  {
    -    for ( size_t i = 0; i < 30; ++i )
    -    {
    -      out << ( *v )[ i ] << " ";
    -    }
    -    out << "... ";
    -  }
    -  out << ".>";
    -  out.unsetf( std::ios::scientific );
    -  this->unlock();
    -}
    diff --git a/sli/arraydatum.h b/sli/arraydatum.h
    deleted file mode 100644
    index 8748a3b340..0000000000
    --- a/sli/arraydatum.h
    +++ /dev/null
    @@ -1,105 +0,0 @@
    -/*
    - *  arraydatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef ARRAYDATUM_H
    -#define ARRAYDATUM_H
    -
    -// C++ includes:
    -#include <vector>
    -
    -// Includes from sli:
    -#include "aggregatedatum.h"
    -#include "interpret.h"
    -#include "lockptrdatum.h"
    -#include "tokenarray.h"
    -
    -/* These are declarations to specialize the static memory pool BEFORE
    -   we instantiate the AggregateDatum. Note, that this is only a declaration,
    -   because we do not provide an initializer (see ISO14882 Sec.  14.7.3.15.)
    -   The definition is given in the *.CC file with the appropriate
    -   initializer.
    -
    -   Note that SUN's Forte 6.2 does not handle this correctly, so we have
    -   to use a compiler-switch.
    -*/
    -
    -
    -#ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS
    -template <>
    -nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::memory;
    -template <>
    -nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::memory;
    -template <>
    -nest::pool AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::memory;
    -#endif
    -
    -template <>
    -void AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::print( std::ostream& ) const;
    -template <>
    -void AggregateDatum< TokenArray, &SLIInterpreter::Arraytype >::pprint( std::ostream& ) const;
    -template <>
    -void AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::print( std::ostream& ) const;
    -template <>
    -void AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::list( std::ostream&, std::string, int ) const;
    -template <>
    -void AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype >::pprint( std::ostream& ) const;
    -template <>
    -void AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::print( std::ostream& ) const;
    -template <>
    -void AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::pprint( std::ostream& ) const;
    -template <>
    -void AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype >::list( std::ostream&, std::string, int ) const;
    -template <>
    -void lockPTRDatum< std::vector< long >, &SLIInterpreter::IntVectortype >::pprint( std::ostream& out ) const;
    -template <>
    -void lockPTRDatum< std::vector< double >, &SLIInterpreter::DoubleVectortype >::pprint( std::ostream& out ) const;
    -
    -/**
    - * @remark This type was introduced to pass numeric arrays between
    - *         Python and nodes. It is *not* meant for general use. The
    - *         current implementation is minimal and this was done on
    - *         purpose. While it is useful to have numeric arrays at the
    - *         level of SLI, this would require the implementation of many
    - *         functions, to make them useful. For example there are no
    - *         functions to access the data in such arrays. (MOG 2009-01-23, see
    - *         #253)
    - */
    -typedef lockPTRDatum< std::vector< long >, &SLIInterpreter::IntVectortype > IntVectorDatum;
    -
    -/**
    - * @remark This type was introduced to pass numeric arrays between
    - *         Python and nodes. It is *not* meant for general use. The
    - *         current implementation is minimal and this was done on
    - *         purpose. While it is useful to have numeric arrays at the
    - *         level of SLI, this would require the implementation of many
    - *         functions, to make them useful. For example there are no
    - *         functions to access the data in such arrays. (MOG 2009-01-23, see
    - *         #253)
    - */
    -typedef lockPTRDatum< std::vector< double >, &SLIInterpreter::DoubleVectortype > DoubleVectorDatum;
    -
    -typedef AggregateDatum< TokenArray, &SLIInterpreter::Arraytype > ArrayDatum;
    -typedef AggregateDatum< TokenArray, &SLIInterpreter::Proceduretype > ProcedureDatum;
    -typedef AggregateDatum< TokenArray, &SLIInterpreter::Litproceduretype > LitprocedureDatum;
    -
    -
    -#endif
    diff --git a/sli/booldatum.cc b/sli/booldatum.cc
    deleted file mode 100644
    index abdfa617c4..0000000000
    --- a/sli/booldatum.cc
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -/*
    - *  booldatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "booldatum.h"
    -
    -// Includes from sli:
    -#include "name.h"
    -
    -nest::pool BoolDatum::memory( sizeof( BoolDatum ), 1024, 1 );
    -
    -const char* BoolDatum::true_string = "true";
    -const char* BoolDatum::false_string = "false";
    -
    -BoolDatum::BoolDatum( const Name& val )
    -{
    -  d = ( val == Name( true_string ) );
    -}
    -
    -BoolDatum::operator Name() const
    -{
    -  return ( d ? Name( true_string ) : Name( false_string ) );
    -}
    -
    -BoolDatum::operator std::string() const
    -{
    -  return ( d ? std::string( true_string ) : std::string( false_string ) );
    -}
    -
    -void
    -BoolDatum::input_form( std::ostream& out ) const
    -{
    -  print( out );
    -}
    -
    -void
    -BoolDatum::pprint( std::ostream& out ) const
    -{
    -  print( out );
    -}
    -
    -void
    -BoolDatum::print( std::ostream& out ) const
    -{
    -  out << ( d ? true_string : false_string );
    -}
    -
    -void*
    -BoolDatum::operator new( size_t size )
    -{
    -  if ( size != memory.size_of() )
    -  {
    -    return ::operator new( size );
    -  }
    -  return memory.alloc();
    -}
    -
    -void
    -BoolDatum::operator delete( void* p, size_t size )
    -{
    -  if ( not p )
    -  {
    -    return;
    -  }
    -  if ( size != memory.size_of() )
    -  {
    -    ::operator delete( p );
    -    return;
    -  }
    -  memory.free( p );
    -}
    diff --git a/sli/booldatum.h b/sli/booldatum.h
    deleted file mode 100644
    index e0175c2790..0000000000
    --- a/sli/booldatum.h
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/*
    - *  booldatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef BOOLDATUM_H
    -#define BOOLDATUM_H
    -
    -// C++ includes:
    -#include <string>
    -
    -// Includes from libnestutil:
    -#include "allocator.h"
    -
    -// Includes from sli:
    -#include "genericdatum.h"
    -#include "interpret.h"
    -
    -
    -class Name;
    -class Token;
    -
    -class BoolDatum : public GenericDatum< bool, &SLIInterpreter::Booltype >
    -{
    -protected:
    -  static nest::pool memory;
    -
    -private:
    -  Datum*
    -  clone() const override
    -  {
    -    return new BoolDatum( *this );
    -  }
    -
    -public:
    -  static const char* true_string;
    -  static const char* false_string;
    -
    -  BoolDatum()
    -    : GenericDatum< bool, &SLIInterpreter::Booltype >()
    -  {
    -  }
    -
    -  BoolDatum( const BoolDatum& ) = default;
    -  BoolDatum& operator=( const BoolDatum& ) = default;
    -
    -  BoolDatum( bool val )
    -    : GenericDatum< bool, &SLIInterpreter::Booltype >( val )
    -  {
    -  }
    -  BoolDatum( const Name& );
    -
    -  operator bool() const
    -  {
    -    return d;
    -  }
    -
    -  operator Name() const;
    -
    -  operator std::string() const;
    -
    -  void input_form( std::ostream& ) const override;
    -  void print( std::ostream& ) const override;
    -  void pprint( std::ostream& ) const override;
    -
    -  static void* operator new( size_t size );
    -
    -  static void operator delete( void* p, size_t size );
    -};
    -
    -#endif
    diff --git a/sli/callbackdatum.h b/sli/callbackdatum.h
    deleted file mode 100644
    index 915e1f1c91..0000000000
    --- a/sli/callbackdatum.h
    +++ /dev/null
    @@ -1,35 +0,0 @@
    -/*
    - *  callbackdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef CALLBACKDATUM_H
    -#define CALLBACKDATUM_H
    -/*
    -    Datum class, implementing SLI callbacks.
    -*/
    -
    -// Includes from sli:
    -#include "genericdatum.h"
    -#include "interpret.h"
    -
    -typedef GenericDatum< Token, &SLIInterpreter::Callbacktype > CallbackDatum;
    -
    -#endif
    diff --git a/sli/charcode.cc b/sli/charcode.cc
    deleted file mode 100644
    index a6feb5bc5d..0000000000
    --- a/sli/charcode.cc
    +++ /dev/null
    @@ -1,62 +0,0 @@
    -/*
    - *  charcode.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "charcode.h"
    -
    -CharCode::CharCode( size_t n, size_t def )
    -  : std::vector< size_t >( n + 1, def )
    -{
    -}
    -
    -void
    -CharCode::Range( size_t code, char lc, char uc )
    -{
    -  unsigned char lower = lc;
    -  unsigned char upper = uc;
    -
    -  assert( lower <= upper );
    -  assert( upper < size() );
    -  for ( size_t i = lower; i <= upper; ++i )
    -  {
    -    ( *this )[ i ] = code;
    -  }
    -}
    -
    -void
    -CharCode::Group( size_t code, const char* g )
    -{
    -  while ( *g )
    -  {
    -    unsigned char c = *g++;
    -    assert( c < size() );
    -    ( *this )[ c ] = code;
    -  }
    -}
    -
    -size_t
    -CharCode::operator()( char c ) const
    -{
    -  unsigned char chr = static_cast< unsigned char >( c );
    -  assert( chr < size() );
    -
    -  return ( *this )[ chr ];
    -}
    diff --git a/sli/charcode.h b/sli/charcode.h
    deleted file mode 100644
    index 6972aa9af8..0000000000
    --- a/sli/charcode.h
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  charcode.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef CharCode_H
    -#define CharCode_H
    -/*
    -
    -    Character codes for the scanner
    -*/
    -
    -/***************************************************************/
    -/* class CharCode                                              */
    -/***************************************************************/
    -// C++ includes:
    -#include <cassert>
    -#include <cstddef>
    -#include <vector>
    -
    -class CharCode : public std::vector< size_t >
    -{
    -public:
    -  CharCode( size_t, size_t );
    -
    -  void Range( size_t, char, char );
    -  void Group( size_t, const char* );
    -  size_t operator()( char ) const;
    -};
    -
    -
    -#endif
    diff --git a/sli/datum.cc b/sli/datum.cc
    deleted file mode 100644
    index 0ca4007087..0000000000
    --- a/sli/datum.cc
    +++ /dev/null
    @@ -1,34 +0,0 @@
    -/*
    - *  datum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "datum.h"
    -
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "stringdatum.h"
    -#include "token.h"
    -
    -void
    -Datum::info( std::ostream& ) const
    -{
    -  //    out << "wflag = " << wflag << std::endl;
    -}
    diff --git a/sli/datum.h b/sli/datum.h
    deleted file mode 100644
    index b13bfe0741..0000000000
    --- a/sli/datum.h
    +++ /dev/null
    @@ -1,220 +0,0 @@
    -/*
    - *  datum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef DATUM_H
    -#define DATUM_H
    -
    -// Includes from sli:
    -#include "slitype.h"
    -
    -/***********************************************************/
    -/* Datum                                                   */
    -/* -----                                                   */
    -/*  base class for all Data Objects                        */
    -/***********************************************************/
    -class Datum
    -{
    -
    -  friend class Token;
    -
    -  /**
    -   * Virtual copy constructor.
    -   * Use this function to lazily copy a datum.
    -   */
    -  virtual Datum* clone() const = 0;
    -
    -
    -  /**
    -   * Returns a reference counted pointer to the datum, or a new pointer, if the
    -   * type does not support reference counting.
    -   * The prefix const indicates that the pointer should be trated as const
    -   * because changes affect all other references as well.
    -   */
    -
    -  virtual Datum*
    -  get_ptr()
    -  {
    -    return clone();
    -  }
    -
    -protected:
    -  // Putting the following variables here, avoids a number of virtual
    -  // functions.
    -
    -  const SLIType* type;       //!< Pointer to type object.
    -  const SLIFunction* action; //!< Shortcut to the SLIType default action.
    -  mutable unsigned int reference_count_;
    -  bool executable_;
    -
    -
    -  Datum()
    -    : type( nullptr )
    -    , action( nullptr )
    -    , reference_count_( 1 )
    -    , executable_( true )
    -  {
    -  }
    -
    -
    -  Datum( const SLIType* t )
    -    : type( t )
    -    , action( t->getaction() )
    -    , reference_count_( 1 )
    -    , executable_( true )
    -  {
    -  }
    -
    -  Datum( const Datum& d )
    -    : type( d.type )
    -    , action( d.action )
    -    , reference_count_( 1 )
    -    , executable_( d.executable_ )
    -  {
    -  }
    -
    -
    -public:
    -  virtual ~Datum() {};
    -
    -
    -  void
    -  addReference() const
    -  {
    -    ++reference_count_;
    -  }
    -
    -  void
    -  removeReference()
    -  {
    -    --reference_count_;
    -    if ( reference_count_ == 0 )
    -    {
    -      delete this;
    -    }
    -  }
    -
    -  size_t
    -  numReferences() const
    -  {
    -    return reference_count_;
    -  }
    -
    -  bool
    -  is_executable() const
    -  {
    -    return executable_;
    -  }
    -
    -  void
    -  set_executable()
    -  {
    -    executable_ = true;
    -  }
    -
    -  void
    -  unset_executable()
    -  {
    -    executable_ = false;
    -  }
    -
    -  virtual void print( std::ostream& ) const = 0;
    -  virtual void pprint( std::ostream& ) const = 0;
    -
    -  virtual void
    -  list( std::ostream& out, std::string prefix, int length ) const
    -  {
    -    if ( length == 0 )
    -    {
    -      prefix = "-->" + prefix;
    -    }
    -    else
    -    {
    -      prefix = "   " + prefix;
    -    }
    -    out << prefix;
    -    print( out );
    -  }
    -
    -  virtual void
    -  input_form( std::ostream& out ) const
    -  {
    -    pprint( out );
    -  }
    -
    -  virtual bool
    -  equals( const Datum* d ) const
    -  {
    -    return this == d;
    -  }
    -
    -  virtual void info( std::ostream& ) const;
    -
    -  const Name&
    -  gettypename() const
    -  {
    -    return type->gettypename();
    -  }
    -
    -  bool
    -  isoftype( SLIType const& t ) const
    -  {
    -    // or: *type==t, there is only one t with same contents !
    -    return ( type == &t );
    -  }
    -
    -  virtual void
    -  execute( SLIInterpreter* i )
    -  {
    -    action->execute( i );
    -  }
    -};
    -
    -template < SLIType* slt >
    -class TypedDatum : public Datum
    -{
    -public:
    -  TypedDatum()
    -    : Datum( slt )
    -  {
    -  }
    -
    -  // This is here solely for default assignment operators in
    -  // derived classes synthesized by the compiler. It does nothing but return
    -  // itself.
    -protected:
    -  TypedDatum( const TypedDatum< slt >& d )
    -    : Datum( d )
    -  {
    -  }
    -  const TypedDatum< slt >& operator=( const TypedDatum< slt >& );
    -};
    -
    -template < SLIType* slt >
    -inline const TypedDatum< slt >&
    -TypedDatum< slt >::operator=( const TypedDatum< slt >& )
    -{
    -  //  assert( type == d.type );
    -  return *this;
    -}
    -
    -
    -#endif
    diff --git a/sli/dict.cc b/sli/dict.cc
    deleted file mode 100644
    index 5cad54bcc9..0000000000
    --- a/sli/dict.cc
    +++ /dev/null
    @@ -1,226 +0,0 @@
    -/*
    - *  dict.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "dict.h"
    -
    -// C++ includes:
    -#include <algorithm>
    -#include <iomanip>
    -#include <string>
    -#include <vector>
    -
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictutils.h"
    -#include "sliexceptions.h"
    -
    -const Token Dictionary::VoidToken;
    -
    -Dictionary::~Dictionary()
    -{
    -}
    -
    -const Token&
    -Dictionary::operator[]( const char* n ) const
    -{
    -  return operator[]( Name( n ) );
    -}
    -
    -Token&
    -Dictionary::operator[]( const char* n )
    -{
    -  return operator[]( Name( n ) );
    -}
    -
    -void
    -Dictionary::clear()
    -{
    -  TokenMap cp( *this );
    -  TokenMap::clear();
    -
    -  for ( TokenMap::iterator i = cp.begin(); i != cp.end(); ++i )
    -  {
    -    Token* tok = &i->second;
    -    Datum* datum = tok->datum();
    -    DictionaryDatum* d = dynamic_cast< DictionaryDatum* >( datum );
    -    if ( not d )
    -    {
    -      continue;
    -    }
    -
    -    Dictionary* dt = d->get();
    -    d->unlock();
    -    dt->clear();
    -  }
    -}
    -
    -void
    -Dictionary::info( std::ostream& out ) const
    -{
    -  out.setf( std::ios::left );
    -  if ( size() > 0 )
    -  {
    -    // copy to vector and sort
    -    typedef std::vector< std::pair< Name, Token > > DataVec;
    -    DataVec data;
    -    std::copy( begin(), end(), std::inserter( data, data.begin() ) );
    -    std::sort( data.begin(), data.end(), DictItemLexicalOrder() );
    -
    -    out << "--------------------------------------------------" << std::endl;
    -    out << std::setw( 25 ) << "Name" << std::setw( 20 ) << "Type"
    -        << "Value" << std::endl;
    -    out << "--------------------------------------------------" << std::endl;
    -
    -    for ( DataVec::const_iterator where = data.begin(); where != data.end(); ++where )
    -    {
    -      out << std::setw( 25 ) << where->first << std::setw( 20 ) << where->second->gettypename() << where->second
    -          << std::endl;
    -    }
    -    out << "--------------------------------------------------" << std::endl;
    -  }
    -  out << "Total number of entries: " << size() << std::endl;
    -
    -  out.unsetf( std::ios::left );
    -}
    -
    -void
    -Dictionary::add_dict( const std::string& target, SLIInterpreter& i )
    -{
    -  DictionaryDatum targetdict;
    -
    -  // retrieve targetdict from interpreter
    -  Token d = i.baselookup( Name( target ) );
    -  targetdict = getValue< DictionaryDatum >( d );
    -
    -  for ( TokenMap::const_iterator it = TokenMap::begin(); it != TokenMap::end(); ++it )
    -  {
    -    if ( not targetdict->known( it->first ) )
    -    {
    -      targetdict->insert( it->first, it->second );
    -    }
    -    else
    -    {
    -      throw UndefinedName( ( it->first ).toString() );
    -      //      throw DictError();
    -    }
    -  }
    -}
    -
    -void
    -Dictionary::remove( const Name& n )
    -{
    -  TokenMap::iterator it = find( n );
    -  if ( it != end() )
    -  {
    -    erase( it );
    -  }
    -}
    -
    -void
    -Dictionary::remove_dict( const std::string& target, SLIInterpreter& i )
    -{
    -  DictionaryDatum targetdict;
    -
    -  // retrieve targetdict from interpreter
    -  Token d = i.baselookup( Name( target ) );
    -  targetdict = getValue< DictionaryDatum >( d );
    -
    -  for ( TokenMap::const_iterator it = TokenMap::begin(); it != TokenMap::end(); ++it )
    -  {
    -    TokenMap::iterator tgt_it = targetdict->find( it->first );
    -    if ( tgt_it != targetdict->end() )
    -    {
    -      targetdict->erase( tgt_it );
    -    }
    -  }
    -}
    -
    -void
    -Dictionary::clear_access_flags()
    -{
    -  for ( TokenMap::iterator it = TokenMap::begin(); it != TokenMap::end(); ++it )
    -  {
    -    /*
    -       Clear flags in nested dictionaries recursively.
    -       We first test whether the token is a DictionaryDatum
    -       and then call getValue(). This entails two dynamic casts,
    -       but is likely more efficient than a try-catch construction.
    -    */
    -    if ( it->second.is_a< DictionaryDatum >() )
    -    {
    -      DictionaryDatum subdict = getValue< DictionaryDatum >( it->second );
    -      subdict->clear_access_flags();
    -    }
    -
    -    // in recursion, getValue sets the access flag for it->second, so
    -    // we must clear it after recursion is done
    -    it->second.clear_access_flag();
    -  }
    -}
    -
    -bool
    -Dictionary::all_accessed_( std::string& missed, std::string prefix ) const
    -{
    -  missed = "";
    -
    -  // build list of all non-accessed Token names
    -  for ( TokenMap::const_iterator it = TokenMap::begin(); it != TokenMap::end(); ++it )
    -  {
    -    if ( not it->second.accessed() )
    -    {
    -      missed = missed + " " + prefix + it->first.toString();
    -    }
    -    else if ( it->second.is_a< DictionaryDatum >() )
    -    {
    -      // recursively check if nested dictionary content was accessed
    -      // see also comments in clear_access_flags()
    -
    -      // this sets access flag on it->second, but that does not matter,
    -      // since it is anyways set, otherwise we would not be recursing
    -      DictionaryDatum subdict = getValue< DictionaryDatum >( it->second );
    -
    -      subdict->all_accessed_( missed, prefix + it->first.toString() + "::" );
    -    }
    -  }
    -
    -  return missed.empty();
    -}
    -
    -std::ostream&
    -operator<<( std::ostream& out, const Dictionary& d )
    -{
    -  out << "<<";
    -
    -  for ( TokenMap::const_iterator where = d.begin(); where != d.end(); ++where )
    -  {
    -    out << ( *where ).first << ' ' << ( *where ).second << ',';
    -  }
    -  out << ">>";
    -
    -  return out;
    -}
    -
    -bool
    -Dictionary::DictItemLexicalOrder::nocase_compare( char c1, char c2 )
    -{
    -  return std::toupper( c1 ) < std::toupper( c2 );
    -}
    diff --git a/sli/dict.h b/sli/dict.h
    deleted file mode 100644
    index 8e665479cd..0000000000
    --- a/sli/dict.h
    +++ /dev/null
    @@ -1,339 +0,0 @@
    -/*
    - *  dict.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef DICT_H
    -#define DICT_H
    -/*
    -    SLI's dictionary class
    -*/
    -// C++ includes:
    -#include <map>
    -
    -// Includes from sli:
    -#include "name.h"
    -#include "sliexceptions.h"
    -#include "token.h"
    -
    -
    -typedef std::map< Name, Token, std::less< Name > > TokenMap;
    -
    -inline bool
    -operator==( const TokenMap& x, const TokenMap& y )
    -{
    -  return ( x.size() == y.size() ) and equal( x.begin(), x.end(), y.begin() );
    -}
    -
    -/** A class that associates names and tokens.
    - *  @ingroup TokenHandling
    - */
    -class Dictionary : private TokenMap
    -{
    -  /**
    -   * Helper class for lexicographical sorting of dictionary entries.
    -   * Provides comparison operator for ascending, case-insensitive
    -   * lexicographical ordering.
    -   * @see This is a simplified version of the class presented in
    -   * N.M.Josuttis, The C++ Standard Library, Addison Wesley, 1999,
    -   * ch. 6.6.6.
    -   */
    -  class DictItemLexicalOrder
    -  {
    -  private:
    -    static bool nocase_compare( char c1, char c2 );
    -
    -  public:
    -    bool
    -    operator()( const std::pair< Name, Token >& lhs, const std::pair< Name, Token >& rhs ) const
    -    {
    -      const std::string& ls = lhs.first.toString();
    -      const std::string& rs = rhs.first.toString();
    -
    -      return std::lexicographical_compare( ls.begin(), ls.end(), rs.begin(), rs.end(), nocase_compare );
    -    }
    -  };
    -
    -public:
    -  Dictionary()
    -    : refs_on_dictstack_( 0 )
    -  {
    -  }
    -  Dictionary( const Dictionary& d )
    -    : TokenMap( d )
    -    , refs_on_dictstack_( 0 )
    -  {
    -  }
    -  ~Dictionary();
    -
    -  using TokenMap::begin;
    -  using TokenMap::end;
    -  using TokenMap::erase;
    -  using TokenMap::find;
    -  using TokenMap::iterator;
    -  using TokenMap::size;
    -
    -  void clear();
    -
    -  /**
    -   * Lookup and return Token with given name in dictionary.
    -   * If the name is not found, an empty token is returned.
    -   * This version of lookup is deprecated and will disappear in future versions.
    -   * Please use lookup2() instead.
    -   * @note The token returned should @b always  be stored as a
    -   *       <tt>const \&</tt>, so that the control flag for
    -   *       dictionary read-out is set on the Token in the dictionary,
    -   *       not its copy.
    -   */
    -
    -  const Token& lookup( const Name& n ) const;
    -
    -  /**
    -   * lookup a name in the dictionary. If the name is not found an UndefinedName
    -   * exception is thrown.
    -   * lookup2 is the preferred way to retrieve entries from the dictionary.
    -   * @note The token returned should @b always  be stored as a
    -   *       <tt>const \&</tt>, so that the control flag for
    -   *       dictionary read-out is set on the Token in the dictionary,
    -   *       not its copy.
    -   */
    -  const Token& lookup2( const Name& n ) const; // throws UndefinedName
    -  bool known( const Name& ) const;
    -
    -  //! Returns true if name is known but token has not been accessed
    -  bool known_but_not_accessed( const Name& ) const;
    -
    -  Token& insert( const Name& n, const Token& t );
    -  Token& insert_move( const Name&, Token& );
    -
    -  //! Remove entry from dictionary
    -  void remove( const Name& n );
    -
    -  const Token& operator[]( const Name& ) const;
    -  Token& operator[]( const Name& );
    -  const Token& operator[]( const char* ) const;
    -  Token& operator[]( const char* );
    -
    -  bool
    -  empty() const
    -  {
    -    return TokenMap::empty();
    -  }
    -
    -  void info( std::ostream& ) const;
    -
    -  bool
    -  operator==( const Dictionary& d ) const
    -  {
    -    return ::operator==( *this, d );
    -  }
    -
    -  /**
    -   * Add the contents of this dictionary to another.
    -   * The target dictionary is given by names and must be retrieved via
    -   * the interpreter.
    -   * @todo Allow for free formatting of target dictionary entries
    -   * via functor, and add traits to allow duplicates.
    -   * @see remove_dict
    -   */
    -  void add_dict( const std::string&, SLIInterpreter& );
    -
    -  /**
    -   * Remove entries found in another dictionary from this.
    -   * @see add_dict
    -   */
    -  void remove_dict( const std::string&, SLIInterpreter& );
    -
    -  /**
    -   * Clear access flags on all dictionary elements.
    -   * Flags for nested dictionaries are cleared recursively.
    -   * @see all_accessed()
    -   */
    -  void clear_access_flags();
    -
    -  /**
    -   * Check whether all elements have been accessed.
    -   * Checks nested dictionaries recursively.
    -   * @param std::string& contains string with names of non-accessed entries
    -   * @returns true if all dictionary elements have been accessed
    -   * @note this is just a wrapper, all_accessed_() does the work, hides
    -   * recursion
    -   * @see clear_access_flags(), all_accessed_()
    -   */
    -  bool
    -  all_accessed( std::string& missed ) const
    -  {
    -    return all_accessed_( missed );
    -  }
    -
    -  friend std::ostream& operator<<( std::ostream&, const Dictionary& );
    -
    -  /**
    -   * Constant iterator for dictionary.
    -   * Dictionary inherits privately from std::map to hide implementation
    -   * details. To allow for inspection of all elements in a dictionary,
    -   * we export the constant iterator type and begin() and end() methods.
    -   */
    -  typedef TokenMap::const_iterator const_iterator;
    -
    -  /**
    -   * This function is called when a dictionary is pushed to the dictionary
    -   * stack. The dictioray stack must keep track about which dictioraries are on
    -   * the dictionary stack. If a dictionary is modified and it is on the
    -   * dictionary stack, the cache of the dictionary stack must
    -   * be adjusted. This is e.g. the case for the systemdict or the errordict.
    -   */
    -  void
    -  add_dictstack_reference()
    -  {
    -    ++refs_on_dictstack_;
    -  }
    -
    -  /**
    -   * This function is called when the dictionary is popped from the dictionary
    -   * stack.
    -   */
    -  void
    -  remove_dictstack_reference()
    -  {
    -    --refs_on_dictstack_;
    -  }
    -
    -  /**
    -   * Returns true, if the dictionary has references on the dictionary stack.
    -   */
    -  bool
    -  is_on_dictstack() const
    -  {
    -    return refs_on_dictstack_ > 0;
    -  }
    -
    -
    -private:
    -  /**
    -   * Worker function checking whether all elements have been accessed.
    -   * Checks nested dictionaries recursively.
    -   * @param std::string& contains string with names of non-accessed entries
    -   * @param std::string prefix for nested dictionary entries, built during
    -   * recursion
    -   * @returns true if all dictionary elements have been accessed
    -   * @note this is just the worker for all_accessed()
    -   * @see clear_access_flags(), all_accessed()
    -   */
    -
    -  int refs_on_dictstack_;
    -  bool all_accessed_( std::string&, std::string prefix = std::string() ) const;
    -  static const Token VoidToken;
    -};
    -
    -inline const Token&
    -Dictionary::lookup( const Name& n ) const
    -{
    -  TokenMap::const_iterator where = find( n );
    -  if ( where != end() )
    -  {
    -    return ( *where ).second;
    -  }
    -  else
    -  {
    -    return Dictionary::VoidToken;
    -  }
    -}
    -
    -inline const Token&
    -Dictionary::lookup2( const Name& n ) const
    -{
    -  TokenMap::const_iterator where = find( n );
    -  if ( where != end() )
    -  {
    -    return ( *where ).second;
    -  }
    -  else
    -  {
    -    throw UndefinedName( n.toString() );
    -  }
    -}
    -
    -inline bool
    -Dictionary::known( const Name& n ) const
    -{
    -  TokenMap::const_iterator where = find( n );
    -  if ( where != end() )
    -  {
    -    return true;
    -  }
    -  else
    -  {
    -    return false;
    -  }
    -}
    -
    -inline bool
    -Dictionary::known_but_not_accessed( const Name& n ) const
    -{
    -  TokenMap::const_iterator where = find( n );
    -  if ( where != end() )
    -  {
    -    return not where->second.accessed();
    -  }
    -  else
    -  {
    -    return false;
    -  }
    -}
    -
    -inline Token&
    -Dictionary::insert( const Name& n, const Token& t )
    -{
    -  return TokenMap::operator[]( n ) = t;
    -}
    -
    -
    -inline const Token&
    -Dictionary::operator[]( const Name& n ) const
    -{
    -  TokenMap::const_iterator where = find( n );
    -  if ( where != end() )
    -  {
    -    return ( *where ).second;
    -  }
    -  else
    -  {
    -    throw UndefinedName( n.toString() );
    -  }
    -}
    -
    -
    -inline Token&
    -Dictionary::operator[]( const Name& n )
    -{
    -  return TokenMap::operator[]( n );
    -}
    -
    -inline Token&
    -Dictionary::insert_move( const Name& n, Token& t )
    -{
    -  Token& result = TokenMap::operator[]( n );
    -  result.move( t );
    -  return result;
    -}
    -
    -
    -#endif
    diff --git a/sli/dictdatum.h b/sli/dictdatum.h
    deleted file mode 100644
    index af8ad9d4a1..0000000000
    --- a/sli/dictdatum.h
    +++ /dev/null
    @@ -1,36 +0,0 @@
    -/*
    - *  dictdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef DICTDATUM_H
    -#define DICTDATUM_H
    -/*
    -    Defines class DictionaryDatum
    -*/
    -
    -// Includes from sli:
    -#include "dict.h"
    -#include "interpret.h"
    -#include "lockptrdatum.h"
    -
    -typedef lockPTRDatum< Dictionary, &SLIInterpreter::Dictionarytype > DictionaryDatum;
    -
    -#endif
    diff --git a/sli/dictstack.cc b/sli/dictstack.cc
    deleted file mode 100644
    index 725fd8abbd..0000000000
    --- a/sli/dictstack.cc
    +++ /dev/null
    @@ -1,231 +0,0 @@
    -/*
    - *  dictstack.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "dictstack.h"
    -
    -DictionaryStack::DictionaryStack( const Token& t )
    -  : VoidToken( t )
    -{
    -}
    -
    -DictionaryStack::DictionaryStack( const DictionaryStack& ds )
    -  : VoidToken( ds.VoidToken )
    -  , d( ds.d )
    -{
    -}
    -
    -DictionaryStack::~DictionaryStack()
    -{
    -  // We have to clear the dictionary before we delete it, otherwise the
    -  // dictionary references will prevent proper deletion.
    -  for ( std::list< DictionaryDatum >::iterator i = d.begin(); i != d.end(); ++i )
    -  {
    -    ( *i )->clear();
    -  }
    -}
    -
    -void
    -DictionaryStack::undef( const Name& n )
    -{
    -
    -  size_t num_erased = 0;
    -  for ( std::list< DictionaryDatum >::iterator it = d.begin(); it != d.end(); ++it )
    -  {
    -    num_erased += ( *it )->erase( n );
    -  }
    -  if ( num_erased == 0 )
    -  {
    -    throw UndefinedName( n.toString() );
    -  }
    -#ifdef DICTSTACK_CACHE
    -  clear_token_from_cache( n );
    -  clear_token_from_basecache( n );
    -#endif
    -}
    -
    -void
    -DictionaryStack::basedef( const Name& n, const Token& t )
    -{
    -//
    -// insert (n,t) in bottom level dictionary
    -// dictionary stack must contain at least one dictionary
    -// VoidToken is an illegal value for t.
    -#ifdef DICTSTACK_CACHE
    -  clear_token_from_cache( n );
    -  basecache_token( n, &( base_->insert( n, t ) ) );
    -#endif
    -#ifndef DICTSTACK_CACHE
    -  ( *base_ )[ n ] = t;
    -#endif
    -}
    -
    -
    -void
    -DictionaryStack::basedef_move( const Name& n, Token& t )
    -{
    -#ifdef DICTSTACK_CACHE
    -  clear_token_from_cache( n );
    -  basecache_token( n, &( base_->insert_move( n, t ) ) );
    -#endif
    -#ifndef DICTSTACK_CACHE
    -  base_->insert_move( n, t );
    -#endif
    -}
    -
    -
    -void
    -DictionaryStack::pop()
    -{
    -  //
    -  // remove top dictionary from stack
    -  // dictionary stack must contain at least one dictionary
    -  //
    -
    -#ifdef DICTSTACK_CACHE
    -  clear_dict_from_cache( *( d.begin() ) );
    -  ( *( d.begin() ) )->remove_dictstack_reference();
    -#endif
    -  d.pop_front();
    -}
    -
    -void
    -DictionaryStack::clear()
    -{
    -  d.erase( d.begin(), d.end() );
    -#ifdef DICTSTACK_CACHE
    -  clear_cache();
    -#endif
    -}
    -
    -
    -void
    -DictionaryStack::top( Token& t ) const
    -{
    -  //
    -  // create a copy of the top level dictionary
    -  // and move it into Token t.
    -  // new should throw an exception if it fails
    -  //
    -
    -  DictionaryDatum* dd = new DictionaryDatum( *( d.begin() ) );
    -
    -  Token dt( dd );
    -  t.move( dt );
    -}
    -
    -void
    -DictionaryStack::toArray( TokenArray& ta ) const
    -{
    -  //
    -  // create a copy of the top level dictionary
    -  // and move it into Token t.
    -  // new should throw an exception if it fails
    -  //
    -
    -  ta.erase();
    -
    -  std::list< DictionaryDatum >::const_reverse_iterator i( d.rbegin() );
    -
    -  while ( i != d.rend() )
    -  {
    -    ta.push_back( ( *i ) );
    -    ++i;
    -  }
    -}
    -
    -void
    -DictionaryStack::push( Token& d )
    -{
    -  DictionaryDatum* dd = dynamic_cast< DictionaryDatum* >( d.datum() );
    -  assert( dd );
    -  push( *dd );
    -}
    -
    -void
    -DictionaryStack::push( const DictionaryDatum& pd )
    -{
    -  //
    -  // extract Dictionary from Token envelope
    -  // and push it on top of the stack.
    -  // a non dictionary datum at this point is a program bug.
    -  //
    -
    -#ifdef DICTSTACK_CACHE
    -  pd->add_dictstack_reference();
    -  // This call will remove all names in the dict from the name cache.
    -  clear_dict_from_cache( pd );
    -#endif
    -
    -  d.push_front( pd );
    -}
    -
    -void
    -DictionaryStack::set_basedict()
    -{
    -  base_ = *( --d.end() ); // Cache base dictionary
    -}
    -
    -size_t
    -DictionaryStack::size() const
    -{
    -  //
    -  // return number of dictionaries on stack
    -  //
    -
    -  return d.size();
    -}
    -
    -
    -void
    -DictionaryStack::info( std::ostream& o ) const
    -{
    -  //  for_each(d.rbegin(), d.rend(), bind_2nd(mem_fun(&Dictionary::info),o));
    -
    -  std::list< DictionaryDatum >::const_reverse_iterator i( d.rbegin() );
    -
    -  o << "DictionaryStack::info" << std::endl;
    -  o << "Size = " << d.size() << std::endl;
    -  while ( i != d.rend() )
    -  {
    -    ( *i )->info( o );
    -    ++i;
    -  }
    -}
    -
    -void
    -DictionaryStack::top_info( std::ostream& o ) const
    -{
    -  ( *d.begin() )->info( o );
    -}
    -
    -const DictionaryStack&
    -DictionaryStack::operator=( const DictionaryStack& ds )
    -{
    -  if ( &ds != this )
    -  {
    -    d = ds.d;
    -#ifdef DICTSTACK_CACHE
    -    cache_ = ds.cache_;
    -#endif
    -  }
    -  return *this;
    -}
    diff --git a/sli/dictstack.h b/sli/dictstack.h
    deleted file mode 100644
    index e4b05e0118..0000000000
    --- a/sli/dictstack.h
    +++ /dev/null
    @@ -1,406 +0,0 @@
    -/*
    - *  dictstack.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef DICTIONARYSTACK_H
    -#define DICTIONARYSTACK_H
    -/*
    -    SLI's dictionary stack
    -*/
    -
    -// C++ includes:
    -#include <list>
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "sliexceptions.h"
    -
    -
    -/*************************************************************
    -
    -Problems:
    -
    -- is it better to uses dictionaries as references to common
    -  objects like in PS. What is the exact meaning of undef and
    -  where in our current situation (read RedBook).
    -- more efficient implementation exploiting
    -  the name ids (documented elsewhere).
    -
    -  History:
    -    (1) using list<Dictionary>
    -        MD, 23.6.1, Freiburg
    -    (0) first version (single dictionary)
    -        MOG, MD, June 1997, Freiburg
    -**************************************************************/
    -
    -/**
    - * The macro DICTSTACK_CACHE switches on two caches:
    - * 1. cache_, global cache for the dictionary stack
    - * 2. basecache_, a cache for the system dictionary
    - * These caches are direct lookup table with one entry per name.
    - * They work as follows:
    - * If a name is looked up, it is looked up in the cache.
    - * If the cache does not have an entry, the dictionary stack is searched and
    - * the name/token combination is added to the cache.
    - */
    -#ifndef DICTSTACK_CACHE
    -#define DICTSTACK_CACHE 1
    -#endif
    -
    -class DictionaryStack
    -{
    -private:
    -  const Token VoidToken;
    -  std::list< DictionaryDatum > d;
    -  DictionaryDatum base_;
    -#ifdef DICTSTACK_CACHE
    -  std::vector< const Token* > cache_;
    -  std::vector< const Token* > basecache_;
    -#endif
    -
    -public:
    -  DictionaryStack( const Token& = Token() );
    -  DictionaryStack( const DictionaryStack& );
    -  ~DictionaryStack();
    -
    -
    -#ifdef DICTSTACK_CACHE
    -  /**
    -   * Add a token to the cache.
    -   */
    -  void
    -  cache_token( const Name& n, const Token* result )
    -  {
    -    Name::handle_t key = n.toIndex();
    -    if ( key >= cache_.size() )
    -    {
    -      cache_.resize( Name::num_handles() + 100, nullptr );
    -    }
    -    cache_[ key ] = result;
    -  }
    -
    -  void
    -  basecache_token( const Name& n, const Token* result )
    -  {
    -    Name::handle_t key = n.toIndex();
    -    if ( key >= basecache_.size() )
    -    {
    -      basecache_.resize( Name::num_handles() + 100, nullptr );
    -    }
    -    basecache_[ key ] = result;
    -  }
    -
    -  /**
    -   * Clear a name from the cache.
    -   * This function should be called in each def variant.
    -   */
    -  void
    -  clear_token_from_cache( const Name& n )
    -  {
    -    Name::handle_t key = n.toIndex();
    -    if ( key < cache_.size() )
    -    {
    -      cache_[ key ] = nullptr;
    -    }
    -  }
    -
    -  void
    -  clear_token_from_basecache( const Name& n )
    -  {
    -    Name::handle_t key = n.toIndex();
    -    if ( key < basecache_.size() )
    -    {
    -      basecache_[ key ] = nullptr;
    -    }
    -  }
    -
    -  void
    -  clear_dict_from_cache( DictionaryDatum d )
    -  {
    -    for ( TokenMap::iterator i = d->begin(); i != d->end(); ++i )
    -    {
    -      clear_token_from_cache( i->first );
    -    }
    -  }
    -
    -
    -  /** Clear the entire cache.
    -   * This should be  called whenever a dictionary is pushed or poped.
    -   * Alternative, one could just clear the names from the moved dictionary.
    -   */
    -  void
    -  clear_cache()
    -  {
    -    const size_t cache_size = cache_.size();
    -    for ( size_t i = 0; i < cache_size; ++i )
    -    {
    -      cache_[ i ] = nullptr;
    -    }
    -  }
    -
    -#endif
    -
    -  const Token&
    -  lookup( const Name& n )
    -  {
    -    try
    -    {
    -      return lookup2( n );
    -    }
    -    catch ( UndefinedName& )
    -    {
    -      return VoidToken;
    -    }
    -  }
    -
    -  const Token&
    -  lookup2( const Name& n )
    -  {
    -#ifdef DICTSTACK_CACHE
    -    Name::handle_t key = n.toIndex();
    -    if ( key < cache_.size() )
    -    {
    -      const Token* result = cache_[ key ];
    -      if ( result )
    -      {
    -        return *result;
    -      }
    -    }
    -#endif
    -
    -    std::list< DictionaryDatum >::const_iterator i = d.begin();
    -
    -    while ( i != d.end() )
    -    {
    -      TokenMap::const_iterator where = ( *i )->find( n );
    -      if ( where != ( *i )->end() )
    -      {
    -#ifdef DICTSTACK_CACHE
    -        cache_token( n, &( where->second ) ); // Update the cache
    -#endif
    -        return where->second;
    -      }
    -      ++i;
    -    }
    -    throw UndefinedName( n.toString() );
    -  }
    -
    -  /** Lookup a name searching only the bottom level dictionary.
    -   *  If the Name is not found,
    -   *  @a VoidToken is returned.
    -   */
    -  const Token&
    -  baselookup( const Name& n ) // lookup in a specified
    -  {                           // base dictionary
    -#ifdef DICTSTACK_CACHE
    -    Name::handle_t key = n.toIndex();
    -    if ( key < basecache_.size() )
    -    {
    -      const Token* result = basecache_[ key ];
    -      if ( result )
    -      {
    -        return *result;
    -      }
    -    }
    -#endif
    -    TokenMap::const_iterator where = base_->find( n );
    -
    -    if ( where != base_->end() )
    -    {
    -#ifdef DICTSTACK_CACHE
    -      cache_token( n, &( where->second ) );     // Update the cache
    -      basecache_token( n, &( where->second ) ); // and the basecache
    -#endif
    -      return where->second;
    -    }
    -    else
    -    {
    -      return VoidToken;
    -    }
    -  }
    -
    -  /** Test for a name searching all dictionaries on the stack.
    -   */
    -  bool
    -  known( const Name& n )
    -  {
    -#ifdef DICTSTACK_CACHE
    -    Name::handle_t key = n.toIndex();
    -    if ( key < cache_.size() )
    -    {
    -      const Token* result = cache_[ key ];
    -      if ( result )
    -      {
    -        return true;
    -      }
    -    }
    -#endif
    -    std::list< DictionaryDatum >::const_iterator i( d.begin() );
    -
    -    while ( i != d.end() )
    -    {
    -      TokenMap::const_iterator where = ( *i )->find( n );
    -      if ( where != ( *i )->end() )
    -      {
    -#ifdef DICTSTACK_CACHE
    -        cache_token( n, &( where->second ) ); // Update the cache
    -#endif
    -        return true;
    -      }
    -      ++i;
    -    }
    -    return false;
    -  }
    -
    -  /** Test for a name in the bottom level dictionary.
    -   */
    -  bool
    -  baseknown( const Name& n ) // lookup in a specified
    -  {                          // base dictionary
    -#ifdef DICTSTACK_CACHE
    -    Name::handle_t key = n.toIndex();
    -    if ( key < basecache_.size() )
    -    {
    -      const Token* result = basecache_[ key ];
    -      if ( result )
    -      {
    -        return true;
    -      }
    -    }
    -#endif
    -    TokenMap::const_iterator where = base_->find( n );
    -    if ( where != base_->end() )
    -    {
    -#ifdef DICTSTACK_CACHE
    -      basecache_token( n, &( where->second ) ); // Update the basecache
    -      cache_token( n, &( where->second ) );     // and the cache
    -#endif
    -      return true;
    -    }
    -    return false;
    -  }
    -
    -
    -  //
    -  // def and def_move operate on the top level dictionary.
    -  // undef is not defined for the dictionary stack.
    -
    -  /** Bind a Token to a Name in the top level dictionary.
    -   *  The Token is copied.
    -   */
    -  void def( const Name&, const Token& );
    -
    -  /** Unbind a previously defined Name from its token. Seach in all
    -   * dictionaries.
    -   */
    -  void undef( const Name& );
    -
    -  /** Bind a Token to a Name in the bottom level dictionary.
    -   *  The Token is copied.
    -   */
    -  void basedef( const Name& n, const Token& t );
    -
    -  /** Bind a Token to a Name in the top level dictionary.
    -   *  The Token is moved.
    -   */
    -  void def_move( const Name&, Token& );
    -
    -  /**
    -   * This function must be called once to initialize the systemdict cache.
    -   */
    -  void set_basedict();
    -
    -  /** Bind a Token to a Name in the bottom level dictionary.
    -   *  The Token is moved.
    -   */
    -  void basedef_move( const Name& n, Token& t );
    -
    -  void pop();
    -
    -
    -  //
    -  // a Dictionary is always wrapped in a Token
    -  //
    -  void top( Token& ) const;
    -  void push( const DictionaryDatum& );
    -  void push( Token& );
    -
    -  void clear();
    -  void toArray( TokenArray& ) const;
    -  //
    -  // move is efficient for interaction with operand and execution
    -  // stack, but can not be implemented in this version
    -  //
    -  //    void pop_move(Token &) const;
    -  //    void push_move(const Token &);
    -
    -  //
    -  // number of dictionaries currently on the stack
    -  //
    -  size_t size() const;
    -
    -
    -  //
    -  // info for debugging purposes.
    -  // calls info(ostream&) for all dictionaries
    -  //
    -  void info( std::ostream& ) const;
    -  void top_info( std::ostream& ) const; // calls info of top dictionary
    -  const DictionaryStack& operator=( const DictionaryStack& );
    -};
    -
    -inline void
    -DictionaryStack::def( const Name& n, const Token& t )
    -{
    -//
    -// insert (n,t) in top level dictionary
    -// dictionary stack must contain at least one dictionary
    -// VoidToken is an illegal value for t.
    -//
    -#ifdef DICTSTACK_CACHE
    -  cache_token( n, &( ( *d.begin() )->insert( n, t ) ) );
    -#endif
    -#ifndef DICTSTACK_CACHE
    -  ( **d.begin() )[ n ] = t;
    -#endif
    -}
    -
    -inline void
    -DictionaryStack::def_move( const Name& n, Token& t )
    -{
    -  //
    -  // insert (n,t) in top level dictionary
    -  // dictionary stack must contain at least one dictionary
    -  // VoidToken is an illegal value for t.
    -  // def_move returns t as the VoidToken.
    -  //
    -  /* clear_token_from_cache(n); */
    -
    -#ifdef DICTSTACK_CACHE
    -  cache_token( n, &( ( *d.begin() )->insert_move( n, t ) ) );
    -#endif
    -#ifndef DICTSTACK_CACHE
    -  ( *d.begin() )->insert_move( n, t );
    -#endif
    -}
    -
    -#endif
    diff --git a/sli/dictutils.cc b/sli/dictutils.cc
    deleted file mode 100644
    index 85df9fcdbe..0000000000
    --- a/sli/dictutils.cc
    +++ /dev/null
    @@ -1,112 +0,0 @@
    -/*
    - *  dictutils.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "dictutils.h"
    -
    -void
    -initialize_property_array( DictionaryDatum& d, Name propname )
    -{
    -  Token t = d->lookup( propname );
    -  if ( t.empty() )
    -  {
    -    ArrayDatum arrd;
    -    def< ArrayDatum >( d, propname, arrd );
    -  }
    -}
    -
    -void
    -initialize_property_doublevector( DictionaryDatum& d, Name propname )
    -{
    -  Token t = d->lookup( propname );
    -  if ( t.empty() )
    -  {
    -    DoubleVectorDatum arrd( new std::vector< double > );
    -    def< DoubleVectorDatum >( d, propname, arrd );
    -  }
    -}
    -
    -void
    -initialize_property_intvector( DictionaryDatum& d, Name propname )
    -{
    -  Token t = d->lookup( propname );
    -  if ( t.empty() )
    -  {
    -    IntVectorDatum arrd( new std::vector< long > );
    -    def< IntVectorDatum >( d, propname, arrd );
    -  }
    -}
    -
    -void
    -provide_property( DictionaryDatum& d, Name propname, const std::vector< double >& prop )
    -{
    -  Token t = d->lookup2( propname );
    -
    -  DoubleVectorDatum* arrd = dynamic_cast< DoubleVectorDatum* >( t.datum() );
    -  assert( arrd );
    -
    -  if ( ( *arrd )->empty() and not prop.empty() ) // not data from before, add
    -  {
    -    ( *arrd )->insert( ( *arrd )->end(), prop.begin(), prop.end() );
    -  }
    -
    -  assert( prop.empty() or **arrd == prop ); // not testing for **arrd.empty()
    -                                            // since that implies prop.empty()
    -}
    -
    -
    -void
    -provide_property( DictionaryDatum& d, Name propname, const std::vector< long >& prop )
    -{
    -  Token t = d->lookup2( propname );
    -
    -  IntVectorDatum* arrd = dynamic_cast< IntVectorDatum* >( t.datum() );
    -  assert( arrd );
    -
    -  if ( ( *arrd )->empty() and not prop.empty() ) // not data from before, add
    -  {
    -    ( *arrd )->insert( ( *arrd )->end(), prop.begin(), prop.end() );
    -  }
    -
    -  assert( prop.empty() or **arrd == prop ); // not testing for **arrd.empty()
    -                                            // since that implies prop.empty()
    -}
    -
    -void
    -accumulate_property( DictionaryDatum& d, Name propname, const std::vector< double >& prop )
    -{
    -  Token t = d->lookup2( propname );
    -
    -  DoubleVectorDatum* arrd = dynamic_cast< DoubleVectorDatum* >( t.datum() );
    -  assert( arrd );
    -
    -  if ( ( *arrd )->empty() ) // first data, copy
    -  {
    -    ( *arrd )->insert( ( *arrd )->end(), prop.begin(), prop.end() );
    -  }
    -  else
    -  {
    -    assert( ( *arrd )->size() == prop.size() );
    -
    -    // add contents of prop to **arrd elementwise
    -    std::transform( ( *arrd )->begin(), ( *arrd )->end(), prop.begin(), ( *arrd )->begin(), std::plus< double >() );
    -  }
    -}
    diff --git a/sli/dictutils.h b/sli/dictutils.h
    deleted file mode 100644
    index 1df5d89734..0000000000
    --- a/sli/dictutils.h
    +++ /dev/null
    @@ -1,375 +0,0 @@
    -/*
    - *  dictutils.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef DICTUTILS_H
    -#define DICTUTILS_H
    -
    -// C++ includes:
    -#include <algorithm>
    -#include <functional>
    -#include <limits>
    -#include <string>
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dictdatum.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "namedatum.h"
    -#include "tokenutils.h"
    -
    -/**
    - * @defgroup DictUtils How to access the value contained in a Token contained in
    - * a dictionary.
    - * @ingroup TokenHandling
    - *
    - * Class Dictionary defines the standard user interface for accessing tokens
    - * from dictionaries (see there). However, this user interface returns
    - * tokens, from which the actual value would still need to be
    - * extracted. The utilitiy functions described in this group shortcut
    - * this step and provide direct access to the underlying fundamental
    - * values associated to a dictionary entry.
    - */
    -
    -/** Get the value of an existing dictionary entry.
    - * @ingroup DictUtils
    - * @throws UnknownName An entry of the given name is not known in the
    - * dictionary.
    - */
    -template < typename FT >
    -FT
    -getValue( const DictionaryDatum& d, Name const n )
    -{
    -  // We must take a reference, so that access information can be stored in the
    -  // token.
    -  const Token& t = d->lookup2( n );
    -
    -  /* if (!t.empty()) */
    -  /*   throw UndefinedName(n.toString()); */
    -
    -  return getValue< FT >( t );
    -}
    -
    -/** Get the value of an existing dictionary entry and check that it is in a
    - * specified range. The range is specified by two parameters min and max which
    - * have the same type as the template argument.
    - * The last parameter mode defines the type of the range:
    - * Mode    Relation
    - *-------------------
    - *  0      min < x < max
    - *  1      min <= x < max
    - *  2      min <= x <= max
    - *
    - * @ingroup DictUtils
    - * @throws UnknownName An entry of the given name is not known in the
    - * dictionary.
    - * @throws RangeCheck if a value is outside the range
    - */
    -inline double
    -get_double_in_range( const DictionaryDatum& d, Name const n, double min, double max, int mode = 2 )
    -{
    -  // We must take a reference, so that access information can be stored in the
    -  // token.
    -  const Token& t = d->lookup2( n );
    -  DoubleDatum* dd = dynamic_cast< DoubleDatum* >( t.datum() );
    -  double x = std::numeric_limits< double >::quiet_NaN();
    -
    -  if ( dd )
    -  {
    -    x = dd->get();
    -  }
    -  else
    -  {
    -    IntegerDatum* id = dynamic_cast< IntegerDatum* >( t.datum() );
    -    if ( not id )
    -    {
    -      throw TypeMismatch();
    -    }
    -
    -    x = static_cast< double >( id->get() );
    -  }
    -  switch ( mode )
    -  {
    -  case 0:
    -    if ( min < x and x < max )
    -    {
    -      return x;
    -    }
    -    break;
    -  case 1:
    -    if ( min <= x and x < max )
    -    {
    -      return x;
    -    }
    -    break;
    -  case 2:
    -    if ( min <= x and x <= max )
    -    {
    -      return x;
    -    }
    -    break;
    -  default:
    -    return x;
    -  }
    -  throw RangeCheck();
    -}
    -
    -/** Get the value of an existing dictionary entry and check that it is in a
    - * specified range. The range is specified by two parameters min and max which
    - * have the same type as the template argument.
    - * The last parameter mode defines the type of the range:
    - * Mode    Relation
    - *-------------------
    - *  0      min < x < max
    - *  1      min <= x < max
    - *  2      min <= x <= max
    - *
    - * @ingroup DictUtils
    - * @throws UnknownName An entry of the given name is not known in the
    - * dictionary.
    - * @throws RangeCheck if a value is outside the range
    - */
    -inline long
    -get_long_in_range( const DictionaryDatum& d, Name const n, long min, long max, int mode = 2 )
    -{
    -  // We must take a reference, so that access information can be stored in the
    -  // token.
    -  const Token& t = d->lookup2( n );
    -  DoubleDatum* dd = dynamic_cast< DoubleDatum* >( t.datum() );
    -  long x = std::numeric_limits< long >::min();
    -
    -  if ( dd )
    -  {
    -    x = dd->get();
    -  }
    -  else
    -  {
    -    IntegerDatum* id = dynamic_cast< IntegerDatum* >( t.datum() );
    -    if ( not id )
    -    {
    -      throw TypeMismatch();
    -    }
    -
    -    x = static_cast< double >( id->get() );
    -  }
    -  switch ( mode )
    -  {
    -  case 0:
    -    if ( min < x and x < max )
    -    {
    -      return x;
    -    }
    -    break;
    -  case 1:
    -    if ( min <= x and x < max )
    -    {
    -      return x;
    -    }
    -    break;
    -  case 2:
    -    if ( min <= x and x <= max )
    -    {
    -      return x;
    -    }
    -    break;
    -  default:
    -    return x;
    -  }
    -  throw RangeCheck();
    -}
    -
    -
    -/** Define a new dictionary entry from a fundamental type.
    - * @ingroup DictUtils
    - * @throws TypeMismatch Fundamental type and requested SLI type are
    - * incompatible.
    - */
    -template < typename FT, class D >
    -void
    -def2( DictionaryDatum& d, Name const n, FT const& value )
    -{
    -  Token t = newToken2< FT, D >( value );
    -  d->insert_move( n, t );
    -}
    -
    -/** Define a new dictionary entry from a fundamental type.
    - * @ingroup DictUtils
    - * @throws TypeMismatch Creating a Token from the fundamental type failed,
    - *         probably due to a missing template specialization.
    - */
    -template < typename FT >
    -void
    -def( DictionaryDatum& d, Name const n, FT const& value )
    -{
    -  Token t( value ); // we hope that we have a constructor for this.
    -  d->insert_move( n, t );
    -}
    -
    -/** Update a variable from a dictionary entry if it exists, skip call if it
    - * doesn't.
    - * @note If the dictionary entry is an integer, use updateValue< long >.
    - * @ingroup DictUtils
    - * @throws see getValue(DictionaryDatum, Name)
    - */
    -template < typename FT, typename VT >
    -bool
    -updateValue( DictionaryDatum const& d, Name const n, VT& value )
    -{
    -  // We will test for the name, and do nothing if it does not exist,
    -  // instead of simply trying to getValue() it and catching a possible
    -  // exception. The latter works, however, but non-existing names are
    -  // the rule with updateValue(), not the exception, hence using the
    -  // exception mechanism would be inappropriate. (Markus pointed this
    -  // out, 05.02.2001, Ruediger.)
    -
    -  // We must take a reference, so that access information can be stored in the
    -  // token.
    -  const Token& t = d->lookup( n );
    -
    -  if ( t.empty() )
    -  {
    -    return false;
    -  }
    -
    -  value = getValue< FT >( t );
    -  return true;
    -}
    -
    -/** Call a member function of an object, passing the value of an dictionary
    - *  entry if it exists, skip call if it doesn't.
    - * @ingroup DictUtils
    - * @throws see getValue(DictionaryDatum, Name)
    - */
    -template < typename FT, typename VT, class C >
    -void
    -updateValue2( DictionaryDatum const& d, Name const n, C& obj, void ( C::*setfunc )( VT ) )
    -{
    -  if ( d->known( n ) ) // Does name exist in the dictionary?
    -  {
    -    // yes, call the function for update.
    -    ( obj.*setfunc )( getValue< FT >( d, n ) );
    -  }
    -}
    -
    -/** Create a property of type ArrayDatum in the dictionary, if it does not
    - * already exist.
    - * @ingroup DictUtils
    - */
    -void initialize_property_array( DictionaryDatum& d, Name propname );
    -
    -
    -/** Create a property of type DoubleVectorDatum in the dictionary, if it does
    - * not already exist.
    - * @ingroup DictUtils
    - */
    -void initialize_property_doublevector( DictionaryDatum& d, Name propname );
    -
    -
    -/** Create a property of type IntVectorDatum in the dictionary, if it does not
    - * already exist.
    - * @ingroup DictUtils
    - */
    -void initialize_property_intvector( DictionaryDatum& d, Name propname );
    -
    -
    -/** Append a value to a property ArrayDatum in the dictionary.
    - * This is the version for scalar values
    - * @ingroup DictUtils
    - */
    -template < typename PropT >
    -inline void
    -append_property( DictionaryDatum& d, Name propname, const PropT& prop )
    -{
    -  Token t = d->lookup( propname );
    -  assert( not t.empty() );
    -
    -  ArrayDatum* arrd = dynamic_cast< ArrayDatum* >( t.datum() );
    -  assert( arrd );
    -
    -  Token prop_token( prop );
    -  arrd->push_back_dont_clone( prop_token );
    -}
    -
    -/** Append a value to a property DoubleVectorDatum in the dictionary.
    - * This is a specialization for appending vector<double>s to vector<double>s
    - * @ingroup DictUtils
    - */
    -template <>
    -inline void
    -append_property< std::vector< double > >( DictionaryDatum& d, Name propname, const std::vector< double >& prop )
    -{
    -  Token t = d->lookup( propname );
    -  assert( not t.empty() );
    -
    -  DoubleVectorDatum* arrd = dynamic_cast< DoubleVectorDatum* >( t.datum() );
    -  assert( arrd );
    -
    -  ( *arrd )->insert( ( *arrd )->end(), prop.begin(), prop.end() );
    -}
    -
    -
    -/** Append a value to a property IntVectorDatum in the dictionary.
    - * This is a specialization for appending vector<long>s to vector<long>s
    - * @ingroup DictUtils
    - */
    -template <>
    -inline void
    -append_property< std::vector< long > >( DictionaryDatum& d, Name propname, const std::vector< long >& prop )
    -{
    -  Token t = d->lookup( propname );
    -  assert( not t.empty() );
    -
    -  IntVectorDatum* arrd = dynamic_cast< IntVectorDatum* >( t.datum() );
    -  assert( arrd );
    -
    -  ( *arrd )->insert( ( *arrd )->end(), prop.begin(), prop.end() );
    -}
    -
    -
    -/** Provide a value to a property DoubleVectorDatum in the dictionary.
    - * In contrast to append_property, this function adds the value only once
    - * to the property. On all subsequent events, it ensures that the value
    - * passed in is identical to the value present. This is needed by
    - * recording_decive.
    - * @ingroup DictUtils
    - */
    -void provide_property( DictionaryDatum&, Name, const std::vector< double >& );
    -
    -/** Provide a value to a property IntVectorDatum in the dictionary.
    - * In contrast to append_property, this function adds the value only once
    - * to the property. On all subsequent events, it ensures that the value
    - * passed in is identical to the value present. This is needed by
    - * recording_decive.
    - * @ingroup DictUtils
    - */
    -void provide_property( DictionaryDatum&, Name, const std::vector< long >& );
    -
    -
    -/** Add values of a vector<double> to a property DoubleVectorDatum in the
    - * dictionary. This variant of append_property is for adding vector<double>s to
    - * vector<double>s of the same size. It is required for collecting data across
    - * threads when multimeter is running in accumulation mode.
    - * @ingroup DictUtils
    - */
    -void accumulate_property( DictionaryDatum&, Name, const std::vector< double >& );
    -
    -#endif
    diff --git a/sli/doubledatum.cc b/sli/doubledatum.cc
    deleted file mode 100644
    index 4defd8d0a6..0000000000
    --- a/sli/doubledatum.cc
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  doubledatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "doubledatum.h"
    -
    -// C++ includes:
    -#include <iomanip>
    -
    -// initialization of static members requires template<>
    -// see Stroustrup C.13.1 --- HEP 2001-08-09
    -template <>
    -nest::pool NumericDatum< double, &SLIInterpreter::Doubletype >::memory( sizeof( DoubleDatum ), 1024, 1 );
    -
    -template <>
    -void
    -NumericDatum< double, &SLIInterpreter::Doubletype >::input_form( std::ostream& o ) const
    -{
    -  o.setf( std::ios::scientific );
    -  o << this->d;
    -  o.unsetf( std::ios::scientific );
    -}
    -
    -template <>
    -void
    -NumericDatum< double, &SLIInterpreter::Doubletype >::pprint( std::ostream& o ) const
    -{
    -  o.setf( std::ios::scientific );
    -  o << this->d;
    -  o.unsetf( std::ios::scientific );
    -}
    diff --git a/sli/doubledatum.h b/sli/doubledatum.h
    deleted file mode 100644
    index 0e926cc718..0000000000
    --- a/sli/doubledatum.h
    +++ /dev/null
    @@ -1,58 +0,0 @@
    -/*
    - *  doubledatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef DOUBLEDATUM_H
    -#define DOUBLEDATUM_H
    -/*
    -    class DoubleDatum
    -*/
    -
    -// Includes from sli:
    -#include "datum.h"
    -#include "interpret.h"
    -#include "numericdatum.h"
    -
    -
    -/* These are declarations to specialize the static memory pool BEFORE
    -   we instantiate the AggregateDatum. Note, that this is only a declaration,
    -   because we do not provide an initializer (see ISO14882 Sec.  14.7.3.15.)
    -   The definition is given in the *.CC file with the appropriate
    -   initializer.
    -
    -   Note that SUN's Forte 6.2 does not handle this correctly, so we have
    -   to use a compiler-switch. 1.2002 Gewaltig
    -
    -   The Alpha cxx V6.3-002 says that storage class extern is not allowed here,
    -   so I removed it. 15.2.2002 Diesmann
    -*/
    -#ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS
    -template <>
    -nest::pool NumericDatum< double, &SLIInterpreter::Doubletype >::memory;
    -#endif
    -
    -template <>
    -void NumericDatum< double, &SLIInterpreter::Doubletype >::input_form( std::ostream& ) const;
    -template <>
    -void NumericDatum< double, &SLIInterpreter::Doubletype >::pprint( std::ostream& ) const;
    -typedef NumericDatum< double, &SLIInterpreter::Doubletype > DoubleDatum;
    -
    -#endif
    diff --git a/sli/fdstream.cc b/sli/fdstream.cc
    deleted file mode 100644
    index e5279dee1c..0000000000
    --- a/sli/fdstream.cc
    +++ /dev/null
    @@ -1,158 +0,0 @@
    -/*
    - *  fdstream.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "fdstream.h"
    -
    -// Generated includes:
    -#include "config.h"
    -
    -#ifdef HAVE_ISTREAM
    -
    -std::streamsize const fdbuf::s_bufsiz;
    -
    -fdbuf*
    -fdbuf::open( const char* s, std::ios_base::openmode mode )
    -{
    -  if ( is_open() )
    -  {
    -    //      std::cerr<<"Is already open!"<<std::endl;
    -    return nullptr;
    -  }
    -  //  bool success=true;
    -
    -  int oflag;
    -  std::ios_base::openmode open_mode = ( mode & ~std::ios_base::ate & ~std::ios_base::binary );
    -
    -  // the corresponding O_*-flags are as described in Josuttis Chap. 13 (p.632)
    -  if ( open_mode == std::ios_base::out ) // corresponds to "w"
    -  {
    -    oflag = ( O_WRONLY | O_TRUNC | O_CREAT );
    -  }
    -  else if ( open_mode == ( std::ios_base::out | std::ios_base::app ) ) // corresponds to "a"
    -  {
    -    oflag = ( O_WRONLY | O_APPEND | O_CREAT );
    -  }
    -  else if ( open_mode == ( std::ios_base::out | std::ios_base::trunc ) ) // corresponds to "w"
    -  {
    -    oflag = ( O_WRONLY | O_TRUNC | O_CREAT );
    -  }
    -  else if ( open_mode == std::ios_base::in ) // corresponds to "r"
    -  {
    -    oflag = O_RDONLY;
    -  }
    -  else if ( open_mode == ( std::ios_base::in | std::ios_base::out ) ) // corresponds to "r+"
    -  {
    -    oflag = O_RDWR;
    -  }
    -  else if ( open_mode == ( std::ios_base::in | std::ios_base::out | std::ios_base::trunc ) ) // corresponds to "w+"
    -  {
    -    oflag = ( O_RDWR | O_TRUNC | O_CREAT );
    -  }
    -  else
    -  {
    -    // std::cerr<<"bad flags!"<<std::endl;
    -    return nullptr;
    -  }
    -
    -  // these file permissions are required by POSIX.1 (see Stevens 5.5)
    -  m_fd = ::open( s, oflag, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH );
    -
    -  if ( m_fd == -1 )
    -  {
    -    // std::cerr<<"::open failed!"<<std::endl;
    -    // perror(NULL);
    -    return nullptr;
    -  }
    -
    -  // beware of operator precedence --- HEP
    -  if ( ( mode & std::ios_base::ate ) != 0 )
    -  {
    -    if ( lseek( m_fd, 0, SEEK_END ) == -1 )
    -    {
    -      close();
    -      // std::cerr<<"seek failed!"<<std::endl;
    -      // perror(NULL);
    -      return nullptr;
    -    }
    -  }
    -
    -  m_isopen = true;
    -  return this;
    -}
    -
    -fdbuf*
    -fdbuf::close()
    -{
    -  if ( not is_open() )
    -  {
    -    // std::cerr<<"File was not open."<<std::endl;
    -    return nullptr;
    -  }
    -
    -  bool success = true;
    -
    -  if ( overflow( traits_type::eof() ) == traits_type::eof() )
    -  {
    -    // std::cerr<<"overflow failed!"<<std::endl;
    -    success = false;
    -  }
    -  if ( ::close( m_fd ) == -1 )
    -  {
    -    // std::cerr<<"::close failed: "<<std::endl;perror(NULL);
    -    success = false;
    -  }
    -
    -  m_isopen = false;
    -
    -  return ( success ? this : nullptr );
    -}
    -
    -void
    -ofdstream::close()
    -{
    -  if ( not rdbuf()->close() )
    -  {
    -    setstate( failbit );
    -  }
    -}
    -
    -
    -void
    -ifdstream::close()
    -{
    -  if ( not rdbuf()->close() )
    -  {
    -    setstate( failbit );
    -  }
    -}
    -
    -void
    -fdstream::close()
    -{
    -  if ( not rdbuf()->close() )
    -  {
    -    setstate( failbit );
    -  }
    -}
    -
    -
    -#endif
    diff --git a/sli/fdstream.h b/sli/fdstream.h
    deleted file mode 100644
    index 826f9d65c2..0000000000
    --- a/sli/fdstream.h
    +++ /dev/null
    @@ -1,357 +0,0 @@
    -/*
    - *  fdstream.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef FDSTREAM_H
    -#define FDSTREAM_H
    -
    -/** @file fdstream.h
    - *  An implementation of C++ filestreams that supports an interface to
    - *  the file descriptor.
    - */
    -
    -// Generated includes:
    -#include "config.h"
    -
    -#ifndef HAVE_ISTREAM
    -// C++ includes:
    -#include <fstream>
    -#include <iostream>
    -
    -typedef std::ifstream ifdstream;
    -typedef std::ofstream ofdstream;
    -typedef std::iostream fdstream;
    -#else
    -
    -// C includes:
    -#include <fcntl.h>
    -#include <sys/stat.h>
    -#include <sys/types.h>
    -#include <unistd.h>
    -
    -// C++ includes:
    -#include <cassert>
    -#include <cstdio> // for the parallel FILE* workaround.
    -#include <fstream>
    -#include <iostream>
    -#include <istream>
    -#include <ostream>
    -#include <streambuf>
    -#include <string>
    -
    -// The Compaq C++ compiler V6.5-014 surpresses all non standard
    -// names if compilation is performed with -std strict_ansi.
    -// However, fdopen() is POSIX and guaranteed to be available in
    -// <stdio.h>.
    -// The flag __PURE_CNAME is specific for the Compaq compiler.
    -// We need to add a workaround flag HAVE_FDOPEN_IGNORED here.
    -// 24.4.03, Diesmann
    -//
    -// Compaq C++ V6.5-040 required fdopen without :: here.  In fdstream.cc,
    -// ::fdopen is fine then.
    -// 28.6.04, Plesser
    -#ifdef __PURE_CNAME
    -extern "C" std::FILE* fdopen( int, const char* );
    -#endif
    -
    -
    -class fdbuf : public std::streambuf
    -{
    -  static std::streamsize const s_bufsiz = 1024;
    -
    -public:
    -  fdbuf()
    -    : m_fd( -1 )
    -    , m_isopen( false )
    -  {
    -    setp( m_outbuf, m_outbuf + s_bufsiz );
    -  }
    -
    -  fdbuf( int fd )
    -    : m_fd( fd )
    -    , m_isopen( true )
    -  {
    -    setp( m_outbuf, m_outbuf + s_bufsiz );
    -  }
    -
    -  ~fdbuf() override
    -  {
    -    // sync();
    -    close();
    -  }
    -
    -
    -  bool
    -  is_open() const
    -  {
    -    return m_isopen;
    -  }
    -
    -  fdbuf* open( const char*, std::ios_base::openmode );
    -
    -  fdbuf* close();
    -
    -  /** Return the underlying file descriptor.
    -   *  Now this is why we are doing all this!!
    -   */
    -  int
    -  fd()
    -  {
    -    return m_fd;
    -  }
    -
    -protected:
    -  int_type
    -  underflow() override
    -  {
    -    if ( gptr() == egptr() )
    -    {
    -      int size = ::read( m_fd, m_inbuf, s_bufsiz );
    -      if ( size < 1 )
    -      {
    -        return traits_type::eof();
    -      }
    -      setg( m_inbuf, m_inbuf, m_inbuf + size );
    -    }
    -    return traits_type::to_int_type( *gptr() );
    -  }
    -
    -  int_type
    -  overflow( int_type c ) override
    -  {
    -    if ( sync() == -1 )
    -    {
    -      // std::cerr<<"sync failed!"<<std::endl;
    -      return traits_type::eof();
    -    }
    -
    -    if ( not traits_type::eq_int_type( c, traits_type::eof() ) )
    -    {
    -      *pptr() = traits_type::to_char_type( c );
    -      pbump( 1 );
    -      return c;
    -    }
    -    return traits_type::not_eof( c );
    -  }
    -
    -  int
    -  sync() override
    -  {
    -    std::streamsize size = pptr() - pbase();
    -    if ( size > 0 and ::write( m_fd, m_outbuf, size ) != size )
    -    {
    -      return -1;
    -    }
    -    setp( m_outbuf, m_outbuf + s_bufsiz );
    -    return 0;
    -  }
    -
    -private:
    -  int m_fd;
    -  bool m_isopen;
    -  char m_inbuf[ s_bufsiz ];
    -  char m_outbuf[ s_bufsiz ];
    -};
    -
    -
    -class ofdstream : public std::ostream
    -{
    -public:
    -  /**
    -   * @note In this an all other constructors, we initialize the stream with
    -   *       a 0-pointer to a stream buffer first and then set the pointer through
    -   *       a call to rdbuf() in the constructor body. This is necessary because
    -   *       the stream buffer sb is constructed after the stream object, which
    -   *       is inherited from the base class. This causes problems at least when
    -   *       using the PGI compiler.
    -   */
    -
    -  ofdstream()
    -    : std::ostream( nullptr )
    -    , sb()
    -  {
    -    std::ostream::rdbuf( &sb );
    -    init( &sb );
    -  }
    -
    -  explicit ofdstream( const char* s, std::ios_base::openmode mode = std::ios_base::out )
    -    : std::ostream( nullptr )
    -    , sb()
    -  {
    -    std::ostream::rdbuf( &sb );
    -    init( &sb );
    -    assert( good() );
    -    open( s, mode );
    -  }
    -
    -  explicit ofdstream( int fd )
    -    : std::ostream( nullptr )
    -    , sb( fd )
    -  {
    -    std::ostream::rdbuf( &sb );
    -    init( &sb );
    -  }
    -
    -  fdbuf*
    -  rdbuf() const
    -  {
    -    // return type is non-const, member is const, by C++ specs!
    -    return const_cast< fdbuf* >( &sb );
    -  }
    -
    -  bool
    -  is_open()
    -  {
    -    return rdbuf()->is_open();
    -  }
    -
    -  void
    -  open( const char* s, std::ios_base::openmode mode = std::ios_base::out )
    -  {
    -    if ( not rdbuf()->open( s, mode | std::ios_base::out ) )
    -    {
    -      setstate( failbit );
    -    }
    -  }
    -
    -  void close();
    -
    -private:
    -  fdbuf sb;
    -};
    -
    -class ifdstream : public std::istream
    -{
    -public:
    -  ifdstream()
    -    : std::istream( nullptr )
    -    , sb()
    -  {
    -    std::istream::rdbuf( &sb );
    -    init( &sb );
    -  }
    -
    -  explicit ifdstream( const char* s, std::ios_base::openmode mode = std::ios_base::in )
    -    : std::istream( nullptr )
    -    , sb()
    -  {
    -    std::istream::rdbuf( &sb );
    -    init( &sb );
    -    open( s, mode );
    -  }
    -
    -  explicit ifdstream( int fd )
    -    : std::istream( nullptr )
    -    , sb( fd )
    -  {
    -    std::istream::rdbuf( &sb );
    -    init( &sb );
    -  }
    -
    -
    -  fdbuf*
    -  rdbuf() const
    -  {
    -    // return type is non-const, member is const, by C++ specs!
    -    return const_cast< fdbuf* >( &sb );
    -  }
    -
    -  bool
    -  is_open()
    -  {
    -    return rdbuf()->is_open();
    -  }
    -
    -  void
    -  open( const char* s, std::ios_base::openmode mode = std::ios_base::in )
    -  {
    -    if ( not rdbuf()->open( s, mode | std::ios_base::in ) )
    -    {
    -      setstate( failbit );
    -    }
    -  }
    -
    -  void close();
    -
    -private:
    -  fdbuf sb;
    -};
    -
    -class fdstream : public std::iostream
    -{
    -public:
    -  fdstream()
    -    : std::iostream( nullptr )
    -    , sb() // See Constructor comment above.
    -  {
    -    std::iostream::rdbuf( &sb );
    -    init( &sb ); // See Constructor comment above.
    -  }
    -
    -  explicit fdstream( const char* s, std::ios_base::openmode mode )
    -    : std::iostream( nullptr )
    -    , sb() // See Constructor comment above.
    -  {
    -    std::iostream::rdbuf( &sb );
    -    init( &sb ); // See Constructor comment above.
    -    open( s, mode );
    -  }
    -
    -  explicit fdstream( int fd )
    -    : // See Constructor comment above.
    -    std::iostream( nullptr )
    -    , sb( fd )
    -  {
    -    std::iostream::rdbuf( &sb );
    -    init( &sb ); // See Constructor comment above.
    -  }
    -
    -
    -  fdbuf*
    -  rdbuf() const
    -  {
    -    // return type is non-const, member is const, by C++ specs!
    -    return const_cast< fdbuf* >( &sb );
    -  }
    -
    -  bool
    -  is_open()
    -  {
    -    return rdbuf()->is_open();
    -  }
    -
    -  void
    -  open( const char* s, std::ios_base::openmode mode )
    -  {
    -    if ( not rdbuf()->open( s, mode ) )
    -    {
    -      setstate( failbit );
    -    }
    -  }
    -
    -  void close();
    -
    -private:
    -  fdbuf sb;
    -};
    -#endif
    -
    -#endif
    diff --git a/sli/filesystem.cc b/sli/filesystem.cc
    deleted file mode 100644
    index 64e22246e1..0000000000
    --- a/sli/filesystem.cc
    +++ /dev/null
    @@ -1,392 +0,0 @@
    -/*
    - *  filesystem.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "filesystem.h"
    -
    -// C includes:
    -#include <dirent.h>
    -#include <errno.h>
    -#include <stdlib.h>
    -#include <sys/stat.h>
    -#include <unistd.h>
    -
    -// C++ includes:
    -#include <cassert>
    -#include <ctime>
    -#include <fstream>
    -#include <mutex>
    -// Includes from libnestutil:
    -#include "compose.hpp"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "stringdatum.h"
    -
    -
    -void
    -FilesystemModule::init( SLIInterpreter* i )
    -{
    -  i->createcommand( "FileNames_", &filenamesfunction );
    -  i->createcommand( "SetDirectory_", &setdirectoryfunction );
    -  i->createcommand( "Directory", &directoryfunction );
    -  i->createcommand( "MoveFile_", &movefilefunction );
    -  i->createcommand( "CopyFile_", &copyfilefunction );
    -  i->createcommand( "DeleteFile_", &deletefilefunction );
    -  i->createcommand( "MakeDirectory_", &makedirectoryfunction );
    -  i->createcommand( "RemoveDirectory_", &removedirectoryfunction );
    -  i->createcommand( "tmpnam", &tmpnamfunction );
    -  i->createcommand( "CompareFiles_s_s", &comparefilesfunction );
    -}
    -
    -
    -const std::string
    -FilesystemModule::name() const
    -{
    -  return std::string( "Filesystem access" );
    -}
    -
    -const std::string
    -FilesystemModule::commandstring() const
    -{
    -  return std::string( "(filesystem.sli) run" );
    -}
    -
    -
    -void
    -FilesystemModule::FileNamesFunction::execute( SLIInterpreter* i ) const
    -{
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -
    -  DIR* TheDirectory = opendir( sd->c_str() );
    -  if ( TheDirectory )
    -  {
    -    ArrayDatum* a = new ArrayDatum();
    -    i->EStack.pop();
    -    i->OStack.pop();
    -    dirent* TheEntry;
    -    while ( ( TheEntry = readdir( TheDirectory ) ) )
    -    {
    -      Token string_token( new StringDatum( TheEntry->d_name ) );
    -      a->push_back_move( string_token );
    -    }
    -    Token array_token( a );
    -    i->OStack.push_move( array_token );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -FilesystemModule::SetDirectoryFunction::execute( SLIInterpreter* i ) const
    -// string -> boolean
    -{
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -  int s = chdir( sd->c_str() );
    -  i->OStack.pop();
    -  if ( not s )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    - Name: Directory - Return current working directory
    - Synopsis: Directory -> string
    - Description: Returns name of current working directory. This is where all ls,
    - filestream etc. operations are done per default.
    - Parameters: string : Name of current working directory
    - Examples: Directory = -> /home/MyAccount/SNiFF/synod2
    - Bugs: -
    - Author: Hehl
    - FirstVersion: Oct 12th 1999
    - Remarks:
    - SeeAlso: FileNames, SetDirectory, MakeDirectory, RemoveDirectory, cd, ls
    -*/
    -
    -void
    -FilesystemModule::DirectoryFunction::execute( SLIInterpreter* i ) const
    -{
    -  const int SIZE = 256; // incremental buffer size, somewhat arbitrary!
    -
    -  int size = SIZE;
    -  char* path_buffer = new char[ size ];
    -  while ( not getcwd( path_buffer, size - 1 ) )
    -  { // try again with a bigger buffer!
    -    if ( errno != ERANGE )
    -    {
    -      i->raiseerror( i->BadIOError ); // size wasn't reason
    -    }
    -    delete[] path_buffer;
    -    size += SIZE;
    -    path_buffer = new char[ size ];
    -    assert( path_buffer );
    -  }
    -  Token sd( new StringDatum( path_buffer ) );
    -  delete[]( path_buffer );
    -  i->OStack.push_move( sd );
    -  i->EStack.pop();
    -}
    -
    -void
    -FilesystemModule::MoveFileFunction::execute( SLIInterpreter* i ) const
    -// string string -> boolean
    -{
    -  StringDatum* src = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum* dst = dynamic_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( src );
    -  assert( dst );
    -  int s = link( src->c_str(), dst->c_str() );
    -  if ( not s )
    -  {
    -    s = unlink( src->c_str() );
    -    if ( s ) // failed to remove old link: undo everything
    -    {
    -      int t = unlink( dst->c_str() );
    -      assert( t == 0 ); // link was just created after all!
    -    };
    -  };
    -  i->OStack.pop( 2 );
    -  if ( not s )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  };
    -  i->EStack.pop();
    -}
    -
    -void
    -FilesystemModule::CopyFileFunction::execute( SLIInterpreter* i ) const
    -// string string -> -
    -{
    -  StringDatum* src = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum* dst = dynamic_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( src );
    -  assert( dst );
    -
    -  std::ofstream deststream( dst->c_str() );
    -  if ( not deststream )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "CopyFile", "Could not create destination file." );
    -    i->raiseerror( i->BadIOError );
    -    return;
    -  }
    -
    -  std::ifstream sourcestream( src->c_str() );
    -  if ( not sourcestream )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "CopyFile", "Could not open source file." );
    -    i->raiseerror( i->BadIOError );
    -    return;
    -  }
    -
    -  // copy while file in one call (see Josuttis chap 13.9 (File Access), p. 631)
    -  deststream << sourcestream.rdbuf();
    -
    -  if ( not deststream )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "CopyFile", "Error copying file." );
    -    i->raiseerror( i->BadIOError );
    -    return;
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -
    -} // closes files automatically
    -
    -
    -void
    -FilesystemModule::DeleteFileFunction::execute( SLIInterpreter* i ) const
    -// string -> boolean
    -{
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -  int s = unlink( sd->c_str() );
    -  i->OStack.pop();
    -  if ( not s )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  };
    -  i->EStack.pop();
    -}
    -
    -void
    -FilesystemModule::MakeDirectoryFunction::execute( SLIInterpreter* i ) const
    -// string -> Boolean
    -{
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -  int s = mkdir( sd->c_str(), S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP );
    -  i->OStack.pop();
    -  if ( not s )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  };
    -  i->EStack.pop();
    -}
    -
    -void
    -FilesystemModule::RemoveDirectoryFunction::execute( SLIInterpreter* i ) const
    -// string -> Boolean
    -{
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -  int s = rmdir( sd->c_str() );
    -  i->OStack.pop();
    -  if ( not s )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  };
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: tmpnam - Generate a string that is a valid non-existing file-name.
    -
    -   Synopsis: tpmnam -> filename
    -
    -   Description:
    -   This command is a thin wrapper around the POSIX.1 tmpnam() kernel function.
    -   The tmpnam function generates a string that is a valid filename and
    -   that is not the name of an existing file. The tmpnam function
    -   generates a different name each time it is called, (up to a number of
    -   times that is defined by the compiler macro TMP_MAX).
    -
    -   Author: R. Kupper
    -
    -   References: Donald Lewin, "The POSIX Programmer's Guide"
    -
    -*/
    -std::mutex mtx;
    -void
    -FilesystemModule::TmpNamFunction::execute( SLIInterpreter* i ) const
    -{
    -  std::lock_guard< std::mutex > lock( mtx );
    -  static unsigned int seed = std::time( nullptr );
    -  char* env = getenv( "TMPDIR" );
    -  std::string tmpdir( "/tmp" );
    -  if ( env )
    -  {
    -    tmpdir = std::string( env );
    -  }
    -
    -  std::string tempfile;
    -  do
    -  {
    -    int rng = rand_r( &seed );
    -    tempfile = tmpdir + String::compose( "/nest-tmp-%1", rng );
    -  } while ( std::ifstream( tempfile.c_str() ) );
    -
    -  Token filename_t( new StringDatum( tempfile ) );
    -
    -  i->OStack.push_move( filename_t );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: CompareFiles - Compare two files for equality.
    -
    -   Synopsis: filenameA filenameB CompareFiles -> bool
    -
    -   Description:
    -   This command compares the two files named and returns true if they
    -   have identical content. Files are read in binary mode. FileOpenError
    -   is raised if one of the files cannot be opened.
    -
    -   Author: Hans E Plesser
    -*/
    -void
    -FilesystemModule::CompareFilesFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  StringDatum const* const flA = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum const* const flB = dynamic_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( flA );
    -  assert( flB );
    -
    -  std::ifstream as( flA->c_str(), std::ifstream::in | std::ifstream::binary );
    -  std::ifstream bs( flB->c_str(), std::ifstream::in | std::ifstream::binary );
    -
    -  if ( not( as.good() and bs.good() ) )
    -  {
    -    as.close();
    -    bs.close();
    -    throw IOError();
    -  }
    -
    -  bool equal = true;
    -  while ( equal and as.good() and bs.good() )
    -  {
    -    const int ac = as.get();
    -    const int bc = bs.get();
    -
    -    if ( not( as.fail() or bs.fail() ) )
    -    {
    -      equal = ac == bc;
    -    }
    -  }
    -
    -  if ( as.fail() != bs.fail() )
    -  {
    -    equal = false; // different lengths
    -  }
    -
    -  as.close();
    -  bs.close();
    -
    -  i->OStack.pop( 2 );
    -  if ( equal )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -
    -  i->EStack.pop();
    -}
    diff --git a/sli/filesystem.h b/sli/filesystem.h
    deleted file mode 100644
    index e7768b74e1..0000000000
    --- a/sli/filesystem.h
    +++ /dev/null
    @@ -1,124 +0,0 @@
    -/*
    - *  filesystem.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef FILESYSTEM_H
    -#define FILESYSTEM_H
    -/**************************************
    -  Functions related to the filesystem.
    -  SLI's stream I/O functions are located in
    -  sli_io.h.
    -  *************************************/
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -#include "slimodule.h"
    -
    -
    -class FilesystemModule : public SLIModule
    -{
    -  class FileNamesFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class SetDirectoryFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class DirectoryFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class MoveFileFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class CopyFileFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class DeleteFileFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class MakeDirectoryFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class RemoveDirectoryFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class TmpNamFunction : public SLIFunction
    -  {
    -  public:
    -    TmpNamFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class CompareFilesFunction : public SLIFunction
    -  {
    -  public:
    -    CompareFilesFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -public:
    -  FileNamesFunction filenamesfunction;
    -  SetDirectoryFunction setdirectoryfunction;
    -  DirectoryFunction directoryfunction;
    -  MoveFileFunction movefilefunction;
    -  CopyFileFunction copyfilefunction;
    -  DeleteFileFunction deletefilefunction;
    -  MakeDirectoryFunction makedirectoryfunction;
    -  RemoveDirectoryFunction removedirectoryfunction;
    -  TmpNamFunction tmpnamfunction;
    -  CompareFilesFunction comparefilesfunction;
    -
    -  FilesystemModule() {};
    -  ~FilesystemModule() override {};
    -
    -  void init( SLIInterpreter* ) override;
    -  const std::string name() const override;
    -  const std::string commandstring() const override;
    -};
    -
    -#endif
    diff --git a/sli/functional.h b/sli/functional.h
    deleted file mode 100644
    index 68039b0cb5..0000000000
    --- a/sli/functional.h
    +++ /dev/null
    @@ -1,44 +0,0 @@
    -/*
    - *  functional.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef FUNCTIONAL_H
    -#define FUNCTIONAL_H
    -
    -// template<class T>
    -// T delete_ptr(T p)
    -// {
    -//   delete p;
    -//   return 0;
    -// }
    -
    -template < class T >
    -class delete_ptr
    -{
    -public:
    -  T*
    -  operator()( T* p )
    -  {
    -    delete p;
    -    return 0;
    -  }
    -};
    -#endif
    diff --git a/sli/functiondatum.cc b/sli/functiondatum.cc
    deleted file mode 100644
    index c6b96c3ca8..0000000000
    --- a/sli/functiondatum.cc
    +++ /dev/null
    @@ -1,31 +0,0 @@
    -/*
    - *  functiondatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "functiondatum.h"
    -
    -nest::pool FunctionDatum::memory( sizeof( FunctionDatum ), 1024, 1 );
    -
    -void
    -FunctionDatum::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  action->backtrace( i, p );
    -}
    diff --git a/sli/functiondatum.h b/sli/functiondatum.h
    deleted file mode 100644
    index 87ce1e9b62..0000000000
    --- a/sli/functiondatum.h
    +++ /dev/null
    @@ -1,183 +0,0 @@
    -/*
    - *  functiondatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef FUNCTIONDATUM_H
    -#define FUNCTIONDATUM_H
    -/*
    -    Datum class for SLI builtin functions.
    -*/
    -
    -// Includes from libnestutil:
    -#include "allocator.h"
    -
    -// Includes from sli:
    -#include "datum.h"
    -#include "interpret.h"
    -#include "slifunction.h"
    -
    -/*
    -  Each SLI command is represented by a derived class of class SLIFunction.
    -  For each command, the constructor of the interpreter must then create
    -  a SLIDatum object from a given name (e.g. "add") and a const & to
    -  an instance of the derived SLIFunction (e.g. AddFunction). This new
    -  datum object must then be registered in the dictionary (hopefully
    -  by the same name as before).
    - */
    -
    -class FunctionDatum : public TypedDatum< &SLIInterpreter::Functiontype >
    -{
    -  static nest::pool memory;
    -
    -  Name name;
    -
    -  /** If not empty string, it should contain string with version for which
    -   *  feature is deprecated.
    -   */
    -  std::string deprecation_info_;
    -  bool deprecation_warning_issued_;
    -
    -  Datum*
    -  clone() const override
    -  {
    -    return new FunctionDatum( *this );
    -  }
    -
    -  Datum*
    -  get_ptr() override
    -  {
    -    Datum::addReference();
    -    return this;
    -  }
    -
    -  SLIFunction const&
    -  operator=( SLIFunction const& f )
    -  {
    -    std::cerr << "Warning: Definition of FunctionDatum (" << name << ") changed!!\n";
    -
    -    action = &f;
    -    return f;
    -  }
    -
    -public:
    -  FunctionDatum( FunctionDatum const& fd )
    -    : TypedDatum< &SLIInterpreter::Functiontype >( fd )
    -    , name( fd.name )
    -    , deprecation_info_( fd.deprecation_info_ )
    -    , deprecation_warning_issued_( false )
    -  {
    -    set_executable();
    -  }
    -
    -  FunctionDatum( Name const& n, SLIFunction const* f, const std::string& deprecation_info )
    -    : TypedDatum< &SLIInterpreter::Functiontype >()
    -    , name( n )
    -    , deprecation_info_( deprecation_info )
    -    , deprecation_warning_issued_( false )
    -  {
    -    //! Here, we shortcut the default action of the type object and directly
    -    //! place the function pointer in the datum's action field. Thus, we
    -    //! avoid an extra virtual function call.
    -    action = f;
    -    set_executable();
    -  }
    -
    -  void
    -  execute( SLIInterpreter* i ) override
    -  {
    -    if ( not( deprecation_warning_issued_ or deprecation_info_.empty() ) )
    -    {
    -      i->message( SLIInterpreter::M_DEPRECATED,
    -        "SLIInterpreter",
    -        ( "SLI function " + name.toString() + " is deprecated in " + deprecation_info_ + "." ).c_str() );
    -      deprecation_warning_issued_ = true;
    -    }
    -
    -    action->execute( i );
    -  }
    -
    -  void
    -  print( std::ostream& o ) const override
    -  {
    -    o << '-' << name << '-';
    -  }
    -
    -  void
    -  pprint( std::ostream& o ) const override
    -  {
    -    print( o );
    -  }
    -
    -  void
    -  info( std::ostream& out ) const override
    -  {
    -    out << "FunctionDatum::info\n";
    -    out << "name = " << name << std::endl;
    -  }
    -
    -  bool
    -  equals( Datum const* dat ) const override
    -  {
    -    const FunctionDatum* fd = dynamic_cast< FunctionDatum* >( const_cast< Datum* >( dat ) );
    -    if ( not fd )
    -    {
    -      return false;
    -    }
    -
    -    return action == fd->action;
    -  }
    -
    -  const Name&
    -  getname() const
    -  {
    -    return name;
    -  }
    -
    -  void backtrace( SLIInterpreter*, int ) const;
    -
    -  static void*
    -  operator new( size_t size )
    -  {
    -    if ( size != sizeof( FunctionDatum ) )
    -    {
    -      return ::operator new( size );
    -    }
    -    return memory.alloc();
    -  }
    -
    -  static void
    -  operator delete( void* p, size_t size )
    -  {
    -    if ( not p )
    -    {
    -      return;
    -    }
    -    if ( size != sizeof( FunctionDatum ) )
    -    {
    -      ::operator delete( p );
    -      return;
    -    }
    -    memory.free( p );
    -  }
    -};
    -
    -
    -#endif
    diff --git a/sli/genericdatum.h b/sli/genericdatum.h
    deleted file mode 100644
    index dc6847d5f3..0000000000
    --- a/sli/genericdatum.h
    +++ /dev/null
    @@ -1,129 +0,0 @@
    -/*
    - *  genericdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef GENERICDATUM_H
    -#define GENERICDATUM_H
    -/*
    -    Datum template for generic C/C++ data types
    -*/
    -
    -// Includes from sli:
    -#include "datum.h"
    -
    -/***********************************************************/
    -/* Concrete  Generic Data Objects                          */
    -/***********************************************************/
    -
    -template < class D, SLIType* slt >
    -class GenericDatum : public TypedDatum< slt >
    -{
    -
    -  virtual Datum*
    -  clone() const
    -  {
    -    return new GenericDatum< D, slt >( *this );
    -  }
    -
    -protected:
    -  D d;
    -
    -public:
    -  GenericDatum()
    -  {
    -    TypedDatum< slt >::unset_executable();
    -  }
    -  virtual ~GenericDatum()
    -  {
    -  }
    -
    -  GenericDatum( const D& d_s )
    -    : d( d_s )
    -  {
    -    TypedDatum< slt >::unset_executable();
    -  }
    -
    -  GenericDatum( const GenericDatum< D, slt >& gd ) = default;
    -
    -  const D&
    -  operator=( const D& d_s )
    -  {
    -    d = d_s;
    -    return d;
    -  }
    -
    -  const D&
    -  get() const
    -  {
    -    return d;
    -  }
    -
    -  D&
    -  get()
    -  {
    -    return d;
    -  }
    -
    -  D&
    -  get_lval()
    -  {
    -    return d;
    -  }
    -
    -  void
    -  print( std::ostream& o ) const
    -  {
    -    o << d;
    -  }
    -
    -  void
    -  pprint( std::ostream& o ) const
    -  {
    -    o << d;
    -  }
    -
    -  void
    -  info( std::ostream& out ) const
    -  {
    -    out << "GenericDatum<D,slt>::info\n";
    -    out << "d = " << d << std::endl;
    -  }
    -
    -  bool
    -  equals( const Datum* dat ) const
    -  {
    -    const GenericDatum< D, slt >* ddc = dynamic_cast< GenericDatum< D, slt >* >( const_cast< Datum* >( dat ) );
    -
    -    //    std::cerr << "d = " << d << " ddc = " << ddc << " dat = " << dat <<
    -    //    std::endl;
    -    if ( not ddc )
    -    {
    -      return false;
    -    }
    -
    -    return d == ddc->d;
    -  }
    -};
    -
    -
    -/******************************************/
    -
    -#endif
    diff --git a/sli/get_mem.c b/sli/get_mem.c
    deleted file mode 100644
    index 67aa22b5c5..0000000000
    --- a/sli/get_mem.c
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  get_mem.c
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -// C includes:
    -#include <assert.h>
    -
    -
    -#if defined __APPLE__ && defined HAVE_MACH_MACH_H
    -#include <mach/mach.h>
    -unsigned long
    -darwin_get_used_mem()
    -{
    -  struct task_basic_info t_info;
    -  mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT;
    -
    -  kern_return_t result = task_info( mach_task_self(), TASK_BASIC_INFO, ( task_info_t ) &t_info, &t_info_count );
    -  assert( result == KERN_SUCCESS || "Problem occured during getting of task_info." );
    -  return t_info.resident_size;
    -}
    -#else
    -
    -unsigned long
    -darwin_get_used_mem()
    -{
    -  assert( 0 || "Only implemented on Darwin/Apple with mach/mach.h available." );
    -  return 0;
    -}
    -
    -#endif
    diff --git a/sli/gnureadline.cc b/sli/gnureadline.cc
    deleted file mode 100644
    index 394645e0e0..0000000000
    --- a/sli/gnureadline.cc
    +++ /dev/null
    @@ -1,128 +0,0 @@
    -/*
    - *  gnureadline.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "gnureadline.h"
    -
    -// C++ includes:
    -#include <algorithm>
    -#include <cstdio>
    -
    -// Includes from sli:
    -#include "stringdatum.h"
    -
    -#ifdef HAVE_READLINE
    -
    -extern "C" char* readline( const char* );
    -extern "C" void add_history( const char* );
    -extern "C" int read_history( const char* );
    -extern "C" int write_history( const char* );
    -extern "C" void using_history();
    -extern "C" void clear_history();
    -
    -/** @BeginDocumentation
    -Name: GNUreadline - Read and edit a line from standard input
    -Synopsis: (prompt) GNUreadline -> (string) true
    -                               -> false
    -Description: GNUreadline offers an interface to the GNU readline library.
    -It offers - line editing
    -          - history browsing
    -          - filename completion (with TAB)
    -Remarks: If GNUreadline is executed with a number, the Interpreter is exited
    -(in contrast to readline).
    -SeeAlso: readline, GNUaddhistory
    -*/
    -void
    -GNUReadline::GNUReadlineFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  i->EStack.pop();
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -  char* line_read = readline( sd->c_str() );
    -  if ( not line_read )
    -  {
    -    // We have received EOF (Ctrl-D), so we quit.
    -    std::cout << std::endl;
    -    Token t( "quit" );
    -    i->OStack.top().swap( t );
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    StringDatum* sr = new StringDatum( line_read );
    -    std::free( line_read );
    -    if ( sr->empty() )
    -    {
    -      i->OStack.pop();
    -      i->OStack.push( i->baselookup( i->false_name ) );
    -    }
    -    else
    -    {
    -      Token t( sr );
    -      i->OStack.top().swap( t );
    -      i->OStack.push( i->baselookup( i->true_name ) );
    -    }
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: GNUaddhistory - Add a string to the readline-history
    -Synopsis: (string) GRNUaddhistory -> -
    -Description: Adds a string to the readline history.
    -SeeAlso: GNUreadline
    -*/
    -void
    -GNUReadline::GNUAddhistoryFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  i->EStack.pop();
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -  add_history( sd->c_str() );
    -  char* home = std::getenv( "HOME" );
    -  std::string hist_file = std::string( home ) + std::string( "/.nest_history" );
    -
    -  // We write the history after _each_ command. This comes in handy if you
    -  // experience a crash during a long interactive session.
    -  write_history( hist_file.c_str() );
    -  i->OStack.pop();
    -}
    -
    -
    -GNUReadline::~GNUReadline()
    -{
    -  clear_history();
    -}
    -
    -void
    -GNUReadline::init( SLIInterpreter* i )
    -{
    -  i->createcommand( "GNUreadline", &gnureadlinefunction );
    -  i->createcommand( "GNUaddhistory", &gnuaddhistoryfunction );
    -  using_history();
    -  char* home = std::getenv( "HOME" );
    -  std::string hist_file = std::string( home ) + std::string( "/.nest_history" );
    -  read_history( hist_file.c_str() );
    -}
    -
    -#endif // HAVE_READLINE
    diff --git a/sli/gnureadline.h b/sli/gnureadline.h
    deleted file mode 100644
    index 7a7d9580cb..0000000000
    --- a/sli/gnureadline.h
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/*
    - *  gnureadline.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef GNUREADLINE_H
    -#define GNUREADLINE_H
    -
    -// Generated includes:
    -#include "config.h"
    -
    -#ifdef HAVE_READLINE
    -
    -// Includes from sli:
    -#include "slimodule.h"
    -#include "slitype.h"
    -
    -class GNUReadline : public SLIModule
    -{
    -public:
    -  GNUReadline()
    -  {
    -  }
    -  ~GNUReadline() override;
    -
    -  const std::string
    -  name() const override
    -  {
    -    return "GNUReadline";
    -  }
    -
    -  void init( SLIInterpreter* ) override;
    -
    -  class GNUReadlineFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class GNUAddhistoryFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  GNUReadlineFunction gnureadlinefunction;
    -  GNUAddhistoryFunction gnuaddhistoryfunction;
    -};
    -
    -#endif // HAVE_READLINE
    -
    -#endif
    diff --git a/sli/integerdatum.cc b/sli/integerdatum.cc
    deleted file mode 100644
    index e00b6db981..0000000000
    --- a/sli/integerdatum.cc
    +++ /dev/null
    @@ -1,28 +0,0 @@
    -/*
    - *  integerdatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "integerdatum.h"
    -
    -// initialization of static members requires template<>
    -// see Stroustrup C.13.1 --- HEP 2001-08-09
    -template <>
    -nest::pool NumericDatum< long, &SLIInterpreter::Integertype >::memory( sizeof( IntegerDatum ), 10240, 1 );
    diff --git a/sli/integerdatum.h b/sli/integerdatum.h
    deleted file mode 100644
    index 779e85b4aa..0000000000
    --- a/sli/integerdatum.h
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -/*
    - *  integerdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef INTEGERDATUM_H
    -#define INTEGERDATUM_H
    -/*
    -    class IntegerDatum
    -*/
    -
    -// Includes from sli:
    -#include "interpret.h"
    -#include "numericdatum.h"
    -
    -
    -/* These are declarations to specialize the static memory pool BEFORE
    -   we instantiate the AggregateDatum. Note, that this is only a declaration,
    -   because we do not provide an initializer (see ISO14882 Sec.  14.7.3.15.)
    -   The definition is given in the *.CC file with the appropriate
    -   initializer.
    -
    -   Note that SUN's Forte 6.2 does not handle this correctly, so we have
    -   to use a compiler-switch. 1.2002 Gewaltig
    -
    -   The Alpha cxx V6.3-002 says that storage class extern is not allowed here,
    -   so I removed it. 15.2.2002 Diesmann
    -*/
    -#ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS
    -template <>
    -nest::pool NumericDatum< long, &SLIInterpreter::Integertype >::memory;
    -#endif
    -
    -typedef NumericDatum< long, &SLIInterpreter::Integertype > IntegerDatum;
    -
    -#endif
    diff --git a/sli/interpret.cc b/sli/interpret.cc
    deleted file mode 100644
    index 76d6df393b..0000000000
    --- a/sli/interpret.cc
    +++ /dev/null
    @@ -1,1363 +0,0 @@
    -/*
    - *  interpret.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    Definitions for the SLI Interpreter class
    -*/
    -
    -#include "interpret.h"
    -
    -// C++ includes:
    -#include <algorithm>
    -#include <ctime>
    -#include <exception>
    -#include <fstream>
    -#include <sstream>
    -#include <string>
    -
    -// Includes from libnestutil:
    -#include "compose.hpp"
    -#include "numerics.h"
    -
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictstack.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "functional.h"
    -#include "functiondatum.h"
    -#include "integerdatum.h"
    -#include "iostreamdatum.h"
    -#include "namedatum.h"
    -#include "parser.h"
    -#include "stringdatum.h"
    -#include "triedatum.h"
    -
    -// This function is the only interface to the driver program
    -extern void init_slidict( SLIInterpreter* );
    -extern void init_slicontrol( SLIInterpreter* );
    -extern void init_sli_io( SLIInterpreter* );
    -extern void init_slistack( SLIInterpreter* );
    -extern void init_slimath( SLIInterpreter* );
    -extern void init_slitypecheck( SLIInterpreter* );
    -extern void init_slidata( SLIInterpreter* );
    -extern void init_slistring( SLIInterpreter* );
    -
    -
    -const int SLIInterpreter::M_ALL = 0;
    -const int SLIInterpreter::M_DEBUG = 5;
    -const int SLIInterpreter::M_STATUS = 7;
    -const int SLIInterpreter::M_INFO = 10;
    -const int SLIInterpreter::M_PROGRESS = 15;
    -const int SLIInterpreter::M_DEPRECATED = 18;
    -const int SLIInterpreter::M_WARNING = 20;
    -const int SLIInterpreter::M_ERROR = 30;
    -const int SLIInterpreter::M_FATAL = 40;
    -const int SLIInterpreter::M_QUIET = 100;
    -
    -const char* const SLIInterpreter::M_ALL_NAME = "";
    -const char* const SLIInterpreter::M_DEBUG_NAME = "Debug";
    -const char* const SLIInterpreter::M_STATUS_NAME = "Status";
    -const char* const SLIInterpreter::M_INFO_NAME = "Info";
    -const char* const SLIInterpreter::M_PROGRESS_NAME = "Progress";
    -const char* const SLIInterpreter::M_DEPRECATED_NAME = "Deprecated";
    -const char* const SLIInterpreter::M_WARNING_NAME = "Warning";
    -const char* const SLIInterpreter::M_ERROR_NAME = "Error";
    -const char* const SLIInterpreter::M_FATAL_NAME = "Fatal";
    -const char* const SLIInterpreter::M_QUIET_NAME = "";
    -
    -
    -SLIType SLIInterpreter::Integertype;
    -SLIType SLIInterpreter::Doubletype;
    -SLIType SLIInterpreter::Stringtype;
    -SLIType SLIInterpreter::Nametype;
    -SLIType SLIInterpreter::Booltype;
    -SLIType SLIInterpreter::Literaltype;
    -SLIType SLIInterpreter::Arraytype;
    -SLIType SLIInterpreter::Proceduretype;
    -SLIType SLIInterpreter::Litproceduretype;
    -SLIType SLIInterpreter::Dictionarytype;
    -SLIType SLIInterpreter::Symboltype;
    -SLIType SLIInterpreter::Functiontype;
    -SLIType SLIInterpreter::Trietype;
    -SLIType SLIInterpreter::Callbacktype;
    -SLIType SLIInterpreter::Istreamtype;
    -SLIType SLIInterpreter::XIstreamtype;
    -SLIType SLIInterpreter::Ostreamtype;
    -SLIType SLIInterpreter::IntVectortype;
    -SLIType SLIInterpreter::DoubleVectortype;
    -
    -// SLIType SLIInterpreter::IOstreamtype;
    -
    -// SLIType default actions
    -
    -DatatypeFunction SLIInterpreter::datatypefunction;
    -NametypeFunction SLIInterpreter::nametypefunction;
    -ProceduretypeFunction SLIInterpreter::proceduretypefunction;
    -LitproceduretypeFunction SLIInterpreter::litproceduretypefunction;
    -FunctiontypeFunction SLIInterpreter::functiontypefunction;
    -TrietypeFunction SLIInterpreter::trietypefunction;
    -CallbacktypeFunction SLIInterpreter::callbacktypefunction;
    -XIstreamtypeFunction SLIInterpreter::xistreamtypefunction;
    -
    -// Basic Operations needed to run the default actions
    -
    -const IlookupFunction SLIInterpreter::ilookupfunction;
    -const IsetcallbackFunction SLIInterpreter::isetcallbackfunction;
    -const IiterateFunction SLIInterpreter::iiteratefunction;
    -const IloopFunction SLIInterpreter::iloopfunction;
    -const IrepeatFunction SLIInterpreter::irepeatfunction;
    -const IforFunction SLIInterpreter::iforfunction;
    -const IforallarrayFunction SLIInterpreter::iforallarrayfunction;
    -const IforallindexedarrayFunction SLIInterpreter::iforallindexedarrayfunction;
    -const IforallindexedstringFunction SLIInterpreter::iforallindexedstringfunction;
    -const IforallstringFunction SLIInterpreter::iforallstringfunction;
    -
    -void
    -SLIInterpreter::inittypes()
    -{
    -  Integertype.settypename( "integertype" );
    -  Integertype.setdefaultaction( datatypefunction );
    -  Doubletype.settypename( "doubletype" );
    -  Doubletype.setdefaultaction( datatypefunction );
    -  Stringtype.settypename( "stringtype" );
    -  Stringtype.setdefaultaction( datatypefunction );
    -  Nametype.settypename( "nametype" );
    -  Nametype.setdefaultaction( nametypefunction );
    -  Booltype.settypename( "booltype" );
    -  Booltype.setdefaultaction( datatypefunction );
    -  Literaltype.settypename( "literaltype" );
    -  Literaltype.setdefaultaction( datatypefunction );
    -  Arraytype.settypename( "arraytype" );
    -  Arraytype.setdefaultaction( datatypefunction );
    -  Proceduretype.settypename( "proceduretype" );
    -  Proceduretype.setdefaultaction( proceduretypefunction );
    -  Litproceduretype.settypename( "literalproceduretype" );
    -  Litproceduretype.setdefaultaction( litproceduretypefunction );
    -  Dictionarytype.settypename( "dictionarytype" );
    -  Dictionarytype.setdefaultaction( datatypefunction );
    -  Symboltype.settypename( "symboltype" );
    -  Symboltype.setdefaultaction( datatypefunction );
    -  Functiontype.settypename( "functiontype" );
    -  Functiontype.setdefaultaction( functiontypefunction );
    -  Trietype.settypename( "trietype" );
    -  Trietype.setdefaultaction( trietypefunction );
    -  Callbacktype.settypename( "callbacktype" );
    -  Callbacktype.setdefaultaction( callbacktypefunction );
    -  Istreamtype.settypename( "istreamtype" );
    -  Istreamtype.setdefaultaction( datatypefunction );
    -  XIstreamtype.settypename( "xistreamtype" );
    -  XIstreamtype.setdefaultaction( xistreamtypefunction );
    -  Ostreamtype.settypename( "ostreamtype" );
    -  Ostreamtype.setdefaultaction( datatypefunction );
    -  IntVectortype.settypename( "intvectortype" );
    -  IntVectortype.setdefaultaction( datatypefunction );
    -  DoubleVectortype.settypename( "doublevectortype" );
    -  DoubleVectortype.setdefaultaction( datatypefunction );
    -}
    -
    -void
    -SLIInterpreter::initdictionaries()
    -{
    -  assert( not DStack );
    -
    -  DStack = new DictionaryStack();
    -  assert( DStack );
    -
    -  errordict = new Dictionary();
    -  DictionaryDatum sysdict( new Dictionary() );
    -  DictionaryDatum userdict( new Dictionary() );
    -
    -  DStack->push( sysdict );
    -  DStack->set_basedict();
    -
    -  def( errordict_name, DictionaryDatum( errordict ) );
    -  def( systemdict_name, sysdict );
    -  def( userdict_name, userdict );
    -  def( "statusdict", DictionaryDatum( statusdict ) );
    -}
    -
    -void
    -SLIInterpreter::initbuiltins()
    -{
    -
    -  createcommand( ilookup_name, &SLIInterpreter::ilookupfunction );
    -  createcommand( ipop_name, &SLIInterpreter::ilookupfunction );
    -  createcommand( isetcallback_name, &SLIInterpreter::isetcallbackfunction );
    -  createcommand( iiterate_name, &SLIInterpreter::iiteratefunction );
    -  createcommand( iloop_name, &SLIInterpreter::iloopfunction );
    -  createcommand( irepeat_name, &SLIInterpreter::irepeatfunction );
    -  createcommand( ifor_name, &SLIInterpreter::iforfunction );
    -  createcommand( iforallarray_name, &SLIInterpreter::iforallarrayfunction );
    -  createcommand( iforallindexedstring_name, &SLIInterpreter::iforallindexedstringfunction );
    -  createcommand( iforallindexedarray_name, &SLIInterpreter::iforallindexedarrayfunction );
    -  createcommand( iforallstring_name, &SLIInterpreter::iforallstringfunction );
    -
    -  createdouble( pi_name, numerics::pi );
    -  createdouble( e_name, numerics::e );
    -}
    -
    -void
    -SLIInterpreter::initexternals()
    -{
    -  init_slidict( this );
    -  init_slicontrol( this );
    -  init_sli_io( this );
    -  init_slistack( this );
    -  init_slimath( this );
    -  init_slitypecheck( this );
    -  init_slidata( this );
    -  init_slistring( this );
    -
    -  ArrayDatum* ad = new ArrayDatum();
    -  Token at( ad );
    -  def_move( commandstring_name, at );
    -}
    -
    -/**************************************
    -  The interpreter's dictionary stack is accessed through member functions
    -  of the interpreter. This is a slight inconsistency with the way the
    -  other stacks are accessed, however,  class DictionaryStack has
    -  to know class Interpreter. Thous, the dictionary stack is allocated on the
    -  free storage.
    -****************************************/
    -
    -FunctionDatum*
    -SLIInterpreter::Ilookup() const
    -{
    -  return new FunctionDatum( ilookup_name, &SLIInterpreter::ilookupfunction, "" );
    -}
    -
    -FunctionDatum*
    -SLIInterpreter::Iiterate() const
    -{
    -  return new FunctionDatum( iiterate_name, &SLIInterpreter::iiteratefunction, "" );
    -}
    -
    -void
    -SLIInterpreter::createdouble( Name const& n, double d )
    -{
    -  Token t( new DoubleDatum( d ) );
    -  DStack->def_move( n, t );
    -}
    -
    -/** Define a function in the current dictionary.
    - *  This function defines a SLI function in the current dictionary.
    - *  Note that you may also pass a string as the first argument, as
    - *  there is an implicit type conversion operator from string to Name.
    - *  Use the Name when a name object for this function already
    - *  exists.
    - */
    -void
    -SLIInterpreter::createcommand( Name const& n, SLIFunction const* fn, std::string deprecation_info )
    -{
    -  if ( DStack->known( n ) )
    -  {
    -    throw NamingConflict("A function called '" + std::string(n.toString())
    -                         + "' exists already.\n"
    -                         "Please choose a different name!");
    -  }
    -
    -  Token t( new FunctionDatum( n, fn, deprecation_info ) );
    -  DStack->def_move( n, t );
    -}
    -
    -/** Define a constant in the current dictionary.
    - *  This function defines a SLI constant in the current dictionary.
    - *  Note that you may also pass a string as the first argument, as
    - *  there is an implicit type conversion operator from string to Name.
    - *  Use the Name when a name object for this function already
    - *  exists.
    - */
    -void
    -SLIInterpreter::createconstant( Name const& n, Token const& val )
    -{
    -  Token t( val );
    -  DStack->def_move( n, t );
    -}
    -
    -const Token&
    -SLIInterpreter::lookup( const Name& n ) const
    -{
    -  return DStack->lookup( n );
    -}
    -
    -const Token&
    -SLIInterpreter::lookup2( const Name& n ) const
    -{
    -  return DStack->lookup2( n );
    -}
    -
    -const Token&
    -SLIInterpreter::baselookup( const Name& n ) const
    -{
    -  return DStack->baselookup( n );
    -}
    -
    -bool
    -SLIInterpreter::known( const Name& n ) const
    -{
    -  return DStack->known( n );
    -}
    -
    -bool
    -SLIInterpreter::baseknown( const Name& n ) const
    -{
    -  return DStack->baseknown( n );
    -}
    -
    -void
    -SLIInterpreter::def( Name const& n, Token const& t )
    -{
    -  DStack->def( n, t );
    -}
    -
    -void
    -SLIInterpreter::undef( Name const& n )
    -{
    -  DStack->undef( n );
    -}
    -
    -void
    -SLIInterpreter::basedef( Name const& n, Token const& t )
    -{
    -  DStack->basedef( n, t );
    -}
    -
    -void
    -SLIInterpreter::def_move( Name const& n, Token& t )
    -{
    -  DStack->def_move( n, t );
    -}
    -
    -void
    -SLIInterpreter::basedef_move( Name const& n, Token& t )
    -{
    -  DStack->basedef_move( n, t );
    -}
    -
    -SLIInterpreter::SLIInterpreter()
    -  : debug_mode_( false )
    -  , show_stack_( false )
    -  , show_backtrace_( false )
    -  , catch_errors_( false )
    -  , opt_tailrecursion_( true )
    -  , call_depth_( 0 )
    -  , max_call_depth_( 10 )
    -  , cycle_count( 0 )
    -  , cycle_guard( false )
    -  , cycle_restriction( 0 )
    -  , verbositylevel( M_INFO )
    -  , statusdict( nullptr )
    -  , errordict( nullptr )
    -  , DStack( nullptr )
    -  , parse( nullptr )
    -  , ilookup_name( "::lookup" )
    -  , ipop_name( "::pop" )
    -  , isetcallback_name( "::setcallback" )
    -  , iiterate_name( "::executeprocedure" )
    -  , iloop_name( "::loop" )
    -  , irepeat_name( "::repeat" )
    -  , ifor_name( "::for" )
    -  , iforallarray_name( "::forall_a" )
    -  , iforallindexedarray_name( "::forallindexed_a" )
    -  , iforallindexedstring_name( "::forallindexed_s" )
    -  , iforallstring_name( "::forall_s" )
    -
    -  /** @BeginDocumentation
    -   Name: Pi - Value of the constant Pi= 3.1415...
    -   Synopsis:  Pi -> double
    -   Description: Pi yields an approximation with a precision of 12 digits.
    -   Author: Diesmann, Hehl
    -   FirstVersion: 10.6.99
    -   References:
    -   SeeAlso: E, sin, cos
    -  */
    -
    -  , pi_name( "Pi" )
    -
    -  /** @BeginDocumentation
    -   Name: E - Value of the Euler constant E=2.718...
    -   Synopsis:  E -> double
    -   Description: E is the result of the builtin function std::exp(1).
    -   The precision of this value is therefore system-dependent.
    -
    -   Author: Diesmann, Hehl
    -   FirstVersion: 10.6.99
    -   SeeAlso: exp
    -  */
    -
    -  , e_name( "E" )
    -  , iparse_name( "::parse" )
    -  , stop_name( "stop" )
    -  , end_name( "end" )
    -  , null_name( "null" )
    -  , true_name( "true" )
    -  , false_name( "false" )
    -  , mark_name( "mark" )
    -  , istopped_name( "::stopped" )
    -  , systemdict_name( "systemdict" )
    -  , userdict_name( "userdict" )
    -
    -  /** @BeginDocumentation
    -   Name: errordict - pushes error dictionary on operand stack
    -   Synopsis: errordict -> dict
    -   Description:
    -    Pushes the dictionary object errordict on the operand stack.
    -    errordict is not an operator; it is a name in systemdict associated
    -    with the dictionary object.
    -
    -    The flag newerror helps to distinguish
    -    between interrupts caused by call of
    -    stop and interrupts raised by raiseerror.
    -
    -    The name command contains the name of the command which
    -    caused the most recent error.
    -
    -    The flag recordstacks decides whether the state of the interpreter
    -    is saved on error.
    -    If reckordstacks is true, the following state objects are saved
    -
    -    Operand stack    -> ostack
    -    Dictionary stack -> dstack
    -    Execution stack  -> estack
    -
    -   Parameters: none
    -   Examples: errordict info -> shows errordict
    -   Remarks: commented  1.4.1999, Diesmann
    -   SeeAlso: raiseerror, raiseagain, info
    -   References: The Red Book 2nd. ed. p. 408
    -  */
    -  , errordict_name( "errordict" )
    -  , quitbyerror_name( "quitbyerror" )
    -  , newerror_name( "newerror" )
    -  , errorname_name( "errorname" )
    -  , commandname_name( "commandname" )
    -  , signo_name( "sys_signo" )
    -  , recordstacks_name( "recordstacks" )
    -  , estack_name( "estack" )
    -  , ostack_name( "ostack" )
    -  , dstack_name( "dstack" )
    -  , commandstring_name( "moduleinitializers" )
    -  , interpreter_name( "SLIInterpreter::execute" )
    -  , ArgumentTypeError( "ArgumentType" )
    -  , StackUnderflowError( "StackUnderflow" )
    -  , UndefinedNameError( "UndefinedName" )
    -  , WriteProtectedError( "WriteProtected" )
    -  , DivisionByZeroError( "DivisionByZero" )
    -  , RangeCheckError( "RangeCheck" )
    -  , PositiveIntegerExpectedError( "PositiveIntegerExpected" )
    -  , BadIOError( "BadIO" )
    -  , StringStreamExpectedError( "StringStreamExpected" )
    -  , CycleGuardError( "AllowedCyclesExceeded" )
    -  , SystemSignal( "SystemSignal" )
    -  , BadErrorHandler( "BadErrorHandler" )
    -  , KernelError( "KernelError" )
    -  , InternalKernelError( "InternalKernelError" )
    -  , OStack( 100 )
    -  , EStack( 100 )
    -{
    -  inittypes();
    -
    -  initdictionaries();
    -  initbuiltins();
    -  parse = new Parser( std::cin );
    -
    -  initexternals();
    -
    -  errordict->insert( quitbyerror_name, baselookup( false_name ) );
    -}
    -
    -void
    -SLIInterpreter::addmodule( SLIModule* m )
    -{
    -  modules.push_back( m );
    -  try
    -  {
    -    m->install( std::cerr, this );
    -  }
    -  catch ( SLIException& e )
    -  {
    -    message( M_ERROR, "SLIInterpreter", ( "An error occured while loading module " + m->name() ).c_str() );
    -    message( M_ERROR, "SLIInterpreter", e.what() );
    -    message( M_ERROR, "SLIInterpreter", e.message().c_str() );
    -    return;
    -  }
    -  catch ( std::exception& e )
    -  {
    -    message(
    -      M_ERROR, "SLIInterpreter", ( "A C++ library exception occured while loading module " + m->name() ).c_str() );
    -    message( M_ERROR, "SLIInterpreter", e.what() );
    -    return;
    -  }
    -  catch ( ... )
    -  {
    -    message(
    -      M_ERROR, "SLIInterpreter", ( "An unspecified exception occured while loading module " + m->name() ).c_str() );
    -    return;
    -  }
    -
    -  // Add commandstring to list of module initializers. They will be executed
    -  // by sli-init.sli once all C++ stuff is loaded.
    -  if ( not( m->commandstring().empty() ) )
    -  {
    -    ArrayDatum* ad = dynamic_cast< ArrayDatum* >( baselookup( commandstring_name ).datum() );
    -    assert( ad );
    -    ad->push_back( new StringDatum( m->commandstring() ) );
    -  }
    -}
    -
    -void
    -SLIInterpreter::addlinkedusermodule( SLIModule* m )
    -{
    -  m->install( std::cerr, this );
    -
    -  // Add commandstring to list of module initializers. They will be executed
    -  // by sli-init.sli once all C++ stuff is loaded.
    -  if ( not( m->commandstring().empty() ) )
    -  {
    -    ArrayDatum* ad = dynamic_cast< ArrayDatum* >( baselookup( commandstring_name ).datum() );
    -    assert( ad );
    -    ad->push_back( new StringDatum( m->commandstring() ) );
    -  }
    -}
    -
    -
    -SLIInterpreter::~SLIInterpreter()
    -{
    -  // Make sure there is no more data on the stacks
    -  // before the modules are deleted.
    -  OStack.clear();
    -  EStack.clear();
    -
    -  for_each( modules.rbegin(), modules.rend(), delete_ptr< SLIModule >() );
    -
    -  DStack->pop();
    -  delete DStack;
    -  delete parse;
    -
    -  Integertype.deletetypename();
    -  Doubletype.deletetypename();
    -  Stringtype.deletetypename();
    -  Nametype.deletetypename();
    -  Booltype.deletetypename();
    -  Literaltype.deletetypename();
    -  Arraytype.deletetypename();
    -  Proceduretype.deletetypename();
    -  Litproceduretype.deletetypename();
    -  Dictionarytype.deletetypename();
    -  Symboltype.deletetypename();
    -  Functiontype.deletetypename();
    -  Trietype.deletetypename();
    -  Callbacktype.deletetypename();
    -  Istreamtype.deletetypename();
    -  XIstreamtype.deletetypename();
    -  Ostreamtype.deletetypename();
    -  IntVectortype.deletetypename();
    -  DoubleVectortype.deletetypename();
    -}
    -
    -void
    -SLIInterpreter::raiseerror( Name err )
    -{
    -  Name caller = getcurrentname();
    -  EStack.pop();
    -  raiseerror( caller, err );
    -}
    -
    -void
    -SLIInterpreter::raiseerror( std::exception& err )
    -{
    -  Name caller = getcurrentname();
    -
    -  assert( errordict );
    -  errordict->insert( "command", EStack.top() ); // store the func/trie that caused the error.
    -
    -  // SLIException provide addtional information
    -  SLIException* slierr = dynamic_cast< SLIException* >( &err );
    -
    -  if ( slierr )
    -  {
    -    // err is a SLIException
    -    errordict->insert( Name( "message" ), slierr->message() );
    -    raiseerror( caller, slierr->what() );
    -  }
    -  else
    -  {
    -    // plain std::exception: turn what() output into message
    -    errordict->insert( Name( "message" ), std::string( err.what() ) );
    -    raiseerror( caller, "C++Exception" );
    -  }
    -}
    -
    -void
    -SLIInterpreter::raiseerror( Name cmd, Name err )
    -{
    -
    -  // All error related symbols are now in their correct dictionary,
    -  // the error dictionary $errordict ( see Bug #4)
    -
    -  assert( errordict );
    -
    -  if ( errordict->lookup( newerror_name ) == baselookup( false_name ) )
    -  {
    -    errordict->insert( newerror_name, baselookup( true_name ) );
    -    errordict->insert( errorname_name, LiteralDatum( err ) );
    -    errordict->insert( commandname_name, LiteralDatum( cmd ) );
    -    if ( errordict->lookup( recordstacks_name ) == baselookup( true_name ) )
    -    {
    -      Token est( new ArrayDatum( EStack.toArray() ) );
    -      Token ost( new ArrayDatum( OStack.toArray() ) );
    -      TokenArray olddstack;
    -      DStack->toArray( olddstack );
    -      Token dst( new ArrayDatum( olddstack ) );
    -
    -      errordict->insert_move( estack_name, est );
    -      errordict->insert_move( ostack_name, ost );
    -      errordict->insert_move( dstack_name, dst );
    -    }
    -
    -    OStack.push( LiteralDatum( cmd ) );
    -    EStack.push( baselookup( stop_name ) );
    -  }
    -  else // There might be an error in the error-handler
    -  {
    -    errordict->insert( newerror_name, baselookup( false_name ) );
    -    raiseerror( Name( "raiserror" ), BadErrorHandler );
    -    return;
    -  }
    -}
    -
    -void
    -SLIInterpreter::print_error( Token cmd )
    -{
    -  // Declare the variables where the information
    -  // about the error is stored.
    -  std::string errorname;
    -  std::ostringstream msg;
    -
    -  // Read errorname from dictionary.
    -  if ( errordict->known( errorname_name ) )
    -  {
    -    errorname = std::string( errordict->lookup( errorname_name ) );
    -  }
    -
    -  // Find the correct message for the errorname.
    -
    -  // If errorname is equal to SystemError no message string
    -  // is printed. The if-else branching below follows the
    -  // syntax of the lib/sli/sli-init.sli function
    -  // /:print_error
    -  if ( errorname == "SystemError" )
    -  {
    -  }
    -  else if ( errorname == "BadErrorHandler" )
    -  {
    -    msg << ": The error handler of a stopped context "
    -        << "contained itself an error.";
    -  }
    -  else
    -  {
    -    // Read a pre-defined message from dictionary.
    -    if ( errordict->known( Name( "message" ) ) )
    -    {
    -      msg << errordict->lookup( Name( "message" ) );
    -      errordict->erase( Name( "message" ) );
    -    }
    -
    -    // Print command information for error command.
    -    if ( errordict->known( Name( "command" ) ) )
    -    {
    -      Token command = errordict->lookup( Name( "command" ) );
    -      errordict->erase( Name( "command" ) );
    -
    -      // Command information is only printed if the
    -      // command is of trietype
    -      if ( command.datum() )
    -      {
    -        if ( command->gettypename() == Name( "trietype" ) )
    -        {
    -          msg << "\n\nCandidates for " << command << " are:\n";
    -
    -          TrieDatum* trie = dynamic_cast< TrieDatum* >( command.datum() );
    -          assert( trie );
    -
    -          trie->get().info( msg );
    -        }
    -      }
    -    }
    -  }
    -
    -  // Error message header is defined as "$errorname in $cmd"
    -  std::string from = std::string( cmd );
    -
    -  // Print error.
    -  message( M_ERROR, from.c_str(), msg.str().c_str(), errorname.c_str() );
    -}
    -
    -void
    -SLIInterpreter::raiseagain()
    -{
    -  assert( errordict );
    -
    -  if ( errordict->known( commandname_name ) )
    -  {
    -    Token cmd_t = errordict->lookup( commandname_name );
    -    assert( not cmd_t.empty() );
    -    errordict->insert( newerror_name, baselookup( true_name ) );
    -    OStack.push_move( cmd_t );
    -    EStack.push( baselookup( stop_name ) );
    -  }
    -  else
    -  {
    -    raiseerror( Name( "raiseagain" ), BadErrorHandler );
    -  }
    -}
    -
    -void
    -SLIInterpreter::raisesignal( int sig )
    -{
    -  Name caller = getcurrentname();
    -
    -  errordict->insert( signo_name, IntegerDatum( sig ) );
    -
    -  raiseerror( caller, SystemSignal );
    -}
    -
    -void
    -SLIInterpreter::verbosity( int level )
    -{
    -  verbositylevel = level;
    -}
    -
    -int
    -SLIInterpreter::verbosity() const
    -{
    -  return verbositylevel;
    -}
    -
    -void
    -SLIInterpreter::terminate( int returnvalue )
    -{
    -  if ( returnvalue == -1 )
    -  {
    -    assert( statusdict->known( "exitcodes" ) );
    -    DictionaryDatum exitcodes = getValue< DictionaryDatum >( *statusdict, "exitcodes" );
    -    returnvalue = getValue< long >( exitcodes, "fatal" );
    -  }
    -
    -  message( M_FATAL, "SLIInterpreter", "Exiting." );
    -  delete this;
    -  std::exit( returnvalue );
    -}
    -
    -void
    -SLIInterpreter::message( int level, const char from[], const char text[], const char errorname[] ) const
    -{
    -// Only one thread may write at a time.
    -#ifdef _OPENMP
    -#pragma omp critical( message )
    -  {
    -#endif
    -    if ( level >= verbositylevel )
    -    {
    -      if ( level >= M_FATAL )
    -      {
    -        message( std::cout, M_FATAL_NAME, from, text, errorname );
    -      }
    -      else if ( level >= M_ERROR )
    -      {
    -        message( std::cout, M_ERROR_NAME, from, text, errorname );
    -      }
    -      else if ( level >= M_WARNING )
    -      {
    -        message( std::cout, M_WARNING_NAME, from, text, errorname );
    -      }
    -      else if ( level >= M_DEPRECATED )
    -      {
    -        message( std::cout, M_DEPRECATED_NAME, from, text, errorname );
    -      }
    -      else if ( level >= M_PROGRESS )
    -      {
    -        message( std::cout, M_PROGRESS_NAME, from, text, errorname );
    -      }
    -      else if ( level >= M_INFO )
    -      {
    -        message( std::cout, M_INFO_NAME, from, text, errorname );
    -      }
    -      else if ( level >= M_STATUS )
    -      {
    -        message( std::cout, M_STATUS_NAME, from, text, errorname );
    -      }
    -      else if ( level >= M_DEBUG )
    -      {
    -        message( std::cout, M_DEBUG_NAME, from, text, errorname );
    -      }
    -      else
    -      {
    -        message( std::cout, M_ALL_NAME, from, text, errorname );
    -      }
    -    }
    -
    -#ifdef _OPENMP
    -  }
    -#endif
    -}
    -
    -void
    -SLIInterpreter::message( std::ostream& out,
    -  const char levelname[],
    -  const char from[],
    -  const char text[],
    -  const char errorname[] ) const
    -{
    -  const unsigned buflen = 30;
    -  char timestring[ buflen + 1 ] = "";
    -  const time_t tm = std::time( nullptr );
    -
    -  std::strftime( timestring, buflen, "%b %d %H:%M:%S", std::localtime( &tm ) );
    -
    -  std::string msg = String::compose( "%1 %2 [%3]: ", timestring, from, levelname );
    -  out << std::endl << msg << errorname;
    -
    -  // Set the preferred line indentation.
    -  const size_t indent = 4;
    -
    -  // Get size of the output window. The message text will be
    -  // adapted to the width of the window.
    -  //
    -  // The COLUMNS variable should preferably be extracted
    -  // from the environment dictionary set up by the
    -  // Processes class. getenv("COLUMNS") works only on
    -  // the created NEST executable (not on the messages
    -  // printed by make install).
    -  char const* const columns = std::getenv( "COLUMNS" );
    -  size_t max_width = 78;
    -  if ( columns )
    -  {
    -    max_width = std::atoi( columns );
    -  }
    -  if ( max_width < 3 * indent )
    -  {
    -    max_width = 3 * indent;
    -  }
    -  const size_t width = max_width - indent;
    -
    -  // convert char* to string to be able to use the string functions
    -  std::string text_str( text );
    -
    -  // Indent first message line
    -  if ( text_str.size() != 0 )
    -  {
    -    std::cout << std::endl << std::string( indent, ' ' );
    -  }
    -
    -  size_t pos = 0;
    -
    -  for ( size_t i = 0; i < text_str.size(); ++i )
    -  {
    -    if ( text_str.at( i ) == '\n' and i != text_str.size() - 1 )
    -    {
    -      // Print a lineshift followed by an indented whitespace
    -      // Manually inserted lineshift at the end of the message
    -      // are suppressed.
    -      out << std::endl << std::string( indent, ' ' );
    -      pos = 0;
    -    }
    -    else
    -    {
    -      // If we've reached the width of the output we'll print
    -      // a lineshift regardless of whether '\n' is found or not.
    -      // The printing is done so that no word splitting occurs.
    -      size_t space = text_str.find( ' ', i ) < text_str.find( '\n' ) ? text_str.find( ' ', i ) : text_str.find( '\n' );
    -      // If no space is found (i.e. the last word) the space
    -      // variable is set to the end of the string.
    -      if ( space == std::string::npos )
    -      {
    -        space = text_str.size();
    -      }
    -
    -      // Start on a new line if the next word is longer than the
    -      // space available (as long as the word is shorter than the
    -      // total width of the printout).
    -      if ( i != 0 and text_str.at( i - 1 ) == ' '
    -        and static_cast< int >( space - i ) > static_cast< int >( width - pos ) )
    -      {
    -        out << std::endl << std::string( indent, ' ' );
    -        pos = 0;
    -      }
    -
    -      // Only print character if we're not at the end of the
    -      // line and the last character is a space.
    -      if ( not( width - pos == 0 and text_str.at( i ) == ' ' ) )
    -      {
    -        // Print the actual character.
    -        out << text_str.at( i );
    -      }
    -
    -      ++pos;
    -    }
    -  }
    -  out << std::endl;
    -}
    -
    -Name
    -SLIInterpreter::getcurrentname() const
    -{
    -  FunctionDatum* func = dynamic_cast< FunctionDatum* >( EStack.top().datum() );
    -  if ( func )
    -  {
    -    return ( func->getname() );
    -  }
    -  TrieDatum* trie = dynamic_cast< TrieDatum* >( EStack.top().datum() );
    -  if ( trie )
    -  {
    -    return ( trie->getname() );
    -  }
    -  return interpreter_name;
    -}
    -
    -void
    -SLIInterpreter::setcycleguard( Index c )
    -{
    -  cycle_guard = true;
    -  cycle_restriction = cycles() + c;
    -}
    -
    -void
    -SLIInterpreter::removecycleguard()
    -{
    -  cycle_guard = false;
    -}
    -
    -void
    -SLIInterpreter::toggle_stack_display()
    -{
    -  show_stack_ = not show_stack_;
    -  std::string msg = std::string( "Stack display is now " ) + ( show_stack_ ? "On" : "Off" );
    -  message( M_INFO, "SLIInterpreter", msg.c_str() );
    -}
    -
    -void
    -SLIInterpreter::backtrace_on()
    -{
    -  show_backtrace_ = true;
    -  opt_tailrecursion_ = false;
    -  std::string msg = "Showing stack backtrace on error.  Disabling tail recursion optimization.";
    -  message( M_INFO, "SLIInterpreter", msg.c_str() );
    -}
    -
    -void
    -SLIInterpreter::backtrace_off()
    -{
    -  show_backtrace_ = false;
    -  opt_tailrecursion_ = true;
    -  std::string msg =
    -    "Stack backtrace on error in now off. Re-enabling tail recursion "
    -    "optimization.";
    -  message( M_INFO, "SLIInterpreter", msg.c_str() );
    -}
    -
    -/**
    - * List the execution stack from level n-1 downwards to level 0. If you want the
    - * entire stack to be displayed, call
    - * the function as stack_backtrace(EStack.load());
    - */
    -void
    -SLIInterpreter::stack_backtrace( int n )
    -{
    -  for ( int p = n - 1; p >= 0; --p )
    -  {
    -    if ( ( size_t ) p > EStack.load() )
    -    {
    -      continue;
    -    }
    -
    -    FunctionDatum* fd = dynamic_cast< FunctionDatum* >( EStack.pick( p ).datum() );
    -    if ( fd )
    -    {
    -      fd->backtrace( this, p );
    -      continue;
    -    }
    -    NameDatum* nd = dynamic_cast< NameDatum* >( EStack.pick( p ).datum() );
    -    if ( nd )
    -    {
    -      std::cerr << "While executing: ";
    -      nd->print( std::cerr );
    -      std::cerr << std::endl;
    -      continue;
    -    }
    -    TrieDatum* td = dynamic_cast< TrieDatum* >( EStack.pick( p ).datum() );
    -    if ( td )
    -    {
    -      std::cerr << "While executing: ";
    -      td->print( std::cerr );
    -      std::cerr << std::endl;
    -      continue;
    -    }
    -  }
    -}
    -
    -void
    -SLIInterpreter::debug_options() const
    -{
    -  std::cerr << "Type one of the following commands:\n"
    -            << "\nInspection:\n"
    -            << "  n)ext       - Trace (execute) next command.\n"
    -            << "  l)ist       - list current procedure or loop.\n"
    -            << "  w)here      - show backtrace of execution stack.\n"
    -            << "  c)ontinue   - Continue this level without debugging\n"
    -            << "  step        - Step over deeper levels.\n"
    -            << "  stack       - show operand stack.\n"
    -            << "  estack      - show execution stack.\n"
    -            << "  e)dit       - enter interactive mode.\n"
    -            << "  stop        - raise an exception.\n"
    -            << "  h)elp       - display this list.\n"
    -            << "  q)uit       - quit debug mode.\n\n"
    -            << "  show next   - show next command.\n"
    -            << "  show stack  - show operand stack.\n"
    -            << "  show backtrace- same as 'where'.\n"
    -            << "  show estack - show execution stack.\n\n"
    -            << "  toggle stack     - toggle stack display.\n"
    -            << "  toggle catch     - toggle debug on error.\n"
    -            << "  toggle backtrace - toggle stack backtrace on error.\n"
    -            << "  toggle tailrecursion - toggle tail-recursion optimisation.\n";
    -}
    -
    -
    -char
    -SLIInterpreter::debug_commandline( Token& next )
    -{
    -  char c = '\n';
    -
    -  std::string command;
    -  std::string arg;
    -
    -  // /dev/tty is the UNIX  file representing the keyboard. We directly read from
    -  // it to be able to close the input
    -  // with CTRL-D. If std::cin is closed with ctrl-D we cannot re-open it again
    -  // and the debugger would be dysfunctional for the remainder of the session.
    -  std::ifstream tty( "/dev/tty" );
    -  if ( show_stack_ )
    -  {
    -    OStack.dump( std::cerr );
    -  }
    -  std::cerr << "Next token: ";
    -  next.pprint( std::cerr );
    -  std::cerr << std::endl;
    -
    -  do
    -  {
    -    std::cerr << call_depth_ << "/" << max_call_depth_ << ">";
    -
    -    tty >> command;
    -    if ( tty.eof() )
    -    {
    -      std::cerr << std::endl;
    -      debug_mode_off();
    -      return c;
    -    }
    -
    -    if ( command == "show" )
    -    {
    -      tty >> arg;
    -      if ( arg == "stack" )
    -      {
    -        OStack.dump( std::cerr );
    -      }
    -      else if ( arg == "estack" )
    -      {
    -        EStack.dump( std::cerr );
    -      }
    -      else if ( arg == "backtrace" )
    -      {
    -        stack_backtrace( EStack.load() );
    -      }
    -      else if ( arg == "next" or arg == "n" )
    -      {
    -        std::cerr << "Next token: ";
    -        next.pprint( std::cerr );
    -        std::cerr << std::endl;
    -      }
    -      else
    -      {
    -        std::cerr << "show: Unknown argument. Type 'help' for help." << std::endl;
    -      }
    -      continue;
    -    }
    -    else if ( command == "toggle" )
    -    {
    -      tty >> arg;
    -      if ( arg == "backtrace" )
    -      {
    -        show_backtrace_ = not show_backtrace_;
    -        std::cerr << "Stack backtrace is now " << ( show_backtrace_ ? " On." : "Off." ) << std::endl;
    -      }
    -      else if ( arg == "stack" )
    -      {
    -        show_stack_ = not show_stack_;
    -        std::cerr << "Stack display is now " << ( show_stack_ ? " On." : "Off." ) << std::endl;
    -      }
    -      else if ( arg == "catch" )
    -      {
    -        catch_errors_ = not catch_errors_;
    -        std::cerr << "Catch error mode is now " << ( catch_errors_ ? " On." : "Off." ) << std::endl;
    -      }
    -      else if ( arg == "tailrecursion" or arg == "tail" )
    -      {
    -        opt_tailrecursion_ = not opt_tailrecursion_;
    -        std::cerr << "Tail-recursion optimization is now " << ( opt_tailrecursion_ ? " On." : "Off." ) << std::endl;
    -      }
    -    }
    -    else if ( command == "list" or command == "l" )
    -    {
    -      c = 'l';
    -      break;
    -    }
    -    else if ( command == "stop" )
    -    {
    -      debug_mode_off();
    -      EStack.push( new NameDatum( stop_name ) );
    -      break;
    -    }
    -    else if ( command == "catch" )
    -    {
    -      catch_errors_ = true;
    -      std::cerr << "Catch error mode is now " << ( catch_errors_ ? " On." : "Off." ) << std::endl;
    -    }
    -    else if ( command == "where" or command == "w" )
    -    {
    -      stack_backtrace( EStack.load() );
    -    }
    -    else if ( command == "edit" or command == "break" or command == "e" )
    -    {
    -      debug_mode_off();
    -      std::cerr << "Type 'continue', to exit interactive mode." << std::endl;
    -      EStack.push( new NameDatum( "debugon" ) ); // restart debugging mode
    -      EStack.push( baselookup( mark_name ) );
    -      EStack.push( new XIstreamDatum( std::cin ) );
    -      EStack.push( baselookup( iparse_name ) );
    -      c = 'i';
    -      break;
    -    }
    -    else if ( command == "stack" )
    -    {
    -      OStack.dump( std::cerr );
    -    }
    -    else if ( command == "estack" )
    -    {
    -      EStack.dump( std::cerr );
    -    }
    -    else if ( command == "help" or command == "?" or command == "h" )
    -    {
    -      debug_options();
    -    }
    -    else if ( command == "next" or command == "n" )
    -    {
    -      break;
    -    }
    -    else if ( command == "continue" or command == "cont" or command == "c" )
    -    {
    -      max_call_depth_ = call_depth_; // will show lower levels only
    -    }
    -    else if ( command == "step" )
    -    {
    -      max_call_depth_ = call_depth_ + 1; // will this level and lower.
    -    }
    -    else if ( command == "quit" or command == "q" )
    -    {
    -      debug_mode_ = false;
    -      break;
    -    }
    -    else
    -    {
    -      std::cerr << "Unknown command. Type 'help' for help, or 'quit' to leave debugger." << std::endl;
    -    }
    -  } while ( true );
    -
    -  return c;
    -}
    -
    -int
    -SLIInterpreter::startup()
    -{
    -  static bool is_initialized = false;
    -  int exitcode = EXIT_SUCCESS;
    -
    -  if ( not is_initialized and EStack.load() > 0 )
    -  {
    -    exitcode = execute_(); // run the interpreter
    -    is_initialized = true;
    -  }
    -  return exitcode;
    -}
    -
    -int
    -SLIInterpreter::execute( const std::string& cmdline )
    -{
    -  int exitcode = startup();
    -  if ( exitcode != EXIT_SUCCESS )
    -  {
    -    return -1;
    -  }
    -
    -  OStack.push( new StringDatum( cmdline ) );
    -  EStack.push( new NameDatum( "::evalstring" ) );
    -  return execute_(); // run the interpreter
    -}
    -
    -int
    -SLIInterpreter::execute( const Token& cmd )
    -{
    -  int exitcode = startup();
    -  if ( exitcode != EXIT_SUCCESS )
    -  {
    -    return -1;
    -  }
    -
    -  EStack.push( cmd );
    -  return execute_(); // run the interpreter
    -}
    -
    -
    -int
    -SLIInterpreter::execute( int v )
    -{
    -  startup();
    -  EStack.push( new NameDatum( "start" ) );
    -  switch ( v )
    -  {
    -  case 0:
    -  case 1:
    -    return execute_(); // run the interpreter
    -  case 2:
    -    return execute_debug_();
    -  default:
    -    return -1;
    -  }
    -}
    -
    -int
    -SLIInterpreter::execute_debug_( size_t exitlevel )
    -{
    -  int exitcode;
    -  assert( statusdict->known( "exitcodes" ) );
    -  DictionaryDatum exitcodes = getValue< DictionaryDatum >( *statusdict, "exitcodes" );
    -
    -  try
    -  {
    -    do
    -    { // loop1  this double loop to keep the try/catch outside the inner loop
    -      try
    -      {
    -        while ( EStack.load() > exitlevel ) // loop 2
    -        {
    -          ++cycle_count;
    -          EStack.top()->execute( this );
    -        }
    -      }
    -      catch ( std::exception& exc )
    -      {
    -        raiseerror( exc );
    -      }
    -    } while ( EStack.load() > exitlevel );
    -  }
    -  catch ( std::exception& e )
    -  {
    -    message( M_FATAL, "SLIInterpreter", "A C++ library exception occured." );
    -    OStack.dump( std::cerr );
    -    EStack.dump( std::cerr );
    -    message( M_FATAL, "SLIInterpreter", e.what() );
    -    exitcode = getValue< long >( *exitcodes, "exception" );
    -    terminate( exitcode );
    -  }
    -  catch ( ... )
    -  {
    -    message( M_FATAL, "SLIInterpreter", "An unknown c++ exception occured." );
    -    OStack.dump( std::cerr );
    -    EStack.dump( std::cerr );
    -    exitcode = getValue< long >( *exitcodes, "exception" );
    -    terminate( exitcode );
    -  }
    -
    -  assert( statusdict->known( "exitcode" ) );
    -  exitcode = getValue< long >( *statusdict, "exitcode" );
    -  if ( exitcode != 0 )
    -  {
    -    errordict->insert( quitbyerror_name, baselookup( true_name ) );
    -  }
    -
    -  return exitcode;
    -}
    -
    -int
    -SLIInterpreter::execute_( size_t exitlevel )
    -{
    -  int exitcode;
    -  assert( statusdict->known( "exitcodes" ) );
    -  DictionaryDatum exitcodes = getValue< DictionaryDatum >( *statusdict, "exitcodes" );
    -
    -  try
    -  {
    -    do
    -    { // loop1  this double loop to keep the try/catch outside the inner loop
    -      try
    -      {
    -        while ( EStack.load() > exitlevel ) // loop 2
    -        {
    -          ++cycle_count;
    -          EStack.top()->execute( this );
    -        }
    -      }
    -      catch ( std::exception& exc )
    -      {
    -        raiseerror( exc );
    -      }
    -    } while ( EStack.load() > exitlevel );
    -  }
    -  catch ( std::exception& e )
    -  {
    -    message( M_FATAL, "SLIInterpreter", "A C++ library exception occured." );
    -    OStack.dump( std::cerr );
    -    EStack.dump( std::cerr );
    -    message( M_FATAL, "SLIInterpreter", e.what() );
    -    exitcode = getValue< long >( *exitcodes, "exception" );
    -    terminate( exitcode );
    -  }
    -  catch ( ... )
    -  {
    -    message( M_FATAL, "SLIInterpreter", "An unknown c++ exception occured." );
    -    OStack.dump( std::cerr );
    -    EStack.dump( std::cerr );
    -    exitcode = getValue< long >( *exitcodes, "exception" );
    -    terminate( exitcode );
    -  }
    -
    -  assert( statusdict->known( "exitcode" ) );
    -  exitcode = getValue< long >( *statusdict, "exitcode" );
    -  if ( exitcode != 0 )
    -  {
    -    errordict->insert( quitbyerror_name, baselookup( true_name ) );
    -  }
    -
    -  return exitcode;
    -}
    diff --git a/sli/interpret.h b/sli/interpret.h
    deleted file mode 100644
    index ed09eb9361..0000000000
    --- a/sli/interpret.h
    +++ /dev/null
    @@ -1,914 +0,0 @@
    -/*
    - *  interpret.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef INTERPRETER_H
    -#define INTERPRETER_H
    -/*
    -    interpret.h defines the SLI Interpreter class
    -*/
    -
    -// C++ includes:
    -#include <list>
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "sliactions.h"
    -#include "slibuiltins.h"
    -#include "slimodule.h"
    -#include "slitype.h"
    -#include "token.h"
    -#include "tokenstack.h"
    -
    -/**
    - * @defgroup SLIOutput How to notify the SLI user
    - */
    -
    -/**
    - * @defgroup SLIMessaging Displaying messages to the user
    - * @ingroup SLIOutput
    - */
    -
    -/**
    - * @defgroup SLIError Raising (and displaying) errors
    - * @ingroup SLIOutput
    - */
    -
    -class Parser;
    -class Scanner;
    -class DictionaryStack;
    -class Dictionary;
    -class FunctionDatum;
    -class BoolDatum;
    -
    -extern "C"
    -{
    -  void SLIthrowsignal( int s );
    -}
    -
    -class SLIInterpreter
    -{
    -  std::list< SLIModule* > modules;
    -
    -  /* Flags and variables to control debugging and
    -   * optimizations.
    -   */
    -  bool debug_mode_;        //!< True, if SLI level debugging is enabled.
    -  bool show_stack_;        //!< Show stack in debug mode.
    -  bool show_backtrace_;    //!< Show stack-backtrace on error.
    -  bool catch_errors_;      //!< Enter debugger on error.
    -  bool opt_tailrecursion_; //!< Optimize tailing recursion.
    -  int call_depth_;         //!< Current depth of procedure calls.
    -  int max_call_depth_;     //!< Depth until which procedure calls are debugged.
    -
    -
    -  unsigned long cycle_count;
    -  bool cycle_guard;
    -  unsigned long cycle_restriction;
    -
    -
    -  int verbositylevel;
    -  void inittypes();
    -  void initdictionaries();
    -  void initbuiltins();
    -  void initexternals();
    -
    -public:
    -  unsigned long code_accessed; // for code coverage analysis.
    -  unsigned long code_executed; // ration should be coverage
    -
    -
    -  Dictionary* statusdict;
    -  Dictionary* errordict;
    -
    -  DictionaryStack* DStack;
    -  Parser* parse;
    -
    -
    -  // Names of basics functions
    -  Name ilookup_name;
    -  Name ipop_name;
    -  Name isetcallback_name;
    -  Name iiterate_name;
    -  Name iloop_name;
    -  Name irepeat_name;
    -  Name ifor_name;
    -  Name iforallarray_name;
    -  Name iforallindexedarray_name;
    -  Name iforallindexedstring_name;
    -  Name iforallstring_name;
    -
    -  Name pi_name;
    -  Name e_name;
    -
    -  Name iparse_name;
    -  Name stop_name;
    -  Name end_name;
    -
    -  // Names of symbols and objects
    -  Name null_name;
    -  Name true_name;
    -  Name false_name;
    -  Name mark_name;
    -  Name istopped_name;
    -  Name systemdict_name;
    -  Name userdict_name;
    -  Name errordict_name;
    -  Name quitbyerror_name;
    -  Name newerror_name;
    -  Name errorname_name;
    -  Name commandname_name;
    -  Name signo_name;
    -  Name recordstacks_name;
    -  Name estack_name;
    -  Name ostack_name;
    -  Name dstack_name;
    -  Name commandstring_name;
    -  Name interpreter_name;
    -
    -  // Names of basic errors
    -  Name ArgumentTypeError;
    -  Name StackUnderflowError;
    -  Name UndefinedNameError;
    -  Name WriteProtectedError;
    -  Name DivisionByZeroError;
    -  Name RangeCheckError;
    -  Name PositiveIntegerExpectedError;
    -  Name BadIOError;
    -  Name StringStreamExpectedError;
    -  Name CycleGuardError;
    -  Name SystemSignal;
    -  Name BadErrorHandler;
    -  Name KernelError;
    -  Name InternalKernelError;
    -
    -  Token execbarrier_token;
    -
    -  // Debug Message levels as static consts
    -  /** @ingroup SLIMessaging
    -   *  @name Predefined error levels
    -   *  @{
    -   */
    -  static const int M_ALL;    //!< Predefined error level for turning on
    -                             //!< the display of all messages;
    -                             //!< for use with verbosity(int).
    -  static const int M_DEBUG;  //!< Predefined error level for debugging messages
    -  static const int M_STATUS; //!< Predefined error level for status messages
    -  //! Predefined error level for informational messages
    -  static const int M_INFO;
    -  static const int M_DEPRECATED; //!< Predefined error level for deprecation
    -                                 //!< warnings
    -  static const int M_PROGRESS;   //!< Predefined error level for progress messages
    -  static const int M_WARNING;    //!< Predefined error level for warning messages
    -  static const int M_ERROR;      //!< Predefined error level for error messages
    -  static const int M_FATAL;      //!< Predefined error level for failure messages
    -  static const int M_QUIET;      //!< An error level above all others. Use to turn
    -                                 //!< off messages completely.
    -  /** @} */
    -
    -private:
    -  static char const* const M_ALL_NAME;
    -  static char const* const M_DEBUG_NAME;
    -  static char const* const M_STATUS_NAME;
    -  static char const* const M_INFO_NAME;
    -  static char const* const M_PROGRESS_NAME;
    -  static char const* const M_DEPRECATED_NAME;
    -  static char const* const M_WARNING_NAME;
    -  static char const* const M_ERROR_NAME;
    -  static char const* const M_FATAL_NAME;
    -  static char const* const M_QUIET_NAME;
    -
    -public:
    -  // These static members must be accessible from
    -  // the Datum constructors
    -
    -  static SLIType Integertype;
    -  static SLIType Doubletype;
    -  static SLIType Stringtype;
    -  static SLIType Nametype;
    -  static SLIType Booltype;
    -  static SLIType Literaltype;
    -  static SLIType Arraytype;
    -  static SLIType Proceduretype;
    -  static SLIType Litproceduretype;
    -  static SLIType Dictionarytype;
    -  static SLIType Symboltype;
    -  static SLIType Functiontype;
    -  static SLIType Trietype;
    -  static SLIType Callbacktype;
    -  static SLIType Istreamtype;
    -  static SLIType XIstreamtype;
    -  static SLIType Ostreamtype;
    -  static SLIType IntVectortype;
    -  static SLIType DoubleVectortype;
    -
    -  // SLIType default actions
    -  static DatatypeFunction datatypefunction;
    -  static NametypeFunction nametypefunction;
    -  static ProceduretypeFunction proceduretypefunction;
    -  static LitproceduretypeFunction litproceduretypefunction;
    -  static FunctiontypeFunction functiontypefunction;
    -  static TrietypeFunction trietypefunction;
    -  static CallbacktypeFunction callbacktypefunction;
    -  static XIstreamtypeFunction xistreamtypefunction;
    -
    -  // Basic Operations needed to run the default actions
    -  static const IlookupFunction ilookupfunction;
    -  static const IsetcallbackFunction isetcallbackfunction;
    -  static const IiterateFunction iiteratefunction;
    -  static const IloopFunction iloopfunction;
    -  static const IrepeatFunction irepeatfunction;
    -  static const IforFunction iforfunction;
    -  static const IforallarrayFunction iforallarrayfunction;
    -  static const IforallindexedarrayFunction iforallindexedarrayfunction;
    -  static const IforallindexedstringFunction iforallindexedstringfunction;
    -  static const IforallstringFunction iforallstringfunction;
    -
    -  // State variables of the Interpreter
    -
    -
    -  Token ct; // callback; see comments in execute(void)
    -
    -  TokenStack OStack;
    -  TokenStack EStack;
    -
    -  // public member functions:
    -  SLIInterpreter();
    -  ~SLIInterpreter();
    -
    -  //! Initialise the interpreter by reading in the startup files.
    -  int startup();
    -
    -  /**
    -   * Execute the supplied command string.
    -   */
    -  int execute( const std::string& );
    -
    -  /**
    -   * Execute the supplied token.
    -   */
    -  int execute( const Token& );
    -
    -  /**
    -   * Start the interpreter and run the startup code.
    -   */
    -  int execute( int v = 0 );
    -
    -  /**
    -   * Run the interpreter with a prepared execution stack.
    -   * The function returns, if the execution stack has reached the given level.
    -   */
    -  int execute_( size_t exitlevel = 0 );
    -  int execute_debug_( size_t exitlevel = 0 );
    -
    -  void createdouble( Name const&, double );
    -  void createcommand( Name const&, SLIFunction const*, std::string deprecation_info = std::string() );
    -  void createconstant( Name const&, const Token& );
    -
    -
    -  /** Lookup a name searching all dictionaries on the stack.
    -   *  The first occurrence is reported. If the Name is not found,
    -   *  @a VoidToken is returned.
    -   */
    -  const Token& lookup( const Name& n ) const;
    -
    -
    -  /** Lookup a name searching all dictionaries on the stack.
    -   *  The first occurrence is reported. If the Name is not found,
    -   *  an UndefinedName exceptiopn is thrown.
    -   */
    -  const Token& lookup2( const Name& n ) const;
    -
    -  /** Lookup a name searching only the bottom level dictionary.
    -   *  If the Name is not found,
    -   *  @a VoidToken is returned.
    -   */
    -  const Token& baselookup( const Name& n ) const; // lookup in a specified
    -
    -  /** Test for a name searching all dictionaries on the stack.
    -   */
    -  bool known( const Name& n ) const;
    -
    -  /** Test for a name in the bottom level dictionary.
    -   */
    -  bool baseknown( const Name& n ) const;
    -
    -  /** Bind a Token to a Name.
    -   *  The token is copied. This can be an expensive operation for large
    -   *  objects. Also, if the token is popped off one of the stacks after
    -   *  calling def, it is more reasonable to use SLIInterpreter::def_move.
    -   */
    -  void def( Name const&, Token const& );
    -
    -  /** Unbind a previously bound Token from a Name.
    -   * Throws UnknownName Exception.
    -   */
    -  void undef( Name const& );
    -
    -  /** Bind a Token to a Name in the bottom level dictionary.
    -   *  The Token is copied.
    -   */
    -  void basedef( const Name& n, const Token& t );
    -
    -  /** Bind a Token to a Name.
    -   *  like def, however, the Datum object is moved from the token into the
    -   *  dictionary, thus, no memory allocation or copying is needed.
    -   */
    -  void def_move( Name const&, Token& );
    -
    -  /** Bind a Token to a Name in the bottom level dictionary.
    -   *  The Token is moved.
    -   */
    -  void basedef_move( const Name& n, Token& t );
    -
    -  void setcycleguard( Index );
    -  void removecycleguard();
    -
    -
    -  /**
    -   * Increment call depth level.
    -   * The value of call_depth_ is used to control
    -   * the step mode.
    -   * Step mode is disabled for call_depth_ >= max_call_depth_.
    -   * This gives the user the opportunity to skip over nested
    -   * calls during debugging.
    -   */
    -  void
    -  inc_call_depth()
    -  {
    -    ++call_depth_;
    -  }
    -
    -  /**
    -   * Decrement call depth level.
    -   * The value of call_depth_ is used to control
    -   * the step mode.
    -   * Step mode is disabled for call_depth_ >= max_call_depth_.
    -   * This gives the user the opportunity to skip over nested
    -   * calls during debugging.
    -   */
    -  void
    -  dec_call_depth()
    -  {
    -    --call_depth_;
    -  }
    -
    -  /**
    -   * Set call depth level to a specific value.
    -   * The value of call_depth_ is used to control
    -   * the step mode.
    -   * Step mode is disabled for call_depth_ >= max_call_depth_.
    -   * This gives the user the opportunity to skip over nested
    -   * calls during debugging.
    -   */
    -  void
    -  set_call_depth( int depth )
    -  {
    -    call_depth_ = depth;
    -  }
    -
    -  /**
    -   * Return current call depth level.
    -   * The value of call_depth_ is used to control
    -   * the step mode.
    -   * Step mode is disabled for call_depth_ >= max_call_depth_.
    -   * This gives the user the opportunity to skip over nested
    -   * calls during debugging.
    -   */
    -  int
    -  get_call_depth() const
    -  {
    -    return call_depth_;
    -  }
    -
    -  /**
    -   * Set maximal call depth level to a specific value.
    -   * The value of call_depth_ is used to control
    -   * the step mode.
    -   * Step mode is disabled for call_depth_ >= max_call_depth_.
    -   * This gives the user the opportunity to skip over nested
    -   * calls during debugging.
    -   */
    -  void
    -  set_max_call_depth( int d )
    -  {
    -    max_call_depth_ = d;
    -  }
    -
    -  /**
    -   * Return value of maximal call depth level.
    -   * The value of call_depth_ is used to control
    -   * the step mode.
    -   * Step mode is disabled for call_depth_ >= max_call_depth_.
    -   * This gives the user the opportunity to skip over nested
    -   * calls during debugging.
    -   */
    -  int
    -  get_max_call_depth() const
    -  {
    -    return max_call_depth_;
    -  }
    -
    -  /**
    -   * Returns true, if step mode is active.
    -   * The step mode is active in debug mode if
    -   * call_depth_ < max_call_depth_
    -   */
    -  bool
    -  step_mode() const
    -  {
    -    return debug_mode_ and ( call_depth_ < max_call_depth_ );
    -  }
    -
    -  /**
    -   * Returns true, if debug mode is turned on.
    -   */
    -  bool
    -  get_debug_mode() const
    -  {
    -    return debug_mode_;
    -  }
    -
    -  /**
    -   * Turn debug mode on.
    -   */
    -  void
    -  debug_mode_on()
    -  {
    -    debug_mode_ = true;
    -  }
    -
    -  /**
    -   * Turn debug mode off.
    -   */
    -  void
    -  debug_mode_off()
    -  {
    -    debug_mode_ = false;
    -  }
    -
    -  /**
    -   * Switch stack display on or off in debug mode.
    -   */
    -  void toggle_stack_display();
    -
    -
    -  /**
    -   * Show Debug options.
    -   */
    -  void debug_options() const;
    -
    -  /**
    -   * Prompt user for commands during debug mode.
    -   * In this function, the user can enter simple commands
    -   * to debug code executed by the interpreter.
    -   */
    -  char debug_commandline( Token& );
    -
    -
    -  /**
    -   * Returns true, if tailing recursion optimization is done.
    -   */
    -  bool
    -  optimize_tailrecursion() const
    -  {
    -    return opt_tailrecursion_;
    -  }
    -
    -  /**
    -   * Enable tail-recursion optimization.
    -   * Tail-recursion can be optimizes in such a way
    -   * that the execution stack is not growing with each
    -   * recursion level.
    -   * This optimization may improve performance for
    -   * applications which heavily rely on deep recusions.
    -   * However, during debugging, tail-recursion
    -   * optimization removes important information from the
    -   * execution stack.
    -   */
    -  void
    -  optimize_tailrecursion_on()
    -  {
    -    opt_tailrecursion_ = true;
    -  }
    -
    -  /**
    -   * Disable tail-recursion optimization.
    -   * Tail-recursion can be optimizes in such a way
    -   * that the execution stack is not growing with each
    -   * recursion level.
    -   * This optimization may improve performance for
    -   * applications which heavily rely on deep recusions.
    -   * However, during debugging, tail-recursion
    -   * optimization removes important information from the
    -   * execution stack.
    -   */
    -  void
    -  optimize_tailrecursion_off()
    -  {
    -    opt_tailrecursion_ = false;
    -  }
    -
    -  /**
    -   * True, if a stack backtrace should be shown on error.
    -   * Whenever an error or stop is raised, the execution stack is
    -   * unrolled up to the nearest stopped context.
    -   * In this process it is possible to display a stack backtrace
    -   * which allows the user to diagnose the origin and possible
    -   * cause of the error.
    -   * For applications which handle themselfs, this backtrace may be
    -   * disturbing. So it is possible to switch this behavior on and
    -   * off.
    -   */
    -  bool
    -  show_backtrace() const
    -  {
    -    return show_backtrace_;
    -  }
    -
    -  /**
    -   * Switch stack backtrace on.
    -   * Whenever an error or stop is raised, the execution stack is
    -   * unrolled up to the nearest stopped context.
    -   * In this process it is possible to display a stack backtrace
    -   * which allows the user to diagnose the origin and possible
    -   * cause of the error.
    -   * For applications which handle themselfs, this backtrace may be
    -   * disturbing. So it is possible to switch this behavior on and
    -   * off.
    -   */
    -  void backtrace_on();
    -
    -
    -  /**
    -   * Switch stack backtrace off.
    -   * Whenever an error or stop is raised, the execution stack is
    -   * unrolled up to the nearest stopped context.
    -   * In this process it is possible to display a stack backtrace
    -   * which allows the user to diagnose the origin and possible
    -   * cause of the error.
    -   * For applications which handle themselfs, this backtrace may be
    -   * disturbing. So it is possible to switch this behavior on and
    -   * off.
    -   */
    -  void backtrace_off();
    -
    -
    -  bool
    -  catch_errors() const
    -  {
    -    return catch_errors_;
    -  }
    -
    -  void
    -  catch_errors_on()
    -  {
    -    catch_errors_ = true;
    -  }
    -
    -  void
    -  catch_errors_off()
    -  {
    -    catch_errors_ = false;
    -  }
    -
    -  void stack_backtrace( int n );
    -
    -  /** Cause the SLI interpreter to raise an error.
    -   *  This function is used by classes derived from SLIFunction to raise
    -   *  an error.
    -   *  \n
    -   *  raiseerror() is an interface to the SLI interpreter's error
    -   *  handling mechanism (see The Red Book for details). If an error
    -   *  is raised, the following actions are performed:
    -   *  - the value of errordict /newerror is set to true
    -   *  - the value of errordict /command is set to the name of the command
    -   *    which raised the error
    -   *  - If the value of errordict /recorstack is true,
    -   *    the state of the interpreter is saved:
    -   *    - the operand stack is copied to errordict /ostack
    -   *    - the execution stack is copied to errordict /estack
    -   *    - the dictionary stack is copied to errordict /dstack
    -   *  - the dictionary stack is cleared.
    -   *  - stop is called. Stop then tries to find an enclosing stopped
    -   *    context and calls the associated function.
    -   *
    -   *  This mechanism is explained in detail in The PostScript Reference Manual.
    -   *  \n
    -   *  If the user did not establish any stopped context, the default
    -   *  stopped context for the SLI interpreter will be executed, which
    -   *  includes display of an error message and stopping program
    -   *  execution.
    -   *  \n
    -   *  Please note that before raiserror() is called, the state of the
    -   *  operand and execution stack shall be restored to their initial
    -   *  state.
    -   *
    -   *  @param err  The argument is the name of the error, specified as
    -   *  a string.
    -   *  The name of the currently active function will be used as the
    -   *  function name.
    -   *
    -   *  @ingroup SLIError
    -   *  @see raiseerror(Name),
    -   *  raiseerror(Name,Name), raiseagain()
    -   */
    -  void
    -  raiseerror( const char* err )
    -  {
    -    raiseerror( Name( err ) );
    -  }
    -
    -  /** Cause the SLI interpreter to raise an error.
    -   *  This function is used by classes derived from SLIFunction to raise
    -   *  an error.
    -   *  \n
    -   *  raiseerror() is an interface to the SLI interpreter's error
    -   *  handling mechanism (see The Red Book for details). If an error
    -   *  is raised, the following actions are performed:
    -   *  - the value of errordict /newerror is set to true
    -   *  - the value of errordict /command is set to the name of the command
    -   *    which raised the error
    -   *  - If the value of errordict /recorstack is true,
    -   *    the state of the interpreter is saved:
    -   *    - the operand stack is copied to errordict /ostack
    -   *    - the execution stack is copied to errordict /estack
    -   *    - the dictionary stack is copied to errordict /dstack
    -   *  - the dictionary stack is cleared.
    -   *  - stop is called. Stop then tries to find an enclosing stopped
    -   *    context and calls the associated function.
    -   *
    -   *  This mechanism is explained in detail in The PostScript Reference Manual.
    -   *  \n
    -   *  If the user did not establish any stopped context, the default
    -   *  stopped context for the SLI interpreter will be executed, which
    -   *  includes display of an error message and stopping program
    -   *  execution.
    -   *  \n
    -   *  Please note that before raiserror() is called, the state of the
    -   *  operand and execution stack shall be restored to their initial
    -   *  state.
    -   *
    -   *  @param err  The argument is the name of the error.
    -   *  For conveniency, there is also a variant of this function that takes a
    -   *  string as the argument.
    -   *
    -   *  @ingroup SLIError
    -   *  @see raiseerror(const char*),
    -   *  raiseerror(Name,Name), raiseagain()
    -   */
    -  void raiseerror( Name err );
    -
    -  /**
    -   * Handle exceptions thrown by any execute().
    -   * This raiseerror is the first step in handling C++ exceptions
    -   * thrown by an execute() call. In particular,
    -   * - the name of the calling function is recorded;
    -   * - the command is popped from the execution stack;
    -   * - the error message is extracted from those exceptions that are
    -   *   derived from SLIException.
    -   * - handling is forwarded to raiserror(Name, Name).
    -   */
    -  void raiseerror( std::exception& err );
    -
    -  /** Cause the SLI interpreter to raise an error.
    -   *  This function is used by classes derived from SLIFunction to raise
    -   *  an error.
    -   *  \n
    -   *  raiseerror() is an interface to the SLI interpreter's error
    -   *  handling mechanism (see The Red Book for details). If an error
    -   *  is raised, the following actions are performed:
    -   *  - the value of errordict /newerror is set to true
    -   *  - the value of errordict /command is set to the name of the command
    -   *    which raised the error
    -   *  - If the value of errordict /recorstack is true,
    -   *    the state of the interpreter is saved:
    -   *    - the operand stack is copied to errordict /ostack
    -   *    - the execution stack is copied to errordict /estack
    -   *    - the dictionary stack is copied to errordict /dstack
    -   *  - the dictionary stack is cleared.
    -   *  - stop is called. Stop then tries to find an enclosing stopped
    -   *    context and calls the associated function.
    -   *
    -   *  This mechanism is explained in detail in The PostScript Reference Manual.
    -   *  \n
    -   *  If the user did not establish any stopped context, the default
    -   *  stopped context for the SLI interpreter will be executed, which
    -   *  includes display of an error message and stopping program
    -   *  execution.
    -   *  \n
    -   *  Please note that before raiserror() is called, the state of the
    -   *  operand and execution stack shall be restored to their initial
    -   *  state.
    -   *
    -   *  @param cmd  The first argument is the name of the calling function.
    -   *  @param err  The second argument is the name of the error.
    -   *
    -   *  @ingroup SLIError
    -   *  @see raiseerror(const char*), raiseerror(Name),
    -   *  raiseagain()
    -   */
    -  void raiseerror( Name cmd, Name err );
    -
    -  /** Print a description of a raised error.
    -   *  The errordict members errorname, command and message together
    -   *  with the function input parameters decides the nature of the
    -   *  output message. The function use the message() function to
    -   *  print the error.
    -   *  Replaces the SLI :print_error function.
    -   *
    -   *  @param cmd  The name of the function that raised the error.
    -   *
    -   *  @see raiseerror(const char*), raiseerror(Name),
    -   *  raiseerror(Name,Name)
    -   */
    -  void print_error( Token cmd );
    -
    -  /** Re-raise the last error.
    -   *  raiseagain re-raises a previously raised error. This is useful
    -   *  if an error handler cannot cope with a particular error (e.g. a signal)
    -   *  and wants to pass it to an upper level handler. Thus, nestet error
    -   *  handlers are possible.
    -   *
    -   *  @ingroup SLIError
    -   *  @see raiseerror(const char*), raiseerror(Name),
    -   *  raiseerror(Name,Name)
    -   */
    -  void raiseagain();
    -
    -  /** TO BE DOCUMENTED.
    -   *  @todo Document this function.
    -   *
    -   *  @ingroup SLIError
    -   */
    -  void raisesignal( int );
    -
    -
    -  // Message loging mechanism
    -
    -  /** Set the verbosity level of the SLI messaging mechanism.
    -   *  Only messages having an error level that is equal to or greater
    -   *  than this level will be displayed by the interpreter.
    -   *
    -   *  @see verbosity(void), message(), debug(), status(), info(), warning(),
    -   *  error(), fatal()
    -   *  @ingroup SLIMessaging
    -   */
    -  void verbosity( int );
    -
    -  /** Retrieve the current verbosity level of the SLI messaging mechanism.
    -   *  Only messages having an error level that is equal to or greater
    -   *  than this level will be displayed by the interpreter.
    -   *  \n
    -   *  You may use any positive integer here. For conveniency,
    -   *  there exist five predifined error levels:  \n
    -   *  SLIInterpreter::M_ALL=0,  display all messages \n
    -   *  SLIInterpreter::M_DEBUG=5,  display debugging messages and above \n
    -   *  SLIInterpreter::M_STATUS=7,  display status messages and above \n
    -   *  SLIInterpreter::M_INFO=10, display information messages and above \n
    -   *  SLIInterpreter::M_PROGRESS=15, display test-related messages and above \n
    -   *  SLIInterpreter::M_DEPRECATED=18, display deprecation warnings and above \n
    -   *  SLIInterpreter::M_WARNING=20, display warning messages and above \n
    -   *  SLIInterpreter::M_ERROR=30, display error messages and above \n
    -   *  SLIInterpreter::M_FATAL=40, display failure messages and above \n
    -   *  SLIInterpreter::M_QUIET=100, suppress all messages \n
    -   *  Thus, by calling verbosity(SLIInterpreter::M_WARNING) you
    -   *  indicate that you are interested in seeing error messages and
    -   *  more important messages only.
    -   *
    -   *  @see verbosity(void), message(), debug(), status(), info(), warning(),
    -   *  error(), fatal()
    -   *  @ingroup SLIMessaging
    -   */
    -  int verbosity() const;
    -
    -  /** Display a message.
    -   *  @param level  The error level that shall be associated with the
    -   *  message. You may use any positive integer here. For convenience,
    -   *  there exist five predefined error levels:  \n
    -   * (SLIInterpreter::M_ALL=0, for use with verbosity(int) only, see there), \n
    -   *  SLIInterpreter::M_DEBUG=5, a debugging message \n
    -   *  SLIInterpreter::M_STATUS=7, a status message \n
    -   *  SLIInterpreter::M_INFO=10, an informational message \n
    -   *  SLIInterpreter::M_PROGRESS=15, a test-related message \n
    -   *  SLIInterpreter::M_DEPRECATED=18, a deprecation warning \n
    -   *  SLIInterpreter::M_WARNING=20, a warning message \n
    -   *  SLIInterpreter::M_ERROR=30, an error message \n
    -   *  SLIInterpreter::M_FATAL=40, a failure message. \n
    -   * (SLIInterpreter::M_QUIET=100, for use with verbosity(int) only, see there),
    -   *
    -   *  @param from   A string specifying the name of the function that
    -   *  sends the message.
    -   *  @param test   A string specifying the message text.
    -   *
    -   *  The message will ony be displayed if the current verbosity level
    -   *  is greater than or equal to the specified level.
    -   *  \n
    -   *  If two or more messages are issued after each other, that have
    -   *  the same <I>from</I> and <I>level</I> argument, the messages will
    -   *  be grouped together in the output.
    -   *
    -   *  @see verbosity(void), verbosity(int)
    -   *  @ingroup SLIMessaging
    -   */
    -  void message( int level, const char from[], const char text[], const char errorname[] = "" ) const;
    -
    -  /** Function used by the message(int, const char*, const char*) function.
    -   *  Prints a message to the specified output stream.
    -   *  @param out        output stream
    -   *  @param levelname  name associated with input level
    -   */
    -  void message( std::ostream& out,
    -    const char levelname[],
    -    const char from[],
    -    const char text[],
    -    const char errorname[] = "" ) const;
    -
    -  void terminate( int returnvalue = -1 );
    -
    -  //*******************************************************
    -  Name getcurrentname() const;
    -
    -  unsigned long
    -  cycles() const
    -  {
    -    return cycle_count;
    -  }
    -
    -
    -  template < class T >
    -  void addmodule();
    -  void addmodule( SLIModule* );
    -
    -  /*
    -   * Add a linked user module to the interpreter.
    -   * Initializers (commandstrings) for linked dynamic modules are executed
    -   * by sli-init.sli after all C++ initialization is done.
    -   * Do not use this for modules loaded at runtime!
    -   */
    -  void addlinkedusermodule( SLIModule* );
    -
    -  FunctionDatum* Ilookup() const;
    -  FunctionDatum* Iiterate() const;
    -
    -  /**
    -   * Throw StackUnderflow exception if too few elements on stack.
    -   * @param n Minimum number of elements required on stack.
    -   * @throw StackUnderflow if fewer that @c n elements on stack.
    -   */
    -  void assert_stack_load( size_t n );
    -};
    -
    -// This function template is a workaround for the parameterless
    -// template member function, given below. As of
    -// egcs-2.91.16 980328 (gcc-2.8.0 release)
    -// the compiler is not able to parse a call like
    -// engine.addmodule<ModuleX>();
    -// (Stroustrup97), Sec 13.3.1 (p335)
    -
    -template < class T >
    -void
    -addmodule( SLIInterpreter& i )
    -{
    -  i.addmodule( new T );
    -}
    -
    -template < class T >
    -void
    -SLIInterpreter::addmodule()
    -{
    -  SLIModule* m = new T();
    -
    -  modules.push_back( m );
    -  m->install( std::cout, this );
    -}
    -
    -inline void
    -SLIInterpreter::assert_stack_load( size_t n )
    -{
    -  if ( OStack.load() < n )
    -  {
    -    throw StackUnderflow( n, OStack.load() );
    -  }
    -}
    -
    -
    -#endif
    diff --git a/sli/iostreamdatum.h b/sli/iostreamdatum.h
    deleted file mode 100644
    index 54f83e553b..0000000000
    --- a/sli/iostreamdatum.h
    +++ /dev/null
    @@ -1,43 +0,0 @@
    -/*
    - *  iostreamdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef IOSTREAMDATUM_H
    -#define IOSTREAMDATUM_H
    -/*
    -    Datum classes encapsulating c++ streams
    -*/
    -
    -// Include all headers, needed to use token and datum objects
    -
    -// C++ includes:
    -#include <iostream>
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "interpret.h"
    -#include "lockptrdatum.h"
    -
    -typedef lockPTRDatum< std::istream, &SLIInterpreter::Istreamtype > IstreamDatum;
    -typedef lockPTRDatum< std::istream, &SLIInterpreter::XIstreamtype > XIstreamDatum;
    -typedef lockPTRDatum< std::ostream, &SLIInterpreter::Ostreamtype > OstreamDatum;
    -
    -#endif
    diff --git a/sli/literaldatum.cc b/sli/literaldatum.cc
    deleted file mode 100644
    index 958cbe525f..0000000000
    --- a/sli/literaldatum.cc
    +++ /dev/null
    @@ -1,31 +0,0 @@
    -/*
    - *  literaldatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -// Includes from sli:
    -#include "namedatum.h"
    -
    -void
    -LiteralDatum::pprint( std::ostream& out ) const
    -{
    -  out << '/';
    -  print( out );
    -}
    diff --git a/sli/lockptrdatum.h b/sli/lockptrdatum.h
    deleted file mode 100644
    index 3f49ff866c..0000000000
    --- a/sli/lockptrdatum.h
    +++ /dev/null
    @@ -1,153 +0,0 @@
    -/*
    - *  lockptrdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef LOCKPTRDATUM_H
    -#define LOCKPTRDATUM_H
    -
    -// Includes from libnestutil:
    -#include "lockptr.h"
    -
    -// Includes from sli:
    -#include "datum.h"
    -
    -// prefixed all references to members of lockPTR, TypedDatum with this->,
    -// since HP's aCC otherwise complains about them not being declared
    -// according to ISO Standard Sec. 14.6.2(3) [temp.dep]
    -// HEP, 2001-08-09
    -
    -/* lockPTRDatum<class D, SLIType *slt>:
    -   Constraints:
    -     This class must not be a base class.
    -     The equals operator depends on that fact.
    -*/
    -template < class D, SLIType* slt >
    -class lockPTRDatum : public lockPTR< D >, public TypedDatum< slt >
    -{
    -  Datum*
    -  clone() const
    -  {
    -    return new lockPTRDatum< D, slt >( *this );
    -  }
    -
    -public:
    -  lockPTRDatum()
    -  {
    -  }
    -
    -  //   template<SLIType *st>
    -  //   lockPTRDatum(const lockPTRDatum<D,st> &d):lockPTR<D>(d),
    -  //   TypedDatum<slt>(){}
    -
    -  lockPTRDatum( const lockPTR< D > d )
    -    : lockPTR< D >( d )
    -    , TypedDatum< slt >()
    -  {
    -  }
    -
    -  /* Constructor from D* d
    -     By the definition of lockPTR, d must be unique. It will be
    -     destructed/deallocated by the implementation of lockPTR,
    -     therefore no references should be kept after construction,
    -     including constructing any other instances of this class with
    -     that data, except via copy constructor.
    -  */
    -  lockPTRDatum( D* d )
    -    : lockPTR< D >( d )
    -    , TypedDatum< slt >()
    -  {
    -  }
    -
    -  /* Constructor from D d
    -     Like the above, this is actually a constructor to a D*, so d
    -     should be dynamically allocated, and any reference discarded
    -     after this construction.
    -   */
    -  lockPTRDatum( D& d )
    -    : lockPTR< D >( d )
    -    , TypedDatum< slt >()
    -  {
    -  }
    -
    -  ~lockPTRDatum()
    -  {
    -  } // this class must not be a base class
    -
    -  void print( std::ostream& ) const;
    -  void pprint( std::ostream& ) const;
    -  void info( std::ostream& ) const;
    -
    -
    -  // tests for equality via lockPTR<D>::operator==
    -  // It is defined as identity of the underly D, i.e. &this->D == &other->D
    -  bool equals( const Datum* ) const;
    -
    -  /* operator==
    -    lockPTRDatum should only use the equals method for equality testing.
    -    Thus, the inherited lockPTR<D>::operator== is made private.  No
    -    implementation is defined.
    -  */
    -private:
    -  bool operator==( lockPTR< D >& );
    -};
    -
    -/* equals(const Datum* datum)
    -   returns: true if *this and Datum *dat are both lockptr references
    -   to the same underlying object.
    -
    -   The definition of the equals method assumes that no further
    -   distinguishing data is added by derivation.  Aka, the template
    -   class is never inherited from, and therefore type equality is
    -   guaranteed by template parameter equality.
    -*/
    -template < class D, SLIType* slt >
    -bool
    -lockPTRDatum< D, slt >::equals( const Datum* dat ) const
    -{
    -  const lockPTRDatum< D, slt >* ddc = dynamic_cast< const lockPTRDatum< D, slt >* >( dat );
    -  return ddc and lockPTR< D >::operator==( *ddc );
    -}
    -
    -template < class D, SLIType* slt >
    -void
    -lockPTRDatum< D, slt >::pprint( std::ostream& out ) const
    -{
    -  out << "<lockPTR[" << this->references() << "]->" << this->gettypename() << '(' << static_cast< void* >( this->get() )
    -      << ")>";
    -  this->unlock();
    -}
    -
    -template < class D, SLIType* slt >
    -void
    -lockPTRDatum< D, slt >::print( std::ostream& out ) const
    -{
    -  out << '<' << this->gettypename() << '>';
    -}
    -
    -template < class D, SLIType* slt >
    -void
    -lockPTRDatum< D, slt >::info( std::ostream& out ) const
    -{
    -  //  out << *dynamic_cast<C *>(const_cast<lockPTR<C,slt> *>(this));
    -  pprint( out );
    -}
    -
    -#endif
    diff --git a/sli/name.cc b/sli/name.cc
    deleted file mode 100644
    index 4e2484b16c..0000000000
    --- a/sli/name.cc
    +++ /dev/null
    @@ -1,132 +0,0 @@
    -/*
    - *  name.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "name.h"
    -
    -// C++ includes:
    -#include <cassert>
    -#include <iomanip>
    -#include <iostream>
    -#ifdef _OPENMP
    -#include <omp.h>
    -#endif
    -
    -
    -std::size_t
    -Name::capacity()
    -{
    -  return Name::handleTableInstance_().size();
    -}
    -
    -std::size_t
    -Name::num_handles()
    -{
    -  return Name::handleTableInstance_().size();
    -}
    -
    -
    -void
    -Name::list_handles( std::ostream& out )
    -{
    -  HandleTable_& table = Name::handleTableInstance_();
    -  std::size_t num_handles = table.size();
    -
    -  out << "Handle Table: \n";
    -  out << "Total number of names : " << num_handles << std::endl;
    -
    -  for ( std::size_t n = 0; n < num_handles; ++n )
    -  {
    -    out << std::setw( 6 ) << n << ": " << table[ n ] << std::endl;
    -  }
    -}
    -
    -void
    -Name::print_handle( std::ostream& o ) const
    -{
    -  o << "/" << handleTableInstance_()[ handle_ ] << '(' << handle_ << ')';
    -}
    -
    -// ---------------------------------------------------------------
    -
    -
    -const std::string&
    -Name::toString() const
    -{
    -  return handleTableInstance_()[ handle_ ];
    -}
    -
    -unsigned int
    -Name::insert( const std::string& s )
    -{
    -  Name::HandleMap_& map = Name::handleMapInstance_();
    -  Name::HandleMap_::const_iterator where = map.find( s );
    -
    -  if ( where == map.end() )
    -  {
    -#ifdef _OPENMP
    -    // This assertion protects the global name table.  We do not
    -    // protect by pragma omp critical since that could lead to hard-to-find
    -    // performance problems due to serialization.
    -    assert( not omp_in_parallel() );
    -#endif
    -    // The following is more comlex code than a simple
    -    // handleMap_[s] = Handle(s), but it avoids the creation
    -    // of spurious Handle objects. HEP 2007-05-24
    -    HandleTable_& table = Name::handleTableInstance_();
    -    unsigned int newhandle = table.size();
    -    map.insert( std::make_pair( s, newhandle ) );
    -    table.push_back( s );
    -    return newhandle;
    -  }
    -  else
    -  {
    -    return ( ( *where ).second );
    -  }
    -}
    -
    -void
    -Name::list( std::ostream& out )
    -{
    -  Name::HandleMap_& map = handleMapInstance_();
    -  out << "\nHandle Map content:" << std::endl;
    -  for ( Name::HandleMap_::const_iterator where = map.begin(); where != map.end(); ++where )
    -  {
    -    out << ( *where ).first << " -> " << ( *where ).second << std::endl;
    -  }
    -
    -  out << "\nHandle::handleTable_ content" << std::endl;
    -  Name::list_handles( out );
    -}
    -
    -void
    -Name::info( std::ostream& out )
    -{
    -  Name::list_handles( out );
    -}
    -
    -
    -std::ostream&
    -operator<<( std::ostream& o, const Name& n )
    -{
    -  o << n.toString().c_str();
    -  return o;
    -}
    diff --git a/sli/name.h b/sli/name.h
    deleted file mode 100644
    index 32e1c57c29..0000000000
    --- a/sli/name.h
    +++ /dev/null
    @@ -1,180 +0,0 @@
    -/*
    - *  name.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef NAME_H
    -#define NAME_H
    -
    -// C++ includes:
    -#include <cassert>
    -#include <deque>
    -#include <iostream>
    -#include <map>
    -#include <string>
    -
    -/**
    - * Represent strings by ints to facilitate fast comparison.
    - *
    - * Each Name object represents a string by a unique integer number.
    - * Comparing Name objects instead of comparing strings directly,
    - * reduces the complexity of string comparison to that of int comparison.
    - *
    - * Each Name object contains a Handle to the string it represents. Strings are
    - * mapped to Handles via an associative array. Handles are stored in a table,
    - * and each Handle contains its own index into this table as unique ID, as
    - * well as the string represented. Fast comparison of Name objects is achieved
    - * by comparing the indices stored in the handles. Reference counting
    - * permits deletion of unused Handles.
    - *
    - * @note Any string read by the interpreter should be converted to a Name
    - * at once.
    - * @note class Name maintains two static lookup tables and is thus not
    - * thread-safe.
    - *
    - */
    -
    -class Name
    -{
    -
    -public:
    -  typedef unsigned int handle_t;
    -  /**
    -   * Create Name without value.
    -   */
    -  Name()
    -    : handle_( 0 )
    -  {
    -  }
    -
    -  Name( const char s[] )
    -    : handle_( insert( std::string( s ) ) )
    -  {
    -  }
    -  Name( const std::string& s )
    -    : handle_( insert( s ) )
    -  {
    -  }
    -
    -  Name( const Name& n ) = default;
    -  Name& operator=( const Name& n ) = default;
    -
    -  /**
    -   * Return string represented by Name.
    -   */
    -  const std::string& toString() const;
    -
    -  /**
    -   * Return table index for Name object.
    -   */
    -  handle_t
    -  toIndex() const
    -  {
    -    return handle_;
    -  }
    -
    -  bool
    -  operator==( const Name& n ) const
    -  {
    -    return handle_ == n.handle_;
    -  }
    -
    -  bool
    -  operator!=( const Name& n ) const
    -  {
    -    return handle_ != n.handle_;
    -  }
    -
    -  /**
    -   * Non-alphabetic ordering of names.
    -   * Entering Name's into dictionaries requires ordering. Ordering based
    -   * on string comparison would be very slow. We thus compare based on
    -   * table indices.
    -   */
    -  bool
    -  operator<( const Name& n ) const
    -  {
    -    return handle_ < n.handle_;
    -  }
    -
    -  static bool
    -  lookup( const std::string& s )
    -  {
    -    HandleMap_& table = handleMapInstance_();
    -    return ( table.find( s ) != table.end() );
    -  }
    -
    -  static size_t capacity();
    -  static size_t num_handles();
    -
    -  void print_handle( std::ostream& ) const;
    -
    -  static void list_handles( std::ostream& );
    -  static void list( std::ostream& );
    -  static void info( std::ostream& );
    -
    -private:
    -  handle_t insert( const std::string& );
    -
    -  /**
    -   * Datatype for map from strings to handles.
    -   */
    -  typedef std::map< std::string, handle_t > HandleMap_;
    -  typedef std::deque< std::string > HandleTable_;
    -
    -  /**
    -   * Function returning a reference to the single map instance.
    -   * Implementation akin to Meyers Singleton, see Alexandrescu, ch 6.4.
    -   */
    -  static HandleMap_& handleMapInstance_();
    -  static HandleTable_& handleTableInstance_();
    -
    -  /**
    -   * Handle for the name represented by the Name object.
    -   */
    -  handle_t handle_;
    -};
    -
    -std::ostream& operator<<( std::ostream&, const Name& );
    -
    -
    -inline Name::HandleTable_&
    -Name::handleTableInstance_()
    -{
    -  // Meyers singleton, created first time function is invoked.
    -
    -  static HandleTable_ handleTable( 1, "0" );
    -
    -  return handleTable;
    -}
    -
    -inline Name::HandleMap_&
    -Name::handleMapInstance_()
    -{
    -  // Meyers singleton, created first time function is invoked.
    -  static HandleMap_ handleMap;
    -
    -  handleTableInstance_();
    -
    -  return handleMap;
    -}
    -
    -
    -#endif
    diff --git a/sli/namedatum.cc b/sli/namedatum.cc
    deleted file mode 100644
    index 4c1cd5cc16..0000000000
    --- a/sli/namedatum.cc
    +++ /dev/null
    @@ -1,30 +0,0 @@
    -/*
    - *  namedatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "namedatum.h"
    -
    -// initialization of static members requires template<>
    -// see Stroustrup C.13.1 --- HEP 2001-08-09
    -template <>
    -nest::pool AggregateDatum< Name, &SLIInterpreter::Nametype >::memory( sizeof( NameDatum ), 10240, 1 );
    -template <>
    -nest::pool AggregateDatum< Name, &SLIInterpreter::Literaltype >::memory( sizeof( LiteralDatum ), 10240, 1 );
    diff --git a/sli/namedatum.h b/sli/namedatum.h
    deleted file mode 100644
    index 056434217c..0000000000
    --- a/sli/namedatum.h
    +++ /dev/null
    @@ -1,130 +0,0 @@
    -/*
    - *  namedatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef NAMEDATUM_H
    -#define NAMEDATUM_H
    -/*
    -    Defines Datum classes which are derived from Names:
    -    class NameDatum;
    -    class LiteralDatum;
    -    class BoolDatum;
    -*/
    -
    -// Include all headers, needed to use token and datum objects
    -
    -// C++ includes:
    -#include <string>
    -#include <typeinfo>
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from sli:
    -#include "aggregatedatum.h"
    -#include "interpret.h"
    -#include "name.h"
    -
    -/* These are declarations to specialize the static memory pool BEFORE
    -   we instantiate the AggregateDatum. Note, that this is only a declaration,
    -   because we do not provide an initializer (see ISO14882 Sec.  14.7.3.15.)
    -   The definition is given in the *.CC file with the appropriate
    -   initializer.
    -
    -   Note that SUN's Forte 6.2 and 7 does not handle this correctly,
    -   so we have to use a compiler-switch. 11/2002 Gewaltig
    -
    -   The Alpha cxx V6.3-002 says that storage class extern is not allowed here,
    -   so I removed it. 15.2.2002 Diesmann
    -*/
    -#ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS
    -template <>
    -nest::pool AggregateDatum< Name, &SLIInterpreter::Nametype >::memory;
    -
    -template <>
    -nest::pool AggregateDatum< Name, &SLIInterpreter::Literaltype >::memory;
    -#endif
    -
    -
    -class NameDatum : public AggregateDatum< Name, &SLIInterpreter::Nametype >
    -{
    -  Datum*
    -  clone() const override
    -  {
    -    return new NameDatum( *this );
    -  }
    -
    -  Datum*
    -  get_ptr() override
    -  {
    -    Datum::addReference();
    -    return this;
    -  }
    -
    -public:
    -  NameDatum( const Name& n )
    -    : AggregateDatum< Name, &SLIInterpreter::Nametype >( n )
    -  {
    -    set_executable();
    -  }
    -  NameDatum( const NameDatum& n )
    -    : AggregateDatum< Name, &SLIInterpreter::Nametype >( n )
    -  {
    -  }
    -  ~NameDatum() override
    -  {
    -    set_executable();
    -  }
    -};
    -
    -class LiteralDatum : public AggregateDatum< Name, &SLIInterpreter::Literaltype >
    -{
    -  Datum*
    -  clone() const override
    -  {
    -    return new LiteralDatum( *this );
    -  }
    -
    -  Datum*
    -  get_ptr() override
    -  {
    -    Datum::addReference();
    -    return this;
    -  }
    -
    -public:
    -  LiteralDatum( const Name& n )
    -    : AggregateDatum< Name, &SLIInterpreter::Literaltype >( n )
    -  {
    -    set_executable();
    -  }
    -  LiteralDatum( const LiteralDatum& n )
    -    : AggregateDatum< Name, &SLIInterpreter::Literaltype >( n )
    -  {
    -    set_executable();
    -  }
    -  ~LiteralDatum() override
    -  {
    -  }
    -  void pprint( std::ostream& ) const override;
    -};
    -
    -#endif
    diff --git a/sli/numericdatum.h b/sli/numericdatum.h
    deleted file mode 100644
    index ac84f79a23..0000000000
    --- a/sli/numericdatum.h
    +++ /dev/null
    @@ -1,116 +0,0 @@
    -/*
    - *  numericdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef NUMERICDATUM_H
    -#define NUMERICDATUM_H
    -/*
    -    Datum template for numeric data types
    -*/
    -
    -// Includes from libnestutil:
    -#include "allocator.h"
    -
    -// Includes from sli:
    -#include "genericdatum.h"
    -
    -
    -// Prefixed all references to members of GenericDatum with this->,
    -// since HP's aCC otherwise complains about them not being declared
    -// according to ISO Standard Sec. 14.6.2(3) [temp.dep]
    -// HEP, 2001-08-08
    -
    -template < class D, SLIType* slt >
    -class NumericDatum : public GenericDatum< D, slt >
    -{
    -protected:
    -  static nest::pool memory;
    -  using GenericDatum< D, slt >::d;
    -
    -private:
    -  Datum*
    -  clone() const
    -  {
    -    return new NumericDatum< D, slt >( *this );
    -  }
    -
    -public:
    -  NumericDatum()
    -  {
    -    d = ( D ) 0;
    -  }
    -  NumericDatum( const D& d_s )
    -  {
    -    d = d_s;
    -  }
    -  virtual ~NumericDatum()
    -  {
    -  }
    -
    -  operator D() const
    -  {
    -    return d;
    -  }
    -
    -  operator D&()
    -  {
    -    return d;
    -  }
    -
    -  void
    -  input_form( std::ostream& o ) const
    -  {
    -    pprint( o );
    -  }
    -
    -  void
    -  pprint( std::ostream& o ) const
    -  {
    -    this->print( o );
    -  }
    -
    -  static void*
    -  operator new( size_t size )
    -  {
    -    if ( size != memory.size_of() )
    -    {
    -      return ::operator new( size );
    -    }
    -    return memory.alloc();
    -  }
    -
    -  static void
    -  operator delete( void* p, size_t size )
    -  {
    -    if ( not p )
    -    {
    -      return;
    -    }
    -    if ( size != memory.size_of() )
    -    {
    -      ::operator delete( p );
    -      return;
    -    }
    -    memory.free( p );
    -  }
    -};
    -
    -#endif
    diff --git a/sli/oosupport.cc b/sli/oosupport.cc
    deleted file mode 100644
    index 0099c6ba5f..0000000000
    --- a/sli/oosupport.cc
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    - *  oosupport.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    SLI's data access functions
    -*/
    -
    -#include "oosupport.h"
    -
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "dictstack.h"
    -#include "namedatum.h"
    -
    -void
    -OOSupportModule::init( SLIInterpreter* i )
    -{
    -  i->createcommand( "call", &callmemberfunction );
    -}
    -
    -const std::string
    -OOSupportModule::commandstring() const
    -{
    -  return std::string( "(oosupport.sli) run" );
    -}
    -
    -const std::string
    -OOSupportModule::name() const
    -{
    -  return std::string( "OOSupport" );
    -}
    -
    -void
    -OOSupportModule::CallMemberFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: dict key call -> unknown
    -
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( dict );
    -  LiteralDatum* key = dynamic_cast< LiteralDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( key );
    -
    -  Token value = ( *dict )->lookup( *key );
    -
    -  if ( value.datum() )
    -  {
    -    Token nt( new NameDatum( *key ) );
    -    i->DStack->push( *dict );
    -    i->EStack.pop(); // never forget me
    -    i->EStack.push( i->baselookup( i->end_name ) );
    -    i->EStack.push_move( nt );
    -    i->OStack.pop( 2 );
    -  }
    -  else
    -  {
    -    i->raiseerror( "UnknownMember" );
    -  }
    -}
    diff --git a/sli/oosupport.h b/sli/oosupport.h
    deleted file mode 100644
    index 6e1bb050e9..0000000000
    --- a/sli/oosupport.h
    +++ /dev/null
    @@ -1,54 +0,0 @@
    -/*
    - *  oosupport.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef OOSUPPORT_H
    -#define OOSUPPORT_H
    -/*
    -    SLI's array access functions
    -*/
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -#include "slimodule.h"
    -
    -class OOSupportModule : public SLIModule
    -{
    -  class CallMemberFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  CallMemberFunction callmemberfunction;
    -
    -public:
    -  OOSupportModule()
    -  {
    -  }
    -
    -  void init( SLIInterpreter* ) override;
    -  const std::string commandstring() const override;
    -  const std::string name() const override;
    -};
    -
    -
    -#endif
    diff --git a/sli/parser.cc b/sli/parser.cc
    deleted file mode 100644
    index e7c17da8e1..0000000000
    --- a/sli/parser.cc
    +++ /dev/null
    @@ -1,221 +0,0 @@
    -/*
    - *  parser.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    parser.cc
    -*/
    -
    -#include "parser.h"
    -
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "namedatum.h"
    -#include "scanner.h"
    -
    -/*****************************************************************/
    -/* parse                                                         */
    -/* --------            Token --> Token                           */
    -/*                                                               */
    -/* Errors:                                                       */
    -/*                                                               */
    -/*                                                               */
    -/*                                                               */
    -/*****************************************************************/
    -
    -// kann der ParseStack ein Stack von ArrayDatums sein ?????
    -// Token ist besser weil dann verschoben werden kann
    -void
    -Parser::init( std::istream& is )
    -{
    -  s = new Scanner( &is );
    -
    -  arraytoken = ArrayDatum();
    -}
    -
    -Parser::Parser( std::istream& is )
    -  : s( nullptr )
    -  , ParseStack( 128 )
    -{
    -  init( is );
    -  assert( s );
    -}
    -
    -Parser::Parser()
    -  : s( nullptr )
    -  , ParseStack( 128 )
    -{
    -  init( std::cin );
    -  assert( s );
    -}
    -
    -
    -bool
    -Parser::operator()( Token& t )
    -{
    -  assert( s );
    -
    -  Token pt;
    -
    -  bool ok;
    -  ParseResult result = scancontinue;
    -
    -  do
    -  {
    -    if ( result == scancontinue )
    -    {
    -      ok = ( *s )( t );
    -    }
    -    else
    -    {
    -      ok = true;
    -    }
    -
    -
    -    if ( ok )
    -    {
    -
    -      if ( t.contains( s->BeginProcedureSymbol ) )
    -      {
    -        ParseStack.push( new LitprocedureDatum() );
    -        ParseStack.top()->set_executable();
    -        result = scancontinue;
    -      }
    -      else if ( t.contains( s->BeginArraySymbol ) )
    -      {
    -        Token cb( new NameDatum( "[" ) );
    -        t.move( cb );
    -        result = tokencontinue;
    -      }
    -      else if ( t.contains( s->EndProcedureSymbol ) )
    -      {
    -        if ( not ParseStack.empty() )
    -        {
    -          ParseStack.pop_move( pt );
    -          if ( pt->isoftype( SLIInterpreter::Litproceduretype ) )
    -          {
    -            t.move( pt ); // procedure completed
    -            result = tokencontinue;
    -          }
    -          else
    -          {
    -            result = endarrayexpected;
    -          }
    -        }
    -        else
    -        {
    -          result = noopenproc;
    -        }
    -      }
    -      else if ( t.contains( s->EndArraySymbol ) )
    -      {
    -        Token ob( new NameDatum( "]" ) );
    -        t.move( ob );
    -        result = tokencontinue;
    -      }
    -      else if ( t.contains( s->EndSymbol ) )
    -      {
    -        if ( not ParseStack.empty() )
    -        {
    -          result = unexpectedeof;
    -          ParseStack.clear();
    -        }
    -        else
    -        {
    -          result = tokencompleted;
    -        }
    -      }
    -      else
    -      {
    -        // Now we should be left with a "simple" Token
    -        assert( not t->isoftype( SLIInterpreter::Symboltype ) );
    -        if ( not ParseStack.empty() )
    -        {
    -          // append token to array on stack
    -          ParseStack.pop_move( pt );
    -          if ( pt->isoftype( SLIInterpreter::Arraytype ) )
    -          {
    -            ArrayDatum* pa = dynamic_cast< ArrayDatum* >( pt.datum() );
    -            assert( pa );
    -            pa->push_back( t );
    -          }
    -          else // now it must be a procedure
    -          {
    -            LitprocedureDatum* pp = dynamic_cast< LitprocedureDatum* >( pt.datum() );
    -            assert( pp );
    -            pp->set_executable();
    -            pp->push_back( t );
    -          }
    -          ParseStack.push_move( pt );
    -          result = scancontinue;
    -        }
    -        else
    -        {
    -          result = tokencompleted;
    -        }
    -      }
    -
    -    } // if(ok)
    -    //      else std::cerr << "<Scanner> : unable to scan input, Result:" << ok
    -    //      << '\n';
    -  } while ( result == tokencontinue or result == scancontinue );
    -
    -  if ( result != tokencompleted )
    -  {
    -    switch ( result )
    -    {
    -    case noopenproc:
    -      s->print_error( "Open brace missing." );
    -      break;
    -    case endprocexpected:
    -      s->print_error( "Closed brace missing." );
    -      break;
    -    case noopenarray:
    -      s->print_error( "Open bracket missing." );
    -      break;
    -    case endarrayexpected:
    -      s->print_error( "Closed bracket missing." );
    -      break;
    -    case unexpectedeof:
    -      s->print_error( "Unexpected end of input." );
    -      break;
    -    default:
    -      break;
    -    }
    -    t = s->EndSymbol; // clear erroneous input
    -    return false;
    -  }
    -  return ( result == tokencompleted );
    -}
    -
    -bool
    -operator==( Parser const& p1, Parser const& p2 )
    -{
    -  return &p1 == &p2;
    -}
    -
    -std::ostream&
    -operator<<( std::ostream& out, const Parser& p )
    -{
    -  out << "Parser(" << p.scan() << ')' << std::endl;
    -  return out;
    -}
    diff --git a/sli/parser.h b/sli/parser.h
    deleted file mode 100644
    index dc5d67aae9..0000000000
    --- a/sli/parser.h
    +++ /dev/null
    @@ -1,101 +0,0 @@
    -/*
    - *  parser.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef PARSER_H
    -#define PARSER_H
    -/*
    -    SLI's parser.
    -*/
    -
    -// C++ includes:
    -#include <iostream>
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "scanner.h"
    -#include "token.h"
    -#include "tokenstack.h"
    -
    -
    -class Parser
    -{
    -  Scanner* s;
    -
    -  Token arraytoken;
    -  Token proctoken;
    -  TokenStack ParseStack;
    -
    -  enum ParseResult
    -  {
    -    tokencontinue,
    -    scancontinue,
    -    tokencompleted,
    -    noopenproc,
    -    endprocexpected,
    -    noopenarray,
    -    endarrayexpected,
    -    unexpectedeof
    -  };
    -
    -  void init( std::istream& );
    -
    -public:
    -  Parser();
    -  Parser( std::istream& );
    -
    -  bool operator()( Token& );
    -  bool
    -  readToken( std::istream& is, Token& t )
    -  {
    -    s->source( &is );
    -    return operator()( t );
    -  }
    -
    -  bool
    -  readSymbol( std::istream& is, Token& t )
    -  {
    -    s->source( &is );
    -    return s->operator()( t );
    -  }
    -
    -  Scanner const*
    -  scan() const
    -  {
    -    return s;
    -  }
    -
    -  void
    -  clear_context()
    -  {
    -    if ( s )
    -    {
    -      s->clear_context();
    -    }
    -  }
    -};
    -
    -bool operator==( Parser const&, Parser const& );
    -
    -std::ostream& operator<<( std::ostream&, const Parser& );
    -
    -
    -#endif
    diff --git a/sli/parserdatum.h b/sli/parserdatum.h
    deleted file mode 100644
    index 169f65c7c5..0000000000
    --- a/sli/parserdatum.h
    +++ /dev/null
    @@ -1,52 +0,0 @@
    -/*
    - *  parserdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef PARSERDATUM_H
    -#define PARSERDATUM_H
    -
    -// Includes from sli:
    -#include "aggregatedatum.h"
    -#include "interpret.h"
    -#include "parser.h"
    -
    -class ParserDatum : public AggregateDatum< Parser, &SLIInterpreter::Parsertype >
    -{
    -  Datum*
    -  clone() const
    -  {
    -    return new ParserDatum( *this );
    -  }
    -
    -  ParserDatum()
    -  {
    -    set_executable();
    -  }
    -
    -public:
    -  ParserDatum( Scanner* s )
    -    : AggregateDatum< Parser, &SLIInterpreter::Parsertype >( Parser( s ) )
    -  {
    -    set_executable();
    -  }
    -};
    -
    -#endif
    diff --git a/sli/processes.cc b/sli/processes.cc
    deleted file mode 100644
    index 2b4fd4b659..0000000000
    --- a/sli/processes.cc
    +++ /dev/null
    @@ -1,955 +0,0 @@
    -/*
    - *  processes.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "processes.h"
    -
    -// C includes:
    -#include <fcntl.h>
    -#include <signal.h>
    -#include <sys/stat.h>
    -#include <sys/types.h>
    -#include <sys/wait.h>
    -#include <unistd.h>
    -
    -// C++ includes:
    -#include <cassert>
    -#include <cstdio>
    -#include <cstdlib>
    -#include <cstring>
    -#include <iostream>
    -#include <string>
    -#include <vector>
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "dict.h"      // for TokenMap
    -#include "dictdatum.h" // for signaldict
    -#include "dictutils.h"
    -#include "fdstream.h"
    -#include "integerdatum.h" // Include the data-types we use!
    -#include "interpret.h"    // for SLI Interpreter and messaging mechanism
    -#include "iostreamdatum.h"
    -#include "namedatum.h"
    -#include "sliexceptions.h"
    -#include "stringdatum.h"
    -
    -
    -// sstream has functions std::?stringstream
    -// strstream has functions std::?strstream
    -// HEP 2002-10-06
    -#ifdef HAVE_SSTREAM
    -#include <sstream>
    -#else
    -#include <strstream>
    -#endif
    -
    -#ifdef HAVE_ALPHA_CXX_STD_BUG
    -#undef __PURE_CNAME
    -#include <cerrno>
    -#define __PURE_CNAME
    -#else
    -#include <cerrno>
    -#endif
    -
    -#ifndef _POSIX_SOURCE
    -#define _SYNOD__SET_POSIX_SOURCE
    -#define _POSIX_SOURCE
    -#endif
    -
    -#if defined __APPLE__ && defined HAVE_MACH_MACH_H
    -extern "C"
    -{
    -  // Similar to the above prototype definitions for BG.
    -  unsigned long darwin_get_used_mem();
    -}
    -#endif
    -
    -// definition of static variables and functions declared in processes.h:
    -pid_t Processes::children_group = 0;
    -
    -// The following concernes the new module: -----------------------
    -
    -// This will be used to produce systemerror-messages
    -
    -const std::string
    -Processes::systemerror( SLIInterpreter* i )
    -{
    -  Token errordict_t( i->baselookup( i->errordict_name ) );
    -  assert( errordict_t.datum() );
    -  DictionaryDatum errordict_d = *dynamic_cast< DictionaryDatum* >( errordict_t.datum() );
    -
    -  std::string ErrorMessage( std::strerror( errno ) );
    -
    -  errordict_d->insert( Name( "sys_errname" ), new LiteralDatum( ErrorMessage ) );
    -  errordict_d->insert( Name( "sys_errno" ), new IntegerDatum( errno ) );
    -
    -  return "SystemError";
    -}
    -
    -int
    -Processes::fd( std::istream* s )
    -{
    -  if ( s == &std::cin )
    -  {
    -    return STDIN_FILENO;
    -  }
    -  else
    -  {
    -    ifdstream* fs = dynamic_cast< ifdstream* >( s );
    -    assert( fs );
    -    return fs->rdbuf()->fd();
    -  }
    -}
    -
    -int
    -Processes::fd( std::ostream* s )
    -{
    -  if ( s == &std::cout )
    -  {
    -    return STDOUT_FILENO;
    -  }
    -  else if ( ( s == &std::cerr ) or ( s == &std::clog ) )
    -  {
    -    return STDERR_FILENO;
    -  }
    -  else
    -  {
    -    ofdstream* fs = dynamic_cast< ofdstream* >( s );
    -    assert( fs );
    -    return fs->rdbuf()->fd();
    -  }
    -}
    -
    -// end of definition of static variables and functions
    -
    -const std::string
    -Processes::name() const
    -{
    -  return std::string( "basic process management" ); // Return name of the module
    -}
    -
    -const std::string
    -Processes::commandstring() const
    -{
    -  return std::string( "(processes.sli) run" );
    -}
    -
    -void
    -Processes::init( SLIInterpreter* i )
    -{
    -  // Create Dictionary "signaldict", which will contain the system's signal
    -  // values:
    -  Dictionary* signaldict = new Dictionary; // get a new dictionary from the heap
    -
    -  // There is a typeconversion operator Datum<->Token !
    -  signaldict->insert( SIGABRT_name, new IntegerDatum( SIGABRT ) );
    -  signaldict->insert( SIGALRM_name, new IntegerDatum( SIGALRM ) );
    -  signaldict->insert( SIGFPE_name, new IntegerDatum( SIGFPE ) );
    -  signaldict->insert( SIGHUP_name, new IntegerDatum( SIGHUP ) );
    -  signaldict->insert( SIGILL_name, new IntegerDatum( SIGILL ) );
    -  signaldict->insert( SIGINT_name, new IntegerDatum( SIGINT ) );
    -  signaldict->insert( SIGKILL_name, new IntegerDatum( SIGKILL ) );
    -  signaldict->insert( SIGPIPE_name, new IntegerDatum( SIGPIPE ) );
    -  signaldict->insert( SIGQUIT_name, new IntegerDatum( SIGQUIT ) );
    -  signaldict->insert( SIGSEGV_name, new IntegerDatum( SIGSEGV ) );
    -  signaldict->insert( SIGTERM_name, new IntegerDatum( SIGTERM ) );
    -  signaldict->insert( SIGUSR1_name, new IntegerDatum( SIGUSR1 ) );
    -  signaldict->insert( SIGUSR2_name, new IntegerDatum( SIGUSR2 ) );
    -
    -  signaldict->insert( SIGCHLD_name, new IntegerDatum( SIGCHLD ) );
    -  signaldict->insert( SIGCONT_name, new IntegerDatum( SIGCONT ) );
    -  signaldict->insert( SIGSTOP_name, new IntegerDatum( SIGSTOP ) );
    -  signaldict->insert( SIGTSTP_name, new IntegerDatum( SIGTSTP ) );
    -  signaldict->insert( SIGTTIN_name, new IntegerDatum( SIGTTIN ) );
    -  signaldict->insert( SIGTTOU_name, new IntegerDatum( SIGTTOU ) );
    -
    -  i->def( signaldict_name, new DictionaryDatum( signaldict ) );
    -  // DictionaryDatum(signaldict) makes a lockPTR from the ordinary pointer.
    -  // The datum stored in the signaldict-token will thus be a lockPTR to a
    -  // dictionary
    -
    -  // create variables "sys_errname" and "sys_errno"
    -  //  and all needed errornumbers in errordict
    -  Token errordict_t( i->baselookup( i->errordict_name ) );
    -  assert( errordict_t.datum() );
    -  DictionaryDatum errordict_d = *dynamic_cast< DictionaryDatum* >( errordict_t.datum() );
    -
    -  errordict_d->insert( sys_errname, new LiteralDatum( "" ) );
    -  errordict_d->insert( sys_errno, new IntegerDatum( 0 ) );
    -
    -  errordict_d->insert( E2BIG_name, new IntegerDatum( E2BIG ) );
    -  errordict_d->insert( EACCES_name, new IntegerDatum( EACCES ) );
    -  errordict_d->insert( EAGAIN_name, new IntegerDatum( EAGAIN ) );
    -  errordict_d->insert( EBADF_name, new IntegerDatum( EBADF ) );
    -  errordict_d->insert( EBUSY_name, new IntegerDatum( EBUSY ) );
    -  errordict_d->insert( ECHILD_name, new IntegerDatum( ECHILD ) );
    -  errordict_d->insert( EDEADLK_name, new IntegerDatum( EDEADLK ) );
    -  errordict_d->insert( EDOM_name, new IntegerDatum( EDOM ) );
    -  errordict_d->insert( EEXIST_name, new IntegerDatum( EEXIST ) );
    -  errordict_d->insert( EFAULT_name, new IntegerDatum( EFAULT ) );
    -  errordict_d->insert( EFBIG_name, new IntegerDatum( EFBIG ) );
    -  errordict_d->insert( EINTR_name, new IntegerDatum( EINTR ) );
    -  errordict_d->insert( EINVAL_name, new IntegerDatum( EINVAL ) );
    -  errordict_d->insert( EIO_name, new IntegerDatum( EIO ) );
    -  errordict_d->insert( EISDIR_name, new IntegerDatum( EISDIR ) );
    -  errordict_d->insert( EMFILE_name, new IntegerDatum( EMFILE ) );
    -  errordict_d->insert( EMLINK_name, new IntegerDatum( EMLINK ) );
    -  errordict_d->insert( ENAMETOOLONG_name, new IntegerDatum( ENAMETOOLONG ) );
    -  errordict_d->insert( ENFILE_name, new IntegerDatum( ENFILE ) );
    -  errordict_d->insert( ENODEV_name, new IntegerDatum( ENODEV ) );
    -  errordict_d->insert( ENOENT_name, new IntegerDatum( ENOENT ) );
    -  errordict_d->insert( ENOEXEC_name, new IntegerDatum( ENOEXEC ) );
    -  errordict_d->insert( ENOLCK_name, new IntegerDatum( ENOLCK ) );
    -  errordict_d->insert( ENOMEM_name, new IntegerDatum( ENOMEM ) );
    -  errordict_d->insert( ENOSPC_name, new IntegerDatum( ENOSPC ) );
    -  errordict_d->insert( ENOSYS_name, new IntegerDatum( ENOSYS ) );
    -  errordict_d->insert( ENOTDIR_name, new IntegerDatum( ENOTDIR ) );
    -  errordict_d->insert( ENOTEMPTY_name, new IntegerDatum( ENOTEMPTY ) );
    -  errordict_d->insert( ENOTTY_name, new IntegerDatum( ENOTTY ) );
    -  errordict_d->insert( ENXIO_name, new IntegerDatum( ENXIO ) );
    -  errordict_d->insert( EPERM_name, new IntegerDatum( EPERM ) );
    -  errordict_d->insert( EPIPE_name, new IntegerDatum( EPIPE ) );
    -  errordict_d->insert( ERANGE_name, new IntegerDatum( ERANGE ) );
    -  errordict_d->insert( EROFS_name, new IntegerDatum( EROFS ) );
    -  errordict_d->insert( ESPIPE_name, new IntegerDatum( ESPIPE ) );
    -  errordict_d->insert( ESRCH_name, new IntegerDatum( ESRCH ) );
    -  errordict_d->insert( EXDEV_name, new IntegerDatum( EXDEV ) );
    -
    -
    -  // ...don't forget to create the new SLI-commands!
    -  i->createcommand( "fork", &forkfunction );
    -  i->createcommand( "sysexec_a", &sysexec_afunction );
    -  i->createcommand( "waitPID", &waitPIDfunction );
    -  i->createcommand( "kill", &killfunction );
    -  i->createcommand( "pipe", &pipefunction );
    -  i->createcommand( "dup2_is_is", &dup2_is_isfunction );
    -  i->createcommand( "dup2_os_os", &dup2_os_osfunction );
    -  i->createcommand( "dup2_is_os", &dup2_is_osfunction );
    -  i->createcommand( "dup2_os_is", &dup2_os_isfunction );
    -  i->createcommand( "available", &availablefunction );
    -  i->createcommand( "getPID", &getpidfunction );
    -  i->createcommand( "getPPID", &getppidfunction );
    -  i->createcommand( "getPGRP", &getpgrpfunction );
    -  i->createcommand( "mkfifo", &mkfifofunction );
    -#if defined __APPLE__ && defined HAVE_MACH_MACH_H
    -  i->createcommand( ":memory_thisjob_darwin", &memorythisjobdarwinfunction );
    -#endif
    -  i->createcommand( "setNONBLOCK", &setnonblockfunction );
    -  i->createcommand( "ctermid", &ctermidfunction );
    -  i->createcommand( "isatty_os", &isatty_osfunction );
    -  i->createcommand( "isatty_is", &isatty_isfunction );
    -}
    -
    -Processes::~Processes()
    -{
    -}
    -
    -
    -// ---------------------------------------------------------------
    -
    -
    -// The following concernes the new command(s): -------------------
    -
    -void
    -Processes::ForkFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  pid_t pid;
    -  pid = fork();
    -  if ( pid < 0 )
    -  {
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {
    -    if ( pid != 0 )
    -    { // I am the parent. pid is the PID of the new child.
    -#ifdef HAVE_SSTREAM
    -      std::stringstream s;
    -      s << "Child PID: " << pid << "\n";
    -      i->message( SLIInterpreter::M_DEBUG, "fork", s.str().c_str() );
    -#endif
    -      //           if (Processes::children_group == 0)
    -      //             {
    -      //               std::cerr << "Parent: Creating and putting child into new
    -      //               process group ";
    -      //               int result = setpnode_id(pid,pid);
    -      //               if (result < 0) i->raiseerror(systemerror(i));
    -      //               Processes::children_group = pid;
    -      //               std::cerr << Processes::children_group << std::endl;
    -      //             }
    -      //           else
    -      //             {
    -      //               std::cerr << "Parent: Putting child into process group "
    -      //               <<
    -      //               Processes::children_group << std::endl;
    -      //               int result = setpnode_id(pid,Processes::children_group);
    -      //               if (result < 0) i->raiseerror(systemerror(i));
    -      //             }
    -    }
    -    else // for the child
    -    {
    -      // In case we are in debug_mode, we need to switch it off
    -      // Otherwise the debug prompt will disturb further processing.
    -      i->debug_mode_off();
    -    }
    -
    -    i->EStack.pop(); // Don't forget to pop yourself...
    -
    -    Token result_token( new IntegerDatum( pid ) ); // Make Token, containing
    -                                                   // IntegerDatum, which is
    -                                                   // initialized to pid;
    -    i->OStack.push_move( result_token );
    -  }
    -}
    -
    -void
    -Processes::Sysexec_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() != 0 );
    -
    -  Token array_token;
    -  i->OStack.pop_move( array_token ); // move topmost Token into namearray_token
    -
    -  // this is an array of tokens (to names)
    -  ArrayDatum* array = dynamic_cast< ArrayDatum* >( array_token.datum() );
    -  assert( array );
    -
    -  assert( array->size() > 0 ); // need at least the commandname
    -
    -  // The following array is needed to supply the function execvp with a C
    -  // string array. Thus, the supplied array of SLI strings must be converted.
    -  // argv is deleted right after the call to execvp(command, const_cast<char *
    -  // const *> (argv) );
    -  //
    -  // **argv denotes an pointer to an array which is allocated dynamically
    -  // the old formulation char *argv[array->size() + 1]; is no longer legal c++
    -  // (Ruediger!!)
    -  char** argv = new char*[ array->size() + 1 ];
    -
    -  for ( unsigned int j = 0; j < array->size(); j++ ) // forall in array
    -  {
    -    StringDatum* nd = dynamic_cast< StringDatum* >( ( *array )[ j ].datum() );
    -    assert( nd );
    -    // StringDatum is derived from class string.
    -    argv[ j ] = const_cast< char* >( nd->c_str() );
    -  }
    -
    -  char* command = argv[ 0 ];
    -  argv[ array->size() ] = nullptr;
    -  int result = execvp( command, argv );
    -  //  int result = execvp(command, const_cast<char * const *> (argv) );
    -  delete[] argv;
    -
    -  if ( result == -1 )
    -  {                                     // an error occured!
    -    i->OStack.push_move( array_token ); // restore operand stack
    -    i->raiseerror( systemerror( i ) );
    -  }
    -
    -} // auto-destroy namearray_token and free its datum.
    -
    -void
    -Processes::WaitPIDFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -
    -  assert( i->OStack.load() >= 2 ); // waitPID takes 2 arguments
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  IntegerDatum* pidin_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( pidin_d );
    -
    -  BoolDatum* nohangflag_d = dynamic_cast< BoolDatum* >( i->OStack.top().datum() );
    -  assert( nohangflag_d );
    -
    -  // call waitpid()
    -  int stat_value;
    -  int options = 0;
    -  if ( *nohangflag_d )
    -  {
    -    options = WNOHANG;
    -  }
    -  pid_t pidout = waitpid( pidin_d->get(), &stat_value, options );
    -
    -  // Check for error
    -  if ( pidout == -1 ) // an Error occured
    -  {
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else if ( pidout == 0 ) // NoHangFlag was set, and no information was ready
    -  {
    -    i->EStack.pop();
    -    i->OStack.pop();
    -    i->OStack.pop();     // We will oly leave one result on stack: 0
    -    i->OStack.push( 0 ); // Push 0 on stack.
    -  }
    -  else // child exited
    -  {
    -    // push result
    -    Token pidout_t( new IntegerDatum( pidout ) ); // Make Token, containing
    -                                                  // IntegerDatum, which is
    -                                                  // initialized to pidout;
    -    // Push on stack by moving the contents of this token.
    -    i->OStack.push_move( pidout_t );
    -    // Ostack is now: pidin(int) nohangflag(bool) pidout(int)
    -    // first 2 Tokens will be reused: status(int) normalexitflag(bool)
    -    // pidout(int)
    -    // This is meant to produce clearity, not confusion!
    -    IntegerDatum* status_d = pidin_d;
    -    BoolDatum* normalexitflag_d = nohangflag_d; // just a renaming of variables!
    -
    -    // check status
    -    if ( WIFEXITED( stat_value ) ) // child exited normally
    -    {
    -      i->EStack.pop();
    -      ( *normalexitflag_d ) = true;
    -      ( *status_d ) = WEXITSTATUS( stat_value ); // return exit status
    -    }
    -    else if ( WIFSIGNALED( stat_value ) ) // child terminated due to a signal
    -                                          // that was not caught
    -    {
    -      i->EStack.pop();
    -      ( *normalexitflag_d ) = false;
    -      ( *status_d ) = WTERMSIG( stat_value ); // return number of terminating signal
    -    }
    -    else
    -    {
    -      i->OStack.pop(); // restore OStack before raising an error
    -      i->raiseerror( "UnhandledExitOfChild" );
    -    }
    -  }
    -}
    -
    -
    -void
    -Processes::KillFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  assert( i->OStack.load() >= 2 ); // kill takes 2 arguments
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  IntegerDatum* pid_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( pid_d );
    -
    -  IntegerDatum* signal_d = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( signal_d );
    -
    -  // call kill()
    -  int result = kill( pid_d->get(), signal_d->get() );
    -
    -  if ( result == -1 )
    -  { // an error occured!
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {                     // no error
    -    i->EStack.pop();    // pop command from execution stack
    -    i->OStack.pop( 2 ); // pop arguments from operand stack
    -  }
    -}
    -
    -
    -void
    -Processes::PipeFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call pipe()
    -  int filedes[ 2 ];
    -  int result = pipe( filedes );
    -
    -  if ( result == -1 )
    -  { // an error occured!
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  { // no error
    -    ifdstream* in = new ifdstream( filedes[ 0 ] );
    -    ofdstream* out = new ofdstream( filedes[ 1 ] );
    -
    -    Token in_t( new IstreamDatum( in ) );
    -    Token out_t( new OstreamDatum( out ) );
    -
    -    i->OStack.push_move( in_t );
    -    i->OStack.push_move( out_t );
    -
    -    i->EStack.pop(); // pop command from execution stack
    -  }
    -}
    -
    -
    -void
    -Processes::Dup2_is_isFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  assert( i->OStack.load() >= 2 ); // dup2 takes 2 arguments
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  IstreamDatum* s_d1 = dynamic_cast< IstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( s_d1 );
    -  IstreamDatum* s_d2 = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -  assert( s_d2 );
    -
    -  // call dup2();
    -  // int result = dup2( fd(s_d1->get()) , fd(s_d2->get()) );//using get() on a
    -  // LockPTR will lock the PointerObject!
    -  // This would result in a failed assertion at the next operation on that Datum
    -  // (if we don not unlock it explicitly again)
    -  // so we use operator* instead
    -  int result = dup2( fd( **s_d1 ), fd( **s_d2 ) );
    -  // LockPTRs can be used like ordinary pointers!!! (*s_d1 is a LockPTR on an
    -  // istream)
    -
    -  if ( result == -1 )
    -  { // an error occured!
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {                     // no error
    -    i->EStack.pop();    // pop command from execution stack
    -    i->OStack.pop( 2 ); // pop operands from operand stack
    -  }
    -}
    -
    -
    -void
    -Processes::Dup2_os_osFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  assert( i->OStack.load() >= 2 ); // dup2 takes 2 arguments
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  OstreamDatum* s_d1 = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( s_d1 );
    -  OstreamDatum* s_d2 = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -  assert( s_d2 );
    -
    -  // call dup2();
    -  // for comments on LockPTRs see Dup2_is_isFunction::execute
    -  int result = dup2( fd( **s_d1 ), fd( **s_d2 ) );
    -
    -  if ( result == -1 )
    -  { // an error occurred!
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {                     // no error
    -    i->EStack.pop();    // pop command from execution stack
    -    i->OStack.pop( 2 ); // pop operands from operand stack
    -  }
    -}
    -
    -
    -void
    -Processes::Dup2_is_osFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  assert( i->OStack.load() >= 2 ); // dup2 takes 2 arguments
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  IstreamDatum* s_d1 = dynamic_cast< IstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( s_d1 );
    -  OstreamDatum* s_d2 = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -  assert( s_d2 );
    -
    -  // call dup2();
    -  // int result = dup2( fd(s_d1->get()) , fd(s_d2->get()) );//using get() on a
    -  // LockPTR will lock the PointerObject!
    -  // This would result in a failed assertion at the next operation on that Datum
    -  // (if we don not unlock it explicitly again)
    -  // so we use operator* instead
    -  int result = dup2( fd( **s_d1 ), fd( **s_d2 ) );
    -  // LockPTRs can be used like ordinary pointers!!! (*s_d1 is a LockPTR on an
    -  // istream)
    -
    -  if ( result == -1 )
    -  { // an error occurred!
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {                     // no error
    -    i->EStack.pop();    // pop command from execution stack
    -    i->OStack.pop( 2 ); // pop operands from operand stack
    -  }
    -}
    -
    -
    -void
    -Processes::Dup2_os_isFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  assert( i->OStack.load() >= 2 ); // dup2 takes 2 arguments
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  OstreamDatum* s_d1 = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( s_d1 );
    -  IstreamDatum* s_d2 = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -  assert( s_d2 );
    -
    -  // call dup2();
    -  // for comments on LockPTRs see Dup2_is_isFunction::execute
    -  int result = dup2( fd( **s_d1 ), fd( **s_d2 ) );
    -
    -  if ( result == -1 )
    -  { // an error occurred!
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {                     // no error
    -    i->EStack.pop();    // pop command from execution stack
    -    i->OStack.pop( 2 ); // pop operands from operand stack
    -  }
    -}
    -
    -
    -void
    -Processes::AvailableFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 ); // available takes 1 argument
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  assert( istreamdatum );
    -  assert( istreamdatum->valid() );
    -
    -  if ( not( **istreamdatum ).good() )
    -  { // istream not good. Do nothing. Return false.
    -    i->EStack.pop();
    -    i->OStack.push( false );
    -  }
    -  else
    -  { // istream is good. Try to read from it.
    -    // istreamdatum is a pointer to a LockPTR
    -
    -    // get filedescriptor: -
    -    int fd = Processes::fd( **istreamdatum ); // Get FileDescriptor
    -    //-------------------------------
    -
    -    // Set Non-Blocking-Flag on this fd:
    -    int flags = fcntl( fd, F_GETFL );
    -    fcntl( fd, F_SETFL, flags | O_NONBLOCK );
    -    // ------------------------------
    -
    -    // Start read attempt on this FILE:
    -
    -
    -    //   ---- Version 1: using errno to detect errors - not portable?? ----
    -
    -    //       int peekchar = (**istreamdatum).peek();
    -    //       // Reset Fileflags --------------
    -    //       fcntl(fd,F_SETFL,flags); //reset to old value
    -    //       // ------------------------------
    -
    -    //       if ( (peekchar==-1) and (errno!=EAGAIN) and (errno!=ESPIPE) )
    -    //         {// some unexpected error occured!
    -    //           i->raiseerror(systemerror(i));
    -    //         }
    -    //       else
    -    //         {// no error or EAGAIN or ESPIPE occured
    -    //           i->EStack.pop();
    -    //           bool result;
    -    //           if ( peekchar==-1 ) // errno==EAGAIN or errno==ESPIPE
    -    //             {// no data is currently available
    -    //               result = false; // no data is available
    -    //               (**istreamdatum).clear(); // Lower eof and error Flag
    -    //             }
    -    //           else
    -    //             {// the read attempt was successful.
    -    //               result = true; // data can be read
    -    //             }
    -    //           // leave result on OStack ---------
    -    //           if (result == true)
    -    //             {
    -    //               Token result_t = new BoolDatum( i->true_name);
    -    //               i->OStack.push_move(result_t);
    -    //             }
    -    //           else
    -    //             {
    -    //               Token result_t = new BoolDatum( i->false_name);
    -    //               i->OStack.push_move(result_t);
    -    //             }
    -    //         }
    -    //     }
    -    // ----- End Version 1 ----
    -
    -    // ---- Version 2: Using .good() to detect errors. Pure C++ (apart from
    -    // fcntl) ------
    -
    -    ( **istreamdatum ).peek();
    -    // Reset Fileflags --------------
    -    fcntl( fd, F_SETFL, flags ); // reset to old value
    -    // ------------------------------
    -
    -    bool result;
    -    if ( not( **istreamdatum ).good() )
    -    { // an error occured. No data can be read.
    -      // no data is currently available
    -      result = false;             // no data is available
    -      ( **istreamdatum ).clear(); // Lower eof and error Flag
    -    }
    -    else
    -    {                // the read attempt was successful.
    -      result = true; // data can be read
    -    }
    -
    -    // leave result on OStack ---------
    -    i->EStack.pop();
    -    i->OStack.push( result );
    -  }
    -  // ----- End Version 2 ----
    -}
    -
    -// ---------------------------------------------------------------
    -
    -void
    -Processes::GetPIDFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  pid_t pid;
    -  pid = getpid();
    -  if ( pid < 0 )
    -  {
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {
    -    i->EStack.pop(); // Don't forget to pop yourself...
    -
    -    Token result_token( new IntegerDatum( pid ) ); // Make Token, containing
    -                                                   // IntegerDatum, which is
    -                                                   // initialized to pid;
    -    i->OStack.push_move( result_token );
    -  }
    -}
    -
    -void
    -Processes::GetPPIDFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  pid_t ppid;
    -  ppid = getppid();
    -  if ( ppid < 0 )
    -  {
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {
    -    i->EStack.pop(); // Don't forget to pop yourself...
    -
    -    Token result_token( new IntegerDatum( ppid ) ); // Make Token, containing
    -                                                    // IntegerDatum, which is
    -                                                    // initialized to ppid;
    -    i->OStack.push_move( result_token );
    -  }
    -}
    -
    -
    -void
    -Processes::GetPGRPFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  pid_t pgrp;
    -  pgrp = getpgrp();
    -  if ( pgrp < 0 )
    -  {
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {
    -    i->EStack.pop(); // Don't forget to pop yourself...
    -
    -    Token result_token( new IntegerDatum( pgrp ) ); // Make Token, containing
    -                                                    // IntegerDatum, which is
    -                                                    // initialized to pgrp;
    -    i->OStack.push_move( result_token );
    -  }
    -}
    -
    -void
    -Processes::MkfifoFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This is what happens, when the SLI-command is called:
    -  assert( i->OStack.load() >= 1 ); // mkfifo takes 1 arguments
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  StringDatum* s_d = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( s_d );
    -
    -  // call mkfifo();
    -  mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO; // Try to give all permissions,
    -                                             // modified only by the user`s
    -                                             // umask.
    -  // StringDatum is derived from string
    -  int result = mkfifo( s_d->c_str(), mode );
    -
    -  if ( result == -1 )
    -  { // an error occurred!
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  {                  // no error
    -    i->EStack.pop(); // pop command from execution stack
    -    i->OStack.pop(); // pop operand from operand stack
    -  }
    -}
    -
    -#if defined __APPLE__ && defined HAVE_MACH_MACH_H
    -/** @BeginDocumentation
    - Name: memory_thisjob_darwin - Reports memory usage on Darwin/Apple systems
    - Description:
    - memory_thisjob_darwin returns the resident memory usage of a process in Bytes.
    - Availability: Processes
    - Author: Tammo Ippen
    - */
    -void
    -Processes::MemoryThisjobDarwinFunction::execute( SLIInterpreter* i ) const
    -{
    -  unsigned long resident_memory = darwin_get_used_mem();
    -
    -  i->OStack.push( resident_memory );
    -  i->EStack.pop();
    -}
    -#endif
    -
    -void
    -Processes::SetNonblockFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 ); // setNONBLOCK takes 2 arguments
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( istreamdatum );
    -  assert( istreamdatum->valid() );
    -
    -  BoolDatum* newflag_d = dynamic_cast< BoolDatum* >( i->OStack.top().datum() );
    -  assert( newflag_d );
    -
    -  // get filedescriptor:
    -  // istreamdatum is a pointer to a LockPTR
    -  int fd = Processes::fd( **istreamdatum ); // Get FileDescriptor
    -
    -  //-------------------------------
    -  // Get filestatus-flags on this fd:
    -  int flags = fcntl( fd, F_GETFL );
    -  if ( flags == -1 )
    -  {
    -    i->raiseerror( systemerror( i ) ); // an error occured!
    -  }
    -
    -  // modify flags to the new value:
    -  if ( *newflag_d )
    -  {
    -    flags |= O_NONBLOCK; // set the flag
    -  }
    -  else
    -  {
    -    flags &= ~O_NONBLOCK; // erase the flag
    -  }
    -
    -  // Set new filestatus-flags:
    -  int result = fcntl( fd, F_SETFL, flags );
    -  // ------------------------------
    -
    -
    -  if ( result == -1 )
    -  { // an error occured!
    -    i->raiseerror( systemerror( i ) );
    -  }
    -  else
    -  { // no error
    -    // leave the istream on OStack
    -    i->EStack.pop();
    -    i->OStack.pop();
    -  }
    -}
    -
    -void
    -Processes::CtermidFunction::execute( SLIInterpreter* i ) const
    -{
    -  // ensure term buffer is sufficiently large and safely initialized
    -  assert( L_ctermid > 0 );
    -  char term[ L_ctermid ];
    -  term[ 0 ] = '\0';
    -
    -  const std::string termid = ctermid( term );
    -
    -  i->OStack.push( Token( termid ) );
    -  i->EStack.pop();
    -}
    -
    -void
    -Processes::Isatty_osFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  OstreamDatum* s_d1 = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( s_d1 );
    -
    -  int fd = Processes::fd( **s_d1 ); // Get FileDescriptor
    -
    -  i->OStack.pop();
    -
    -  if ( isatty( fd ) )
    -  {
    -    i->OStack.push( Token( BoolDatum( true ) ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( Token( BoolDatum( false ) ) );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -Processes::Isatty_isFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  // Read arguments from operand Stack, but leave tokens on stack:
    -  IstreamDatum* s_d1 = dynamic_cast< IstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( s_d1 );
    -
    -  int fd = Processes::fd( **s_d1 ); // Get FileDescriptor
    -
    -
    -  i->OStack.pop();
    -
    -  if ( isatty( fd ) )
    -  {
    -    i->OStack.push( Token( BoolDatum( true ) ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( Token( BoolDatum( false ) ) );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -#ifdef _SYNOD__SET_POSIX_SOURCE
    -#undef _SYNOD__SET_POSIX_SOURCE
    -#undef _POSIX_SOURCE
    -#endif
    diff --git a/sli/processes.h b/sli/processes.h
    deleted file mode 100644
    index 601a28538e..0000000000
    --- a/sli/processes.h
    +++ /dev/null
    @@ -1,963 +0,0 @@
    -/*
    - *  processes.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef PROCESSES_H
    -#define PROCESSES_H
    -
    -/*
    -    SLI's basic process management capabilities
    -*/
    -
    -// C includes:
    -#include <sys/types.h>
    -
    -// C++ includes:
    -#include <cstdio>
    -#include <cstdlib>
    -#include <fstream>
    -#include <string>
    -#include <vector>
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from sli:
    -#include "name.h"
    -#include "slifunction.h"
    -#include "slimodule.h"
    -
    -// A new SLI-Module:
    -class Processes : public SLIModule
    -{
    -  // The following concernes the new module: -----------------------
    -
    -public:
    -  static const std::string systemerror( SLIInterpreter* ); // This will be used to produce systemerror-messages
    -
    -  static int fd( std::istream* s );
    -  static int fd( std::ostream* s );
    -  static int
    -  fd( std::ostream& s )
    -  {
    -    return fd( &s );
    -  }
    -  static int
    -  fd( std::istream& s )
    -  {
    -    return fd( &s );
    -  }
    -
    -  static pid_t children_group; // the declaration of a static variable. It will
    -  // persist as long as the instantiation of the Processes module lives. Never
    -  // confuse declaration and definition of a variable, by the way...
    -
    -  const Name signaldict_name; // The name of the signal dictionary
    -
    -  // The Names of the signals contained in signal dictionary:
    -  // These are the signals defined by the POSIX standard
    -  const Name SIGABRT_name;
    -  const Name SIGALRM_name;
    -  const Name SIGFPE_name;
    -  const Name SIGHUP_name;
    -  const Name SIGILL_name;
    -  const Name SIGINT_name;
    -  const Name SIGKILL_name;
    -  const Name SIGPIPE_name;
    -  const Name SIGQUIT_name;
    -  const Name SIGSEGV_name;
    -  const Name SIGTERM_name;
    -  const Name SIGUSR1_name;
    -  const Name SIGUSR2_name;
    -
    -  const Name SIGCHLD_name;
    -  const Name SIGCONT_name;
    -  const Name SIGSTOP_name;
    -  const Name SIGTSTP_name;
    -  const Name SIGTTIN_name;
    -  const Name SIGTTOU_name;
    -
    -
    -  const Name sys_errname; // The name of the variable in errordict, in which the
    -                          // name of a system error will be stored
    -  const Name sys_errno;   // The corresponding error-number
    -
    -  // The Names of the system's error-numbers contained in errordict
    -  const Name E2BIG_name;
    -  const Name EACCES_name;
    -  const Name EAGAIN_name;
    -  const Name EBADF_name;
    -  const Name EBUSY_name;
    -  const Name ECHILD_name;
    -  const Name EDEADLK_name;
    -  const Name EDOM_name;
    -  const Name EEXIST_name;
    -  const Name EFAULT_name;
    -  const Name EFBIG_name;
    -  const Name EINTR_name;
    -  const Name EINVAL_name;
    -  const Name EIO_name;
    -  const Name EISDIR_name;
    -  const Name EMFILE_name;
    -  const Name EMLINK_name;
    -  const Name ENAMETOOLONG_name;
    -  const Name ENFILE_name;
    -  const Name ENODEV_name;
    -  const Name ENOENT_name;
    -  const Name ENOEXEC_name;
    -  const Name ENOLCK_name;
    -  const Name ENOMEM_name;
    -  const Name ENOSPC_name;
    -  const Name ENOSYS_name;
    -  const Name ENOTDIR_name;
    -  const Name ENOTEMPTY_name;
    -  const Name ENOTTY_name;
    -  const Name ENXIO_name;
    -  const Name EPERM_name;
    -  const Name EPIPE_name;
    -  const Name ERANGE_name;
    -  const Name EROFS_name;
    -  const Name ESPIPE_name;
    -  const Name ESRCH_name;
    -  const Name EXDEV_name;
    -
    -  // The constructor and destructor for our module object (-if we need them-):
    -  Processes()
    -    : signaldict_name( "signaldict" )
    -    , SIGABRT_name( "SIGABRT" )
    -    , SIGALRM_name( "SIGALRM" )
    -    , SIGFPE_name( "SIGFPE" )
    -    , SIGHUP_name( "SIGHUP" )
    -    , SIGILL_name( "SIGILL" )
    -    , SIGINT_name( "SIGINT" )
    -    , SIGKILL_name( "SIGKILL" )
    -    , SIGPIPE_name( "SIGPIPE" )
    -    , SIGQUIT_name( "SIGQUIT" )
    -    , SIGSEGV_name( "SIGSEGV" )
    -    , SIGTERM_name( "SIGTERM" )
    -    , SIGUSR1_name( "SIGUSR1" )
    -    , SIGUSR2_name( "SIGUSR2" )
    -    , SIGCHLD_name( "SIGCHLD" )
    -    , SIGCONT_name( "SIGCONT" )
    -    , SIGSTOP_name( "SIGSTOP" )
    -    , SIGTSTP_name( "SIGTSTP" )
    -    , SIGTTIN_name( "SIGTTIN" )
    -    , SIGTTOU_name( "SIGTTOU" )
    -    , sys_errname( "sys_errname" ) // The name of the variable in errordict, in
    -                                   // which the name of a system error will be
    -                                   // stored
    -    , sys_errno( "sys_errno" )     // The corresponding error-number
    -
    -    // The Names of the system's error-numbers contained in errordict
    -    , E2BIG_name( "E2BIG" )
    -    , EACCES_name( "EACCES" )
    -    , EAGAIN_name( "EAGAIN" )
    -    , EBADF_name( "EBADF" )
    -    , EBUSY_name( "EBUSY" )
    -    , ECHILD_name( "ECHILD" )
    -    , EDEADLK_name( "EDEADLK" )
    -    , EDOM_name( "EDOM" )
    -    , EEXIST_name( "EEXIST" )
    -    , EFAULT_name( "EFAULT" )
    -    , EFBIG_name( "EFBIG" )
    -    , EINTR_name( "EINTR" )
    -    , EINVAL_name( "EINVAL" )
    -    , EIO_name( "EIO" )
    -    , EISDIR_name( "EISDIR" )
    -    , EMFILE_name( "EMFILE" )
    -    , EMLINK_name( "EMLINK" )
    -    , ENAMETOOLONG_name( "ENAMETOOLONG" )
    -    , ENFILE_name( "ENFILE" )
    -    , ENODEV_name( "ENODEV" )
    -    , ENOENT_name( "ENOENT" )
    -    , ENOEXEC_name( "ENOEXEC" )
    -    , ENOLCK_name( "ENOLCK" )
    -    , ENOMEM_name( "ENOMEM" )
    -    , ENOSPC_name( "ENOSPC" )
    -    , ENOSYS_name( "ENOSYS" )
    -    , ENOTDIR_name( "ENOTDIR" )
    -    , ENOTEMPTY_name( "ENOTEMPTY" )
    -    , ENOTTY_name( "ENOTTY" )
    -    , ENXIO_name( "ENXIO" )
    -    , EPERM_name( "EPERM" )
    -    , EPIPE_name( "EPIPE" )
    -    , ERANGE_name( "ERANGE" )
    -    , EROFS_name( "EROFS" )
    -    , ESPIPE_name( "ESPIPE" )
    -    , ESRCH_name( "ESRCH" )
    -    , EXDEV_name( "EXDEV" )
    -  {
    -  } // Processes constructor
    -
    -  ~Processes() override; // clean up dynmem for static variables...
    -
    -  // The Module is registered by a call to this Function:
    -  void init( SLIInterpreter* ) override;
    -
    -  // This function will return the name of our module:
    -  const std::string name() const override;
    -
    -  // This function -may- return a string of SLI-commands to be executed for
    -  // initialization
    -  const std::string commandstring() const override;
    -
    -
    -  // ---------------------------------------------------------------
    -
    -
    -  // The following concernes the new command(s): -------------------
    -
    -public:
    -  // Module contains classes defining new SLI-functions:
    -  class ForkFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class Sysexec_aFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class WaitPIDFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class KillFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class PipeFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class Dup2_is_isFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class Dup2_os_osFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class Dup2_is_osFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class Dup2_os_isFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class AvailableFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class GetPIDFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class GetPPIDFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class GetPGRPFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class MkfifoFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -
    -#if defined __APPLE__ && defined HAVE_MACH_MACH_H
    -  class MemoryThisjobDarwinFunction : public SLIFunction
    -  {
    -    void execute( SLIInterpreter* ) const;
    -  };
    -#endif
    -
    -  class SetNonblockFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class CtermidFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class Isatty_isFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -  class Isatty_osFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override; // This is all we need.
    -  };
    -
    -  // Module contains -one- instantiation of each new function-class:
    -
    -public:
    -  ForkFunction forkfunction;
    -  Sysexec_aFunction sysexec_afunction;
    -  WaitPIDFunction waitPIDfunction;
    -  KillFunction killfunction;
    -  PipeFunction pipefunction;
    -  Dup2_is_isFunction dup2_is_isfunction;
    -  Dup2_os_osFunction dup2_os_osfunction;
    -  Dup2_is_osFunction dup2_is_osfunction;
    -  Dup2_os_isFunction dup2_os_isfunction;
    -  AvailableFunction availablefunction;
    -  GetPIDFunction getpidfunction;
    -  GetPPIDFunction getppidfunction;
    -  GetPGRPFunction getpgrpfunction;
    -  MkfifoFunction mkfifofunction;
    -
    -#if defined __APPLE__ && defined HAVE_MACH_MACH_H
    -  MemoryThisjobDarwinFunction memorythisjobdarwinfunction;
    -#endif
    -
    -  SetNonblockFunction setnonblockfunction;
    -  CtermidFunction ctermidfunction;
    -  Isatty_osFunction isatty_osfunction;
    -  Isatty_isFunction isatty_isfunction;
    -};
    -
    -
    -// Description of new SLI-commands:
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: fork - create a child process of SLI
    -
    -Synopsis: fork -> PID
    -
    -Description: Thin wrapper to the fork() system function
    -
    -Parameters: In : -none-
    -            Out: PID(integer) : 0 (for the child)
    -                                the child's process ID (for the parent)
    -
    -Examples: 1. fork
    -             (Well, just kidding...)
    -
    -          2. fork 0 eq {(I'm the child!) = quit} {(I'm the parent!) =} ifelse
    -             Try this several times. You will notice the child message to appear
    -             before or after the parent message "by chance". (Even after the
    -             parent's SLI-prompt...)
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: Mar 17 1999
    -
    -Remarks: A full parallel process of SLI is forked.
    -         Parent and child will execute in parallel. There is no way to know
    -         which will start being executed first.
    -         Child inherits all open files, including stdin and stdout, from parent!
    -         Thus, calling fork interactively from the SLI-prompt will result in
    -         command-line-confusion if both processes end up without quitting.
    -         If fork() cannot be executed, an error is raised.
    -
    -         SLI-function spoon (processes.sli) is a more convenient wrapper
    -          to fork!
    -
    -SeeAlso: spoon, sysexec, getPID, getPPID, getPGRP, wait, waitPID
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/* Now Documented with sysexec!
    -
    -Name: sysexec_a - execute a UNIX command
    -
    -Synopsis: CommandArray  sysexec -> -
    -
    -Description: Transfer control to a UNIX-Command.
    -
    -Parameters:  In : CommandArray (array of strings):
    -                  An array containing the command to execute. The first
    -                  element is interpreted as the command, the remaining elements
    -                  as it's parameters.
    -
    -             Out: -whatever will be will be-
    -
    -Examples: -see command sysexec-
    -
    -Bugs: -see command sysexec-
    -
    -Author: R Kupper
    -
    -FirstVersion: Mar 1999
    -
    -Remarks: There is a SLI-wrapper called "sysexec" to this function.
    -         -see command sysexec-
    -
    -SeeAlso: sysexec, fork, spoon
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: waitPID - wait or check for a child process to terminate
    -
    -Synopsis: PIDin NoHangFlag waitPID -> Status NormalExitFlag PIDout
    -                                   -> 0
    -
    -Description: The waitPID function suspends execution of the calling process
    -              until status information for the given child is available,
    -              or until delivery of a signal whose action is either to
    -              execute a signal-catching function or to terminate the
    -              process. If status information is available prior to the call
    -              to waitPID, it returns immediately.
    -
    -              The waitPID function returns the process ID of the child for
    -              which status is being reported.
    -              Zero is returned immediately, if the NoHangFlag is set
    -              and no status is available.
    -
    -              Alternatives: Function waitPID_i_b (undocumented)
    -              -> behaviour and synopsis are the same.
    -
    -Parameters: In : PIDin(integer):      -1: Wait for any child process.
    -                                positive: Wait for the specific child whose
    -                                          process ID is equal to PIDin.
    -                           (           0: -not supported-)
    -                           (less than -1: -not supported-)
    -
    -                 NoHangFlag(boolean):
    -                  If true, causes waitPID function not to suspend execution
    -                  of the calling process if status is not immediately
    -                  available for any of the child processes specified by
    -                  PIDin. In this case, zero is returned as only result.
    -
    -            Out: PIDout(integer):
    -                   The process ID of the child for which status is being
    -                   reported.
    -
    -                 NormalExitFlag(boolean):
    -                   True, if status is returned for a child that terminated
    -                   normally, i.e. by a call to exit() or by returning from
    -                   main(). In that case, the exit code is reported in the Status
    -                   argument (see below).
    -                   False, if status is returned for a child that terminated due
    -                   to a signal that was not caught. In that case, the number of
    -                   that signal is reported in the Status argument (see below).
    -
    -                 Status(integer):
    -                   If NormalExitFlag is true, this reports the child's exit
    -                   code, i.e. the low-order eight bits of the status argument
    -                   that the child passed to exit(), or the value the child
    -                   process returned from main().
    -                   If NormalExitFlag is false, this reports the number of the
    -                   signal that caused the termination of the child process. Look
    -                   up this number in signaldict, to know what it means.
    -
    -Examples:1. {(sleep 3) sysexec} spoon false waitPID
    -         2. {(ls) sysexec} spoon false waitPID
    -            Note the parent process' SLI-Prompt appearing AFTER execution of the
    -            command finished.
    -            This is different to the call "{(ls) sysexec} spoon" only.
    -         3. 23 false waitPID
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: Apr 13 1999
    -
    -Remarks: The features normally used only by the UNIX-shell-program
    -          (such as the WUNTRACED-option) are currently not supported,
    -          although values <=0 can be passed through PIDin.
    -         See any documentation of POSIX-function waitpid().
    -         Discription text is mainly taken from
    -          Donald A. Lewine, "POSIX programmer's guide", O'Reilly&Associates,Inc.
    -
    -SeeAlso: wait, spoon, signaldict, getPGRP
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: kill - send a signal to another process
    -
    -Synopsis: PID  SIGNAL kill -> -
    -          PID /SIGNAL kill -> -
    -
    -Description: The "kill" function sends a signal to a process or a group
    -              of processes specified by "PID". If the signal is zero,
    -              error checking is performed but no signal is actually sent.
    -              This can be used to check for a valid PID.
    -             SIGNAL may be given either as an integer value or as the
    -              literal name of the signal, as found in "signaldict".
    -
    -              Alternative: Functions kill_i_i for integer (SIGNAL),
    -              kill_i_l for literal (SIGNAL) (both undocumented)
    -              -> behaviour and synopsis are the same.
    -
    -Parameters: In : PID(integer):
    -                   The ID of the process that shall be signalled.
    -                   If "PID" is greater than zero, "SIGNAL" is sent to the
    -                    process whose ID is "PID".
    -                   (If "PID" is negative, "SIGNAL" is sent to all processes
    -                    whose process group ID is equal to the absolute value
    -                    of "PID". - Process groups are usually used by the
    -                    shell program only.)
    -
    -                 SIGNAL(integer):
    -                   The number of the signal to be sent.
    -                   Signal codes are machine-dependent values, so do not
    -                    rely on any given value! The valid signal codes for
    -                    your machine are compiled into the "signaldict"
    -                    dictionary, where they can be looked up by
    -                    their literal names.
    -                   The only value you may rely on is zero:
    -                    If SIGNAL is zero, error checking is performed
    -                    but no signal is actually sent.
    -                    This can be used to check for a valid PID.
    -
    -                  /SIGNAL(literal):
    -                   The literal name of the signal to be sent.
    -                   This name is automatically looked up in "signaldict"
    -                    and substituted to it's corresponding value prior
    -                    to a call to wait.
    -
    -            Out: -none-.
    -
    -Examples: 1. 23 /SIGTERM kill %send TERM signal to Process 23
    -
    -          2. %This is equivalent to 1. :
    -             signaldict begin
    -             23 SIGTERM kill
    -             end
    -
    -          3. (xterm) 2 system %star an xterm-process
    -             /SIGKILL kill    %kill it again
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: Apr 27 1999
    -
    -Remarks: "kill" can be used to send ANY signal, but it's most oftenly used
    -          to terminate another process. Hence the name.
    -         Resolution of literal signal names is done by a trie defined
    -          in file processes.sli.
    -         Description taken mainly from "POSIX Programmer's Guide",
    -          D. Lewine, O'Reilly & Assoc. Inc.
    -
    -
    -SeeAlso: signaldict, system, sysexec, wait, waitPID, spoon, fork, getPPID,
    -getPGRP
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: signaldict - Dictionary containing the machine-dependent signal codes.
    -
    -Synopsis: signaldict -> signaldict
    -
    -Description: A SLI dictionary containing the system's valid signal codes.
    -             "signaldict" is used in combination with the "kill",
    -              "wait" or "waitPID" commands.
    -             Signal codes are machine-dependent values, so do not
    -              rely on any given value! The valid signal codes for
    -              your machine are compiled into the "signaldict"
    -              dictionary, where they can be looked up by
    -              their literal names.
    -
    -Examples: 1. signaldict /SIGTERM get %get the value for signal SIGTERM
    -
    -          2. (xterm) 2 system %start an xterm-prcess
    -             signaldict begin %open signal dictionary
    -             SIGKILL kill     %kill process
    -             end              %close dictionary
    -
    -          3. %This is equivalent to 2. (see description of "kill"):
    -             (xterm) 2 system %start an xterm-process
    -             /SIGKILL kill    %kill it again
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: Apr 16 1999
    -
    -SeeAlso: kill, wait, waitPID, system, sysexec, spoon, fork
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: pipe - Open up a pipe
    -
    -Synopsis: pipe -> read_end write_end
    -
    -Description:  The pipe function creates a pipe, placing a filestream
    -             for the read end and a filestream for the write end of
    -             the pipe on the stack.
    -              Data can be written to "write_end" and read from "read_end".
    -             A read on "read_end" accesses the data written to "write_end"
    -             on a first-in-first-out basis.
    -
    -Parameters: In : -none-
    -
    -            Out: read_end(ifstream):
    -                   A filestream open for reading, connected to the read-
    -                   end of the newly created pipe.
    -
    -                 write_end(ofstream):
    -                   A filestream open for writing, connected to the write-
    -                   end of the newly created pipe.
    -
    -Examples: pipe
    -          (Hello Pipe) <- std::endl
    -          pop
    -          getline =
    -
    -Diagnostics: If a system-error occurs, a code is stored in "sys_errno"
    -              (contained in errordict) to identify the error, and
    -              "sys_errname" is set to the error message. Then a
    -              "SystemError" is raised.
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: May 02 1999
    -
    -Remarks:  Description-text taken mainly from "POSIX Programmer's Guide",
    -         D. Lewine, O'Reilly & Assoc. Inc.
    -
    -          The O_NONBLOCK and FD_CLOEXEC flags are clear on the
    -         file descriptors of both streams.
    -
    -          Opening a pipe in a single process is next to useless (however,
    -         it might be used for buffering data). The usual application
    -         is for inter-process-communication: A pipe is opened, and fork
    -         is called. The child process inherits both filestreams from
    -         the parent. The child will then close one of the streams (say:
    -         the read-end), the parent will close the other (say: the write-
    -         end). Data may then be transfered from the child to the parent
    -         process through the pipe.
    -
    -          If the child is to "sysexec" a UNIX command, it may duplicate
    -         the pipes's write-end onto its standard "cout" stream using "dup2",
    -         thus directing any data written to "cout" into the pipe. It then
    -         calles "sysexec". The parent process is thus enabled to read
    -         the UNIX-command's standard output from the pipe.
    -
    -          Pipes are unidirectional communication channels.
    -         For bidirectional communication, two separate pipes must be opened.
    -         The "spawn" command provides this functionality.
    -
    -SeeAlso: dup2, available, spawn
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: available - check if data is available from an istream
    -
    -Synopsis: istream available -> istream {true|false}
    -
    -Description: "available" gives the answer to one question:
    -             --Is there at least one character waiting to be read
    -               from the istream?--
    -             If "available" returns true, it can be safely assumed that
    -             reading one character from the given istream is safe,
    -             i.e. it will NEITHER BLOCK nor yield EOF or an error.
    -
    -             Alternative: Functions available_is (undocumented)
    -             -> behavior and synopsis are the same.
    -
    -Parameters: In:  istream: The istream to check.
    -            Out: true or false, indicating if data is waiting on the stream.
    -
    -Examples: myfifo available { getline } if % read it data is available.
    -
    -Diagnostics: If a system-error occurs, a code is stored in "sys_errno"
    -             (contained in errordict) to identify the error, and "sys_errname"
    -             is set to the error message. Then a "SystemError" is raised.
    -             The following system errors may be issued, according to the
    -             POSIX standard (errors in parentheses are not
    -             expected to occur in this routines' context):
    -
    -             (EACCES)  Search permission is denied for a
    -                       directory in a files path prefix.
    -             (EAGAIN)  The ON_NONBLOCK flag is set for a file
    -                       descriptor and the process would be
    -                       delayed in the I/O operation.
    -              EBADF    Invalid file descriptor. (With the current
    -                       implementation, this indicates trouble
    -                       getting a fildescriptor from a stream. If
    -                       it occurs, ask the author for a proper
    -                       solution!)
    -             (EDEADLK) A fcntl with function F_SETLKW would
    -                       cause a deadlock.
    -              EINTR    Function was interrupted by a signal.
    -             (EINVAL)  Invalid argument.
    -             (EMFILE   Too many file descriptors are in use by
    -                       this process.
    -             (ENOLCK)  No locks available.
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: May 10 1999
    -
    -Remarks: "available" will be typically used with pipes or fifos.
    -
    -         There are two possible reasons why "available" may return false:
    -          1. There are processes writing to the pipe/fifo, but none
    -             of the is currently writing data to it.
    -              A subsequent read attempt will block until data becomes
    -             available.
    -          2. There are no processes writing to the pipe (any longer).
    -              A subsequent read attempt will yield EOF.
    -         It is NOT possible to tell these possibilities apart! This is
    -         not a fault of the implementation of this function. It is generally
    -         impossible to do this. The only way to know is to start a read
    -         attempt. If it blocks, you know the answer - but you could wait
    -         forever. Anyway, there normally is no need to distinguish between
    -         these alternatives: Just NEVER try a read attempt, if "available"
    -         returned false. Even if temporarily no process was connected to
    -         the stream, it will return true as soon as the connection is re-
    -         established and data is waiting.
    -
    -         "available" just tells you if -one- character may be read safely.
    -          It is left to the programmer to assure that a given amount of
    -         data (e.g. upto the next linefeed) may be read.
    -
    -SeeAlso: pipe, mkfifo, spawn, eof, in_avail
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: getPID - Get ID of the current process
    -
    -Synopsis: getPID -> -
    -
    -Description: Returns the process ID for the calling process.
    -
    -Parameters: -
    -
    -Examples: (I am process #) =only getPID =
    -
    -Diagnostics: A call to "getPID" should never produce an error.
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: May 26 1999
    -
    -SeeAlso: getPPID, getPGRP, fork, spoon, waitPID, kill, system, spawn, shpawn
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: getPPID - Get parent ID of the current process
    -
    -Synopsis: getPPID -> -
    -
    -Description: Returns the process parent ID for the calling process.
    -
    -Parameters: -
    -
    -Examples: (I was called by process #) =only getPPID =
    -
    -Bugs: -
    -
    -Author: S Schrader, taken from getPID
    -
    -FirstVersion: Nov 11 2005
    -
    -SeeAlso: getPID, getPGRP, fork, spoon, waitPID, kill, system, spawn, shpawn
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: getPGRP - Get process group ID of the current process
    -
    -Synopsis: getPGRP -> -
    -
    -Description: Returns the process group ID for the calling process.
    -
    -Parameters: -
    -
    -Examples: (I am member of process group #) =only getPGRP =
    -
    -Diagnostics: A call to "getPGRP" should never produce an error.
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: Apr 18 2000
    -
    -SeeAlso: fork, getPID, kill
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: mkfifo - Create a FIFO special file (named pipe)
    -
    -Synopsis: path mkfifo -> -
    -
    -Description: The "mkfifo" command creates a new FIFO special file named
    -             "path". The permission bits are set to "rwx rwx rwx" (full access
    -             for anyone). Note that these bits may be modified by the process'
    -             file creation mask. (See remarks below.)
    -
    -             Alternative: Functions mkfifo_s (undocumented)
    -             -> behavior and synopsis are the same.
    -
    -Parameters: In: path(string):
    -                 Path name of the FIFO to create.
    -
    -Examples: (/home/kupper/my_fifo) mkfifo
    -
    -Diagnostics: If a system-error occurs, a code is stored in "sys_errno"
    -             (contained in errordict) to identify the error, and "sys_errname"
    -             is set to the error message. Then a "SystemError" is raised.
    -             The following system errors may be issued, according to the
    -             POSIX standard:
    -
    -              EACCES  Search permission denied for a directory in a file's path
    -                      prefix.
    -              EEXIST  The named file already exists.
    -              ENOENT  A file or directory does not exist.
    -              ENOSPC  No space left on disk.
    -              ENOTDIR A component of the specified pathname was not a directory
    -                      when a directory was expected.
    -              EROFS   Read-only file system.
    -
    -Bugs: -
    -
    -Author: R. Kupper
    -
    -FirstVersion: Aug 13 1999 (Friday 13th!)
    -
    -Remarks: The FIFO may be used (and has to be opened) like any regular file.
    -
    -         In special cases, it might be desireable to change the FIFO's file
    -         permission bits. This is not supported by SLI commands.
    -         Use UNIX-command "chmod" to change file permissions on the newly
    -         created file, or use UNIX-command "umask" to set the process' file
    -         creation mask. (See command "system" for issuing UNIX-commands from
    -         SLI).
    -
    -SeeAlso: pipe, mkfifo, ifstream, available, ignore, dup2
    -
    -*/
    -
    -//-----------------------------------------------------------------------------
    -/** @BeginDocumentation
    -Name: setNONBLOCK - Switch between blocking and non-blocking I/O.
    -
    -Synopsis: ifstream {true|false} setNONBLOCK -> ifstream
    -
    -Description: "setNONBLOCK" sets or erases the O_NONBLOCK flag on
    -             an input stream. The O_NONBLOCK flag determines, if
    -             a read attempt will block when no data is currently
    -             available from the stream. By default, a newly
    -             created stream has the O_NONBLOCK-Flag erased,
    -             meaning that blocking I/O is selected. By erasing
    -             O_NONBLOCK, a subsequent read attempt on the stream
    -             will yield EOF if no data is available.
    -
    -             Alternatives: Function setNONBLOCK_is_b (undocumented)
    -             -> behavior and synopsis are the same.
    -
    -Parameters: In : ifstream: The stream to change the flag on.
    -            Out: -
    -
    -Examples: cin    false setNONBLOCK
    -          myfifo true  setNONBLOCK % set non-blocking I/O for my fifo.
    -
    -Diagnostics: If a system-error occurs, a code is stored in "sys_errno"
    -             (contained in errordict) to identify the error, and "sys_errname"
    -             is set to the error message. Then a "SystemError" is raised.
    -             The following system errors may be issued, according to the
    -             POSIX standard (errors in parentheses are not
    -             expected to occur in this routines' context):
    -
    -             (EACCES)  Search permission is denied for a
    -                       directory in a files path prefix.
    -             (EAGAIN)  The ON_NONBLOCK flag is set for a file
    -                       descriptor and the process would be
    -                       delayed in the I/O operation.
    -              EBADF    Invalid file descriptor. (With the current
    -                       implementation, this indicates trouble
    -                       getting a filedescriptor from a stream. If
    -                       it occurs, ask the author for a proper
    -                       solution!)
    -             (EDEADLK) An fcntl with function F_SETLKW would
    -                       cause a deadlock.
    -              EINTR    Function was interrupted by a signal.
    -             (EINVAL)  Invalid argument.
    -             (EMFILE   Too many file descriptors are in use by
    -                       this process.
    -             (ENOLCK)  No locks available.
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: Oct 20 1999
    -
    -SeeAlso: available, ignore
    -
    -*/
    -
    -
    -/** @BeginDocumentation
    -Name: ctermid - Return the path to the controlling terminal of the process.
    -
    -Synopsis: ctermid -> (pathname)
    -
    -Remarks: This is a wrapper to the POSIX kernel function ctermid().
    -
    -SeeAlso: isatty
    -*/
    -
    -#endif
    diff --git a/sli/puresli.cc b/sli/puresli.cc
    deleted file mode 100644
    index 13a4d85bd6..0000000000
    --- a/sli/puresli.cc
    +++ /dev/null
    @@ -1,79 +0,0 @@
    -/*
    - *  puresli.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    SLI main
    -*/
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from sli:
    -#include "filesystem.h"
    -#include "gnureadline.h"
    -#include "interpret.h"
    -#include "oosupport.h"
    -#include "processes.h"
    -#include "sliarray.h"
    -#include "sliregexp.h"
    -#include "slistartup.h"
    -
    -int
    -main( int argc, char* argv[] )
    -{
    -  /**
    -    We disable synchronization between stdio and istd::ostreams
    -    this has to be done before any in- or output has been
    -    done.
    -  */
    -
    -#ifdef __GNUC__
    -#if __GNUC__ < 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ < 1 )
    -  // Broken with GCC 3.1 and higher.
    -  // cin.get() never returns, or leaves cin in a broken state.
    -  //
    -  std::ios::sync_with_stdio( false );
    -#endif
    -#else
    -  // This is for all other compilers
    -  std::ios::sync_with_stdio( false );
    -#endif
    -
    -
    -  // Create the interpreter object. Due to its dependence
    -  // on various static objects (e.g. of class Name), the
    -  // interpreter engine MUST NOT be global.
    -
    -  SLIInterpreter engine;
    -#ifdef HAVE_READLINE
    -  addmodule< GNUReadline >( engine );
    -#endif
    -  addmodule< SLIArrayModule >( engine );
    -  addmodule< OOSupportModule >( engine );
    -  engine.addmodule( new SLIStartup( argc, argv ) );
    -  addmodule< Processes >( engine );
    -  addmodule< RegexpModule >( engine );
    -  addmodule< FilesystemModule >( engine );
    -  int exitcode = engine.execute( 1 );
    -
    -  return exitcode;
    -}
    diff --git a/sli/scanner.cc b/sli/scanner.cc
    deleted file mode 100644
    index 4d2a10047d..0000000000
    --- a/sli/scanner.cc
    +++ /dev/null
    @@ -1,816 +0,0 @@
    -/*
    - *  scanner.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    scanner.cc
    -*/
    -
    -#include "scanner.h"
    -
    -// C++ includes:
    -#include <cmath>
    -#include <limits>
    -#include <sstream>
    -
    -// Includes from sli:
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "namedatum.h"
    -#include "stringdatum.h"
    -
    -/*************************************************************************/
    -/** Scanner   (implemented as a DFA)                                     */
    -/* -------                                                               */
    -/*         Scanner uses a symbol processor which controls all operations */
    -/*         on symbols (strings with a unique id) instead of a static     */
    -/*         symbol table.                                                 */
    -/*                                                                       */
    -/*          still experimental...                                        */
    -/*             - uses an explicit transition function, which can         */
    -/*               not be constructed from regular expression              */
    -/*               (unlike in lex).                                        */
    -/*             - no clear interface between the basic functions and a    */
    -/*               a particular application.                               */
    -/*             - once we are sure about the final structure of this file */
    -/*               we will as usual move this comment to scanner.h         */
    -/*                                                                       */
    -/* Problems:                                                             */
    -/*           The scanner puts the newline character back into the        */
    -/*           stream at the end of a line, thus the next read             */
    -/*           operation performed on that stream returns the newline      */
    -/*           character. This case, i.e. a token is terminated by endoln  */
    -/*           should be treated separately to avoid this.                 */
    -/*           The current workarount checks for endoln at each unget()    */
    -/*           call!                                                       */
    -/*           24. June 1997, Gewaltig                                     */
    -/*                                                                       */
    -/*                                                                       */
    -/* History:                                                              */
    -/*         (7) 080505, Diesmann. minusst can now be followed by minus    */
    -/*             to enable right arrows like -->                           */
    -/*         (6) 071002, Diesmann. Replaced own conversion to double by    */
    -/*             library function std::atof(). Now compatible with cvd.    */
    -/*         (5) 8.4.1997, Adaption debuged. Special explicit start entr   */
    -/*            in switch, to reserve default for errors. Previous version */
    -/*            did not eat white spaces.                                  */
    -/*         (4) March 1997, Gewaltig; Adapted for SLI 2.0                 */
    -/*         (3) 5.8.1994, Diesmann                                        */
    -/*             We are now trying to bring the project to a state where   */
    -/*             it can be used by the public.                             */
    -/*             We noticed that on some compilers the 'put to' operator   */
    -/*             is not defined for type (long double) and we are not sure */
    -/*             that it is part of the ANSI standard. As we are currently */
    -/*             not using this type we haven't implemented it. The        */
    -/*             'put to' operator for class Token now returns the string  */
    -/*             "sorry, no 'put to' for (long double)\n" instead.         */
    -/*         (2) Oct. 1993, applied to sns Gewaltig, Diesmann              */
    -/*         (1) string introduced by mog. 5.10.93                         */
    -/*         (0) first version, Summer 1993 diesmann                       */
    -/*                                                                       */
    -/*************************************************************************/
    -
    -/***************************************************************************/
    -
    -Scanner::Scanner( std::istream* is )
    -  : in( is )
    -  , code( std::numeric_limits< unsigned char >::max(), invalid )
    -  , line( 0 )
    -  , col( 0 )
    -  , space( 32 )
    -  , tab( 9 )
    -  , endoln( 10 )
    -  , cr( 13 )
    -  , endof( 4 )
    -  , BeginArraySymbol( "/BeginArraySymbol" )
    -  , // these symbol-names cannot be entered
    -  EndArraySymbol( "/EndArraySymbol" )
    -  , // by keyboard! This is important to ensure
    -  BeginProcedureSymbol( "/BeginProcedureSymbol" )
    -  , // the integrity of the scanner/parser
    -  EndProcedureSymbol( "/EndProcedureSymbol" )
    -  , // interaction: Non-terminal symbols
    -  EndSymbol( "/EndSymbol" )
    -{
    -  for ( size_t s = start; s < lastscanstate; ++s )
    -  {
    -    for ( size_t c = invalid; c < lastcode; ++c )
    -    {
    -      trans[ s ][ c ] = error;
    -    }
    -  }
    -
    -  code[ space ] = whitespace;
    -  code[ tab ] = whitespace;
    -  code[ endof ] = eof;
    -
    -  code[ '+' ] = plus;
    -  code[ '-' ] = minus;
    -
    -  code[ '[' ] = openbracket;
    -  code[ ']' ] = closebracket; // see Kernighan p.7
    -  code[ '{' ] = openbrace;
    -  code[ '}' ] = closebrace;
    -  code[ '(' ] = openparenth;  // for string implementation
    -  code[ ')' ] = closeparenth; // for string implementation
    -
    -  code[ '.' ] = decpoint;
    -  code[ '0' ] = null;
    -  code.Group( expntl, "Ee" );
    -  code.Group( digit, "123456789" );
    -
    -  code.Group( alpha, "ABCDFGHIJKLMNOPQRSTUVWXYZ" );
    -  code.Group( alpha, "abcdfghijklmopqrsuvwxyz" );
    -  code.Range( alpha, ( char ) 161, ( char ) 255 );
    -  code[ '_' ] = alpha;
    -  code.Group( alpha, "~`!@#$^&=|:;'<,>?\"" ); // according to PS
    -
    -  code[ '/' ] = slash;
    -  code[ '\\' ] = backslash; // used for escapes in strings
    -  code[ 'n' ] = newline;    // newline escape \n
    -  code[ 't' ] = tabulator;  // tabulator escape \t
    -
    -  code[ '*' ] = asterisk;
    -  code[ '%' ] = percent;
    -  code[ endoln ] = eoln;
    -  code[ cr ] = eoln;
    -
    -
    -  trans[ start ][ whitespace ] = start;
    -  trans[ start ][ eoln ] = start;
    -  trans[ start ][ minus ] = minusst;
    -  trans[ start ][ plus ] = plusst;
    -  trans[ start ][ digit ] = intdgtst;
    -  trans[ start ][ null ] = nullst;
    -  trans[ start ][ decpoint ] = decpfirstst;
    -  trans[ start ][ openbracket ] = openbracketst;
    -  trans[ start ][ closebracket ] = closebracketst;
    -  trans[ start ][ openbrace ] = openbracest;
    -  trans[ start ][ closebrace ] = closebracest;
    -  trans[ start ][ alpha ] = alphast;
    -  trans[ start ][ asterisk ] = alphast;
    -  trans[ start ][ newline ] = alphast;
    -  trans[ start ][ tabulator ] = alphast;
    -  trans[ start ][ backslash ] = alphast;
    -  trans[ start ][ expntl ] = alphast;
    -  trans[ start ][ slash ] = slashst;
    -  trans[ start ][ percent ] = percentst;
    -  trans[ start ][ eof ] = eofst;
    -  trans[ start ][ openparenth ] = startstringst;
    -
    -  trans[ minusst ][ digit ] = intdgtst;
    -  trans[ minusst ][ null ] = nullst;
    -  trans[ minusst ][ decpoint ] = decpfirstst;
    -  trans[ minusst ][ alpha ] = sgalphast;
    -  trans[ minusst ][ minus ] = sgalphast; // must be name
    -  trans[ minusst ][ newline ] = sgalphast;
    -  trans[ minusst ][ tabulator ] = sgalphast;
    -  trans[ minusst ][ backslash ] = sgalphast;
    -  trans[ minusst ][ expntl ] = alphast;
    -  trans[ minusst ][ whitespace ] = aheadsgst;
    -  trans[ minusst ][ eoln ] = aheadsgst;
    -  trans[ minusst ][ openbracket ] = aheadsgst;
    -  trans[ minusst ][ openbrace ] = aheadsgst;
    -  trans[ minusst ][ closebracket ] = aheadsgst;
    -  trans[ minusst ][ closebrace ] = aheadsgst;
    -  trans[ minusst ][ percent ] = aheadsgst;
    -  trans[ minusst ][ openparenth ] = aheadsgst;
    -  trans[ minusst ][ slash ] = aheadsgst;
    -  trans[ minusst ][ eof ] = aheadsgst;
    -
    -  trans[ plusst ][ digit ] = intdgtst;
    -  trans[ plusst ][ null ] = nullst;
    -  trans[ plusst ][ decpoint ] = decpfirstst;
    -  trans[ plusst ][ alpha ] = sgalphast;
    -  trans[ plusst ][ newline ] = sgalphast;
    -  trans[ plusst ][ tabulator ] = sgalphast;
    -  trans[ plusst ][ backslash ] = sgalphast;
    -  trans[ plusst ][ expntl ] = alphast;
    -  trans[ plusst ][ whitespace ] = aheadsgst;
    -  trans[ plusst ][ eoln ] = aheadsgst;
    -  trans[ plusst ][ openbracket ] = aheadsgst;
    -  trans[ plusst ][ openbrace ] = aheadsgst;
    -  trans[ plusst ][ closebracket ] = aheadsgst;
    -  trans[ plusst ][ closebrace ] = aheadsgst;
    -  trans[ plusst ][ percent ] = aheadsgst;
    -  trans[ plusst ][ openparenth ] = aheadsgst;
    -  trans[ plusst ][ slash ] = aheadsgst;
    -  trans[ plusst ][ eof ] = aheadsgst;
    -
    -
    -  trans[ startstringst ][ closeparenth ] = closeparst; // empty string
    -  trans[ startstringst ][ openparenth ] = openparst;
    -  trans[ startstringst ][ backslash ] = backslashst; // string escape
    -  trans[ startstringst ][ digit ] = stringst;
    -  trans[ startstringst ][ null ] = stringst;
    -  trans[ startstringst ][ expntl ] = stringst;
    -  trans[ startstringst ][ decpoint ] = stringst;
    -  trans[ startstringst ][ plus ] = stringst;
    -  trans[ startstringst ][ minus ] = stringst;
    -  trans[ startstringst ][ whitespace ] = stringst;
    -  trans[ startstringst ][ eoln ] = stringst; // eoln is included!
    -  trans[ startstringst ][ openbracket ] = stringst;
    -  trans[ startstringst ][ closebracket ] = stringst;
    -  trans[ startstringst ][ openbrace ] = stringst;
    -  trans[ startstringst ][ closebrace ] = stringst;
    -  trans[ startstringst ][ alpha ] = stringst;
    -  trans[ startstringst ][ newline ] = stringst;
    -  trans[ startstringst ][ tabulator ] = stringst;
    -  trans[ startstringst ][ slash ] = stringst;
    -  trans[ startstringst ][ percent ] = stringst;
    -  trans[ startstringst ][ asterisk ] = stringst;
    -
    -  trans[ stringst ][ closeparenth ] = closeparst;
    -  trans[ stringst ][ openparenth ] = openparst;
    -  trans[ stringst ][ backslash ] = backslashst; // string escape
    -  trans[ stringst ][ digit ] = stringst;
    -  trans[ stringst ][ null ] = stringst;
    -  trans[ stringst ][ expntl ] = stringst;
    -  trans[ stringst ][ decpoint ] = stringst;
    -  trans[ stringst ][ plus ] = stringst;
    -  trans[ stringst ][ minus ] = stringst;
    -  trans[ stringst ][ whitespace ] = stringst;
    -  trans[ stringst ][ eoln ] = stringst;
    -  trans[ stringst ][ openbracket ] = stringst;
    -  trans[ stringst ][ closebracket ] = stringst;
    -  trans[ stringst ][ openbrace ] = stringst;
    -  trans[ stringst ][ closebrace ] = stringst;
    -  trans[ stringst ][ alpha ] = stringst;
    -  trans[ stringst ][ newline ] = stringst;
    -  trans[ stringst ][ tabulator ] = stringst;
    -  trans[ stringst ][ slash ] = stringst;
    -  trans[ stringst ][ percent ] = stringst;
    -  trans[ stringst ][ asterisk ] = stringst;
    -
    -  // Escape sequences inside a string
    -  trans[ backslashst ][ newline ] = newlinest;
    -  trans[ backslashst ][ tabulator ] = tabulatorst;
    -  trans[ backslashst ][ backslash ] = backslashcst;
    -  trans[ backslashst ][ openparenth ] = oparenthcst;
    -  trans[ backslashst ][ closeparenth ] = cparenthcst;
    -
    -  trans[ intdgtst ][ digit ] = intdgtst;
    -  trans[ intdgtst ][ null ] = intdgtst;
    -  trans[ intdgtst ][ expntl ] = intexpst;
    -  trans[ intdgtst ][ decpoint ] = decpointst;
    -  trans[ intdgtst ][ whitespace ] = aheadintst;
    -  trans[ intdgtst ][ openbracket ] = aheadintst;
    -  trans[ intdgtst ][ openbrace ] = aheadintst;
    -  trans[ intdgtst ][ closebrace ] = aheadintst;
    -  trans[ intdgtst ][ closebracket ] = aheadintst;
    -  trans[ intdgtst ][ percent ] = aheadintst;
    -  trans[ intdgtst ][ slash ] = aheadintst;
    -  // this is a bit questionable, but still unique
    -  trans[ intdgtst ][ alpha ] = aheadintst;
    -  trans[ intdgtst ][ newline ] = aheadintst;
    -  trans[ intdgtst ][ tabulator ] = aheadintst;
    -  trans[ intdgtst ][ backslash ] = aheadintst;
    -  trans[ intdgtst ][ openparenth ] = aheadintst;
    -  trans[ intdgtst ][ eoln ] = aheadintst;
    -  trans[ intdgtst ][ eof ] = aheadintst;
    -
    -  trans[ nullst ][ decpoint ] = decpointst;
    -  trans[ nullst ][ expntl ] = expntlst;
    -  trans[ nullst ][ whitespace ] = aheadintst;
    -  trans[ nullst ][ openbracket ] = aheadintst;
    -  trans[ nullst ][ openbrace ] = aheadintst;
    -  trans[ nullst ][ closebrace ] = aheadintst;
    -  trans[ nullst ][ closebracket ] = aheadintst;
    -  trans[ nullst ][ percent ] = aheadintst;
    -  trans[ nullst ][ slash ] = aheadintst;
    -  trans[ nullst ][ openparenth ] = aheadintst;
    -  // this is a bit questionable, but still unique
    -  trans[ nullst ][ alpha ] = aheadintst;
    -  trans[ nullst ][ tabulator ] = aheadintst;
    -  trans[ nullst ][ newline ] = aheadintst;
    -  trans[ nullst ][ backslash ] = aheadintst;
    -  trans[ nullst ][ eoln ] = aheadintst;
    -  trans[ nullst ][ eof ] = aheadintst;
    -
    -
    -  trans[ decpfirstst ][ digit ] = decpdgtst;
    -  trans[ decpfirstst ][ alpha ] = dotalphast;
    -  trans[ decpfirstst ][ asterisk ] = dotalphast;
    -  trans[ decpfirstst ][ null ] = decpdgtst;
    -
    -  trans[ decpointst ][ digit ] = fracdgtst;
    -  trans[ decpointst ][ null ] = fracdgtst;
    -  trans[ decpointst ][ expntl ] = expntlst;
    -  trans[ decpointst ][ whitespace ] = aheadfracst;
    -  trans[ decpointst ][ eoln ] = aheadfracst;
    -  trans[ decpointst ][ openbracket ] = aheadfracst;
    -  trans[ decpointst ][ openbrace ] = aheadfracst;
    -  trans[ decpointst ][ closebracket ] = aheadfracst;
    -  trans[ decpointst ][ closebrace ] = aheadfracst;
    -  trans[ decpointst ][ percent ] = aheadfracst;
    -  trans[ decpointst ][ slash ] = aheadfracst;
    -  trans[ decpointst ][ openparenth ] = aheadfracst;
    -  // this is a bit questionable, but still unique
    -  trans[ decpointst ][ alpha ] = aheadfracst;
    -  trans[ decpointst ][ tabulator ] = aheadfracst;
    -  trans[ decpointst ][ newline ] = aheadfracst;
    -  trans[ decpointst ][ backslash ] = aheadfracst;
    -  trans[ decpointst ][ eof ] = aheadfracst;
    -
    -
    -  trans[ fracdgtst ][ digit ] = fracdgtst;
    -  trans[ fracdgtst ][ null ] = fracdgtst;
    -  trans[ fracdgtst ][ expntl ] = expntlst;
    -  trans[ fracdgtst ][ whitespace ] = aheadfracst;
    -  trans[ fracdgtst ][ eoln ] = aheadfracst;
    -  trans[ fracdgtst ][ openbracket ] = aheadfracst;
    -  trans[ fracdgtst ][ openbrace ] = aheadfracst;
    -  trans[ fracdgtst ][ closebracket ] = aheadfracst;
    -  trans[ fracdgtst ][ closebrace ] = aheadfracst;
    -  trans[ fracdgtst ][ percent ] = aheadfracst;
    -  trans[ fracdgtst ][ slash ] = aheadfracst;
    -  trans[ fracdgtst ][ openparenth ] = aheadfracst;
    -  // this is a bit questionable, but still unique
    -  trans[ fracdgtst ][ alpha ] = aheadfracst;
    -  trans[ fracdgtst ][ tabulator ] = aheadfracst;
    -  trans[ fracdgtst ][ newline ] = aheadfracst;
    -  trans[ fracdgtst ][ backslash ] = aheadfracst;
    -  trans[ fracdgtst ][ eof ] = aheadfracst;
    -
    -  trans[ expntlst ][ digit ] = expdigst;
    -  trans[ expntlst ][ null ] = expdigst;
    -  trans[ expntlst ][ plus ] = plexpst;
    -  trans[ expntlst ][ minus ] = mnexpst;
    -
    -  trans[ plexpst ][ digit ] = expdigst;
    -  trans[ plexpst ][ null ] = expdigst;
    -
    -  trans[ mnexpst ][ digit ] = expdigst;
    -  trans[ mnexpst ][ null ] = expdigst;
    -
    -  trans[ expdigst ][ digit ] = expdigst;
    -  trans[ expdigst ][ null ] = expdigst;
    -  trans[ expdigst ][ whitespace ] = aheadfracst;
    -  trans[ expdigst ][ eoln ] = aheadfracst;
    -  trans[ expdigst ][ openbracket ] = aheadfracst;
    -  trans[ expdigst ][ openbrace ] = aheadfracst;
    -  trans[ expdigst ][ closebracket ] = aheadfracst;
    -  trans[ expdigst ][ closebrace ] = aheadfracst;
    -  trans[ expdigst ][ percent ] = aheadfracst;
    -  trans[ expdigst ][ slash ] = aheadfracst;
    -  trans[ expdigst ][ openparenth ] = aheadfracst;
    -  // this is a bit questionable, but still unique
    -  trans[ expdigst ][ alpha ] = aheadfracst;
    -  trans[ expdigst ][ newline ] = aheadfracst;
    -  trans[ expdigst ][ tabulator ] = aheadfracst;
    -  trans[ expdigst ][ backslash ] = aheadfracst;
    -  trans[ expdigst ][ eof ] = aheadfracst;
    -
    -
    -  trans[ alphast ][ whitespace ] = aheadalphst;
    -  trans[ alphast ][ eoln ] = aheadalphst;
    -  trans[ alphast ][ alpha ] = alphast;
    -  trans[ alphast ][ asterisk ] = alphast;
    -  trans[ alphast ][ newline ] = alphast;
    -  trans[ alphast ][ tabulator ] = alphast;
    -  trans[ alphast ][ backslash ] = alphast;
    -  trans[ alphast ][ expntl ] = alphast;
    -  trans[ alphast ][ digit ] = alphast;
    -  trans[ alphast ][ null ] = alphast;
    -  trans[ alphast ][ plus ] = alphast;
    -  trans[ alphast ][ minus ] = alphast;
    -  trans[ alphast ][ decpoint ] = alphast;
    -  trans[ alphast ][ openbracket ] = aheadalphst;
    -  trans[ alphast ][ openbrace ] = aheadalphst;
    -  trans[ alphast ][ closebracket ] = aheadalphst;
    -  trans[ alphast ][ closebrace ] = aheadalphst;
    -  trans[ alphast ][ percent ] = aheadalphst;
    -  trans[ alphast ][ openparenth ] = aheadalphst;
    -  trans[ alphast ][ slash ] = aheadalphst;
    -  trans[ alphast ][ eof ] = aheadalphst;
    -
    -  // PostScript comments are like white space
    -
    -  trans[ percentst ][ eoln ] = start;
    -  trans[ percentst ][ backslash ] = percentst;
    -  trans[ percentst ][ whitespace ] = percentst;
    -  trans[ percentst ][ openparenth ] = percentst;
    -  trans[ percentst ][ closeparenth ] = percentst;
    -  trans[ percentst ][ digit ] = percentst;
    -  trans[ percentst ][ null ] = percentst;
    -  trans[ percentst ][ decpoint ] = percentst;
    -  trans[ percentst ][ plus ] = percentst;
    -  trans[ percentst ][ minus ] = percentst;
    -  trans[ percentst ][ openbracket ] = percentst;
    -  trans[ percentst ][ closebracket ] = percentst;
    -  trans[ percentst ][ openbrace ] = percentst;
    -  trans[ percentst ][ closebrace ] = percentst;
    -  trans[ percentst ][ alpha ] = percentst;
    -  trans[ percentst ][ newline ] = percentst;
    -  trans[ percentst ][ tabulator ] = percentst;
    -  trans[ percentst ][ expntl ] = percentst;
    -  trans[ percentst ][ slash ] = percentst;
    -  trans[ percentst ][ percent ] = percentst;
    -  trans[ percentst ][ asterisk ] = percentst;
    -  trans[ percentst ][ eof ] = eofst;
    -
    -  // ccommentst treats c like comments.
    -
    -  trans[ slashst ][ asterisk ] = ccommentst;
    -  trans[ slashst ][ backslash ] = literalst;
    -  trans[ slashst ][ alpha ] = literalst;
    -  trans[ slashst ][ newline ] = literalst;
    -  trans[ slashst ][ tabulator ] = literalst;
    -  trans[ slashst ][ minus ] = literalst;
    -  trans[ slashst ][ plus ] = literalst;
    -  trans[ slashst ][ expntl ] = literalst;
    -  trans[ slashst ][ digit ] = literalst;
    -  trans[ slashst ][ decpoint ] = literalst;
    -  trans[ slashst ][ null ] = literalst;
    -
    -  trans[ literalst ][ whitespace ] = aheadlitst;
    -  trans[ literalst ][ eoln ] = aheadlitst;
    -  trans[ literalst ][ alpha ] = literalst;
    -  trans[ literalst ][ asterisk ] = literalst;
    -  trans[ literalst ][ newline ] = literalst;
    -  trans[ literalst ][ tabulator ] = literalst;
    -  trans[ literalst ][ backslash ] = literalst;
    -  trans[ literalst ][ expntl ] = literalst;
    -  trans[ literalst ][ digit ] = literalst;
    -  trans[ literalst ][ null ] = literalst;
    -  trans[ literalst ][ plus ] = literalst;
    -  trans[ literalst ][ minus ] = literalst;
    -  trans[ literalst ][ decpoint ] = literalst;
    -  trans[ literalst ][ openbracket ] = aheadlitst;
    -  trans[ literalst ][ closebracket ] = aheadlitst;
    -  trans[ literalst ][ openbrace ] = aheadlitst;
    -  trans[ literalst ][ closebrace ] = aheadlitst;
    -  trans[ literalst ][ openparenth ] = aheadlitst;
    -  trans[ literalst ][ percent ] = aheadlitst;
    -  trans[ literalst ][ slash ] = aheadlitst;
    -  trans[ literalst ][ eof ] = aheadlitst;
    -
    -
    -  trans[ ccommentst ][ eoln ] = ccommentst;
    -  trans[ ccommentst ][ whitespace ] = ccommentst;
    -  trans[ ccommentst ][ openparenth ] = ccommentst;
    -  trans[ ccommentst ][ closeparenth ] = ccommentst;
    -  trans[ ccommentst ][ backslash ] = ccommentst;
    -  trans[ ccommentst ][ digit ] = ccommentst;
    -  trans[ ccommentst ][ null ] = ccommentst;
    -  trans[ ccommentst ][ decpoint ] = ccommentst;
    -  trans[ ccommentst ][ plus ] = ccommentst;
    -  trans[ ccommentst ][ minus ] = ccommentst;
    -  trans[ ccommentst ][ percent ] = ccommentst;
    -  trans[ ccommentst ][ openbracket ] = ccommentst;
    -  trans[ ccommentst ][ closebracket ] = ccommentst;
    -  trans[ ccommentst ][ openbrace ] = ccommentst;
    -  trans[ ccommentst ][ closebrace ] = ccommentst;
    -  trans[ ccommentst ][ alpha ] = ccommentst;
    -  trans[ ccommentst ][ newline ] = ccommentst;
    -  trans[ ccommentst ][ tabulator ] = ccommentst;
    -  trans[ ccommentst ][ expntl ] = ccommentst;
    -  trans[ ccommentst ][ slash ] = ccommentst;
    -  trans[ ccommentst ][ asterisk ] = asteriskst;
    -
    -  trans[ asteriskst ][ slash ] = start;
    -  trans[ asteriskst ][ eoln ] = ccommentst;
    -  trans[ asteriskst ][ backslash ] = ccommentst;
    -  trans[ asteriskst ][ whitespace ] = ccommentst;
    -  trans[ asteriskst ][ openparenth ] = ccommentst;
    -  trans[ asteriskst ][ closeparenth ] = ccommentst;
    -  trans[ asteriskst ][ digit ] = ccommentst;
    -  trans[ asteriskst ][ null ] = ccommentst;
    -  trans[ asteriskst ][ decpoint ] = ccommentst;
    -  trans[ asteriskst ][ plus ] = ccommentst;
    -  trans[ asteriskst ][ minus ] = ccommentst;
    -  trans[ asteriskst ][ openbracket ] = ccommentst;
    -  trans[ asteriskst ][ closebracket ] = ccommentst;
    -  trans[ asteriskst ][ openbrace ] = ccommentst;
    -  trans[ asteriskst ][ closebrace ] = ccommentst;
    -  trans[ asteriskst ][ alpha ] = ccommentst;
    -  trans[ asteriskst ][ newline ] = ccommentst;
    -  trans[ asteriskst ][ tabulator ] = ccommentst;
    -  trans[ asteriskst ][ expntl ] = ccommentst;
    -  trans[ asteriskst ][ percent ] = ccommentst;
    -  // changed from ccommentst, 25.8.1995
    -  trans[ asteriskst ][ asterisk ] = asteriskst;
    -}
    -
    -void
    -Scanner::source( std::istream* in_s )
    -{
    -  if ( in != in_s )
    -  {
    -    in = in_s;
    -    line = 0;
    -    col = 0;
    -    old_context.clear();
    -    context.clear();
    -    context.reserve( 255 );
    -  }
    -}
    -
    -bool
    -Scanner::operator()( Token& t )
    -{
    -  static const int base = 10;
    -  ScanStates state = start;
    -  std::string s;
    -  s.reserve( 255 );
    -  std::string ds;
    -  context.reserve( 255 );
    -
    -  unsigned char c = '\0';
    -  unsigned char sgc = '\0';
    -
    -  long lng = 0L;
    -  int sg = 1;
    -  int e = 0;
    -  int parenth = 0; // to handle PS parenthesis in strings
    -
    -  t.clear();
    -
    -  do
    -  {
    -
    -    if ( not in->eof() and not in->good() )
    -    {
    -      std::cout << "I/O Error in scanner input stream." << std::endl;
    -      state = error;
    -      break;
    -    }
    -
    -    // according to Stroustrup 21.3.4, std::istream::get(char&),
    -    // so we cannot use unsigned char c as argument.  The
    -    // get() is not picky.  --- HEP 2001-08-09
    -    //     in->get(c);
    -    c = in->get();
    -    if ( col++ == 0 )
    -    {
    -      ++line;
    -    }
    -
    -    if ( c == '\0' or in->bad() )
    -    {
    -      c = endof;
    -    }
    -
    -    if ( in->eof() )
    -    {
    -      c = endof;
    -    }
    -    else
    -    {
    -      assert( in->good() );
    -    }
    -    if ( c != endof )
    -    {
    -      context += c;
    -    }
    -
    -    if ( c == endoln )
    -    {
    -      col = 0;
    -      old_context.clear();
    -      old_context.swap( context );
    -      context.reserve( 256 );
    -    }
    -
    -    state = trans[ state ][ code( c ) ];
    -
    -    switch ( state )
    -    {
    -    case intdgtst:
    -      lng = sg * ( std::labs( lng ) * base + digval( c ) );
    -      ds.push_back( c );
    -      break;
    -
    -    case aheadintst:
    -    {
    -      IntegerDatum id( lng );
    -      t = id;
    -      if ( c != endoln and c != endof )
    -      {
    -        in->unget();
    -        --col;
    -      }
    -
    -      ds.clear();
    -      state = end;
    -    }
    -    break;
    -
    -
    -    case expntlst:
    -      ds.push_back( 'e' );
    -      break;
    -
    -    case intexpst:
    -      ds.push_back( 'e' );
    -      state = expntlst;
    -      break;
    -
    -    case decpointst:
    -      ds.push_back( '.' );
    -      break;
    -
    -    case decpdgtst:
    -      /* This state is entered when a number starts with a decimal point.
    -         in this case the next character must be null or digit, everything
    -         else is an invalid transition. This is why decpdgtst and fracdgtst
    -         are separate states. */
    -      ds.push_back( '.' );
    -      state = fracdgtst;
    -    /* no break */
    -    case fracdgtst:
    -      ds.push_back( c );
    -      break;
    -
    -    case aheadfracst:
    -    {
    -      // cast base to double to help aCC with overloading
    -      // the first arg to pow is always a double, Stroustrup 22.3
    -      // HEP 2001-08--09
    -
    -      // traditional
    -      // Token doubletoken(new DoubleDatum(d * std::pow((double)base,es*e)));
    -
    -      Token doubletoken( new DoubleDatum( std::atof( ds.c_str() ) ) );
    -      ds.clear();
    -
    -      t.move( doubletoken );
    -      if ( c != endoln and c != endof )
    -      {
    -        in->unget();
    -        --col;
    -      }
    -      state = end;
    -    }
    -    break;
    -
    -    case minusst:
    -      sg = -1;
    -      ds.push_back( '-' );
    -    /* no break */
    -    case plusst:
    -      sgc = c;
    -      break;
    -
    -    case mnexpst:
    -      ds.push_back( '-' );
    -      break;
    -
    -    case expdigst:
    -      e = e * base + digval( c );
    -      ds.push_back( c );
    -      break;
    -
    -    case openparst:
    -      parenth++;
    -      s.append( 1, c );
    -      state = stringst;
    -      break;
    -    case closeparst:      // this is not meant for a DEA!
    -      if ( parenth )      // if parenth>0 we are still
    -      {                   //  inside the string
    -        s.append( 1, c ); // the last ) is not included.
    -        parenth--;
    -        state = stringst;
    -      }
    -      else
    -      {
    -        Token temptoken( new StringDatum( s ) );
    -        t.move( temptoken );
    -        state = end;
    -      }
    -      break;
    -    case dotalphast:
    -      s.append( 1, '.' );
    -      s.append( 1, c );
    -      state = alphast;
    -      break;
    -    case sgalphast:
    -      assert( sgc == '+' or sgc == '-' );
    -      s.append( 1, sgc );
    -      state = alphast;
    -    /* no break */
    -    case literalst:
    -    case stringst:
    -    case alphast:       // let's optimize this at some point
    -      s.append( 1, c ); // string of fixed length sl
    -      break;            // append to s every sl characters
    -    case newlinest:
    -      s.append( "\n" );
    -      state = stringst;
    -      break;
    -    case tabulatorst:
    -      s.append( "\t" );
    -      state = stringst;
    -      break;
    -    case backslashcst:
    -      s.append( "\\" );
    -      state = stringst;
    -      break;
    -    case oparenthcst:
    -      s.append( "(" );
    -      state = stringst;
    -      break;
    -    case cparenthcst:
    -      s.append( ")" );
    -      state = stringst;
    -      break;
    -    case aheadsgst:
    -      s.append( 1, sgc );
    -    /* no break */
    -    case aheadalphst:
    -    {
    -      if ( c != endoln and c != endof )
    -      {
    -        in->unget();
    -        --col;
    -      }
    -      NameDatum nd( s );
    -      t = nd;
    -    }
    -      state = end;
    -      break;
    -
    -    case aheadlitst:
    -    {
    -      if ( c != endoln and c != endof )
    -      {
    -        in->unget();
    -        --col;
    -      }
    -      LiteralDatum nd( s );
    -      t = nd;
    -      state = end;
    -    }
    -    break;
    -
    -    case openbracest:
    -    {
    -      t = BeginProcedureSymbol;
    -      state = end;
    -    }
    -    break;
    -
    -    case openbracketst:
    -    {
    -      t = BeginArraySymbol;
    -      state = end;
    -    }
    -    break;
    -
    -    case closebracest:
    -    {
    -      t = EndProcedureSymbol;
    -      state = end;
    -    }
    -    break;
    -
    -    case closebracketst:
    -    {
    -      t = EndArraySymbol;
    -      state = end;
    -    }
    -    break;
    -
    -    case eofst:
    -    {
    -      t = EndSymbol;
    -      state = end;
    -    }
    -    break;
    -
    -    case error:
    -      print_error( "" );
    -      break;
    -    default:
    -      break;
    -    }
    -  } while ( ( state != error ) and ( state != end ) );
    -  return ( state == end );
    -}
    -
    -void
    -Scanner::print_error( const char* msg )
    -{
    -  std::cout << "% parser: At line " << line << " position " << col << ".\n"
    -            << "% parser: Syntax Error: " << msg << "\n";
    -  std::cout << "% parser: Context preceding the error follows:\n" << old_context << std::endl << context << std::endl;
    -}
    diff --git a/sli/scanner.h b/sli/scanner.h
    deleted file mode 100644
    index 62d2f29fe8..0000000000
    --- a/sli/scanner.h
    +++ /dev/null
    @@ -1,209 +0,0 @@
    -/*
    - *  scanner.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef Scanner_H
    -#define Scanner_H
    -/*
    -    SLI's lexical analyzer
    -
    -*/
    -
    -// C++ includes:
    -#include <iostream>
    -#include <string>
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "charcode.h"
    -#include "symboldatum.h"
    -#include "token.h"
    -
    -
    -class Scanner
    -{
    -  std::istream* in;
    -
    -  CharCode code; // some Chars cause the same Transition
    -
    -  unsigned long line;  //!< Current line number
    -  unsigned long col;   //!< Current column in line
    -  std::string context; //!< Current context.
    -  std::string old_context;
    -  enum ScanStates
    -  {
    -    start = 0,
    -    intdgtst,
    -    intexpst,
    -    nullst,
    -    aheadintst,
    -    decpfirstst,
    -    decpdgtst,
    -    decpointst,
    -    fracdgtst,
    -    minusst,
    -    plusst,
    -    aheadsgst,
    -    sgalphast,
    -    aheadfracst,
    -    expntlst,
    -    plexpst,
    -    mnexpst,
    -    openbracketst,
    -    closebracketst,
    -    openbracest,
    -    closebracest,
    -    openparst,
    -    closeparst,
    -    expdigst,
    -    dotalphast,
    -    alphast,
    -    aheadalphst,
    -    slashst,
    -    literalst,
    -    aheadlitst,
    -    percentst,
    -    whitest,
    -    asteriskst,
    -    ccommentst,
    -    startstringst,
    -    stringst,
    -    backslashst,
    -    newlinest,
    -    tabulatorst,
    -    backslashcst,
    -    oparenthcst,
    -    cparenthcst,
    -    end,
    -    eofst,
    -    error,
    -    lastscanstate
    -  };
    -
    -  enum Codes
    -  {
    -    invalid = 0,
    -    whitespace,
    -    eof,
    -    digit,
    -    null,
    -    expntl,
    -    decpoint,
    -    plus,
    -    minus,
    -    openbracket,
    -    closebracket,
    -    openbrace,
    -    closebrace,
    -    openparenth,
    -    closeparenth,
    -    alpha,
    -    slash,
    -    backslash,
    -    newline,
    -    tabulator,
    -    asterisk,
    -    percent,
    -    eoln,
    -    other,
    -    lastcode
    -  };
    -
    -  enum ScanStates trans[ lastscanstate ][ lastcode ]; // DFA transition-function
    -
    -
    -  const unsigned char space;
    -  const unsigned char tab;
    -  const unsigned char endoln;
    -  const unsigned char cr; // carriage return (ctrl M)
    -  const unsigned char endof;
    -  int
    -  digval( unsigned char c ) const
    -  {
    -    return c - '0';
    -  }
    -
    -
    -public:
    -  SymbolDatum BeginArraySymbol;
    -  SymbolDatum EndArraySymbol;
    -  SymbolDatum BeginProcedureSymbol;
    -  SymbolDatum EndProcedureSymbol;
    -  SymbolDatum EndSymbol;
    -
    -  /**
    -   * Initialise scanner with a stream.
    -   */
    -  Scanner( std::istream* );
    -
    -  /**
    -   * Set new input stream.
    -   */
    -  void source( std::istream* );
    -
    -  /**
    -   * Return input stream.
    -   */
    -  std::istream*
    -  GetSource()
    -  {
    -    return in;
    -  }
    -
    -  /**
    -   * Scan input until the next Token.
    -   */
    -  bool operator()( Token& );
    -
    -  /**
    -   * Issue an error message.
    -   */
    -  void print_error( const char* );
    -
    -  /**
    -   * Return current line number in input stream.
    -   */
    -  unsigned long
    -  get_line() const
    -  {
    -    return line;
    -  }
    -
    -  /**
    -   * Return position in  current line in input stream.
    -   */
    -  unsigned long
    -  get_col() const
    -  {
    -    return col;
    -  }
    -
    -  void
    -  clear_context()
    -  {
    -    line = 0;
    -    col = 0;
    -    context.clear();
    -    old_context.clear();
    -  }
    -};
    -
    -#endif
    diff --git a/sli/sharedptrdatum.h b/sli/sharedptrdatum.h
    deleted file mode 100644
    index 7a8bf7c259..0000000000
    --- a/sli/sharedptrdatum.h
    +++ /dev/null
    @@ -1,98 +0,0 @@
    -/*
    - *  sharedptrdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SHAREDPTRDATUM_H
    -#define SHAREDPTRDATUM_H
    -
    -#include <memory>
    -
    -// Includes from sli:
    -#include "datum.h"
    -
    -/**
    - * @brief Smart pointer data object.
    - */
    -template < class D, SLIType* slt >
    -class sharedPtrDatum : public std::shared_ptr< D >, public TypedDatum< slt >
    -{
    -  Datum*
    -  clone() const
    -  {
    -    return new sharedPtrDatum< D, slt >( *this );
    -  }
    -
    -public:
    -  sharedPtrDatum() = default;
    -
    -  sharedPtrDatum( const std::shared_ptr< D > d )
    -    : std::shared_ptr< D >( d )
    -    , TypedDatum< slt >()
    -  {
    -  }
    -
    -  /**
    -   * @brief Constructor
    -   * @param d a pointer to an object to manage
    -   *
    -   * The shared_ptr will control the destruction of the object. The object is automatically destroyed,
    -   * so no references to it should be kept after construction.
    -   */
    -  sharedPtrDatum( D* d )
    -    : std::shared_ptr< D >( d )
    -    , TypedDatum< slt >()
    -  {
    -  }
    -
    -  ~sharedPtrDatum() = default;
    -
    -  void
    -  print( std::ostream& out ) const
    -  {
    -    out << '<' << this->gettypename() << '>';
    -  }
    -
    -  void
    -  pprint( std::ostream& out ) const
    -  {
    -    out << "<shared_ptr[" << this->use_count() << "]->" << this->gettypename() << '('
    -        << static_cast< void* >( this->get() ) << ")>";
    -  }
    -
    -  void
    -  info( std::ostream& out ) const
    -  {
    -    pprint( out );
    -  }
    -
    -  /**
    -   * @brief Tests for equality between this and another datum.
    -   * @param dat datum to check against
    -   */
    -  bool
    -  equals( const Datum* other ) const
    -  {
    -    const sharedPtrDatum< D, slt >* other_dc = dynamic_cast< const sharedPtrDatum< D, slt >* >( other );
    -    return other_dc and *this == *other_dc;
    -  }
    -};
    -
    -#endif
    diff --git a/sli/sli_io.cc b/sli/sli_io.cc
    deleted file mode 100644
    index bc823523b8..0000000000
    --- a/sli/sli_io.cc
    +++ /dev/null
    @@ -1,2054 +0,0 @@
    -/*
    - *  sli_io.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -   SLI's i/o functions
    -*/
    -
    -#include "sli_io.h"
    -
    -// C++ includes:
    -#include <iomanip>
    -#include <iostream>
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from sli:
    -#include "dictstack.h"
    -#include "doubledatum.h"
    -#include "fdstream.h"
    -#include "integerdatum.h"
    -#include "iostreamdatum.h"
    -#include "stringdatum.h"
    -
    -// sstream has functions std::?stringstream
    -// strstream has functions std::?strstream
    -// HEP 2002-10-06
    -#ifdef HAVE_SSTREAM
    -#include <sstream>
    -#else
    -#include <strstream>
    -#endif
    -
    -
    -using namespace std;
    -
    -// The i/o facilities defined in this file shall map the C++ stream i/o
    -// facilities to SLI. The PS compatible i/o operations shall be implemented
    -// in terms of the c++ compatible operators.
    -
    -// Note: As of GNU libstdc++ 2.7.2, most of the ANSI/ISO manipulators
    -// are not yet supportet, thus the flags are set and unset explicitely.
    -
    -// String stream operations are not yet (as of Nov 7 1997) defined
    -// due to the lack of sstream support in libstdc++-2.7.2.x
    -// This will change in the future.
    -
    -void
    -MathLinkPutStringFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  // call: string  ->
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -
    -  if ( not sd )
    -  {
    -    StringDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  std::cout << "sending (" << *sd << ") to Mathematica" << std::endl;
    -
    -  i->EStack.pop();
    -  i->OStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    -  Name: xifstream - Create an executable input-stream.
    -  Synopsis: (filename) xifstream -> file true
    -  -> false
    -  Description: xifstream first tries to open a file
    -  by the given name. If this was successful, it creates
    -  an executable stream-handle.
    -  If an executable stream is executed (e.g. with exec),
    -  the interpreter parses this file according to SLI syntax
    -  and evaluates all contained objects.
    -  SeeAlso: run
    -*/
    -void
    -XIfstreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  // call: string -> ifstreamhandle true
    -  //              -> false
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -
    -  if ( not sd )
    -  {
    -    StringDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  std::istream* in = new ifdstream( sd->c_str() );
    -  i->OStack.pop();
    -  if ( in->good() )
    -  {
    -    Token handle_token( new XIstreamDatum( in ) );
    -
    -    i->OStack.push_move( handle_token );
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -IfstreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: ifstream - Open file for reading.
    -     Synopsis: string ifstream -> ifstreamhandle true
    -     -> false
    -     Description:
    -     Tries to open the named file for reading.
    -     If successful an ifstream handle object
    -     and the boolean true is returned. In case of failure only the boolean
    -     false is returned. This function provides a direct interface to the
    -     C++ ifstream constructor. SLI's search path mechanism is not used.
    -     Remarks: commented 26.3.1999, Diesmann
    -     SeeAlso: xifstream, ofstream
    -  */
    -  i->assert_stack_load( 1 );
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -
    -  if ( not sd )
    -  {
    -    StringDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  //    std::ifstream *in = new std::ifstream(sd->c_str());
    -  std::istream* in = new ifdstream( sd->c_str() );
    -  i->OStack.pop();
    -  if ( in->good() )
    -  {
    -    Token handle_token( new IstreamDatum( in ) );
    -
    -    i->OStack.push_move( handle_token );
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: ofstream - Open a file stream for writing.
    -   Synopsis: string ofstream -> ofstreamhandle true
    -   -> false
    -   Description:
    -   Open the file by the supplied name for writing.
    -   If successful an ofstream handle object
    -   and the boolean true is returned. In case of failure, only the boolean
    -   false is returned. This function provides a direct interface to the
    -   C++ ofstream constructor. SLI's search path mechanism is not used.
    -   Remarks: commented 26.3.1999, Diesmann
    -   SeeAlso: ofsopen
    -*/
    -
    -void
    -OfstreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  // call: string -> ofstream true
    -  //              -> false
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -
    -  if ( not sd )
    -  {
    -    StringDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  //    std::ofstream *out = new std::ofstream(sd->c_str());
    -  std::ostream* out = new ofdstream( sd->c_str() );
    -  i->OStack.pop();
    -  if ( out->good() )
    -  {
    -    Token handle_token( new OstreamDatum( out ) );
    -
    -    i->OStack.push_move( handle_token );
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -
    -// This is the ofstream constructor
    -// with open mode arguments.
    -// In the sli we do not implement the ios_base flags
    -// and rather use the c-mode notation
    -
    -/** @BeginDocumentation
    -   Name: ofsopen - Open an existing file for appending or writing.
    -   Synopsis: (name) (mode) ofsopen -> ofstreamhandle true
    -   -> false
    -   Parameters: (name) - name of the file.
    -   (mode) - string with either (w) or (a) to identify
    -   the access mode. (w) corresponds to writing
    -   and (a) to appending.
    -   Description:
    -   Open the named file according to the access mode. If the file
    -   is not existing, it will be created in the current working directory.
    -   If the file does exists, the access mode decides whether the file will
    -   be overwritten (w) or whether the new data will be appended (a).
    -   If successful an ofstream handle object and the boolean true is returned.
    -   In case of failure, only the boolean
    -   false is returned. This function provides a direct interface to the
    -   C++ ofstream constructor. SLI's search path mechanism is not used.
    -   Remarks: commented 26.3.1999, Diesmann
    -   SeeAlso: ofstream
    -*/
    -void
    -OfsopenFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -  // call: string string -> ofstream true
    -  //                     -> false
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  StringDatum* md = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -
    -  if ( not sd or not md )
    -  {
    -    StringDatum const d;
    -    Token t1 = i->OStack.pick( 1 );
    -    Token t2 = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(),
    -      t1.datum()->gettypename().toString() + " or " + t2.datum()->gettypename().toString() );
    -  }
    -
    -  std::ostream* out = nullptr;
    -
    -  if ( static_cast< string >( *md ) == "w" )
    -  {
    -    out = new ofdstream( sd->c_str(), ios::out );
    -  }
    -  else if ( static_cast< string >( *md ) == "a" )
    -  {
    -    out = new ofdstream( sd->c_str(), ios::out | ios::app );
    -  }
    -  else
    -  {
    -    i->raiseerror( Name( "UnknownFileOpenMode" ) );
    -    return;
    -  }
    -
    -  if ( out )
    -  {
    -    i->OStack.pop( 2 );
    -    if ( out->good() )
    -    {
    -      Token handle_token( new OstreamDatum( out ) );
    -
    -      i->OStack.push_move( handle_token );
    -      i->OStack.push( true );
    -    }
    -    else
    -    {
    -      i->OStack.push( false );
    -    }
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -#ifdef HAVE_SSTREAM
    -
    -
    -void
    -IsstreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This operator does not work yet, due to the fact that
    -  // the string, used to initialize the stringstream is not copied
    -  // but is used as the actual buffer. Thus, in our
    -  // context this leads to a loss of the buffer, as
    -  // the string object is destroyed at the end of the function!!
    -
    -  // call: string isstream -> isstream true
    -  //                       -> false
    -
    -  i->assert_stack_load( 1 );
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -
    -  if ( not sd )
    -  {
    -    StringDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -#ifdef HAVE_SSTREAM
    -  std::istringstream* in = new std::istringstream( sd->c_str() );
    -#else
    -  std::istrstream* in = new std::istrstream( sd->c_str() );
    -#endif
    -  i->OStack.pop();
    -  if ( in->good() )
    -  {
    -    i->OStack.push( new IstreamDatum( in ) );
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -// old style output string stream
    -/** @BeginDocumentation
    -  Name: osstream - Create a string-stream object.
    -  Synopsis:
    -  osstream -> osstream-handle true
    -  -> false
    -  Description:
    -  osstream creates a stream object which can later be turned into a
    -  string. If creation of a usable string-stream object failed for any
    -  reason, false is returned. Replaces obsolete ostrstream.
    -  Remarks: commented 6.11.2003, Diesmann
    -  SeeAlso: str, ofstream, ofsopen
    -*/
    -void
    -OsstreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: osstream -> osstream true
    -  //                -> false
    -
    -#ifdef HAVE_SSTREAM
    -  std::ostringstream* out = new std::ostringstream();
    -#else
    -  std::ostrtream* out = new std::ostrstream();
    -#endif
    -
    -  if ( out->good() )
    -  {
    -    i->OStack.push( new OstreamDatum( out ) );
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -StrSStreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  // call: ostrstream str -> string
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not ostreamdatum )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -#ifdef HAVE_SSTREAM
    -  std::ostringstream* out = dynamic_cast< std::ostringstream* >( ostreamdatum->get() );
    -#else
    -  std::ostrstream* out = dynamic_cast< std::ostrstream* >( ostreamdatum->get() );
    -#endif
    -  assert( out );
    -  ostreamdatum->unlock();
    -
    -  if ( out )
    -  {
    -    if ( out->good() )
    -    {
    -      // *out << ends;  // this causes a 0 as the last character of the string
    -      // on the alpha compiler. It is probably a bug to
    -      // use this command with <sstream>. 25.2.02 Diesmann
    -
    -      string s = out->str();           // following Stroustrup
    -      Token t( new StringDatum( s ) ); //
    -
    -
    -      i->OStack.pop();
    -      i->OStack.push_move( t );
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      i->raiseerror( i->BadIOError ); // new style more throw like
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->StringStreamExpectedError );
    -  }
    -}
    -
    -#else
    -
    -// old style output string stream
    -/** @BeginDocumentation
    -  Name: ostrstream - Create a string-stream object.
    -  Synopsis:
    -  ostrstream -> ostreamhandle true
    -  -> false
    -  Description:
    -  Obsolete, use osstream instead.
    -  SeeAlso: str, osstream
    -*/
    -void
    -OstrstreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostrstream -> ostrstream true
    -  //                  -> false
    -
    -#ifdef HAVE_SSTREAM
    -  std::ostringstream* out = new std::ostringstream();
    -#else
    -  std::ostrstream* out = new std::ostrstream();
    -#endif
    -  assert( out );
    -
    -  if ( out->good() )
    -  {
    -    i->OStack.push( new OstreamDatum( out ) );
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -  Name: str - Retrieve a string from a string-stream.
    -  Synopsis: osstream str -> string
    -  Description: Retrieves the string data from a string-stream object
    -  SeeAlso: osstream
    -*/
    -void
    -StrFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  // call: std::ostrstream str -> string
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not ostreamdatum )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -#ifdef HAVE_SSTREAM
    -  std::ostringstream* out = dynamic_cast< std::ostringstream* >( ostreamdatum->get() );
    -#else
    -  std::ostrstream* out = dynamic_cast< std::ostrstream* >( ostreamdatum->get() );
    -#endif
    -  assert( out );
    -  ostreamdatum->unlock();
    -
    -  if ( out )
    -  {
    -    if ( out->good() )
    -    {
    -      *out << ends;                    // following Josuttis, Nicolai 1996
    -      char* s = out->str();            // sec. 13.11.2 page 493
    -      Token t( new StringDatum( s ) ); //
    -      delete[] s;                      //
    -
    -      i->OStack.pop();
    -      i->OStack.push_move( t );
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      i->raiseerror( i->BadIOError ); // new style more throw like
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->StringStreamExpectedError );
    -  }
    -}
    -
    -#endif
    -
    -
    -/** @BeginDocumentation
    -  Name: print - Print object to a stream
    -
    -  Synopsis: ostream any <- -> ostream
    -
    -  Description: Alternatives: You can use <- (undocumented),
    -  which is the same as print.
    -
    -  Examples:
    -  cerr [1 2 3] print endl ; -> <arraytype>
    -
    -  Author: docu by Marc Oliver Gewaltig and Sirko Straube
    -
    -  SeeAlso: pprint, =, ==
    -*/
    -void
    -PrintFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  // call: ostream obj -> ostream
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  if ( not ostreamdatum )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  assert( ostreamdatum->valid() );
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    i->OStack.top()->print( **ostreamdatum );
    -
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -  Name: pprint - pretty print: Print object to a stream
    -
    -  Synopsis: ostream any <- -> ostream
    -
    -  Description: Alternatives: You can use <-- (undocumented),
    -  which is the same as pprint.
    -
    -  Examples:
    -  cerr [1 2 3] pprint endl ; -> [1 2 3]
    -
    -  Author: docu by Marc Oliver Gewaltig and Sirko Straube
    -
    -  SeeAlso: print, =, ==
    -*/
    -
    -void
    -PrettyprintFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream obj -> ostream
    -
    -  i->assert_stack_load( 2 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.pick( 1 );
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    i->OStack.top()->pprint( **ostreamdatum );
    -
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -  Name: flush - Force the buffer of a stream to be flushed.
    -  Synopsis: ostream flush -> ostream
    -*/
    -void
    -FlushFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  // call: ostream -> ostream
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->flush();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -  Name: endl - line break
    -
    -  Examples: Watch the difference:
    -  cerr (hello) print
    -  cerr (hello) print endl
    -
    -  Author: docu by Sirko Straube
    -
    -  SeeAlso: print, pprint, cout, cerr
    -*/
    -
    -void
    -EndlFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    **ostreamdatum << std::endl;
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -EndsFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.pick( 1 );
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    **ostreamdatum << ends;
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -EatwhiteFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *istreamdatum )->good() )
    -  {
    -    if ( not( *istreamdatum )->eof() )
    -    {
    -      ( **istreamdatum ) >> ws;
    -    }
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -
    -void
    -CloseistreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: istream -> -
    -
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( istreamdatum->get() != &std::cin )
    -  {
    -    istreamdatum->unlock();
    -
    -    // The following dynamic cast yields a seg-fault if
    -    // the datum conatains &std::cin !!
    -    ifdstream* ifs = dynamic_cast< ifdstream* >( istreamdatum->get() );
    -    istreamdatum->unlock();
    -    if ( ifs )
    -    {
    -      ifs->close();
    -      // iostreamhandle->destroy();
    -      i->OStack.pop();
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      i->raiseerror( i->ArgumentTypeError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -
    -void
    -CloseostreamFunction::execute( SLIInterpreter* i ) const
    -{
    -  // This function causes a segmentation fault on linux systems.
    -  // There the problem is that you cannot close an ofstream over
    -  // its base-class ostream pointer.
    -  // This applies to g++ 2.7.2.x
    -
    -  // call: ostream -> -
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not ostreamdatum )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ostreamdatum->get() != &std::cout )
    -  {
    -    ostreamdatum->unlock();
    -    // The following dynamic cast yields a seg-fault if
    -    // the datum conatains &std::cout !!
    -    ofdstream* ofs = dynamic_cast< ofdstream* >( ostreamdatum->get() );
    -    ostreamdatum->unlock();
    -
    -    if ( ofs )
    -    {
    -      ofs->close();
    -      i->OStack.pop();
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      i->raiseerror( i->ArgumentTypeError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -SetwFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostreamhandle num -> ostreamhandle
    -
    -  i->assert_stack_load( 2 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.pick( 1 );
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -
    -  if ( not id )
    -  {
    -    IntegerDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    **ostreamdatum << setw( id->get() );
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: setprecision - set precision for decimal place of a stream
    -
    -   Synopsis: ostream int setprecision -> ostream
    -
    -   Examples:
    -   cerr 3 setprecision 3.12345678901 pprint endl -> 3.123
    -   cerr 9 setprecision 3.12345678901 pprint endl -> 3.123456789
    -
    -   Author: docu by Sirko Straube
    -
    -   SeeAlso: cerr, endl, pprint
    -*/
    -
    -void
    -SetprecisionFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream num -> ostream
    -
    -  i->assert_stack_load( 2 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.pick( 1 );
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -
    -  if ( not id )
    -  {
    -    IntegerDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    **ostreamdatum << std::setprecision( id->get() );
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSFixedFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.pick( 1 );
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->setf( ios::fixed );
    -    ( *ostreamdatum )->unsetf( ios::scientific );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSScientificFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostreamhandle -> ostreamhandle
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->unsetf( ios::fixed );
    -    ( *ostreamdatum )->setf( ios::scientific );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSDefaultFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->unsetf( ios::fixed );
    -    ( *ostreamdatum )->unsetf( ios::scientific );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSShowpointFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->setf( ios::showpoint );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSNoshowpointFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->unsetf( ios::showpoint );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -
    -void
    -IOSOctFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    **ostreamdatum << oct;
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSHexFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    **ostreamdatum << hex;
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSDecFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    **ostreamdatum << dec;
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSShowbaseFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->setf( ios::showbase );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSNoshowbaseFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->unsetf( ios::showbase );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSLeftFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->setf( ios::left );
    -    ( *ostreamdatum )->unsetf( ios::right );
    -    ( *ostreamdatum )->unsetf( ios::internal );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSRightFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->unsetf( ios::left );
    -    ( *ostreamdatum )->setf( ios::right );
    -    ( *ostreamdatum )->unsetf( ios::internal );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -IOSInternalFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: ostream -> ostream
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    ( *ostreamdatum )->unsetf( ios::left );
    -    ( *ostreamdatum )->unsetf( ios::right );
    -    ( *ostreamdatum )->setf( ios::internal );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: getc - Read single character from input stream.
    -   Synopsis: istream getc -> istream integer
    -   Description: getc reads a single character from the
    -   supplied input stream. The character is
    -   returned as integer. The mapping between
    -   characters and its numerical value is
    -   determined by the C++ compiler.
    -   Diagnostics: Raises BadIOError
    -   SeeAlso: gets, getline
    -*/
    -
    -void
    -GetcFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: istream -> istream char
    -
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  char c;
    -  if ( ( *istreamdatum )->get( c ) )
    -  {
    -    Token int_token( new IntegerDatum( c ) );
    -
    -    i->OStack.push_move( int_token );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: gets - Read white space terminated string from stream
    -   Synopsis: istream gets -> istream string
    -   Description: gets reads a single string from the istream.
    -   The stream argument is not removed from the stack
    -   to support successive application of gets.
    -   Diagnostics: Raises BadIOError if the read was not successful.
    -   SeeAlso: getline, getc
    -*/
    -
    -void
    -GetsFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: istream -> istream string
    -
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  //    char buffer[256];
    -  string s;
    -
    -  if ( *( *istreamdatum ) >> s )
    -  {
    -    Token str_token( new StringDatum( s ) );
    -
    -    i->OStack.push_move( str_token );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -
    -void
    -GetlineFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: getline - Read a newline terminated string from an input stream.
    -     Synopsis: istreamhandle getline -> istreamhandle string true
    -     -> istreamhandle false
    -     Description: getline reads a line from the supplied stream.
    -     If the read process was successful, a result string and
    -     the boolean true are returned.
    -     If an error occured while reading from the stream, only the
    -     stream and boolean false is returned.
    -     Diagnostics: No errors are raised. If getline is applied to an
    -     invalid stream, the return value is false. The return value
    -     false indicates that the state of the stream is no longer
    -     "good".
    -
    -     Author: Diesmann & Gewaltig
    -     Remarks: commented 26.3.1999, Diesmann
    -     SeeAlso: getc, gets, file
    -  */
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *istreamdatum )->good() and not( *istreamdatum )->eof() )
    -  {
    -    string s;
    -    getline( **istreamdatum, s );
    -    if ( not( *istreamdatum )->good() )
    -    {
    -      i->OStack.push( false );
    -    }
    -    else
    -    {
    -      Token string_token( new StringDatum( s ) );
    -
    -      i->OStack.push_move( string_token );
    -      i->OStack.push( true );
    -    }
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -IGoodFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: igood - check the "good"-flag of a stream.
    -     Synopsis: istreamhandle igood -> istreamhandle true
    -     -> istreamhandle false
    -     Description:
    -     This function provides a direct interface to
    -     the C++ istream::good() member function.
    -     Parameters:
    -     Examples:
    -     Bugs:
    -     Author: Diesmann
    -     FirstVersion: 26.3.1999
    -     Remarks:
    -     SeeAlso: ogood, good
    -  */
    -
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *istreamdatum )->good() )
    -  {
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -IClearFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: iclear - Clear the state-flags of input stream.
    -     Synopsis: istream iclear -> istream
    -
    -     Description:
    -     This function provides a direct interface to
    -     the C++ istream::clear() member function.
    -
    -     Bugs:
    -     Author: Gewaltig
    -
    -     Remarks:
    -     SeeAlso: oclear, good
    -  */
    -
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  ( *istreamdatum )->clear();
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -OClearFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: oclear - Clear the state-flags of an output stream.
    -     Synopsis: ostream oclear -> ostream
    -
    -     Description:
    -     This function provides a direct interface to
    -     the C++ ostream::clear() member function.
    -
    -     Bugs:
    -     Author: Gewaltig
    -
    -     Remarks:
    -     SeeAlso: iclear, good
    -  */
    -
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  ( *ostreamdatum )->clear();
    -  i->EStack.pop();
    -}
    -
    -void
    -IFailFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: ifail - Check the "fail"-flag of an input stream.
    -     Synopsis: istreamhandle ifail -> istreamhandle true
    -     -> istreamhandle false
    -     Description:
    -     This function provides a direct interface to
    -     the C++ istream::fail() member function.
    -     If true, the next operation on the stream will fail.
    -     Parameters:
    -     Examples:
    -     Bugs:
    -     Author: Gewaltig
    -     FirstVersion: 21.5.1999
    -     Remarks:
    -     SeeAlso: ogood, good
    -  */
    -
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *istreamdatum )->fail() )
    -  {
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -OGoodFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: ogood - Check the "good"-flag of an output stream.
    -     Synopsis: ostreamhandle ogood -> ostreamhandle true
    -     -> ostreamhandle false
    -     Description:
    -     This function provides a direct interface to
    -     the C++ ostream::good() member function.
    -     Parameters:
    -     Examples:
    -     Bugs:
    -     Author: Diesmann
    -     FirstVersion: 26.3.1999
    -     Remarks:
    -     SeeAlso: igood, good
    -  */
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->good() )
    -  {
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -IEofFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: ieof - Check the "eof"-flag of an input stream.
    -     Synopsis: istreamhandle ieof -> istreamhandle true
    -     -> istreamhandle false
    -     Description:
    -     This function provides a direct interface to
    -     the C++ istream::eof() member function.
    -     Parameters:
    -     Examples:
    -     Bugs:
    -     Author: Diesmann, Hehl
    -     FirstVersion: 19.4.1999
    -     Remarks:
    -     SeeAlso: oeof, eof
    -  */
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *istreamdatum )->eof() )
    -  {
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -OEofFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: oeof - Check the "eof"-flag of an output stream.
    -     Synopsis: ostreamhandle oeof -> ostreamhandle true
    -     -> ostreamhandle false
    -     Description:
    -     This function provides a direct interface to
    -     the C++ ostream::eof() member function.
    -     Parameters:
    -     Examples:
    -     Bugs:
    -     Author: Diesmann, Hehl
    -     FirstVersion: 19.4.1999
    -     Remarks:
    -     SeeAlso: ieof, eof
    -  */
    -  i->assert_stack_load( 1 );
    -
    -  OstreamDatum* ostreamdatum = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not ostreamdatum or not ostreamdatum->valid() )
    -  {
    -    OstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( ( *ostreamdatum )->eof() )
    -  {
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -Cvx_fFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* sd = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -  if ( sd )
    -  {
    -    Token handle_token( new XIstreamDatum( *sd ) );
    -    i->OStack.pop();
    -
    -    i->OStack.push_move( handle_token );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -In_AvailFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: in_avail - Return the number of available in an input stream's
    -     buffer.
    -     Synopsis: istreamhandle in_avail -> istreamhandle available_characters
    -     Description:
    -     This function provides a direct interface to
    -     the C++ istream::rdbuf()->in_avail() member function.
    -     Author: R Kupper
    -     FirstVersion: May 05 1999
    -     SeeAlso:
    -  */
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  Token result_t( new IntegerDatum( ( *istreamdatum )->rdbuf()->in_avail() ) );
    -  i->OStack.push_move( result_t );
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -ReadDoubleFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: ReadDouble - Read a double number from an input stream.
    -     Synopsis: istream ReadDouble -> istream double true
    -     -> istream false
    -     SeeAlso: ReadInt, ReadWord
    -  */
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( istreamdatum->valid() )
    -  {
    -    double d;
    -    if ( *( *istreamdatum ) >> d )
    -    {
    -      Token result_t( new DoubleDatum( d ) );
    -      i->OStack.push_move( result_t );
    -      i->OStack.push( true );
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      i->OStack.push( false );
    -      i->EStack.pop();
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -void
    -ReadIntFunction::execute( SLIInterpreter* i ) const
    -{
    -  /** @BeginDocumentation
    -     Name: ReadInt - Read an integer number from an input stream.
    -     Synopsis: istream ReadInt -> istream int true
    -     -> istream false
    -     SeeAlso: ReadDouble, ReadWord
    -  */
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  if ( istreamdatum->valid() )
    -  {
    -    long val;
    -    if ( *( *istreamdatum ) >> val )
    -    {
    -      Token result_t( new IntegerDatum( val ) );
    -      i->OStack.push_move( result_t );
    -      i->OStack.push( true );
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      i->OStack.push( false );
    -      i->EStack.pop();
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->BadIOError );
    -  }
    -}
    -
    -
    -/** @BeginDocumentation
    -   Name: ReadWord - read white space terminated string from stream
    -   Synopsis: istream ReadWord -> istream string true
    -   -> istream false
    -   Description: ReadWord reads a single word from the istream.
    -   The stream argument is not removed from the stack
    -   to support successive application of gets.
    -   SeeAlso: getline, gets, getc, ReadInt, ReadDouble
    -*/
    -
    -void
    -ReadWordFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: istream -> istream string
    -
    -  i->assert_stack_load( 1 );
    -
    -  IstreamDatum* istreamdatum = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -
    -  if ( not istreamdatum or not istreamdatum->valid() )
    -  {
    -    IstreamDatum const d;
    -    Token t = i->OStack.top();
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -
    -  //    char buffer[256];
    -  string s;
    -
    -  if ( *( *istreamdatum ) >> s )
    -  {
    -    Token str_token( s );
    -
    -    i->OStack.push_move( str_token );
    -    i->OStack.push( true );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -    i->EStack.pop();
    -  }
    -}
    -
    -
    -const MathLinkPutStringFunction mathlinkputstringfunction;
    -
    -const XIfstreamFunction xifstreamfunction;
    -const IfstreamFunction ifstreamfunction;
    -const OfstreamFunction ofstreamfunction;
    -const OfsopenFunction ofsopenfunction;
    -const Cvx_fFunction cvx_ffunction;
    -
    -#ifdef HAVE_SSTREAM
    -const IsstreamFunction isstreamfunction;
    -const OsstreamFunction osstreamfunction;
    -
    -const StrSStreamFunction strsstreamfunction;
    -#else
    -const OstrstreamFunction ostrstreamfunction;
    -const StrFunction strfunction;
    -#endif
    -
    -const CloseistreamFunction closeistreamfunction;
    -const CloseostreamFunction closeostreamfunction;
    -const PrintFunction printfunction;
    -const PrettyprintFunction prettyprintfunction;
    -
    -const FlushFunction flushfunction;
    -const EndlFunction endlfunction;
    -const EndsFunction endsfunction;
    -const EatwhiteFunction eatwhitefunction;
    -const SetwFunction setwfunction;
    -const SetprecisionFunction setprecisionfunction;
    -const IOSScientificFunction iosscientificfunction;
    -const IOSFixedFunction iosfixedfunction;
    -const IOSDefaultFunction iosdefaultfunction;
    -const IOSShowpointFunction iosshowpointfunction;
    -const IOSNoshowpointFunction iosnoshowpointfunction;
    -
    -const IOSShowbaseFunction iosshowbasefunction;
    -const IOSNoshowbaseFunction iosnoshowbasefunction;
    -const IOSDecFunction iosdecfunction;
    -const IOSHexFunction ioshexfunction;
    -const IOSOctFunction iosoctfunction;
    -
    -const IOSLeftFunction iosleftfunction;
    -const IOSRightFunction iosrightfunction;
    -const IOSInternalFunction iosinternalfunction;
    -
    -const GetcFunction getcfunction;
    -const GetsFunction getsfunction;
    -const GetlineFunction getlinefunction;
    -
    -const OClearFunction oclearfunction;
    -const IClearFunction iclearfunction;
    -const IFailFunction ifailfunction;
    -const IGoodFunction igoodfunction;
    -const OGoodFunction ogoodfunction;
    -
    -const IEofFunction ieoffunction;
    -const OEofFunction oeoffunction;
    -
    -const In_AvailFunction in_availfunction;
    -
    -const ReadDoubleFunction readdoublefunction;
    -const ReadIntFunction readintfunction;
    -const ReadWordFunction readwordfunction;
    -// const ReadListFunction      readlistfunction;
    -
    -
    -void
    -init_sli_io( SLIInterpreter* i )
    -{
    -  // the following objects should be placed in the
    -  // ios dictionary.
    -  Token t_cin( new IstreamDatum( std::cin ) );
    -  Token t_cout( new OstreamDatum( std::cout ) );
    -  Token t_cerr( new OstreamDatum( std::cerr ) );
    -
    -  /** @BeginDocumentation
    -    Name: cin - Standard input stream
    -    Synopsis: cin -> istream
    -    Description: cin corresponds to the C++ object with the
    -    same name.
    -    SeeAlso: cout, cerr
    -  */
    -
    -  i->def_move( "cin", t_cin );
    -  /** @BeginDocumentation
    -    Name: cout - Standard output stream
    -    Synopsis: cout -> ostream
    -    Description: cout corresponds to the C++ object with the
    -    same name.
    -    SeeAlso: cin, cerr
    -  */
    -  i->def_move( "cout", t_cout );
    -  /** @BeginDocumentation
    -    Name: cerr - Standard error output stream
    -    Synopsis: cerr -> ostream
    -    Description: cerr corresponds to the C++ object with the
    -    same name.
    -    SeeAlso: cin, cout
    -  */
    -  i->def_move( "cerr", t_cerr );
    -
    -  // these objects belong to the system dictionary
    -
    -  i->createcommand( "MathLinkPutString", &mathlinkputstringfunction );
    -
    -  i->createcommand( "ifstream", &ifstreamfunction );
    -  i->createcommand( "xifstream", &xifstreamfunction );
    -  i->createcommand( "ofstream", &ofstreamfunction );
    -  i->createcommand( "ofsopen", &ofsopenfunction );
    -  i->createcommand( "cvx_f", &cvx_ffunction );
    -
    -#ifdef HAVE_SSTREAM
    -  i->createcommand( "isstream", &isstreamfunction );
    -  i->createcommand( "osstream", &osstreamfunction );
    -
    -  i->createcommand( "ostrstream", &osstreamfunction );
    -  i->createcommand( "str", &strsstreamfunction );
    -#else
    -  i->createcommand( "ostrstream", &ostrstreamfunction );
    -  i->createcommand( "str", &strfunction );
    -#endif
    -
    -
    -  i->createcommand( "closeistream", &closeistreamfunction );
    -  i->createcommand( "closeostream", &closeostreamfunction );
    -  i->createcommand( "<-", &printfunction );
    -  i->createcommand( "<--", &prettyprintfunction );
    -  i->createcommand( "print", &printfunction );
    -  i->createcommand( "pprint", &prettyprintfunction );
    -
    -  i->createcommand( "flush", &flushfunction );
    -  i->createcommand( "endl", &endlfunction );
    -  i->createcommand( "ends", &endsfunction );
    -  i->createcommand( "ws", &eatwhitefunction );
    -  i->createcommand( "setw", &setwfunction );
    -  i->createcommand( "setprecision", &setprecisionfunction );
    -  i->createcommand( "fixed", &iosfixedfunction );
    -  i->createcommand( "scientific", &iosscientificfunction );
    -  i->createcommand( "default", &iosdefaultfunction );
    -  i->createcommand( "showpoint", &iosshowpointfunction );
    -  i->createcommand( "noshowpoint", &iosnoshowpointfunction );
    -
    -  i->createcommand( "noshowbase", &iosnoshowbasefunction );
    -  i->createcommand( "showbase", &iosshowbasefunction );
    -  i->createcommand( "dec", &iosdecfunction );
    -  i->createcommand( "hex", &ioshexfunction );
    -  i->createcommand( "oct", &iosoctfunction );
    -  i->createcommand( "left", &iosleftfunction );
    -  i->createcommand( "right", &iosrightfunction );
    -  i->createcommand( "internal", &iosinternalfunction );
    -  i->createcommand( "getc", &getcfunction );
    -  i->createcommand( "gets", &getsfunction );
    -  i->createcommand( "getline_is", &getlinefunction );
    -  i->createcommand( "ifail", &ifailfunction );
    -  i->createcommand( "iclear", &iclearfunction );
    -  i->createcommand( "oclear", &oclearfunction );
    -  i->createcommand( "igood", &igoodfunction );
    -  i->createcommand( "ogood", &ogoodfunction );
    -  i->createcommand( "ieof", &ieoffunction );
    -  i->createcommand( "oeof", &oeoffunction );
    -  i->createcommand( "in_avail", &in_availfunction );
    -  i->createcommand( "ReadDouble", &readdoublefunction );
    -  i->createcommand( "ReadInt", &readintfunction );
    -  i->createcommand( "ReadWord", &readwordfunction );
    -  //    i->createcommand("ReadList",&readlistfunction);
    -}
    diff --git a/sli/sli_io.h b/sli/sli_io.h
    deleted file mode 100644
    index a7203dbf03..0000000000
    --- a/sli/sli_io.h
    +++ /dev/null
    @@ -1,474 +0,0 @@
    -/*
    - *  sli_io.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLI_IO_H
    -#define SLI_IO_H
    -/**************************************
    -  All SLI stream I/O functions are
    -  defined in this module.
    -  Functions related to the filesystem are located in
    -  filesystem.h
    -  *************************************/
    -
    -// Includes from sli:
    -#include "interpret.h"
    -
    -
    -void init_sli_io( SLIInterpreter* );
    -
    -class MathLinkPutStringFunction : public SLIFunction
    -{
    -public:
    -  MathLinkPutStringFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class XIfstreamFunction : public SLIFunction
    -{
    -public:
    -  XIfstreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IfstreamFunction : public SLIFunction
    -{
    -public:
    -  IfstreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OfstreamFunction : public SLIFunction
    -{
    -public:
    -  OfstreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OfsopenFunction : public SLIFunction
    -{
    -public:
    -  OfsopenFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -#ifdef HAVE_SSTREAM
    -
    -class IsstreamFunction : public SLIFunction
    -{
    -public:
    -  IsstreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OsstreamFunction : public SLIFunction
    -{
    -public:
    -  OsstreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class StrSStreamFunction : public SLIFunction
    -{
    -public:
    -  StrSStreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -#else
    -
    -class OstrstreamFunction : public SLIFunction
    -{
    -public:
    -  OstrstreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const;
    -};
    -
    -class StrFunction : public SLIFunction
    -{
    -public:
    -  StrFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const;
    -};
    -#endif
    -
    -class PrintFunction : public SLIFunction
    -{
    -public:
    -  PrintFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class PrettyprintFunction : public SLIFunction
    -{
    -public:
    -  PrettyprintFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CloseistreamFunction : public SLIFunction
    -{
    -public:
    -  CloseistreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CloseostreamFunction : public SLIFunction
    -{
    -public:
    -  CloseostreamFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class FlushFunction : public SLIFunction
    -{
    -public:
    -  FlushFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class EndlFunction : public SLIFunction
    -{
    -public:
    -  EndlFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class EndsFunction : public SLIFunction
    -{
    -public:
    -  EndsFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class EatwhiteFunction : public SLIFunction
    -{
    -public:
    -  EatwhiteFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class SetwFunction : public SLIFunction
    -{
    -public:
    -  SetwFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class SetprecisionFunction : public SLIFunction
    -{
    -public:
    -  SetprecisionFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSFixedFunction : public SLIFunction
    -{
    -public:
    -  IOSFixedFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSScientificFunction : public SLIFunction
    -{
    -public:
    -  IOSScientificFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSDefaultFunction : public SLIFunction
    -{
    -public:
    -  IOSDefaultFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSShowpointFunction : public SLIFunction
    -{
    -public:
    -  IOSShowpointFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSNoshowpointFunction : public SLIFunction
    -{
    -public:
    -  IOSNoshowpointFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSShowbaseFunction : public SLIFunction
    -{
    -public:
    -  IOSShowbaseFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSNoshowbaseFunction : public SLIFunction
    -{
    -public:
    -  IOSNoshowbaseFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSDecFunction : public SLIFunction
    -{
    -public:
    -  IOSDecFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSHexFunction : public SLIFunction
    -{
    -public:
    -  IOSHexFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSOctFunction : public SLIFunction
    -{
    -public:
    -  IOSOctFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSLeftFunction : public SLIFunction
    -{
    -public:
    -  IOSLeftFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSRightFunction : public SLIFunction
    -{
    -public:
    -  IOSRightFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IOSInternalFunction : public SLIFunction
    -{
    -public:
    -  IOSInternalFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class GetcFunction : public SLIFunction
    -{
    -public:
    -  GetcFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class GetsFunction : public SLIFunction
    -{
    -public:
    -  GetsFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class GetlineFunction : public SLIFunction
    -{
    -public:
    -  GetlineFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IGoodFunction : public SLIFunction
    -{
    -public:
    -  IGoodFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IClearFunction : public SLIFunction
    -{
    -public:
    -  IClearFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OClearFunction : public SLIFunction
    -{
    -public:
    -  OClearFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IFailFunction : public SLIFunction
    -{
    -public:
    -  IFailFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OGoodFunction : public SLIFunction
    -{
    -public:
    -  OGoodFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cvx_fFunction : public SLIFunction
    -{
    -public:
    -  Cvx_fFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IEofFunction : public SLIFunction
    -{
    -public:
    -  IEofFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OEofFunction : public SLIFunction
    -{
    -public:
    -  OEofFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class In_AvailFunction : public SLIFunction
    -{
    -public:
    -  In_AvailFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ReadDoubleFunction : public SLIFunction
    -{
    -public:
    -  ReadDoubleFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ReadIntFunction : public SLIFunction
    -{
    -public:
    -  ReadIntFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ReadWordFunction : public SLIFunction
    -{
    -public:
    -  ReadWordFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -#endif
    diff --git a/sli/sliactions.cc b/sli/sliactions.cc
    deleted file mode 100644
    index 3e32e572e4..0000000000
    --- a/sli/sliactions.cc
    +++ /dev/null
    @@ -1,147 +0,0 @@
    -/*
    - *  sliactions.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    Actions associated with SLI types.
    -*/
    -
    -#include "sliactions.h"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "callbackdatum.h"
    -#include "dictstack.h"
    -#include "functiondatum.h"
    -#include "integerdatum.h"
    -#include "interpret.h"
    -#include "namedatum.h"
    -#include "triedatum.h"
    -
    -#define SLIDEBUG 1
    -#undef SLIDEBUG
    -// DatatypeFunction: For all 'ordinary' data objects which end up on
    -// the operand stack
    -void
    -DatatypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->OStack.push_move( i->EStack.top() );
    -  i->EStack.pop();
    -}
    -
    -void
    -NametypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.top() = i->lookup2( *static_cast< NameDatum* >( i->EStack.top().datum() ) );
    -}
    -
    -void
    -ProceduretypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  // we locally cache the pointer to iiterate, so that
    -  // wen don't have to look it up each time.
    -  static Token iiterate( i->Iiterate() );
    -
    -  i->code_accessed += ( static_cast< ProcedureDatum* >( i->EStack.top().datum() ) )->size();
    -
    -  i->EStack.push_by_pointer( new IntegerDatum( 0 ) );
    -  i->EStack.push_by_ref( iiterate );
    -  i->inc_call_depth();
    -}
    -
    -void
    -LitproceduretypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  // Literal procedures are procedures which come straight from the
    -  // parser. In this state they must not be executed, but must instead be
    -  // moved to the operand stack. After this, the literal procedure becomes
    -  // an executable procedure and will be treated as such.
    -
    -  LitprocedureDatum* lpd = static_cast< LitprocedureDatum* >( i->EStack.top().datum() );
    -  i->OStack.push_by_pointer( new ProcedureDatum( *lpd ) ); //
    -  i->EStack.pop();
    -}
    -
    -void
    -FunctiontypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  FunctionDatum* fd = static_cast< FunctionDatum* >( i->EStack.top().datum() );
    -
    -  if ( i->step_mode() )
    -  {
    -    std::cerr << "Calling builtin function: ";
    -    if ( fd )
    -    {
    -      fd->pprint( std::cerr );
    -    }
    -    else
    -    {
    -      std::cerr << "NULL" << std::endl;
    -      i->EStack.pop();
    -      return;
    -    }
    -  }
    -
    -  fd->execute( i );
    -}
    -
    -void
    -TrietypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  TrieDatum* tried = static_cast< TrieDatum* >( i->EStack.top().datum() );
    -  i->EStack.top().assign_by_ref( tried->lookup( i->OStack ) );
    -}
    -
    -void
    -CallbacktypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  CallbackDatum* cb = static_cast< CallbackDatum* >( i->ct.datum() );
    -
    -  // Note, although cb is a pointer to a class derived from Datum,
    -  // it also has the properties of a token, since it is derived from both.
    -
    -  i->EStack.push_move( i->ct );
    -  // This moves the complete callback datum to the EStack.
    -  // Now, the pointer in ct is set to nullptr !!
    -
    -  // Now push command to restore the callback, once the action has
    -  // been finished
    -  i->EStack.push( i->baselookup( i->isetcallback_name ) );
    -  i->EStack.push( *( cb->get() ) );
    -}
    -
    -void
    -XIstreamtypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  // The EStack contains an open ifstream object,
    -  // which can be executed by calling
    -  // ::parse
    -  i->EStack.push( i->baselookup( i->iparse_name ) );
    -}
    -
    -void
    -XIfstreamtypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  // The EStack contains an open ifstream object,
    -  // which can be executed by calling
    -  // ::parse
    -  i->EStack.push( i->baselookup( i->iparse_name ) );
    -}
    diff --git a/sli/sliactions.h b/sli/sliactions.h
    deleted file mode 100644
    index 6267f6a7c5..0000000000
    --- a/sli/sliactions.h
    +++ /dev/null
    @@ -1,113 +0,0 @@
    -/*
    - *  sliactions.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef __DEFAULTACTIONS
    -#define __DEFAULTACTIONS
    -/*
    -    Actions associated with SLI types.
    -*/
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -
    -class DatatypeFunction : public SLIFunction
    -{
    -public:
    -  DatatypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class NametypeFunction : public SLIFunction
    -{
    -public:
    -  NametypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ProceduretypeFunction : public SLIFunction
    -{
    -public:
    -  ProceduretypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class LitproceduretypeFunction : public SLIFunction
    -{
    -public:
    -  LitproceduretypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class FunctiontypeFunction : public SLIFunction
    -{
    -public:
    -  FunctiontypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CallbacktypeFunction : public SLIFunction
    -{
    -public:
    -  CallbacktypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class XIstreamtypeFunction : public SLIFunction
    -{
    -public:
    -  XIstreamtypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class XIfstreamtypeFunction : public SLIFunction
    -{
    -public:
    -  XIfstreamtypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class TrietypeFunction : public SLIFunction
    -{
    -public:
    -  TrietypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -#endif
    diff --git a/sli/sliarray.cc b/sli/sliarray.cc
    deleted file mode 100644
    index 6561321c52..0000000000
    --- a/sli/sliarray.cc
    +++ /dev/null
    @@ -1,4249 +0,0 @@
    -/*
    - *  sliarray.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    SLI's data access functions
    -*/
    -
    -#include "sliarray.h"
    -
    -// C++ includes:
    -#include <cmath>
    -#include <vector>
    -
    -// Includes from libnestutil:
    -#include "numerics.h"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "namedatum.h"
    -#include "slinames.h"
    -#include "stringdatum.h"
    -#include "tokenutils.h"
    -
    -const std::string
    -SLIArrayModule::commandstring() const
    -{
    -  return std::string( "(mathematica) run (arraylib) run" );
    -}
    -
    -const std::string
    -SLIArrayModule::name() const
    -{
    -  return std::string( "SLI Array Module" );
    -}
    -
    -void
    -SLIArrayModule::RangeFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array Range -> array
    -
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( ad );
    -  if ( ad->size() == 1 ) // Construct an array of elements 1 ... N
    -  {
    -    IntegerDatum* nd = dynamic_cast< IntegerDatum* >( ad->get( 0 ).datum() );
    -    if ( nd )
    -    {
    -      long n = nd->get();
    -      ad->erase();
    -      if ( n > 0 )
    -      {
    -        ad->reserve( n );
    -        for ( long j = 1; j <= n; ++j )
    -        {
    -          Token it( new IntegerDatum( j ) );
    -          ad->push_back_move( it );
    -        }
    -      }
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      double d = ad->get( 0 );
    -      ad->erase();
    -      long n = ( long ) std::floor( d );
    -      if ( n > 0 )
    -      {
    -        ad->reserve( n );
    -        for ( long j = 1; j <= n; ++j )
    -        {
    -          ad->push_back( ( double ) j );
    -        }
    -      }
    -      i->EStack.pop();
    -    }
    -  }
    -  else if ( ad->size() == 2 ) // [n1 n2]
    -  {
    -    IntegerDatum* n1d = dynamic_cast< IntegerDatum* >( ad->get( 0 ).datum() );
    -    IntegerDatum* n2d = dynamic_cast< IntegerDatum* >( ad->get( 1 ).datum() );
    -    if ( n1d and n2d )
    -    {
    -      long n = 1 + n2d->get() - n1d->get();
    -
    -      long start = n1d->get();
    -      long stop = n2d->get();
    -
    -      ad->erase();
    -      if ( n > 0 )
    -      {
    -        ad->reserve( n );
    -      }
    -
    -      for ( long j = start; j <= stop; ++j )
    -      {
    -        Token it( new IntegerDatum( j ) );
    -        ad->push_back_move( it );
    -      }
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      DoubleDatum* n1d = dynamic_cast< DoubleDatum* >( ad->get( 0 ).datum() );
    -      DoubleDatum* n2d = dynamic_cast< DoubleDatum* >( ad->get( 1 ).datum() );
    -      if ( n1d and n2d )
    -      {
    -        long n = 1 + static_cast< long >( n2d->get() - n1d->get() );
    -
    -        double start = n1d->get();
    -        double stop = n2d->get();
    -
    -        ad->erase();
    -        if ( n > 0 )
    -        {
    -          ad->reserve( n );
    -        }
    -
    -        for ( double j = start; j <= stop; ++j )
    -        {
    -          Token it( new DoubleDatum( j ) );
    -          ad->push_back_move( it );
    -        }
    -        i->EStack.pop();
    -      }
    -      else
    -      {
    -        i->raiseerror( i->ArgumentTypeError );
    -      }
    -    }
    -  }
    -  else if ( ad->size() == 3 ) // [n1 n2 dn]
    -  {
    -    IntegerDatum* n1d = dynamic_cast< IntegerDatum* >( ad->get( 0 ).datum() );
    -    IntegerDatum* n2d = dynamic_cast< IntegerDatum* >( ad->get( 1 ).datum() );
    -    IntegerDatum* n3d = dynamic_cast< IntegerDatum* >( ad->get( 2 ).datum() );
    -    if ( n1d and n2d and n3d )
    -    {
    -      long di = n3d->get();
    -      long start = n1d->get();
    -      long stop = n2d->get();
    -      if ( di != 0 )
    -      {
    -        long n = 1 + ( stop - start ) / di;
    -        ad->erase();
    -        if ( n > 0 )
    -        {
    -          ad->reserve( n );
    -          long s = start;
    -          for ( long j = 0; j < n; ++j, s += di )
    -          {
    -            Token it( new IntegerDatum( s ) );
    -            ad->push_back_move( it );
    -          }
    -        }
    -        i->EStack.pop();
    -      }
    -      else
    -      {
    -        i->raiseerror( i->DivisionByZeroError );
    -      }
    -    }
    -    else
    -    {
    -      DoubleDatum* n1d = dynamic_cast< DoubleDatum* >( ad->get( 0 ).datum() );
    -      DoubleDatum* n2d = dynamic_cast< DoubleDatum* >( ad->get( 1 ).datum() );
    -      DoubleDatum* n3d = dynamic_cast< DoubleDatum* >( ad->get( 2 ).datum() );
    -      if ( n1d and n2d and n3d )
    -      {
    -        double di = n3d->get();
    -        double start = n1d->get();
    -        double stop = n2d->get();
    -
    -        if ( di != 0 )
    -        {
    -          long n = 1 + static_cast< long >( ( stop - start ) / di );
    -          ad->erase();
    -          if ( n > 0 )
    -          {
    -            ad->reserve( n );
    -            for ( long j = 0; j < n; ++j )
    -            {
    -              Token it( new DoubleDatum( start + j * di ) );
    -              ad->push_back_move( it );
    -            }
    -          }
    -          i->EStack.pop();
    -        }
    -        else
    -        {
    -          i->raiseerror( i->DivisionByZeroError );
    -        }
    -      }
    -      else
    -      {
    -        i->raiseerror( i->ArgumentTypeError );
    -      }
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -  }
    -}
    -
    -
    -void
    -SLIArrayModule::ArangeFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array arange -> vector
    -
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( ad );
    -  if ( ad->size() == 1 ) // Construct an array of elements 1 ... N
    -  {
    -    IntegerDatum* nd = dynamic_cast< IntegerDatum* >( ad->get( 0 ).datum() );
    -    if ( nd )
    -    {
    -      long n = nd->get();
    -      if ( n < 0 )
    -      {
    -        i->raiseerror( "RangeCheck" );
    -        return;
    -      }
    -      IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( n ) );
    -      for ( long j = 0; j < n; ++j )
    -      {
    -        ( **result )[ j ] = j + 1;
    -      }
    -      i->EStack.pop();
    -      i->OStack.pop();
    -      i->OStack.push( result );
    -      return;
    -    }
    -    else
    -    {
    -      double d = ad->get( 0 );
    -      long n = ( long ) std::floor( d );
    -      if ( n < 0 )
    -      {
    -        i->raiseerror( "RangeCheck" );
    -        return;
    -      }
    -      DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( n ) );
    -      for ( long j = 0; j < n; ++j )
    -      {
    -        ( **result )[ j ] = 1.0 + j;
    -      }
    -      i->EStack.pop();
    -      i->OStack.pop();
    -      i->OStack.push( result );
    -      return;
    -    }
    -  }
    -  else if ( ad->size() == 2 ) // [n1 n2]
    -  {
    -    IntegerDatum* n1d = dynamic_cast< IntegerDatum* >( ad->get( 0 ).datum() );
    -    IntegerDatum* n2d = dynamic_cast< IntegerDatum* >( ad->get( 1 ).datum() );
    -    if ( n1d and n2d )
    -    {
    -      const long start = n1d->get();
    -      const long stop = n2d->get();
    -      long n = 1 + stop - start;
    -      if ( n < 0 )
    -      {
    -        n = 0;
    -      }
    -      IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( n ) );
    -
    -      for ( long j = 0, val = start; j < n; ++j, ++val )
    -      {
    -        ( **result )[ j ] = val;
    -      }
    -      i->EStack.pop();
    -      i->OStack.pop();
    -      i->OStack.push( result );
    -      return;
    -    }
    -    else
    -    {
    -      DoubleDatum* n1d = dynamic_cast< DoubleDatum* >( ad->get( 0 ).datum() );
    -      DoubleDatum* n2d = dynamic_cast< DoubleDatum* >( ad->get( 1 ).datum() );
    -      if ( n1d and n2d )
    -      {
    -        double start = n1d->get();
    -        double stop = n2d->get();
    -        long n = 1 + static_cast< long >( stop - start );
    -        if ( n < 0 )
    -        {
    -          n = 0;
    -        }
    -
    -        DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( n ) );
    -        double val = start;
    -        for ( long j = 0; j < n; ++j, ++val )
    -        {
    -          ( **result )[ j ] = val;
    -        }
    -        i->EStack.pop();
    -        i->OStack.pop();
    -        i->OStack.push( result );
    -        return;
    -      }
    -    }
    -  }
    -  else if ( ad->size() == 3 ) // [n1 n2 dn]
    -  {
    -    IntegerDatum* n1d = dynamic_cast< IntegerDatum* >( ad->get( 0 ).datum() );
    -    IntegerDatum* n2d = dynamic_cast< IntegerDatum* >( ad->get( 1 ).datum() );
    -    IntegerDatum* n3d = dynamic_cast< IntegerDatum* >( ad->get( 2 ).datum() );
    -    if ( n1d and n2d and n3d )
    -    {
    -      long di = n3d->get();
    -      long start = n1d->get();
    -      long stop = n2d->get();
    -      if ( di != 0 )
    -      {
    -        long n = 1 + ( stop - start ) / di;
    -        if ( n < 0 )
    -        {
    -          i->raiseerror( "RangeCheck" );
    -          return;
    -        }
    -        IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( n ) );
    -        long s = start;
    -        for ( long j = 0; j < n; ++j, s += di )
    -        {
    -          ( **result )[ j ] = s;
    -        }
    -        i->EStack.pop();
    -        i->OStack.pop();
    -        i->OStack.push( result );
    -        return;
    -      }
    -      else
    -      {
    -        i->raiseerror( i->DivisionByZeroError );
    -      }
    -    }
    -    else
    -    {
    -      DoubleDatum* n1d = dynamic_cast< DoubleDatum* >( ad->get( 0 ).datum() );
    -      DoubleDatum* n2d = dynamic_cast< DoubleDatum* >( ad->get( 1 ).datum() );
    -      DoubleDatum* n3d = dynamic_cast< DoubleDatum* >( ad->get( 2 ).datum() );
    -      if ( n1d and n2d and n3d )
    -      {
    -        double di = n3d->get();
    -        double start = n1d->get();
    -        double stop = n2d->get();
    -
    -        if ( di != 0 )
    -        {
    -          long n = 1 + static_cast< long >( ( stop - start ) / di );
    -          if ( n < 0 )
    -          {
    -            i->raiseerror( "RangeCheck" );
    -            return;
    -          }
    -          DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( n ) );
    -          for ( long j = 0; j < n; ++j )
    -          {
    -            ( **result )[ j ] = ( start + j * di );
    -          }
    -          i->EStack.pop();
    -          i->OStack.pop();
    -          i->OStack.push( result );
    -          return;
    -        }
    -        else
    -        {
    -          i->raiseerror( i->DivisionByZeroError );
    -        }
    -      }
    -      else
    -      {
    -        i->raiseerror( i->ArgumentTypeError );
    -      }
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -  }
    -}
    -
    -
    -void
    -SLIArrayModule::ReverseFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array reverse -> t1 ... tn n
    -  i->assert_stack_load( 1 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( ad );
    -  ad->reverse();
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::RotateFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  const long n = getValue< long >( i->OStack.pick( 0 ) );
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  ad->rotate( n );
    -
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::FlattenFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array Flatten -> array
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( ad );
    -  ArrayDatum* ta = new ArrayDatum();
    -  Token at( ta );
    -
    -  size_t size = 0;
    -
    -  // Estimate size of the final array, by iterating all elements
    -  for ( Token const* t = ad->begin(); t != ad->end(); ++t )
    -  {
    -    ArrayDatum* ad1 = dynamic_cast< ArrayDatum* >( t->datum() );
    -    if ( ad1 )
    -    {
    -      size += ad1->size();
    -    }
    -    else
    -    {
    -      ++size;
    -    }
    -  }
    -  ta->reserve( size );
    -
    -  /* Optimized flattening:
    -     We iterate the source array and copy/move all elements to the target
    -     array. If the source array has only one reference, we may move the
    -     elements. However, nested arrays may have more than one reference,
    -     even if the outer array has only one. Here, we need an additional
    -     check to decide whether we copy or move the array.
    -  */
    -  if ( ad->references() == 1 )
    -  {
    -    for ( Token* t = ad->begin(); t != ad->end(); ++t )
    -    {
    -      ArrayDatum* ad1 = dynamic_cast< ArrayDatum* >( t->datum() );
    -      if ( ad1 )
    -      {
    -        if ( ad1->references() > 1 )
    -        {
    -          for ( Token* t1 = ad1->begin(); t1 != ad1->end(); ++t1 )
    -          {
    -            ta->push_back( *t1 );
    -          }
    -        }
    -        else
    -        {
    -          for ( Token* t1 = ad1->begin(); t1 != ad1->end(); ++t1 )
    -          {
    -            ta->push_back_move( *t1 );
    -          }
    -        }
    -      }
    -      else
    -      {
    -        ta->push_back_move( *t );
    -      }
    -    }
    -  }
    -  else
    -  {
    -    for ( Token const* t = ad->begin(); t != ad->end(); ++t )
    -    {
    -      ArrayDatum* ad1 = dynamic_cast< ArrayDatum* >( t->datum() );
    -      if ( ad1 )
    -      {
    -        for ( Token const* t1 = ad1->begin(); t1 != ad1->end(); ++t1 )
    -        {
    -          ta->push_back( *t1 );
    -        }
    -      }
    -      else
    -      {
    -        ta->push_back( *t );
    -      }
    -    }
    -  }
    -
    -  i->OStack.pop();
    -  i->OStack.push_move( at );
    -
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: Sort - Sorts a homogeneous array of doubles, ints, or strings.
    -
    -Synopsis:
    - array Sort -> array
    -
    -Parameters:
    - array of doubles, ints, or strings
    -
    -Description:
    - The present implementation is restricted to doubles, ints, and strings.
    -
    -Examples:
    - [8. 4. 3. 6. 9. 5.] Sort --> [3. 4. 5. 6. 8. 9.]
    -
    -Author: Diesmann, Eppler
    -
    -SeeAlso: Max, Min
    -*/
    -void
    -SLIArrayModule::SortFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  TokenArray td = getValue< TokenArray >( i->OStack.top() );
    -
    -  try
    -  {
    -    std::vector< long > vd;
    -    td.toVector( vd );
    -    std::sort( vd.begin(), vd.end() );
    -    i->OStack.pop();
    -    i->OStack.push( new ArrayDatum( vd ) );
    -    i->EStack.pop();
    -    return;
    -  }
    -  catch ( TypeMismatch& )
    -  {
    -    // do nothing
    -  }
    -
    -  try
    -  {
    -    std::vector< double > vd;
    -    td.toVector( vd );
    -    std::sort( vd.begin(), vd.end() );
    -    i->OStack.pop();
    -    i->OStack.push( new ArrayDatum( vd ) );
    -    i->EStack.pop();
    -    return;
    -  }
    -  catch ( TypeMismatch& )
    -  {
    -    // do nothing
    -  }
    -
    -  try
    -  {
    -    std::vector< std::string > vd;
    -    td.toVector( vd );
    -    std::sort( vd.begin(), vd.end() );
    -    i->OStack.pop();
    -    ArrayDatum* output = new ArrayDatum;
    -    for ( size_t c = 0; c < vd.size(); ++c )
    -    {
    -      StringDatum* sd = new StringDatum( vd[ c ] );
    -      output->push_back( Token( sd ) );
    -    }
    -    i->OStack.push( output );
    -    i->EStack.pop();
    -    return;
    -  }
    -  catch ( TypeMismatch& )
    -  {
    -    // do nothing
    -  }
    -
    -  i->message( SLIInterpreter::M_ERROR, "Sort", "argument array may only contain doubles, ints, or strings" );
    -  i->raiseerror( i->ArgumentTypeError );
    -}
    -
    -
    -/** @BeginDocumentation
    -   Name: Transpose - Transposes the first two levels of its argument
    -
    -   Synopsis:
    -      array Transpose -> array
    -
    -   Description:
    -     Transpose gives the usual transpose of a matrix.
    -     Acting on a tensor Tijkl... Transpose gives the tensor Tjikl...
    -
    -   Parameters:
    -
    -   Examples:
    -     [ [3 4 5] [6 7 8] ] Transpose  -> [[3 6] [4 7] [5 8]]
    -
    -   Bugs:
    -     protected for non-rectangular shapes by assert().
    -     Transpose should raise
    -       /NonRectangularShapeError error
    -     and message
    -      "The first two levels of the one-dimensional list cannot be transposed."
    -
    -   Author: Markus Diesmann, July 9, 2000
    -
    -   FirstVersion: June, 2000
    -
    -   References:   [1] The Mathematica Book V4.0 "Transpose"
    -
    -   SeeAlso: Flatten, Partition
    -
    -*/
    -void
    -SLIArrayModule::TransposeFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array Transpose -> array
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* sd = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -
    -  ArrayDatum* hd = dynamic_cast< ArrayDatum* >( sd->begin()->datum() );
    -  assert( hd );
    -
    -  // size of source first level
    -  size_t m = sd->size();
    -
    -  // size of source second level
    -  size_t n = hd->size();
    -
    -  //   std::cerr << "Transpose:: rows:    " << m << std::endl;
    -  //  std::cerr << "Transpose:: columns: " << n << std::endl;
    -
    -
    -  ArrayDatum* td = new ArrayDatum();
    -  assert( td );
    -
    -  Token tt( td );
    -
    -  td->reserve( n );
    -
    -  // check if correct for empty arrays
    -
    -  for ( size_t j = 0; j < n; j++ )
    -  {
    -    hd = new ArrayDatum();
    -    assert( td );
    -
    -    hd->reserve( m );
    -
    -    td->push_back( Token( hd ) );
    -  }
    -
    -  for ( Token* sr = sd->begin(); sr != sd->end(); ++sr )
    -  {
    -    hd = dynamic_cast< ArrayDatum* >( sr->datum() );
    -
    -    // raiseerror instead
    -    assert( hd );
    -
    -    Token* sc;
    -    Token* tr;
    -
    -    for ( sc = hd->begin(), tr = td->begin(); sc != hd->end(); ++sc, ++tr )
    -    {
    -
    -      ArrayDatum* trd = dynamic_cast< ArrayDatum* >( tr->datum() );
    -
    -      // raiseerror instead
    -      assert( trd );
    -
    -      trd->push_back( *sc );
    -    }
    -  }
    -
    -
    -  i->OStack.pop();
    -  i->OStack.push_move( tt );
    -
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -SLIArrayModule::PartitionFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array n d Partition -> array
    -  assert( i->OStack.load() > 2 );
    -
    -  IntegerDatum* dd = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( dd );
    -  IntegerDatum* nd = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( nd );
    -  ArrayDatum* source = dynamic_cast< ArrayDatum* >( i->OStack.pick( 2 ).datum() );
    -  assert( source );
    -  ArrayDatum* target = new ArrayDatum;
    -
    -  long n = nd->get();
    -  long d = dd->get();
    -
    -  if ( n > 0 )
    -  {
    -    if ( d > 0 )
    -    {
    -      size_t na = source->size();
    -      if ( na > 0 )
    -      {
    -        long max = ( na - n + d ) / d;
    -
    -        target->reserve( ( max > 0 ) ? max : 0 );
    -        Token* b = source->begin();
    -        Token* e = source->end();
    -
    -        for ( Token* pt = b; pt < e - n + 1; pt += d )
    -        {
    -          ArrayDatum* ad = new ArrayDatum;
    -          ad->reserve( n );
    -          for ( long i = 0; i < n; ++i )
    -          {
    -            assert( pt + i < e );
    -            ad->push_back( *( pt + i ) );
    -          }
    -          target->push_back( ad );
    -        }
    -      }
    -      // need to pop ourselves, arguments, push (empty) target
    -      // even if argument array was empty --- HEP 2001-10-22
    -      i->EStack.pop();
    -      i->OStack.pop( 3 );
    -      i->OStack.push( target );
    -    }
    -    else
    -    {
    -      i->raiseerror( "RangeError" );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( "RangeError" );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: arrayload - pushes array elements followed by number of elements
    -
    -   Synopsis:
    -      array Transpose ->  array arrayload -> t1 ... tn n
    -
    -   Description:
    -    The stack is invariant under the sequences
    -       arrayload arraystore
    -       arraystore arrayload  .
    -    arrayload is the SLI version of PostScript operator aload.
    -    In contrast to PostScript SLI arrays are dynamic therefore
    -    the syntax of aload and astore is obsolete in SLI.
    -    If used aload and astore issue a warning message.
    -
    -   Examples:
    -        [ 5 4 2 ] arrayload  --> 5 4 2   3
    -
    -   Author: Marc-Oliver Gewaltig, Markus Diesmann
    -
    -   Remarks: There are two obsolete versions existing called aload and astore.
    -
    -   SeeAlso: arraystore
    -*/
    -void
    -SLIArrayModule::ArrayloadFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array arrayload -> t1 ... tn n
    -  assert( i->OStack.load() > 0 );
    -
    -  Token at;
    -  at.move( i->OStack.top() );
    -  i->OStack.pop();
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( at.datum() );
    -  assert( ad );
    -  i->EStack.pop();
    -  int arraysize = ad->size();
    -  i->OStack.reserve_token( arraysize );
    -
    -  if ( ad->references() == 1 )
    -  {
    -    for ( Token* ti = ad->begin(); ti != ad->end(); ++ti )
    -    {
    -      i->OStack.push_move( *ti );
    -    }
    -  }
    -  else
    -  {
    -    for ( Token* ti = ad->begin(); ti != ad->end(); ++ti )
    -    {
    -      i->OStack.push( *ti );
    -    }
    -  }
    -
    -  i->OStack.push( arraysize );
    -}
    -
    -/** @BeginDocumentation
    -   Name: arraystore - pops the first n elements of the stack into an array
    -
    -   Synopsis:
    -     t1 ... tn n  arraystore -->  array
    -
    -   Description:
    -    The stack is invariant under the sequences
    -       arrayload arraystore
    -       arraystore arrayload  .
    -    arraystore is the SLI version of PostScript operator astore.
    -    In contrast to PostScript SLI arrays are dynamic therefore
    -    the syntax of aload and astore is obsolete in SLI.
    -    If used aload and astore issue a warning message.
    -
    -   Parameters:
    -
    -   Examples:
    -      5 4 2   3  arraystore  -->   [ 5 4 2 ]
    -
    -   Author: Marc-Oliver Gewaltig, Markus Diesmann
    -
    -   Remarks: There are two obsolete versions existing called aload and astore.
    -
    -   SeeAlso: arrayload
    -*/
    -void
    -SLIArrayModule::ArraystoreFunction::execute( SLIInterpreter* i ) const
    -{
    -  // we only require n here, further underflow handled below
    -  i->assert_stack_load( 1 );
    -
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( id );
    -
    -  long n = id->get();
    -  if ( n >= 0 )
    -  {
    -    if ( i->OStack.load() > static_cast< size_t >( n ) )
    -    {
    -      i->OStack.pop();
    -      ArrayDatum* ad = new ArrayDatum();
    -      ad->reserve( n );
    -      Token at( ad );
    -      for ( long j = 1; j <= n; ++j )
    -      {
    -        ad->push_back_move( i->OStack.pick( n - j ) );
    -      }
    -      i->OStack.pop( n );
    -      i->OStack.push_move( at );
    -      i->EStack.pop();
    -    }
    -    else
    -    {
    -      i->raiseerror( i->StackUnderflowError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -SLIArrayModule::ArraycreateFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: mark t1 ... tn  arraycreate -> array
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "arraycreate", "Opening bracket missing." );
    -    i->raiseerror( "SyntaxError" );
    -    return;
    -  }
    -
    -  size_t depth = i->OStack.load();
    -  size_t n = 0;
    -  const Token mark_token( new LiteralDatum( i->mark_name ) );
    -  bool found = false;
    -
    -  while ( n < depth and not found )
    -  {
    -    found = ( i->OStack.pick( n ) == mark_token );
    -    ++n;
    -  }
    -
    -  if ( found )
    -  {
    -    ArrayDatum* ad = new ArrayDatum();
    -    ad->reserve( n - 1 );
    -    Token at( ad );
    -    for ( size_t j = 2; j <= n; ++j )
    -    {
    -      ad->push_back_move( i->OStack.pick( n - j ) );
    -    }
    -    i->OStack.pop( n );
    -    i->OStack.push_move( at );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "arraycreate", "Opening bracket missing." );
    -    i->raiseerror( "SyntaxError" );
    -    return;
    -  }
    -}
    -
    -void
    -SLIArrayModule::IMapFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* id = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( id );
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( count );
    -
    -  ProcedureDatum const* pd = static_cast< ProcedureDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( pd );
    -
    -  std::cerr << "During Map at iteration " << count->get() << "." << std::endl;
    -
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -/**********************************************/
    -/* % IMap                                     */
    -/*  call: array mark procc count proc %map   */
    -/*  pick   5     4    3     2    1      0     */
    -/**********************************************/
    -void
    -SLIArrayModule::IMapFunction::execute( SLIInterpreter* i ) const
    -{
    -  ProcedureDatum* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 1 ).datum() );
    -  size_t proclimit = proc->size();
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -  size_t iterator = count->get();
    -  IntegerDatum* procc = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -  size_t pos = procc->get();
    -  ArrayDatum* array = static_cast< ArrayDatum* >( i->EStack.pick( 5 ).datum() );
    -  size_t limit = array->size();
    -
    -  // Do we  start a new iteration ?
    -  if ( pos == 0 )
    -  {
    -    if ( iterator < limit ) // Is Iteration is still running
    -    {
    -      if ( iterator > 0 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->dec_call_depth();
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        array->assign_move( iterator - 1, i->OStack.top() );
    -        i->OStack.pop();
    -      }
    -
    -      i->OStack.push( array->get( iterator ) ); // push element to user
    -      if ( i->step_mode() )
    -      {
    -        std::cerr << "Map:"
    -                  << " Limit: " << limit << " Pos: " << iterator << " Iterator: ";
    -        i->OStack.pick( 0 ).pprint( std::cerr );
    -        std::cerr << std::endl;
    -      }
    -
    -      ++( count->get() );
    -      // We continue after this if-branch and do the commands
    -    }
    -    else
    -    {
    -      if ( iterator > 0 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        array->assign_move( iterator - 1, i->OStack.top() );
    -        i->OStack.pop();
    -      }
    -      i->OStack.push_move( i->EStack.pick( 5 ) ); // push array
    -      i->EStack.pop( 6 );
    -      i->dec_call_depth();
    -      return;
    -    }
    -  }
    -
    -  if ( ( size_t ) procc->get() < proclimit )
    -  {
    -    /* we are still evaluating the procedure. */
    -    i->EStack.push( proc->get( pos ) ); // get next command from the procedure
    -    ++( procc->get() );                 // increment the counter and
    -
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << std::endl;
    -      do
    -      {
    -        char cmd = i->debug_commandline( i->EStack.top() );
    -        if ( cmd == 'l' ) // List the procedure
    -        {
    -          if ( proc )
    -          {
    -            proc->list( std::cerr, "   ", pos );
    -            std::cerr << std::endl;
    -          }
    -        }
    -        else
    -        {
    -          break;
    -        }
    -      } while ( true );
    -    }
    -  }
    -  if ( ( size_t ) procc->get() >= proclimit )
    -  {
    -    ( *procc ) = 0;
    -  }
    -}
    -void
    -SLIArrayModule::IMap_ivFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* id = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( id );
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( count );
    -
    -  ProcedureDatum const* pd = static_cast< ProcedureDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( pd );
    -
    -  std::cerr << "During Map at iteration " << count->get() << "." << std::endl;
    -
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -/**********************************************/
    -/* % IMap_iv                                     */
    -/*  call: intvec mark procc count proc %map   */
    -/*  pick   5     4    3     2    1      0     */
    -/**********************************************/
    -void
    -SLIArrayModule::IMap_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  ProcedureDatum* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 1 ).datum() );
    -  size_t proclimit = proc->size();
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -  size_t iterator = count->get();
    -  IntegerDatum* procc = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -  size_t pos = procc->get();
    -  IntVectorDatum* array = static_cast< IntVectorDatum* >( i->EStack.pick( 5 ).datum() );
    -  size_t limit = ( *array )->size();
    -
    -  // Do we  start a new iteration ?
    -  if ( pos == 0 )
    -  {
    -    if ( iterator < limit ) // Is Iteration is still running
    -    {
    -      if ( iterator > 0 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->dec_call_depth();
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        IntegerDatum* result = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -        if ( not result )
    -        {
    -          i->dec_call_depth();
    -          i->message( SLIInterpreter::M_ERROR, "Map_iv", "Function must return an integer." );
    -
    -          i->raiseerror( i->ArgumentTypeError );
    -          return;
    -        }
    -
    -        ( **array )[ iterator - 1 ] = result->get();
    -        i->OStack.pop();
    -      }
    -
    -      i->OStack.push( new IntegerDatum( ( **array )[ iterator ] ) ); // push element to user
    -      if ( i->step_mode() )
    -      {
    -        std::cerr << "Map:"
    -                  << " Limit: " << limit << " Pos: " << iterator << " Iterator: ";
    -        i->OStack.pick( 0 ).pprint( std::cerr );
    -        std::cerr << std::endl;
    -      }
    -
    -      ++( count->get() );
    -      // We continue after this if-branch and do the commands
    -    }
    -    else
    -    {
    -      if ( iterator > 0 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        IntegerDatum* result = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -        if ( not result )
    -        {
    -          i->dec_call_depth();
    -          i->message( SLIInterpreter::M_ERROR, "Map_iv", "Function must return an integer." );
    -          i->raiseerror( i->ArgumentTypeError );
    -          return;
    -        }
    -        ( **array )[ iterator - 1 ] = result->get();
    -        i->OStack.pop();
    -      }
    -      i->OStack.push_move( i->EStack.pick( 5 ) ); // push array
    -      i->EStack.pop( 6 );
    -      i->dec_call_depth();
    -      return;
    -    }
    -  }
    -
    -  if ( ( size_t ) procc->get() < proclimit )
    -  {
    -    /* we are still evaluating the procedure. */
    -    i->EStack.push( proc->get( pos ) ); // get next command from the procedure
    -    ++( procc->get() );                 // increment the counter and
    -
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << std::endl;
    -      do
    -      {
    -        char cmd = i->debug_commandline( i->EStack.top() );
    -        if ( cmd == 'l' ) // List the procedure
    -        {
    -          if ( proc )
    -          {
    -            proc->list( std::cerr, "   ", pos );
    -            std::cerr << std::endl;
    -          }
    -        }
    -        else
    -        {
    -          break;
    -        }
    -      } while ( true );
    -    }
    -  }
    -  if ( ( size_t ) procc->get() >= proclimit )
    -  {
    -    ( *procc ) = 0;
    -  }
    -}
    -
    -void
    -SLIArrayModule::IMap_dvFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* id = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( id );
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( count );
    -
    -  ProcedureDatum const* pd = static_cast< ProcedureDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( pd );
    -
    -  std::cerr << "During Map at iteration " << count->get() << "." << std::endl;
    -
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -void
    -SLIArrayModule::IMap_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  ProcedureDatum* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 1 ).datum() );
    -  size_t proclimit = proc->size();
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -  size_t iterator = count->get();
    -  IntegerDatum* procc = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -  size_t pos = procc->get();
    -  DoubleVectorDatum* array = static_cast< DoubleVectorDatum* >( i->EStack.pick( 5 ).datum() );
    -  size_t limit = ( *array )->size();
    -
    -  // Do we  start a new iteration ?
    -  if ( pos == 0 )
    -  {
    -    if ( iterator < limit ) // Is Iteration is still running
    -    {
    -      if ( iterator > 0 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->dec_call_depth();
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        DoubleDatum* result = dynamic_cast< DoubleDatum* >( i->OStack.top().datum() );
    -        if ( not result )
    -        {
    -          i->dec_call_depth();
    -          i->message( SLIInterpreter::M_ERROR, "Map_dv", "Function must return a double." );
    -
    -          i->raiseerror( i->ArgumentTypeError );
    -          return;
    -        }
    -
    -        ( **array )[ iterator - 1 ] = result->get();
    -        i->OStack.pop();
    -      }
    -
    -      // push element to user
    -      i->OStack.push( new DoubleDatum( ( **array )[ iterator ] ) );
    -      if ( i->step_mode() )
    -      {
    -        std::cerr << "Map_dv:"
    -                  << " Limit: " << limit << " Pos: " << iterator << " Iterator: ";
    -        i->OStack.pick( 0 ).pprint( std::cerr );
    -        std::cerr << std::endl;
    -      }
    -
    -      ++( count->get() );
    -      // We continue after this if-branch and do the commands
    -    }
    -    else
    -    {
    -      if ( iterator > 0 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        DoubleDatum* result = dynamic_cast< DoubleDatum* >( i->OStack.top().datum() );
    -        if ( not result )
    -        {
    -          i->dec_call_depth();
    -          i->message( SLIInterpreter::M_ERROR, "Map_dv", "Function must return a double." );
    -          i->raiseerror( i->ArgumentTypeError );
    -          return;
    -        }
    -        ( **array )[ iterator - 1 ] = result->get();
    -        i->OStack.pop();
    -      }
    -      i->OStack.push_move( i->EStack.pick( 5 ) ); // push array
    -      i->EStack.pop( 6 );
    -      i->dec_call_depth();
    -      return;
    -    }
    -  }
    -
    -  if ( ( size_t ) procc->get() < proclimit )
    -  {
    -    /* we are still evaluating the procedure. */
    -    i->EStack.push( proc->get( pos ) ); // get next command from the procedure
    -    ++( procc->get() );                 // increment the counter and
    -
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << std::endl;
    -      do
    -      {
    -        char cmd = i->debug_commandline( i->EStack.top() );
    -        if ( cmd == 'l' ) // List the procedure
    -        {
    -          if ( proc )
    -          {
    -            proc->list( std::cerr, "   ", pos );
    -            std::cerr << std::endl;
    -          }
    -        }
    -        else
    -        {
    -          break;
    -        }
    -      } while ( true );
    -    }
    -  }
    -  if ( ( size_t ) procc->get() >= proclimit )
    -  {
    -    ( *procc ) = 0;
    -  }
    -}
    -
    -/********************************/
    -/* Map                          */
    -/*  call: array proc Map -> array */
    -/*  pick   1    0               */
    -/********************************/
    -/** @BeginDocumentation
    -   Name: Map - Apply a procedure to each element of a list or string
    -
    -   Synopsis:
    -     [v1 ... vn] {f} Map -> [ f(v1) ... f(vn) ]
    -     [ [... n levels [a1 ... an] ... [b1 ... bn] ...] ] {f} [n] Map
    -         -> [ [... [f(a1) ... f(an)] ... [f(b1) ... f(bn)] ...] ]
    -
    -     (c1 ... cn) {f} Map -> (f(c1)...f(vn))
    -
    -   Parameters:
    -     [v1 ... vn] - list of n arbitrary objects
    -     (c1 ... cn) - string with n characters
    -
    -     {f}         - function which can operate on the elements of [array].
    -                   This function must return exaclty one value.
    -     [n]         - nesting level at which {f} is applied
    -
    -   Description:
    -     Map works like the corresponding Mathematica function.
    -     For each element of the input array, Map calls f and replaces
    -     the element with the result of f.
    -     Note that f must return exactly one value! The result of Map
    -     is a list with the same number of values as the argument list.
    -     If f does not return a value, Map fails.
    -     If f returns more than one value, the result of Map is undefined.
    -
    -     The specification of the nesting level in Mathematica is more general.
    -     Currently NEST only supports [n]
    -
    -   Examples:
    -
    -   [1 2 3 4 5]  {2 mul} Map          --> [2 4 6 8 10]
    -   [ [3. 4.] [7. 8.] ] {cvi} [2] Map --> [[3 4] [7 8]]
    -   [3. 4. 7. 8.] {cvi} [1] Map       --> [3 4 7 8]
    -
    -
    -   (abc) {1 add} Map                 --> (bcd)
    -
    -   Author:
    -    Marc-Oliver Gewaltig
    -
    -   Remarks: Map is not part of PostScript
    -
    -   References: The Mathematica Book
    -
    -   SeeAlso: MapAt, MapIndexed, Table, forall, forallindexed, NestList
    -
    -*/
    -
    -void
    -SLIArrayModule::MapFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  ProcedureDatum* proc = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( proc );
    -
    -  if ( proc->size() == 0 )
    -  {
    -    // If the procedure is empty, just leave the array as it is.
    -    i->OStack.pop();
    -    return;
    -  }
    -
    -  i->EStack.push_move( i->OStack.pick( 1 ) ); // push array
    -
    -  i->EStack.push( i->baselookup( i->mark_name ) );
    -
    -  i->EStack.push_by_pointer( new IntegerDatum( 0 ) ); // push procedure counter
    -  i->EStack.push_by_pointer( new IntegerDatum( 0 ) ); // push initial counter
    -  i->EStack.push_move( i->OStack.pick( 0 ) );         // push procedure
    -
    -  if ( dynamic_cast< IntVectorDatum* >( i->EStack.pick( 4 ).datum() ) )
    -  {
    -    i->EStack.push( i->baselookup( sli::imap_iv ) );
    -  }
    -  else if ( dynamic_cast< DoubleVectorDatum* >( i->EStack.pick( 4 ).datum() ) )
    -  {
    -    i->EStack.push( i->baselookup( sli::imap_dv ) );
    -  }
    -  else
    -  {
    -    i->EStack.push( i->baselookup( sli::imap ) );
    -  }
    -  i->inc_call_depth();
    -  i->OStack.pop( 2 );
    -}
    -
    -void
    -SLIArrayModule::ValidFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( ad );
    -  i->OStack.push( ad->valid() );
    -
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::IMapIndexedFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* id = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( id );
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( count );
    -
    -  ProcedureDatum const* pd = static_cast< ProcedureDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( pd );
    -
    -
    -  std::cerr << "During MapIndexed at iteration " << count->get() << "." << std::endl;
    -
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -/**********************************************/
    -/* % IMapIndexed                              */
    -/*  call: array mark procc count proc %map    */
    -/*  pick   5     4    3     2    1      0     */
    -/**********************************************/
    -void
    -SLIArrayModule::IMapIndexedFunction::execute( SLIInterpreter* i ) const
    -{
    -  ProcedureDatum* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 1 ).datum() );
    -  size_t proclimit = proc->size();
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -  size_t iterator = count->get();
    -  IntegerDatum* procc = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -  size_t pos = procc->get();
    -  ArrayDatum* array = static_cast< ArrayDatum* >( i->EStack.pick( 5 ).datum() );
    -  size_t limit = array->size();
    -
    -  // Do we  start a new iteration ?
    -  if ( pos == 0 )
    -  {
    -    if ( iterator <= limit ) // Is Iteration is still running
    -    {
    -      if ( iterator > 1 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        array->assign_move( iterator - 2, i->OStack.top() );
    -
    -
    -        i->OStack.pop();
    -      }
    -
    -      i->OStack.push( array->get( iterator - 1 ) ); // push element to user
    -      i->OStack.push( *count );                     // push iterator to user
    -      ++( count->get() );
    -
    -      if ( i->step_mode() )
    -      {
    -
    -        std::cerr << "MapIndexed:"
    -                  << " Limit: " << limit << " Pos: " << iterator << " Iterator: ";
    -        i->OStack.pick( 1 ).pprint( std::cerr );
    -        std::cerr << std::endl;
    -      }
    -
    -      // We continue after this if-branch and do the commands
    -    }
    -    else
    -    {
    -      if ( iterator > 1 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        array->assign_move( iterator - 2, i->OStack.top() );
    -        i->OStack.pop();
    -      }
    -      i->OStack.push_move( i->EStack.pick( 5 ) ); // push array
    -      i->EStack.pop( 6 );
    -      i->dec_call_depth();
    -      return;
    -    }
    -  }
    -
    -  if ( ( size_t ) procc->get() < proclimit )
    -  {
    -    /* we are still evaluating the procedure. */
    -    i->EStack.push( proc->get( pos ) ); // get next command from the procedure
    -    ++( procc->get() );                 // increment the counter and
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << std::endl;
    -      do
    -      {
    -        char cmd = i->debug_commandline( i->EStack.top() );
    -        if ( cmd == 'l' ) // List the procedure
    -        {
    -          if ( proc )
    -          {
    -            proc->list( std::cerr, "   ", pos );
    -            std::cerr << std::endl;
    -          }
    -        }
    -        else
    -        {
    -          break;
    -        }
    -      } while ( true );
    -    }
    -  }
    -  if ( ( size_t ) procc->get() >= proclimit )
    -  {
    -    ( *procc ) = 0;
    -  }
    -}
    -
    -
    -void
    -SLIArrayModule::MapIndexedFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  ProcedureDatum* proc = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( proc );
    -
    -  if ( proc->size() == 0 )
    -  {
    -    // If the procedure is empty, just leave the array as it is.
    -    i->OStack.pop();
    -    return;
    -  }
    -
    -  i->EStack.push_move( i->OStack.pick( 1 ) ); // push array
    -  i->EStack.push( i->baselookup( i->mark_name ) );
    -
    -  i->EStack.push( new IntegerDatum( 0 ) );    // push procedure counter
    -  i->EStack.push( new IntegerDatum( 1 ) );    // push initial counter
    -  i->EStack.push_move( i->OStack.pick( 0 ) ); // push procedure
    -
    -  i->EStack.push( i->baselookup( sli::imapindexed ) );
    -  i->inc_call_depth();
    -  i->OStack.pop( 2 );
    -}
    -
    -void
    -SLIArrayModule::IMapThreadFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* id = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( id );
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( count );
    -
    -  ProcedureDatum const* pd = static_cast< ProcedureDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( pd );
    -
    -
    -  std::cerr << "During MapThread at iteration " << count->get() << "." << std::endl;
    -
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -//******************************************************
    -// % IMapThread
    -//  call: mark  lim  tarray sarray procc count proc %map
    -//  pick   7     6      5      4      3     2   1    0
    -//*******************************************************
    -void
    -SLIArrayModule::IMapThreadFunction::execute( SLIInterpreter* i ) const
    -{
    -  ProcedureDatum* procd = static_cast< ProcedureDatum* >( i->EStack.pick( 1 ).datum() );
    -
    -  size_t proclimit = procd->size();
    -
    -  IntegerDatum* argcountd = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -
    -  size_t argcount = argcountd->get();
    -
    -  IntegerDatum* proccountd = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -
    -  size_t proccount = proccountd->get();
    -
    -  ArrayDatum* sarray = static_cast< ArrayDatum* >( i->EStack.pick( 4 ).datum() );
    -  ArrayDatum* tarray = static_cast< ArrayDatum* >( i->EStack.pick( 5 ).datum() );
    -
    -  IntegerDatum* limitd = static_cast< IntegerDatum* >( i->EStack.pick( 6 ).datum() );
    -
    -  size_t args = sarray->size(); // number of argument arrays
    -  size_t limit = limitd->get(); // number of arguments per array
    -
    -  // first we check whether we start anew with the iteration of the procedure
    -  // this is the case when proccount==0
    -  if ( proccount == 0 )
    -  {
    -    if ( argcount < limit ) // Is Iteration is still running
    -    {
    -      if ( argcount > 0 )
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        tarray->assign_move( argcount - 1, i->OStack.top() );
    -        i->OStack.pop();
    -      }
    -
    -      // Make a loop over all argument arrays and push the next element
    -      for ( size_t j = 0; j < args; ++j )
    -      {
    -        ArrayDatum* ad = static_cast< ArrayDatum* >( sarray->get( j ).datum() );
    -        i->OStack.push( ad->get( argcount ) ); // push element to user
    -      }
    -      assert( i->OStack.load() >= args );
    -      ++( argcountd->get() );
    -
    -      // We continue after this if-branch and do the commands
    -      if ( i->step_mode() )
    -      {
    -
    -        std::cerr << "MapThread:"
    -                  << " Limit: " << limit << " Pos: " << argcount << " Args: " << args << std::endl;
    -      }
    -    }
    -    else
    -    {
    -      assert( argcount >= limit );
    -      if ( argcount > 0 ) // should be obsolete
    -      {
    -        // In this case we have to put the result of
    -        // the last procedure call into the array
    -        if ( i->OStack.load() == 0 )
    -        {
    -          i->raiseerror( i->StackUnderflowError );
    -          return;
    -        }
    -        tarray->assign_move( argcount - 1, i->OStack.top() );
    -        i->OStack.pop();
    -      }
    -      i->OStack.push_move( i->EStack.pick( 5 ) ); // push result array
    -      i->EStack.pop( 8 );
    -      i->dec_call_depth();
    -      return;
    -    }
    -  }
    -
    -  if ( ( size_t ) proccountd->get() < proclimit )
    -  {
    -    /* we are still evaluating the procedure. */
    -    // get next command from the procedure
    -    i->EStack.push( procd->get( proccount ) );
    -    ++( proccountd->get() ); // increment the counter and
    -
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << std::endl;
    -      do
    -      {
    -        char cmd = i->debug_commandline( i->EStack.top() );
    -        if ( cmd == 'l' ) // List the procedure
    -        {
    -          if ( procd )
    -          {
    -            procd->list( std::cerr, "   ", proccount );
    -            std::cerr << std::endl;
    -          }
    -        }
    -        else
    -        {
    -          break;
    -        }
    -      } while ( true );
    -    }
    -  }
    -  if ( ( size_t ) proccountd->get() >= proclimit )
    -  {
    -    ( *proccountd ) = 0;
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: MapThread - apply a procedure to corresponding elements of n arrays
    -
    -Synopsis: [[a11 ... a1n]...[am1 ... amn]] {f} MapThread ->
    -                                  [f(a11, a21,... am1)...f(a1n, a2n,...,amn)]
    -
    -Description: MapThread is like a multidimensional Map. It applies the function
    -             of to corresponding elements of m argument arrays.
    -
    -Parameters: the first parameter is a list of m arrays of equal size n.
    -            The second parameter is a procedure which takes m arguments and
    -            returns a single value.
    -
    -Examples:    [[1 2][3 4]] {add} MapThread -> [4 6]
    -            [[1 2 3 4] [1 1 1 1]] {add} MapThread -> [2 3 4 5]
    -
    -References: This function implements the simple version of Mathematica's
    -MapThread
    -
    -SeeAlso: Map, MapIndexed, NestList, FoldList, ScanThread
    -*/
    -
    -void
    -SLIArrayModule::MapThreadFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  ProcedureDatum* proc = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( proc );
    -
    -  if ( proc->size() == 0 )
    -  {
    -    // If the procedure is empty, just leave the array as it is.
    -    i->OStack.pop();
    -    i->EStack.pop();
    -    return;
    -  }
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( ad );
    -
    -  if ( ad->size() > 0 )
    -  {
    -    // check if the components are arrays of equal length.
    -    ArrayDatum* ad1 = dynamic_cast< ArrayDatum* >( ad->get( 0 ).datum() );
    -    if ( not ad1 )
    -    {
    -      i->raiseerror( i->ArgumentTypeError );
    -      return;
    -    }
    -
    -    for ( size_t j = 1; j < ad->size(); ++j )
    -    {
    -      ArrayDatum* ad2 = dynamic_cast< ArrayDatum* >( ad->get( j ).datum() );
    -      if ( not ad2 )
    -      {
    -        i->raiseerror( i->ArgumentTypeError );
    -        return;
    -      }
    -
    -      if ( ad2->size() != ad1->size() )
    -      {
    -        i->raiseerror( i->RangeCheckError );
    -        return;
    -      }
    -    }
    -
    -    i->EStack.pop();                                   // remove MapThread object
    -    i->EStack.push( i->baselookup( i->mark_name ) );   //  mark
    -    i->EStack.push( new IntegerDatum( ad1->size() ) ); //  limit
    -    i->EStack.push( new ArrayDatum( *ad1 ) );          //  target array (copy)
    -    i->EStack.push_move( i->OStack.pick( 1 ) );        //  argument array
    -    i->EStack.push( new IntegerDatum( 0 ) );           //  procedure counter
    -    i->EStack.push( new IntegerDatum( 0 ) );           //  initial counter
    -    i->EStack.push_move( i->OStack.top() );            //  procedure
    -
    -    i->EStack.push( i->baselookup( Name( "::MapThread" ) ) );
    -    i->OStack.pop( 2 );
    -    i->inc_call_depth();
    -  }
    -  else // size > 0
    -  {
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -}
    -
    -
    -// Put a token to a nested array.
    -void
    -SLIArrayModule::Put_a_a_tFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 3 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "Put", "Too few parameters supplied." );
    -    i->message( SLIInterpreter::M_ERROR, "Put", "Usage: [array] [d1 ...dn] obj Put -> [array]" );
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  ArrayDatum* source = dynamic_cast< ArrayDatum* >( i->OStack.pick( 2 ).datum() );
    -  if ( not source )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "Put", "First argument must be an array." );
    -    i->message( SLIInterpreter::M_ERROR, "Put", "Usage: [array] [d1 ...dn]  obj Put -> [array]" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -
    -  ArrayDatum* pos = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  if ( not pos )
    -  {
    -    i->message( SLIInterpreter::M_ERROR,
    -      "Put",
    -      "Second argument must be an array indicating the position is a nested "
    -      "array." );
    -    i->message( SLIInterpreter::M_ERROR, "Put", "Usage: [array] [d1 ...dn]  obj Put -> [array]" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  for ( Token* t = pos->begin(); t != pos->end(); ++t )
    -  {
    -    assert( t );
    -    IntegerDatum* idx = dynamic_cast< IntegerDatum* >( t->datum() );
    -    if ( not idx )
    -    {
    -      i->message( SLIInterpreter::M_ERROR, "Put", "Non integer index found." );
    -      i->message( SLIInterpreter::M_ERROR, "Put", "Source array is unchanged." );
    -      i->raiseerror( i->ArgumentTypeError );
    -      return;
    -    }
    -
    -    int j = idx->get();
    -
    -    if ( j < 0 )
    -    {
    -      i->message( SLIInterpreter::M_ERROR, "Put", "Negative index found." );
    -      i->message( SLIInterpreter::M_ERROR, "Put", "Source array is unchanged." );
    -      i->raiseerror( i->RangeCheckError );
    -      return;
    -    }
    -
    -    if ( j >= ( int ) source->size() )
    -    {
    -      i->message( SLIInterpreter::M_ERROR, "Put", "Index out of range." );
    -      i->message( SLIInterpreter::M_ERROR, "Put", "Source array is unchanged." );
    -      i->raiseerror( i->RangeCheckError );
    -      return;
    -    }
    -
    -    if ( t < pos->end() - 1 )
    -    {
    -      source = dynamic_cast< ArrayDatum* >( ( *source )[ j ].datum() );
    -      if ( not source )
    -      {
    -        i->message( SLIInterpreter::M_ERROR, "Put", "Dimensions of index and array do not match." );
    -        i->message( SLIInterpreter::M_ERROR, "Put", "Source array is unchanged." );
    -        i->raiseerror( i->RangeCheckError );
    -        return;
    -      }
    -    }
    -    else
    -    {
    -      // Now source points to the innermost target array and we can replace the
    -      // object.
    -      ( *source )[ j ].swap( i->OStack.top() );
    -    }
    -  }
    -
    -  i->EStack.pop();
    -  i->OStack.pop( 2 );
    -}
    -
    -/** @BeginDocumentation
    -Name: area - Return array of indices defining a 2d subarea of a 2d array.
    -
    -Synopsis:
    -                source_width source_anchor_y source_anchor_x
    -    area_height   area_width   area_anchor_y   area_anchor_x
    -                                                        area -> [1d-indices]
    -
    -Description:
    -  Given a -- hypothetical -- twodimensional array,
    -  "area" tells you, what indices you need to
    -  subscript a contiguous, twodimensional subarea.
    -
    -  The subarea is defined by specifying it's size
    -  (width and height), as well as its location in the
    -  source array. The location is defined by specifying
    -  an anchor point in the source array as well as in
    -  the subarea. Anchor points are matched, see
    -  illustration, and examples below:
    -
    -  source array: height=6, width=15, anchor=(2,5)
    -  subarea     : height=4, width= 5, anchor=(1,3)
    -  ...............
    -  ..ooooo........
    -  ..oooxo........
    -  ..ooooo........
    -  ..ooooo........
    -  ...............
    -
    -
    -  "area" returns an array of ONEDIMENSIONAL indices.
    -  There is a SLI function called "area2" returning
    -  twodimensional indices, as well as the conversion
    -  functions "cv1d" and "cv2d".
    -  (For information on the order of subscription in NEST
    -  arrays, see references below.)
    -
    -Parameters:
    -   In: "area" takes seven integer arguments (one integer
    -       and three pairs). These arguments describe (1) the width of the
    -       (hypothetical) source array, (2) the height and width of the
    -       subarea, as well as (3&4) an anchor point in each of the two
    -       arrays (see illustration above):
    -
    -         source_width   : width  of the (hypothetical) source
    -                          array to be subscribed into
    -         source_anchor_y,
    -         source_anchor_x: position of the anchor point relative
    -                          to ORIGIN OF THE SOURCE ARRAY
    -
    -         area_heigh  t  : height of the subarea to be subscribed
    -         area_width     : width  of the subarea to be subscribed
    -         area_anchor_y,
    -         area_anchor_x  : position of the anchor point relative
    -                          to ORIGIN OF THE SUBAREA
    -
    -  Out: "area" returns an array of ONEDIMENSIONAL indices:
    -
    -         [1d-indices]   : flat integer array containing the indices
    -                          that can be used to subscript the
    -                          (hypothetical) source array in order to
    -                          access the desired subarea.
    -
    -                          Indices are onedimensional, and are returned
    -                          in standard NEST (monotonic) counting order.
    -                          (For information on the order of
    -                          subscription in NEST arrays, see references
    -                          below.)
    -
    -Examples:
    -  (Examples are illustrated):
    -
    -  Ex. 1: source array: (height=5), width=10, anchor=(0,0)
    -         subarea     :  height=3, width= 3, anchor=(0,0)
    -         xoo.......
    -         ooo.......
    -         ooo.......
    -         ..........
    -         ..........
    -
    -         10 0 0  3 3 0 0 area -> [0 1 2  10 11 12  20 21 22]
    -
    -  Ex. 1b:source array: (height=5), width=10, anchor=(2,2)
    -         subarea     :  height=3, width= 3, anchor=(2,2)
    -         ooo.......
    -         ooo.......
    -         oox.......
    -         ..........
    -         ..........
    -
    -         10 2 2  3 3 2 2 area -> [0 1 2  10 11 12  20 21 22]
    -
    -  Ex. 1c:Note that anchor point may lie outside both
    -         arrays' bounds:
    -         source array: (height=5), width=10, anchor=(1,12)
    -         subarea     :  height=3, width= 3, anchor=(1,12)
    -         ooo.......
    -         ooo.......  x
    -         ooo.......
    -         ..........
    -         ..........
    -
    -         10 1 12  3 3 1 12 area -> [0 1 2  10 11 12  20 21 22]
    -
    -  Ex. 2: source array: (height=6), width=15, anchor=(2,5)
    -         subarea     :  height=4, width= 5, anchor=(1,3)
    -         ...............
    -         ..ooooo........
    -         ..oooxo........
    -         ..ooooo........
    -         ..ooooo........
    -         ...............
    -
    -         15 2 5  4 5 1 3 area -> [17 18 19 20 21
    -                                  32 33 34 35 36
    -                                  47 48 49 50 51
    -                                  62 63 64 65 66]
    -
    -
    -Diagnostics:
    -  May raise the following SLI interpreter errors:
    -    StackUnderflowError
    -    ArgumentTypeError
    -
    -  NO ARGUMENT RANGE CHECK IS PERFORMED.
    -  The result may be useless if subarea is not
    -  contained in the source array. Note that THIS
    -  RESTRICTION DOES NOT APPLY TO FUNCTION "area2".
    -
    -  However, anchor points may lie outside the array
    -  bounds.
    -
    -  Note that the height of the source array is not used in computation,
    -  and does not appear in the parameter list
    -
    -Author: Ruediger Kupper
    -
    -References: (TO BE DONE: NEST layer indexing conventions)
    -
    -SeeAlso: area2
    -*/
    -void
    -SLIArrayModule::AreaFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 7 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "area", "Too few parameters supplied." );
    -    i->message( SLIInterpreter::M_ERROR, "area", "Usage: sw say sax  ah aw aay aax  area" );
    -    i->message( SLIInterpreter::M_ERROR, "area", "where:  sw : source array width" );
    -    i->message( SLIInterpreter::M_ERROR, "area", "        say: source array anchor y position" );
    -    i->message( SLIInterpreter::M_ERROR, "area", "        sax: source array anchor x position" );
    -    i->message( SLIInterpreter::M_ERROR, "area", "        ah : subregion height" );
    -    i->message( SLIInterpreter::M_ERROR, "area", "        aw : subregion width" );
    -    i->message( SLIInterpreter::M_ERROR, "area", "        aay: subregion anchor y position" );
    -    i->message( SLIInterpreter::M_ERROR, "area", "        aax: subregion anchor x position" );
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  //  IntegerDatum* s_h_d    =
    -  //  dynamic_cast<IntegerDatum*>(i->OStack.pick(7).datum());
    -  IntegerDatum* s_w_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 6 ).datum() );
    -  IntegerDatum* s_y_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 5 ).datum() );
    -  IntegerDatum* s_x_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 4 ).datum() );
    -
    -  IntegerDatum* a_h_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 3 ).datum() );
    -  IntegerDatum* a_w_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* a_y_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* a_x_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  //   if(not s_h_d)
    -  //   {
    -  //     i->raiseerror(i->ArgumentTypeError);
    -  //     return;
    -  //   }
    -  if ( not s_w_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not s_y_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not s_x_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not a_h_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not a_w_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not a_y_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not a_x_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  // not needed for computation: long const s_h = s_h_d->get();
    -  long const s_w = s_w_d->get();
    -  long const s_y = s_y_d->get();
    -  long const s_x = s_x_d->get();
    -
    -  long const a_h = a_h_d->get();
    -  long const a_w = a_w_d->get();
    -  long const a_y = a_y_d->get();
    -  long const a_x = a_x_d->get();
    -
    -  TokenArray indices;
    -  indices.reserve( a_w * a_h );
    -
    -  // compute upper left corner in source array:
    -  long const s_0_y = s_y - a_y;
    -  long const s_0_x = s_x - a_x;
    -
    -  for ( long y = 0; y < a_h; ++y )
    -  {
    -    for ( long x = 0; x < a_w; ++x )
    -    {
    -      indices.push_back( s_0_x + s_0_y * s_w + x + y * s_w );
    -    }
    -  }
    -
    -  i->OStack.pop( 7 );
    -  i->OStack.push_by_pointer( new ArrayDatum( indices ) );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: area2 - Return array of indices defining a 2d subarea of a 2d array.
    -
    -Synopsis:
    -                             source_anchor_y source_anchor_x
    -    area_height   area_width   area_anchor_y   area_anchor_x
    -                                                       area2 -> [2d-indices]
    -
    -Description:
    -  Given a -- hypothetical -- twodimensional array,
    -  "area" tells you, what indices you need to
    -  subscript a contiguous, twodimensional subarea.
    -
    -  The subarea is defined by specifying it's size
    -  (width and height), as well as its location in the
    -  source array. The location is defined by specifying
    -  an anchor point in the source array as well as in
    -  the subarea. Anchor points are matched, see
    -  illustration, and examples below:
    -
    -  source array: height=6, width=15, anchor=(2,5)
    -  subarea     : height=4, width= 5, anchor=(1,3)
    -  ...............
    -  ..ooooo........
    -  ..oooxo........
    -  ..ooooo........
    -  ..ooooo........
    -  ...............
    -
    -
    -  "area2" returns an array of TWODIMENSIONAL indices.
    -  There is a SLI function called "area" returning
    -  onedimensional indices, as well as the conversion
    -  functions "cv1d" and "cv2d".
    -  (For information on the order of subscription in NEST
    -  arrays, see references below.)
    -
    -Parameters:
    -   In: "area2" takes six integer arguments (three pairs).
    -       These arguments describe (1) the height and width of the
    -       subarea to be indexed in the (hypothetical) source array, as
    -       well as (2&3) an anchor point in each of the two arrays (see
    -       illustration above):
    -
    -         source_anchor_y,
    -         source_anchor_x: position of the anchor point relative
    -                          to ORIGIN OF THE SOURCE ARRAY
    -
    -         area_heigh  t  : height of the subarea to be subscribed
    -         area_width     : width  of the subarea to be subscribed
    -         area_anchor_y,
    -         area_anchor_x  : position of the anchor point relative
    -                          to ORIGIN OF THE SUBAREA
    -
    -  Out: "area" returns an array of ONEDIMENSIONAL indices:
    -
    -         [2d-indices]   : flat integer array containing the indices
    -                          that can be used to subscript the
    -                          (hypothetical) source array in order to
    -                          access the desired subarea.
    -
    -                          Indices are twodimensional. The returned
    -                          array is flat and has the following order:
    -                          [1y 1x  2y 2x  3y 3x  ...  ny nx]
    -                          That is, each pair of numbers indicates the
    -                          y- and the x-component of a respective
    -                          index.
    -
    -                          The indices 1..n are returned in standard
    -                          NEST counting order. (For information on the
    -                          order of subscription in NEST arrays, see
    -                          references below.)
    -
    -Examples:
    -  (Examples are illustrated):
    -
    -  Ex. 1: source array: (height=5), (width=10), anchor=(0,0)
    -         subarea     :  height=3,   width= 3,  anchor=(0,0)
    -         xoo.......
    -         ooo.......
    -         ooo.......
    -         ..........
    -         ..........
    -
    -         0 0  3 3 0 0 area2 -> [0 0  0 1  0 2
    -                                1 0  1 1  1 2
    -                                2 0  2 1  2 2]
    -
    -  Ex. 1b:source array: (height=5), (width=10), anchor=(2,2)
    -         subarea     :  height=3,   width= 3,  anchor=(2,2)
    -         ooo.......
    -         ooo.......
    -         oox.......
    -         ..........
    -         ..........
    -
    -         2 2  3 3 2 2 area2 -> [0 0  0 1  0 2
    -                                1 0  1 1  1 2
    -                                2 0  2 1  2 2]
    -
    -  Ex. 1c:Note that anchor point may lie outside both
    -         arrays' bounds:
    -         source array: (height=5), (width=10), anchor=(1,12)
    -         subarea     :  height=3,   width= 3,  anchor=(1,12)
    -         ooo.......
    -         ooo.......  x
    -         ooo.......
    -         ..........
    -         ..........
    -
    -         1 12  3 3 1 12 area2 -> [0 0  0 1  0 2
    -                                  1 0  1 1  1 2
    -                                  2 0  2 1  2 2]
    -
    -  Ex. 2: source array: (height=6), (width=15), anchor=(2,5)
    -         subarea     :  height=4,   width= 5,  anchor=(1,3)
    -         ...............
    -         ..ooooo........
    -         ..oooxo........
    -         ..ooooo........
    -         ..ooooo........
    -         ...............
    -
    -         2 5  4 5 1 3 area2 -> [1 2  1 3  1 4  1 5  1 6
    -                                2 2  2 3  2 4  2 5  2 6
    -                                3 2  3 3  3 4  3 5  3 6
    -                                4 2  4 3  4 4  4 5  4 6]
    -
    -  Ex. 3: Note that subarea doesn't need to lie
    -         inside bounds of source array:
    -         source array: (height=4), (width= 8), anchor=(4,-1)
    -         subarea     :  height=2,   width= 3,  anchor=(1, 0)
    -         ........
    -         ........
    -         ........
    -        ooo......
    -        xoo
    -
    -
    -         4 -1  2 3 1 0 area2 -> [3 -1  3 0  3 1
    -                                 4 -1  4 0  4 1]
    -
    -Diagnostics:
    -  "area2" may raise the following SLI interpreter errors:
    -    StackUnderflowError
    -    ArgumentTypeError
    -
    -  No argument range check is performed. The returned
    -  indices may indicate regions outside the source
    -  array (see Example 3). This is not a bug, it's a
    -  feature :-). Note that restrictions apply to the
    -  related function "area".
    -
    -  However, anchor points may lie outside the array
    -  bounds.
    -
    -  Note that arguments source_width and source_height are not used in
    -  computation, and do not appear in the argument list.
    -
    -Author: Ruediger Kupper
    -
    -References: (TO BE DONE: NEST layer indexing conventions)
    -
    -SeeAlso: area
    -*/
    -void
    -SLIArrayModule::Area2Function::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 6 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "area2", "Too few parameters supplied." );
    -    i->message( SLIInterpreter::M_ERROR, "area2", "Usage: say sax  ah aw aay aax  area2" );
    -    i->message( SLIInterpreter::M_ERROR, "area2", "where:  say: source array anchor y position" );
    -    i->message( SLIInterpreter::M_ERROR, "area2", "        sax: source array anchor x position" );
    -    i->message( SLIInterpreter::M_ERROR, "area2", "        ah : subregion height" );
    -    i->message( SLIInterpreter::M_ERROR, "area2", "        aw : subregion width" );
    -    i->message( SLIInterpreter::M_ERROR, "area2", "        aay: subregion anchor y position" );
    -    i->message( SLIInterpreter::M_ERROR, "area2", "        aax: subregion anchor x position" );
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  //   IntegerDatum* s_h_d    =
    -  //   dynamic_cast<IntegerDatum*>(i->OStack.pick(7).datum());
    -  //   IntegerDatum* s_w_d    =
    -  //   dynamic_cast<IntegerDatum*>(i->OStack.pick(6).datum());
    -  IntegerDatum* s_y_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 5 ).datum() );
    -  IntegerDatum* s_x_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 4 ).datum() );
    -
    -  IntegerDatum* a_h_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 3 ).datum() );
    -  IntegerDatum* a_w_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* a_y_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* a_x_d = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  //   if(not s_h_d)
    -  //   {
    -  //     i->raiseerror(i->ArgumentTypeError);
    -  //     return;
    -  //   }
    -  //   if(not s_w_d)
    -  //   {
    -  //     i->raiseerror(i->ArgumentTypeError);
    -  //     return;
    -  //   }
    -  if ( not s_y_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not s_x_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not a_h_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not a_w_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not a_y_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( not a_x_d )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  // not needed for computation: long const s_h = s_h_d->get();
    -  // not needed for computation: long const s_w = s_w_d->get();
    -  long const s_y = s_y_d->get();
    -  long const s_x = s_x_d->get();
    -
    -  long const a_h = a_h_d->get();
    -  long const a_w = a_w_d->get();
    -  long const a_y = a_y_d->get();
    -  long const a_x = a_x_d->get();
    -
    -  TokenArray indices;
    -  indices.reserve( a_w * a_h );
    -
    -  // compute upper left corner in source array:
    -  long const s_0_y = s_y - a_y;
    -  long const s_0_x = s_x - a_x;
    -
    -  for ( long y = 0; y < a_h; ++y )
    -  {
    -    for ( long x = 0; x < a_w; ++x )
    -    {
    -      indices.push_back( s_0_y + y );
    -      indices.push_back( s_0_x + x );
    -    }
    -  }
    -
    -  i->OStack.pop( 6 );
    -  i->OStack.push_by_pointer( new ArrayDatum( indices ) );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: cv1d - convert 2-dimensional coordinates to 1-dim index
    -
    -Synopsis: y   x   w  cv1d -> i
    -
    -Description: This function converts a 2-dimensional matrix address to
    -the corresponding index of a linear array.  Useful if you have to handle
    -2-dimensional data (e.g. an image) which is stored in a linear array.
    -Note that by convention the origin is 0,0 and at the upper left corner.
    -
    -Parameters: y : integer. the y-coordinate
    -x : integer. the x coordinate
    -w : integer. the border with of the 2-dimensional coordinate system
    -
    -Example: 3 2 4 cv1d -> 14
    -3 is the y-coordinate (row)
    -2 is the x coordinate (column)
    -4 is the number of columns
    -14 is the index of the corresponding element in a 1-dimensional array
    -
    -SeeAlso: cst, cva, cv2d, cvd, cvi, cvlit, cvn, cvs, cvt_a
    -*/
    -void
    -SLIArrayModule::Cv1dFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 3 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "cv1d", "Too few parameters supplied." );
    -    i->message( SLIInterpreter::M_ERROR, "cv1d", "Usage: y x w cv1d" );
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  IntegerDatum* w = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  IntegerDatum* x = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* y = dynamic_cast< IntegerDatum* >( i->OStack.pick( 2 ).datum() );
    -
    -  if ( not w )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "cv1d", "integertype expected" );
    -    i->message( SLIInterpreter::M_ERROR, "cv1d", "Usage: y x w cv1d" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  if ( not x )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "cv1d", "integertype expected" );
    -    i->message( SLIInterpreter::M_ERROR, "cv1d", "Usage: y x w cv1d" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  if ( not y )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "cv1d", "integertype expected" );
    -    i->message( SLIInterpreter::M_ERROR, "cv1d", "Usage: y x w cv1d" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  // y= y*w + x
    -  y->get() *= ( w->get() );
    -  y->get() += ( x->get() );
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -  // no i->OStack.push(), because we change the objects directly
    -  // on the stack. Low overhead.
    -}
    -
    -/** @BeginDocumentation
    -Name: cv2d - convert 1-dimensional index to 2-dim coordinate
    -
    -Synopsis: i  w  cv2d -> y   x
    -int int        int int
    -
    -Description:This function transforms an array index to y,x
    -coordinate pair. Useful if you have intrinsically 2-dimensional
    -data stored in a linear array (e.g. images).
    -
    -Parameters:i : integer. the index in the array
    -h : integer. the number of rows in the 2-dimensional space
    -w : integer. the number of columns in the 2-dimensional space
    -
    -
    -Example:14 4 cv2d -> 3 2
    -14 is the index of the corresponding element in a 1-dimensional array
    -4 is the number of columns
    -3 is the resulting y-coordinate (row)
    -2 is the resulting x-coordinate (column)
    -
    -SeeAlso: cst, cva, cv1d, cvd, cvi, cvlit, cvn, cvs, cvt_a
    -*/
    -void
    -SLIArrayModule::Cv2dFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "cv2d", "Too few parameters supplied." );
    -    i->message( SLIInterpreter::M_ERROR, "cv2d", "Usage: i w cv2d" );
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  IntegerDatum* w = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  IntegerDatum* in = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  if ( not w )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "cv2d", "integertype expected" );
    -    i->message( SLIInterpreter::M_ERROR, "cv2d", "Usage: i w cv2d" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  if ( not in )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "cv2d", "integertype expected" );
    -    i->message( SLIInterpreter::M_ERROR, "cv2d", "Usage: i w cv2d" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -
    -  long tmp = in->get();
    -  //  y = i / w
    -  ( in->get() ) /= ( w->get() );
    -  // x = i % w
    -  *w = tmp % w->get();
    -  i->EStack.pop();
    -  // no i->OStack.push(), because we change the objects directly
    -  // on the stack. Low overhead.
    -}
    -
    -
    -/** @BeginDocumentation
    -Name: GetMax - get maximal element
    -
    -Synopsis: array GetMax -> int
    -
    -Description: returns the maximum value in an array of ints.
    -
    -SeeAlso: GetMin
    -
    -Remarks: works only for integer arrays.
    -*/
    -void
    -SLIArrayModule::GetMaxFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "GetMax", "Too few parameters supplied." );
    -    i->message( SLIInterpreter::M_ERROR, "GetMax", "Usage: <array> GetMax" );
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  ArrayDatum* a = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  if ( not a )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "GetMax", "argument must be an array" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  IntegerDatum* tmp = dynamic_cast< IntegerDatum* >( a->begin()->datum() );
    -  if ( not tmp )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "GetMax", "argument array may only contain integers" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  IntegerDatum* tmp2;
    -  unsigned int pos = 0;
    -  while ( pos < a->size() )
    -  {
    -    tmp2 = dynamic_cast< IntegerDatum* >( a->get( pos ).datum() );
    -    if ( not tmp2 )
    -    {
    -      i->message( SLIInterpreter::M_ERROR, "GetMax", "argument array may only contain integers" );
    -      i->raiseerror( i->ArgumentTypeError );
    -      return;
    -    }
    -    if ( tmp->get() < tmp2->get() )
    -    {
    -      tmp = tmp2;
    -    }
    -    ++pos;
    -  }
    -  Token result( *tmp );
    -
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: GetMin - get minimal element
    -
    -Synopsis: array GetMin -> int
    -
    -Description: returns the minimum value in an array of ints.
    -
    -Remarks: works only for integer arrays.
    -
    -SeeAlso: GetMax
    -*/
    -void
    -SLIArrayModule::GetMinFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "GetMin", "Too few parameters supplied." );
    -    i->message( SLIInterpreter::M_ERROR, "GetMin", "Usage: <array> GetMin" );
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  ArrayDatum* a = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  if ( not a )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "GetMin", "argument must be an array" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -
    -  IntegerDatum* tmp = dynamic_cast< IntegerDatum* >( a->begin()->datum() );
    -  if ( not tmp )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "GetMin", "argument array may only contain integers" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  IntegerDatum* tmp2;
    -  unsigned int pos = 0;
    -  while ( pos < a->size() )
    -  {
    -    tmp2 = dynamic_cast< IntegerDatum* >( a->get( pos ).datum() );
    -    if ( not tmp2 )
    -    {
    -      i->message( SLIInterpreter::M_ERROR, "GetMin", "argument array may only contain integers" );
    -      i->raiseerror( i->ArgumentTypeError );
    -      return;
    -    }
    -    if ( tmp->get() > tmp2->get() )
    -    {
    -      tmp = tmp2;
    -    }
    -    ++pos;
    -  }
    -  Token result( *tmp );
    -
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: gabor_ - Return 2D array with Gabor patch.
    -
    -Synopsis:
    -nr nc xmin xmax ymin ymax lambda orient phase sigma el
    -
    -Description:
    -Returns an nr by nc matrix with a Gabor patch, computed over the
    -argument range of [xmin,xmax] by [ymin,ymax].
    -This function is the low level variant of the more user-friendly
    -GaborPatch.
    -
    -SeeAlso: arraylib::GaborPatch
    -
    -Author: Marc-Oliver Gewaltig
    -
    -References: Petkov N and Kruizinga P: Biol. Cybern. 76, 83-96 (1997)
    -*/
    -void
    -SLIArrayModule::GaborFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 11 )
    -  {
    -    i->raiseerror( "StackUnderflow" );
    -    return;
    -  }
    -
    -  long nrow = 0;
    -  long ncol = 0;
    -  double xmin = 0.0;
    -  double xmax = 0.0;
    -  double ymin = 0.0;
    -  double ymax = 0.0;
    -  double lambda = 0.0;
    -  double phi = 0.0;
    -  double phase = 0.0;
    -  double sigma = 0.0;
    -  double gamma = 0.0;
    -
    -  try
    -  {
    -    nrow = getValue< long >( i->OStack.pick( 10 ) );
    -    ncol = getValue< long >( i->OStack.pick( 9 ) );
    -    xmin = getValue< double >( i->OStack.pick( 8 ) );
    -    xmax = getValue< double >( i->OStack.pick( 7 ) );
    -    ymin = getValue< double >( i->OStack.pick( 6 ) );
    -    ymax = getValue< double >( i->OStack.pick( 5 ) );
    -    lambda = getValue< double >( i->OStack.pick( 4 ) );
    -    phi = getValue< double >( i->OStack.pick( 3 ) );
    -    phase = getValue< double >( i->OStack.pick( 2 ) );
    -    sigma = getValue< double >( i->OStack.pick( 1 ) );
    -    gamma = getValue< double >( i->OStack.pick( 0 ) );
    -  }
    -  catch ( ... )
    -  {
    -    i->raiseerror( "ArgumentType" );
    -    return;
    -  }
    -  if ( ymin >= ymax )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "Gabor_", "y_max must be > y_min." );
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  if ( xmin >= xmax )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "Gabor_", "x_max must be > x_min." );
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  if ( ncol < 2 or nrow < 2 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "Gabor_", "Matrix must have at least two rows and two columns." );
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -
    -  assert( ymax > ymin );
    -  assert( xmax > xmin );
    -  assert( ncol > 1 );
    -  assert( nrow > 1 );
    -
    -  const double sig_sq = 2.0 * sigma * sigma;
    -  const double gam_sq = gamma * gamma;
    -  const double cos_phi = std::cos( phi );
    -  const double sin_phi = std::sin( phi );
    -  const double s_fact = 2.0 * numerics::pi * std::sin( phi ) / lambda;
    -  const double c_fact = 2.0 * numerics::pi * std::cos( phi ) / lambda;
    -  const double dx = ( xmax - xmin ) / ( ncol - 1.0 );
    -  const double dy = ( ymax - ymin ) / ( nrow - 1.0 );
    -
    -  ArrayDatum result;
    -  result.reserve( nrow );
    -
    -  std::vector< double > col( ncol );
    -  for ( size_t r = 0; r < ( size_t ) nrow; ++r )
    -  {
    -    const double y = ymin + r * dy;
    -    for ( size_t c = 0; c < ( size_t ) ncol; ++c )
    -    {
    -      const double x = xmin + c * dx;
    -      const double x1 = x * cos_phi - y * sin_phi;
    -      const double y1 = x * sin_phi + y * cos_phi;
    -      const double x2 = x * c_fact - y * s_fact;
    -
    -      col[ c ] = std::exp( -( x1 * x1 + gam_sq * y1 * y1 ) / sig_sq ) * std::cos( x2 - phase );
    -    }
    -    result.push_back( new ArrayDatum( col ) );
    -  }
    -  i->OStack.pop( 11 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: gauss2d_ - Return 2D array with Gauss patch.
    -
    -Synopsis:
    -nr nc xmin xmax ymin ymax phi sigma gamma
    -
    -Description:
    -Returns an nr by nc matrix with a Gauss patch, computed over the
    -argument range of [xmin,xmax] by [ymin,ymax].
    -This function is the low level variant of the more user-friendly
    -GaussPatch.
    -
    -SeeAlso: arraylib::GaussPatch
    -
    -Author: Marc-Oliver Gewaltig
    -*/
    -void
    -SLIArrayModule::Gauss2dFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 9 )
    -  {
    -    i->raiseerror( "StackUnderflow" );
    -    return;
    -  }
    -
    -  long nrow = 0;
    -  long ncol = 0;
    -  double xmin = 0.0;
    -  double xmax = 0.0;
    -  double ymin = 0.0;
    -  double ymax = 0.0;
    -  double phi = 0.0;
    -  double sigma = 0.0;
    -  double gamma = 0.0;
    -
    -  try
    -  {
    -    nrow = getValue< long >( i->OStack.pick( 8 ) );
    -    ncol = getValue< long >( i->OStack.pick( 7 ) );
    -    xmin = getValue< double >( i->OStack.pick( 6 ) );
    -    xmax = getValue< double >( i->OStack.pick( 5 ) );
    -    ymin = getValue< double >( i->OStack.pick( 4 ) );
    -    ymax = getValue< double >( i->OStack.pick( 3 ) );
    -    phi = getValue< double >( i->OStack.pick( 2 ) );
    -    sigma = getValue< double >( i->OStack.pick( 1 ) );
    -    gamma = getValue< double >( i->OStack.pick( 0 ) );
    -  }
    -  catch ( ... )
    -  {
    -    i->raiseerror( "ArgumentType" );
    -    return;
    -  }
    -  if ( ymin >= ymax )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "gauss2d_", "y_max must be > y_min." );
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  if ( xmin >= xmax )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "gauss2s_", "x_max must be > x_min." );
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  if ( ncol < 2 or nrow < 2 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "gauss2d_", "Matrix must have at least two rows and two columns." );
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -
    -  assert( ymax > ymin );
    -  assert( xmax > xmin );
    -  assert( ncol > 1 );
    -  assert( nrow > 1 );
    -
    -  const double sig_sq = 2.0 * sigma * sigma;
    -  const double gam_sq = gamma * gamma;
    -  const double dx = ( xmax - xmin ) / ( ncol - 1.0 );
    -  const double dy = ( ymax - ymin ) / ( nrow - 1.0 );
    -  const double cos_phi = std::cos( phi );
    -  const double sin_phi = std::sin( phi );
    -
    -  ArrayDatum result;
    -  result.reserve( nrow );
    -
    -  std::vector< double > col( ncol );
    -  for ( size_t r = 0; r < ( size_t ) nrow; ++r )
    -  {
    -    const double y = ymin + r * dy;
    -    col.assign( ncol, 0.0 ); // clear contents
    -    for ( size_t c = 0; c < ( size_t ) ncol; ++c )
    -    {
    -      const double x = xmin + c * dx;
    -      const double x1 = x * cos_phi - y * sin_phi;
    -      const double y1 = x * sin_phi + y * cos_phi;
    -
    -      col[ c ] = std::exp( -( x1 * x1 + gam_sq * y1 * y1 ) / sig_sq );
    -    }
    -    result.push_back( new ArrayDatum( col ) );
    -  }
    -  i->OStack.pop( 9 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Array2IntVectorFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  try
    -  {
    -    IntVectorDatum ivd( new std::vector< long >( getValue< std::vector< long > >( i->OStack.top() ) ) );
    -    i->OStack.pop();
    -    i->OStack.push( ivd );
    -  }
    -  catch ( ... )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Array2DoubleVectorFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  try
    -  {
    -    DoubleVectorDatum ivd( new std::vector< double >( getValue< std::vector< double > >( i->OStack.top() ) ) );
    -    i->OStack.pop();
    -    i->OStack.push( ivd );
    -  }
    -  catch ( ... )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::IntVector2ArrayFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( i->OStack.top().datum() );
    -  if ( not ivd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  ArrayDatum ad( **ivd );
    -  i->OStack.pop();
    -  i->OStack.push( ad );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Add_iv_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* ivd1 = dynamic_cast< IntVectorDatum* >( i->OStack.top().datum() );
    -  if ( not ivd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* ivd2 = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not ivd2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( ( *ivd1 )->size() != ( *ivd2 )->size() )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "add_iv_iv", "You can only add vectors of the same length." );
    -    i->raiseerror( "RangeCheck" );
    -  }
    -
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( **ivd1 ) );
    -  const size_t length = ( **ivd1 ).size();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] += ( **ivd2 )[ j ];
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Add_i_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not id )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not ivd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( **ivd ) );
    -  const size_t length = ( **ivd ).size();
    -  const long value = id->get();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] += value;
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Neg_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not ivd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t length = ( **ivd ).size();
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( length ) );
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] = -( **ivd )[ j ];
    -  }
    -
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Sub_iv_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* ivd1 = dynamic_cast< IntVectorDatum* >( i->OStack.top().datum() );
    -  if ( not ivd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* ivd2 = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not ivd2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( ( **ivd1 ).size() != ( **ivd2 ).size() )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "sub_iv_iv", "You can only subtract vectors of the same length." );
    -    i->raiseerror( "RangeCheck" );
    -  }
    -
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( **ivd1 ) );
    -  const size_t length = ( **ivd1 ).size();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] -= ( **ivd2 )[ j ];
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Mul_iv_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* ivd1 = dynamic_cast< IntVectorDatum* >( i->OStack.top().datum() );
    -  if ( not ivd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* ivd2 = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not ivd2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( ( **ivd1 ).size() != ( **ivd2 ).size() )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "mul_iv_iv", "You can only multiply vectors of the same length." );
    -    i->raiseerror( "RangeCheck" );
    -  }
    -
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( **ivd1 ) );
    -  const size_t length = ( **ivd1 ).size();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] *= ( **ivd2 )[ j ];
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -SLIArrayModule::Mul_i_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not id )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not ivd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( **ivd ) );
    -  const size_t length = ( **ivd ).size();
    -  const long factor = id->get();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] *= factor;
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Mul_d_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleDatum* dd = dynamic_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not dd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not ivd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t length = ( **ivd ).size();
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( length ) );
    -  const double factor = dd->get();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] = factor * static_cast< double >( ( **ivd )[ j ] );
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Div_iv_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* ivd1 = dynamic_cast< IntVectorDatum* >( i->OStack.top().datum() );
    -  if ( not ivd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* ivd2 = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not ivd2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( ( **ivd1 ).size() != ( **ivd2 ).size() )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "div_iv_iv", "You can only divide vectors of the same length." );
    -    i->raiseerror( "RangeCheck" );
    -  }
    -
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( **ivd1 ) );
    -  const size_t length = ( **ivd1 ).size();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    const long quotient = ( **ivd2 )[ j ];
    -    if ( quotient == 0 )
    -    {
    -      delete result;
    -      i->message( SLIInterpreter::M_ERROR, "div_iv", "Vector element zero encountered." );
    -      i->raiseerror( "DivisionByZero" );
    -      return;
    -    }
    -    ( **result )[ j ] /= quotient;
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Length_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( i->OStack.top().datum() );
    -  if ( not ivd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t length = ( **ivd ).size();
    -
    -  i->OStack.pop();
    -  i->OStack.push( new IntegerDatum( length ) );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -SLIArrayModule::Add_dv_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd1 = dynamic_cast< DoubleVectorDatum* >( i->OStack.top().datum() );
    -  if ( not dvd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd2 = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not dvd2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( ( **dvd1 ).size() != ( **dvd2 ).size() )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "add_dv_dv", "You can only add vectors of the same length." );
    -    i->raiseerror( "RangeCheck" );
    -  }
    -
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( **dvd1 ) );
    -  const size_t length = ( **dvd1 ).size();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] += ( **dvd2 )[ j ];
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Sub_dv_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd1 = dynamic_cast< DoubleVectorDatum* >( i->OStack.top().datum() );
    -  if ( not dvd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd2 = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not dvd2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( ( **dvd1 ).size() != ( **dvd2 ).size() )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "sub_dv_dv", "You can only subtract vectors of the same length." );
    -    i->raiseerror( "RangeCheck" );
    -  }
    -
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( **dvd1 ) );
    -  const size_t length = ( **dvd1 ).size();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] -= ( **dvd2 )[ j ];
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Add_d_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleDatum* dd = dynamic_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not dd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not dvd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( **dvd ) );
    -  const size_t length = ( **dvd ).size();
    -  const double value = ( *dd ).get();
    -
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] += value;
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -SLIArrayModule::Mul_d_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleDatum* dd = dynamic_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not dd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not dvd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( **dvd ) );
    -  const size_t length = ( **dvd ).size();
    -  const double value = ( *dd ).get();
    -
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] *= value;
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -SLIArrayModule::Neg_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd = dynamic_cast< DoubleVectorDatum* >( i->OStack.top().datum() );
    -  if ( not dvd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t length = ( **dvd ).size();
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( length ) );
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] = -( **dvd )[ j ];
    -  }
    -
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -SLIArrayModule::Inv_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd = dynamic_cast< DoubleVectorDatum* >( i->OStack.top().datum() );
    -  if ( not dvd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t length = ( **dvd ).size();
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( length ) );
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    const double& val = ( **dvd )[ j ];
    -    if ( val * val < 1.0e-100 )
    -    {
    -      delete result;
    -      i->message( SLIInterpreter::M_ERROR, "inv_dv", "Vector element (near) zero encountered." );
    -      i->raiseerror( "DivisionByZero" );
    -      return;
    -    }
    -    ( **result )[ j ] = 1.0 / val;
    -  }
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -SLIArrayModule::Mul_dv_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd1 = dynamic_cast< DoubleVectorDatum* >( i->OStack.top().datum() );
    -  if ( not dvd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd2 = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not dvd2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( ( **dvd1 ).size() != ( **dvd2 ).size() )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "mul_dv_dv", "You can only multiply vectors of the same length." );
    -    i->raiseerror( "RangeCheck" );
    -  }
    -
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( **dvd1 ) );
    -  const size_t length = ( **dvd1 ).size();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    ( **result )[ j ] *= ( **dvd2 )[ j ];
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Div_dv_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd1 = dynamic_cast< DoubleVectorDatum* >( i->OStack.top().datum() );
    -  if ( not dvd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd2 = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not dvd2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( ( **dvd1 ).size() != ( **dvd2 ).size() )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "div_iv_iv", "You can only divide vectors of the same length." );
    -    i->raiseerror( "RangeCheck" );
    -  }
    -
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( **dvd1 ) );
    -  const size_t length = ( **dvd1 ).size();
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    const double quotient = ( **dvd2 )[ j ];
    -    if ( quotient * quotient < 1e-100 )
    -    {
    -      delete result;
    -      i->message( SLIInterpreter::M_ERROR, "div_dv", "Vector element (near) zero encountered." );
    -      i->raiseerror( "DivisionByZero" );
    -      return;
    -    }
    -    ( **result )[ j ] /= quotient;
    -  }
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Length_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd1 = dynamic_cast< DoubleVectorDatum* >( i->OStack.top().datum() );
    -  if ( not dvd1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t length = ( **dvd1 ).size();
    -
    -  i->OStack.pop();
    -  i->OStack.push( new IntegerDatum( length ) );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Get_dv_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not id )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* dvd = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not dvd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t idx = id->get();
    -  if ( idx >= ( **dvd ).size() )
    -  {
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  DoubleDatum* result = new DoubleDatum( ( **dvd )[ idx ] );
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Get_iv_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not id )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* vd = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not vd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t idx = id->get();
    -  if ( idx >= ( **vd ).size() )
    -  {
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  IntegerDatum* result = new IntegerDatum( ( **vd )[ idx ] );
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Get_iv_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* id = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not id )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* vd = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not vd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t length = ( **id ).size();
    -  const size_t max_idx = ( **vd ).size();
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( length ) );
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    const size_t idx = ( **id )[ j ];
    -    if ( idx >= max_idx )
    -    {
    -      delete result;
    -      i->raiseerror( "RangeCheck" );
    -      return;
    -    }
    -    ( **result )[ j ] = ( **vd )[ idx ];
    -  }
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Get_dv_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntVectorDatum* id = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not id )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* vd = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not vd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t length = ( **id ).size();
    -  const size_t max_idx = ( **vd ).size();
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( length ) );
    -  for ( size_t j = 0; j < length; ++j )
    -  {
    -    const size_t idx = ( **id )[ j ];
    -    if ( idx >= max_idx )
    -    {
    -      delete result;
    -      i->raiseerror( "RangeCheck" );
    -      return;
    -    }
    -    ( **result )[ j ] = ( **vd )[ idx ];
    -  }
    -  i->OStack.pop( 2 );
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -// vector idx val put -> vector
    -void
    -SLIArrayModule::Put_dv_i_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 3 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleDatum* val = dynamic_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not val )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntegerDatum* idxd = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not idxd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  DoubleVectorDatum* vecd = dynamic_cast< DoubleVectorDatum* >( i->OStack.pick( 2 ).datum() );
    -  if ( not vecd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t idx = idxd->get();
    -  if ( idx >= ( **vecd ).size() )
    -  {
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  ( **vecd )[ idx ] = val->get();
    -
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Put_iv_i_iFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  IntegerDatum* val = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( not val )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntegerDatum* idxd = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not idxd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  IntVectorDatum* vecd = dynamic_cast< IntVectorDatum* >( i->OStack.pick( 2 ).datum() );
    -  if ( not vecd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const size_t idx = idxd->get();
    -  if ( idx >= ( **vecd ).size() )
    -  {
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  ( **vecd )[ idx ] = val->get();
    -
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::DoubleVector2ArrayFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  DoubleVectorDatum* ivd = dynamic_cast< DoubleVectorDatum* >( i->OStack.top().datum() );
    -  if ( not ivd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  ArrayDatum ad( **ivd );
    -  i->OStack.pop();
    -  i->OStack.push( ad );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Zeros_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* num = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  if ( not num )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( num->get() < 0 )
    -  {
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( num->get(), 0.0 ) );
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Ones_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* num = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  if ( not num )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( num->get() < 0 )
    -  {
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  DoubleVectorDatum* result = new DoubleVectorDatum( new std::vector< double >( num->get(), 1.0 ) );
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Zeros_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* num = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  if ( not num )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( num->get() < 0 )
    -  {
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( num->get(), 0L ) );
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Ones_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* num = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  if ( not num )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  if ( num->get() < 0 )
    -  {
    -    i->raiseerror( "RangeCheck" );
    -    return;
    -  }
    -  IntVectorDatum* result = new IntVectorDatum( new std::vector< long >( num->get(), 1L ) );
    -  i->OStack.pop();
    -  i->OStack.push( result );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::FiniteQ_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  const double x = getValue< double >( i->OStack.pick( 0 ) );
    -
    -  BoolDatum res( -std::numeric_limits< double >::max() <= x and x <= std::numeric_limits< double >::max() );
    -  i->OStack.push( res );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -SLIArrayModule::Forall_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  static Token mark( i->baselookup( i->mark_name ) );
    -  static Token forall( i->baselookup( sli::iforall_iv ) );
    -
    -  ProcedureDatum* proc = static_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -
    -  i->EStack.pop();
    -  i->EStack.push_by_ref( mark );
    -  i->EStack.push_move( i->OStack.pick( 1 ) );         // push object
    -  i->EStack.push_by_pointer( new IntegerDatum( 0 ) ); // push array counter
    -  i->EStack.push_by_ref( i->OStack.pick( 0 ) );       // push procedure
    -  // push procedure counter
    -  i->EStack.push_by_pointer( new IntegerDatum( proc->size() ) );
    -  i->EStack.push_by_ref( forall );
    -  i->OStack.pop( 2 );
    -  i->inc_call_depth();
    -}
    -/*********************************************************/
    -/* %forall_iv                                          */
    -/*  call: mark object count proc n %forall_iv      */
    -/*  pick    5     4    3     2    1    0               */
    -/*********************************************************/
    -void
    -SLIArrayModule::Iforall_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  IntegerDatum* proccount = static_cast< IntegerDatum* >( i->EStack.pick( 1 ).datum() );
    -
    -  ProcedureDatum const* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 2 ).datum() );
    -
    -  long& pos = proccount->get();
    -
    -  while ( proc->index_is_valid( pos ) )
    -  {
    -    const Token& t = proc->get( pos );
    -    ++pos;
    -    if ( t->is_executable() )
    -    {
    -      i->EStack.push( t );
    -      return;
    -    }
    -    i->OStack.push( t );
    -  }
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -  IntVectorDatum* ad = static_cast< IntVectorDatum* >( i->EStack.pick( 4 ).datum() );
    -
    -  size_t idx = count->get();
    -
    -  if ( idx < ( **ad ).size() )
    -  {
    -    pos = 0; // reset procedure interator
    -
    -    i->OStack.push( new IntegerDatum( ( **ad )[ idx ] ) ); // push counter to user
    -    ++( count->get() );
    -  }
    -  else
    -  {
    -    i->EStack.pop( 6 );
    -    i->dec_call_depth();
    -  }
    -}
    -
    -
    -void
    -SLIArrayModule::Iforall_ivFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( count );
    -
    -  std::cerr << "During forall (IntVector) at iteration " << count->get() << "." << std::endl;
    -}
    -
    -void
    -SLIArrayModule::Forall_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  static Token mark( i->baselookup( i->mark_name ) );
    -  static Token forall( i->baselookup( sli::iforall_dv ) );
    -
    -  ProcedureDatum* proc = static_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -
    -  i->EStack.pop();
    -  i->EStack.push_by_ref( mark );
    -  i->EStack.push_move( i->OStack.pick( 1 ) );         // push object
    -  i->EStack.push_by_pointer( new IntegerDatum( 0 ) ); // push array counter
    -  i->EStack.push_by_ref( i->OStack.pick( 0 ) );       // push procedure
    -  // push procedure counter
    -  i->EStack.push_by_pointer( new IntegerDatum( proc->size() ) );
    -  i->EStack.push_by_ref( forall );
    -  i->OStack.pop( 2 );
    -  i->inc_call_depth();
    -}
    -
    -/*********************************************************/
    -/* %forall_iv                                          */
    -/*  call: mark object count proc n %forall_iv      */
    -/*  pick    5     4    3     2    1    0               */
    -/*********************************************************/
    -void
    -SLIArrayModule::Iforall_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  IntegerDatum* proccount = static_cast< IntegerDatum* >( i->EStack.pick( 1 ).datum() );
    -
    -  ProcedureDatum const* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 2 ).datum() );
    -
    -  long& pos = proccount->get();
    -
    -  while ( proc->index_is_valid( pos ) )
    -  {
    -    const Token& t = proc->get( pos );
    -    ++pos;
    -    if ( t->is_executable() )
    -    {
    -      i->EStack.push( t );
    -      return;
    -    }
    -    i->OStack.push( t );
    -  }
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -  DoubleVectorDatum* ad = static_cast< DoubleVectorDatum* >( i->EStack.pick( 4 ).datum() );
    -
    -  size_t idx = count->get();
    -
    -  if ( idx < ( **ad ).size() )
    -  {
    -    pos = 0; // reset procedure interator
    -
    -    i->OStack.push( new DoubleDatum( ( **ad )[ idx ] ) ); // push counter to user
    -    ++( *count );
    -  }
    -  else
    -  {
    -    i->EStack.pop( 6 );
    -    i->dec_call_depth();
    -  }
    -}
    -
    -
    -void
    -SLIArrayModule::Iforall_dvFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( count );
    -
    -  std::cerr << "During forall (DoubleVector) at iteration " << count->get() << "." << std::endl;
    -}
    -
    -/** @BeginDocumentation
    -   Name: eq_dv - tests for content equality between vectors of doubles
    -
    -   Synopsis:
    -     array array -> bool
    -
    -   Parameters:
    -     two array of doubles
    -
    -   Description:
    -     Deep equality test since regular eq is an identity test for vectors.
    -     Intent is to be used in mathematica.sli to override eq for
    -     doublevectortype.
    -
    -   Example:
    -     <. 1 .> <. 1 .> eq_ --> false
    -     <. 1 .> <. 1 .> eq_dv --> true
    -
    -   Author: Peyser
    - */
    -template < class T, class D >
    -static void
    -eq_execute( SLIInterpreter* i )
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  T* op1 = dynamic_cast< T* >( i->OStack.pick( 1 ).datum() );
    -  if ( not op1 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  T* op2 = dynamic_cast< T* >( i->OStack.pick( 0 ).datum() );
    -  if ( not op2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  const std::vector< D >* d1 = op1->get();
    -  op1->unlock();
    -  const std::vector< D >* d2 = op2->get();
    -  op2->unlock();
    -  bool eq = ( d1 == d2 or *d1 == *d2 );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( eq ) );
    -  i->EStack.pop();
    -}
    -
    -void
    -SLIArrayModule::Eq_dvFunction::execute( SLIInterpreter* i ) const
    -{
    -  eq_execute< DoubleVectorDatum, double >( i );
    -}
    -
    -/** @BeginDocumentation
    -   Name: eq_iv - tests for content equality between vectors of integers
    -
    -   Synopsis:
    -     array array -> bool
    -
    -   Parameters:
    -     two arrays of integers
    -
    -   Description:
    -     Deep equality test since regular eq is an identity test for vectors
    -     Intent is to be used in mathematica.sli to override eq for intvectortype.
    -
    -   Example:
    -     <# 1 #> <# 1 #> eq_ --> false
    -     <# 1 #> <# 1 #> eq_iv --> true
    -
    -   Author: Peyser
    - */
    -void
    -SLIArrayModule::Eq_ivFunction::execute( SLIInterpreter* i ) const
    -{
    -  eq_execute< IntVectorDatum, long >( i );
    -}
    -
    -void
    -SLIArrayModule::init( SLIInterpreter* i )
    -{
    -  i->createcommand( "MapIndexed_a", &mapindexedfunction );
    -  i->createcommand( "Map", &mapfunction );
    -  i->createcommand( "MapThread_a", &mapthreadfunction );
    -  i->createcommand( "Reverse", &reversefunction );
    -  i->createcommand( "Rotate", &rotatefunction );
    -  i->createcommand( "Flatten", &flattenfunction );
    -  i->createcommand( "Sort", &sortfunction );
    -  i->createcommand( "Transpose", &transposefunction );
    -  i->createcommand( "Partition_a_i_i", &partitionfunction );
    -  i->createcommand( sli::imap, &imapfunction );
    -  i->createcommand( sli::imap_dv, &imap_dvfunction );
    -  i->createcommand( sli::imap_iv, &imap_ivfunction );
    -  i->createcommand( sli::imapindexed, &imapindexedfunction );
    -  i->createcommand( "forall_iv", &forall_ivfunction );
    -  i->createcommand( "forall_dv", &forall_dvfunction );
    -  i->createcommand( sli::iforall_iv, &iforall_ivfunction );
    -  i->createcommand( sli::iforall_dv, &iforall_dvfunction );
    -  i->createcommand( "::MapThread", &imapthreadfunction );
    -  i->createcommand( "Range", &rangefunction );
    -  i->createcommand( "arrayload", &arrayloadfunction );
    -  i->createcommand( "arraystore", &arraystorefunction );
    -  i->createcommand( "arraycreate", &arraycreatefunction );
    -
    -  i->createcommand( "]", &arraycreatefunction );
    -
    -  i->createcommand( "valid_a", &validfunction );
    -  i->createcommand( "area", &areafunction );
    -  i->createcommand( "area2", &area2function );
    -  i->createcommand( "cv1d", &cv1dfunction );
    -  i->createcommand( "cv2d", &cv2dfunction );
    -  i->createcommand( "GetMax", &getmaxfunction );
    -  i->createcommand( "GetMin", &getminfunction );
    -  i->createcommand( "gabor_", &gaborfunction );
    -  i->createcommand( "gauss2d_", &gauss2dfunction );
    -  i->createcommand( "put_a_a_t", &put_a_a_tfunction );
    -  i->createcommand( "array2intvector", &array2intvectorfunction );
    -  i->createcommand( "array2doublevector", &array2doublevectorfunction );
    -  i->createcommand( "doublevector2array", &doublevector2arrayfunction );
    -  i->createcommand( "intvector2array", &intvector2arrayfunction );
    -  i->createcommand( "add_iv_iv", &add_iv_ivfunction );
    -  i->createcommand( "add_i_iv", &add_i_ivfunction );
    -  i->createcommand( "sub_iv_iv", &sub_iv_ivfunction );
    -  i->createcommand( "neg_iv", &neg_ivfunction );
    -  i->createcommand( "mul_iv_iv", &mul_iv_ivfunction );
    -  i->createcommand( "mul_i_iv", &mul_i_ivfunction );
    -  i->createcommand( "mul_d_iv", &mul_d_ivfunction );
    -  i->createcommand( "div_iv_iv", &div_iv_ivfunction );
    -  i->createcommand( "length_iv", &length_ivfunction );
    -
    -  i->createcommand( "add_dv_dv", &add_dv_dvfunction );
    -  i->createcommand( "add_d_dv", &add_d_dvfunction );
    -
    -  i->createcommand( "sub_dv_dv", &sub_dv_dvfunction );
    -  i->createcommand( "neg_dv", &neg_dvfunction );
    -
    -  i->createcommand( "mul_dv_dv", &mul_dv_dvfunction );
    -  i->createcommand( "mul_d_dv", &mul_d_dvfunction );
    -
    -  i->createcommand( "div_dv_dv", &div_dv_dvfunction );
    -  i->createcommand( "inv_dv", &inv_dvfunction );
    -  i->createcommand( "length_dv", &length_dvfunction );
    -
    -  i->createcommand( "eq_dv", &eq_dvfunction );
    -  i->createcommand( "eq_iv", &eq_ivfunction );
    -
    -  i->createcommand( "get_iv_i", &get_iv_ifunction );
    -  i->createcommand( "get_iv_iv", &get_iv_ivfunction );
    -  i->createcommand( "get_dv_i", &get_dv_ifunction );
    -  i->createcommand( "get_dv_iv", &get_dv_ivfunction );
    -  i->createcommand( "put_dv_i_d", &put_dv_i_dfunction );
    -  i->createcommand( "put_iv_i_i", &put_iv_i_ifunction );
    -  i->createcommand( "zeros_dv", &zeros_dvfunction );
    -  i->createcommand( "ones_dv", &ones_dvfunction );
    -  i->createcommand( "zeros_iv", &zeros_ivfunction );
    -  i->createcommand( "ones_iv", &ones_ivfunction );
    -  i->createcommand( "arange", &arangefunction );
    -
    -  i->createcommand( "finite_q_d", &finiteq_dfunction );
    -}
    diff --git a/sli/sliarray.h b/sli/sliarray.h
    deleted file mode 100644
    index 609371d055..0000000000
    --- a/sli/sliarray.h
    +++ /dev/null
    @@ -1,645 +0,0 @@
    -/*
    - *  sliarray.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIARRAY_H
    -#define SLIARRAY_H
    -/*
    -    SLI's array access functions
    -*/
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -#include "slimodule.h"
    -
    -/**
    - * SLI module defining array functions.
    - * This class implements the SLI functions which operate on SLI arrays.
    - */
    -class SLIArrayModule : public SLIModule
    -{
    -  /**
    -   * @defgroup sliarray SLI array functions
    -   * SLI functions that operate on SLI arrays.
    -   * @{
    -   */
    -  class MapFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class IMapFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -    void backtrace( SLIInterpreter*, int ) const override;
    -  };
    -  class IMap_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -    void backtrace( SLIInterpreter*, int ) const override;
    -  };
    -  class IMap_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -    void backtrace( SLIInterpreter*, int ) const override;
    -  };
    -  class MapThreadFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class IMapThreadFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -    void backtrace( SLIInterpreter*, int ) const override;
    -  };
    -
    -  class MapIndexedFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class IMapIndexedFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -    void backtrace( SLIInterpreter*, int ) const override;
    -  };
    -
    -  class RangeFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class ArraystoreFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class ArrayloadFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class ArraycreateFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class ReverseFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class RotateFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class FlattenFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class SortFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class UniqueFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class TransposeFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -
    -  class PartitionFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class ValidFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Put_a_a_tFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  /**
    -   * Return array of indices defining a 2d subarea of a 2d array.
    -   *
    -   * Given a -- hypothetical -- twodimensional array,
    -   * "area" tells you, what indices you need to
    -   * subscript a contiguous, twodimensional subarea.
    -   * Returns 1-d indices.
    -   *
    -   * For further information refer to the SLI documentation.
    -   *
    -   * @par Synopsis:
    -   *                    source_width source_anchor_y source_anchor_x
    -   *        area_height   area_width   area_anchor_y   area_anchor_x
    -   *                                                   area -> *[1d-indices]
    -   *
    -   * @param source_width    width  of the (hypothetical) source
    -   *                        array to be subscribed into
    -   * @param source_anchor_y y position of the anchor point relative
    -   *                        to ORIGIN OF THE SOURCE ARRAY
    -   * @param source_anchor_x x position of the anchor point relative
    -   *                        to ORIGIN OF THE SOURCE ARRAY
    -   *
    -   * @param area_height     height of the subarea to be subscribed
    -   * @param area_width      width  of the subarea to be subscribed
    -   * @param area_anchor_y   y position of the anchor point relative
    -   *                        to ORIGIN OF THE SUBAREA
    -   * @param area_anchor_x   x position of the anchor point relative
    -   *                        to ORIGIN OF THE SUBAREA
    -   *
    -   * @return \a [1d-indices] flat integer array containing the indices
    -   *                         that can be used to subscript the
    -   *                         (hypothetical) source array in order to
    -   *                         access the desired subarea.
    -   */
    -  class AreaFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  /**
    -   * Return array of indices defining a 2d subarea of a 2d array.
    -   *
    -   * Given a -- hypothetical -- twodimensional array,
    -   * "area" tells you, what indices you need to
    -   * subscript a contiguous, twodimensional subarea.
    -   * Returns 2-d indices.
    -   *
    -   * For further information refer to the SLI documentation.
    -   *
    -   * @par Synopsis:
    -   *                                 source_anchor_y source_anchor_x
    -   *        area_height   area_width   area_anchor_y   area_anchor_x
    -   *                                                   area -> *[1d-indices]
    -   *
    -   * @param source_anchor_y y position of the anchor point relative
    -   *                        to ORIGIN OF THE SOURCE ARRAY
    -   * @param source_anchor_x x position of the anchor point relative
    -   *                        to ORIGIN OF THE SOURCE ARRAY
    -   *
    -   * @param area_height     height of the subarea to be subscribed
    -   * @param area_width      width  of the subarea to be subscribed
    -   * @param area_anchor_y   y position of the anchor point relative
    -   *                        to ORIGIN OF THE SUBAREA
    -   * @param area_anchor_x   x position of the anchor point relative
    -   *                        to ORIGIN OF THE SUBAREA
    -   *
    -   * @return \a [2d-indices] flat integer array containing the indices
    -   *                         that can be used to subscript the
    -   *                         (hypothetical) source array in order to
    -   *                         access the desired subarea.
    -   */
    -  class Area2Function : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Cv1dFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Cv2dFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class GetMaxFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class GetMinFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -
    -  /**
    -   * Generate two-dimensional array with Gabor patch.
    -   */
    -  class GaborFunction : public SLIFunction
    -  {
    -  public:
    -    GaborFunction()
    -    {
    -    }
    -
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  /**
    -   * Generate two-dimensional array with Gauss patch.
    -   */
    -  class Gauss2dFunction : public SLIFunction
    -  {
    -  public:
    -    Gauss2dFunction()
    -    {
    -    }
    -
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -
    -  /**
    -   * Convert SLI array to std::vector.
    -   */
    -
    -  class Array2IntVectorFunction : public SLIFunction
    -  {
    -  public:
    -    Array2IntVectorFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  /**
    -   * Convert SLI array to std::vector.
    -   */
    -
    -  class Array2DoubleVectorFunction : public SLIFunction
    -  {
    -  public:
    -    Array2DoubleVectorFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class DoubleVector2ArrayFunction : public SLIFunction
    -  {
    -  public:
    -    DoubleVector2ArrayFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class IntVector2ArrayFunction : public SLIFunction
    -  {
    -  public:
    -    IntVector2ArrayFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Add_iv_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Add_i_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Neg_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Sub_iv_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Mul_iv_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Mul_i_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Mul_d_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Div_iv_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Add_dv_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Add_d_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Sub_dv_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Mul_dv_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Mul_d_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Div_dv_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Neg_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Inv_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Length_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Length_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Get_iv_iFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Get_iv_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Get_dv_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Get_dv_iFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Put_dv_i_dFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Put_iv_i_iFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Zeros_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Zeros_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Ones_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class Ones_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class ArangeFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  /**
    -   * Test single double for finiteness.
    -   * @todo This class does not really belong into sliarray, but is placed
    -   * here since it is a Mathematica-style Q function.
    -   */
    -  class FiniteQ_dFunction : public SLIFunction
    -  {
    -  public:
    -    FiniteQ_dFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Forall_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Forall_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Iforall_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -    void backtrace( SLIInterpreter*, int ) const override;
    -  };
    -
    -  class Iforall_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -    void backtrace( SLIInterpreter*, int ) const override;
    -  };
    -
    -
    -  class Eq_dvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class Eq_ivFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  /** @} */
    -
    -  RangeFunction rangefunction;
    -  ArraystoreFunction arraystorefunction;
    -  ArraycreateFunction arraycreatefunction;
    -  ArrayloadFunction arrayloadfunction;
    -  ReverseFunction reversefunction;
    -  RotateFunction rotatefunction;
    -  FlattenFunction flattenfunction;
    -  SortFunction sortfunction;
    -  TransposeFunction transposefunction;
    -  MapFunction mapfunction;
    -  IMapFunction imapfunction;
    -  IMap_ivFunction imap_ivfunction;
    -  IMap_dvFunction imap_dvfunction;
    -  MapIndexedFunction mapindexedfunction;
    -  IMapIndexedFunction imapindexedfunction;
    -  MapThreadFunction mapthreadfunction;
    -  IMapThreadFunction imapthreadfunction;
    -  PartitionFunction partitionfunction;
    -  ValidFunction validfunction;
    -  AreaFunction areafunction;
    -  Area2Function area2function;
    -  Cv1dFunction cv1dfunction;
    -  Cv2dFunction cv2dfunction;
    -  GetMaxFunction getmaxfunction;
    -  GetMinFunction getminfunction;
    -  GaborFunction gaborfunction;
    -  Gauss2dFunction gauss2dfunction;
    -  Put_a_a_tFunction put_a_a_tfunction;
    -  Array2IntVectorFunction array2intvectorfunction;
    -  Array2DoubleVectorFunction array2doublevectorfunction;
    -  IntVector2ArrayFunction intvector2arrayfunction;
    -  DoubleVector2ArrayFunction doublevector2arrayfunction;
    -  FiniteQ_dFunction finiteq_dfunction;
    -  Forall_ivFunction forall_ivfunction;
    -  Iforall_ivFunction iforall_ivfunction;
    -  Forall_dvFunction forall_dvfunction;
    -  Iforall_dvFunction iforall_dvfunction;
    -
    -
    -  Add_iv_ivFunction add_iv_ivfunction;
    -  Add_i_ivFunction add_i_ivfunction;
    -  Neg_ivFunction neg_ivfunction;
    -  Sub_iv_ivFunction sub_iv_ivfunction;
    -  Mul_iv_ivFunction mul_iv_ivfunction;
    -  Mul_i_ivFunction mul_i_ivfunction;
    -  Mul_d_ivFunction mul_d_ivfunction;
    -  Div_iv_ivFunction div_iv_ivfunction;
    -  Length_ivFunction length_ivfunction;
    -
    -  Add_dv_dvFunction add_dv_dvfunction;
    -  Add_d_dvFunction add_d_dvfunction;
    -  Sub_dv_dvFunction sub_dv_dvfunction;
    -  Mul_dv_dvFunction mul_dv_dvfunction;
    -  Mul_d_dvFunction mul_d_dvfunction;
    -  Div_dv_dvFunction div_dv_dvfunction;
    -  Neg_dvFunction neg_dvfunction;
    -  Inv_dvFunction inv_dvfunction;
    -  Length_dvFunction length_dvfunction;
    -  Get_dv_iFunction get_dv_ifunction;
    -  Get_dv_ivFunction get_dv_ivfunction;
    -  Get_iv_iFunction get_iv_ifunction;
    -  Get_iv_ivFunction get_iv_ivfunction;
    -  Put_iv_i_iFunction put_iv_i_ifunction;
    -  Put_dv_i_dFunction put_dv_i_dfunction;
    -  Zeros_dvFunction zeros_dvfunction;
    -  Ones_dvFunction ones_dvfunction;
    -  Eq_dvFunction eq_dvfunction;
    -  Eq_ivFunction eq_ivfunction;
    -  Zeros_ivFunction zeros_ivfunction;
    -  Ones_ivFunction ones_ivfunction;
    -  ArangeFunction arangefunction;
    -
    -public:
    -  SLIArrayModule()
    -  {
    -  }
    -
    -  void init( SLIInterpreter* ) override;
    -  const std::string commandstring() const override;
    -  const std::string name() const override;
    -};
    -
    -
    -#endif
    diff --git a/sli/slibuiltins.cc b/sli/slibuiltins.cc
    deleted file mode 100644
    index dddc0b2ecd..0000000000
    --- a/sli/slibuiltins.cc
    +++ /dev/null
    @@ -1,442 +0,0 @@
    -/*
    - *  slibuiltins.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    Interpreter builtins
    -*/
    -
    -#include "slibuiltins.h"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "callbackdatum.h"
    -#include "functiondatum.h"
    -#include "integerdatum.h"
    -#include "interpret.h"
    -#include "stringdatum.h"
    -
    -void
    -IlookupFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop( 2 );
    -}
    -
    -void
    -IsetcallbackFunction::execute( SLIInterpreter* i ) const
    -{
    -  // move the hopefully present callback action
    -  // into the interpreters callback token.
    -  i->EStack.pop();
    -  assert( dynamic_cast< CallbackDatum* >( i->EStack.top().datum() ) );
    -  i->EStack.pop_move( i->ct );
    -}
    -
    -void
    -IiterateFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  ProcedureDatum const* pd = dynamic_cast< ProcedureDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( pd );
    -
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( id );
    -
    -  std::cerr << "In procedure:" << std::endl;
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -void
    -IiterateFunction::execute( SLIInterpreter* i ) const
    -{
    -  /*
    -     This function is responsible for executing a procedure
    -     object. Iiterate expects the procedure to execute as first
    -     and the iteration counter as second argument.
    -
    -     Like in all internal function, no error checking is done.
    -
    -     */
    -
    -  /* Stack Layout:
    -        3       2       1
    -     <proc>  <pos>   %iterate
    -  */
    -
    -  ProcedureDatum const* pd = static_cast< ProcedureDatum* >( i->EStack.pick( 2 ).datum() );
    -  long& pos = static_cast< IntegerDatum* >( i->EStack.pick( 1 ).datum() )->get();
    -
    -  while ( pd->index_is_valid( pos ) )
    -  {
    -    const Token& t = pd->get( pos );
    -    ++pos;
    -
    -    i->code_executed++; // code coverage
    -
    -    if ( t->is_executable() )
    -    {
    -      i->EStack.push( t );
    -      return;
    -    }
    -    i->OStack.push( t );
    -  }
    -
    -  i->EStack.pop( 3 );
    -  i->dec_call_depth();
    -}
    -
    -void
    -IloopFunction::execute( SLIInterpreter* i ) const
    -{
    -  // stack: mark procedure n   %loop
    -  // level:  4      3      2     1
    -
    -  ProcedureDatum const* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 2 ).datum() );
    -  long& pos = static_cast< IntegerDatum* >( i->EStack.pick( 1 ).datum() )->get();
    -
    -  while ( proc->index_is_valid( pos ) )
    -  {
    -    const Token& t( proc->get( pos ) );
    -    ++pos;
    -    if ( t->is_executable() )
    -    {
    -      i->EStack.push( t );
    -      return;
    -    }
    -
    -    i->OStack.push( t );
    -  }
    -
    -  pos = 0;
    -}
    -
    -void
    -IloopFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  ProcedureDatum const* pd = dynamic_cast< ProcedureDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( pd );
    -
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( id );
    -
    -  std::cerr << "During loop:" << std::endl;
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -
    -/**********************************************/
    -/* %repeat                                    */
    -/*  call: mark  count proc  n %repeat         */
    -/*  pick   5      4     3   2    1            */
    -/**********************************************/
    -void
    -IrepeatFunction::execute( SLIInterpreter* i ) const
    -{
    -  ProcedureDatum* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 2 ).datum() );
    -
    -  long& pos = static_cast< IntegerDatum* >( i->EStack.pick( 1 ).datum() )->get();
    -  while ( proc->index_is_valid( pos ) )
    -  {
    -    const Token& t = proc->get( pos );
    -    ++pos;
    -    if ( t->is_executable() )
    -    {
    -      i->EStack.push( t );
    -      return;
    -    }
    -    i->OStack.push( t );
    -  }
    -
    -  long& lc = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() )->get();
    -  if ( lc > 0 )
    -  {
    -    pos = 0; // reset procedure iterator
    -    --lc;
    -  }
    -  else
    -  {
    -    i->EStack.pop( 5 );
    -    i->dec_call_depth();
    -  }
    -}
    -
    -void
    -IrepeatFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( count );
    -
    -  ProcedureDatum const* pd = static_cast< ProcedureDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( pd );
    -
    -  IntegerDatum* id = static_cast< IntegerDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( id );
    -
    -  std::cerr << "During repeat with " << count->get() << " iterations remaining." << std::endl;
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -/*****************************************************/
    -/* %for                                              */
    -/*  call: mark incr limit count proc  n  %for        */
    -/*  pick   6     5    4     3    2    1    0         */
    -/*****************************************************/
    -void
    -IforFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  IntegerDatum* proccount = static_cast< IntegerDatum* >( i->EStack.pick( 1 ).datum() );
    -
    -  ProcedureDatum const* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 2 ).datum() );
    -
    -  long& pos = proccount->get();
    -
    -  while ( proc->index_is_valid( pos ) )
    -  {
    -    const Token& t = proc->get( pos );
    -    ++pos;
    -    if ( t->is_executable() )
    -    {
    -      i->EStack.push( t );
    -      return;
    -    }
    -    i->OStack.push( t );
    -  }
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -
    -  IntegerDatum* lim = static_cast< IntegerDatum* >( i->EStack.pick( 4 ).datum() );
    -
    -  IntegerDatum* inc = static_cast< IntegerDatum* >( i->EStack.pick( 5 ).datum() );
    -
    -
    -  if ( ( ( inc->get() > 0 ) and ( count->get() <= lim->get() ) )
    -    or ( ( inc->get() < 0 ) and ( count->get() >= lim->get() ) ) )
    -  {
    -    pos = 0; // reset procedure interator
    -
    -    i->OStack.push( i->EStack.pick( 3 ) ); // push counter to user
    -    ( count->get() ) += ( inc->get() );    // increment loop counter
    -  }
    -  else
    -  {
    -    i->EStack.pop( 7 );
    -    i->dec_call_depth();
    -  }
    -}
    -
    -void
    -IforFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( count );
    -  ProcedureDatum const* pd = static_cast< ProcedureDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( pd );
    -  IntegerDatum* id = static_cast< IntegerDatum* >( i->EStack.pick( p + 1 ).datum() );
    -  assert( id );
    -
    -  std::cerr << "During for at iterator value " << count->get() << "." << std::endl;
    -
    -  pd->list( std::cerr, "   ", id->get() - 1 );
    -  std::cerr << std::endl;
    -}
    -
    -/*********************************************************/
    -/* %forallarray                                          */
    -/*  call: mark object count proc n %forallarray      */
    -/*  pick    5     4    3     2    1    0               */
    -/*********************************************************/
    -void
    -IforallarrayFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  IntegerDatum* proccount = static_cast< IntegerDatum* >( i->EStack.pick( 1 ).datum() );
    -
    -  ProcedureDatum const* proc = static_cast< ProcedureDatum* >( i->EStack.pick( 2 ).datum() );
    -
    -  long& pos = proccount->get();
    -
    -  while ( proc->index_is_valid( pos ) )
    -  {
    -    const Token& t = proc->get( pos );
    -    ++pos;
    -    if ( t->is_executable() )
    -    {
    -      i->EStack.push( t );
    -      return;
    -    }
    -    i->OStack.push( t );
    -  }
    -
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -  ArrayDatum* ad = static_cast< ArrayDatum* >( i->EStack.pick( 4 ).datum() );
    -
    -  long& idx = count->get();
    -
    -  if ( ad->index_is_valid( idx ) )
    -  {
    -    pos = 0; // reset procedure interator
    -
    -    i->OStack.push( ad->get( idx ) ); // push counter to user
    -    ++idx;
    -  }
    -  else
    -  {
    -    i->EStack.pop( 6 );
    -    i->dec_call_depth();
    -  }
    -}
    -
    -
    -void
    -IforallarrayFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 3 ).datum() );
    -  assert( count );
    -
    -  std::cerr << "During forall (array) at iteration " << count->get() << "." << std::endl;
    -}
    -
    -
    -/*********************************************************/
    -/* %forallindexedarray                                   */
    -/*  call: mark object limit count proc forallindexedarray  */
    -/*  pick   5      4    3     2    1      0         */
    -/*********************************************************/
    -void
    -IforallindexedarrayFunction::execute( SLIInterpreter* i ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -  IntegerDatum* limit = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -
    -  long& cnt = count->get();
    -  if ( cnt < limit->get() )
    -  {
    -    ArrayDatum* obj = static_cast< ArrayDatum* >( i->EStack.pick( 4 ).datum() );
    -
    -    i->OStack.push( obj->get( cnt ) );                    // push element to user
    -    i->OStack.push_by_pointer( new IntegerDatum( cnt ) ); // push index to user
    -    ++cnt;
    -    i->EStack.push( i->EStack.pick( 1 ) );
    -  }
    -  else
    -  {
    -    i->EStack.pop( 6 );
    -    i->dec_call_depth();
    -  }
    -}
    -
    -void
    -IforallindexedarrayFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( count );
    -
    -  std::cerr << "During forallindexed (array) at iteration " << count->get() - 1 << "." << std::endl;
    -}
    -
    -void
    -IforallindexedstringFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( count );
    -
    -  std::cerr << "During forallindexed (string) at iteration " << count->get() - 1 << "." << std::endl;
    -}
    -
    -/*********************************************************/
    -/* %forallindexedarray                                   */
    -/*  call: mark object limit count proc forallindexedarray  */
    -/*  pick   5      4    3     2    1      0         */
    -/*********************************************************/
    -void
    -IforallindexedstringFunction::execute( SLIInterpreter* i ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -  IntegerDatum* limit = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -
    -  if ( count->get() < limit->get() )
    -  {
    -    StringDatum const* obj = static_cast< StringDatum* >( i->EStack.pick( 4 ).datum() );
    -
    -    i->OStack.push( ( *obj )[ count->get() ] ); // push element to user
    -    i->OStack.push( count->get() );             // push index to user
    -    ++( count->get() );
    -    i->EStack.push( i->EStack.pick( 1 ) );
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << "forallindexed:"
    -                << " Limit: " << limit->get() << " Pos: " << count->get() << " Iterator: ";
    -      i->OStack.pick( 1 ).pprint( std::cerr );
    -      std::cerr << std::endl;
    -    }
    -  }
    -  else
    -  {
    -    i->EStack.pop( 6 );
    -    i->dec_call_depth();
    -  }
    -}
    -
    -void
    -IforallstringFunction::backtrace( SLIInterpreter* i, int p ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( p + 2 ).datum() );
    -  assert( count );
    -
    -  std::cerr << "During forall (string) at iteration " << count->get() - 1 << "." << std::endl;
    -}
    -/*********************************************************/
    -/* %forallstring                                         */
    -/*  call: mark object limit count proc %forallarray  */
    -/*  pick   5      4    3     2    1      0         */
    -/*********************************************************/
    -void
    -IforallstringFunction::execute( SLIInterpreter* i ) const
    -{
    -  IntegerDatum* count = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -  IntegerDatum* limit = static_cast< IntegerDatum* >( i->EStack.pick( 3 ).datum() );
    -
    -  if ( count->get() < limit->get() )
    -  {
    -    StringDatum const* obj = static_cast< StringDatum* >( i->EStack.pick( 4 ).datum() );
    -    i->OStack.push_by_pointer( new IntegerDatum( ( *obj )[ count->get() ] ) ); // push element to user
    -    ++( count->get() );
    -    i->EStack.push( i->EStack.pick( 1 ) );
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << "forall:"
    -                << " Limit: " << limit->get() << " Pos: " << count->get() << " Iterator: ";
    -      i->OStack.top().pprint( std::cerr );
    -      std::cerr << std::endl;
    -    }
    -  }
    -  else
    -  {
    -    i->EStack.pop( 6 );
    -    i->dec_call_depth();
    -  }
    -}
    diff --git a/sli/slibuiltins.h b/sli/slibuiltins.h
    deleted file mode 100644
    index c4ab25483c..0000000000
    --- a/sli/slibuiltins.h
    +++ /dev/null
    @@ -1,141 +0,0 @@
    -/*
    - *  slibuiltins.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIBUILTINS_H
    -#define SLIBUILTINS_H
    -/*
    -    The interpreter's basic operators
    -*/
    -
    -// C++ includes:
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -
    -/*********************************************************
    -  This module contains only those functions which are
    -  needed by the intereter's default actions. All other
    -  built-in or user supplied functions must be defined
    -  either in builtins.{h,cc} or in user-defined modules
    -  *******************************************************/
    -
    -class IlookupFunction : public SLIFunction
    -{
    -public:
    -  IlookupFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IsetcallbackFunction : public SLIFunction
    -{
    -public:
    -  IsetcallbackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IiterateFunction : public SLIFunction
    -{
    -public:
    -  IiterateFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -  void backtrace( SLIInterpreter*, int ) const override;
    -};
    -
    -class IloopFunction : public SLIFunction
    -{
    -public:
    -  IloopFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -  void backtrace( SLIInterpreter*, int ) const override;
    -};
    -
    -class IrepeatFunction : public SLIFunction
    -{
    -public:
    -  IrepeatFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -  void backtrace( SLIInterpreter*, int ) const override;
    -};
    -
    -class IforFunction : public SLIFunction
    -{
    -public:
    -  IforFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -  void backtrace( SLIInterpreter*, int ) const override;
    -};
    -
    -class IforallarrayFunction : public SLIFunction
    -{
    -public:
    -  IforallarrayFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -  void backtrace( SLIInterpreter*, int ) const override;
    -};
    -
    -class IforallindexedarrayFunction : public SLIFunction
    -{
    -public:
    -  IforallindexedarrayFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -  void backtrace( SLIInterpreter*, int ) const override;
    -};
    -
    -class IforallindexedstringFunction : public SLIFunction
    -{
    -public:
    -  IforallindexedstringFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -  void backtrace( SLIInterpreter*, int ) const override;
    -};
    -
    -class IforallstringFunction : public SLIFunction
    -{
    -public:
    -  IforallstringFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -  void backtrace( SLIInterpreter*, int ) const override;
    -};
    -
    -
    -#endif
    diff --git a/sli/slicontrol.cc b/sli/slicontrol.cc
    deleted file mode 100644
    index 55548bec82..0000000000
    --- a/sli/slicontrol.cc
    +++ /dev/null
    @@ -1,2260 +0,0 @@
    -/*
    - *  slicontrol.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    SLI's control structures
    -*/
    -
    -#include "slicontrol.h"
    -
    -// C includes:
    -#include <sys/resource.h>
    -#include <sys/times.h>
    -#include <time.h>
    -#include <unistd.h>
    -
    -// C++ includes:
    -#include <algorithm>
    -#include <limits>
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from libnestutil
    -#include "compose.hpp"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "dictstack.h"
    -#include "functiondatum.h"
    -#include "integerdatum.h"
    -#include "iostreamdatum.h"
    -#include "namedatum.h"
    -#include "parser.h"
    -#include "processes.h"
    -#include "scanner.h"
    -#include "sliexceptions.h"
    -#include "stringdatum.h"
    -
    -// sstream has functions std::?stringstream
    -// strstream has functions std::?strstream
    -// HEP 2002-10-06
    -#ifdef HAVE_SSTREAM
    -#include <sstream>
    -#else
    -#include <strstream>
    -#endif
    -
    -
    -/** @BeginDocumentation
    -Name: backtrace_on - enable stack backtrace on error.
    -
    -Synopsis: backtrace_on -> -
    -
    -Description:
    -
    -This functions enables a human readable backtrace of the execution
    -stack. This is useful to locate where precisely an error occured. Note
    -that this function also disables the interpreter's tail recursion
    -optimization and will therefore impose a small performance
    -penalty. The command backtrace_off disables the stack backtrace and
    -re-enables tail recursion optimization.
    -
    -Example:
    -
    -SeeAlso:
    -backtrace_off
    -*/
    -void
    -Backtrace_onFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->backtrace_on();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: backtrace_off - Disable the stack backtrace on error.
    -
    -Synopsis: backtrace_off -> -
    -
    -Description:
    -This functions disables the backtrace of the execution
    -stack and re-enables tail recursion optimization.
    -
    -SeeAlso: backtrace_on
    -
    -*/
    -void
    -Backtrace_offFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->backtrace_off();
    -  i->EStack.pop();
    -}
    -
    -void
    -OStackdumpFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop(); // never forget me!!
    -
    -  i->OStack.dump( std::cout );
    -}
    -void
    -EStackdumpFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop(); // never forget me!!
    -
    -  i->EStack.dump( std::cout );
    -}
    -/** @BeginDocumentation
    -Name: loop - repeatedly execute a procedure
    -
    -Synopsis: proc loop -
    -
    -Description:
    - loop takes a procedure object an executes it repeatedly.
    - Since there is no direct termination condition, the loop
    - has to be terminated by calling exit.
    - If the procedure has to be evaluated for a certain number of
    - times, consider the use of repeat or for.
    - If some container should be iterated, consider forall or Map
    -
    -SeeAlso: exit, repeat, for, forall, forallindexed, Map
    -*/
    -void
    -LoopFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  if ( not dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() ) )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -  i->EStack.push_by_ref( i->baselookup( i->mark_name ) );
    -  i->EStack.push_move( i->OStack.top() );
    -  i->EStack.push_by_pointer( new IntegerDatum( 0 ) );
    -  i->EStack.push_by_ref( i->baselookup( i->iloop_name ) );
    -  i->inc_call_depth();
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: exit - exit a loop construct
    -
    -Description: exit can be used to leave loop structures
    -             like loop, repeat, for, forall, Map, etc.
    -             in a clean way.
    -
    -Remarks: This command does not exit the SLI interpreter! Use quit instead.
    -*/
    -void
    -ExitFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  static Token mark = i->baselookup( i->mark_name );
    -
    -  size_t n = 1;
    -  size_t load = i->EStack.load();
    -  while ( load > n and not( i->EStack.pick( n++ ) == mark ) )
    -  {
    -    // do nothing
    -  }
    -  if ( n >= load )
    -  {
    -    i->raiseerror( "EStackUnderflow" );
    -    return;
    -  }
    -  i->dec_call_depth();
    -  i->EStack.pop( n );
    -}
    -
    -/** @BeginDocumentation
    -Name: if - conditionaly execute a procedure
    -
    -Synopsis:
    -  boolean {procedure} if -> -
    -  boolean   anytoken  if -> -
    -
    -Description: if executes the supplied token if the boolean
    -             is true. The supplied token usually is a procedure.
    -
    -             Alternatives: Function if_ (undocumented)
    -             -> behaviour and synopsis are the same, except that no
    -             warnings or error messages are thrown.
    -
    -Examples:  1 0 gt { (1 > 0) = } if -> (1 > 0)
    -
    -SeeAlso: ifelse
    -*/
    -void
    -IfFunction::execute( SLIInterpreter* i ) const
    -{
    -  // OStack: bool proc
    -  //          1    0
    -  BoolDatum* test;
    -  if ( ( i->OStack.load() >= 2 ) )
    -  {
    -    i->EStack.pop();
    -    test = dynamic_cast< BoolDatum* >( i->OStack.pick( 1 ).datum() );
    -    if ( not test )
    -    {
    -      throw TypeMismatch( "booltype", "something else" );
    -    }
    -
    -    if ( test->get() )
    -    {
    -      if ( i->step_mode() )
    -      {
    -        std::cerr << "if:"
    -                  << " Executing true branch." << std::endl;
    -      }
    -      i->EStack.push_move( i->OStack.top() );
    -    }
    -    i->OStack.pop( 2 );
    -  }
    -  else
    -  {
    -    throw StackUnderflow( 2, i->OStack.load() );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: ifelse - conditionaly execute a procedure
    -
    -Synopsis:
    -  boolean  {proc1}  {proc2}   ifelse -> -
    -  boolean anytoken1 anytoken1 ifelse -> -
    -
    -Description:
    -  ifelse executes anytoken1 if the boolean is true, and anytoken2
    -  otherwise.
    -  The supplied tokens usually are procedures.
    -
    -  Alternatives: Function ifelse_ (undocumented)
    -  -> behaviour and synopsis are the same, except that no
    -  warnings or error messages are thrown.
    -
    -Examples:
    -     0 1 gt { (1 > 0) = } { (1 <= 0) =} ifelse -> (0 <= 1)
    -
    -SeeAlso: if
    -*/
    -void
    -IfelseFunction::execute( SLIInterpreter* i ) const
    -{
    -  // OStack: bool tproc fproc
    -  //          2    1      0
    -  BoolDatum* test;
    -
    -  if ( i->OStack.load() < 3 )
    -  {
    -    throw StackUnderflow( 3, i->OStack.load() );
    -  }
    -
    -  i->EStack.pop();
    -
    -  test = dynamic_cast< BoolDatum* >( i->OStack.pick( 2 ).datum() );
    -  if ( not test )
    -  {
    -    throw TypeMismatch( "booltype", "something else" );
    -  }
    -
    -  if ( test->get() )
    -  {
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << "ifelse:"
    -                << " Executing true branch." << std::endl;
    -    }
    -    i->EStack.push_move( i->OStack.pick( 1 ) );
    -  }
    -  else
    -  {
    -    if ( i->step_mode() )
    -    {
    -      std::cerr << "ifelse:"
    -                << " Executing false branch." << std::endl;
    -    }
    -    i->EStack.push_move( i->OStack.pick( 0 ) );
    -  }
    -
    -  i->OStack.pop( 3 );
    -}
    -
    -/** @BeginDocumentation
    -Name: repeat - execute a procedure n times
    -
    -Synopsis: n proc repeat
    -
    -Description:
    - repeat executes the supplied procedure n times.
    - The loop can be left prematurely using exit.
    -
    -Note: The interation counter is not available
    - to the procedure. If this is desired, use for instead.
    -
    -Examples:
    -SLI ] 3 { (Hello world) = } repeat
    -Hello world
    -Hello world
    -Hello world
    -SLI ]
    -
    -SeeAlso: for, loop, exit
    -*/
    -void
    -RepeatFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  // level  1  0
    -  // stack: n proc repeat
    -  if ( i->OStack.load() >= 2 )
    -  {
    -    i->EStack.pop();
    -
    -    ProcedureDatum* proc = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -    if ( proc )
    -    {
    -      IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -      if ( not id )
    -      {
    -        throw ArgumentType( 1 );
    -      }
    -
    -      i->EStack.push_by_ref( i->baselookup( i->mark_name ) );
    -      i->EStack.push_move( i->OStack.pick( 1 ) );
    -      i->EStack.push_move( i->OStack.pick( 0 ) );
    -      i->EStack.push_by_pointer( new IntegerDatum( proc->size() ) );
    -      i->EStack.push_by_ref( i->baselookup( i->irepeat_name ) );
    -      i->inc_call_depth();
    -      i->OStack.pop( 2 );
    -    }
    -    else
    -    {
    -      throw ArgumentType( 0 );
    -    }
    -  }
    -  else
    -  {
    -    throw StackUnderflow( 2, i->OStack.load() );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: stopped - returns true if execution was stopped by stop
    -
    -Synopsis:
    -  xobj stopped -> true;  if the object was aborted with stop
    -               -> false; otherwise.
    -
    -Description:
    -  stopped is part of a pair of commands which implement the
    -  PostScript exception mechanism.
    -  stopped is applied to an executable object, most probably a
    -  procedure, and returns true if this object raised a stop
    -  signal and false otherwise.
    -  This is accomplished by first pushing an internal name which
    -  resolves to false and then executing the object.
    -  stop will pop the stack down to this name and return true. If
    -  stop is not called, the name is eventually executed and thus the
    -  return value false.
    -
    -  Note that when the executable object was stopped by a call
    -  to raiseerror, the name of the routine that caused the
    -  error has can be found on the operand stack (see raiseerror).
    -
    -  The stop/stopped pair is used to implement SLI's error handling
    -  capabilities.
    -
    -Notes: stop, stopped is PostScript compatible
    -
    -References:   The Red Book, sec. 3.10
    -
    -SeeAlso: stop, raiseerror
    -*/
    -void
    -StoppedFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    throw StackUnderflow( 1, i->OStack.load() );
    -  }
    -
    -  i->EStack.pop();
    -  i->EStack.push_by_pointer( new NameDatum( i->istopped_name ) );
    -  i->EStack.push_move( i->OStack.top() );
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: stop - raise a stop signal
    -
    -Synopsis:
    -  stop -> -
    -
    -Desctiption:
    -  stop causes the execution stack to be popped until an
    -  enclosing stopped context is found. Effectively, the
    -  stopped/stop combination equals the catch/throw pair of
    -  C++.
    -  stop/stopped is used to implement SLI's error handling
    -  capabilities.
    -
    -Notes: stop, stopped is PostScript compatible.
    -
    -References: The Red Book, sec. 3.10
    -
    -SeeAlso: stopped, raiseerror
    -*/
    -void
    -StopFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  size_t load = i->EStack.load();
    -  NameDatum istopped( i->istopped_name );
    -
    -  bool found = false;
    -  size_t n = 1;
    -
    -  while ( load > n and not( found ) )
    -  {
    -    found = i->EStack.pick( n++ ).contains( istopped );
    -  }
    -
    -  if ( i->catch_errors() and not found )
    -  {
    -    i->debug_mode_on();
    -  }
    -
    -  if ( i->get_debug_mode() or i->show_backtrace() )
    -  {
    -    if ( i->show_backtrace() or not found )
    -    {
    -      i->stack_backtrace( load - 1 );
    -    }
    -
    -    std::cerr << "In stop: An error or stop was raised."
    -              << " Unrolling stack by " << n << " levels." << std::endl;
    -    if ( not found )
    -    {
    -      std::cerr << "No 'stopped' context found." << std::endl
    -                << "Stack unrolling will erase the execution stack." << std::endl
    -                << "Entering debug mode. Type '?' for help." << std::endl;
    -    }
    -
    -    if ( i->get_debug_mode() )
    -    {
    -      char c = i->debug_commandline( i->EStack.top() );
    -      if ( c == 'i' ) // in interactive mode, we leave the stack as it is.
    -      {
    -        return;
    -      }
    -    }
    -  }
    -  if ( found )
    -  {
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->message( 30, "stop", "No stopped context was found! \n" );
    -    i->EStack.clear();
    -    return;
    -  }
    -
    -  i->EStack.pop( n );
    -}
    -
    -/** @BeginDocumentation
    -
    -Name: closeinput - Close current input file.
    -
    -FirstVersion: 25 Jul 2005, Gewaltig
    -*/
    -
    -void
    -CloseinputFunction::execute( SLIInterpreter* i ) const
    -{
    -  size_t load = i->EStack.load();
    -
    -  bool found = false;
    -  size_t n = 1;
    -
    -  while ( load > n and not( found ) )
    -  {
    -    found = i->EStack.pick( n++ )->isoftype( SLIInterpreter::XIstreamtype );
    -  }
    -
    -  if ( i->catch_errors() or not found )
    -  {
    -    i->debug_mode_on();
    -  }
    -
    -  if ( i->get_debug_mode() or i->show_backtrace() )
    -  {
    -    if ( i->show_backtrace() or not found )
    -    {
    -      i->stack_backtrace( n );
    -    }
    -
    -    std::cerr << "In closeinput: Termination of input file requested."
    -              << " Unrolling stack by " << n << " levels." << std::endl;
    -    if ( not found )
    -    {
    -      std::cerr << "In closeinput: No active input file was found." << std::endl
    -                << "Stack unrolling will erase the execution stack." << std::endl
    -                << "Entering debug mode. Type '?' for help." << std::endl;
    -    }
    -
    -    if ( i->get_debug_mode() )
    -    {
    -      char c = i->debug_commandline( i->EStack.top() );
    -      if ( c == 'i' ) // in interactive mode, we leave the stack as it is.
    -      {
    -        return;
    -      }
    -    }
    -  }
    -
    -  if ( not found )
    -  {
    -    i->message( 30, "closeinput", "No active input file was found. \n  Restarting..." );
    -    i->EStack.clear();
    -    i->EStack.push( i->baselookup( Name( "start" ) ) );
    -    return;
    -  }
    -
    -  i->EStack.pop( n );
    -}
    -
    -/** @BeginDocumentation
    -Name: currentname -  returns the most recently resolved name
    -
    -Synopsis:
    - currentname -> name true
    -             -> false
    -Description:
    - currentname returns the most recently resolved name whose contents
    - is still under execution.
    - currentname is useful for error handling purposes where a procedure
    - has to know the name with which it has been called.
    -Example:
    -
    - /divide
    - {
    -    0 eq
    -    {
    -      currentname /DivisionByZero raiseerror
    -    } if
    -    div
    -} def
    -
    -Note:
    - This function is not foolproof, as it will fail for bound procedures.
    -
    - currentname evaluates certain debugging information on the execution
    - stack. Note that the SLI interpreter can be compiled not to generate
    - this information. In this case currentname fails, i.e. it will always
    - return false
    -*/
    -void
    -CurrentnameFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  size_t n = 0; // skip my own name
    -  size_t load = i->EStack.load();
    -
    -  // top level %%lookup must belong to currentname, so
    -  // remove it and the name.
    -  if ( i->EStack.top() == i->baselookup( i->ilookup_name ) )
    -  {
    -    assert( load > 2 );
    -    n += 2;
    -  }
    -
    -  bool found = false;
    -
    -  while ( load > n and not found )
    -  {
    -    found = i->EStack.pick( n++ ) == i->baselookup( i->ilookup_name );
    -  }
    -
    -  if ( found )
    -  {
    -    i->OStack.push( i->EStack.pick( n ) );
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->EStack.push( false );
    -  }
    -}
    -
    -void
    -IparsestdinFunction::execute( SLIInterpreter* i ) const
    -{
    -  Token t;
    -
    -  i->parse->readToken( std::cin, t );
    -  if ( t.contains( i->parse->scan()->EndSymbol ) )
    -  {
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->EStack.push_move( t );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: parsestdin - Read and execute tokens from standard input
    -
    -Description: parsestdin repeatedly reads and executes SLI commands from
    -the standard input stream (cin) until an end-of-file symbol is excountered
    -or the command exit is executed.
    -
    -*/
    -void
    -ParsestdinFunction::execute( SLIInterpreter* i ) const
    -{
    -  Token t;
    -
    -  i->parse->readToken( std::cin, t );
    -  if ( t.contains( i->parse->scan()->EndSymbol ) )
    -  {
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->EStack.pop();
    -    i->EStack.push_move( t );
    -  }
    -}
    -
    -void
    -IparseFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  // Estack: handle  iparse
    -  // pick      1         0
    -
    -  XIstreamDatum* is = dynamic_cast< XIstreamDatum* >( i->EStack.pick( 1 ).datum() );
    -  assert( is );
    -  assert( is->valid() );
    -
    -  Token t;
    -  if ( i->parse->readToken( **is, t ) )
    -  {
    -    if ( t.contains( i->parse->scan()->EndSymbol ) )
    -    {
    -      i->EStack.pop( 2 );
    -    }
    -    else
    -    {
    -      i->EStack.push_move( t );
    -    }
    -  }
    -  else
    -  {
    -    i->EStack.swap();
    -    i->EStack.pop(); // remove stream-token
    -    i->raiseerror( "SyntaxError" );
    -    return;
    -  }
    -}
    -
    -void
    -DefFunction::execute( SLIInterpreter* i ) const
    -{
    -  // Def should also check the "writeable" Flag of the
    -  // name!
    -  if ( i->OStack.load() < 2 )
    -  {
    -    throw StackUnderflow( 2, i->OStack.load() );
    -  }
    -
    -  LiteralDatum* nd = dynamic_cast< LiteralDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not nd )
    -  {
    -    throw ArgumentType( 1 );
    -  }
    -
    -  // if(nd->writeable())
    -  // {
    -  i->def_move( *nd, i->OStack.top() );
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -  // }
    -  // else   // Name was write Protected: OStack is left untouched!
    -  // {
    -  //     Name myname(i->getcurrentname());
    -  //     i->EStack.pop();
    -  //     i->raiseerror(myname,i->WriteProtectedError);
    -  // }
    -}
    -
    -/** @BeginDocumentation
    -Name: Set - Define an association between a name and an object in the current
    -            dictionary
    -
    -Synopsis:
    -  obj literal   Set -> -
    -  [... [obj_1 ...] ... obj_n] [... [literal_1 ...] ... literal_n] Set -> -
    -
    -Description:
    - In the first form Set is identical to def, except for the reversed parameters
    - and creates or modifies an entry for the literal in the current dictionary. The
    - new value assigned to the literal is obj.
    - In the second form multiple simultaneous assignments are made to the literals
    - contained in the second. The nesting of this array is arbitrary, indicated in
    - the synopsis by the inner brackets, and the same object are taken from the
    - identical positions in first array.
    -
    -
    -Examples:
    - {1 2 add} /myproc Set
    - [4 3] [/x /y] Set
    - [[4 3 7] [-9 1]] [[/a /b /c] [/x /y]] Set
    - [[4 9] 3] [/x /y] Set
    - [[4 9] 3] [[/a /b] /y] Set
    -
    -SeeAlso: def, undef, begin, end
    -*/
    -void
    -SetFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    throw StackUnderflow( 2, i->OStack.load() );
    -  }
    -
    -  LiteralDatum* nd = dynamic_cast< LiteralDatum* >( i->OStack.top().datum() );
    -  if ( not nd )
    -  {
    -    throw ArgumentType( 0 );
    -  }
    -
    -  // if(nd->writeable())
    -  //   {
    -  i->def_move( *nd, i->OStack.pick( 1 ) );
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -  //   }
    -  // else   // Name was write Protected: OStack is left untouched!
    -  //   {
    -  //     Name myname(i->getcurrentname());
    -  //     i->EStack.pop();
    -  //     i->raiseerror(myname,i->WriteProtectedError);
    -  //   }
    -}
    -
    -/** @BeginDocumentation
    -Name: load - Search for a key in each dictionary on the dictionary stack.
    -
    -Synopsis: /name load -> obj
    -
    -Description: Load tries to find an association for /name in each dictionary
    - on the dictionary stack, starting with the current (top) dictionary.
    - If an association is found, load pushes the associated value on the
    - stack. If no association is found, an UndefineName error is raised.
    -
    -SeeAlso: lookup, def
    -*/
    -void
    -LoadFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  LiteralDatum* name = dynamic_cast< LiteralDatum* >( i->OStack.top().datum() );
    -  if ( not name )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  Token contents = i->lookup( *name );
    -  if ( contents.datum() )
    -  {
    -    i->OStack.pop();
    -    i->OStack.push_move( contents );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    Name myname( i->getcurrentname() );
    -    i->EStack.pop();
    -
    -    i->raiseerror( myname, i->UndefinedNameError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: lookup -  Search for a key in each dictionay on the dictionary stack.
    -
    -Synopsis: /name lookup -> obj true
    -                       -> false
    -
    -Description: lookup tries to find an association for /name in each dictionary
    - on the dictionary stack, starting with the current (top) dictionary.
    - If an association is found, lookup pushes the associated value on the
    - stack followed by the boolean true.
    - If no association is found, false is pushed.
    -
    -SeeAlso: load, def
    -*/
    -void
    -LookupFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  LiteralDatum* name = dynamic_cast< LiteralDatum* >( i->OStack.top().datum() );
    -  if ( not name )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -
    -  Token contents = i->lookup( *name );
    -  i->OStack.pop();
    -  if ( contents.datum() )
    -  {
    -    i->OStack.push_move( contents );
    -    i->OStack.push( true );
    -  }
    -  else
    -  {
    -    i->OStack.push( false );
    -  }
    -}
    -
    -
    -/** @BeginDocumentation
    -Name: for - execute a procedure for a sequence of numbers
    -
    -Synopsis: n1 s n2 proc for -> -
    -
    -Description:
    -   for repeatedly evaluates the supplied procedure for all
    -   values from n1 to n2 in steps of s. In each iteration
    -   proc is called with the current iteration counter as
    -   argument.
    -   The loop can be quit prematurely by calling exit.
    -   If the value of the iteration counter is not needed,
    -   use repeat instead.
    -
    -Examples:
    -SLI ] 1 1 10 {=} for
    -1
    -2
    -3
    -4
    -5
    -6
    -7
    -8
    -9
    -10
    -SLI ]
    -
    -SeeAlso: repeat, exit, loop
    -*/
    -void
    -ForFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  ProcedureDatum* proc = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( proc );
    -
    -  i->EStack.push_by_ref( i->baselookup( i->mark_name ) );
    -  i->EStack.push_move( i->OStack.pick( 2 ) ); // increment
    -  i->EStack.push_move( i->OStack.pick( 1 ) ); // limit
    -  i->EStack.push_move( i->OStack.pick( 3 ) ); // initial as counter
    -  i->EStack.push_move( i->OStack.pick( 0 ) ); // procedure
    -  i->EStack.push_by_pointer( new IntegerDatum( proc->size() ) );
    -  i->EStack.push_by_ref( i->baselookup( i->ifor_name ) ); // %for
    -  i->inc_call_depth();
    -  i->OStack.pop( 4 );
    -}
    -
    -/** @BeginDocumentation
    -   Name: forall - Call a procedure for each element of a list/string/dictionary
    -
    -   Synopsis:
    -     [v1 ... vn] {f}                   forall -> f(v1) ... f(vn)
    -     (c1...cn)   {f}                   forall -> f(c1) ... f(cn)
    -     <</key1 val1 ... /keyn valn>> {f} forall -> f(/key1 val1) ... f(/keyn valn)
    -
    -   Parameters:
    -     [v1,...,vn]    - list of n arbitrary objects
    -     (c1...cn)      - arbitrary string
    -     <</keyi vali>> - arbitrary dictionary
    -     {f}            - function which can operate on the elements of the
    -                      array, or on key/value pairs of the dictionary.
    -                      f is not required to return a specific number
    -                      of values.
    -
    -   Description:
    -     Arrays:
    -       For each element of the input array, forall calls f.
    -       forall is similar to Map, however, it does not construct a
    -       new list from the return values.
    -
    -     Dictionaries:
    -       For each key/value pair of the dictionary, forall calls f.
    -       Order on the operand stack will be: key, value. (I.e. value on top.)
    -
    -       *Note: The dictionary contents are copied before operation.
    -        This can be a potentially expensive operation.*
    -
    -     Loops can be nested. The loop can be quit prematurely with exit.
    -
    -   Examples:
    -     [1 2 3 4 5]  {=} forall -> - % Print all values of the list
    -     [1 2 3 4 5]  {} forall  -> 1 2 3 4 5
    -     (abc) {=} forall -> prints 97 98 99 on separate lines
    -     <</a 1 /b 2>> {== ==} forall -> prints 1 /a 2 /b on separate lines
    -
    -   Author:
    -     Marc-Oliver Gewaltig, Ruediger Kupper (dictionary variant)
    -
    -   References: The Red Book
    -
    -   SeeAlso: Map, MapAt, MapIndexed, Table, forallindexed, NestList, FoldList,
    -   Fold, exit
    -
    -*/
    -
    -/******************************/
    -/* forall_di                  */
    -/*  wrapper around forall_a   */
    -/*  implemented in SLI        */
    -/*  see typeinit.sli          */
    -/******************************/
    -
    -/******************************/
    -/* forall_a                   */
    -/*  call: obj proc forall     */
    -/*  pick   1    0             */
    -/******************************/
    -void
    -Forall_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  static Token mark( i->baselookup( i->mark_name ) );
    -  static Token forall( i->baselookup( i->iforallarray_name ) );
    -
    -  ProcedureDatum* proc = static_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( proc );
    -
    -  i->EStack.pop();
    -  i->EStack.push_by_ref( mark );
    -  i->EStack.push_move( i->OStack.pick( 1 ) );         // push object
    -  i->EStack.push_by_pointer( new IntegerDatum( 0 ) ); // push array counter
    -  i->EStack.push_by_ref( i->OStack.pick( 0 ) );       // push procedure
    -  // push procedure counter
    -  i->EStack.push_by_pointer( new IntegerDatum( proc->size() ) );
    -  i->EStack.push_by_ref( forall );
    -  i->OStack.pop( 2 );
    -  i->inc_call_depth();
    -}
    -
    -/** @BeginDocumentation
    -   Name: forallindexed - Call a procedure for each element of a list/string
    -
    -   Synopsis:
    -     [v1,...,vn] {f} forallindexed ->  f(0,v1),...,f(n-1,vn)
    -
    -   Parameters:
    -     [v1,...,vn] - list of n arbitrary objects or string
    -     {f}         - function which can operate on the elements of the
    -                   array. f is not required to return a specific number
    -                   of values.
    -
    -   Description:
    -     For each element of the input array, forallindexed calls f with
    -     two arguments, the element and its index within the list/string.
    -     forallindexed is similar to forall, only that the index of the
    -     element is also passed to the function f.
    -
    -     Alternatives: Functions forallindexed_a for a list, forallindexed_s
    -     for a string (both undocumented) -> behaviour and synopsis are the same.
    -
    -   Examples:
    -
    -   [(a) (b)]  {} forallindexed -> (a) 0 (b) 1
    -
    -   Author:
    -    Marc-Oliver Gewaltig
    -
    -   References: The Red Book
    -
    -   SeeAlso: Map, MapIndexed, Table, forall, NestList, FoldList
    -
    -*/
    -
    -/******************************/
    -/* forallindexed_a            */
    -/*  call: obj proc forall     */
    -/*  pick   1    0             */
    -/******************************/
    -void
    -Forallindexed_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  ProcedureDatum* proc = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( proc );
    -
    -  i->EStack.push( i->baselookup( i->mark_name ) );
    -  i->EStack.push_move( i->OStack.pick( 1 ) ); // push object
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->EStack.top().datum() );
    -  assert( ad );
    -
    -  i->EStack.push( ad->size() );               // push limit
    -  i->EStack.push( 0 );                        // push initial counter
    -  i->EStack.push_move( i->OStack.pick( 0 ) ); // push procedure
    -
    -  i->EStack.push( i->baselookup( i->iforallindexedarray_name ) );
    -  i->inc_call_depth();
    -  i->OStack.pop( 2 );
    -}
    -
    -/******************************/
    -/* forallindexed_s            */
    -/*  call: obj proc forall     */
    -/*  pick   1    0             */
    -/******************************/
    -void
    -Forallindexed_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  ProcedureDatum* proc = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( proc );
    -
    -  i->EStack.push( i->baselookup( i->mark_name ) );
    -  i->EStack.push_move( i->OStack.pick( 1 ) ); // push object
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->EStack.top().datum() );
    -  assert( sd );
    -
    -  i->EStack.push( sd->size() );               // push limit
    -  i->EStack.push( 0 );                        // push initial counter
    -  i->EStack.push_move( i->OStack.pick( 0 ) ); // push procedure
    -
    -  i->EStack.push( i->baselookup( i->iforallindexedstring_name ) );
    -  i->inc_call_depth();
    -  i->OStack.pop( 2 );
    -}
    -
    -/******************************/
    -/* forall_s                   */
    -/*  call: obj proc forall     */
    -/*  pick   1    0             */
    -/******************************/
    -void
    -Forall_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  ProcedureDatum* proc = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( proc );
    -
    -  i->EStack.push( i->baselookup( i->mark_name ) );
    -  i->EStack.push_move( i->OStack.pick( 1 ) ); // push object
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->EStack.top().datum() );
    -  assert( sd );
    -
    -  i->EStack.push( new IntegerDatum( sd->size() ) ); // push limit
    -  i->EStack.push( new IntegerDatum( 0 ) );          // push initial counter
    -  i->EStack.push_move( i->OStack.pick( 0 ) );       // push procedure
    -
    -  i->EStack.push( i->baselookup( i->iforallstring_name ) );
    -  i->inc_call_depth();
    -  i->OStack.pop( 2 );
    -}
    -
    -/** @BeginDocumentation
    - Name: raiseerror - raise an error to the system
    -
    - Synopsis:
    - /command /error raiserror -> /command (side-effects see below!)
    -
    - Description:
    -   raiseerror is a SLI interface to the interpreter's error
    -   handling mechanism (see The Red Book for details). If an error
    -   is raised, the following actions are performed:
    -   * the value of errordict /newerror is set to true
    -   * the value of errordict /commandname is set to the name of the
    -     command which raised the error
    -   * the name of the command which raised the error is pushed on
    -     the operand stack.
    -   * If the value of errordict /recorstack is true,
    -     the state of the interpreter is saved:
    -     - the operand stack is copied to errordict /ostack
    -     - the execution stack is copied to errordict /estack
    -     - the dictionary stack is copied to errordict /dstack
    -   * stop is called. Stop then tries to find an enclosing stopped
    -     context and calls the associated function.
    -
    -   This mechanism is explained in detail in The PostScript Reference Manual.
    -
    -   Please note that when raiserror is called, the state of the stacks
    -   should be restored to its initial state.
    -
    - Examples:
    -   /save_sqrt
    -   {
    -      0 gt % is the argument positive ?
    -      {
    -        sqrt
    -      }
    -      { % else, issue an error
    -        /save_sqrt /PositiveValueExpected raiseerror
    -      } ifelse
    -   } def
    -
    - Author: Gewaltig
    -
    - Remarks: not part of PostScript, but conform to the mechanism
    -
    - References: See the Red Book for PostScript's error handling facilities
    -
    - SeeAlso: raiseagain, stop, stopped, errordict
    -*/
    -
    -void
    -RaiseerrorFunction::execute( SLIInterpreter* i ) const
    -{
    -  // pick :  2     1
    -  // call : /cmd /err raiseerror
    -
    -  i->EStack.pop();
    -  Token err;
    -  Token cmd;
    -
    -  i->OStack.pop_move( err );
    -  i->OStack.pop_move( cmd );
    -
    -  Name* errorname = dynamic_cast< Name* >( err.datum() );
    -  Name* cmdname = dynamic_cast< Name* >( cmd.datum() );
    -  if ( not errorname or not cmdname )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "raiseerror", "Usage: /command /errorname raiserror" );
    -    i->raiseerror( "ArgumentType" );
    -    return;
    -  }
    -
    -  i->raiseerror( *cmdname, *errorname );
    -}
    -
    -/** @BeginDocumentation
    - Name: print_error - print an error based on the errordict
    -
    - Synopsis:
    - /command print_error -> --
    -
    - Description:
    -   print_error prints a message describing the content of
    -   the error dictionary. Please see the example below for
    -   information about how to use this function.
    -   Note: The errordict parameters command and message are
    -   reset after a call to print_error. The errorname is not
    -   reset, so every call to print_error will use the same
    -   errorname until this parameter is redefined.
    -
    - Examples:
    -   errordict /errorname /MyError put_d
    -   errordict /command /my_function put_d
    -   errordict /message (Something went wrong.) put_d
    -   /my_function print_error
    -
    - SeeAlso: handleerror, raiseerror, raiseagain, stop, stopped, errordict
    -*/
    -
    -void
    -PrinterrorFunction::execute( SLIInterpreter* i ) const
    -{
    -  // The name of the command that raised the error should be
    -  // placed at the top of the OStack.
    -  i->assert_stack_load( 1 );
    -
    -  // Call print_error function.
    -  i->print_error( i->OStack.top() );
    -
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    - Name: raiseagain - re-raise the last error
    -
    - Synopsis:  raiseagain
    -
    - Description:
    -   raiseagain re-raises a previously raised error. This is useful
    -   if an error handler cannot cope with a particular error (e.g. a signal)
    -   and wants to pass it to an upper level handler. Thus, nestet error handlers
    -   are possible.
    -
    - Author: Gewaltig
    -
    - Remarks: not part of PostScript
    -
    - References: See the Red Book for PostScript's error handling facilities
    -
    - SeeAlso: raiseerror, stop, stopped, errordict
    -*/
    -
    -void
    -RaiseagainFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  i->raiseagain();
    -}
    -
    -/** @BeginDocumentation
    -Name: cycles - return the number of elapsed interpreter cycles
    -
    -Synopsis: cycles -> n
    -*/
    -void
    -CyclesFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  Token cycles( new IntegerDatum( i->cycles() ) );
    -
    -  i->OStack.push( cycles );
    -}
    -
    -void
    -CodeAccessedFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  Token c( new IntegerDatum( i->code_accessed ) );
    -
    -  i->OStack.push( c );
    -}
    -
    -void
    -CodeExecutedFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  Token c( new IntegerDatum( i->code_executed ) );
    -
    -  i->OStack.push( c );
    -}
    -
    -
    -/** @BeginDocumentation
    -Name: quit - leave the SLI interpreter, optionally return exit code
    -
    -Synopsis:
    -           quit   -> -
    -  exitcode quit_i -> -
    -
    -Description:
    -This function leaves the SLI interpreter, returning an exit code to
    -the calling shell. The first variant (quit) returns the value
    -EXIT_SUCCESS (usually 0). The second variant (quit_i) returns the
    -value given by the integer argument. All data which has not been saved
    -is lost.
    -
    -Common exit codes and their reasons can be found in the dictionary
    -statusdict/exitcodes.
    -
    -Parameters:
    -exitcode (integertype): exit code to return to the shell. If this
    -parameter is not given, statusdict/exitcode is used instead.
    -
    -Examples:
    -quit      % quit SLI with exit code statusdict/exitcode.
    -23 quit_i % quit SLI with exit code 23.
    -
    -Author: unknown, JM Eppler, R Kupper
    -
    -FirstVersion: long time ago
    -
    -Remarks:
    -This command should not be mixed up with exit.
    -
    -Availability: SLI-2.0
    -
    -References:
    -POSIX Programmer's Manual.
    -
    -SeeAlso: exit
    -*/
    -void
    -QuitFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.clear();
    -}
    -
    -/** @BeginDocumentation
    -Name: exec - execute an object
    -
    -Synopsis: any exec -> -
    -
    -Description: exec tries to execute the object by moving it to
    -the execution stack.
    -
    -Examples: {1 2 add} exec -> 3
    -
    -SeeAlso: cvx
    -*/
    -void
    -ExecFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  i->EStack.push_move( i->OStack.top() );
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: typeinfo - return the type of an object
    -
    -Synopsis: any type -> any literal
    -
    -Description: typeinfo returns a literal name, which represents
    - the type of the argument. The argument is left on the stack.
    -
    -SeeAlso: typestack, type
    -*/
    -void
    -TypeinfoFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  i->EStack.pop();
    -  Token tn( new LiteralDatum( i->OStack.top()->gettypename() ) );
    -
    -  i->OStack.push_move( tn );
    -}
    -
    -void
    -SwitchFunction::execute( SLIInterpreter* i ) const
    -{
    -  // mark obj1 obj2 ... objn switch
    -  // Executes obj1 to obj2. If one object executes
    -  // exit, the execution of all other objects is
    -  // terminated.
    -  Name myname( i->getcurrentname() );
    -  i->EStack.pop();
    -
    -  Token mark_token( i->baselookup( i->mark_name ) );
    -
    -  i->EStack.push( mark_token ); // no push_move since token will
    -                                // be needed.
    -  i->EStack.push( i->baselookup( i->ipop_name ) );
    -
    -  unsigned long depth = i->OStack.load();
    -  unsigned long pos = 0;
    -  if ( depth == 0 )
    -  {
    -    throw TypeMismatch( "At least 1 argument.", "Nothing." );
    -  }
    -
    -  bool found = ( i->OStack.pick( pos ) == mark_token );
    -
    -  while ( pos < depth and not found )
    -  {
    -    i->EStack.push_move( i->OStack.pick( pos ) );
    -    found = ( i->OStack.pick( ++pos ) == mark_token );
    -  }
    -  if ( found )
    -  {
    -    i->OStack.pop( pos + 1 );
    -  }
    -  else
    -  {
    -    i->raiseerror( myname, Name( "UnmatchedMark" ) );
    -  }
    -}
    -
    -void
    -SwitchdefaultFunction::execute( SLIInterpreter* i ) const
    -{
    -  // mark obj1 obj2 ... objn defobj switchdefault
    -  // checks if n=0.
    -  // if so, executes defobj.
    -  // else pops defobj and calls switch to execute obj1..objn
    -  // If one object executes exit, the execution of all other
    -  // objects is terminated.
    -
    -  Name myname( i->getcurrentname() ); // needed for raiseerror
    -  i->EStack.pop();                    // no multiple calls !!!
    -
    -  Token mark_token( i->baselookup( i->mark_name ) );
    -
    -  i->EStack.push( mark_token );
    -  i->EStack.push( i->baselookup( i->ipop_name ) );
    -
    -  unsigned long depth = i->OStack.load();
    -  unsigned long pos = 0;
    -  if ( depth == 0 )
    -  {
    -    throw TypeMismatch( "At least 1 argument.", "Nothing." );
    -  }
    -
    -  // default action is not the only one
    -  if ( depth > 1 and i->OStack.pick( 1 ) != mark_token and i->OStack.pick( 0 ) != mark_token )
    -  {
    -    i->OStack.pop(); // thus pop it!
    -  }
    -
    -  bool found = ( i->OStack.pick( pos ) == mark_token );
    -
    -
    -  while ( pos < depth and not found )
    -  {
    -    i->EStack.push_move( i->OStack.pick( pos ) );
    -    found = ( i->OStack.pick( ++pos ) == mark_token );
    -  }
    -  if ( found )
    -  {
    -    i->OStack.pop( pos + 1 );
    -  }
    -  else
    -  {
    -    i->raiseerror( myname, Name( "UnmatchedMark" ) );
    -  }
    -}
    -
    -void
    -CaseFunction::execute( SLIInterpreter* i ) const
    -{
    -  // true  obj case -> obj
    -  // false obj case -> -
    -  // case is used in combinaion with the switch statement
    -
    -
    -  if ( i->OStack.pick( 1 ) == i->baselookup( i->true_name ) )
    -  {
    -    i->OStack.swap();
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else if ( i->OStack.pick( 1 ) == i->baselookup( i->false_name ) )
    -  {
    -    i->OStack.pop( 2 );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    Name myname( i->getcurrentname() );
    -    i->raiseerror( myname, i->ArgumentTypeError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: counttomark - count number of objects on the stack from top to marker
    -
    -Synopsis: mark obj1 ... objn counttomark -> mark obj1 ... objn n
    -
    -SeeAlso: count
    -*/
    -void
    -CounttomarkFunction::execute( SLIInterpreter* i ) const
    -{
    -  unsigned long depth = i->OStack.load();
    -  unsigned long pos = 0;
    -  Token mark_token( i->baselookup( i->mark_name ) );
    -
    -  bool found = false;
    -
    -  while ( pos < depth and not found )
    -  {
    -    found = ( i->OStack.pick( pos ) == mark_token );
    -    ++pos;
    -  }
    -
    -  if ( found )
    -  {
    -    Token it( new IntegerDatum( pos - 1 ) );
    -    i->OStack.push_move( it );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    Name myname( i->getcurrentname() );
    -    i->EStack.pop();
    -    i->raiseerror( myname, Name( "UnmatchedMark" ) );
    -  }
    -}
    -
    -/** @BeginDocumentation
    - Name: pclocks - returns POSIX clocks for real, user, system time
    -
    - Synopsis:  pclocks -> [rclocks uclocks sclocks cuclocks csclocks]
    -
    - Description:
    - Calls the POSIX times() function to obtain real, user,
    - and system time clock counts, as well as user and system time clock
    - counts for all children.  Real time clocks have arbitrary origin,
    - i.e., only differences are meaningful.
    - See man times(3) for details.
    -
    - Note: results for user and system time may not be reliable if more
    - than one thread is used.
    -
    - Author: Hans Ekkehard Plesser
    -
    - FirstVersion: 2003-07-29, based on Ptimesfunction
    -
    - References: man 2 times
    -
    - SeeAlso: pclockspersec, ptimes, realtime, usertime, systemtime, tic, toc
    -*/
    -
    -void
    -PclocksFunction::execute( SLIInterpreter* i ) const
    -{
    -  struct tms foo;
    -  const clock_t realtime = times( &foo );
    -
    -  if ( realtime == static_cast< clock_t >( -1 ) )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "PclocksFunction", "System function times() returned error!" );
    -    i->raiseerror( Processes::systemerror( i ) );
    -    return;
    -  }
    -
    -  Token rtime( ( long ) realtime );
    -  Token utime( ( long ) foo.tms_utime );
    -  Token stime( ( long ) foo.tms_stime );
    -  Token cutime( ( long ) foo.tms_cutime );
    -  Token cstime( ( long ) foo.tms_cstime );
    -
    -  ArrayDatum result;
    -  result.push_back( rtime );
    -  result.push_back( utime );
    -  result.push_back( stime );
    -  result.push_back( cutime );
    -  result.push_back( cstime );
    -
    -  i->EStack.pop();
    -  i->OStack.push( result );
    -}
    -
    -/** @BeginDocumentation
    -Name: pclockspersec - POSIX clock ticks per second
    -
    -Synopsis: pclockspersec -> clockticks
    -
    -Description:
    -pclockspersec i an integer variable containing the number of
    -POSIX clock ticks per second.
    -
    -Author: Hans Ekkehard Plesser
    -
    -FirstVersion: 2003-07-29
    -
    -Remarks: Replaces clockspersecond.
    -
    -References: man 2 times
    -
    -SeeAlso: pclocks, ptimes, realtime, usertime, systemtime, tic, toc
    -*/
    -void
    -PclockspersecFunction::execute( SLIInterpreter* i ) const
    -{
    -  const long cps = sysconf( _SC_CLK_TCK );
    -
    -  if ( cps <= 0 )
    -  {
    -    i->message(
    -      SLIInterpreter::M_ERROR, "PclockspersecFunction", "This system does not support sysconf(_SC_CLK_TCK)!" );
    -    i->raiseerror( "FunctionUnsupported" );
    -    return;
    -  }
    -
    -  Token result( cps );
    -  i->EStack.pop();
    -  i->OStack.push( result );
    -}
    -
    -/** @BeginDocumentation
    - Name: pgetrusage - Get resource consumption information
    -
    - Synopsis:  pgetrusage - selfinfo childinfo
    -
    - Description:
    - Calls the POSIX getrusage() function to obtain information on
    - memory consumption, context switches, I/O operatin count, etc,
    - for both the main process and its children.  Information is
    - returned in dictionaries.
    -
    - Author: Hans Ekkehard Plesser
    -
    - FirstVersion: 2003-07-29
    -
    - Remarks: At least under Linux, child processes return 0 for all
    - entries, while the main process seems to produce meaningfull data
    - only for minflt and majflt, i.e., page reclaims and faults.
    -
    - References: man 2 getrusage
    -
    - SeeAlso: pclockspersec, ptimes, realtime, usertime, systemtime, tic, toc
    -*/
    -
    -void
    -PgetrusageFunction::execute( SLIInterpreter* i ) const
    -{
    -  DictionaryDatum self;
    -  DictionaryDatum children;
    -
    -  if ( not getinfo_( RUSAGE_SELF, self ) )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "PgetrusageFunction", "System function getrusage() returned error for self!" );
    -    i->raiseerror( Processes::systemerror( i ) );
    -    return;
    -  }
    -
    -  if ( not getinfo_( RUSAGE_CHILDREN, children ) )
    -  {
    -    i->message(
    -      SLIInterpreter::M_ERROR, "PgetrusageFunction", "System function getrusage() returned error for children!" );
    -    i->raiseerror( Processes::systemerror( i ) );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -  i->OStack.push( self );
    -  i->OStack.push( children );
    -}
    -
    -bool
    -PgetrusageFunction::getinfo_( int who, DictionaryDatum& dict ) const
    -{
    -  struct rusage data;
    -
    -  if ( getrusage( who, &data ) != 0 )
    -  {
    -    return false;
    -  }
    -
    -  dict = new Dictionary;
    -  assert( dict.valid() );
    -
    -  ( *dict )[ "maxrss" ] = data.ru_maxrss;     /* maximum resident set size */
    -  ( *dict )[ "ixrss" ] = data.ru_ixrss;       /* integral shared memory size */
    -  ( *dict )[ "idrss" ] = data.ru_idrss;       /* integral unshared data size */
    -  ( *dict )[ "isrss" ] = data.ru_isrss;       /* integral unshared stack size */
    -  ( *dict )[ "minflt" ] = data.ru_minflt;     /* page reclaims */
    -  ( *dict )[ "majflt" ] = data.ru_majflt;     /* page faults */
    -  ( *dict )[ "nswap" ] = data.ru_nswap;       /* swaps */
    -  ( *dict )[ "inblock" ] = data.ru_inblock;   /* block input operations */
    -  ( *dict )[ "oublock" ] = data.ru_oublock;   /* block output operations */
    -  ( *dict )[ "msgsnd" ] = data.ru_msgsnd;     /* messages sent */
    -  ( *dict )[ "msgrcv" ] = data.ru_msgrcv;     /* messages received */
    -  ( *dict )[ "nsignals" ] = data.ru_nsignals; /* signals received */
    -  ( *dict )[ "nvcsw" ] = data.ru_nvcsw;       /* voluntary context switches */
    -  ( *dict )[ "nivcsw" ] = data.ru_nivcsw;     /* involuntary context switches */
    -
    -  return true;
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: time - return wall clock time in s since 1.1.1970 0
    -
    - Synopsis:  time -> int
    -
    - Description: calls time() and returns seconds since 1.1.1970,
    - 00:00:00 UTC.  This is mainly meant as a tool to generate random seeds.
    -
    - Author: Hans E. Plesser
    -
    - FirstVersion: 2001-10-03
    -
    - SeeAlso: clock, usertime, tic, toc, sleep
    -*/
    -
    -void
    -TimeFunction::execute( SLIInterpreter* i ) const
    -{
    -  long secs = time( nullptr );
    -  Token tmp( new IntegerDatum( secs ) );
    -  i->EStack.pop();
    -  i->OStack.push_move( tmp );
    -}
    -
    -
    -void
    -Sleep_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  const double t = static_cast< double >( i->OStack.pick( 0 ) );
    -
    -  if ( t < 0 )
    -  {
    -    throw BadParameterValue( "t >= 0 required." );
    -  }
    -
    -  if ( t > std::numeric_limits< int >::max() )
    -  {
    -    throw BadParameterValue( String::compose( "t < %1s required.", std::numeric_limits< int >::max() ) );
    -  }
    -
    -  /* Since sleep() only handles entire seconds and usleep() only
    -   * times shorter than 1s, we need to split the sleep; see #973. */
    -  const unsigned int t_sec = static_cast< unsigned int >( t );
    -  const unsigned int t_musec = std::min( 999999U, static_cast< unsigned int >( ( t - t_sec ) * 1e6 ) );
    -
    -  sleep( t_sec );
    -  usleep( t_musec );
    -
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    -Name: token_s - read a token from a string
    -
    -Synopsis:  string token_s -> post any true
    -                            false
    -
    -References: The Red Book
    -
    -SeeAlso: token
    -*/
    -
    -void
    -Token_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -#ifdef HAVE_SSTREAM
    -  std::istringstream in( sd->c_str() );
    -#else
    -  std::istrstream in( sd->c_str() );
    -#endif
    -
    -  Token t;
    -  i->parse->clear_context(); // this clears the previously parsed strings.
    -  i->parse->readToken( in, t );
    -  if ( t.contains( i->parse->scan()->EndSymbol ) )
    -  {
    -    i->OStack.pop();
    -    i->OStack.push( false );
    -  }
    -  else
    -  {
    -    i->OStack.push_move( t );
    -    sd->erase( 0, in.tellg() );
    -    i->OStack.push( true );
    -  }
    -}
    -/** @BeginDocumentation
    -Name: token_is - read a token from an input stream
    -
    -Synopsis:  istream token_is -> istream any true
    -                              istream false
    -
    -References: The Red Book
    -
    -SeeAlso: token
    -*/
    -
    -void
    -Token_isFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  i->EStack.pop();
    -
    -  IstreamDatum* sd = dynamic_cast< IstreamDatum* >( i->OStack.top().datum() );
    -  if ( not sd )
    -  {
    -    throw TypeMismatch( "istream", "something else" );
    -  }
    -
    -  Token t;
    -  i->parse->readToken( **sd, t );
    -  if ( t.contains( i->parse->scan()->EndSymbol ) )
    -  {
    -    i->OStack.push( false );
    -  }
    -  else
    -  {
    -    i->OStack.push_move( t );
    -    i->OStack.push( true );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: symbol_s - read a symbol from a string
    -
    -Synopsis:  string symbol_s -> post any true
    -                              false
    -
    -SeeAlso: token
    -*/
    -
    -void
    -Symbol_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -#ifdef HAVE_SSTREAM
    -  std::istringstream in( sd->c_str() );
    -#else
    -  std::istrstream in( sd->c_str() );
    -#endif
    -
    -  Token t;
    -  i->parse->clear_context(); // this clears the previously parsed strings.
    -  i->parse->readSymbol( in, t );
    -  if ( t.contains( i->parse->scan()->EndSymbol ) )
    -  {
    -    i->OStack.pop();
    -    i->OStack.push( false );
    -  }
    -  else
    -  {
    -    i->OStack.push_move( t );
    -    sd->erase( 0, in.tellg() );
    -    i->OStack.push( true );
    -  }
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: setguard - limit the number of interpreter cycles
    -
    - Synopsis:  n setguard -> --
    -
    - Description: This command forces the interpreter to stop after
    -   it has performed n cycles. setguard is useful for testing programs
    -   with long running loops.
    -
    - Parameters: n : an integer argument greater than zero
    -
    - Author: Gewaltig
    -
    - Remarks: not part of PostScript
    -
    - SeeAlso: removeguard
    -*/
    -
    -void
    -SetGuardFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  IntegerDatum* count = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( count );
    -  i->setcycleguard( count->get() );
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: removeguard - removes the limit on the number of interpreter cycles
    -
    - Synopsis:  removeguard -> --
    -
    - Description: This command removes the restriction on the number
    -   of possible interpreter cycles, imposed by setguard.
    -
    - Parameters: none
    -
    - Author: Gewaltig
    -
    - Remarks: not part of PostScript
    -
    - SeeAlso: setguard
    -*/
    -void
    -RemoveGuardFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->removecycleguard();
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    -Name: debugon - Start SLI level debugger.
    -
    -Description:
    -The SLI Debug mode allows you to debug SLI programs by tracing
    -the execution of the individual commands.
    -
    -In debug mode, each SLI instruction is stepped individually. After
    -each instruction, the user can see the next command, the contents of
    -the stack, the entire procedure being executed.
    -
    -It is also possible to set a breakpoint, so that variables and stacks
    -in the procedure context can be examined and modified.
    -
    -
    -The debug mode is controled by the debug level. Whenever execution
    -enters a procedure or loop, the debug level is increased.
    -If the procedure is left, the debug level is decreased.
    -The user can specify a max debug level, beyond which the debug mode
    -is suspended.
    -This way, the user can skip over functions which are beyond a certain
    -level.
    -
    -The following commands are available:
    -
    -  next        - Trace (execute) next command.
    -  continue    - Continue this level without debugging
    -  step        - Step over deeper levels.
    -  list        - list current procedure or loop.
    -  where       - show backtrace of execution stack.
    -  stack       - show operand stack.
    -  estack      - show execution stack.
    -  edit        - enter interactive mode.
    -  stop        - raise an exception.
    -  help        - display this list.
    -  quit        - quit debug mode.
    -  show next   - show next command.
    -  show stack  - show operand stack.
    -  show backtrace- same as 'where'.
    -  show estack - show execution stack.
    -  toggle stack     - toggle stack display.
    -  toggle catch     - toggle debug on error.
    -  toggle backtrace - toggle stack backtrace on error.
    -  toggle tailrecursion - toggle tail-recursion optimisation.
    -
    -Note: This mode is still experimental.
    -
    -SeeAlso: debugoff, debug
    -*/
    -void
    -DebugOnFunction::execute( SLIInterpreter* i ) const
    -{
    -  std::cerr << "Starting debug mode." << std::endl;
    -  i->debug_options();
    -  i->debug_mode_on();
    -  i->set_max_call_depth( i->get_call_depth() + 5 );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: debugoff - Stop SLI level debugging mode.
    -
    -Description:
    -debugoff is used to quit the debugging mode at a specific position in the code.
    -
    -Example:
    -
    -In this example, the parameter assignments as well as the
    -calculation will be dine in debug mode.
    -
    -/myproc
    -{
    -   << >> begin
    -   debugon % Enter debugging
    -   /a Set  % store first parameter
    -   /b Set  % store second parameter
    -   a b add a b mul add
    -   debugoff
    -   end
    -} def
    -
    -Note: This mode is still experimental.
    -
    -SeeAlso: debugon, debug
    -*/
    -void
    -DebugOffFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->debug_mode_off();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: debug - execute an object in debug mode.
    -
    -Synopsis: any debug -> -
    -
    -Description: debug tries to execute the object by moving it to
    -the execution stack.
    -
    -Examples: {1 2 add} debug -> 3
    -
    -SeeAlso: exec, debugon, debugoff
    -*/
    -void
    -DebugFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -  i->EStack.push( new NameDatum( "debugoff" ) );
    -  i->EStack.push_move( i->OStack.top() );
    -  i->EStack.push( new NameDatum( "debugon" ) );
    -  i->OStack.pop();
    -}
    -
    -void
    -SetVerbosityFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -  IntegerDatum* count = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( count );
    -  i->verbosity( count->get() );
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: verbosity - return the current verbosity level for interpreter messages
    -
    -Synopsis: verbosity -> n
    -
    -SeeAlso: setverbosity, message
    -*/
    -
    -void
    -VerbosityFunction::execute( SLIInterpreter* i ) const
    -{
    -  Token tmp( new IntegerDatum( i->verbosity() ) );
    -  i->EStack.pop();
    -  i->OStack.push_move( tmp );
    -}
    -
    -void
    -StartFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.clear();
    -  i->message( SLIInterpreter::M_ERROR,
    -    "Start",
    -    "Something went wrong "
    -    "during initialization of NEST or one of its modules. Probably "
    -    "there is a bug in the startup scripts. Please report the output "
    -    "of NEST at https://github.com/nest/nest-simulator/issues . You "
    -    "can try to find the bug by starting NEST with the option --debug" );
    -}
    -
    -void
    -MessageFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call : level (from) (message) message
    -
    -  assert( i->OStack.load() >= 3 );
    -
    -  IntegerDatum* lev = dynamic_cast< IntegerDatum* >( i->OStack.pick( 2 ).datum() );
    -  assert( lev );
    -  StringDatum* frm = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( frm );
    -  StringDatum* msg = dynamic_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( msg );
    -
    -  i->message( lev->get(), frm->c_str(), msg->c_str() );
    -  i->OStack.pop( 3 );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: noop - no operation function
    -
    -Description: This function does nothing. It is used for benchmark purposes.
    -*/
    -
    -void
    -NoopFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -}
    -
    -
    -const SetGuardFunction setguardfunction;
    -const RemoveGuardFunction removeguardfunction;
    -
    -
    -const Backtrace_onFunction backtrace_onfunction;
    -const Backtrace_offFunction backtrace_offfunction;
    -const OStackdumpFunction ostackdumpfunction;
    -const EStackdumpFunction estackdumpfunction;
    -const LoopFunction loopfunction;
    -const ExitFunction exitfunction;
    -const QuitFunction quitfunction;
    -const IfFunction iffunction;
    -const IfelseFunction ifelsefunction;
    -const RepeatFunction repeatfunction;
    -const CloseinputFunction closeinputfunction;
    -const StoppedFunction stoppedfunction;
    -const StopFunction stopfunction;
    -const CurrentnameFunction currentnamefunction;
    -const IparsestdinFunction iparsestdinfunction;
    -const ParsestdinFunction parsestdinfunction;
    -const IparseFunction iparsefunction;
    -const DefFunction deffunction;
    -const SetFunction setfunction;
    -const LoadFunction loadfunction;
    -const LookupFunction lookupfunction;
    -
    -const ForFunction forfunction;
    -const Forall_aFunction forall_afunction;
    -const Forallindexed_aFunction forallindexed_afunction;
    -const Forallindexed_sFunction forallindexed_sfunction;
    -const Forall_sFunction forall_sfunction;
    -const RaiseerrorFunction raiseerrorfunction;
    -const PrinterrorFunction printerrorfunction;
    -const RaiseagainFunction raiseagainfunction;
    -
    -const CyclesFunction cyclesfunction;
    -const CodeAccessedFunction codeaccessedfunction;
    -const CodeExecutedFunction codeexecutedfunction;
    -const ExecFunction execfunction;
    -const TypeinfoFunction typeinfofunction;
    -const SwitchFunction switchfunction;
    -const SwitchdefaultFunction switchdefaultfunction;
    -const CaseFunction casefunction;
    -const CounttomarkFunction counttomarkfunction;
    -const PclocksFunction pclocksfunction;
    -const PclockspersecFunction pclockspersecfunction;
    -const PgetrusageFunction pgetrusagefunction;
    -const TimeFunction timefunction;
    -const Sleep_dFunction sleep_dfunction;
    -
    -const Token_sFunction token_sfunction;
    -const Token_isFunction token_isfunction;
    -
    -const Symbol_sFunction symbol_sfunction;
    -
    -const SetVerbosityFunction setverbosityfunction;
    -const VerbosityFunction verbosityfunction;
    -const MessageFunction messagefunction;
    -const NoopFunction noopfunction;
    -const StartFunction startfunction;
    -const DebugOnFunction debugonfunction;
    -const DebugOffFunction debugofffunction;
    -const DebugFunction debugfunction;
    -
    -/** @BeginDocumentation
    -Name: mark - puts a mark on the stack
    -
    -Description: A mark is a token which is lying on the stack and
    -can be found by the user. The mark is used :
    -1) by using it as command mark
    -2) by using it as [ when creating an array
    -3) by using it as << when creating a dict
    -
    -Examples: [ 1 2 add ] -> [3]
    -mark 1 2 add ] -> [3]
    -
    -Author: docu by Marc Oliver Gewaltig and Sirko Straube
    -SeeAlso: counttomark, arraystore, switch, case
    - */
    -
    -void
    -init_slicontrol( SLIInterpreter* i )
    -{
    -  // Define the built-in symbols
    -  i->def( i->true_name, BoolDatum( true ) );
    -  i->def( i->false_name, BoolDatum( false ) );
    -  i->def( i->mark_name, LiteralDatum( i->mark_name ) );
    -  i->def( Name( "<<" ), LiteralDatum( i->mark_name ) );
    -  i->def( Name( "[" ), LiteralDatum( i->mark_name ) );
    -  i->def( i->istopped_name, BoolDatum( false ) );
    -
    -  i->def( i->newerror_name, BoolDatum( false ) );
    -  i->def( i->recordstacks_name, BoolDatum( false ) );
    -
    -  i->createcommand( "backtrace_on", &backtrace_onfunction );
    -  i->createcommand( "backtrace_off", &backtrace_offfunction );
    -  i->createcommand( "estackdump", &estackdumpfunction );
    -  i->createcommand( "ostackdump", &ostackdumpfunction );
    -  i->createcommand( "loop", &loopfunction );
    -  i->createcommand( "exit", &exitfunction );
    -  i->createcommand( "quit", &quitfunction );
    -  i->createcommand( "if", &iffunction );
    -  i->createcommand( "ifelse", &ifelsefunction );
    -  i->createcommand( "repeat", &repeatfunction );
    -  i->createcommand( "closeinput", &closeinputfunction );
    -  i->createcommand( "stop", &stopfunction );
    -  i->createcommand( "stopped", &stoppedfunction );
    -  i->createcommand( "currentname", &currentnamefunction );
    -  i->createcommand( "parsestdin", &parsestdinfunction );
    -  i->createcommand( ":parsestdin", &iparsestdinfunction );
    -  i->createcommand( "::parse", &iparsefunction );
    -  i->createcommand( "start", &startfunction );
    -  i->createcommand( "def", &deffunction );
    -  i->createcommand( "Set", &setfunction );
    -  i->createcommand( "load", &loadfunction );
    -  i->createcommand( "lookup", &lookupfunction );
    -  i->createcommand( "for", &forfunction );
    -  i->createcommand( "forall_a", &forall_afunction );
    -  i->createcommand( "forallindexed_a", &forallindexed_afunction );
    -  i->createcommand( "forallindexed_s", &forallindexed_sfunction );
    -  i->createcommand( "forall_s", &forall_sfunction );
    -  i->createcommand( "raiseerror", &raiseerrorfunction );
    -  i->createcommand( "print_error", &printerrorfunction );
    -  i->createcommand( "raiseagain", &raiseagainfunction );
    -  i->createcommand( "cycles", &cyclesfunction );
    -  i->createcommand( "code_accessed", &codeaccessedfunction );
    -  i->createcommand( "code_executed", &codeexecutedfunction );
    -  i->createcommand( "exec", &execfunction );
    -  i->createcommand( "typeinfo", &typeinfofunction );
    -  i->createcommand( "switch", &switchfunction );
    -  i->createcommand( "switchdefault", &switchdefaultfunction );
    -  i->createcommand( "case", &casefunction );
    -  i->createcommand( "counttomark", &counttomarkfunction );
    -  i->createcommand( "pclocks", &pclocksfunction );
    -  i->createcommand( "pclockspersec", &pclockspersecfunction );
    -  i->createcommand( "pgetrusage", &pgetrusagefunction );
    -  i->createcommand( "time", &timefunction );
    -  i->createcommand( "sleep_d", &sleep_dfunction );
    -
    -  i->createcommand( "token_s", &token_sfunction );
    -  i->createcommand( "token_is", &token_isfunction );
    -
    -  i->createcommand( "symbol_s", &symbol_sfunction );
    -
    -  i->createcommand( "setguard", &setguardfunction );
    -  i->createcommand( "removeguard", &removeguardfunction );
    -  i->createcommand( "setverbosity_i", &setverbosityfunction );
    -  i->createcommand( "verbosity", &verbosityfunction );
    -  i->createcommand( "message_", &messagefunction );
    -  i->createcommand( "noop", &noopfunction );
    -  i->createcommand( "debug", &debugfunction );
    -  i->createcommand( "debugon", &debugonfunction );
    -  i->createcommand( "debugoff", &debugofffunction );
    -}
    diff --git a/sli/slicontrol.h b/sli/slicontrol.h
    deleted file mode 100644
    index 455eb3dfb3..0000000000
    --- a/sli/slicontrol.h
    +++ /dev/null
    @@ -1,658 +0,0 @@
    -/*
    - *  slicontrol.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLICONTROL_H
    -#define SLICONTROL_H
    -/*
    -    SLI's control structures
    -*/
    -
    -// Includes from sli:
    -#include "dictdatum.h"
    -#include "interpret.h"
    -
    -/**************************************
    -  All SLI control functions are
    -  defined in this module
    -  *************************************/
    -
    -void init_slicontrol( SLIInterpreter* );
    -
    -class Backtrace_onFunction : public SLIFunction
    -{
    -public:
    -  Backtrace_onFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Backtrace_offFunction : public SLIFunction
    -{
    -public:
    -  Backtrace_offFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OStackdumpFunction : public SLIFunction
    -{
    -public:
    -  OStackdumpFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class EStackdumpFunction : public SLIFunction
    -{
    -public:
    -  EStackdumpFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class LoopFunction : public SLIFunction
    -{
    -public:
    -  LoopFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ExitFunction : public SLIFunction
    -{
    -public:
    -  ExitFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class QuitFunction : public SLIFunction
    -{
    -public:
    -  QuitFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IfFunction : public SLIFunction
    -{
    -public:
    -  IfFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IfelseFunction : public SLIFunction
    -{
    -public:
    -  IfelseFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RepeatFunction : public SLIFunction
    -{
    -public:
    -  RepeatFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CloseinputFunction : public SLIFunction
    -{
    -public:
    -  CloseinputFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class StoppedFunction : public SLIFunction
    -{
    -public:
    -  StoppedFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class StopFunction : public SLIFunction
    -{
    -public:
    -  StopFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CurrentnameFunction : public SLIFunction
    -{
    -public:
    -  CurrentnameFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IparsestdinFunction : public SLIFunction
    -{
    -public:
    -  IparsestdinFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class StartFunction : public SLIFunction
    -{
    -public:
    -  StartFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ParsestdinFunction : public SLIFunction
    -{
    -public:
    -  ParsestdinFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IparseFunction : public SLIFunction
    -{
    -public:
    -  IparseFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DefFunction : public SLIFunction
    -{
    -public:
    -  DefFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class SetFunction : public SLIFunction
    -{
    -public:
    -  SetFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class LoadFunction : public SLIFunction
    -{
    -public:
    -  LoadFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class LookupFunction : public SLIFunction
    -{
    -public:
    -  LookupFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ForFunction : public SLIFunction
    -{
    -public:
    -  ForFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Forall_aFunction : public SLIFunction
    -{
    -public:
    -  Forall_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Forallindexed_aFunction : public SLIFunction
    -{
    -public:
    -  Forallindexed_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Forallindexed_sFunction : public SLIFunction
    -{
    -public:
    -  Forallindexed_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Forall_sFunction : public SLIFunction
    -{
    -public:
    -  Forall_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RaiseerrorFunction : public SLIFunction
    -{
    -public:
    -  RaiseerrorFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class PrinterrorFunction : public SLIFunction
    -{
    -public:
    -  PrinterrorFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RaiseagainFunction : public SLIFunction
    -{
    -public:
    -  RaiseagainFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CyclesFunction : public SLIFunction
    -{
    -public:
    -  CyclesFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CodeAccessedFunction : public SLIFunction
    -{
    -public:
    -  CodeAccessedFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CodeExecutedFunction : public SLIFunction
    -{
    -public:
    -  CodeExecutedFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ExecFunction : public SLIFunction
    -{
    -public:
    -  ExecFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -class TypeinfoFunction : public SLIFunction
    -{
    -public:
    -  TypeinfoFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -/** @BeginDocumentation
    - Name: switch - finish a case ... switch structure
    -
    - Synopsis: mark proc1...procn switch-> -
    -
    - Description:
    -   switch executes proc1 ... procn and removes the mark. If any executed
    -   proc containes an exit command, switch will remove the other procs without
    -   execution. switch is used together with case.
    -
    - Parameters:
    -   proc1...procn: executable procedure tokens.
    -
    - Examples:
    -
    -   mark
    -     false {1 == exit} case
    -     false {2 == exit} case
    -     true  {3 == exit} case
    -     false {4 == exit} case
    -   switch
    -   --> 3
    -
    -   mark {1 ==} {2 ==} switch -->  1 2
    -
    - Author: Gewaltig
    -
    - SeeAlso: case, switchdefault, exit, mark
    -*/
    -
    -
    -class SwitchFunction : public SLIFunction
    -{
    -public:
    -  SwitchFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -/** @BeginDocumentation
    - Name: switchdefault - finish a case ... switchdefault structure
    -
    - Synopsis: mark proc1...procn procdefault switchdefault -> -
    -
    - Description:
    -   Like switch, switchdefault executes any of proc1...procn.
    -   If an execution it meets an exit command, no further procs are executed.
    -   If n=0, e.g. no procedure other than procdefault is found, procdefault
    -   will be executed. Thus, procdefault will be skipped if any other proc
    -   exists.
    -
    - Parameters:
    -   proc1...procn: executable procedure tokens.
    -   procdefault  : execulable procedure called if no other proc is present.
    -
    - Examples:
    -
    -   mark
    -     false {1 == exit} case
    -     false {2 == exit} case
    -     true  {3 == exit} case
    -     false {4 == exit} case
    -     {(default) ==}
    -   switchdefault
    -   -->  3
    -
    -   mark
    -     false {1 == exit} case
    -     false {2 == exit} case
    -     false {3 == exit} case
    -     false {4 == exit} case
    -     {(default) ==}
    -   switchdefault
    -   --> default
    -
    - Author: Hehl
    -
    - FirstVersion: April 16, 1999
    -
    - SeeAlso: case, switch, exit, mark
    -*/
    -
    -class SwitchdefaultFunction : public SLIFunction
    -{
    -public:
    -  SwitchdefaultFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -/** @BeginDocumentation
    - Name: case - like if, but test a series of conditions.
    - Synopsis: bool proc case --> proc
    -                              -
    - Description:
    -   case tests the bool and pushes proc if true, else does nothing.
    -
    - Parameters:
    -   bool : condition for case to test
    -   proc : procedure to be executed if case is true
    -
    - Examples:
    -
    -   true {(hello) ==} case --> hello
    -   false {(hello) ==} case --> -
    -
    -   1 0 gt {(1 bigger than 0) ==} case --> 1 bigger than 0
    -   1 0 lt {(0 bigger than 1) ==} case --> -
    -
    -   mark
    -     false {1 == exit} case
    -     false {2 == exit} case
    -     true  {3 == exit} case
    -     false {4 == exit} case
    -   switch
    -   --> 3
    -
    - Author: Gewaltig
    -
    - Remarks: Use exit to make sure that switch is exited.
    -
    - SeeAlso: switch, switchdefault, exit, mark, if
    -*/
    -
    -class CaseFunction : public SLIFunction
    -{
    -public:
    -  CaseFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CounttomarkFunction : public SLIFunction
    -{
    -public:
    -  CounttomarkFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class PclocksFunction : public SLIFunction
    -{
    -public:
    -  PclocksFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class PclockspersecFunction : public SLIFunction
    -{
    -public:
    -  PclockspersecFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class PgetrusageFunction : public SLIFunction
    -{
    -public:
    -  PgetrusageFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -
    -private:
    -  bool getinfo_( int, DictionaryDatum& ) const;
    -};
    -
    -class TimeFunction : public SLIFunction
    -{
    -public:
    -  TimeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Sleep_dFunction : public SLIFunction
    -{
    -public:
    -  Sleep_dFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Token_sFunction : public SLIFunction
    -{
    -public:
    -  Token_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Token_isFunction : public SLIFunction
    -{
    -public:
    -  Token_isFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Symbol_sFunction : public SLIFunction
    -{
    -public:
    -  Symbol_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class SetGuardFunction : public SLIFunction
    -{
    -public:
    -  SetGuardFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RemoveGuardFunction : public SLIFunction
    -{
    -public:
    -  RemoveGuardFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class MessageFunction : public SLIFunction
    -{
    -public:
    -  MessageFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class SetVerbosityFunction : public SLIFunction
    -{
    -public:
    -  SetVerbosityFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class VerbosityFunction : public SLIFunction
    -{
    -public:
    -  VerbosityFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -class NoopFunction : public SLIFunction
    -{
    -public:
    -  NoopFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DebugOnFunction : public SLIFunction
    -{
    -public:
    -  DebugOnFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DebugOffFunction : public SLIFunction
    -{
    -public:
    -  DebugOffFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DebugFunction : public SLIFunction
    -{
    -public:
    -  DebugFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -#endif
    diff --git a/sli/slidata.cc b/sli/slidata.cc
    deleted file mode 100644
    index e5d4870cb0..0000000000
    --- a/sli/slidata.cc
    +++ /dev/null
    @@ -1,1682 +0,0 @@
    -/*
    - *  slidata.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    SLI's data access functions
    -*/
    -
    -#include "slidata.h"
    -
    -// C++ includes:
    -#include <climits>
    -#include <sstream>
    -#include <vector>
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dictdatum.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "namedatum.h"
    -#include "stringdatum.h"
    -
    -/** @BeginDocumentation
    -Name: allocations - Return the number of array reallocations.
    -Synopsis: - allocations -> int
    -Description: This function returns the total number of array-allocations
    -which have occured during the run-time of the SLI interpreter.
    -This number is important in the context of benchmarking and optimization.
    -*/
    -void
    -Allocations_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  Token at( new IntegerDatum( TokenArrayObj::getallocations() ) );
    -  i->OStack.push_move( at );
    -  i->EStack.pop();
    -}
    -
    -void
    -Get_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array int get_a
    -  assert( i->OStack.load() > 1 );
    -
    -  IntegerDatum* idx = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( idx );
    -  ArrayDatum* obj = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( obj );
    -
    -
    -  if ( ( idx->get() >= 0 ) and ( ( size_t ) idx->get() < obj->size() ) )
    -  {
    -    i->EStack.pop();
    -    Token objT( obj->get( idx->get() ) );
    -    i->OStack.pop( 2 );
    -    i->OStack.push_move( objT );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -Get_a_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array int get_a
    -  assert( i->OStack.load() > 1 );
    -
    -  ArrayDatum* idx = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  if ( not idx )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "get_a_a", "Second argument must be an array of indices." );
    -    i->message( SLIInterpreter::M_ERROR, "get_a_a", "Usage: [a] [i1 .. in] get -> [a[i1] ... a[in]]" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  ArrayDatum* obj = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not obj )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "get_a_a", "Usage: [a] [i1 .. in] get -> [a[i1] ... a[in]]" );
    -    i->message( SLIInterpreter::M_ERROR, "get_a_a", "First argument must be an array." );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  std::vector< size_t > indices;
    -  indices.reserve( idx->size() );
    -
    -  for ( Token* t = idx->begin(); t != idx->end(); ++t )
    -  {
    -    IntegerDatum* id = dynamic_cast< IntegerDatum* >( t->datum() );
    -    if ( not id )
    -    {
    -      std::ostringstream sout;
    -
    -      sout << "Index at position " << ( size_t ) ( t - idx->begin() ) << " ignored." << std::ends;
    -      i->message( SLIInterpreter::M_INFO, "get_a_a", sout.str().c_str() );
    -      i->message( SLIInterpreter::M_INFO, "get_a_a", "Index must be an integer." );
    -      continue;
    -    }
    -
    -    if ( not( ( id->get() >= 0 ) and ( ( size_t ) id->get() < obj->size() ) ) )
    -    {
    -      std::ostringstream sout;
    -      sout << "At position " << ( size_t ) ( t - idx->begin() ) << "." << std::ends;
    -      i->message( SLIInterpreter::M_ERROR, "get_a_a", sout.str().c_str() );
    -      i->message( SLIInterpreter::M_ERROR, "get_a_a", "Index out of range." );
    -      i->raiseerror( i->RangeCheckError );
    -      return;
    -    }
    -    indices.push_back( id->get() );
    -  }
    -
    -  TokenArray result;
    -  result.reserve( idx->size() );
    -
    -  for ( size_t j = 0; j < indices.size(); ++j )
    -  {
    -    result.push_back( obj->get( indices[ j ] ) );
    -  }
    -
    -  assert( result.size() == indices.size() );
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push( ArrayDatum( result ) );
    -  i->EStack.pop();
    -}
    -
    -void
    -Get_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array int get_a
    -  assert( i->OStack.load() > 1 );
    -
    -  IntegerDatum* idx = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( idx );
    -  ProcedureDatum* obj = dynamic_cast< ProcedureDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( obj );
    -
    -
    -  if ( ( idx->get() >= 0 ) and ( ( size_t ) idx->get() < obj->size() ) )
    -  {
    -    i->EStack.pop();
    -    Token objT( obj->get( idx->get() ) );
    -    i->OStack.pop( 2 );
    -    i->OStack.push_move( objT );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -Get_lpFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call:  array int get_a
    -  assert( i->OStack.load() > 1 );
    -
    -  IntegerDatum* idx = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( idx );
    -  LitprocedureDatum* obj = dynamic_cast< LitprocedureDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( obj );
    -
    -  if ( ( idx->get() >= 0 ) and ( ( size_t ) idx->get() < obj->size() ) )
    -  {
    -    i->EStack.pop();
    -    Token objT( obj->get( idx->get() ) );
    -    i->OStack.pop( 2 );
    -    i->OStack.push_move( objT );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -Append_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  ArrayDatum* obj = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( obj );
    -
    -
    -  obj->push_back_move( i->OStack.top() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Append_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  ProcedureDatum* obj = dynamic_cast< ProcedureDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( obj );
    -
    -
    -  obj->push_back_move( i->OStack.top() );
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: append - Append an object to a string or array.
    -
    -Synopsis: (string) int append -> string
    -          [array] obj append  -> array
    -
    -Examples: (hello) 44 append -> (hello,)  (44 is ASCII value for ,)
    -[1 2 3] (hello) append -> [1 2 3 (hello)]
    -[1 2 3] 44 append -> [1 2 3 44]
    -
    -Author:  docu by Sirko Straube, Marc-Oliver Gewaltig
    -
    -SeeAlso: prepend, insert
    -*/
    -void
    -Append_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string integer append_s string
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( sd and id );
    -
    -  ( *sd ) += static_cast< char >( id->get() );
    -
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: join - Join two strings or arrays.
    -Synopsis:
    -(string1) (string2) join -> (string1string2)
    -[array1] [array2] -> [array1 array2]
    -<< dict1 >> << dict2 >> -> << contents of dict2 assigned to dict1 >>
    -Examples:
    -(spike) (train) join -> (spiketrain)
    -[1 2] [3 4] join -> [1 2 3 4]
    -/j << /C_m 250.0 /Tau_m 10.0 >> def  j  << /Tau_m 25.0 /I_e 130.0 >> join j
    -                  -> << /C_m 250.0 /Tau_m 25.0 /I_e 130.0 >>
    -Author: docu edited by Sirko Straube
    -SeeAlso: append, getinterval, get
    -
    -*/
    -void
    -Join_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string string join_s string
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  StringDatum* s1 = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum* s2 = dynamic_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not s1 or not s2 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "join_s", "Usage: (string1) (string2) join_s" );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  s1->append( *s2 );
    -
    -  i->OStack.pop();
    -}
    -
    -void
    -Join_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array array join_a array
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  ArrayDatum* a1 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -  ArrayDatum* a2 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( a1 and a2 );
    -
    -  a1->append_move( *a2 );
    -
    -  i->OStack.pop();
    -}
    -
    -void
    -Join_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: proc proc join_p proc
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  ProcedureDatum* a1 = dynamic_cast< ProcedureDatum* >( i->OStack.pick( 1 ).datum() );
    -  ProcedureDatum* a2 = dynamic_cast< ProcedureDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( a1 and a2 );
    -
    -  a1->append_move( *a2 );
    -
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: insert - Insert all elements of one container in another container.
    -Synopsis: (string1) n (string2) insert -> (string3)
    -           Inserts string2 into string1, starting at position n.
    -
    -          [array1] n [array2] insert-> [array3]
    -          Inserts all elements of array2 into array1, starting at
    -          position n
    -Examples: (spikesimulation) 5 (train) insert -> (spiketrainsimulation)
    -[20 21 22 24 25 26] 3 [23] insert -> [20 21 22 23 24 25 26]
    -SeeAlso: join, insertelement, append, prepend
    -*/
    -
    -void
    -Insert_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string index string insert_s string
    -  assert( i->OStack.load() > 2 );
    -
    -  StringDatum* s1 = dynamic_cast< StringDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum* s2 = dynamic_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and id and s2 );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < s1->size() ) )
    -  {
    -    i->EStack.pop();
    -    s1->insert( id->get(), *s2 );
    -    i->OStack.pop( 2 );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: insertelement - insert an element to a container at a specific position
    -Synopsis: (string1) n c insertelement -> (string2)
    -           Inserts the character c into string1, starting at position n.
    -
    -          [array1] n any insertelement -> [array3]
    -          Inserts element any into array1, starting at
    -          position n
    -Examples:(hello) 3 44 insertelement -> (hel,lo)
    -[1 2 3] 1 (hello) insertelement -> [1 (hello) 2 3]
    -SeeAlso: join, insert, append, prepend
    -*/
    -void
    -InsertElement_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string integer integer insertelement_s string
    -  assert( i->OStack.load() > 2 );
    -
    -  StringDatum* s1 = dynamic_cast< StringDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* c = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and id and c );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < s1->size() ) )
    -  {
    -    i->EStack.pop();
    -    s1->insert( id->get(), 1, static_cast< char >( c->get() ) );
    -    i->OStack.pop( 2 );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -/** @BeginDocumentation:
    -Name: prepend - Attach an object to the front of an array or string.
    -
    -Synopsis: (string) int prepend -> string
    -          [array] any  prepend -> array
    -
    -Examples: (hello) 44 prepend -> (,hello) (44 is ASCII value for ,)
    -[1 2 3] (hello) prepend -> [(hello) 1 2 3]
    -[1 2 3] 44 prepend -> [44 1 2 3]
    -
    -Author: docu edited by Sirko Straube
    -
    -SeeAlso: append, insertelement
    -*/
    -void
    -Prepend_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string integer prepend_s string
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  StringDatum* s1 = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* c = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and c );
    -
    -  s1->insert( ( size_t ) 0, 1, static_cast< char >( c->get() ) );
    -
    -  i->OStack.pop( 1 );
    -}
    -
    -void
    -Insert_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array index array insert_a array
    -  assert( i->OStack.load() > 2 );
    -
    -  ArrayDatum* a1 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  ArrayDatum* a2 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( a1 and id and a2 );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < a1->size() ) )
    -  {
    -    i->EStack.pop();
    -    a1->insert_move( id->get(), *a2 ); // ArrayDatum is a TokenArray.
    -    i->OStack.pop( 2 );                // insert_move empties TokenArray *a2
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -InsertElement_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array index any insertelement_a array
    -  assert( i->OStack.load() > 2 );
    -
    -  ArrayDatum* a1 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  assert( a1 and id );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < a1->size() ) )
    -  {
    -    i->EStack.pop();
    -    a1->insert_move( id->get(), i->OStack.top() );
    -    i->OStack.pop( 2 );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -Prepend_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array any prepend_a array
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  ArrayDatum* a1 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  assert( a1 );
    -
    -  a1->insert_move( 0, i->OStack.top() );
    -
    -  i->OStack.pop( 1 );
    -}
    -
    -void
    -Prepend_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array any prepend_a array
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 1 );
    -
    -  ProcedureDatum* a1 = dynamic_cast< ProcedureDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  assert( a1 );
    -
    -  a1->insert_move( 0, i->OStack.top() );
    -
    -  i->OStack.pop( 1 );
    -}
    -
    -/** @BeginDocumentation
    -Name: replace - Replace a section of a string or array by a new sequence.
    -
    -Synopsis: (string1) a b (string2) replace -> (string3)
    -          [array1]  a b [array2]  replace -> [array3]
    -
    -Description: Replaces the elements a through b in container1 by
    -             container2.
    -
    -Examples: [1 2 3 4 5 6 7] 2 3 [99 99 99 99] replace -> [1 2 99 99 99 99 6 7]
    -(computer) 1 5 (are) replace ->(career)
    -
    -SeeAlso: ReplaceOccurrences
    -*/
    -
    -void
    -Replace_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string integer integer string replace_s string
    -  assert( i->OStack.load() > 3 );
    -
    -  StringDatum* s1 = dynamic_cast< StringDatum* >( i->OStack.pick( 3 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* n = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum* s2 = dynamic_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and id and n and s2 );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < s1->size() ) )
    -  {
    -    if ( n->get() >= 0 )
    -    {
    -      i->EStack.pop();
    -      s1->replace( id->get(), n->get(), *s2 );
    -      i->OStack.pop( 3 );
    -    }
    -    else
    -    {
    -      i->raiseerror( i->PositiveIntegerExpectedError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -Replace_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array integer integer array replace_a array
    -  assert( i->OStack.load() > 3 );
    -
    -  ArrayDatum* s1 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 3 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* n = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  ArrayDatum* s2 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and id and n and s2 );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < s1->size() ) )
    -  {
    -    if ( n->get() >= 0 )
    -    {
    -      i->EStack.pop();
    -      s1->replace_move( id->get(), n->get(), *s2 );
    -      i->OStack.pop( 3 );
    -    }
    -    else
    -    {
    -      i->raiseerror( i->PositiveIntegerExpectedError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: erase - Deletes a subsequece of a string or array.
    -Synopsis: (string1) a n erase -> (string2)
    -          [array1] a n erase -> [array2]
    -Parameters:
    -a - index of the first element to be removed, starting with 0.
    -n - number of element to be removed.
    -Description:
    -Erases n elements from the container, starting with element a.
    -Examples:
    -SLI ] [1 2 3 4 5 6] 5 1 erase ==
    -[1 2 3 4 5]
    -SeeAlso: getinterval
    -*/
    -void
    -Erase_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string integer integer erase_s string
    -  assert( i->OStack.load() > 2 );
    -
    -  StringDatum* s1 = dynamic_cast< StringDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* n = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and id and n );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < s1->size() ) )
    -  {
    -    if ( n->get() >= 0 )
    -    {
    -      i->EStack.pop();
    -      s1->erase( id->get(), n->get() );
    -      i->OStack.pop( 2 );
    -    }
    -    else
    -    {
    -      i->raiseerror( i->PositiveIntegerExpectedError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -Erase_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array integer integer erase_a array
    -  assert( i->OStack.load() > 2 );
    -
    -  ArrayDatum* s1 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* n = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and id and n );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < s1->size() ) )
    -  {
    -    if ( n->get() >= 0 )
    -    {
    -      i->EStack.pop();
    -      s1->erase( id->get(), n->get() );
    -      i->OStack.pop( 2 );
    -    }
    -    else
    -    {
    -      i->raiseerror( i->PositiveIntegerExpectedError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -void
    -Erase_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: proc integer integer erase_p proc
    -  assert( i->OStack.load() > 2 );
    -
    -  ProcedureDatum* s1 = dynamic_cast< ProcedureDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* n = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and id and n );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < s1->size() ) )
    -  {
    -    if ( n->get() >= 0 )
    -    {
    -      i->EStack.pop();
    -      s1->erase( id->get(), n->get() );
    -      i->OStack.pop( 2 );
    -    }
    -    else
    -    {
    -      i->raiseerror( i->PositiveIntegerExpectedError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -
    -void
    -Put_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string index integer put_s string
    -  assert( i->OStack.load() > 2 );
    -
    -  StringDatum* s1 = dynamic_cast< StringDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* cd = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and id and cd );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < s1->size() ) )
    -  {
    -    i->EStack.pop();
    -    ( *s1 )[ id->get() ] = static_cast< char >( cd->get() );
    -    i->OStack.pop( 2 );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -
    -void
    -Put_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array index any put_a array
    -  assert( i->OStack.load() > 2 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  assert( ad and id );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < ad->size() ) )
    -  {
    -    i->EStack.pop();
    -    ad->assign_move( id->get(), i->OStack.top() ); // its safe to empty top() because
    -    i->OStack.pop( 2 );                            // it will be poped.
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -
    -void
    -Put_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array index any put_a array
    -  assert( i->OStack.load() > 2 );
    -
    -  ProcedureDatum* ad = dynamic_cast< ProcedureDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  assert( ad and id );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < ad->size() ) )
    -  {
    -    i->EStack.pop();
    -    ad->assign_move( id->get(), i->OStack.top() ); // its safe to empty top() because
    -    i->OStack.pop( 2 );                            // it will be poped.
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -
    -void
    -Put_lpFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array index any put_a array
    -  assert( i->OStack.load() > 2 );
    -
    -  LitprocedureDatum* ad = dynamic_cast< LitprocedureDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  assert( ad and id );
    -
    -  if ( ( id->get() >= 0 ) and ( ( size_t ) id->get() < ad->size() ) )
    -  {
    -    i->EStack.pop();
    -    ad->assign_move( id->get(), i->OStack.top() ); // its safe to empty top() because
    -    i->OStack.pop( 2 );                            // it will be poped.
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    - Name: length_s - counts elements of a string
    - Synopsis: string length -> int
    -
    - Examples:
    -   (Hello world!)      length --> 12
    - Author: docu by Sirko Straube
    - Remarks: Use length if you are not sure of the data type.
    - SeeAlso: length
    -*/
    -
    -void
    -Length_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* s = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( s );
    -
    -  Token t( new IntegerDatum( s->length() ) );
    -
    -  i->OStack.pop();
    -  i->OStack.push_move( t );
    -}
    -
    -/** @BeginDocumentation
    - Name: length_a - counts elements of an array
    - Synopsis: array length_a -> int
    -
    - Examples:
    -   [1 2 3 4 6 7] length_a --> 6
    - Author: docu by Sirko Straube
    - Remarks: Use length if you are not sure of the data type.
    - SeeAlso: length
    -*/
    -
    -void
    -Length_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* s = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( s );
    -
    -  Token t( new IntegerDatum( s->size() ) );
    -
    -  i->OStack.pop();
    -  i->OStack.push_move( t );
    -}
    -
    -/** @BeginDocumentation
    - Name: length_p - counts elements of a procedure
    - Synopsis: procedure length_p -> int
    -
    - Examples:
    -   {mul dup} length_p --> 2
    - Author: docu by Sirko Straube
    - Remarks: Use length if you are not sure of the data type.
    - SeeAlso: length
    -*/
    -
    -void
    -Length_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  ProcedureDatum* s = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( s );
    -
    -  Token t( new IntegerDatum( s->size() ) );
    -
    -  i->OStack.pop();
    -  i->OStack.push_move( t );
    -}
    -
    -/** @BeginDocumentation
    - Name: length_lp - counts elements of a literal procedure
    - Synopsis: literal procedure length_lp -> int
    -
    - Examples: { {1 2 3} } 0 get length_lp -> 3
    -
    - Remarks: 0 get is needed to make sure that procedure is still
    -literal procedure, when it is evaluated. Use length if you are
    -not sure of the data type.
    -
    - Author: docu by Sirko Straube
    -
    - SeeAlso: length
    -*/
    -
    -void
    -Length_lpFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  LitprocedureDatum* s = dynamic_cast< LitprocedureDatum* >( i->OStack.top().datum() );
    -  assert( s );
    -
    -  Token t( new IntegerDatum( s->size() ) );
    -
    -  i->OStack.pop();
    -  i->OStack.push_move( t );
    -}
    -
    -/** @BeginDocumentation
    -  Name: capacity - Returns the capacity of an array.
    -  Synopsis: array capacity -> n
    -  Description: Returns the number of elements that a given array
    -  can hold without being re-sized.
    -  Examples: [1] capacity -> 100
    -            101 array capacity -> 200
    -  Remarks: The default size for an array is 100. If it is bigger,
    -  its size is readjusted to a factor of 100. The number of elements
    -  in an array is given by length.
    -  Author: docu by Sirko Straube
    -  SeeAlso: reserve, shrink, allocations, length, size
    -*/
    -
    -void
    -Capacity_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array capacity_a array integer
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* s = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( s );
    -
    -  Token t( new IntegerDatum( s->capacity() ) );
    -
    -  i->OStack.push_move( t );
    -}
    -
    -/** @BeginDocumentation
    -  Name: size - Returns the size of an array/string.
    -  Synopsis: array size -> n array
    -  string size -> n string
    -  Description: Returns the number of elements (similar to length) of
    -  an object and additionally the object itself.
    -  Examples: [1 2] size -> 2 [1 2]
    -  (hello) size -> 5 (hello)
    -  Author: docu by Sirko Straube
    -  SeeAlso: reserve, shrink, allocations, length, capacity
    -*/
    -
    -void
    -Size_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array size_a array integer
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* s = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( s );
    -
    -  Token t( new IntegerDatum( s->size() ) );
    -
    -  i->OStack.push_move( t );
    -}
    -
    -/** @BeginDocumentation
    -Name: reserve - Prepare an array or string to hold a given number of elements.
    -Synopsis: array n reserve -> array
    -Description: reserve makes sure that the array can hold at least n objects.
    -If the current capacity of the array is lower than n, it will be resized.
    -Note that if the current capacity is larger than n, no resize will take place.
    -SeeAlso: capacity, shrink, allocations
    -*/
    -
    -void
    -Reserve_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array integer reserve_a array
    -  assert( i->OStack.load() > 1 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( ad and id );
    -  if ( id->get() >= 0 )
    -  {
    -    i->EStack.pop();
    -    ad->reserve( id->get() );
    -    i->OStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->PositiveIntegerExpectedError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: :resize - Change the internal size of an array.
    -Synopsis: array n resize -> array.
    -Description: resize changes the size of the supplied array
    -independent of the current capacity.
    -resize is used to free memory by shrinking arrays whose capacity
    -has grown too large.
    -
    -If the new size is smaller than the array, the trailing elements
    - are lost.
    -SeeAlso: capacity, reserve, shrink
    -*/
    -
    -void
    -Resize_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array integer resize_a array
    -  assert( i->OStack.load() > 1 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( ad and id );
    -  if ( id->get() >= 0 )
    -  {
    -    i->EStack.pop();
    -    ad->resize( id->get() );
    -    i->OStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->PositiveIntegerExpectedError );
    -  }
    -}
    -
    -void
    -Empty_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array empty_a array bool
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -
    -  assert( ad );
    -
    -  if ( ad->empty() )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -}
    -
    -void
    -References_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array references_a array integer
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -
    -  assert( ad );
    -
    -  Token t( new IntegerDatum( ad->references() ) );
    -
    -  i->OStack.push_move( t );
    -}
    -
    -/** @BeginDocumentation
    -Name: shrink - Reduce the capacity of an array or string to its minimum.
    -Synopsis: array shrink -> array bool
    -Description: Shrink reduces the capacity of an array or string to its minimum.
    -The boolean return value indicates whether a re-sizing of the array was done.
    -SeeAlso: capacity, reserve, allocations
    -*/
    -void
    -Shrink_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array shrink_a array bool
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -
    -  assert( ad );
    -
    -  if ( ad->shrink() )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -}
    -
    -void
    -Capacity_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string capacity_s string integer
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* s = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( s );
    -
    -  Token t( new IntegerDatum( s->capacity() ) );
    -
    -  i->OStack.push_move( t );
    -}
    -
    -void
    -Size_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string size_a string integer
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* s = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( s );
    -
    -  Token t( new IntegerDatum( s->size() ) );
    -
    -  i->OStack.push_move( t );
    -}
    -
    -void
    -Reserve_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string integer reserve_a string
    -  assert( i->OStack.load() > 1 );
    -
    -  StringDatum* ad = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( ad and id );
    -
    -  if ( id->get() >= 0 )
    -  {
    -    i->EStack.pop();
    -    ad->reserve( id->get() );
    -    i->OStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->PositiveIntegerExpectedError );
    -  }
    -}
    -
    -void
    -Resize_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string integer resize_a string
    -  assert( i->OStack.load() > 1 );
    -
    -  StringDatum* ad = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( ad and id );
    -
    -  if ( id->get() >= 0 )
    -  {
    -    i->EStack.pop();
    -    ad->resize( id->get(), ' ' ); // space as default char
    -    i->OStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->PositiveIntegerExpectedError );
    -  }
    -}
    -
    -
    -void
    -Empty_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string empty_a string bool
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* ad = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -
    -  assert( ad );
    -
    -  if ( ad->empty() )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: getinterval - Return a subsequence of a string or array.
    -Synopsis: (string1) a b getinterval -> (string2)
    -[array1]  a b getinterval -> [array2]
    -Description:
    -getinterval returns a new container with b elements
    -starting at element a
    -Note that getinterval can only handle indices from 0 to N-1
    -where N is the length of the original array
    -
    -If other values are given (i.e. indices which do not exist in the array), the
    -function throws a RangeCheckError
    -
    -If negative values are given, getinterval throws a PostiveIntegerExpectedError
    -
    -If b = 0, getinterval returns an empty array
    -
    -Examples: (spiketrainsimulation) 5 5 getinterval -> train
    -(spiketrainsimulation) 0 5 getinterval -> spike
    -[23 24 25 26 27 30] 0 2 getinterval -> [23 24]
    -[23 24 25 26 27 30] 2 3 getinterval -> [25 26 27]
    -[23 24 25 26 27 30] 0 6 getinterval -> [Error]: RangeCheck
    -Author: docu edited by Sirko Straube
    -SeeAlso: get, put, putinterval, Take
    -*/
    -
    -void
    -Getinterval_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string index count getinterval_s string
    -  assert( i->OStack.load() > 1 );
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* cd = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( sd and id and cd );
    -
    -  if ( cd->get() >= 0 )
    -  {
    -    if ( id->get() >= 0 and static_cast< size_t >( id->get() ) < sd->size()
    -      and static_cast< size_t >( id->get() + cd->get() ) <= sd->size() )
    -    {
    -      i->EStack.pop();
    -      sd->assign( *sd, id->get(), cd->get() );
    -      i->OStack.pop( 2 );
    -    }
    -    else
    -    {
    -      i->raiseerror( i->RangeCheckError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->PositiveIntegerExpectedError );
    -  }
    -}
    -
    -
    -void
    -Getinterval_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array index count getinterval_a array
    -  assert( i->OStack.load() > 1 );
    -
    -  ArrayDatum* sd = dynamic_cast< ArrayDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* cd = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( sd and id and cd );
    -
    -  if ( cd->get() >= 0 )
    -  {
    -
    -    if ( id->get() >= 0 and static_cast< size_t >( id->get() ) < sd->size()
    -      and static_cast< size_t >( id->get() + cd->get() ) <= sd->size() )
    -    {
    -      i->EStack.pop();
    -      sd->reduce( id->get(), cd->get() );
    -      i->OStack.pop( 2 );
    -    }
    -    else
    -    {
    -      i->raiseerror( i->RangeCheckError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->PositiveIntegerExpectedError );
    -  }
    -}
    -
    -
    -void
    -Cvx_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -
    -  assert( i->OStack.load() > 0 );
    -
    -  ArrayDatum* obj = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( obj );
    -  Token t( new ProcedureDatum( *obj ) );
    -  t->set_executable();
    -  i->OStack.top().swap( t );
    -}
    -
    -void
    -Cvlit_nFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -
    -  NameDatum* obj = dynamic_cast< NameDatum* >( i->OStack.top().datum() );
    -  assert( obj );
    -  Token t( new LiteralDatum( *obj ) );
    -  i->OStack.top().swap( t );
    -  i->EStack.pop();
    -}
    -
    -void
    -Cvn_lFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -
    -  LiteralDatum* obj = dynamic_cast< LiteralDatum* >( i->OStack.top().datum() );
    -  assert( obj );
    -  Token t( new NameDatum( *obj ) );
    -  i->OStack.top().swap( t );
    -  i->EStack.pop();
    -}
    -
    -void
    -Cvn_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* obj = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( obj );
    -  Token t( new NameDatum( *obj ) );
    -  i->OStack.top().swap( t );
    -  i->EStack.pop();
    -}
    -
    -void
    -Cvlit_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -
    -  ProcedureDatum* obj = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( obj );
    -  Token t( new ArrayDatum( *obj ) );
    -  i->OStack.top().swap( t );
    -  i->EStack.pop();
    -}
    -
    -//
    -// { } cvlp /{ }
    -//
    -void
    -Cvlp_pFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -
    -  ProcedureDatum* obj = dynamic_cast< ProcedureDatum* >( i->OStack.top().datum() );
    -  assert( obj );
    -  Token t( new LitprocedureDatum( *obj ) );
    -  t->set_executable();
    -  i->OStack.top().swap( t );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -Cvi_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* obj = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( obj );
    -  Token t( new IntegerDatum( std::atoi( obj->c_str() ) ) );
    -  i->OStack.top().swap( t );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -Cvd_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 0 );
    -
    -  StringDatum* obj = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( obj );
    -  Token t( new DoubleDatum( std::atof( obj->c_str() ) ) );
    -  i->OStack.top().swap( t );
    -  i->EStack.pop();
    -}
    -
    -
    -void
    -Get_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call:  string int get_s
    -  assert( i->OStack.load() > 1 );
    -
    -  IntegerDatum* idx = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( idx );
    -
    -  StringDatum* obj = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( obj );
    -
    -
    -  if ( ( idx->get() >= 0 ) and ( ( size_t ) idx->get() < obj->size() ) )
    -  {
    -    i->EStack.pop();
    -    Token objT( new IntegerDatum( ( *obj )[ idx->get() ] ) );
    -    i->OStack.pop( 2 );
    -    i->OStack.push_move( objT );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: search - Search for a sequence in an array or string.
    -Synopsis: (string) (seek) search -> (post) (match) (pre) true
    -                                 -> (string) false
    -          [array] [seek]  search -> [post] [match] [pre] true
    -                                 -> [array] false
    -
    -Examples: (hamburger) (burg) search -> true (ham) (burg) (er)
    -
    -SeeAlso: searchif
    -*/
    -
    -void
    -Search_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string seek search_s post match pre true
    -  //                            string false
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 1 );
    -
    -  StringDatum* s1 = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum* s2 = dynamic_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and s2 );
    -
    -  size_t p = s1->find( *s2 );
    -
    -
    -  if ( p == ULONG_MAX ) // what we realy want is MAX of size_type
    -  {                     // as soon as C++ limits are supported
    -    i->OStack.pop();    // (see Stroustrup 3rd ed. p. 586)
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -  else
    -  {
    -    StringDatum* s3 = new StringDatum();
    -
    -    size_t n = p; // number of pre elements
    -    s3->assign( *s1, ( size_t ) 0, n );
    -    s1->erase( 0, n + s2->size() );
    -
    -    Token pre( s3 );
    -    i->OStack.push_move( pre );
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -}
    -
    -void
    -Search_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: array array search_a post match pre true
    -  //                            array false
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 1 );
    -
    -  ArrayDatum* s1 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -  ArrayDatum* s2 = dynamic_cast< ArrayDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( s1 and s2 );
    -
    -  Token* p = std::search( s1->begin(), s1->end(), s2->begin(), s2->end() );
    -
    -
    -  if ( p == s1->end() )
    -  {
    -    i->OStack.pop();
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -  else
    -  {
    -    ArrayDatum* s3 = new ArrayDatum();
    -
    -    size_t n = p - s1->begin();              // number of pre elements
    -    s3->assign_move( *s1, ( size_t ) 0, n ); // _move members may invalidate
    -    s1->erase( 0, n + s2->size() );          // argument iterators
    -
    -    Token pre( s3 );
    -    i->OStack.push_move( pre );
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -}
    -
    -/**********************************************/
    -/* %repeatany                               */
    -/*  call: mark  count any  %repeatany       */
    -/*  pick    3    2     1     0       */
    -// This version repeats any object n times.
    -/**********************************************/
    -void
    -IrepeatanyFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  IntegerDatum* loopcount = static_cast< IntegerDatum* >( i->EStack.pick( 2 ).datum() );
    -
    -  if ( loopcount->get() > 0 )
    -  {
    -    i->EStack.push( i->EStack.pick( 1 ) );
    -    --( loopcount->get() );
    -  }
    -  else
    -  {
    -    i->EStack.pop( 4 );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -
    -Name: repeatany - Place any object n times on stack.
    -
    -Synopsis: n obj repeatany -> obj obj ... obj (n times)
    -
    -Examples: 3 (foo) repeatany -> (foo) (foo) (foo)
    -
    -SeeAlso: repeat, Table
    -*/
    -void
    -RepeatanyFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 2 );
    -
    -  // level  1  0
    -  // stack: n proc repeat
    -  i->EStack.pop();
    -
    -  i->EStack.push( i->baselookup( i->mark_name ) );
    -  i->EStack.push_move( i->OStack.pick( 1 ) );
    -  i->EStack.push_move( i->OStack.pick( 0 ) );
    -  i->EStack.push( i->baselookup( Name( "::repeatany" ) ) );
    -
    -  i->OStack.pop( 2 );
    -}
    -
    -const Allocations_aFunction allocations_afunction;
    -const Get_a_aFunction get_a_afunction;
    -const Get_aFunction get_afunction;
    -const Get_pFunction get_pfunction;
    -const Get_lpFunction get_lpfunction;
    -
    -const Append_aFunction append_afunction;
    -const Append_pFunction append_pfunction;
    -const Append_sFunction append_sfunction;
    -const Prepend_aFunction prepend_afunction;
    -const Prepend_pFunction prepend_pfunction;
    -const Prepend_sFunction prepend_sfunction;
    -const Join_sFunction join_sfunction;
    -const Join_aFunction join_afunction;
    -const Join_pFunction join_pfunction;
    -const Insert_sFunction insert_sfunction;
    -const Insert_aFunction insert_afunction;
    -const InsertElement_aFunction insertelement_afunction;
    -const InsertElement_sFunction insertelement_sfunction;
    -const Replace_sFunction replace_sfunction;
    -const Replace_aFunction replace_afunction;
    -const Erase_sFunction erase_sfunction;
    -const Erase_aFunction erase_afunction;
    -const Erase_pFunction erase_pfunction;
    -
    -const Length_sFunction length_sfunction;
    -const Length_aFunction length_afunction;
    -const Length_lpFunction length_lpfunction;
    -const Length_pFunction length_pfunction;
    -
    -const Getinterval_sFunction getinterval_sfunction;
    -const Getinterval_aFunction getinterval_afunction;
    -
    -const Cvx_aFunction cvx_afunction;
    -const Cvlit_nFunction cvlit_nfunction;
    -const Cvlit_pFunction cvlit_pfunction;
    -const Cvlp_pFunction cvlp_pfunction;
    -const Cvn_lFunction cvn_lfunction;
    -const Cvn_sFunction cvn_sfunction;
    -const Cvi_sFunction cvi_sfunction;
    -const Cvd_sFunction cvd_sfunction;
    -
    -const Get_sFunction get_sfunction;
    -const Put_sFunction put_sfunction;
    -const Put_aFunction put_afunction;
    -const Put_pFunction put_pfunction;
    -const Put_lpFunction put_lpfunction;
    -
    -const Search_sFunction search_sfunction;
    -const Search_aFunction search_afunction;
    -
    -const Capacity_aFunction capacity_afunction;
    -const Size_aFunction size_afunction;
    -const Reserve_aFunction reserve_afunction;
    -const Resize_aFunction resize_afunction;
    -const Empty_aFunction empty_afunction;
    -const References_aFunction references_afunction;
    -const Shrink_aFunction shrink_afunction;
    -
    -const Capacity_sFunction capacity_sfunction;
    -const Size_sFunction size_sfunction;
    -const Reserve_sFunction reserve_sfunction;
    -const Resize_sFunction resize_sfunction;
    -const Empty_sFunction empty_sfunction;
    -const IrepeatanyFunction irepeatanyfunction;
    -const RepeatanyFunction repeatanyfunction;
    -
    -void
    -init_slidata( SLIInterpreter* i )
    -{
    -  i->createcommand( "allocations", &allocations_afunction );
    -  i->createcommand( "get_s", &get_sfunction );
    -  i->createcommand( "get_a", &get_afunction );
    -  i->createcommand( "get_a_a", &get_a_afunction );
    -  i->createcommand( "get_p", &get_pfunction );
    -  i->createcommand( "get_lp", &get_lpfunction );
    -  i->createcommand( "append_a", &append_afunction );
    -  i->createcommand( "append_p", &append_pfunction );
    -  i->createcommand( "append_s", &append_sfunction );
    -  i->createcommand( "prepend_a", &prepend_afunction );
    -  i->createcommand( "prepend_p", &prepend_pfunction );
    -  i->createcommand( "prepend_s", &prepend_sfunction );
    -  i->createcommand( "join_s", &join_sfunction );
    -  i->createcommand( "join_a", &join_afunction );
    -  i->createcommand( "join_p", &join_pfunction );
    -  i->createcommand( "insert_s", &insert_sfunction );
    -  i->createcommand( "insert_a", &insert_afunction );
    -  i->createcommand( "insertelement_s", &insertelement_sfunction );
    -  i->createcommand( "insertelement_a", &insertelement_afunction );
    -  i->createcommand( "replace_s", &replace_sfunction );
    -  i->createcommand( "replace_a", &replace_afunction );
    -  i->createcommand( "erase_s", &erase_sfunction );
    -  i->createcommand( "erase_a", &erase_afunction );
    -  i->createcommand( "erase_p", &erase_pfunction );
    -
    -  i->createcommand( "length_s", &length_sfunction );
    -  i->createcommand( "length_a", &length_afunction );
    -  i->createcommand( "length_p", &length_pfunction );
    -  i->createcommand( "length_lp", &length_lpfunction );
    -  i->createcommand( "getinterval_s", &getinterval_sfunction );
    -  i->createcommand( "getinterval_a", &getinterval_afunction );
    -  i->createcommand( "cvx_a", &cvx_afunction );
    -  i->createcommand( "cvlit_n", &cvlit_nfunction );
    -  i->createcommand( "cvlit_p", &cvlit_pfunction );
    -  i->createcommand( "cvlp_p", &cvlp_pfunction );
    -  i->createcommand( "cvn_l", &cvn_lfunction );
    -  i->createcommand( "cvn_s", &cvn_sfunction );
    -  i->createcommand( "cvi_s", &cvi_sfunction );
    -  i->createcommand( "cvd_s", &cvd_sfunction );
    -  i->createcommand( "put_s", &put_sfunction );
    -  i->createcommand( "put_a", &put_afunction );
    -  i->createcommand( "put_p", &put_pfunction );
    -  i->createcommand( "put_lp", &put_lpfunction );
    -
    -  i->createcommand( "search_s", &search_sfunction );
    -  i->createcommand( "search_a", &search_afunction );
    -
    -  i->createcommand( "capacity_a", &capacity_afunction );
    -  i->createcommand( "size_a", &size_afunction );
    -  i->createcommand( "reserve_a", &reserve_afunction );
    -  i->createcommand( ":resize_a", &resize_afunction );
    -  i->createcommand( "empty_a", &empty_afunction );
    -  i->createcommand( "references_a", &references_afunction );
    -  i->createcommand( "shrink_a", &shrink_afunction );
    -
    -  i->createcommand( "capacity_s", &capacity_sfunction );
    -  i->createcommand( "size_s", &size_sfunction );
    -  i->createcommand( "reserve_s", &reserve_sfunction );
    -  i->createcommand( ":resize_s", &resize_sfunction );
    -  i->createcommand( "empty_s", &empty_sfunction );
    -  i->createcommand( "::repeatany", &irepeatanyfunction );
    -  i->createcommand( "repeatany", &repeatanyfunction );
    -}
    diff --git a/sli/slidata.h b/sli/slidata.h
    deleted file mode 100644
    index 20aec37307..0000000000
    --- a/sli/slidata.h
    +++ /dev/null
    @@ -1,631 +0,0 @@
    -/*
    - *  slidata.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIDATA_H
    -#define SLIDATA_H
    -/*
    -    SLI's array access functions
    -*/
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -
    -/*
    - Operators will be implemented as described in the PS Reference Manual
    - for the types
    - array
    - string
    - NOTE: dictionary operators are defined in slidict.{h,cc}
    - */
    -
    -class Get_aFunction : public SLIFunction
    -{
    -public:
    -  Get_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Get_a_aFunction : public SLIFunction
    -{
    -public:
    -  Get_a_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Allocations_aFunction : public SLIFunction
    -{
    -public:
    -  Allocations_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Get_pFunction : public SLIFunction
    -{
    -public:
    -  Get_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Get_lpFunction : public SLIFunction
    -{
    -public:
    -  Get_lpFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Append_aFunction : public SLIFunction
    -{
    -public:
    -  Append_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Append_pFunction : public SLIFunction
    -{
    -public:
    -  Append_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Append_sFunction : public SLIFunction
    -{
    -public:
    -  Append_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Prepend_aFunction : public SLIFunction
    -{
    -public:
    -  Prepend_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Prepend_pFunction : public SLIFunction
    -{
    -public:
    -  Prepend_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Prepend_sFunction : public SLIFunction
    -{
    -public:
    -  Prepend_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Join_sFunction : public SLIFunction
    -{
    -public:
    -  Join_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Join_aFunction : public SLIFunction
    -{
    -public:
    -  Join_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Join_pFunction : public SLIFunction
    -{
    -public:
    -  Join_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Insert_sFunction : public SLIFunction
    -{
    -public:
    -  Insert_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Insert_aFunction : public SLIFunction
    -{
    -public:
    -  Insert_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class InsertElement_sFunction : public SLIFunction
    -{
    -public:
    -  InsertElement_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class InsertElement_aFunction : public SLIFunction
    -{
    -public:
    -  InsertElement_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Replace_sFunction : public SLIFunction
    -{
    -public:
    -  Replace_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Replace_aFunction : public SLIFunction
    -{
    -public:
    -  Replace_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Erase_sFunction : public SLIFunction
    -{
    -public:
    -  Erase_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Erase_aFunction : public SLIFunction
    -{
    -public:
    -  Erase_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Erase_pFunction : public SLIFunction
    -{
    -public:
    -  Erase_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -class Length_sFunction : public SLIFunction
    -{
    -public:
    -  Length_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Length_aFunction : public SLIFunction
    -{
    -public:
    -  Length_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Length_pFunction : public SLIFunction
    -{
    -public:
    -  Length_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Length_lpFunction : public SLIFunction
    -{
    -public:
    -  Length_lpFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Capacity_aFunction : public SLIFunction
    -{
    -public:
    -  Capacity_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Size_aFunction : public SLIFunction
    -{
    -public:
    -  Size_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Reserve_aFunction : public SLIFunction
    -{
    -public:
    -  Reserve_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Resize_aFunction : public SLIFunction
    -{
    -public:
    -  Resize_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Empty_aFunction : public SLIFunction
    -{
    -public:
    -  Empty_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class References_aFunction : public SLIFunction
    -{
    -public:
    -  References_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Shrink_aFunction : public SLIFunction
    -{
    -public:
    -  Shrink_aFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Capacity_sFunction : public SLIFunction
    -{
    -public:
    -  Capacity_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Size_sFunction : public SLIFunction
    -{
    -public:
    -  Size_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Reserve_sFunction : public SLIFunction
    -{
    -public:
    -  Reserve_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Resize_sFunction : public SLIFunction
    -{
    -public:
    -  Resize_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Empty_sFunction : public SLIFunction
    -{
    -public:
    -  Empty_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Getinterval_sFunction : public SLIFunction
    -{
    -public:
    -  Getinterval_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Getinterval_aFunction : public SLIFunction
    -{
    -public:
    -  Getinterval_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cvx_aFunction : public SLIFunction
    -{
    -public:
    -  Cvx_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cvlit_nFunction : public SLIFunction
    -{
    -public:
    -  Cvlit_nFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cvlit_pFunction : public SLIFunction
    -{
    -public:
    -  Cvlit_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cvlp_pFunction : public SLIFunction
    -{
    -public:
    -  Cvlp_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cvn_sFunction : public SLIFunction
    -{
    -public:
    -  Cvn_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cvn_lFunction : public SLIFunction
    -{
    -public:
    -  Cvn_lFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -//---------------------------------------------------------------------------------
    -//(C84) is maximum width for LaTeX-include1
    -/** @BeginDocumentation
    -Name: cvi_s - convert string to integer
    -
    -Synopsis: string cvi_s -> integer
    -
    -Description: This is a wrapper to the standard C "atoi"-routine.
    -If cvi_s is executed with a string that contains letters 0 is returned.
    -
    -Examples: (23)    cvi_s -> 23
    -          (23.5)  cvi_s -> 23
    -          (NEST)  cvi_s -> 0
    -
    -Diagnostics: No errors are raised.
    -             In case of impossible conversion, zero is returned.
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: Nov 05 1999
    -
    -SeeAlso: cvi, cvd, cvs
    -
    -*/
    -class Cvi_sFunction : public SLIFunction
    -{
    -public:
    -  Cvi_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -//---------------------------------------------------------------------------------
    -//(C84) is maximum width for LaTeX-include1
    -/** @BeginDocumentation
    -
    -Name: cvd_s - convert string to double
    -
    -Synopsis: string cvd_s -> double
    -
    -Description: This is a wrapper to the standard C "atof"-routine.
    -If cvd_s is executed with a string that contains letters 0 is returned.
    -
    -Examples: (23.5)  cvi_s -> 23.5
    -          (23)    cvi_s -> 23   % doubletype!
    -          (NEST)  cvi_s -> 0
    -
    -Diagnostics: No errors are raised.
    -             In case of impossible conversion, zero is returned.
    -
    -Bugs: -
    -
    -Author: R Kupper
    -
    -FirstVersion: Nov 05 1999
    -
    -SeeAlso: cvi, cvd, cvs
    -
    -*/
    -class Cvd_sFunction : public SLIFunction
    -{
    -public:
    -  Cvd_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Get_sFunction : public SLIFunction
    -{
    -public:
    -  Get_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Put_sFunction : public SLIFunction
    -{
    -public:
    -  Put_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Put_aFunction : public SLIFunction
    -{
    -public:
    -  Put_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Put_pFunction : public SLIFunction
    -{
    -public:
    -  Put_pFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Put_lpFunction : public SLIFunction
    -{
    -public:
    -  Put_lpFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Search_sFunction : public SLIFunction
    -{
    -public:
    -  Search_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Search_aFunction : public SLIFunction
    -{
    -public:
    -  Search_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -// This function is not implemented
    -// needed to remove it in order to compile NEST
    -// on PETA project fx machine. 2010-10-28 MH
    -// class RangeFunction: public SLIFunction
    -//{
    -// public:
    -// RangeFunction() {}
    -//    void execute(SLIInterpreter *) const;
    -//};
    -
    -class IrepeatanyFunction : public SLIFunction
    -{
    -public:
    -  IrepeatanyFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RepeatanyFunction : public SLIFunction
    -{
    -public:
    -  RepeatanyFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -void init_slidata( SLIInterpreter* );
    -
    -
    -#endif
    diff --git a/sli/slidict.cc b/sli/slidict.cc
    deleted file mode 100644
    index b3792edaea..0000000000
    --- a/sli/slidict.cc
    +++ /dev/null
    @@ -1,1022 +0,0 @@
    -/*
    - *  slidict.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    SLI Dictionary access
    -*/
    -
    -#include "slidict.h"
    -
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "dictdatum.h"
    -#include "dictstack.h"
    -#include "integerdatum.h"
    -#include "iostreamdatum.h"
    -#include "namedatum.h"
    -#include "tokenutils.h"
    -
    -/** @BeginDocumentation
    -   Name: dict - Create new, empty dictionary
    -
    -   Synopsis: dict -> <<>>
    -
    -   Description:
    -    dict creates a new dictionary with no entries. This command is
    -    equivalent to
    -    <<>>
    -
    -   Diagnostics: No errors are raised.
    -
    -   Author: Marc-Oliver Gewaltig
    -
    -   SeeAlso: <<>>, clonedict, cleardict
    -
    -*/
    -
    -void
    -DictFunction::execute( SLIInterpreter* i ) const
    -{
    -  // create a new dictionary
    -
    -  i->EStack.pop(); // never forget me
    -  i->OStack.push( DictionaryDatum( new Dictionary ) );
    -}
    -
    -/** @BeginDocumentation
    -   Name: put_d - Add an entry to a dictionary
    -
    -   Synopsis: <<dict>> /key val -> <<dict>>
    -
    -   Description:
    -     put_d adds the pair /key value to the supplied dictionary.
    -     If /key was already defined in that dictionary, its old
    -     value is lost.
    -
    -     In contrast to PostScript dictionaries, only literal names can
    -     be used as keys in a dictionary.
    -
    -   Parameters:
    -     dict - a dictionary
    -     /key - a literal name
    -     val  - an object of arbitrary type
    -
    -   Examples:
    -
    -     userdict /a 1 put_d
    -     << >> /a 1 put_d
    -
    -   Diagnostics:
    -     No errors are raised.
    -
    -   Author:
    -     Marc-Oliver Gewaltig
    -
    -   SeeAlso: get_d, known, dict, <<>>, clonedict
    -
    -*/
    -void
    -DictputFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() >= 3 )
    -  {
    -    //  call: dict key val
    -    DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.pick( 2 ).datum() );
    -    if ( dict )
    -    {
    -      LiteralDatum* key = dynamic_cast< LiteralDatum* >( i->OStack.pick( 1 ).datum() );
    -      if ( key )
    -      {
    -        ( *dict )->insert_move( *key, i->OStack.top() );
    -#ifdef DICTSTACK_CACHE
    -        if ( ( *dict )->is_on_dictstack() )
    -        {
    -          i->DStack->clear_token_from_cache( *key );
    -        }
    -#endif
    -        i->OStack.pop( 3 );
    -        i->EStack.pop(); // never forget me
    -        return;
    -      }
    -      else
    -      {
    -        throw ArgumentType( 1 );
    -      }
    -    }
    -    else
    -    {
    -      throw ArgumentType( 2 );
    -    }
    -  }
    -  else
    -  {
    -    throw StackUnderflow( 3, i->OStack.load() );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: get_d - look a name up in a dictionary
    -
    -   Synopsis: dict /key get_d -> any
    -
    -   Description:
    -     get_d tries to find /key in the supplied dictionary. If it
    -     is present, the associated value is returned. If /key is
    -     not in the dictionary, an UndefinedNameError is raised
    -
    -   Parameters:
    -      dict - a dictionary
    -      /key - a literal name
    -
    -   Examples:
    -
    -      systemdict /PI get_d -> 3.1415...
    -      <</a 1>> /a get -> 1
    -
    -   Diagnostics:
    -     UndefinedNameError
    -
    -   Author:
    -     Marc-Oliver Gewaltig
    -
    -   SeeAlso: put_d, lookup, known
    -
    -*/
    -void
    -DictgetFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: dict key -> val
    -  if ( i->OStack.load() >= 2 )
    -  {
    -    DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.pick( 1 ).datum() );
    -    if ( dict )
    -    {
    -      LiteralDatum* key = dynamic_cast< LiteralDatum* >( i->OStack.pick( 0 ).datum() );
    -      if ( key )
    -      {
    -        Token value = ( *dict )->lookup2( *key );
    -        i->EStack.pop(); // never forget me
    -        i->OStack.pop( 2 );
    -        i->OStack.push_move( value );
    -        return;
    -      }
    -      else
    -      {
    -        throw ArgumentType( 0 );
    -      }
    -    }
    -    else
    -    {
    -      throw ArgumentType( 1 );
    -    }
    -  }
    -  else
    -  {
    -    throw StackUnderflow( 2, i->OStack.load() );
    -  }
    -}
    -/** @BeginDocumentation
    -   Name: info - Display the contents of a dictionary
    -
    -   Synopsis: ostream dict info -> -
    -
    -   Description:
    -     Prints the contents of the dictionary to the supplied stream.
    -
    -   Parameters:
    -     dict - a dictionary
    -     No return values are given.
    -
    -   Examples:
    -   std::cout  <</a 1 /b 2.5 /c (Hallo World)>> info
    -
    -   shows
    -
    ---------------------------------------------------
    -Name                     Type                Value
    ---------------------------------------------------
    -a                        integertype         1
    -b                        doubletype          2.5
    -c                        stringtype          Hallo World
    ---------------------------------------------------
    -Total number of dictionary entries: 3
    -
    -   SeeAlso: info_ds, topinfo_d, who, whos
    -
    -*/
    -void
    -DictinfoFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: ostream dict
    -
    -  assert( i->OStack.load() > 1 );
    -  OstreamDatum* outd = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.top().datum() );
    -  assert( dict );
    -  assert( outd );
    -  i->EStack.pop();
    -  ( *dict )->info( **outd );
    -  i->OStack.pop( 2 );
    -}
    -
    -/** @BeginDocumentation
    - Name: length_d - counts elements of a dictionary
    -
    - Synopsis: dict length_d -> int
    -
    - Examples: <</a 1 /b 2>> length_d -> 2
    -
    - Author: docu by Sirko Straube
    -
    - Remarks: Use length if you are not sure of the data type.
    -
    - SeeAlso: length
    -*/
    -
    -void
    -Length_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: dict length_d -> int
    -
    -  assert( i->OStack.load() > 0 );
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.top().datum() );
    -  assert( dict );
    -  i->EStack.pop();
    -  Token st( new IntegerDatum( ( *dict )->size() ) );
    -  i->OStack.pop();
    -  i->OStack.push_move( st );
    -}
    -
    -void
    -Empty_DFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: dict empty_D dict bool
    -  assert( i->OStack.load() > 0 );
    -
    -  DictionaryDatum const* const dd = dynamic_cast< DictionaryDatum const* const >( i->OStack.top().datum() );
    -
    -  assert( dd );
    -
    -  i->OStack.push_by_pointer( new BoolDatum( ( *dd )->empty() ) );
    -
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    -   Name: countdictstack - return number of dictionaries on the dictionary stack.
    -
    -   Synopsis:
    -     No arguments.
    -
    -   Description:
    -     Returns the current load of the dictionary stack. The default
    -     value is 2.
    -
    -   Parameters:
    -     None.
    -
    -   SeeAlso: dictstack, cleardictstack, whos
    -
    -*/
    -void
    -CountdictstackFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: Countdictstack -> int
    -
    -  i->EStack.pop();
    -  Token st( new IntegerDatum( i->DStack->size() ) );
    -  i->OStack.push_move( st );
    -}
    -
    -/** @BeginDocumentation
    -   Name: dictstack - return current dictionary stack as array
    -
    -   Synopsis: dictstack -> array
    -
    -   Description: Returns an array whose entries are references to the
    -     dictionaries on the dictionary stack. The dictionaries are stored from
    -     bottom to top, such that the first array element refers to the bottom of
    -     the stack and the last array element to the top.
    -
    -   SeeAlso: currentdict, countdictstack, cleardictstack, whos
    -*/
    -void
    -DictstackFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: -  dictstack ->  array
    -
    -  i->EStack.pop();
    -  TokenArray ta;
    -  i->DStack->toArray( ta );
    -  Token st( new ArrayDatum( ta ) );
    -  i->OStack.push_move( st );
    -}
    -
    -/** @BeginDocumentation
    -   Name: currentdict - return topmost dictionary of the dictionary stack
    -
    -   Synopsis: currentdict -> dict
    -
    -   Description: Returns a reference to the current dictionary.
    -
    -   SeeAlso: dictstack, begin, end, cleardictstack, who, whos
    -*/
    -void
    -CurrentdictFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: -  currentdict -> dict
    -
    -  i->EStack.pop();
    -  Token dt;
    -  i->DStack->top( dt );
    -  i->OStack.push_move( dt );
    -}
    -
    -/** @BeginDocumentation
    -   Name: cleardictstack - Pop all non standard dictionaries off the dictionary
    -                          stack.
    -
    -   Description: Removes all non standard dictionaries off the dictionary stack.
    -     After this, only the systemdict and the userdict dictionaries remain on the
    -     dictionary stack.
    -
    -   SeeAlso: dictstack, begin, end, currentdict, who, whos
    -*/
    -void
    -CleardictstackFunction::execute( SLIInterpreter* i ) const
    -{
    -  // Pop all non-permanent dictionaries
    -  i->EStack.pop();
    -  while ( i->DStack->size() > 2 )
    -  {
    -    i->DStack->pop();
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: topinfo_d - print contents of top dictionary to stream
    -
    -   Synopsis: ostream topinfo_d -> -
    -
    -   Description: Print the contents of the top dictionary on the
    -     dictionary stack to the supplied stream.
    -
    -   Parameters:
    -     ostream - a valid output stream
    -
    -   SeeAlso: dictstack, currentdict, info, who, whos
    -*/
    -void
    -DicttopinfoFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: ostream Dicttopinfo
    -
    -  assert( i->OStack.load() > 0 );
    -  OstreamDatum* outd = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -  assert( outd );
    -  i->EStack.pop();
    -  i->DStack->top_info( **outd );
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: info_ds - print contents of all dictionaries on the dicitonary stack to
    -                   stream
    -
    -   Synopsis: ostream info_ds -> -
    -
    -   Description:
    -     info_ds prints the contents of all dictionaries on the dictionary
    -     stack to the supplied ostream. Dictionaries are printed from
    -     bottom to top.
    -
    -   Parameters:
    -     ostream - a valid output stream
    -
    -   SeeAlso:  dictstack, info, topinfo_d, who, whos
    -*/
    -void
    -WhoFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: ostream
    -
    -  assert( i->OStack.load() > 0 );
    -  OstreamDatum* outd = dynamic_cast< OstreamDatum* >( i->OStack.top().datum() );
    -  assert( outd );
    -  i->EStack.pop();
    -  i->DStack->info( **outd );
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: begin - Make a dictionary the current dictionary.
    -
    -   Synopsis: dict begin -> -
    -
    -   Parameters:
    -     dict - a dictionary object
    -
    -   Description:
    -     begin opens a dictionary by pushing it on the dictionary stack.
    -     After begin, the opened dictionary is searched first whenever
    -     a name is resolved.
    -
    -   SeeAlso: end, get_d, dictstack, cleardictstack, countdictstack
    -*/
    -void
    -DictbeginFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: dict
    -
    -  if ( i->OStack.load() > 0 )
    -  {
    -    DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.top().datum() );
    -    if ( dict )
    -    {
    -      i->EStack.pop();
    -      i->DStack->push( *dict );
    -      i->OStack.pop();
    -      return;
    -    }
    -    else
    -    {
    -      i->raiseerror( i->ArgumentTypeError );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: end - Close the current (topmost) dictionary.
    -
    -   Synopsis: - end -> -
    -
    -   Description:
    -     Closes the current dictionary by removing the top element
    -     of the dictionary stack.
    -     Note that end cannot pop the dictionary stack beyond the two
    -     standard dictionaries systemdict and userdict. If this is tried,
    -     a DictStackUnderflow Error is raised.
    -
    -   Diagnostics:
    -     DictStackUnderflow
    -
    -   SeeAlso: begin, dictstack, cleardictstack, countdictstack
    -*/
    -void
    -DictendFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->DStack->size() > 2 ) // keep at least systemdict and userdict
    -  {                            // see sli-init.sli for details
    -    i->DStack->pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( "DictStackUnderflow" );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: undef - Remove a key from a dictionary.
    -
    -   Synopsis: dict key undef -> -
    -
    -   Parameters:
    -     dict - a (possibly empty) dictionary
    -     key  - a literal name to be removed.
    -
    -   Description:
    -     undef removes the definition of a name from the supplied dictionary.
    -     The name does not have to be present in the dicitonary.
    -
    -   Examples:
    -     SLI ] /d << /a 1 /b 2 >> def
    -     SLI ] d info
    -     - --------------------------------------------------
    -     Name                     Type                Value
    -     - --------------------------------------------------
    -     a                        integertype         1
    -     b                        integertype         2
    -     - --------------------------------------------------
    -     Total number of entries: 2
    -     SLI ] d /b undef
    -     SLI ] d info
    -     - --------------------------------------------------
    -     Name                     Type                Value
    -     - --------------------------------------------------
    -     a                        integertype         1
    -     - --------------------------------------------------
    -     Total number of entries: 1
    -
    -     Diagnostics:
    -     None.
    -
    -   Author: docu edited by Marc Oliver Gewaltig and Sirko Straube
    -   SeeAlso: get_d, put_d, known, lookup, info
    -*/
    -void
    -UndefFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: dict key -> -
    -
    -  if ( i->OStack.load() > 1 )
    -  {
    -    DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.pick( 1 ).datum() );
    -    if ( dict )
    -    {
    -      LiteralDatum* key = dynamic_cast< LiteralDatum* >( i->OStack.pick( 0 ).datum() );
    -      if ( key )
    -      {
    -        i->EStack.pop();
    -#ifdef DICTSTACK_CACHE
    -        if ( ( *dict )->is_on_dictstack() )
    -        {
    -          i->DStack->clear_token_from_cache( *key );
    -        }
    -#endif
    -        ( *dict )->erase( *key );
    -        i->OStack.pop( 2 );
    -        return;
    -      }
    -      else
    -      {
    -        throw ArgumentType( 0 );
    -      }
    -    }
    -    else
    -    {
    -      throw ArgumentType( 1 );
    -    }
    -  }
    -  else
    -  {
    -    throw StackUnderflow( 2, i->OStack.load() );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -   Name: <<>> - Create a new dictionary.
    -
    -   Synopsis: << /key1 val1 ... /keyn valn >> -> dict
    -
    -   Parameters: /key - literal name
    -               val  - Object of any type
    -
    -   Description: Constructs a dictionary with the entries which are specified
    -    by key-value pairs.
    -    Note that the key-value pairs are evaluated BEFORE the dictionary is
    -    constructed.
    -    << >> operates the following way:
    -    The characters << correspond to a mark which is pushed on the stack.
    -    Next, all following key-value pairs are evaluated.
    -    >> finally counts the number of pairs on the stack and constructs a
    -    new dictionary.
    -
    -   Examples:
    -<pre>
    -SLI ] << /a 1 /b 2 >> info
    ---------------------------------------------------
    -Name                     Type                Value
    ---------------------------------------------------
    -a                        integertype         1
    -b                        integertype         2
    ---------------------------------------------------
    -Total number of entries: 2
    -
    -SLI ] << (a) (b) join cvlit 2 3 mul 2 add >> info
    ---------------------------------------------------
    -Name                     Type                Value
    ---------------------------------------------------
    -ab                       integertype         8
    ---------------------------------------------------
    -Total number of entries: 1
    -</pre>
    -
    -   Diagnostics: An ArgumentType error is raised if the
    -   initializer list does not consist of proper /key value
    -   pairs.
    -
    -   References: The Red Book
    -   SeeAlso: clonedict, begin, cleardictstack, dict, dictstack, info, end
    -*/
    -void
    -DictconstructFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: mark key1 val1 ... keyn valn -> dict
    -
    -  size_t load = i->OStack.load();
    -  if ( load == 0 )
    -  {
    -    throw StackUnderflow( 1, 0 );
    -  }
    -
    -  DictionaryDatum* dictd = new DictionaryDatum( new Dictionary );
    -  Token dict( dictd );
    -
    -  LiteralDatum* key = nullptr;
    -  static Token mark = i->baselookup( i->mark_name );
    -
    -  size_t n = 0; //!< pick(1) is the first literal, then we count in steps of 2
    -  while ( n < load and not( i->OStack.pick( n ) == mark ) )
    -  {
    -    Token& val = ( i->OStack.pick( n ) );
    -    key = dynamic_cast< LiteralDatum* >( i->OStack.pick( n + 1 ).datum() );
    -    if ( not key )
    -    {
    -      i->message( 30, "DictConstruct", "Literal expected. Maybe initializer list is in the wrong order." );
    -      i->raiseerror( i->ArgumentTypeError );
    -      delete dictd;
    -      return;
    -    }
    -    ( *dictd )->insert_move( *key, val );
    -    n += 2; // count number of elements
    -  }
    -
    -  if ( n == load )
    -  {
    -    i->message( 30, "DictConstruct", "<< expected." );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  if ( n % 2 != 0 ) // there must be an even number of objects
    -  {                 // above the mark
    -    i->message( 30, "DictConstruct", "Initializer list must be pairs of literal and value." );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -  i->OStack.pop( n );
    -  i->OStack.top().move( dict );
    -}
    -
    -
    -/** @BeginDocumentation
    -   Name: known - check whether a name is defined in a dictionary or object
    -
    -   Synopsis: dict /key known -> bool
    -             int  /key known -> bool
    -
    -   Examples:
    -   statusdict /host known -> true
    -   statusdict /hostname known -> false
    -
    -   Author: docu edited by Sirko Straube
    -
    -   SeeAlso: lookup
    -
    -*/
    -void
    -KnownFunction::execute( SLIInterpreter* i ) const
    -{
    -  //  call: dict key -> bool
    -
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.pick( 1 ).datum() );
    -  LiteralDatum* key = dynamic_cast< LiteralDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool known = ( *dict )->known( *key );
    -  i->EStack.pop(); // never forget me
    -  i->OStack.pop( 1 );
    -  i->OStack.top() = new BoolDatum( known );
    -}
    -
    -/** @BeginDocumentation
    -   Name: cleardict - Clears the contents of a dictionary
    -
    -   Synopsis: dict cleardict
    -
    -   SeeAlso: <<>>, clonedict, dictstack
    -
    -*/
    -void
    -CleardictFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.top().datum() );
    -  assert( dict );
    -#ifdef DICTSTACK_CACHE
    -  if ( ( *dict )->is_on_dictstack() )
    -  {
    -    i->DStack->clear_dict_from_cache( *dict );
    -  }
    -#endif
    -  ( *dict )->clear();
    -  i->EStack.pop(); // never forget me
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: clonedict - create a copy of a dictionary
    -
    -   Synopsis: dict1 clonedict -> dict1 dict2
    -
    -   Description:
    -     clonedict creates a new dictionary dict2 with the
    -     same entries as dict1.
    -
    -   Parameters:
    -     dict1 - a dictionary
    -
    -   Examples:
    -     << /a 1 >> clonedict
    -
    -   Diagnostics:
    -     None.
    -
    -   Author:
    -     Marc-Oliver Gewaltig
    -
    -   SeeAlso: <<>>, dict, cleardict
    -*/
    -void
    -ClonedictFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.top().datum() );
    -  assert( dict );
    -
    -  i->OStack.push( DictionaryDatum( new Dictionary( *( *dict ) ) ) );
    -  i->EStack.pop(); // never forget me
    -}
    -
    -/** @BeginDocumentation
    -   Name: cva_d - Convert dictionary to array
    -
    -   Synopsis: dict cva_d -> array
    -
    -   Description: cda converts a given dictionary to an array.
    -   The contents of the dictionay is mapped to the array in a
    -   form which is similar to the construction of an array, namely
    -   << key1 val1 ... keyn valn>> cva_d -> [key1 val1 ... keyn valn]
    -
    -   Parameters:
    -   dict is a dictionary which may be empty
    -
    -   Examples:
    -   << /a 1 /b 2>> cva_d -> [/a 1 /b 2]
    -
    -   Diagnostics:
    -   no errors are issued.
    -
    -   Remarks:
    -   The name follows the convention of PostScript and stands for
    -   ConVert to Array.
    -
    -  Implementation:
    -
    -   Class TokenMap provides an iterator which allows to step through the
    -   elements stored in the TokenMap. Member function begin() returns an
    -   iterator which points to the "first" element in the TokenMap and end()
    -   to the "last" element. operator ++ moves the iterator from one element
    -   to the next. Note, the iteration process itself does not define any
    -   order of the elements, e.g. in terms of the comparison operators. The
    -   only guaranteed function is that during the iteration from begin() to
    -   end() all elements in the TokenMap are accessed.
    -   Operator * applied to the iterator returns a pair. Member first of the
    -   pair is the key and member second is the value of the element the iterator
    -   points to.
    -   See
    -        @Book{Musser96,
    -          author =       "Musser, David R. and Saini, Atul",
    -          title =        "STL Tutorial and Reference Guide: {C++} Programming
    -                          with the Standard Template Library",
    -          publisher =    "Addison Wesley",
    -          year =         1996,
    -          isbn =         "0-201-63398-1",
    -          pages =        432,
    -          address =      {Reading Massachusetts},
    -          note =         "(hardcover)"
    -        }
    -  for a discussion of the definition and use of iterators in combination
    -  with containers.
    -
    -   Author:
    -   Marc-oliver Gewaltig
    -
    -   SeeAlso: keys, values, <<>>, cva, cvdict
    -
    -*/
    -void
    -Cva_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.top().datum() );
    -  assert( dict );
    -  ArrayDatum* ad = new ArrayDatum();
    -  ad->reserve( ( *dict )->size() * 2 );
    -
    -  for ( TokenMap::const_iterator t = ( *dict )->begin(); t != ( *dict )->end(); ++t )
    -  {
    -    Token nt( new LiteralDatum( ( *t ).first ) );
    -    ad->push_back_move( nt );
    -    ad->push_back( ( *t ).second );
    -  }
    -  i->OStack.pop();
    -  i->OStack.push( ad );
    -}
    -
    -/** @BeginDocumentation
    -   Name: keys - Return array of keys in a dictionary
    -
    -   Synopsis:
    -                            dict keys -> array
    -   <</key1 val1 ... /keyn valn>> keys -> [/key1 ... /keyn]
    -
    -   Description:
    -   "keys" converts the keys in a given dictionary to an array.
    -   The order of elements is the same as for the "values" command.
    -
    -   Parameters:
    -   dict is a dictionary which may be empty
    -
    -   Examples:
    -   << /a 1 /b 2>> keys -> [/a /b]
    -
    -   Diagnostics:
    -   no errors are issued.
    -
    -   Remarks:
    -   The commands "keys" and "values" return the same order of
    -   elements, when applied to the same dictionary. Apart from that,
    -   there is no particular order of elements in the returned array.
    -
    -   Author: Ruediger Kupper
    -
    -   First Version: 27-jun-2008
    -
    -   SeeAlso: keys, values, <<>>, cva, cvdict
    -*/
    -void
    -KeysFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.top().datum() );
    -  assert( dict );
    -  ArrayDatum* ad = new ArrayDatum();
    -
    -  for ( TokenMap::const_iterator t = ( *dict )->begin(); t != ( *dict )->end(); ++t )
    -  {
    -    Token nt( new LiteralDatum( ( *t ).first ) );
    -    assert( not nt.empty() );
    -    ad->push_back_move( nt );
    -  }
    -  i->OStack.pop();
    -  i->OStack.push( ad );
    -}
    -
    -/** @BeginDocumentation
    -   Name: values - Return array of values in a dictionary
    -
    -   Synopsis:
    -                            dict values -> array
    -   <</key1 val1 ... /keyn valn>> values -> [val1 ... valn]
    -
    -   Description:
    -   "values" converts the values in a given dictionary to an array.
    -   The order of elements is the same as for the "keys" command.
    -
    -   Parameters:
    -   dict is a dictionary which may be empty
    -
    -   Examples:
    -   << /a 1 /b 2>> values -> [1 2]
    -
    -   Diagnostics:
    -   no errors are issued.
    -
    -   Remarks:
    -   The commands "keys" and "values" return the same order of
    -   elements, when applied to the same dictionary. Apart from that,
    -   there is no particular order of elements in the returned array.
    -
    -   Author: Ruediger Kupper
    -
    -   First Version: 27-jun-2008
    -
    -   SeeAlso: keys, values, <<>>, cva, cvdict
    -*/
    -void
    -ValuesFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.load() > 0 );
    -  DictionaryDatum* dict = dynamic_cast< DictionaryDatum* >( i->OStack.top().datum() );
    -  assert( dict );
    -  ArrayDatum* ad = new ArrayDatum();
    -
    -  for ( TokenMap::const_iterator t = ( *dict )->begin(); t != ( *dict )->end(); ++t )
    -  {
    -    ad->push_back( ( *t ).second );
    -  }
    -  i->OStack.pop();
    -  i->OStack.push( ad );
    -}
    -
    -void
    -RestoredstackFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( ad );
    -  TokenArray ta = *ad;
    -  DictionaryStack* olddstack = i->DStack; // copy current dstack
    -  i->DStack = new DictionaryStack;
    -  for ( size_t j = 0; j < ta.size(); ++j )
    -  {
    -    try
    -    {
    -      DictionaryDatum dict = getValue< DictionaryDatum >( ta[ j ] );
    -      i->DStack->push( ta[ j ] );
    -    }
    -    catch ( ... )
    -    {
    -      delete i->DStack;
    -      i->DStack = olddstack;
    -      i->raiseerror( i->ArgumentTypeError );
    -      return;
    -    }
    -  }
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -const DictFunction dictfunction;
    -const DictputFunction dictputfunction;
    -const DictgetFunction dictgetfunction;
    -const DictinfoFunction dictinfofunction;
    -const DicttopinfoFunction dicttopinfofunction;
    -const WhoFunction whofunction;
    -const DictbeginFunction dictbeginfunction;
    -const DictendFunction dictendfunction;
    -const DictconstructFunction dictconstructfunction;
    -const Length_dFunction length_dfunction;
    -const Empty_DFunction empty_Dfunction;
    -const DictstackFunction dictstackfunction;
    -const CountdictstackFunction countdictstackfunction;
    -const CleardictstackFunction cleardictstackfunction;
    -const CurrentdictFunction currentdictfunction;
    -const KnownFunction knownfunction;
    -const UndefFunction undeffunction;
    -const CleardictFunction cleardictfunction;
    -const ClonedictFunction clonedictfunction;
    -const Cva_dFunction cva_dfunction;
    -const KeysFunction keysfunction;
    -const ValuesFunction valuesfunction;
    -const RestoredstackFunction restoredstackfunction;
    -
    -void
    -init_slidict( SLIInterpreter* i )
    -{
    -  i->createcommand( "dict", &dictfunction );
    -  i->createcommand( "put_d", &dictputfunction );
    -  i->createcommand( "get_d", &dictgetfunction );
    -  i->createcommand( "info_d", &dictinfofunction );
    -  i->createcommand( "length_d", &length_dfunction );
    -  i->createcommand( "empty_D", &empty_Dfunction );
    -  i->createcommand( "topinfo_d", &dicttopinfofunction );
    -  i->createcommand( "info_ds", &whofunction );
    -  i->createcommand( "begin", &dictbeginfunction );
    -  i->createcommand( i->end_name, &dictendfunction );
    -  i->createcommand( "undef", &undeffunction );
    -  i->createcommand( ">>", &dictconstructfunction );
    -  i->createcommand( "dictstack", &dictstackfunction );
    -  i->createcommand( "countdictstack", &countdictstackfunction );
    -  i->createcommand( "cleardictstack", &cleardictstackfunction );
    -  i->createcommand( "currentdict", &currentdictfunction );
    -  i->createcommand( "known", &knownfunction );
    -  i->createcommand( "cleardict", &cleardictfunction );
    -  i->createcommand( "clonedict", &clonedictfunction );
    -  i->createcommand( "cva_d", &cva_dfunction );
    -  i->createcommand( "keys", &keysfunction );
    -  i->createcommand( "values", &valuesfunction );
    -  i->createcommand( "restoredstack", &restoredstackfunction );
    -}
    diff --git a/sli/slidict.h b/sli/slidict.h
    deleted file mode 100644
    index 09e4fc456c..0000000000
    --- a/sli/slidict.h
    +++ /dev/null
    @@ -1,260 +0,0 @@
    -/*
    - *  slidict.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIDICT_H
    -#define SLIDICT_H
    -/*
    -    SLI dictionary access
    -*/
    -
    -// C++ includes:
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "interpret.h"
    -
    -/**************************************
    -  All SLI dictionary functions are
    -  defined in this module
    -  *************************************/
    -
    -void init_slidict( SLIInterpreter* );
    -
    -class DictFunction : public SLIFunction
    -{
    -public:
    -  DictFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DictputFunction : public SLIFunction
    -{
    -public:
    -  DictputFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DictgetFunction : public SLIFunction
    -{
    -public:
    -  DictgetFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DictbeginFunction : public SLIFunction
    -{
    -public:
    -  DictbeginFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DictendFunction : public SLIFunction
    -{
    -public:
    -  DictendFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -// MH fx 2010-09-28
    -// This function is not implemented.
    -// Definition commented out because it prevents compilation on PETA fx.
    -//
    -// class DictundefFunction: public SLIFunction
    -//{
    -// public:
    -// DictundefFunction() {}
    -//    void execute(SLIInterpreter *) const;
    -//};
    -
    -class DictinfoFunction : public SLIFunction
    -{
    -public:
    -  DictinfoFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DicttopinfoFunction : public SLIFunction
    -{
    -public:
    -  DicttopinfoFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class WhoFunction : public SLIFunction
    -{
    -public:
    -  WhoFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DictconstructFunction : public SLIFunction
    -{
    -public:
    -  DictconstructFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DictstackFunction : public SLIFunction
    -{
    -public:
    -  DictstackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CurrentdictFunction : public SLIFunction
    -{
    -public:
    -  CurrentdictFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CountdictstackFunction : public SLIFunction
    -{
    -public:
    -  CountdictstackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CleardictstackFunction : public SLIFunction
    -{
    -public:
    -  CleardictstackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Length_dFunction : public SLIFunction
    -{
    -public:
    -  Length_dFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Empty_DFunction : public SLIFunction
    -{
    -public:
    -  Empty_DFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CleardictFunction : public SLIFunction
    -{
    -public:
    -  CleardictFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ClonedictFunction : public SLIFunction
    -{
    -public:
    -  ClonedictFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class UndefFunction : public SLIFunction
    -{
    -public:
    -  UndefFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class KnownFunction : public SLIFunction
    -{
    -public:
    -  KnownFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cva_dFunction : public SLIFunction
    -{
    -public:
    -  Cva_dFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class KeysFunction : public SLIFunction
    -{
    -public:
    -  KeysFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ValuesFunction : public SLIFunction
    -{
    -public:
    -  ValuesFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RestoredstackFunction : public SLIFunction
    -{
    -public:
    -  RestoredstackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -#endif
    diff --git a/sli/sliexceptions.cc b/sli/sliexceptions.cc
    deleted file mode 100644
    index 2069df8f01..0000000000
    --- a/sli/sliexceptions.cc
    +++ /dev/null
    @@ -1,210 +0,0 @@
    -/*
    - *  sliexceptions.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "sliexceptions.h"
    -
    -// C++ includes:
    -#include <sstream>
    -
    -// Includes from sli:
    -#include "interpret.h"
    -
    -WrappedThreadException::WrappedThreadException( const std::exception& exc )
    -  : SLIException( exc.what() )
    -{
    -  SLIException const* se = dynamic_cast< SLIException const* >( &exc );
    -  if ( se )
    -  {
    -    message_ = se->message();
    -  }
    -  else
    -  {
    -    message_ = std::string( "C++ exception: " ) + exc.what();
    -  }
    -}
    -
    -std::string
    -DivisionByZero::message() const
    -{
    -  return "You cannot divide by zero.";
    -}
    -
    -std::string
    -TypeMismatch::message() const
    -{
    -  if ( not provided_.empty() and not expected_.empty() )
    -  {
    -    return "Expected datatype: " + expected_ + "\nProvided datatype: " + provided_;
    -  }
    -  else if ( not expected_.empty() )
    -  {
    -    return "Expected datatype: " + expected_;
    -  }
    -  else
    -  {
    -    return "The expected datatype is unknown in the current context.";
    -  }
    -}
    -
    -std::string
    -RangeCheck::message() const
    -{
    -  if ( size_ > 0 )
    -  {
    -    std::ostringstream out;
    -    out << "Array with length " << size_ << " expected.";
    -    return out.str();
    -  }
    -  else
    -  {
    -    // Empty message.
    -    // Added due to incorrect use of RangeCheck
    -    // in nestmodule.cpp
    -    return std::string();
    -  }
    -}
    -
    -std::string
    -ArgumentType::message() const
    -{
    -  std::ostringstream out;
    -
    -  out << "The type of";
    -  if ( where )
    -  {
    -    out << " the ";
    -    if ( where == 1 )
    -    {
    -      out << "first";
    -    }
    -    else if ( where == 2 )
    -    {
    -      out << "second";
    -    }
    -    else if ( where == 3 )
    -    {
    -      out << "third";
    -    }
    -    else
    -    {
    -      out << where << "th";
    -    }
    -    out << " parameter";
    -  }
    -  else
    -  {
    -    out << " one or more parameters";
    -  }
    -  out << " did not match the argument(s) of this function.";
    -
    -  return out.str();
    -}
    -
    -std::string
    -BadParameterValue::message() const
    -{
    -  return msg_;
    -}
    -
    -
    -std::string
    -UndefinedName::message() const
    -{
    -  return "Key '/" + name_ + "' does not exist in dictionary.";
    -}
    -
    -std::string
    -EntryTypeMismatch::message() const
    -{
    -  return "Expected datatype: " + expected_ + "\nProvided datatype: " + provided_;
    -}
    -
    -std::string
    -StackUnderflow::message() const
    -{
    -  std::ostringstream out;
    -  if ( needed )
    -  {
    -    out << "Command needs (at least) " << needed << " argument(s)";
    -    if ( given )
    -    {
    -      out << ", but the stack has only " << given;
    -    }
    -    out << ".";
    -  }
    -  else
    -  {
    -    out << "Command needs more arguments";
    -    if ( given )
    -    {
    -      out << "than " << given;
    -    }
    -    out << ".";
    -  }
    -
    -  return out.str();
    -}
    -
    -std::string
    -IOError::message() const
    -{
    -  return std::string();
    -}
    -
    -std::string
    -SystemSignal::message() const
    -{
    -  std::ostringstream out;
    -  out << "The operation was interrupted by the system signal " << signal_ << ".";
    -  return out.str();
    -}
    -
    -std::string
    -UnaccessedDictionaryEntry::message() const
    -{
    -  return "Unused dictionary items: " + msg_;
    -}
    -
    -std::string
    -DynamicModuleManagementError::message() const
    -{
    -  if ( msg_.empty() )
    -  {
    -    return "Unloading of dynamic modules is not implemented yet.";
    -  }
    -  else
    -  {
    -    return msg_;
    -  }
    -}
    -
    -std::string
    -NamingConflict::message() const
    -{
    -  return msg_;
    -}
    -
    -std::string
    -NotImplemented::message() const
    -{
    -  return msg_;
    -}
    diff --git a/sli/sliexceptions.h b/sli/sliexceptions.h
    deleted file mode 100644
    index 10bdd8bfd9..0000000000
    --- a/sli/sliexceptions.h
    +++ /dev/null
    @@ -1,484 +0,0 @@
    -/*
    - *  sliexceptions.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIEXCEPTIONS_H
    -#define SLIEXCEPTIONS_H
    -
    -// C++ includes:
    -#include <iostream>
    -#include <string>
    -#include <vector>
    -
    -// Includes from sli:
    -#include "name.h"
    -
    -class SLIInterpreter;
    -
    -
    -#define UNKNOWN "unknown"
    -#define UNKNOWN_NUM -1
    -
    -/**
    - * @addtogroup Exceptions Exception classes
    - * Exception classes that are thrown to indicate
    - * an error.
    - */
    -
    -/**
    - * @defgroup SLIExceptions SLI exception classes
    - * Exception classes that are thrown by SLI to
    - * indicate an error.
    - * @ingroup Exceptions
    - */
    -
    -
    -/**
    - * Base class for all SLI exceptions.
    - * @ingroup Exceptions
    - * @ingroup SLIExceptions
    - */
    -class SLIException : public std::exception
    -{
    -  std::string what_;
    -
    -public:
    -  SLIException( char const* const what )
    -    : what_( what )
    -  {
    -  }
    -
    -  SLIException( const std::string& what )
    -    : what_( what )
    -  {
    -  }
    -
    -  ~SLIException() throw() override {};
    -
    -  /**
    -   * Returns the SLI error name, used by raiseerror.
    -   *
    -   * Return name of the exception as C-style string.
    -   * Use this name to translate the exception to a SLI error.
    -   * For example:
    -   * @code
    -   * catch(IllegalOperation &e)
    -   * {
    -   *   i->error("SetStatus","Nodes must be a NodeCollection or SynapseCollection.");
    -   *   i->raiseerror(e.what());
    -   *   return;
    -   * }
    -   *@endcode
    -   *@note The catch clause must be terminated with a return
    -   *statement, if raiseerror was called.
    -   */
    -  const char*
    -  what() const throw() override
    -  {
    -    return what_.c_str();
    -  }
    -
    -  /**
    -   * Returns a diagnostic message or empty string.
    -   */
    -  virtual std::string message() const = 0;
    -};
    -
    -/**
    - * Base class for all SLI interpreter exceptions.
    - * @ingroup SLIExceptions
    - */
    -
    -class InterpreterError : public SLIException
    -{
    -public:
    -  ~InterpreterError() throw() override
    -  {
    -  }
    -
    -  InterpreterError( char const* const what )
    -    : SLIException( what )
    -  {
    -  }
    -};
    -
    -/**
    - * Class for packaging exceptions thrown in threads.
    - *
    - * This class is used to wrap exceptions thrown in threads.
    - * It essentially packages the message of the wrapped exception,
    - * avoiding the need of a clone() operation for each exception type.
    - */
    -class WrappedThreadException : public SLIException
    -{
    -public:
    -  WrappedThreadException( const std::exception& );
    -  ~WrappedThreadException() throw() override
    -  {
    -  }
    -  std::string
    -  message() const override
    -  {
    -    return message_;
    -  }
    -
    -private:
    -  std::string message_;
    -};
    -
    -class DivisionByZero : public SLIException
    -{
    -public:
    -  ~DivisionByZero() throw() override
    -  {
    -  }
    -
    -  DivisionByZero()
    -    : SLIException( "DivisionByZero" )
    -  {
    -  }
    -  std::string message() const override;
    -};
    -
    -// -------------------- Type Mismatch -------------------------
    -/**
    - * Exception to be thrown if a given SLI type does not match the
    - * expected type.
    - * @ingroup SLIExceptions
    - */
    -
    -class TypeMismatch : public InterpreterError // SLIException
    -{
    -  std::string expected_;
    -  std::string provided_;
    -
    -public:
    -  ~TypeMismatch() throw() override
    -  {
    -  }
    -
    -  TypeMismatch()
    -    : InterpreterError( "TypeMismatch" )
    -  {
    -  }
    -
    -  TypeMismatch( const std::string& expectedType )
    -    : InterpreterError( "TypeMismatch" )
    -    , expected_( expectedType )
    -  {
    -  }
    -
    -  TypeMismatch( const std::string& expectedType, const std::string& providedType )
    -    : InterpreterError( "TypeMismatch" )
    -    , expected_( expectedType )
    -    , provided_( providedType )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -class SystemSignal : public InterpreterError
    -{
    -  int signal_;
    -
    -public:
    -  ~SystemSignal() throw() override
    -  {
    -  }
    -  SystemSignal( int s )
    -    : InterpreterError( "SystemSignal" )
    -    , signal_( s )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -// -------------------- Array Size Mismatch -------------------------
    -/**
    - * Exception to be thrown if a given SLI array has the wrong size.
    - * @ingroup SLIExceptions
    - */
    -class RangeCheck : public InterpreterError
    -{
    -  int size_;
    -
    -public:
    -  ~RangeCheck() throw() override
    -  {
    -  }
    -
    -  RangeCheck( int s = 0 )
    -    : InterpreterError( "RangeCheck" )
    -    , size_( s )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -class ArgumentType : public InterpreterError
    -{
    -  int where; // Number of the parameter that was wrong.
    -public:
    -  ArgumentType( int w )
    -    : InterpreterError( "ArgumentType" )
    -    , where( w )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -/**
    - * Exception to be thrown if a parameter value
    - * is not acceptable.
    - */
    -class BadParameterValue : public SLIException
    -{
    -  std::string msg_;
    -
    -public:
    -  //! @param detailed error message
    -  BadParameterValue()
    -    : SLIException( "BadParameterValue" )
    -    , msg_()
    -  {
    -  }
    -
    -  BadParameterValue( std::string msg )
    -    : SLIException( "BadParameterValue" )
    -    , msg_( msg )
    -  {
    -  }
    -
    -  ~BadParameterValue() throw() override
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -// -------------------- Dict Error -------------------------
    -/**
    - * Base Class for all SLI errors related to dictionary processing.
    - * @ingroup SLIExceptions
    - */
    -class DictError : public InterpreterError
    -{
    -public:
    -  ~DictError() throw() override
    -  {
    -  }
    -
    -  DictError( char const* const what )
    -    : InterpreterError( what )
    -  {
    -  }
    -};
    -
    -// -------------------- Unknown Name -------------------------
    -/**
    - * Exception to be thrown if an entry referenced inside a
    - * dictionary does not exist.
    - * @ingroup SLIExceptions
    - */
    -class UndefinedName : public DictError // was UnknownName
    -{
    -  std::string name_;
    -
    -public:
    -  ~UndefinedName() throw() override
    -  {
    -  }
    -  UndefinedName( const std::string& name )
    -    : DictError( "UndefinedName" )
    -    , name_( name )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -// -------------------- Entry Type Mismatch -------------------------
    -/**
    - * Exception to be thrown if an entry referenced inside a
    - * dictionary has the wrong type.
    - * @ingroup SLIExceptions
    - */
    -class EntryTypeMismatch : public DictError
    -{
    -  std::string expected_;
    -  std::string provided_;
    -
    -public:
    -  ~EntryTypeMismatch() throw() override
    -  {
    -  }
    -  EntryTypeMismatch( const std::string& expectedType, const std::string& providedType )
    -    : DictError( "EntryTypeMismatch" )
    -    , expected_( expectedType )
    -    , provided_( providedType )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -// -------------------- Stack Error -------------------------
    -/**
    - * Exception to be thrown if an error occured while accessing the stack.
    - * @ingroup SLIExceptions
    - */
    -class StackUnderflow : public InterpreterError
    -{
    -  int needed;
    -  int given;
    -
    -public:
    -  StackUnderflow( int n, int g )
    -    : InterpreterError( "StackUnderflow" )
    -    , needed( n )
    -    , given( g ) {};
    -
    -  std::string message() const override;
    -};
    -
    -
    -// -------------------- I/O Error -------------------------
    -/**
    - * Exception to be thrown if an error occured in an I/O operation.
    - * @ingroup SLIExceptions
    - */
    -class IOError : public SLIException
    -{
    -public:
    -  ~IOError() throw() override
    -  {
    -  }
    -  IOError()
    -    : SLIException( "IOError" )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -/**
    - * Exception to be thrown if unaccessed dictionary items are found.
    - */
    -class UnaccessedDictionaryEntry : public DictError
    -{
    -  std::string msg_;
    -
    -public:
    -  ~UnaccessedDictionaryEntry() throw() override
    -  {
    -  }
    -  // input: string with names of not accessed
    -  UnaccessedDictionaryEntry( const std::string& m )
    -    : DictError( ( std::string( "UnaccessedDictionaryEntry: " ) + m ).c_str() )
    -    , msg_( m )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -
    -// ------------ Module related error --------------------------
    -
    -/**
    - * Exception to be thrown if an error occurs while
    - * loading/unloading dynamic modules.
    - * @ingroup SLIExceptions
    - * @todo Shouldn't this be a KernelException?
    - */
    -class DynamicModuleManagementError : public SLIException
    -{
    -  std::string msg_;
    -
    -public:
    -  ~DynamicModuleManagementError() throw() override
    -  {
    -  }
    -
    -  DynamicModuleManagementError()
    -    : SLIException( "DynamicModuleManagementError" )
    -    , msg_()
    -  {
    -  }
    -
    -  DynamicModuleManagementError( std::string msg )
    -    : SLIException( "DynamicModuleManagementError" )
    -    , msg_( msg )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -/**
    - * Throw if an existing name is attempted to be redefined.
    - * This is relevant mainly when a newly loaded module attempts to
    - * redefine a model, synapse or function name.
    - * @ingroup SLIExceptions
    - */
    -class NamingConflict : public SLIException
    -{
    -  std::string msg_;
    -
    -public:
    -  ~NamingConflict() throw() override
    -  {
    -  }
    -  NamingConflict( const std::string& m )
    -    : SLIException( "NamingConflict" )
    -    , msg_( m )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -/**
    - * Throw if an feature is unavailable.
    - * @ingroup SLIExceptions
    - */
    -class NotImplemented : public SLIException
    -{
    -  std::string msg_;
    -
    -public:
    -  ~NotImplemented() throw() override
    -  {
    -  }
    -  NotImplemented( const std::string& m )
    -    : SLIException( "NotImplemented" )
    -    , msg_( m )
    -  {
    -  }
    -
    -  std::string message() const override;
    -};
    -
    -#endif
    diff --git a/sli/slifunction.h b/sli/slifunction.h
    deleted file mode 100644
    index 26bf3e0bfa..0000000000
    --- a/sli/slifunction.h
    +++ /dev/null
    @@ -1,62 +0,0 @@
    -/*
    - *  slifunction.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIFUNCTION_H
    -#define SLIFUNCTION_H
    -/*
    -    Base class for all SLI functions.
    -*/
    -
    -class SLIInterpreter;
    -
    -/*
    -  class SLICommand replaces the old class Function from SYNOD 1.x.
    - */
    -
    -class SLIFunction
    -{
    -public:
    -  SLIFunction()
    -  {
    -  }
    -  virtual void execute( SLIInterpreter* ) const = 0;
    -  virtual ~SLIFunction()
    -  {
    -  }
    -
    -  /**
    -   * Show stack backtrace information on error.
    -   * This function tries to extract and display useful
    -   * information from the execution stack if an error occurs.
    -   * This function should be implemented for all functions which
    -   * store administrative information on the execution stack.
    -   * Examples are: loops and procedure iterations.
    -   * backtrace() is only called, if the interpreter flag
    -   * show_backtrace is set.
    -   */
    -  virtual void
    -  backtrace( SLIInterpreter*, int ) const
    -  {
    -  }
    -};
    -
    -#endif
    diff --git a/sli/sligraphics.cc b/sli/sligraphics.cc
    deleted file mode 100644
    index c4a8baa534..0000000000
    --- a/sli/sligraphics.cc
    +++ /dev/null
    @@ -1,378 +0,0 @@
    -/*
    - *  sligraphics.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "sligraphics.h"
    -
    -// C++ includes:
    -#include <cctype> // for isspace
    -#include <cstdio>
    -#include <iostream>
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "fdstream.h"
    -#include "integerdatum.h"
    -#include "stringdatum.h"
    -
    -
    -/** @BeginDocumentation
    -Name:readPGM - read in grey-level image in PGM Format.
    -
    -Synopsis:string readPGM -> int    int    int   arraytype
    -fname  readPGM -> width height maxval [grayvals]
    -
    -Description:this function reads an image file in the PGM format and
    -returns the width, height, maximum gray value and the
    -image itself (as a linear array).
    -On Unix systems, man pgm should give you a description
    -of the PGM (Portable GrayMap) image format.
    -
    -Parameters:fname      - name of file to be read
    -[grayvals] - one-dim. array containing the pixel gray values,
    -             starting from the upper left corner of the image,
    -          continuing rowwise (normal englissh reading order).
    -maxval     - the maximum gray value
    -width      - width of image in pixels (no. of columns)
    -height     - height of image (no. of rows)
    -
    -Examples:(FancyImage.pgm) readPGM -> 16 24 255 [grayvals]
    -
    -This reads the image FancyImage.pgm, and tells you that it has
    -16 columns, 24 rows, and a maximum gray value of 255. The pixel
    -gray values are stored in the array.
    -
    -Author:Schmuker, Gewaltig
    -
    -FirstVersion:9.1.2003
    -
    -SeeAlso:writePGM
    -*/
    -void
    -SLIgraphics::ReadPGMFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: filename readPGM -> width height maxval image(array)
    -
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -
    -  if ( not sd )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  std::istream* in = nullptr;
    -  std::vector< long > image;
    -  // for the image parameters: width, height, maxval
    -  int width = 0, height = 0, maxval = 0;
    -
    -  try
    -  {
    -    in = openPGMFile( sd );
    -    char magic[ 2 ];
    -    readMagicNumber( in, magic );
    -    initRead( in, width, height, maxval );
    -    readImage( in, magic, image, width, height, maxval );
    -    delete in;
    -  }
    -  catch ( std::string const& s )
    -  {
    -    delete in;
    -    i->message( SLIInterpreter::M_ERROR, "readPGM", "Error reading image." );
    -    i->message( SLIInterpreter::M_ERROR, "readPGM", s.c_str() );
    -    i->raiseerror( i->BadIOError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -  i->OStack.pop();
    -  i->OStack.push( ArrayDatum( image ) );
    -  i->OStack.push( maxval );
    -  i->OStack.push( height );
    -  i->OStack.push( width );
    -}
    -
    -std::istream*
    -SLIgraphics::ReadPGMFunction::openPGMFile( StringDatum* filename ) const
    -{
    -  // opens pgm file for reading and returns pointer to the istream
    -  std::istream* in = new ifdstream( filename->c_str() );
    -  if ( in->good() )
    -  {
    -    return in;
    -  }
    -  else
    -  {
    -    throw std::string( "File open error." );
    -  }
    -}
    -
    -void
    -SLIgraphics::ReadPGMFunction::readMagicNumber( std::istream* in, char* magic ) const
    -{
    -  // reads in the magic number which determines the file format
    -  try
    -  {
    -    *in >> magic;
    -  }
    -  catch ( std::exception& e )
    -  {
    -    throw std::string( "Magic number read error: " ) + e.what();
    -  }
    -}
    -
    -void
    -SLIgraphics::ReadPGMFunction::initRead( std::istream* in, int& width, int& height, int& maxval ) const
    -{
    -  // reads the width, height, and max. gray value in this order
    -  char temp[ 256 ];
    -  try
    -  {
    -    // throw away whitespaces after magic number
    -    // otherwise, >> gets confused about the newline before the numbers
    -    char trash;
    -    while ( std::isspace( trash = in->get() ) )
    -    {
    -      continue;
    -    }
    -    in->putback( trash );
    -    // skip comments
    -    do
    -    {
    -      in->getline( temp, 255 );
    -    } while ( temp[ 0 ] == '#' );
    -    // width and height are now in temp, so parse it
    -    sscanf( temp, "%d %d", &width, &height );
    -    *in >> maxval;
    -  }
    -  catch ( std::exception& e )
    -  {
    -    throw std::string( "Read init error: " ) + e.what();
    -  }
    -}
    -
    -void
    -SLIgraphics::ReadPGMFunction::readImage( std::istream* in,
    -  char magic[ 2 ],
    -  std::vector< long >& image,
    -  int width,
    -  int height,
    -  int maxval ) const
    -{
    -  // this reads the gray value array
    -  image.clear();
    -  image.reserve( width * height );
    -
    -  try
    -  {
    -    if ( std::string( magic ) == std::string( "P2" ) ) // ASCII PGM
    -    {
    -      int tmp;
    -      while ( *in >> tmp and not in->eof() )
    -      {
    -        image.push_back( ( long ) tmp );
    -      }
    -    }
    -    else if ( std::string( magic ) == std::string( "P5" )
    -      or std::string( magic ) == std::string( "P6" ) ) // Raw PGM (resp. PPM)
    -    {
    -      if ( maxval > 255 )
    -      {
    -        throw std::string( "read: maxval too large for format RawPGM(P5)." );
    -      }
    -      char tmp;
    -      long tmp2;
    -      in->read( &tmp, 1 ); // throw away LF after maxval
    -      // TODO: Protect this from reading too much data like trailing
    -      // newlines: use for instead of while
    -      while ( in->read( &tmp, 1 ) and not( in->eof() ) )
    -      {
    -        tmp2 = ( unsigned char ) tmp;
    -        image.push_back( ( long ) tmp2 );
    -      }
    -    }
    -    else
    -    {
    -      throw std::string( "image read error:" ) + std::string( magic ) + std::string( ": Unsupported file type." );
    -    }
    -  }
    -  catch ( std::exception& e )
    -  {
    -    throw std::string( "image read error: " ) + e.what();
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name:writePGM - write out a grey-level image in PGM format
    -
    -Synopsis:string arraytype   int    int   int   writePGM
    -fname  [grayvals] maxval height width writePGM
    -
    -Description:This writes an array of integers as grey-level image
    -using the PGM (PortableGrayMap) format.
    -On Unix systems, man 5 pgm should give you a description of
    -the PGM image format.
    -
    -Parameters:fname      - name of file to be written
    -[grayvals] - one-dim. array containing the pixel gray values,
    -             starting at the upper left corner and continuing
    -             rowwise (normal english reading order).
    -maxval     - the maximum gray value
    -width      - width of image in pixels (no. of columns)
    -height     - height of image (no. of rows)
    -
    -Remarks:So far, only the plain ASCII variant of the PGM Format is
    -used. In the PGM manual, this is referred to as "P2".
    -
    -Examples:(FancyImage.pgm) [grayvals] 255 24 16 writePGM
    -This writes an image named FancyImage.pgm with the gray values
    -from the array, having 16 columns and 24 rows.
    -
    -Author:Schmuker, Gewaltig
    -
    -FirstVersion:9.1.2003
    -
    -SeeAlso:readPGM
    -*/
    -void
    -SLIgraphics::WritePGMFunction::execute( SLIInterpreter* i ) const
    -{
    -  // TODO: fix argument order!!! Should be the same as when getting
    -  // the parameters read by readPGM.First make sure that your script is
    -  // properly working!
    -
    -  // call: filename image(array) maxval height width writePGM
    -  if ( i->OStack.load() < 5 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  IntegerDatum* w = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  IntegerDatum* h = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* m = dynamic_cast< IntegerDatum* >( i->OStack.pick( 2 ).datum() );
    -  ArrayDatum* image = dynamic_cast< ArrayDatum* >( i->OStack.pick( 3 ).datum() );
    -  StringDatum* filename = dynamic_cast< StringDatum* >( i->OStack.pick( 4 ).datum() );
    -
    -  long width = ( long ) w->get();
    -  long height = ( long ) h->get();
    -  long maxval = ( long ) m->get();
    -
    -  std::ostream* out = nullptr;
    -
    -  try
    -  {
    -    out = new ofdstream( filename->c_str() );
    -
    -    if ( not out->good() )
    -    {
    -      throw std::string( "Error when opening file for writing." );
    -    }
    -
    -    if ( ( long ) image->size() != width * height )
    -    {
    -      throw std::string( "Array size does not match given dimensions." );
    -    }
    -
    -    // Plain ASCII PGM format
    -    *out << "P2" << std::endl; // Magic Number
    -    *out << "# CREATOR: SLI/Synod. The NEST cooperation 2003." << std::endl;
    -    *out << width << " " << height << std::endl;
    -    *out << maxval << std::endl;
    -    for ( unsigned int i = 0; i < image->size(); i++ )
    -    {
    -      *out << image->get( i );
    -
    -      // write newline after 20 written numbers or
    -      // one pixel row, which ever comes first
    -      if ( width > 20 )
    -      {
    -        if ( ( i + 1 ) % 20 == 0 )
    -        {
    -          *out << std::endl;
    -        }
    -        else
    -        {
    -          *out << " ";
    -        }
    -      }
    -      else
    -      {
    -        if ( ( i + 1 ) % width == 0 )
    -        {
    -          *out << std::endl;
    -        }
    -        else
    -        {
    -          *out << " ";
    -        }
    -      }
    -    }
    -
    -    *out << std::endl; // make sure file ends in a newline
    -    delete out;
    -  }
    -  catch ( std::exception& e )
    -  {
    -    throw std::string( "exception: " ) + e.what();
    -  }
    -  catch ( std::string const& s )
    -  {
    -    delete out;
    -    i->message( SLIInterpreter::M_ERROR, "writePGM", "Error writing image." );
    -    i->message( SLIInterpreter::M_ERROR, "writePGM", s.c_str() );
    -    i->raiseerror( i->BadIOError );
    -    return;
    -  }
    -
    -  // clean up
    -  i->EStack.pop();
    -  i->OStack.pop();
    -  i->OStack.pop();
    -  i->OStack.pop();
    -  i->OStack.pop();
    -  i->OStack.pop();
    -}
    -
    -
    -void
    -SLIgraphics::init( SLIInterpreter* i )
    -{
    -  i->createcommand( "readPGM", &readpgmfunction );
    -  i->createcommand( "writePGM", &writepgmfunction );
    -}
    -
    -const std::string
    -SLIgraphics::name() const
    -{
    -  return std::string( "SLIgraphics" );
    -}
    -
    -const std::string
    -SLIgraphics::commandstring() const
    -{
    -  return "M_DEBUG (SLIgraphics) (Initialising Graphics IO) message";
    -}
    diff --git a/sli/sligraphics.h b/sli/sligraphics.h
    deleted file mode 100644
    index d3b0cbba14..0000000000
    --- a/sli/sligraphics.h
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    - *  sligraphics.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIPGM_H
    -#define SLIPGM_H
    -
    -// C++ includes:
    -#include <iostream>
    -#include <string>
    -#include <vector>
    -
    -// Includes from sli:
    -#include "fdstream.h"
    -#include "interpret.h"
    -#include "slifunction.h"
    -#include "slimodule.h"
    -#include "stringdatum.h"
    -
    -class SLIgraphics : public SLIModule
    -{
    -
    -  class ReadPGMFunction : public SLIFunction
    -  {
    -  private:
    -    std::istream* openPGMFile( StringDatum* ) const;        //!< opens the file
    -    void readMagicNumber( std::istream*, char[ 2 ] ) const; //!< reads the magic number into string magic
    -    void initRead( std::istream*, int&, int&, int& ) const; //!< reads width, height, maxval
    -    void readImage( std::istream*, char[ 2 ], std::vector< long >&, int, int, int ) const; //!< reads the image
    -
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class WritePGMFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  ReadPGMFunction readpgmfunction;
    -  WritePGMFunction writepgmfunction;
    -
    -public:
    -  SLIgraphics()
    -  {
    -  }
    -
    -  void init( SLIInterpreter* ) override;
    -  const std::string name() const override;
    -  const std::string commandstring() const override;
    -};
    -
    -
    -#endif
    diff --git a/sli/slimath.cc b/sli/slimath.cc
    deleted file mode 100644
    index e768c30ac2..0000000000
    --- a/sli/slimath.cc
    +++ /dev/null
    @@ -1,1891 +0,0 @@
    -/*
    - *  slimath.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    slimath.cc
    -*/
    -
    -#include "slimath.h"
    -
    -// C++ includes:
    -#include <cmath>
    -
    -
    -// Includes from sli:
    -#include "booldatum.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "stringdatum.h"
    -
    -
    -void
    -IntegerFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op = dynamic_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( op )
    -  {
    -    Token res( new IntegerDatum( op->get() ) );
    -    i->OStack.top().swap( res );
    -  }
    -}
    -
    -void
    -DoubleFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( op )
    -  {
    -
    -    Token res( new DoubleDatum( op->get() ) );
    -    i->OStack.top().swap( res );
    -  }
    -}
    -
    -void
    -Add_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() += ( op2->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Add_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() += ( op2->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Add_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  // double int add -> double
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  op2->get() += ( op1->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Add_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  // ind double add -> double
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  op1->get() += ( op2->get() );
    -  i->OStack.swap();
    -  i->OStack.pop();
    -}
    -//-----------------------------------------------------
    -void
    -Sub_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() -= ( op2->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Sub_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() -= ( op2->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Sub_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() -= ( op2->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Sub_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op2->get() = op1->get() - op2->get();
    -  i->OStack.swap();
    -  i->OStack.pop();
    -}
    -//-----------------------------------------------------
    -void
    -Mul_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() *= ( op2->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Mul_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() *= ( op2->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Mul_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() *= ( op2->get() );
    -  i->OStack.pop();
    -}
    -
    -void
    -Mul_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  op1->get() *= ( op2->get() );
    -  i->OStack.swap();
    -  i->OStack.pop();
    -}
    -//-----------------------------------------------------
    -void
    -Div_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op2->get() != 0 )
    -  {
    -    op1->get() /= ( op2->get() );
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->DivisionByZeroError );
    -  }
    -}
    -
    -//-----------------------------------------------------
    -/** @BeginDocumentation
    -Name: mod - compute the modulo of two integer numbers.
    -Synopsis: int int mod -> int
    -Examples: 7 4 mod -> 3
    -SeeAlso: E, sin, cos, exp, log
    -*/
    -void
    -Mod_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( not op1 or not op2 )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  if ( op2->get() != 0 )
    -  {
    -    *op1 = op1->get() % op2->get();
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->DivisionByZeroError );
    -  }
    -}
    -
    -void
    -Div_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op2->get() != 0 )
    -  {
    -    op1->get() /= ( op2->get() );
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->DivisionByZeroError );
    -  }
    -}
    -
    -void
    -Div_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op2->get() != 0 )
    -  {
    -    op1->get() /= ( op2->get() );
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->DivisionByZeroError );
    -  }
    -}
    -
    -void
    -Div_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op2->get() != 0 )
    -  {
    -    op2->get() = ( op1->get() ) / ( op2->get() );
    -    i->OStack.swap();
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->DivisionByZeroError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    - Name: sin - Calculate the sine of double number.
    - Synopsis:  double sin -> double
    -
    - Description: Alternatives: Function sin_d (undocumented)
    - -> behaviour and synopsis are the same.
    -
    - Examples:  1.0 sin -> 0.841471
    -
    - Author: Hehl
    - FirstVersion: 8.6.1999
    - SeeAlso: cos
    -*/
    -
    -void
    -Sin_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -
    -  *op = std::sin( op->get() );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    - Name: asin - Calculate the arc sine of double number.
    - Synopsis:  double asin -> double
    -
    - Description: Alternatives: Function asin_d (undocumented)
    - -> behaviour and synopsis are the same.
    -
    - Examples:  1.0 asin -> 1.570796
    -
    - Author: Diesmann
    - FirstVersion: 090225
    - SeeAlso: sin, acos
    -*/
    -
    -void
    -Asin_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  *op = std::asin( op->get() );
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: cos - Calculate the cosine of double number.
    - Synopsis:  double cos -> double
    -
    - Description: Alternatives: Function cos_d (undocumented)
    - -> behaviour and synopsis are the same.
    -
    - Examples: 1.0 cos -> 0.540302
    -
    - Author: Hehl
    - FirstVersion: 8.6.1999
    - SeeAlso: sin
    -*/
    -
    -void
    -Cos_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -
    -  *op = std::cos( op->get() );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    - Name: acos - Calculate the arc cosine of double number.
    - Synopsis:  double acos -> double
    -
    - Description: Alternatives: Function acos_d (undocumented)
    - -> behaviour and synopsis are the same.
    -
    - Examples: 1.0 acos -> 0.0
    -
    - Author: Diesmann
    - FirstVersion: 090225
    - SeeAlso: cos, asin
    -*/
    -
    -void
    -Acos_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  *op = std::acos( op->get() );
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: exp - Calculate the exponential of double number
    - Synopsis:  double exp -> double
    - Examples: 1.0 exp -> 2.71828
    - Author: Hehl
    - FirstVersion: 10.6.1999
    - SeeAlso: E, sin, cos
    -*/
    -
    -
    -void
    -Exp_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  *op = std::exp( op->get() );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    - Name: log - Calculate decadic logarithm of double number.
    - Synopsis:  double exp -> double
    - Examples: 10.0 log -> 1.0
    - Author: Gewaltig
    - FirstVersion: 7.6.2000
    - SeeAlso: E, sin, cos, exp
    -*/
    -
    -void
    -Log_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op->get() > 0.0 )
    -  {
    -    *op = std::log10( op->get() );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    - Name: ln - Calculate natural logarithm of double number.
    - Synopsis:  double ln -> double
    - Examples: E ln -> 1.0
    - Author: Gewaltig
    - FirstVersion: 7.6.2000
    - SeeAlso: E, sin, cos, exp, log
    -*/
    -
    -void
    -Ln_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( op->get() > 0.0 )
    -  {
    -    *op = std::log( op->get() );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: sqr - Compute the square of a number.
    -Examples: 2.0 sqr -> 4.0
    -Synopsis: number sqr -> double
    -SeeAlso: sqrt
    -*/
    -void
    -Sqr_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  *op = op->get() * op->get();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: sqrt - compute the square root of a non-negative number
    -Synopsis: number sqrt -> double
    -Description: sqrt computes the the square root of a number.
    -If the value is negative, a RangeCheck error is raised.
    -Examples: 4 sqrt -> 2.0
    -SeeAlso: sqr
    -*/
    -void
    -Sqrt_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op->get() >= 0.0 )
    -  {
    -    *op = std::sqrt( op->get() );
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: pow - raise a number to a power
    -Synopsis: x y pow -> number
    -Description: pow computes x raised to the y-th power (x^y).
    -Remarks: Raises a RangeCheck error if x is negative, unless y is positive
    -integer.
    -Author: Plesser
    -FirstVersion: 17.05.2004
    -SeeAlso: exp, log
    -*/
    -void
    -Pow_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  if ( op1->get() >= 0.0 )
    -  {
    -    *op1 = std::pow( op1->get(), op2->get() );
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -
    -  return;
    -}
    -
    -void
    -Pow_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  // can raise anything to an integer power, except zero to neg power
    -  if ( not( op1->get() == 0.0 and op2->get() < 0 ) )
    -  {
    -    // cast explicitly to double to avoid overloading ambiguity
    -    *op1 = std::pow( op1->get(), static_cast< double >( op2->get() ) );
    -    i->OStack.pop();
    -    i->EStack.pop();
    -  }
    -  else
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -  }
    -
    -  return;
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: modf - Decomposes its argument into fractional and integral part
    - Synopsis: double modf -> double double
    - Description:
    - This is an interface to the C++ function
    - double std::modf(double, double*)
    - Examples: 2.5 modf -> 0.5 2
    - Author: Diesmann
    - FirstVersion: 17.5.2005
    - References: Stroustrup 3rd ed p 661
    - SeeAlso: frexp
    -*/
    -void
    -Modf_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  double y;
    -
    -  *op1 = std::modf( op1->get(), &y );
    -  i->OStack.push_by_pointer( new DoubleDatum( y ) );
    -
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: frexp - Decomposes its argument into an exponent of 2 and a factor
    - Synopsis: double frexp -> double integer
    - Description:
    - This is an interface to the C++ function
    - double std::frexp(double,int*)
    - In accordance with the normalized representation of the mantissa
    - in IEEE doubles, the factor is in the interval [0.5,1).
    - Examples: -5 dexp frexp -> 0.5 -4
    - Author: Diesmann
    - FirstVersion: 17.5.2005
    - References: Stroustrup 3rd ed p 661
    - SeeAlso: ldexp, dexp, modf
    -*/
    -void
    -Frexp_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  int y;
    -
    -  *op1 = std::frexp( op1->get(), &y );
    -  i->OStack.push( y );
    -
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: ldexp - computes the product of integer power of 2 and a factor
    - Synopsis: double integer ldexp -> double
    - Description:
    - This is an interface to the C++ function
    - double std::ldexp(double,int)
    - Examples:
    -  1.5 3 ldexp -> 12
    -  12.0 frexp -> 0.75 4
    -  12.0 frexp ldexp -> 12.0
    -  1.0 -5 ldexp frexp -> 0.5 -4
    - Author: Diesmann
    - FirstVersion: 17.5.2005
    - References: Stroustrup 3rd ed p 661
    - SeeAlso: frexp, dexp, modf
    -*/
    -void
    -Ldexp_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  *op1 = std::ldexp( op1->get(), op2->get() );
    -
    -  i->OStack.pop();
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    - Name: dexp - computes an integer power of 2 and returns the result as double
    - Synopsis: integer dexp -> double
    - Description:
    - This is an interface to the C++ expression
    - double std::ldexp(1.0,int)
    - Examples: -5 dexp frexp -> 0.5 -4
    - Author: Diesmann
    - FirstVersion: 17.5.2005
    - References: Stroustrup 3rd ed p 661
    - SeeAlso: frexp, ldexp, modf
    -*/
    -void
    -Dexp_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  double d = std::ldexp( 1.0, op1->get() );
    -
    -  i->OStack.top() = d;
    -  i->EStack.pop();
    -}
    -
    -
    -//----------------------------------
    -
    -/** @BeginDocumentation
    - Name: abs_i - absolute value of integer
    - Synopsis:  integer abs -> integer
    -
    - Description:
    -    implemented by C/C++
    -      long   labs(long) and
    -
    - Examples: -3 abs_i -> 3
    -
    - Remarks: If you are not sure, if the value is of type double or integer, use
    - abs. If e.g. abs_d gets an integer as argument, NEST will exit throwing an
    - assertion.
    - Author: Diesmann
    - FirstVersion: 27.4.1999
    - References: Stroustrup 3rd ed p 661
    - SeeAlso: abs
    - */
    -void
    -Abs_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op = static_cast< IntegerDatum* >( i->OStack.top().datum() );
    -
    -  *op = std::labs( op->get() );
    -}
    -
    -/** @BeginDocumentation
    - Name: abs_d - absolute value of double
    - Synopsis:  double abs -> double
    -
    - Description:
    -    implemented by C/C++
    -      double fabs(double)
    -
    - Examples: -3.456 abs_d -> 3.456
    -
    - Remarks: If you are not sure, if the value is of type double or integer, use
    - abs. If e.g. abs_d gets an integer as argument, NEST will exit throwing an
    - assertion.
    -
    - Author: Diesmann
    - FirstVersion: 27.4.1999
    - References: Stroustrup 3rd ed p 660
    - SeeAlso: abs
    -*/
    -void
    -Abs_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.top().datum() );
    -
    -  *op = std::fabs( op->get() );
    -}
    -
    -
    -/** @BeginDocumentation
    - Name: neg_i - reverse sign of integer value
    - Synopsis:  integer neg -> integer
    - Author: Diesmann
    - FirstVersion: 29.7.1999
    - Remarks:
    -    implemented by C/C++
    -      - operator
    -  This function is called CHS in HP48S and
    -  related dialects.
    -
    - SeeAlso:neg
    -*/
    -void
    -Neg_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op = static_cast< IntegerDatum* >( i->OStack.top().datum() );
    -
    -  *op = -op->get();
    -}
    -
    -/** @BeginDocumentation
    - Name: neg_d - reverse sign of double value
    - Synopsis:   double neg -> double
    - Author: Diesmann
    - FirstVersion: 29.7.1999
    - Remarks:
    -    implemented by C/C++
    -      - operator
    -  This function is called CHS in HP48S and
    -  related dialects.
    -
    - SeeAlso: neg
    -*/
    -void
    -Neg_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.top().datum() );
    -  *op = -op->get();
    -}
    -
    -/** @BeginDocumentation
    -   Name: inv - compute 1/x
    -   Synopsis:   double inv -> double
    -   Examples: 2.0 inv -> 0.5
    -   Author: Gewaltig
    -*/
    -void
    -Inv_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.top().datum() );
    -  if ( not op )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -
    -  *op = 1.0 / op->get();
    -  i->EStack.pop();
    -}
    -
    -
    -/** @BeginDocumentation:
    -Name: eq - Test two objects for equality
    -Synopsis: any1 any2 eq -> bool
    -
    -Description: eq returns true if the two arguments are equal and false
    -otherwise.
    -
    -eq can also be applied to container objecs like arrays, procedures, strings,
    -and dictionaries:
    -* two arrays or strings are equal, if all their components are equal.
    -* two dictionaries are equal, if they represent the same object.
    -SeeAlso: neq, gt, lt, leq, geq
    -*/
    -
    -void
    -EqFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  Datum* op1 = i->OStack.pick( 1 ).datum();
    -  Datum* op2 = i->OStack.pick( 0 ).datum();
    -
    -  bool result = op1->equals( op2 );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -/** @BeginDocumentation:
    -Name: neq - Test two objects for inequality
    -Synopsis: any1 any2 neq -> bool
    -
    -Description: neq returns true if the two arguments are not equal and false
    -otherwise.
    -
    -neq can also be applied to container objecs like arrays, procedures, strings,
    -and dictionaries:
    -* two arrays or strings are equal, if all their components are equal.
    -* two dictionaries are equal, if they represent the same object.
    -SeeAlso: eq, gt, lt, leq, geq
    -*/
    -void
    -NeqFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  Datum* op1 = i->OStack.pick( 1 ).datum();
    -  Datum* op2 = i->OStack.pick( 0 ).datum();
    -
    -  bool result = not op1->equals( op2 );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -/** @BeginDocumentation:
    -Name: geq - Test if one object is greater or equal than another object
    -Synopsis: any1 any2 geq -> bool
    -
    -Description: geq returns true if any1 >= any2 and false
    -otherwise.
    -
    -geq can only be applied to numbers and strings.
    -SeeAlso: eq, neq, gt, lt, leq
    -*/
    -
    -void
    -Geq_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = ( op1->get() >= op2->get() );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Geq_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = ( op1->get() >= op2->get() );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Geq_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = ( op1->get() >= op2->get() );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Geq_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = ( op1->get() >= op2->get() );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -/** @BeginDocumentation:
    -Name: leq - Test if one object is less or equal than another object
    -Synopsis: any1 any2 leq -> bool
    -
    -Description: geq returns true if any1 <= any2 and false
    -otherwise.
    -
    -geq can only be applied to numbers and strings.
    -SeeAlso: eq, neq, gt, lt, geq
    -*/
    -
    -void
    -Leq_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = ( op1->get() <= op2->get() );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Leq_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = ( op1->get() <= op2->get() );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Leq_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = ( op1->get() <= op2->get() );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Leq_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = ( op1->get() <= op2->get() );
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -/** @BeginDocumentation
    -Name: not - logical not operator.
    -Synopsis: bool not -> bool
    -          int  not -> int
    -Description: For booleans, not turns true info false and vice versa.
    -             For integer arguments, not performs a bit-wise not where
    -             1 is replaced by 0 and vice versa.
    -Examples: 1 2 eq not -> true
    -               0 not -> -1
    -SeeAlso: and, or, xor
    -*/
    -
    -void
    -Not_bFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  i->EStack.pop();
    -
    -  BoolDatum* op = static_cast< BoolDatum* >( i->OStack.top().datum() );
    -  op->get() = not op->get();
    -}
    -
    -
    -void
    -Not_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op = static_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  op->get() = ~op->get();
    -}
    -
    -/** @BeginDocumentation
    -Name: or - logical or operator.
    -Synopsis: bool1 bool2 or -> bool
    -          int1  int2  or -> int
    -
    -Description: For booleans, or returns true, if either,
    -             the arguments are true and false
    -             otherwise.
    -             For integers, or performs a bitwise or between the
    -             two arguments.
    -
    -Examples: true  false or -> true
    -          true  true  or -> true
    -          false false or -> false
    -          2     8     or -> 10
    -          1     0     or -> 1
    -SeeAlso: and, or, not
    -*/
    -void
    -OrFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  BoolDatum* op1 = static_cast< BoolDatum* >( i->OStack.pick( 1 ).datum() );
    -  BoolDatum* op2 = static_cast< BoolDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( op1 and op2 );
    -
    -  op1->get() = ( op1->get() or op2->get() );
    -
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: xor - logical xor operator.
    -Synopsis: bool1 bool2 xor -> bool
    -
    -Description: For booleans, xor returns true, if either,
    -             but not both of the arguments are true and false
    -             otherwise.
    -
    -Examples: true  false xor -> true
    -          true  true  xor -> false
    -          false false xor -> false
    -SeeAlso: and, or, not
    -*/
    -
    -void
    -XorFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  BoolDatum* op1 = static_cast< BoolDatum* >( i->OStack.pick( 1 ).datum() );
    -  BoolDatum* op2 = static_cast< BoolDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() = ( ( *op1 or *op2 ) and not( *op1 and *op2 ) );
    -
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: and - logical and operator.
    -Synopsis: bool1 bool2 and -> bool
    -          int1  int2  and -> int
    -Description: For booleans, and returns true if both arguments are true
    -             For integer arguments, and performs a bit-wise and between
    -             the two integers.
    -
    -Examples: true true and -> true
    -          10   24   and -> 8
    -SeeAlso: or, xor, not
    -*/
    -
    -
    -void
    -AndFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  BoolDatum* op1 = static_cast< BoolDatum* >( i->OStack.pick( 1 ).datum() );
    -  BoolDatum* op2 = static_cast< BoolDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() = ( *op1 and *op2 );
    -
    -  i->OStack.pop();
    -}
    -
    -void
    -And_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() = op1->get() & op2->get();
    -  i->OStack.pop();
    -}
    -
    -void
    -Or_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  op1->get() = op1->get() | op2->get();
    -  i->OStack.pop();
    -}
    -
    -//---------------------------------------------------
    -/** @BeginDocumentation:
    -Name: gt - Test if one object is greater than another object
    -Synopsis: any1 any2 gt -> bool
    -
    -Description: gt returns true if any1 > any2 and false
    -otherwise.
    -
    -gt can only be applied to numbers and strings.
    -SeeAlso: eq, neq, gt, lt, leq
    -*/
    -void
    -Gt_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: integer double gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = *op1 > *op2;
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Gt_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: double integer gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  bool result = *op1 > *op2;
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -
    -void
    -Gt_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: integer integer gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( op1 and op2 );
    -
    -  bool result = op1->get() > op2->get();
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Gt_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: double double gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( op1 and op2 );
    -
    -  bool result = op1->get() > op2->get();
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -
    -void
    -Gt_ssFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string string gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  StringDatum* op1 = static_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum* op2 = static_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( op1 and op2 );
    -
    -  bool result = *op1 > *op2;
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -//----
    -/** @BeginDocumentation:
    -Name: lt - Test if one object is less than another object
    -Synopsis: any1 any2 lt -> bool
    -
    -Description: lt returns true if any1 < any2 and false
    -otherwise.
    -
    -lt can only be applied to numbers and strings.
    -SeeAlso: eq, neq, gt, lt, leq
    -*/
    -void
    -Lt_idFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: integer double gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( op1 and op2 );
    -
    -  bool result = op1->get() < op2->get();
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Lt_diFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: double integer gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( op1 and op2 );
    -
    -  bool result = op1->get() < op2->get();
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -
    -void
    -Lt_iiFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: integer integer gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( op1 and op2 );
    -
    -  bool result = op1->get() < op2->get();
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -void
    -Lt_ddFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: double double gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( op1 and op2 );
    -
    -  bool result = op1->get() < op2->get();
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -
    -void
    -Lt_ssFunction::execute( SLIInterpreter* i ) const
    -{
    -  // call: string string gt bool
    -  assert( i->OStack.load() > 1 );
    -  i->EStack.pop();
    -
    -  StringDatum* op1 = static_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -  StringDatum* op2 = static_cast< StringDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( op1 and op2 );
    -
    -  bool result = *op1 < *op2;
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_by_pointer( new BoolDatum( result ) );
    -}
    -
    -
    -// Documentation can be found in file synod2/lib/sli/mathematica.sli
    -void
    -UnitStep_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* x = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  bool result = x->get() >= 0.0;
    -
    -
    -  i->EStack.pop();
    -  i->OStack.pop();
    -  if ( result )
    -  {
    -    i->OStack.push_by_pointer( new DoubleDatum( 1.0 ) );
    -  }
    -  else
    -  {
    -    i->OStack.push_by_pointer( new DoubleDatum( 0.0 ) );
    -  }
    -}
    -
    -// Documentation can be found in file synod2/lib/sli/mathematica.sli
    -void
    -UnitStep_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  IntegerDatum* x = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( x );
    -
    -  bool result = x->get() >= 0;
    -
    -
    -  i->EStack.pop();
    -  i->OStack.pop();
    -  if ( result )
    -  {
    -    i->OStack.push_by_pointer( new IntegerDatum( 1.0 ) );
    -  }
    -  else
    -  {
    -    i->OStack.push_by_pointer( new IntegerDatum( 0.0 ) );
    -  }
    -}
    -
    -// Documentation can be found in file synod2/lib/sli/mathematica.sli
    -void
    -UnitStep_daFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  TokenArray* a = dynamic_cast< TokenArray* >( i->OStack.pick( 0 ).datum() );
    -  assert( a );
    -
    -  bool result = true;
    -
    -  for ( size_t j = 0; j < a->size(); ++j )
    -  {
    -    DoubleDatum* x = static_cast< DoubleDatum* >( ( *a )[ j ].datum() );
    -    assert( x );
    -    if ( x->get() < 0.0 )
    -    {
    -      result = false;
    -      break;
    -    }
    -  }
    -
    -  i->EStack.pop();
    -  i->OStack.pop();
    -  if ( result )
    -  {
    -    i->OStack.push_by_pointer( new DoubleDatum( 1.0 ) );
    -  }
    -  else
    -  {
    -    i->OStack.push_by_pointer( new DoubleDatum( 0.0 ) );
    -  }
    -}
    -
    -// Documentation can be found in file synod2/lib/sli/mathematica.sli
    -void
    -UnitStep_iaFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  TokenArray* a = dynamic_cast< TokenArray* >( i->OStack.pick( 0 ).datum() );
    -  assert( a );
    -
    -  bool result = true;
    -
    -  for ( size_t j = 0; j < a->size(); ++j )
    -  {
    -    IntegerDatum* x = static_cast< IntegerDatum* >( ( *a )[ j ].datum() );
    -    assert( x );
    -    if ( x->get() < 0 )
    -    {
    -      result = false;
    -      break;
    -    }
    -  }
    -
    -  i->EStack.pop();
    -  i->OStack.pop();
    -  if ( result )
    -  {
    -    i->OStack.push_by_pointer( new IntegerDatum( 1.0 ) );
    -  }
    -  else
    -  {
    -    i->OStack.push_by_pointer( new IntegerDatum( 0.0 ) );
    -  }
    -}
    -
    -// round to the nearest integer
    -void
    -Round_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  *op = std::floor( op->get() + 0.5 );
    -  i->EStack.pop();
    -}
    -
    -// Documentation can be found in file synod2/lib/sli/mathematica.sli
    -void
    -Floor_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  *op = std::floor( op->get() );
    -  i->EStack.pop();
    -}
    -
    -// Documentation can be found in file synod2/lib/sli/mathematica.sli
    -void
    -Ceil_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 1 );
    -
    -  DoubleDatum* op = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  *op = std::ceil( op->get() );
    -  i->EStack.pop();
    -}
    -
    -
    -// Documentation can be found in file synod2/lib/sli/typeinit.sli
    -void
    -Max_i_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op1->get() < op2->get() )
    -  {
    -    i->OStack.swap();
    -  }
    -
    -  i->OStack.pop();
    -}
    -void
    -Max_i_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op1->get() < op2->get() )
    -  {
    -    i->OStack.swap();
    -  }
    -
    -  i->OStack.pop();
    -}
    -void
    -Max_d_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op1->get() < op2->get() )
    -  {
    -    i->OStack.swap();
    -  }
    -
    -  i->OStack.pop();
    -}
    -void
    -Max_d_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op1->get() < op2->get() )
    -  {
    -    i->OStack.swap();
    -  }
    -
    -  i->OStack.pop();
    -}
    -
    -
    -// Documentation can be found in file synod2/lib/sli/typeinit.sli
    -void
    -Min_i_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op1->get() > op2->get() )
    -  {
    -    i->OStack.swap();
    -  }
    -
    -  i->OStack.pop();
    -}
    -void
    -Min_i_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  IntegerDatum* op1 = static_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op1->get() > op2->get() )
    -  {
    -    i->OStack.swap();
    -  }
    -
    -  i->OStack.pop();
    -}
    -void
    -Min_d_iFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* op2 = static_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op1->get() > op2->get() )
    -  {
    -    i->OStack.swap();
    -  }
    -
    -  i->OStack.pop();
    -}
    -void
    -Min_d_dFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -  i->EStack.pop();
    -
    -  DoubleDatum* op1 = static_cast< DoubleDatum* >( i->OStack.pick( 1 ).datum() );
    -  DoubleDatum* op2 = static_cast< DoubleDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  if ( op1->get() > op2->get() )
    -  {
    -    i->OStack.swap();
    -  }
    -
    -  i->OStack.pop();
    -}
    -
    -
    -const IntegerFunction integerfunction;
    -const DoubleFunction doublefunction;
    -const Add_ddFunction add_ddfunction;
    -const Add_diFunction add_difunction;
    -const Add_idFunction add_idfunction;
    -const Add_iiFunction add_iifunction;
    -const Sub_ddFunction sub_ddfunction;
    -const Sub_diFunction sub_difunction;
    -const Sub_idFunction sub_idfunction;
    -const Sub_iiFunction sub_iifunction;
    -
    -const Mul_ddFunction mul_ddfunction;
    -const Mul_diFunction mul_difunction;
    -const Mul_idFunction mul_idfunction;
    -const Mul_iiFunction mul_iifunction;
    -const Div_ddFunction div_ddfunction;
    -const Div_diFunction div_difunction;
    -const Div_idFunction div_idfunction;
    -const Div_iiFunction div_iifunction;
    -const Sin_dFunction sin_dfunction;
    -const Asin_dFunction asin_dfunction;
    -const Cos_dFunction cos_dfunction;
    -const Acos_dFunction acos_dfunction;
    -const Exp_dFunction exp_dfunction;
    -const Ln_dFunction ln_dfunction;
    -const Log_dFunction log_dfunction;
    -const Sqr_dFunction sqr_dfunction;
    -const Sqrt_dFunction sqrt_dfunction;
    -const Pow_ddFunction pow_ddfunction;
    -const Pow_diFunction pow_difunction;
    -
    -const Modf_dFunction modf_dfunction;
    -const Frexp_dFunction frexp_dfunction;
    -
    -const Ldexp_diFunction ldexp_difunction;
    -const Dexp_iFunction dexp_ifunction;
    -
    -const Mod_iiFunction mod_iifunction;
    -
    -const Abs_iFunction abs_ifunction;
    -const Abs_dFunction abs_dfunction;
    -
    -const Neg_iFunction neg_ifunction;
    -const Neg_dFunction neg_dfunction;
    -const Inv_dFunction inv_dfunction;
    -
    -const EqFunction eqfunction;
    -const OrFunction orfunction;
    -const XorFunction xorfunction;
    -const AndFunction andfunction;
    -const And_iiFunction and_iifunction;
    -const Or_iiFunction or_iifunction;
    -
    -const Geq_iiFunction geq_iifunction;
    -const Geq_idFunction geq_idfunction;
    -const Geq_diFunction geq_difunction;
    -const Geq_ddFunction geq_ddfunction;
    -
    -const Leq_iiFunction leq_iifunction;
    -const Leq_idFunction leq_idfunction;
    -const Leq_diFunction leq_difunction;
    -const Leq_ddFunction leq_ddfunction;
    -
    -
    -const NeqFunction neqfunction;
    -const Not_bFunction not_bfunction;
    -const Not_iFunction not_ifunction;
    -
    -const Gt_iiFunction gt_iifunction;
    -const Gt_ddFunction gt_ddfunction;
    -const Gt_idFunction gt_idfunction;
    -const Gt_diFunction gt_difunction;
    -const Gt_ssFunction gt_ssfunction;
    -
    -const Lt_iiFunction lt_iifunction;
    -const Lt_ddFunction lt_ddfunction;
    -const Lt_idFunction lt_idfunction;
    -const Lt_diFunction lt_difunction;
    -const Lt_ssFunction lt_ssfunction;
    -
    -const UnitStep_iFunction unitstep_ifunction;
    -const UnitStep_dFunction unitstep_dfunction;
    -const UnitStep_iaFunction unitstep_iafunction;
    -const UnitStep_daFunction unitstep_dafunction;
    -
    -const Round_dFunction round_dfunction;
    -const Floor_dFunction floor_dfunction;
    -const Ceil_dFunction ceil_dfunction;
    -
    -const Max_d_dFunction max_d_dfunction;
    -const Max_d_iFunction max_d_ifunction;
    -const Max_i_dFunction max_i_dfunction;
    -const Max_i_iFunction max_i_ifunction;
    -
    -const Min_d_dFunction min_d_dfunction;
    -const Min_d_iFunction min_d_ifunction;
    -const Min_i_dFunction min_i_dfunction;
    -const Min_i_iFunction min_i_ifunction;
    -
    -
    -void
    -init_slimath( SLIInterpreter* i )
    -{
    -  i->createcommand( "int_d", &integerfunction );
    -  i->createcommand( "double_i", &doublefunction );
    -  i->createcommand( "add_dd", &add_ddfunction );
    -  i->createcommand( "add_di", &add_difunction );
    -  i->createcommand( "add_id", &add_idfunction );
    -  i->createcommand( "add_ii", &add_iifunction );
    -  //
    -  i->createcommand( "sub_dd", &sub_ddfunction );
    -  i->createcommand( "sub_di", &sub_difunction );
    -  i->createcommand( "sub_id", &sub_idfunction );
    -  i->createcommand( "sub_ii", &sub_iifunction );
    -  //
    -  i->createcommand( "mul_dd", &mul_ddfunction );
    -  i->createcommand( "mul_di", &mul_difunction );
    -  i->createcommand( "mul_id", &mul_idfunction );
    -  i->createcommand( "mul_ii", &mul_iifunction );
    -  //
    -  i->createcommand( "div_dd", &div_ddfunction );
    -  i->createcommand( "div_di", &div_difunction );
    -  i->createcommand( "div_id", &div_idfunction );
    -  i->createcommand( "div_ii", &div_iifunction );
    -  i->createcommand( "mod", &mod_iifunction );
    -  //
    -  i->createcommand( "sin_d", &sin_dfunction );
    -  i->createcommand( "asin_d", &asin_dfunction );
    -  i->createcommand( "cos_d", &cos_dfunction );
    -  i->createcommand( "acos_d", &acos_dfunction );
    -  i->createcommand( "exp_d", &exp_dfunction );
    -  i->createcommand( "log_d", &log_dfunction );
    -  i->createcommand( "ln_d", &ln_dfunction );
    -  i->createcommand( "sqr_d", &sqr_dfunction );
    -  i->createcommand( "sqrt_d", &sqrt_dfunction );
    -  i->createcommand( "pow_dd", &pow_ddfunction );
    -  i->createcommand( "pow_di", &pow_difunction );
    -  //
    -
    -  i->createcommand( "modf_d", &modf_dfunction );
    -  i->createcommand( "frexp_d", &frexp_dfunction );
    -  //
    -  i->createcommand( "ldexp_di", &ldexp_difunction );
    -  i->createcommand( "dexp_i", &dexp_ifunction );
    -  //
    -  i->createcommand( "abs_i", &abs_ifunction );
    -  i->createcommand( "abs_d", &abs_dfunction );
    -  //
    -  i->createcommand( "neg_i", &neg_ifunction );
    -  i->createcommand( "neg_d", &neg_dfunction );
    -  i->createcommand( "inv", &inv_dfunction );
    -  //
    -  i->createcommand( "eq", &eqfunction );
    -  i->createcommand( "and", &andfunction );
    -  i->createcommand( "and_ii", &and_iifunction );
    -  i->createcommand( "or_ii", &or_iifunction );
    -  i->createcommand( "or", &orfunction );
    -  i->createcommand( "xor", &xorfunction );
    -
    -  i->createcommand( "leq_ii", &leq_iifunction );
    -  i->createcommand( "leq_id", &leq_idfunction );
    -  i->createcommand( "leq_di", &leq_difunction );
    -  i->createcommand( "leq_dd", &leq_ddfunction );
    -
    -  i->createcommand( "geq_ii", &geq_iifunction );
    -  i->createcommand( "geq_id", &geq_idfunction );
    -  i->createcommand( "geq_di", &geq_difunction );
    -  i->createcommand( "geq_dd", &geq_ddfunction );
    -
    -  i->createcommand( "neq", &neqfunction );
    -  i->createcommand( "not_b", &not_bfunction );
    -  i->createcommand( "not_i", &not_ifunction );
    -  //
    -  i->createcommand( "gt_ii", &gt_iifunction );
    -  i->createcommand( "gt_dd", &gt_ddfunction );
    -  i->createcommand( "gt_id", &gt_idfunction );
    -  i->createcommand( "gt_di", &gt_difunction );
    -  i->createcommand( "gt_ss", &gt_ssfunction );
    -  //
    -  i->createcommand( "lt_ii", &lt_iifunction );
    -  i->createcommand( "lt_dd", &lt_ddfunction );
    -  i->createcommand( "lt_id", &lt_idfunction );
    -  i->createcommand( "lt_di", &lt_difunction );
    -  i->createcommand( "lt_ss", &lt_ssfunction );
    -  //
    -  i->createcommand( "UnitStep_i", &unitstep_ifunction );
    -  i->createcommand( "UnitStep_d", &unitstep_dfunction );
    -  i->createcommand( "UnitStep_ia", &unitstep_iafunction );
    -  i->createcommand( "UnitStep_da", &unitstep_dafunction );
    -  //
    -  i->createcommand( "round_d", &round_dfunction );
    -  i->createcommand( "floor_d", &floor_dfunction );
    -  i->createcommand( "ceil_d", &ceil_dfunction );
    -  //
    -  i->createcommand( "max_d_d", &max_d_dfunction );
    -  i->createcommand( "max_d_i", &max_d_ifunction );
    -  i->createcommand( "max_i_d", &max_i_dfunction );
    -  i->createcommand( "max_i_i", &max_i_ifunction );
    -  //
    -  i->createcommand( "min_d_d", &min_d_dfunction );
    -  i->createcommand( "min_d_i", &min_d_ifunction );
    -  i->createcommand( "min_i_d", &min_i_dfunction );
    -  i->createcommand( "min_i_i", &min_i_ifunction );
    -}
    diff --git a/sli/slimath.h b/sli/slimath.h
    deleted file mode 100644
    index 054f0cc3d5..0000000000
    --- a/sli/slimath.h
    +++ /dev/null
    @@ -1,848 +0,0 @@
    -/*
    - *  slimath.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIMATH_H
    -#define SLIMATH_H
    -/*
    -    SLI's math operators
    -*/
    -
    -// Includes from sli:
    -#include "interpret.h"
    -
    -void init_slimath( SLIInterpreter* );
    -
    -class Add_diFunction : public SLIFunction
    -{
    -public:
    -  Add_diFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Add_iiFunction : public SLIFunction
    -{
    -public:
    -  Add_iiFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Add_idFunction : public SLIFunction
    -{
    -public:
    -  Add_idFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Add_ddFunction : public SLIFunction
    -{
    -public:
    -  Add_ddFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -//---------------------------------------
    -
    -class Sub_diFunction : public SLIFunction
    -{
    -public:
    -  Sub_diFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Sub_iiFunction : public SLIFunction
    -{
    -public:
    -  Sub_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Sub_idFunction : public SLIFunction
    -{
    -public:
    -  Sub_idFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Sub_ddFunction : public SLIFunction
    -{
    -public:
    -  Sub_ddFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -//---------------------------------------
    -
    -class Mul_diFunction : public SLIFunction
    -{
    -public:
    -  Mul_diFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Mul_iiFunction : public SLIFunction
    -{
    -public:
    -  Mul_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Mul_idFunction : public SLIFunction
    -{
    -public:
    -  Mul_idFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Mul_ddFunction : public SLIFunction
    -{
    -public:
    -  Mul_ddFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -//---------------------------------------
    -
    -class Div_diFunction : public SLIFunction
    -{
    -public:
    -  Div_diFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Div_iiFunction : public SLIFunction
    -{
    -public:
    -  Div_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Div_idFunction : public SLIFunction
    -{
    -public:
    -  Div_idFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Div_ddFunction : public SLIFunction
    -{
    -public:
    -  Div_ddFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -//--------------------------------------
    -
    -class Mod_iiFunction : public SLIFunction
    -{
    -public:
    -  Mod_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -//--------------------------------------
    -
    -
    -class Sin_dFunction : public SLIFunction
    -{
    -public:
    -  Sin_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Asin_dFunction : public SLIFunction
    -{
    -public:
    -  Asin_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cos_dFunction : public SLIFunction
    -{
    -public:
    -  Cos_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Acos_dFunction : public SLIFunction
    -{
    -public:
    -  Acos_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Exp_dFunction : public SLIFunction
    -{
    -public:
    -  Exp_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Ln_dFunction : public SLIFunction
    -{
    -public:
    -  Ln_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Log_dFunction : public SLIFunction
    -{
    -public:
    -  Log_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Sqr_dFunction : public SLIFunction
    -{
    -public:
    -  Sqr_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Sqrt_dFunction : public SLIFunction
    -{
    -public:
    -  Sqrt_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Pow_ddFunction : public SLIFunction
    -{
    -public:
    -  Pow_ddFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Pow_diFunction : public SLIFunction
    -{
    -public:
    -  Pow_diFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Modf_dFunction : public SLIFunction
    -{
    -public:
    -  Modf_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Frexp_dFunction : public SLIFunction
    -{
    -public:
    -  Frexp_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Ldexp_diFunction : public SLIFunction
    -{
    -public:
    -  Ldexp_diFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -class Dexp_iFunction : public SLIFunction
    -{
    -public:
    -  Dexp_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -//--------------------------------------
    -class Abs_iFunction : public SLIFunction
    -{
    -public:
    -  Abs_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Abs_dFunction : public SLIFunction
    -{
    -public:
    -  Abs_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -//--------------------------------------
    -
    -class Neg_iFunction : public SLIFunction
    -{
    -public:
    -  Neg_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Neg_dFunction : public SLIFunction
    -{
    -public:
    -  Neg_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Inv_dFunction : public SLIFunction
    -{
    -public:
    -  Inv_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -//-------------------------
    -
    -class EqFunction : public SLIFunction
    -{
    -public:
    -  EqFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class NeqFunction : public SLIFunction
    -{
    -public:
    -  NeqFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class AndFunction : public SLIFunction
    -{
    -public:
    -  AndFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OrFunction : public SLIFunction
    -{
    -public:
    -  OrFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class And_iiFunction : public SLIFunction
    -{
    -public:
    -  And_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Or_iiFunction : public SLIFunction
    -{
    -public:
    -  Or_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class XorFunction : public SLIFunction
    -{
    -public:
    -  XorFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Not_bFunction : public SLIFunction
    -{
    -public:
    -  Not_bFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Not_iFunction : public SLIFunction
    -{
    -public:
    -  Not_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Geq_iiFunction : public SLIFunction
    -{
    -public:
    -  Geq_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Geq_idFunction : public SLIFunction
    -{
    -public:
    -  Geq_idFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Geq_diFunction : public SLIFunction
    -{
    -public:
    -  Geq_diFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Geq_ddFunction : public SLIFunction
    -{
    -public:
    -  Geq_ddFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Leq_iiFunction : public SLIFunction
    -{
    -public:
    -  Leq_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Leq_idFunction : public SLIFunction
    -{
    -public:
    -  Leq_idFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Leq_diFunction : public SLIFunction
    -{
    -public:
    -  Leq_diFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Leq_ddFunction : public SLIFunction
    -{
    -public:
    -  Leq_ddFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -//-------------------------
    -
    -class Gt_iiFunction : public SLIFunction
    -{
    -public:
    -  Gt_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Gt_ddFunction : public SLIFunction
    -{
    -public:
    -  Gt_ddFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Gt_idFunction : public SLIFunction
    -{
    -public:
    -  Gt_idFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Gt_diFunction : public SLIFunction
    -{
    -public:
    -  Gt_diFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Gt_ssFunction : public SLIFunction
    -{
    -public:
    -  Gt_ssFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Lt_iiFunction : public SLIFunction
    -{
    -public:
    -  Lt_iiFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Lt_ddFunction : public SLIFunction
    -{
    -public:
    -  Lt_ddFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Lt_idFunction : public SLIFunction
    -{
    -public:
    -  Lt_idFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Lt_diFunction : public SLIFunction
    -{
    -public:
    -  Lt_diFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Lt_ssFunction : public SLIFunction
    -{
    -public:
    -  Lt_ssFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IntegerFunction : public SLIFunction
    -{
    -public:
    -  IntegerFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DoubleFunction : public SLIFunction
    -{
    -public:
    -  DoubleFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class UnitStep_iFunction : public SLIFunction
    -{
    -public:
    -  UnitStep_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class UnitStep_dFunction : public SLIFunction
    -{
    -public:
    -  UnitStep_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class UnitStep_iaFunction : public SLIFunction
    -{
    -public:
    -  UnitStep_iaFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class UnitStep_daFunction : public SLIFunction
    -{
    -public:
    -  UnitStep_daFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Round_dFunction : public SLIFunction
    -{
    -public:
    -  Round_dFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Floor_dFunction : public SLIFunction
    -{
    -public:
    -  Floor_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Ceil_dFunction : public SLIFunction
    -{
    -public:
    -  Ceil_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -class Max_i_iFunction : public SLIFunction
    -{
    -public:
    -  Max_i_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Max_i_dFunction : public SLIFunction
    -{
    -public:
    -  Max_i_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Max_d_iFunction : public SLIFunction
    -{
    -public:
    -  Max_d_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Max_d_dFunction : public SLIFunction
    -{
    -public:
    -  Max_d_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -class Min_i_iFunction : public SLIFunction
    -{
    -public:
    -  Min_i_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Min_i_dFunction : public SLIFunction
    -{
    -public:
    -  Min_i_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Min_d_iFunction : public SLIFunction
    -{
    -public:
    -  Min_d_iFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -class Min_d_dFunction : public SLIFunction
    -{
    -public:
    -  Min_d_dFunction()
    -  {
    -  }
    -
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -#endif
    diff --git a/sli/slimodule.cc b/sli/slimodule.cc
    deleted file mode 100644
    index e96c540fb3..0000000000
    --- a/sli/slimodule.cc
    +++ /dev/null
    @@ -1,41 +0,0 @@
    -/*
    - *  slimodule.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "slimodule.h"
    -
    -// Includes from sli:
    -#include "interpret.h"
    -
    -void
    -SLIModule::install( std::ostream&, SLIInterpreter* i )
    -{
    -  // Output stream is now set by the message level.
    -  // i->message(out, 5, name().c_str(), "Initializing.");
    -  i->message( 5, name().c_str(), "Initializing." );
    -  init( i );
    -}
    -
    -const std::string
    -SLIModule::commandstring() const
    -{
    -  return std::string();
    -}
    diff --git a/sli/slimodule.h b/sli/slimodule.h
    deleted file mode 100644
    index 54d6caaa01..0000000000
    --- a/sli/slimodule.h
    +++ /dev/null
    @@ -1,66 +0,0 @@
    -/*
    - *  slimodule.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIMODULE_H
    -#define SLIMODULE_H
    -
    -// C++ includes:
    -#include <iostream>
    -#include <string>
    -
    -class SLIInterpreter;
    -class Dictionary;
    -
    -/**
    - * Base class for all SLI Interpreter modules.
    - */
    -class SLIModule
    -{
    -public:
    -  virtual ~SLIModule() {};
    -
    -  /**
    -   * Initialize the module.
    -   * When this function is called, most of the
    -   * interpreter's facilities are up and running.
    -   * However, depending on where in the interpreter's
    -   * bootstrap sequence the module is initialized, not
    -   * all services may be available.
    -   */
    -  virtual void init( SLIInterpreter* ) = 0;
    -
    -  /**
    -   * Return name of the module.
    -   */
    -  virtual const std::string name() const = 0;
    -
    -  /**
    -   * Return sli command sequence to be executed for initialization.
    -   */
    -  virtual const std::string commandstring() const;
    -
    -  /**
    -   * Print installation message via interpreter message command.
    -   */
    -  void install( std::ostream&, SLIInterpreter* );
    -};
    -#endif
    diff --git a/sli/slinames.cpp b/sli/slinames.cpp
    deleted file mode 100644
    index 03a5a7689a..0000000000
    --- a/sli/slinames.cpp
    +++ /dev/null
    @@ -1,32 +0,0 @@
    -/*
    - *  slinames.cpp
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "slinames.h"
    -
    -Name sli::any( "anytype" );
    -Name sli::object( "trie:object" );
    -Name sli::imap( "::Map" );
    -Name sli::imap_dv( "::Map_dv" );
    -Name sli::imap_iv( "::Map_iv" );
    -Name sli::imapindexed( "::MapIndexed" );
    -Name sli::iforall_iv( "::forall_iv" );
    -Name sli::iforall_dv( "::forall_dv" );
    diff --git a/sli/slinames.h b/sli/slinames.h
    deleted file mode 100644
    index 5749392a42..0000000000
    --- a/sli/slinames.h
    +++ /dev/null
    @@ -1,41 +0,0 @@
    -/*
    - *  slinames.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLINAMES_H
    -#define SLINAMES_H
    -
    -// Includes from sli:
    -#include "name.h"
    -
    -namespace sli
    -{
    -extern Name any;
    -extern Name object;
    -extern Name imap;
    -extern Name imap_iv;
    -extern Name imap_dv;
    -extern Name iforall_iv;
    -extern Name iforall_dv;
    -extern Name imapindexed;
    -}
    -
    -#endif
    diff --git a/sli/sliregexp.cc b/sli/sliregexp.cc
    deleted file mode 100644
    index eaab356add..0000000000
    --- a/sli/sliregexp.cc
    +++ /dev/null
    @@ -1,214 +0,0 @@
    -/*
    - *  sliregexp.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "sliregexp.h"
    -
    -// C includes:
    -#include <regex.h>
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "dictdatum.h"
    -#include "integerdatum.h"
    -#include "lockptrdatum.h"
    -#include "stringdatum.h"
    -
    -
    -SLIType RegexpModule::RegexType;
    -
    -typedef lockPTRDatum< Regex, &RegexpModule::RegexType > RegexDatum;
    -
    -Regex::Regex()
    -{
    -}
    -
    -Regex::~Regex()
    -{
    -  regfree( &r );
    -}
    -
    -regex_t*
    -Regex::get()
    -{
    -  return &r;
    -}
    -
    -
    -RegexpModule::~RegexpModule()
    -{
    -  RegexType.deletetypename();
    -}
    -
    -void
    -RegexpModule::init( SLIInterpreter* i )
    -{
    -  Dictionary* regexdict = new Dictionary;
    -
    -  regexdict->insert( REG_NOTBOL_name, new IntegerDatum( REG_NOTBOL ) );
    -  regexdict->insert( REG_NOTEOL_name, new IntegerDatum( REG_NOTEOL ) );
    -  regexdict->insert( REG_ESPACE_name, new IntegerDatum( REG_ESPACE ) );
    -  regexdict->insert( REG_BADPAT_name, new IntegerDatum( REG_BADPAT ) );
    -  regexdict->insert( REG_EXTENDED_name, new IntegerDatum( REG_EXTENDED ) );
    -  regexdict->insert( REG_ICASE_name, new IntegerDatum( REG_ICASE ) );
    -  regexdict->insert( REG_NOSUB_name, new IntegerDatum( REG_NOSUB ) );
    -  regexdict->insert( REG_NEWLINE_name, new IntegerDatum( REG_NEWLINE ) );
    -  regexdict->insert( REG_ECOLLATE_name, new IntegerDatum( REG_ECOLLATE ) );
    -  regexdict->insert( REG_ECTYPE_name, new IntegerDatum( REG_ECTYPE ) );
    -  regexdict->insert( REG_EESCAPE_name, new IntegerDatum( REG_EESCAPE ) );
    -  regexdict->insert( REG_ESUBREG_name, new IntegerDatum( REG_ESUBREG ) );
    -  regexdict->insert( REG_EBRACK_name, new IntegerDatum( REG_EBRACK ) );
    -  regexdict->insert( REG_EPAREN_name, new IntegerDatum( REG_EPAREN ) );
    -  regexdict->insert( REG_EBRACE_name, new IntegerDatum( REG_EBRACE ) );
    -  regexdict->insert( REG_BADBR_name, new IntegerDatum( REG_BADBR ) );
    -  regexdict->insert( REG_ERANGE_name, new IntegerDatum( REG_ERANGE ) );
    -  regexdict->insert( REG_BADRPT_name, new IntegerDatum( REG_BADRPT ) );
    -
    -  i->def( regexdict_name, new DictionaryDatum( regexdict ) );
    -
    -  RegexType.settypename( "regextype" );
    -  RegexType.setdefaultaction( SLIInterpreter::datatypefunction );
    -
    -  i->createcommand( "regcomp_", &regcompfunction );
    -  i->createcommand( "regexec_", &regexecfunction );
    -  i->createcommand( "regerror_", &regerrorfunction );
    -}
    -
    -
    -const std::string
    -RegexpModule::name() const
    -{
    -  return std::string( "POSIX-Regexp" );
    -}
    -
    -const std::string
    -RegexpModule::commandstring() const
    -{
    -  return std::string( "(regexp) run" );
    -}
    -
    -
    -void
    -RegexpModule::RegcompFunction::execute( SLIInterpreter* i ) const
    -{
    -  // string integer regcomp -> Regex true
    -  //                           Regex integer false
    -  assert( i->OStack.load() >= 2 );
    -
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  assert( sd );
    -  assert( id );
    -
    -
    -  Regex* MyRegex = new Regex;
    -  int e = regcomp( MyRegex->get(), sd->c_str(), id->get() );
    -  i->OStack.pop( 2 );
    -  Token rt( new RegexDatum( MyRegex ) );
    -  i->OStack.push_move( rt );
    -  if ( not e )
    -  {
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    Token it( new IntegerDatum( e ) );
    -    i->OStack.push_move( it );
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -  i->EStack.pop();
    -}
    -
    -void
    -RegexpModule::RegerrorFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.load() >= 2 );
    -
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -  RegexDatum* rd = dynamic_cast< RegexDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  assert( rd );
    -  assert( id );
    -
    -  char* error_buffer = new char[ 256 ];
    -  regerror( id->get(), rd->get()->get(), error_buffer, 256 );
    -  Token sd( new StringDatum( error_buffer ) );
    -  delete[]( error_buffer );
    -
    -  // The lockPTR rd gets locked when calling the get() function.
    -  // In order to be able to use (delete) this object we need to
    -  // unlock it again.
    -  rd->unlock();
    -
    -  i->OStack.pop( 2 );
    -  i->OStack.push_move( sd );
    -  i->EStack.pop();
    -}
    -
    -void
    -RegexpModule::RegexecFunction::execute( SLIInterpreter* i ) const
    -{
    -  // regex string integer integer regexec -> array integer
    -  // regex string 0       integer regexec -> integer
    -
    -  assert( i->OStack.load() >= 4 );
    -
    -  RegexDatum* rd = dynamic_cast< RegexDatum* >( i->OStack.pick( 3 ).datum() );
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.pick( 2 ).datum() );
    -  IntegerDatum* sized = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  IntegerDatum* eflagsd = dynamic_cast< IntegerDatum* >( i->OStack.pick( 0 ).datum() );
    -
    -  assert( rd );
    -  assert( sd );
    -  assert( sized );
    -  assert( eflagsd );
    -
    -  int size = sized->get();
    -  regmatch_t* pm = new regmatch_t[ size ];
    -
    -  Regex* r = rd->get();
    -  assert( r );
    -  rd->unlock();
    -
    -  int e = regexec( r->get(), sd->c_str(), size, pm, eflagsd->get() );
    -  Token id( new IntegerDatum( e ) );
    -  i->OStack.pop( 4 );
    -  if ( size )
    -  {
    -    ArrayDatum* PushArray = new ArrayDatum();
    -    for ( int k = 0; k <= ( size - 1 ); k++ )
    -    {
    -      ArrayDatum* ThisEntry = new ArrayDatum();
    -      Token so( new IntegerDatum( pm[ k ].rm_so ) );
    -      ThisEntry->push_back_move( so );
    -      Token eo( new IntegerDatum( pm[ k ].rm_eo ) );
    -      ThisEntry->push_back_move( eo );
    -      Token entry_token( ThisEntry );
    -      PushArray->push_back_move( entry_token );
    -    };
    -    Token array_token( PushArray );
    -    i->OStack.push_move( array_token );
    -  };
    -  delete[]( pm );
    -  i->OStack.push_move( id );
    -  i->EStack.pop();
    -}
    diff --git a/sli/sliregexp.h b/sli/sliregexp.h
    deleted file mode 100644
    index a8afd1757f..0000000000
    --- a/sli/sliregexp.h
    +++ /dev/null
    @@ -1,124 +0,0 @@
    -/*
    - *  sliregexp.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLIREGEXP_H
    -#define SLIREGEXP_H
    -/*
    -    SLI's array access functions
    -*/
    -
    -// C includes:
    -#include <regex.h>
    -#include <sys/types.h>
    -
    -// Includes from sli:
    -#include "lockptrdatum.h"
    -#include "slifunction.h"
    -#include "slimodule.h"
    -
    -class Regex
    -{
    -  regex_t r;
    -
    -public:
    -  Regex();
    -  ~Regex();
    -  regex_t* get();
    -};
    -
    -class RegexpModule : public SLIModule
    -{
    -  class RegcompFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class RegexecFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class RegerrorFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -public:
    -  RegcompFunction regcompfunction;
    -  RegexecFunction regexecfunction;
    -  RegerrorFunction regerrorfunction;
    -
    -  const Name regexdict_name;
    -
    -  const Name REG_NOTBOL_name;
    -  const Name REG_NOTEOL_name;
    -  const Name REG_ESPACE_name;
    -  const Name REG_BADPAT_name;
    -  const Name REG_EXTENDED_name;
    -  const Name REG_ICASE_name;
    -  const Name REG_NOSUB_name;
    -  const Name REG_NEWLINE_name;
    -  const Name REG_ECOLLATE_name;
    -  const Name REG_ECTYPE_name;
    -  const Name REG_EESCAPE_name;
    -  const Name REG_ESUBREG_name;
    -  const Name REG_EBRACK_name;
    -  const Name REG_EPAREN_name;
    -  const Name REG_EBRACE_name;
    -  const Name REG_BADBR_name;
    -  const Name REG_ERANGE_name;
    -  const Name REG_BADRPT_name;
    -
    -  static SLIType RegexType;
    -
    -  RegexpModule()
    -    : regexdict_name( "regexdict" )
    -    , REG_NOTBOL_name( "REG_NOTBOL" )
    -    , REG_NOTEOL_name( "REG_NOTEOL" )
    -    , REG_ESPACE_name( "REG_ESPACE" )
    -    , REG_BADPAT_name( "REG_BADPAT" )
    -    , REG_EXTENDED_name( "REG_EXTENDED" )
    -    , REG_ICASE_name( "REG_ICASE" )
    -    , REG_NOSUB_name( "REG_NOSUB" )
    -    , REG_NEWLINE_name( "REG_NEWLINE" )
    -    , REG_ECOLLATE_name( "REG_ECOLLATE" )
    -    , REG_ECTYPE_name( "REG_ECTYPE" )
    -    , REG_EESCAPE_name( "REG_EESCAPE" )
    -    , REG_ESUBREG_name( "REG_ESUBREG" )
    -    , REG_EBRACK_name( "REG_EBRACK" )
    -    , REG_EPAREN_name( "REG_EPAREN" )
    -    , REG_EBRACE_name( "REG_EBRACE" )
    -    , REG_BADBR_name( "REG_BADBR" )
    -    , REG_ERANGE_name( "REG_ERANGE" )
    -    , REG_BADRPT_name( "REG_BADRPT" )
    -  {
    -  }
    -
    -  ~RegexpModule() override;
    -
    -  void init( SLIInterpreter* ) override;
    -  const std::string name() const override;
    -  const std::string commandstring() const override;
    -};
    -
    -#endif
    diff --git a/sli/slistack.cc b/sli/slistack.cc
    deleted file mode 100644
    index d5a1400b49..0000000000
    --- a/sli/slistack.cc
    +++ /dev/null
    @@ -1,497 +0,0 @@
    -/*
    - *  slistack.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    slistack.cc
    -*/
    -
    -#include "slistack.h"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "integerdatum.h"
    -
    -//******************* Stack Functions
    -/** @BeginDocumentation
    -Name: pop - Pop the top object off the stack
    -
    -Description: Alternatives: You can use ; (undocumented),
    -which is the same as pop.
    -
    -Diagnostics: Raises StackUnderflow error if the stack is empty
    -
    -SeeAlso: npop
    - */
    -
    -void
    -PopFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  i->EStack.pop();
    -  i->OStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -Name: npop - Pop n object off the stack
    -Synopsis: obj_k ... obj_n+1 ojb_n ... obj_0 n pop -> obj_k ... obj_n
    -Diagnostics: Raises StackUnderflow error if the stack contains less
    - than n elements.
    -SeeAlso: pop
    - */
    -
    -void
    -NpopFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( id );
    -  size_t n = id->get();
    -  if ( n < i->OStack.load() )
    -  {
    -    i->EStack.pop();
    -    i->OStack.pop( n + 1 ); // pop one more and also remove the argument
    -  }
    -  else
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: dup - Duplicate the object which is on top of the stack
    -Synopsis: any dup -> any any
    -Diagnostics: Raises StackUnderflow error if the stack is empty.
    -Examples: 2 dup -> 2 2
    -(hello) dup -> (hello) (hello)
    -Author: docu edited by Sirko Straube
    -SeeAlso: over, index, copy
    -*/
    -void
    -DupFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  i->EStack.pop();
    -  i->OStack.index( 0 );
    -}
    -
    -/** @BeginDocumentation
    -Name: over - Copy object at stack level 1
    -Synopsis: any obj over -> any obj any
    -Diagnostics: Raises StackUnderflow error if there are less than two objects on
    -  the stack.
    -Examples: 1 2 3 over -> 2
    -1 2 3 4 5 over -> 4
    -SeeAlso: dup, index, copy
    -*/
    -void
    -OverFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  i->EStack.pop();
    -  i->OStack.index( 1 );
    -}
    -
    -/** @BeginDocumentation
    -Name: exch - Exchange the order of the first two stack objects.
    -Synopsis: obj1 obj2 exch -> obj2 obj1
    -Diagnostics: Raises StackUnderflow error if there are less than two objects on
    -  the stack.
    -SeeAlso: roll, rollu, rolld, rot
    -*/
    -
    -void
    -ExchFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 2 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  i->EStack.pop();
    -  i->OStack.swap();
    -}
    -
    -/** @BeginDocumentation
    -Name: index - Copy object at stack level n
    -Synopsis: ... obj_n ... obj0 n index -> ... obj_n ... obj0 obj_n
    -Diagnostics: Raises StackUnderflow error if there are less than n+1 objects on
    -  the stack.
    -SeeAlso: dup, over, copy
    -*/
    -void
    -IndexFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( id );
    -  size_t pos = id->get();
    -
    -  if ( pos + 1 < i->OStack.load() )
    -  {
    -    i->EStack.pop();
    -    i->OStack.pop();
    -    i->OStack.index( pos );
    -  }
    -  else
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: copy - Copy the top n stack objects
    -Synopsis: ... obj_n ... obj1 n copy -> ... obj_n ... obj1 obj_n ... obj1
    -Examples: 1 2 3 4 2 copy
    --> after this execution 1 2 3 4 3 4 lies on the stack (the last two elements
    -were copied).
    -Diagnostics: Raises StackUnderflow error if there are less than n+1 objects on
    -  the stack.
    -Author: docu edited by Sirko Straube
    -SeeAlso: dup, over, index
    -*/
    -void
    -CopyFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  assert( id );
    -  size_t n = id->get();
    -  if ( n < i->OStack.load() )
    -  {
    -    i->EStack.pop();
    -    i->OStack.pop();
    -    for ( size_t p = 0; p < n; ++p )
    -    {
    -      //  Since the stack is growing, the argument to index is constant.
    -      i->OStack.index( n - 1 );
    -    }
    -  }
    -  else
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -  }
    -}
    -
    -/** @BeginDocumentation
    -Name: roll - Roll a portion n stack levels k times
    -Synopsis: objn ... obj1 n k roll
    -Description:
    -roll performs a circular shift of the first n stack levels
    -by k positions. Before this is done, roll removes its arguments
    -from the stack.
    -
    -If k is positive, each shift consists of moving the contents of level
    -0 to level n-1, thereby moving elements at levels 1 through n-1 up one
    -stack level.
    -
    -If k is negative, each shift consists of moving the contents of level
    -n-1 to level 0, thereby moving elements at levels 1 through n-1 down
    -one stack level.
    -
    -Examples:
    -    (a) (b) (c) 3 1  roll -> (c) (a) (b)
    -    (a) (b) (c) 3 -1 roll -> (b) (c) (a)
    -    (a) (b) (c) 3 0  roll -> (a) (b) (c)
    -Diagnostics: Raises StackUnderflow error if there are less than n+2 objects
    -on the stack.
    -SeeAlso: exch, rollu, rolld, rot
    -*/
    -void
    -RollFunction::execute( SLIInterpreter* i ) const
    -{
    -  const size_t load = i->OStack.load();
    -  if ( load < 2 )
    -  {
    -    throw StackUnderflow( 2, load );
    -  }
    -
    -  IntegerDatum* idn = dynamic_cast< IntegerDatum* >( i->OStack.pick( 1 ).datum() );
    -  if ( not idn )
    -  {
    -    throw ArgumentType( 1 );
    -  }
    -
    -  IntegerDatum* idk = dynamic_cast< IntegerDatum* >( i->OStack.top().datum() );
    -  if ( not idk )
    -  {
    -    throw ArgumentType( 0 );
    -  }
    -
    -  long& n = idn->get();
    -  if ( n < 0 )
    -  {
    -    i->raiseerror( i->RangeCheckError );
    -    return;
    -  }
    -  if ( static_cast< size_t >( n + 2 ) > load )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -  i->OStack.pop( 2 );
    -
    -  i->OStack.roll( n, idk->get() );
    -}
    -
    -/** @BeginDocumentation
    -Name: rollu - Roll the three top stack elements upwards
    -Synopsis: obj1 obj2 obj3 rollu -> obj3 obj1 obj2
    -Description: rollu is equivalent to 3 1 roll
    -Diagnostics: Raises StackUnderflow error if there are less
    -             than 3 objects on the stack.
    -SeeAlso: roll, rolld, rot
    -*/
    -void
    -RolluFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 3 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -
    -  i->OStack.roll( 3, 1 );
    -}
    -
    -/** @BeginDocumentation
    -Name: rolld - Roll the three top stack elements downwards
    -Synopsis: obj1 obj2 obj3 rolld -> obj2 obj3 obj1
    -Description: rolld is equivalent to 3 -1 roll
    -Diagnostics: Raises StackUnderflow error if there are less
    -             than 3 objects on the stack.
    -SeeAlso: roll, rollu, rot
    -*/
    -void
    -RolldFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 3 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -
    -  i->OStack.roll( 3, -1 );
    -}
    -
    -/** @BeginDocumentation
    -Name: rot - Rotate entire stack contents
    -Synopsis: obj_n ... obj1 obj0 rot -> obj0 obj_n ... obj1
    -SeeAlso: roll, rollu, rolld
    -*/
    -
    -void
    -RotFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -
    -  i->OStack.roll( i->OStack.load(), 1 );
    -}
    -
    -/** @BeginDocumentation
    -Name: count - Count the number of objects on the stack.
    -Synopsis: obj_n-1 ... obj0 count -> obj_n-1 ... obj0 n
    -*/
    -void
    -CountFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  Token load( new IntegerDatum( i->OStack.load() ) );
    -
    -  i->OStack.push_move( load );
    -}
    -
    -/** @BeginDocumentation
    -Name: clear - Clear the entire stack.
    -SeeAlso: pop, npop
    -*/
    -void
    -ClearFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  i->OStack.clear();
    -}
    -
    -/** @BeginDocumentation
    -Name: execstack - Return the contents of the execution stack as array.
    -Synopsis: - execstack -> array
    -Description: execstack converts the current contents of the execution stack
    -into an array. The first array element corrensponds to the bottom and the
    -last array element to the top of the execution stack.
    -SeeAlso: restoreestack, operandstack
    -*/
    -void
    -ExecstackFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -
    -  Token st( new ArrayDatum( i->EStack.toArray() ) );
    -  i->OStack.push_move( st );
    -}
    -
    -/** @BeginDocumentation
    -Name: restoreestack - Restore the execution stack from an array.
    -Synopsis: array restoreexecstack -> -
    -
    -Description: restoreexecstack is used to restore the execution stack
    -from an array. Most probably this array was obtained by saving a previous
    -state of the execution stack with execstack.
    -
    -Be very careful with this command, as it can easily damage or terminate
    -the SLI interpreter.
    -Diagnostics: ArgumentType, StackUnderflow
    -SeeAlso: execstack
    -*/
    -void
    -RestoreestackFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( ad );
    -  TokenArray ta = *ad;
    -  i->OStack.pop();
    -  i->EStack = ta;
    -}
    -
    -/** @BeginDocumentation
    -Name: restoreostack - Restore the stack from an array.
    -Synopsis: [any0 ... any_n] restoreexecstack -> any0 ... any_n
    -
    -Description: restoroexecstack is used to replace the contents of
    -the stack with the contents of the supplied array. The first element
    -of the array will become the bottom of the stack and the last element
    -of the array will become the top of the stack.
    -
    -Diagnostics: ArgumentType, StackUnderflow
    -SeeAlso: operandstack, arrayload, arraystore
    -*/
    -void
    -RestoreostackFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.top().datum() );
    -  assert( ad );
    -  TokenArray ta = *ad;
    -  i->OStack = ta;
    -}
    -
    -/** @BeginDocumentation
    -Name: operandstack - Return the contents of the stack as array.
    -Synopsis: anyn ... any0 operandstack -> [anyn ... any0]
    -SeeAlso: restoreostack, arrayload, arraystore
    -*/
    -void
    -OperandstackFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -
    -  Token st( new ArrayDatum( i->OStack.toArray() ) );
    -  i->OStack.push_move( st );
    -}
    -
    -const PopFunction popfunction;
    -const NpopFunction npopfunction;
    -const ExchFunction exchfunction;
    -const DupFunction dupfunction;
    -const IndexFunction indexfunction;
    -const CopyFunction copyfunction;
    -const RollFunction rollfunction;
    -const CountFunction countfunction;
    -const ClearFunction clearfunction;
    -
    -const RotFunction rotfunction;
    -const RolluFunction rollufunction;
    -const RolldFunction rolldfunction;
    -const OverFunction overfunction;
    -
    -const ExecstackFunction execstackfunction;
    -const RestoreestackFunction restoreestackfunction;
    -const RestoreostackFunction restoreostackfunction;
    -const OperandstackFunction operandstackfunction;
    -
    -void
    -init_slistack( SLIInterpreter* i )
    -{
    -  // Stack routines
    -  i->createcommand( "pop", &popfunction );
    -  i->createcommand( "npop", &npopfunction );
    -  i->createcommand( ";", &popfunction );
    -  i->createcommand( "dup", &dupfunction );
    -  i->createcommand( "exch", &exchfunction );
    -  i->createcommand( "index", &indexfunction );
    -  i->createcommand( "copy", &copyfunction );
    -  i->createcommand( "roll", &rollfunction );
    -  i->createcommand( "count", &countfunction );
    -  i->createcommand( "clear", &clearfunction );
    -
    -  i->createcommand( "rollu", &rollufunction );
    -  i->createcommand( "rolld", &rolldfunction );
    -  i->createcommand( "rot", &rotfunction );
    -  i->createcommand( "over", &overfunction );
    -
    -  i->createcommand( "execstack", &execstackfunction );
    -  i->createcommand( "restoreestack", &restoreestackfunction );
    -  i->createcommand( "restoreostack", &restoreostackfunction );
    -  i->createcommand( "operandstack", &operandstackfunction );
    -}
    diff --git a/sli/slistack.h b/sli/slistack.h
    deleted file mode 100644
    index df85a801f1..0000000000
    --- a/sli/slistack.h
    +++ /dev/null
    @@ -1,190 +0,0 @@
    -/*
    - *  slistack.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLISTACK_H
    -#define SLISTACK_H
    -/*
    -    Stack manipulation functions
    -*/
    -
    -// C++ includes:
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "interpret.h"
    -
    -/************************************************
    -  Stack manipulation functions
    -  ********************************************/
    -class PopFunction : public SLIFunction
    -{
    -public:
    -  PopFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class NpopFunction : public SLIFunction
    -{
    -public:
    -  NpopFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class DupFunction : public SLIFunction
    -{
    -public:
    -  DupFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ExchFunction : public SLIFunction
    -{
    -public:
    -  ExchFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class IndexFunction : public SLIFunction
    -{
    -public:
    -  IndexFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RollFunction : public SLIFunction
    -{
    -public:
    -  RollFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RolluFunction : public SLIFunction
    -{
    -public:
    -  RolluFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RolldFunction : public SLIFunction
    -{
    -public:
    -  RolldFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RotFunction : public SLIFunction
    -{
    -public:
    -  RotFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OverFunction : public SLIFunction
    -{
    -public:
    -  OverFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CountFunction : public SLIFunction
    -{
    -public:
    -  CountFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class CopyFunction : public SLIFunction
    -{
    -public:
    -  CopyFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ClearFunction : public SLIFunction
    -{
    -public:
    -  ClearFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ExecstackFunction : public SLIFunction
    -{
    -public:
    -  ExecstackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RestoreestackFunction : public SLIFunction
    -{
    -public:
    -  RestoreestackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class RestoreostackFunction : public SLIFunction
    -{
    -public:
    -  RestoreostackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class OperandstackFunction : public SLIFunction
    -{
    -public:
    -  OperandstackFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -#endif
    diff --git a/sli/slistartup.cc b/sli/slistartup.cc
    deleted file mode 100644
    index 527d55c468..0000000000
    --- a/sli/slistartup.cc
    +++ /dev/null
    @@ -1,436 +0,0 @@
    -/*
    - *  slistartup.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "slistartup.h"
    -
    -// C++ includes:
    -#include <cstdlib>
    -#include <cstring>
    -#include <fstream>
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from libnestutil:
    -#include "compose.hpp"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "dictdatum.h"
    -#include "integerdatum.h"
    -#include "interpret.h"
    -#include "iostreamdatum.h"
    -#include "stringdatum.h"
    -
    -// Access to environement variables.
    -#ifdef __APPLE__
    -#include <crt_externs.h>
    -#define environ ( *_NSGetEnviron() )
    -#else
    -extern char** environ;
    -#endif
    -
    -/*
    -1.  Propagate commandline to the sli level.
    -    Commandline options will be handled by the startup file.
    -
    -2.  Locate startup file and prepare the start symbol
    -    to run the startup script.
    -3.  If startup-script cannot be located, issue meaningful diagnostic
    -    messages and exit gracefully.
    -*/
    -
    -
    -/** @BeginDocumentation
    -Name: getenv - evaluates if a string is an evironment variable
    -
    -Synopsis: string getenv -> path true
    -string getenv -> false
    -
    -Description: getenv checks if the string is an environment variable. If
    -this is the case the path of the variable and true is pushed on the stack,
    -otherwise a false is pushed on the stack and the string is lost.
    -
    -Examples:
    -
    -SLI ] (HOME) getenv
    -SLI [2] pstack
    -true
    -(/home/gewaltig)
    -
    -SLI ] (NONEXISTING) getenv =
    -false
    -
    -SLI ] (/home) getenv
    -false
    -
    -Remarks: if getenv is used with the wrong argument (e.g. integer),
    -the SLI Session is terminated
    -
    -Author: docu by Marc Oliver Gewaltig and Sirko Straube
    -
    -SeeAlso: environment
    - */
    -
    -std::string
    -SLIStartup::getenv( const std::string& v ) const
    -{
    -  char* s = ::getenv( v.c_str() );
    -  if ( not s )
    -  {
    -    return std::string();
    -  }
    -  else
    -  {
    -    return std::string( s );
    -  }
    -}
    -
    -void
    -SLIStartup::GetenvFunction::execute( SLIInterpreter* i ) const
    -{
    -  // string getenv -> string true
    -  //               -> false
    -
    -  i->assert_stack_load( 1 );
    -
    -  StringDatum* sd = dynamic_cast< StringDatum* >( i->OStack.top().datum() );
    -  assert( sd );
    -  const char* s = ::getenv( sd->c_str() );
    -  i->OStack.pop();
    -  if ( s )
    -  {
    -    Token t( new StringDatum( s ) );
    -    i->OStack.push_move( t );
    -    i->OStack.push( i->baselookup( i->true_name ) );
    -  }
    -  else
    -  {
    -    i->OStack.push( i->baselookup( i->false_name ) );
    -  }
    -
    -  i->EStack.pop();
    -}
    -
    -SLIStartup::SLIStartup( int argc, char** argv )
    -  // To avoid problems due to string substitution in NEST binaries during
    -  // Conda installation, we need to convert the literal to string, cstr and back,
    -  // see #2237 and https://github.com/conda/conda-build/issues/1674#issuecomment-280378336
    -  : sliprefix( std::string( NEST_INSTALL_PREFIX ).c_str() )
    -  , slilibdir( sliprefix + "/" + NEST_INSTALL_DATADIR )
    -  , slidocdir( sliprefix + "/" + NEST_INSTALL_DOCDIR )
    -  , startupfile( slilibdir + "/sli/sli-init.sli" )
    -  , verbosity_( SLIInterpreter::M_INFO ) // default verbosity level
    -  , debug_( false )
    -  , argv_name( "argv" )
    -  , version_name( "version" )
    -  , exitcode_name( "exitcode" )
    -  , prgbuilt_name( "built" )
    -  , prefix_name( "prefix" )
    -  , prgdatadir_name( "prgdatadir" )
    -  , prgdocdir_name( "prgdocdir" )
    -  , host_name( "host" )
    -  , hostos_name( "hostos" )
    -  , hostvendor_name( "hostvendor" )
    -  , hostcpu_name( "hostcpu" )
    -  , getenv_name( "getenv" )
    -  , statusdict_name( "statusdict" )
    -  , start_name( "start" )
    -  , intsize_name( "int" )
    -  , longsize_name( "long" )
    -  , havelonglong_name( "have_long_long" )
    -  , longlongsize_name( "long_long" )
    -  , doublesize_name( "double" )
    -  , pointersize_name( "void_ptr" )
    -  , architecturedict_name( "architecture" )
    -  , platform_name( "platform" )
    -  , threading_name( "threading" )
    -  , have_mpi_name( "have_mpi" )
    -  , ismpi_name( "is_mpi" )
    -  , have_gsl_name( "have_gsl" )
    -  , have_music_name( "have_music" )
    -  , have_libneurosim_name( "have_libneurosim" )
    -  , have_sionlib_name( "have_sionlib" )
    -  , ndebug_name( "ndebug" )
    -  , mpiexec_name( "mpiexec" )
    -  , mpiexec_numproc_flag_name( "mpiexec_numproc_flag" )
    -  , mpiexec_max_numprocs_name( "mpiexec_max_numprocs" )
    -  , mpiexec_preflags_name( "mpiexec_preflags" )
    -  , mpiexec_postflags_name( "mpiexec_postflags" )
    -  , exitcodes_name( "exitcodes" )
    -  , exitcode_success_name( "success" )
    -  , exitcode_skipped_name( "skipped" )
    -  , exitcode_skipped_no_mpi_name( "skipped_no_mpi" )
    -  , exitcode_skipped_have_mpi_name( "skipped_have_mpi" )
    -  , exitcode_skipped_no_threading_name( "skipped_no_threading" )
    -  , exitcode_skipped_no_gsl_name( "skipped_no_gsl" )
    -  , exitcode_skipped_no_music_name( "skipped_no_music" )
    -  , exitcode_scripterror_name( "scripterror" )
    -  , exitcode_abort_name( "abort" )
    -  , exitcode_userabort_name( "userabort" )
    -  , exitcode_segfault_name( "segfault" )
    -  , exitcode_exception_name( "exception" )
    -  , exitcode_fatal_name( "fatal" )
    -  , exitcode_unknownerror_name( "unknownerror" )
    -  , environment_name( "environment" )
    -{
    -  ArrayDatum args_array;
    -
    -  // argv[0] is the name of the program that was given to the shell.
    -  // This name must be given to SLI, otherwise initialization fails.
    -  // If we import NEST directly from the Python interpreter, that is, not from
    -  // a script but by using an interactive session in Python, argv[0] is an
    -  // empty string, see documentation for argv in
    -  // https://docs.python.org/3/library/sys.html
    -  for ( int i = 0; i < argc; ++i )
    -  {
    -    StringDatum* sd = new StringDatum( argv[ i ] );
    -    args_array.push_back( Token( sd ) );
    -
    -    if ( *sd == "-d" or *sd == "--debug" )
    -    {
    -      debug_ = true;
    -      verbosity_ = SLIInterpreter::M_ALL; // make the interpreter verbose.
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=ALL" )
    -    {
    -      verbosity_ = SLIInterpreter::M_ALL;
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=DEBUG" )
    -    {
    -      verbosity_ = SLIInterpreter::M_DEBUG;
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=STATUS" )
    -    {
    -      verbosity_ = SLIInterpreter::M_STATUS;
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=INFO" )
    -    {
    -      verbosity_ = SLIInterpreter::M_INFO;
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=DEPRECATED" )
    -    {
    -      verbosity_ = SLIInterpreter::M_DEPRECATED;
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=WARNING" )
    -    {
    -      verbosity_ = SLIInterpreter::M_WARNING;
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=ERROR" )
    -    {
    -      verbosity_ = SLIInterpreter::M_ERROR;
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=FATAL" )
    -    {
    -      verbosity_ = SLIInterpreter::M_FATAL;
    -      continue;
    -    }
    -    if ( *sd == "--verbosity=QUIET" )
    -    {
    -      verbosity_ = SLIInterpreter::M_QUIET;
    -      continue;
    -    }
    -  }
    -  commandline_args_ = args_array;
    -}
    -
    -void
    -SLIStartup::init( SLIInterpreter* i )
    -{
    -  i->verbosity( verbosity_ );
    -
    -  i->createcommand( getenv_name, &getenvfunction );
    -
    -  DictionaryDatum statusdict( new Dictionary() );
    -  i->statusdict = &( *statusdict );
    -  assert( statusdict.valid() );
    -
    -  statusdict->insert_move( argv_name, commandline_args_ );
    -  statusdict->insert( version_name, Token( new StringDatum( NEST_VERSION_STRING ) ) );
    -  statusdict->insert( exitcode_name, Token( new IntegerDatum( EXIT_SUCCESS ) ) );
    -  statusdict->insert( prgbuilt_name, Token( new StringDatum( String::compose( "%1 %2", __DATE__, __TIME__ ) ) ) );
    -  statusdict->insert( prgdatadir_name, Token( new StringDatum( slilibdir ) ) );
    -  statusdict->insert( prgdocdir_name, Token( new StringDatum( slidocdir ) ) );
    -  statusdict->insert( prefix_name, Token( new StringDatum( sliprefix ) ) );
    -  statusdict->insert( host_name, Token( new StringDatum( NEST_HOST ) ) );
    -  statusdict->insert( hostos_name, Token( new StringDatum( NEST_HOSTOS ) ) );
    -  statusdict->insert( hostvendor_name, Token( new StringDatum( NEST_HOSTVENDOR ) ) );
    -  statusdict->insert( hostcpu_name, Token( new StringDatum( NEST_HOSTCPU ) ) );
    -
    -  // Value other than default were defined for BlueGene models. Keep for backward compatibility.
    -  statusdict->insert( platform_name, Token( new StringDatum( "default" ) ) );
    -
    -
    -#ifdef _OPENMP
    -  statusdict->insert( threading_name, Token( new StringDatum( "openmp" ) ) );
    -#else
    -  statusdict->insert( threading_name, Token( new StringDatum( "no" ) ) );
    -#endif
    -
    -#ifdef HAVE_MPI
    -  statusdict->insert( have_mpi_name, Token( new BoolDatum( true ) ) );
    -  statusdict->insert( mpiexec_name, Token( new StringDatum( MPIEXEC ) ) );
    -  statusdict->insert( mpiexec_numproc_flag_name, Token( new StringDatum( MPIEXEC_NUMPROC_FLAG ) ) );
    -  statusdict->insert( mpiexec_max_numprocs_name, Token( new StringDatum( MPIEXEC_MAX_NUMPROCS ) ) );
    -  statusdict->insert( mpiexec_preflags_name, Token( new StringDatum( MPIEXEC_PREFLAGS ) ) );
    -  statusdict->insert( mpiexec_postflags_name, Token( new StringDatum( MPIEXEC_POSTFLAGS ) ) );
    -#else
    -  statusdict->insert( have_mpi_name, Token( new BoolDatum( false ) ) );
    -#endif
    -
    -#ifdef HAVE_GSL
    -  statusdict->insert( have_gsl_name, Token( new BoolDatum( true ) ) );
    -#else
    -  statusdict->insert( have_gsl_name, Token( new BoolDatum( false ) ) );
    -#endif
    -
    -#ifdef HAVE_MUSIC
    -  statusdict->insert( have_music_name, Token( new BoolDatum( true ) ) );
    -#else
    -  statusdict->insert( have_music_name, Token( new BoolDatum( false ) ) );
    -#endif
    -
    -#ifdef HAVE_LIBNEUROSIM
    -  statusdict->insert( have_libneurosim_name, Token( new BoolDatum( true ) ) );
    -#else
    -  statusdict->insert( have_libneurosim_name, Token( new BoolDatum( false ) ) );
    -#endif
    -
    -#ifdef HAVE_SIONLIB
    -  statusdict->insert( have_sionlib_name, Token( new BoolDatum( true ) ) );
    -#else
    -  statusdict->insert( have_sionlib_name, Token( new BoolDatum( false ) ) );
    -#endif
    -
    -#ifdef NDEBUG
    -  statusdict->insert( ndebug_name, Token( new BoolDatum( true ) ) );
    -#else
    -  statusdict->insert( ndebug_name, Token( new BoolDatum( false ) ) );
    -#endif
    -
    -  DictionaryDatum architecturedict( new Dictionary() );
    -  assert( architecturedict.valid() );
    -
    -  architecturedict->insert( doublesize_name, Token( new IntegerDatum( sizeof( double ) ) ) );
    -  architecturedict->insert( pointersize_name, Token( new IntegerDatum( sizeof( void* ) ) ) );
    -  architecturedict->insert( intsize_name, Token( new IntegerDatum( sizeof( int ) ) ) );
    -  architecturedict->insert( longsize_name, Token( new IntegerDatum( sizeof( long ) ) ) );
    -  architecturedict->insert( "Token", Token( new IntegerDatum( sizeof( Token ) ) ) );
    -  architecturedict->insert( "TokenMap", Token( new IntegerDatum( sizeof( TokenMap ) ) ) );
    -  architecturedict->insert( "Dictionary", Token( new IntegerDatum( sizeof( Dictionary ) ) ) );
    -  architecturedict->insert( "DictionaryDatum", Token( new IntegerDatum( sizeof( DictionaryDatum ) ) ) );
    -  architecturedict->insert( "IntegerDatum", Token( new IntegerDatum( sizeof( IntegerDatum ) ) ) );
    -  architecturedict->insert( "ArrayDatum", Token( new IntegerDatum( sizeof( ArrayDatum ) ) ) );
    -  architecturedict->insert( "TokenArray", Token( new IntegerDatum( sizeof( TokenArray ) ) ) );
    -  architecturedict->insert( "TokenArrayObj", Token( new IntegerDatum( sizeof( TokenArrayObj ) ) ) );
    -
    -  statusdict->insert( architecturedict_name, architecturedict );
    -
    -  DictionaryDatum exitcodes( new Dictionary() );
    -  assert( exitcodes.valid() );
    -
    -  exitcodes->insert( exitcode_success_name, Token( new IntegerDatum( EXIT_SUCCESS ) ) );
    -  exitcodes->insert( exitcode_skipped_name, Token( new IntegerDatum( EXITCODE_SKIPPED ) ) );
    -  exitcodes->insert( exitcode_skipped_no_mpi_name, Token( new IntegerDatum( EXITCODE_SKIPPED_NO_MPI ) ) );
    -  exitcodes->insert( exitcode_skipped_have_mpi_name, Token( new IntegerDatum( EXITCODE_SKIPPED_HAVE_MPI ) ) );
    -  exitcodes->insert( exitcode_skipped_no_threading_name, Token( new IntegerDatum( EXITCODE_SKIPPED_NO_THREADING ) ) );
    -  exitcodes->insert( exitcode_skipped_no_gsl_name, Token( new IntegerDatum( EXITCODE_SKIPPED_NO_GSL ) ) );
    -  exitcodes->insert( exitcode_skipped_no_music_name, Token( new IntegerDatum( EXITCODE_SKIPPED_NO_MUSIC ) ) );
    -  exitcodes->insert( exitcode_scripterror_name, Token( new IntegerDatum( EXITCODE_SCRIPTERROR ) ) );
    -  exitcodes->insert( exitcode_abort_name, Token( new IntegerDatum( NEST_EXITCODE_ABORT ) ) );
    -  exitcodes->insert( exitcode_userabort_name, Token( new IntegerDatum( EXITCODE_USERABORT ) ) );
    -  exitcodes->insert( exitcode_segfault_name, Token( new IntegerDatum( NEST_EXITCODE_SEGFAULT ) ) );
    -  exitcodes->insert( exitcode_exception_name, Token( new IntegerDatum( EXITCODE_EXCEPTION ) ) );
    -  exitcodes->insert( exitcode_fatal_name, Token( new IntegerDatum( EXITCODE_FATAL ) ) );
    -  exitcodes->insert( exitcode_unknownerror_name, Token( new IntegerDatum( EXITCODE_UNKNOWN_ERROR ) ) );
    -
    -  statusdict->insert( exitcodes_name, exitcodes );
    -
    -  // Copy environment variables
    -  // The environ pointer is defined at the head of the file.
    -  DictionaryDatum environment( new Dictionary() );
    -  for ( char* const* envptr = environ; *envptr; ++envptr )
    -  {
    -    std::string const envstr( *envptr );
    -
    -    // It is safe to assume that all entries contain the character '='
    -    const size_t pos = envstr.find( '=' );
    -    const Name varname = envstr.substr( 0, pos );
    -    const std::string varvalue = envstr.substr( pos + 1 );
    -    environment->insert( varname, Token( new StringDatum( varvalue ) ) );
    -  }
    -  statusdict->insert( environment_name, environment );
    -
    -#ifdef HAVE_LONG_LONG
    -  architecturedict->insert( havelonglong_name, Token( new BoolDatum( true ) ) );
    -  architecturedict->insert( longlongsize_name, Token( new IntegerDatum( sizeof( long long ) ) ) );
    -#else
    -  architecturedict->insert( havelonglong_name, Token( new BoolDatum( false ) ) );
    -#endif
    -
    -  i->def( statusdict_name, statusdict );
    -
    -
    -  // Check that startup file is readable before pushing it to stack.
    -  char c;
    -  std::ifstream su_test( startupfile.c_str() );
    -  su_test.get( c );
    -  if ( not su_test.good() )
    -  {
    -    i->message( SLIInterpreter::M_FATAL,
    -      "SLIStartup",
    -      String::compose( "SLI initialisation file not found at %1.\n"
    -                       "Please check your NEST installation.",
    -        startupfile )
    -        .c_str() );
    -
    -    // We cannot call i->terminate() here because the interpreter is not fully configured yet.
    -    // If running PyNEST, the Python process will terminate.
    -    std::exit( EXITCODE_FATAL );
    -  }
    -
    -  i->message(
    -    SLIInterpreter::M_DEBUG, "SLIStartup", String::compose( "Initialising from file: %1", startupfile ).c_str() );
    -
    -  // Push open sli-init.sli stream and Parse command to stack
    -  std::ifstream* input = new std::ifstream( startupfile.c_str() );
    -  Token input_token( new XIstreamDatum( input ) );
    -  i->EStack.push_move( input_token );
    -  i->EStack.push( i->baselookup( i->iparse_name ) );
    -
    -  // If we start with debug option, we set the debugging mode, but disable
    -  // stepmode. This way, the debugger is entered only on error.
    -  if ( debug_ )
    -  {
    -    i->debug_mode_on();
    -    i->backtrace_on();
    -  }
    -}
    diff --git a/sli/slistartup.h b/sli/slistartup.h
    deleted file mode 100644
    index 9454a1c6b7..0000000000
    --- a/sli/slistartup.h
    +++ /dev/null
    @@ -1,157 +0,0 @@
    -/*
    - *  slistartup.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLISTARTUP_H
    -#define SLISTARTUP_H
    -
    -// C++ includes:
    -#include <string>
    -
    -// Generated includes:
    -#include "config.h"
    -#include "dirent.h"
    -#include "errno.h"
    -
    -// Includes from libnestutil:
    -#include "compose.hpp"
    -
    -// Includes from sli:
    -#include "name.h"
    -#include "slifunction.h"
    -#include "slimodule.h"
    -#include "token.h"
    -
    -// Exit codes
    -#define EXITCODE_UNKNOWN_ERROR 10
    -#define EXITCODE_USERABORT 15
    -#define EXITCODE_EXCEPTION 125
    -#define EXITCODE_SCRIPTERROR 126
    -#define EXITCODE_FATAL 127
    -
    -// The range 200-215 is reserved for test skipping exitcodes. Any new codes must
    -// also be added to testsuite/do_tests_sh.in.
    -#define EXITCODE_SKIPPED 200
    -#define EXITCODE_SKIPPED_NO_MPI 201
    -#define EXITCODE_SKIPPED_HAVE_MPI 202
    -#define EXITCODE_SKIPPED_NO_THREADING 203
    -#define EXITCODE_SKIPPED_NO_GSL 204
    -#define EXITCODE_SKIPPED_NO_MUSIC 205
    -
    -
    -class SLIStartup : public SLIModule
    -{
    -  const std::string sliprefix;
    -  const std::string slilibdir;
    -  const std::string slidocdir;
    -  const std::string startupfile;
    -
    -  std::string find_startup_file( const std::string& ) const;
    -  std::string getenv( const std::string& ) const;
    -
    -  Token commandline_args_;
    -  int verbosity_;
    -  bool debug_;
    -
    -public:
    -  Name argv_name;
    -  Name version_name;
    -  Name exitcode_name;
    -  Name prgbuilt_name;
    -  Name prefix_name;
    -  Name prgdatadir_name;
    -  Name prgdocdir_name;
    -
    -  Name host_name;
    -  Name hostos_name;
    -  Name hostvendor_name;
    -  Name hostcpu_name;
    -
    -  Name getenv_name;
    -  Name statusdict_name;
    -  Name start_name;
    -
    -  Name intsize_name;
    -  Name longsize_name;
    -  Name havelonglong_name;
    -  Name longlongsize_name;
    -  Name doublesize_name;
    -  Name pointersize_name;
    -  Name architecturedict_name;
    -
    -  Name platform_name;
    -  Name threading_name;
    -
    -  Name have_mpi_name;
    -  Name ismpi_name;
    -  Name have_gsl_name;
    -  Name have_music_name;
    -  Name have_libneurosim_name;
    -  Name have_sionlib_name;
    -  Name ndebug_name;
    -
    -  Name mpiexec_name;
    -  Name mpiexec_numproc_flag_name;
    -  Name mpiexec_max_numprocs_name;
    -  Name mpiexec_preflags_name;
    -  Name mpiexec_postflags_name;
    -
    -  Name exitcodes_name;
    -  Name exitcode_success_name;
    -  Name exitcode_skipped_name;
    -  Name exitcode_skipped_no_mpi_name;
    -  Name exitcode_skipped_have_mpi_name;
    -  Name exitcode_skipped_no_threading_name;
    -  Name exitcode_skipped_no_gsl_name;
    -  Name exitcode_skipped_no_music_name;
    -  Name exitcode_scripterror_name;
    -  Name exitcode_abort_name;
    -  Name exitcode_userabort_name;
    -  Name exitcode_segfault_name;
    -  Name exitcode_exception_name;
    -  Name exitcode_fatal_name;
    -  Name exitcode_unknownerror_name;
    -
    -  Name environment_name;
    -
    -  class GetenvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  GetenvFunction getenvfunction;
    -
    -  SLIStartup( int, char** );
    -  ~SLIStartup() override
    -  {
    -  }
    -
    -  void init( SLIInterpreter* ) override;
    -
    -  const std::string
    -  name() const override
    -  {
    -    return "SLIStartup";
    -  }
    -};
    -
    -#endif
    diff --git a/sli/slitype.cc b/sli/slitype.cc
    deleted file mode 100644
    index 3b1b1381ad..0000000000
    --- a/sli/slitype.cc
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    - *  slitype.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    class implementing SLI types.
    -*/
    -
    -#include "slitype.h"
    -
    -// C++ includes:
    -#include <cstdlib>
    -
    -void
    -SLIType::settypename( const std::string& s )
    -{
    -  if ( count == 0 )
    -  {
    -    assert( Name::lookup( s ) == false );
    -    name = new Name( s );
    -  }
    -  else
    -  {
    -    assert( Name( s ) == *name );
    -  }
    -  ++count;
    -}
    -
    -void
    -SLIType::deletetypename()
    -{
    -  assert( count > 0 );
    -  if ( count == 1 )
    -  {
    -    delete name;
    -  }
    -  --count;
    -}
    -
    -
    -void
    -SLIType::setdefaultaction( SLIFunction& c )
    -{
    -  if ( not defaultaction )
    -  {
    -    defaultaction = &c;
    -  }
    -  else
    -  {
    -    assert( &c == defaultaction );
    -  }
    -}
    diff --git a/sli/slitype.h b/sli/slitype.h
    deleted file mode 100644
    index 4b38e74199..0000000000
    --- a/sli/slitype.h
    +++ /dev/null
    @@ -1,113 +0,0 @@
    -/*
    - *  slitype.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLITYPE_H
    -#define SLITYPE_H
    -/*
    -    class implementing SLI types
    -*/
    -
    -// C++ includes:
    -#include <iostream>
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "name.h"
    -#include "slifunction.h"
    -
    -
    -/* class SLIType represents the SLI type information. Each
    -   Datum object carries a pointer to the SLIType object, representing the
    -   SLI type of its contents.
    -   class SLIType is such that there can be only one instance for each
    -   typename.
    -   The typename is assigned at a special position with local scope, e.g.
    -   the constructor of a client class. This reduces the risk of running into
    -   the static initialization problem, since class Name has static members
    -   which might not be constructet when SLITypes are used as static
    -   data members.
    -*/
    -
    -class SLIInterpreter;
    -
    -class SLIType
    -{
    -  unsigned int count;
    -
    -  Name* name;
    -  SLIFunction* defaultaction;
    -
    -  SLIType& operator=( const SLIType& );
    -  SLIType( const SLIType& );
    -
    -public:
    -  SLIType()
    -    : count( 0 )
    -    , name( nullptr )
    -    , defaultaction( nullptr )
    -  {
    -  }
    -  ~SLIType()
    -  {
    -  }
    -
    -  void settypename( const std::string& s );
    -  void deletetypename();
    -
    -  const Name&
    -  gettypename() const
    -  {
    -    //      assert( name !=NULL);
    -    return *name;
    -  }
    -
    -  void setdefaultaction( SLIFunction& );
    -
    -
    -  SLIFunction*
    -  getaction() const
    -  {
    -    return defaultaction;
    -  }
    -};
    -
    -// This shows how the type-objects are to be used
    -// class SLIInterpreter
    -// {
    -
    -// public:
    -//     static const char* Integertypename;
    -//     static const char* Doubletypename;
    -
    -//     static SLIType Integertype;
    -//     static SLIType Doubletype;
    -
    -//     Interpreter(void);
    -// };
    -
    -// Interpreter::Interpreter(void)
    -// {
    -//     Integertype.settypename(Integertypename);
    -//     Doubletype.settypename(Doubletypename);
    -// }
    -
    -#endif
    diff --git a/sli/slitypecheck.cc b/sli/slitypecheck.cc
    deleted file mode 100644
    index 0732eb0b81..0000000000
    --- a/sli/slitypecheck.cc
    +++ /dev/null
    @@ -1,357 +0,0 @@
    -/*
    - *  slitypecheck.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "slitypecheck.h"
    -
    -// C++ includes:
    -#include <sstream>
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "interpret.h"
    -#include "iostreamdatum.h"
    -#include "namedatum.h"
    -#include "triedatum.h"
    -
    -/** @BeginDocumentation
    -Name: trie - Create a new type-trie object
    -Synopsis: /name -> /name typetrie
    -Description: Create a new typetrie with internal
    -name /name. This object is not bound to /name in the
    -current dictionary. This has to be done by an explicit def.
    -Examples: /square trie
    -          [/doubletype] { dup mul } addtotrie def
    -
    -Author: Marc-Oliver
    -SeeAlso: addtotrie, cva_t
    -*/
    -void
    -TrieFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  if ( i->OStack.load() < 1 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  LiteralDatum* name = dynamic_cast< LiteralDatum* >( i->OStack.top().datum() );
    -
    -  if ( not name )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -  i->EStack.pop();
    -
    -  TrieDatum* trie = new TrieDatum( *name );
    -
    -  Token tmp( trie );
    -  i->OStack.push_move( tmp );
    -}
    -
    -
    -/** @BeginDocumentation
    -Name: addtotrie - Add a function variant to a trie-object
    -Synopsis: trie [type-list] obj addtotrie -> trie
    -Parameters:
    -trie        - a trie object, obtained by a call to trie.
    -[type-list] - an array with type-names, corresponding to the
    -              types of the parameters, expected by the function.
    -Description:
    -addtotrie adds a new variant to the type-trie. Note, the type-list must
    -contain at least one type. (Functions without parameters cannot be
    -overloaded.
    -
    -Author: Marc-Oliver Gewaltig
    -SeeAlso: trie
    -*/
    -
    -void
    -AddtotrieFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() < 3 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  TrieDatum* trie = dynamic_cast< TrieDatum* >( i->OStack.pick( 2 ).datum() );
    -
    -  if ( not trie )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  TypeArray a;
    -
    -  // Construct a TypeArray from the TokenArray
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( i->OStack.pick( 1 ).datum() );
    -
    -  if ( not ad )
    -  {
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -  if ( ad->size() == 0 )
    -  {
    -    i->message( SLIInterpreter::M_ERROR, "addtotrie", "type-array must not be empty." );
    -    i->message( SLIInterpreter::M_ERROR, "addtotrie", "No change was made to the trie." );
    -    i->raiseerror( i->ArgumentTypeError );
    -    return;
    -  }
    -
    -
    -  for ( Token* t = ad->end() - 1; t >= ad->begin(); --t )
    -  {
    -    LiteralDatum* nd = dynamic_cast< LiteralDatum* >( t->datum() );
    -
    -    if ( not nd )
    -    {
    -      std::ostringstream message;
    -      message << "In trie " << trie->getname() << ". "
    -              << "Error at array position " << t - ad->begin() << '.' << std::ends;
    -      i->message( SLIInterpreter::M_ERROR, "addtotrie", message.str().c_str() );
    -      i->message( SLIInterpreter::M_ERROR, "addtotrie", "Array must contain typenames as literals." );
    -      i->message( SLIInterpreter::M_ERROR, "addtotrie", "No change was made to the trie." );
    -
    -      i->raiseerror( i->ArgumentTypeError );
    -      return;
    -    }
    -
    -    a.push_back( *nd );
    -  }
    -
    -  trie->insert_move( a, i->OStack.top() );
    -  i->OStack.pop( 2 );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -
    -   Name: cva_t - Converts a type trie to an equivalent array
    -
    -   Synopsis: trie cva_t -> /name array
    -
    -   Description:
    -   cva_t maps the tree structure of the trie-object to an array.
    -   The first return value is the name of the trie object.
    -   The second value is an array, representing the trie.
    -
    -   The layout of a trie node is represented as:
    -   [/type [next] [alt]] for non-leaf nodes and
    -   [object]            for leaf nodes.
    -
    -   /type is  a literal, representing the expected type.
    -   [next] is an array, representig the next parameter levels.
    -   [alt] is an array, representig parameter alternatives
    -         at the current level.
    -
    -   This definitions recursively define the type-trie.
    -
    -   Examples:
    -   /pop load cva_t -> /pop [/anytype [-pop-]]
    -
    -   Diagnostics:
    -   This operation is rather low level and does not raise
    -   errors
    -   Bugs:
    -
    -   Author:
    -   Marc-Oliver Gewaltig
    -
    -   FirstVersion:
    -   May 20 1999
    -
    -   Remarks:
    -   cva_t is the inverse function to cvt_a.
    -   If cva_t is applied to the result of cvt_a, it yields
    -   the original argument:
    -   aTrie cva_t cvt_a -> aTrie
    -
    -   SeeAlso: cvt_a, trie, addtotrie, type, cva
    -*/
    -
    -void
    -Cva_tFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.size() > 0 );
    -
    -  i->EStack.pop();
    -
    -  Token trietoken;
    -  trietoken.move( i->OStack.top() );
    -  i->OStack.pop();
    -
    -  TrieDatum* trie = dynamic_cast< TrieDatum* >( trietoken.datum() );
    -  assert( trie );
    -
    -  Name triename( trie->getname() );
    -  i->OStack.push( LiteralDatum( triename ) );
    -  TokenArray a;
    -  trie->get().toTokenArray( a );
    -  i->OStack.push( ArrayDatum( a ) );
    -}
    -
    -void
    -TrieInfoFunction::execute( SLIInterpreter* i ) const
    -{
    -  assert( i->OStack.size() > 1 );
    -
    -  i->EStack.pop();
    -
    -  OstreamDatum* osd = dynamic_cast< OstreamDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( osd );
    -
    -  Token trietoken;
    -  trietoken.move( i->OStack.top() );
    -
    -  TrieDatum* trie = dynamic_cast< TrieDatum* >( trietoken.datum() );
    -  assert( trie );
    -
    -  trie->get().info( **osd );
    -  i->OStack.pop( 2 );
    -}
    -
    -/** @BeginDocumentation
    -
    -   Name: cvt_a - Converts an array to the equivalent type trie.
    -
    -   Synopsis:  /name array cvt_a -> trie
    -
    -   Description:
    -   cvt_a tries to construct a type-trie object from a given array.
    -   The supplied literal is used as name for the trie-object.
    -
    -   WARNING:
    -   Be very careful when using this function. If the supplied
    -   array is not well formed, the interpreter will abort
    -   ungracefully!
    -
    -   Tries should not be constructed fron scratch using cvt_a.
    -   Use the operators trie and addtotrie for this purpose.
    -   Rather, cvt_a is provided to correct minor errors in tries
    -   with the help of cva_t.
    -
    -   Parameters:
    -
    -   The supplied array is the root trie node.
    -   The layout of each trie node must conform to the following
    -   pattern:
    -   [/type [next] [alt]] for non-leaf nodes and
    -   [object]            for leaf nodes.
    -
    -   /type is  a literal, representing the expected type.
    -   object is any type of token. It is returned when this leaf of
    -          the trie is reached.
    -   [next] is an array, representig the next parameter levels.
    -   [alt] is an array, representig parameter alternatives
    -         at the current level.
    -
    -   This pattern recursively defines a type-trie. Note, however,
    -   that violations of this definition are handled ungracefully.
    -
    -   Examples:
    -   /pop [/anytype [-pop-]]  cvt_a -> trie
    -
    -   Diagnostics:
    -   This operation is low level and does not raise
    -   errors. If the array is ill-formed, the interpreter will
    -   abort!
    -
    -   Bugs:
    -   Errors should be handled gracefully.
    -
    -   Author:
    -   Marc-Oliver Gewaltig
    -
    -   FirstVersion:
    -   May 20 1999
    -
    -   Remarks:
    -   cvt_a is the inverse function to cva_t.
    -   If cvt_a is applied to the result of cva_t, it yields
    -   the original argument:
    -   /name [array] cvt_a cva_t -> /name [array]
    -
    -   SeeAlso: cva_t, trie, addtotrie, type, cst, cva, cv1d, cv2d, cvd, cvi, cvlit,
    -   cvn, cvs
    -*/
    -void
    -Cvt_aFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop();
    -  assert( i->OStack.size() > 1 );
    -
    -  LiteralDatum* name = dynamic_cast< LiteralDatum* >( i->OStack.pick( 1 ).datum() );
    -  assert( name );
    -  ArrayDatum* arr = dynamic_cast< ArrayDatum* >( i->OStack.pick( 0 ).datum() );
    -  assert( arr );
    -
    -  TrieDatum* trie = new TrieDatum( *name, *arr );
    -  assert( trie );
    -  Token tmp( trie );
    -  i->OStack.pop();
    -  i->OStack.push_move( tmp );
    -}
    -
    -/** @BeginDocumentation
    -Name: type - Return the type of an object
    -Synopsis: obj type -> /typename
    -Examples: 1 type -> /integertype
    -*/
    -void
    -TypeFunction::execute( SLIInterpreter* i ) const
    -{
    -  if ( i->OStack.load() == 0 )
    -  {
    -    i->raiseerror( i->StackUnderflowError );
    -    return;
    -  }
    -
    -  i->EStack.pop();
    -  Token tmp;
    -  tmp.move( i->OStack.top() );
    -  i->OStack.pop();
    -  Token n( new LiteralDatum( tmp->gettypename() ) );
    -  i->OStack.push_move( n );
    -}
    -
    -const TrieFunction triefunction;
    -const TrieInfoFunction trieinfofunction;
    -const AddtotrieFunction addtotriefunction;
    -const Cva_tFunction cva_tfunction;
    -const Cvt_aFunction cvt_afunction;
    -const TypeFunction typefunction;
    -
    -void
    -init_slitypecheck( SLIInterpreter* i )
    -{
    -  i->createcommand( "trie", &triefunction );
    -  i->createcommand( "addtotrie", &addtotriefunction );
    -  i->createcommand( "trieinfo_os_t", &trieinfofunction );
    -  i->createcommand( "cva_t", &cva_tfunction );
    -  i->createcommand( "cvt_a", &cvt_afunction );
    -  i->createcommand( "type", &typefunction );
    -}
    diff --git a/sli/slitypecheck.h b/sli/slitypecheck.h
    deleted file mode 100644
    index ba2ddb29e3..0000000000
    --- a/sli/slitypecheck.h
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -/*
    - *  slitypecheck.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SLITYPECHECK_H
    -#define SLITYPECHECK_H
    -
    -// C++ includes:
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -
    -class TrieFunction : public SLIFunction
    -{
    -public:
    -  TrieFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class TrieInfoFunction : public SLIFunction
    -{
    -public:
    -  TrieInfoFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class AddtotrieFunction : public SLIFunction
    -{
    -public:
    -  AddtotrieFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cva_tFunction : public SLIFunction
    -{
    -public:
    -  Cva_tFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class Cvt_aFunction : public SLIFunction
    -{
    -public:
    -  Cvt_aFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class TypeFunction : public SLIFunction
    -{
    -public:
    -  TypeFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -
    -void init_slitypecheck( SLIInterpreter* );
    -
    -#endif
    diff --git a/sli/specialfunctionsmodule.cc b/sli/specialfunctionsmodule.cc
    deleted file mode 100644
    index e3c495bc5f..0000000000
    --- a/sli/specialfunctionsmodule.cc
    +++ /dev/null
    @@ -1,462 +0,0 @@
    -/*
    - *  specialfunctionsmodule.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "specialfunctionsmodule.h"
    -
    -// C++ includes:
    -#include <cmath>
    -
    -// Generated includes:
    -#include "config.h" // has definition of HAVE_GSL
    -
    -// Includes from sli:
    -#include "doubledatum.h" // Include the data-types we use!
    -
    -#ifdef HAVE_GSL
    -
    -// External includes:
    -#include <gsl/gsl_errno.h>
    -#include <gsl/gsl_integration.h>
    -#include <gsl/gsl_math.h>
    -#include <gsl/gsl_sf.h>
    -#include <gsl/gsl_sf_erf.h>   // as more and more special functions get
    -#include <gsl/gsl_sf_gamma.h> // added, replace by <gsl/gsl_sf.h>
    -#include <gsl/gsl_sf_lambert.h>
    -
    -#endif
    -
    -const int SpecialFunctionsModule::GaussDiskConvFunction::MAX_QUAD_SIZE = 5000;
    -const double SpecialFunctionsModule::GaussDiskConvFunction::QUAD_ERR_LIM = 1e-12;
    -const double SpecialFunctionsModule::GaussDiskConvFunction::QUAD_ERR_SCALE = 200.0;
    -
    -
    -// We need this for some compiling reason... (ask Bjarne)
    -const SpecialFunctionsModule::GammaIncFunction gammaincfunction;
    -const SpecialFunctionsModule::ErfFunction erffunction;
    -const SpecialFunctionsModule::ErfcFunction erfcfunction;
    -const SpecialFunctionsModule::GaussDiskConvFunction gaussdiskconvfunction;
    -const SpecialFunctionsModule::LambertW0Function lambertw0function;
    -const SpecialFunctionsModule::LambertWm1Function lambertwm1function;
    -
    -// Part 1: Methods pertaining to the entire module -----------------
    -
    -// GSL independent code
    -const std::string
    -SpecialFunctionsModule::name() const
    -{
    -  return std::string( "SpecialFunctionsModule" ); // Return name of the module
    -}
    -
    -void
    -SpecialFunctionsModule::init( SLIInterpreter* i )
    -{
    -  // Do whatever initialization is needed, then...
    -
    -#ifdef HAVE_GSL
    -  // turn error handler off, so that errors in GSL functions
    -  // do not lead to a core dump
    -  gsl_set_error_handler_off();
    -#endif
    -
    -  // ...don't forget to create the new SLI-commands!
    -  i->createcommand( "Gammainc", &gammaincfunction );
    -  i->createcommand( "LambertW0", &lambertw0function );
    -  i->createcommand( "LambertWm1", &lambertwm1function );
    -  i->createcommand( "Erf", &erffunction );
    -  i->createcommand( "Erfc", &erfcfunction );
    -  i->createcommand( "GaussDiskConv", &gaussdiskconvfunction );
    -}
    -
    -
    -// Part 2: Methods pertaining to the individual functions ----------
    -
    -// NOTE: see below for dummy implementations in absence of GSL
    -#ifdef HAVE_GSL
    -
    -void
    -SpecialFunctionsModule::GammaIncFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop(); // pop yourself
    -
    -  if ( i->OStack.load() < 2 )
    -  { // expect two arguments on stack
    -    i->raiseerror( "Gammainc", "two arguments required" );
    -    return;
    -  }
    -
    -  // get top argument
    -  DoubleDatum* da = dynamic_cast< DoubleDatum* >( i->OStack.top().datum() );
    -  if ( not da )
    -  {
    -    i->raiseerror( "Gammainc", "arguments must be doubles" );
    -    return;
    -  }
    -  i->OStack.pop(); // pop top argument
    -
    -  // get second argument, leave datum on stack
    -  DoubleDatum* dx = dynamic_cast< DoubleDatum* >( i->OStack.top().datum() );
    -  if ( not dx )
    -  {
    -    i->raiseerror( "Gammainc", "arguments must be doubles" );
    -    return;
    -  }
    -
    -  // computation via GSL
    -  gsl_sf_result result;
    -
    -  int status = gsl_sf_gamma_inc_P_e( da->get(), dx->get(), &result );
    -  if ( status )
    -  {
    -    i->raiseerror( "Gammainc[GSL]", gsl_strerror( status ) );
    -    return;
    -  }
    -
    -  // return result value through argument object still on stack
    -  ( *dx ) = result.val;
    -}
    -
    -// ---------------------------------------------------------------
    -
    -
    -// see mathematica.sli for documentation
    -void
    -SpecialFunctionsModule::LambertW0Function::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop(); // pop yourself
    -
    -  if ( i->OStack.load() < 1 )
    -  { // expect one arguments on stack
    -    i->raiseerror( "LambertW0", "one argument required" );
    -    return;
    -  }
    -
    -  // get argument, leave datum on stack
    -  DoubleDatum* dx = dynamic_cast< DoubleDatum* >( i->OStack.top().datum() );
    -  if ( not dx )
    -  {
    -    i->raiseerror( "LambertW0", "argument must be doubles" );
    -    return;
    -  }
    -
    -  // computation via GSL
    -  gsl_sf_result result;
    -  int status = gsl_sf_lambert_W0_e( dx->get(), &result );
    -  if ( status )
    -  {
    -    i->raiseerror( "LambertW0[GSL]", gsl_strerror( status ) );
    -    return;
    -  }
    -
    -  // return result value through argument object still on stack
    -  ( *dx ) = result.val;
    -}
    -
    -// see mathematica.sli for documentation
    -void
    -SpecialFunctionsModule::LambertWm1Function::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop(); // pop yourself
    -
    -  if ( i->OStack.load() < 1 )
    -  { // expect one arguments on stack
    -    i->raiseerror( "LambertWm1", "one argument required" );
    -    return;
    -  }
    -
    -  // get argument, leave datum on stack
    -  DoubleDatum* dx = dynamic_cast< DoubleDatum* >( i->OStack.top().datum() );
    -  if ( not dx )
    -  {
    -    i->raiseerror( "LambertWm1", "argument must be doubles" );
    -    return;
    -  }
    -
    -  // computation via GSL
    -  gsl_sf_result result;
    -  int status = gsl_sf_lambert_Wm1_e( dx->get(), &result );
    -  if ( status )
    -  {
    -    i->raiseerror( "LambertWm1[GSL]", gsl_strerror( status ) );
    -    return;
    -  }
    -
    -  // return result value through argument object still on stack
    -  ( *dx ) = result.val;
    -}
    -
    -
    -void
    -SpecialFunctionsModule::ErfFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop(); // pop yourself
    -
    -  if ( i->OStack.load() < 1 )
    -  { // expect one arguments on stack
    -    i->raiseerror( "Erf", "one argument required" );
    -    return;
    -  }
    -
    -  // get argument, leave datum on stack
    -  DoubleDatum* dx = dynamic_cast< DoubleDatum* >( i->OStack.top().datum() );
    -  if ( not dx )
    -  {
    -    i->raiseerror( "Erf", "arguments must be doubles" );
    -    return;
    -  }
    -
    -  // computation via GSL
    -  gsl_sf_result result;
    -  int status = gsl_sf_erf_e( dx->get(), &result );
    -  if ( status )
    -  {
    -    i->raiseerror( "Erf[GSL]", gsl_strerror( status ) );
    -    return;
    -  }
    -
    -  // return result value through argument object still on stack
    -  ( *dx ) = result.val;
    -}
    -
    -// ---------------------------------------------------------------
    -
    -void
    -SpecialFunctionsModule::ErfcFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->EStack.pop(); // pop yourself
    -
    -  if ( i->OStack.load() < 1 )
    -  { // expect one arguments on stack
    -    i->raiseerror( "Erfc", "one argument required" );
    -    return;
    -  }
    -
    -  // get argument, leave datum on stack
    -  DoubleDatum* dx = dynamic_cast< DoubleDatum* >( i->OStack.top().datum() );
    -  if ( not dx )
    -  {
    -    i->raiseerror( "Erfc", "arguments must be doubles" );
    -    return;
    -  }
    -
    -  // computation via GSL
    -  gsl_sf_result result;
    -  int status = gsl_sf_erfc_e( dx->get(), &result );
    -  if ( status )
    -  {
    -    i->raiseerror( "Erfc[GSL]", gsl_strerror( status ) );
    -    return;
    -  }
    -
    -  // return result value through argument object still on stack
    -  ( *dx ) = result.val;
    -}
    -
    -// ---------------------------------------------------------------
    -
    -gsl_function SpecialFunctionsModule::GaussDiskConvFunction::F_;
    -
    -
    -SpecialFunctionsModule::GaussDiskConvFunction::GaussDiskConvFunction()
    -{
    -  // allocate integration workspace
    -  w_ = gsl_integration_workspace_alloc( MAX_QUAD_SIZE );
    -
    -  // set integrand function
    -  F_.function = SpecialFunctionsModule::GaussDiskConvFunction::f_;
    -}
    -
    -SpecialFunctionsModule::GaussDiskConvFunction::~GaussDiskConvFunction()
    -{
    -  // free integration workspace
    -  gsl_integration_workspace_free( w_ );
    -}
    -
    -void
    -SpecialFunctionsModule::GaussDiskConvFunction::execute( SLIInterpreter* i ) const
    -{
    -
    -  i->EStack.pop(); // pop yourself
    -  i->assert_stack_load( 2 );
    -
    -  double r0 = i->OStack.top();
    -  double R = i->OStack.pick( 1 );
    -
    -  // copy arguments to doubles, square, as they are needed several times
    -  //  const double z = std::pow(r0, 2); // commented out, since unused. mog.
    -  const double y = std::pow( R, 2 );
    -
    -  // check for simple cases first
    -  gsl_sf_result X;
    -  double result;
    -  if ( y < 2 * GSL_DBL_EPSILON )
    -  { /* disk has zero diameter */
    -    result = 0.0;
    -  }
    -  else if ( r0 < 2 * GSL_DBL_EPSILON )
    -  { /* Gaussian is concentric */
    -    int status = gsl_sf_expm1_e( -y, &X );
    -    if ( not status )
    -    {
    -      result = -X.val;
    -    }
    -    else
    -    {
    -      i->raiseerror( "GaussDiskConv[GSL]", gsl_strerror( status ) );
    -      return;
    -    }
    -  }
    -  else if ( std::fabs( R - r0 ) < 2 * GSL_DBL_EPSILON )
    -  { /* Gaussian on perimeter */
    -    int status = gsl_sf_bessel_I0_scaled_e( 2.0 * y, &X );
    -    if ( not status )
    -    {
    -      result = 0.5 * ( 1.0 - X.val );
    -    }
    -    else
    -    {
    -      i->raiseerror( "GaussDiskConv[GSL]", gsl_strerror( status ) );
    -      return;
    -    }
    -  }
    -  else if ( R > r0 + sqrt( -log( GSL_DBL_EPSILON ) ) )
    -  { /* Gaussian in disk */
    -    result = 1.0;
    -  }
    -  else if ( y > 1 and r0 > R + sqrt( -log( GSL_DBL_EPSILON / y ) ) )
    -  { /* tail */
    -    result = 0.25 * R / r0 * ( std::exp( -( r0 - R ) * ( r0 - R ) ) - std::exp( -( r0 + R ) * ( r0 + R ) ) );
    -  }
    -  else
    -  { /* in all other cases, integration */
    -
    -    // parameter for integrand function
    -    F_.params = &r0;
    -
    -    double C = 0.0;
    -    double Cerr = 0.0;
    -    int status = gsl_integration_qag( &F_, 0.0, R, 0.0, QUAD_ERR_LIM, MAX_QUAD_SIZE, GSL_INTEG_GAUSS61, w_, &C, &Cerr );
    -
    -    if ( status )
    -    {
    -      i->raiseerror( "GaussDiskConv[GSL]", gsl_strerror( status ) );
    -      return;
    -    }
    -
    -    if ( C <= 1.0 )
    -    {
    -      result = C;
    -    }
    -    else
    -    {
    -      result = 1.0;
    -    }
    -  }
    -
    -  // return result value through argument object still on stack
    -  i->OStack.pop();
    -  i->OStack.top() = result;
    -}
    -
    -// integrand function --- C linkage, so we can pass it to GSL
    -extern "C" inline double
    -SpecialFunctionsModule::GaussDiskConvFunction::f_( double r, void* params )
    -{
    -  double r0 = *( double* ) params;
    -
    -  int status;
    -  gsl_sf_result X;
    -
    -  status = gsl_sf_bessel_I0_scaled_e( 2.0 * r * r0, &X );
    -  if ( status )
    -  {
    -    return GSL_NAN;
    -  }
    -  else
    -  {
    -    return 2.0 * r * exp( -( r - r0 ) * ( r - r0 ) ) * X.val;
    -  }
    -}
    -
    -// ---------------------------------------------------------------
    -
    -#else
    -
    -// dummy implementations when no GSL
    -
    -// ---------------------------------------------------------------
    -
    -void
    -SpecialFunctionsModule::GammaIncFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->raiseerror( "Gammainc", "Not implemented (no GSL)" );
    -}
    -
    -// ---------------------------------------------------------------
    -
    -void
    -SpecialFunctionsModule::LambertW0Function::execute( SLIInterpreter* i ) const
    -{
    -  i->raiseerror( "LambertW0", "Not implemented (no GSL)" );
    -}
    -
    -// ---------------------------------------------------------------
    -
    -void
    -SpecialFunctionsModule::LambertWm1Function::execute( SLIInterpreter* i ) const
    -{
    -  i->raiseerror( "LambertWm1", "Not implemented (no GSL)" );
    -}
    -
    -// ---------------------------------------------------------------
    -
    -void
    -SpecialFunctionsModule::ErfFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->raiseerror( "Erf", "Not implemented (no GSL)" );
    -}
    -
    -// ---------------------------------------------------------------
    -
    -void
    -SpecialFunctionsModule::ErfcFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->raiseerror( "Erfc", "Not implemented (no GSL)" );
    -}
    -
    -// ---------------------------------------------------------------
    -
    -SpecialFunctionsModule::GaussDiskConvFunction::GaussDiskConvFunction()
    -{
    -}
    -
    -SpecialFunctionsModule::GaussDiskConvFunction::~GaussDiskConvFunction()
    -{
    -}
    -
    -void
    -SpecialFunctionsModule::GaussDiskConvFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->raiseerror( "GaussDiskConv", "Not implemented (no GSL)" );
    -}
    -
    -// ---------------------------------------------------------------
    -#endif
    diff --git a/sli/specialfunctionsmodule.h b/sli/specialfunctionsmodule.h
    deleted file mode 100644
    index 679d2cfbd5..0000000000
    --- a/sli/specialfunctionsmodule.h
    +++ /dev/null
    @@ -1,268 +0,0 @@
    -/*
    - *  specialfunctionsmodule.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SPECIALFUNCTIONSMODULE_H
    -#define SPECIALFUNCTIONSMODULE_H
    -/*
    -    SLI Module implementing functions from the GNU Science Library.
    -    The GSL is available from sources.redhat.com/gsl.
    -*/
    -
    -/*
    -    NOTE: Special functions are available only if the GSL is installed.
    -          If no GSL is available, calling special functions will result
    -          in a SLI error message.  HEP 2002-09-19.
    -*/
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -#include "slimodule.h"
    -
    -#ifdef HAVE_GSL
    -// External include:
    -#include <gsl/gsl_integration.h>
    -#endif
    -
    -// NOTE: all gsl headers are included in specialfunctionsmodule.cc
    -
    -class SpecialFunctionsModule : public SLIModule
    -{
    -
    -  // Part 1: Methods pertaining to the module ----------------------
    -
    -public:
    -  SpecialFunctionsModule() {};
    -  // ~SpecialFunctionsModule(void);
    -
    -  // The Module is registered by a call to this Function:
    -  void init( SLIInterpreter* ) override;
    -
    -  // This function will return the name of our module:
    -  const std::string name() const override;
    -
    -
    -  // Part 2: Classes for the implemented functions -----------------
    -
    -
    -public:
    -  /**
    -   * Classes which implement the GSL Funktions.
    -   * These must be public, since we want to export
    -   * objects of these.
    -   */
    -  class GammaIncFunction : public SLIFunction
    -  {
    -  public:
    -    GammaIncFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class LambertW0Function : public SLIFunction
    -  {
    -  public:
    -    LambertW0Function()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -  class LambertWm1Function : public SLIFunction
    -  {
    -  public:
    -    LambertWm1Function()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class ErfFunction : public SLIFunction
    -  {
    -  public:
    -    ErfFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class ErfcFunction : public SLIFunction
    -  {
    -  public:
    -    ErfcFunction()
    -    {
    -    }
    -    void execute( SLIInterpreter* ) const override;
    -  };
    -
    -  class GaussDiskConvFunction : public SLIFunction
    -  {
    -  public:
    -    void execute( SLIInterpreter* ) const override;
    -
    -    // need constructor and destructor to set up integration workspace
    -    GaussDiskConvFunction();
    -    ~GaussDiskConvFunction() override;
    -
    -  private:
    -    // quadrature parameters, see GSL Reference
    -    static const int MAX_QUAD_SIZE;
    -    static const double QUAD_ERR_LIM;
    -    static const double QUAD_ERR_SCALE;
    -
    -// integration workspace
    -#ifdef HAVE_GSL
    -    gsl_integration_workspace* w_;
    -
    -    /**
    -     * Integrand function.
    -     * @note This function must be static with C linkage so that it can
    -     *       be passed to the GSL. Alternatively, one could define it
    -     *       outside the class.
    -     */
    -    static double f_( double, void* );
    -    static gsl_function F_; // GSL wrapper struct for it
    -#endif
    -  };
    -
    -  // Part 3: One instatiation of each new function class -----------
    -
    -public:
    -  const GammaIncFunction gammaincfunction;
    -  const LambertW0Function lambertw0function;
    -  const LambertWm1Function lambertwm1function;
    -  const ErfFunction erffunction;
    -  const ErfcFunction erfcfunction;
    -  const GaussDiskConvFunction gaussdiskconvfunction;
    -
    -  // Part 3b: Internal variables
    -private:
    -};
    -
    -
    -// Part 4: Documentation for all functions -------------------------
    -
    -/** @BeginDocumentation
    -
    -Name: Gammainc - incomplete gamma function
    -
    -Synopsis: x a Gammainc -> result
    -
    -Description: Computes the incomplete Gamma function
    -             int(t^(a-1)*exp(-t), t=0..x) / Gamma(a)
    -
    -Parameters:  x      (double): upper limit of integration
    -             a      (double): order of Gamma function
    -
    -Examples: 2.2 1.5 Gammainc -> 0.778615
    -
    -Author: H E Plesser
    -
    -FirstVersion: 2001-07-26
    -
    -Remarks: This is the incomplete Gamma function P(a,x) defined as no. 6.5.1
    -         in Abramowitz&Stegun.  Requires the GSL.
    -
    -References: http://sources.redhat.com/gsl/ref
    -*/
    -
    -/** @BeginDocumentation
    -
    -Name: Erf - error function
    -
    -Synopsis: x Erf -> result
    -
    -Description: Computes the error function
    -             erf(x) = 2/sqrt(pi) int_0^x dt exp(-t^2)
    -
    -Parameters:  x (double): error function argument
    -
    -Examples: 0.5 erf -> 0.5205
    -
    -Author: H E Plesser
    -
    -FirstVersion: 2001-07-30
    -
    -Remarks: Requires the GSL.
    -
    -References: http://sources.redhat.com/gsl/ref
    -
    -SeeAlso: Erfc
    -*/
    -
    -/** @BeginDocumentation
    -
    -Name: Erfc - complementary error function
    -
    -Synopsis: x Erfc -> result
    -
    -Description: Computes the error function
    -             erfc(x) = 1 - erf(x) = 2/sqrt(pi) int_x^inf dt exp(-t^2)
    -
    -Parameters:  x (double): error function argument
    -
    -Examples: 0.5 erfc -> 0.4795
    -
    -Author: H E Plesser
    -
    -FirstVersion: 2001-07-30
    -
    -Remarks: Requires the GSL.
    -
    -References: http://sources.redhat.com/gsl/ref
    -
    -SeeAlso: Erf
    -*/
    -
    -/** @BeginDocumentation
    -
    -Name:GaussDiskConv - Convolution of a Gaussian with an excentric disk
    -
    -Synopsis:R r0 GaussDiskConv -> result
    -
    -Description:Computes the convolution of an excentric normalized Gaussian
    -with a disk
    -
    -       C[R, r0] = IInt[ disk(rvec; R) * Gauss(rvec - r_0vec) d^2rvec ]
    -                = 2 Int[ r Exp[-r0^2-r^2] I_0[2 r r_0] dr, r=0..R]
    -
    -Parameters:R   radius of the disk, centered at origin
    -r0  distance of Gaussian center from origin
    -
    -Examples:SLI ] 3.2 2.3 GaussDiskConv =
    -0.873191
    -
    -Author:H E Plesser
    -
    -FirstVersion: 2002-07-12
    -
    -Remarks:This integral is needed to compute the response of a DOG model to
    - excentric light spots, see [1].  For technicalities, see [2].  Requires GSL.
    -
    -References: [1] G. T. Einevoll and P. Heggelund, Vis Neurosci 17:871-885 (2000).
    - [2] Hans E. Plesser, Convolution of an Excentric Gaussian with a Disk,
    -     Technical Report, arken.nlh.no/~itfhep, 2002
    -
    -*/
    -
    -#endif
    diff --git a/sli/stringdatum.cc b/sli/stringdatum.cc
    deleted file mode 100644
    index cc2eb676c4..0000000000
    --- a/sli/stringdatum.cc
    +++ /dev/null
    @@ -1,115 +0,0 @@
    -/*
    - *  stringdatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "stringdatum.h"
    -
    -// C++ includes:
    -#include <algorithm>
    -#include <cctype>
    -
    -// Includes from sli:
    -#include "tokenutils.h"
    -
    -// initialization of static members requires template<>
    -// see Stroustrup C.13.1 --- HEP 2001-08-09
    -template <>
    -nest::pool AggregateDatum< std::string, &SLIInterpreter::Stringtype >::memory(
    -  sizeof( AggregateDatum< std::string, &SLIInterpreter::Stringtype > ),
    -  100,
    -  1 );
    -
    -template <>
    -void
    -AggregateDatum< std::string, &SLIInterpreter::Stringtype >::pprint( std::ostream& out ) const
    -{
    -  out << '(';
    -  print( out );
    -  out << ')';
    -}
    -
    -const ToUppercase_sFunction touppercase_sfunction;
    -const ToLowercase_sFunction tolowercase_sfunction;
    -
    -/** @BeginDocumentation
    -   Name: ToUppercase - Convert a string to upper case.
    -   Synopsis:
    -   (string) ToUppercase -> (string)
    -   Description:
    -   ToUppercase converts a string to upper case. If no upper case
    -   representation of a letter exists, the letter is kept unchanged.
    -
    -   Examples:
    -   SLI ] (MiXeD cAsE) ToUppercase
    -   (MIXED CASE)
    -
    -   Author: Jochen Martin Eppler
    -   SeeAlso: ToLowercase
    -*/
    -void
    -ToUppercase_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  StringDatum sd = getValue< StringDatum >( i->OStack.top() );
    -  std::string* str = dynamic_cast< std::string* >( &sd );
    -  std::transform( str->begin(), str->end(), str->begin(), toupper );
    -
    -  i->OStack.pop();
    -  i->OStack.push( new StringDatum( str->c_str() ) );
    -  i->EStack.pop();
    -}
    -
    -/** @BeginDocumentation
    -   Name: ToLowercase - Convert a string to lower case.
    -   Synopsis:
    -   (string) ToLowercase -> (string)
    -   Description:
    -   ToLowercase converts a string to lower case. If no lower case
    -   representation of a letter exists, the letter is kept unchanged.
    -
    -   Examples:
    -   SLI ] (MiXeD cAsE) ToLowercase
    -   (mixed case)
    -
    -   Author: Jochen Martin Eppler
    -   SeeAlso: ToUppercase
    -*/
    -void
    -ToLowercase_sFunction::execute( SLIInterpreter* i ) const
    -{
    -  i->assert_stack_load( 1 );
    -
    -  StringDatum sd = getValue< StringDatum >( i->OStack.top() );
    -  std::string* str = dynamic_cast< std::string* >( &sd );
    -  std::transform( str->begin(), str->end(), str->begin(), tolower );
    -
    -  i->OStack.pop();
    -  i->OStack.push( new StringDatum( str->c_str() ) );
    -  i->EStack.pop();
    -}
    -
    -void
    -init_slistring( SLIInterpreter* i )
    -{
    -  i->createcommand( "ToUppercase", &touppercase_sfunction );
    -  i->createcommand( "ToLowercase", &tolowercase_sfunction );
    -}
    diff --git a/sli/stringdatum.h b/sli/stringdatum.h
    deleted file mode 100644
    index e5b10e74d6..0000000000
    --- a/sli/stringdatum.h
    +++ /dev/null
    @@ -1,99 +0,0 @@
    -/*
    - *  stringdatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef STRINGDATUM_H
    -#define STRINGDATUM_H
    -
    -// C++ includes:
    -#include <string>
    -//  #include <typeinfo>
    -
    -// Includes from sli:
    -#include "aggregatedatum.h"
    -#include "interpret.h"
    -#include "slifunction.h"
    -
    -//  class StringDatum: public AggregateDatum<string,&SLIInterpreter::Stringtype>
    -//  {
    -//      Datum * clone(void) const
    -//      {
    -//          return new StringDatum(*this);
    -//      }
    -//  public:
    -//      StringDatum():
    -//              AggregateDatum<string,&SLIInterpreter::Stringtype>() {}
    -//      StringDatum(const string &s):
    -//              AggregateDatum<string,&SLIInterpreter::Stringtype>(s) {}
    -//      StringDatum(const StringDatum &d):
    -//              AggregateDatum<string,&SLIInterpreter::Stringtype>(d) {}
    -//      ~StringDatum()
    -//      {}
    -
    -//      void pprint(ostream &) const;
    -//  };
    -
    -
    -/* These are declarations to specialize the static memory pool BEFORE
    -   we instantiate the AggregateDatum. Note, that this is only a declaration,
    -   because we do not provide an initializer (see ISO14882 Sec.  14.7.3.15.)
    -   The definition is given in the *.CC file with the appropriate
    -   initializer.
    -
    -   Note that SUN's Forte 6.2 does not handle this correctly, so we have
    -   to use a compiler-switch. 1.2002 Gewaltig
    -
    -   The Alpha cxx V6.3-002 says that storage class extern is not allowed here,
    -   so I removed it. 15.2.2002 Diesmann
    -*/
    -#ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS
    -template <>
    -nest::pool AggregateDatum< std::string, &SLIInterpreter::Stringtype >::memory;
    -#endif
    -
    -
    -template <>
    -void AggregateDatum< std::string, &SLIInterpreter::Stringtype >::pprint( std::ostream& out ) const;
    -
    -
    -typedef AggregateDatum< std::string, &SLIInterpreter::Stringtype > StringDatum;
    -
    -void init_slistring( SLIInterpreter* );
    -
    -class ToUppercase_sFunction : public SLIFunction
    -{
    -public:
    -  ToUppercase_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -class ToLowercase_sFunction : public SLIFunction
    -{
    -public:
    -  ToLowercase_sFunction()
    -  {
    -  }
    -  void execute( SLIInterpreter* ) const override;
    -};
    -
    -#endif
    diff --git a/sli/symboldatum.cc b/sli/symboldatum.cc
    deleted file mode 100644
    index 954eaf3532..0000000000
    --- a/sli/symboldatum.cc
    +++ /dev/null
    @@ -1,29 +0,0 @@
    -/*
    - *  symboldatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "symboldatum.h"
    -
    -
    -// initialization of static members requires template<>
    -// see Stroustrup C.13.1 --- HEP 2001-08-09
    -template <>
    -nest::pool AggregateDatum< Name, &SLIInterpreter::Symboltype >::memory( sizeof( SymbolDatum ), 100, 1 );
    diff --git a/sli/symboldatum.h b/sli/symboldatum.h
    deleted file mode 100644
    index 9e3ee9f5ca..0000000000
    --- a/sli/symboldatum.h
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    - *  symboldatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef SYMBOLDATUM_H
    -#define SYMBOLDATUM_H
    -
    -// Include all headers, needed to use token and datum objects
    -
    -// C++ includes:
    -#include <string>
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "aggregatedatum.h"
    -#include "interpret.h"
    -#include "name.h"
    -
    -/* These are declarations to specialize the static memory pool BEFORE
    -   we instantiate the AggregateDatum. Note, that this is onlz a declaration,
    -   because we do not provide an initializer (see ISO14882 Sec.  14.7.3.15.)
    -   The definition is given in the *.CC file with the appropriate
    -   initializer.
    -
    -   Note that SUN's Forte 6.2 does not handle this correctly, so we have
    -   to use a compiler-switch.
    -*/
    -#ifndef HAVE_STATIC_TEMPLATE_DECLARATION_FAILS
    -template <>
    -nest::pool AggregateDatum< Name, &SLIInterpreter::Symboltype >::memory;
    -#endif
    -
    -class SymbolDatum : public AggregateDatum< Name, &SLIInterpreter::Symboltype >
    -{
    -  Datum*
    -  clone() const override
    -  {
    -    return new SymbolDatum( *this );
    -  }
    -
    -public:
    -  SymbolDatum( const Name& n )
    -    : AggregateDatum< Name, &SLIInterpreter::Symboltype >( n )
    -  {
    -  }
    -  SymbolDatum( const SymbolDatum& n )
    -    : AggregateDatum< Name, &SLIInterpreter::Symboltype >( n )
    -  {
    -  }
    -  ~SymbolDatum() override
    -  {
    -  }
    -};
    -
    -#endif
    diff --git a/sli/tarrayobj.cc b/sli/tarrayobj.cc
    deleted file mode 100644
    index 2a8e978386..0000000000
    --- a/sli/tarrayobj.cc
    +++ /dev/null
    @@ -1,692 +0,0 @@
    -/*
    - *  tarrayobj.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "tarrayobj.h"
    -
    -// Includes from sli:
    -#include "datum.h"
    -#include "token.h"
    -
    -#ifdef assert
    -#undef assert
    -#define assert( a )
    -#endif
    -
    -size_t TokenArrayObj::allocations = 0;
    -
    -TokenArrayObj::TokenArrayObj( size_t s, const Token& t, size_t alloc )
    -  : p( nullptr )
    -  , begin_of_free_storage( nullptr )
    -  , end_of_free_storage( nullptr )
    -  , alloc_block_size( ARRAY_ALLOC_SIZE )
    -  , refs_( 1 )
    -{
    -  size_t a = ( alloc == 0 ) ? s : alloc;
    -
    -  resize( s, a, t );
    -}
    -
    -
    -TokenArrayObj::TokenArrayObj( const TokenArrayObj& a )
    -  : p( nullptr )
    -  , begin_of_free_storage( nullptr )
    -  , end_of_free_storage( nullptr )
    -  , alloc_block_size( ARRAY_ALLOC_SIZE )
    -  , refs_( 1 )
    -{
    -  if ( a.p )
    -  {
    -    resize( a.size(), a.alloc_block_size, Token() );
    -    Token* from = a.p;
    -    Token* to = p;
    -
    -    while ( to < begin_of_free_storage )
    -    {
    -      *to++ = *from++;
    -    }
    -  }
    -}
    -
    -
    -TokenArrayObj::~TokenArrayObj()
    -{
    -  if ( p )
    -  {
    -    delete[] p;
    -  }
    -}
    -
    -void
    -TokenArrayObj::allocate( size_t new_s, size_t new_c, size_t new_a, const Token& t )
    -{
    -  // This resize function is private and does an unconditional resize, using
    -  // all supplied parameters.
    -
    -  alloc_block_size = new_a;
    -
    -  size_t old_s = size();
    -
    -  assert( new_c != 0 );
    -  assert( new_a != 0 );
    -
    -  Token* h = new Token[ new_c ];
    -  assert( h );
    -
    -  if ( t != Token() )
    -  {
    -    for ( Token* hi = h; hi < h + new_c; ++hi )
    -    {
    -      ( *hi ) = t;
    -    }
    -  }
    -
    -  end_of_free_storage = h + new_c; // [,) convention
    -  begin_of_free_storage = h + new_s;
    -
    -  if ( p )
    -  {
    -
    -    size_t min_l;
    -
    -    if ( old_s < new_s )
    -    {
    -      min_l = old_s;
    -    }
    -    else
    -    {
    -      min_l = new_s;
    -    }
    -
    -    for ( size_t i = 0; i < min_l; ++i ) // copy old parts
    -    {
    -      h[ i ].move( p[ i ] );
    -    }
    -    delete[] p;
    -  }
    -  p = h;
    -  assert( p );
    -
    -  ++allocations;
    -}
    -
    -void
    -TokenArrayObj::resize( size_t s, size_t alloc, const Token& t )
    -{
    -  alloc_block_size = ( alloc == 0 ) ? alloc_block_size : alloc;
    -
    -  if ( ( s != size() and ( s != 0 ) ) or ( size() == 0 and alloc_block_size != 0 ) )
    -  {
    -    allocate( s, s + alloc_block_size, alloc_block_size, t );
    -  }
    -}
    -
    -void
    -TokenArrayObj::resize( size_t s, const Token& t )
    -{
    -  resize( s, alloc_block_size, t );
    -}
    -
    -const TokenArrayObj&
    -TokenArrayObj::operator=( const TokenArrayObj& a )
    -{
    -  if ( capacity() >= a.size() )
    -  // This branch also covers the case where a is the null-vector.
    -  {
    -    Token* to = begin();
    -    Token* from = a.begin();
    -    while ( from < a.end() )
    -    {
    -      *to++ = *from++;
    -    }
    -
    -    while ( to < end() )
    -    {
    -      to->clear();
    -      to++;
    -    }
    -    begin_of_free_storage = p + a.size();
    -
    -    assert( begin_of_free_storage <= end_of_free_storage );
    -  }
    -  else
    -  {
    -
    -    if ( p )
    -    {
    -      delete[] p;
    -      p = nullptr;
    -    }
    -
    -    resize( a.size(), a.alloc_block_size );
    -    Token* to = begin();
    -    Token* from = a.begin();
    -    while ( from < a.end() )
    -    {
    -      *to++ = *from++;
    -    }
    -    begin_of_free_storage = to;
    -    assert( begin_of_free_storage <= end_of_free_storage );
    -  }
    -
    -  return *this;
    -}
    -
    -
    -// re-allocate, if the actual buffer is larger
    -// than alloc_block_size
    -
    -// bool TokenArrayObj::shrink(void)
    -// {
    -//     static const size_t hyst=1;
    -//     size_t old_size = size();
    -
    -//     size_t n = old_size/alloc_block_size + 1 + hyst;
    -//     size_t new_capacity = n*alloc_block_size;
    -
    -//     if( new_capacity < capacity())
    -//     {
    -//       allocate(old_size, new_capacity, alloc_block_size);
    -//       return true;
    -//     }
    -//     return false;
    -// }
    -
    -bool
    -TokenArrayObj::shrink()
    -{
    -  size_t new_capacity = size();
    -
    -  if ( new_capacity < capacity() )
    -  {
    -    allocate( size(), new_capacity, alloc_block_size );
    -    return true;
    -  }
    -  return false;
    -}
    -
    -bool
    -TokenArrayObj::reserve( size_t new_capacity )
    -{
    -  if ( new_capacity > capacity() )
    -  {
    -    allocate( size(), new_capacity, alloc_block_size );
    -    return true;
    -  }
    -  return false;
    -}
    -
    -
    -void
    -TokenArrayObj::rotate( Token* first, Token* middle, Token* last )
    -{
    -
    -  // This algorithm is taken from the HP STL implementation.
    -  if ( first < middle and middle < last )
    -  {
    -    for ( Token* i = middle;; )
    -    {
    -      first->swap( *i );
    -      i++;
    -      first++;
    -
    -      if ( first == middle )
    -      {
    -        if ( i == last )
    -        {
    -          return;
    -        }
    -        middle = i;
    -      }
    -      else if ( i == last )
    -      {
    -        i = middle;
    -      }
    -    }
    -  }
    -}
    -
    -void
    -TokenArrayObj::erase( Token* first, Token* last )
    -{
    -  // this algorithm we also use in replace_move
    -  // array is decreasing. we move elements after point of
    -  // erasure from right to left
    -  Token* from = last;
    -  Token* to = first;
    -  Token* end = begin_of_free_storage; // 1 ahead  as conventional
    -
    -  while ( from < end )
    -  {
    -    if ( to->p )
    -    {
    -      // deleting nullptr pointer is safe in ISO C++
    -      to->p->removeReference();
    -    }
    -    to->p = from->p;   // move
    -    from->p = nullptr; // might be overwritten or not
    -    ++from;
    -    ++to;
    -  }
    -
    -  while ( last > to ) // if sequence we have to erase is
    -  {                   // longer than the sequence to the
    -    --last;           // right of it, we explicitly delete the
    -    if ( last->p )
    -    {
    -      // elements which are still intact
    -      last->p->removeReference();
    -    }
    -    last->p = nullptr; // after the move above.
    -  }
    -
    -  begin_of_free_storage = to;
    -}
    -
    -// as for strings erase tolerates i+n >=  size()
    -//
    -void
    -TokenArrayObj::erase( size_t i, size_t n )
    -{
    -  if ( i + n < size() )
    -  {
    -    erase( p + i, p + i + n );
    -  }
    -  else
    -  {
    -    erase( p + ( i ), p + size() );
    -  }
    -}
    -
    -void
    -TokenArrayObj::clear()
    -{
    -  if ( p )
    -  {
    -    delete[] p;
    -  }
    -  p = begin_of_free_storage = end_of_free_storage = nullptr;
    -  alloc_block_size = 1;
    -}
    -
    -// reduce() could be further optimized by testing wether the
    -// new size leads to a resize. In this case, one could simply
    -// re-construct the array with the sub-array.
    -
    -void
    -TokenArrayObj::reduce( Token* first, Token* last )
    -{
    -  assert( last <= end() );
    -  assert( first >= p );
    -
    -  // First step: shift all elements to the begin of
    -  // the array.
    -  Token *i = p, *j = first;
    -
    -  if ( first > begin() )
    -  {
    -    while ( j < last )
    -    {
    -      i->move( *j );
    -      i++;
    -      j++;
    -    }
    -    assert( j == last );
    -  }
    -  else
    -  {
    -    i = last;
    -  }
    -
    -  assert( i == p + ( last - first ) );
    -
    -  while ( i < end() )
    -  {
    -    i->clear();
    -    i++;
    -  }
    -  begin_of_free_storage = p + ( size_t ) ( last - first );
    -  // shrink();
    -}
    -
    -// as assign for strings reduce tolerates i+n >= size()
    -//
    -void
    -TokenArrayObj::reduce( size_t i, size_t n )
    -{
    -  if ( i + n < size() )
    -  {
    -    reduce( p + i, p + i + n );
    -  }
    -  else
    -  {
    -    reduce( p + ( i ), p + size() );
    -  }
    -}
    -
    -void
    -TokenArrayObj::insert( size_t i, size_t n, const Token& t )
    -{
    -  // pointer argument pos would not be efficient because we
    -  // have to recompute pointer anyway after reallocation
    -
    -  reserve( size() + n ); // reallocate if necessary
    -
    -  Token* pos = p + i;                      // pointer to element i (starting with 0)
    -  Token* from = begin_of_free_storage - 1; // first Token which has to be moved
    -  Token* to = from + n;                    // new location of first Token
    -
    -  while ( from >= pos )
    -  {
    -    to->p = from->p;   // move
    -    from->p = nullptr; // knowing that to->p is
    -    --from;
    -    --to; // nullptr before
    -  }
    -
    -  for ( size_t i = 0; i < n; ++i ) // insert n copies of Token t;
    -  {
    -    *( pos++ ) = t;
    -  }
    -
    -  begin_of_free_storage += n; // new size is old + n
    -}
    -
    -void
    -TokenArrayObj::insert_move( size_t i, TokenArrayObj& a )
    -{
    -  reserve( size() + a.size() );                                      // reallocate if necessary
    -  assert( begin_of_free_storage + a.size() <= end_of_free_storage ); // check
    -
    -  Token* pos = p + i;                      // pointer to element i (starting with 0)
    -  Token* from = begin_of_free_storage - 1; // first Token which has to be moved
    -  Token* to = from + a.size();             // new location of first Token
    -
    -
    -  while ( from >= pos )
    -  {
    -    to->p = from->p;   // move
    -    from->p = nullptr; // knowing that to->p is
    -    --from;
    -    --to; // nullptr before
    -  }
    -
    -  from = a.p;
    -  to = p + i;
    -
    -  while ( from < a.end() )
    -  {
    -    to->p = from->p;   // we cannot do this in the loop
    -    from->p = nullptr; // above because of overlapping
    -    ++from;
    -    ++to;
    -  }
    -
    -  begin_of_free_storage += a.size(); // new size is old + n
    -  a.begin_of_free_storage = a.p;     // a is empty.
    -}
    -
    -void
    -TokenArrayObj::assign_move( TokenArrayObj& a, size_t i, size_t n )
    -{
    -  reserve( n );
    -
    -  Token* from = a.begin() + i;
    -  Token* end = a.begin() + i + n;
    -  Token* to = p;
    -
    -  while ( from < end )
    -  {
    -    to->p = from->p;
    -    from->p = nullptr;
    -    ++from;
    -    ++to;
    -  }
    -
    -  begin_of_free_storage = p + n;
    -}
    -
    -void
    -TokenArrayObj::assign( const TokenArrayObj& a, size_t i, size_t n )
    -{
    -  reserve( n );
    -
    -  Token* from = a.begin() + i;
    -  Token* end = a.begin() + i + n;
    -  Token* to = p;
    -
    -  while ( from < end )
    -  {
    -    *to = *from;
    -    ++from;
    -    ++to;
    -  }
    -
    -  begin_of_free_storage = p + n;
    -}
    -
    -void
    -TokenArrayObj::insert_move( size_t i, Token& t )
    -{
    -  reserve( size() + 1 );                                      // reallocate if necessary
    -  assert( begin_of_free_storage + 1 <= end_of_free_storage ); // check
    -
    -  Token* pos = p + i;                      // pointer to element i (starting with 0)
    -  Token* from = begin_of_free_storage - 1; // first Token which has to be moved
    -  Token* to = from + 1;                    // new location of first Token
    -
    -  while ( from >= pos )
    -  {
    -    to->p = from->p;   // move
    -    from->p = nullptr; // knowing that to->p is
    -    --from;
    -    --to; // nullptr before
    -  }
    -
    -  ( p + i )->p = t.p; // move contens of t
    -  t.p = nullptr;
    -
    -  begin_of_free_storage += 1; // new size is old + 1
    -}
    -
    -
    -void
    -TokenArrayObj::replace_move( size_t i, size_t n, TokenArrayObj& a )
    -{
    -  assert( i < size() ); // assume index in range
    -  // n more than available is allowed
    -  n = ( size() - i < n ) ? ( size() - i ) : n;
    -
    -  long d = a.size() - n; // difference size after the replacement,
    -                         // positive for increase
    -
    -  reserve( size() + d ); // reallocate if necessary
    -
    -  if ( d > 0 )
    -  {
    -    // array is increasing. we move elements after point of
    -    // replacement from left to right
    -    Token* from = begin_of_free_storage - 1;
    -    Token* to = begin_of_free_storage - 1 + d;
    -    Token* end = p + i + n - 1; // 1 ahead (before)  as conventional
    -
    -    while ( from > end )
    -    {
    -      to->p = from->p;   // move
    -      from->p = nullptr; // might be overwritten or not
    -      --from;
    -      --to;
    -    }
    -  }
    -  else if ( d < 0 )
    -  {
    -    // array is decreasing. we move elements after point of
    -    // replacement from right to left
    -    Token* last = p + i + n;
    -    Token* from = last;
    -    Token* to = p + i + a.size();
    -    Token* end = begin_of_free_storage; // 1 ahead  as conventional
    -
    -    while ( from < end )
    -    {
    -      if ( to->p )
    -      {
    -        // deleting nullptr pointer is safe in ISO C++
    -        to->p->removeReference();
    -      }
    -      to->p = from->p;   // move
    -      from->p = nullptr; // might be overwritten or not
    -      ++from;
    -      ++to;
    -    }
    -
    -    while ( last > to ) // if sequence we have to erase is
    -    {                   // longer than a plus the sequence to the
    -      --last;           // right of it, we explicitly delete the
    -      if ( last->p )
    -      {
    -        // elements which are still intact
    -        last->p->removeReference();
    -      }
    -      last->p = nullptr; // after the move above.
    -    }
    -  }
    -
    -  begin_of_free_storage += d; // set new size
    -
    -
    -  // move contens of array a
    -  Token* to = p + i;
    -  Token* end = a.end(); // 1 ahead as conventional
    -  Token* from = a.begin();
    -
    -  while ( from < end )
    -  {
    -    if ( to->p )
    -    {
    -      // delete target before
    -      to->p->removeReference();
    -    }
    -    to->p = from->p;   // movement, it is typically
    -    from->p = nullptr; // not the nullptr pointer
    -    ++from;
    -    ++to;
    -  }
    -}
    -
    -void
    -TokenArrayObj::append_move( TokenArrayObj& a )
    -{
    -  reserve( size() + a.size() );                                      // reallocate if necessary
    -  assert( begin_of_free_storage + a.size() <= end_of_free_storage ); // check
    -
    -  Token* from = a.p;
    -  Token* to = begin_of_free_storage;
    -
    -  while ( from < a.end() ) // move
    -  {                        // knowing that to->p is
    -    to->p = from->p;       // nullptr before
    -    from->p = nullptr;
    -    ++from;
    -    ++to;
    -  }
    -
    -  begin_of_free_storage += a.size(); // new size is old + n
    -  a.begin_of_free_storage = a.p;     // a is empty.
    -}
    -
    -
    -bool
    -TokenArrayObj::operator==( const TokenArrayObj& a ) const
    -{
    -  if ( p == a.p )
    -  {
    -    return true;
    -  }
    -
    -  if ( size() != a.size() )
    -  {
    -    return false;
    -  }
    -
    -  Token *i = begin(), *j = a.begin();
    -  while ( i < end() )
    -  {
    -    if ( not( *i++ == *j++ ) )
    -    {
    -      return false;
    -    }
    -  }
    -  return true;
    -}
    -
    -void
    -TokenArrayObj::info( std::ostream& out ) const
    -{
    -  out << "TokenArrayObj::info\n";
    -  out << "p    = " << p << std::endl;
    -  out << "bofs = " << begin_of_free_storage << std::endl;
    -  out << "eofs = " << end_of_free_storage << std::endl;
    -  out << "abs  = " << alloc_block_size << std::endl;
    -}
    -
    -bool
    -TokenArrayObj::valid() const
    -{
    -  if ( not p )
    -  {
    -    std::cerr << "TokenArrayObj::valid: Data pointer missing!" << std::endl;
    -    return false;
    -  }
    -
    -  if ( not begin_of_free_storage )
    -  {
    -    std::cerr << "TokenArrayObj::valid: begin of free storage pointer missing!" << std::endl;
    -    return false;
    -  }
    -
    -  if ( not end_of_free_storage )
    -  {
    -    std::cerr << "TokenArrayObj::valid: end of free storage pointer missing!" << std::endl;
    -    return false;
    -  }
    -
    -  if ( begin_of_free_storage > end_of_free_storage )
    -  {
    -    std::cerr << "TokenArrayObj::valid: begin_of_free_storage  > end_of_free_storage !" << std::endl;
    -    return false;
    -  }
    -
    -  return true;
    -}
    -
    -
    -std::ostream&
    -operator<<( std::ostream& out, const TokenArrayObj& a )
    -{
    -
    -  for ( Token* i = a.begin(); i < a.end(); ++i )
    -  {
    -    out << *i << ' ';
    -  }
    -
    -  return out;
    -}
    diff --git a/sli/tarrayobj.h b/sli/tarrayobj.h
    deleted file mode 100644
    index c36730c4bc..0000000000
    --- a/sli/tarrayobj.h
    +++ /dev/null
    @@ -1,287 +0,0 @@
    -/*
    - *  tarrayobj.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef TARRAYOBJ_H
    -#define TARRAYOBJ_H
    -/*
    -    Array of Tokens
    -*/
    -
    -// C++ includes:
    -#include <cstddef>
    -#include <typeinfo>
    -
    -// Includes from sli:
    -#include "token.h"
    -
    -#define ARRAY_ALLOC_SIZE 64
    -
    -class Token;
    -
    -class TokenArrayObj
    -{
    -private:
    -  Token* p;
    -  Token* begin_of_free_storage;
    -  Token* end_of_free_storage;
    -  unsigned int alloc_block_size;
    -  unsigned int refs_;
    -
    -  //  bool homogeneous;
    -
    -  void allocate( size_t, size_t, size_t, const Token& = Token() );
    -
    -  static size_t allocations;
    -
    -public:
    -  TokenArrayObj()
    -    : p( nullptr )
    -    , begin_of_free_storage( nullptr )
    -    , end_of_free_storage( nullptr )
    -    , alloc_block_size( ARRAY_ALLOC_SIZE )
    -    , refs_( 1 ) {};
    -
    -  TokenArrayObj( size_t, const Token& = Token(), size_t = 0 );
    -  TokenArrayObj( const TokenArrayObj& );
    -
    -  virtual ~TokenArrayObj();
    -
    -  Token*
    -  begin() const
    -  {
    -    return p;
    -  }
    -
    -  Token*
    -  end() const
    -  {
    -    return begin_of_free_storage;
    -  }
    -
    -  size_t
    -  size() const
    -  {
    -    return ( size_t ) ( begin_of_free_storage - p );
    -  }
    -
    -  size_t
    -  capacity() const
    -  {
    -    return ( size_t ) ( end_of_free_storage - p );
    -  }
    -
    -  Token&
    -  operator[]( size_t i )
    -  {
    -    return p[ i ];
    -  }
    -
    -  const Token&
    -  operator[]( size_t i ) const
    -  {
    -    return p[ i ];
    -  }
    -
    -  const Token&
    -  get( long i ) const
    -  {
    -    return *( p + i );
    -    //      return p[i];
    -  }
    -
    -  bool
    -  index_is_valid( long i ) const
    -  {
    -    return ( p + i ) < begin_of_free_storage;
    -  }
    -
    -  void rotate( Token*, Token*, Token* );
    -
    -
    -  // Memory allocation
    -
    -  bool shrink();
    -  bool reserve( size_t );
    -
    -  unsigned int
    -  references()
    -  {
    -    return refs_;
    -  }
    -
    -  unsigned int
    -  remove_reference()
    -  {
    -    --refs_;
    -    if ( refs_ == 0 )
    -    {
    -      delete this;
    -      return 0;
    -    }
    -
    -    return refs_;
    -  }
    -
    -  unsigned int
    -  add_reference()
    -  {
    -    return ++refs_;
    -  }
    -
    -  void resize( size_t, size_t, const Token& = Token() );
    -  void resize( size_t, const Token& = Token() );
    -
    -  void
    -  reserve_token( size_t n )
    -  {
    -    if ( capacity() < size() + 1 + n )
    -    {
    -      reserve( size() + n );
    -    }
    -  }
    -  // Insertion, deletion
    -  void
    -  push_back( const Token& t )
    -  {
    -    if ( capacity() < size() + 1 )
    -    {
    -      reserve( size() + alloc_block_size );
    -    }
    -
    -    ( begin_of_free_storage++ )->init_by_copy( t );
    -  }
    -
    -  void
    -  push_back_move( Token& t )
    -  {
    -    if ( capacity() < size() + 1 )
    -    {
    -      reserve( size() + alloc_block_size );
    -    }
    -
    -    ( begin_of_free_storage++ )->init_move( t );
    -  }
    -
    -  /**
    -   * Push back a reference.  This function expects that enough space
    -   * on the stack has been reserved and that the token points to a
    -   * valid datum object.
    -   */
    -  void
    -  push_back_by_ref( const Token& t )
    -  {
    -    if ( capacity() < size() + 1 )
    -    {
    -      reserve( size() + alloc_block_size );
    -    }
    -
    -    ( begin_of_free_storage++ )->init_by_ref( t );
    -  }
    -
    -  /**
    -   * Push back a datum pointer.  This function assumes that enough
    -   * space on the stack has been reserved.  This function expects a
    -   * valid datum pointer and increases the reference count of the
    -   * datum.
    -   */
    -  void
    -  push_back_by_pointer( Datum* rhs )
    -  {
    -    if ( capacity() < size() + 1 )
    -    {
    -      reserve( size() + alloc_block_size );
    -    }
    -
    -    begin_of_free_storage->init_by_pointer( rhs );
    -    ++begin_of_free_storage;
    -  }
    -
    -  void
    -  assign_move( Token* tp, Token& t )
    -  {
    -    tp->move( t );
    -  }
    -
    -  void
    -  pop_back()
    -  {
    -    ( --begin_of_free_storage )->clear();
    -  }
    -
    -  // Erase the range given by the iterators.
    -  void erase( size_t, size_t );
    -  void erase( Token*, Token* );
    -  void
    -  erase( Token* tp )
    -  {
    -    erase( tp, tp + 1 );
    -  }
    -
    -  // Reduce the array to the range given by the iterators
    -  void reduce( Token*, Token* );
    -  void reduce( size_t, size_t );
    -
    -  void insert( size_t, size_t = 1, const Token& = Token() );
    -  void
    -  insert( size_t i, const Token& t )
    -  {
    -    insert( i, 1, t );
    -  }
    -
    -  void insert_move( size_t, TokenArrayObj& );
    -  void insert_move( size_t, Token& );
    -
    -  void assign_move( TokenArrayObj&, size_t, size_t );
    -  void assign( const TokenArrayObj&, size_t, size_t );
    -
    -  void replace_move( size_t, size_t, TokenArrayObj& );
    -
    -  void append_move( TokenArrayObj& );
    -
    -  void clear();
    -
    -
    -  const TokenArrayObj& operator=( const TokenArrayObj& );
    -
    -  bool operator==( const TokenArrayObj& ) const;
    -
    -  bool
    -  empty() const
    -  {
    -    return size() == 0;
    -  }
    -
    -  void info( std::ostream& ) const;
    -
    -  static size_t
    -  getallocations()
    -  {
    -    return allocations;
    -  }
    -
    -  bool valid() const; // check integrity
    -};
    -
    -std::ostream& operator<<( std::ostream&, const TokenArrayObj& );
    -
    -
    -#endif
    diff --git a/sli/token.cc b/sli/token.cc
    deleted file mode 100644
    index d565c5de41..0000000000
    --- a/sli/token.cc
    +++ /dev/null
    @@ -1,204 +0,0 @@
    -/*
    - *  token.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "token.h"
    -
    -// C++ includes:
    -#include <algorithm>
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "datum.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "name.h"
    -#include "stringdatum.h"
    -#include "tokenarray.h"
    -#include "tokenutils.h"
    -
    -
    -/***********************************************************/
    -/* Definitions for Token                                       */
    -/***********************************************************/
    -
    -// The copy-contructor must perform a kind of bootstrapping,
    -// since we cannot use the copy-contructor of the datum to
    -// create the new entry.
    -// Thus, this constructor must only be called by the
    -// (virtual) Datum members who create new Datums
    -
    -
    -Token::Token( int value )
    -{
    -  p = new IntegerDatum( value );
    -}
    -
    -Token::Token( unsigned int value )
    -{
    -  p = new IntegerDatum( value );
    -}
    -
    -Token::Token( long value )
    -{
    -  p = new IntegerDatum( value );
    -}
    -
    -Token::Token( unsigned long value )
    -{
    -  p = new IntegerDatum( value );
    -}
    -
    -#ifdef HAVE_32BIT_ARCH
    -Token::Token( uint64_t value )
    -{
    -  p = new IntegerDatum( value );
    -}
    -#endif
    -
    -Token::Token( double value )
    -{
    -  p = new DoubleDatum( value );
    -}
    -
    -Token::Token( bool value )
    -{
    -  p = new BoolDatum( value );
    -}
    -
    -Token::Token( const char* value )
    -{
    -  p = new StringDatum( value );
    -}
    -
    -Token::Token( std::string value )
    -{
    -  p = new StringDatum( value );
    -}
    -
    -Token::Token( const std::vector< long >& value )
    -{
    -  p = new ArrayDatum( value );
    -}
    -
    -Token::Token( const std::vector< size_t >& value )
    -{
    -  p = new ArrayDatum( value );
    -}
    -
    -Token::Token( const std::vector< double >& value )
    -{
    -  p = new ArrayDatum( value );
    -}
    -
    -/*
    -Token::operator Datum* () const
    -{
    -  return p;
    -}
    -*/
    -
    -Token::operator long() const
    -{
    -  return getValue< long >( *this );
    -}
    -
    -Token::operator size_t() const
    -{
    -  return getValue< long >( *this );
    -}
    -
    -Token::operator double() const
    -{
    -  return getValue< double >( *this );
    -}
    -
    -Token::operator bool() const
    -{
    -  return getValue< bool >( *this );
    -}
    -
    -Token::operator std::string() const
    -{
    -  return getValue< std::string >( *this );
    -}
    -
    -void
    -Token::info( std::ostream& out ) const
    -{
    -  out << "Token::info\n";
    -  if ( p )
    -  {
    -    p->Datum::info( out );
    -
    -    out << "p    = " << p << std::endl;
    -
    -    out << "Type = " << type().name() << std::endl;
    -    p->info( out );
    -  }
    -  else
    -  {
    -    out << "<NULL token>\n";
    -  }
    -}
    -
    -void
    -Token::pprint( std::ostream& out ) const
    -{
    -  if ( not p )
    -  {
    -    out << "<Null token>";
    -  }
    -  else
    -  {
    -    p->pprint( out );
    -  }
    -}
    -
    -std::ostream&
    -operator<<( std::ostream& out, const Token& c )
    -{
    -  if ( not c )
    -  {
    -    out << "<Null token>";
    -  }
    -  else
    -  {
    -    c->print( out );
    -  }
    -  return out;
    -}
    -
    -bool
    -Token::matches_as_string( const Token& rhs ) const
    -{
    -  try
    -  {
    -    const std::string& left = getValue< std::string >( *this );
    -    const std::string& right = getValue< std::string >( rhs );
    -    return left == right;
    -  }
    -  catch ( TypeMismatch& )
    -  {
    -    return false;
    -  }
    -}
    diff --git a/sli/token.h b/sli/token.h
    deleted file mode 100644
    index e5a7be51e2..0000000000
    --- a/sli/token.h
    +++ /dev/null
    @@ -1,508 +0,0 @@
    -/*
    - *  token.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef TOKEN_H
    -#define TOKEN_H
    -/*
    -    token.h defines the base objects used by the SLI interpreter.
    -*/
    -
    -// C++ includes:
    -#include <iomanip>
    -#include <iostream>
    -#include <string>
    -#include <typeinfo>
    -#include <vector>
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from sli:
    -#include "datum.h"
    -
    -class Name;
    -class Token;
    -class TokenArray;
    -class TokenArrayObj;
    -
    -/***********************************************************/
    -/* Token                                               */
    -/* ---------                                               */
    -/*  Token class for all Data Objects                   */
    -/*
    -
    -const Datum* p;   makes p a pointer to a const. Any change to the
    -                  object p points to is prevented.
    -
    -Datum *const p;   makes p a const pointer to a Datum. Any change to the
    -                  pointer is prevented.
    -
    - It is not necessary to declare the pointer itself const, because the
    - return value is copied anyway. Only if the return value can be used as
    - an lvalue do we need to protect it.
    -
    -  A member function declared const does not change any member object
    -  of the class, it can be called for const class objects.
    -
    -*/
    -
    -/***********************************************************/
    -
    -/** A type-independent container for C++-types.
    - *
    - * Class Token is a wrapper class around Datum pointers and non-Datum
    - * objects. In fact, since Datum objects have a memory manager, we should
    - * avoid creating Datum objects on the stack as local variables. Class
    - * Token takes ownership of the Datum pointers and will properly delete
    - * them when they are no longer needed. Thus, use one of the following
    - * idioms:
    - *
    - * @par Construction
    - *
    - * @code
    - * Token t( new IntergerDatum( 5 ) );
    - * Token t = 5;
    - * Token t = new IntegerDatum( 5 );
    - * @endcode
    - *
    - * The object constructor `Token(Datum&)` is historic and should not be
    - * used anymore.
    - *
    - * @par Assignment
    - *
    - * @code
    - * Token t1 = t;
    - * t1.move( t ); // move Datum from t to t1
    - * @endcode
    - *
    - * `TokenArrays`, `TokenStack`, and `Dictionary` are token
    - * containers. Their assignment interface takes
    - *
    - * 1. Datum pointers
    - * 2. Token references
    - *
    - * Thus, the recommended assignments are
    - *
    - * @code
    - * array.push_back( new IntegerDatum( 5 ) );
    - * @endcode
    - *
    - * It directly passes the Datum pointer to the location in the
    - * array. Some convenient ways to write assignments are actually
    - * inefficient.
    - *
    - * @par Examples
    - *
    - * 1. `a.push_back(5);`
    - *
    - *    This is convenient notation, but it is much more expensive because it is
    - *    equivalent to the following code:
    - *    .
    - *    @code
    - *    IntegerDatum tmp1( 5 );
    - *    Token tmp2( new IntegerDatum( mp1 ) );
    - *    Token tmp3( tmp2 );  // one more Datum copy
    - *    a.push_back_move( tmp3 );
    - *    @endcode
    - *
    - *    The compiler can optimize away some of the inefficiencies, but benchmarks showed a
    - *    big residual overhead compared to directly assigning the Datum
    - *    pointer.
    - *
    - * 2. `a.push_back(IntegerDatum(5));`
    - *
    - *    This looks efficient, but in fact it is not, because it is equivalent
    - *    to:
    - *    .
    - *    @code
    - *    Token tmp1( new IntegerDatum( IntegerDatum( 5 ) );
    - *    a.push_back_move( tmp1 );
    - *    @endcode
    - *
    - * 3. `a.push_back(t);`
    - *
    - *    Involves one Datum copy
    - *
    - * 4. `a.push_back_move(t);`
    - *
    - *    Moves the pointer and leaves a void token behind.
    - *
    - * @ingroup TokenHandling
    - */
    -class Token
    -{
    -  friend class Datum;
    -  friend class TokenArrayObj;
    -
    -private:
    -  Datum* p;
    -
    -  /** Flag for access control.
    -   * Is set by getValue() and setValue() via datum().
    -   */
    -  mutable bool accessed_;
    -
    -public:
    -  ~Token()
    -  {
    -    if ( p )
    -    {
    -      p->removeReference();
    -    }
    -    p = nullptr;
    -  }
    -
    -  Token( const Token& c_s )
    -    : p( nullptr )
    -  {
    -    if ( c_s.p )
    -    {
    -      p = c_s.p->get_ptr();
    -    }
    -  }
    -
    -
    -  /**
    -   * use existing pointer to datum, token takes responsibility of the pointer.
    -   */
    -  Token( Datum* p_s = nullptr )
    -    : p( p_s )
    -  {
    -  }
    -
    -  Token( const Datum& d ) //!< copy datum object and store its pointer.
    -  {
    -    p = d.clone();
    -  }
    -
    -  Token( int );
    -  Token( unsigned int );
    -  Token( long );
    -  Token( bool );
    -  Token( unsigned long );
    -#ifdef HAVE_32BIT_ARCH
    -  Token( uint64_t );
    -#endif
    -  Token( double );
    -  Token( const char* );
    -  Token( std::string );
    -  Token( const std::vector< double >& );
    -  Token( const std::vector< long >& );
    -  Token( const std::vector< size_t >& );
    -  operator size_t() const;
    -  operator long() const;
    -  operator double() const;
    -  operator bool() const;
    -  operator std::string() const;
    -
    -  /**
    -   * If the contained datum has more than one reference, clone it, so it can
    -   * be modified.
    -   */
    -  void
    -  detach()
    -  {
    -    if ( p and p->numReferences() > 1 )
    -    {
    -      p->removeReference();
    -      p = p->clone();
    -    }
    -  }
    -
    -  void
    -  move( Token& c )
    -  {
    -    if ( p )
    -    {
    -      p->removeReference();
    -    }
    -    p = c.p;
    -    c.p = nullptr;
    -  }
    -
    -
    -  /**
    -   * Initialize the token by moving a datum from another token.
    -   * This function assumes that the token does not
    -   * point to a valid datum and that the argument token
    -   * does point to a valid datum.
    -   * This function does not change the reference count of the datum.
    -   */
    -  void
    -  init_move( Token& rhs )
    -  {
    -    p = rhs.p;
    -    rhs.p = nullptr;
    -  }
    -
    -  /**
    -   * Initialize the token by moving a datum from another token.
    -   * This function assumes that the token does not
    -   * point to a valid datum and that the argument token
    -   * does point to a valid datum.
    -   * This function does not change the reference count of the datum.
    -   */
    -  void
    -  init_by_copy( const Token& rhs )
    -  {
    -    p = rhs.p->get_ptr();
    -  }
    -
    -  /**
    -   * Initialize the token with a reference.
    -   * This function assumes that the token does not
    -   * point to a valid datum and that the argument token
    -   * does point to a valid datum.
    -   * This function increases the reference count of the argument.
    -   */
    -
    -  void
    -  init_by_ref( const Token& rhs )
    -  {
    -    rhs.p->addReference();
    -    p = rhs.p;
    -  }
    -
    -  /**
    -   * Initialize the token with a datum pointer.
    -   * This function assumes that the token does not point to
    -   * a valid datum.
    -   * The function assumes that the datum is new and DOES NOT increases its
    -   * reference count.
    -   */
    -  void
    -  init_by_pointer( Datum* rhs )
    -  {
    -    p = rhs;
    -  }
    -
    -  void
    -  assign_by_ref( const Token& rhs )
    -  {
    -    //    assert(rhs.p !=NULL);
    -    if ( p != rhs.p )
    -    {
    -      if ( p )
    -      {
    -        p->removeReference();
    -      }
    -      p = rhs.p->get_ptr();
    -    }
    -  }
    -
    -  void
    -  assign_by_pointer( Datum* rhs )
    -  {
    -    assert( rhs );
    -    rhs->addReference();
    -    if ( p )
    -    {
    -      p->removeReference();
    -    }
    -    p = rhs;
    -  }
    -
    -
    -  void
    -  swap( Token& c )
    -  {
    -    std::swap( p, c.p );
    -  }
    -
    -  void
    -  clear()
    -  {
    -    if ( p )
    -    {
    -      p->removeReference();
    -    }
    -    p = nullptr;
    -  }
    -
    -  bool
    -  contains( const Datum& d ) const
    -  {
    -    return p and p->equals( &d );
    -  }
    -
    -  bool
    -  empty() const
    -  {
    -    return not p;
    -  }
    -
    -  bool
    -  operator not() const
    -  {
    -    return not p;
    -  }
    -
    -  Datum*
    -  datum() const
    -  {
    -    accessed_ = true;
    -    return p;
    -  }
    -
    -
    -  bool
    -  valid() const
    -  {
    -    return not empty();
    -  }
    -
    -  Datum*
    -  operator->() const
    -  {
    -    return p;
    -  }
    -
    -
    -  Datum&
    -  operator*() const
    -  {
    -    return *p;
    -  }
    -
    -
    -  const std::type_info&
    -  type() const
    -  {
    -    return typeid( *p );
    -  }
    -
    -
    -  Token&
    -  operator=( const Token& c_s )
    -  {
    -    if ( c_s.p == p )
    -    {
    -      return *this;
    -    }
    -
    -    if ( not c_s.p )
    -    {
    -      clear();
    -      return *this;
    -    }
    -    if ( p )
    -    {
    -      p->removeReference();
    -    }
    -    p = c_s.p->get_ptr();
    -
    -    return *this;
    -  }
    -
    -  Token&
    -  operator=( Datum* p_s )
    -  {
    -    if ( p != p_s )
    -    {
    -      if ( p )
    -      {
    -        p->removeReference();
    -      }
    -      p = p_s;
    -    }
    -
    -    return *this;
    -  }
    -
    -
    -  bool
    -  operator==( const Token& t ) const
    -  {
    -    if ( p == t.p )
    -    {
    -      return true;
    -    }
    -
    -    return p and p->equals( t.p );
    -  }
    -
    -  // define != explicitly --- HEP 2001-08-09
    -  bool
    -  operator!=( const Token& t ) const
    -  {
    -    return not( *this == t );
    -  }
    -
    -  void info( std::ostream& ) const;
    -
    -  void pprint( std::ostream& ) const;
    -
    -  /** Clear accessed flag. */
    -  void
    -  clear_access_flag()
    -  {
    -    accessed_ = false;
    -  }
    -  void
    -  set_access_flag() const
    -  {
    -    accessed_ = true;
    -  }
    -
    -  /** Check for access.
    -   * Access control does not differentiate between read and write
    -   * access, and relies on getValue<>, setValue<> to use datum()
    -   * to access the data in the Token. The access flag should be
    -   * cleared before entering the code for which access is to be
    -   * checked.
    -   */
    -  bool
    -  accessed() const
    -  {
    -    return accessed_;
    -  }
    -
    -
    -  /**
    -   * Check whether Token contains a Datum of a given type.
    -   * @return true if Token is of type given by template parameter.
    -   */
    -  template < typename DatumType >
    -  bool
    -  is_a() const
    -  {
    -    return dynamic_cast< DatumType* >( p );
    -  }
    -
    -
    -  /**
    -   * Returns true if token equals rhs as string.
    -   *
    -   * The main purpose of this method is to allow seamless
    -   * comparison of LiteralDatum and StringDatum tokens.
    -   */
    -  bool matches_as_string( const Token& rhs ) const;
    -};
    -
    -
    -/************* Misc functions ********************/
    -
    -std::ostream& operator<<( std::ostream&, const Token& );
    -
    -typedef unsigned long Index;
    -
    -#endif
    diff --git a/sli/tokenarray.cc b/sli/tokenarray.cc
    deleted file mode 100644
    index 653032eaca..0000000000
    --- a/sli/tokenarray.cc
    +++ /dev/null
    @@ -1,174 +0,0 @@
    -/*
    - *  tokenarray.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "tokenarray.h"
    -
    -// Includes from sli:
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "stringdatum.h"
    -
    -
    -const TokenArray&
    -TokenArray::operator=( const TokenArray& a )
    -{
    -  a.data->add_reference(); // protect from a=a
    -  data->remove_reference();
    -  data = a.data;
    -
    -  return *this;
    -}
    -
    -
    -TokenArray::TokenArray( const std::vector< long >& a )
    -  : data( new TokenArrayObj( a.size(), Token(), 0 ) )
    -{
    -  assert( data );
    -  for ( size_t i = 0; i < a.size(); ++i )
    -  {
    -    Token idt( new IntegerDatum( a[ i ] ) );
    -    ( *data )[ i ].move( idt );
    -  }
    -}
    -
    -TokenArray::TokenArray( const std::vector< size_t >& a )
    -  : data( new TokenArrayObj( a.size(), Token(), 0 ) )
    -{
    -  assert( data );
    -  for ( size_t i = 0; i < a.size(); ++i )
    -  {
    -    Token idt( new IntegerDatum( a[ i ] ) );
    -    ( *data )[ i ].move( idt );
    -  }
    -}
    -
    -TokenArray::TokenArray( const std::vector< double >& a )
    -  : data( new TokenArrayObj( a.size(), Token(), 0 ) )
    -{
    -  assert( data );
    -  for ( size_t i = 0; i < a.size(); ++i )
    -  {
    -    Token ddt( new DoubleDatum( a[ i ] ) );
    -    ( *data )[ i ].move( ddt );
    -  }
    -}
    -
    -void
    -TokenArray::toVector( std::vector< long >& a ) const
    -{
    -  a.clear();
    -  a.reserve( size() );
    -  for ( Token* idx = begin(); idx != end(); ++idx )
    -  {
    -    IntegerDatum* targetid = dynamic_cast< IntegerDatum* >( idx->datum() );
    -    if ( not targetid )
    -    {
    -      IntegerDatum const d;
    -      throw TypeMismatch( d.gettypename().toString(), idx->datum()->gettypename().toString() );
    -    }
    -
    -    a.push_back( targetid->get() );
    -  }
    -}
    -
    -void
    -TokenArray::toVector( std::vector< size_t >& a ) const
    -{
    -  a.clear();
    -  a.reserve( size() );
    -  for ( Token* idx = begin(); idx != end(); ++idx )
    -  {
    -    IntegerDatum* targetid = dynamic_cast< IntegerDatum* >( idx->datum() );
    -    if ( not targetid )
    -    {
    -      IntegerDatum const d;
    -      throw TypeMismatch( d.gettypename().toString(), idx->datum()->gettypename().toString() );
    -    }
    -
    -    a.push_back( targetid->get() );
    -  }
    -}
    -
    -void
    -TokenArray::toVector( std::vector< double >& a ) const
    -{
    -  a.clear();
    -  a.reserve( size() );
    -  for ( Token* idx = begin(); idx != end(); ++idx )
    -  {
    -    DoubleDatum* targetdd = dynamic_cast< DoubleDatum* >( idx->datum() );
    -    if ( targetdd )
    -    {
    -      a.push_back( targetdd->get() );
    -    }
    -    else if ( IntegerDatum* targetid = dynamic_cast< IntegerDatum* >( idx->datum() ) )
    -    {
    -      a.push_back( static_cast< double >( targetid->get() ) );
    -    }
    -    else
    -    {
    -      DoubleDatum const d;
    -      throw TypeMismatch( d.gettypename().toString(), idx->datum()->gettypename().toString() );
    -    }
    -  }
    -}
    -
    -void
    -TokenArray::toVector( std::vector< std::string >& a ) const
    -{
    -  a.clear();
    -  a.reserve( size() );
    -  for ( Token* idx = begin(); idx != end(); ++idx )
    -  {
    -    std::string* target = dynamic_cast< std::string* >( idx->datum() );
    -    if ( not target )
    -    {
    -      StringDatum const d;
    -      throw TypeMismatch( d.gettypename().toString(), idx->datum()->gettypename().toString() );
    -    }
    -    a.push_back( *target );
    -  }
    -}
    -
    -
    -bool
    -TokenArray::valid() const
    -{
    -  if ( not data )
    -  {
    -    return false;
    -  }
    -  return data->valid();
    -}
    -
    -
    -std::ostream&
    -operator<<( std::ostream& out, const TokenArray& a )
    -{
    -
    -  for ( Token* t = a.begin(); t < a.end(); ++t )
    -  {
    -    out << *t << ' ';
    -  }
    -
    -  return out;
    -}
    diff --git a/sli/tokenarray.h b/sli/tokenarray.h
    deleted file mode 100644
    index 4984c4b89d..0000000000
    --- a/sli/tokenarray.h
    +++ /dev/null
    @@ -1,503 +0,0 @@
    -/*
    - *  tokenarray.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef TOKENARRAY_H
    -#define TOKENARRAY_H
    -/*
    -    Reference Counted Array class specialized on Token objects.
    -*/
    -
    -// C++ includes:
    -#include <algorithm>
    -#include <cstddef>
    -#include <typeinfo>
    -#include <vector>
    -
    -// Includes from sli:
    -#include "sliexceptions.h"
    -#include "tarrayobj.h"
    -
    -// class Tokenarray uses reference counting and lazy evaluation.
    -// This means that only a pointer
    -// to the actual array representation, class TokenArrayObj, is stored.
    -// In most cases only this pointer is copied. Only when the array is
    -// to be modified, will the TokenArray be copied.
    -
    -// class TokenArrayObj is the complete token array class without reference-
    -// counting and lazu evaluation. class TokenArray serves as a smart interface.
    -//
    -// Note, that after the use of non const member functions, iterators (i.e.
    -// Token *) may become invalid due to cloning or reallocation of the array
    -//
    -//
    -// gewaltig, July 18 1997
    -
    -
    -// _move member functions may invalidate their iterator arguments.
    -// These functions are most efficient if for the source (argument)
    -// TokenArray references()==1 holds and therfore no cloning has to
    -// be performed.
    -//
    -// can be optimized for the case references()>1 by only
    -// constructing the elements needed without proper clone()
    -//
    -// Diesmann, April 14 1998
    -
    -class TokenArray
    -{
    -private:
    -  TokenArrayObj* data;
    -
    -  bool
    -  clone()
    -  {
    -    if ( data->references() > 1 )
    -    {
    -      data->remove_reference();
    -      data = new TokenArrayObj( *data );
    -      return true;
    -    }
    -    else
    -    {
    -      return false;
    -    }
    -  }
    -
    -  bool
    -  detach()
    -  {
    -    if ( data->references() > 1 )
    -    {
    -      data->remove_reference();
    -      data = new TokenArrayObj();
    -      return true;
    -    }
    -    else
    -    {
    -      return false;
    -    }
    -  }
    -
    -protected:
    -  friend class TokenArrayObj;
    -  friend class TokenStack;
    -  operator TokenArrayObj() const
    -  {
    -    return *data;
    -  }
    -
    -public:
    -  TokenArray()
    -    : data( new TokenArrayObj() ) {};
    -
    -  explicit TokenArray( size_t n, const Token& t = Token(), size_t alloc = 128 )
    -    : data( new TokenArrayObj( n, t, alloc ) )
    -  {
    -  }
    -
    -  TokenArray( const TokenArray& a )
    -    : data( a.data )
    -  {
    -    data->add_reference();
    -  }
    -
    -  TokenArray( const TokenArrayObj& a )
    -    : data( new TokenArrayObj( a ) )
    -  {
    -  }
    -
    -  TokenArray( const std::vector< size_t >& );
    -  TokenArray( const std::vector< long >& );
    -  TokenArray( const std::vector< double >& );
    -  TokenArray( const std::vector< float >& );
    -
    -  virtual ~TokenArray()
    -  {
    -    data->remove_reference(); // this will dispose data if needed.
    -  }
    -
    -  /**
    -   * Return pointer to the first element.
    -   */
    -  Token*
    -  begin() const
    -  {
    -    return data->begin();
    -  }
    -
    -  /**
    -   * Return pointer to next to last element.
    -   */
    -  Token*
    -  end() const
    -  {
    -    return data->end();
    -  }
    -
    -  /**
    -   * Return number of elements in the array.
    -   */
    -  size_t
    -  size() const
    -  {
    -    return data->size();
    -  }
    -
    -  /**
    -   * Return maximal number of elements that fit into the container.
    -   */
    -  size_t
    -  capacity() const
    -  {
    -    return data->capacity();
    -  }
    -
    -  // Note, in order to use the const version of operator[]
    -  // through a pointer, it is in some cases necessary to
    -  // use an explicit TokenArray const * pointer!
    -  // Use the member function get(size_t) const to force
    -  // constness.
    -
    -  Token&
    -  operator[]( size_t i )
    -  {
    -    clone();
    -    return ( *data )[ i ];
    -  }
    -
    -  const Token&
    -  operator[]( size_t i ) const
    -  {
    -    return ( *data )[ i ];
    -  }
    -
    -  const Token&
    -  get( long i ) const
    -  {
    -    return data->get( i );
    -  }
    -
    -  bool
    -  index_is_valid( long i ) const
    -  {
    -    return data->index_is_valid( i );
    -  }
    -
    -  void
    -  rotate( Token* t1, Token* t2, Token* t3 )
    -  {
    -    size_t s1 = t1 - data->begin();
    -    size_t s2 = t2 - data->begin();
    -    size_t s3 = t3 - data->begin();
    -
    -    clone();
    -    Token* b = data->begin();
    -
    -    data->rotate( b + s1, b + s2, b + s3 );
    -  }
    -
    -  void rotate( long n );
    -
    -  // The following two members shrink and reserve do
    -  // NOT invoke cloning, since they have no immediate
    -  // consequences.
    -
    -  /**
    -   * Reduce allocated space such that size()==capacity().
    -   * Returns true if the array was resized and false otherwhise.
    -   * If true is returned, all existing pointers into the array are
    -   * invalidated.
    -   */
    -  bool
    -  shrink()
    -  {
    -    return data->shrink();
    -  }
    -
    -  /**
    -   * Reserve space such that after the call the new capacity is n.
    -   * Returns true, if the container was reallocated. In this case all
    -   * existing pointers are invalidated.
    -   */
    -  bool
    -  reserve( size_t n )
    -  {
    -    return data->reserve( n );
    -  }
    -
    -  unsigned int
    -  references()
    -  {
    -    return data->references();
    -  }
    -
    -  /**
    -   * Resizes the container to size s.
    -   * If the new size is larger than the old size, the new space is initialized
    -   * with t.
    -   */
    -  void
    -  resize( size_t s, const Token& t = Token() )
    -  {
    -    clone();
    -    data->resize( s, t );
    -  }
    -
    -  // Insertion, deletion
    -  void
    -  push_back( const Token& t )
    -  {
    -    clone();
    -    data->push_back( t );
    -  }
    -
    -  void
    -  push_back( Datum* d )
    -  {
    -    Token t( d );
    -    clone();
    -    data->push_back_move( t );
    -  }
    -
    -  void
    -  push_back_move( Token& t )
    -  {
    -    clone();
    -    data->push_back_move( t );
    -  }
    -
    -  void
    -  push_back_dont_clone( Token& t )
    -  {
    -    data->push_back_move( t );
    -  }
    -
    -  void
    -  assign_move( size_t i, Token& t ) // 8.4.98 Diesmann
    -  {
    -    clone();
    -    data->assign_move( data->begin() + i, t );
    -  }
    -
    -  void
    -  assign_move( TokenArray& a, size_t i, size_t n )
    -  {
    -    clear(); // no cloning, because we overwrite everything
    -    // This is slightly inefficient, because if a has references,
    -    // cloning is more expensive than just copying the desired range.
    -    if ( a.references() == 1 )
    -    {
    -      data->assign_move( *( a.data ), i, n );
    -    }
    -    else
    -    {
    -      data->assign( *( a.data ), i, n );
    -    }
    -  }
    -
    -  void
    -  insert_move( size_t i, TokenArray& a ) // 8.4.98 Diesmann
    -  {
    -    clone();   // make copy if others point to representation
    -    a.clone(); // also for a because we are going to empy it
    -               //      assert(data->refs==1);    // private copy
    -               //      assert(a.data->refs==1);  // private copy
    -
    -    data->insert_move( i, *( a.data ) );
    -    // the representations insert_move moves the
    -    // the contens of all Tokens in a.data and marks it empty.
    -
    -    // assert(a.data->size()==0); // empty, but memory is still allocated incase
    -    //
    -    // it will be used again. data->clear() would
    -    // free the memory. In any case the destructor
    -    // finally frees the memory.
    -  }
    -
    -  void
    -  insert_move( size_t i, Token& t )
    -  {
    -    clone();
    -    data->insert_move( i, t );
    -  }
    -
    -
    -  void
    -  replace_move( size_t i, size_t n, TokenArray& a )
    -  {
    -    clone();
    -    a.clone();
    -
    -    data->replace_move( i, n, *( a.data ) );
    -  }
    -
    -
    -  void
    -  append_move( TokenArray& a )
    -  {
    -    clone();   // make copy if others point to representation
    -    a.clone(); // also for a because we are going to empy it
    -
    -    data->append_move( *( a.data ) );
    -  }
    -
    -  void
    -  pop_back()
    -  {
    -    clone();
    -    data->pop_back();
    -  }
    -
    -  void
    -  clear()
    -  {
    -    erase();
    -  }
    -
    -  void
    -  erase()
    -  {
    -    if ( not detach() )
    -    {
    -      erase( begin(), end() );
    -    }
    -  }
    -
    -
    -  void
    -  erase( Token* from, Token* to )
    -  {
    -    if ( from != to )
    -    {
    -      size_t sf = from - data->begin();
    -      size_t st = to - data->begin();
    -
    -      clone();
    -      data->erase( data->begin() + sf, data->begin() + st );
    -    }
    -  }
    -
    -  void
    -  erase( size_t i, size_t n )
    -  {
    -    if ( i < size() and n > 0 )
    -    {
    -      clone();
    -      data->erase( i, n );
    -    }
    -  }
    -
    -  // Reduce the Array to the Range given by the iterators
    -  void
    -  reduce( size_t i, size_t n )
    -  {
    -    if ( i > 0 or n < size() )
    -    {
    -      clone();
    -      data->reduce( i, n );
    -    }
    -  }
    -
    -  void reverse();
    -
    -  void
    -  swap( TokenArray& a )
    -  {
    -    std::swap( data, a.data );
    -  }
    -
    -  const TokenArray& operator=( const TokenArray& );
    -  const TokenArray& operator=( const std::vector< long >& );
    -  const TokenArray& operator=( const std::vector< double >& );
    -
    -  bool
    -  operator==( const TokenArray& a ) const
    -  {
    -    return *data == *a.data;
    -  }
    -
    -  bool
    -  empty() const
    -  {
    -    return size() == 0;
    -  }
    -
    -  void info( std::ostream& ) const;
    -
    -  /** Fill vectors with homogeneous integer and double arrays */
    -
    -  void toVector( std::vector< size_t >& ) const;
    -  void toVector( std::vector< long >& ) const;
    -  void toVector( std::vector< double >& ) const;
    -  void toVector( std::vector< std::string >& ) const;
    -
    -  bool valid() const; // check integrity
    -
    -  /** Exception classes */
    -  class OutOfRange
    -  {
    -  };
    -};
    -
    -inline void
    -TokenArray::reverse()
    -{
    -  if ( size() == 0 )
    -  {
    -    return;
    -  }
    -  clone();
    -  Token* b = begin();
    -  Token* e = end() - 1;
    -  while ( b < e )
    -  {
    -    b->swap( *e );
    -    ++b;
    -    --e;
    -  }
    -}
    -
    -inline void
    -TokenArray::rotate( long n = 1 )
    -{
    -  if ( size() == 0 or n == 0 )
    -  {
    -    return;
    -  }
    -
    -  clone();
    -  long rot = n % static_cast< long >( size() );
    -  rot = ( rot < 0 ) ? rot + size() : rot;
    -  std::rotate( begin(), begin() + rot, end() );
    -}
    -
    -
    -std::ostream& operator<<( std::ostream&, const TokenArray& );
    -
    -
    -#ifdef TokenArray_H_DEBUG
    -#undef TokenArray_H_DEBUG
    -#undef NDEBUG
    -#endif
    -
    -
    -#endif
    diff --git a/sli/tokenstack.cc b/sli/tokenstack.cc
    deleted file mode 100644
    index 6229d2ea58..0000000000
    --- a/sli/tokenstack.cc
    +++ /dev/null
    @@ -1,46 +0,0 @@
    -/*
    - *  tokenstack.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "tokenstack.h"
    -/*
    -    tokenstack.cc
    -*/
    -
    -
    -void
    -TokenStack::dump( std::ostream& out ) const
    -{
    -  out << '\n';
    -  out << " --> ";
    -  for ( Index i = 0; i < load(); i++ )
    -  {
    -    if ( i != 0 )
    -    {
    -      out << "     ";
    -    }
    -    pick( i ).pprint( out );
    -    out << '\n';
    -  }
    -  out << "   "
    -      << "--------------------\n";
    -  out << '\n';
    -}
    diff --git a/sli/tokenstack.h b/sli/tokenstack.h
    deleted file mode 100644
    index a7ccccf6f3..0000000000
    --- a/sli/tokenstack.h
    +++ /dev/null
    @@ -1,198 +0,0 @@
    -/*
    - *  tokenstack.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef TOKENSTACK_H
    -#define TOKENSTACK_H
    -/*
    -    SLI's stack for tokens
    -*/
    -
    -// Includes from sli:
    -#include "tarrayobj.h"
    -#include "token.h"
    -#include "tokenarray.h"
    -
    -/* This stack implementation assumes that functions are only called,
    -   if the necessary pre-requisites are fulfilled. The code will break
    -   otherwise.
    -*/
    -
    -class TokenStack : private TokenArrayObj
    -{
    -public:
    -  TokenStack( Index n )
    -    : TokenArrayObj( 0, Token(), n )
    -  {
    -  }
    -  TokenStack( const TokenArray& ta )
    -    : TokenArrayObj( ta )
    -  {
    -  }
    -
    -  using TokenArrayObj::reserve;
    -  using TokenArrayObj::reserve_token;
    -
    -  void
    -  clear()
    -  {
    -    erase( begin(), end() );
    -  }
    -
    -
    -  void
    -  push( const Token& e )
    -  {
    -    push_back( e );
    -  }
    -
    -  void
    -  push_move( Token& e )
    -  {
    -    push_back_move( e );
    -  }
    -
    -  /**
    -   * Push a Token with a valid datum to the stack. This function
    -   * expects that sufficient space is on the stack to fit the datum.
    -   * This function increases the reference count of the datum.
    -   */
    -  void
    -  push_by_ref( const Token& e )
    -  {
    -    push_back_by_ref( e );
    -  }
    -
    -  /**
    -   * Push a valid datum to the stack. This function expects that
    -   * sufficient space is on the stack to fit the datum.
    -   * This function increases the reference count of the datum.
    -   */
    -  void
    -  push_by_pointer( Datum* rhs )
    -  {
    -    push_back_by_pointer( rhs );
    -  }
    -
    -  void
    -  pop()
    -  {
    -    pop_back();
    -  }
    -
    -  void
    -  pop_move( Token& e )
    -  {
    -    e.move( *( end() - 1 ) );
    -    pop_back();
    -  }
    -
    -  void
    -  pop( size_t n )
    -  {
    -    erase( end() - n, end() );
    -  }
    -
    -
    -  Token&
    -  top()
    -  {
    -    return *( end() - 1 );
    -  }
    -  const Token&
    -  top() const
    -  {
    -    return *( end() - 1 );
    -  }
    -
    -  const Token&
    -  pick( size_t i ) const
    -  {
    -    return *( end() - i - 1 );
    -  }
    -
    -  Token&
    -  pick( size_t i )
    -  {
    -    return *( end() - i - 1 );
    -  }
    -
    -  using TokenArrayObj::empty;
    -  //  using TokenArray::operator=;
    -
    -
    -  void
    -  swap()
    -  {
    -    ( end() - 1 )->swap( *( end() - 2 ) );
    -  }
    -
    -  void
    -  swap( Token& e )
    -  {
    -    ( end() - 1 )->swap( e );
    -  }
    -
    -  void
    -  index( Index i )
    -  {
    -    push( pick( i ) );
    -  }
    -
    -  void
    -  roll( size_t n, long k )
    -  {
    -    if ( n < 2 or k == 0 )
    -    {
    -      return; // nothing to do
    -    }
    -
    -    if ( k > 0 )
    -    {
    -      rotate( end() - n, end() - ( k % n ), end() );
    -    }
    -    else
    -    {
    -      rotate( end() - n, end() - ( n + k ) % n, end() );
    -    }
    -  }
    -
    -  Index
    -  size() const
    -  {
    -    return TokenArrayObj::capacity();
    -  }
    -  Index
    -  load() const
    -  {
    -    return TokenArrayObj::size();
    -  }
    -
    -  void dump( std::ostream& ) const;
    -
    -  TokenArray
    -  toArray() const
    -  {
    -    return TokenArray( *this );
    -  }
    -};
    -
    -#endif
    diff --git a/sli/tokenutils.cc b/sli/tokenutils.cc
    deleted file mode 100644
    index 6e21316025..0000000000
    --- a/sli/tokenutils.cc
    +++ /dev/null
    @@ -1,357 +0,0 @@
    -/*
    - *  tokenutils.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "tokenutils.h"
    -
    -// C++ includes:
    -#include <cmath> // for sqrt()
    -#include <string>
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "booldatum.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "namedatum.h"
    -#include "sliexceptions.h"
    -#include "stringdatum.h"
    -#include "symboldatum.h"
    -
    -template <>
    -long
    -getValue< long >( const Token& t )
    -{
    -  const IntegerDatum* id = dynamic_cast< const IntegerDatum* >( t.datum() );
    -  if ( not id )
    -  { // We have to create a Datum object to get the name...
    -    IntegerDatum const d;
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -  return id->get();
    -}
    -template <>
    -void
    -setValue< long >( const Token& t, long const& value )
    -{
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( t.datum() );
    -  if ( not id )
    -  { // We have to create a Datum object to get the name...
    -    IntegerDatum const d;
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -  ( *id ) = value;
    -}
    -
    -template <>
    -Token
    -newToken< long >( long const& value )
    -{
    -  return Token( new IntegerDatum( value ) );
    -}
    -
    -
    -template <>
    -double
    -getValue< double >( const Token& t )
    -{
    -
    -  DoubleDatum* dd = dynamic_cast< DoubleDatum* >( t.datum() );
    -  if ( dd )
    -  {
    -    return dd->get();
    -  }
    -  IntegerDatum* id = dynamic_cast< IntegerDatum* >( t.datum() );
    -  if ( id )
    -  {
    -    return static_cast< double >( id->get() );
    -  }
    -
    -  // We have to create a Datum object to get the name...
    -  DoubleDatum const d;
    -  throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -}
    -
    -template <>
    -void
    -setValue< double >( const Token& t, double const& value )
    -{
    -  DoubleDatum* id = dynamic_cast< DoubleDatum* >( t.datum() );
    -  if ( not id )
    -  { // We have to create a Datum object to get the name...
    -    DoubleDatum const d;
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -  ( *id ) = value;
    -}
    -
    -template <>
    -Token
    -newToken< double >( double const& value )
    -{
    -  return Token( new DoubleDatum( value ) );
    -}
    -
    -template <>
    -bool
    -getValue< bool >( const Token& t )
    -{
    -  BoolDatum* bd = dynamic_cast< BoolDatum* >( t.datum() );
    -  if ( not bd )
    -  { // We have to create a Datum object to get the name...
    -    BoolDatum const d( false );
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -  return static_cast< bool >( *bd );
    -  // We should have used i->true_name, bit we don't know the interpreter here.
    -}
    -template <>
    -void
    -setValue< bool >( const Token& t, bool const& value )
    -{
    -  BoolDatum* bd = dynamic_cast< BoolDatum* >( t.datum() );
    -  if ( not bd )
    -  { // We have to create a Datum object to get the name...
    -    BoolDatum const d( false );
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -  *bd = BoolDatum( value );
    -  // We should have used i->true_name, bit we don't know the interpreter here.
    -}
    -
    -
    -template <>
    -Token
    -newToken< bool >( bool const& value )
    -{
    -  return Token( new BoolDatum( value ) );
    -  // We should have used i->true_name, bit we don't know the interpreter here.
    -}
    -
    -
    -// These will handle StringDatum, NameDatum,
    -// LiteralDatum and SymbolDatum tokens:
    -template <>
    -std::string
    -getValue< std::string >( const Token& t )
    -{
    -  // If it is a StringDatum, it can be casted to a string:
    -  std::string* s = dynamic_cast< std::string* >( t.datum() );
    -  if ( s )
    -  {
    -    return *s;
    -  }
    -  else
    -  {
    -    // If it is a NameDatum, LiteralDatum or SymbolDatum,
    -    // (or even a BoolDatum!) it can be casted to a Name:
    -    Name* n = dynamic_cast< Name* >( t.datum() );
    -    if ( n )
    -    {
    -      return n->toString();
    -    }
    -    else
    -    {
    -      // The given token can never yield a string!
    -      // We have to create Datum objects to get the expected names...
    -      StringDatum const d1;
    -      NameDatum const d2( "dummy" );
    -      LiteralDatum const d3( "dummy" );
    -      SymbolDatum const d4( "dummy" );
    -      throw TypeMismatch( d1.gettypename().toString() + ", " + d2.gettypename().toString() + ", "
    -          + d3.gettypename().toString() + ", or " + d4.gettypename().toString(),
    -        t.datum()->gettypename().toString() );
    -    }
    -  }
    -}
    -template <>
    -void
    -setValue< std::string >( const Token& t, std::string const& value )
    -{
    -  // If it is a StringDatum, it can be casted to a string:
    -  std::string* s = dynamic_cast< std::string* >( t.datum() );
    -  if ( s )
    -  {
    -    *s = value;
    -  }
    -  else
    -  {
    -    // If it is a BoolDatum, it -could- be set from a string, but
    -    // this operation shall not be allowed!
    -    BoolDatum* b = dynamic_cast< BoolDatum* >( t.datum() );
    -    if ( b )
    -    {
    -      // We have to create Datum objects to get the expected names...
    -      StringDatum const d1;
    -      NameDatum const d2( "dummy" );
    -      LiteralDatum const d3( "dummy" );
    -      SymbolDatum const d4( "dummy" );
    -      throw TypeMismatch( d1.gettypename().toString() + ", " + d2.gettypename().toString() + ", "
    -          + d3.gettypename().toString() + ", or " + d4.gettypename().toString(),
    -        t.datum()->gettypename().toString() );
    -    }
    -    else
    -    {
    -      // If it is a NameDatum, LiteralDatum or SymbolDatum,
    -      // it can be casted to a Name:
    -      Name* n = dynamic_cast< Name* >( t.datum() );
    -      if ( n )
    -      {
    -        *n = Name( value );
    -      }
    -      else
    -      {
    -        // The given token can never hold a string!
    -        // We have to create Datum objects to get the expected names...
    -        StringDatum const d1;
    -        NameDatum const d2( "dummy" );
    -        LiteralDatum const d3( "dummy" );
    -        SymbolDatum const d4( "dummy" );
    -        throw TypeMismatch( d1.gettypename().toString() + ", " + d2.gettypename().toString() + ", "
    -            + d3.gettypename().toString() + ", or " + d4.gettypename().toString(),
    -          t.datum()->gettypename().toString() );
    -      }
    -    }
    -  }
    -}
    -
    -// This will always yield StringDatum tokens:
    -#ifndef HAVE_SPECIALIZATION_BUG
    -template <>
    -Token
    -newToken< std::string >( std::string const& value )
    -{
    -  return Token( new StringDatum( value ) );
    -}
    -#endif
    -
    -
    -// These will convert homogeneous double arrays to vectors:
    -template <>
    -std::vector< double >
    -getValue< std::vector< double > >( const Token& t )
    -{
    -  // Try DoubleVectorDatum first
    -  DoubleVectorDatum* dvd = dynamic_cast< DoubleVectorDatum* >( t.datum() );
    -  if ( dvd )
    -  {
    -    return **dvd;
    -  }
    -
    -  // Ok, try ArrayDatum
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( t.datum() );
    -  if ( ad )
    -  {
    -    std::vector< double > data;
    -    ad->toVector( data );
    -    return data;
    -  }
    -
    -  // Out of options
    -  throw TypeMismatch( DoubleVectorDatum().gettypename().toString() + " or " + ArrayDatum().gettypename().toString(),
    -    t.datum()->gettypename().toString() );
    -}
    -
    -template <>
    -void
    -setValue< std::vector< double > >( const Token& t, std::vector< double > const& value )
    -{
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( t.datum() );
    -  if ( not ad )
    -  { // We have to create a Datum object to get the name...
    -    ArrayDatum const d;
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -  // ArrayDatum is an AggregateDatum, which means, it is derived from
    -  // TokenArray. Hence, we can use ad just like a TokenArray:
    -  if ( ad->size() != value.size() )
    -  { // Arrays have incompatible size
    -    throw RangeCheck( value.size() );
    -  }
    -  for ( size_t i = 0; i < ad->size(); ++i )
    -  {
    -    setValue< double >( ( *ad )[ i ], value[ i ] );
    -  }
    -}
    -#ifndef HAVE_SPECIALIZATION_BUG
    -template <>
    -Token
    -newToken< std::vector< double > >( std::vector< double > const& value )
    -{
    -  return Token( new ArrayDatum( value ) );
    -}
    -#endif
    -
    -
    -// These will convert homogeneous int arrays to vectors:
    -template <>
    -std::vector< long >
    -getValue< std::vector< long > >( const Token& t )
    -{
    -  // Try IntVectorDatum first
    -  IntVectorDatum* ivd = dynamic_cast< IntVectorDatum* >( t.datum() );
    -  if ( ivd )
    -  {
    -    return **ivd;
    -  }
    -
    -  // Ok, try ArrayDatum
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( t.datum() );
    -  if ( ad )
    -  {
    -    std::vector< long > data;
    -    ad->toVector( data );
    -    return data;
    -  }
    -
    -  // Out of options
    -  throw TypeMismatch( IntVectorDatum().gettypename().toString() + " or " + ArrayDatum().gettypename().toString(),
    -    t.datum()->gettypename().toString() );
    -}
    -
    -template <>
    -void
    -setValue< std::vector< long > >( const Token& t, std::vector< long > const& value )
    -{
    -  ArrayDatum* ad = dynamic_cast< ArrayDatum* >( t.datum() );
    -  if ( not ad )
    -  { // We have to create a Datum object to get the name...
    -    ArrayDatum const d;
    -    throw TypeMismatch( d.gettypename().toString(), t.datum()->gettypename().toString() );
    -  }
    -  // ArrayDatum is an AggregateDatum, which means, it is derived from
    -  // TokenArray. Hence, we can use ad just like a TokenArray:
    -  if ( ad->size() != value.size() )
    -  { // Arrays have incompatible size
    -    throw RangeCheck( value.size() );
    -  }
    -  for ( size_t i = 0; i < ad->size(); ++i )
    -  {
    -    setValue< long >( ( *ad )[ i ], value[ i ] );
    -  }
    -}
    -
    -template <>
    -Token
    -newToken< std::vector< long > >( std::vector< long > const& value )
    -{
    -  return Token( new ArrayDatum( value ) );
    -}
    diff --git a/sli/tokenutils.h b/sli/tokenutils.h
    deleted file mode 100644
    index 64c92195d5..0000000000
    --- a/sli/tokenutils.h
    +++ /dev/null
    @@ -1,280 +0,0 @@
    -/*
    - *  tokenutils.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef TOKENUTILS_H
    -#define TOKENUTILS_H
    -
    -// C++ includes:
    -#include <string>
    -
    -// Generated includes:
    -#include "config.h"
    -
    -// Includes from sli:
    -#include "namedatum.h"
    -#include "sliexceptions.h"
    -#include "token.h"
    -
    -/**
    - * @defgroup TokenHandling Handling classes Token and Dictionary.
    - *
    - * Accessing the underlying vales of class Token and Dictionary
    - * entries can be a somewhat tricky issue, depending on how the data
    - * type is actually implemented. The programmer needs detailed
    - * knowledge of the implementation (which usually involves an
    - * intermediate class which is derived from the generic class Datum.)
    - * However, the programmer in almost all cases is only interested in
    - * how to get and modify the underlying fundamental C++-types.
    - *
    - * The utility functions described in this group aim at simplifying
    - * the access to the underlying values by providing template
    - * specializations for each fundamental C++-type. The programmer can
    - * simply specify the fundamental C++-type to handle, while the
    - * implementation details are hidden.
    - *
    - * @note
    - * Some of the utility functions described here have since been superceded
    - * by new type conversion operators in class Token (see there). These
    - * operators allow to use class Token directly at positions, where a
    - * fundamental C++-datatype is required. Together with the indexing
    - * operator for class Dictionary, it all boils down to
    - * comprehensive calls like the following:
    - * @code
    - * int myvar = dict["myentry"];
    - * dict["entry2"] = 23;
    - * Token1 = Token2 + 1
    - * @endcode
    - * @note
    - * It is left to the programmer's choice what method to use. It is
    - * recommendable to use the (implicit) type conversion operators where
    - * their operation is obvious to the reader of the source code.
    - * Sometimes using the type conversion operators tends to obscure the
    - * meaning of code. In these cases, the programmer is kindly asked to
    - * comment on the code, or to use the more explicit template functions
    - * described in this group.
    - * @note
    - * R. Kupper, 24-09-2003
    - */
    -
    -/**
    - * @defgroup TokenUtils How to access the value contained in a Token.
    - * @ingroup TokenHandling
    - *
    - * Class Token defines the standard user interface for accessing SLI
    - * Datum types from tokens (see there). However, this user interface returns
    - * objects of class Datum, from which the actual value would still need to be
    - * extracted. The utilitiy functions described in this group shortcut
    - * this step and provide direct access to the underlying fundamental
    - * values contained in a token.
    - */
    -
    -/** getValue provides easy read-access to a Token's contents.
    -    getValue returns the value of the Datum contained inside the Token.
    -
    -    \ingroup TokenUtils
    -
    -    The general getValue function assumes that the datum was directly
    -    derived from a C++ type (most probably some container or stream).
    -    All other cases will be handled by specialization of this template.
    -
    -    For example, AggregateDatum types are directly derived from a C++ type.
    -
    -    \verbatim
    -           SLI Datum          derived from C++ type
    -          ------------------------------------------
    -           BoolDatum          Name
    -           HandleDatum        DatumHandle (whatever that might be...)
    -           LiteralDatum       Name
    -           NameDatum          Name
    -           ParserDatum        Parser
    -           StringDatum        string
    -           SymbolDatum        Name
    -
    -           (What else?)
    -    \endverbatim
    -
    -    Hence, getValue may be used in the following ways:
    -
    -    \verbatim
    -        call                      can be used on Token containing SLI-type
    -       --------------------------------------------------------------------
    -        Name   getValue<Name>     {Bool|Literal|Name|Symbol}Datum
    -        DatumHandle
    -           getValue<DatumHandle>  HandleDatum
    -        Parser getValue<Parser>   ParserDatum
    -        string getValue<string>   StringDatum
    -    \endverbatim
    -
    -    The following specialized variants of getValue() can be used in addition:
    -
    -    \verbatim
    -        call                            can be used on Token containing SLI-type
    -       -------------------------------------------------------------------------
    -        long             GetValue<long>              IntegerDatum
    -        double           GetValue<double>            DoubleDatum
    -        bool             GetValue<bool>              BoolDatum
    -        string           GetValue<string>            NameDatum
    -        string           GetValue<string>            LiteralDatum
    -        string           GetValue<string>            SymbolDatum
    -        vector<long>     GetValue<vector<long> >     ArrayDatum
    -        vector<double>   GetValue<vector<double> >   ArrayDatum
    -    \endverbatim
    -
    -    What about the rest? (ElementFactoryDatum, el_prtdatum, FunctionDatum,
    -    GenericDatum, NumericDatum, lockPTRDatum, ReferenceDatum, SmartPtrDatum,
    -    TrieDatum)
    -
    -    @throws TypeMismatch The specified fundamental datatype does not
    -    match the Token's contents, or a template specialization for this
    -    type is missing.
    -**/
    -template < typename FT >
    -FT
    -getValue( const Token& t )
    -{
    -  FT* value = dynamic_cast< FT* >( t.datum() );
    -  if ( not value )
    -  {
    -    throw TypeMismatch();
    -  }
    -  return *value;
    -}
    -
    -/** setValue provides easy write-access to a Token's contents.
    -    setValue updates the value of the Datum contained inside the Token.
    -
    -    \ingroup TokenUtils
    -
    -    setValue(Token, value) can be called on the same value/Datum pairs getValue
    -    handles. Note that the template parameter to setValue does not need to be
    -    specified explicitely, as it can be derived from the second argument.
    -
    -    @throws TypeMismatch The specified fundamental datatype does not
    -    match the Token's contents, or a template specialization for this
    -    type is missing.
    -**/
    -template < typename FT >
    -void
    -setValue( const Token& t, FT const& value )
    -{
    -  FT* old = dynamic_cast< FT* >( t.datum() );
    -  if ( not old )
    -  {
    -    throw TypeMismatch();
    -  }
    -
    -  *old = value;
    -}
    -
    -/** Create a new Token from a fundamental data type.
    -    Specify the desired Datum type as the second template parameter!
    -    @ingroup TokenUtils
    -**/
    -template < typename FT, class D >
    -Token
    -newToken2( FT const& value )
    -{
    -  Token t( new D( value ) );
    -
    -  // this is for typechecking reasons:
    -  getValue< FT >( t );
    -
    -  return t;
    -}
    -
    -
    -/** Create a new Token from a fundamental data type.
    -    This template is specialized for the most fundamental types. If it
    -    does not work, use newToken2() and specify the Datum type explicitely.
    -    @ingroup TokenUtils
    -**/
    -template < typename FT >
    -Token
    -newToken( FT const& value )
    -{
    -  return newToken2< FT, NameDatum >( value );
    -}
    -
    -// specializations below this line: -----------------------
    -template <>
    -long getValue< long >( const Token& );
    -template <>
    -void setValue< long >( const Token&, long const& value );
    -
    -template <>
    -Token newToken< long >( long const& value );
    -
    -template <>
    -double getValue< double >( const Token& );
    -
    -template <>
    -void setValue< double >( const Token&, double const& value );
    -
    -
    -template <>
    -Token newToken< double >( double const& value );
    -
    -template <>
    -bool getValue< bool >( const Token& );
    -template <>
    -void setValue< bool >( const Token&, bool const& value );
    -
    -template <>
    -Token newToken< bool >( bool const& value );
    -
    -
    -// These will handle StringDatum, NameDatum,
    -// LiteralDatum and SymbolDatum tokens:
    -template <>
    -std::string getValue< std::string >( const Token& );
    -template <>
    -void setValue< std::string >( const Token&, std::string const& value );
    -
    -
    -template <>
    -Token newToken< std::string >( std::string const& value );
    -
    -
    -// To get NameDatum, LiteralDatum or SymbolDatum tokens from a string,
    -// use newToken2<FT,D> instead (e.g. newToken2<string,LiteralDatum>);
    -
    -
    -// These will convert homogeneous int arrays to vectors:
    -template <>
    -std::vector< long > getValue< std::vector< long > >( const Token& );
    -template <>
    -void setValue< std::vector< long > >( const Token&, std::vector< long > const& value );
    -
    -template <>
    -Token newToken< std::vector< long > >( std::vector< long > const& value );
    -
    -
    -// These will convert homogeneous double arrays to vectors:
    -template <>
    -std::vector< double > getValue< std::vector< double > >( const Token& );
    -template <>
    -void setValue< std::vector< double > >( const Token&, std::vector< double > const& value );
    -
    -template <>
    -Token newToken< std::vector< double > >( std::vector< double > const& value );
    -
    -#endif
    diff --git a/sli/triedatum.cc b/sli/triedatum.cc
    deleted file mode 100644
    index 6ccec84b89..0000000000
    --- a/sli/triedatum.cc
    +++ /dev/null
    @@ -1,40 +0,0 @@
    -/*
    - *  triedatum.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "triedatum.h"
    -
    -// Includes from sli:
    -#include "interpret.h"
    -
    -nest::pool TrieDatum::memory( sizeof( TrieDatum ), 1024, 1 );
    -
    -bool
    -TrieDatum::equals( Datum const* dat ) const
    -{
    -  // The following construct works around the problem, that
    -  // a direct dynamic_cast<const GenericDatum<D,slt> * > does not seem
    -  // to work.
    -
    -  const TrieDatum* fd = dynamic_cast< TrieDatum* >( const_cast< Datum* >( dat ) );
    -
    -  return fd and tree == fd->tree;
    -}
    diff --git a/sli/triedatum.h b/sli/triedatum.h
    deleted file mode 100644
    index 6f4ada24f5..0000000000
    --- a/sli/triedatum.h
    +++ /dev/null
    @@ -1,163 +0,0 @@
    -/*
    - *  triedatum.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef TYPEDFUNCTIONDATUM_H
    -#define TYPEDFUNCTIONDATUM_H
    -
    -// C++ includes:
    -#include <typeinfo>
    -
    -// Includes from libnestutil:
    -#include "allocator.h"
    -
    -// Includes from sli:
    -#include "datum.h"
    -#include "interpret.h"
    -#include "slifunction.h"
    -#include "typechk.h"
    -
    -class TrieDatum : public TypedDatum< &SLIInterpreter::Trietype >
    -{
    -protected:
    -  static nest::pool memory;
    -
    -private:
    -  Name name;
    -  TypeTrie tree;
    -
    -  Datum*
    -  clone() const override
    -  {
    -    return new TrieDatum( *this );
    -  }
    -
    -  Datum*
    -  get_ptr() override
    -  {
    -    Datum::addReference();
    -    return this;
    -  }
    -
    -public:
    -  TrieDatum( TrieDatum const& fd )
    -    : TypedDatum< &SLIInterpreter::Trietype >( fd )
    -    , name( fd.name )
    -    , tree( fd.tree )
    -  {
    -    set_executable();
    -  }
    -
    -  TrieDatum( Name const& n )
    -    : name( n )
    -    , tree()
    -  {
    -    set_executable();
    -  }
    -
    -  TrieDatum( Name const& n, const TokenArray& ta )
    -    : name( n )
    -    , tree( ta )
    -  {
    -    set_executable();
    -  }
    -
    -
    -  void
    -  print( std::ostream& o ) const override
    -  {
    -    o << '+' << name << '+';
    -  }
    -
    -  void
    -  pprint( std::ostream& o ) const override
    -  {
    -    print( o );
    -  }
    -
    -  void
    -  info( std::ostream& out ) const override
    -  {
    -    pprint( out );
    -    out << "\nVariants are:" << std::endl;
    -    tree.info( out );
    -  }
    -
    -  bool equals( Datum const* ) const override;
    -
    -  const Name&
    -  getname() const
    -  {
    -    return name;
    -  }
    -
    -  void
    -  insert( const TypeArray& a, const Token& t )
    -  {
    -    tree.insert( a, t );
    -  }
    -
    -  void
    -  insert_move( const TypeArray& a, Token& t )
    -  {
    -    tree.insert_move( a, t );
    -  }
    -
    -  const Token&
    -  lookup( const TokenStack& s ) const
    -  {
    -    return tree.lookup( s );
    -  }
    -
    -  TypeTrie&
    -  get()
    -  {
    -    return tree;
    -  }
    -
    -  static void*
    -  operator new( size_t size )
    -  {
    -    if ( size != memory.size_of() )
    -    {
    -      return ::operator new( size );
    -    }
    -    return memory.alloc();
    -  }
    -
    -  static void
    -  operator delete( void* p, size_t size )
    -  {
    -    if ( not p )
    -    {
    -      return;
    -    }
    -    if ( size != memory.size_of() )
    -    {
    -      ::operator delete( p );
    -      return;
    -    }
    -    memory.free( p );
    -  }
    -};
    -
    -
    -#endif
    diff --git a/sli/typearray.h b/sli/typearray.h
    deleted file mode 100644
    index 7ffbf3f3b1..0000000000
    --- a/sli/typearray.h
    +++ /dev/null
    @@ -1,35 +0,0 @@
    -/*
    - *  typearray.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef TYPEARRAY_H
    -#define TYPEARRAY_H
    -
    -// C++ includes:
    -#include <typeinfo>
    -#include <vector>
    -
    -// Includes from sli:
    -#include "name.h"
    -
    -typedef std::vector< Name > TypeArray;
    -
    -#endif
    diff --git a/sli/typechk.cc b/sli/typechk.cc
    deleted file mode 100644
    index 92e055dfab..0000000000
    --- a/sli/typechk.cc
    +++ /dev/null
    @@ -1,295 +0,0 @@
    -/*
    - *  typechk.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -    typechk.cc
    -*/
    -
    -/******************************************************************
    -Project:   SLI-2.0, taken from: SLIDE - GUI for SLI
    -
    -Task:      With a TypeTrie it will be possible to perfrom a type
    -           check of (SLI) function input parameters. A TypeNode
    -           represents the position and the datatype of a single
    -           input parameter. The leaves of the tree will contain the
    -           interpreter function of correct input parameters.
    -
    -           A simple add type tree:
    -           -----------------------
    -
    -           *root
    -            |
    -           long -----------------> double ->0
    -            |                        |
    -           long ->  double->0      long  ->  double -> 0
    -            |         |             |          |
    -           (add)->0 (add)->0      (add)->0  (add)->0
    -            |        |             |         |
    -            0        0             0         0
    -
    -Baseclass: None
    -
    -Inherit :
    -
    -Author:    Marc-Oliver Gewaltig, Thomas Matyak
    -
    -Date:      18.11.95
    -
    -*******************************************************************/
    -
    -
    -#include "typechk.h"
    -
    -// Includes from sli:
    -#include "arraydatum.h"
    -#include "namedatum.h"
    -#include "sliexceptions.h"
    -
    -void
    -TypeTrie::TypeNode::toTokenArray( TokenArray& a ) const
    -{
    -  assert( a.size() == 0 );
    -  if ( not next and not alt ) // Leaf node
    -  {
    -    a.push_back( func );
    -  }
    -  else
    -  {
    -    assert( next );
    -    a.push_back( LiteralDatum( type ) );
    -    TokenArray a_next;
    -    next->toTokenArray( a_next );
    -    a.push_back( ArrayDatum( a_next ) );
    -    if ( alt )
    -    {
    -      TokenArray a_alt;
    -      alt->toTokenArray( a_alt );
    -      a.push_back( ArrayDatum( a_alt ) );
    -    }
    -  }
    -  assert( a.size() != 0 );
    -}
    -
    -void
    -TypeTrie::TypeNode::info( std::ostream& out, std::vector< TypeNode const* >& tl ) const
    -{
    -  if ( not next and not alt ) // Leaf node
    -  {
    -    // print type list then function
    -    for ( int i = tl.size() - 1; i >= 0; --i )
    -    {
    -      out << std::setw( 15 ) << std::left << LiteralDatum( tl[ i ]->type );
    -    }
    -    out << "calls " << func << std::endl;
    -  }
    -  else
    -  {
    -    assert( next );
    -    tl.push_back( this );
    -    next->info( out, tl );
    -    tl.pop_back();
    -    if ( alt )
    -    {
    -      alt->info( out, tl );
    -    }
    -  }
    -}
    -
    -
    -TypeTrie::TypeNode*
    -TypeTrie::newnode( const TokenArray& ta ) const
    -{
    -  assert( ta.size() > 0 );
    -  assert( ta.size() <= 3 );
    -  TypeNode* n = nullptr;
    -  if ( ta.size() == 1 ) // leaf
    -  {
    -    n = new TypeNode( sli::object, ta[ 0 ] );
    -  }
    -  else
    -  {
    -    // first object in the array must be a literal, indicating the type
    -    // the second and third object must be an array.
    -    LiteralDatum* typed = dynamic_cast< LiteralDatum* >( ta[ 0 ].datum() );
    -    assert( typed );
    -    ArrayDatum* nextd = dynamic_cast< ArrayDatum* >( ta[ 1 ].datum() );
    -    assert( nextd );
    -    n = new TypeNode( *typed );
    -    n->next = newnode( *nextd );
    -    if ( ta.size() == 3 )
    -    {
    -      ArrayDatum* altd = dynamic_cast< ArrayDatum* >( ta[ 2 ].datum() );
    -      assert( altd );
    -      n->alt = newnode( *altd );
    -    }
    -  }
    -  return n;
    -}
    -
    -/*
    -Task:      Destructor removes the complete tree.
    -
    -Author:    Marc Oliver Gewaltig
    -
    -Date:      18.11.95
    -
    -Parameter: None
    -*/
    -
    -
    -TypeTrie::TypeNode*
    -TypeTrie::getalternative( TypeTrie::TypeNode* pos, const Name& type )
    -{
    -  // Finds Node for the current type in the alternative List,
    -  // starting at pos. If the type is not already present, a new
    -  // Node will be created.
    -  const Name empty;
    -
    -  if ( pos->type == empty )
    -  {
    -    pos->type = type;
    -    return pos;
    -  }
    -
    -  while ( type != pos->type )
    -  {
    -    if ( not pos->alt )
    -    {
    -      pos->alt = new TypeNode( type );
    -    }
    -
    -    if ( pos->type == sli::any )
    -    {
    -      // When entering this if, the previous if added an extra Node,
    -      // thus pos->alt->alt will not be defined yet (nullptr)
    -
    -      TypeNode* new_tail = pos->alt;
    -
    -      // Move the wildcard to the tail Node.
    -
    -      pos->type = type;
    -      new_tail->type = sli::any;
    -      new_tail->func.swap( pos->func );
    -      new_tail->next = pos->next;
    -      pos->next = nullptr;
    -
    -      // this  while() cycle will terminate, as
    -      // pos->type==type by assignment.
    -    }
    -    else
    -    {
    -      pos = pos->alt; // pos->alt is always defined here.
    -    }
    -  }
    -
    -  return pos;
    -}
    -
    -void
    -TypeTrie::insert_move( const TypeArray& a, Token& f )
    -{
    -  /*
    -  Task:      Array 'a' adds a correct parameter list into the
    -             'TypeTrie'. Function 'f' will manage the handling
    -             of a correct parameter list. If 'array' is empty,
    -             function 'f' will handle a SLI procedure without
    -             input parameter.
    -             Insert will overwrite a function with identical parameter
    -             list which might be already in the trie.
    -
    -  Bugs:      If a represents a parameter-list which is already
    -             present, nothing happens, just a warning is
    -             issued.
    -
    -  Author:    Marc Oliver Gewaltig
    -
    -  Date:      15.Apr.1998, 18.11.95
    -              completely rewritten, 16.Apr. 1998
    -
    -  Parameter: a = array of datatypes
    -             f = interpreter function
    -
    -  */
    -  TypeNode* pos = root;
    -  const Name empty;
    -
    -  assert( root );
    -
    -  // Functions with no parameters are possible, but useless in trie
    -  // structures, so it is best to forbid them!
    -  assert( not a.empty() );
    -
    -  for ( unsigned int level = 0; level < a.size(); ++level )
    -  {
    -
    -    pos = getalternative( pos, a[ level ] );
    -    if ( not pos->next )
    -    {
    -      pos->next = new TypeNode( empty );
    -    }
    -    pos = pos->next;
    -  }
    -
    -  /* Error conditions:
    -     1. If pos->next != nullptr, the parameter list overlaps with
    -     an existing function definition.
    -     2. If pos->alt != nullptr, something undefined must have happened.
    -     This should be impossible.
    -  */
    -  if ( not pos->next )
    -  {
    -    pos->type = sli::object;
    -    pos->func.move( f );
    -  }
    -  else
    -  {
    -    std::cout << "Method 'TypeTrie::InsertFunction'" << std::endl
    -              << "Warning! Ambigous Function Definition ." << std::endl
    -              << "A function with longer, but identical initial parameter "
    -              << "list is already present!" << std::endl
    -              << "Nothing was changed." << std::endl;
    -  }
    -}
    -
    -/*_____ end InsertFunction() _____________________________________*/
    -
    -
    -void
    -TypeTrie::toTokenArray( TokenArray& a ) const
    -{
    -  a.clear();
    -  if ( root )
    -  {
    -    root->toTokenArray( a );
    -  }
    -}
    -
    -void
    -TypeTrie::info( std::ostream& out ) const
    -{
    -  std::vector< TypeNode const* > tl;
    -  tl.reserve( 5 );
    -  if ( root )
    -  {
    -    root->info( out, tl );
    -  }
    -}
    diff --git a/sli/typechk.h b/sli/typechk.h
    deleted file mode 100644
    index 461fca61ed..0000000000
    --- a/sli/typechk.h
    +++ /dev/null
    @@ -1,266 +0,0 @@
    -/*
    - *  typechk.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef TYPECHECK_H
    -#define TYPECHECK_H
    -/*
    -    classes for dynamic type checking in SLI
    -*/
    -
    -/******************************************************************
    -Project:   SYNOD/SLI 2.0
    -
    -Task:      With a TypeTrie it will be possible to perfrom a type
    -           check of (SLI) function input parameters. A TypeNode
    -           represents the position and the datatype of a single
    -           input parameter. The leaves of the tree will contain the
    -           interpreter function of correct input parameters.
    -
    -           A simple add type tree:
    -           -----------------------
    -
    -           root
    -            |
    -           long -----------------> double -|
    -            |                        |
    -           long -> double -|       long -> double -|
    -           (add)   (add)           (add)   (add)
    -
    -Baseclass: None
    -
    -Inherit :
    -
    -History:  This is a revised version of the type checking mechanism based on
    -          tries.
    -Author:    Marc-Oliver Gewaltig, Thomas Matyak
    -
    -Date:      18.11.95
    -
    -*******************************************************************/
    -
    -
    -// C++ includes:
    -#include <iostream>
    -#include <typeinfo>
    -#include <vector>
    -
    -// Includes from sli:
    -#include "slifunction.h"
    -#include "slinames.h"
    -#include "tokenarray.h"
    -#include "tokenstack.h"
    -#include "typearray.h"
    -
    -class TypeTrie
    -{
    -private:
    -  class TypeNode
    -  {
    -  private:
    -    unsigned int refs; // number of references to this Node
    -
    -  public:
    -    Name type;  // expected type at this stack level
    -    Token func; // points to the operator or an error func.
    -
    -    TypeNode* alt;  // points to the next parameter alternative
    -    TypeNode* next; // points to the next stack level for this path
    -
    -
    -    void
    -    addreference()
    -    {
    -      ++refs;
    -    }
    -
    -    void
    -    removereference()
    -    {
    -      if ( --refs == 0 )
    -      {
    -        delete this;
    -      }
    -    }
    -
    -    TypeNode( const Name& n )
    -      : refs( 1 )
    -      , type( n )
    -      , func()
    -      , alt( nullptr )
    -      , next( nullptr )
    -    {
    -    }
    -
    -    TypeNode( const Name& n, Token f )
    -      : refs( 1 )
    -      , type( n )
    -      , func( f )
    -      , alt( nullptr )
    -      , next( nullptr )
    -    {
    -    }
    -
    -    ~TypeNode()
    -    {
    -      if ( next )
    -      {
    -        next->removereference();
    -      }
    -      if ( alt )
    -      {
    -        alt->removereference();
    -      }
    -    }
    -    void toTokenArray( TokenArray& ) const;
    -    void info( std::ostream&, std::vector< TypeNode const* >& ) const;
    -  };
    -
    -  TypeNode* root;
    -
    -  //    TypeTrie operator=(const TypeTrie &){}; // disable this operator
    -  TypeNode* getalternative( TypeNode*, const Name& );
    -
    -  TypeNode* newnode( const TokenArray& ) const;
    -
    -public:
    -  TypeTrie()
    -    : root( new TypeNode( Name() ) )
    -  {
    -  }
    -
    -  TypeTrie( const TokenArray& ta )
    -    : root( nullptr )
    -  {
    -    root = newnode( ta );
    -  }
    -
    -  TypeTrie( const TypeTrie& tt )
    -    : root( tt.root )
    -  {
    -    if ( root )
    -    {
    -      root->addreference();
    -    }
    -  }
    -
    -  ~TypeTrie();
    -
    -  void insert_move( const TypeArray&, Token& );
    -  void
    -  insert( const TypeArray& a, const Token& t )
    -  {
    -    Token tmp( t );
    -    // We have no insert variant, that's why we copy the token
    -    // to a temporary and then move it to the trie.
    -    insert_move( a, tmp );
    -  }
    -
    -  const Token& lookup( const TokenStack& st ) const;
    -
    -  bool operator==( const TypeTrie& ) const;
    -
    -  inline bool equals( const Name&, const Name& ) const;
    -  void toTokenArray( TokenArray& ) const;
    -  void info( std::ostream& ) const;
    -};
    -
    -inline TypeTrie::~TypeTrie()
    -{
    -  if ( root )
    -  {
    -    root->removereference();
    -  }
    -}
    -/*_____ end ~TypeTrie() __________________________________________*/
    -
    -
    -// Typename comparison including /anytype which compares
    -// positively for all other typenames
    -
    -inline bool
    -TypeTrie::equals( const Name& t1, const Name& t2 ) const
    -{
    -  return ( t1 == t2 or t2 == sli::any or t1 == sli::any );
    -}
    -
    -inline const Token&
    -TypeTrie::lookup( const TokenStack& st ) const
    -{
    -  /*
    -  Task:      Tokens on stack 'st' will be compared with the TypeTrie.
    -             Each stack element must have an equivalent type on the
    -             current tree level. By reaching a leaf the interpreter
    -             function will be returned. If an error occurs the
    -             'ErrorFunction' will be returned.
    -
    -  Author:    Marc Oliver Gewaltig
    -
    -  Date:      18.11.95, rewritten on Apr. 16 1998
    -
    -  Parameter: st = stack
    -
    -  */
    -  const unsigned int load = st.load();
    -  unsigned int level = 0;
    -
    -  TypeNode* pos = root;
    -
    -  while ( level < load )
    -  {
    -    Name find_type = st.pick( level )->gettypename();
    -
    -    // Step 1: find the type at the current stack level in the
    -    // list of alternatives. Unfortunately, this search is O(n).
    -
    -    while ( not equals( find_type, pos->type ) )
    -    {
    -      if ( pos->alt )
    -      {
    -        pos = pos->alt;
    -      }
    -      else
    -      {
    -        throw ArgumentType( level );
    -      }
    -    }
    -
    -    // Now go to the next argument.
    -    pos = pos->next;
    -    if ( pos->type == sli::object )
    -    {
    -      return pos->func;
    -    }
    -
    -    ++level;
    -  }
    -
    -  throw StackUnderflow( level + 1, load );
    -}
    -
    -
    -inline bool
    -TypeTrie::operator==( const TypeTrie& tt ) const
    -{
    -  return ( root == tt.root );
    -}
    -
    -#endif
    diff --git a/sli/utils.cc b/sli/utils.cc
    deleted file mode 100644
    index 16aeee92af..0000000000
    --- a/sli/utils.cc
    +++ /dev/null
    @@ -1,45 +0,0 @@
    -/*
    - *  utils.cc
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "utils.h"
    -
    -// Includes from sli:
    -#include "integerdatum.h"
    -
    -bool
    -array2vector( std::vector< long >& v, const TokenArray a )
    -{
    -  bool status = true;
    -
    -  v.reserve( a.size() );
    -  for ( Token* t = a.begin(); t != a.end(); ++t )
    -  {
    -    IntegerDatum* id = dynamic_cast< IntegerDatum* >( t->datum() );
    -    if ( not id )
    -    {
    -      status = false;
    -      break;
    -    }
    -    v.push_back( id->get() );
    -  }
    -  return status;
    -}
    diff --git a/sli/utils.h b/sli/utils.h
    deleted file mode 100644
    index 3c2bee4ff6..0000000000
    --- a/sli/utils.h
    +++ /dev/null
    @@ -1,35 +0,0 @@
    -/*
    - *  utils.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef UTILS_H
    -#define UTILS_H
    -
    -// C++ includes:
    -#include <vector>
    -
    -// Includes from sli:
    -#include "token.h"
    -#include "tokenarray.h"
    -
    -bool array2vector( std::vector< long >&, const TokenArray& );
    -
    -#endif
    diff --git a/testsuite/CMakeLists.txt b/testsuite/CMakeLists.txt
    index b48284288b..8198834225 100644
    --- a/testsuite/CMakeLists.txt
    +++ b/testsuite/CMakeLists.txt
    @@ -18,23 +18,12 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     set( TESTSUBDIRS
    -    selftests
    -    unittests
         regressiontests
    -    mpitests
    -    mpi_selftests
    -    musictests
         cpptests
         pytests
         )
     
    -add_subdirectory( selftests )
    -add_subdirectory( unittests )
     add_subdirectory( regressiontests )
    -add_subdirectory( mpi_selftests/fail )
    -add_subdirectory( mpi_selftests/pass )
    -add_subdirectory( mpitests )
    -add_subdirectory( musictests )
     add_subdirectory( cpptests )
     
     install( DIRECTORY ${TESTSUBDIRS}
    @@ -46,12 +35,7 @@ install( PROGRAMS
         DESTINATION ${CMAKE_INSTALL_DATADIR}/testsuite
         )
     
    -install( PROGRAMS
    -    nest_indirect
    -    nest_serial
    -    DESTINATION ${CMAKE_INSTALL_BINDIR}
    -    )
    -
    -install( FILES junit_xml.sh run_test.sh summarize_tests.py
    +install( FILES
    +    junit_xml.sh run_test.sh summarize_tests.py
         DESTINATION ${CMAKE_INSTALL_DATADIR}/testsuite
         )
    diff --git a/testsuite/cpptests/CMakeLists.txt b/testsuite/cpptests/CMakeLists.txt
    index 6b570ef61a..814fb3fa62 100644
    --- a/testsuite/cpptests/CMakeLists.txt
    +++ b/testsuite/cpptests/CMakeLists.txt
    @@ -21,7 +21,6 @@ if ( HAVE_BOOST )
       include_directories( ${BOOST_INCLUDE_DIR} )
     
       add_executable( run_all_cpptests run_all.cpp )
    -  add_dependencies( run_all_cpptests nest )
     
       target_link_libraries( run_all_cpptests ${BOOST_LIBRARIES} nestkernel models )
     
    @@ -30,7 +29,6 @@ if ( HAVE_BOOST )
         ${PROJECT_BINARY_DIR}/libnestutil
         ${PROJECT_SOURCE_DIR}/models
         ${PROJECT_SOURCE_DIR}/nestkernel
    -    ${PROJECT_SOURCE_DIR}/sli
         ${PROJECT_SOURCE_DIR}/thirdparty
         )
     
    diff --git a/testsuite/mpi_selftests/fail/CMakeLists.txt b/testsuite/mpi_selftests/fail/CMakeLists.txt
    deleted file mode 100644
    index 3847714c04..0000000000
    --- a/testsuite/mpi_selftests/fail/CMakeLists.txt
    +++ /dev/null
    @@ -1,32 +0,0 @@
    -# testsuite/mpi_selftests/fail/CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -if ( HAVE_MPI )
    -  # add mpi_selftests/fail files
    -  file( GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sli )
    -
    -  foreach ( script ${scripts} )
    -    add_test( NAME mpi_selftests/fail/${script}
    -        COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest_indirect
    -        ${CMAKE_INSTALL_FULL_DOCDIR}/mpi_selftests/fail/${script} # use the installed version
    -        )
    -    set_tests_properties( mpi_selftests/fail/${script}
    -        PROPERTIES WILL_FAIL TRUE )
    -  endforeach ()
    -endif ()
    diff --git a/testsuite/mpi_selftests/fail/crash_distributed_assert_or_die.sli b/testsuite/mpi_selftests/fail/crash_distributed_assert_or_die.sli
    deleted file mode 100644
    index 14c5694450..0000000000
    --- a/testsuite/mpi_selftests/fail/crash_distributed_assert_or_die.sli
    +++ /dev/null
    @@ -1,51 +0,0 @@
    -/*
    - *  crash_distributed_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::crash_distributed_assert_or_die - self test of distributed_assert_or_die
    -
    -Synopsis: nest_indirect crash_distributed_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_assert_or_die. The function needs
    - to be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::fail_distributed_assert_or_die, testsuite::test_distributed_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -[1 2 4]
    -{
    -  % The following assertion will fail for rank 3 when
    -  % running with four mpi processes, thus crashing that 
    -  % rank and thus the execution for four processes.
    -  % The test must then report failure. 
    -  Rank 3 neq assert_or_die  
    -  Rank 0 eq { true } if % leave so all other cases pass
    -}
    -distributed_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/crash_distributed_collect_assert_or_die.sli b/testsuite/mpi_selftests/fail/crash_distributed_collect_assert_or_die.sli
    deleted file mode 100644
    index 5f71fa664f..0000000000
    --- a/testsuite/mpi_selftests/fail/crash_distributed_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -/*
    - *  crash_distributed_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::crash_distributed_collect_assert_or_die - self test of distributed_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_collect_assert_or_die.sli -> crash
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::fail_distributed_collect_assert_or_die, testsuite::test_distributed_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -[1 2 4]
    -{
    -  % The following assertion will fail for rank 3 when
    -  % running with four mpi processes, thus crashing that 
    -  % rank and thus the execution for four processes.
    -  % The test must then report failure. 
    -  Rank 3 neq assert_or_die  
    -
    -  true  % different number of "true" objects for different number of jobs
    -}
    -distributed_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/crash_distributed_invariant_assert_or_die.sli b/testsuite/mpi_selftests/fail/crash_distributed_invariant_assert_or_die.sli
    deleted file mode 100644
    index 900d207921..0000000000
    --- a/testsuite/mpi_selftests/fail/crash_distributed_invariant_assert_or_die.sli
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -/*
    - *  crash_distributed_invariant_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::crash_distributed_invariant_assert_or_die - self test of distributed_invariant_assert_or_die
    -
    -Synopsis: nest_indirect distributed_invariant_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_invariant_assert_or_die. The function needs
    - to be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return equal data for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::fail_distributed_invariant_assert_or_die, testsuite::test_distributed_invariant_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -[1 2 4]
    -{
    -  % The following assertion will fail for rank 3 when
    -  % running with four mpi processes, thus crashing that 
    -  % rank and thus the execution for four processes.
    -  % The test must then report failure. 
    -  Rank 3 neq assert_or_die  
    -
    -  % only rank zero leaves true on stack  
    -  0 Rank eq { [20.5 (foo) 45] } if  
    -}
    -distributed_invariant_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/crash_distributed_pass_or_die.sli b/testsuite/mpi_selftests/fail/crash_distributed_pass_or_die.sli
    deleted file mode 100644
    index 0937366820..0000000000
    --- a/testsuite/mpi_selftests/fail/crash_distributed_pass_or_die.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  crash_distributed_pass_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::crash_distributed_pass_or_die - self test of distributed_pass_or_die
    -
    -Synopsis: nest_indirect crash_distributed_pass_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_pass_or_die. The function needs
    - to be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::fail_distributed_pass_or_die, testsuite::test_distributed_pass_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -[1 2 4]
    -{
    -  % The following assertion will fail for rank 3 when
    -  % running with four mpi processes, thus crashing that 
    -  % rank and thus the execution for four processes.
    -  % The test must then report failure. 
    -  Rank 3 neq assert_or_die  
    -}
    -distributed_pass_or_die
    diff --git a/testsuite/mpi_selftests/fail/crash_distributed_process_invariant_collect_assert_or_die.sli b/testsuite/mpi_selftests/fail/crash_distributed_process_invariant_collect_assert_or_die.sli
    deleted file mode 100644
    index e582843f77..0000000000
    --- a/testsuite/mpi_selftests/fail/crash_distributed_process_invariant_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  crash_distributed_process_invariant_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::crash_distributed_process_invariant_collect_assert_or_die - self test of distributed_invariant_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_process_invariant_collect_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_invariant_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::fail_distributed_process_invariant_collect_assert_or_die, testsuite::test_distributed_process_invariant_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -[1 2 4]
    -{
    -  % The following assertion will fail for rank 3 when
    -  % running with four mpi processes, thus crashing that 
    -  % rank and thus the execution for four processes.
    -  % The test must then report failure. 
    -  Rank 3 neq assert_or_die  
    -
    - % distribute the range of numbers [1 2 3 4]
    - % uniformly over the available jobs
    - [1 2 3 4] 4 GetKernelStatus /num_processes get div Partition [Rank 1 add] Part
    -
    -}
    -distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/crash_distributed_process_invariant_events_assert_or_die.sli b/testsuite/mpi_selftests/fail/crash_distributed_process_invariant_events_assert_or_die.sli
    deleted file mode 100644
    index a5b722623d..0000000000
    --- a/testsuite/mpi_selftests/fail/crash_distributed_process_invariant_events_assert_or_die.sli
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/*
    - *  crash_distributed_process_invariant_events_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::crash_distributed_process_invariant_events_assert_or_die - self test of distributed_invariant_events_assert_or_die
    -
    -Synopsis: nest_indirect distributed_process_invariant_events_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_invariant_events_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::fail_distributed_process_invariant_events_assert_or_die, testsuite::test_distributed_process_invariant_events_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% take array of dict, with all entries arrays; return single dict with all 
    -% data with same key merge to single array; all dicts must have same keys
    -/merge_dict_entries
    -{
    -  dup { keys } Map 
    -  dup First /keylits Set
    -  keylits { cvs } Map Sort /keystrings Set % only strings can be sorted  
    -  true exch { { cvs } Map Sort keystrings eq and } Fold assert_or_die % all have same keys
    -  
    -  % build new dict with merged arrays
    -  dup First /newdict Set
    -  Rest
    -  {
    -     keylits { /key Set dup key get newdict key get join newdict key rolld put } forall
    -     pop
    -  } forall  
    -
    -  newdict   % leave on stack
    -}
    -def 
    -
    -[1 2 4]
    -{
    -  % per vp dictionaries, four VPs
    -  /vp_events 
    -  [
    -    << /times [ 23 45 67 ] /senders [ 12 12 16 ] /offsets [ 0.035 0.01 0.02 ] >>
    -    << /times [ 11 99    ] /senders [ 13 17    ] /offsets [ 0.07  0.03      ] >>
    -    << /times [ 12 23 34 ] /senders [ 14 18 22 ] /offsets [ 0.05  0.04 0.08 ] >>
    -    << /times [ 24       ] /senders [ 15       ] /offsets [ 0.06            ] >>
    -  ] def 
    -
    -  mark
    -    NumProcesses 1 eq { vp_events merge_dict_entries exit } case
    -    NumProcesses 2 eq { vp_events [Rank 1 add dup 2 add 2] Take merge_dict_entries exit } case
    -    NumProcesses 4 eq { vp_events Rank get exit } case
    -  switch
    -
    -  3 Rank neq assert_or_die % provoke crash
    -}
    -distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/crash_distributed_rank_invariant_collect_assert_or_die.sli b/testsuite/mpi_selftests/fail/crash_distributed_rank_invariant_collect_assert_or_die.sli
    deleted file mode 100644
    index a452bb97da..0000000000
    --- a/testsuite/mpi_selftests/fail/crash_distributed_rank_invariant_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,56 +0,0 @@
    -/*
    - *  crash_distributed_rank_invariant_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::crash_distributed_rank_invariant_collect_assert_or_die - self test of distributed_rank_invariant_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_rank_invariant_collect_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_rank_invariant_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::fail_distributed_rank_invariant_collect_assert_or_die, testsuite::test_distributed_rank_invariant_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  % The following assertion will fail for rank 3 when
    -  % running with four mpi processes, thus crashing that 
    -  % rank and thus the execution for four processes.
    -  % The test must then report failure. 
    -  Rank 3 neq assert_or_die  
    -
    - % each rank returns same result
    - [1 2 3 4] 
    -}
    -distributed_rank_invariant_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/fail_distributed_assert_or_die.sli b/testsuite/mpi_selftests/fail/fail_distributed_assert_or_die.sli
    deleted file mode 100644
    index 336fcb2b9a..0000000000
    --- a/testsuite/mpi_selftests/fail/fail_distributed_assert_or_die.sli
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  fail_distributed_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::fail_distributed_assert_or_die - self test of distributed_assert_or_die
    -
    -Synopsis: nest_indirect distributed_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_assert_or_die. The function needs
    - to be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::crash_distributed_assert_or_die, testsuite::test_distributed_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  % only rank zero leaves true on stack, but leave false if 4 procs  
    -  0 Rank eq { NumProcesses 4 lt } if  
    -}
    -distributed_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/fail_distributed_collect_assert_or_die.sli b/testsuite/mpi_selftests/fail/fail_distributed_collect_assert_or_die.sli
    deleted file mode 100644
    index 0f5e0264ac..0000000000
    --- a/testsuite/mpi_selftests/fail/fail_distributed_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  fail_distributed_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::fail_distributed_collect_assert_or_die - self test of distributed_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_collect_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::crash_distributed_collect_assert_or_die, testsuite::test_distributed_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  % each rank leaves true, except rank 3 for four procs
    -  Rank 3 neq
    -}
    -distributed_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/fail_distributed_invariant_assert_or_die.sli b/testsuite/mpi_selftests/fail/fail_distributed_invariant_assert_or_die.sli
    deleted file mode 100644
    index accacbe1cc..0000000000
    --- a/testsuite/mpi_selftests/fail/fail_distributed_invariant_assert_or_die.sli
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  fail_distributed_invariant_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::fail_distributed_invariant_assert_or_die - self test of distributed_invariant_assert_or_die
    -
    -Synopsis: nest_indirect distributed_invariant_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_invariant_assert_or_die. The function needs
    - to be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return equal data for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::crash_distributed_invariant_assert_or_die, testsuite::test_distributed_invariant_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  % return different result for four procs
    -  0 Rank eq { [20.5 (foo) 45 NumProcesses 4 eq] } if  
    -}
    -distributed_invariant_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/fail_distributed_pass_or_die.sli b/testsuite/mpi_selftests/fail/fail_distributed_pass_or_die.sli
    deleted file mode 100644
    index 5ed6dc12eb..0000000000
    --- a/testsuite/mpi_selftests/fail/fail_distributed_pass_or_die.sli
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  fail_distributed_pass_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::fail_distributed_pass_or_die - self test of distributed_pass_or_die
    -
    -Synopsis: nest_indirect distributed_pass_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_pass_or_die. The function needs to
    - be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs; this will only be the
    - case if the code for all jobs completes and leaves the stack empty.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::crash_distributed_pass_or_die, testsuite::test_distributed_pass_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  % do nothing, leave empty stack, except for four procs
    -  NumProcesses 4 eq { true } if
    -}
    -distributed_pass_or_die
    diff --git a/testsuite/mpi_selftests/fail/fail_distributed_process_invariant_collect_assert_or_die.sli b/testsuite/mpi_selftests/fail/fail_distributed_process_invariant_collect_assert_or_die.sli
    deleted file mode 100644
    index 0e58c22873..0000000000
    --- a/testsuite/mpi_selftests/fail/fail_distributed_process_invariant_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,52 +0,0 @@
    -/*
    - *  fail_distributed_process_invariant_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::fail_distributed_process_invariant_collect_assert_or_die - self test of distributed_invariant_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_process_invariant_collect_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_invariant_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::crash_distributed_process_invariant_collect_assert_or_die, testsuite::test_distributed_process_invariant_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    - % distribute the range of numbers [1 2 3 4], but use different range for 4 procs
    - % uniformly over the available jobs
    - NumProcesses 4 eq { [1 2 3 4] }{ [ 5 6 7 8 ] } ifelse
    - 4 GetKernelStatus /num_processes get div Partition [Rank 1 add] Part
    -}
    -distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/fail_distributed_process_invariant_events_assert_or_die.sli b/testsuite/mpi_selftests/fail/fail_distributed_process_invariant_events_assert_or_die.sli
    deleted file mode 100644
    index 4bc2f9a431..0000000000
    --- a/testsuite/mpi_selftests/fail/fail_distributed_process_invariant_events_assert_or_die.sli
    +++ /dev/null
    @@ -1,86 +0,0 @@
    -/*
    - *  fail_distributed_process_invariant_events_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::fail_distributed_process_invariant_events_assert_or_die - self test of distributed_invariant_events_assert_or_die
    -
    -Synopsis: nest_indirect distributed_process_invariant_events_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_invariant_events_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::crash_distributed_process_invariant_events_assert_or_die, testsuite::test_distributed_process_invariant_events_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -% take array of dict, with all entries arrays; return single dict with all 
    -% data with same key merge to single array; all dicts must have same keys
    -/merge_dict_entries
    -{
    -  dup { keys } Map 
    -  dup First /keylits Set
    -  keylits { cvs } Map Sort /keystrings Set % only strings can be sorted  
    -  true exch { { cvs } Map Sort keystrings eq and } Fold assert_or_die % all have same keys
    -  
    -  % build new dict with merged arrays
    -  dup First /newdict Set
    -  Rest
    -  {
    -     keylits { /key Set dup key get newdict key get join newdict key rolld put } forall
    -     pop
    -  } forall  
    -
    -  newdict   % leave on stack
    -}
    -def 
    -
    -[1 2 4]
    -{
    -  % per vp dictionaries, four VPs
    -  /vp_events 
    -  [
    -    << /times [ 23 45 67 ] /senders [ 12 12 16 ] /offsets [ 0.035 0.01 0.02 ] >>
    -    << /times [ 11 99    ] /senders [ 13 17    ] /offsets [ 0.07  0.03      ] >>
    -    << /times [ 12 23 34 ] /senders [ 14 18 22 ] /offsets [ 0.05  0.04 0.08 ] >>
    -    << /times [ 24       ] /senders [ 15       ] /offsets [ 0.06            ] >>
    -  ] def 
    -
    -  mark
    -    NumProcesses 1 eq { vp_events merge_dict_entries exit } case
    -    NumProcesses 2 eq { vp_events [Rank 1 add dup 2 add 2] Take merge_dict_entries exit } case
    -    NumProcesses 4 eq { vp_events Rank get exit } case
    -  switch
    -
    -  % add one extra item to provoke failure
    -  Rank 3 eq { dup /offsets get 0.0999 append /offsets exch put } if
    -}
    -distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpi_selftests/fail/fail_distributed_rank_invariant_collect_assert_or_die.sli b/testsuite/mpi_selftests/fail/fail_distributed_rank_invariant_collect_assert_or_die.sli
    deleted file mode 100644
    index f10cc3c873..0000000000
    --- a/testsuite/mpi_selftests/fail/fail_distributed_rank_invariant_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  fail_distributed_rank_invariant_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::fail_distributed_rank_invariant_collect_assert_or_die - self test of distributed_rank_invariant_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_rank_invariant_collect_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_rank_invariant_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: testsuite::crash_distributed_rank_invariant_collect_assert_or_die, testsuite::test_distributed_rank_invariant_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    - % each rank returns same result, except rank 3 for four procs
    - Rank 3 eq { [1 2 3 4] }{ [5 6 7 8] } ifelse
    -}
    -distributed_rank_invariant_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/pass/CMakeLists.txt b/testsuite/mpi_selftests/pass/CMakeLists.txt
    deleted file mode 100644
    index 39662664b9..0000000000
    --- a/testsuite/mpi_selftests/pass/CMakeLists.txt
    +++ /dev/null
    @@ -1,30 +0,0 @@
    -# testsuite/mpi_selftests/pass/CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -if ( HAVE_MPI )
    -  # add mpi_selftests/pass files
    -  file( GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sli )
    -
    -  foreach ( script ${scripts} )
    -    add_test( NAME mpi_selftests/pass/${script}
    -        COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest_indirect
    -        ${CMAKE_INSTALL_FULL_DOCDIR}/mpi_selftests/pass/${script} # use the installed version
    -        )
    -  endforeach ()
    -endif ()
    diff --git a/testsuite/mpi_selftests/pass/test_distributed_assert_or_die.sli b/testsuite/mpi_selftests/pass/test_distributed_assert_or_die.sli
    deleted file mode 100644
    index a2c6c1364f..0000000000
    --- a/testsuite/mpi_selftests/pass/test_distributed_assert_or_die.sli
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  test_distributed_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_distributed_assert_or_die - self test of distributed_assert_or_die
    -
    -Synopsis: nest_indirect distributed_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_assert_or_die. The function needs
    - to be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: unittest::distributed_assert_or_die, testsuite::crash_distributed_assert_or_die, testsuite::fail_distributed_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  % only rank zero leaves true on stack  
    -  0 Rank eq { true } if  
    -}
    -distributed_assert_or_die
    diff --git a/testsuite/mpi_selftests/pass/test_distributed_collect_assert_or_die.sli b/testsuite/mpi_selftests/pass/test_distributed_collect_assert_or_die.sli
    deleted file mode 100644
    index af7b9d5400..0000000000
    --- a/testsuite/mpi_selftests/pass/test_distributed_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  test_distributed_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_distributed_collect_assert_or_die - self test of distributed_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_collect_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: unittest::distributed_collect_assert_or_die, testsuite::crash_distributed_collect_assert_or_die, testsuite::fail_distributed_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  true  % different number of "true" objects for different number of jobs
    -}
    -distributed_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/pass/test_distributed_invariant_assert_or_die.sli b/testsuite/mpi_selftests/pass/test_distributed_invariant_assert_or_die.sli
    deleted file mode 100644
    index ba4a5bd4b9..0000000000
    --- a/testsuite/mpi_selftests/pass/test_distributed_invariant_assert_or_die.sli
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  test_distributed_invariant_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_distributed_invariant_assert_or_die - self test of distributed_invariant_assert_or_die
    -
    -Synopsis: nest_indirect distributed_invariant_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_invariant_assert_or_die. The function needs
    - to be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return equal data for all runs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: unittest::distributed_invariant_assert_or_die, testsuite::crash_distributed_invariant_assert_or_die, testsuite::fail_distributed_invariant_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  % only rank zero leaves true on stack  
    -  0 Rank eq { [20.5 (foo) 45] } if  
    -}
    -distributed_invariant_assert_or_die
    diff --git a/testsuite/mpi_selftests/pass/test_distributed_pass_or_die.sli b/testsuite/mpi_selftests/pass/test_distributed_pass_or_die.sli
    deleted file mode 100644
    index 66edacbb5e..0000000000
    --- a/testsuite/mpi_selftests/pass/test_distributed_pass_or_die.sli
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  test_distributed_pass_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_distributed_pass_or_die - self test of distributed_pass_or_die
    -
    -Synopsis: nest_indirect distributed_pass_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of distributed_pass_or_die. The function needs to
    - be able to collect the results of an arbitrary number of jobs and
    - checks whether all jobs return true for all runs; this will only be the
    - case if the code for all jobs completes and leaves the stack empty.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: unittest::distributed_pass_or_die, testsuite::crash_distributed_pass_or_die, testsuite::fail_distributed_pass_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    -  % do nothing, leave empty stack
    -}
    -distributed_pass_or_die
    diff --git a/testsuite/mpi_selftests/pass/test_distributed_process_invariant_collect_assert_or_die.sli b/testsuite/mpi_selftests/pass/test_distributed_process_invariant_collect_assert_or_die.sli
    deleted file mode 100644
    index 6d215f3594..0000000000
    --- a/testsuite/mpi_selftests/pass/test_distributed_process_invariant_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,52 +0,0 @@
    -/*
    - *  test_distributed_process_invariant_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_distributed_process_invariant_collect_assert_or_die - self test of distributed_invariant_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_process_invariant_collect_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_invariant_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: unittest::distributed_process_invariant_collect_assert_or_die, testsuite::crash_distributed_process_invariant_collect_assert_or_die, testsuite::fail_distributed_process_invariant_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    - % distribute the range of numbers [1 2 3 4]
    - % uniformly over the available jobs
    - [1 2 3 4] 4 GetKernelStatus /num_processes get div Partition [Rank 1 add] Part
    -
    -}
    -distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/pass/test_distributed_process_invariant_events_assert_or_die.sli b/testsuite/mpi_selftests/pass/test_distributed_process_invariant_events_assert_or_die.sli
    deleted file mode 100644
    index 5bd1d0d312..0000000000
    --- a/testsuite/mpi_selftests/pass/test_distributed_process_invariant_events_assert_or_die.sli
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    - *  test_distributed_process_invariant_events_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_distributed_process_invariant_events_assert_or_die - self test of distributed_invariant_events_assert_or_die
    -
    -Synopsis: nest_indirect distributed_process_invariant_events_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_invariant_events_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: unittest::distributed_process_invariant_events_assert_or_die, testsuite::crash_distributed_process_invariant_events_assert_or_die, testsuite::fail_distributed_process_invariant_events_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -% take array of dict, with all entries arrays; return single dict with all 
    -% data with same key merge to single array; all dicts must have same keys
    -/merge_dict_entries
    -{
    -  dup { keys } Map 
    -  dup First /keylits Set
    -  keylits { cvs } Map Sort /keystrings Set % only strings can be sorted  
    -  true exch { { cvs } Map Sort keystrings eq and } Fold assert_or_die % all have same keys
    -  
    -  % build new dict with merged arrays
    -  dup First /newdict Set
    -  Rest
    -  {
    -     keylits { /key Set dup key get newdict key get join newdict key rolld put } forall
    -     pop
    -  } forall  
    -
    -  newdict   % leave on stack
    -}
    -def 
    -
    -[1 2 4]
    -{
    -  % per vp dictionaries, four VPs
    -  /vp_events 
    -  [
    -    << /times [ 23 45 67 ] /senders [ 12 12 16 ] /offsets [ 0.035 0.01 0.02 ] >>
    -    << /times [ 11 99    ] /senders [ 13 17    ] /offsets [ 0.07  0.03      ] >>
    -    << /times [ 12 23 34 ] /senders [ 14 18 22 ] /offsets [ 0.05  0.04 0.08 ] >>
    -    << /times [ 24       ] /senders [ 15       ] /offsets [ 0.06            ] >>
    -  ] def 
    -
    -  mark
    -    NumProcesses 1 eq { vp_events merge_dict_entries exit } case
    -    NumProcesses 2 eq { vp_events [Rank 1 add dup 2 add 2] Take merge_dict_entries exit } case
    -    NumProcesses 4 eq { vp_events Rank get exit } case
    -  switch
    -}
    -distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpi_selftests/pass/test_distributed_rank_invariant_collect_assert_or_die.sli b/testsuite/mpi_selftests/pass/test_distributed_rank_invariant_collect_assert_or_die.sli
    deleted file mode 100644
    index 9123457339..0000000000
    --- a/testsuite/mpi_selftests/pass/test_distributed_rank_invariant_collect_assert_or_die.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  test_distributed_rank_invariant_collect_assert_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_distributed_rank_invariant_collect_assert_or_die - self test of distributed_rank_invariant_collect_assert_or_die
    -
    -Synopsis: nest_indirect distributed_rank_invariant_collect_assert_or_die.sli -> -
    -
    -
    -Description:
    -
    - This is a self test of
    - distributed_rank_invariant_collect_assert_or_die. The function needs to be
    - able to collect the results of an arbitrary number of jobs and
    - compare the set of results to the one of the same simulation carried
    - out with a different number of jobs.
    -
    -Author:  September 2010, Diesmann; May 2012, Plesser
    -SeeAlso: unittest::distributed_rank_invariant_collect_assert_or_die, testsuite::crash_distributed_rank_invariant_collect_assert_or_die, testsuite::fail_distributed_rank_invariant_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]
    -{
    - % each rank returns same result
    - [1 2 3 4] 
    -}
    -distributed_rank_invariant_collect_assert_or_die
    diff --git a/testsuite/mpi_selftests/pass/test_parse_message_line.sli b/testsuite/mpi_selftests/pass/test_parse_message_line.sli
    deleted file mode 100644
    index ef320b5b83..0000000000
    --- a/testsuite/mpi_selftests/pass/test_parse_message_line.sli
    +++ /dev/null
    @@ -1,116 +0,0 @@
    -/*
    - *  test_parse_message_line.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_parse_message_line -> selftest for message line parser in unittest
    -
    -Synopsis: nest test_parse_message_line.sli -> -
    -
    -Description:
    -  This is a self-test of the :parse_message_line_ function.
    -  It is NOT run in parallel, but used for testing parallel execution.
    -
    -Author:  May 2012, Plesser
    -
    -See also: unittest:::parse_message_line
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -{ 
    -  clear
    -  (:passed:5::) :parse_message_line
    -  exch
    -  [/passed 5 []] eq
    -  and
    -} assert_or_die
    -
    -{
    -  clear
    -  (:error:10::) :parse_message_line
    -  exch
    -  [/error 10 []] eq
    -  and 
    -} assert_or_die
    -
    -{
    -  clear
    -  (:error:-7::) :parse_message_line
    -  not  
    -  count 1 eq 
    -  and
    -} assert_or_die
    -
    -{
    -  clear
    -  (:error:y::) :parse_message_line
    -  not  
    -  count 1 eq 
    -  and
    -} assert_or_die
    -
    -{
    -  clear
    -  (:foo:0::) :parse_message_line
    -  not  
    -  count 1 eq 
    -  and
    -} assert_or_die
    -
    -{
    -  clear  
    -  (:result:0::) :parse_message_line
    -  exch  
    -  [/result 0 []] eq
    -  and
    -} assert_or_die
    -
    -{
    -  clear  
    -  (:result:0:[4 [5 6]]:) :parse_message_line
    -  exch
    -  [/result 0 [4 [5 6]]] eq
    -  and
    -} assert_or_die
    -
    -{
    -  clear
    -  (:result:0:(joe doe :;moe for:):) :parse_message_line
    -  exch
    -  [/result 0 (joe doe :;moe for:)] eq
    -  and
    -} assert_or_die
    -
    -{ 
    -  clear
    -  (:result:0:[/:serialized:dict [/a 1 /b 2 /c [1 2]]]:) :parse_message_line
    -  exch
    -  dup 2 Take [/result 0] eq rolld and exch
    -  2 get /result Set
    -  /expected << /a 1 /b 2 /c [1 2] >> def
    -  result expected SubsetQ expected result SubsetQ and
    -  and
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/mpitests/CMakeLists.txt b/testsuite/mpitests/CMakeLists.txt
    deleted file mode 100644
    index fcbeb129cd..0000000000
    --- a/testsuite/mpitests/CMakeLists.txt
    +++ /dev/null
    @@ -1,30 +0,0 @@
    -# CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -if ( HAVE_MPI )
    -  # add mpitests files
    -  file( GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sli )
    -
    -  foreach ( script ${scripts} )
    -    add_test( NAME mpitests/${script}
    -        COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest_indirect
    -        ${CMAKE_INSTALL_FULL_DOCDIR}/mpitests/${script} # use the installed version
    -        )
    -  endforeach ()
    -endif ()
    diff --git a/testsuite/mpitests/README b/testsuite/mpitests/README
    deleted file mode 100644
    index 60b825d99e..0000000000
    --- a/testsuite/mpitests/README
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -Strategy for testing models using thread-specific RNGs
    -------------------------------------------------------
    -
    -Key requirement: 
    -Identical results for fixed VP number, independent of number of MPI processes.
    -
    -Affected devices and models:
    -
    -* gamma_sup_generator (A.1, B.1)
    -* mip_generator (A.1, B.1; see also #143)
    -* noise_generator (A.1, B.1)
    -* poisson_generator (A.1, B.1)
    -* poisson_generator_ps (A.1, B.1)
    -* ppd_sup_generator (A.1, B.1)
    -+ ginzburg_neuron (A.2, B.2)
    -+ pp_psc_delta (A.2, B.2)
    -+ pulsepacket_generator (A.2, B.2)
    -*/+ sinusoidal_poisson_generator (A.2, B.2)
    -
    -For {A,B}.{1,2} classification see below. We have the following cases:
    -
    -Case *
    -------
    -Separate generator instance on each VP, separate random event sequence to each target.
    -
    -Test:
    -1. Create one device
    -2. Create one target (ordinary node) per VP.
    -3. Each target must receive different sequence of events.
    -4. Sequence of events for each target must be identical irrespective of VP-split.
    -
    -Note: in MPI tests, we test only 4., not 3.
    -
    -Case +
    -------
    -One instance in entire network, same sequence of events to all targets.
    -
    -Test:
    -1. Create one node per VP.
    -2. Create one target per VP (ordinary node) and connect 1-to-1.
    -3. Each target must receive different sequence of events.
    -4. Sequence of events for each target must be identical irrespective of VP-split.
    -
    -Note: in MPI tests, we test only 4., not 3.
    -
    -A. Proxy
    --- We cannot query from the SLI level whether a node has proxies or not
    -
    -A.1 Nodes without proxies: 
    --- separate instance on each thread/vp
    --- different RNG on each thread
    --- RNG for each thread must be the same for given VP, independent of process/thread split
    -
    -A.2 Nodes with proxies:
    --- one instance only
    --- only RNG for the thread of the instance matters
    --- must be same RNG for given VP, independent of process/thread split
    -
    -B. Target-specific random output
    --- We cannot query from the SLI level whether a node generates target-specific output
    -
    -B.1 Target-specific output:
    --- each target receives a different sequence of random events
    --- implemented using event_hook()
    --- B.1 requires A.1
    -
    -B.2 Common output:
    --- all targets receive the same sequence of random events
    --- B.2 requires A.2
    diff --git a/testsuite/mpitests/issue-1957.sli b/testsuite/mpitests/issue-1957.sli
    deleted file mode 100644
    index 0f8a4825b4..0000000000
    --- a/testsuite/mpitests/issue-1957.sli
    +++ /dev/null
    @@ -1,51 +0,0 @@
    -/*
    - *  issue-1957.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::issue-1957 - Test GetConnections after creating and deleting connections
    -                                  with more ranks than connections
    -    Synopsis: (issue-1957) run -> - 
    -
    -    Description:
    -    issue-1957.sli checks that calling GetConnections after creating and deleting connections
    -    is possible when there are fewer connections than ranks.
    -    
    -    Author: Stine Brekke Vennemo
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[2 4]
    -{
    -  /nrns /iaf_psc_alpha Create def
    -
    -  nrns nrns /all_to_all Connect
    -
    -  << >> GetConnections { cva 2 Take }  Map /conns Set
    -
    -  nrns nrns << /rule /all_to_all >> << /synapse_model /static_synapse >> Disconnect_g_g_D_D
    -  << >> GetConnections  { cva 2 Take }  Map conns join
    -
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/issue-1974.sli b/testsuite/mpitests/issue-1974.sli
    deleted file mode 100644
    index fdd2b7f140..0000000000
    --- a/testsuite/mpitests/issue-1974.sli
    +++ /dev/null
    @@ -1,56 +0,0 @@
    -/*
    - *  issue-1974.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::issue-1974 - Ensure that from MUSIC proxies are created correctly
    -    Synopsis: (issue-1974) run -> - 
    -
    -    Description:
    -    issue-1974.sli checks that neurons are connected exactly once to MUSIC proxies.
    -    
    -    Author: Hans Ekkehard Plesser
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_music
    -
    -/*
    - * Test logic:
    - * For each of the two parrot neurons, exactly one connection from/to the
    - * in/out MUSIC proxy must be created, specifically to the proxy on the
    - * rank on which the parrot neuron exists. Therefore, the pooled connections
    - * across ranks must be identical independent of number of ranks.
    - */
    -[1 2 4]
    -{
    -  /nrns /parrot_neuron 2 Create def
    -  /in /music_event_in_proxy << /port_name (in_spikes) >> Create def
    -  /out /music_event_out_proxy << /port_name (out_spikes) >> Create def
    -
    -  in nrns Connect
    -  nrns out Connect
    -
    -  << >> GetConnections GetStatus { [[ /source /target ]] get } Map
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/issue-2119.sli b/testsuite/mpitests/issue-2119.sli
    deleted file mode 100644
    index 0c65771321..0000000000
    --- a/testsuite/mpitests/issue-2119.sli
    +++ /dev/null
    @@ -1,66 +0,0 @@
    -/*
    - *  issue-2119.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::issue-2119 - Test thread-specific spatial random parameters
    -    Synopsis: (issue-2119) run -> -
    -
    -    Description:
    -    issue-2119.sli checks that randomized parameters depending on the thread of
    -    the randomized node perform correctly under MPI and OpenMP.
    -    
    -    Author: Håkon Mørk / Hans Ekkehard Plesser
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/random_params [
    -  << /exponential << >> >>
    -  << /normal << >> >>
    -  << /lognormal << >> >>
    -  << /uniform << >> >>
    -  << /uniform_int << /max 10 >> >>
    -] def
    -
    -
    -[1 2 4]
    -{
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -  
    -  % Create several neurons, randomize membrane potential, check for identical results
    -  % independent of proc-thread split. Repeat for all random params.
    -  
    -  random_params
    -  {
    -    CreateParameter /param Set
    -    /nrns /iaf_psc_alpha 4 Create def
    -    nrns << /V_m param >> SetStatus
    -  
    -    nrns LocalOnly /V_m get
    -  }
    -  Map Flatten
    -
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/issue-281.sli b/testsuite/mpitests/issue-281.sli
    deleted file mode 100644
    index 055393c0a0..0000000000
    --- a/testsuite/mpitests/issue-281.sli
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -/*
    - *  issue-281.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-281 - Check that ConnectLayers works MPI-parallel for fixed fan-out
    -
    -Synopsis: (issue-281) run -> NEST exits if test fails
    -
    -Description:
    - This test connects a layer with itself with fixed fan-out.
    - The test should pass with any number of MPI processes.
    -
    -Author: Hans Ekkehard Plesser, 2016-03-18
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -[1 2 4]
    -{
    -  <<
    -    /shape [ 3 3 ]
    -    /elements /iaf_psc_alpha
    -  >>
    -  CreateLayer
    -  dup
    -
    -  <<
    -     /connection_type /pairwise_bernoulli_on_target
    -     /number_of_connections 8
    -     /allow_multapses false
    -     /allow_autapses false
    -
    -     % weights are randomized to check that global RNGs stay in sync
    -     /weight << /uniform << /min 1. /max 2. >> >>
    -  >>
    -  ConnectLayers
    -
    -  % Simulate call required to provoke global-rng-sync-check.
    -  10 Simulate
    -}
    -distributed_pass_or_die
    -
    diff --git a/testsuite/mpitests/issue-600.sli b/testsuite/mpitests/issue-600.sli
    deleted file mode 100644
    index 494ed8ea2d..0000000000
    --- a/testsuite/mpitests/issue-600.sli
    +++ /dev/null
    @@ -1,101 +0,0 @@
    -/*
    - *  issue-600.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::issue-600 - Checks that waveform relaxation works with MPI
    -
    -    Synopsis: (issue-600) run -> - 
    -
    -    Description:
    -    issue-600.sli ensures that the iterative solution scheme in NEST still works when
    -    neurons that use waveform relaxation are only present on a subset of all available
    -    MPI processes. The test is a slightly changed version of test_gap_junctions_mpi.sli.
    -    
    -    Author:  Jan Hahne, Hans Ekkehard Plesser
    -    SeeAlso: testsuite::test_gap_junctions_mpi, hh_psc_alpha_gap, gap_junction
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_not_threaded
    -skip_if_without_gsl
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  0.1 /h Set
    -  
    -  << 
    -        /total_num_virtual_procs total_vps 
    -        /resolution h
    -        /use_wfr true
    -        /wfr_tol 0.0001
    -        /wfr_interpolation_order 3
    -        /wfr_max_iterations 10
    -        /wfr_comm_interval 1.0
    -    >> SetKernelStatus
    -      
    -  /hh_psc_alpha_gap Create /neuron1 Set
    -  /iaf_psc_alpha Create /neuron2 Set
    -  /hh_psc_alpha_gap  Create /neuron3 Set
    -  /iaf_psc_alpha Create /neuron4 Set
    -  
    -  neuron1
    -  << 
    -    /I_e 400.
    -  >> SetStatus
    -  
    -  /sr /spike_recorder Create def
    -  
    -  neuron1 neuron3
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction /weight 10.0 >>
    -  Connect
    -  
    -  neuron1 neuron2
    -  << /rule /one_to_one >> 
    -  << /synapse_model /static_synapse /weight 8.0 >>
    -  Connect
    -  
    -  neuron1 neuron4
    -  << /rule /one_to_one >> 
    -  << /synapse_model /static_synapse /weight 12.0 >>
    -  Connect
    -  
    -  neuron1 sr Connect
    -  neuron2 sr Connect
    -  neuron3 sr Connect
    -  neuron4 sr Connect
    -  
    -  50 Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_all_to_all.sli b/testsuite/mpitests/test_all_to_all.sli
    deleted file mode 100644
    index f2a47971ee..0000000000
    --- a/testsuite/mpitests/test_all_to_all.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  test_all_to_all.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_all_to_all - Test correct connection with many targets
    -    Synopsis: (test_all_to_all) run -> - 
    -
    -    Description:
    -    test_all_to_all.sli checks that all-to-all connections are created
    -    correctly if the number of targets exceeds the number of local nodes.
    -    
    -    Author: Hans Ekkehard Plesser
    -    SeeAlso: testsuite::test_one_to_one, testsuite::test_fixed_indegree,
    -    testsuite::test_pairwise_bernoulli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% With one MPI process, conventional looping is used. We use that as
    -% reference case. For 4 processes, we will have fewer local nodes than
    -% targets and inverse looping is used. 
    -[1 4]
    -{
    -  /nrns /iaf_psc_alpha 4 Create def
    -  
    -  nrns nrns /all_to_all Connect
    -  
    -  << >> GetConnections { cva 2 Take }  Map
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_connect_array_all_to_all_mpi.sli b/testsuite/mpitests/test_connect_array_all_to_all_mpi.sli
    deleted file mode 100644
    index 376d5d7ca7..0000000000
    --- a/testsuite/mpitests/test_connect_array_all_to_all_mpi.sli
    +++ /dev/null
    @@ -1,122 +0,0 @@
    -/*
    - *  test_connect_array_all_to_all_mpi.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_connect_array_all_to_all_mpi - SLI script to test connection with parameter arrays and connection rule all_to_all, with hybrid MPI and thread parallelism
    -
    -   Synopsis: (test_connect_array_all_to_all_mpi) run
    -
    -   Description:
    -
    -   Tests with hybrid MPI and thread parallelism the possibility to use
    -   parameter arrays to define connection weights and/or delays in conjunction
    -   with the connection rules all_to_all
    -
    -   FirstVersion: November 2016
    -   Author: Bruno Golosio
    -   SeeAlso: Connect
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -[2 3] % check for 2, 3 processes
    -{
    -
    -/N 10 def          % number of neurons in each population
    -
    -ResetKernel
    -
    -<<
    -  /local_num_threads 2
    ->> SetKernelStatus
    -
    -/node_id1 N 1 add def            % node_id1 = N + 1
    -
    -% create sources and targets
    -/sources /iaf_psc_alpha N Create def
    -/targets /iaf_psc_alpha N Create def
    -
    -/NC N N mul def     % number of connections = N^2
    -/Dmax NC 1 add def  % maximum delay
    -
    -/Warr [1 NC] Range cv_dv def    % weight array Warr=[1, ..., NC]
    -/Darr [2 Dmax] Range cv_dv def  % delay array  Darr=[2, ..., NC+1]
    -% cv_dv converts sli-array type to double-vector type
    -
    -% synapses and connection dictionaries
    -/syn_dict << /synapse_model /static_synapse /weight Warr /delay Darr >> def
    -/conn_dict << /rule /all_to_all >> def
    -
    -sources targets conn_dict syn_dict Connect % connects source to target
    -
    -/pass true def % error control flag
    -/n_loc 0 def  % used to check n. of neurons belonging to this MPI process
    -targets % loop through all target neurons
    -{
    -  /neuron2 exch def
    -
    -  neuron2 GetStatus /local get  % checks if neuron2 is local or not
    -  {
    -    /n_loc n_loc 1 add def  % increases n_loc
    -
    -    % gets all connections to the target neuron
    -    /conn << /target [neuron2] cvnodecollection >> GetConnections def
    -
    -    /sdict_lst conn GetStatus def % gets info on synapses
    -
    -    /Warr1 0 array def % creates empty weight array
    -
    -    sdict_lst % loop on synapses that connect to target neuron
    -    {
    -      /sdict exch def
    -      /w sdict /weight get def  % gets synaptic weight
    -      /d sdict /delay get def   % gets synaptic delay
    -      /diff d w sub def         % diff = delay - weight
    -      diff 1.0 eq               % checks that d = w + 1
    -	  pass and /pass exch def   % updates control flag
    -
    -      /Warr1 Warr1 w append def  % appends w to Warr1
    -    } forall
    -
    -    Warr1 length N eq         % checks the size of Warr1
    -	pass and /pass exch def   % updates control flag
    -
    -    /i1 neuron2 node_id1 sub N mul def  % first index = (n2 - node_id1) * N
    -    % get row of original weight array
    -    % and compare it with Warr1
    -    /Wdiff Warr cva i1 N getinterval Warr1 sub def
    -
    -    % check that all elements of the difference are zero
    -    Wdiff 0.0 HasDifferentMemberQ not
    -    pass and /pass exch def   % updates control flag
    -
    -  }
    -  if   % neuron2 is local
    -}
    -forall  % neurons in targets
    -
    -pass n_loc 0 gt and
    -} distributed_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_connect_array_fixed_indegree_mpi.sli b/testsuite/mpitests/test_connect_array_fixed_indegree_mpi.sli
    deleted file mode 100644
    index bd1c6f1998..0000000000
    --- a/testsuite/mpitests/test_connect_array_fixed_indegree_mpi.sli
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -/*
    - *  test_connect_array_fixed_indegree_mpi.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_connect_array_fixed_indegree_mpi - SLI script to test connection with parameter arrays and connection rule fixed_indegree, with hybrid MPI and thread parallelism
    -
    -   Synopsis: (test_connect_array_fixed_indegree_mpi) run
    -
    -   Description:
    -
    -   Tests with hybrid MPI and thread parallelism the possibility to use
    -   parameter arrays to define connection weights and/or delays in conjunction
    -   with the connection rules fixed_indegree
    -
    -   FirstVersion: August 2016
    -   Author: Bruno Golosio
    -   SeeAlso: Connect
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -[2 3] % check for 2, 3 processes
    -{
    -
    -/N 20 def          % number of neurons in each population
    -/K 5 def           % number of connections per neuron
    -
    -ResetKernel
    -
    -<<
    -  /local_num_threads 2
    ->> SetKernelStatus
    -
    -/node_id1 N 1 add def            % node_id1 = N + 1
    -
    -/net1 /iaf_psc_alpha N Create def   % creates source population
    -/net2 /iaf_psc_alpha N Create def   % creates target population
    -
    -/NC N K mul def     % number of connections
    -/Dmax NC 1 add def  % maximum delay
    -
    -/Warr [1 NC] Range cv_dv def    % weight array Warr=[1, ..., NC]
    -/Darr [2 Dmax] Range cv_dv def  % delay array  Darr=[2, ..., NC+1]
    -% cv_dv converts sli-array type to double-vector type
    -
    -% synapses and connection dictionaries
    -/syn_dict << /synapse_model /static_synapse /weight Warr /delay Darr >> def
    -/conn_dict << /rule /fixed_indegree /indegree K >> def
    -
    -net1 net2 conn_dict syn_dict Connect % connects source to target
    -
    -/pass true def % error control flag
    -/n_loc 0 def  % used to check n. of neurons belonging to this MPI process
    -net2 % loop through all target neurons
    -{
    -        /neuron2 exch def
    -
    -        neuron2 GetStatus /local get  % checks if neuron2 is local or not
    -        {
    -                /n_loc n_loc 1 add def  % increases n_loc
    -                % gets all connections to the target neuron
    -                /conn << /target [neuron2] cvnodecollection >> GetConnections def
    -
    -                /sdict_lst conn GetStatus def % gets info on synapses
    -
    -                /Warr1 0 array def % creates empty weight array
    -
    -                sdict_lst % loop on synapses that connect to target neuron
    -                {
    -                        /sdict exch def
    -                        /w sdict /weight get def  % gets synaptic weight
    -                        /d sdict /delay get def   % gets synaptic delay
    -                        /diff d w sub def         % diff = delay - weight
    -                        diff 1.0 eq               % checks that d = w + 1
    -			pass and /pass exch def   % updates control flag
    -
    -                        /Warr1 Warr1 w append def  % appends w to Warr1
    -                } forall
    -
    -                Warr1 length K eq         % checks the size of Warr1
    -		pass and /pass exch def   % updates control flag
    -
    -                /Warr1 Warr1 Sort def       % sorts the elements of Warr1
    -                /i1 neuron2 node_id1 sub K mul def  % first index = (n2 - node_id1) * K
    -
    -                % get row of original weight array, sort it
    -                % and compare it with Warr1
    -                /Wdiff Warr cva i1 K getinterval Sort Warr1 sub def
    -                % check that all elements of the difference are zero
    -                Wdiff 0.0 HasDifferentMemberQ not
    -		pass and /pass exch def   % updates control flag
    -
    -        } if
    -} forall
    -pass n_loc 0 gt and
    -} distributed_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_connect_array_fixed_outdegree_mpi.sli b/testsuite/mpitests/test_connect_array_fixed_outdegree_mpi.sli
    deleted file mode 100644
    index 2f75219a38..0000000000
    --- a/testsuite/mpitests/test_connect_array_fixed_outdegree_mpi.sli
    +++ /dev/null
    @@ -1,109 +0,0 @@
    -/*
    - *  test_connect_array_fixed_outdegree_mpi.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_connect_array_fixed_outdegree_mpi - SLI script to test connection with parameter arrays and connection rule fixed_outdegree, with hybrid MPI and thread parallelism
    -
    -   Synopsis: (test_connect_array_fixed_outdegree_mpi) run
    -
    -   Description:
    -
    -   Tests with hybrid MPI and thread parallelism the possibility to use
    -   parameter arrays to define connection weights and/or delays in conjunction
    -   with the connection rules fixed_outdegree
    -
    -   FirstVersion: August 2016
    -   Author: Bruno Golosio
    -   SeeAlso: Connect
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -[1 2 3] % check for 1, 2, 3 processes
    -{
    -
    -  /N 20 def          % number of neurons in each population
    -  /K 5 def           % number of connections per neuron
    -
    -  ResetKernel
    -
    -  <<
    -    /local_num_threads 2
    -  >> SetKernelStatus
    -
    -  /net1 /iaf_psc_alpha N Create def % node_ids of sources
    -  /net2 /iaf_psc_alpha N Create def % node_ids of targets
    -
    -  /NC N K mul def     % number of connections
    -  /Dmax NC 1 add def  % maximum delay
    -
    -  /Warr [1 NC] Range cv_dv def    % weight array Warr=[1, ..., NC]
    -  /Darr [2 Dmax] Range cv_dv def  % delay array  Darr=[2, ..., NC+1]
    -  % cv_dv converts sli-array type to double-vector type
    -
    -  % synapses and connection dictionaries
    -  /syn_dict << /synapse_model /static_synapse /weight Warr /delay Darr >> def
    -  /conn_dict << /rule /fixed_outdegree /outdegree K >> def
    -
    -  net1 net2 conn_dict syn_dict Connect % connects source to target
    -
    -  /Warr_all 0 array def % creates empty weight array
    -  net1 % loop over all source neurons
    -  {
    -    /neuron1 exch def
    -
    -    % gets all connections from the source neuron
    -    /conn << /source [neuron1] cvnodecollection >> GetConnections def
    -
    -    /sdict_lst conn GetStatus def % gets info on synapses
    -
    -    /Warr1 0 array def % creates empty weight array
    -
    -    sdict_lst % loop on synapses that connect from source neuron
    -    {
    -            /sdict exch def
    -            /w sdict /weight get def  % gets synaptic weight
    -            /d sdict /delay get def   % gets synaptic delay
    -            /diff d w sub def         % diff = delay - weight
    -            diff 1.0 eq assert_or_die % checks that d = w + 1
    -
    -            /Warr1 Warr1 w append def  % appends w to Warr1
    -    } forall
    -
    -    /i1 neuron1 1 sub K mul def  % first index = (n1 - 1) * K
    -
    -    % get row of original weight array
    -    /Wrow Warr cva i1 K getinterval def
    -    Warr1 {
    -            /w exch def
    -            % check that all elements of Warr are in Wrow
    -            Wrow w MemberQ assert_or_die
    -    } forall
    -    /Warr_all Warr_all Warr1 join def
    -
    -  } forall
    -  Warr_all
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_delay_exchange.sli b/testsuite/mpitests/test_delay_exchange.sli
    deleted file mode 100644
    index b854a6aadc..0000000000
    --- a/testsuite/mpitests/test_delay_exchange.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  test_delay_exchange.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_delay_exchange - check that delay extrema are exchanged correctly
    -
    -Synopsis: nest_indirect test_delay_exchange.sli -> compare results for different numbers of jobs 
    -
    -Description:
    -This tests that creating a single connection (on a single process) will properly set the delay
    -extrema on all processes.
    -
    -Author:  November 2014, Plesser
    -SeeAlso: unittest::distributed_collect_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -[4]                                      
    -{                                            
    -  ResetKernel
    -  /n /iaf_psc_alpha Create def
    -  n n /one_to_one << /synapse_model /static_synapse /delay 0.5 >> Connect
    -  n n /one_to_one << /synapse_model /static_synapse /delay 2.5 >> Connect
    -  GetKernelStatus [[/min_delay /max_delay]] get [0.5 2.5] pstack eq
    -}
    -distributed_collect_assert_or_die   
    -
    -
    diff --git a/testsuite/mpitests/test_fixed_indegree.sli b/testsuite/mpitests/test_fixed_indegree.sli
    deleted file mode 100644
    index 2ec528f67d..0000000000
    --- a/testsuite/mpitests/test_fixed_indegree.sli
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  test_fixed_indegree.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_fixed_indegree - Test correct connection with many targets
    -    Synopsis: (test_fixed_indegree) run -> - 
    -
    -    Description:
    -    test_fixed_indegree.sli checks that all-to-all connections are created
    -    correctly if the number of targets exceeds the number of local nodes.
    -    
    -    Author: Hans Ekkehard Plesser
    -    SeeAlso: testsuite::test_one_to_one, testsuite::test_all_to_all,
    -    testsuite::test_pairwise_bernoulli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% With one MPI process, conventional looping is used. For 4 processes, we will 
    -% have fewer local nodes than targets and inverse looping is used. Due to
    -% randomness, we cannot expect identical results, but we can check the number
    -% of connections in total. 
    -[1 2 4]
    -{
    -  /nrns /iaf_psc_alpha 4 Create def
    -  
    -  nrns nrns << /rule /fixed_indegree /indegree 2 >> Connect
    -  
    -  << >> GetConnections length
    -}
    -{
    -  { Plus } Map
    -  dup First /refval Set
    -  true exch { refval eq and } Fold
    -}
    - distributed_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_gamma_sup_generator.sli b/testsuite/mpitests/test_gamma_sup_generator.sli
    deleted file mode 100644
    index 3bea73e6c4..0000000000
    --- a/testsuite/mpitests/test_gamma_sup_generator.sli
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    - *  test_gamma_sup_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_gamma_sup_generator - Test parallel generation of trains
    -
    -Synopsis: nest_indirect test_gamma_sup_generator.sli -> -
    -
    -Description:
    -   Creates a Gamma_Sup generator and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_mini_brunel_ps.sli
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /pg /gamma_sup_generator << /rate 1000. >> Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { pg exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_gap_junctions_mpi.sli b/testsuite/mpitests/test_gap_junctions_mpi.sli
    deleted file mode 100644
    index 307827490b..0000000000
    --- a/testsuite/mpitests/test_gap_junctions_mpi.sli
    +++ /dev/null
    @@ -1,101 +0,0 @@
    -/*
    - *  test_gap_junctions_mpi.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_gap_junctions_mpi - Test gap junction functionality in parallel
    -
    -    Synopsis: (test_gap_junctions_mpi) run -> - 
    -
    -    Description:
    -    test_gap_junctions_mpi.sli is an overall test of the hh_psc_alpha_gap model connected
    -    by gap_junction connection. The test checks if the gap junction functionality
    -    works in parallel.
    -    
    -    Author:  Jan Hahne, Hans Ekkehard Plesser
    -    SeeAlso: testsuite::test_gap_junction, hh_psc_alpha_gap, gap_junction
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_not_threaded
    -skip_if_without_gsl
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  0.1 /h Set
    -  
    -  << 
    -        /total_num_virtual_procs total_vps 
    -        /resolution h
    -        /use_wfr true
    -        /wfr_tol 0.0001
    -        /wfr_interpolation_order 3
    -        /wfr_max_iterations 10
    -        /wfr_comm_interval 1.0
    -    >> SetKernelStatus
    -      
    -  /hh_psc_alpha_gap Create /neuron1 Set
    -  /hh_psc_alpha_gap Create /neuron2 Set
    -  /hh_psc_alpha_gap Create /neuron3 Set
    -  /hh_psc_alpha_gap Create /neuron4 Set
    -  
    -  neuron1
    -  << 
    -    /I_e 400.
    -  >> SetStatus
    -  
    -  /sr /spike_recorder Create def
    -  
    -  neuron1 neuron2
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction /weight 10.0 >>
    -  Connect
    -  
    -  neuron1 neuron3
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction /weight 8.0 >>
    -  Connect
    -  
    -  neuron1 neuron4
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction /weight 12.0 >>
    -  Connect
    -  
    -  neuron1 sr Connect
    -  neuron2 sr Connect
    -  neuron3 sr Connect
    -  neuron4 sr Connect
    -  
    -  50 Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_get_nodes.sli b/testsuite/mpitests/test_get_nodes.sli
    deleted file mode 100644
    index d0b3312f21..0000000000
    --- a/testsuite/mpitests/test_get_nodes.sli
    +++ /dev/null
    @@ -1,166 +0,0 @@
    -/*
    - *  test_get_nodes.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_get_nodes - sli script for test of GetNodes
    -
    -Synopsis: nest_indirect test_get_nodes --> success
    -
    -Description:
    -
    -
    -Author: August 2019, Stine B. Vennemo
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4] % check for 1, 2 and 4 processes
    -{
    -  ResetKernel
    -  /iaf_psc_alpha 2 Create       % node_ids 1,2
    -  /iaf_psc_delta 3 Create join  % node_ids 3,4,5
    -  /iaf_psc_alpha 3 Create join  % node_ids 6,7,8
    -  /iaf_psc_exp   3 Create join  % node_ids 9,10,11
    -  /nodes Set
    -
    -  /all_nodes_list [1 2 3 4 5 6 7 8 9 10 11 ] def
    -
    -   % ---------------------------- local_only is false  -> we want all nodes ------------------------------------------%
    -  << >> false GetNodes cva all_nodes_list eq
    -
    -  % ---------------------- local_only is true  -> we only want local nodes on mpi process ----------------------------%
    -  << >> true GetNodes cva nodes LocalOnly cva eq and
    -
    -  % ------------------------------------ Also test on params ---------------------------------------------------------%
    -  [ -70. -60. -50. -70. -60. -50. -70. -60. -50. -70. -60. ] /Vm_list Set
    -  [   5.   5.   5.   5.  10.  10.  10.  10.  10.  10.  10. ] /tau_m_list Set
    -
    -  /indx 0 def
    -  nodes
    -  {
    -    << /V_m Vm_list indx get
    -       /tau_m tau_m_list indx get >> SetStatus
    -    /indx indx 1 add def
    -  } forall
    -
    -  << /V_m -60. /tau_m 10. >> false GetNodes cva /test_nodes Set
    -
    -  /indx 0 def
    -  [ ] /reference_list Set
    -  all_nodes_list
    -  {
    -    /node_id Set
    -    Vm_list indx get -60. eq tau_m_list indx get 10. eq and
    -    {
    -      reference_list node_id append /reference_list Set
    -    } if
    -    /indx indx 1 add def
    -  } forall
    -
    -  reference_list test_nodes cva eq and
    -
    -  % -------------------------------- local only is true (we only test V_m) -------------------------------------------%
    -  << /V_m -60. >> true GetNodes cva /test_nodes Set
    -
    -  /indx 0 def
    -  nodes LocalOnly /V_m get /Vm_list_ref Set
    -  [ ] /reference_list Set
    -  nodes LocalOnly cva
    -  {
    -    /node_id Set
    -    Vm_list_ref indx get -60. eq
    -    {
    -      reference_list node_id append /reference_list Set
    -    } if
    -    /indx indx 1 add def
    -  } forall
    -
    -  reference_list test_nodes cva eq and
    -
    -  % ------------------------------------------------------------------------------------------------------------------%
    -  %                              Now, we do the same, but we add threads                                              %
    -  % ------------------------------------------------------------------------------------------------------------------%
    -
    -  ResetKernel
    -  << /local_num_threads 2 >> SetKernelStatus
    -
    -  /iaf_psc_alpha 2 Create       % node_ids 1,2
    -  /iaf_psc_delta 3 Create join  % node_ids 3,4,5
    -  /iaf_psc_alpha 3 Create join  % node_ids 6,7,8
    -  /iaf_psc_exp   3 Create join  % node_ids 9,10,11
    -  /nodes Set
    -
    -  % ----------------------------- local_only is false -> we want all nodes  ------------------------------------------%
    -  << >> false GetNodes cva all_nodes_list eq and
    -
    -  % ---------------------- local_only is true  -> we only want local nodes on mpi process ----------------------------%
    -  << >> true GetNodes cva nodes LocalOnly cva eq and
    -
    -  % ------------------------------------ Also test on params ---------------------------------------------------------%
    -
    -  /indx 0 def
    -  nodes
    -  {
    -    << /V_m Vm_list indx get
    -       /tau_m tau_m_list indx get >> SetStatus
    -    /indx indx 1 add def
    -  } forall
    -
    -  << /V_m -60. /tau_m 10. >> false GetNodes cva /test_nodes Set
    -
    -  /indx 0 def
    -  [ ] /reference_list Set
    -  all_nodes_list
    -  {
    -    /node_id Set
    -    Vm_list indx get -60. eq tau_m_list indx get 10. eq and
    -    {
    -      reference_list node_id append /reference_list Set
    -    } if
    -    /indx indx 1 add def
    -  } forall
    -
    -  reference_list test_nodes cva eq and
    -
    -  % -------------------------------- local only is true (we only test V_m) -------------------------------------------%
    -
    -  << /V_m -60. >> true GetNodes cva /test_nodes Set
    -
    -  /indx 0 def
    -  nodes LocalOnly /V_m get /Vm_list_ref Set
    -  [ ] /reference_list Set
    -  nodes LocalOnly cva
    -  {
    -    /node_id Set
    -    Vm_list_ref indx get -60. eq
    -    {
    -      reference_list node_id append /reference_list Set
    -    } if
    -    /indx indx 1 add def
    -  } forall
    -
    -  reference_list test_nodes cva eq and
    -}
    -distributed_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_ginzburg_neuron.sli b/testsuite/mpitests/test_ginzburg_neuron.sli
    deleted file mode 100644
    index 8092886b02..0000000000
    --- a/testsuite/mpitests/test_ginzburg_neuron.sli
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -/*
    - *  test_ginzburg_neuron.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_ginzburg_neuron - Test parallel generation of Poissonian trains
    -
    -Synopsis: nest_indirect test_ginzburg_neuron.sli -> -
    -
    -Description:
    -   Creates ginzburg neurons and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_poisson_generator.sli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sg /spike_generator << /spike_times [1.0 1.0] >> Create def
    -  /gens [ total_vps ] 
    -  { 
    -    ;
    -    /ginzburg_neuron << /tau_m 1.0 >> Create
    -  } Table def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /parrot_neuron Create } Table def
    -
    -  gens { sg exch Connect } forall
    -  [ gens pnet ] { Connect } ScanThread
    -  pnet { sr Connect } forall
    -  
    -  20. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_global_rng.sli b/testsuite/mpitests/test_global_rng.sli
    deleted file mode 100644
    index 67347033c7..0000000000
    --- a/testsuite/mpitests/test_global_rng.sli
    +++ /dev/null
    @@ -1,61 +0,0 @@
    -/*
    - *  test_global_rng.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_global_rng - check whether global rng gives consistent results
    -
    -Synopsis: nest_indirect test_global_rng.sli -> compare results for different numbers of jobs
    -
    -Description:
    -
    -The scripts test whether in simulations distributed over different numbers of
    -processors the global random number generator gives identical results on all
    -jobs and for different numbers of jobs. To draw numbers, GetValues is used on
    -a uniform parameter. This draws from the uniform distribution using the global
    -random number generator.
    -See #186 for discussion.
    -
    -Author:  July 2009, Diesmann
    -SeeAlso: unittest::distributed_assert_or_die
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -[1 2 4]
    -{
    - ResetKernel
    - << /rng_seed 12 >> SetKernelStatus  % ResetKernel does not reset rng
    -
    - << /uniform << /min 0.0 /max 1.0  >> >> CreateParameter /p Set
    -
    - % GetValue uses the global rng internally
    - [ 5 ] { ; p GetValue } Table
    -
    -}
    -distributed_rank_invariant_collect_assert_or_die
    -                            % a variant of this function will have an extra argument
    -                            % which specifies the test carried out to compare the
    -                            % simulation results (not implemented 090716 MD)
    diff --git a/testsuite/mpitests/test_iaf_ring.sli b/testsuite/mpitests/test_iaf_ring.sli
    deleted file mode 100644
    index 4b1dcf9b21..0000000000
    --- a/testsuite/mpitests/test_iaf_ring.sli
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -/*
    - *  test_iaf_ring.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_ring - test of iaf_psc_alpha spike interaction
    -across multiple machines.
    -
    -Synopsis: nest_indirect test_iaf_ring  --> success
    -
    -Description:
    -
    - test_iaf_ring checks if spikes can travel along a chain of neurons
    - and whether the result is independent of the number of machines
    - involved in the computation.
    -
    - The unittest function distributed_assert_or_die can only handle the
    - output of a single machine. Therefore the script collects the spikes
    - of all neurons using a parrot neuron. The script does not check the
    - id of the sender, only the spike timing. A more strict test could be
    - carried out with a unittest function which merges the output of all
    - machines.
    -
    - The correct sequence of spikes including their ids is documented at
    - the end of this file. Note that due to the use of an intermediate
    - parrot neuron the reported spike times have an offset of 1ms (10
    - steps) with respect to the documented values. The offset corresponds
    - to the default delay of 1ms.
    -
    -Author: Joche Martin Eppler, Markus Diesmann, Marc-Oliver Gewaltig
    -FirstVersion: January 2006
    -SeeAlso: testsuite::test_iaf_i0, testsuite::test_getrng_neuron
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/delay         2.0 def        % delay between neurons
    -/h             0.1 def        % time resolution
    -/simtime      35.0 def        % simulation time
    -/recend    simtime def        % end of recording
    -/n               4 def        % number of neurons
    -
    -[1 2 4]
    -{
    -  ResetKernel
    -
    -  << /resolution h  >> SetKernelStatus
    -
    -  /iaf_psc_alpha n Create /neurons Set
    -  neurons [1] Take << /I_e 1450.0 >> SetStatus
    -
    -  [ n ] Range 2 1 Partition
    -  {
    -    arrayload ;
    -    1 arraystore neurons exch Take
    -    exch
    -    1 arraystore neurons exch Take
    -    1000.0 delay Connect
    -  } forall
    -
    -  /spike_recorder << /time_in_steps true >> Create /sr Set
    -
    -  /parrot_neuron Create /pn Set
    -
    -  neurons pn Connect
    -  pn sr Connect
    -
    -  simtime Simulate
    -
    -  pn /local get
    -  {
    -    sr [/events/times] get cva
    -  } if
    -
    -} distributed_invariant_assert_or_die
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Expected output of this script.
    -% An intermediate parrot neuron introduces an offset of 10 in the
    -% spike times corresponding to the default delay of 1ms.
    -%
    -% node_id     spiketime
    -% 1       30
    -% 1       80
    -% 2       111
    -% 1       130
    -% 2       174
    -% 1       180
    -% 3       205
    -% 1       230
    -% 2       234
    -% 1       280
    -% 3       280
    -% 2       294
    -% 4       313
    -% 1       330
    diff --git a/testsuite/mpitests/test_localonly.sli b/testsuite/mpitests/test_localonly.sli
    deleted file mode 100644
    index 5b35aa4c19..0000000000
    --- a/testsuite/mpitests/test_localonly.sli
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  test_localonly.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* BeginDocumentation
    -Name: testsuite::test_localonly - Test that LocalOnly returns NodeCollection with
    -only local elements.
    -
    -Synopsis: nest_indirect test_localonly.sli -> -
    -
    -Description:
    -Test that LocalOnly returns a NodeCollection with only node IDs of nodes in the
    -current MPI process.
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -[1 2 4 8] % Including check where NumProcesses > size of NodeCollection.
    -{
    -  ResetKernel
    -
    -  /iaf_psc_alpha 4 Create LocalOnly cva
    -  % Check if all returned node IDs are local nodes.
    -  dup true exch {GetStatus /local get and} Fold
    -  2 arraystore
    -}
    -{
    -  % Check that results are rank invariant.
    -  /results Set
    -  /ref results First First First def
    -  true results Rest
    -  {
    -    dup true exch {1 get and} Fold
    -    exch [] exch {First join} Fold Sort ref eq and
    -    and
    -  } Fold
    -}
    -distributed_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_mini_brunel_ps.sli b/testsuite/mpitests/test_mini_brunel_ps.sli
    deleted file mode 100644
    index e2647f8afe..0000000000
    --- a/testsuite/mpitests/test_mini_brunel_ps.sli
    +++ /dev/null
    @@ -1,196 +0,0 @@
    -/*
    - *  test_mini_brunel_ps.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_mini_brunel_ps - Test parallel simulation of small Brunel-style network
    -
    -Synopsis: nest_indirect test_mini_brunel_ps.sli -> -
    -
    -Description:
    -   Simulates scaled-down Brunel net with precise timing for different numbers of MPI
    -   processes and compares results.
    -
    -Author:  May 2012, Plesser, based on brunel_ps.sli
    -
    -See: brunel_ps.sli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/brunel_setup {
    -/brunel << >> def
    -
    -brunel begin
    -/order 50 def     % scales size of network (total 5*order neurons)
    -
    -/g      250.0 def    % rel strength, inhibitory synapses
    -/eta    2.0 def    % nu_ext / nu_thresh
    -
    -/simtime 200.0 def % simulation time [ms]
    -/dt        0.1 def % simulation step length [ms]
    -
    -% Number of POSIX threads per program instance.
    -% When using MPI, the mpirun call determines the number
    -% of MPI processes (=program instances). The total number
    -% of virtual processes is #MPI processes x local_num_threads.
    -/total_num_virtual_procs 4 def
    -
    -% Compute the maximum of postsynaptic potential
    -% for a synaptic input current of unit amplitude
    -% (1 pA)
    -/ComputePSPnorm
    -{
    -  % calculate the normalization factor for the PSP
    -  (
    -  a = tauMem / tauSyn;
    -  b = 1.0 / tauSyn - 1.0 / tauMem;
    -  % time of maximum
    -  t_max = 1.0/b * (-LambertWm1(-exp(-1.0/a)/a)-1.0/a);
    -  % maximum of PSP for current of unit amplitude
    -  exp(1.0)/(tauSyn*CMem*b) * ((exp(-t_max/tauMem) - exp(-t_max/tauSyn)) / b - t_max*exp(-t_max/tauSyn))
    -  ) ExecMath
    -}
    -def
    -
    -%%% PREPARATION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/NE 4 order mul cvi def  % number of excitatory neurons
    -/NI 1 order mul cvi def  % number of inhibitory neurons
    -/N  NI NE add def        % total number of neurons
    -
    -/epsilon 0.1 def            % connectivity
    -/CE epsilon NE mul cvi def  % number of excitatory synapses on neuron
    -/CI epsilon NI mul cvi def  % number of inhibitory synapses on neuron
    -/C  CE CI add def           % total number of internal synapses per n.
    -/Cext CE def                % number of external synapses on neuron
    -
    -/tauMem 20.0 def    % neuron membrane time constant [ms]
    -/CMem  250.0 def    % membrane capacity [pF]
    -/tauSyn  0.5 def    % synaptic time constant [ms]
    -/tauRef  2.0 def    % refractory time [ms]
    -/E_L     0.0 def    % resting potential [mV]
    -/theta  20.0 def    % threshold
    -
    -
    -% amplitude of PSP given 1pA current
    -ComputePSPnorm /J_max_unit Set
    -
    -% synaptic weights, scaled for our alpha functions, such that
    -% for constant membrane potential, the peak amplitude of the PSP
    -% equals J
    -
    -/delay   1.5 def         % synaptic delay, all connections [ms]
    -/J       0.1 def         % synaptic weight [mV]
    -/JE J J_max_unit div def % synaptic weight [pA]
    -/JI g JE mul neg def     % inhibitory
    -
    -% threshold rate, equivalent rate of events needed to
    -% have mean input current equal to threshold
    -/nu_thresh ((theta * CMem) / (JE*CE*exp(1)*tauMem*tauSyn)) ExecMath def
    -/nu_ext eta nu_thresh mul def     % external rate per synapse
    -/p_rate nu_ext Cext mul 1000. mul def % external input rate per neuron
    -                                        % must be given in Hz
    -
    -% number of neurons to record from
    -/Nrec 20 def
    -
    -end
    -}
    -def % brunel_setup
    -
    -%%% CONSTRUCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -
    -[1 2 4]
    -{
    -  brunel_setup
    -  /brunel using
    -    % set resolution and total/local number of threads
    -    <<
    -      /resolution  dt
    -      /total_num_virtual_procs total_num_virtual_procs
    -    >> SetKernelStatus
    -
    -    /E_neurons /iaf_psc_alpha_canon NE Create def  % create excitatory neurons
    -    /I_neurons /iaf_psc_alpha_canon NI Create def  % create inhibitory neurons
    -    /allNeurons E_neurons I_neurons join def
    -
    -    /expoisson /poisson_generator_ps Create def
    -    expoisson
    -    <<                % set firing rate
    -    /rate p_rate
    -    >> SetStatus
    -
    -    /inpoisson /poisson_generator_ps Create def
    -    inpoisson
    -    <<
    -    /rate  p_rate
    -    >> SetStatus
    -
    -    /exsr /spike_recorder Create def
    -    exsr << /time_in_steps true >> SetStatus
    -
    -    allNeurons
    -    {
    -      <<
    -      /tau_m   tauMem
    -      /C_m     CMem
    -      /tau_syn tauSyn
    -      /t_ref   tauRef
    -      /E_L     E_L
    -      /V_th    theta
    -      /V_m     E_L
    -      /V_reset E_L
    -      /C_m     1.0     % capacitance is unity in Brunel model
    -      >> SetStatus
    -    } forall
    -
    -    /static_synapse << /delay delay >> SetDefaults
    -    /static_synapse /syn_ex << /weight JE >> CopyModel
    -    /static_synapse /syn_in << /weight JI >> CopyModel
    -
    -    expoisson E_neurons stack /all_to_all /syn_ex Connect
    -    E_neurons E_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model /syn_ex >> Connect
    -    I_neurons E_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -
    -
    -    inpoisson I_neurons /all_to_all /syn_ex Connect
    -    E_neurons I_neurons << /rule /fixed_indegree /indegree CE >> << /synapse_model /syn_ex >> Connect
    -    I_neurons I_neurons << /rule /fixed_indegree /indegree CI >> << /synapse_model /syn_in >> Connect
    -    
    -    E_neurons Nrec Take exsr Connect
    -    
    -    simtime Simulate
    -
    -    % get events, replace vectors with SLI arrays    
    -    /ev exsr /events get def
    -    ev keys { /k Set ev dup k get cva k exch put } forall
    -    ev 
    -  endusing
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    diff --git a/testsuite/mpitests/test_mip_generator.sli b/testsuite/mpitests/test_mip_generator.sli
    deleted file mode 100644
    index c4a90a2068..0000000000
    --- a/testsuite/mpitests/test_mip_generator.sli
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    - *  test_mip_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_mip_generator - Test parallel generation of trains
    -
    -Synopsis: nest_indirect test_mip_generator.sli -> -
    -
    -Description:
    -   Creates a Mip generator and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_mini_brunel_ps.sli
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /pg /mip_generator << /rate 2000. /p_copy 0.5 >> Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { pg exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_multiple_synapses.sli b/testsuite/mpitests/test_multiple_synapses.sli
    deleted file mode 100644
    index 9c37583857..0000000000
    --- a/testsuite/mpitests/test_multiple_synapses.sli
    +++ /dev/null
    @@ -1,129 +0,0 @@
    -/*
    - *  test_multiple_synapses.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_multiple_synapses - Test that Connect with list of synapse dictionaries use the 
    -                                              correct values when connecting
    -
    -    Synopsis: (test_multiple_synapses) run -> - 
    -
    -    Description:
    -    test_multiple_synapses.sli checks that when Connect is given a list of synapse dictionaries, the given
    -    values are used when we have more than one process.
    -    
    -    Author: Stine Brekke Vennemo
    -    FirstVersion: June 2020
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/collocated_synapse_params
    -  [<< /weight -3. /delay 1. /synapse_model /static_synapse >>
    -   << /weight  4. /delay 3. /synapse_model /static_synapse >>
    -   << /weight  2. /delay 1. /synapse_model /stdp_synapse >> ] def
    -
    -/num_src 4 def
    -/num_trgt 4 def
    -/num_conns 4 def % we use one_to_one
    -
    -% to reduce data to be transported, reduce every value to max three chars
    -/:compact_form
    -{
    -  { cvs dup length 3 gt { 3 Take } if } Map
    -}
    -def
    -
    -[1 2 4]
    -{
    -  /src /iaf_psc_alpha num_src Create def
    -  /trgt /iaf_psc_alpha num_trgt Create def
    -  
    -  src trgt
    -    << /rule /one_to_one >>
    -    collocated_synapse_params
    -    Connect
    -  
    -  /weight_delay_syn [] def
    -  << >> GetConnections /conns Set
    -  conns GetStatus
    -  {
    -    dup
    -    dup
    -    
    -    /weight get /w Set
    -    /delay get /d Set
    -    /synapse_model get /sm Set
    -    
    -    weight_delay_syn
    -      w append
    -      d append
    -      sm append /weight_delay_syn Set
    -  } forall
    -  
    -  weight_delay_syn :compact_form
    -}
    -{  
    -  /results Set
    -  /cumulative_res_list [] def
    -  
    -  % Create a reference list with the values we expect (values taken from syn_spec list above).
    -  /reference_list [] def
    -  [num_conns] Range
    -  {
    -    % Connection order changed behind the scenes, stdp_synapse connected last. We therefore need to manually
    -    % build reference list
    -    ;
    -    collocated_synapse_params [1] Take dup dup
    -      /weight get /w_1 Set
    -      /delay get /d_1 Set
    -      /synapse_model get /sm_1 Set
    -    collocated_synapse_params [2] Take dup dup
    -      /weight get /w_2 Set
    -      /delay get /d_2 Set
    -      /synapse_model get /sm_2 Set
    -    reference_list [w_1 d_1 sm_1 w_2 d_2 sm_2] join /reference_list Set
    -  } forall
    -  
    -  collocated_synapse_params [3] Take dup dup
    -    /weight get /w_3 Set
    -    /delay get /d_3 Set
    -    /synapse_model get /sm_3 Set
    -  /reference_list reference_list [num_conns] [w_3 d_3 sm_3] LayoutArray Flatten append Flatten def
    -
    -  % Go through results from different processes and append them to eachother.
    -  results 0 get
    -  {
    -    /mpi_res Set
    -    
    -    mpi_res
    -    {
    -      cumulative_res_list exch append /cumulative_res_list Set
    -    } forall
    -  } forall
    -  
    -  % Check that the cumulative result list contains all variables we expect.
    -  cumulative_res_list reference_list :compact_form eq
    -}
    -distributed_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_multiple_synapses_spatial_networks.sli b/testsuite/mpitests/test_multiple_synapses_spatial_networks.sli
    deleted file mode 100644
    index 0fe6c9fc17..0000000000
    --- a/testsuite/mpitests/test_multiple_synapses_spatial_networks.sli
    +++ /dev/null
    @@ -1,145 +0,0 @@
    -/*
    - *  test_multiple_synapses_spatial_networks.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_multiple_synapses_spatial_networks - Test that ConnectLayer with list of synapse dictionaries 
    -                                                               use the correct values when connecting
    -
    -    Synopsis: (test_multiple_synapses_spatial_networks) run -> - 
    -
    -    Description:
    -    test_multiple_synapses_spatial_networks.sli checks that when ConnectLayer is given a list of synapse dictionaries,
    -    the given values are used when we have more than one process.
    -    
    -    Author: Stine Brekke Vennemo
    -    FirstVersion: June 2020
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/collocated_synapse_params
    -  [<< /weight -3. /delay 1.0 /synapse_model /static_synapse >>
    -   << /weight  3. /delay 1.3 /synapse_model /static_synapse >>
    -   << /weight  2. /delay 1.9 /synapse_model /stdp_synapse >> ]
    -def
    -
    -/pos
    -  [-0.25 0.25 0.25] Range
    -  {
    -    /x Set
    -    [0.25 -0.25 -0.25] Range
    -    {
    -      x exch 2 arraystore
    -    }
    -    Map
    -  }
    -  Map
    -  1 Flatten
    -def
    -
    -% Set number of sources and targets according to number of positions
    -/num_src pos length def
    -/num_trgt pos length def
    -/num_conns 4 def % connections per target
    -
    -% to reduce data to be transported, reduce every value to max three chars
    -/:compact_form
    -{
    -  { cvs dup length 3 gt { 3 Take } if } Map
    -}
    -def
    -
    -[1 2 4]
    -{  
    -  /layer_spec
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_src layer_spec CreateLayer def
    -  /layer_trg layer_spec CreateLayer def
    -
    -  layer_src layer_trg
    -  <<
    -    /connection_type /pairwise_bernoulli_on_target /number_of_connections num_conns % 4 connections per target
    -    /synapse_parameters collocated_synapse_params
    -  >>
    -  ConnectLayers
    -  
    -  /weight_delay_syn [] def
    -  << >> GetConnections /conns Set
    -  conns GetStatus
    -  {     
    -    [[/weight /delay /synapse_model]] get /wdsm Set
    -
    -    weight_delay_syn wdsm append Flatten /weight_delay_syn Set
    -  } forall
    -
    -  weight_delay_syn :compact_form
    -}
    -{
    -  /results Set
    -  /cumulative_res_list [] def
    -  
    -  % Create a reference list with the values we expect (values taken from syn_spec list above).
    -  /reference_list [] def
    -  [num_conns num_trgt mul] Range
    -  {
    -    % Connection order changed behind the scenes, stdp_synapse connected last. We therefore need to manually
    -    % build reference list
    -    ;
    -    collocated_synapse_params [1] Take dup dup
    -      /weight get /w_1 Set
    -      /delay get /d_1 Set
    -      /synapse_model get /sm_1 Set
    -    collocated_synapse_params [2] Take dup dup
    -      /weight get /w_2 Set
    -      /delay get /d_2 Set
    -      /synapse_model get /sm_2 Set
    -    reference_list [w_1 d_1 sm_1 w_2 d_2 sm_2] join /reference_list Set
    -  } forall
    -  
    -  collocated_synapse_params [3] Take dup dup
    -    /weight get /w_3 Set
    -    /delay get /d_3 Set
    -    /synapse_model get /sm_3 Set
    -  /reference_list reference_list [num_conns num_trgt] [w_3 d_3 sm_3] LayoutArray Flatten append Flatten def
    -
    -  % Go through results from different processes and append them to eachother.
    -  results 0 get
    -  {
    -    /mpi_res Set
    -  
    -    mpi_res
    -    {
    -      cumulative_res_list exch append /cumulative_res_list Set
    -    } forall
    -  } forall
    -
    -  % Also check that the cumulative result list contains all variables we expect.
    -  cumulative_res_list reference_list :compact_form eq
    -}
    -distributed_collect_assert_or_die
    -
    diff --git a/testsuite/mpitests/test_multiplicity.sli b/testsuite/mpitests/test_multiplicity.sli
    deleted file mode 100644
    index 85ac308733..0000000000
    --- a/testsuite/mpitests/test_multiplicity.sli
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/*
    - *  test_multiplicity.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_multiplicity - Test parallel transmission of spikes with
    -                                     multiplicity > 1.
    -
    -Synopsis: nest_indirect test_multiplicity.sli -> -
    -
    -Description:
    -  Creates two parrot neurons and connects the first one to the second one. The
    -  first parrot neuron receives one spike with multiplicity two from a spike
    -  generator, which should be communicated as two spikes to the second parrot
    -  neuron. Each parrot neuron is connected to a spike recorder, which should
    -  record two spikes.
    -
    -Author: Stine Brekke Vennemo, January 2019
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 2 def
    -
    -[1 2]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -    /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /p_source /parrot_neuron 1 Create def
    -  /p_target /parrot_neuron 1 Create def
    -  /sg /spike_generator 1 Create def
    -  /sr_source /spike_recorder 1 Create def
    -  /sr_target /spike_recorder 1 Create def
    -
    -  sg << /spike_times [1.] /spike_multiplicities [2] >> SetStatus
    -
    -  sg p_source Connect
    -  p_source p_target Connect
    -  p_source sr_source Connect
    -  p_target sr_target Connect
    -
    -  10. Simulate
    -
    -  % Both parrots should receive 2 events.  
    -  sr_source /n_events get /se Set
    -  sr_target /n_events get /te Set
    -  [se te]
    -}
    -{
    -  {
    -    /mpi_res Set
    -    [0 0] /list_sum Set
    -    mpi_res
    -    {
    -      list_sum add /list_sum Set
    -    } forall
    -    list_sum [2 2] eq
    -  } forall
    -} distributed_collect_assert_or_die 
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_neuron_vp.sli b/testsuite/mpitests/test_neuron_vp.sli
    deleted file mode 100644
    index 2a7937305e..0000000000
    --- a/testsuite/mpitests/test_neuron_vp.sli
    +++ /dev/null
    @@ -1,51 +0,0 @@
    -/*
    - *  test_neuron_vp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* BeginDocumentation
    -Name: testsuite::test_neuron_vp - Test that neurons are assigned to correct VP
    -
    -Synopsis: nest_indirect test_neuron_vp.sli -> -
    -
    -Description:
    -Tests that neurons are assigned to correct VP in various configurations.
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -[1 2 4]
    -{
    -  ResetKernel
    -
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  /nodes /iaf_psc_alpha 4 Create def
    -
    -  % build list of node ID-VP pairs for local neurons
    -  nodes { GetStatus } Map
    -  { /local get } Select  % keep only local dicts
    -  { dup /global_id get exch /vp get 2 arraystore } Map
    -}
    -distributed_process_invariant_collect_assert_or_die
    -% pooled over all processes, we must always have the same pairs
    diff --git a/testsuite/mpitests/test_neuron_vp_global.sli b/testsuite/mpitests/test_neuron_vp_global.sli
    deleted file mode 100644
    index 119686b203..0000000000
    --- a/testsuite/mpitests/test_neuron_vp_global.sli
    +++ /dev/null
    @@ -1,51 +0,0 @@
    -/*
    - *  test_neuron_vp_global.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* BeginDocumentation
    -Name: testsuite::test_neuron_vp_global - Test that neurons are assigned to correct VP
    -
    -Synopsis: nest_indirect test_neuron_vp_global.sli -> -
    -
    -Description:
    -Tests that neurons are assigned to correct VP in various configurations
    -and that correct VP information is available on all ranks.
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -[1 2 4]
    -{
    -  ResetKernel
    -
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  /nodes /iaf_psc_alpha 4 Create def
    -
    -  % build list of node ID-VP pairs for local neurons
    -  nodes { GetStatus } Map
    -  { dup /global_id get exch /vp get 2 arraystore } Map
    -}
    -distributed_rank_invariant_collect_assert_or_die
    -% pooled over all processes, we must always have the same pairs
    diff --git a/testsuite/mpitests/test_noise_generator.sli b/testsuite/mpitests/test_noise_generator.sli
    deleted file mode 100644
    index c1661f8465..0000000000
    --- a/testsuite/mpitests/test_noise_generator.sli
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    - *  test_noise_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_noise_generator - Test parallel noise injection
    -
    -Synopsis: nest_indirect test_noise_generator.sli -> -
    -
    -Description:
    -   Creates a Noise generator and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_mini_brunel_ps.sli
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /pg /noise_generator << /mean 1000. /std 500. /dt 1.0 >> Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /iaf_psc_alpha Create } Table def
    -
    -  pnet { pg exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  40. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_one_to_one.sli b/testsuite/mpitests/test_one_to_one.sli
    deleted file mode 100644
    index 4a552760e7..0000000000
    --- a/testsuite/mpitests/test_one_to_one.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  test_one_to_one.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_one_to_one - Test correct connection with many targets
    -    Synopsis: (test_one_to_one) run -> - 
    -
    -    Description:
    -    test_one_to_one.sli checks that all-to-all connections are created
    -    correctly if the number of targets exceeds the number of local nodes.
    -    
    -    Author: Hans Ekkehard Plesser
    -    SeeAlso: testsuite::test_all_to_all, testsuite::test_fixed_indegree,
    -    testsuite::test_pairwise_bernoulli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% With one MPI process, conventional looping is used. We use that as
    -% reference case. For 4 processes, we will have fewer local nodes than
    -% targets and inverse looping is used. 
    -[1 4]
    -{
    -  /nrns /iaf_psc_alpha 4 Create def
    -  
    -  nrns nrns /one_to_one Connect
    -  
    -  << >> GetConnections { cva 2 Take }  Map
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_pairwise_bernoulli.sli b/testsuite/mpitests/test_pairwise_bernoulli.sli
    deleted file mode 100644
    index b8e5740735..0000000000
    --- a/testsuite/mpitests/test_pairwise_bernoulli.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  test_pairwise_bernoulli.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_pairwise_bernoulli - Test correct connection with many targets
    -    Synopsis: (test_pairwise_bernoulli) run -> - 
    -
    -    Description:
    -    test_pairwise_bernoulli.sli checks that all-to-all connections are created
    -    correctly if the number of targets exceeds the number of local nodes.
    -    
    -    Author: Hans Ekkehard Plesser
    -    SeeAlso: testsuite::test_one_to_one, testsuite::all_to_all,
    -    testsuite::test_fixed_indegree
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% With one MPI process, conventional looping is used. We use that as
    -% reference case. For 4 processes, we will have fewer local nodes than
    -% targets and inverse looping is used. 
    -[1 4]
    -{
    -  /nrns /iaf_psc_alpha 4 Create def
    -  
    -  nrns nrns << /rule /pairwise_bernoulli /p 1.0 >> Connect
    -  
    -  << >> GetConnections { cva 2 Take }  Map
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_parallel_conn_and_rand.sli b/testsuite/mpitests/test_parallel_conn_and_rand.sli
    deleted file mode 100644
    index b4c7ab6a7d..0000000000
    --- a/testsuite/mpitests/test_parallel_conn_and_rand.sli
    +++ /dev/null
    @@ -1,99 +0,0 @@
    -/*
    - *  test_parallel_conn_and_rand.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -   Parallel Connect and Randomize Test Script
    -
    -   This script creates a neuron population to itself, randomizing
    -   weight, delay, receptor type and one synaptic parameter. It runs
    -   with a fixed number of virtual processes, and checks that connections
    -   are invariant on executing with a varying number of MPI processes.
    -
    -   Hans Ekkehard Plesser
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -%%% PARAMETER SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -% define all relevant parameters: changes should be made here
    -% all data is place in the userdict dictionary
    -
    -/num_neurons 10 def
    -%/num_neurons 1000 def
    -
    -/connspec << /rule /fixed_indegree /indegree 1 >> def
    -%/connspec << /rule /fixed_outdegree /outdegree 100 >> def
    -
    -/num_vps 16 def
    -
    -/simtime     10.0 def % simulation time [ms]
    -/dt           0.1 def % simulation step length [ms]
    -
    -%%% CONSTRUCTION SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -[1 2 4]
    -{
    -  ResetKernel      % clear all existing network elements
    -  M_WARNING setverbosity
    -
    -  % set resolution, total/local number of threads, rng seed
    -  <<
    -    /resolution  dt
    -    /total_num_virtual_procs num_vps
    -    /rng_seed 123
    -  >> SetKernelStatus
    -
    -  (Creating the network.) =
    -
    -  % setup to allow us to randomize receptor_type
    -  /tau_syns [0.2 1.0 0.1] Range def
    -  /receptor_min 1 def
    -  /receptor_max tau_syns length def
    -  /iaf_psc_alpha_multisynapse << /tau_syn tau_syns >> SetDefaults
    -
    -  /population /iaf_psc_alpha_multisynapse num_neurons Create def
    -
    -  (Connecting neurons.) =
    -  population population connspec
    -  << /synapse_model /stdp_synapse
    -     /delay << /uniform << /min 0.5 /max 1.5 >> >> CreateParameter
    -     /weight << /normal << /mean 10.0 /std 5.0 >> >> CreateParameter 0.0 max
    -     /receptor_type << /uniform_int << /max receptor_max 1 add receptor_min sub >> >> CreateParameter
    -       << /constant << /value 1.0 >> >> CreateParameter add
    -     /alpha << /uniform << /min 0.1 /max 2.3 >> >> CreateParameter
    -     /tau_plus << /uniform << /min 1.5 /max 5.0 >> >> CreateParameter
    -  >>
    -  Connect
    -
    -  (Done connecting.) =
    -
    -  /conn_arr 0 array def
    -  << /synapse_model /stdp_synapse >> GetConnections
    -  {
    -    [[/source /target /weight /delay /alpha /tau_plus]] get conn_arr exch append /conn_arr Set
    -  } forall
    -  conn_arr
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_poisson_generator.sli b/testsuite/mpitests/test_poisson_generator.sli
    deleted file mode 100644
    index be6e969789..0000000000
    --- a/testsuite/mpitests/test_poisson_generator.sli
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    - *  test_poisson_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_poisson_generator - Test parallel generation of Poissonian trains
    -
    -Synopsis: nest_indirect test_poisson_generator.sli -> -
    -
    -Description:
    -   Creates a Poisson generator and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_mini_brunel_ps.sli
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /pg /poisson_generator << /rate 1000. >> Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { pg exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_poisson_generator_ps.sli b/testsuite/mpitests/test_poisson_generator_ps.sli
    deleted file mode 100644
    index ae57a5ec4d..0000000000
    --- a/testsuite/mpitests/test_poisson_generator_ps.sli
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/*
    - *  test_poisson_generator_ps.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_poisson_generator_ps - Test parallel generation of Poissonian trains
    -
    -Synopsis: nest_indirect test_poisson_generator_ps.sli -> -
    -
    -Description:
    -   Creates a precise Poisson generator and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_poisson_generator.sli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /pg /poisson_generator_ps << /rate 1000. >> Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { pg exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_pp_psc_delta.sli b/testsuite/mpitests/test_pp_psc_delta.sli
    deleted file mode 100644
    index 671e5b079a..0000000000
    --- a/testsuite/mpitests/test_pp_psc_delta.sli
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    - *  test_pp_psc_delta.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_pp_psc_delta - Test parallel generation of Poissonian trains
    -
    -Synopsis: nest_indirect test_pp_psc_delta.sli -> -
    -
    -Description:
    -   Creates a precise Poisson generator and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_poisson_generator.sli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /gens [ total_vps ] 
    -  { 
    -    ;
    -    /pp_psc_delta << /I_e 1000. >> Create
    -  } Table def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /parrot_neuron Create } Table def
    -
    -  [ gens pnet ] { Connect } ScanThread
    -  pnet { sr Connect } forall
    -  
    -  50. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_ppd_sup_generator.sli b/testsuite/mpitests/test_ppd_sup_generator.sli
    deleted file mode 100644
    index a580ca91ed..0000000000
    --- a/testsuite/mpitests/test_ppd_sup_generator.sli
    +++ /dev/null
    @@ -1,70 +0,0 @@
    -/*
    - *  test_ppd_sup_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_ppd_sup_generator - Test parallel generation of trains
    -
    -Synopsis: nest_indirect test_ppd_sup_generator.sli -> -
    -
    -Description:
    -   Creates a Ppd_Sup generator and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_mini_brunel_ps.sli
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /pg /ppd_sup_generator << /rate 1000. >> Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { pg exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_pulsepacket_generator.sli b/testsuite/mpitests/test_pulsepacket_generator.sli
    deleted file mode 100644
    index a30ed7f202..0000000000
    --- a/testsuite/mpitests/test_pulsepacket_generator.sli
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    - *  test_pulsepacket_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_pulsepacket_generator - Test parallel generation of Poissonian trains
    -
    -Synopsis: nest_indirect test_pulsepacket_generator.sli -> -
    -
    -Description:
    -   Creates a precise Poisson generator and sends spikes to spike recorder. Assert invariant
    -   results for fixed VP number. This is a partial response to #551. May be adapted
    -   to other generators.
    -
    -Author:  December 2012, Plesser, based on test_poisson_generator.sli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /gens [ total_vps ] 
    -  { 
    -    ;
    -    /pulsepacket_generator << /pulse_times [5.] /activity 5 /sdev 2.0 >> Create
    -  } Table def
    -  /sr /spike_recorder Create def
    -  /pnet [ total_vps ] { ; /parrot_neuron Create } Table def
    -
    -  [ gens pnet ] { Connect } ScanThread
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    -
    -
    -
    -    
    \ No newline at end of file
    diff --git a/testsuite/mpitests/test_rate_neurons_mpi.sli b/testsuite/mpitests/test_rate_neurons_mpi.sli
    deleted file mode 100644
    index 3da9165fcb..0000000000
    --- a/testsuite/mpitests/test_rate_neurons_mpi.sli
    +++ /dev/null
    @@ -1,91 +0,0 @@
    -/*
    - *  test_rate_neurons_mpi.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_rate_neurons_mpi - Test rate model neurons in parallel
    -
    -    Synopsis: (test_rate_neurons_mpi) run -> - 
    -
    -    Description:
    -    test_rate_neurons_mpi.sli checks if simulations with rate neurons
    -    (lin_rate_ipn, siegert_neuron) and rate connections
    -    (rate_connection_instantaneous, diffusion_connection) work in parallel.
    -    
    -    Author:  Jan Hahne
    -    SeeAlso: lin_rate_ipn, rate_connection_instantaneous, siegert_neuron, diffusion_connection
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model siegert_neuron, so
    -% this test should only run if we have GSL
    -skip_if_not_threaded
    -skip_if_without_gsl
    -
    -/total_vps 4 def
    -
    -[1 2 4]
    -{
    -  0.1 /h Set
    -  
    -  << /total_num_virtual_procs total_vps 
    -     /resolution h
    -     /use_wfr true
    -     /wfr_tol 0.0001
    -     /wfr_interpolation_order 3
    -     /wfr_max_iterations 10
    -     /wfr_comm_interval 1.0
    -  >> SetKernelStatus
    -      
    -  /lin_rate_ipn << /mu 0.0 /sigma 0.0 /rate 20.0 >> Create /lin_neuron1 Set
    -  /siegert_neuron << /rate 20.0 >> Create /siegert_neuron1 Set
    -  /lin_rate_ipn << /mu 0.0 /sigma 0.0 >> Create /lin_neuron2 Set
    -  /siegert_neuron Create /siegert_neuron2 Set
    -  
    -  /mm /multimeter << /record_from [/rate]
    -             /interval 1.0 >> Create def
    -  
    -  mm lin_neuron1 Connect
    -  mm lin_neuron2 Connect
    -  mm siegert_neuron1 Connect
    -  mm siegert_neuron2 Connect
    -  
    -  lin_neuron1 lin_neuron2
    -  << /rule /one_to_one >> 
    -  << /synapse_model /rate_connection_instantaneous /weight 5.0 >>
    -  Connect
    -  
    -  siegert_neuron1 siegert_neuron2
    -  << /rule /one_to_one >> 
    -  << /synapse_model /diffusion_connection /diffusion_factor 2.0 /drift_factor 4.0 >>
    -  Connect
    -  
    -  11 Simulate
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev mm /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_gamma_generator_1.sli b/testsuite/mpitests/test_sinusoidal_gamma_generator_1.sli
    deleted file mode 100644
    index 393506e180..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_gamma_generator_1.sli
    +++ /dev/null
    @@ -1,101 +0,0 @@
    -/*
    - *  test_sinusoidal_gamma_generator_1.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_gamma_generator_1 - Test parallel generation of sinusoidally modulate Gammaian trains with single spike train
    -
    -Synopsis: nest_indirect test_sinusoidal_gamma_generator_1.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Gamma generator emitting a
    -   single spike train to all of its targets and sends spikes to spike
    -   recorder. Assert invariant results for fixed VP number. This is a
    -   partial response to #551. May be adapted to other generators.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_gamma_generator.sli
    -
    -See also: testsuite::test_sinusoidal_gamma_generator_2, testsuite::test_sinusoidal_gamma_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -% run simulation with or without individual trains
    -% bool spg_tester -> spike recorder
    -/spg_tester
    -{
    -  /individual Set
    -
    -  /nodes total_vps 2 mul def  
    -
    -  % set resolution and total/local number of threads
    -  <<
    -    /resolution  0.1
    -    /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_gamma_generator
    -  << 
    -    /rate 1000.
    -    /amplitude 1000.
    -    /frequency 100.
    -    /order 3.
    -    /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gens [ nodes ] 
    -  { 
    -    ;
    -    /sinusoidal_gamma_generator Create
    -  } Table def
    -  /sr /spike_recorder Create def
    -  /pnet [ nodes ] { ; /parrot_neuron Create } Table def
    -
    -  [ gens pnet ] { Connect } ScanThread
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  sr
    -} def
    -
    -% first test: single spike train, equality for different splits
    -[1 2 4]
    -{
    -  % run test only if generator is known, otherwise, leave empty dict
    -  GetKernelStatus /node_models get /sinusoidal_gamma_generator MemberQ
    -  {
    -    /sr false spg_tester def
    -    
    -    % get events, replace vectors with SLI arrays    
    -    /ev sr /events get def
    -    ev keys { /k Set ev dup k get cva k exch put } forall
    -    ev 
    -  }
    -  {
    -    << >>
    -  } ifelse
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_gamma_generator_2.sli b/testsuite/mpitests/test_sinusoidal_gamma_generator_2.sli
    deleted file mode 100644
    index 962e12b3d3..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_gamma_generator_2.sli
    +++ /dev/null
    @@ -1,102 +0,0 @@
    -/*
    - *  test_sinusoidal_gamma_generator_2.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_gamma_generator_2 - Test parallel generation of sinusoidally modulate Gammaian trains with individual spike trains
    -
    -Synopsis: nest_indirect test_sinusoidal_gamma_generator_2.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Gamma generator emitting
    -   individual spike trains to each of its targets and sends spikes to
    -   spike recorder. Assert invariant results for fixed VP number. This
    -   is a partial response to #551. May be adapted to other generators.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_gamma_generator.sli
    -
    -See also: testsuite::test_sinusoidal_gamma_generator_3, testsuite::test_sinusoidal_gamma_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -
    -/total_vps 4 def
    -
    -% run simulation with or without individual trains
    -% bool spg_tester -> spike recorder
    -/spg_tester
    -{
    -  /individual Set
    -
    -  /nodes total_vps 2 mul def  
    -
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_gamma_generator
    -  << 
    -    /rate 1000.
    -    /amplitude 1000.
    -    /frequency 100.
    -    /order 3.
    -    /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gens [ nodes ] 
    -  { 
    -    ;
    -    /sinusoidal_gamma_generator Create
    -  } Table def
    -  /sr /spike_recorder Create def
    -  /pnet [ nodes ] { ; /parrot_neuron Create } Table def
    -
    -  [ gens pnet ] { Connect } ScanThread
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  sr
    -} def
    -
    -% second test: individual spike trains, equality for different splits
    -[1 2 4]
    -{
    -  % run test only if generator is known, otherwise, leave empty dict
    -  GetKernelStatus /node_models get /sinusoidal_gamma_generator MemberQ
    -  {
    -    /sr true spg_tester def
    -
    -    % get events, replace vectors with SLI arrays    
    -    /ev sr /events get def
    -    ev keys { /k Set ev dup k get cva k exch put } forall
    -    ev 
    -  }
    -  {
    -    << >>
    -  } ifelse
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_gamma_generator_3.sli b/testsuite/mpitests/test_sinusoidal_gamma_generator_3.sli
    deleted file mode 100644
    index ba0f8e38bb..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_gamma_generator_3.sli
    +++ /dev/null
    @@ -1,97 +0,0 @@
    -/*
    - *  test_sinusoidal_gamma_generator_3.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_gamma_generator_3 - Test parallel generation of sinusoidally modulate Gammaian trains with single spike train
    -
    -Synopsis: nest_indirect test_sinusoidal_gamma_generator_3.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Gamma generator emitting a
    -   single spike train to all of its targets and sends spikes to spike
    -   recorder. Identical to ..._1, but with single generator, not one per VP.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_gamma_generator.sli
    -
    -See also: testsuite::test_sinusoidal_gamma_generator_4, testsuite::test_sinusoidal_gamma_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -
    -/total_vps 4 def
    -
    -% run simulation with or without individual trains
    -% bool spg_tester -> spike recorder
    -/spg_tester
    -{
    -  /individual Set
    -
    -  /nodes total_vps 2 mul def  
    -
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_gamma_generator
    -  << 
    -    /rate 1000.
    -    /amplitude 1000.
    -    /frequency 100.
    -    /order 3.
    -    /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gen /sinusoidal_gamma_generator Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ nodes ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { gen exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  sr
    -} def
    -
    -% first test: single spike train, equality for different splits
    -[1 2 4]
    -{
    -  % run test only if generator is known, otherwise, leave empty dict
    -  GetKernelStatus /node_models get /sinusoidal_gamma_generator MemberQ
    -  {
    -    /sr false spg_tester def
    -
    -    % get events, replace vectors with SLI arrays    
    -    /ev sr /events get def
    -    ev keys { /k Set ev dup k get cva k exch put } forall
    -    ev 
    -  }
    -  {
    -    << >>
    -  } ifelse
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_gamma_generator_4.sli b/testsuite/mpitests/test_sinusoidal_gamma_generator_4.sli
    deleted file mode 100644
    index 568a7ed55e..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_gamma_generator_4.sli
    +++ /dev/null
    @@ -1,96 +0,0 @@
    -/*
    - *  test_sinusoidal_gamma_generator_4.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_gamma_generator_4 - Test parallel generation of sinusoidally modulate Gammaian trains with individual spike trains
    -
    -Synopsis: nest_indirect test_sinusoidal_gamma_generator_4.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Gamma generator emitting
    -   individual spike trains to each of its targets and sends spikes to
    -   spike recorder. Identical to ..._2, but with single generator, not one per VP.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_gamma_generator.sli
    -
    -See also: testsuite::test_sinusoidal_gamma_generator_1, testsuite::test_sinusoidal_gamma_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/total_vps 4 def
    -
    -% run simulation with or without individual trains
    -% bool spg_tester -> spike recorder
    -/spg_tester
    -{
    -  /individual Set
    -
    -  /nodes total_vps 2 mul def  
    -
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_gamma_generator
    -  << 
    -    /rate 1000.
    -    /amplitude 1000.
    -    /frequency 100.
    -    /order 3.
    -    /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gen /sinusoidal_gamma_generator Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ nodes ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { gen exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  sr
    -} def
    -
    -% second test: individual spike trains, equality for different splits
    -[1 2 4]
    -{
    -  % run test only if generator is known, otherwise, leave empty dict
    -  GetKernelStatus /node_models get /sinusoidal_gamma_generator MemberQ
    -  {
    -    /sr true spg_tester def
    -
    -    % get events, replace vectors with SLI arrays    
    -    /ev sr /events get def
    -    ev keys { /k Set ev dup k get cva k exch put } forall
    -    ev 
    -  }
    -  {
    -    << >>
    -  } ifelse
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_poisson_generator_1.sli b/testsuite/mpitests/test_sinusoidal_poisson_generator_1.sli
    deleted file mode 100644
    index 986db7a7aa..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_poisson_generator_1.sli
    +++ /dev/null
    @@ -1,94 +0,0 @@
    -/*
    - *  test_sinusoidal_poisson_generator_1.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_poisson_generator_1 - Test parallel generation of sinusoidally modulate Poissonian trains with single spike train
    -
    -Synopsis: nest_indirect test_sinusoidal_poisson_generator_1.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Poisson generator emitting a
    -   single spike train to all of its targets and sends spikes to spike
    -   recorder. Assert invariant results for fixed VP number. This is a
    -   partial response to #551. May be adapted to other generators.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_poisson_generator.sli
    -
    -See also: testsuite::test_sinusoidal_poisson_generator_2, testsuite::test_sinusoidal_poisson_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -
    -/total_vps 4 def
    -
    -% run simulation with or without individual trains
    -% bool spg_tester -> spike recorder
    -/spg_tester
    -{
    -  /individual Set
    -
    -  /nodes total_vps 2 mul def  
    -
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_poisson_generator
    -  << 
    -    /rate 1000.
    -    /amplitude 1000.
    -    /frequency 100.
    -    /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gens [ nodes ] 
    -  { 
    -    ;
    -    /sinusoidal_poisson_generator Create
    -  } Table def
    -  /sr /spike_recorder Create def
    -  /pnet [ nodes ] { ; /parrot_neuron Create } Table def
    -
    -  [ gens pnet ] { Connect } ScanThread
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  sr
    -} def
    -
    -% first test: single spike train, equality for different splits
    -[1 2 4]
    -{
    -  /sr false spg_tester def
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_poisson_generator_2.sli b/testsuite/mpitests/test_sinusoidal_poisson_generator_2.sli
    deleted file mode 100644
    index 261833cf54..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_poisson_generator_2.sli
    +++ /dev/null
    @@ -1,93 +0,0 @@
    -/*
    - *  test_sinusoidal_poisson_generator_2.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_poisson_generator_2 - Test parallel generation of sinusoidally modulate Poissonian trains with individual spike trains
    -
    -Synopsis: nest_indirect test_sinusoidal_poisson_generator_2.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Poisson generator emitting
    -   individual spike trains to each of its targets and sends spikes to
    -   spike recorder. Assert invariant results for fixed VP number. This
    -   is a partial response to #551. May be adapted to other generators.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_poisson_generator.sli
    -
    -See also: testsuite::test_sinusoidal_poisson_generator_3, testsuite::test_sinusoidal_poisson_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -
    -/total_vps 4 def
    -
    -% run simulation with or without individual trains
    -% bool spg_tester -> spike recorder
    -/spg_tester
    -{
    -  /individual Set
    -
    -  /nodes total_vps 2 mul def  
    -
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_poisson_generator
    -  << 
    -    /rate 1000.
    -    /amplitude 1000.
    -    /frequency 100.
    -    /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gens [ nodes ] 
    -  { 
    -    ;
    -    /sinusoidal_poisson_generator Create
    -  } Table def
    -  /sr /spike_recorder Create def
    -  /pnet [ nodes ] { ; /parrot_neuron Create } Table def
    -  [ gens pnet ] { Connect } ScanThread
    -  pnet {sr Connect} forall
    -  
    -  10. Simulate
    -
    -  sr
    -} def
    -
    -% second test: individual spike trains, equality for different splits
    -[1 2 4]
    -{
    -  /sr true spg_tester def
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_poisson_generator_3.sli b/testsuite/mpitests/test_sinusoidal_poisson_generator_3.sli
    deleted file mode 100644
    index 0a7f50bcfc..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_poisson_generator_3.sli
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -/*
    - *  test_sinusoidal_poisson_generator_3.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_poisson_generator_3 - Test parallel generation of sinusoidally modulate Poissonian trains with single spike train
    -
    -Synopsis: nest_indirect test_sinusoidal_poisson_generator_3.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Poisson generator emitting a
    -   single spike train to all of its targets and sends spikes to spike
    -   recorder. Identical to ..._1, but with single generator, not one per VP.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_poisson_generator.sli
    -
    -See also: testsuite::test_sinusoidal_poisson_generator_4, testsuite::test_sinusoidal_poisson_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -
    -/total_vps 4 def
    -
    -% run simulation with or without individual trains
    -% bool spg_tester -> spike recorder
    -/spg_tester
    -{
    -  /individual Set
    -
    -  /nodes total_vps 2 mul def  
    -
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_poisson_generator
    -  << 
    -    /rate 1000.
    -    /amplitude 1000.
    -    /frequency 100.
    -    /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gen /sinusoidal_poisson_generator Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ nodes ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { gen exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  sr
    -} def
    -
    -% first test: single spike train, equality for different splits
    -[1 2 4]
    -{
    -  /sr false spg_tester def
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_poisson_generator_4.sli b/testsuite/mpitests/test_sinusoidal_poisson_generator_4.sli
    deleted file mode 100644
    index 124b5cd4e0..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_poisson_generator_4.sli
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -/*
    - *  test_sinusoidal_poisson_generator_4.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_poisson_generator_4 - Test parallel generation of sinusoidally modulate Poissonian trains with individual spike trains
    -
    -Synopsis: nest_indirect test_sinusoidal_poisson_generator_4.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Poisson generator emitting
    -   individual spike trains to each of its targets and sends spikes to
    -   spike recorder. Identical to ..._2, but with single generator, not one per VP.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_poisson_generator.sli
    -
    -See also: testsuite::test_sinusoidal_poisson_generator_1, testsuite::test_sinusoidal_poisson_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -
    -/total_vps 4 def
    -
    -% run simulation with or without individual trains
    -% bool spg_tester -> spike recorder
    -/spg_tester
    -{
    -  /individual Set
    -
    -  /nodes total_vps 2 mul def  
    -
    -  % set resolution and total/local number of threads
    -  <<
    -  /resolution  0.1
    -  /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_poisson_generator
    -  << 
    -    /rate 1000.
    -    /amplitude 1000.
    -    /frequency 100.
    -    /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gen /sinusoidal_poisson_generator Create def
    -  /sr /spike_recorder Create def
    -  /pnet [ nodes ] { ; /parrot_neuron Create } Table def
    -
    -  pnet { gen exch Connect } forall
    -  pnet { sr Connect } forall
    -  
    -  10. Simulate
    -
    -  sr
    -} def
    -
    -% second test: individual spike trains, equality for different splits
    -[1 2 4]
    -{
    -  /sr true spg_tester def
    -
    -  % get events, replace vectors with SLI arrays    
    -  /ev sr /events get def
    -  ev keys { /k Set ev dup k get cva k exch put } forall
    -  ev 
    -} distributed_process_invariant_events_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_poisson_generator_5.sli b/testsuite/mpitests/test_sinusoidal_poisson_generator_5.sli
    deleted file mode 100644
    index 977dcc093e..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_poisson_generator_5.sli
    +++ /dev/null
    @@ -1,102 +0,0 @@
    -/*
    - *  test_sinusoidal_poisson_generator_5.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_poisson_generator_5 - Test parallel generation of sinusoidally modulate Poissonian trains with single spike train
    -
    -Synopsis: nest_indirect test_sinusoidal_poisson_generator_5.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Poisson generator emitting a
    -   single spike train to all of its targets and sends spikes to spike
    -   recorders. Ensures that all targets receive identical spike trains.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_poisson_generator.sli
    -
    -See also: test_sinusoidal_poisson_generator_{1,2,3,4,6}, test_sinusoidal_poisson_generator_nostat
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/total_vps 4 def
    -
    -% return true if all arrays inside an array are identical
    -% [l1 l2 ...] all_equal -> bool
    -/all_equal
    -{
    -  dup First /reference Set
    -  true exch { reference eq and } Fold
    -} def
    -
    -% function building n neuron network with spike recorders
    -% num_nrns individual run_simple_net -> [ spike_recorders ]
    -/run_simple_net
    -{
    -  /individual Set
    -  /n Set
    -
    -  % set resolution and total/local number of threads
    -  <<
    -    /resolution  0.1
    -    /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_poisson_generator 
    -  << 
    -     /rate  1000.
    -     /amplitude   1000.
    -     /frequency 100.
    -     /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gen /sinusoidal_poisson_generator Create def
    -  /parrots /parrot_neuron n Create def
    -  /srs /spike_recorder n Create def
    -
    -  gen parrots Connect
    -  
    -  parrots srs << /rule /one_to_one >> Connect
    -
    -  10. Simulate
    -
    -  srs
    -} def
    -
    -
    -% we only run for two MPI with two threads each
    -% thus, each MP process returns an array with two spike-train arrays
    -% we pool all the arrays (i.e., total spike trains) and they must all
    -% be identical 
    -[ 2 ]
    -{
    -  /srs 16 false run_simple_net def
    -
    -  % get events, replace vectors with SLI arrays
    -  % keep only non-empty arrays; empty ones are from off-process parrots
    -  srs { [/events /times] get cva } Map { empty not exch ; } Select
    -
    -  % expect array with two arrays of spike times
    -  all_equal
    -}
    -distributed_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_sinusoidal_poisson_generator_6.sli b/testsuite/mpitests/test_sinusoidal_poisson_generator_6.sli
    deleted file mode 100644
    index d9d3ec9342..0000000000
    --- a/testsuite/mpitests/test_sinusoidal_poisson_generator_6.sli
    +++ /dev/null
    @@ -1,115 +0,0 @@
    -/*
    - *  test_sinusoidal_poisson_generator_6.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_poisson_generator_6 - Test parallel generation of sinusoidally modulate Poissonian trains with individual spike trains
    -
    -Synopsis: nest_indirect test_sinusoidal_poisson_generator_6.sli -> -
    -
    -Description:
    -   Creates a sinusoidally modulated Poisson generator emitting an
    -   individual spike train to each of its targets and sends spikes to spike
    -   recorders. Ensures that all targets receive different spike trains.
    -
    -Author:  December 2012, May 2013, Plesser, based on test_poisson_generator.sli
    -
    -See also: test_sinusoidal_poisson_generator_{1,2,3,4,5}, test_sinusoidal_poisson_generator_nostat
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/total_vps 4 def
    -
    -
    -% return true if all arrays inside an array are different from each other
    -% [l1 l2 ...] all_different -> bool
    -/all_different
    -{
    -  empty
    -  {
    -    ; true 
    -  }
    -  {
    -    /items Set
    -    items [ 1 -2 ] Take  % all except last element
    -    { 1 add -1 2 arraystore items exch Take 
    -      exch /item Set 
    -      true exch { item neq and } Fold
    -    } MapIndexed 
    -    true exch { and } Fold
    -  } ifelse
    -
    -} def
    -
    -
    -% function building n neuron network with spike recorders
    -% num_nrns individual run_simple_net -> [ spike_recorders ]
    -/run_simple_net
    -{
    -  /individual Set
    -  /n Set
    -
    -  % set resolution and total/local number of threads
    -  <<
    -    /resolution  0.1
    -    /total_num_virtual_procs total_vps
    -  >> SetKernelStatus
    -
    -  /sinusoidal_poisson_generator 
    -  << 
    -     /rate  1000.
    -     /amplitude   1000.
    -     /frequency 100.
    -     /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /gen /sinusoidal_poisson_generator Create def
    -  /parrots /parrot_neuron n Create def
    -  /srs /spike_recorder n Create def
    -
    -  gen parrots Connect
    -  
    -  parrots srs << /rule /one_to_one >> Connect
    -
    -  10. Simulate
    -
    -  srs
    -} def
    -
    -
    -% we only run for two MPI with two threads each
    -% thus, each MP process returns an array with two spike-train arrays
    -% we pool all the arrays (i.e., total spike trains) and they must all
    -% be identical 
    -[ 2 ]
    -{
    -  /srs 16 true run_simple_net def
    -
    -  % get events, replace vectors with SLI arrays
    -  % keep only non-empty arrays; empty ones are from off-process parrots
    -  srs { [/events /times] get cva } Map { empty not exch ; } Select
    -  
    -  % expect array with two arrays of spike times
    -  all_different
    -}
    -distributed_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_spatial_distributed_positions.sli b/testsuite/mpitests/test_spatial_distributed_positions.sli
    deleted file mode 100644
    index 9b014f5006..0000000000
    --- a/testsuite/mpitests/test_spatial_distributed_positions.sli
    +++ /dev/null
    @@ -1,58 +0,0 @@
    -/*
    - *  test_spatial_distributed_positions.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -[1 2 4]
    -{
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    - << /uniform << /min 0.0 /max 1.0  >> >> CreateParameter /pos_param Set
    - pos_param pos_param dimension2d /pos Set
    -
    -  /layer_spec
    -  << /positions pos
    -    /n 4
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer layer_spec CreateLayer def
    -
    -  layer GetMetadata /meta Set
    -
    -  {
    -    % Abort if there is no metadata.
    -    meta length 0 gt
    -  } assert_or_die
    -
    -  {
    -    % Abort if the metadata does not contain positions.
    -    meta keys /positions MemberQ
    -  } assert_or_die
    -
    -  meta /positions get
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_spatial_pairwise_bernoulli_on_source_param.sli b/testsuite/mpitests/test_spatial_pairwise_bernoulli_on_source_param.sli
    deleted file mode 100644
    index 0fcf0ea724..0000000000
    --- a/testsuite/mpitests/test_spatial_pairwise_bernoulli_on_source_param.sli
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/*
    - *  test_spatial_pairwise_bernoulli_on_source_param.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    - << /uniform << /min 0.0 /max 1.0  >> >> CreateParameter /pos_param Set
    - pos_param pos_param dimension2d /pos Set
    -
    -  /layer_spec_a
    -  << /positions pos
    -    /n 4
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /n 4
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_source /number_of_connections 10 >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/test_symmetric_connections_mpi.sli b/testsuite/mpitests/test_symmetric_connections_mpi.sli
    deleted file mode 100644
    index f5bf992a3c..0000000000
    --- a/testsuite/mpitests/test_symmetric_connections_mpi.sli
    +++ /dev/null
    @@ -1,115 +0,0 @@
    -/*
    - *  test_symmetric_connections_mpi.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::test_symmetric_connections_mpi - Tests that the functionality to create
    -symmetric connections works properly when running across MPI processes.
    -
    -Synopsis: (test_symmetric_connections_mpi) run -> NEST exits if test fails
    -
    -Description: 
    -This test ensures that the functionality to create symmetric connections
    -works properly when running on several MPI processes.
    -
    -In more detail the test ensures that
    -- the make_symmetric flag works properly with one-to-one connection rule
    -
    -Author: Hans Ekkehard Plesser, 2016-05-03 based on serial test by Jan Hahne, 2016-04-22
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/:swap_first_two  % swap first two elements in an array
    -{
    -  arrayload /n Set n -2 roll exch n 2 roll n arraystore
    -} def
    -
    -[1 2 4]
    -{
    -  ResetKernel
    -
    -  /set1 /iaf_psc_alpha 5 Create def
    -  /set2 /iaf_psc_alpha 5 Create def
    -
    -    set1 set2 
    -    << /rule /one_to_one 
    -       /make_symmetric true >> 
    -    << /synapse_model /stdp_synapse
    -       /weight <. 1.0 2.0 3.0 4.0 5.0 .>
    -       /delay <. 1.5 2.5 3.5 4.5 5.5 .>
    -       /alpha <. 1.2 2.2 3.2 4.2 5.2 .> >>
    -    Connect
    -
    -    << /source set1 >> GetConnections /fwd Set
    -    << /source set2 >> GetConnections /bck Set
    -
    -    [ fwd bck ]
    -    {
    -      {
    -        [ /source /target /weight /delay /alpha ]
    -        {
    -          exch dup rolld get 
    -        } Map 
    -        exch pop
    -      } Map
    -    } Map
    -    % On the stack, we now have a list with two elements. The first
    -    % contains the properties of all local forward connections, 
    -    % the second the properties of all backward connections.
    -    % At the driver level, we must
    -    %   - collect all forward and all backward connections
    -    %   - ensure that there are five connections in each direction
    -    %   - ensure that connections are symmetric
    -  }
    -{
    -  {
    -    % combine forward and backward arrays, respectively, across all ranks
    -    % the stack then contains an array with one element per NMPI, each
    -    % of which contains one forward and one backward connection array 
    -    [ [] [] ] exch { 2 arraystore { join } MapThread } Fold
    -    
    -    % swap source and target in each backward array, then convert array to
    -    % string and sort forward and backward arrays
    -    { 2 eq 
    -        { { :swap_first_two pcvs } Map } 
    -        { { pcvs } Map } 
    -      ifelse 
    -      Sort 
    -    } MapIndexed 
    -  } Map
    -  /results Set
    -  
    -  % now check across all NMPI values that forward and backward are equal
    -  true results { { eq } MapThread true exch { and } Fold and } Fold
    -   
    -  % compare that the strings obtained for all NMPI values are equal
    -  results First /ref Set
    -  true results Rest { ref eq and } Fold
    -  and
    -}
    -distributed_collect_assert_or_die
    -
    -endusing
    diff --git a/testsuite/mpitests/ticket-400.sli b/testsuite/mpitests/ticket-400.sli
    deleted file mode 100644
    index 9d072905db..0000000000
    --- a/testsuite/mpitests/ticket-400.sli
    +++ /dev/null
    @@ -1,46 +0,0 @@
    -/*
    - *  ticket-400.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Regression test for Ticket #400
    - *
    - * Verify whether access check of dictionary works if more 
    - * than one MPI process is used.
    - *
    - * Diesmann, 100918
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -
    -[1 2 4]                                          
    -{                                                 
    - ResetKernel
    - /iaf_psc_alpha Create dup << /rule /all_to_all >> Connect
    -}
    -distributed_pass_or_die
    -
    -
    -
    -
    diff --git a/testsuite/mpitests/ticket-516.sli b/testsuite/mpitests/ticket-516.sli
    deleted file mode 100644
    index d0fcaa48a2..0000000000
    --- a/testsuite/mpitests/ticket-516.sli
    +++ /dev/null
    @@ -1,60 +0,0 @@
    -/*
    - *  ticket-516.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -/master_seed 1234567 def
    -/sim_time 200 def
    -
    -/setup_network [/stringtype]
    -{
    -  M_ERROR setverbosity
    -  ResetKernel
    -
    -  /conn_type Set
    -
    -  /n_vp GetKernelStatus /total_num_virtual_procs get def
    -  (Number of virtual processes: ) n_vp cvs join =
    -  (Rank: ) Rank cvs join =
    -
    -  << /rng_seed master_seed >> SetKernelStatus
    -
    -  /layer << /shape [ 10 10 ] /edge_wrap false /elements /iaf_psc_delta >> CreateLayer def
    -
    -  /conn_spec << /connection_type conn_type
    -                /mask << /circular << /radius 0.5 >> >>
    -                /kernel 1.0
    -                /weight << /uniform << /min 1.0 /max 1.5 >> >>
    -                /delay 1.0
    -             >> def
    -  layer layer conn_spec ConnectLayers
    -} def
    -
    -[6]
    -{
    - (pairwise_bernoulli_on_source) setup_network
    - sim_time Simulate
    -
    - (pairwise_bernoulli_on_target) setup_network
    - sim_time Simulate
    -} distributed_pass_or_die
    diff --git a/testsuite/mpitests/ticket-955.sli b/testsuite/mpitests/ticket-955.sli
    deleted file mode 100644
    index 17a024bfc2..0000000000
    --- a/testsuite/mpitests/ticket-955.sli
    +++ /dev/null
    @@ -1,64 +0,0 @@
    -/*
    - *  ticket-955.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-955 - Check that CreateLayer even works with a single neuron layer on multiple processes
    -
    -Synopsis: (ticket-955) run -> NEST exits if test fails
    -
    -Description:
    - This test creates layer with a single node. The test should pass with any number of MPI processes.
    -
    -Author: Hans Ekkehard Plesser, 2015-02-03 based on a reproducer by Janne Morén
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -[1 2 4]
    -{
    -  <<
    -    /positions [[0.0 0.0]]
    -    /extent [1.0 1.0]
    -    /elements /iaf_psc_alpha
    -  >>
    -  CreateLayer
    -  pop % leave empty stack
    -
    -  <<   % test 3d layer
    -    /positions [[0.0 0.0 0.0]]
    -    /extent [1.0 1.0 1.0]
    -    /elements /iaf_psc_alpha
    -  >>
    -  CreateLayer
    -  pop % leave empty stack
    -
    -<<   % test grid layer as well
    -    /shape [ 1 1 ]
    -    /elements /iaf_psc_alpha
    -  >>
    -  CreateLayer
    -  pop % leave empty stack
    -
    -}
    -distributed_pass_or_die
    diff --git a/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_source.sli b/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_source.sli
    deleted file mode 100644
    index 345346bc46..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_source.sli
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    - *  topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_source.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_source /number_of_connections 10 >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    -
    diff --git a/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_target.sli b/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_target.sli
    deleted file mode 100644
    index 0a12b2a886..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_target.sli
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    - *  topo_mpi_test_free_layer_to_layer_pairwise_bernoulli_on_target.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_target /number_of_connections 10 >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    -
    diff --git a/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_source_driven.sli b/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_source_driven.sli
    deleted file mode 100644
    index 2a55e3d606..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_source_driven.sli
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    - *  topo_mpi_test_free_layer_to_layer_source_driven.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_target >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    -
    diff --git a/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_target_driven.sli b/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_target_driven.sli
    deleted file mode 100644
    index 47ac80c346..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_layer_to_layer_target_driven.sli
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    - *  topo_mpi_test_free_layer_to_layer_target_driven.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_source >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    -
    diff --git a/testsuite/mpitests/topo_mpi_test_free_layer_to_sd_target_driven.sli b/testsuite/mpitests/topo_mpi_test_free_layer_to_sd_target_driven.sli
    deleted file mode 100644
    index 364e528752..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_layer_to_sd_target_driven.sli
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    - *  topo_mpi_test_free_layer_to_sd_target_driven.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_spec_b
    -  <<
    -    /positions [[0.0 0.0]]
    -    /extent [1.0 1.0]
    -    /edge_wrap false
    -    /elements /spike_recorder
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_source >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_source.sli b/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_source.sli
    deleted file mode 100644
    index e9bf861e74..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_source.sli
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -/*
    - *  topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_source.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  <<
    -    /positions [[0.0 0.0]]
    -    /extent [1.0 1.0]
    -    /edge_wrap false
    -    /elements /poisson_generator
    -  >> def
    -
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_source /number_of_connections 10 >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_target.sli b/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_target.sli
    deleted file mode 100644
    index 083c92a82b..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_target.sli
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -/*
    - *  topo_mpi_test_free_pg_to_layer_pairwise_bernoulli_on_target.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  <<
    -    /positions [[0.0 0.0]]
    -    /extent [1.0 1.0]
    -    /edge_wrap false
    -    /elements /poisson_generator
    -  >> def
    -
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_target /number_of_connections 10 >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_source_driven.sli b/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_source_driven.sli
    deleted file mode 100644
    index a4159fba55..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_source_driven.sli
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -/*
    - *  topo_mpi_test_free_pg_to_layer_source_driven.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  <<
    -    /positions [[0.0 0.0]]
    -    /extent [1.0 1.0]
    -    /edge_wrap false
    -    /elements /poisson_generator
    -  >> def
    -
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_target >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_target_driven.sli b/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_target_driven.sli
    deleted file mode 100644
    index 4468c0a151..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_free_pg_to_layer_target_driven.sli
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -/*
    - *  topo_mpi_test_free_pg_to_layer_target_driven.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /*
    -Author: Håkon Mørk
    -FirstVersion: 16. November 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_connection
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -  [-0.5 0.5 0.25] Range
    -  { /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -  /pos Set
    -
    -  /layer_spec_a
    -  <<
    -    /positions [[0.0 0.0]]
    -    /extent [1.0 1.0]
    -    /edge_wrap false
    -    /elements /poisson_generator
    -  >> def
    -
    -
    -  /layer_spec_b
    -  << /positions pos
    -    /extent [1.25 1.25]
    -    /edge_wrap false
    -    /elements /iaf_psc_alpha
    -  >> def
    -
    -  /layer_a layer_spec_a CreateLayer def
    -  /layer_b layer_spec_b CreateLayer def
    -
    -  layer_a layer_b connspec ConnectLayers
    -
    -  /src layer_a 1 Take def
    -  /tgts layer_b def
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map def
    -
    -  ctgts cva
    -
    -} def
    -
    -[1 2 4]
    -{
    -  << /connection_type /pairwise_bernoulli_on_source >> test_connection
    -} distributed_process_invariant_collect_assert_or_die
    diff --git a/testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_source.sli b/testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_source.sli
    deleted file mode 100644
    index 645caac749..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_source.sli
    +++ /dev/null
    @@ -1,99 +0,0 @@
    -/*
    - *  topo_mpi_test_pairwise_bernoulli_on_source.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% pairwise_bernoulli_on_source test
    -[1 2 4]
    -{
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -  /layer_specs << /shape [ 4 4 ] /elements /iaf_psc_alpha /edge_wrap true >> def
    -  /l1 layer_specs CreateLayer def
    -  /l2 layer_specs CreateLayer def
    -
    -  << /constant << /value 1.0 >> >> CreateParameter
    -  << /constant << /value -0.02 >> >> CreateParameter
    -  << /distance << >> >> CreateParameter
    -  mul add /linear_parameter Set
    -
    -  /conns << /connection_type (pairwise_bernoulli_on_source)
    -            /mask << /circular << /radius 0.25 >> /anchor [ 0.0 0.0 ] >>
    -            /weight linear_parameter
    -         >> def
    -  l1 l2 conns ConnectLayers
    -
    -  /ofile tmpnam (_) join Rank 1 add cvs join (_of_) join NumProcesses cvs join def
    -  ofile (w) file
    -  l1 DumpLayerNodes
    -  l2 DumpLayerNodes
    -  l1 l2 /static_synapse DumpLayerConnections close
    -  ofile
    -}
    -{
    -  /result_files Set
    -  result_files ==
    -
    -  % Use the first result as reference
    -  /ref [] def
    -  result_files First 0 get dup /ref_filename Set (r) file
    -  {
    -    getline not
    -    {exit} if  % exit loop if EOF
    -    ref exch append
    -    /ref Set
    -  } loop
    -  close
    -  (Num elements: ) ref length_a cvs join =
    -
    -  % Compare the reference to the other results
    -  /other_results [] def
    -  result_files Rest
    -  {
    -    /result [] def
    -    /n_elements 0 def
    -    {
    -      dup /filename Set
    -      (r) file
    -      {
    -        getline
    -        not {exit} if  % exit loop if EOF
    -        dup ref exch MemberQ dup /invariant Set
    -        not {cvs ( not in ref ) join ref_filename join = exit} if  % break out of loop if element not in reference
    -        result exch append
    -        /result Set
    -        /n_elements n_elements 1 add def
    -      } loop
    -      close
    -      invariant not {exit} if
    -    } forall
    -    n_elements ref length_a eq not
    -    {/invariant false def (Lengths not equal, ) n_elements cvs join ( and ) join  ref length_a cvs join = } if
    -    invariant not {exit} if
    -    /other_results other_results result append def
    -  } forall
    -
    -  invariant  % true if all runs produce the same elements
    -
    -} distributed_collect_assert_or_die
    -
    diff --git a/testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_target.sli b/testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_target.sli
    deleted file mode 100644
    index 5837467845..0000000000
    --- a/testsuite/mpitests/topo_mpi_test_pairwise_bernoulli_on_target.sli
    +++ /dev/null
    @@ -1,99 +0,0 @@
    -/*
    - *  topo_mpi_test_pairwise_bernoulli_on_target.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% pairwise_bernoulli_on_target test
    -[1 2 4]
    -{
    -  ResetKernel
    -  << /total_num_virtual_procs 4 >> SetKernelStatus
    -  /layer_specs << /shape [ 4 4 ] /elements /iaf_psc_alpha /edge_wrap true >> def
    -  /l1 layer_specs CreateLayer def
    -  /l2 layer_specs CreateLayer def
    -
    -  << /constant << /value 1.0 >> >> CreateParameter
    -  << /constant << /value -0.02 >> >> CreateParameter
    -  << /distance << >> >> CreateParameter
    -  mul add /linear_parameter Set
    -
    -  /conns << /connection_type (pairwise_bernoulli_on_target)
    -            /mask << /circular << /radius 0.25 >> /anchor [ 0.0 0.0 ] >>
    -            /weight linear_parameter
    -         >> def
    -  l1 l2 conns ConnectLayers
    -
    -  /ofile tmpnam (_) join Rank 1 add cvs join (_of_) join NumProcesses cvs join def
    -  ofile (w) file
    -  l1 DumpLayerNodes
    -  l2 DumpLayerNodes
    -  l1 l2 /static_synapse DumpLayerConnections close
    -  ofile
    -}
    -{
    -  /result_files Set
    -  result_files ==
    -
    -  % Use the first result as reference
    -  /ref [] def
    -  result_files First 0 get dup /ref_filename Set (r) file
    -  {
    -    getline not
    -    {exit} if  % exit loop if EOF
    -    ref exch append
    -    /ref Set
    -  } loop
    -  close
    -  (Num elements: ) ref length_a cvs join =
    -
    -  % Compare the reference to the other results
    -  /other_results [] def
    -  result_files Rest
    -  {
    -    /result [] def
    -    /n_elements 0 def
    -    {
    -      dup /filename Set
    -      (r) file
    -      {
    -        getline
    -        not {exit} if  % exit loop if EOF
    -        dup ref exch MemberQ dup /invariant Set
    -        not {cvs ( not in ref ) join ref_filename join = exit} if  % break out of loop if element not in reference
    -        result exch append
    -        /result Set
    -        /n_elements n_elements 1 add def
    -      } loop
    -      close
    -      invariant not {exit} if
    -    } forall
    -    n_elements ref length_a eq not
    -    {/invariant false def (Lengths not equal, ) n_elements cvs join ( and ) join  ref length_a cvs join = } if
    -    invariant not {exit} if
    -    /other_results other_results result append def
    -  } forall
    -
    -  invariant  % true if all runs produce the same elements
    -
    -} distributed_collect_assert_or_die
    -
    diff --git a/testsuite/musictests/CMakeLists.txt b/testsuite/musictests/CMakeLists.txt
    deleted file mode 100644
    index 6b83f58b49..0000000000
    --- a/testsuite/musictests/CMakeLists.txt
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -# CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -# This file is left empty intentionally.
    \ No newline at end of file
    diff --git a/testsuite/musictests/README.md b/testsuite/musictests/README.md
    deleted file mode 100644
    index e47d31f988..0000000000
    --- a/testsuite/musictests/README.md
    +++ /dev/null
    @@ -1,30 +0,0 @@
    -# `musictests` folder
    -
    -This directory contains tests for the MUSIC interface of NEST [1].
    -
    -Each test consists of the following parts:
    -
    -* a MUSIC configuration file with the extension `.music`
    -* one or more `.sli` scripts specifying the simulation
    -* optionally a shell script with the extension `.sh`, which is run
    -  after the actual test simulation. This script can be used to test
    -  resulting data files for consistency
    -
    -MUSIC tests are run using the launcher of the MPI implementation that
    -was requested during configuration and the total number of processes
    -that is requested in the MUSIC configuration file.
    -
    -Each test is expected to exit with an exit code of 0 upon success. All
    -other exit codes indicate an error.
    -
    -If the name of the test contains the word "failure", the test is
    -expected to fail. In this case, it is expected to exit with a non-zero
    -exit code and is considered a failed test otherwise.
    -
    -
    -## References
    -[1] Djurfeldt M, Hjorth J, Eppler JM, Dudani N, Helias M, Potjans TC,
    -Bhalla US, Diesmann M, Kotaleski JH, Ekeberg O (2010) Run-time
    -interoperability between neuronal network simulators based on the
    -MUSIC framework. Neuroinformatics 8(1):43-60.
    -doi:[10.1007/s12021-010-9064-z](https://doi.org/10.1007/s12021-010-9064-z).
    diff --git a/testsuite/musictests/empty.sli b/testsuite/musictests/empty.sli
    deleted file mode 100644
    index 76507cf91e..0000000000
    --- a/testsuite/musictests/empty.sli
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -/*
    - *  empty.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% This file is intentionally left blank.
    diff --git a/testsuite/musictests/test_cont_proxy.music b/testsuite/musictests/test_cont_proxy.music
    deleted file mode 100644
    index 2d6a21667b..0000000000
    --- a/testsuite/musictests/test_cont_proxy.music
    +++ /dev/null
    @@ -1,36 +0,0 @@
    -/*
    - *  test_cont_proxies.music
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -stoptime=0.2
    -timestep=0.01
    -
    -[from]
    -    binary=nest
    -    np=2
    -    args=test_cont_proxy_sender.sli
    -
    -[to]
    -    binary=nest
    -    np=1
    -    args=test_cont_proxy_receiver.sli
    -
    -from.voltage_out -> to.voltage_in [2]
    diff --git a/testsuite/musictests/test_cont_proxy_receiver.sli b/testsuite/musictests/test_cont_proxy_receiver.sli
    deleted file mode 100644
    index b5a42c62d3..0000000000
    --- a/testsuite/musictests/test_cont_proxy_receiver.sli
    +++ /dev/null
    @@ -1,75 +0,0 @@
    -/*
    - *  test_cont_proxy_receiver.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_music
    -
    -M_ERROR setverbosity
    -
    -/music_cont_in_proxy Create /mciproxy Set
    -mciproxy << /port_name (voltage_in) >> SetStatus
    -
    -/ReceiveDataPacket
    -{
    -  1 Simulate mciproxy [/data] get cva
    -} def
    -
    -% reference data: V_m
    -% n1 channel A  |  n2 channel B
    -% -----------------------------
    -[ -57.0719         -60.0000 ]
    -[ -57.4215         -55.8623 ]
    -[ -57.7953         -57.3695 ]
    -[ -58.1948         -58.9805 ]
    -[ -58.6218         -60.0000 ]
    -[ -59.0783         -60.0000 ]
    -[ -59.5663         -55.4294 ]
    -[ -60.0879         -56.9067 ]
    -[ -60.6455         -58.4859 ]
    -[ -61.2415         -60.0000 ]
    -[ -61.8786         -60.0000 ]
    -[ -62.5596         -55.1193 ]
    -[ -63.2876         -56.5752 ]
    -[ -64.0658         -58.1315 ]
    -[ -64.8976         -59.7951 ]
    -[ -65.7867         -61.5734 ]
    -[ -66.7371         -63.4743 ]
    -[ -67.7531         -65.5062 ]
    -[ -68.8391         -67.6783 ]
    -[  0.00000          0.00000 ]
    -
    -20 {
    -   arrayload pop
    -  7 ToUnitTestPrecision cvs /RefValueChannelB Set
    -  7 ToUnitTestPrecision cvs /RefValueChannelA Set
    -  
    -  ReceiveDataPacket
    -
    -  arrayload pop
    -  7 ToUnitTestPrecision cvs /RecValueChannelB Set
    -  7 ToUnitTestPrecision cvs /RecValueChannelA Set
    -
    -  { RefValueChannelA RecValueChannelA eq } assert_or_die
    -  { RefValueChannelB RecValueChannelB eq } assert_or_die
    -} repeat
    diff --git a/testsuite/musictests/test_cont_proxy_sender.sli b/testsuite/musictests/test_cont_proxy_sender.sli
    deleted file mode 100644
    index 89efd09dc5..0000000000
    --- a/testsuite/musictests/test_cont_proxy_sender.sli
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -/*
    - *  test_cont_proxy_sender.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_music
    -
    -M_ERROR setverbosity
    -
    -/music_cont_out_proxy Create /mcoproxy Set
    -
    -/iaf_cond_exp Create /n1 Set
    -n1 << /I_e 300. >> SetStatus
    -
    -/iaf_cond_exp Create /n2 Set
    -n2 << /I_e 600. >> SetStatus
    -
    -mcoproxy << /port_name (voltage_out) >> SetStatus
    -mcoproxy << /record_from [/V_m] >> SetStatus
    -mcoproxy << /targets n1 n2 join >> SetStatus
    -
    -20 Simulate
    diff --git a/testsuite/musictests/test_event_proxies.music b/testsuite/musictests/test_event_proxies.music
    deleted file mode 100644
    index 03062c9b56..0000000000
    --- a/testsuite/musictests/test_event_proxies.music
    +++ /dev/null
    @@ -1,13 +0,0 @@
    -
    -stoptime=0.01
    -
    -[from]
    -  binary=nest
    -  np=1
    -  args=test_event_proxies_sender.sli
    -
    -[to]
    -  binary=nest
    -  np=1
    -  args=test_event_proxies_receiver.sli
    -  from.spikes_out -> to.spikes_in [1]
    diff --git a/testsuite/musictests/test_event_proxies.sh b/testsuite/musictests/test_event_proxies.sh
    deleted file mode 100644
    index 279110d45e..0000000000
    --- a/testsuite/musictests/test_event_proxies.sh
    +++ /dev/null
    @@ -1,4 +0,0 @@
    -# Prevent any output, result will be interpreted based on exit code.
    -# Output would confuse parser.
    -diff sender-1-0.dat receiver-1-0.dat 2>&1 > /dev/null
    -
    diff --git a/testsuite/musictests/test_event_proxies_issue-696.music b/testsuite/musictests/test_event_proxies_issue-696.music
    deleted file mode 100644
    index 4a25a521a9..0000000000
    --- a/testsuite/musictests/test_event_proxies_issue-696.music
    +++ /dev/null
    @@ -1,33 +0,0 @@
    -/*
    - *  test_event_proxies_issue-696.music
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -[sender]
    -  binary=nest
    -  np=1
    -  args=test_event_proxies_issue-696_sender.sli
    -
    -[receiver]
    -  binary=nest
    -  np=1
    -  args=test_event_proxies_issue-696_receiver.sli
    -
    -sender.out -> receiver.in [11]
    diff --git a/testsuite/musictests/test_event_proxies_issue-696_receiver.sli b/testsuite/musictests/test_event_proxies_issue-696_receiver.sli
    deleted file mode 100644
    index faa5132c00..0000000000
    --- a/testsuite/musictests/test_event_proxies_issue-696_receiver.sli
    +++ /dev/null
    @@ -1,44 +0,0 @@
    -/*
    - *  test_event_proxies_issue-696_receiver.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -statusdict/have_music :: not { exit_test_gracefully } if
    -
    -M_ERROR setverbosity
    -
    -11 /N_NEURONS Set
    -
    -/iaf_psc_alpha N_NEURONS Create /neurons Set
    -/music_event_in_proxy N_NEURONS Create /inputs Set
    -
    -[N_NEURONS] Range
    -{
    -    /channel Set
    -    inputs [channel] Take /meip Set
    -    meip << /port_name (in) /music_channel channel 1 sub >> SetStatus
    -    meip neurons [channel] Take << >> << /weight 750.0 >> Connect
    -}
    -forall
    -
    -1 Simulate
    diff --git a/testsuite/musictests/test_event_proxies_issue-696_sender.sli b/testsuite/musictests/test_event_proxies_issue-696_sender.sli
    deleted file mode 100644
    index a08b41c76b..0000000000
    --- a/testsuite/musictests/test_event_proxies_issue-696_sender.sli
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  test_event_proxies_issue-696_sender.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -statusdict/have_music :: not { exit_test_gracefully } if
    -
    -M_ERROR setverbosity
    -
    -10 /N_THREADS Set
    -11 /N_NEURONS Set
    -
    -<< /local_num_threads N_THREADS /resolution 0.1 >> SetKernelStatus
    -
    -/spike_generator N_NEURONS Create /generators Set
    -/parrot_neuron N_NEURONS Create /neurons Set
    -
    -[N_NEURONS] Range
    -{
    -    /i Set
    -    generators [i] Take /sg Set
    -    sg << /spike_times [0.1 0.2 0.3] >> SetStatus
    -    sg neurons [i] Take << >> << /delay 0.1 >> Connect
    -}
    -forall
    -
    -/music_event_out_proxy << /port_name (out) >> Create /meop Set
    -
    -[N_NEURONS] Range
    -{
    -    /channel Set
    -    neurons [channel] Take /n Set
    -    n meop << >> << /music_channel channel 1 sub >> Connect
    -}
    -forall
    -
    -1 Simulate
    diff --git a/testsuite/musictests/test_event_proxies_receiver.sli b/testsuite/musictests/test_event_proxies_receiver.sli
    deleted file mode 100644
    index 864840bae5..0000000000
    --- a/testsuite/musictests/test_event_proxies_receiver.sli
    +++ /dev/null
    @@ -1,43 +0,0 @@
    -/*
    - *  test_event_proxies_receiver.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_music
    -
    -M_ERROR setverbosity
    -
    -% create voltmeter first to ensure same GID in sender and receiver
    -/voltmeter Create /vm Set
    -vm << /label (receiver) /record_to /ascii >> SetStatus
    -
    -/music_event_in_proxy Create /meip Set
    -meip << /port_name (spikes_in) /music_channel 0 >> SetStatus
    -
    -/iaf_psc_alpha Create /n Set
    -
    -meip n /one_to_one << /weight 750.0 >> Connect
    -
    -vm n Connect
    -
    -10 Simulate
    diff --git a/testsuite/musictests/test_event_proxies_sender.sli b/testsuite/musictests/test_event_proxies_sender.sli
    deleted file mode 100644
    index 81763b9184..0000000000
    --- a/testsuite/musictests/test_event_proxies_sender.sli
    +++ /dev/null
    @@ -1,52 +0,0 @@
    -/*
    - *  test_event_proxies_sender.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_music
    -
    -M_ERROR setverbosity
    -
    -% create voltmeter first to ensure same GID in sender and receiver
    -/voltmeter Create /vm Set
    -vm << /label (sender) /record_to /ascii >> SetStatus
    -
    -/spike_generator Create /sg Set
    -sg << /spike_times [1.0 1.5 2.0 ]>> SetStatus
    -
    -/iaf_psc_alpha Create /n Set
    -
    -% create last to ensure same GID for neuron as in receiver
    -/parrot_neuron Create /pn Set
    -
    -sg pn Connect
    -pn n /one_to_one << /weight 750.0 >> Connect
    -
    -vm n Connect
    -
    -/music_event_out_proxy Create /meop Set
    -meop << /port_name (spikes_out) >> SetStatus
    -
    -pn meop /one_to_one << /music_channel 0 >> Connect
    -
    -10 Simulate
    diff --git a/testsuite/musictests/test_message.music b/testsuite/musictests/test_message.music
    deleted file mode 100644
    index c83e41b915..0000000000
    --- a/testsuite/musictests/test_message.music
    +++ /dev/null
    @@ -1,38 +0,0 @@
    -/*
    - *  test_message.music
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -stoptime=0.1
    -
    -# Name of the input file needs to be listed here for the testsuite to find it.
    -# input file: test_message0.dat
    -
    -[from]
    -    binary=messagesource
    -    np=1
    -    args=test_message
    -
    -[to]
    -    binary=nest
    -    np=1
    -    args=test_message_receiver.sli
    -
    -from.out -> to.msgdata [0]
    diff --git a/testsuite/musictests/test_message0.dat b/testsuite/musictests/test_message0.dat
    deleted file mode 100644
    index f180e6a25b..0000000000
    --- a/testsuite/musictests/test_message0.dat
    +++ /dev/null
    @@ -1,3 +0,0 @@
    -0.03 First
    -0.07 Second
    -0.09 Third
    diff --git a/testsuite/musictests/test_message_receiver.sli b/testsuite/musictests/test_message_receiver.sli
    deleted file mode 100644
    index 1ea2c95df7..0000000000
    --- a/testsuite/musictests/test_message_receiver.sli
    +++ /dev/null
    @@ -1,47 +0,0 @@
    -/*
    - *  test_message_receiver.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_music
    -
    -M_ERROR setverbosity
    -
    -{
    -    /simtime 100 def
    -
    -    /ref_times [ 30.0 70.0 90.0 ] def
    -    /ref_messages [ (First) (Second) (Third) ] def
    -
    -    /music_message_in_proxy Create /mmip Set
    -    mmip << /port_name (msgdata) >> SetStatus
    -
    -    simtime Simulate
    -
    -    mmip GetStatus 0 get
    -    /data get /data Set
    -
    -    data /messages_times get cva ref_times eq
    -    data /messages get ref_messages eq  and
    -}
    -assert_or_die
    diff --git a/testsuite/musictests/test_music_failure1.music b/testsuite/musictests/test_music_failure1.music
    deleted file mode 100644
    index 7b80ad205b..0000000000
    --- a/testsuite/musictests/test_music_failure1.music
    +++ /dev/null
    @@ -1,5 +0,0 @@
    -[from]
    -  binary=nest
    -  np=1
    -  args=empty.sli
    -  from.spikes_out -> to.spikes_in [1]
    diff --git a/testsuite/musictests/test_music_failure2.music b/testsuite/musictests/test_music_failure2.music
    deleted file mode 100644
    index 836fcb83a6..0000000000
    --- a/testsuite/musictests/test_music_failure2.music
    +++ /dev/null
    @@ -1,11 +0,0 @@
    -[from]
    -  binary=nest
    -  np=1
    -  args=nonexistent.sli
    -
    -[to]
    -  binary=nest
    -  np=1
    -  args=nonexistent.sli
    -  from.spikes_out -> to.spikes_in [1]
    -
    diff --git a/testsuite/musictests/test_rate_proxy.music b/testsuite/musictests/test_rate_proxy.music
    deleted file mode 100644
    index e456d01d05..0000000000
    --- a/testsuite/musictests/test_rate_proxy.music
    +++ /dev/null
    @@ -1,35 +0,0 @@
    -/*
    - *  test_rate_proxy.music
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -stoptime=5.0
    -
    -[from]
    -    binary=nest
    -    np=1
    -    args=test_rate_proxy_sender.sli
    -
    -[to]
    -    binary=nest
    -    np=1
    -    args=test_rate_proxy_receiver.sli
    -
    -from.rate_out -> to.rate_in [1]
    diff --git a/testsuite/musictests/test_rate_proxy_receiver.sli b/testsuite/musictests/test_rate_proxy_receiver.sli
    deleted file mode 100644
    index 327beae99b..0000000000
    --- a/testsuite/musictests/test_rate_proxy_receiver.sli
    +++ /dev/null
    @@ -1,52 +0,0 @@
    -/*
    - *  test_rate_proxy_receiver.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_music
    -
    -M_ERROR setverbosity
    -
    -{
    -    /simtime 500 def
    -    /mm_starttime 400. def  % To let receiving neuron reach equilibrium
    -
    -    /music_rate_in_proxy Create /mrip Set
    -    /lin_rate_ipn Create /neuron Set
    -    /multimeter Create /mm Set
    -
    -    mrip << /port_name (rate_in) /music_channel 0 >> SetStatus
    -    neuron << /sigma 0.0 >> SetStatus
    -    mm << /interval 0.1 /record_from [ /rate ] /start mm_starttime >> SetStatus
    -
    -    mrip neuron /one_to_one << /synapse_model /rate_connection_instantaneous >> Connect
    -    mm neuron Connect
    -
    -    simtime Simulate
    -
    -    mm GetStatus 0 get /events get /rate get /rates Set
    -
    -    % Test that all rates are equal to the drive rate, 1.5, in the sender
    -    rates Max rates Min eq
    -    rates Max 1.5 eq and
    -} assert_or_die
    diff --git a/testsuite/musictests/test_rate_proxy_sender.sli b/testsuite/musictests/test_rate_proxy_sender.sli
    deleted file mode 100644
    index fb7bcf4590..0000000000
    --- a/testsuite/musictests/test_rate_proxy_sender.sli
    +++ /dev/null
    @@ -1,44 +0,0 @@
    -/*
    - *  test_rate_proxy_sender.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_music
    -
    -M_ERROR setverbosity
    -
    -<< /overwrite_files true >> SetKernelStatus
    -
    -/drive 1.5 def
    -/simtime 500 def
    -
    -/lin_rate_ipn Create /rate_neuron Set
    -/music_rate_out_proxy Create /mrop Set
    -
    -rate_neuron << /rate drive /mu drive /sigma 0. >> SetStatus
    -mrop << /port_name (rate_out) >> SetStatus
    -
    -rate_neuron mrop /one_to_one << /synapse_model /rate_connection_instantaneous
    -                                /music_channel 0
    -                             >> Connect
    -simtime Simulate
    diff --git a/testsuite/nest_indirect b/testsuite/nest_indirect
    deleted file mode 100755
    index 1293974f0c..0000000000
    --- a/testsuite/nest_indirect
    +++ /dev/null
    @@ -1,21 +0,0 @@
    -#! /bin/sh
    -
    -if [ $# -ne 1 ]; then
    -  echo "Usage: nest_indirect <script>"
    -  exit 1
    -fi
    -
    -abspath="$(cd "${0%/*}" 2>/dev/null; echo "${PWD}/${0##*/}")"
    -path="$(dirname "${abspath}")"
    -
    -binary="$("${path}/sli" -c "($1) nest_indirect =")"
    -exitcode=$?
    -
    -if [ $exitcode -ne 0 ]; then
    -  echo "$binary"
    -  exit $exitcode
    -fi
    -
    -echo "Running $binary"
    -sh -c "$binary"
    -exit $?
    diff --git a/testsuite/nest_serial b/testsuite/nest_serial
    deleted file mode 100755
    index 9494241b8e..0000000000
    --- a/testsuite/nest_serial
    +++ /dev/null
    @@ -1,21 +0,0 @@
    -#! /bin/sh
    -
    -if [ $# -ne 1 ]; then
    -  echo "Usage: nest_serial <script>"
    -  exit 1
    -fi
    -
    -abspath="$(cd "${0%/*}" 2>/dev/null; echo "${PWD}/${0##*/}")"
    -path="$(dirname "${abspath}")"
    -
    -binary="$("${path}/sli" -c "($1) nest_serial =")"
    -exitcode=$?
    -
    -if [ $exitcode -ne 0 ]; then
    -  echo "$binary"
    -  exit $exitcode
    -fi
    -
    -echo "Running $binary"
    -sh -c "$binary"
    -exit $?
    diff --git a/testsuite/regressiontests/issue-105.sli b/testsuite/regressiontests/issue-105.sli
    deleted file mode 100644
    index 40e2734047..0000000000
    --- a/testsuite/regressiontests/issue-105.sli
    +++ /dev/null
    @@ -1,194 +0,0 @@
    -/*
    - *  issue-105.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-105 Ensure that min_delay and max_delay are set correctly
    -
    -Synopsis: (issue-105) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that NEST sets min_delay and max_delay correctly also for 
    -delays that are not multiples of the resolution.
    -
    -Author: Hans E Plesser, 2015-12-01 based on material by Jafet Diaz
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Test min_delay on fresh connection
    -{
    -  ResetKernel
    -  
    -  << /resolution 0.1 >> SetKernelStatus
    -  
    -  /n /iaf_psc_alpha Create def
    -  
    -  [  0.81 0.82 0.8499 ]
    -  {
    -    /delay Set
    -    n dup /one_to_one << /delay delay >> Connect
    -  } forall
    -  
    -  << >> GetConnections { /delay get } Map
    -  
    -  % should all be 0.8
    -  dup true exch { 0.8 eq and } Fold
    -  exch
    -  0 get 
    -  GetKernelStatus /min_delay get 
    -  eq 
    -  and
    -} assert_or_die
    -
    -% Test min_delay on SetStatus
    -{
    -  ResetKernel
    -  
    -  << /resolution 0.1 >> SetKernelStatus
    -  
    -  /n /iaf_psc_alpha Create def
    -  
    -  /delays [ 0.81 0.82 0.8499 ] def
    -  
    -  delays
    -  {
    -    ;
    -    n dup Connect
    -  } forall
    -
    -  [ << >> GetConnections delays ]
    -  { /d Set << /delay d >> SetStatus }
    -  ScanThread
    -  
    -  << >> GetConnections { GetStatus /delay get } Map
    -  
    -  % should all be 0.8 
    -  dup true exch { 0.8 eq and } Fold
    -  exch
    -  0 get 
    -  GetKernelStatus /min_delay get 
    -  eq 
    -  and
    -} assert_or_die
    -
    -% Test max_delay on fresh connection
    -{
    -  ResetKernel
    -  
    -  << /resolution 0.1 >> SetKernelStatus
    -  
    -  /n /iaf_psc_alpha Create def
    -  
    -  [ 0.85 0.86 0.8999 ]
    -  {
    -    /delay Set
    -    n dup /one_to_one << /delay delay >> Connect
    -  } forall
    -  
    -  << >> GetConnections { /delay get } Map
    -  
    -  % should all be 0.9
    -  dup true exch { 0.9 eq and } Fold
    -  exch
    -  0 get 
    -  GetKernelStatus /max_delay get 
    -  eq 
    -  and
    -} assert_or_die
    -
    -% Test max_delay on SetStatus
    -{
    -  ResetKernel
    -  
    -  << /resolution 0.1 >> SetKernelStatus
    -  
    -  /n /iaf_psc_alpha Create def
    -  
    -  % test delays must be longer than 1.0, since we
    -  % first create default connections with delay 1
    -  /delays [ 1.95 1.96 1.9999 ] def
    -  
    -  delays
    -  {
    -    ;
    -    n dup Connect
    -  } forall
    -
    -  [ << >> GetConnections delays ]
    -  { /d Set << /delay d >> SetStatus }
    -  ScanThread
    -  
    -  << >> GetConnections { GetStatus /delay get } Map
    -
    -  % should all be 2.0
    -  dup true exch { 2.0 eq and } Fold
    -  exch
    -  0 get 
    -  GetKernelStatus /max_delay get 
    -  eq 
    -  and
    -} assert_or_die
    -
    -% Test that setting min_delay and max_delay works so that setting certain
    -% min/max values will allow those values to be used in subsequent connections.
    -% Note that effects can only be seen in the kernel status after a connection
    -% has been created.
    -
    -{
    -  ResetKernel
    -  
    -  /min_delay 0.81 def  % rounded to 0.8
    -  /max_delay 1.49 def  % rounded to 1.5
    -
    -  << /min_delay min_delay /max_delay max_delay >> SetKernelStatus
    -  
    -  /n /iaf_psc_alpha Create def
    -  
    -  n dup /one_to_one << /delay min_delay >> Connect
    -  n dup /one_to_one << /delay max_delay >> Connect
    -  
    -  GetKernelStatus /min_delay get 0.8 eq
    -  GetKernelStatus /max_delay get 1.5 eq
    -  and
    -} assert_or_die
    -
    -{
    -  ResetKernel
    -  
    -  /min_delay 0.89 def  % rounded to 0.8
    -  /max_delay 1.41 def  % rounded to 1.5
    -  
    -  << /min_delay min_delay /max_delay max_delay >> SetKernelStatus
    -  
    -  /n /iaf_psc_alpha Create def
    -  
    -  n dup /one_to_one << /delay min_delay >> Connect
    -  n dup /one_to_one << /delay max_delay >> Connect
    -  
    -  GetKernelStatus /min_delay get 0.8 eq
    -  GetKernelStatus /max_delay get 1.5 eq
    -  and
    -} assert_or_die
    diff --git a/testsuite/regressiontests/issue-1085.sli b/testsuite/regressiontests/issue-1085.sli
    deleted file mode 100644
    index 565992ec92..0000000000
    --- a/testsuite/regressiontests/issue-1085.sli
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/*
    - *  issue-1085.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-1085
    -
    -Synopsis: (issue-1085) run -> NEST exits if test fails
    -
    -Description:
    -This test checks that GetConnection filter by synapse label.
    -
    -Author: Stine Brekke Vennemo
    -FirstVersion: December 2018
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -
    -  /nodes /iaf_psc_alpha 5 Create def
    -  
    -  nodes nodes << /rule /all_to_all >>
    -              << /synapse_model /static_synapse_lbl /synapse_label 123 >> Connect
    -  nodes nodes << /rule /all_to_all >>
    -              << /synapse_model /static_synapse_lbl /synapse_label 456 >> Connect
    -  
    -  << /source nodes /synapse_label 123 >> GetConnections length_a 25 eq
    -}
    -assert_or_die
    -
    -{
    -  ResetKernel
    -
    -  /nodes /iaf_psc_alpha 5 Create def
    -  
    -  nodes nodes << /rule /all_to_all >>
    -              << /synapse_model /static_synapse_lbl /synapse_label 123 >> Connect
    -  nodes nodes << /rule /all_to_all >>
    -              << /synapse_model /static_synapse_lbl /synapse_label 456 >> Connect
    -  
    -  << /source nodes /target nodes /synapse_label 123 >> GetConnections length_a 25 eq
    -}
    -assert_or_die
    -
    -{
    -  ResetKernel
    -
    -  /nodes /iaf_psc_alpha 5 Create def
    -  
    -  nodes nodes << /rule /all_to_all >>
    -              << /synapse_model /static_synapse_lbl /synapse_label 123 >> Connect
    -  nodes nodes << /rule /all_to_all >>
    -              << /synapse_model /static_synapse_lbl /synapse_label 456 >> Connect
    -  
    -  << /target nodes /synapse_label 123 >> GetConnections length_a 25 eq
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-1100.sli b/testsuite/regressiontests/issue-1100.sli
    deleted file mode 100644
    index e9aa0bb79a..0000000000
    --- a/testsuite/regressiontests/issue-1100.sli
    +++ /dev/null
    @@ -1,60 +0,0 @@
    -/*
    - *  issue-1100.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-1100
    -
    -Synopsis: (issue-1100) run -> NEST exits if test fails
    -
    -Description:
    -Creates a parrot neuron, which receives one spike with multiplicity two from a
    -spike generator. The parrot neuron should then emit a spike with multiplicity
    -two, which should be counted as two spikes by the local spike counter.
    -
    -Author: Stine Brekke Vennemo
    -FirstVersion: January 2019
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  /parrot /parrot_neuron 1 Create def
    -
    -  /sg /spike_generator << /spike_times [ 1.0 ]
    -                          /spike_multiplicities [ 2 ] >> Create def
    -  /sr /spike_recorder Create def
    -
    -  sg parrot Connect
    -
    -  parrot sr Connect
    -
    -  10.0 Simulate
    -
    -  GetKernelStatus /local_spike_counter get
    -  2 eq
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-1140.sli b/testsuite/regressiontests/issue-1140.sli
    deleted file mode 100644
    index 92e354431c..0000000000
    --- a/testsuite/regressiontests/issue-1140.sli
    +++ /dev/null
    @@ -1,82 +0,0 @@
    -/*
    - *  issue-1140.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-1140
    -
    -Synopsis: (issue-1140) run -> NEST exits if test fails
    -
    -Description:
    -Tests if parameters for inhomogeneous_poisson_generator can be set with empty
    -arrays for rate_times and rate_values.
    -
    -Author: Håkon Mørk
    -FirstVersion: March 2019
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Check if we can set parameters with empty arrays for rate_times
    -% and rate_values without causing a segfault.
    -{
    -  ResetKernel
    -
    -  /params
    -  <<
    -    /rate_times []
    -    /rate_values []
    -  >> def
    -  /ipg /inhomogeneous_poisson_generator Create def
    -  ipg params SetStatus
    -}
    -pass_or_die
    -
    -% Check if parameters on creation are set properly when set implicitly
    -% with Create. Create temporarily changes default values, then resets
    -% them, which would trigger the issue.
    -{
    -  ResetKernel
    -
    -  /params
    -  <<
    -    /rate_times [ 10.0 110.0 210.0 ]
    -    /rate_values [ 400.0 1000.0 200.0 ]
    -  >> def
    -  /ipg /inhomogeneous_poisson_generator params Create def
    -  /status ipg GetStatus 0 get def
    -
    -  true
    -  [ /rate_times /rate_values ]
    -  {
    -    /element Set
    -    status element get
    -    params element get cv_dv
    -    eq
    -  } Fold
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-1212.sli b/testsuite/regressiontests/issue-1212.sli
    deleted file mode 100644
    index 0c44fd7917..0000000000
    --- a/testsuite/regressiontests/issue-1212.sli
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -/*
    - *  issue-1212.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-1212
    -
    -Synopsis: (issue-1212) run -> NEST exits if test fails
    -
    -Description:
    -This test makes sure that using a weight recorder with a probabilistic
    -synapse that drops a spike doesn't result in a segfault.
    -
    -Author: Håkon Mørk
    -FirstVersion: January 2020
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  /sg /spike_generator << /spike_times [ 10. ] >> Create def
    -  /source_parrot /parrot_neuron Create def
    -  /target_parrot /parrot_neuron Create def
    -  /wr /weight_recorder Create def
    -
    -  /bernoulli_synapse /bernoulli_synapse_wr << /weight_recorder wr >> CopyModel
    -
    -  sg source_parrot Connect
    -
    -  source_parrot target_parrot
    -  << /rule /one_to_one >>
    -  << /synapse_model /bernoulli_synapse_wr
    -     /p_transmit 0.0
    -     /weight 1.0 >>
    -  Connect
    -
    -  20. Simulate
    -}
    -pass_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-1242.sli b/testsuite/regressiontests/issue-1242.sli
    deleted file mode 100644
    index 1ecf38c700..0000000000
    --- a/testsuite/regressiontests/issue-1242.sli
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -/*
    - *  issue-1242.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-1242
    -
    -Synopsis: (issue-1242) run -> NEST exits if test fails
    -
    -Description:
    -Tests that a connection from a node without proxies to
    -a node without proxies that has global targets throws an error
    -(instead of failing silently or resulting in inconsistent results).
    -
    -Author: Jan Hahne
    -FirstVersion: July 2019
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Check if such a connection results in an exception
    -{
    -  ResetKernel
    -
    -  /spike_generator Create /sg Set
    -  /volume_transmitter Create /vt Set
    -  sg vt Connect
    -}
    -fail_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-1305.sli b/testsuite/regressiontests/issue-1305.sli
    deleted file mode 100644
    index 48977335b1..0000000000
    --- a/testsuite/regressiontests/issue-1305.sli
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -/*
    - *  issue-1305.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-1305 Ensure that small simulation timesteps can be set without errors.
    -
    -Synopsis: (issue-1305) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that NEST can set small resolutions and deals with rounding errors correctly.
    -
    -Author: Philipp Weidel, 2019-12-06 based on material by Hans E Plesser, Jafet Diaz
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Test setting valid resolution 
    -{
    -  /target_resolution 0.102 def
    -
    -  ResetKernel
    -  << /resolution target_resolution /tics_per_ms 1000.0 >> SetKernelStatus
    -  GetKernelStatus /resolution get
    -  target_resolution
    -  sub abs
    -  1e-15 leq
    -} assert_or_die
    -
    -% Test setting invalid resolution 
    -{
    -  /target_resolution 0.1002 def
    -
    -  ResetKernel
    -  0 << /resolution target_resolution /tics_per_ms 1000.0 >> SetStatus
    -  0 /resolution get
    -  target_resolution
    -  sub abs
    -  1e-15 leq
    -} fail_or_die
    -
    diff --git a/testsuite/regressiontests/issue-1366.sli b/testsuite/regressiontests/issue-1366.sli
    deleted file mode 100644
    index 475f0d4fab..0000000000
    --- a/testsuite/regressiontests/issue-1366.sli
    +++ /dev/null
    @@ -1,60 +0,0 @@
    -/*
    - *  issue-1366.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-1366
    -
    -Synopsis: (issue-1366) run -> NEST exits if test fails
    -
    -Description:
    -This tests checks that we are able to connect with fixed_total_number equal to 1
    -when we have more than 1 virtual process and more than 1 node per process.
    -
    -Author: Stine Brekke Vennemo
    -FirstVersion: December 2019
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -% Check if we are able to connect with fixed_total_number equal to 1
    -{
    -  ResetKernel
    -
    -  << 
    -    /total_num_virtual_procs 4
    -  >> SetKernelStatus
    -
    -  /nodes /iaf_psc_alpha 4 Create def
    -
    -  nodes nodes << /rule /fixed_total_number /N 1 >> Connect
    -
    -  GetKernelStatus /num_connections get 1 eq
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-1610.sli b/testsuite/regressiontests/issue-1610.sli
    deleted file mode 100644
    index 21b63f3605..0000000000
    --- a/testsuite/regressiontests/issue-1610.sli
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -/*
    - *  issue-1610.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-1610
    -
    -Synopsis: (issue-1610) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that comparing primitive and composite NodeCollections does not lead to
    -a segmentation fault and gives the correct result.
    -
    -Author: Håkon Mørk
    -FirstVersion: June 2020
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -
    -  /prim_nc /iaf_psc_alpha 10 Create def
    -  /comp_nc /iaf_psc_exp 5 Create /iaf_psc_alpha 5 Create join def
    -
    -  prim_nc comp_nc eq not
    -  comp_nc prim_nc eq not and
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-1640.sli b/testsuite/regressiontests/issue-1640.sli
    deleted file mode 100644
    index 1c23c08df6..0000000000
    --- a/testsuite/regressiontests/issue-1640.sli
    +++ /dev/null
    @@ -1,91 +0,0 @@
    -/*
    - *  issue-1640.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-1640
    -
    -Synopsis: (issue-1640) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that GetConnections does not return erroneous connections
    -when devices are connected as both source and target while using multiple threads.
    -
    -Author: Håkon Mørk
    -FirstVersion: August 2020
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  /all_conns_correct true def
    -  [2 4 1] Range
    -  {
    -    /num_threads Set
    -    [1 10 1] Range
    -    {
    -      /num_neurons Set
    -      /expected_num_conns num_neurons def
    -
    -      ResetKernel
    -      << /local_num_threads num_threads >> SetKernelStatus
    -
    -      /neurons /iaf_psc_alpha num_neurons Create def
    -
    -      % A poisson_generator is connected as source
    -      /pg /poisson_generator Create def
    -      pg neurons Connect
    -
    -      % An additional device is connected as target
    -      /sr /spike_recorder Create def
    -      neurons sr Connect
    -
    -      % We only want the connections where the poisson_generator is source
    -      /conns << /source pg >> GetConnections def
    -
    -      % Check that the poisson_generator is the source for all connections
    -      /pg_id pg GetStatus 0 get /global_id get def
    -      /conn_source_correct true conns {GetStatus /source get pg_id eq and} Fold def
    -
    -      % Check that number of connections is correct
    -      /conn_length_correct conns length expected_num_conns eq def
    -
    -      /conns_correct conn_source_correct conn_length_correct and def
    -      conns_correct all_conns_correct and /all_conns_correct Set
    -
    -      % Helpful information in case of failure
    -      conns_correct not
    -      {
    -        num_threads cvs ( threads: ) join conns length cvs join
    -        ( conns, expected ) join expected_num_conns cvs join =
    -      } if
    -    } forall
    -  } forall
    -
    -  all_conns_correct
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-2052.sli b/testsuite/regressiontests/issue-2052.sli
    deleted file mode 100644
    index a704d5cddb..0000000000
    --- a/testsuite/regressiontests/issue-2052.sli
    +++ /dev/null
    @@ -1,59 +0,0 @@
    -/*
    - *  issue-2052.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-2052
    -
    -Synopsis: (issue-2052) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that spike_dilutor can be created with a single thread, but not with multiple threads.
    -
    -Author: Hans Ekkehard Plesser
    -FirstVersion: July 2021
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -  << /local_num_threads 1 >> SetKernelStatus
    -  /spike_dilutor Create ;
    -  10 Simulate
    -}
    -pass_or_die
    -
    -{
    -  ResetKernel
    -  << /local_num_threads 2 >> SetKernelStatus
    -  /spike_dilutor Create ;
    -  10 Simulate
    -}
    -fail_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-211.sli b/testsuite/regressiontests/issue-211.sli
    deleted file mode 100644
    index 94f2b3228d..0000000000
    --- a/testsuite/regressiontests/issue-211.sli
    +++ /dev/null
    @@ -1,98 +0,0 @@
    -/*
    - *  issue-211.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_threaded_neuron_device_connections - test for correct creation of neuron-neuron, neuron-device, device-neuron and device-device connections using multiple threads
    -
    -Synopsis: (test_threaded_neuron_device_connections) run -> dies if assertion fails
    -
    -Description:
    -this script creates connections between neurons and devices and checks whether the actually created connections coincide with the expected connections
    -
    -Author: Jakob Jordan
    -FirstVersion: January 2016
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -ResetKernel
    -<< /total_num_virtual_procs 2 >> SetKernelStatus
    -
    -% create nodes
    -/n1 /iaf_psc_delta Create def
    -/n2 /iaf_psc_delta Create def
    -/n3 /iaf_psc_delta Create def
    -/r4 /spike_recorder Create def
    -/g5 /spike_generator Create def
    -/v6 /volume_transmitter Create def
    -/stdp_dopamine_synapse << /vt v6 0 get >> SetDefaults
    -
    -% neuron-neuron
    -n1 n3 Connect
    -n2 n3 Connect
    -n2 n1 Connect
    -n3 n1 Connect
    -n2 n1 << >> << /weight 1. >> Connect
    -
    -% neuron-device
    -n1 r4 Connect
    -n1 n3 Connect
    -n2 r4 Connect
    -n3 r4 Connect
    -n2 r4 << >> << /weight 1. >> Connect
    -
    -% device-neuron
    -g5 n2 Connect
    -g5 n3 Connect
    -g5 n1 Connect
    -g5 n1 Connect
    -g5 n3 << >> << /weight 1. >> Connect
    -
    -% device-device
    -g5 r4 Connect
    -g5 r4 Connect
    -g5 r4 Connect
    -g5 r4 << >> << /weight 1. >> Connect
    -
    -% neuron-globally receiving device (volume transmitter)
    -n1 v6 Connect
    -n2 v6 Connect
    -
    -/conn << >> GetConnections def
    -% expected connections with expected threads
    -/target_conn <[1 3 1] [2 3 1] [2 1 1] [3 1 1] [2 1 1] % neuron-neuron
    -              [1 4 1] [1 3 1] [2 4 0] [3 4 1] [2 4 0] % neuron-device
    -              [5 2 0] [5 3 1] [5 1 1] [5 1 1] [5 3 1] % device-neuron
    -              [5 4 0] [5 4 0] [5 4 0] [5 4 0]         % device-device
    -              [1 6 0] [1 6 1] [2 6 0] [2 6 1]> def    % neuron-globally receiving device
    -
    -conn {
    -  target_conn exch cva [[1 2 3]] Part MemberQ assert
    -} forall
    -conn length_a target_conn length_a eq assert
    diff --git a/testsuite/regressiontests/issue-2282.sli b/testsuite/regressiontests/issue-2282.sli
    deleted file mode 100644
    index 05ffa54f8e..0000000000
    --- a/testsuite/regressiontests/issue-2282.sli
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    - *  issue-2282.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-2282 Ensure multimeter-recording from noise_generator is prohibited if multithreaded
    -
    -Synopsis: (issue-2282) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that the multimeter cannot be connected to a noise_generator if
    -NEST runs with multiple threads.
    -
    -Author: Hans Ekkehard Plesser
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -/test_sim
    -{
    -  /N 3 def
    -  /neurons /iaf_psc_alpha N Create def
    -  /noise /noise_generator N << /mean 1000.0 /std 1.0 /dt 0.1 >> Create def
    -  /mm /multimeter << /record_from [ /I ] /interval 0.1 >> Create def
    -  
    -  noise neurons /one_to_one << /delay 0.1 >> Connect
    -  mm noise Connect
    -  
    -  2.0 Simulate
    -}
    -def
    -
    -% Test all works in single-threaded mode (should get only non-zero values)
    -{
    -  << /local_num_threads 1 >> SetKernelStatus
    -  test_sim
    -  mm GetStatus 0 get /events get /I get
    -  true exch { 0 gt and } Fold
    -} 
    -assert_or_die
    -
    -% Test that an error is emitted in multi-threaded mode
    -{
    -  << /local_num_threads 2 >> SetKernelStatus
    -  test_sim
    -}
    -fail_or_die
    diff --git a/testsuite/regressiontests/issue-264.sli b/testsuite/regressiontests/issue-264.sli
    deleted file mode 100644
    index 15f9036ab9..0000000000
    --- a/testsuite/regressiontests/issue-264.sli
    +++ /dev/null
    @@ -1,93 +0,0 @@
    -/*
    - *  issue-264.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-264 Ensure error is raised on times incommensurate with resolution
    -
    -Synopsis: (issue-264) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that NEST raises an error if the requested simulation
    -time is not a multiple of the resolution, or if one attempts to set
    -start/stop/origin for devices that are not multiples of the resolution.
    -
    -Author: Hans E Plesser, 2016-03-08
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -% Note: To ensure that the resolution 1.0 and test value 1.5 can be
    -%       represented exactly in tics, we set tics_per_ms below to the
    -%       usual default. This handles the unusual case where NEST is
    -%       compiled with a different value. 
    -
    -% Check incommensurate simulation time
    -{
    -  ResetKernel
    -  << /resolution 1.0 /tics_per_ms 1000 >> SetKernelStatus
    -  1.5 Simulate
    -} fail_or_die
    -
    -% Check start, stop, origin on defaults
    -[ /start /stop /origin ]
    -{
    -  /item Set
    -  
    -  % stimulation device
    -  {
    -    ResetKernel
    -    << /resolution 1.0 /tics_per_ms 1000 >> SetKernelStatus
    -    /spike_generator << item 1.5 >> SetDefaults
    -  } fail_or_die
    -    
    -  % recording device
    -  {
    -    ResetKernel
    -    << /resolution 1.0 /tics_per_ms 1000 >> SetKernelStatus
    -    /spike_recorder << item 1.5 >> SetDefaults
    -  } fail_or_die
    -} forall
    -
    -% Check start, stop, origin on device
    -[ /start /stop /origin ]
    -{
    -  /item Set
    -  
    -  % stimulation device
    -  {
    -    ResetKernel
    -    << /resolution 1.0 /tics_per_ms 1000 >> SetKernelStatus
    -    /spike_generator Create << item 1.5 >> SetStatus
    -  } fail_or_die
    -    
    -  % recording device
    -  {
    -    ResetKernel
    -    << /resolution 1.0 /tics_per_ms 1000 >> SetKernelStatus
    -    /spike_recorder Create << item 1.5 >> SetStatus
    -  } fail_or_die
    -} forall
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/issue-311.sli b/testsuite/regressiontests/issue-311.sli
    deleted file mode 100644
    index 803b85f40b..0000000000
    --- a/testsuite/regressiontests/issue-311.sli
    +++ /dev/null
    @@ -1,76 +0,0 @@
    -/*
    - *  issue-311.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-311 Ensure NEST behaves well after exception during update
    -
    -Synopsis: (issue-311) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that NEST behaves properly when a model triggers and
    -exception during update.
    -
    -Author: Hans Ekkehard Plesser, 2016-11-02
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -GetKernelStatus /node_models get /aeif_cond_alpha MemberQ not
    -{ /skipped exit_test_gracefully } if
    -
    -% Execute in stopped context so exception does not propagate out
    -% pathological parameters to trigger numerical exception
    -/nrn /aeif_cond_alpha << /I_e 10000000. /g_L 0.01 >> Create def
    -{ 
    -  {
    -    100 Simulate
    -  } 
    -  stopped
    -} assert_or_die  % stopped must return true, otherwise no exception was triggered
    -
    -% clean up after error
    -errordict begin /newerror false def end
    -clear
    -
    -% Test 1: We can still inspect the kernel after an exception
    -{  
    -  % this calls get_time() and triggers assertion prior to fix for #311
    -  GetKernelStatus ;
    -} pass_or_die
    -
    -% Test 2: We cannot continue simulation after an exception
    -{
    -  % set neuron parameters to values that should stabilize numerics
    -  nrn << /V_m -70.0 /w 0.0 /I_e 0.0 >> SetStatus
    -  0.1 Simulate
    -} fail_or_die
    -
    -% Test 3: We can simulate again after a ResetKernel
    -ResetKernel
    -{
    -  /aeif_cond_alpha << /I_e 1000. >> Create ;
    -  100 Simulate
    -} pass_or_die
    diff --git a/testsuite/regressiontests/issue-327.sli b/testsuite/regressiontests/issue-327.sli
    deleted file mode 100644
    index b90866a7cb..0000000000
    --- a/testsuite/regressiontests/issue-327.sli
    +++ /dev/null
    @@ -1,85 +0,0 @@
    -/*
    - *  issue-327.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-327 Ensure that spike_generator handles large precise times
    -
    -Synopsis: (issue-327) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that NEST handles round-off correctly also for large,
    -precise spike times.
    -
    -Author: Hans E Plesser, 2016-05-03
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -
    -  /sg
    -  /spike_generator 
    -    << 
    -       % PyNN uses precise spike times
    -       /precise_times true
    -       
    -       % PyNN adjusts for use of parrot_neuron by subtracting
    -       % min_delay. Only this computation provokes the error.
    -       /spike_times [ 353538.4 0.1 sub ] 
    -    >>
    -  Create
    -  def
    -  
    -  /pn /parrot_neuron_ps Create def
    -  
    -  /sr /spike_recorder 
    -    <<
    -       /time_in_steps true
    -    >>
    -  Create
    -  def
    -  
    -  sg pn Connect
    -  pn sr Connect
    -  
    -  360000 Simulate
    -  
    -  sr /events get
    -  dup /times get /steps Set
    -  /offsets get /offs Set
    -  
    -  % check correct step, account for delay 1 ms
    -  steps 0 get dup == 3535393 eq
    -  
    -  % check for correct offset, precision limited by
    -  % spike time * eps
    -  offs 0 get dup == abs 1e9 mul 1. lt
    -  and
    -} assert_or_die
    -  
    -  
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/issue-351.sli b/testsuite/regressiontests/issue-351.sli
    deleted file mode 100644
    index 671c73af95..0000000000
    --- a/testsuite/regressiontests/issue-351.sli
    +++ /dev/null
    @@ -1,82 +0,0 @@
    -/*
    - *  issue-351.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-351 Ensure Connect raises exception if connecting to device with unusable rule
    -
    -Synopsis: (issue-351) run -> NEST exits if test fails
    -
    -Description:
    -This test makes sure that connections to devices without proxies are
    -prohibited for probabilistic connection rules.
    -
    -Author: Hans Ekkehard Plesser, 2016-11-22
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/prob_rules 
    -[
    -   << /rule /fixed_indegree /indegree 1 >>
    -   << /rule /fixed_outdegree /outdegree 1 >>
    -   << /rule /fixed_total_number /N 1 >>
    -   << /rule /pairwise_bernoulli /p 1.0 >>
    -] def
    -              
    -/skip_list [ /multimeter /voltmeter % inverse order 
    -             /weight_recorder    % attaches to synapses 
    -             /correlation_detector % has proxies
    -             /correlomatrix_detector % has proxies
    -             /spin_detector      % binary recorders
    -             /correlospinmatrix_detector
    -           ] def          
    -              
    -GetKernelStatus /node_models get
    -{
    -  /model Set
    -  model GetDefaults /element_type get /recorder eq
    -  skip_list model MemberQ not and
    -  {
    -    prob_rules 
    -    {
    -      /ruledict Set
    -      (Testing ) =only model =only ( ) =only ruledict/rule :: =
    -      { 
    -        ResetKernel
    -        1 /iaf_psc_alpha Create
    -        2 model Create
    -        ruledict Connect
    -      }
    -      fail_or_die
    -      clear
    -    }
    -    forall
    -  }
    -  if
    -} 
    -forall
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-368.sli b/testsuite/regressiontests/issue-368.sli
    deleted file mode 100644
    index 65ddeadecc..0000000000
    --- a/testsuite/regressiontests/issue-368.sli
    +++ /dev/null
    @@ -1,161 +0,0 @@
    -/*
    - *  issue-368.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-368
    -
    -Synopsis: (issue-368) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that models with precise timing handle input spikes
    -arriving at exactly the same times correctly.
    -
    -Author: Hans Ekkehard Plesser
    -FirstVersion: August 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Test 1: Linear summation of input, all models
    -%
    -% n1 receives single spike with weight 2 * w1
    -% n2 receives two spikes at same time with weight w1 each
    -% Both must have same V_m after simulation
    -%
    -% n3 receives single spike with weight w1 + w2
    -% n4 receives one spike with weight w1, one at same time with weight w2
    -% Both must have same V_m after simulation
    -
    -[ /iaf_psc_alpha_ps
    -  /iaf_psc_delta_ps /iaf_psc_exp_ps
    -]
    -{
    -  ResetKernel
    -  
    -  /model Set
    -  model ==
    -
    -  ResetKernel
    -  << /tics_per_ms 1024. /resolution 0.25 >> SetKernelStatus
    -
    -  % simpler to do it always than to protect by if-else
    -  /iaf_psc_exp_ps << /tau_syn_ex 2.0 /tau_syn_in 2.0 >> SetDefaults
    -
    -  /t_spike1 2.375 def % 2.5 - 0.125 offset
    -  /w1   5. def   % sufficiently small to avoid psc_delta spikes
    -  /w2 -10. def
    -  
    -  /sg /spike_generator << /precise_times true 
    -          /spike_times [ t_spike1 ] >> Create def
    -  /n1 model Create def
    -  /n2 model Create def  
    -  /n3 model Create def
    -  /n4 model Create def
    -
    -  % single connection, double weight  
    -  sg n1 /one_to_one << /weight w1 2 mul >> Connect
    -
    -  % two connections, single weight
    -  sg n2 /one_to_one << /weight w1       >> Connect
    -  sg n2 /one_to_one << /weight w1       >> Connect
    -
    -  % single connection, combined weight
    -  sg n3 /one_to_one << /weight w1 w2 add >> Connect
    -  
    -  % two connections, different weigths
    -  sg n4 /one_to_one << /weight w1        >> Connect
    -  sg n4 /one_to_one << /weight w2        >> Connect
    -
    -  4 Simulate
    -  n1 /V_m get n2 /V_m get sub 
    -  abs 1e-15 lt 
    -  n3 /V_m get n4 /V_m get sub
    -  abs 1e-15 lt
    -  and
    -  assert_or_die
    -} forall
    -
    -
    -% Test 2: Linear summation, models with two time constants
    -%
    -% n1 receives one excitatory spike
    -% n2 receives one inhibitory spike at the same time
    -% n3 receives both spikes
    -%
    -% Let V0 == E_L be the membrane potential at t0 (same for all)
    -% Let V1, V2, V3 be the potentials of n1, n2, n3 after simulation
    -% 
    -% Then we expect due to linearity
    -% ( V1 - V0 ) + ( V2 - V0 ) == V3 - V0 
    -
    -[ /iaf_psc_exp_ps
    -]
    -{
    -  ResetKernel
    -  
    -  /model Set
    -  model ==
    -
    -  ResetKernel
    -  << /tics_per_ms 1024. /resolution 0.25 >> SetKernelStatus
    -
    -  model << /tau_syn_ex 5.0 /tau_syn_in 1.0 >> SetDefaults
    -
    -  /t_spike1 2.375 def % 2.5 - 0.125 offset
    -  /w1 1000. def
    -  
    -  /sg /spike_generator << /precise_times true 
    -          /spike_times [ t_spike1 ] >> Create def
    -  /n1 model Create def
    -  /n2 model Create def  
    -  /n3 model Create def
    -
    -  % excitatory connection only  
    -  sg n1 /one_to_one << /weight w1     >> Connect
    -
    -  % inhibitory connection only
    -  sg n2 /one_to_one << /weight w1 neg >> Connect
    -  
    -  % excitatory and inhbitory connection
    -  sg n3 /one_to_one << /weight w1     >> Connect
    -  sg n3 /one_to_one << /weight w1 neg >> Connect
    -
    -  % assume that neurons are initialized at equilibrium
    -  /V0 n1 /V_m get def  
    -  V0 n1 /E_L get eq assert  % sanity check for test
    -  
    -  4 Simulate
    -  /V1 n1 /V_m get def
    -  /V2 n2 /V_m get def
    -  /V3 n3 /V_m get def
    -
    -  V1 V2 add V0 sub 
    -  V3 sub 
    -  abs 1e-15 lt
    -  assert_or_die
    -} forall
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-410.sli b/testsuite/regressiontests/issue-410.sli
    deleted file mode 100644
    index 1d199ba16c..0000000000
    --- a/testsuite/regressiontests/issue-410.sli
    +++ /dev/null
    @@ -1,112 +0,0 @@
    -/*
    - *  issue-410.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::issue-410 - Ensure thread safety of volume transmitter
    -
    -   Synopsis: (issue-410) run -> NEST exits if test fails
    -   Description:
    -   This test compares the impact of the volume transmitter
    -   on a dopamine synapse using different number of threads.   
    -
    -   FirstVersion: 07/2016
    -   Author: Till Schumann
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model iaf_cond_alpha, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -M_ERROR setverbosity
    -
    -skip_if_not_threaded
    -
    -/sim_weight_in_dopa_syn
    -{
    -  /threads Set
    -
    -  ResetKernel
    -  << /local_num_threads threads >> SetKernelStatus
    -
    -  /dc_generator << /amplitude 1500.0 >> Create /stim1 Set
    -  /dc_generator << /amplitude 1000.0 >> Create /stim2 Set
    -
    -  /iaf_psc_alpha      << /C_m 100.0 /tau_m 10.0 >>                 Create /neuron1 Set
    -  /iaf_psc_alpha      << /C_m 100.0 /tau_m 10.0 /tau_minus 10.0 >> Create /neuron2 Set
    -  /iaf_cond_alpha 100 << /V_reset -70.0 /C_m 80.0 /V_th -60.0 >>   Create /dopa    Set
    -
    -  /volume_transmitter Create /vt Set
    -
    -  /stdp_dopamine_synapse /syn1
    -                 << /Wmax 1000.0
    -                  /Wmin 0.0
    -                  /tau_plus 10.0
    -                  /A_minus 0.05
    -                  /A_plus 0.05
    -                  /b 45.45
    -                  /tau_c 1.0
    -                  /tau_n 100.0
    -                  /vt vt 0 get >> CopyModel
    -
    -  stim1 neuron1    10.0 1.0       Connect
    -  stim2 dopa       10.0 1.0       Connect
    -  neuron1 neuron2 500.0 1.0 /syn1 Connect
    -  dopa vt Connect
    -  
    -  2000.0 Simulate
    -  
    -  %push return value
    -  << /source neuron1 /target neuron2 >> GetConnections /conns Set
    -  conns size 0 gt {
    -    0 get GetStatus /weight get
    -  }{
    -    0.0
    -  } ifelse
    -} def
    -
    -{
    -  1 sim_weight_in_dopa_syn /t1 Set 
    -  2 sim_weight_in_dopa_syn /t2 Set
    -  4 sim_weight_in_dopa_syn /t3 Set
    -  8 sim_weight_in_dopa_syn /t4 Set
    -  16 sim_weight_in_dopa_syn /t5 Set
    -  32 sim_weight_in_dopa_syn /t6 Set
    -  
    -  (1 thread weight=) t1 cvs join =
    -  (2 threads weight=) t2 cvs join =
    -  (4 threads weight=) t3 cvs join =
    -  (8 threads weight=) t4 cvs join =
    -  (16 threads weight=) t5 cvs join =
    -  (32 threads weight=) t6 cvs join =
    -  
    -  t1 6 ToUnitTestPrecision t2 6 ToUnitTestPrecision eq 
    -  t1 6 ToUnitTestPrecision t3 6 ToUnitTestPrecision eq and
    -  t1 6 ToUnitTestPrecision t4 6 ToUnitTestPrecision eq and
    -  t1 6 ToUnitTestPrecision t5 6 ToUnitTestPrecision eq and
    -  t1 6 ToUnitTestPrecision t6 6 ToUnitTestPrecision eq and 
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-437.sli b/testsuite/regressiontests/issue-437.sli
    deleted file mode 100644
    index 2e38c4d003..0000000000
    --- a/testsuite/regressiontests/issue-437.sli
    +++ /dev/null
    @@ -1,87 +0,0 @@
    -/*
    - *  issue-437.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-437 Ensure parameter passed in Connect are set
    -
    -Synopsis: (issue-437) run -> NEST exits if test fails
    -
    -Description:
    -This test makes sure that if parameter dictionaries are passed to
    -Connect, the values are actually set. To avoid conflicts with synapse
    -compatibility, we use labeled synapses and try setting the label.
    -
    -Author: Jakob Jordan, 2016-08-01
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/my_synapse_label 49 def
    -
    -% test neuron-neuron connection
    -{
    -  ResetKernel
    -  /iaf_psc_delta 1 Create /a Set
    -  /iaf_psc_delta 1 Create /b Set
    -  a b << /rule /all_to_all >> << /synapse_model /static_synapse_lbl /synapse_label my_synapse_label >> Connect
    -  << >> GetConnections 0 get GetStatus /synapse_label get my_synapse_label eq
    -} assert_or_die
    -
    -% test neuron-device connection
    -{
    -  ResetKernel
    -  /iaf_psc_delta 1 Create /n Set
    -  /spike_recorder 1 Create /d Set
    -  n d << /rule /all_to_all >> << /synapse_model /static_synapse_lbl /synapse_label my_synapse_label >> Connect
    -  << >> GetConnections 0 get GetStatus /synapse_label get my_synapse_label eq
    -} assert_or_die
    -
    -% test device-device connection
    -{
    -  ResetKernel
    -  /spike_generator 1 Create /g Set
    -  /spike_recorder 1 Create /d Set
    -  g d << /rule /all_to_all >> << /synapse_model /static_synapse_lbl /synapse_label my_synapse_label >> Connect
    -  << >> GetConnections 0 get GetStatus /synapse_label get my_synapse_label eq
    -} assert_or_die
    -
    -% test device-neuron connection
    -{
    -  ResetKernel
    -  /spike_generator 1 Create /g Set
    -  /iaf_psc_delta 1 Create /n Set
    -  g n << /rule /all_to_all >> << /synapse_model /static_synapse_lbl /synapse_label my_synapse_label >> Connect
    -  << >> GetConnections 0 get GetStatus /synapse_label get my_synapse_label eq
    -} assert_or_die
    -
    -% test neuron-global device connection
    -{
    -  ResetKernel
    -  /iaf_psc_delta 1 Create /n Set
    -  /volume_transmitter 1 Create /v Set
    -  n v << /rule /all_to_all >> << /synapse_model /static_synapse_lbl /synapse_label my_synapse_label >> Connect
    -  << >> GetConnections 0 get GetStatus /synapse_label get my_synapse_label eq
    -} assert_or_die
    diff --git a/testsuite/regressiontests/issue-521.sli b/testsuite/regressiontests/issue-521.sli
    deleted file mode 100644
    index 29bf10b5f3..0000000000
    --- a/testsuite/regressiontests/issue-521.sli
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -/*
    - *  issue-521.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::issue-521 - *_hpc connections return local id instead of node ID of target neuron
    -
    -   Ensure that *_hpc connections also return correct global target node ID on GetConnections.
    -
    -   FirstVersion: 04/2017
    -   Author: Till Schumann
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/test_targets
    -{
    -dup /threads Set
    -ResetKernel
    -<< /local_num_threads threads >> SetKernelStatus
    -
    -
    -% create set of neurons
    -/iaf_psc_alpha 20 Create /neurons Set
    -
    -% connect two neurons (prime number to increase variations of thread placement)
    -neurons [5] Take  /n1 Set
    -neurons [13] Take /n2 Set
    -n1 n2 << >> /static_synapse Connect
    -n1 n2 << >> /static_synapse_hpc Connect
    -
    -% store info from target neuron for comparison
    -n2 GetStatus 0 get /target_dict Set
    -
    -<< >> GetConnections 0 get GetStatus /conn_dict Set
    -<< >> GetConnections 1 get GetStatus /conn_hpc_dict Set
    -
    -
    -/* normal connection should contain global_id as target */
    -conn_dict /target get target_dict /global_id get eq assert_or_die
    -
    -/* same for hpc connection */
    -conn_hpc_dict /target get target_dict /global_id get eq assert_or_die
    -
    -
    -} def
    -
    -
    -/* test runs with different number of threads */
    -1 test_targets
    -2 test_targets
    -4 test_targets
    -8 test_targets
    -16 test_targets
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-545.sli b/testsuite/regressiontests/issue-545.sli
    deleted file mode 100644
    index 74bb4a7eb1..0000000000
    --- a/testsuite/regressiontests/issue-545.sli
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    - *  issue-545.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-545
    -
    -Synopsis: (issue-545) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that calling SetDefaults with a wrong datatype raises
    -an exception. 
    -
    -Author: Jan Hahne
    -FirstVersion: April 2017
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -{
    -  ResetKernel
    -  /stdp_synapse << /tau_plus 10. >> SetDefaults
    -  /stdp_synapse GetDefaults /tau_plus get
    -  10. eq
    -}
    -assert_or_die
    -
    -{
    -  ResetKernel
    -  /iaf_psc_alpha << /C_m 10. >> SetDefaults
    -  /iaf_psc_alpha GetDefaults /C_m get
    -  10. eq
    -}
    -assert_or_die
    -
    -skip_if_not_threaded
    -
    -{
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -  /stdp_synapse << /tau_plus 10. >> SetDefaults
    -  /stdp_synapse GetDefaults /tau_plus get
    -  10. eq
    -}
    -assert_or_die
    -
    -{
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -  /iaf_psc_alpha << /C_m 10. >> SetDefaults
    -  /iaf_psc_alpha GetDefaults /C_m get
    -  10. eq
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-596.sli b/testsuite/regressiontests/issue-596.sli
    deleted file mode 100644
    index 6f9dac8c51..0000000000
    --- a/testsuite/regressiontests/issue-596.sli
    +++ /dev/null
    @@ -1,81 +0,0 @@
    -/*
    - *  issue-596.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-565
    -
    -Synopsis: (issue-565) run -> NEST exits if test fails
    -
    -Description:
    -This test makes sure that after deleting a connection in a
    -heterogenenous connector, the resulting connector can still be
    -correctly used to deliver spikes
    -
    -Author: Jakob Jordan
    -FirstVersion: December 2016
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/BuildNetwork
    -{
    -  ResetKernel
    -
    -  % Create neurons and spike recorder
    -  /iaf_psc_delta 2 Create /neurons Set
    -  /spike_recorder 1 Create /sr Set
    -
    -  % Get neuron one to continously spike
    -  neurons [1] Take << /I_e 600. >> SetStatus
    -
    -  % Create connections, need to be of different types to create
    -  % heterogenenous connector
    -  neurons [1] Take neurons [2] Take << /rule /all_to_all >>
    -    << /weight 0. /synapse_model /static_synapse >> Connect
    -  neurons [1] Take neurons [2] Take << /rule /all_to_all >>
    -    << /weight 0. /synapse_model /stdp_synapse >> Connect
    -
    -  % Create connection to spike recorder
    -  neurons [1] Take sr Connect
    -} def
    -
    -% Measure event count without deleting connection (ground truth)
    -BuildNetwork
    -
    -100 Simulate
    -
    -sr /n_events get /n_events_target Set
    -
    -% Measure event count with deleting connection
    -BuildNetwork
    -
    -neurons [1] Take neurons [2] Take << /rule /all_to_all >>
    -  << /synapse_model /static_synapse >> Disconnect_g_g_D_D
    -
    -100 Simulate
    -
    -{
    -  sr /n_events get n_events_target eq
    -} assert_or_die
    diff --git a/testsuite/regressiontests/issue-659.sli b/testsuite/regressiontests/issue-659.sli
    deleted file mode 100644
    index ed55d7effe..0000000000
    --- a/testsuite/regressiontests/issue-659.sli
    +++ /dev/null
    @@ -1,64 +0,0 @@
    -/*
    - *  issue-659.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-659 Check that we get an error if trying to call Run or Cleanup without calling Prepare first.
    -
    -Synopsis: (issue-659) run -> NEST exits if test fails
    -
    -Author: Håkon Mørk, 2018-03-07
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  % Run without prepare.
    -  ResetKernel
    -  10 Run
    -} fail_or_die
    -
    -{
    -  % Cleanup without prepare.
    -  ResetKernel
    -  Cleanup
    -} fail_or_die
    -
    -{
    -  % Prepare twice.
    -  ResetKernel
    -  Prepare
    -  Prepare
    -} fail_or_die
    -
    -{
    -  % Run after cleanup, without prepare.
    -  ResetKernel
    -  Prepare
    -  10 Run
    -  Cleanup
    -  10 Run
    -} fail_or_die
    -
    diff --git a/testsuite/regressiontests/issue-665.sli b/testsuite/regressiontests/issue-665.sli
    deleted file mode 100644
    index 6117697dfc..0000000000
    --- a/testsuite/regressiontests/issue-665.sli
    +++ /dev/null
    @@ -1,160 +0,0 @@
    -/*
    - *  issue-665.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-665
    -
    -Synopsis: (issue-665) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that ConnectLayers correctly handles devices with thread
    -siblings as sources and targets.
    -
    -Author: Hans Ekkehard Plesser
    -FirstVersion: February 2017
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -% First set of tests: Single generator to neuron layer
    -/gen_to_layer_test
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -
    -  /pgl
    -  << /elements /poisson_generator
    -     /shape [ 1 1 ] >>
    -  CreateLayer def
    -
    -  /nnl
    -  << /elements /iaf_psc_alpha
    -     /shape [ 2 2 ] >>
    -  CreateLayer def
    -
    -  pgl nnl connspec ConnectLayers
    -
    -  /src pgl [1] Take def
    -  /tgts nnl def
    -
    -  /conns << /source src >> GetConnections def
    -  /ctgts conns { cva 1 get } Map Sort def
    -
    -  tgts cva ctgts eq
    -}
    -def
    -
    -{
    -  << /connection_type /pairwise_bernoulli_on_source >> gen_to_layer_test
    -}
    -assert_or_die
    -
    -{
    -  << /connection_type /pairwise_bernoulli_on_target >> gen_to_layer_test
    -}
    -assert_or_die
    -
    -{
    -  % one incoming connection to each neuron in layer
    -  << /connection_type /pairwise_bernoulli_on_source
    -     /number_of_connections 1 >> gen_to_layer_test
    -}
    -assert_or_die
    -
    -{
    -  % four outgoing connections, one to each neuron in layer
    -  % prohibit multapses to ensure consistent result
    -  << /connection_type /pairwise_bernoulli_on_target
    -     /number_of_connections 4
    -     /allow_multapses false >> gen_to_layer_test
    -}
    -assert_or_die
    -
    -% -----------------------------------------------
    -
    -% Second set of tests: Neuron layer to single recorder
    -/layer_to_det_test
    -{
    -  /connspec Set
    -
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -
    -  /nnl
    -  << /elements /iaf_psc_alpha
    -     /shape [ 2 2 ] >>
    -  CreateLayer def
    -
    -  /srl
    -  << /elements /spike_recorder
    -     /shape [ 1 1 ] >>
    -  CreateLayer def
    -
    -  nnl srl connspec ConnectLayers
    -
    -  /tgt srl [1] Take def
    -  /srcs nnl def
    -
    -  /conns << /target tgt >> GetConnections def
    -  /csrcs conns { cva 0 get } Map Sort def
    -
    -  srcs cva csrcs eq
    -}
    -def
    -
    -{
    -  << /connection_type /pairwise_bernoulli_on_source >> layer_to_det_test
    -}
    -assert_or_die
    -
    -{
    -  << /connection_type /pairwise_bernoulli_on_target >> layer_to_det_test
    -}
    -fail_or_die
    -clear
    -
    -{
    -  % four incoming connections, one to each neuron in layer
    -  % prohibit multapses to ensure consistent result
    -  << /connection_type /pairwise_bernoulli_on_source
    -     /number_of_connections 4
    -     /allow_multapses false >> layer_to_det_test
    -}
    -fail_or_die
    -clear
    -
    -{
    -  % one outgoing connection from each neuron in layer
    -  << /connection_type /pairwise_bernoulli_on_target
    -     /number_of_connections 1 >> layer_to_det_test
    -}
    -fail_or_die
    -clear
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-707.sli b/testsuite/regressiontests/issue-707.sli
    deleted file mode 100644
    index afb4962ad4..0000000000
    --- a/testsuite/regressiontests/issue-707.sli
    +++ /dev/null
    @@ -1,68 +0,0 @@
    -/*
    - *  issue-707.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-707
    -
    -Synopsis: (issue-707) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that the weight of gap junctions can
    -be recorded with the weight_recorder (thus that SecondaryEvents
    -have a properly set time stamp).
    -
    -Author: Jan Hahne
    -FirstVersion: April 2017
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -{
    -  ResetKernel
    -
    -  /hh_psc_alpha_gap Create /neuron_in Set
    -  /hh_psc_alpha_gap Create /neuron_out Set
    -  /weight_recorder Create /wr Set
    -
    -  /gap_junction << /weight_recorder wr >> SetDefaults
    -
    -  neuron_in neuron_out
    -  << /rule /one_to_one /make_symmetric true >>
    -  << /synapse_model /gap_junction /weight 2.0 >>
    -  Connect
    -
    -  10 Simulate
    -
    -  wr /events get /weights get 1 get
    -
    -  2.0 eq
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-708.sli b/testsuite/regressiontests/issue-708.sli
    deleted file mode 100644
    index bf893f93d3..0000000000
    --- a/testsuite/regressiontests/issue-708.sli
    +++ /dev/null
    @@ -1,90 +0,0 @@
    -/*
    - *  issue-708.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-708
    -
    -Synopsis: (issue-708) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that CopyModel works with connection
    -types which use secondary events.
    -
    -Author: Jan Hahne
    -FirstVersion: April 2017
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -{
    -  ResetKernel
    -
    -  /hh_psc_alpha_gap Create /neuron_in Set
    -  /hh_psc_alpha_gap Create /neuron_out1 Set
    -  /hh_psc_alpha_gap Create /neuron_out2 Set
    -  /voltmeter Create /vm1 Set
    -  /voltmeter Create /vm2 Set
    -
    -  /gap_junction /syn0 CopyModel
    -  /gap_junction /syn1 CopyModel
    -
    -  neuron_in << /I_e 200.0 >> SetStatus
    -  vm1 << /interval 1.0 >> SetStatus
    -  vm2 << /interval 1.0 >> SetStatus
    -
    -  neuron_in neuron_out1
    -  << /rule /one_to_one /make_symmetric true >>
    -  << /synapse_model /syn0 /weight 10.0 >>
    -  Connect
    -
    -  neuron_in neuron_out2
    -  << /rule /one_to_one /make_symmetric true >>
    -  << /synapse_model /syn1 /weight 10.0 >>
    -  Connect
    -
    -  vm1 neuron_out1 Connect
    -  vm2 neuron_out2 Connect
    -
    -  10 Simulate
    -
    -  % check that neuron_out1 received the input
    -  % -6.960401e+01 is the resting potential
    -  vm1 /events get /V_m get 8 get
    -  -6.960401e+01 gt
    -
    -  % check that neuron_out2 received the input
    -  % -6.960401e+01 is the resting potential
    -  vm2 /events get /V_m get 8 get
    -  -6.960401e+01 gt
    -
    -  and
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-735.sli b/testsuite/regressiontests/issue-735.sli
    deleted file mode 100644
    index 0fc987cf24..0000000000
    --- a/testsuite/regressiontests/issue-735.sli
    +++ /dev/null
    @@ -1,111 +0,0 @@
    -/*
    - *  issue-735.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-735
    -
    -Synopsis: (issue-735) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that NEST raises an error if the user tries to
    -set stdp parameters that cannot be set on stdp_dopamine_synapse.
    -
    -Author: Hans Ekkehard Plesser
    -FirstVersion: May 2017
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% param_name copy_model? param_on_connect?
    -/check_param [ /literaltype /booltype /booltype ]
    -{
    -  /param_on_connect Set
    -  /copy_model Set
    -  /pname Set
    -  pname cvs ( ) join copy_model cvs join ( ) join param_on_connect cvs join ==
    -
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha Create def
    -  /vt /volume_transmitter Create def
    -
    -  copy_model
    -  {
    -    /stdp_dopamine_synapse /mysyn << /vt vt >> CopyModel
    -    /syn_model /mysyn def
    -  }
    -  {
    -    /stdp_dopamine_synapse << /vt vt >> SetDefaults
    -    /syn_model /stdp_dopamine_synapse def
    -  }
    -  ifelse
    -
    -  param_on_connect
    -  {
    -    n n
    -    << /rule /one_to_one >>
    -    << /synapse_model syn_model /weight 2.0 pname 1.0 >>
    -    Connect
    -  }
    -  {
    -    n n syn_model Connect
    -    << >> GetConnections 0 get
    -    << pname 1.0 /weight 2.0 >> SetStatus
    -  }
    -  ifelse
    -}
    -def
    -
    -% test on base model, SetStatus after Connect
    -[ /A_minus /A_plus /Wmax /Wmin /b /tau_c /tau_n /tau_plus ]
    -{
    -  { false false check_param } fail_or_die
    -}
    -forall
    -
    -% test on copied model, SetStatus after Connect
    -[ /A_minus /A_plus /Wmax /Wmin /b /tau_c /tau_n /tau_plus ]
    -{
    -  { true false check_param } fail_or_die
    -}
    -forall
    -
    -% test on base model, Connect setting parameters
    -[ /A_minus /A_plus /Wmax /Wmin /b /tau_c /tau_n /tau_plus ]
    -{
    -  { false true check_param  } fail_or_die
    -}
    -forall
    -
    -% test on copied model, SetStatus after Connect
    -[ /A_minus /A_plus /Wmax /Wmin /b /tau_c /tau_n /tau_plus ]
    -{
    -  { true true check_param } fail_or_die
    -}
    -forall
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-737-threads.sli b/testsuite/regressiontests/issue-737-threads.sli
    deleted file mode 100644
    index a5bb4d06da..0000000000
    --- a/testsuite/regressiontests/issue-737-threads.sli
    +++ /dev/null
    @@ -1,96 +0,0 @@
    -/*
    - *  issue-737-threads.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-737-threads
    -
    -Synopsis: (issue-737-threads) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that NEST raises an error if the user tries to
    -set c or n in the stdp_dopamine_synapse specification given to the Connect call
    -when we have more than one thread.
    -
    -Author: Stine B. Vennemo
    -FirstVersion: May 2017
    -SeeAlso: testsuite::issue-735, testsuite::issue-737
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -% Test multithreaded c in syn_spec for stdp_dopamine_synapse model
    -{
    -  ResetKernel
    -
    -  << /local_num_threads 4 >> SetKernelStatus
    -
    -  /n /iaf_psc_alpha Create def
    -  /vt /volume_transmitter Create def
    -  /stdp_dopamine_synapse << /vt vt >> SetDefaults
    -  n n << /rule /one_to_one >> << /synapse_model /stdp_dopamine_synapse /c 2.0 >> Connect
    -
    -} fail_or_die
    -
    -% Test multithreaded n in syn_spec for stdp_dopamine_synapse model
    -{
    -  ResetKernel
    -
    -  << /local_num_threads 4 >> SetKernelStatus
    -
    -  /node_id /iaf_psc_alpha Create def
    -  /vt /volume_transmitter Create def
    -  /stdp_dopamine_synapse << /vt vt >> SetDefaults
    -  node_id node_id << /rule /one_to_one >> << /synapse_model /stdp_dopamine_synapse /n 2.0 >> Connect
    -
    -} fail_or_die
    -
    -% Test multithreaded c in syn_spec for CopyModel of stdp_dopamine_synapse model
    -{
    -  ResetKernel
    -
    -  << /local_num_threads 4 >> SetKernelStatus
    -
    -  /n /iaf_psc_alpha Create def
    -  /vt /volume_transmitter Create def
    -  /stdp_dopamine_synapse /mysyn << /vt vt >> CopyModel
    -  n n << /rule /one_to_one >> << /synapse_model /mysyn /c 2.0 >> Connect
    -
    -} fail_or_die
    -
    -% Test multithreaded n in syn_spec for CopyModel of stdp_dopamine_synapse model
    -{
    -  ResetKernel
    -
    -  << /local_num_threads 4 >> SetKernelStatus
    -
    -  /node_id /iaf_psc_alpha Create def
    -  /vt /volume_transmitter Create def
    -  /stdp_dopamine_synapse /mysyn << /vt vt >> CopyModel
    -  node_id node_id << /rule /one_to_one >> << /synapse_model /mysyn /n 2.0 >> Connect
    -
    -} fail_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-737.sli b/testsuite/regressiontests/issue-737.sli
    deleted file mode 100644
    index 76e91d2a15..0000000000
    --- a/testsuite/regressiontests/issue-737.sli
    +++ /dev/null
    @@ -1,81 +0,0 @@
    -/*
    - *  issue-737.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-737
    -
    -Synopsis: (issue-737) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that NEST raises an error if the user tries to
    -set synapse parameters that cannot be set with Connect calls.
    -
    -Author: Stine B. Vennemo
    -FirstVersion: May 2017
    -SeeAlso: testsuite::issue-735
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Test weight in syn_spec for static_synapse_hom_w model
    -{
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha Create def
    -  n n << /rule /one_to_one >> << /synapse_model /static_synapse_hom_w /weight 2.0 >> Connect
    -
    -} fail_or_die
    -
    -% Test weight in syn_spec for CopyModel of static_synapse_hom_w model
    -{
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha Create def
    -  /static_synapse_hom_w /mysyn CopyModel
    -  n n << /rule /one_to_one >> << /synapse_model /mysyn /weight 2.0 >> Connect
    -
    -} fail_or_die
    -
    -% Test vt in syn_spec for stdp_dopamine_synapse model
    -{
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha Create def
    -  n n << /rule /one_to_one >> << /synapse_model /stdp_dopamine_synapse /vt 2.0 >> Connect
    -
    -} fail_or_die
    -
    -% Test vt in syn_spec for CopyModel of stdp_dopamine_synapse model
    -{
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha Create def
    -  /stdp_dopamine_synapse /mysyn CopyModel
    -  n n << /rule /one_to_one >> << /synapse_model /mysyn /vt 2.0 >> Connect
    -
    -} fail_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-740.sli b/testsuite/regressiontests/issue-740.sli
    deleted file mode 100644
    index 779c891c19..0000000000
    --- a/testsuite/regressiontests/issue-740.sli
    +++ /dev/null
    @@ -1,106 +0,0 @@
    -/*
    - *  issue-740.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-740
    -
    -Synopsis: (issue-740) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that step_current_generator can only be parameterized
    -with amplitude_times that are strictly increasing after conversion to
    -time steps.
    -
    -Author: Hans Ekkehard Plesser
    -FirstVersion: August 2017
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/run_sim [ /doubletype /booltype ]  % resolution, allow_offgrid
    -{
    -  /offgrid Set
    -  /res Set
    -  ResetKernel
    -  << /tics_per_ms 1024. /resolution res >> SetKernelStatus
    -  
    -  /scg /step_current_generator 
    -    << /amplitude_times  [ 1. 1.0625 1.125 1.1875 1.25 2. 2.5 ]
    -       /amplitude_values [ 10. -20.  40.   -80.   160. -320. 640. ] 
    -       /allow_offgrid_times offgrid
    -    >> Create def
    -  scg /amplitude_times get ==
    -  /nrn /iaf_psc_alpha << /V_th 1e10 /C_m 1.0 /tau_m 1.0
    -                         /E_L 0.0 /V_m 0.0 /V_reset 0.0 >> Create def
    -  
    -  scg nrn Connect
    -
    -  5 res div cvi res mul Simulate
    -}
    -def
    -
    -% Test 1: Resolution finer than shortest interval
    -%         all intervals are multiple of resolution
    -(Test 1) ==
    -{
    -  2. -5 pow false run_sim
    -} pass_or_die
    -
    -% Test 2: Resolution finer than shortest interval,
    -%         intervals not multiples or resolution
    -(Test 2) ==
    -{
    -  2. -10 pow 3. mul false run_sim
    -} fail_or_die
    -
    -% Test 3: Resolution finer than shortest interval,
    -%         intervals not multiples or resolution,
    -%         allow off-grid
    -(Test 3) ==
    -{
    -  2. -10 pow 3. mul true run_sim
    -} pass_or_die
    -
    -% Test 4: Resolution equal to shortest interval
    -(Test 4) ==
    -{
    -  2. -4 pow false run_sim
    -} pass_or_die
    -
    -% Test 5: Resolution larger than shortest interval
    -(Test 5) ==
    -{
    -  2. -3 pow false run_sim
    -} fail_or_die
    -
    -% Test 6: Resolution larger than shortest interval
    -%         off-grid allowed
    -(Test 6) ==
    -{
    -  2. -3 pow true run_sim
    -} fail_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-77.sli b/testsuite/regressiontests/issue-77.sli
    deleted file mode 100644
    index 519fbfd94c..0000000000
    --- a/testsuite/regressiontests/issue-77.sli
    +++ /dev/null
    @@ -1,223 +0,0 @@
    -/*
    - *  issue-77.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Regression test for Ticket #77 (GitHub).
    - *
    - * Ensure that all neuron models register outgoing
    - * spikes with archiving node. The test sends a very
    - * high-rate Poisson spike train into the neuron that
    - * should make any type of model neuron fire and checks
    - * both `t_spike` entry of the neuron (>0 if neuron has
    - * spiked) and checks that the connection weight differs
    - * from the initial value 1.0.
    - *
    - * Hans Ekkehard Plesser, 2015-08-14
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/* We first need to test the parrot_neuron_ps, since we should use that in tests below.
    - */
    -{
    -  /sg /spike_generator << /spike_times [ 10.0 ] /precise_times true >> Create  def
    -  /pn /parrot_neuron_ps Create def
    -
    -  sg pn Connect
    -  20 Simulate
    -
    -  pn /t_spike get 11.0 eq
    -} assert_or_die
    -
    -
    -
    -% The following models will not be tested:
    -/skip_list [
    -             /ginzburg_neuron             % binary neuron
    -             /mcculloch_pitts_neuron      % binary neuron
    -             /erfc_neuron                 % binary neuron
    -             /pp_pop_psc_delta            % population model, not suitable for STDP
    -             /gif_pop_psc_exp             % population model, not suitable for STDP
    -             /lin_rate_ipn                % rate neuron
    -             /lin_rate_opn                % rate neuron
    -             /tanh_rate_ipn               % rate neuron
    -             /tanh_rate_opn               % rate neuron
    -             /threshold_lin_rate_ipn      % rate neuron
    -             /threshold_lin_rate_opn      % rate neuron
    -             /siegert_neuron              % rate neuron
    -             /gauss_rate_ipn              % rate neuron
    -             /sigmoid_rate_gg_1998_ipn    % rate neuron
    -             /sigmoid_rate_ipn            % rate neuron
    -             /rate_transformer_lin             % rate transformer
    -             /rate_transformer_tanh            % rate transformer
    -             /rate_transformer_threshold_lin   % rate transformer
    -             /rate_transformer_gauss           % rate transformer
    -             /rate_transformer_sigmoid         % rate transformer
    -             /rate_transformer_sigmoid_gg_1998 % rate transformer
    -             /music_event_out_proxy       % MUSIC port
    -             /music_event_in_proxy        % MUSIC port
    -             /music_message_in_proxy      % MUSIC port
    -             /music_cont_out_proxy        % MUSIC port
    -             /music_cont_in_proxy         % MUSIC port
    -             /music_rate_out_proxy        % MUSIC port
    -             /music_rate_in_proxy         % MUSIC port
    -           ] def
    -
    -% The following models require connections to rport 1 or other specific parameters:
    -/extra_params <<
    -   /aeif_psc_alpha << /initial_weight 80.0 >>
    -   /aeif_psc_exp << /initial_weight 80.0 >>
    -   /aeif_psc_delta << /initial_weight 80.0 >>
    -   /gif_psc_exp_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /gif_cond_exp_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /glif_cond << /params << /tau_syn [ 0.2 ] /E_rev [ 0.0 ] >>
    -                                  /receptor_type 1 >>
    -   /glif_psc << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /iaf_psc_alpha_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /iaf_psc_exp_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /aeif_cond_alpha_multisynapse << /params << /tau_syn [ 2.0 ] >>
    -                                  /receptor_type 1 >>
    -   /aeif_cond_beta_multisynapse << /params << /E_rev [ 0.0 ]
    -                                              /tau_rise [ 1.0 ]
    -                                              /tau_decay [ 2.0 ] >>
    -                                  /receptor_type 1 >>
    -   /iaf_cond_alpha_mc << /receptor_type 1 >>
    -   /pp_cond_exp_mc_urbanczik << /receptor_type 1 >>
    -   /ht_neuron << /receptor_type 1 >>
    -   >>
    -   def
    -
    -
    -{
    -  % apply to all models of element_type neuron
    -  GetKernelStatus /node_models get
    -  {
    -    /model Set
    -
    -    model skip_list exch MemberQ not
    -    model GetDefaults /element_type get /neuron eq and
    -    {
    -      ResetKernel
    -      /n model Create def
    -
    -      extra_params model known
    -      {
    -         extra_params model get /params known
    -         {
    -           extra_params model get /params get
    -           n exch
    -           SetStatus
    -         } if
    -      } if
    -
    -      % if the model is a compartmental model,
    -      % we need to add at least a root compartment
    -      model GetDefaults dup
    -      /compartments known
    -      {
    -          n
    -          <<
    -            /compartments << /parent_idx -1  >>
    -            /receptors << /comp_idx 0 /receptor_type (AMPA) >>
    -          >> SetStatus
    -      }
    -      if
    -
    -      /pg /poisson_generator << /rate 1e5 >> Create def
    -      /parrot /parrot_neuron_ps Create def
    -      /sr /spike_recorder Create def
    -
    -      pg parrot Connect   % need to connect via parrot since generators cannot connect with
    -                          % plastic synapses.
    -
    -      /initial_weight 10.0 def
    -      /syn_spec << /synapse_model /stdp_synapse
    -                   /weight
    -                     extra_params model known
    -                     {
    -                        extra_params model get /initial_weight known
    -                        {
    -                           extra_params model get /initial_weight get
    -                        }
    -                        {
    -                           initial_weight
    -                        } ifelse
    -                     }
    -                     {
    -                        initial_weight
    -                     } ifelse
    -                   /receptor_type
    -                     extra_params model known
    -                     {
    -                       extra_params model get /receptor_type known
    -                       {
    -                         extra_params model get /receptor_type get
    -                       }
    -                       {
    -                         0
    -                       } ifelse
    -                     }
    -                     {
    -                       0
    -                     } ifelse
    -                >> def
    -
    -      parrot n /one_to_one syn_spec Connect
    -      n sr Connect
    -
    -      100 Simulate
    -
    -      /neuron_spiked sr /n_events get 0 gt def
    -      /t_spike_set n /t_spike get 0 gt def
    -      /weight_changed
    -        << /source parrot >> GetConnections 0 get /weight get
    -        initial_weight neq def
    -
    -      neuron_spiked t_spike_set weight_changed and and
    -      dup not {
    -       (FAILED: ) model cvs join ==
    -       (  events ) =only sr /n_events get =
    -       (  tspike ) =only n /t_spike get =
    -       (  weight ) =only  << /source parrot >> GetConnections 0 get /weight get ==
    -      } if
    -    }
    -    { true }
    -    ifelse
    -  }
    -  Map
    -
    -  % see if all entries are true
    -  true exch { and } Fold
    -
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/issue-832.sli b/testsuite/regressiontests/issue-832.sli
    deleted file mode 100644
    index 08ba3301f8..0000000000
    --- a/testsuite/regressiontests/issue-832.sli
    +++ /dev/null
    @@ -1,168 +0,0 @@
    -/*
    - *  issue-832.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::issue-832 - The test ensures that the marker primary_end
    -    is still valid if particular connections are deleted
    -
    -    Synopsis: (issue-832) run -> compares response to current step with reference data
    -
    -    Description:
    -    The test is a modified version of test_hh_psc_alpha_gap.sli that also creates
    -    and deletes additional primary connections.
    -    Two neurons of whom one receives an constant input current of 200 pA are connected
    -    by gap_junction with an (unrealistic) high gap weight. The accurate functionality
    -    of the gap_junction feature is tested by measuring the membrane potential of the
    -    neuron without input current.
    -
    -    The expected output is documented at the end of
    -    the script.
    -
    -    Author:  October 2017, Hahne
    -    SeeAlso: testsuite::test_hh_psc_alpha_gap
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -  /local_num_threads 1 
    -  /resolution h
    -  /use_wfr true
    -  /wfr_tol 0.0001
    -  /wfr_interpolation_order 3
    -  /wfr_max_iterations 10
    -  /wfr_comm_interval 1.0
    ->> SetKernelStatus
    -    
    -/hh_psc_alpha_gap Create /neuron1 Set
    -/hh_psc_alpha_gap Create /neuron2 Set
    -
    -/static_synapse /static1 CopyModel
    -/static_synapse /static2 CopyModel
    -
    -neuron1
    -<< 
    -  /I_e 200.
    ->> SetStatus
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -neuron1 neuron2
    -<< /rule /one_to_one /make_symmetric true >>
    -<< /synapse_model /gap_junction /weight 20.0 >>  Connect
    -
    -vm neuron2     1.0 h Connect
    -
    -neuron1 neuron2
    -<< /rule /one_to_one >>
    -<< /synapse_model /static1 /weight 0.0 >>  Connect
    -
    -neuron1 neuron2
    -<< /rule /one_to_one >>
    -<< /synapse_model /static2 /weight 0.0 >>  Connect
    -
    -neuron1 neuron2
    -<< /rule /all_to_all >>
    -<< /synapse_model /static1 >> Disconnect_g_g_D_D
    -
    -20 Simulate
    -
    -{                                             % reference data
    - dup Transpose First /test_times Set         % times of reference 
    -                               
    - vm [/events [/times /V_m]] get cva   % array of recorded data
    -  5 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of 
    -% the output of the voltmeter.
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -[ 1    -69.592 ]
    -[ 2    -69.559 ]
    -[ 3    -69.507 ]
    -[ 4    -69.439 ]
    -[ 5    -69.357 ]
    -[ 6    -69.264 ]
    -[ 7    -69.162 ]
    -[ 8    -69.051 ]
    -[ 9    -68.933 ]
    -[ 10   -68.809 ]
    -[ 11   -68.681 ]
    -[ 12   -68.548 ]
    -[ 13   -68.413 ]
    -[ 14   -68.276 ]
    -[ 15   -68.136 ] 
    -%
    -% ...
    -%
    -[ 117  -33.771 ]
    -[ 118  -24.103 ]
    -[ 119    8.7117 ]
    -[ 120   62.019 ]
    -[ 121   39.042 ]
    -[ 122   27.485 ]
    -[ 123   18.856 ]
    -[ 124   11.201 ]
    -[ 125    3.6210 ]
    -[ 126   -4.6956 ]
    -[ 127  -15.006 ]
    -[ 128  -29.464 ]
    -[ 129  -49.786 ]
    -[ 130  -71.323 ]
    -[ 131  -83.787 ]
    -% 
    -% ...
    -%   
    -[ 190  -71.023 ]
    -[ 191  -70.833 ]
    -[ 192  -70.647 ]
    -[ 193  -70.466 ]
    -[ 194  -70.289 ]
    -[ 195  -70.116 ]
    -[ 196  -69.948 ]
    -[ 197  -69.783 ]
    -[ 198  -69.622 ]
    -[ 199  -69.464 ]
    -]   
    -
    -exch assert_or_die
    -
    -
    diff --git a/testsuite/regressiontests/issue-888.sli b/testsuite/regressiontests/issue-888.sli
    deleted file mode 100644
    index 3999b58d4c..0000000000
    --- a/testsuite/regressiontests/issue-888.sli
    +++ /dev/null
    @@ -1,47 +0,0 @@
    -/*
    - *  issue-888.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::issue-888 Ensure that the resolution is set as a multiple of tics.
    -
    -Synopsis: (issue-888) run -> NEST exits if test fails
    -
    -Author: Håkon Mørk, 2018-03-05
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Only setting resolution.
    -{
    -  ResetKernel
    -  << /resolution 0.03125 >> SetKernelStatus
    -} fail_or_die
    -
    -% Setting both resolution and tics per ms.
    -{
    -  ResetKernel
    -  << /tics_per_ms 1000. /resolution 0.03125 >> SetKernelStatus
    -} fail_or_die
    diff --git a/testsuite/regressiontests/ticket-156.sli b/testsuite/regressiontests/ticket-156.sli
    deleted file mode 100644
    index 75d0ce9056..0000000000
    --- a/testsuite/regressiontests/ticket-156.sli
    +++ /dev/null
    @@ -1,110 +0,0 @@
    -/*
    - *  ticket-156.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -   Test for Ticket 156.
    -
    -   This test verifies that:
    -   poisson_generator_ps generates identical spike trains for given
    -   start and stop for different simulation resolutions, and different
    -   trains for different targets.
    -
    -   Protocol:
    -   1. poisson_generator_ps projects to two spike_recorders
    -   2. run for different resolutions, record precise spike times is ms
    -   3. test all spikes are in (start, stop]
    -   3. test for different results between spike_recorders
    -   4. test for identical results across resolutions
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/ps_params <<
    -  /origin 0.0
    -  /start 1.0
    -  /stop  2.0
    -  /rate 12345.0  % expect ~ 12.3 spikes
    ->> def
    -
    -/resolutions [0.01 0.1 0.2 0.5 1.0] def
    -
    -% ensure all spikes arrive at recorder
    -/simtime ps_params /stop get 2.0 add def
    -
    -/check_limits % true if all spikes in (origin+start, origin+stop]
    -{
    -  << >> begin
    -    /spks Set
    -    /ori ps_params /origin get def
    -    spks Min ps_params /start get ori add gt
    -    spks Max ps_params /stop get ori add leq
    -    and
    -  end
    -} def
    -
    -/single_trial
    -{
    -  << >> begin
    -    /h Set
    -    ResetKernel
    -    << /resolution h >> SetKernelStatus
    -
    -    /poisson_generator_ps Create /pg Set
    -    pg ps_params SetStatus
    -
    -    [ /spike_recorder Create
    -      /spike_recorder Create
    -    ] /srs Set
    -    srs { pg exch 1.0 1.0 Connect } forall
    -
    -    simtime Simulate
    -    srs { [/events /times] get cva } Map
    -  end
    -} def
    -
    -resolutions { single_trial } Map
    -/res Set
    -
    -(First test) =
    -% first test: limits
    -res Flatten check_limits
    -
    -(Second test) =
    -% second test: different results between targets
    -res {
    -  arrayload ; neq
    -} Map
    -
    -(Third test) =
    -% third test: equality among runs
    -% Test for spike time equality to within 1.0e-16 ms.
    -res Transpose {
    -  dup First /ref Set
    -  Rest true exch { ref sub 0 exch { abs max } Fold 1.0e-15 lt and } Fold
    -} Map
    -
    -% collect
    -3 arraystore Flatten
    -true exch { and } Fold
    -
    -assert_or_die
    diff --git a/testsuite/regressiontests/ticket-157.sli b/testsuite/regressiontests/ticket-157.sli
    deleted file mode 100644
    index 26f37f7e79..0000000000
    --- a/testsuite/regressiontests/ticket-157.sli
    +++ /dev/null
    @@ -1,41 +0,0 @@
    -/*
    - *  ticket-157.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% previous to the fix for #157, this script caused a C++
    -% assertion to fail for h==0.1, but not for h==0.01, 0.001
    -
    -0.1 /h Set  
    -
    -/T 3.0 def   
    -
    -ResetKernel
    -
    -<< 
    -      /resolution h
    -     >> SetKernelStatus
    -
    -/iaf_psc_alpha Create /n Set
    -/poisson_generator_ps Create /p Set
    -p << /rate  10000. >> SetStatus
    -
    -p n Connect
    -T Simulate 
    diff --git a/testsuite/regressiontests/ticket-235.sli b/testsuite/regressiontests/ticket-235.sli
    deleted file mode 100644
    index 62c4539daf..0000000000
    --- a/testsuite/regressiontests/ticket-235.sli
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  ticket-235.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Regression test for Ticket #235
    - *
    - * Asserts that the commands below throws error when no input
    - * exits on stack.
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced 
    -% by a restart of NEST with a serial binary.
    -skip_if_have_mpi
    -
    -
    -{load} failbutnocrash_or_die
    -{setcallback} failbutnocrash_or_die
    -{stopped} failbutnocrash_or_die
    -{load} failbutnocrash_or_die
    -{typeinfo} failbutnocrash_or_die
    -{switch} failbutnocrash_or_die
    -{switchdefault} failbutnocrash_or_die
    -{token_is} failbutnocrash_or_die
    -{setguard} failbutnocrash_or_die
    -
    -endusing
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-293.sli b/testsuite/regressiontests/ticket-293.sli
    deleted file mode 100644
    index a3dddb95eb..0000000000
    --- a/testsuite/regressiontests/ticket-293.sli
    +++ /dev/null
    @@ -1,46 +0,0 @@
    -/*
    - *  ticket-293.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Regression test for Ticket #293
    - *
    - * NEST crashed when a status dictionary passed to the root node contained
    - * unknown keys, if the dictionary changed the number of threads.
    - *
    - * This test changes the number of threads and includes /foo in the 
    - * dictionary. This must cause a SLI error complaining about the
    - * "Unused dictionary item" foo, but must not crash NEST. 
    - * 
    - * Hans E Plesser, 2008-10-20
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -<< >> begin
    -
    -{
    -  << /local_num_threads 2 /foo 5 >> SetKernelStatus
    -} fail_or_die
    -
    -end
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-310.sli b/testsuite/regressiontests/ticket-310.sli
    deleted file mode 100644
    index 23c45e5c95..0000000000
    --- a/testsuite/regressiontests/ticket-310.sli
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -/*
    - *  ticket-310.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Regression test for Ticket #310.
    - *
    - * Ensure that all neuron models that have V_m and V_th permit
    - * V_m to be set to >= V_th, and that they emit a spike with
    - * time stamp == resolution in that case.
    - *
    - * Hans Ekkehard Plesser, 2009-02-11 
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% use power-of-two resolution to avoid roundof problems
    -/res -3 dexp def
    -
    -/* The following models will not be tested:
    -   iaf_cxhk_2008  ---  spikes only on explicit positive threshold crossings
    -*/
    -/skip_list [ /iaf_chxk_2008 /correlospinmatrix_detector ] def
    -
    -{
    -  GetKernelStatus /node_models get
    -  {
    -    dup skip_list exch MemberQ not
    -    {
    -      /model Set
    -
    -      ResetKernel
    -      << /resolution res >> SetKernelStatus
    -      model Create /n Set
    -
    -      % see if we have V_m and V_th, otherwise return true
    -      n GetStatus 0 get dup /V_m known exch /V_th known and
    -      {
    -        n << /V_m n /V_th get 15.0 add >> SetStatus
    -        res Simulate
    -        n /t_spike get res leq    % works also for precise models
    -        dup not { (FAILED: ) model cvs join == n ShowStatus } if      
    -      }
    -      { true }
    -      ifelse   
    -    }
    -    { true }
    -    ifelse
    -  }
    -  Map
    -
    -  % see if all entries are true
    -  true exch { and } Fold
    -
    -} 
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-349.sli b/testsuite/regressiontests/ticket-349.sli
    deleted file mode 100644
    index 863cbca7b2..0000000000
    --- a/testsuite/regressiontests/ticket-349.sli
    +++ /dev/null
    @@ -1,115 +0,0 @@
    -/*
    - *  ticket-349.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Regression test for Ticket #349.
    - *
    - * Ensure that multimeter connects with entries in record_from list that do not match target node
    - * do not leave any trace in target node, so that attempt with corrected list succeed.
    - *
    - * Ensure that simulation does not crash when multimeter has empty record_from list. 
    - *
    - * Hans Ekkehard Plesser, 2009-07-02
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model iaf_cond_alpha, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -% First test: connect with illegal entry
    -{
    -  ResetKernel
    -
    -  /mm /multimeter Create def
    -  /n  /iaf_cond_alpha Create def
    -
    -  /r n /recordables get def
    -
    -  % take first element, add _foo to create string not in recordable list, append
    -  /rfail r dup (foo_) exch { cvs join (_) join } Fold cvlit append def
    -
    -  mm << /record_from rfail >> SetStatus
    -
    -  % shall provoke error
    -  mm n Connect
    -} fail_or_die
    -
    -% Second test: connect with illegal entry first, then re-try with legal list
    -{
    -  ResetKernel
    -
    -  /mm /multimeter Create def
    -  /n  /iaf_cond_alpha Create def
    -
    -  /r n /recordables get def
    -
    -  % take first element, join all recordables to create non-existing entry
    -  /rfail r dup (foo_) exch { cvs join (_) join } Fold cvlit append def
    -
    -  mm << /record_from rfail >> SetStatus
    -
    -  % shall provoke error, we must catch it manually
    -  mark
    -  { mm n Connect }
    -  stopped
    -  {
    -    % remove error code
    -    errordict /message undef
    -    errordict /command undef
    -    errordict begin /newerror false def end
    -
    -    % clear stack
    -    counttomark npop pop % need to pop mark separately
    -  } 
    -  {
    -    % we should have gotten an error, we didn't, so we raise one
    -    /ticket-349-test-2 /ExpectedErrorNotRaised raiseerror
    -  }
    -  ifelse
    -
    -  % try with correct list
    -  mm << /record_from r >> SetStatus
    -  mm n Connect
    -
    -} pass_or_die
    -
    -% Third test: connect multimeter with empty list, then simulate. Must not crash.
    -{
    -  ResetKernel
    -
    -  /mm /multimeter Create def
    -  /n  /iaf_cond_alpha Create def
    -  mm n Connect
    -
    -  10 Simulate
    -
    -  % see if we can get an events dictionary, must contain empty times and senders arrays
    -  mm /events get 
    -  dup /senders get cva length 0 eq
    -  exch /times get cva length 0 eq
    -  and
    -
    -} assert_or_die
    diff --git a/testsuite/regressiontests/ticket-382.sli b/testsuite/regressiontests/ticket-382.sli
    deleted file mode 100644
    index 8318326a5f..0000000000
    --- a/testsuite/regressiontests/ticket-382.sli
    +++ /dev/null
    @@ -1,62 +0,0 @@
    -/*
    - *  ticket-382.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Regression test for Ticket #382
    - *
    - * voltmeter fails assertion/seg faults when connected after simulation.
    - * 
    - * This test asserts that one can connect voltmeter and multimeter after having
    - * simulated for some time first.
    - *
    - * Hans E Plesser, 2010-04-22
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -<< >> begin
    -
    -{
    -  ResetKernel
    -  /vm /voltmeter Create def
    -  /n /iaf_psc_alpha Create def
    -  10 Simulate
    -  vm n 1.0 0.1 Connect
    -  10 Simulate
    -}
    -pass_or_die
    -
    -{
    -  ResetKernel
    -  /mm /multimeter << /record_from [/V_m] >> Create def
    -  /n /iaf_psc_alpha Create def
    -  10 Simulate
    -  mm n 1.0 0.1 Connect
    -  10 Simulate
    -}
    -pass_or_die
    -
    -end
    -
    -endusing
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-386.sli b/testsuite/regressiontests/ticket-386.sli
    deleted file mode 100644
    index 1578c8fa14..0000000000
    --- a/testsuite/regressiontests/ticket-386.sli
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/*
    - *  ticket-386.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::ticket-386 - ensure all models supporting multimeter work at minimal interval
    -
    -Synopsis: (ticket-386.sli) run -> dies if test code crashes
    -
    -Description:
    -Due to wrong use of calibrate(), recording from ht_neuron with multimeter
    -with interval equal to resolution crashed. This test briefly simulates
    -nets with each model supporting multimeter recorded at interval equal to
    -resolution.
    -Author: Plesser
    -FirstVersion: 2010-10-03
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/resolution 0.1 def
    -
    -% Execute test for one model
    -% Argument: model name
    -% Result: -
    -/run_test
    -{
    -  ResetKernel
    -  << /resolution resolution >> SetKernelStatus
    -  /model Set
    -
    -  model GetDefaults dup
    -  /recordables known
    -  {
    -    /recordables get /recs Set
    -    /n model Create def
    -
    -    % if the model is a compartmental model,
    -    % we need to add at least a root compartment
    -    model GetDefaults dup
    -    /compartments known
    -    {
    -      n
    -      <<
    -        /compartments << /parent_idx -1  >>
    -      >> SetStatus
    -    }
    -    if
    -
    -    /mm /multimeter << /record_from recs /interval resolution >> Create def
    -    mm n Connect
    -    10.0 Simulate
    -  }
    -  if
    -}
    -def
    -
    -{
    -  GetKernelStatus /node_models get { run_test } forall
    -}
    -pass_or_die
    -
    diff --git a/testsuite/regressiontests/ticket-414.sli b/testsuite/regressiontests/ticket-414.sli
    deleted file mode 100644
    index a8286c6e22..0000000000
    --- a/testsuite/regressiontests/ticket-414.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  ticket-414.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Regression test for Ticket #414
    - *
    - * Frozen nodes fire assertion when receiving spike.
    - * 
    - * This test asserts that neurons can receive spikes even when frozen.  
    - *
    - * Hans E Plesser, 2010-04-21
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -<< >> begin
    -
    -{
    -ResetKernel
    -/spike_generator << /precise_times false /spike_times [1.0] >> Create
    -/iaf_psc_alpha Create dup << /frozen true >> SetStatus
    -Connect
    -10 Simulate
    -} 
    -pass_or_die
    -
    -end
    -
    -endusing
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-421.sli b/testsuite/regressiontests/ticket-421.sli
    deleted file mode 100644
    index f714caf65d..0000000000
    --- a/testsuite/regressiontests/ticket-421.sli
    +++ /dev/null
    @@ -1,102 +0,0 @@
    -/*
    - *  ticket-421.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-421 - Minimal test against missing variable initializations
    -
    -Synopsis: (ticket-421) run -> NEST exits if test fails
    -
    -Description:
    - This test simulates all nodes providing V_m for a short while and
    - checks that V_m remains constant. This is a minimal test against
    - missing variable initializations, cf ticket #421.
    - 
    -Remarks:
    -   - Passing this test does not mean that all variables are properly initialized. It may just catch some cases bad cases.
    -   - Simulator response to initialization errors is stochastic, so if variables are not initialized properly, this test may
    -     fail in some runs and not in others.
    -   - Neuron models that do not initialize V_m to steady state, must be added to the exclude_models list below!
    -   - If this test fails, please see installcheck.log for which model the test failed.
    -     The check if that model really initializes the membrane potential V_m to the steady-state value in absence of any input. If not, add the model to the exclude_models list below.
    -
    -
    -Author: Hans Ekkehard Plesser, 2010-05-05 
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% models that should not be tested because they do not initialize V_m to
    -% steady state
    -/exclude_models [/aeif_cond_exp /aeif_cond_alpha /a2eif_cond_exp /a2eif_cond_exp_HW 
    -                 /aeif_cond_alpha_multisynapse /aeif_psc_delta_clopath
    -                 /aeif_psc_exp /aeif_psc_alpha /aeif_psc_delta /aeif_cond_beta_multisynapse /hh_cond_exp_traub
    -                 /hh_cond_beta_gap_traub /hh_psc_alpha /hh_psc_alpha_clopath /hh_psc_alpha_gap /ht_neuron /ht_neuron_fs
    -                 /iaf_cond_exp_sfa_rr /izhikevich] def
    -
    -% use power-of-two resolution to avoid roundof problems
    -/res -3 dexp def
    -
    -M_WARNING setverbosity
    -
    -{
    -  GetKernelStatus /node_models get
    -  {
    -    /model Set
    -
    -    ResetKernel
    -    << /resolution res >> SetKernelStatus
    -
    -    % check if model has V_m, if none or excluded return true
    -    false exclude_models { model eq or } Fold not
    -    model GetDefaults /V_m known and
    -    {
    -      % store initial membrane potential
    -      model GetDefaults /V_m get /Vm0 Set
    -
    -      % create and simulate single time step:
    -      % if bad initial values has no effect now, it won't later
    -      /n model Create def
    -      res Simulate
    -
    -      % check membrane potential for equality
    -      n /V_m get Vm0 sub abs 1e-13 lt
    -
    -      dup 
    -      { (*** OK: ) model cvs join ( *** ) join == } 
    -      { (###### FAIL : ) model cvs join 
    -        ( Vm0 = ) join Vm0 cvs join ( Vm = ) join n /V_m get cvs  join == 
    -      } ifelse
    -    }   
    -    { true }
    -    ifelse
    -  }
    -  Map
    -
    -  % see if all entries are true
    -  true exch { and } Fold
    -
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-433.sli b/testsuite/regressiontests/ticket-433.sli
    deleted file mode 100644
    index 7b6673537b..0000000000
    --- a/testsuite/regressiontests/ticket-433.sli
    +++ /dev/null
    @@ -1,187 +0,0 @@
    -/*
    - *  ticket-433.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-433 - Test against receptor_type mishandling in ht_neuron
    -
    -Synopsis: (ticket-433) run -> NEST exits if test fails
    -
    -Description:
    - ht_neuron accepted incoming connections with invalid receptor type, leading to
    - unpredictable errors. Additionally, when making connections with nodes with
    - spatial information, the receptor_type did not seem to be passed on.
    -
    - Reported by Jonathan Williford.
    -
    -Author: Hans Ekkehard Plesser, 2010-06-28
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_without_gsl
    -
    -% This test should only run if we have GSL
    -skip_if_without_gsl
    -
    -M_INFO setverbosity
    -
    -% the following the functions expect that the following variables
    -% are defined:
    -%  ampa --- AMPA receptor ID
    -%  retina, retina_gen, Tp --- layers
    -
    -% Connection function using spatial parameters
    -% receptor_type passed to ConnectLayers
    -/connect_spatial
    -{
    -  retina
    -  Tp
    -  << /connection_type (pairwise_bernoulli_on_target)
    -     /receptor_type ampa
    -     /synapse_model /ht_synapse
    -     /mask << /circular << /radius 2.0 >> >>
    -  >>
    -  ConnectLayers
    -}
    -bind def
    -
    -% Connection function using spatial parameters
    -% receptor_type placed in synapse
    -/connect_spatial_syn
    -{
    -  /ht_synapse /ht_syn_ampa << /receptor_type ampa >> CopyModel
    -
    -  retina
    -  Tp
    -  << /connection_type (pairwise_bernoulli_on_target)
    -     /synapse_model /ht_syn_ampa
    -     /mask << /circular << /radius 2.0 >> >>
    -  >>
    -  ConnectLayers
    -}
    -bind def
    -
    -% Connection function using explicit receptor type --- passes
    -/connect_explicit_rt
    -{
    -  retina_gen 100 Take Tp 100 Take
    -  << /rule /one_to_one >> << /receptor_type ampa >>
    -  Connect
    -}
    -bind def
    -
    -% Connection function not giving receptor type --- fails
    -/connect_implicit_rt
    -{
    -  retina_gen 100 Take Tp 100 Take /one_to_one Connect
    -}
    -bind def
    -
    -% Actual test function, expects connection function as input
    -/test_connect
    -{
    -  /connfun Set
    -
    -  ResetKernel
    -  /ht_neuron /ThalamicNeuron CopyModel
    -  /poisson_generator /RetinaGen << /rate 10.0 >> CopyModel
    -  /parrot_neuron /RetinaNode CopyModel
    -
    -  /ampa /ht_neuron GetDefaults /receptor_types get /AMPA get def
    -
    -  /layerProps << /shape [ 10 10 ] /extent [8.0 8.0] >> def
    -
    -  layerProps << /elements /RetinaGen >> join
    -  /retina_gen layerProps CreateLayer def
    -
    -  layerProps << /elements /RetinaNode >> join
    -  /retina layerProps CreateLayer def
    -
    -  layerProps << /elements /ThalamicNeuron >> join
    -  /Tp layerProps CreateLayer def
    -
    -  retina_gen retina /one_to_one Connect
    -
    -  connfun load exec
    -
    -  10. Simulate
    -}
    -bind def
    -
    -% first test: explicit receptor type, should pass
    -{
    -  /connect_explicit_rt
    -  test_connect
    -}
    - pass_or_die
    -
    -% second test: implicit receptor type
    -% this must raise an error, otherwise lacking receptor_type is not detected
    -{
    -  /connect_implicit_rt
    -  test_connect
    -}
    -fail_or_die
    -
    -% third test: connect using ConnectLayers
    -% receptor_type properly passed
    -{
    -  /connect_spatial
    -  test_connect
    -}
    -pass_or_die
    -
    -% fourth test: connect using ConnectLayers, but with
    -% properly configured synapse model
    -{
    -  /connect_spatial_syn
    -  test_connect
    -}
    - pass_or_die
    -
    -% fifth test: assert that all models that have /receptor_types reject
    -% connections with plain static_synapse
    -{
    -  ResetKernel
    -  GetKernelStatus /node_models get
    -  {
    -    /mod Set
    -    mod GetDefaults /dflts Set
    -    dflts /receptor_types known
    -    {
    -      % next condition avoids models with auto-generated
    -      % ports, such as iaf_cond_alpha_multisynapse
    -      % might be eliminated if #434 removes 0-port.
    -      dflts /receptor_types get cva length 0 geq
    -      {
    -        { ResetKernel
    -          mod Create mod Create
    -          << >> /static_synapse Connect
    -        } fail_or_die
    -      } if
    -    } if
    -  } forall
    -}  pass_or_die % overall wrapper
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-451.sli b/testsuite/regressiontests/ticket-451.sli
    deleted file mode 100644
    index 5516d7a27e..0000000000
    --- a/testsuite/regressiontests/ticket-451.sli
    +++ /dev/null
    @@ -1,95 +0,0 @@
    -/*
    - *  ticket-451.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-451 - Guard against infinte loops in Random*Connect
    -
    -Synopsis: (ticket-451) run -> NEST exits if test fails
    -
    -Description:
    - Random connection routines can hang in infinite loops if the user request
    - more connections than possible if restrictions on multapses and autapses
    - are taken into account. This test ensures that such conditions are caught.
    -
    -Author: Hans Ekkehard Plesser, 2010-09-20
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_INFO setverbosity
    -
    -/nodes /iaf_psc_alpha 3 Create def
    -/first nodes [1 1] Take def
    -
    -{
    -nodes first << /rule /fixed_indegree /indegree 4 /allow_multapses false /allow_autapses true >> Connect
    -} fail_or_die
    -
    -{
    -nodes first << /rule /fixed_indegree /indegree 3 /allow_multapses false /allow_autapses true >> Connect
    -} pass_or_die
    -
    -{
    -nodes first << /rule /fixed_indegree /indegree 2 /allow_multapses false /allow_autapses true >> Connect
    -} pass_or_die
    -
    -{
    -nodes first << /rule /fixed_indegree /indegree 4 /allow_multapses false /allow_autapses false >> Connect
    -} fail_or_die
    -
    -{
    -nodes first << /rule /fixed_indegree /indegree 2 /allow_multapses false /allow_autapses false >> Connect
    -} pass_or_die
    -
    -{
    -nodes first << /rule /fixed_indegree /indegree 1 /allow_multapses true /allow_autapses true >> Connect
    -} pass_or_die
    -
    -% ---------------------
    -
    -{
    -first nodes << /rule /fixed_outdegree /outdegree 4 /allow_multapses false /allow_autapses true >> Connect
    -} fail_or_die
    -
    -{
    -first nodes << /rule /fixed_outdegree /outdegree 3 /allow_multapses false /allow_autapses true >> Connect
    -} pass_or_die
    -
    -{
    -first nodes << /rule /fixed_outdegree /outdegree 2 /allow_multapses false /allow_autapses true >> Connect
    -} pass_or_die
    -
    -{
    -first nodes << /rule /fixed_outdegree /outdegree 4 /allow_multapses false /allow_autapses false >> Connect
    -} fail_or_die
    -
    -{
    -first nodes << /rule /fixed_outdegree /outdegree 2 /allow_multapses false /allow_autapses false >> Connect
    -} pass_or_die
    -
    -{
    -first nodes << /rule /fixed_outdegree /outdegree 1 /allow_multapses true /allow_autapses false >> Connect
    -} pass_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-452.sli b/testsuite/regressiontests/ticket-452.sli
    deleted file mode 100644
    index 9de6dd7772..0000000000
    --- a/testsuite/regressiontests/ticket-452.sli
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/*
    - *  ticket-452.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-452 - Ensure that precise simulations give identical results whether stepped or run continuously
    -
    -Synopsis: (ticket-452) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that simulations with precise spike timing yield identical results independent of
    -whether one simulates the full simulation time without interruption, or splits the simulation
    -into many small pieces.
    -
    -The problem was unrelated to the setting of kernel property  /off_grid_spiking
    -and the spike_recorder property  /precise_times.
    - 
    -Author: Hans Ekkehard Plesser, 2010-09-30; based on original reproduced code by Alexander Hanuschkin
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -/Run
    -{
    - /model Set
    - /simcommand Set
    -
    - ResetKernel
    -                                    % 0.125 ms
    - << /tics_per_ms 3 dexp  /resolution -3 dexp >> SetKernelStatus
    -
    - model << /I_e 500.0  >> Create /n Set
    - 
    - /poisson_generator_ps << /rate 10000.0 /start 0.0  >> Create  /pg Set
    -   
    - pg n 1.0 1.0 Connect
    -
    - /spike_recorder Create /sr Set
    -
    - n sr Connect
    -
    - simcommand
    -
    - sr [/events /times] get cva 
    -
    -} def 
    -
    -
    -[/iaf_psc_delta_ps /iaf_psc_alpha_ps ]
    -{
    - {Run} exch prepend
    - [
    -  {500.0 Simulate} 
    -  {1 1 500  {; 1.0 Simulate} for}  
    - ]
    - exch forall eq 
    -}
    -forall 
    -
    -and assert_or_die
    -
    diff --git a/testsuite/regressiontests/ticket-459.sli b/testsuite/regressiontests/ticket-459.sli
    deleted file mode 100644
    index 4ecf543c1a..0000000000
    --- a/testsuite/regressiontests/ticket-459.sli
    +++ /dev/null
    @@ -1,104 +0,0 @@
    -/*
    - *  ticket-459.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::ticket-459 - test that changing the leak reversal potential leaves all other neuron parameters else unchanged
    -
    -Synopsis: (ticket-459.sli) run -> dies if assertion fails
    -
    -Description:
    -For all models having a reversal potential E_L, we change this potential and check that
    -all other parameters and properties of the model remain unchanged. #459 reports that the
    -order in which E_L and V_th are set determines which values are actually set. This is a
    -direct consequence of incorrect handling of changes to E_L, which show up as changes in,
    -e.g. V_m and V_th as a side effect of changing E_L. This happened in those neuron models
    -that internally represent voltages relative to E_L and did not adjust those values on
    -changes to E_L.
    -
    -Author: Plesser
    -FirstVersion: 2011-02-12
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Execute test for one model
    -% Argument: model name
    -% Result: true or false
    -/run_test
    -{
    -  /model Set
    -  model Create /nrn Set
    -
    -  % find any keys to double values that are not finite
    -  % set them to finite value to make sure that they will
    -  % be tested below
    -  /infdict << >> def
    -  model GetDefaults /mdefs Set
    -  mdefs keys
    -  {  /k Set mdefs k get DoubleQ { FiniteQ not { infdict k -150. put } if } if pop }
    -  forall
    -  nrn infdict SetStatus
    -
    -  nrn GetStatus 0 get /pre Set
    -  pre /E_L get /ELorig Set
    -
    -  ELorig 1.0 add /ELnew Set
    -  nrn << /E_L ELnew >> SetStatus
    -  nrn GetStatus 0 get /post Set
    -
    -  pre keys post keys eq assert
    -  % compare all numeric pre-post values, except changed E_L
    -  pre /E_L undef pre keys
    -  {
    -    /key Set
    -     pre key get DoubleQ
    -     {
    -        dup post key get sub abs % |post-pre| < 1e-15 |pre|
    -        exch abs 1e-15 mul leq
    -     }
    -     { pop true }
    -     ifelse
    -  } Map
    -  true exch { and } Fold
    -  dup not { model =only (  FAILED) = } if
    -}
    -def
    -
    -{
    -  GetKernelStatus /node_models get
    -  {
    -    dup GetDefaults /E_L known
    -    {
    -      run_test
    -    }
    -    {
    -      pop   % no E_L, pass, true by default
    -      true
    -    } ifelse
    -  } Map
    -  true exch { and } Fold
    -}
    -assert_or_die
    diff --git a/testsuite/regressiontests/ticket-464.sli b/testsuite/regressiontests/ticket-464.sli
    deleted file mode 100644
    index 53be57531b..0000000000
    --- a/testsuite/regressiontests/ticket-464.sli
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    - *  ticket-464.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-464 - Ensure that UniversalDataLogger triggers assertion with frozen multimeter.
    -
    -Synopsis: (ticket-464) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that NEST triggers an assertion in UniversalDataLogger::record_data() instead of seg faulting
    -when a frozen multimeter is connected to a node.
    -
    -Remarks:
    -This test has been modified (2011-02-11) to reflect the fact that NEST now protects
    -multimeter against being frozen. Thus, the first test triggers an error instead of
    -and assertion, and crash_or_die has been replaced by fail_or_die.
    -
    -This test will only be executed if NEST has been compiled without MPI support.
    - 
    -Author: Hans Ekkehard Plesser, 2010-10-04
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced 
    -% by a restart of NEST with a serial binary.
    -skip_if_have_mpi
    -
    -M_ERROR setverbosity
    -
    -% crash_or_die needs explicit code, cannot handle function names.
    -
    -% multimeter frozen, should trigger assertion
    -{
    -  ResetKernel
    -  /multimeter << /record_from [/V_m] >> Create dup << /frozen true >> SetStatus
    -  /iaf_psc_alpha Create
    -  Connect
    -  3.0 Simulate
    -} fail_or_die % was crash_or_die
    -
    -% multimeter thawed, should run fine
    -{
    -  ResetKernel
    -  /multimeter << /record_from [/V_m] >> Create dup << /frozen false >> SetStatus
    -  /iaf_psc_alpha Create
    -  Connect
    -  3.0 Simulate
    -} pass_or_die
    -
    -endusing
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-466.sli b/testsuite/regressiontests/ticket-466.sli
    deleted file mode 100644
    index ef8dfa8002..0000000000
    --- a/testsuite/regressiontests/ticket-466.sli
    +++ /dev/null
    @@ -1,56 +0,0 @@
    -/*
    - *  ticket-466.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::ticket-466.sli - test if mirollo_strogatz_ps can handle simultaneous inputs
    -
    -Synopsis: (ticket-466.sli) run -> dies if assertion fails
    -
    -Description:
    -Feeds mirollo_strogatz_ps two simultaneous inputs, triggers assertion per r8864.
    -
    -Author: Plesser
    -FirstVersion: 2010-10-05
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -GetKernelStatus /node_models get /mirollo_strogatz_ps MemberQ not
    -{
    -  /skipped exit_test_gracefully
    -} if
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -  /n /mirollo_strogatz_ps Create def
    -  /sg /spike_generator << /precise_times false
    -                          /spike_times [ 0.1 0.1 ]
    -		       >> Create def
    -  sg n Connect
    -  1.5 Simulate
    -} pass_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-475.sli b/testsuite/regressiontests/ticket-475.sli
    deleted file mode 100644
    index 7750eeb684..0000000000
    --- a/testsuite/regressiontests/ticket-475.sli
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  ticket-475.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-475 - Ensure that data collection across threads works
    -
    -Synopsis: (ticket-475) run -> NEST exits if test fails
    -
    -Description:
    -Compilation on Stallo with icpc 11.1 cause crashed when collecting data across
    -threads.
    - 
    -Author: Hans Ekkehard Plesser, 2010-10-11
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_INFO setverbosity
    -
    -
    -{
    -  /spike_recorder Create 
    -%  sd ShowStatus
    -  %10 Simulate
    - % sd GetStatus
    -} pass_or_die
    -
    -endusing
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-478.sli b/testsuite/regressiontests/ticket-478.sli
    deleted file mode 100644
    index e8c1a247a5..0000000000
    --- a/testsuite/regressiontests/ticket-478.sli
    +++ /dev/null
    @@ -1,123 +0,0 @@
    -/*
    - *  ticket-478.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-478 Ensure that devices can only be connected using static synapses.
    -
    -Synopsis: (ticket-478) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that NEST throws an exception if one tries to connect poisson_generator
    -(sending DSSpikeEvents), noise_generator (sending DSCurrentEvents) or multimeter
    -(sending DataLoggingRequest) to a neuron using a plastic synapse.
    -
    -spike_generator slips through this test, since it usually sends SpikeEvent. But it
    -is no danger if it sends DSSpikeEvents for weighted spikes, since it sends precisely
    -one DSSpikeEvent per spike.
    -
    -Author: Hans Ekkehard Plesser, 2010-10-22
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -% Gap junctions not relevant for spiking devices as senders
    -/excluded_synapses [ /gap_junction ] def
    -
    -% find all static and plastic synapses
    -% we identify as static all synapses that have the same default parameter names
    -% as static_synapse or static_synapse_lbl
    -/static_defaults
    -  /static_synapse GetDefaults keys { cvs } Map Sort
    -def
    -/static_lbl_defaults
    -  /static_synapse_lbl GetDefaults keys { cvs } Map Sort
    -def
    -
    -/static_syn_models
    -  GetKernelStatus /synapse_models get
    -  { excluded_synapses exch MemberQ not } Select
    -  { GetDefaults keys { cvs } Map Sort static_defaults eq } Select
    -  { GetDefaults keys { cvs } Map Sort static_lbl_defaults eq } Select
    -def
    -
    -/plastic_syn_models
    -  GetKernelStatus /synapse_models get
    -  { excluded_synapses exch MemberQ not } Select
    -  { GetDefaults keys { cvs } Map Sort static_defaults neq } Select
    -  { GetDefaults keys { cvs } Map Sort static_lbl_defaults neq } Select
    -def
    -
    -% We perform the tests first for all relevant generators
    -/ds_models
    -  [/gamma_sup_generator /mip_generator /noise_generator /poisson_generator
    -   /ppd_sup_generator /sinusoidal_gamma_generator /poisson_generator_ps]
    -  { GetKernelStatus /node_models get exch MemberQ } Select
    -def
    -
    -ResetKernel
    -{
    -  static_syn_models
    -  { /st Set
    -    % create new nodes for each connection to avoid any issues with prohibited multiple connections
    -    ds_models
    -    { Create /iaf_psc_alpha Create st Connect } forall
    -  } forall
    -} pass_or_die
    -
    -ResetKernel
    -plastic_syn_models
    -{
    -    /st Set
    -    ds_models
    -    {
    -      /d Set
    -      { d Create /iaf_psc_alpha Create st Connect } fail_or_die
    -    } forall
    -} forall
    -
    - % Now we test the multimeter. Since it uses non-zero rports, it must also fail on HPC synapses
    - % We can currently only distinguish them by name.
    - /static_non_hpc_models static_syn_models { cvs -4 Take (_hpc) neq } Select def
    - /models_to_fail plastic_syn_models  static_syn_models { cvs -4 Take (_hpc) eq } Select join def
    -
    -ResetKernel
    -{
    -  static_non_hpc_models
    -  { /st Set
    -    % create new nodes for each connection to avoid any issues with prohibited multiple connections
    -    /multimeter Create /iaf_psc_alpha Create st Connect
    -  } forall
    -} pass_or_die
    -
    -ResetKernel
    -models_to_fail
    -{
    -    /st Set
    -    /multimeter Create /iaf_psc_alpha Create { st Connect } fail_or_die
    -} forall
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-481.sli b/testsuite/regressiontests/ticket-481.sli
    deleted file mode 100644
    index 9ffc111025..0000000000
    --- a/testsuite/regressiontests/ticket-481.sli
    +++ /dev/null
    @@ -1,122 +0,0 @@
    -/*
    - *  ticket-481.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-481 - Ensure that poisson_generator_ps delivers spikes to more than one node
    -
    -Synopsis: (ticket-481) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that poisson_generator_ps delivers spikes to more than one node.
    -
    -Peiran Gao reported to nest_bugs that poisson_generator_ps.
    -
    -First analysis indicates that spikes are lost if poisson_generator_ps is connected
    -to target neurons using different synapse models, even if those are just copies of
    -the same underlying class.
    - 
    -Author: Hans Ekkehard Plesser, 2010-11-03; based on original reproducer by Peiran Gao
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% if true, exec and show results instead of asserting
    -/debugging false def
    -
    -/dt -3 dexp def  % 0.125 ms
    -
    -
    -% expects on stack:
    -% syn model 2
    -% syn model 1
    -% neuron model
    -%
    -% returns: whether voltage for either neurons exceeded Vref
    -/Run
    -{
    - /syn2 Set
    - /syn1 Set
    - /model Set
    -  
    - debugging {
    -   model cvs ( ) join syn1 cvs join ( ) join syn2 cvs join ( : ) join =only
    - } if
    -
    - /Vref -70.0 def
    -
    - model << /V_m Vref /E_L Vref /V_th 1e10 /I_e 0.0  >> Create /n1 Set
    - model << /V_m Vref /E_L Vref /V_th 1e10 /I_e 0.0  >> Create /n2 Set
    - 
    - /poisson_generator_ps << /rate 10000.0 /start 0.0  >> Create  /pg Set
    - /voltmeter << /interval dt >>                         Create /vm1 Set
    - /voltmeter << /interval dt >>                         Create /vm2 Set
    -
    - pg n1 << >> syn1 Connect
    - pg n2 << >> syn2 Connect
    -   
    - vm1 n1 Connect
    - vm2 n2 Connect  
    -
    - 1000 Simulate
    - vm1 [/events /V_m] get cva Max Vref gt  
    - vm2 [/events /V_m] get cva Max Vref gt  
    -
    -} def
    -
    -/setup
    -{
    -  ResetKernel
    -  << /tics_per_ms 1.0 dt div round /resolution dt >> SetKernelStatus
    -} def
    -
    -{
    -  setup
    -
    -  % this case always went well
    -  /iaf_psc_delta_ps /static_synapse /static_synapse Run
    -  and
    -} debugging { exec = } { assert_or_die } ifelse
    -
    -% identical synapse models, must pass
    -{
    -  setup
    -
    -  /static_synapse /hoo CopyModel
    -  /iaf_psc_delta_ps /hoo /hoo Run
    -  and
    -} debugging { exec = } { assert_or_die } ifelse
    -
    -% mixed case, must throw execption
    -% must be last in test script, since exception occurs in middle of
    -% simulation, leaving kernel in unresettable state.
    -{
    -  setup
    -
    -  /static_synapse /foo CopyModel
    -  /static_synapse /goo CopyModel
    -  /iaf_psc_delta_ps /foo /goo Run
    -  and
    -} debugging { exec = } { fail_or_die } ifelse
    diff --git a/testsuite/regressiontests/ticket-507.sli b/testsuite/regressiontests/ticket-507.sli
    deleted file mode 100644
    index a45af7b863..0000000000
    --- a/testsuite/regressiontests/ticket-507.sli
    +++ /dev/null
    @@ -1,75 +0,0 @@
    -/*
    - *  ticket-507.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-507 - Ensure that spike_generator throws exception on SetStatus if precise (off-grid) spike times are set
    -
    -Synopsis: (ticket-507) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that spike_generator throws exception on SetStatus if off-grid times are set,
    -unless precise_times is set.
    - 
    -Author: Hans Ekkehard Plesser, 2011-03-18
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% this should be fine
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /spike_generator Create
    -  << /spike_times [0.2] /precise_times false >> SetStatus
    -}
    -pass_or_die
    -
    -% this should fail 
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /spike_generator Create
    -  << /spike_times [0.1 0.123456789 0.22345567854] /precise_times false >> SetStatus
    -}
    -fail_or_die
    -
    -% this should fail 
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /spike_generator Create
    -  << /spike_times [0.123456789] /precise_times false >> SetStatus
    -}
    -fail_or_die
    -
    -% this should pass as precise_times is true 
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /spike_generator Create
    -  << /spike_times [0.123456789] /precise_times true >> SetStatus
    -}
    -pass_or_die
    diff --git a/testsuite/regressiontests/ticket-514.sli b/testsuite/regressiontests/ticket-514.sli
    deleted file mode 100644
    index b5488c5448..0000000000
    --- a/testsuite/regressiontests/ticket-514.sli
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  ticket-514.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/*
    -   Test for Ticket 156.
    -
    -   This test verifies that:
    -   poisson_generator_ps can be connected to more than 128 targets.
    -   This might fail, if the datatype for the sender port
    -   is limited to 8 bit, as was true after checkin of
    -   r9192.
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/single_trial
    -{
    -  << >> begin
    -    /h Set
    -    ResetKernel
    -    << /resolution h >> SetKernelStatus
    -  
    -    /poisson_generator_ps Create /pg Set
    -    pg << /rate 1000. >> SetStatus
    -
    -    /neurons /iaf_psc_delta 1000 Create def
    -
    -    pg neurons Connect
    -
    -    1000. Simulate
    -  end
    -} def
    -
    -% will cause an assertion, if type of port if byte
    -0.1 single_trial
    -
    diff --git a/testsuite/regressiontests/ticket-537.sli b/testsuite/regressiontests/ticket-537.sli
    deleted file mode 100644
    index 61fce0b599..0000000000
    --- a/testsuite/regressiontests/ticket-537.sli
    +++ /dev/null
    @@ -1,61 +0,0 @@
    -/*
    - *  ticket-537.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-537 - Regression test for memory allocation/free error in TokenarrayObj
    -
    -Synopsis: (ticket-537) run -> NEST exits if test fails
    -
    -Description:
    -This test detects a memory allocation/freeing problem introduced with the SLI modernization per r9458. 
    -This bug occured only on certain Linux platforms.
    - 
    -Author: Hans Ekkehard Plesser, 2012-01-12, based on reproduces by Marc-Oliver Gewaltig
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Original reproducer
    -{
    -  /a [2] def
    -  1000 { a { } Map } repeat
    -}
    -pass_or_die
    -
    -% Simplified reproducer for Map
    -{
    -  100 { [] { } Map } repeat
    -}
    -pass_or_die
    -
    -% Reproducer for forall, still fails per r9476
    -{
    -  100 { (1 2) { } forall } repeat
    -}
    -pass_or_die
    -
    -
    -endusing
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-564.sli b/testsuite/regressiontests/ticket-564.sli
    deleted file mode 100644
    index 67780bedc9..0000000000
    --- a/testsuite/regressiontests/ticket-564.sli
    +++ /dev/null
    @@ -1,65 +0,0 @@
    -/*
    - *  ticket-564.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-564 - Regression test for OpenMP-parallel problems on OSX
    -
    -Synopsis: (ticket-564) run -> NEST exits if test fails
    -
    -Description: 
    -This test uses Connect to connect a net of 100 neurons
    -to itself, with 100 connections per neuron, a total of 10000 connections.
    -This is repeated 10 times, and the resulting number of connections checked. 
    - 
    -Author: Hans Ekkehard Plesser, 2012-05-27
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -{ 
    -  /N    100  def % number of neurons
    -  /C    100  def % number of connections per neuron
    -  /N_VP 4    def % number of virtual processes
    -  /ConnExpected N C mul def
    -
    -  [ 10 ]
    -  {
    -    pop    
    -    ResetKernel    
    -    << /total_num_virtual_procs N_VP >> SetKernelStatus
    -
    -    /nodes /iaf_psc_alpha N Create def
    -    nodes nodes << /rule /fixed_indegree /indegree C >> Connect
    -
    -    GetKernelStatus /num_connections get dup ==
    -  } Table
    -  dup ==
    -  true exch { ConnExpected eq and } Fold
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-566.sli b/testsuite/regressiontests/ticket-566.sli
    deleted file mode 100644
    index d6db690ede..0000000000
    --- a/testsuite/regressiontests/ticket-566.sli
    +++ /dev/null
    @@ -1,52 +0,0 @@
    -/*
    - *  ticket-566.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-566 - Regression test for setting a fake number of processes.
    -
    -Synopsis: (ticket-566) run -> NEST exits if test fails
    -
    -Description: 
    -Ensure that kernel set status of num_procs does no longer work and
    -check that SetFakeNumProcesses sets num_processes in the kernel.
    -
    -Author: Susanne Kunkel, 2012-12-04
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{ 
    -  << /num_procs 777 >> SetKernelStatus
    -}
    -fail_or_die
    -
    -{
    -  777 SetFakeNumProcesses
    -  GetKernelStatus /num_processes get 777 eq
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-573.sli b/testsuite/regressiontests/ticket-573.sli
    deleted file mode 100644
    index eede3738aa..0000000000
    --- a/testsuite/regressiontests/ticket-573.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  ticket-573.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-573 - Maximum number of synapse types reached in copy_connection_model without error message
    -
    -Synopsis: (ticket-573) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that nest throws an error message if number of synapse types exceeds the maximum number of 255
    -
    -
    -Author: Maximilian Schmidt, 2014-02-20
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -/max_num_syn_models 0 GetStatus /max_num_syn_models get def
    -[1 max_num_syn_models] Range
    -{
    -    cvs (syn) exch join cvlit
    -    /static_synapse
    -    exch
    -    CopyModel
    -}forall
    -} fail_or_die
    diff --git a/testsuite/regressiontests/ticket-580.sli b/testsuite/regressiontests/ticket-580.sli
    deleted file mode 100644
    index 73c8d752c9..0000000000
    --- a/testsuite/regressiontests/ticket-580.sli
    +++ /dev/null
    @@ -1,105 +0,0 @@
    -/*
    - *  ticket-580.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-580 - getinterval: No error if range of array is exceeded
    -
    -Synopsis: (ticket-564) run -> NEST exits if test fails
    -
    -Description: 
    -1) This test checks whether the sli functions getinterval and Take perform Range Checks, i.e. whether they throw errors if the requested part of the interval exceeds the original array or not. 
    -2) Furthermore, it checks whether getinterval throws an error if negative indices are given and whether Takes does not throw an error.
    -3) Checks whether Take returns an empty array if n_2 < n_1
    -
    -In addition, it checks whether they return the same results for a correct usage.
    - 
    -Author: Maximilian Schmidt, 2012-10-16
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -[0 2] Range /x Set
    -(Hallo) /y Set
    -
    -
    -{ 
    -  x [1 4] Take
    -} fail_or_die
    -
    -{
    -  x [2 1] Take
    -  [] eq
    -} assert_or_die
    -
    -{
    -  x -2 Take
    -  [1 2] eq
    -} assert_or_die
    -
    -{
    -  x [-2 -1] Take
    -  [1 2] eq
    -} assert_or_die
    -
    -{
    -  x 0 Take
    -  [] eq
    -} assert_or_die
    -
    -{ 
    -  x 0 4 getinterval
    -} fail_or_die
    -
    -{
    -  x -2 2 getinterval
    -} fail_or_die
    -
    -{
    -  x 0 -1 getinterval
    -} fail_or_die
    -
    -
    -{
    -  y -2 2 getinterval
    -} fail_or_die
    -
    -{
    -  y 0 6 getinterval
    -} fail_or_die
    -
    -{
    -  y 0 -1 getinterval
    -} fail_or_die
    -
    -{
    -  x [1 3] Take
    -  x 0 3 getinterval
    -  eq
    -} assert_or_die
    -
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-618.sli b/testsuite/regressiontests/ticket-618.sli
    deleted file mode 100644
    index c4078dae28..0000000000
    --- a/testsuite/regressiontests/ticket-618.sli
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -/*
    - *  ticket-618.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-618 - catch nodes which require tau_mem != tau_syn
    -
    -Synopsis: (ticket-618) run -> NEST exits if test fails
    -
    -Description: 
    -All neuron models using exact integration require that tau_mem != tau_syn.
    -This test ensures that all pertaining models raise an exception if
    -tau_mem == tau_syn.
    -
    -The test does so by ensuring that any model that has tau_* properties and V_m,
    -either throws an exception when all tau_ properties are set to the same value,
    -or has a non-nan V_m after 10ms simulation.
    -
    -This test should be updated when alternative implementations of exact integration
    -for the degenerate case are in place.
    - 
    -Author: Hans Ekkehard Plesser, 2012-12-11
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  GetKernelStatus /node_models get
    -  {
    -    ResetKernel
    -
    -    /model Set
    -    /modelprops model GetDefaults def
    -
    -    /result true def % pass by default
    -
    -    % skip models without V_m
    -    modelprops /V_m known
    -    {        
    -      % build dict setting all tau_* props to 10.
    -      /propdict << >> def
    -      modelprops keys
    -      { 
    -        /key Set 
    -        key cvs length 4 geq
    -        {
    -          key cvs 0 4 getinterval (tau_) eq
    -          {
    -            propdict key 10.0 put_d
    -          } if
    -        } if
    -      } forall
    -
    -      % skip models without tau_*
    -      propdict empty not exch ;
    -      {       
    -        % the next line shall provoke an error for some
    -        % models
    -        mark
    -        { 
    -          /n model propdict Create def
    -	}       
    -        stopped
    -        {
    -          % we got an error, need to clean up
    -          % remove error code
    -	  errordict /message undef
    -	  errordict /command undef
    -	  errordict begin /newerror false def end
    -
    -	  % clear stack
    -	  counttomark npop pop % need to pop mark separately
    - 	}
    -        {
    -          pop % mark
    -	  
    -          % no error, simulate and check membrane potential is not nan
    -          10. Simulate	  
    -          /result n /V_m get cvs (nan) neq def	  
    -	}
    -        ifelse   % stopped
    -      } 
    -      if  % propdict empty not
    -    }
    -    if  % /V_m known
    -
    -    result % leave result on stack    
    -    dup not { model == } if
    -
    -  }  
    -  Map
    -
    -  true exch { and } Fold
    -  
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-619.sli b/testsuite/regressiontests/ticket-619.sli
    deleted file mode 100644
    index b8be2655a7..0000000000
    --- a/testsuite/regressiontests/ticket-619.sli
    +++ /dev/null
    @@ -1,45 +0,0 @@
    -/*
    - *  ticket-619.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-619 - Regression test for kernel SetStatus problem
    -
    -Synopsis: (ticket-619) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that kernel set status including /time 0.0 works.
    -
    -Author: Hans Ekkehard Plesser, 2012-11-29
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -  << /biological_time 0.0 /rng_seed 1 >> SetKernelStatus
    -} pass_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-638.sli b/testsuite/regressiontests/ticket-638.sli
    deleted file mode 100644
    index be6533a9cf..0000000000
    --- a/testsuite/regressiontests/ticket-638.sli
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -/*
    - *  ticket-638.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-638 - Precise models remain refractory indefinitely
    -
    -Synopsis: (ticket-638) run -> NEST exits if test fails
    -
    -Description: 
    -Ensure that precise models do not remain refractory indefinitely for t_ref==0
    - 
    -Author: Hans Ekkehard Plesser, 2012-12-13
    - */
    -
    -(unittest) run
    -/unittest using
    -M_ERROR setverbosity
    -
    -% model t_ref run_sim -> num spikes
    -/run_sim 
    -{  
    -  /tref Set
    -  ResetKernel
    -  << /I_e 1000. /t_ref tref >> Create /n Set
    -  /spike_recorder Create /sr Set
    -  n sr Connect
    -  100. Simulate
    -  sr /n_events get
    -}
    -def
    -
    -/models [
    -  /iaf_psc_alpha_ps
    -  /iaf_psc_delta_ps
    -  /iaf_psc_exp_ps
    -] def
    -
    -% first: consistency test---all models must produce > 1 spike 
    -{ 
    -  models { 2.0 run_sim 1 gt } Map
    -  true exch { and } Fold
    -} assert_or_die
    -
    -% TEMPORARY MODIFICATION for NEST 2.2: ensure models throw exception
    -% For 2.4, when fixing #638 for real, the test labeled "second" below 
    -% must be re-activated
    -{ /iaf_psc_alpha_ps << /t_ref 0.0 >> Create } fail_or_die
    -{ /iaf_psc_delta_ps << /t_ref 0.0 >> Create } fail_or_die
    -{ /iaf_psc_exp_os << /t_ref 0.0 >> Create } fail_or_die
    -
    -% second: with t_ref == 0, must also produce > 1 spike
    -%
    -%{ 
    -%  models { 0.0 run_sim 1 gt } Map 
    -%  true exch { and } Fold
    -%} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-643.sli b/testsuite/regressiontests/ticket-643.sli
    deleted file mode 100644
    index e225bca137..0000000000
    --- a/testsuite/regressiontests/ticket-643.sli
    +++ /dev/null
    @@ -1,54 +0,0 @@
    -/*
    - *  ticket-643.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -   Test for Ticket 643.
    -
    -   This test verifies that:
    -
    -   If connection counts sometimes become zero due to
    -   incorrect counting, min_delay / max_delay get computed wrongly and the
    -   things tentatively called ring buffers are not allocated
    -   correctly. Subsequently, an out of bounds access crashes the
    -   simulation.
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -<<
    -/local_num_threads 256
    ->> SetKernelStatus
    -
    -/id_neuron /iaf_psc_alpha 1 Create def
    -/id_generator /noise_generator 1 Create def
    -
    -id_generator <<
    -/mean 200.0
    -/std 100.0
    -/dt 1.0
    ->> SetStatus
    -
    -id_generator id_neuron Connect
    -
    -1 Simulate
    diff --git a/testsuite/regressiontests/ticket-673.sli b/testsuite/regressiontests/ticket-673.sli
    deleted file mode 100644
    index 80c842b5da..0000000000
    --- a/testsuite/regressiontests/ticket-673.sli
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    - *  ticket-673.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-673 - Precise models are inconsistent with
    -respect to whether 1 time step is an acceptable refractory time
    -
    -Synopsis: (ticket-673) run -> NEST exits if test fails
    -
    -Description: 
    -Test whether precise models can handle t_ref==simulation resolution
    -
    -Author: Susanne Kunkel, 2013-01-23
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% model t_ref run_sim -> time of 2nd spike
    -/run_sim 
    -{  
    -  /tref Set
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  << /I_e 1000. /t_ref tref >> Create /n Set
    -  /spike_recorder Create /sr Set
    -  n sr Connect
    -  20. Simulate
    -  sr /events get /times get 1 get
    -}
    -def
    -
    -/models [
    -  /iaf_psc_alpha_ps
    -  /iaf_psc_delta_ps
    -  /iaf_psc_exp_ps
    -] def
    -
    -% for all models:
    -%   run the simulation with t_ref=1.0 ms
    -%   run the simulation with t_ref=0.1 ms
    -%   check that the second spike is shifted by 0.9 ms
    -/dt 1.0 0.1 sub def
    -{
    -  models { dup 1.0 run_sim exch 0.1 run_sim sub dt sub abs 1e-15 leq } Map
    -  true exch { and } Fold
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-681.sli b/testsuite/regressiontests/ticket-681.sli
    deleted file mode 100644
    index f2407eaa70..0000000000
    --- a/testsuite/regressiontests/ticket-681.sli
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -/*
    - *  ticket-681.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-681 - Ensure that NEST handles errors during node preparation properly
    -
    -Synopsis: (ticket-681) run -> NEST exits if test fails
    -
    -Description:
    -Ensures that NEST handles errors during calibration gracefully.
    -
    -This test will be run only if NEST is compiled without MPI but with Threads.
    -
    -Author: Hans E Plesser, 2014-11-25, based on reproducer for #536.
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -% preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced
    -% by a restart of NEST with a serial binary.
    -skip_if_have_mpi
    -
    -M_ERROR setverbosity
    -
    -{
    -    ResetKernel
    -    << /local_num_threads 4 /overwrite_files false >> SetKernelStatus
    -    /n /iaf_psc_alpha 4 << /I_e 1500.0 >> Create def
    -    /sr /spike_recorder << /record_to /ascii >> Create def
    -    n sr Connect
    -    1000 Simulate
    -
    -    ResetKernel
    -    0  << /local_num_threads 4 /overwrite_files false >> SetStatus
    -    /n /iaf_psc_alpha 4 << /I_e 1500.0 >> Create def
    -    /sr /spike_recorder << /record_to /ascii >> Create def
    -    n sr Connect
    -    1000 Simulate
    -} failbutnocrash_or_die
    diff --git a/testsuite/regressiontests/ticket-686-positive-parameters.sli b/testsuite/regressiontests/ticket-686-positive-parameters.sli
    deleted file mode 100644
    index 105faaf535..0000000000
    --- a/testsuite/regressiontests/ticket-686-positive-parameters.sli
    +++ /dev/null
    @@ -1,191 +0,0 @@
    -/*
    - *  ticket-686-positive-parameters.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-686 - catch nodes which do not require tau_*, C_m > 0
    -
    -Synopsis: (ticket-686-positive-parameters) run -> NEST exits if test fails
    -
    -Description:
    -This tests ensures that models with parameters C_m or tau_* throw an exception
    -when trying to set a value that is not strictly positive.
    -
    -The test also ensures that values can actually be set to different, positive
    -values.
    -
    -Author: Hans Ekkehard Plesser, 2013-04-18
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Add models that have C_m or tau_* and that should not be checked
    -% This should be devices only.
    -/skipped_models
    -  [ /correlation_detector
    -    /correlomatrix_detector
    -    /correlospinmatrix_detector
    -    /siegert_neuron ]
    -def
    -
    -/models [] def
    -GetKernelStatus /node_models get {
    -  /m Set skipped_models m MemberQ not {
    -    models m append /models Set
    -  } if
    -} forall
    -
    -
    -% model GetPositiveKeyes -> list of keys requiring positive values
    -% any of C_m and tau_*
    -/GetPositiveKeys
    -{
    -  GetDefaults keys
    -  {
    -    cvs /key Set
    -    key (C_m) eq
    -    key length 4 geq
    -    {
    -	key 0 4 getinterval (tau_) eq
    -    }
    -    {
    -      false
    -    } ifelse
    -    or
    -  } Select
    -} def
    -
    -
    -% first test: ensure values <= 0 provoke exception
    -{
    -  models
    -  {
    -    ResetKernel
    -
    -    % Avoid exceptions in case a model has C_m or
    -    % tau_* that cannot be changed.
    -    << /dict_miss_is_error false >> SetKernelStatus
    -
    -    /model Set
    -    /all_fine true def % pass by default
    -
    -    % now test one at a time
    -    model GetPositiveKeys
    -    {
    -
    -      /key Set
    -
    -      [ 0.0 -1.0 ] % test for zero and negative
    -      {
    -        /val Set
    -
    -	% the next line shall provoke an error
    -	mark
    -	{
    -	  /neuron model Create def
    -          neuron key get /origval Set
    -	  neuron << >> dup key val put_d SetStatus
    -	}
    -        stopped
    -        {
    -          % we got an exception, need to clean up
    -          % remove error code
    -	  errordict /message undef
    -	  errordict /command undef
    -	  errordict begin /newerror false def end
    -
    -	  % clear stack
    -	  counttomark npop pop % need to pop mark separately
    -
    -          % now check that value is unchanged
    -          /all_fine
    -            all_fine neuron key get origval eq and
    -          def
    - 	}
    -        {
    -          % model failed to raise exception
    -          pop % mark
    -	  /all_fine false def
    -	}
    -        ifelse   % stopped
    -
    -      }
    -      forall  % values
    -    }
    -    forall   % keys
    -
    -    all_fine % leave result on stack
    -    dup not { (ERROR: ) model cvs join == } if
    -
    -  }
    -  Map
    -
    -  true exch { and } Fold
    -
    -} assert_or_die
    -
    -
    -% second test: ensure positive values can be set
    -{
    -  models
    -  {
    -    ResetKernel
    -
    -    % Avoid exceptions in case a model has C_m or
    -    % tau_* that cannot be changed.
    -    << /dict_miss_is_error false >> SetKernelStatus
    -
    -    /model Set
    -
    -    model /iaf_psc_exp_ps_lossless neq
    -    {
    -      % now test one at a time
    -      model GetPositiveKeys {
    -
    -        /key Set
    -
    -        /nrn model Create def
    -        /newval nrn key get 1.0 add def
    -        nrn << >> dup key newval put SetStatus
    -        nrn key get newval eq
    -
    -      } Map
    -
    -      true exch { and } Fold
    -      dup not { (ERROR2: ) model cvs join == } if
    -    }
    -    {
    -      true
    -    }
    -    ifelse
    -
    -  }
    -  Map
    -
    -  true exch { and } Fold
    -
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-689.sli b/testsuite/regressiontests/ticket-689.sli
    deleted file mode 100644
    index 53f45f7e63..0000000000
    --- a/testsuite/regressiontests/ticket-689.sli
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -/*
    - *  ticket-689.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-689 - GetConnections throws Segmentation Fault if hpc_synapses are used.
    -
    -Synopsis: (ticket-689) run -> NEST exits if test fails
    -
    -Description: 
    -Ensure that GetConnections works with hpc synapses. Script creates 2 neurons, connects them 
    -with an hpc synapse and tests whether GetConnections retrieves 1 connection without crashing.
    - 
    -Author: Susanne Kunkel, Maximilian Schmidt, 2012-02-19
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -<<
    -  /total_num_virtual_procs 1
    ->> SetKernelStatus
    -
    -/iaf_psc_alpha Create /n1 Set
    -/iaf_psc_alpha Create /n2 Set
    -n1 n2 /all_to_all /stdp_pl_synapse_hom_hpc Connect
    -
    -{
    -  <<  /target n2 >> GetConnections Flatten length 1 eq
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-692-getconnections-args.sli b/testsuite/regressiontests/ticket-692-getconnections-args.sli
    deleted file mode 100644
    index bd5e500985..0000000000
    --- a/testsuite/regressiontests/ticket-692-getconnections-args.sli
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/*
    - *  ticket-692-getconnections-args.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-692 - ensure GetConnections checks its args
    -
    -Synopsis: (ticket-686-positive-parameters) run -> NEST exits if test fails
    -
    -Description: 
    -This tests ensures that models with parameters C_m or tau_* throw an exception
    -when trying to set a value that is not strictly positive.
    - 
    -The test also ensures that values can actually be set to different, positive 
    -values.
    -
    -Author: Hans Ekkehard Plesser, 2013-04-18
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -ResetKernel
    -
    -% Ensure non-array is rejected as source or target
    -{
    -  /all_fine true def
    -
    -  [ /source /target ]
    -  { 
    -    /key Set
    -
    -    [ 0 0.0 () << >> /foo ]
    -    {
    -      /val Set
    -      
    -      mark
    -      { 
    -	<< >> dup key val put_d GetConnections
    -      }      
    -      stopped
    -      {
    -	% we got an exception, need to clean up
    -	% remove error code
    -	errordict /message undef
    -	errordict /command undef
    -	errordict begin /newerror false def end
    -      }
    -      {
    -	% model failed to raise exception
    -	/all_fine false def	  
    -      }
    -      ifelse   % stopped
    -      
    -      % clear stack
    -      counttomark npop pop % need to pop mark separately
    -      
    -      clear    
    -    } forall
    -  }
    -  forall
    -  
    -  all_fine  
    -
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-710.sli b/testsuite/regressiontests/ticket-710.sli
    deleted file mode 100644
    index 02132d2fd8..0000000000
    --- a/testsuite/regressiontests/ticket-710.sli
    +++ /dev/null
    @@ -1,47 +0,0 @@
    -/*
    - *  ticket-710.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-710 - HPC synapses do not work for spike recorders.
    -
    -Synopsis: (ticket-710) run -> NEST exits if test fails
    -
    -Description: 
    -Ensure that hpc_synapses work for spike recorders. This test creates 1 neuron and 1 spike recorder and tries to connect them.
    - 
    -Author: Susanne Kunkel, Maximilian Schmidt, 2012-04-08
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -/iaf_psc_alpha Create /neuron Set
    -/spike_recorder Create /sr Set
    -{
    -neuron sr << >> /static_synapse_hpc Connect
    -} pass_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-716.sli b/testsuite/regressiontests/ticket-716.sli
    deleted file mode 100644
    index 609886a822..0000000000
    --- a/testsuite/regressiontests/ticket-716.sli
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -/*
    - *  ticket-716.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-716 - stdp dopamine synapse changes weight in the absence of presynaptic spikes
    -
    -Synopsis: (ticket-716) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that the weight of an stdp dopamine synapse is constant in the absense of presynaptic spiking.
    -
    -Author: Susanne Kunkel, 2013-04-11
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -ResetKernel
    -
    -/vol /volume_transmitter Create def
    -/stdp_dopamine_synapse << /vt vol 0 get >> SetDefaults
    -
    -/n_pre /parrot_neuron Create def % does not fire
    -/n_post /parrot_neuron Create def
    -/n_dopa /parrot_neuron Create def
    -
    -/sg_post /spike_generator << /spike_times [0.5 1.1 3.4] >> Create def
    -/sg_dopa /spike_generator << /spike_times [1.4 2.3 4.6] >> Create def
    -
    -n_pre n_post << >> /stdp_dopamine_synapse Connect
    -sg_dopa n_dopa Connect
    -n_dopa vol Connect
    -sg_post n_post Connect
    -
    -/w0 << /synapse_model /stdp_dopamine_synapse >> GetConnections 0 get GetStatus /weight get def
    -10.0 Simulate
    -/w1 << /synapse_model /stdp_dopamine_synapse >> GetConnections 0 get GetStatus /weight get def
    -
    -{ w0 w1 sub abs 1e-13 leq } assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-733.sli b/testsuite/regressiontests/ticket-733.sli
    deleted file mode 100644
    index 4ce01ca15f..0000000000
    --- a/testsuite/regressiontests/ticket-733.sli
    +++ /dev/null
    @@ -1,37 +0,0 @@
    -/*
    - *  ticket-733.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-733 - neq does not work correctly for intvector and doublevector
    -
    -Synopsis: (ticket-773) run -> NEST exits if test fails
    -
    -Description:
    -This test verify that neq returns false when two intvectors or two double vectors are equals
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -<# 1 2 3 #> <# 1 2 3 #> neq false eq assert_or_die
    -<. 1 2 3 .> <. 1 2 3 .> neq false eq assert_or_die
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-737.sli b/testsuite/regressiontests/ticket-737.sli
    deleted file mode 100644
    index 778ee86cde..0000000000
    --- a/testsuite/regressiontests/ticket-737.sli
    +++ /dev/null
    @@ -1,99 +0,0 @@
    -/*
    - *  ticket-737.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-737 Ensure that stimulation devices can only be connected with a single synapse type
    -
    -Synopsis: (ticket-737) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that NEST throws an exception if one tries to connect poisson_generator
    -(sending DSSpikeEvents), noise_generator (sending DSCurrentEvents) or multimeter
    -(sending DataLoggingRequest) to a neuron using a plastic synapse.
    -
    -spike_generator slips through this test, since it usually sends SpikeEvent. But it
    -is no danger if it sends DSSpikeEvents for weighted spikes, since it sends precisely
    -one DSSpikeEvent per spike.
    -
    -Author: Hans Ekkehard Plesser, 2014-11-06
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% The following models will not be tested:
    -/skip_list [
    -   /step_rate_generator  %connected with rate_connection_delayed
    -] def
    -
    -/stimulators GetKernelStatus /node_models get
    -{
    -  GetDefaults /element_type get /stimulator eq
    -} Select def
    -
    -/stimulators stimulators { skip_list exch MemberQ not } Select def
    -
    -% first test: multiple connections with same type
    -{
    -  stimulators
    -  {
    -    ResetKernel
    -    Create /stim Set
    -    /iaf_psc_alpha Create /n Set
    -    stim n /all_to_all /static_synapse Connect
    -    stim n /all_to_all /static_synapse Connect
    -  } forall
    -} pass_or_die
    -
    -% second test: multiple connections of user-defined type
    -{
    -  stimulators
    -  {
    -    ResetKernel
    -    /stimname Set
    -    stimname Create /stim Set
    -    /iaf_psc_alpha Create /n Set
    -    /synmodel stimname cvs (_syn) join cvlit def
    -    /static_synapse synmodel CopyModel
    -    stim n /all_to_all synmodel Connect
    -    stim n /all_to_all synmodel Connect
    -  } forall
    -} pass_or_die
    -
    -% third test: no multiple connections with different types
    -%   test must fail if a single case fails
    -stimulators
    -{
    -  ResetKernel
    -  /stimname Set
    -  stimname Create /stim Set
    -  /iaf_psc_alpha Create /n Set
    -  /synmodel stimname cvs (_syn) join cvlit def
    -  /static_synapse synmodel CopyModel
    -  stim n /all_to_all /static_synapse Connect
    -  { stim n /all_to_all synmodel Connect } fail_or_die
    -} forall
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-754.sli b/testsuite/regressiontests/ticket-754.sli
    deleted file mode 100644
    index e714c13c73..0000000000
    --- a/testsuite/regressiontests/ticket-754.sli
    +++ /dev/null
    @@ -1,96 +0,0 @@
    -/*
    - *  ticket-754.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-754 - grng_seed not set correctly under certain circumstances
    -
    -Synopsis: (ticket-754) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that all random number seeds in the kernel are set as expected.
    -
    -Author: Hans Ekkehard Plesser, 2013-06-25
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/num_procs is_threaded { 4 } { 1 } ifelse def
    -
    -% test 1: automatic re-seeding works
    -{
    -  /base_seed 143202461 def
    -
    -  << /total_num_virtual_procs num_procs >> SetKernelStatus
    -
    -  GetKernelStatus /rng_seed get base_seed eq
    -} assert_or_die
    -
    -(done 1) ==
    -
    -% test 2: change proc number first, then re-seed
    -{
    -  /base_seed 100 def
    -
    -  << /total_num_virtual_procs num_procs >> SetKernelStatus
    -  << /rng_seed base_seed >> SetKernelStatus
    -
    -  GetKernelStatus /rng_seed get base_seed eq
    -} assert_or_die
    -
    -(done 2) ==
    -
    -% test 3: set proc number and reseed simultaneously
    -{
    -  /base_seed 100 def
    -
    -  <<
    -    /total_num_virtual_procs num_procs
    -    /rng_seed base_seed
    -  >>
    -  SetKernelStatus
    -
    -  GetKernelStatus /rng_seed get base_seed eq
    -
    -} assert_or_die
    -
    -(done 3) ==
    -
    -% test 4: set number of threads, not total number of virtual procs
    -{
    -  /base_seed 100 def
    -
    -  << /local_num_threads num_procs
    -     /rng_seed base_seed
    -  >>
    -  SetKernelStatus
    -
    -  GetKernelStatus /rng_seed get base_seed eq
    -
    -} assert_or_die
    -
    -(done 4) ==
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-772.sli b/testsuite/regressiontests/ticket-772.sli
    deleted file mode 100644
    index f90c42f9ca..0000000000
    --- a/testsuite/regressiontests/ticket-772.sli
    +++ /dev/null
    @@ -1,68 +0,0 @@
    -/*
    - *  ticket-772.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::ticket-772 - NEST should not crash, if integer values for weight/ delay are used
    -
    -   Synopsis: (ticket-772) run -> NEST exits if test fails
    -   Description:
    -   Different connecting functions support passing TokenArrays for weights and delays.
    -   The values for weight and delays are expected to be doubles, but passing them
    -   as integers should not crash NEST. SLI's casting function getValue<double>
    -   in tokenutils.cc is strict and throws a TypeMisMatch, if something different 
    -   from a DoubleDatum should be casted to a double.
    -   This test tests the relevant connecting functions.
    -
    -   FirstVersion: 04/2014
    -   Author: Tammo Ippen
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -skip_if_not_threaded
    -
    -{
    -  ResetKernel
    -  
    -  /iaf_psc_alpha 2 Create /n Set
    -  n n 1 Take << /rule /all_to_all >> << /synapse_model /static_synapse /weight 1 /delay 4 >> Connect
    -} pass_or_die
    -
    -{
    -  ResetKernel
    -  
    -  /iaf_psc_alpha 2 Create /n Set
    -  n n 1 Take << /rule /all_to_all >> << /synapse_model /static_synapse /weight [1 1] cv_iv /delay [4 6] cv_iv >> Connect
    -} pass_or_die
    -
    -{
    -  ResetKernel
    -  
    -  /iaf_psc_alpha 2 Create /n Set
    -  n n << /rule /one_to_one >> << /synapse_model /static_synapse /weight [1 1] cv_iv /delay [4 6] cv_iv >> Connect
    -} pass_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-777.sli b/testsuite/regressiontests/ticket-777.sli
    deleted file mode 100644
    index e1053b7b4d..0000000000
    --- a/testsuite/regressiontests/ticket-777.sli
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  ticket-777.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-777 - SLI conditional jump typecheck bool arg
    -
    -Synopsis: (ticket-777) run -> NEST exits if test fails
    -
    -Description:
    -Ensure that conditional jump instructions only accept /booltype as condition (as expected by the PostScript reference).
    -
    -Author: Mikael Naveau, 2013-10-17
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -%% each test ensure that the conditional instruction fails if the condition is not a boolean
    -
    -%% insert here each datatype you want to test
    -/tested_type [0 1.0 (hello) [] << >>] def
    -
    -tested_type
    -{
    -/condition Set
    -
    -%% if
    -{condition {} if}
    -({/) condition type cvs join ( /proc if} should not be allowed) join fail_or_die
    -
    -%% elseif
    -{condition {} {} elseif}
    -({/) condition type cvs join ( /proc1 /proc2 elseif} should not be allowed) join fail_or_die
    -
    -} forall %% tested_type
    diff --git a/testsuite/regressiontests/ticket-784.sli b/testsuite/regressiontests/ticket-784.sli
    deleted file mode 100644
    index 739a3e72dc..0000000000
    --- a/testsuite/regressiontests/ticket-784.sli
    +++ /dev/null
    @@ -1,45 +0,0 @@
    -/*
    - *  ticket-784.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-784 - xor and neq are not protected by tries
    -
    -Synopsis: (ticket-784) run -> NEST exits if test fails
    -
    -Description:
    -Test that xor and neq check their arguments.
    -
    -Author: Marc-Oliver Gewaltig, 2013-12-25
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -{ neq } fail_or_die % no arguments
    -[ 1 1.0 (a) [] ] { {neq } stopped {errordict /newerror false put} { 3 quit_i } ifelse clear} forall
    -
    -clear
    -{ xor } fail_or_die % no arguments
    -[ 1 1.0 (a) [] ] { {xor} stopped {errordict /newerror false put} { 3 quit_i } ifelse clear } forall
    -
    -
    diff --git a/testsuite/regressiontests/ticket-785.sli b/testsuite/regressiontests/ticket-785.sli
    deleted file mode 100644
    index cca846bd4b..0000000000
    --- a/testsuite/regressiontests/ticket-785.sli
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  ticket-785.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-785 - fail_or_die inconsistenly reports errors
    -
    -Synopsis: (ticket-785) run -> NEST exits if test fails
    -
    -Description:
    -Test that fail_or_die reports errors consistently. There are two calls to fail_or_die. The first one passes, the second one fails to pass.
    -
    -Author: Marc-Oliver Gewaltig, 2013-12-25
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -{ 1 div } fail_or_die % this one works
    -clear
    -
    -% the next test shows that {1 neq}  produces an error
    -{1 neq } stopped {errordict /newerror false put} { 3 quit_i } ifelse 
    -clear 
    -
    -% the next test shows that the error is not caught by fail_or_die
    -{ 1 neq } fail_or_die % this one breaks
    -
    -
    -
    diff --git a/testsuite/regressiontests/ticket-787.sli b/testsuite/regressiontests/ticket-787.sli
    deleted file mode 100644
    index 3a6aead493..0000000000
    --- a/testsuite/regressiontests/ticket-787.sli
    +++ /dev/null
    @@ -1,157 +0,0 @@
    -/*
    - *  ticket-787.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-787 Ensure that all commands raise errors instead of crashing
    -
    -Synopsis: (ticket-787) run -> NEST fails if test fails
    -
    -Description:
    -This ticket executes all tries, procedures and functions in systemdict.
    -
    -Candidates with names beginning with :, ending with _ or explicitly
    -excluded are not tested, since they are internals that need not implement
    -complete error checking.
    -
    -As long as they all either pass or raise proper errors, the test will pass.
    -
    -Remark:
    -- This test will only run in serial mode, as it needs to spawn subprocesses.
    -- Functions defined in other dictionaries that systemdict are not tested.
    -
    -Author: Hans Ekkehard Plesser, 2014-11-26
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced
    -% by a restart of NEST with a serial binary.
    -skip_if_have_mpi
    -
    -% entries to skip
    -
    -% functions that confuse the test setup
    -/special_skip [/abort /license /helpindex /helpdesk /help /help_any] def
    -
    -% functions that depend on readline and should not be checked if
    -% NEST was compiled without support for the GNU readline library
    -/readline_skip [] def
    -systemdict /GNUReadline known not {
    -  /readline_skip [/executive /mathexecutive /GNUreadline /break] def
    -} if
    -
    -% private functions not expected to implement full error checking
    -/private_skip [
    -	/CompareFiles_s_s /ConnectLayers_i_i_D /Connect_g_g_D_D
    -	/Connect_i_i_D_l /Connect_i_i_d_d_l /Connect_i_i_l
    -        /CopyModel_l_l /CopyModel_l_l_D /CreateLayer_D
    -	/CreateMask_D /CreateRDV_g_vf /CreateRNG_gt_i
    -	/Create_l /Create_l_D /Create_l_i /Create_l_i_D /CyclicValue_d_a
    -	/CyclicValue_d_d_d /Displacement_a_i
    -	/Distance_a_i /DumpLayerConnections_os_i_l
    -	/DumpLayerNodes_os_i /FileNames_r /FileNames_s /FixedPoint__p
    -	/FixedPoint__p_i /Flatten_a /Flatten_a_i
    -	/GetConnections_D /GetDefaults_l /GetPosition_i /GetStatus_C /GetStatus_a
    -	/GetStatus_dict /GetStatus_i /GetValue_a_P /Inside_a_M
    -	/JoinTo_ald /JoinTo_cont /JoinTo_d /MapIndexed_a /MapIndexed_s /MapThread_a
    -	/Map_s /MathematicaToSliIndex_a /MathematicaToSliIndex_i
    -	/Part_a /Partition_a_i_i /RandomArray_v_i
    -	/Random_i /SetDefaults_l_D
    -	/SetStatus_CD /SetStatus_aa /SetStatus_dict /SetStatus_id
    -	/Simulate_d /Take_a_a /Take_a_i /TimeCommunicationAlltoall_i_i
    -	/TimeCommunicationAlltoallv_i_i /TimeCommunication_i_i_b
    -	/TimeCommunicationv_i_i /UnitStep_d /UnitStep_da /UnitStep_i
    -	/UnitStep_ia /_:out /abs_d /abs_i /acos_d /add_P_P /add_a_a /add_a_i
    -	/add_d_dv /add_dd /add_di /add_dv_dv /add_i_a /add_i_iv /add_id
    -	/add_ii /add_iv_iv /and_M_M /and_bb /and_ii /append_a /append_p
    -	/append_s /asin_d /available_is /backtrace_off /backtrace_on
    -	/breakup_sa /breakup_sa_i /calibrate_node /capacity_a /capacity_s
    -	/ceil_d /cos_d /cv_dv /cv_iv /cva_C /cva_d /cva_t /cvd_s /cvdict_C
    -	/cvdict_M /cvnodecollection_i_i /cvnodecollection_ia /cvnodecollection_iv
    -	/cvi_s /cvlit_n /cvlit_p /cvlp_p /cvn_l /cvn_s /cvs_f /cvt_a /cvx_a
    -	/cvx_f /dexp_i /div_P_P /div_a_a /div_a_i /div_dd /div_di /div_dv_dv
    -	/div_i_a /div_id /div_ii /div_iv_iv /double_i /drand_g /dup2_is_is
    -	/dup2_is_os /dup2_os_is /dup2_os_os /empty_D /empty_a /empty_s /eq_dv
    -	/eq_iv /erase_a /erase_p /erase_s /exp_d /finite_q_d /floor_d /for_a
    -	/for_i /forall_a /forall_di /forall_dv /forall_iter /forall_iv
    -	/forall_s /forallindexed_a /forallindexed_s /frexp_d /geq_dd /geq_di
    -	/geq_id /geq_ii /get_a /get_a_a /get_d /get_d_a /get_dv_i /get_dv_iv
    -	/get_iv_i /get_iv_iv /get_lp /get_p /get_s /getinterval_a
    -	/getinterval_s /getline_is /gt_dd /gt_di /gt_id /gt_ii /gt_ss /help_l
    -	/info_d /info_ds /insert_a /insert_s /insertelement_a /insertelement_s
    -	/int_d /inv_dv /irand_g_i /iround_d /isatty_is /isatty_os /join_a
    -	/join_d /join_p /join_s /kill_i_i /kill_i_l /ldexp_di /length_a
    -	/length_d /length_dv /length_iv /length_lp /length_p /length_s /leq_dd
    -	/leq_di /leq_id /leq_ii /ln_d /log_d /lt_dd /lt_di /lt_id /lt_ii
    -	/lt_ss /max_d_d /max_d_i /max_i_d /max_i_i /min_d_d
    -	/min_d_i /min_i_d /min_i_i /mkfifo_s /modf_d /mul_P_P /mul_a_a
    -	/mul_a_i /mul_d_dv /mul_d_iv /mul_dd /mul_di /mul_dv_dv /mul_i_a
    -	/mul_i_iv /mul_id /mul_ii /mul_iv_iv /neg_d /neg_dv /neg_i /neg_iv
    -	/not_b /not_i /ones_dv /ones_iv /or_M_M /or_bb /or_ii /pow_dd /pow_di
    -	/prepend_a /prepend_p /prepend_s /put_a /put_a_a_t /put_d /put_dv_i_d
    -	/put_iv_i_i /put_lp /put_p /put_s /quit_i /references_a
    -	/regex_find_r /regex_find_rf /regex_find_s /regex_find_sf
    -	/regex_replace_r /regex_replace_rf /regex_replace_s /regex_replace_sf
    -	/replace_a /replace_s /reserve_a /reserve_s /reverse_sa /round_d
    -	/search_a /search_s /searchif_sa /seed_g_i
    -	/setNONBLOCK_is_b /setverbosity_i /shrink_a /sin_d /size_a /size_g
    -	/size_iter /size_s /sleep_d /sleep_i /spawn_as_i /sqr_d /sqrt_d
    -	/sub_M_M /sub_P_P /sub_a_a /sub_a_i /sub_dd /sub_di /sub_dv_dv
    -	/sub_i_a /sub_id /sub_ii /sub_iv_iv /symbol_s /sysexec_a /sysexec_s
    -	/system_as_i_p /token_is /token_s /topinfo_d /trieheads_iter
    -	/trieinfo_os_t /trim_sa /valid_a /waitPID_i_b /wait_b /zeros_dv
    -	/zeros_iv
    -] def
    -
    -
    -% find all tries, functions and procedures in systemdict
    -/candidates
    -  systemdict keys
    -  {
    -    /k Set
    -    systemdict k get type [/trietype /functiontype /proceduretype] exch MemberQ
    -    k cvs 1 Take (:) neq and
    -    k cvs -1 Take (_) neq and
    -    private_skip k MemberQ not and
    -    special_skip k MemberQ not and
    -    readline_skip k MemberQ not and
    -  } Select
    -def
    -
    -candidates dup == length ==
    -
    -% try executing each one of them, print name before trying for analysis
    -candidates
    -{
    -  /cand Set
    -  cand ==
    -
    -  % we trick a little to turn the item into a procedure ...
    -  cand cvs cvx passorfailbutnocrash_or_die
    -} forall
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-798.sli b/testsuite/regressiontests/ticket-798.sli
    deleted file mode 100644
    index b95963c158..0000000000
    --- a/testsuite/regressiontests/ticket-798.sli
    +++ /dev/null
    @@ -1,56 +0,0 @@
    -/*
    - *  ticket-798.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-798 - Random number generation fails in multi-threaded simulation of quantal_stp_synapse
    -
    -Synopsis: (ticket-798) run -> NEST exits if test fails
    -
    -Description:
    -This test creates a large number of neurons with a pairwise_bernoulli_on_source connetion to one target neuron, using the quantal_stp_synapse
    -Author: Marc-Oliver Gewaltig
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/quantal_stp_synapse
    -<<
    - /U 0.2
    - /u 0.2
    - /tau_fac 500.
    - /tau_rec 200.
    - /weight 1.
    - /n 5
    ->> SetDefaults
    -
    -/iaf_psc_exp 10001 Create ;
    -1 << /I_e 2000. >> SetStatus
    -
    -[1] [2 10001] << /rule /all_to_all >> << /synapse_model /quantal_stp_synapse >> Connect
    -100. Simulate
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-80-175-179.sli b/testsuite/regressiontests/ticket-80-175-179.sli
    deleted file mode 100644
    index d8b0310c1f..0000000000
    --- a/testsuite/regressiontests/ticket-80-175-179.sli
    +++ /dev/null
    @@ -1,133 +0,0 @@
    -/*
    - *  ticket-80-175-179.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    -   Test for Tickets 80 and 175.
    -
    -   This test verifies that:
    -   voltmeter and spike_recorder record identical signals from iaf_psc_alpha
    -   driven by internal dc independent of how simulation time is blocked
    -   and how elements are placed in script. Additionally, two spike generators,
    -   placed before and after the recorders, emit the same spike trains that
    -   are expected from the neurons for the given parameters.
    -
    -   Protocol:
    -   1. One iaf_psc_alpha created before voltmeters and spike recorders, one after.
    -   2. Devices recording from both neurons.
    -   3. Neurons driven by internal dc current.
    -   4. Resolution fixed, but simulation time subdivided in different ways.
    -   5. Test that all devices yield identical results under all conditions.
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/resolution 0.1 def
    -
    -/vm_params <<
    -  /origin  0.0
    -  /start   0.0
    -  /stop  100.0
    -  /interval resolution
    ->> def
    -
    -/sr_params <<
    -  /origin  0.0
    -  /start   0.0
    -  /stop  100.0
    -  /time_in_steps true
    ->> def
    -
    -/sg_params <<
    -  /spike_times [ 4.8 11.6 18.4 25.2 32.0 38.8 45.6 52.4
    -                 59.2 66.0 72.8 79.6 86.4 93.2 100.0]
    ->> def
    -
    -/iaf_params <<
    -  /I_e 1e3
    ->> def
    -
    -/sim_blocks [0.1 0.3 0.5 0.7 1.0 1.3 1.5 1.7 110.0] def
    -
    -% ensure all spikes arrive at recorder
    -/simtime vm_params /stop get 2.0 add def
    -
    -/single_trial
    -{
    -  << >> begin
    -    /T Set
    -    ResetKernel
    -    << /resolution resolution >> SetKernelStatus
    -
    -    /iaf_psc_alpha iaf_params SetDefaults
    -    /voltmeter vm_params  SetDefaults
    -    /spike_recorder sr_params SetDefaults
    -    /spike_generator sg_params SetDefaults
    -
    -    /iaf_psc_alpha Create /n_pre Set
    -    /spike_generator Create /sg_pre Set
    -
    -    [ /spike_recorder Create
    -      /spike_recorder Create
    -      /spike_recorder Create
    -      /spike_recorder Create
    -    ] /srs Set
    -    [ /voltmeter Create
    -      /voltmeter Create
    -    ] /vms Set
    -
    -    /iaf_psc_alpha Create /n_post Set
    -    /spike_generator Create /sg_post Set
    -
    -    [[n_pre n_post sg_pre sg_post] srs] { Connect true } MapThread ;
    -    [vms [n_pre n_post]] { Connect true } MapThread ;
    -
    -    {
    -      T Simulate
    -      GetKernelStatus /biological_time get simtime geq
    -      { exit } if
    -    } loop
    -
    -    srs { [/events /times] get cva } Map
    -    vms { [/events /V_m] get cva } Map
    -    2 arraystore
    -  end
    -} def
    -
    -sim_blocks { single_trial } Map
    -/res Set
    -
    -% first test: check spike times for equality
    -res [/All 1] Part 1 Flatten
    -dup First dup == /ref Set
    -Rest true exch { ref eq and } Fold
    -
    -% second test: check voltmeter readings for equality
    -res [/All 2] Part 1 Flatten
    -dup First /ref Set
    -Rest true exch { ref eq and } Fold
    -
    -and
    -
    -assert_or_die
    diff --git a/testsuite/regressiontests/ticket-800.sli b/testsuite/regressiontests/ticket-800.sli
    deleted file mode 100644
    index e6f0601a20..0000000000
    --- a/testsuite/regressiontests/ticket-800.sli
    +++ /dev/null
    @@ -1,373 +0,0 @@
    -/*
    - *  ticket-800.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-800 Ensure that spatial parameters check their parameters
    -
    -Synopsis: (ticket-800) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that spatial parameters check their parameters for
    -validity, e.g., strictly positive sigma for a Gaussian.
    -
    -Author: Hans Ekkehard Plesser, 2014-12-13
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/good_random_parameters
    -[
    -  << /uniform << /min 0. /max 1. >> >>
    -  << /normal << /mean 0. /std 1. >> >>
    -  << /lognormal << /mean 0. /std 1. >> >>
    -  << /exponential << /beta 1. >> >>
    -]
    -def
    -
    -/good_distance_parameters
    -[
    -  << /distance << >> >>
    -  << /distance << /dimension 1 >> >>
    -  << /distance << /dimension 2 >> >>
    -]
    -def
    -
    -/good_parameters good_random_parameters good_distance_parameters join def
    -
    -/bad_random_parameters
    -[
    -  << /uniform << /min 0. /max 0. >> >>
    -  << /normal << /mean 0. /sigma 1. >> >>   % check if bad parameter names are detected
    -  << /normal << /mean 0. /std 0. >> >>
    -  << /normal << /mean 0. /std -1. >> >>
    -  << /lognormal << /mu 0. /std 0. >> >>
    -  << /lognormal << /mu 0. /std -1. >> >>
    -  << /lognormal << /mu 0. /std 1. >> >>
    -]
    -def
    -
    -/bad_distance_parameters
    -[
    -  << /distance << /dim 1 >> >>
    -  << /distance << /dimension 1 /min 0. >> >>
    -]
    -def
    -
    -/bad_parameters bad_random_parameters bad_distance_parameters join def
    -
    -/good_masks_2d
    -[
    -  << /circular << /radius 1. >> >>
    -  << /circular << /radius 1. >> /anchor [0.5 0.5] >>
    -  << /rectangular << /lower_left [-0.1 -0.1] /upper_right [0.1 0.1] >> >>
    -  << /doughnut << /inner_radius 0.1 /outer_radius 0.2 >> >>
    -]
    -def
    -
    -/bad_masks_2d
    -[
    -  << /circular << /r 0. >> >>   % check if bad parameter names are detected
    -  << /circular << /radius 1. /foo 1 >> >>  % spurious parameter
    -  << /circular << /radius 0. >> >>
    -  << /circular << /radius -1. >> >>
    -  << /rectangular << /lower_left [-0.1 -0.1] /upper_right [-0.1 0.1] >> >>
    -  << /rectangular << /lower_left [-0.1 -0.1] /upper_right [0.1 -0.1] >> >>
    -  << /doughnut << /inner_radius 0.1 /outer_radius 0.1 >> >>
    -]
    -def
    -
    -/good_masks_3d
    -[
    -  << /spherical << /radius 1. >> >>
    -  << /box << /lower_left [-0.1 -0.1 -0.1] /upper_right [0.1 0.1 0.1] >> >>
    -]
    -def
    -
    -/bad_masks_3d
    -[
    -  << /spherical << /radius 0. >> >>
    -  << /spherical << /radius -1. >> >>
    -  << /box << /lower_left [-0.1 -0.1 -0.1] /upper_right [-0.1 0.1 0.1] >> >>
    -  << /box << /lower_left [-0.1 -0.1 -0.1] /upper_right [0.1 -0.1 0.1] >> >>
    -  << /box << /lower_left [-0.1 -0.1 -0.1] /upper_right [0.1 0.1 -0.1] >> >>
    -]
    -def
    -
    -/good_layers
    -[
    -  << /shape [ 2 2 ] /elements /iaf_psc_alpha >>
    -  << /shape [ 2 2 ] /elements /iaf_psc_alpha
    -     /extent [2. .5] /center [.2 .3] /edge_wrap true >>
    -  << /shape [ 2 2 ] /elements /iaf_psc_alpha
    -     /extent [2. .5] /center [.2 .3] /edge_wrap false >>
    -  << /positions [[0.1 0.1] [0.2 0.2]] /elements /iaf_psc_alpha
    -     /extent [2. .5] /edge_wrap true >>
    -  << /positions [[0.1 0.1 0.1] [0.2 0.2 0.2]] /elements /iaf_psc_alpha
    -     /extent [2. .5 3.] /edge_wrap true >>
    -]
    -def
    -
    -/bad_layers
    -[
    -  << /shape [ 1 ] /elements /iaf_psc_alpha >>    % too few elements in shape
    -  << /shape [ 2 2 ] /elementsss /iaf_psc_alpha >>  % misspelling
    -  << /shape [ 2 2 ] /elements /iaf_psc_alpha
    -     /extent [2. .5] /center [.2 .3] /edge_wrap 3 >>  % bad data type
    -  << /positions [[0.1 0.1] [0.2 0.2 0.2]] /elements /iaf_psc_alpha  % dim mix
    -     /extent [2. .5] /edge_wrap true >>
    -  << /positions [[0.1 0.1 0.1] [0.2 0.2 0.2]] /elements /iaf_psc_alpha  % dim mix
    -     /extent [2. .5] /edge_wrap true >>
    -]
    -def
    -
    -/good_connspecs
    -[
    -  << /connection_type /pairwise_bernoulli_on_source >>
    -  << /connection_type /pairwise_bernoulli_on_target >>
    -  << /connection_type /pairwise_bernoulli_on_source /allow_oversized_mask true >>
    -  << /connection_type /pairwise_bernoulli_on_source /synapse_model /static_synapse >>
    -  << /connection_type /pairwise_bernoulli_on_source /allow_multapses false >>
    -  << /connection_type /pairwise_bernoulli_on_source /allow_autapses false >>
    -  << /connection_type /pairwise_bernoulli_on_source /allow_oversized_mask true >>
    -  << /connection_type /pairwise_bernoulli_on_source /number_of_connections 2 >>
    -  << /connection_type /pairwise_bernoulli_on_target /number_of_connections 2 >>
    -  << /connection_type /pairwise_bernoulli_on_source /delay 2.0 >>
    -]
    -def
    -
    -/bad_connspecs
    -[
    -  << /connection_type /population >>   % unknown type
    -  << /kernel 0.1 >>                    % type missing
    -]
    -def
    -
    -%% Test runner for 2d connections
    -/conn_layers_test_2d
    -{
    -  /conndict Set
    -
    -  ResetKernel
    -  << /elements /iaf_psc_alpha  /shape [ 1 1 ] >> CreateLayer
    -  dup
    -  conndict ConnectLayers
    -} def
    -
    -%% Test runner for 3d connections
    -/conn_layers_test_3d
    -{
    -  /conndict Set
    -
    -  ResetKernel
    -  << /elements /iaf_psc_alpha  /positions [ [0. 0. 0.] ] /extent [1.0 1.0 1.0] >> CreateLayer
    -  dup
    -  conndict ConnectLayers
    -} def
    -
    -
    -%% first: test CreateParameter on good parameter sets
    -good_parameters
    -{
    -  /pset Set
    -  (Test 1: ) =only
    -  pset keys ==
    -  { pset CreateParameter } pass_or_die
    -  clear
    -} forall
    -
    -%% second: test CreateParameter on bad parameter sets
    -bad_parameters
    -{
    -  /pset Set
    -  (Test 2: ) =only
    -  pset keys ==
    -  { pset CreateParameter } fail_or_die
    -  clear
    -} forall
    -
    -%% third: test CreateMask on good masks
    -good_masks_2d good_masks_3d join
    -{
    -  /mask Set
    -  (Test 3: ) =only
    -  mask keys ==
    -  { mask CreateMask } pass_or_die
    -  clear
    -} forall
    -
    -%% fourth: test CreateMask on bad masks
    -bad_masks_2d bad_masks_3d join
    -{
    -  /mask Set
    -  (Test 4: ) =only
    -  mask keys ==
    -  { mask CreateMask } fail_or_die
    -  clear
    -} forall
    -
    -%% fifth: test CreateLayer on good specs
    -good_layers
    -{
    -  /lspec Set
    -  ResetKernel
    -  (Test 5: ) =only
    -  lspec keys ==
    -  { lspec CreateLayer } pass_or_die
    -  clear
    -} forall
    -
    -%% sixth: test CreateLayer on bad specs
    -bad_layers
    -{
    -  /lspec Set
    -  ResetKernel
    -  (Test 6: ) =only
    -  lspec keys ==
    -  { lspec CreateLayer } fail_or_die
    -  clear
    -} forall
    -
    -%% seventh: test ConnectLayers with good kernels
    -good_distance_parameters [ 0.5 1.0 ] join
    -{
    -  /kspec Set
    -  (Test 7: ) =only
    -  kspec DictQ { keys == } { == } ifelse
    -  { << /connection_type /pairwise_bernoulli_on_source /kernel kspec >>
    -    conn_layers_test_2d
    -  } pass_or_die
    -  clear
    -} forall
    -
    -%% eighth: test ConnectLayers with bad kernels
    -bad_distance_parameters
    -{
    -  /kspec Set
    -  (Test 8: ) =only
    -  kspec DictQ { keys == } { == } ifelse
    -  { << /connection_type /pairwise_bernoulli_on_source /kernel kspec >>
    -    conn_layers_test_2d
    -  } fail_or_die
    -  clear
    -} forall
    -
    -%% ninth: test ConnectLayers with good weights
    -good_parameters [ 0.5 1.0 ] join
    -{
    -  /wspec Set
    -  (Test 9: ) =only
    -  wspec DictQ { keys == } { == } ifelse
    -  { << /connection_type /pairwise_bernoulli_on_source /weight wspec >>
    -    conn_layers_test_2d
    -  } pass_or_die
    -  clear
    -} forall
    -
    -%% tenth: test ConnectLayers with bad weights
    -bad_parameters
    -{
    -  /wspec Set
    -  (Test 10: ) =only
    -  wspec DictQ { keys == } { == } ifelse
    -  { << /connection_type /pairwise_bernoulli_on_source /weight wspec >>
    -    conn_layers_test_2d
    -  } fail_or_die
    -  clear
    -} forall
    -
    -%% elevnth: test ConnectLayers with good 2d masks
    -good_masks_2d
    -{
    -  /mspec Set
    -  (Test 11: ) =only
    -  mspec DictQ { keys == } { == } ifelse
    -  { << /connection_type /pairwise_bernoulli_on_source /mask mspec >>
    -    conn_layers_test_2d
    -  } pass_or_die
    -  clear
    -} forall
    -
    -%% twelfth: test ConnectLayers with bad 2d masks
    -bad_masks_2d
    -{
    -  /mspec Set
    -  (Test 12: ) =only
    -  mspec DictQ { keys == } { == } ifelse
    -  { << /connection_type /pairwise_bernoulli_on_source /mask mspec >>
    -    conn_layers_test_2d
    -  } fail_or_die
    -  clear
    -} forall
    -
    -%% thirteenth: test ConnectLayers with good 3d masks
    -good_masks_3d
    -{
    -  /mspec Set
    -  (Test 13: ) =only
    -  mspec DictQ { keys == } { == } ifelse
    -  { << /connection_type /pairwise_bernoulli_on_source /mask mspec >>
    -    conn_layers_test_3d
    -  } pass_or_die
    -  clear
    -} forall
    -
    -%% fourteenth: test ConnectLayers with bad 3d masks
    -bad_masks_3d
    -{
    -  /mspec Set
    -  (Test 14: ) =only
    -  mspec DictQ { keys == } { == } ifelse
    -  { << /connection_type /pairwise_bernoulli_on_source /mask mspec >>
    -    conn_layers_test_3d
    -  } fail_or_die
    -  clear
    -} forall
    -
    -%% fifteenth test: various good cases
    -good_connspecs
    -{
    -  /cspec Set
    -  (Test 15: ) =only
    -  cspec DictQ { keys == } { == } ifelse
    -  { cspec
    -    conn_layers_test_2d
    -  } pass_or_die
    -  clear
    -} forall
    -
    -%% sixteenth test: various bad cases
    -bad_connspecs
    -{
    -  /cspec Set
    -  (Test 16: ) =only
    -  cspec DictQ { keys == } { == } ifelse
    -  { cspec
    -    conn_layers_test_2d
    -  } fail_or_die
    -  clear
    -} forall
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-85.sli b/testsuite/regressiontests/ticket-85.sli
    deleted file mode 100644
    index 40f76f492a..0000000000
    --- a/testsuite/regressiontests/ticket-85.sli
    +++ /dev/null
    @@ -1,121 +0,0 @@
    -/*
    - *  ticket-85.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-85 Ensure that plastic synapses can be used with precise models.
    -
    -Synopsis: (ticket-85) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that plastic synapses can be used to connect precise
    -neuron models.
    -
    -Author: Hans Ekkehard Plesser, 2015-11-23
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/precise_models 
    -  [ /iaf_psc_alpha_ps
    -    /iaf_psc_delta_ps
    -    /iaf_psc_exp_ps
    -    /parrot_neuron_ps
    -  ]
    -def
    -         
    -% first test: can we create connections at all?
    -precise_models
    -{
    -  /model Set
    -  model ==
    -  {
    -    model Create
    -    model Create
    -    << >> /stdp_synapse Connect
    -  } pass_or_die
    -} forall
    -
    -% second test: do we get status information from ArchivingNode?
    -precise_models
    -{
    -  {
    -    dup ==
    -    model Create
    -    GetStatus 0 get /tau_minus known
    -  } assert_or_die
    -} forall
    -
    -% third test: does archiving node register last spike time right
    -precise_models
    -{
    -  /model Set
    -  model ==
    -  {
    -    ResetKernel
    -    /sg /spike_generator << /spike_times [ 10. ] >> Create def
    -    /n model Create def
    -    /sr /spike_recorder Create def
    -    
    -    sg n 10000. 1. Connect
    -    n sr Connect
    -    
    -    20 Simulate
    -    
    -    sr /events get /times get dup length 1 sub get
    -    n /t_spike get
    -    eq
    -  } assert_or_die
    -} forall
    -
    -% fourth test: is there any plastic effect?
    -precise_models
    -{
    -  /model Set
    -  model ==
    -  { 
    -    ResetKernel
    -    /pg
    -      /poisson_generator_ps << /rate 1e6 >> Create
    -    def
    -    
    -    /n1 model Create def
    -    /n2 model Create def
    -    
    -    /ini_weight 1000. def
    -    pg n1 Connect
    -    n1 n2 ini_weight 1.0 /stdp_synapse Connect
    -    
    -    100. Simulate
    -    
    -    << /source n1 >> GetConnections 
    -    0 get 
    -    /weight get
    -    ini_weight neq
    -  } assert_or_die
    -  
    -} forall
    -
    -     
    diff --git a/testsuite/regressiontests/ticket-881.sli b/testsuite/regressiontests/ticket-881.sli
    deleted file mode 100644
    index ca31b6f3fb..0000000000
    --- a/testsuite/regressiontests/ticket-881.sli
    +++ /dev/null
    @@ -1,98 +0,0 @@
    -/*
    - *  ticket-881.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-881 - ConnectLayers creates too few connections under some conditions when running on multiple threads
    -
    -Synopsis: (ticket-881) run -> NEST exits if test fails
    -
    -Description:
    -This tests creates a small layer, connects it all-to-all and checks if all expected connections have been created.
    -
    -This is a regression from nest-2.2.2 to 10kproject@r11284 (precise location unknown so far)
    -Author: Hans Ekkehard Plesser
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/num_threads 4 def
    -/node_pos [ [0.0 0.0] [0.0 0.0] [0.0 0.0] [0.0 0.0] ] def
    -/num_nodes node_pos length def
    -
    -/num_expected num_nodes dup mul def   % all to all
    -
    -% Test 1: pairwise pairwise_bernoulli_on_source
    -{
    -  ResetKernel
    -  << /local_num_threads num_threads >> SetKernelStatus
    -
    -  << /elements /iaf_psc_alpha /positions node_pos >> CreateLayer
    -  dup
    -  << /connection_type (pairwise_bernoulli_on_source) >> ConnectLayers
    -
    -  << >> GetConnections length num_expected eq
    -} assert_or_die
    -
    -% Test 2: pairwise pairwise_bernoulli_on_target
    -{
    -  ResetKernel
    -  << /local_num_threads num_threads >> SetKernelStatus
    -
    -  << /elements /iaf_psc_alpha /positions node_pos >> CreateLayer
    -  dup
    -  << /connection_type (pairwise_bernoulli_on_target) >> ConnectLayers
    -
    -  << >> GetConnections length num_expected eq
    -} assert_or_die
    -
    -% Test 3: fixed fan-in
    -{
    -  ResetKernel
    -  << /local_num_threads num_threads >> SetKernelStatus
    -
    -  << /elements /iaf_psc_alpha /positions node_pos >> CreateLayer
    -  dup
    -  << /connection_type (pairwise_bernoulli_on_source) /number_of_connections num_nodes >> ConnectLayers
    -
    -  << >> GetConnections length num_expected eq
    -} assert_or_die
    -
    -% Test 4: fixed fan-out
    -{
    -  ResetKernel
    -  << /local_num_threads num_threads >> SetKernelStatus
    -
    -  << /elements /iaf_psc_alpha /positions node_pos >> CreateLayer
    -  dup
    -  << /connection_type (pairwise_bernoulli_on_target) /number_of_connections num_nodes >> ConnectLayers
    -
    -  << >> GetConnections length num_expected eq
    -} assert_or_die
    -
    -
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-903.sli b/testsuite/regressiontests/ticket-903.sli
    deleted file mode 100644
    index dbb711ce82..0000000000
    --- a/testsuite/regressiontests/ticket-903.sli
    +++ /dev/null
    @@ -1,64 +0,0 @@
    -/*
    - *  ticket-903.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-903 - Ensure delays are not strictly rounded up
    -
    -Synopsis: (ticket-903) run -> NEST exits if test fails
    -
    -Description:
    -This test ensures that delays drawn from continuous distribution are not
    -rounded up strictly.
    -
    -Remarks: This test is probabilistic, so there is a minuscule chance of it
    -      failing even if all is well.
    -
    -Author: Hans Ekkehard Plesser
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -  << /resolution 0.1 >>  SetKernelStatus
    -
    -  /iaf_psc_alpha Create dup
    -  << /rule /fixed_indegree /indegree 1000 >>
    -  << /delay << /uniform << /min 0.11 /max 0.19 >> >> CreateParameter >>
    -  Connect
    -
    -  % delays are drawn randomly from [0.11, 0.19), so about half should
    -  % be rounded down to 0.1, half up to 0.2
    -  << >> GetConnections { /delay get } Map
    -  dup { 0.15 lt } Select length 100 gt
    -  exch
    -  { 0.15 gt } Select length 100 gt
    -  and
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-921.sli b/testsuite/regressiontests/ticket-921.sli
    deleted file mode 100644
    index d370d8f43b..0000000000
    --- a/testsuite/regressiontests/ticket-921.sli
    +++ /dev/null
    @@ -1,91 +0,0 @@
    -/*
    - *  ticket-921.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-921 Ensure rport in synapse defaults is unaffected by Connect
    -
    -Synopsis: (ticket-921) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that synapse defaults are unaffected if Connect is called with
    -a syn_spec containing parameter values, especially that receptor_type is unchanged.
    -
    -Author: Hans Ekkehard Plesser, 2014-11-06
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% first test: static_synapse
    -{
    -  /sdefs /static_synapse GetDefaults def
    -
    -  /n /iaf_psc_exp_multisynapse << /tau_syn [0.1 0.2] >> Create def
    -  n n /one_to_one << /synapse_model /static_synapse /receptor_type 2 /weight 1234. /delay 2.3 >> Connect
    -
    -  /pdefs /static_synapse GetDefaults def
    -  
    -  true [/delay /weight /receptor_type] { dup sdefs exch get exch pdefs exch get eq and } Fold
    -} assert_or_die
    -
    -% second test: static_synapse, but failing
    -{
    -  /sdefs /static_synapse GetDefaults def
    -
    -  /n /iaf_psc_exp_multisynapse << /tau_syn [0.1 0.2] >> Create def
    -  mark
    -  {
    -    n n /one_to_one << /synapse_model /static_synapse /receptor_type 5 /weight 1234. /delay 2.3 >> Connect
    -  }
    -  stopped
    -  { 
    -    errordict /newerror false put
    -    counttomark npop pop  % pop mark separately
    -  }
    -  {
    -    pop   % mark
    -  } ifelse
    -
    -  /pdefs /static_synapse GetDefaults def
    -  
    -  true [/delay /weight /receptor_type] { dup sdefs exch get exch pdefs exch get eq and } Fold
    -} assert_or_die
    -
    -% third test: stdp_synapse with many parameters
    -{
    -  /sdefs /stdp_synapse GetDefaults def
    -
    -  /n /iaf_psc_exp_multisynapse << /tau_syn [0.1 0.2] >> Create def
    -  n n /one_to_one << /synapse_model /stdp_synapse /receptor_type 2 /weight 1234. /delay 2.3
    -                         /alpha 7. /lambda 0.05 /mu_minus 2. /mu_plus 3. /tau_plus 50. /Wmax 99.
    -                      >> Connect
    -
    -  /pdefs /stdp_synapse GetDefaults def
    -  
    -  true [/delay /weight /receptor_type /alpha /lambda /mu_minus /mu_plus /tau_plus /Wmax] 
    -    { dup sdefs exch get exch pdefs exch get eq and } Fold
    -} assert_or_die
    -
    -endusing
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-926.sli b/testsuite/regressiontests/ticket-926.sli
    deleted file mode 100644
    index 42027e6395..0000000000
    --- a/testsuite/regressiontests/ticket-926.sli
    +++ /dev/null
    @@ -1,58 +0,0 @@
    -/*
    - *  ticket-926.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-926 Ensure stdp_dopamine_synapse does not lead to segfault
    -
    -Synopsis: (ticket-926) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that stdp_dopamine_synapse does not lead to a segfault, even
    -if volume transmitter is not set.
    -
    -Author: Hans Ekkehard Plesser, 2014-11-12
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced 
    -% by a restart of NEST with a serial binary.
    -skip_if_have_mpi
    -
    -M_ERROR setverbosity
    -
    -% the following code must execute without causing a segmentation fault
    -{ 
    -  /sg /spike_generator << /spike_times [ 5.0 ] >> Create def
    -  /pn /parrot_neuron Create def
    -  /nrn /iaf_psc_alpha Create def
    -  sg pn Connect
    -  pn nrn /stdp_dopamine_synapse Connect
    -  10 Simulate
    -} passorfailbutnocrash_or_die
    -
    -
    -
    -endusing
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-933.sli b/testsuite/regressiontests/ticket-933.sli
    deleted file mode 100644
    index 2d9bf6c558..0000000000
    --- a/testsuite/regressiontests/ticket-933.sli
    +++ /dev/null
    @@ -1,65 +0,0 @@
    -/*
    - *  ticket-933.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-933 Ensure that pp_pop_psc_delta generates same results when run in small intervals
    -
    -Synopsis: (ticket-933) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that pp_pop_psc_delta produces the same results when run 10 times 1ms as when
    -run 1 time 10ms.
    -
    -Author: Hans Ekkehard Plesser, 2014-11-20
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/build_network
    -{
    -  /poisson_generator << /rate 1000. >> Create
    -  /pp_pop_psc_delta Create dup /n Set
    -  Connect
    -  n
    -} 
    -def
    -
    -{
    -  ResetKernel
    -  build_network /n Set
    -  10 Simulate
    -  n [[/V_m /n_events]] get 
    -  dup (Results 1 x 10ms: ) =only ==
    -  
    -  ResetKernel
    -  build_network /n Set
    -  10 { 1 Simulate } repeat
    -  n [[/V_m /n_events]] get
    -  dup (Results 10 x 1ms: ) =only ==
    -
    -  eq
    -} assert_or_die
    -
    diff --git a/testsuite/regressiontests/ticket-941.sli b/testsuite/regressiontests/ticket-941.sli
    deleted file mode 100644
    index 42c778bd25..0000000000
    --- a/testsuite/regressiontests/ticket-941.sli
    +++ /dev/null
    @@ -1,147 +0,0 @@
    -/*
    - *  ticket-941.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-941 Ensure that GetConnections works correctly with multiple synapse models
    -
    -Synopsis: (ticket-941) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that GetConnections returns correct results when neurons are connected
    -with different synapse models.
    -
    -Author: Hans Ekkehard Plesser, 2014-11-30
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/*
    -  We connect connect two parrot neurons to each other using
    -  different synpase types. We use a different delay for each
    -  pn1 -> pn2 connection so that we can detect actually
    -  existing connections by spike delays, thus cross-checking output
    -  from GetConnection.
    -
    -  To test actually existing connections, we drive the first
    -  parrot neuron with a spike generator and record from the second.
    - */
    -
    - % Helper function
    - % snode_id num_expected content_expect -> bool
    - % content_expect is [snode_id tnode_id thrd synid]
    - /:check_get_conn
    - {
    -   /expected Set
    -   /n_expected Set
    -   /source Set
    -
    -   << /source source >> GetConnections
    -   dup length n_expected eq
    -   {
    -     true exch { GetStatus /conns Set
    -       conns /source get expected 0 get 0 get eq and
    -       conns /target get expected 1 get 0 get eq and
    -       conns /synapse_model get expected 2 get eq and
    -     } Fold
    -   }
    -   {
    -     ;  % pop dup of GetConnections result
    -     false
    -   }
    -   ifelse
    - }
    - def
    -
    - % Set up basic network ----------------------------------------------------
    -
    - << /resolution 0.1 >> SetKernelStatus
    -
    - /sg /spike_generator << /spike_times [ 1.0 ] >> Create def
    - /pn1 /parrot_neuron Create def
    - /pn2 /parrot_neuron Create def
    - /sr /spike_recorder Create def
    -
    - sg pn1 << /rule /one_to_one >> << /synapse_model /static_synapse >> Connect
    - pn2 sr << /rule /one_to_one >> << /synapse_model /static_synapse >> Connect
    -
    - % check that we have precisely two connections
    - { GetKernelStatus /num_connections get 2 eq } assert_or_die
    -
    - % check they are the right connections; do not test port, it may change with implementation
    - {
    -   sg  1 [sg  pn1 /static_synapse ] :check_get_conn
    -   pn2 1 [pn2 sr  /static_synapse ] :check_get_conn
    -   and
    - } assert_or_die
    -
    - % Add one synapse between pn1 and pn2 --------------------------------------
    -
    - pn1 pn2 << /rule /one_to_one >> << /synapse_model /static_synapse /delay 1.0 >> Connect
    -
    - % check that we now have precisely three connections
    - { GetKernelStatus /num_connections get 3 eq } assert_or_die
    -
    - % check that GetConnections reports correct outgoing connection from pn1
    - {
    -   pn1 1 [pn1 pn2 /static_synapse ] :check_get_conn
    - } assert_or_die
    -
    - % Add another synapse of same type between pn1 and pn2 ---------------------
    -
    - pn1 pn2 << /rule /one_to_one >> << /synapse_model /static_synapse /delay 2.0 >> Connect
    -
    - % check that we now have precisely four connections
    - { GetKernelStatus /num_connections get 4 eq } assert_or_die
    -
    - % check that GetConnections reports correct outgoing connection from pn1
    - {
    -   pn1 2 [pn1 pn2 /static_synapse ] :check_get_conn
    - } assert_or_die
    -
    - % Add synapse with different type  between pn1 and pn2 -----------------------
    -
    - pn1 pn2 << /rule /one_to_one >> << /synapse_model /static_synapse_hom_w /delay 3.0 >> Connect
    -
    - % check that we now have precisely five connections
    - { GetKernelStatus /num_connections get 5 eq } assert_or_die
    -
    - % Simulate: we should see three spikes, 1 ms apart
    - % We do this before testing GetConnections, since it is only the latter that fails
    - {
    -   10 Simulate
    -   sr [/events /times] get cva [ 3. 4. 5. ] eq
    - } assert_or_die
    -
    - % check that GetConnections reports correct outgoing connection from sg
    - % NB: This test RELIES on the fact that SYNPASES ARE RETURNED IN ORDER OF CREATION
    - %     This assumption may fail in future versions of NEST. Then, this test needs
    - %     to be generalized to handle arbitrary order
    - {
    -   << /source pn1 /target pn2 >> GetConnections GetStatus { /synapse_model get } Map
    -   [ /static_synapse /static_synapse /static_synapse_hom_w ] eq
    - } assert_or_die
    -
    -endusing
    diff --git a/testsuite/regressiontests/ticket-949.sli b/testsuite/regressiontests/ticket-949.sli
    deleted file mode 100644
    index a9e4256286..0000000000
    --- a/testsuite/regressiontests/ticket-949.sli
    +++ /dev/null
    @@ -1,50 +0,0 @@
    -/*
    - *  ticket-949.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-949 Ensure Connect throws an error if trying to connect with delay < resolution.
    -
    -Synopsis: (ticket-949) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that Connect throws and error if one tries to create a connection with a delay
    -less than the resolution.
    -
    -Author: Hans Ekkehard Plesser, 2014-12-17
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -  << /resolution 0.25 >> SetKernelStatus
    -  /iaf_psc_alpha Create dup
    -  1.0 0.1 Connect
    -} fail_or_die
    - 
    -endusing
    - 
    - 
    \ No newline at end of file
    diff --git a/testsuite/regressiontests/ticket-959.sli b/testsuite/regressiontests/ticket-959.sli
    deleted file mode 100644
    index 539763dab0..0000000000
    --- a/testsuite/regressiontests/ticket-959.sli
    +++ /dev/null
    @@ -1,64 +0,0 @@
    -/*
    - *  ticket-959.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::ticket-959 Ensure that pp_psc_delta generates same results when run in small intervals
    -
    -Synopsis: (ticket-959) run -> NEST exits if test fails
    -
    -Description:
    -This ticket ensures that pp_psc_delta produces the same results when run 1000 times 10ms as when run 1 time 10000ms. This test was adapted from ticket-933.
    -
    -Author: Moritz Deger, 2015-03-16
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/build_network
    -{
    -  /pp_psc_delta << /tau_sfa 34. /q_sfa 0. >> Create dup /n Set
    -  /spike_recorder Create dup /sr Set
    -  Connect
    -  sr
    -} 
    -def
    -
    -{
    -  ResetKernel
    -  build_network /sr Set
    -  10000 Simulate
    -  sr [[/n_events]] get 
    -  dup (Results 1 x 10000ms: ) =only ==
    -  
    -  ResetKernel
    -  build_network /sr Set
    -  1000 { 10 Simulate } repeat
    -  sr [[/n_events]] get
    -  dup (Results 1000 x 10ms: ) =only ==
    -
    -  eq
    -} assert_or_die
    -
    diff --git a/testsuite/selftests/CMakeLists.txt b/testsuite/selftests/CMakeLists.txt
    deleted file mode 100644
    index 0b3967a6b8..0000000000
    --- a/testsuite/selftests/CMakeLists.txt
    +++ /dev/null
    @@ -1,47 +0,0 @@
    -# testsuite/selftests/CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -
    -# add selftests files
    -#file(GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sli)
    -
    -foreach ( script test_pass.sli test_goodhandler.sli test_lazyhandler.sli )
    -  add_test( NAME selftests/${script}
    -      COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest
    -      ${CMAKE_INSTALL_FULL_DOCDIR}/selftests/${script} # use the installed version
    -      )
    -endforeach ()
    -
    -foreach ( script test_fail.sli test_stop.sli test_badhandler.sli )
    -  add_test( NAME selftests/${script}
    -      COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest
    -      ${CMAKE_INSTALL_FULL_DOCDIR}/selftests/${script} # use the installed version
    -      )
    -  set_tests_properties( selftests/${script}
    -      PROPERTIES WILL_FAIL TRUE )
    -endforeach ()
    -
    -foreach ( script test_pass_or_die.sli test_assert_or_die_b.sli test_assert_or_die_p.sli test_fail_or_die.sli test_crash_or_die.sli test_failbutnocrash_or_die_crash.sli test_failbutnocrash_or_die_pass.sli test_passorfailbutnocrash_or_die.sli )
    -  add_test( NAME selftests/${script}
    -      COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest
    -      ${CMAKE_INSTALL_FULL_DOCDIR}/selftests/${script} # use the installed version
    -      )
    -  set_tests_properties( selftests/${script}
    -      PROPERTIES WILL_FAIL TRUE )
    -endforeach ()
    diff --git a/testsuite/selftests/exitcode0.sli b/testsuite/selftests/exitcode0.sli
    deleted file mode 100644
    index 96b77ee155..0000000000
    --- a/testsuite/selftests/exitcode0.sli
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -/*
    - *  exitcode0.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -0 quit_i
    diff --git a/testsuite/selftests/exitcode1.sli b/testsuite/selftests/exitcode1.sli
    deleted file mode 100644
    index e9237fc8ad..0000000000
    --- a/testsuite/selftests/exitcode1.sli
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -/*
    - *  exitcode1.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -1 quit_i
    diff --git a/testsuite/selftests/exitcode126.sli b/testsuite/selftests/exitcode126.sli
    deleted file mode 100644
    index 00077ea3f6..0000000000
    --- a/testsuite/selftests/exitcode126.sli
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -/*
    - *  exitcode126.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -126 quit_i
    diff --git a/testsuite/selftests/exitcode2.sli b/testsuite/selftests/exitcode2.sli
    deleted file mode 100644
    index cc2826c543..0000000000
    --- a/testsuite/selftests/exitcode2.sli
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -/*
    - *  exitcode2.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -2 quit_i
    diff --git a/testsuite/selftests/exitcode3.sli b/testsuite/selftests/exitcode3.sli
    deleted file mode 100644
    index bc5b6ee87f..0000000000
    --- a/testsuite/selftests/exitcode3.sli
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -/*
    - *  exitcode3.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -3 quit_i
    diff --git a/testsuite/selftests/exitcode99.sli b/testsuite/selftests/exitcode99.sli
    deleted file mode 100644
    index c8418631a9..0000000000
    --- a/testsuite/selftests/exitcode99.sli
    +++ /dev/null
    @@ -1,23 +0,0 @@
    -/*
    - *  exitcode99.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -99 quit_i
    diff --git a/testsuite/selftests/test_assert_or_die_b.sli b/testsuite/selftests/test_assert_or_die_b.sli
    deleted file mode 100644
    index a0d7a8c2f7..0000000000
    --- a/testsuite/selftests/test_assert_or_die_b.sli
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -/*
    - *  test_assert_or_die_b.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_assert_or_die_b - sli script to test the assert_or_die function (bool variant)
    -
    -   Synopsis: (test_assert_or_die_b) run
    -
    -   FirstVersion: 07-jul-2008
    -
    -   Author: R Kupper
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% the following call shall pass without error:
    -true assert_or_die
    -
    -% the following call shall make NEST exit with exit code 3:
    -false assert_or_die
    -
    -endusing
    diff --git a/testsuite/selftests/test_assert_or_die_p.sli b/testsuite/selftests/test_assert_or_die_p.sli
    deleted file mode 100644
    index d06c0d6cd4..0000000000
    --- a/testsuite/selftests/test_assert_or_die_p.sli
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -/*
    - *  test_assert_or_die_p.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_assert_or_die_p - sli script to test the assert_or_die function (proceure variant)
    -
    -   Synopsis: (test_assert_or_die_p) run
    -
    -   FirstVersion: 07-jul-2008
    -
    -   Author: R Kupper
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% the following call shall pass without error:
    -{true} assert_or_die
    -
    -% the following call shall make NEST exit with exit code 3:
    -{false} assert_or_die
    -
    -endusing
    diff --git a/testsuite/selftests/test_badhandler.sli b/testsuite/selftests/test_badhandler.sli
    deleted file mode 100644
    index 3129f5fd68..0000000000
    --- a/testsuite/selftests/test_badhandler.sli
    +++ /dev/null
    @@ -1,47 +0,0 @@
    -/*
    - *  test_badhandler.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_badhandler - test if SLI returns exit code 126 when an error is handled by a bad user error handler.
    -
    -Synopsis: (test_badhandler) run -> 
    -
    -Description:
    -This script establishes a user error handler and then provokes an
    -error. The error handler itself contains an error. This error should
    -be reported by the interpreter and cause NEST to quit with exit code 126.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 03-jul-2008
    -
    -Remarks:
    -Yes, this script is really meant to fail!
    -
    -SeeAlso: testsuite::test_pass, testsuite::test_fail, testsuite::test_stop, testsuite::test_goodhandler,  testsuite::test_lazyhandler, testsuite::test_badhandler
    -*/
    -
    -% Yes, this script fails. This is intentional. Really.
    -% And no, there shall be no second stopped context around this error. Really.
    -
    -% provoking an error with a bad error handler:
    -{1 /hello add} stopped {1 /hello add} if
    diff --git a/testsuite/selftests/test_crash_or_die.sli b/testsuite/selftests/test_crash_or_die.sli
    deleted file mode 100644
    index 6bd9b0b5b5..0000000000
    --- a/testsuite/selftests/test_crash_or_die.sli
    +++ /dev/null
    @@ -1,76 +0,0 @@
    -/*
    - *  test_crash_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_crash_or_die - sli script to test the crash_or_die function
    -
    -   Synopsis: (test_crash_or_die) run
    -
    -   FirstVersion: 090227
    -
    -   Author: Diesmann
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% We skip the test if NDEBUG is set, as this removes all assertions
    -% from the code and we rely on failing assertions in this test.
    -statusdict/ndebug :: { /skipped exit_test_gracefully } if
    -
    -
    -% Preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced 
    -% by a restart of NEST with a serial binary.
    -% The commented code below is the real one.
    -skip_if_have_mpi
    -
    -
    -/*
    -% if interpreter is parallel and not indirected: request serial restart
    -statusdict/is_mpi :: statusdict/userargs :: length 0 eq  and
    -{
    - statusdict/exitcodes/restart_serial :: quit_i
    -} if
    -
    -
    -% this is for the case where we need a proper parallel version
    -%% % if interpreter is serial and parallel nest exists: use parallel version 
    -%% statusdict/is_mpi :: not statusdict/have_mpi :: and
    -%% {
    -%%  1 ( --userargs=indirected ) statusdict/files :: First join mpirun
    -%% } if
    -*/
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% At this point nest is serial 
    -% Therefore, we can now do the test.
    -
    -
    -% the following call shall pass without error:
    -{ statusdict/exitcodes/abort :: quit_i} crash_or_die
    -
    -% the following call shall make NEST exit with exit code 3:
    -{} crash_or_die
    -
    -
    diff --git a/testsuite/selftests/test_fail.sli b/testsuite/selftests/test_fail.sli
    deleted file mode 100644
    index d6478ed795..0000000000
    --- a/testsuite/selftests/test_fail.sli
    +++ /dev/null
    @@ -1,47 +0,0 @@
    -/*
    - *  test_fail.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_fail - test if SLI returns exit code 126 when executing a file with unhandled errors.
    -
    -Synopsis: (test_fail) run -> 
    -
    -Description:
    -This script provokes an error that is not handled by any user error
    -handler. It is used to test if SLI quits with exit code 126 after
    -executing a file that contains errors.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 03-jul-2008
    -
    -Remarks:
    -Yes, this script is really meant to fail!
    -
    -SeeAlso: testsuite::test_pass, testsuite::test_fail, testsuite::test_stop, testsuite::test_goodhandler,  testsuite::test_lazyhandler, testsuite::test_badhandler
    -*/
    -
    -% Yes, this script fails. This is intentional. Really.
    -% And no, there shall be no stopped context around this error. Really. It simply fails. That's all.
    -
    -%provoke an error:
    -1 0 div
    diff --git a/testsuite/selftests/test_fail_or_die.sli b/testsuite/selftests/test_fail_or_die.sli
    deleted file mode 100644
    index 3de56ea09e..0000000000
    --- a/testsuite/selftests/test_fail_or_die.sli
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -/*
    - *  test_fail_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_failpass_or_die - sli script to test the passfail_or_die function
    -
    -   Synopsis: (test_passfail_or_die) run
    -
    -   FirstVersion: 07-jul-2008
    -
    -   Author: R Kupper
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% the following call shall pass without error:
    -{1 0 div} fail_or_die
    -
    -% the following call shall make NEST exit with exit code 3:
    -{} fail_or_die
    -
    -endusing
    diff --git a/testsuite/selftests/test_failbutnocrash_or_die_crash.sli b/testsuite/selftests/test_failbutnocrash_or_die_crash.sli
    deleted file mode 100644
    index 9df25047e0..0000000000
    --- a/testsuite/selftests/test_failbutnocrash_or_die_crash.sli
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    - *  test_failbutnocrash_or_die_crash.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_failbutnocrash_or_die_crash - sli script to test the failbutnocrash_or_die_crash function
    -
    -   Synopsis: (test_failbutnocrash_or_die_crash) run
    -
    -   FirstVersion: 2014-11-12
    -
    -   Author: Diesmann, Plesser
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% Preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced 
    -% by a restart of NEST with a serial binary.
    -% The commented code below is the real one.
    -skip_if_have_mpi
    -
    -
    -/*
    -% if interpreter is parallel and not indirected: request serial restart
    -statusdict/is_mpi :: statusdict/userargs :: length 0 eq  and
    -{
    - statusdict/exitcodes/restart_serial :: quit_i
    -} if
    -
    -
    -% this is for the case where we need a proper parallel version
    -%% % if interpreter is serial and parallel nest exists: use parallel version 
    -%% statusdict/is_mpi :: not statusdict/have_mpi :: and
    -%% {
    -%%  1 ( --userargs=indirected ) statusdict/files :: First join mpirun
    -%% } if
    -*/
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% At this point nest is serial 
    -% Therefore, we can now do the test.
    -
    -
    -% the following call shall pass without error
    -{ 1 0 div } failbutnocrash_or_die
    -
    -% the following shall make NEST exit with exit code 3 (code crashed)
    -{ statusdict/exitcodes/abort :: quit_i} failbutnocrash_or_die
    -
    -% Test that procedure handles crash correctly in ..._pass.sli, cannot run more 
    -% tests here because NEST terminates on line above if all goes well. 
    -
    diff --git a/testsuite/selftests/test_failbutnocrash_or_die_pass.sli b/testsuite/selftests/test_failbutnocrash_or_die_pass.sli
    deleted file mode 100644
    index 727c783dc0..0000000000
    --- a/testsuite/selftests/test_failbutnocrash_or_die_pass.sli
    +++ /dev/null
    @@ -1,73 +0,0 @@
    -/*
    - *  test_failbutnocrash_or_die_pass.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_failbutnocrash_or_die_pass - sli script to test the failbutnocrash_or_die_pass function
    -
    -   Synopsis: (test_failbutnocrash_or_die_pass) run
    -
    -   FirstVersion: 2014-11-12
    -
    -   Author: Diesmann, Plesser
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% Preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced 
    -% by a restart of NEST with a serial binary.
    -% The commented code below is the real one.
    -skip_if_have_mpi
    -
    -
    -/*
    -% if interpreter is parallel and not indirected: request serial restart
    -statusdict/is_mpi :: statusdict/userargs :: length 0 eq  and
    -{
    - statusdict/exitcodes/restart_serial :: quit_i
    -} if
    -
    -
    -% this is for the case where we need a proper parallel version
    -%% % if interpreter is serial and parallel nest exists: use parallel version 
    -%% statusdict/is_mpi :: not statusdict/have_mpi :: and
    -%% {
    -%%  1 ( --userargs=indirected ) statusdict/files :: First join mpirun
    -%% } if
    -*/
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% At this point nest is serial 
    -% Therefore, we can now do the test.
    -
    -
    -% the following call shall pass without error
    -{ 1 0 div } failbutnocrash_or_die
    -
    -% the following shall make NEST exit with exit code 3 (code did not fail)
    -{ 1 0 add } failbutnocrash_or_die
    -
    -% Test that procedure handles crash correctly in ..._crash.sli, cannot run more 
    -% tests here because NEST terminates on line above if all goes well. 
    -
    diff --git a/testsuite/selftests/test_goodhandler.sli b/testsuite/selftests/test_goodhandler.sli
    deleted file mode 100644
    index c0afc46727..0000000000
    --- a/testsuite/selftests/test_goodhandler.sli
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -/*
    - *  test_goodhandler.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_goodhandler - test if SLI returns exit code 0 when an error is handled by a correct user error handler.
    -
    -Synopsis: (test_goodhandler) run -> 
    -
    -Description:
    -This script establishes a user error handler and then provokes an
    -error. The error handler resets errodict::newerror to false. This is
    -a dumb, but correct way of handling errors. NEST should pass this
    -scipt and return exit code 0.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 03-jul-2008
    -
    -SeeAlso: testsuite::test_pass, testsuite::test_fail, testsuite::test_stop, testsuite::test_goodhandler,  testsuite::test_lazyhandler, testsuite::test_badhandler
    -*/
    -
    -% provoking an error with a good error handler:
    -{1 /hello add} stopped {errordict /newerror false put} if
    diff --git a/testsuite/selftests/test_lazyhandler.sli b/testsuite/selftests/test_lazyhandler.sli
    deleted file mode 100644
    index dff22a627a..0000000000
    --- a/testsuite/selftests/test_lazyhandler.sli
    +++ /dev/null
    @@ -1,43 +0,0 @@
    -/*
    - *  test_lazyhandler.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_lazyhandler - test if SLI returns exit code 0 when an error is handled by a lazy user error handler.
    -
    -Synopsis: (test_lazyhandler) run -> 
    -
    -Description:
    -This script establishes a user error handler and then provokes an
    -error. The error handler does NOT reset errodict::newerror to false. 
    -This is wrong behaviour, but it is no error that normally prevents
    -execution of the script. Although this is strictly speaking a
    -programming error, NEST should pass this scipt and return exit code 0.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 03-jul-2008
    -
    -SeeAlso: testsuite::test_pass, testsuite::test_fail, testsuite::test_stop, testsuite::test_goodhandler,  testsuite::test_lazyhandler, testsuite::test_badhandler
    -*/
    -
    -% provoking an error with a lazy error handler:
    -{1 /hello add} stopped {} if
    diff --git a/testsuite/selftests/test_pass.sli b/testsuite/selftests/test_pass.sli
    deleted file mode 100644
    index c602816efb..0000000000
    --- a/testsuite/selftests/test_pass.sli
    +++ /dev/null
    @@ -1,43 +0,0 @@
    -/*
    - *  test_pass.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_pass - test if SLI returns exit code 0 after executing a file.
    -
    -Synopsis: (test_pass) run -> 
    -
    -Description:
    -This script contains no commands. It consists only of this
    -documentation header. It is used to test if SLI quits with exit code
    -0 after executing a file that did not cause errors.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 03-jul-2008
    -
    -Remarks:
    -Yes, this script is really meant to contain no commands!
    -
    -SeeAlso: testsuite::test_pass, testsuite::test_fail, testsuite::test_stop, testsuite::test_goodhandler,  testsuite::test_lazyhandler, testsuite::test_badhandler
    -*/
    -
    -% Yes, there are no commands here. This is intentional. Really.
    diff --git a/testsuite/selftests/test_pass_or_die.sli b/testsuite/selftests/test_pass_or_die.sli
    deleted file mode 100644
    index db011bc6c8..0000000000
    --- a/testsuite/selftests/test_pass_or_die.sli
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -/*
    - *  test_pass_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_pass_or_die - sli script to test the pass_or_die function
    -
    -   Synopsis: (test_pass_or_die) run
    -
    -   FirstVersion: 07-jul-2008
    -
    -   Author: R Kupper
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% the following call shall pass without error:
    -{} pass_or_die
    -
    -% the following call shall make NEST exit with exit code 2:
    -{1 0 div} pass_or_die
    -
    -endusing
    diff --git a/testsuite/selftests/test_passorfailbutnocrash_or_die.sli b/testsuite/selftests/test_passorfailbutnocrash_or_die.sli
    deleted file mode 100644
    index 886fc0e6cc..0000000000
    --- a/testsuite/selftests/test_passorfailbutnocrash_or_die.sli
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    - *  test_passorfailbutnocrash_or_die.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_passorfailbutnocrash_or_die - sli script to test the crash_or_die function
    -
    -   Synopsis: (test_passorfailbutnocrash_or_die) run
    -
    -   FirstVersion: 2011-11-12
    -
    -   Author: Diesmann, Plesser
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% Preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced 
    -% by a restart of NEST with a serial binary.
    -% The commented code below is the real one.
    -skip_if_have_mpi
    -
    -
    -/*
    -% if interpreter is parallel and not indirected: request serial restart
    -statusdict/is_mpi :: statusdict/userargs :: length 0 eq  and
    -{
    - statusdict/exitcodes/restart_serial :: quit_i
    -} if
    -
    -
    -% this is for the case where we need a proper parallel version
    -%% % if interpreter is serial and parallel nest exists: use parallel version 
    -%% statusdict/is_mpi :: not statusdict/have_mpi :: and
    -%% {
    -%%  1 ( --userargs=indirected ) statusdict/files :: First join mpirun
    -%% } if
    -*/
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% At this point nest is serial 
    -% Therefore, we can now do the test.
    -
    -% the following call shall pass without error:
    -{ 1 0 add } passorfailbutnocrash_or_die  % code passes
    -{ 1 0 div } passorfailbutnocrash_or_die  % code fails
    -
    -% the following crashes and NEST should exit with code 3
    -{ statusdict/exitcodes/abort :: quit_i} passorfailbutnocrash_or_die  
    -
    -
    diff --git a/testsuite/selftests/test_stop.sli b/testsuite/selftests/test_stop.sli
    deleted file mode 100644
    index 5282b9f4ff..0000000000
    --- a/testsuite/selftests/test_stop.sli
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  test_stop.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_stop - test if SLI returns exit code 126 when executing a file with a software interrupt.
    -
    -Synopsis: (test_stop) run -> 
    -
    -Description: 
    -This script calls the SLI command `stop` that is not handled by any
    -user error handler. This is a rarely used feature of SLI called
    -"software interrupt". This scipt is used to test if SLI quits with
    -exit code 126 after executing a file that causes a software
    -interrupt.
    -
    -Author: Ruediger Kupper
    -
    -FirstVersion: 03-jul-2008
    -
    -Remarks:
    -Yes, this script is really meant to fail due to an unhandled software interrupt.
    -
    -SeeAlso: testsuite::test_pass, testsuite::test_fail, testsuite::test_stop, testsuite::test_goodhandler,  testsuite::test_lazyhandler, testsuite::test_badhandler
    -*/
    -
    -% Yes, this script contains a stop without error handler. That's intentional.
    -% And no, there shall be no stopped context around this error. Really.
    -
    -%call unhandled stop (cause software interrupt):
    -stop
    diff --git a/testsuite/unittests/CMakeLists.txt b/testsuite/unittests/CMakeLists.txt
    deleted file mode 100644
    index 7491ca8792..0000000000
    --- a/testsuite/unittests/CMakeLists.txt
    +++ /dev/null
    @@ -1,28 +0,0 @@
    -# testsuite/unittests/CMakeLists.txt
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -# add unittests files
    -file( GLOB scripts RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sli )
    -
    -foreach ( script ${scripts} )
    -  add_test( NAME unittests/${script}
    -      COMMAND ${CMAKE_INSTALL_FULL_BINDIR}/nest
    -      ${CMAKE_INSTALL_FULL_DOCDIR}/unittests/${script} # use the installed version
    -      )
    -endforeach ()
    diff --git a/testsuite/unittests/issue-463.sli b/testsuite/unittests/issue-463.sli
    deleted file mode 100644
    index add6316652..0000000000
    --- a/testsuite/unittests/issue-463.sli
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    - *  issue-463.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-463 Simple failing test for connection with parameter arrays and connection rule fixed_indegree, with more than one virtual process
    -
    -Synopsis: (issue-463) run -> NEST exits if test fails
    -
    -Description:
    -This script creates connections between neurons with parameter arrays and connection rule fixed_indegree, with more than one virtual process, and checks that created connection parameters coincide with array elements.
    -
    -Author: Bruno Golosio
    -FirstVersion: August 2016
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -<< /total_num_virtual_procs 4 >> SetKernelStatus
    -
    -% Create source and target neurons
    -/iaf_psc_alpha 20 Create
    -/net1 [1 10] Range def
    -/net2 [11 20] Range def
    -
    -% weight array is made of integers from 1 to 50
    -/Warr [1 50] Range cv_dv def
    -
    -% Define connection and synapse dictionaries
    -/syn_dict << /synapse_model /static_synapse /weight Warr >> def
    -/conn_dict << /rule /fixed_indegree /indegree 5 >> def
    -
    -net1 net2 conn_dict syn_dict Connect % Connect source to target neurons
    -
    -/Warr1 [] def  % create empty array
    -
    -net2 % loop through all target neurons
    -{
    -        /neuron2 exch dup cvnodecollection def
    -        % gets all connections to the target neuron
    -        /conn << /target neuron2 >> GetConnections def
    -
    -        /sdict_lst conn GetStatus def % gets info on synapses
    -
    -        sdict_lst % loop on synapses that connect to target neuron
    -        {
    -             /sdict exch def
    -             /w sdict /weight get def  % gets synaptic weight
    -             /Warr1 Warr1 w append def % append the weight to Warr1
    -        } forall
    -        /Warr1 Warr1 Sort def % sorts the elements of Warr1
    -} forall
    -
    -/Warr1 Warr1 [1 50] Range sub def % Warr1 = Warr1 - [1,...,50]
    -
    -Warr1 {
    -        0.0 eq assert_or_die % checks the elements of Warr1
    -} forall
    diff --git a/testsuite/unittests/issue-565.sli b/testsuite/unittests/issue-565.sli
    deleted file mode 100644
    index d1096dd2c3..0000000000
    --- a/testsuite/unittests/issue-565.sli
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    - *  issue-565.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::issue-565
    -
    -Synopsis: (issue-565) run -> NEST exits if test fails
    -
    -Description:
    -This test provokes a switch from a heterogeneous connector to a
    -homogeneous connector using the structural plasticity framework and
    -asserts that the resulting homogeneous connector is correctly used.
    -
    -Author: Jakob Jordan
    -FirstVersion: November 2016
    -SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/BuildNetwork
    -{
    -  ResetKernel
    -
    -  M_ERROR setverbosity
    -
    -  % Create neurons and spike recorder
    -  /iaf_psc_alpha 2 << /I_e 400. >> Create /neurons Set
    -  /spike_recorder Create /sr Set
    -
    -  % Create first connection with static_synapse, instantiating a
    -  % homogeneous connector
    -  neurons [2] Take neurons [1] Take << /rule /all_to_all >>
    -    << /synapse_model /static_synapse /weight 0. >> Connect
    -
    -  % Create second connection with new synapse type, causing the
    -  % homogeneous connector to be turned into a heterogeneous connector
    -  /static_synapse /dev_syn CopyModel
    -  neurons [2] Take sr << /rule /all_to_all >> << /synapse_model /dev_syn >> Connect
    -} def
    -
    -% Measure event count without deleting connection (ground truth)
    -BuildNetwork
    -
    -100 Simulate
    -
    -sr GetStatus 0 get /n_events get /n_events_target Set
    -
    -% Measure event count with deleting connection
    -BuildNetwork
    -
    -% Delete the first connection causing the heterogeneous
    -% connector to be turned into a homogeneous connector
    -neurons [2] Take neurons [1] Take << /rule /all_to_all >>
    -  << /synapse_model /static_synapse >> Disconnect_g_g_D_D
    -
    -100 Simulate
    -
    -% Compare result to ground truth
    -{
    -  sr GetStatus 0 get /n_events get n_events_target eq
    -} assert_or_die
    diff --git a/testsuite/unittests/model_node_init.sli b/testsuite/unittests/model_node_init.sli
    deleted file mode 100644
    index d817e5525f..0000000000
    --- a/testsuite/unittests/model_node_init.sli
    +++ /dev/null
    @@ -1,91 +0,0 @@
    -/*
    - *  model_node_init.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* model_node_init.sli
    - 
    -   Makeshift test to see if setting model params and then creating a neuron
    -   and creating a neuron and then setting node params lead to the same 
    -   results.
    -
    -   Works by connecting device to iaf_psc_alpha, measuring voltage trace over 1s
    -   and comparing traces.
    -
    -   todo: - generalize for more models
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -%/model  /step_current_generator def
    -%/params << /amplitude_times  [ 100.0 200.0 300.0 500.0 ] 
    -%           /amplitude_values [ 100.0 -200.0 50.0 100.0 ] 
    -%        >> def
    -
    -/model /mip_generator def
    -/params << /rate 100.0 /p_copy 0.5 >> def
    -
    -/run_model {
    -   
    -   ResetKernel
    -   << /overwrite_files true >> SetKernelStatus
    -
    -   % expect boolean flag, if true init model, else init node
    -   % leave voltmeter potential trace and node status dict on stack
    -  /param_model Set
    - 
    -  param_model { 
    -   model params SetDefaults
    -  } if
    -
    -  model Create /m Set
    -  
    -  param_model not {
    -   m params SetStatus
    -  } if
    -
    -  /iaf_psc_alpha Create /n Set
    -  /voltmeter Create /vm Set
    -  m  n Connect
    -  vm n Connect
    -
    -  1000 Simulate
    -
    -  vm [ /events /V_m ] get cva
    -  m GetStatus 0 get
    -  2 arraystore
    -} def
    -
    -% run once with model, once with node initialization 
    -% and compare results
    -[true false] { run_model } Map
    -Transpose arrayload pop
    -/sdicts Set
    -/volts Set
    -
    -% test status dictionaries and voltage traces
    -{
    -  sdicts arrayload pop cva_d exch cva_d eq
    -} assert_or_die
    -
    -{
    -  volts arrayload pop eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_DoubleVector_IntVector.sli b/testsuite/unittests/test_DoubleVector_IntVector.sli
    deleted file mode 100644
    index 0984072d78..0000000000
    --- a/testsuite/unittests/test_DoubleVector_IntVector.sli
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/*
    - *  test_DoubleVector_IntVector.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_DoubleVector_IntVector.sli - test vector operations
    -
    -Synopsis: (test_DoubleVector_IntVector) run -> 
    -
    -Description:
    -
    -This test checks the basic operations on IntVector and DoubleVector objects. Tested are
    - - conversion and creation
    - - arange, ones and zeros 
    - - put and get
    - - Map and forall
    - - add, mul 
    -
    -Author:  December 2012, Gewaltig
    -SeeAlso: testsuite::test_iaf_psp, testsuite::test_iaf_ps_dc_accuracy
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% test manual constructors and conversion
    -{ [1 2 3 4] array2intvector <# 1 2 3 4 #> eq } assert_or_die
    -{ [1.0 2.0 3.0 4.0] array2doublevector <. 1.0 2.0 3.0 4.0 .> eq} assert_or_die
    -
    -% test ranges - all three cases for both vector types 
    -
    -{[1 2 3 4] array2intvector [4] arange eq }assert_or_die
    -{[1.0 2.0 3.0 4.0] array2doublevector [4.0] arange eq } assert_or_die
    -
    -{[ 2 3 4] array2intvector [2 4] arange eq} assert_or_die
    -{[ 2.0 3.0 4.0] array2doublevector [2.0 4.0]  arange eq} assert_or_die
    -
    -{[4 3 2 1] array2intvector [4 1 -1] arange eq } assert_or_die
    -{[4.0 3.0 2.0 1.0] array2doublevector [4.0 1.0 -1.0] arange eq } assert_or_die
    -
    -% cv_ functions are permissive and implicitly convert types
    -{[1 2 3 4] cv_dv [4.0] arange eq } assert_or_die
    -{[1 2 3 4] cv_iv [4] arange eq } assert_or_die
    -
    -% test element access put and get
    -
    -{  [2 23 55 23 89 21 -1 0 -12.12 ] cv_iv  8 get -12 eq } assert_or_die 
    -{  [2 23 55 23 89 21 -1 0 -12.12 ] cv_iv  8 13 put 8 get 13 eq } assert_or_die 
    -{  [2 23 55 23 89 21 -1 0 -12.12 ] cv_dv  8 get -12.12 eq } assert_or_die 
    -{  [2 23 55 23 89 21 -1 0 -12.12 ] cv_dv  8 13.56 put 8 get 13.56 eq } assert_or_die 
    -
    -{  [2 23 55 23 89 21 -1 0 -12.12 ] cv_iv  <# 2 5 7 #> get <# 55 21 0 #> eq } assert_or_die 
    -{  [2 23 55 23 89 21 -1 0 -12.12 ] cv_dv  <# 2 5 7 #> get <. 55.0 21.0 0.0 .> eq } assert_or_die 
    -
    -% test loops
    -{ [2 23 55 23 89 21 -1 0 -12.12 ] cv_iv { 2 mul   } Map <# 4 46 110 46 178 42 -2 0 -24 #>  eq } assert_or_die 
    -{ [2 23 55 23 89 21 -1 0 -12.12 ] cv_dv { 2.0 mul } Map <. 4. 46. 110. 46. 178. 42. -2. 0. -24.24 .>  eq } assert_or_die 
    -
    -% test loops with basic math
    -{ 0 10 ones { add } forall 10. eq }  assert_or_die
    -{ 0 10 ones 2.0 mul { add } forall 20. eq }  assert_or_die
    -{ 0 10 ones dup add { add } forall 20. eq }  assert_or_die
    -{ 0 10 zeros 1.0 add { add } forall 10. eq }  assert_or_die
    -{ 0 10 ones_iv { add } forall 10 eq }  assert_or_die
    -{ 0 10 ones_iv 2 mul { add } forall 20 eq }  assert_or_die
    -{ 0 10 ones_iv dup add { add } forall 20 eq }  assert_or_die
    -{ 0 10 zeros_iv 1 add { add } forall 10 eq }  assert_or_die
    diff --git a/testsuite/unittests/test_GetConnections.sli b/testsuite/unittests/test_GetConnections.sli
    deleted file mode 100644
    index e4014f5652..0000000000
    --- a/testsuite/unittests/test_GetConnections.sli
    +++ /dev/null
    @@ -1,252 +0,0 @@
    -/*
    - *  test_GetConnections.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_GetConnections - sli script to test if GetConnections works as expected
    -
    -   Synopsis: (test_getConnections) run
    -
    -   Description:
    -
    -   This test generates 100 iaf_psc_alpha neurons and connects them
    -   with different synapses. It then retrieves the parameters of those
    -   connections and checks them against a known good reference.
    -
    -   SeeAlso: GetConnections
    -
    -   FirstVersion: May 2012
    -   Author: Marc-Oliver Gewaltig
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% Create the following network:
    -% - 100 neurons
    -% - 1, 3, ..., 99 are sources
    -% - 2, 4, ..., 100 are targets
    -% - Connect 1, 3, ..., 69 -> 2, 4, ..., 70 with static_synapse
    -% - Connect 31, ..., 99   -> 32, ..., 100 with stdp_synapse
    -% - Then:
    -%     15 connections with static only
    -%     20 connections with static + stdp
    -%     15 connections with stdp only
    -/build_net
    -{
    -  % create 100 neurons, connect (2n-1) -> 2n for n=1..50
    -  /iaf_psc_alpha 100 Create ;
    -  /static_sources [ 1 69 2 ] Range def
    -  /static_targets static_sources 1 add def
    -  /stdp_sources [ 31 99 2 ] Range def
    -  /stdp_targets stdp_sources 1 add def
    -  static_sources static_targets /one_to_one /static_synapse Connect
    -  stdp_sources stdp_targets /one_to_one /stdp_synapse Connect
    -} def
    -
    -% first test: retrieve static connections
    -{
    -  << >> begin
    -    ResetKernel
    -    build_net
    -
    -    /conns << /synapse_model /static_synapse >> GetConnections GetStatus def
    -    /csrc conns { /source get } Map def
    -    /ctgt conns { /target get } Map def
    -    /cstp conns { /synapse_model get } Map def
    -
    -    csrc static_sources eq
    -    ctgt static_targets eq and
    -    cstp { /static_synapse eq and } Fold
    -  end
    -} assert_or_die
    -
    -(FIRST TEST PASSED) ==
    -
    -
    -% second test: retrieve stdp connections
    -{
    -  << >> begin
    -    ResetKernel
    -    build_net
    -
    -    /conns << /synapse_model /stdp_synapse >> GetConnections GetStatus def
    -    /csrc conns { /source get } Map def
    -    /ctgt conns { /target get } Map def
    -    /cstp conns { /synapse_model get } Map def
    -
    -    csrc stdp_sources eq
    -    ctgt stdp_targets eq and
    -    cstp { /stdp_synapse eq and } Fold
    -  end
    -} assert_or_die
    -
    -(SECOND TEST PASSED) ==
    -
    -
    -% third test: retrieve all connections --- static will come first
    -{
    -  << >> begin
    -    ResetKernel
    -    build_net
    -
    -    /conns << >> GetConnections GetStatus def
    -    /csrc conns { /source get } Map def
    -    /ctgt conns { /target get } Map def
    -
    -    csrc static_sources stdp_sources join eq
    -    ctgt static_targets stdp_targets join eq and
    -  end
    -} assert_or_die
    -
    -(THIRD TEST PASSED) ==
    -
    -
    -% fourth test: retrieve connections for some sources
    -{
    -  << >> begin
    -    ResetKernel
    -    build_net
    -
    -    /ssrc_static static_sources 3 Take def
    -    /stgt_static static_targets 3 Take def
    -    /ssrc_stdp stdp_sources -3 Take def     % take final three to avoid
    -    /stgt_stdp stdp_targets -3 Take def     % those with static+stdp
    -    /ssrc_all ssrc_static ssrc_stdp join def
    -    /stgt_all stgt_static stgt_stdp join def
    -    /conns << /source ssrc_all cvnodecollection >> GetConnections GetStatus def
    -    /csrc conns { /source get } Map def
    -    /ctgt conns { /target get } Map def
    -
    -    csrc ssrc_all eq
    -    ctgt stgt_all eq and
    -  end
    -} assert_or_die
    -
    -(FOURTH TEST PASSED) ==
    -
    -
    -% fifth test: retrieve connections for some targets
    -{
    -  << >> begin
    -    ResetKernel
    -    build_net
    -
    -    /ssrc_static static_sources 3 Take def
    -    /stgt_static static_targets 3 Take def
    -    /ssrc_stdp stdp_sources -3 Take def     % take final three to avoid
    -    /stgt_stdp stdp_targets -3 Take def     % those with static+stdp
    -    /ssrc_all ssrc_static ssrc_stdp join def
    -    /stgt_all stgt_static stgt_stdp join def
    -    /conns << /target stgt_all cvnodecollection >> GetConnections GetStatus def
    -    /csrc conns { /source get } Map def
    -    /ctgt conns { /target get } Map def
    -
    -    csrc ssrc_all eq
    -    ctgt stgt_all eq and
    -  end
    -} assert_or_die
    -
    -(FIFTH TEST PASSED) ==
    -
    -
    -% sixth test: retrieve connections for specific sources and targets
    -{
    -  << >> begin
    -    ResetKernel
    -    build_net
    -
    -    % set up so that for each synapse type, last two srcs match first two tgts
    -    /ssrc_static static_sources [1 3] Take def
    -    /stgt_static static_targets [2 4] Take def
    -    /ssrc_stdp stdp_sources [-4 -2] Take def     % take final three to avoid
    -    /stgt_stdp stdp_targets [-3 -1] Take def     % those with static+stdp
    -    /ssrc_all ssrc_static ssrc_stdp join def
    -    /stgt_all stgt_static stgt_stdp join def
    -    /conns << /source ssrc_all cvnodecollection /target stgt_all cvnodecollection >> GetConnections GetStatus def
    -    /csrc conns { /source get } Map def
    -    /ctgt conns { /target get } Map def
    -
    -    csrc ssrc_static -2 Take ssrc_stdp -2 Take join eq
    -    ctgt stgt_static  2 Take stgt_stdp  2 Take join eq and
    -  end
    -} assert_or_die
    -
    -(SIXTH TEST PASSED) ==
    -
    -
    -% seventh test: same as sixth, but select static synapses
    -{
    -  << >> begin
    -    ResetKernel
    -    build_net
    -
    -    % set up so that for each synapse type, last two srcs match first two tgts
    -    /ssrc_static static_sources [1 3] Take def
    -    /stgt_static static_targets [2 4] Take def
    -    /ssrc_stdp stdp_sources [-4 -2] Take def     % take final three to avoid
    -    /stgt_stdp stdp_targets [-3 -1] Take def     % those with static+stdp
    -    /ssrc_all ssrc_static ssrc_stdp join def
    -    /stgt_all stgt_static stgt_stdp join def
    -    /conns
    -      << /source ssrc_all cvnodecollection /target stgt_all cvnodecollection /synapse_model /static_synapse >>
    -      GetConnections GetStatus
    -    def
    -    /csrc conns { /source get } Map def
    -    /ctgt conns { /target get } Map def
    -
    -    csrc ssrc_static -2 Take eq
    -    ctgt stgt_static  2 Take eq and
    -  end
    -} assert_or_die
    -
    -(SEVENTH TEST PASSED) ==
    -
    -
    -% eighth test: check static synapses on four threads
    -{
    -  << >> begin
    -    ResetKernel
    -    << /local_num_threads 4 >> SetKernelStatus
    -    build_net
    -
    -    % NB: relative ordering of data from threads is random under OpenMP
    -    /conns << /synapse_model /static_synapse >> GetConnections GetStatus def
    -
    -    % SLI Sort can only sort numbers or strings.
    -    % To sort source-target pairs, we convert them to large numbers
    -    /conns_as_nums
    -       conns
    -       { dup /source get 1000 mul exch /target get add } Map
    -    def
    -    /expect_as_nums
    -       [ static_sources static_targets ]
    -       { exch 1000 mul add } MapThread
    -    def
    -
    -    conns_as_nums Sort expect_as_nums Sort eq
    -end
    -} assert_or_die
    -
    -(EIGHT TEST PASSED) ==
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_Map.sli b/testsuite/unittests/test_Map.sli
    deleted file mode 100644
    index 7b72e17362..0000000000
    --- a/testsuite/unittests/test_Map.sli
    +++ /dev/null
    @@ -1,55 +0,0 @@
    -/*
    - *  test_Map.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_Map - check if Map function works
    -
    -Synopsis: (test_Map) run -> 
    -
    -Description:
    -
    -Tests basic properties of Map. Note that the tests
    -are directly compiled from the the Examples section of
    -the documentation which is evaluated by the command 
    -/validate .
    -Future versions of NEST should generate this test 
    -directly from the Examples section.
    -
    -Author:  130531, Diesmann
    -SeeAlso: MapIndexed, Map
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -[1 2 3 4 5]  {2 mul} Map          [2 4 6 8 10]   eq  assert_or_die
    -[ [3. 4.] [7. 8.] ] {cvi} [2] Map [[3 4] [7 8]]  eq  assert_or_die
    -[3. 4. 7. 8.] {cvi} [1] Map       [3 4 7 8]      eq  assert_or_die
    -
    -(abc) {1 add} Map                 (bcd)          eq  assert_or_die
    -
    -
    -
    diff --git a/testsuite/unittests/test_MapIndexed.sli b/testsuite/unittests/test_MapIndexed.sli
    deleted file mode 100644
    index 0736c24acd..0000000000
    --- a/testsuite/unittests/test_MapIndexed.sli
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -/*
    - *  test_MapIndexed.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_MapIndexed - check if MapIndexed function works
    -
    -Synopsis: (test_MapIndexed) run -> 
    -
    -Description:
    -
    -Tests whether MapIndexed works, in particular whether indices start
    -at 1 like in Mathematica. MapIndexed implements a subset of the 
    -functionality of Mathematica's MapIndexed fundction. 
    -
    -
    -Author:  130401, Diesmann
    -SeeAlso: MapIndexed, Map
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -[5] Range {eq} MapIndexed true exch {and} Fold   assert_or_die
    -[1 2 3 4 5]  {add} MapIndexed [2 4 6 8 10] eq    assert_or_die
    -(abcd) {add} MapIndexed (bdfh) eq                assert_or_die
    -
    diff --git a/testsuite/unittests/test_ac_generator.sli b/testsuite/unittests/test_ac_generator.sli
    deleted file mode 100644
    index a42e4cf105..0000000000
    --- a/testsuite/unittests/test_ac_generator.sli
    +++ /dev/null
    @@ -1,108 +0,0 @@
    -/*
    - *  test_ac_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_ac_generator - test that ac_generator provides correct current
    -
    -   Synopsis: (test_ac_generator) run
    -
    -   Description:
    -   This testscript checks tests that the ac_generator provides the correct
    -   current by comparing with a neuron driven by a step-current input 
    -   corresponding to the current expected from the ac_generator.
    -
    -   FirstVersion: May 2017
    -   Author: Hans Ekkehard Plesser
    - */
    -
    -M_ERROR setverbosity
    -
    -(unittest) run
    -/unittest using
    -
    -{
    -  /dc   1000.0 def
    -  /ac    550.0 def
    -  /freq  100.0 def
    -  /phi     0.0 def
    -  /start   5.0 def
    -  /stop    6.0 def
    -  /dt      0.1 def
    -
    -  /om freq 1000.0 div 2 mul Pi mul def   % in radians per ms
    -  
    -  /sc_times [ start stop dt ] { } Table def
    -  /sc_amps sc_times { om mul phi add sin ac mul dc add } Map def
    -
    -  ResetKernel
    -  << /resolution dt >> SetKernelStatus
    -  /n_ac /iaf_psc_alpha Create def
    -  /n_sc /iaf_psc_alpha Create def
    -  
    -  /g_ac /ac_generator 
    -        << /amplitude ac /offset dc /frequency freq /phase phi
    -           /start start /stop stop >>
    -        Create def
    -  /g_sc /step_current_generator 
    -        << /amplitude_times sc_times /amplitude_values sc_amps 
    -           /start start /stop stop >>
    -        Create def
    -  
    -  /vm_ac /voltmeter 
    -         << /interval 0.1 >> 
    -         Create def
    -  /vm_sc /voltmeter 
    -         << /interval 0.1 >> 
    -         Create def
    -         
    -  /I_ac /multimeter 
    -         << /record_from [ /I ] /interval 0.1 >> 
    -         Create def
    -  /I_sc /multimeter 
    -         << /record_from [ /I ] /interval 0.1 >> 
    -         Create def
    -        
    -  g_ac n_ac Connect
    -  vm_ac n_ac Connect
    -  I_ac g_ac Connect
    -  
    -  g_sc n_sc Connect
    -  vm_sc n_sc Connect
    -  I_sc g_sc Connect
    -  
    -  10 Simulate
    -  
    -  vm_ac [/events /V_m] get
    -  vm_sc [/events /V_m] get
    -  sub cva { abs } Map Max 1e-10 lt
    -
    -  I_ac [/events /I] get
    -  I_sc [/events /I] get
    -  sub cva { abs } Map Max 1e-10 lt
    -
    -  and
    -}
    -assert_or_die      
    -        
    -endusing
    -
    -
    diff --git a/testsuite/unittests/test_add_freeze_thaw.sli b/testsuite/unittests/test_add_freeze_thaw.sli
    deleted file mode 100644
    index a399a54952..0000000000
    --- a/testsuite/unittests/test_add_freeze_thaw.sli
    +++ /dev/null
    @@ -1,116 +0,0 @@
    -/*
    - *  test_add_freeze_thaw.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_add_freeze_thaw - test that per-thread nodes vectors are updated 
    -
    -Synopsis: (test_add_freeze_thaw.sli) run -> dies if assertion fails
    -
    -Description:
    -1. Create nodes driven by internal current, simulate, check V_m changes.
    -2. Add more nodes, reset old nodes, simulate again, check V_m changes for all.
    -3. Freeze half the nodes, simulate, check their V_m is constant.
    -4. Thaw nodes, simulate, check V_m changes again.
    -
    -Author: Plesser
    -FirstVersion: 2014-11-05
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/num_threads 4 def
    -/blocksize 11 def   % number of neurons to create / freeze, intentionally not multiple of num_threads 
    -/simtime 10. def
    -/Vmref /iaf_psc_alpha GetDefaults /V_m get def
    -
    -ResetKernel
    -
    -% run on multiple threads if possible
    -statusdict/threading :: (no) neq 
    -{
    -  << /local_num_threads num_threads >> SetKernelStatus
    -}
    -if
    -
    -/node_pop_a /iaf_psc_alpha blocksize << /I_e -50.0 >> Create def
    -
    -% first test: one block of neurons
    -{
    -  % hyperpolarizing, avoids spikes
    -  simtime Simulate
    -  true
    -  node_pop_a
    -  { 
    -    /V_m get Vmref lt and 
    -  } forall
    -} assert_or_die
    -
    -/node_pop_b /iaf_psc_alpha blocksize << /I_e -50.0 >> Create def
    -/all_nodes node_pop_a node_pop_b join def
    -
    -% second test: additional block of neurons
    -{
    -  % reset existing neurons
    -  all_nodes { << /V_m Vmref >> SetStatus } forall
    -  
    -  simtime Simulate
    -  true
    -  all_nodes
    -  { 
    -    /V_m get Vmref lt and 
    -  } forall
    -} assert_or_die
    -
    -% third test: freeze some neurons
    -{
    -  
    -  % reset existing neurons
    -  all_nodes { << /V_m Vmref >> SetStatus } forall
    -
    -  /frozen_nodes node_pop_a def
    -  /thawed_nodes node_pop_b def
    -
    -  frozen_nodes  { << /frozen true >> SetStatus } forall
    -
    -  simtime Simulate
    -  true frozen_nodes { /V_m get Vmref eq and } forall
    -  true thawed_nodes { /V_m get Vmref lt and } forall
    -  and   
    -} assert_or_die
    -
    -% fourth test: thaw them again
    -{
    -  all_nodes
    -    
    -  % reset existing neurons
    -  all_nodes { << /V_m Vmref /frozen false >> SetStatus } forall
    -
    -  simtime Simulate
    -  true all_nodes { /V_m get Vmref lt and } forall
    -} assert_or_die
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_aeif_cond_alpha_multisynapse.sli b/testsuite/unittests/test_aeif_cond_alpha_multisynapse.sli
    deleted file mode 100644
    index 21bb5dbcbe..0000000000
    --- a/testsuite/unittests/test_aeif_cond_alpha_multisynapse.sli
    +++ /dev/null
    @@ -1,319 +0,0 @@
    -/*
    - *  test_aeif_cond_alpha_multisynapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -   Name: testsuite::test_aeif_cond_alpha_multisynapse - sli script for the aeif multisynapse model
    -
    -   Synopsis: (test_aeif_cond_alpha_multisynapse) run
    -
    -   Description:
    -   This test creates a multisynapse neuron and first checks if time constants
    -   can be set correctly.
    -   Afterwards, it simulates the mutisynapse neuron with n (n=4) different time
    -   constants and records the neuron's synaptic current. At the same time, it simulates
    -   n (n=4) single synapse neurons with according parameters.
    -   At the end, it compares the multisynapse neuron currents with each according single
    -   synapse current.
    -
    -   SeeAlso:
    -
    -   FirstVersion: January 2014
    -   Author: Daniel Peppicelli, revised Hans Ekkehard Plesser
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% This test should only run if we have GSL
    -skip_if_without_gsl
    -
    -<<
    -    /overwrite_files true
    ->> SetKernelStatus
    -
    -/tolerance   	2e-3 def %mV
    -/simulation_t	1500 def %ms
    -/V_peak			0. def
    -/a 				4. def
    -/b 				80.5 def
    -/tau_syn_ex		[0.2 2. 3. 3.] def
    -/tau_syn_in		[0.2 2. 3. 3.] def
    -/weight		[1. 1. 1. -1.] def
    -/spike_time 	100. def
    -/delays     	[1. 250. 500. 1000. ] def % ms - The delays have to be ordered and needs enough space between them to avoid noise
    -/dt         	0.1 def
    -
    -% get reversal potentials
    -/iaf_cond_alpha GetDefaults dup
    -/E_ex get /E_ex Set
    -/E_in get /E_in Set
    -/E_rev weight { 0. geq { E_ex } { E_in } ifelse } Map def
    -
    -/spike_generator Create /sg Set
    -sg << /spike_times [spike_time] >> SetStatus
    -
    -% Create the several aeif_conf_alpha (one for each synapses of the previous neuron)
    -[tau_syn_in tau_syn_ex delays weight]
    -{
    -	/weight_var exch def
    -	/delay_var exch def
    -	/tau_syn_ex_var exch def
    -	/tau_syn_in_var exch def
    - 	/aeif_cond_alpha Create /singlesynapse_neuron Set
    - 	singlesynapse_neuron << /V_peak V_peak >> SetStatus
    -	singlesynapse_neuron << /a a >> SetStatus
    -	singlesynapse_neuron << /b b >> SetStatus
    - 	singlesynapse_neuron << /tau_syn_ex tau_syn_ex_var >> SetStatus
    - 	singlesynapse_neuron << /tau_syn_in tau_syn_in_var >> SetStatus
    -
    -
    - 	sg singlesynapse_neuron /one_to_one << /synapse_model /static_synapse /delay delay_var /weight weight_var >> Connect
    - 	/voltmeter Create /vm_for_single_synapse_neuron Set
    - 	vm_for_single_synapse_neuron << /time_in_steps true /interval 0.1 >> SetStatus
    - 
    -	vm_for_single_synapse_neuron singlesynapse_neuron 1. 8. /static_synapse Connect
    - 	vm_for_single_synapse_neuron
    -
    -} MapThread /vms_for_single_synapse_neuron Set
    -
    -% Create one voltmeter for the multi synapse neuron
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval dt >> SetStatus
    -
    -% Create one aeif_conf_alpha_multisynapse
    -/aeif_cond_alpha_multisynapse Create /multisynapse_neuron Set
    -multisynapse_neuron << /tau_syn tau_syn_ex /E_rev E_rev >> SetStatus
    -multisynapse_neuron << /V_peak V_peak >> SetStatus
    -multisynapse_neuron << /a a >> SetStatus
    -multisynapse_neuron << /b b >> SetStatus
    -%multisynapse_neuron GetStatus ShowStatus
    -
    -% create and array [1 .. n]
    -delays length 1 arraystore Range /synapses_indices exch def
    -
    -[delays weight synapses_indices]
    -{
    -	/synapses_indice_var exch def
    -	abs /weight_var exch def
    -	/delay_var exch def
    -	sg multisynapse_neuron /one_to_one << /synapse_model /static_synapse /delay delay_var /weight weight_var /receptor_type synapses_indice_var >> Connect
    -} ScanThread
    -
    -vm multisynapse_neuron  1. 8. /static_synapse Connect
    -
    -simulation_t ms Simulate
    -
    -% Get the currents of the multisynapse neuron
    -/d vm /events get def
    -
    -d /V_m get cva /currents Set
    -% Take the array of delays, remove the first element and append at the end (total simulation time - spiketime).
    -% The new array will be used to determine the ranges of comparison between the single neurons and the multisynapse neurons.
    -delays reverse arrayload pop pop
    -delays length 1 sub
    -arraystore reverse
    -simulation_t spike_time sub 1 dt div sub
    -append
    -/delays_shifted exch def
    -
    -% Go over every dt in the ranges (0 -> delays_shifted[1], ... , delays_shifted[n] -> delays_shifted[n+1])
    -% For each one of them, compare the multisynapse_current[t] with singlesynapse_current[n][t].
    -
    -/current_pos 0 def
    -
    -[vms_for_single_synapse_neuron delays_shifted]
    -{
    -	/delay_var exch def
    -	/voltmeter_var exch def
    -
    -	% Get the currents of the single synapse model
    -	voltmeter_var /events get /V_m get cva
    -
    -	% black voodoo magic - compare values at the same position in multisynapse currents and according single synapse currents
    -	current_pos 1 delay_var spike_time add dt div
    -	{
    -		rot dup rot exch dup rot cvi get rot rot currents exch cvi get sub
    -		tolerance lt true eq assert_or_die
    -	} for
    -
    -	% Update the current position. In the next loop, we will start from here
    -	/current_pos delay_var spike_time add 10 mul def
    -
    -	pop
    -
    -} ScanThread
    -
    -% --------------------------------------
    -
    -% The following tests address #800
    -% - Test that the default recordables are V_m, w and g_1
    -% - Test that the recordable g's change when changing the number of receptor ports
    -% - Test that g has alpha function dynamics
    -% test default recordables include g_1
    -{
    -  << >> begin
    -  ResetKernel
    -
    -  /nrn /aeif_cond_alpha_multisynapse Create def
    -  
    -  /mm /multimeter << /time_in_steps true
    -                     /interval 1.0
    -		     /record_from [ /V_m /w /g_1 ]
    -		  >> Create def
    -  
    -  mm nrn Connect
    -
    -  /len nrn /recordables get length def
    -  len 3 eq
    -  end
    -}
    -assert_or_die
    -
    -% test resize recordables
    -{
    -  << >> begin
    -  ResetKernel
    -
    -  /E_rev1    [0.0  0.0  -85.0] def
    -  /E_rev2    [0.0  0.0] def
    -  /E_rev3    [0.0  0.0  -85.0 0.] def
    -  /tau_syn1  [5.0  1.0  25.0] def
    -  /tau_syn2  [5.0  1.0] def
    -  /tau_syn3  [5.0  1.0  25.0 50.] def
    -
    -  /nrn /aeif_cond_alpha_multisynapse <<
    -    /E_rev E_rev1 /tau_syn tau_syn1
    -      >> Create def
    -  /len1 nrn /recordables get length def
    -
    -  nrn << /E_rev E_rev2 /tau_syn tau_syn2 >> SetStatus
    -  /len2 nrn /recordables get length def
    -
    -  nrn << /E_rev E_rev3 /tau_syn tau_syn3 >> SetStatus
    -  /len3 nrn /recordables get length def
    -
    -  len1 5 eq len2 4 eq and len3 6 eq and
    -  end
    -}
    -assert_or_die
    -
    -% test record g and check for alpha function synapse
    -{
    -  << >> begin
    -  ResetKernel
    -  /E_rev       [0.0  0.0  -85.0 20.] def % synaptic reversal potentials
    -  /tau_syn     [40.0 20.0  30.0 25.] def % synaptic time constants
    -  /weight     [1.0  0.5   2.0  1.0] def % synaptic weights
    -  /delays      [1.0  3.0   10.0 10.] def % ms - synaptic delays
    -  /spike_time  10.  def    % time at which the single spike occurs
    -  /dt          0.1  def    % time step
    -  /total_t     500. def    % total simulation time
    -  /tolerance   1e-7 def    % tolerable difference between theoretic and simulated alpha synapse conductances
    -
    -  /alpha_function
    -  {
    -    % Call like t0 W tau t alpha_function
    -    << /tau 1.0 /W 1.0 /t0 0. >>
    -    begin
    -      /t exch def
    -      /tau exch def
    -      /W exch def
    -      /t0 exch def
    -
    -      t
    -      {
    -        /tt exch def
    -        tt t0 geq
    -        {
    -          /tdiff_over_tau tt t0 sub tau div def
    -          tdiff_over_tau neg exp E tdiff_over_tau W mul mul mul
    -        }
    -        % else
    -        {
    -          0.
    -        } ifelse
    -      } Map
    -    end
    -  } def
    -
    -  << /resolution dt >> SetKernelStatus
    -
    -  % Create a spike generator that generates a single spike
    -  /spike_generator Create /sg Set
    -  sg << /spike_times [spike_time] >> SetStatus % generates a single peak
    -
    -  % Create the multisynapse neuron
    -  /nrn /aeif_cond_alpha_multisynapse
    -    <<  /w 0. /a 0. /b 0. /Delta_T 0. /t_ref 0. /I_e 0.
    -        /E_rev E_rev /tau_syn tau_syn
    -    >> Create def
    -
    -  % Create an array of synaptic indexes to loop through
    -  delays length 1 arraystore Range /synapses_idx exch def
    -  [delays weight synapses_idx] % loop on synaptic receptor ports
    -  {
    -    /syn_id exch def
    -    /W exch def
    -    /delay exch def
    -    % Connect spike generator to each port
    -    sg nrn /one_to_one <<
    -      /synapse_model /static_synapse
    -      /delay delay
    -      /weight W
    -      /receptor_type syn_id >>
    -      Connect
    -  } ScanThread
    -
    -  % Create the multimeter that will record from the 3 conductance channels
    -  /mm /multimeter << /time_in_steps true
    -                     /interval dt
    -		     /record_from [ /g_1 /g_2 /g_3 /g_4 ]
    -		  >> Create def
    -
    -  mm nrn Connect
    -
    -  % Simulate
    -  total_t Simulate
    -
    -  % Get the conductances measured during the simulation
    -  /t       mm /events get /times get cva dt mul def
    -  /sim_g_1 mm /events get /g_1   get cva def
    -  /sim_g_2 mm /events get /g_2   get cva def
    -  /sim_g_3 mm /events get /g_3   get cva def
    -  /sim_g_4 mm /events get /g_4   get cva def
    -  /sim_gs [sim_g_1 sim_g_2 sim_g_3 sim_g_4] def
    -
    -  true
    -  [delays weight tau_syn sim_gs]
    -  {
    -    /sim_g  exch def
    -    /tau    exch def
    -    /W      exch def
    -    /t0     exch spike_time add def
    -    /theo_g t0 W tau t alpha_function def
    -    sim_g theo_g sub { abs } Map Max tolerance leq and
    -  } ScanThread
    -  end
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_aeif_cond_beta_multisynapse.sli b/testsuite/unittests/test_aeif_cond_beta_multisynapse.sli
    deleted file mode 100644
    index 0e0c1450cb..0000000000
    --- a/testsuite/unittests/test_aeif_cond_beta_multisynapse.sli
    +++ /dev/null
    @@ -1,512 +0,0 @@
    -/*
    - *  test_aeif_cond_beta_multisynapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    - 
    - /** @BeginDocumentation
    -   Name: testsuite::test_aeif_cond_beta_multisynapse - sli script for the aeif multisynapse model with synaptic conductance modeled by a double exponential function
    -
    -   Synopsis: (test_aeif_cond_beta_multisynapse) run
    -
    -   Description:
    -   This test creates a multisynapse neuron with three receptor ports with
    -   different synaptic rise times and decay times, and connect it to
    -   two excitatory and one inhibitory signals. At the end, the script compares
    -   the simulated values of V(t) with an approximate analytical formula, which
    -   can be derived as follows:
    -   For small excitatory inputs the synaptic current can be approximated as
    -   I(t)=g(t)[Vrest-Eex]
    -   where g(t) is the synaptic conductance, Vrest is the resting potential and
    -   Eex is the excitatory reverse potential (see Roth and van Rossum, p. 144).
    -   Using the LIF model, the differential equation for the membrane potential
    -   can be written as
    -   tau_m dv/dt = -v + G
    -   where tau_m = Cm/gL, v = Vm - Vrest, and G=g(t)(Eex-Vrest)/gL
    -   Using a first-order Taylor expansion of v around a generic time t0:
    -   v(t0+tau_m)=v(t0)+tau_m dv/dt + O(tau_m^2)
    -   and substituting t=t0+tau_m we get
    -   v(t)=G(t-tau_m)
    -   This approximation is valid for small excitatory inputs if tau_m is small
    -   compared to the time scale of variation of G(t). Basically, this happens
    -   when the synaptic rise time and decay time are much greater than tau_m.
    -   An analogous approximation can be derived for small inhibitory inputs.
    -
    -   References
    -   A. Roth and M. C. W. van Rossum, Modeling synapses, in Computational
    -   Modeling Methods for Neuroscientists, MIT Press 2013, Chapter 6, pp. 139-159
    -
    -   SeeAlso:
    -
    -   FirstVersion: August 2016
    -   Author: Bruno Golosio
    - */
    - 
    -(unittest) run
    -/unittest using
    -
    -<< 
    -    /overwrite_files true
    ->> SetKernelStatus
    -
    -% This test should only run if we have GSL
    -skip_if_without_gsl
    -
    -/tolerance    1e-2 def %mV
    -/simulation_t 300 def %ms
    -/V_peak   0. def
    -/a    4. def
    -/b    80.5 def
    -/E_rev        [20.0 0.0 -85.0] def % synaptic reversal potentials  
    -/tau_decay    [40.0 20.0 30.0] def % synaptic decay times  
    -/tau_rise     [20.0 10.0 5.0] def % synaptic rise times  
    -/weights      [0.1 0.2 0.15] def % synaptic weights
    -/delays       [1. 100. 130.] def % ms - synaptic delays
    -/spike_time   10. def
    -/dt           0.1 def % time step
    -/Vrest        -70.6 def % resting potential
    -/g_L          300.0 def
    -
    -/spike_generator Create /sg Set
    -sg << /spike_times [spike_time] >> SetStatus % generates a single peak
    -
    -% Creates a voltmeter
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval dt >> SetStatus
    -
    -% Creates one aeif_conf_beta_multisynapse neuron
    -/aeif_cond_beta_multisynapse Create /multisynapse_neuron Set
    -multisynapse_neuron << /E_rev E_rev
    -                       /tau_decay tau_decay
    -                       /tau_rise tau_rise
    -                       /V_peak V_peak
    -                       /a a
    -                       /b b
    -                       /E_L Vrest
    -                       /g_L g_L >> SetStatus
    -
    -% creates an array of synaptic indexes 
    -delays length 1 arraystore Range /synapses_idx exch def
    -
    -[delays weights synapses_idx] % loop on synaptic receptor ports
    -{
    -  /syn_id exch def
    -  /W exch def
    -  /delay exch def
    -  % connect spike generator to each port
    -  sg multisynapse_neuron /one_to_one <<
    -  /synapse_model /static_synapse
    -  /delay delay
    -  /weight W
    -  /receptor_type syn_id >> Connect
    -} ScanThread
    -
    -% connects voltmeter
    -vm multisynapse_neuron 1. 8. /static_synapse Connect
    -
    -simulation_t ms Simulate % run simulation
    -
    -% Gets the membrane voltage of the multisynapse neuron
    -/d vm /events get def
    -d /V_m get cva /Vms Set
    -d /times get cva /ts Set % get times
    -
    -% loop on time steps
    -[ts Vms]
    -{
    -  Vrest sub /V_cur exch def % subtracts resting potential from V 
    -  dt mul /t_cur exch def % current time in ms
    -  [E_rev tau_rise tau_decay weights delays] % loop on connections
    -  {
    -    /delay exch def % synaptic delay
    -    /W exch def % synaptic weight
    -    /td exch def % synaptic decay time
    -    /tr exch def % synaptic rise time
    -                /Er exch def % synaptic reversal potential
    -
    -    spike_time delay add /t0 exch def % peak starting time
    -    % Evaluates the driving force   
    -    Er Vrest sub
    -    /Vforce exch def
    -    % coefficient for approximate linear relationship
    -    % between V(t) and g(t)
    -    %coeff=W*Vforce/g_L
    -    /coeff W Vforce mul g_L div def
    -
    -    %t_p = td*tr / (td - tr) * np.log(td/tr) # peak time
    -    /t_p td tr mul td tr sub div td tr div ln mul def
    -    % normalization coefficient for synaptic conductance
    -    %g0 = coeff/(np.exp(-t_p/taud)-np.exp(-t_p/taur))
    -    /g0 coeff t_p td div neg exp t_p tr div neg exp sub div def
    -
    -    /t_rel t_cur t0 sub def % time relative to peak starting time
    -    t_rel 0. lt {0.}
    -    { 
    -      % approximate analytical calculation of V(t)
    -      % (contribution from each connection)
    -        %y=g0*(np.exp(-(t-t0)/taud)-np.exp(-(t-t0)/taur))
    -        g0 t_rel td div neg exp t_rel tr div neg exp sub mul
    -    }
    -    ifelse
    -  }  ScanThread
    -  add add /Vtheor exch def % approximate analytical calculation of V(t)
    -  % V_cur cvs ( ) join Vtheor cvs join = % display V simul. and theor.
    -  V_cur Vtheor sub abs /Vdiff exch def % absolute value of the difference
    -  Vdiff tolerance lt true eq assert_or_die % compare with tolerance
    -} ScanThread
    -
    -% ---------------------------
    -
    -% The following tests address #547
    -% - Test that t_ref == 0 shows no refractoriness
    -% - Test that t_ref == h shows 1 step refractoriness
    -% - Test that w-dynamics during refractoriness is based on V==V_reset
    -
    -% test for t_ref == 0
    -{ 
    -  << >> begin
    -  ResetKernel
    -  /res 0.1 def
    -  /V_reset -111. def
    -  
    -  << /resolution res >> SetKernelStatus
    -  /nrn /aeif_cond_beta_multisynapse 
    -    << /w 0. /a 0. /b 0. /Delta_T 0. /t_ref 0. /I_e 1000.
    -       /V_reset V_reset >>
    -    Create
    -  def
    -  
    -  /sr /spike_recorder << /time_in_steps true >> Create def
    -  /vm /voltmeter << /time_in_steps true /interval res >> Create def
    -  
    -  nrn sr Connect
    -  vm nrn Connect
    -  
    -  10 Simulate
    -  /stime sr /events get /times get cva 0 get def
    -  [ vm /events get dup /times get cva exch /V_m get cva ] Transpose dup
    -  { First stime eq } Select First  % time/voltage at spike
    -  Last V_reset eq  % V_m == V_reset at spike time
    -  exch
    -  { First stime 1 add eq } Select First % time/voltage step after spike
    -  Last V_reset gt   % V_m > V_reset one step after spike
    -  and
    -  end
    -} assert_or_die
    -     
    -% test for t_ref == resolution
    -{ 
    -  << >> begin
    -  ResetKernel
    -  /res 0.1 def
    -  /V_reset -111. def
    -  
    -  << /resolution res >> SetKernelStatus
    -  /nrn /aeif_cond_beta_multisynapse 
    -    << /w 0. /a 0. /b 0. /Delta_T 0. /t_ref res /I_e 1000.
    -       /V_reset V_reset >>
    -    Create
    -  def
    -  
    -  /sr /spike_recorder << /time_in_steps true >> Create def
    -  /vm /voltmeter << /time_in_steps true /interval res >> Create def
    -  
    -  nrn sr Connect
    -  vm nrn Connect
    -  
    -  10 Simulate
    -  /stime sr /events get /times get cva 0 get def
    -  [ vm /events get dup /times get cva exch /V_m get cva ] Transpose
    -  /result Set
    -  
    -  result { First stime eq } Select First  % time/voltage at spike
    -  Last V_reset eq  % V_m == V_reset at spike time
    -
    -  result { First stime 1 add eq } Select First % time/voltage step after spike
    -  Last V_reset eq   % V_m == V_reset one step after spike
    -
    -  result { First stime 2 add eq } Select First % time/voltage two steps after spike
    -  Last V_reset gt   % V_m > V_reset two steps after spike
    - 
    -  and and
    -
    -  end
    -} assert_or_die
    -
    -% test w-dynamics based on clamped V
    -{ 
    -  << >> begin
    -  ResetKernel
    -  /res 1.0 def
    -  /V_reset -111. def
    -  /E_L -70. def
    -  /t_ref 100. def
    -  /a 10. def
    -  /b 100. def
    -  /tau_w 1.0 def
    -  
    -  << /resolution res >> SetKernelStatus
    -  /nrn /aeif_cond_beta_multisynapse 
    -    << /w 0. /a a /b b /tau_w tau_w /Delta_T 0. /t_ref t_ref /I_e 1000.
    -       /E_L E_L /V_reset V_reset >>
    -    Create
    -  def
    -  
    -  /sr /spike_recorder << /time_in_steps true >> Create def
    -  /vm /multimeter << /time_in_steps true /interval res /record_from [ /V_m /w ] >> Create def
    -  
    -  nrn sr Connect
    -  vm nrn Connect
    -  
    -  50 Simulate
    -  /stime sr /events get /times get cva 0 get def
    -  /mme vm /events get def
    -  [ mme /times get cva mme /V_m get cva mme /w get cva] Transpose
    -  /result Set
    -  
    -  result { First stime eq } Select First  % time/voltage/w at spike
    -  arrayload ; 
    -  /w0 Set
    -  /V0 Set
    -  /t0 Set
    -  
    -  result { First stime 20 add eq } Select First % time/voltage 20 steps after spike
    -  arrayload ;
    -  /w1 Set
    -  /V1 Set
    -  /t1 Set
    -  /dt t1 t0 sub res mul def
    -  dt t_ref lt   % still refractory
    -  V0 V1 eq V0 V_reset eq and   % V_m clamped
    - 
    -  % expected w
    -  /w_theory
    -     w0 dt tau_w div neg exp mul 
    -     V_reset E_L sub a mul 1 dt tau_w div neg exp sub mul
    -     add
    -  def
    -  
    -  w1 w_theory div 8 ToUnitTestPrecision 1 eq
    -  
    -  and
    -
    -  end
    -} assert_or_die
    -
    -
    -% The following tests address #800
    -% - Test that the default recordables are V_m, w and g_1
    -% - Test that the recordable g's change when changing the number of receptor ports
    -% - Test that g has beta function dynamics when tau_rise and tau_decay are
    -%   different, and has alpha function dynamics when they are the same
    -
    -% test default recordables include g_1
    -{
    -  << >> begin
    -  ResetKernel
    -  /nrn /aeif_cond_beta_multisynapse Create def
    -  
    -  /mm /multimeter << /time_in_steps true
    -                     /interval 1.0
    -		     /record_from [ /V_m /w /g_1 ]
    -		  >> Create def
    -  
    -  mm nrn Connect
    -  
    -  /len nrn /recordables get length def
    -  len 3 eq
    -  end
    -}
    -assert_or_die
    -
    -% test resize recordables
    -{
    -  << >> begin
    -  ResetKernel
    -  
    -  /E_rev1        [0.0  0.0  -85.0] def
    -  /E_rev2        [0.0  0.0] def
    -  /E_rev3        [0.0  0.0  -85.0 0.] def
    -  /tau_rise1     [5.0  1.0  25.0] def
    -  /tau_rise2     [5.0  1.0] def
    -  /tau_rise3     [5.0  1.0  25.0 50.] def
    -  /tau_decay1    [20.0  10.0  85.0] def
    -  /tau_decay2    [20.0  10.0] def
    -  /tau_decay3    [20.0  10.0  85.0 100.] def
    -  
    -  /nrn /aeif_cond_beta_multisynapse <<  
    -    /E_rev E_rev1 /tau_rise tau_rise1 /tau_decay tau_decay1
    -      >> Create def
    -  /len1 nrn /recordables get length def
    -  
    -  nrn << /E_rev E_rev2 /tau_rise tau_rise2 /tau_decay tau_decay2 >> SetStatus
    -  /len2 nrn /recordables get length def
    -  
    -  nrn << /E_rev E_rev3 /tau_rise tau_rise3 /tau_decay tau_decay3 >> SetStatus
    -  /len3 nrn /recordables get length def
    -  
    -  len1 5 eq len2 4 eq and len3 6 eq and
    -  end
    -}
    -assert_or_die
    -
    -% test record g and check for beta function synapse
    -{
    -  << >> begin
    -  ResetKernel
    -  /E_rev       [0.0  0.0  -85.0 20.] def % synaptic reversal potentials  
    -  /tau_decay   [40.0 20.0  30.0 25.] def % synaptic decay times  
    -  /tau_rise    [20.0 10.0  5.0  25.] def % synaptic rise times  
    -  /weights     [1.0  0.5   2.0  1.0] def % synaptic weights
    -  /delays      [1.0  3.0   10.0 10.] def % ms - synaptic delays
    -  /spike_time  10.  def    % time at which the single spike occurs
    -  /dt          0.1  def    % time step
    -  /total_t     500. def    % total simulation time
    -  /tolerance   1e-7 def    % tolerable difference between theoretic and simulated beta synapse conductances
    -
    -  /alpha_function
    -  {
    -    % Call like t0 W tau t alpha_function
    -    << /tau 1.0 /W 1.0 /t0 0. >>
    -    begin
    -      /t exch def
    -      /tau exch def
    -      /W exch def
    -      /t0 exch def
    -      
    -      t
    -      {
    -        /tt exch def
    -        tt t0 geq
    -        {
    -          /tdiff_over_tau tt t0 sub tau div def
    -          tdiff_over_tau neg exp E tdiff_over_tau W mul mul mul
    -        }
    -        % else
    -        {
    -          0.
    -        } ifelse
    -      } Map
    -    end
    -  } def
    -
    -  /beta_function
    -  {
    -    % Call like t0 W tau_decay tau_rise t beta_function
    -    << /tau1 1.0 /tau2 2.0 /W 1.0 /t0 0. >>
    -    begin
    -      /t exch def
    -      /tau1 exch def
    -      /tau2 exch def
    -      /W exch def
    -      /t0 exch def
    -      
    -      tau1 tau2 eq
    -      { % Compute alpha function
    -        t0 W tau1 t alpha_function
    -      }
    -      % else
    -      { % Compute beta function
    -        /tau1_inv tau1 inv def
    -        /tau2_inv tau2 inv def
    -        /inv_tau_diff tau1_inv tau2_inv sub def
    -        /tpeak tau2 tau1 div ln inv_tau_diff div def
    -        /den tpeak tau1 div neg exp tpeak tau2 div neg exp sub def
    -        
    -        t
    -        {
    -          /tt exch def
    -          tt t0 geq
    -          {
    -            /tdiff tt t0 sub def
    -            /num tdiff tau1 div neg exp tdiff tau2 div neg exp sub def
    -            W num mul den div
    -          }
    -          % else
    -          {
    -            0.
    -          } ifelse
    -        } Map
    -      } ifelse
    -    end
    -  } def
    -
    -  << /resolution dt >> SetKernelStatus
    -
    -  % Create a spike generator that generates a single spike
    -  /spike_generator Create /sg Set
    -  sg << /spike_times [spike_time] >> SetStatus % generates a single peak
    -
    -  % Create the multisynapse neuron
    -  /nrn /aeif_cond_beta_multisynapse 
    -    <<  /w 0. /a 0. /b 0. /Delta_T 0. /t_ref 0. /I_e 0.
    -        /E_rev E_rev /tau_decay tau_decay /tau_rise tau_rise
    -    >> Create def
    -
    -  % Create an array of synaptic indexes to loop through 
    -  delays length 1 arraystore Range /synapses_idx exch def
    -  [delays weights synapses_idx] % loop on synaptic receptor ports
    -  {
    -    /syn_id exch def
    -    /W exch def
    -    /delay exch def
    -    % Connect spike generator to each port
    -    sg nrn /one_to_one <<
    -      /synapse_model /static_synapse
    -      /delay delay
    -      /weight W
    -      /receptor_type syn_id >>
    -      Connect
    -  } ScanThread
    -
    -  % Create the multimeter that will record from the 3 conductance channels
    -  /mm /multimeter << /time_in_steps true
    -                     /interval dt
    -		     /record_from [ /g_1 /g_2 /g_3 /g_4 ]
    -		  >> Create def
    -
    -  mm nrn Connect
    -
    -  % Simulate
    -  total_t Simulate
    -
    -  % Get the conductances measured during the simulation
    -  /t       mm /events get /times get cva dt mul def
    -  /sim_g_1 mm /events get /g_1   get cva def
    -  /sim_g_2 mm /events get /g_2   get cva def
    -  /sim_g_3 mm /events get /g_3   get cva def
    -  /sim_g_4 mm /events get /g_4   get cva def
    -  /sim_gs [sim_g_1 sim_g_2 sim_g_3 sim_g_4] def
    -
    -  true
    -  [delays weights tau_rise tau_decay sim_gs]
    -  {
    -    /sim_g  exch def
    -    /tau2   exch def
    -    /tau1   exch def
    -    /W      exch def
    -    /t0     exch spike_time add def
    -    /theo_g t0 W tau2 tau1 t beta_function def
    -    sim_g theo_g sub { abs } Map Max tolerance leq and
    -  } ScanThread
    -  end
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_amat2_psc_exp.sli b/testsuite/unittests/test_amat2_psc_exp.sli
    deleted file mode 100644
    index 18a38f8cb9..0000000000
    --- a/testsuite/unittests/test_amat2_psc_exp.sli
    +++ /dev/null
    @@ -1,252 +0,0 @@
    -/*
    - *  test_amat2_psc_exp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_amat2_psc_exp - sli script for overall test of amat2_psc_exp neuron model
    -
    -    Synopsis: (test_amat2_psc_exp) run -> compares response to current step with reference data 
    -
    -    Description:
    -    test_amat2_psc_exp.sli is an overall test of the mat2_neuron model connected
    -    to some useful devices.
    -
    -    A DC current is injected into the neuron using a current generator
    -    device. The membrane potential the threshold potential as well as the
    -    spiking activity are recorded by corresponding devices.
    -
    -    It can be observed how the current charges the membrane a spike
    -    is emitted the threshold potential is updated and evaluated whereas
    -    the membrane potential is not resetted and further evaluated too.
    -    Additionally the neuron becomes refractory after emitting a spike.
    -
    -    The timing of the various events on the simulation grid is of
    -    particular interest and crucial for the consistency of the
    -    simulation scheme.
    -
    -    Although 0.1 cannot be represented in the IEEE double data type it
    -    is safe to simulate with a resolution (computation step size) of 0.1
    -    ms because by default nest is built with a timebase enabling exact
    -    representation of 0.1 ms.
    -
    -    The expected output is documented and briefly commented at the end of
    -    the script.
    -
    -    Other test programs discuss the various aspects of this script in detail
    -    see the SeeAlso key below.
    -
    -    Author:  November 2014 Hans E Plesser based on test_mat2_psc_exp
    -    SeeAlso: testsuite::test_iaf, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -% First Test -------------------------------------------------------
    -%
    -% This test is identical with test_mat2_psc_exp and ensures that 
    -% both models behave identically provided the voltage-dependent threshold
    -% component is deactivated (beta == 0). Since the models have different
    -% default parameter values we need to obtain default values from 
    -% mat2_psc_exp.
    -
    -ResetKernel
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution h
    -  >> SetKernelStatus
    -
    -% explicitly set threshold omega here to ensure that after 
    -% change of definition of omega from relative to E_L to absolute
    -% we still get the original results; see #506.
    -/mat2p /mat2_psc_exp GetDefaults def
    -/amat2_psc_exp << /omega -51.0 
    -                  /beta 0.0 
    -                  /E_L mat2p/E_L ::
    -                  /I_e mat2p/I_e ::
    -                  /C_m mat2p/C_m ::
    -                  /tau_m mat2p/tau_m ::
    -                  /tau_syn_ex mat2p/tau_syn_ex ::
    -                  /tau_syn_in mat2p/tau_syn_in ::
    -                  /t_ref mat2p/t_ref ::
    -                  /tau_1 mat2p/tau_1 ::
    -                  /tau_2 mat2p/tau_2 ::
    -                  /alpha_1 mat2p/alpha_1 ::
    -                  /alpha_2 mat2p/alpha_2 ::
    -                  /tau_v mat2p/tau_m :: 10. add  % must differ from tau_m but is irrelevant for beta==0 
    -               >> Create /neuron Set
    -
    -/dc_generator Create /dc_gen Set
    -dc_gen << /amplitude 2400. >> SetStatus
    -
    -/multimeter Create /mm Set
    -mm <<
    -     /interval h
    -     /record_from [/V_m /V_th] % record non-resetting membrane potential
    -                               % and evaluated threshold potential
    -     /time_in_steps true
    -   >> SetStatus
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -
    -dc_gen neuron 1.0 h Connect
    -mm neuron     1.0 h Connect
    -neuron sr     1.0 h Connect
    -
    -8 Simulate
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of
    -% the multimeter and the spike recorder. Both multimeter and spike
    -% recorder are connected to the same neuron. 
    -%
    -
    -{
    - sr [/events [/times]] get cva   	     % array of recorded data
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%
    -% spike times (in steps)
    -
    -[[11 32 54]] % The threshold potential crosses the membrane potential at time
    -     	     % step 31. But due to the refractory period of 2 ms the neuron
    -	         % is not allowed to fire until time step 32.
    -
    -exch assert_or_die
    -
    -
    -{                                            % reference data
    - dup Transpose First /test_times Set         % times of reference
    -
    - mm [/events [/times /V_m /V_th]] get cva    % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%
    -% time (in steps)  membrane potential V_m (in mV)  threshold V_th (in mV)
    -
    -[
    -[ 1	-70		-51	 ] % <--- dc_gen is switched on
    -[ 2	-70		-51	 ] % <--- The DC current arrives at neuron
    -[ 3	-67.6238	-51	 ] % <-	  but has not affected the potential yet
    -[ 4	-65.2947	-51	 ] %   |
    -[ 5	-63.0117	-51	 ] %    - First evaluation of the DC current. The
    -[ 6	-60.774		-51	 ] %      threshold potential stays constant
    -[ 7	-58.5805	-51	 ] %      because it is at its resting level.
    -[ 8	-56.4305	-51	 ]
    -[ 9	-54.323		-51	 ]
    -[ 10	-52.2573	-51	 ]
    -[ 11	-50.2324	-12	 ] % <--- The membrane potential crossed the
    -[ 12	-48.2477	-12.3692 ] % <-   threshold potential the first time.
    -[ 13	-46.3023	-12.7346 ] %   |  The threshold potential is updated and
    -[ 14	-44.3953	-13.0965 ] %   |  the membrane potential is further evaluated
    -[ 15	-42.5262	-13.4548 ] %   |  without resetting.
    -[ 16	-40.694		-13.8095 ] %   |
    -[ 17	-38.8982	-14.1607 ] %    - The threshold potential decays double
    -[ 18	-37.1379	-14.5084 ] %      exponential towards its resting level.
    -[ 19	-35.4124	-14.8527 ]
    -[ 20	-33.7212	-15.1935 ]
    -[ 21	-32.0634	-15.531	 ]
    -]
    -
    -
    -exch assert_or_die
    -
    -% ------------------------------------------------------------
    -% We now know that the model works including spike detection
    -% except for the yet untested voltage-dependent component.
    -% We study this in subthreshold mode where we can obtain 
    -% exact solutions. We set alpha1 and alpha2 to non-zero
    -% values. As there is no spike, they should not affect the result.
    -% and set a constant input current.
    -%
    -% Reference data obtained with Mathematica.
    -
    -ResetKernel
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution h
    -  >> SetKernelStatus
    -
    -/amat2_psc_exp << /omega 2. 
    -                  /beta 2.0 
    -                  /E_L 0. 
    -				  /V_m -2.    % V_m < V_th for t < 10ms -> no spikes
    -                  /I_e 10.
    -                  /alpha_1 10.
    -                  /alpha_2 20.
    -               >> Create /neuron Set
    -
    -/multimeter Create /mm Set
    -mm <<
    -     /interval h 
    -     /record_from [/V_m /V_th /V_th_v] % record non-resetting membrane potential
    -                                       % threshold pot and kernel contrib
    -     /time_in_steps true
    -   >> SetStatus
    -
    -mm neuron 1.0 h Connect
    -
    -10.1 Simulate
    -
    -{                                            % reference data
    -  dup Transpose First /test_times Set         % times of reference
    -
    -  mm [/events [/times /V_m /V_th /V_th_v]] get cva    % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  { First test_times exch MemberQ } Select   % those with reference
    -  eq                                          % compare
    -}
    -
    -[
    - [ 10 -1.76209 2.21168 0.211679]
    - [ 20 -1.54683 2.71733 0.717335]
    - [ 30 -1.35205 3.36815 1.36815]
    - [ 40 -1.1758 4.06297 2.06297]
    - [ 50 -1.01633 4.73557 2.73557]
    - [ 60 -0.872029 5.34504 3.34504]
    - [ 70 -0.741463 5.86852 3.86852]
    - [ 80 -0.623322 6.29576 4.29576]
    - [ 90 -0.516424 6.62509 4.62509]
    - [100 -0.419699 6.86044 4.86044]
    -]
    -
    -exch
    -assert_or_die
    -
    -
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_bernoulli_synapse.sli b/testsuite/unittests/test_bernoulli_synapse.sli
    deleted file mode 100644
    index 1f1ea83861..0000000000
    --- a/testsuite/unittests/test_bernoulli_synapse.sli
    +++ /dev/null
    @@ -1,113 +0,0 @@
    -/*
    - *  test_bernoulli_synapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_bernoulli_synapse - test of bernoulli_synapse connection
    -
    -    Synopsis: (test_bernoulli_synapse) run -> measure average number of spikes transmitted
    -    by a Bernoulli synapse (static synapse with stochastic transmission)
    -
    -    Description:
    -    1000 spikes generated by spike_generator are sent to a parrot neuron using a
    -    bernoulli_synapse with transmission probability 25%. Transmission is mediated
    -    by another parrot neuron that is connected to spike_generator via static synapse.
    -    If the average number of spikes detected by spike recorders is within three
    -    standard deviations from the mean of the binomial distribution, the synapse
    -    works fine. Also tests the interval of possible probabilities, [0, 1].
    -
    -    FirstVersion: June 2017
    -    Author: Maximilian Schmidt, Milena Menezes Carvalho
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% test parameters -------------------------------------------------
    -% number of spikes sent via bernoulli synapse to parrot neuron
    -/N_spikes 1000 def
    -% transmission probability of the bernoulli synapse
    -/p 0.25 def
    -% allowed absolute deviation: three standard deviations of the binomial distribution with (N_spikes, p)
    -/margin N_spikes p mul 1 p sub mul sqrt 3 mul def
    -% test routine ----------------------------------------------------
    -
    -/test_bernoulli_run
    -{
    -  /seed Set
    -  ResetKernel
    -  << /rng_seed seed >> SetKernelStatus
    -
    -  % build
    -  /spike_generator Create /sg Set
    -  /parrot_neuron Create /pre Set
    -  /parrot_neuron Create /post Set
    -  /spike_recorder Create /sr Set
    -
    -  % set spike_generator
    -  sg << /spike_times [1. N_spikes cvd] Range >> SetStatus
    -
    -  % connect spike_generator to presynaptic parrot neuron
    -  % via static synapse
    -  sg pre << /rule /all_to_all >> << /synapse_model /static_synapse >> Connect
    -
    -  % connect presynaptic parrot neuron to postsynaptic parrot neuron
    -  % via bernoulli_synapse with transmission probability p
    -  pre post << /rule /all_to_all >> << /synapse_model /bernoulli_synapse /p_transmit p >> Connect
    -
    -  % connect parrot neuron to spike_recorder
    -  post sr Connect
    -
    -  % simulate for 1002 ms to allow all spikes to be recorded accordingly
    -  N_spikes 2. add Simulate
    -
    -  % get number of spikes transmitted
    -  sr /events get /times get length /N_spikes_transmitted Set
    -
    -  % mean value of spikes to be received with transmission probability p
    -  /mean N_spikes p mul def
    -
    -  % check if error between number of spikes transmitted and mean is within the defined margin
    -  mean N_spikes_transmitted sub abs margin leq
    -  assert_or_die
    -}
    -def
    -
    -% Test 1: test 10 different rng seeds for test_bernoulli_run routine
    -
    -[123 133] Range
    -{
    -  test_bernoulli_run
    -}
    -forall
    -
    -% Test 2: test if p_transmit values are within the range [0, 1]
    -
    -/parrot_neuron Create /pre Set
    -/parrot_neuron Create /post Set
    -
    -{
    -  pre post << /rule /all_to_all >> << /synapse_model /bernoulli_synapse /p_transmit -0.1 >> Connect
    -} fail_or_die
    -
    -{
    -  pre post << /rule /all_to_all >> << /synapse_model /bernoulli_synapse /p_transmit 1.1 >> Connect
    -} fail_or_die
    diff --git a/testsuite/unittests/test_binary.sli b/testsuite/unittests/test_binary.sli
    deleted file mode 100644
    index 8cb60333bc..0000000000
    --- a/testsuite/unittests/test_binary.sli
    +++ /dev/null
    @@ -1,170 +0,0 @@
    -/*
    - *  test_binary.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_binary - sli script for overall test of binary neuron models
    -
    -    Synopsis: (test_binary) run -> test basic communication patterns employed by binary neurons 
    -
    -    Description:
    -    Test, whether the communication mechanism for binary neurons
    -    works. Two spikes indicate an up-transition, a single spike
    -    indicate a down transition.
    -    
    -    Author:  March 2013, Helias    
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -% assumes model name on stack
    -[/ginzburg_neuron /mcculloch_pitts_neuron /erfc_neuron]
    -{
    -
    -    0.1 /h Set
    -
    -    ResetKernel
    -
    -    <<
    -    	/local_num_threads 1 
    -    	/resolution h
    -    >> SetKernelStatus
    -
    -    /model Set
    -
    -    cout (testing model ) <- model <- ;
    -    
    -    % 1st Test:
    -    % check, if double spikes are correctly interpreted as up transition
    -    % and single spikes are interpreted as down transition
    -    % expected read out at target neuron
    -    /expected [ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 0. 0. 0. 0. ] def
    -
    -    /nrn model Create def
    -
    -    /sg /spike_generator Create def
    -
    -    sg << /spike_times [10. 10. 15.] >> SetStatus
    -
    -    sg nrn 1. 1. Connect
    -
    -    /multi /multimeter Create def
    -
    -    multi << /record_from [/h] >> SetStatus
    -
    -    multi nrn Connect
    -    
    -    20. Simulate
    -    
    -    multi /events get /h get cva
    -    6 ToUnitTestPrecision
    -    expected {cvi} Map
    -    eq assert_or_die
    -
    -
    -    % 2nd Test:
    -    % check, if binary_neuron correctly transmits its state change
    -    
    -    ResetKernel
    -
    -    << 
    -    	/local_num_threads 1 
    -    	/resolution h
    -    >> SetKernelStatus
    -
    -
    -    /nrn1 model Create def
    -    /sp /spike_recorder Create def
    -
    -    % set threshold so that neuron makes transition to 1
    -    nrn1 << /theta -10. /tau_m 1. >> SetStatus
    -
    -    nrn1 sp Connect
    -
    -    Prepare
    -    
    -    100. Run
    -    
    -    % should have two events
    -    sp /events get /senders get length 2 eq
    -    assert_or_die
    -
    -    % both events should be at same time point
    -    sp /events get /times get dup 0 get exch 0 get eq
    -    assert_or_die
    -    
    -    sp /events get /senders get length 2 eq
    -    assert_or_die
    -
    -    % set threshold so that neuron makes transition to 0
    -    nrn1 << /theta 10. /tau_m 1. >> SetStatus
    -
    -    100. Run
    -
    -    % should have one more event now
    -    sp /events get /senders get length 3 eq
    -    assert_or_die
    -
    -    Cleanup
    -}
    -forall
    -
    -
    -
    -/mcculloch_pitts_neuron Create /binary Set
    -/iaf_psc_alpha Create /spiking Set
    -/spike_generator Create /sg Set
    -/spike_recorder Create /sr Set
    -
    -% check if connecting a binary to a spiking neuron throws exception
    -{
    -    binary spiking Connect
    -} fail_or_die
    -
    -% check if connecting a spiking neuron to a binary throws exception
    -{
    -    spiking binary Connect
    -} fail_or_die
    -
    -% check if connecting a binary or a spiking neuron to general device works
    -{
    -    sg spiking Connect
    -    sg binary Connect
    -    spiking sr Connect
    -    binary sr Connect
    -} pass_or_die
    -
    -% Check if simulating with two connected binary neurons when keep_source_table
    -% is set to false throws exception
    -{
    -  ResetKernel
    -  
    -  << /keep_source_table false >> SetKernelStatus
    -  
    -  /ginzburg /ginzburg_neuron Create def
    -  /mcculluch /mcculluch_pitts_neuron Create def
    -  
    -  ginzburg mcculluch Connect
    -  
    -  100. Simulate
    -} fail_or_die
    diff --git a/testsuite/unittests/test_common_props_setting.sli b/testsuite/unittests/test_common_props_setting.sli
    deleted file mode 100644
    index 0c34d45ab8..0000000000
    --- a/testsuite/unittests/test_common_props_setting.sli
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -/*
    - *  test_common_props_setting.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - 
    -/** @BeginDocumentation
    -Name: testsuite::test_common_props_setting - test that common properties can be set as defaults, not else
    -
    -Synopsis: (test_common_props_setting) run -> compare response with reference data
    -
    -Description:
    -For synapses with common properties, ensure that common and individual properties can be set by 
    -SetDefaults and CopyModel, but that an exception is raised if they are set via an individual connection.
    -
    -FirstVersion: November 2014
    -
    -Author: Hans E Plesser
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/synmodels 
    -  [/stdp_synapse_hom /stdp_pl_synapse_hom /stdp_facetshw_synapse_hom 
    -  /stdp_dopamine_synapse]
    -  { GetKernelStatus /synapse_models get exch MemberQ } Select
    -def
    -
    -% prepare stdp_dopamine_synapse, which needs a
    -% volume transmitter assigned to it before connecting
    -/vol /volume_transmitter Create 0 get def
    -/stdp_dopamine_synapse << /vt vol >> pstack SetDefaults
    -
    -% first test: do everything correctly
    -{
    -  true
    -  synmodels
    -  {
    -    /synmod Set 
    -    synmod << /tau_plus 5.0 /weight 2.0 >> SetDefaults 
    -    synmod GetDefaults [[/tau_plus /weight]] get [5.0 2.0] eq
    -    synmod dup cvs (_copy) join cvlit /copmod Set
    -    copmod << /tau_plus 15.0 /weight 20.0 >> CopyModel 
    -    copmod GetDefaults [[/tau_plus /weight]] get [15.0 20.0] eq and
    -    
    -    /iaf_psc_alpha Create /n Set
    -    n n /all_to_all synmod Connect
    -    << /source n >> GetConnections 0 get dup << /weight 3.0 >> SetStatus 
    -    GetStatus /weight get 3.0 eq and
    -  } Fold
    -} assert_or_die
    -
    -ResetKernel
    -
    -% prepare stdp_dopamine_synapse, which needs a
    -% volume transmitter assigned to it before connecting
    -/vol /volume_transmitter Create 0 get def
    -/stdp_dopamine_synapse << /vt vol >> SetDefaults
    -
    -% second test: set common prop on synapse
    -synmodels
    -{
    -  /synmod Set
    -  synmod GetDefaults /tau_plus get /tpref Set
    -  
    -  /iaf_psc_alpha Create /n Set
    -  n n /all_to_all synmod Connect
    -  << /source n >> GetConnections 0 get /c Set
    -  { c << /tau_plus tpref 1. add 3. mul >> SetStatus } fail_or_die
    -  { synmod GetDefaults /tau_plus get tpref eq } assert_or_die   
    -} forall
    diff --git a/testsuite/unittests/test_compare_delta.sli b/testsuite/unittests/test_compare_delta.sli
    deleted file mode 100644
    index 130d5c62c6..0000000000
    --- a/testsuite/unittests/test_compare_delta.sli
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -/*
    - *  test_compare_delta.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -% compare iaf_psc_delta and iaf_psc_delta_ps
    -% neurons are driven by spike_generator firing at
    -%
    -%  1.0 2.0 3.0 4.0 5.0 10.5 12.0
    -%
    -% both neurons fire at 4.0, spike at 5.0 arrives during
    -% the refractory period
    -
    - 
    -<<
    -  /E_L 49.0 neg      % resting membrane potential [mV]
    -  /V_m 60.0 neg
    -  /V_th 50.0 neg     % Threshold [mV] WRONG!!
    -  /V_reset 60.0 neg  % Reset Potential [mV] WRONG!!
    -  /C_m 200.0         % Capacity of the membrane [pF]
    -  /tau_m 20.0        % Membrane time constant [ms]
    - 
    - /t_ref 5.0          % duration of refractory period [ms]
    ->> /neuron_params Set
    -
    -
    -<< /resolution 0.1 >> SetKernelStatus
    -
    -/iaf_psc_delta        Create /plain Set
    -/iaf_psc_delta_ps  Create /canon Set
    -
    -plain neuron_params SetStatus
    -canon neuron_params SetStatus
    -
    -/spike_generator     Create /gen Set
    -/spike_recorder      Create /rec Set
    -
    -
    -gen << /precise_times false /spike_times [ 1.0 2.0 3.0 4.0 5.0 10.5 12.0 ] >> SetStatus
    -
    -
    -/static_synapse
    -<< /delay  0.1       % synaptic delay, all connections [ms] 
    -   /weight 2.5       % [pA], excitatory  
    ->> SetDefaults
    -
    -[ plain canon ]
    -{
    -  /nrn Set
    -
    -  gen nrn Connect
    -  nrn rec Connect
    -
    -} forall
    -
    -
    -20.0
    -%50
    -%200.0 
    -Simulate
    -
    -{
    -  rec [/events [/senders /times]] get cva Transpose 6 ToUnitTestPrecision dup % we duplicate result and check each order of recorded spikes
    -  [[2 4.1] [1 4.1]] 6 ToUnitTestPrecision eq exch % exchange result of equality check with events, so we can compare we opposite recording order
    -  [[1 4.1] [2 4.1]] 6 ToUnitTestPrecision eq
    -  or % events should match whether event from neuron 1 or neuron 2 was recorded first
    -} assert_or_die
    diff --git a/testsuite/unittests/test_cond_exp_models.sli b/testsuite/unittests/test_cond_exp_models.sli
    deleted file mode 100644
    index 433e40a625..0000000000
    --- a/testsuite/unittests/test_cond_exp_models.sli
    +++ /dev/null
    @@ -1,143 +0,0 @@
    -/*
    - *  test_cond_exp_models.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_WARNING setverbosity
    -
    -/T 5 def  % Time to simulate
    -
    -% The following models will not be tested:
    -/skip_list [ 
    -             /pp_cond_exp_mc_urbanczik  % cannot readout V_m directly
    -           ] def
    -
    -% Some models don't have a known resting potential, and thus get a drift in
    -% some tests. In these cases, instead of checking that the potential is
    -% unchanged, we check that the drift is not too large.
    -/inaccurate_rest_pot_diff_limit
    -<<
    -  /hh_cond_exp_traub 6.0e-2
    -  /aeif_cond_exp 5.4e-7
    ->> def
    -
    -/get_vm
    -{
    -  Create /n Set
    -  /param_ex Set
    -  /param_in Set
    -  /sg_weight Set
    -
    -  /e_ex n GetStatus 0 get param_ex get def
    -  /e_in n GetStatus 0 get param_in get def
    -
    -  n << /E_ex e_ex /E_in e_in >> SetStatus
    -  /sg /spike_generator Create def
    -  sg << /spike_times [1.0] >> SetStatus
    -  sg n sg_weight 1.0 Connect
    -  T Simulate
    -  n GetStatus 0 get /V_m get
    -} def
    -
    -
    -GetKernelStatus /node_models get
    -{
    -  dup cvs dup (cond_exp) searchif exch (multisynapse) searchif not and
    -  {
    -    /model Set
    -    
    -    model skip_list exch MemberQ not
    -    {
    -        % Reference value
    -        /n model Create def
    -        T Simulate
    -        /vm_ref n GetStatus 0 get /V_m get def
    -
    -        {
    -        % Default parameters, with excitatory input
    -        ResetKernel
    -        vm_ref
    -        5.0 /E_in /E_ex model get_vm
    -        lt dup
    -        } assert_or_die
    -
    -        {
    -        % Default parameters, with inhibitory input
    -        ResetKernel
    -        vm_ref
    -        -5.0 /E_in /E_ex model get_vm
    -        gt
    -        } assert_or_die
    -
    -        {
    -        % Flipped parameters, with excitatory input
    -        ResetKernel
    -        vm_ref
    -        5.0 /E_ex /E_in model get_vm
    -        gt
    -        } assert_or_die
    -
    -        {
    -        % Flipped parameters, with inhibitory input
    -        ResetKernel
    -        vm_ref
    -        -5.0 /E_ex /E_in model get_vm
    -        lt
    -        } assert_or_die
    -
    -        {
    -        % E_ex = E_in = E_L, with excitatory input
    -        ResetKernel
    -        vm_ref
    -        5.0 /E_L /E_L model get_vm
    -
    -        inaccurate_rest_pot_diff_limit keys model MemberQ
    -        {
    -            sub abs inaccurate_rest_pot_diff_limit model get lt
    -        }
    -        {
    -            eq
    -        } ifelse
    -        } assert_or_die
    -
    -        {
    -        % E_ex = E_in = E_L, with inhibitory input
    -        ResetKernel
    -        vm_ref
    -        -5.0 /E_L /E_L model get_vm
    -
    -        inaccurate_rest_pot_diff_limit keys model MemberQ
    -        {
    -            sub abs inaccurate_rest_pot_diff_limit model get lt
    -        }
    -        {
    -            eq
    -        } ifelse
    -        } assert_or_die
    -
    -    } if
    -  }
    -  {
    -    pop
    -  } ifelse
    -} forall
    diff --git a/testsuite/unittests/test_connect.sli b/testsuite/unittests/test_connect.sli
    deleted file mode 100644
    index 334825671e..0000000000
    --- a/testsuite/unittests/test_connect.sli
    +++ /dev/null
    @@ -1,220 +0,0 @@
    -/*
    - *  test_connect.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_connect - SLI script to test runability of all Connect variants
    -
    -   Synopsis: (test_connect) run
    -
    -   Description:
    -
    -   Tests if all variants of Connect can be run. This test checks the
    -   outcome of the calls only in a minimal way. A more comprehensive
    -   set of tests is available in PyNEST. It also checks the given
    -   parameters more thoroughly and looks at statistics of the resulting
    -   connectivity.
    -
    -   FirstVersion: April 2014
    -   Author: Jochen Martin Eppler
    -   SeeAlso: Connect
    - */
    -
    -M_ERROR setverbosity
    -
    -(unittest) run
    -/unittest using
    -
    -(Running Connect tests with legal arguments) =
    -
    -(  Testing variant "NodeCollection NodeCollection") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection double double") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b 2.0 3.0 Connect
    -<< /source a >> GetConnections dup
    -First dup dup
    -/target get 4 eq assert_or_die
    -/weight get 2.0 eq assert_or_die
    -/delay get 3.0 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection double double literal") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b 2.0 3.0 /static_synapse Connect
    -<< /source a >> GetConnections dup
    -First dup dup dup
    -/target get 4 eq assert_or_die
    -/weight get 2.0 eq assert_or_die
    -/delay get 3.0 eq assert_or_die
    -/synapse_model get /static_synapse eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection literal") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b /one_to_one Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection dict") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b << /rule /one_to_one >> Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection empty_dict") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b << >> Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection literal literal") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b /one_to_one /stdp_synapse Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection dict literal") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b << /rule /one_to_one >> /stdp_synapse Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection empty_dict literal") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b << >> /stdp_synapse Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection literal dict") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b /one_to_one << /synapse_model /stdp_synapse >> Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection literal empty_dict") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b /one_to_one << >> Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection dict dict") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b << /rule /one_to_one >> << /synapse_model /stdp_synapse >> Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection empty_dict dict") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b << >> << /synapse_model /stdp_synapse >> Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection dict empty_dict") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b << /rule /one_to_one >> << >> Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -(  Testing variant "NodeCollection NodeCollection empty_dict empty_dict") =
    -ResetKernel
    -/a /iaf_psc_alpha 3 Create def
    -/b /iaf_psc_alpha 3 Create def
    -a b << >> << >> Connect
    -<< /source a >> GetConnections dup
    -First /target get 4 eq assert_or_die
    -Last /target get 6 eq assert_or_die
    -
    -
    -(Running Connect tests with illegal combinations) =
    -ResetKernel
    -
    -/n_connections 0 def
    -GetKernelStatus /node_models get
    -{
    -  Create /node_a Set
    -  GetKernelStatus /node_models get
    -  {
    -    Create /node_b Set
    -
    -    % try to connect node_a and node_b
    -    {
    -      node_a node_b Connect
    -    } stopped not
    -    {  % if there is no error, check that a connection has been made
    -      {
    -        n_connections 1 add
    -        GetKernelStatus /num_connections get
    -        eq
    -      } assert_or_die
    -      /n_connections n_connections 1 add def
    -    }
    -    {
    -      5 npop
    -    } ifelse
    -  } forall
    -
    -} forall
    diff --git a/testsuite/unittests/test_connect_after_simulate.sli b/testsuite/unittests/test_connect_after_simulate.sli
    deleted file mode 100644
    index c9610e381b..0000000000
    --- a/testsuite/unittests/test_connect_after_simulate.sli
    +++ /dev/null
    @@ -1,128 +0,0 @@
    -/*
    - *  test_connect_after_simulate.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -   Name: testsuite::test_connect_after_simulate - Create another connection after a call to Simulate and check whether it is created correctly
    -
    -   Synopsis: (test_connect_after_simulate) run
    -
    -   Description: 
    -       Tests that it is possible to create connections between two
    -       Simulate calls. 
    -       Checks that the number of connections that GetConnection
    -       returns and the number of detected spikes increases accordingly
    -       when another connection is created.
    -
    -   FirstVersion: 02/06/2016
    -   Author: Susanne Kunkel, Jakob Jordan
    -   SeeAlso: Connect
    - */
    -
    -M_ERROR setverbosity
    -
    -(unittest) run
    -/unittest using
    -
    -% Pre-condition:
    -% Test that GetConnection returns the same connection handels before
    -% and after calling Simulate for the case that connections are sorted
    -% by source and for the case that they are not sorted
    -[ true false ]
    -{
    -  /sort_connections Set
    -
    -  ResetKernel
    -
    -  /neurons /iaf_psc_alpha 10 Create def
    -
    -  << /sort_connections_by_source sort_connections /use_compressed_spikes sort_connections >> SetKernelStatus
    -  neurons neurons << /rule /fixed_indegree /indegree 2 >> << >> Connect
    -
    -  /connections_before << >> GetConnections def
    -  1.0 Simulate
    -  /connections_after << >> GetConnections def
    -  connections_before connections_after eq assert_or_die
    -
    -  % switch from sort to no-sort or vice versa
    -  % and create more connections and check again
    -  << /sort_connections_by_source sort_connections not /use_compressed_spikes sort_connections not >> SetKernelStatus
    -  neurons neurons << /rule /fixed_indegree /indegree 2 >> << >> Connect
    -
    -  /connections_before << >> GetConnections def
    -  1.0 Simulate
    -  /connections_after << >> GetConnections def
    -  connections_before connections_after eq assert_or_die
    -}
    -forall
    -
    -% Now, the actual test for the sort and no-sort case
    -[ true false ]
    -{
    -  /sort_connections Set
    -
    -  ResetKernel
    -
    -  << /sort_connections_by_source sort_connections /use_compressed_spikes sort_connections >> SetKernelStatus
    -
    -  /neuron /iaf_psc_delta << /I_e 500. >> Create def
    -  /parrot /parrot_neuron Create def
    -  /dummies /iaf_psc_delta 10 Create def
    -  /recorder /spike_recorder Create def
    -
    -  neuron parrot Connect
    -  dummies dummies << /rule /all_to_all >> << >> Connect
    -  parrot recorder Connect
    -
    -  20 Simulate
    -
    -  << /target parrot >> GetConnections size 1 eq assert_or_die
    -  << /target parrot >> GetConnections 0 get cva 4 get 0 eq assert_or_die
    -  recorder GetStatus 0 get /n_events get 1 eq assert_or_die
    -
    -  neuron parrot Connect
    -
    -  << /target parrot >> GetConnections size 2 eq assert_or_die
    -  << /target parrot >> GetConnections 0 get cva 4 get 0 eq assert_or_die
    -  sort_connections
    -  {
    -    << /target parrot >> GetConnections 1 get cva 4 get 1 eq assert_or_die
    -  }
    -  {
    -    << /target parrot >> GetConnections 1 get cva 4 get 101 eq assert_or_die
    -  }
    -  ifelse
    -  
    -  20 Simulate
    -
    -  << /target parrot >> GetConnections size 2 eq assert_or_die
    -  << /target parrot >> GetConnections 0 get cva 4 get 0 eq assert_or_die
    -  sort_connections
    -  {
    -    << /target parrot >> GetConnections 1 get cva 4 get 1 eq assert_or_die
    -  }
    -  {
    -    << /target parrot >> GetConnections 1 get cva 4 get 101 eq assert_or_die
    -  }
    -  ifelse
    -  recorder GetStatus 0 get /n_events get 3 eq assert_or_die
    -}
    -forall
    diff --git a/testsuite/unittests/test_connect_with_threads.sli b/testsuite/unittests/test_connect_with_threads.sli
    deleted file mode 100644
    index 5cd3fcc3e3..0000000000
    --- a/testsuite/unittests/test_connect_with_threads.sli
    +++ /dev/null
    @@ -1,214 +0,0 @@
    -/*
    - *  test_connect_with_threads.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/* BeginDocumentation
    -   Name: testsuite::test_connect_with_threads
    -
    -   Synopsis: (test_connect_with_threads) run -> NEST exits if test fails
    -
    -   Description:
    -   This test goes through all the connection rules and test connectivity for
    -   a range of threads with the given rule. For each rule, we check that
    -   connectivity works when total number of threads ranges from 1 to 25. We should
    -   have more threads than targets after a while.
    -
    -   Author: Stine B. Vennemo
    -   FirstVersion: June 2018
    -   SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -% one_to_one:
    -
    -[25] Range
    -{
    -  /num_threads Set
    -
    -  ResetKernel
    -
    -  << /total_num_virtual_procs num_threads >> SetKernelStatus
    -
    -  % Create source and target neurons
    -  /net1 /iaf_psc_alpha 10 Create def
    -  /net2 /iaf_psc_alpha 10 Create def
    -
    -  % Define connection and synapse dictionaries
    -  /syn_dict << /synapse_model /static_synapse >> def
    -  /conn_dict << /rule /one_to_one >> def
    -
    -  net1 net2 conn_dict syn_dict Connect % Connect source to target neurons
    -
    -  % Check to see if we have correct number of connections
    -  /num_conn GetKernelStatus /num_connections get def
    -
    -  10 num_conn eq assert_or_die
    -}
    -forall
    -
    -% all_to_all:
    -
    -[25] Range
    -{
    -  /num_threads Set
    -
    -  ResetKernel
    -
    -  << /total_num_virtual_procs num_threads >> SetKernelStatus
    -
    -  % Create source and target neurons
    -  /net1 /iaf_psc_alpha 10 Create def
    -  /net2 /iaf_psc_alpha 10 Create def
    -
    -  /syn_dict << /synapse_model /static_synapse >> def
    -  /conn_dict << /rule /all_to_all >> def
    -
    -  net1 net2 conn_dict syn_dict Connect % Connect source to target neurons
    -
    -  % Check to see if we have correct number og connections
    -  /num_conn GetKernelStatus /num_connections get def
    -  100 num_conn eq assert_or_die
    -}
    -forall
    -
    -% fixed_indegree:
    -
    -[25] Range
    -{
    -  /num_threads Set
    -
    -  ResetKernel
    -
    -  << /total_num_virtual_procs num_threads >> SetKernelStatus
    -
    -  % Create source and target neurons
    -  /net1 /iaf_psc_alpha 10 Create def
    -  /net2 /iaf_psc_alpha 10 Create def
    -
    -  % Define connection and synapse dictionaries
    -  /syn_dict << /synapse_model /static_synapse >> def
    -  /conn_dict << /rule /fixed_indegree /indegree 5 >> def
    -
    -  net1 net2 conn_dict syn_dict Connect % Connect source to target neurons
    -
    -  % Check to see if we have correct number of connections
    -  /num_conn GetKernelStatus /num_connections get def
    -  50 num_conn eq assert_or_die
    -}
    -forall
    -
    -% fixed_outdegree:
    -
    -[25] Range
    -{
    -  /num_threads Set
    -
    -  ResetKernel
    -
    -  << /total_num_virtual_procs num_threads >> SetKernelStatus
    -
    -  % Create source and target neurons
    -  /net1 /iaf_psc_alpha 10 Create def
    -  /net2 /iaf_psc_alpha 10 Create def
    -
    -  % Define connection and synapse dictionaries
    -  /syn_dict << /synapse_model /static_synapse >> def
    -  /conn_dict << /rule /fixed_outdegree /outdegree 5 >> def
    -
    -  net1 net2 conn_dict syn_dict Connect % Connect source to target neurons
    -
    -  % Check to see if we have correct number of connections
    -  /num_conn GetKernelStatus /num_connections get def
    -  50 num_conn eq assert_or_die
    -}
    -forall
    -
    -% fixed_total_number:
    -
    -[25] Range
    -{
    -  /num_threads Set
    -
    -  ResetKernel
    -
    -  << /total_num_virtual_procs num_threads >> SetKernelStatus
    -
    -  % Create source and target neurons
    -  /net1 /iaf_psc_alpha 10 Create def
    -  /net2 /iaf_psc_alpha 10 Create def
    -
    -  % Define connection and synapse dictionaries
    -  /syn_dict << /synapse_model /static_synapse >> def
    -  /conn_dict << /rule /fixed_total_number /N 5 >> def
    -
    -  net1 net2 conn_dict syn_dict Connect % Connect source to target neurons
    -
    -  % Check to see if we have currect number of connections
    -  /num_conn GetKernelStatus /num_connections get def
    -  5 num_conn eq assert_or_die
    -}
    -forall
    -
    -% pairwise_bernoulli
    -
    -[25] Range
    -{
    -  /num_threads Set
    -
    -  ResetKernel
    -
    -  % Need to set seed depending on number of threads
    -  /seed 100 def
    -
    -  <<
    -      /total_num_virtual_procs num_threads
    -      /rng_seed seed
    -  >> SetKernelStatus
    -
    -  % Create source and target neurons
    -  /net1 /iaf_psc_alpha 10 Create def
    -  /net2 /iaf_psc_alpha 10 Create def
    -
    -  % Define connection and synapse dictionaries
    -  /syn_dict << /synapse_model /static_synapse >> def
    -  /conn_dict << /rule /pairwise_bernoulli /p 0.1 >> def
    -
    -  net1 net2 conn_dict syn_dict Connect % Connect source to target neurons
    -
    -  /num_conn GetKernelStatus /num_connections get def
    -
    -  % Check to see if number of connections are within convergence interval
    -  num_conn 10 sub abs /std Set
    -  num_conn 10 std add leq /less_than Set
    -  num_conn 10 std sub geq /greater_than Set
    -
    -  less_than greater_than and assert_or_die
    -}
    -forall
    -
    -endusing
    diff --git a/testsuite/unittests/test_cont_delay_synapse.sli b/testsuite/unittests/test_cont_delay_synapse.sli
    deleted file mode 100644
    index bacae6a3d0..0000000000
    --- a/testsuite/unittests/test_cont_delay_synapse.sli
    +++ /dev/null
    @@ -1,121 +0,0 @@
    -/*
    - *  test_cont_delay_synapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_cont_delay_synapse - test of synapse with continuous delay
    -
    -Synopsis: (test_cont_delay_synapse) run -> -
    -
    -Description:
    -
    - A minimal test for the continuous delay synapse.
    - 
    -FirstVersion: June 2015
    -Author: Plesser
    -References:
    -SeeAlso: cont_delay_synapse
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Case 1: Delay compatible with resolution, same result as with normal synapse expected
    -{
    -  ResetKernel
    -  << /resolution 1.0 >> SetKernelStatus
    -  
    -  /sg /spike_generator << /precise_times true /spike_times [ 2.0 5.5 ] >> Create def
    -  /n  /iaf_psc_delta_ps Create def
    -  /sr /spike_recorder Create def
    -  
    -  sg n 100. 1.0 /cont_delay_synapse Connect
    -  n sr Connect
    -  
    -  10 Simulate
    -  
    -  % expected output spike times: 3.0, 6.5
    -  sr /events get /times get cva [ 3.0 6.5 ] eq
    -}
    -assert_or_die
    -
    -
    -% Case 2: Delay not compatible with resolution, set delay as default
    -{
    -  ResetKernel
    -  << /resolution 1.0 >> SetKernelStatus
    -  
    -  /sg /spike_generator << /precise_times true /spike_times [ 2.0 5.5 ] >> Create def
    -  /n  /iaf_psc_delta_ps Create def
    -  /sr /spike_recorder Create def
    -  
    -  /cont_delay_synapse << /weight 100. /delay 1.7 >> SetDefaults
    -  sg n << >> /cont_delay_synapse Connect
    -  n sr Connect
    -  
    -  10 Simulate
    -  
    -  % expected output spike times: 3.7, 7.2
    -  sr /events get /times get cva [ 3.7 7.2 ] eq
    -}
    -assert_or_die
    -
    -
    -% Case 3: Delay not compatible with resolution, explicitly set delay
    -{
    -  ResetKernel
    -  << /resolution 1.0 >> SetKernelStatus
    -  
    -  /sg /spike_generator << /precise_times true /spike_times [ 2.0 5.5 ] >> Create def
    -  /n  /iaf_psc_delta_ps Create def
    -  /sr /spike_recorder Create def
    -  
    -  sg n 100. 1.0 /cont_delay_synapse Connect
    -  << /source sg /synapse_model /cont_delay_synapse >> GetConnections
    -     { << /delay 1.7 >> SetStatus } 
    -  forall
    -
    -  n sr Connect
    -  
    -  10 Simulate
    -  
    -  % expected output spike times: 3.7, 7.2
    -  sr /events get /times get cva [ 3.7 7.2 ] eq
    -}
    -assert_or_die
    -
    -
    -% Case 4: Ensure NEST prohibits delays shorter than resolution
    -{
    -  ResetKernel
    -  << /resolution 1.0 >> SetKernelStatus
    -  
    -  /sg /spike_generator << /precise_times true /spike_times [ 2.0 5.5 ] >> Create def
    -  /n  /iaf_psc_delta_ps Create def
    -  
    -  sg n 100. 1.0 /cont_delay_synapse Connect
    -  << /source sg /synapse_model /cont_delay_synapse >> GetConnections
    -     { << /delay 0.7 >> SetStatus } 
    -  forall
    -}
    -fail_or_die
    diff --git a/testsuite/unittests/test_copymodel.sli b/testsuite/unittests/test_copymodel.sli
    deleted file mode 100644
    index 1578f469ff..0000000000
    --- a/testsuite/unittests/test_copymodel.sli
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/*
    - *  test_copymodel.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_copymodel - sli script to test if CopyModel works as expected
    -
    -   Synopsis: (test_copymodel) run
    -
    -   Description:
    -   This test generates several copies of node and synapse models, sets
    -   their parameters and compares the results for consistency.
    -
    -   SeeAlso: CopyModel, GetDefaults, SetDefaults
    -
    -   FirstVersion: September 2008
    -   Author: Jochen Martin Eppler
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% Checks for consistent operation for node models 
    -/iaf_psc_alpha /my_iaf_psc_alpha1 CopyModel
    -/neuron_params << /V_m -66.6 >> def
    -/iaf_psc_alpha /my_iaf_psc_alpha2 neuron_params CopyModel
    -
    -/iaf_psc_alpha     GetDefaults /V_m get
    -/my_iaf_psc_alpha1 GetDefaults /V_m get
    -eq assert_or_die
    -
    -/iaf_psc_alpha neuron_params SetDefaults
    -/iaf_psc_alpha     GetDefaults /V_m get
    -/my_iaf_psc_alpha2 GetDefaults /V_m get
    -eq assert_or_die
    -
    -% Checks for consistent operation for synapse models
    -/static_synapse /my_static_synapse1 CopyModel
    -/synapse_params << /weight 66.6 >> def
    -/static_synapse /my_static_synapse2 synapse_params CopyModel
    -
    -/static_synapse     GetDefaults /weight get
    -/my_static_synapse1 GetDefaults /weight get
    -eq assert_or_die
    -
    -/static_synapse synapse_params SetDefaults
    -/static_synapse     GetDefaults /weight get
    -/my_static_synapse2 GetDefaults /weight get
    -eq assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_corr_det.sli b/testsuite/unittests/test_corr_det.sli
    deleted file mode 100644
    index 2ed64aba2b..0000000000
    --- a/testsuite/unittests/test_corr_det.sli
    +++ /dev/null
    @@ -1,219 +0,0 @@
    -/*
    - *  test_corr_det.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_corr_det - minimal test of correlation detector
    -
    -Synopsis: (test_corr_det) run -> dies if assertion fails
    -
    -Description:
    -  Feeds correlation detector with two hand-crafted spike trains with
    -  known correlation. Correlation detector parameters are set in model.
    -
    -Remarks:
    -  The test does not test weighted correlations.
    -
    -Author: July 2008, Plesser
    -SeeAlso: correlation_detector
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/d_tau    2.0 def
    -/tau_max 20.0 def
    -
    -% First test: parameter setting on model and instance
    -(Test 1) ==
    -{
    -  ResetKernel
    -
    -  /cd1 /correlation_detector Create def
    -  cd1 << /delta_tau d_tau /tau_max tau_max >>  SetStatus
    -
    -  /correlation_detector << /delta_tau d_tau /tau_max tau_max >> SetDefaults
    -  /cd2 /correlation_detector Create def
    -
    -  cd1 [[/delta_tau /tau_max]] get
    -  cd2 [[/delta_tau /tau_max]] get
    -  eq
    -} assert_or_die
    -clear
    -ResetKernel
    -
    -% Second test: error if uncommensurable delta_tau
    -(Test 2) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlation_detector << /delta_tau 0.25 >> SetDefaults
    -} fail_or_die
    -
    -
    -% Third test: error if uncommensurable tau_max
    -(Test 3) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlation_detector << /delta_tau 1.0 /tau_max 2.5 >> SetDefaults
    -} fail_or_die
    -
    -
    -% Fourth test: error if uncommensurable change of resolution
    -(Test 4) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlation_detector << /delta_tau 0.1 >> SetDefaults
    -  << /resolution 1.0 >> SetKernelStatus
    -  /correlation_detector Create % cannot create now with delta_tau==0.1
    -} fail_or_die
    -
    -
    -% Fifth test: proper number of histogram bins under resolution changes
    -(Test 5) ==
    -{
    -  ResetKernel
    -  << /resolution 0.2 >> SetKernelStatus
    -  /correlation_detector << /delta_tau 1.0 /tau_max 5.0 >> SetDefaults
    -  /correlation_detector Create
    -  1 Simulate % must simulate to force creation of histogram
    -  [/histogram] get cva length
    -  11 eq
    -} assert_or_die
    -
    -
    -% Functions for actual correlation tests
    -
    -% [spike_times_1 spike_times_2] cdsim -> histogram n_events cd_node_id
    -/cdsim
    -{
    -  << >> begin
    -    /st Set
    -
    -    % build and connect
    -    /correlation_detector Create /cdt Set
    -    [0 1] {
    -      /i Set
    -      /spike_generator Create /sg Set
    -      sg << /precise_times false /spike_times st i get >> SetStatus
    -      /static_synapse << /receptor_type i >> SetDefaults
    -      sg cdt Connect
    -      sg
    -    } Table /sgens Set
    -
    -    % simulate to max spike time plus 2 min_delay
    -    st Flatten Max GetKernelStatus /min_delay get 2 mul add Simulate
    -
    -    % get spike counts and histogram
    -    cdt [ /histogram ] get cva
    -    cdt [ /n_events  ] get cva
    -    cdt
    -  end
    -}
    -def
    -
    -% spike_times_1 spike_times_2 hist cdtest -> true/false
    -/cdtest
    -{
    -  << >> begin
    -  /ehist Set
    -  2 arraystore /st Set
    -
    -  st cdsim ;
    -
    -  % check spike counts
    -  st { length } Map eq
    -
    -  % check histogram
    -  exch
    -  ehist { cvd } Map eq
    -
    -  and
    -
    -  end
    -} def
    -
    -% Sixth test: correlation histogram for time differences in bin centers
    -(Test 6) ==
    -{
    -  ResetKernel
    -
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlation_detector << /delta_tau 1.0 /tau_max 5.0 >> SetDefaults
    -
    -  [ 1.0 2.0     6.0 ]       % input 0
    -  [     2.0 4.0     ]       % input 1
    -  [ 0 1 0 1 0 1 1 1 1 0 0]  % histogram
    -  cdtest
    -} assert_or_die
    -
    -% Seventh test: correlation histogram for time differences at bin edges
    -(Test 7) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlation_detector << /delta_tau 1.0 /tau_max 5.0 >> SetDefaults
    -
    -  [                 6.0                  ]  % input 0
    -  [ 0.5 5.4 5.5 5.6     6.4 6.5 6.6 11.5 ]  % input 1
    -  [ 1 0 0 0 1 3 2 0 0 0 0                ]  % histogram
    -  cdtest
    -} assert_or_die
    -
    -% Eight test: test to ensure [1 1] not allowed for /n_events
    -(Test 8) ==
    -{
    -  /correlation_detector Create
    -  << /n_events [1 1] >> SetStatus
    -} fail_or_die
    -
    -% Ninth test: test that reset works
    -(Test 9) ==
    -{
    -  ResetKernel
    -
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlation_detector << /delta_tau 1.0 /tau_max 5.0 >> SetDefaults
    -
    -  % expected histogram: [ 0 1 0 1 0 1 1 1 1 0 0]
    -  [ [ 1.0 2.0     6.0 ]       % input 0
    -    [     2.0 4.0     ]       % input 1
    -  ]
    -  cdsim
    -
    -  /cdt Set
    -  ;         % pop n_events
    -  Plus 0 gt % ensure we have non-zeros in histogram
    -  {
    -	cdt << /n_events [0 0] >> SetStatus
    -    cdt [/n_events] get cva Plus 0 eq
    -    cdt [/histogram] get cva Plus 0.0 eq
    -    and
    -  }
    -  { false }
    -  ifelse
    -
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_corr_matrix_det.sli b/testsuite/unittests/test_corr_matrix_det.sli
    deleted file mode 100644
    index 23e0f1ffee..0000000000
    --- a/testsuite/unittests/test_corr_matrix_det.sli
    +++ /dev/null
    @@ -1,224 +0,0 @@
    -/*
    - *  test_corr_matrix_det.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_corr_matrix_det - minimal test of correlomatrix detector
    -
    -Synopsis: (test_corr_matrix_det) run -> dies if assertion fails
    -
    -Description:
    -  Feeds correlomatrix detector with hand-crafted spike trains with
    -  known correlation. Correlomatrix detector parameters are set in model.
    -
    -Remarks:
    -  The test does not test weighted correlations.
    -
    -Author: April 2013, Jakob Jordan (copy+edit from test_corr_det.sli)
    -SeeAlso: correlomatrix_detector
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/d_tau    0.5 def
    -/tau_max 10.0 def
    -/N_ch       8 def
    -
    -% First test: parameter setting on model and instance
    -(Test 1) ==
    -{
    -  ResetKernel
    -  /cd1 /correlomatrix_detector Create def
    -  cd1 << /delta_tau d_tau /tau_max tau_max /N_channels N_ch >>  SetStatus
    -
    -  /correlomatrix_detector << /delta_tau d_tau /tau_max tau_max /N_channels N_ch >> SetDefaults
    -  /cd2 /correlomatrix_detector Create def
    -
    -  cd1 [[/delta_tau /tau_max /N_channels]] get
    -  cd2 [[/delta_tau /tau_max /N_channels]] get
    -  eq
    -} assert_or_die
    -clear
    -ResetKernel
    -
    -
    -% Second test: error if trying to set invalid channel number
    -(Test 2) ==
    -{
    -  ResetKernel
    -  /correlomatrix_detector << /N_channels 0 >> SetDefaults
    -} fail_or_die
    -
    -{
    -  ResetKernel
    -  /correlomatrix_detector << /N_channels -1 >> SetDefaults
    -} fail_or_die
    -
    -
    -% Third test: error if uncommensurable delta_tau
    -(Test 3) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlomatrix_detector << /delta_tau 0.25 >> SetDefaults
    -} fail_or_die
    -
    -
    -% Fourth test: error if delta_tau even multiple of resolution
    -(Test 4) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlomatrix_detector << /delta_tau 1.0 >> SetDefaults
    -} fail_or_die
    -
    -
    -% Fifth test: error if uncommensurable tau_max
    -(Test 5) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlomatrix_detector << /delta_tau 1.1 /tau_max 2.5 >> SetDefaults
    -} fail_or_die
    -
    -
    -% Sixth test: error if uncommensurable change of resolution
    -(Test 6) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlomatrix_detector << /delta_tau 0.1 >> SetDefaults
    -  << /resolution 1.0 >> SetKernelStatus
    -  /correlomatrix_detector Create % cannot create now with delta_tau==0.1
    -} fail_or_die
    -
    -
    -% Seventh test: proper number of histogram bins under resolution changes
    -(Test 7) ==
    -{
    -  ResetKernel
    -  << /resolution 0.5 >> SetKernelStatus
    -  /correlomatrix_detector << /delta_tau 0.5 /tau_max 2.5 >> SetDefaults
    -  /correlomatrix_detector Create
    -  1 Simulate % must simulate to force creation of histogram
    -  [/covariance] get cva [1] Part [1] Part length
    -  6 eq
    -} assert_or_die
    -
    -
    -% Functions for actual correlation tests
    -
    -% [spike_times_1 spike_times_2] cdsim -> histogram n_events cd_node_id
    -/cdsim
    -{
    -  << >> begin
    -    /st Set
    -
    -    % build and connect
    -    /correlomatrix_detector Create /cdt Set
    -    [0 1] {
    -      /i Set
    -      /spike_generator Create /sg Set
    -      sg << /precise_times false /spike_times st i get >> SetStatus
    -      /static_synapse << /receptor_type i >> SetDefaults
    -      sg cdt Connect
    -      sg
    -    } Table /sgens Set
    -
    -    % simulate to max spike time plus 2 min_delay
    -    st Flatten Max GetKernelStatus /min_delay get 2 mul add Simulate
    -
    -    % get spike counts and histogram
    -    cdt [ /covariance ] get cva [1] Part [2] Part
    -    cdt [ /n_events  ] get cva
    -    cdt
    -  end
    -}
    -def
    -
    -% spike_times_1 spike_times_2 hist cdtest -> true/false
    -/cdtest
    -{
    -  << >> begin
    -  /ehist Set
    -  2 arraystore /st Set
    -
    -  st cdsim ;
    -
    -  % check spike counts
    -  st { length } Map eq
    -
    -  % check histogram
    -  exch
    -  ehist { cvd } Map eq
    -
    -  and
    -
    -  end
    -} def
    -
    -
    -% Eighth test: correlation histogram for time differences in bin centers
    -(Test 8) ==
    -{
    -  ResetKernel
    -
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlomatrix_detector << /delta_tau 0.5 /tau_max 2.0 /N_channels 2 >> SetDefaults
    -
    -  [     1.5 2.5 4.5 ]       % input 0
    -  [ 0.5     2.5     ]       % input 1
    -  [ 1 0 1 0 2 ]  % histogram
    -  cdtest
    -} assert_or_die
    -
    -
    -% Ninth test: test that reset works
    -(Test 9) ==
    -{
    -  ResetKernel
    -
    -  << /resolution 0.1 >> SetKernelStatus
    -  /correlomatrix_detector << /delta_tau .5 /tau_max 5.0 /N_channels N_ch >> SetDefaults
    -
    -  % expected histogram: [ 1 0 0 0 1 ]
    -  [ [ 1.0 2.0     6.0 ]       % input 0
    -    [     2.0 4.0     ]       % input 1
    -  ]
    -  cdsim
    -
    -  /cdt Set
    -  ;         % pop n_events
    -  Plus 0 gt % ensure we have non-zeros in histogram
    -  {
    -    cdt << /N_channels N_ch >> SetStatus
    -    cdt [/n_events] get cva Plus 0 eq
    -    cdt [/covariance] get cva [1] Part [1] Part Plus 0.0 eq
    -    and
    -  }
    -  { false }
    -  ifelse
    -
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_correlospinmatrix_detector.sli b/testsuite/unittests/test_correlospinmatrix_detector.sli
    deleted file mode 100644
    index d6105a4698..0000000000
    --- a/testsuite/unittests/test_correlospinmatrix_detector.sli
    +++ /dev/null
    @@ -1,91 +0,0 @@
    -/*
    - *  test_correlospinmatrix_detector.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/* simple example of usage for the
    -   tests the device correlospinmatrix detector
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% detector are connected to the same neuron. 
    -%
    -% 3-tensor of correlation functions
    -/expected_corr
    -[
    -  [
    -   [ 0 0 0 0 0 10 20 30 40 50 60 50 40 30 20 10 0 0 0 0 0 ]
    -   [ 0 10 20 30 40 50 50 40 30 20 10 0 0 0 0 0 0 0 0 0 0 ]
    -   [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
    -  ]
    -  [
    -   [ 0 0 0 0 0 0 0 0 0 0 10 20 30 40 50 50 40 30 20 10 0 ]
    -   [ 0 0 0 0 0 0 10 20 30 40 50 40 30 20 10 0 0 0 0 0 0 ]
    -   [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
    -  ]
    -  [
    -   [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
    -   [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
    -   [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ]
    -  ]
    -]
    -def
    -
    -
    -/sg1 /spike_generator Create def
    -/sg2 /spike_generator Create def
    -/sg3 /spike_generator Create def
    -
    -/csd /correlospinmatrix_detector Create def
    -/sr /spike_recorder Create def
    -
    -csd << /N_channels 3 /tau_max 10. /delta_tau 1.0 >> SetStatus
    -
    -sg1 << /spike_times [10. 10. 16.] >> SetStatus  % binary pulse starting at 10. ending at 16.
    -sg2 << /spike_times [15. 15. 20.] >> SetStatus  % binary pulse starting at 15. ending at 20.
    -
    -sg1 GetStatus info
    -
    -sg1 sr << >> << /receptor_type 0 >> Connect
    -
    -% one final event needed so that last down transition will be detected
    -sg3 << /spike_times [25.] >> SetStatus
    -
    -
    -sg1 csd << >> << /receptor_type 0 >> Connect
    -sg2 csd << >> << /receptor_type 1 >> Connect
    -sg3 csd << >> << /receptor_type 2 >> Connect
    -
    -100. Simulate
    -
    -csd /count_covariance get cva  % 3-tensor of recorded raw correlation functions
    -expected_corr                            % expected result
    -eq
    -assert_or_die
    -
    diff --git a/testsuite/unittests/test_count_connections.sli b/testsuite/unittests/test_count_connections.sli
    deleted file mode 100644
    index d4c5d896ea..0000000000
    --- a/testsuite/unittests/test_count_connections.sli
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -/*
    - *  test_count_connections.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::test_count_connections - Test connection counting for total
    -number of connections and specific types of connections.
    -
    -Synopsis: (test_count_connections) run -> NEST exits if test fails
    -
    -Description: 
    -This test uses fixed-indegree Connect to connect a net of 100 neurons
    -to itself, with 100 connections per neuron, a total of 10000 connections.
    -It is checked whether the total number of connections and the number of
    -static connections equals 10000. Then additional 10000 connections of type
    -stdp_synapse are created. It is checked whether the total number of
    -connections is 20000 and the number of stdp connections is 10000.
    - 
    -Author: Susanne Kunkel, 2013-03-25
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% don't run this test if we didn't compile with OpenMP
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -/N    100  def % number of neurons
    -/C    100  def % number of connections per neuron
    -/N_VP 4    def % number of virtual processes
    -/ConnExpected N C mul def
    -
    -ResetKernel
    -
    -<< /total_num_virtual_procs N_VP >> SetKernelStatus
    -
    -/nodes /iaf_psc_alpha N Create def 
    -
    -nodes nodes << /rule /fixed_indegree /indegree C >> Connect
    -{ GetKernelStatus /num_connections get ConnExpected eq } assert_or_die
    -{ /static_synapse GetDefaults /num_connections get ConnExpected eq } assert_or_die
    -
    -nodes nodes << /rule /fixed_indegree /indegree C >> << /synapse_model /stdp_synapse >> Connect
    -
    -{ GetKernelStatus /num_connections get ConnExpected 2 mul eq } assert_or_die
    -{ /stdp_synapse GetDefaults /num_connections get ConnExpected eq } assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_cva.sli b/testsuite/unittests/test_cva.sli
    deleted file mode 100644
    index 16a82ef11b..0000000000
    --- a/testsuite/unittests/test_cva.sli
    +++ /dev/null
    @@ -1,52 +0,0 @@
    -/*
    - *  test_cva.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_cva - check if cva function works
    -
    -Synopsis: (test_cva) run -> 
    -
    -Description:
    -
    -Tests basic properties of cva. Note that the tests
    -are directly compiled from the Examples section of
    -the documentation which is evaluated by the command 
    -/validate .
    -Future versions of NEST should generate this test 
    -directly from the Examples section.
    -
    -Author:  130603, Diesmann
    -SeeAlso: cva
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -<< /a 1 /b 2>> cva          [/a 1 /b 2] eq           assert_or_die
    -/square trie [/doubletype] { dup mul } addtotrie exch pop cva [/doubletype [{dup mul}]] eq assert_or_die
    -[ << /a 1 >> << /b 2>>] cva [[/a 1] [/b 2]] eq       assert_or_die
    -[1 3 -5 2] cv_iv cva        [1 3 -5 2] eq            assert_or_die
    -[1. 3. -5. 2.] cv_dv cva    [1. 3. -5. 2.] eq        assert_or_die
    -
    diff --git a/testsuite/unittests/test_cvi.sli b/testsuite/unittests/test_cvi.sli
    deleted file mode 100644
    index b2f60e4524..0000000000
    --- a/testsuite/unittests/test_cvi.sli
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  test_cvi.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_cvi - check if cvi function works
    -
    -Synopsis: (test_cvi) run -> 
    -
    -Description:
    -
    -Tests basic properties of cvi. Note that the tests
    -are directly compiled from the the Examples section of
    -the documentation which is evaluated by the command 
    -/validate .
    -Future versions of NEST should generate this test 
    -directly from the Examples section.
    -
    -Author:  130610, Diesmann
    -SeeAlso: floor, round
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -3.33 cvi       3   eq  assert_or_die
    -2    cvi       2   eq  assert_or_die
    -(23) cvi      23   eq  assert_or_die
    -(23.2323) cvi 23   eq  assert_or_die
    -(hello) cvi    0   eq  assert_or_die
    -
    -
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_dcgen_versus_I_e.sli b/testsuite/unittests/test_dcgen_versus_I_e.sli
    deleted file mode 100644
    index 034ae47aaf..0000000000
    --- a/testsuite/unittests/test_dcgen_versus_I_e.sli
    +++ /dev/null
    @@ -1,133 +0,0 @@
    -/*
    - *  test_dcgen_versus_I_e.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_dcgen_versus_I_e - sli script to test if setting I_e and applying a DC generator yields the same results.
    -
    -   Synopsis: (test_dcgen_versus_I_e) run
    -
    -   Description:
    -   This testscript checks consistency between currents coming from dc_generator and internal variable I_e;
    -   The approach is to simulate both situations for some time and compare membrane potentials at the end;
    -   Any model which supports current events and setting I_e is checked, other models are skipped.
    -
    -   SeeAlso: testsuite::test_iaf_i0
    -
    -   FirstVersion: January 2011
    -   Author: Sven Schrader
    - */
    -
    -M_ERROR setverbosity
    -
    -(unittest) run
    -/unittest using
    -
    -{
    -
    -% set amplitude in pA for both DC generator and I_e
    -/amp 123.456 def
    -/res [] def  % array to collect bool results
    -
    -GetKernelStatus /node_models get {
    -
    -  /model Set
    -
    -  % check if both membrane potential can be measured....
    -  /model_defaults model GetDefaults def
    -  
    -  model_defaults /recordables known
    -  {
    -    /recordable_VM 
    -      model GetDefaults /recordables get /V_m MemberQ
    -    def
    -  }
    -  {
    -    /recordable_VM false def
    -  }
    -  ifelse
    -  
    -  % .... and I_e can be set
    -  /has_IE model GetDefaults /I_e known def
    -
    -  recordable_VM has_IE and
    -  {    
    -    model =only (\t: ) =only
    -
    -    ResetKernel
    -
    -    % models requiring special parameters
    -    model /gif_psc_exp eq { model << /lambda_0 0.0 >> SetDefaults} if 
    -	  model /gif_cond_exp eq { model << /lambda_0 0.0 >> SetDefaults} if 
    -	  model /gif_psc_exp_multisynapse eq { model << /lambda_0 0.0 >> SetDefaults} if 
    -	  model /gif_cond_exp_multisynapse eq { model << /lambda_0 0.0 >> SetDefaults} if
    -	  model /pp_psc_delta eq { model << /c_2 0.0 >> SetDefaults} if 
    -	
    -	  model Create /n1 Set
    -	  model Create /n2 Set
    -
    -	  %take into account synaptic delay
    -	  /dc_generator <</start 99. >> Create /dc Set
    -
    -	  % todo: make sure that this procedure is 'stopped' if and 
    -	  % only if current events are not supported!
    -	  {
    -	    dc n1 Connect
    -
    -      dc << /amplitude amp >> SetStatus
    -
    -	    100 Simulate
    -
    -	    n2 << /I_e amp >> SetStatus
    -
    -      300 Simulate
    -
    -      % compare final membrane potentials
    -      n1 /V_m get /v1 Set
    -      n2 /V_m get /v2 Set
    -    
    -      v1 v2 eq dup
    -      {
    -        (pass) =
    -      }
    -      { 
    -        (failed with V1: ) =only v1 =only 
    -        (, V2: ) =only v2 =only 
    -        (, dV: ) =only v1 v2 sub =
    -      } 
    -      ifelse 
    -      res exch append /res Set
    -    } 
    -    stopped 
    -    {  
    -      clear (DC not allowed) = 
    -      errordict /newerror false put  
    -    } if % skip models that don't support current event
    -  }
    -  if % recordable_VM has_IE and
    -} forall
    -
    -% combine results, one bool left on stack
    -res First res Rest { and } Fold
    -} 
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_default_delays_weights.sli b/testsuite/unittests/test_default_delays_weights.sli
    deleted file mode 100644
    index 18d6ac3ec5..0000000000
    --- a/testsuite/unittests/test_default_delays_weights.sli
    +++ /dev/null
    @@ -1,103 +0,0 @@
    -/*
    - *  test_default_delays_weights.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -  Name: testsuite::test_default_delays_weights - test default delay and weight handling
    -
    -  Synopsis: (test_default_delays_weights) run
    -
    -  Description: Test that correct delays and weights are set if synaptic defaults
    -  are given or overridden. This in particular also tests that NaN-detection works
    -  on an architecture (see Github #127).
    -
    -  FirstVersion: October 2015
    -  Author: Ippen, Plesser, Hahne
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% This tests individual setting of weight and delay on synapses.
    -% 
    -% Four connections will be created:
    -% * 1 -> 5  : use default delay and default weight
    -% * 2 -> 5  : use default weight; set delay
    -% * 3 -> 5  : use default delay; set weight
    -% * 4 -> 5  : set delay and set weight
    -% 
    -% Afterwards the settings will be checked. Sample output:
    -%    $ nest connection_test.sli
    -%    NEST v2.8.0-git (C) 2004 The NEST Initiative
    -%    default weight and delay connection:
    -%      default weight = 2.3 synapse weight = 2.3 : equal ? true
    -%      default delay  = 1.5 synapse delay  = 1.5 : equal ? true
    -%    default weight; delay = 15.5ms connection:
    -%      default weight = 2.3  synapse weight = 2.3  : equal ? true
    -%      expected delay = 15.5 synapse delay  = 15.5 : equal ? true
    -%    default delay ; weight = 23.4 connection:
    -%      default weight = 23.4 synapse weight = 23.4 : equal ? true
    -%      default delay  = 1.5  synapse delay  = 1.5  : equal ? true
    -%    delay = 15.5 ms ; weight = 23.4 connection:
    -%      default weight = 23.4 synapse weight = 23.4 : equal ? true
    -%      expected delay = 15.5 synapse delay  = 15.5 : equal ? true
    -% 
    -% When 8 true's appear at the end, everything is set correctly.
    -
    -ResetKernel
    -
    -/static_synapse << /delay 1.5 /weight 2.3 >> SetDefaults
    -/static_synapse GetDefaults /defaults Set
    -
    -/d 15.5 def
    -/w 23.4 def
    -
    -/iaf_psc_alpha 5 Create /neurons Set
    -
    -% default weight and delay
    -neurons [1 1] Take neurons [5 5] Take /one_to_one << /synapse_model /static_synapse >> Connect
    -
    -% default weight; delay = 15ms
    -neurons [2 2] Take neurons [5 5] Take /one_to_one << /synapse_model /static_synapse /delay d >> Connect
    -
    -% default delay; weight = 23
    -neurons [3 3] Take neurons [5 5] Take /one_to_one << /synapse_model /static_synapse /weight w >> Connect
    -
    -% delay = 15ms ; weight = 23
    -neurons [4 4] Take neurons [5 5] Take /one_to_one << /synapse_model /static_synapse /delay d /weight w >> Connect
    -
    -<< /source neurons [1 1] Take >> GetConnections GetStatus 0 get /syn Set
    -{ defaults /weight get syn /weight get eq } assert_or_die
    -{ defaults /delay get syn /delay get eq } assert_or_die
    -
    -<< /source neurons [2 2] Take >> GetConnections GetStatus 0 get /syn Set
    -{ defaults /weight get syn /weight get eq } assert_or_die
    -{ d syn /delay get eq } assert_or_die
    -
    -<< /source neurons [3 3] Take >> GetConnections GetStatus 0 get /syn Set
    -{ w syn /weight get eq } assert_or_die
    -{ defaults /delay get syn /delay get eq } assert_or_die
    -
    -<< /source neurons [4 4] Take >> GetConnections GetStatus 0 get /syn Set
    -{ w syn /weight get eq } assert_or_die
    -{ d syn /delay get eq } assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_delay_after_res_change.sli b/testsuite/unittests/test_delay_after_res_change.sli
    deleted file mode 100644
    index 252fbf17bd..0000000000
    --- a/testsuite/unittests/test_delay_after_res_change.sli
    +++ /dev/null
    @@ -1,110 +0,0 @@
    -/*
    - *  test_delay_after_res_change.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_delay_after_res_change - sli script to test delay after the resolution has changed
    -
    -    Synopsis: (test_delay_after_res_change) run
    -
    -    Description: This script checks that the min and max delays and the default delays
    -    are still correct after the resolution has changed.
    -
    -    FirstVersion: Oct 2015
    -    Author: Tammo Ippen
    -  */
    -
    -(unittest) run
    -/unittest using
    -
    -% expected_min_delay expected_max_delay check_min_max_delay
    -/check_min_max_delay
    -{
    -  << >> begin
    -    /e_max_d Set
    -    /e_min_d Set
    -
    -    GetKernelStatus begin
    -    { min_delay e_min_d eq max_delay e_max_d eq and } assert_or_die
    -    end
    -
    -  end
    -}
    -def
    -
    -% expected_default_delay check_delay
    -/check_delay
    -{
    -  << >> begin
    -    /e_d Set
    -
    -    /static_synapse GetDefaults begin
    -    { delay e_d eq } assert_or_die
    -    end
    -
    -  end
    -}
    -def
    -
    -% Setup test
    -/mindelay 2.1 def
    -/maxdelay 12.3 def
    -/defdelay 3.0 def
    -
    -<<
    -  /resolution 0.1
    -  /min_delay mindelay
    -  /max_delay maxdelay
    ->> SetKernelStatus
    -
    -/static_synapse << /delay defdelay >> SetDefaults
    -
    -mindelay maxdelay check_min_max_delay
    -defdelay check_delay
    -
    -% Test 1: Change resolution.
    -ResetKernel
    -<<
    -  /resolution 0.001
    -  /min_delay mindelay
    -  /max_delay maxdelay
    ->> SetKernelStatus
    -/static_synapse << /delay defdelay >> SetDefaults
    -
    -mindelay maxdelay check_min_max_delay
    -
    -defdelay check_delay
    -
    -% Test 2: Change tics_per_ms.
    -ResetKernel
    -<<
    -  /tics_per_ms 10000.0
    -  /resolution 0.001
    -  /min_delay mindelay
    -  /max_delay maxdelay
    ->> SetKernelStatus
    -/static_synapse << /delay defdelay >> SetDefaults
    -
    -mindelay maxdelay check_min_max_delay
    -
    -defdelay check_delay
    -
    -endusing
    diff --git a/testsuite/unittests/test_delay_check.sli b/testsuite/unittests/test_delay_check.sli
    deleted file mode 100644
    index 44fb5f86d1..0000000000
    --- a/testsuite/unittests/test_delay_check.sli
    +++ /dev/null
    @@ -1,85 +0,0 @@
    -/*
    - *  test_delay_check.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_delay_check - sli script to test delay checking
    -
    -    Synopsis: (test_delay_check) run
    -
    -    Description: This script creates a number of synapses and tests, whether min_delay and max_delay
    -    are set as expected. It will report for each test separately, whether it was passed or failed
    -
    -    FirstVersion: July 2007
    -    Author: Helias
    -  */
    -
    -(unittest) run
    -/unittest using
    -
    -% expected_min_delay expected_max_delay check_min_max_delay
    -/check_min_max_delay
    -{
    -  << >> begin
    -    /e_max_d Set
    -    /e_min_d Set
    -
    -    GetKernelStatus begin
    -    { min_delay e_min_d eq max_delay e_max_d eq and } assert_or_die
    -    end
    -
    -  end
    -}
    -def
    -
    -/iaf_psc_alpha Create /n1 Set
    -/iaf_psc_alpha Create /n2 Set
    -/iaf_psc_alpha Create /n3 Set
    -
    -/static_synapse << /delay 2.0 >> SetDefaults
    -
    -% test 1: use standard connect
    -n1 n2 Connect
    -2.0 2.0 check_min_max_delay
    -
    -% test 2: check if candidate is _not_ reported
    -/static_synapse << /delay 10.0 >> SetDefaults
    -2.0 2.0 check_min_max_delay
    -
    -% test 3: check if new delay is set as min_delay
    -/static_synapse << /delay 1.0 >> SetDefaults
    -n2 n3 Connect
    -1.0 2.0 check_min_max_delay
    -
    -% test 4: set if 'node_id node_id w d Connect' works as expected
    -n2 n3 1.0 6.0 Connect
    -1.0 6.0 check_min_max_delay
    -
    -% test 5: check if min_delay is updated in 'node_id node_id params Connect'
    -n2 n3 << >> << /delay 0.5 >> Connect
    -0.5 6.0 check_min_max_delay
    -
    -% test 6: check if SetStatus sets min_delay
    -<< /source n1 /synapse_model /static_synapse >> GetConnections 0 get
    -<< /delay 0.1 >> SetStatus
    -0.1 6.0 check_min_max_delay
    -
    -endusing
    diff --git a/testsuite/unittests/test_dirname.sli b/testsuite/unittests/test_dirname.sli
    deleted file mode 100644
    index ceaba8902e..0000000000
    --- a/testsuite/unittests/test_dirname.sli
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    - *  test_dirname.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_dirname - tests dirname from filesystem.sli for POSIX conformance
    -
    -   Synopsis: (test_dirname) run
    -
    -   Description:
    -
    -   This test runs the dirname test cases from coreutils distribution.
    -
    -   SeeAlso: dirname
    -
    -   FirstVersion: November 2012
    -   Author: Yury V. Zaytsev
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -<<
    -
    -  % Test cases that are part of dirname.pl
    -  /a  [ (d/f)         (d)    ]
    -  /b  [ (/d/f)        (/d)   ]
    -  /c  [ (d/f/)        (d)    ]
    -  /d  [ (d/f//)       (d)    ]
    -  /e  [ (f)           (.)    ]
    -  /f  [ (/)           (/)    ]
    -  /g  [ (//)          (/)    ]
    -  /h  [ (///)         (/)    ]
    -  /i  [ (//a//)       (/)    ]
    -  /j  [ (///a///)     (/)    ]
    -  /k  [ (///a///b)    (///a) ]
    -  /l  [ (///a//b/)    (///a) ]
    -  /m  [ ()            (.)    ]
    -
    -  % Not part of dirname.pl, taken from test-dirname.c
    -  /y  [ (.)           (.)    ]
    -  /z  [ (..)          (.)    ]
    -
    ->>
    -
    -{
    -  (Testing case ) rolld cvs join (...) join =
    -    arrayload pop exch
    -      dirname eq
    -        assert_or_die
    -} forall
    -
    -endusing
    diff --git a/testsuite/unittests/test_distance.sli b/testsuite/unittests/test_distance.sli
    deleted file mode 100644
    index 69753ab612..0000000000
    --- a/testsuite/unittests/test_distance.sli
    +++ /dev/null
    @@ -1,109 +0,0 @@
    -/*
    - *  test_distance.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% simple tests for distance calculations
    -
    -(unittest) run
    -/unittest using
    -
    -% fixed grid, distance from node
    -{
    -  ResetKernel
    -
    -  % nodes at [-1,0,1]x[-1,0,1]
    -  /l << /elements /iaf_psc_alpha /shape [ 3 3 ] /extent [3. 3.] >> CreateLayer def
    -  % nodes placed downward columnwise
    -  l [1] Take l Distance
    -  [0. 1. 2.            % first column
    -   1. 2. sqrt 5. sqrt  % second column
    -   2. 5. sqrt 8. sqrt] % third column
    -  eq
    -} assert_or_die
    -
    -% fixed grid with periodic BC, distance from node
    -{
    -  ResetKernel
    -
    -  % nodes at [-1,0,1]x[-1,0,1]
    -  /l << /elements /iaf_psc_alpha /shape [ 3 3 ] /extent [3. 3.] /edge_wrap true >> CreateLayer def
    -  % nodes placed downward columnwise
    -  l [1] Take l Distance
    -  [0. 1. 1.            % first column
    -   1. 2. sqrt 2. sqrt  % second column
    -   1. 2. sqrt 2. sqrt] % third column
    -  eq
    -} assert_or_die
    -
    -% fixed grid, distance from location
    -{
    -  ResetKernel
    -
    -  ('THIRD test') ==
    -
    -  % nodes at [-1,0,1]x[-1,0,1]
    -  /l << /elements /iaf_psc_alpha /shape [ 3 3 ] /extent [3. 3.] >> CreateLayer def
    -  % nodes placed downward columnwise
    -  [[0. 0.]] l Distance
    -  [2. sqrt 1. 2. sqrt   % first column
    -   1.      0. 1.        % second column
    -   2. sqrt 1. 2. sqrt ] % third column
    -  eq
    -} assert_or_die
    -
    -% fixed grid with periodic BC, distance from location
    -{
    -  ResetKernel
    -
    -  % nodes at [-1,0,1]x[-1,0,1]
    -  /l << /elements /iaf_psc_alpha /shape [ 3 3 ] /extent [3. 3.] /edge_wrap true >> CreateLayer def
    -  % nodes placed downward columnwise
    -  [[1. 0.]] l Distance
    -  [2. sqrt 1. 2. sqrt   % first column
    -   2. sqrt 1. 2. sqrt   % second column
    -      1.   0.    1. ] % third column
    -  eq
    -} assert_or_die
    -
    -
    -% free grid, distance from node
    -{
    -  ResetKernel
    -
    -  /l << /elements /iaf_psc_alpha /positions [ [-0.75 0.5] [0.75 0.] ] /extent [2. 2.] >> CreateLayer def
    -  % nodes placed downward columnwise
    -  l [1 2] Take l [1] Take Distance
    -  [0. 1.5 sqr 0.5 sqr add sqrt ]
    -  eq
    -} assert_or_die
    -
    -% free grid, periodic bc, distance from node
    -{
    -  ResetKernel
    -
    -  /l << /elements /iaf_psc_alpha /positions [ [-0.75 0.5] [0.75 0.] ] /extent [2. 2.] /edge_wrap true >> CreateLayer def
    -  % nodes placed downward columnwise
    -  l [1 2] Take l [1] Take Distance
    -  [0. 0.5 sqr 0.5 sqr add sqrt ]
    -  eq
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_fast_operators.sli b/testsuite/unittests/test_fast_operators.sli
    deleted file mode 100644
    index d3119fca39..0000000000
    --- a/testsuite/unittests/test_fast_operators.sli
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -/*
    - *  test_fast_operators.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    - Name: testsuite::test_fast_operators - ensures that internal operators do not check number of arguments
    -
    -Synopsis: (test_fast_operators) run
    -
    -Description: 
    -User level operators like add and pop in SLI are safe in the sense that a StackUnderflow error is 
    -raised if the stack does not contain a sufficient number of arguments. The user can then inspect the
    -state of the interpreter and solve the problem. In machine generated SLI code, however, checking the
    -number of arguments is unnecessary.
    -
    -FirstVersion: 090227
    -Author: Diesmann
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% preparatory work for proper test code in case NEST is complied with MPI support
    -% For now we just ignore this test, this will later be replaced 
    -% by a restart of NEST with a serial binary.
    -skip_if_have_mpi
    -
    -
    -{add} failbutnocrash_or_die     % good if nest survives
    -
    -% the following test is currently broken, since NEST crashes with a segfault which is not caught
    -% by crash_or_die
    -%  {add_dd} crash_or_die  % good if nest crashes
    -
    -
    diff --git a/testsuite/unittests/test_free_mask_circ_anchor_00.sli b/testsuite/unittests/test_free_mask_circ_anchor_00.sli
    deleted file mode 100644
    index 35dab750a1..0000000000
    --- a/testsuite/unittests/test_free_mask_circ_anchor_00.sli
    +++ /dev/null
    @@ -1,274 +0,0 @@
    -/*
    - *  test_free_mask_circ_anchor_00.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Circular mask, radius 0.25
    -%
    -% Setup:
    -%     - 5x5 -> 5x5, extent 1.25x1.25
    -%     - nodes "freely placed" at regular grid locations
    -% expectation:
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the two nodes to the right and left of that location
    -%     - the two nodes above and below that location
    -%     - should give identical results to reg_mask_circ_anchor_00.sli
    -%
    -%   nodes at the edges have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33    17 -> 38 43 48    22 -> 43 48
    -%	    29 	              44                49
    -%
    -%           31                46                51
    -%      6 -> 32 37    21 -> 42 47 52    26 -> 47 52
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /circular << /radius 0.25 >> /anchor [ 0.0 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 35 1 1 0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [7 27 1 1 -0.25 0]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [8 28 1 1 -0.25 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [9 29 1 1 -0.25 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [10 30 1 1 -0.25 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [12 32 1 1 -0.25 0]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [13 33 1 1 -0.25 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [14 34 1 1 -0.25 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [15 35 1 1 -0.25 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [17 37 1 1 -0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [18 38 1 1 -0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [19 39 1 1 -0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [20 40 1 1 -0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 50 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 45 1 1 -0.25 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_circ_anchor_01.sli b/testsuite/unittests/test_free_mask_circ_anchor_01.sli
    deleted file mode 100644
    index 2e93645868..0000000000
    --- a/testsuite/unittests/test_free_mask_circ_anchor_01.sli
    +++ /dev/null
    @@ -1,263 +0,0 @@
    -/*
    - *  test_free_mask_circ_anchor_01.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Circular mask, radius 0.25
    -%
    -% Setup:
    -%     - 5x5 -> 5x5, extent 1.25x1.25
    -%     - nodes "freely placed" at regular grid locations
    -% expectation:
    -%   /anchor [ -0.25 0.0 ] : right edge of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - two nodes to the left of that location
    -%     - the two nodes to the left and above and below that location
    -%     - should give identical results to reg_mask_circ_anchor_01.sli
    -%
    -%   nodes at the edges have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28    17 -> 33 38 43    22 -> 38 43 48
    -%	                   39                44
    -%
    -%                          41                46
    -%      6 -> 32    21 -> 37 42 47    26 -> 42 47 52
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /circular << /radius 0.25 >> /anchor [ -0.25 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [2 27 1 1 0 0]
    - [3 28 1 1 0 0]
    - [4 29 1 1 0 0]
    - [5 30 1 1 0 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [7 26 1 1 -0.25 0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [8 27 1 1 -0.25 0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [9 28 1 1 -0.25 0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [10 29 1 1 -0.25 0.25]
    - [10 30 1 1 -0.25 0]
    - [10 35 1 1 0 0]
    - [11 26 1 1 -0.5 0]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [12 27 1 1 -0.5 0]
    - [12 31 1 1 -0.25 0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [13 28 1 1 -0.5 0]
    - [13 32 1 1 -0.25 0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [14 29 1 1 -0.5 0]
    - [14 33 1 1 -0.25 0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [15 30 1 1 -0.5 0]
    - [15 34 1 1 -0.25 0.25]
    - [15 35 1 1 -0.25 0]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [17 32 1 1 -0.5 0]
    - [17 36 1 1 -0.25 0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [18 33 1 1 -0.5 0]
    - [18 37 1 1 -0.25 0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [19 34 1 1 -0.5 0]
    - [19 38 1 1 -0.25 0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [20 35 1 1 -0.5 0]
    - [20 39 1 1 -0.25 0.25]
    - [20 40 1 1 -0.25 0]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [22 37 1 1 -0.5 0]
    - [22 41 1 1 -0.25 0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [23 38 1 1 -0.5 0]
    - [23 42 1 1 -0.25 0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [24 39 1 1 -0.5 0]
    - [24 43 1 1 -0.25 0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [25 40 1 1 -0.5 0]
    - [25 44 1 1 -0.25 0.25]
    - [25 45 1 1 -0.25 0]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_circ_anchor_10.sli b/testsuite/unittests/test_free_mask_circ_anchor_10.sli
    deleted file mode 100644
    index 1c68a4ac7e..0000000000
    --- a/testsuite/unittests/test_free_mask_circ_anchor_10.sli
    +++ /dev/null
    @@ -1,297 +0,0 @@
    -/*
    - *  test_free_mask_circ_anchor_10.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Circular mask, radius 0.25
    -%
    -% Setup:
    -%     - 5x5 -> 5x5, extent 1.25x1.25
    -%     - nodes "freely placed" at regular grid locations
    -% expectation:
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the two nodes to the right and left of that location
    -%     - the two nodes above and below that location
    -%     - should give identical results to reg_mask_circ_anchor_10.sli
    -%
    -%   like free_mask_circ_anchor_00, but with periodic boundary conditions
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%
    -%              32                47                52
    -%      2 -> 48 28 33    17 -> 38 43 48    22 -> 43 48 28
    -%	       29                44                49
    -%
    -%              31                46                51
    -%      6 -> 52 32 37    21 -> 42 47 52    26 -> 47 52 32
    -%              28                43                48
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /circular << /radius 0.25 >> /anchor [ 0.0 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 30 1 1 0 0.25]
    - [1 31 1 1 0.25 0]
    - [1 46 1 1 -0.25 0]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 47 1 1 -0.25 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 48 1 1 -0.25 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 49 1 1 -0.25 0]
    - [5 26 1 1 0 -0.25]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 35 1 1 0.25 0]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 35 1 1 0 0.25]
    - [6 36 1 1 0.25 0]
    - [7 27 1 1 -0.25 0]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [8 28 1 1 -0.25 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [9 29 1 1 -0.25 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [10 30 1 1 -0.25 0]
    - [10 31 1 1 0 -0.25]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 40 1 1 0 0.25]
    - [11 41 1 1 0.25 0]
    - [12 32 1 1 -0.25 0]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [13 33 1 1 -0.25 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [14 34 1 1 -0.25 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [15 35 1 1 -0.25 0]
    - [15 36 1 1 0 -0.25]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 45 1 1 0 0.25]
    - [16 46 1 1 0.25 0]
    - [17 37 1 1 -0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [18 38 1 1 -0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [19 39 1 1 -0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [20 40 1 1 -0.25 0]
    - [20 41 1 1 0 -0.25]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [21 50 1 1 0 0.25]
    - [22 27 1 1 0.25 0]
    - [22 42 1 1 -0.25 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 28 1 1 0.25 0]
    - [23 43 1 1 -0.25 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 29 1 1 0.25 0]
    - [24 44 1 1 -0.25 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 30 1 1 0.25 0]
    - [25 45 1 1 -0.25 0]
    - [25 46 1 1 0 -0.25]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_circ_anchor_11.sli b/testsuite/unittests/test_free_mask_circ_anchor_11.sli
    deleted file mode 100644
    index e46b6d6677..0000000000
    --- a/testsuite/unittests/test_free_mask_circ_anchor_11.sli
    +++ /dev/null
    @@ -1,297 +0,0 @@
    -/*
    - *  test_free_mask_circ_anchor_11.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Circular mask, radius 0.25
    -%
    -% Setup:
    -%     - 5x5 -> 5x5, extent 1.25x1.25
    -%     - nodes "freely placed" at regular grid locations
    -% expectation:
    -%   /anchor [ -0.25 0.0 ] : right edge of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - two nodes to the left of that location
    -%     - the two nodes to the left and above and below that location
    -%
    -%   like free_mask_circ_anchor_01, but with periodic boundary conditions
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%              52                42                47
    -%      2 -> 43 48 28    17 -> 33 38 43    22 -> 38 43 48
    -%	       49                39                44
    -%
    -%              51                41                46
    -%      6 -> 47 52 32    21 -> 37 42 47    26 -> 42 47 52
    -%              48                38                43
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /circular << /radius 0.25 >> /anchor [ -0.25 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 41 1 1 -0.5 0]
    - [1 46 1 1 -0.25 0]
    - [1 47 1 1 -0.25 -0.25]
    - [1 50 1 1 -0.25 0.25]
    - [2 27 1 1 0 0]
    - [2 42 1 1 -0.5 0]
    - [2 46 1 1 -0.25 0.25]
    - [2 47 1 1 -0.25 0]
    - [2 48 1 1 -0.25 -0.25]
    - [3 28 1 1 0 0]
    - [3 43 1 1 -0.5 0]
    - [3 47 1 1 -0.25 0.25]
    - [3 48 1 1 -0.25 0]
    - [3 49 1 1 -0.25 -0.25]
    - [4 29 1 1 0 0]
    - [4 44 1 1 -0.5 0]
    - [4 48 1 1 -0.25 0.25]
    - [4 49 1 1 -0.25 0]
    - [4 50 1 1 -0.25 -0.25]
    - [5 30 1 1 0 0]
    - [5 45 1 1 -0.5 0]
    - [5 46 1 1 -0.25 -0.25]
    - [5 49 1 1 -0.25 0.25]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 30 1 1 -0.25 0.25]
    - [6 31 1 1 0 0]
    - [6 46 1 1 -0.5 0]
    - [7 26 1 1 -0.25 0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 47 1 1 -0.5 0]
    - [8 27 1 1 -0.25 0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 48 1 1 -0.5 0]
    - [9 28 1 1 -0.25 0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 49 1 1 -0.5 0]
    - [10 26 1 1 -0.25 -0.25]
    - [10 29 1 1 -0.25 0.25]
    - [10 30 1 1 -0.25 0]
    - [10 35 1 1 0 0]
    - [10 50 1 1 -0.5 0]
    - [11 26 1 1 -0.5 0]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 35 1 1 -0.25 0.25]
    - [11 36 1 1 0 0]
    - [12 27 1 1 -0.5 0]
    - [12 31 1 1 -0.25 0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [13 28 1 1 -0.5 0]
    - [13 32 1 1 -0.25 0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [14 29 1 1 -0.5 0]
    - [14 33 1 1 -0.25 0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [15 30 1 1 -0.5 0]
    - [15 31 1 1 -0.25 -0.25]
    - [15 34 1 1 -0.25 0.25]
    - [15 35 1 1 -0.25 0]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 40 1 1 -0.25 0.25]
    - [16 41 1 1 0 0]
    - [17 32 1 1 -0.5 0]
    - [17 36 1 1 -0.25 0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [18 33 1 1 -0.5 0]
    - [18 37 1 1 -0.25 0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [19 34 1 1 -0.5 0]
    - [19 38 1 1 -0.25 0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [20 35 1 1 -0.5 0]
    - [20 36 1 1 -0.25 -0.25]
    - [20 39 1 1 -0.25 0.25]
    - [20 40 1 1 -0.25 0]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 45 1 1 -0.25 0.25]
    - [21 46 1 1 0 0]
    - [22 37 1 1 -0.5 0]
    - [22 41 1 1 -0.25 0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [23 38 1 1 -0.5 0]
    - [23 42 1 1 -0.25 0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [24 39 1 1 -0.5 0]
    - [24 43 1 1 -0.25 0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [25 40 1 1 -0.5 0]
    - [25 41 1 1 -0.25 -0.25]
    - [25 44 1 1 -0.25 0.25]
    - [25 45 1 1 -0.25 0]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_donut_anchor_00.sli b/testsuite/unittests/test_free_mask_donut_anchor_00.sli
    deleted file mode 100644
    index 3b35279179..0000000000
    --- a/testsuite/unittests/test_free_mask_donut_anchor_00.sli
    +++ /dev/null
    @@ -1,248 +0,0 @@
    -/*
    - *  test_free_mask_donut_anchor_00.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Doughnut mask, outer radius 0.25, inner radius 0.1
    -%
    -% Setup:
    -%     - 5x5 -> 5x5, extent 1.25x1.25
    -%     - nodes "freely placed" at regular grid locations
    -% expectation:
    -%   each node is connected to
    -%     - the two nodes to the right and left of the source location in the target layer
    -%     - the two nodes above and below that location
    -%     - should give identical results to reg_mask_donut_anchor_00.sli
    -%
    -%   nodes at the edges have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 ->    33    17 -> 38    48    22 -> 43
    -%	    29 	              44                49
    -%
    -%           31                46                51
    -%      6 ->    37    21 -> 42    52    26 -> 47
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /doughnut << /outer_radius 0.25 /inner_radius 0.1 >> /anchor [ 0.0 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [2 26 1 1 0 0.25]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [3 27 1 1 0 0.25]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [4 28 1 1 0 0.25]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [5 29 1 1 0 0.25]
    - [5 35 1 1 0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [7 27 1 1 -0.25 0]
    - [7 31 1 1 0 0.25]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [8 28 1 1 -0.25 0]
    - [8 32 1 1 0 0.25]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [9 29 1 1 -0.25 0]
    - [9 33 1 1 0 0.25]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [10 30 1 1 -0.25 0]
    - [10 34 1 1 0 0.25]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [12 32 1 1 -0.25 0]
    - [12 36 1 1 0 0.25]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [13 33 1 1 -0.25 0]
    - [13 37 1 1 0 0.25]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [14 34 1 1 -0.25 0]
    - [14 38 1 1 0 0.25]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [15 35 1 1 -0.25 0]
    - [15 39 1 1 0 0.25]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [17 37 1 1 -0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [18 38 1 1 -0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [19 39 1 1 -0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [20 40 1 1 -0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 50 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 47 1 1 0 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 46 1 1 0 0.25]
    - [22 48 1 1 0 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 47 1 1 0 0.25]
    - [23 49 1 1 0 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 48 1 1 0 0.25]
    - [24 50 1 1 0 -0.25]
    - [25 45 1 1 -0.25 0]
    - [25 49 1 1 0 0.25]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_donut_anchor_01.sli b/testsuite/unittests/test_free_mask_donut_anchor_01.sli
    deleted file mode 100644
    index a859e2c220..0000000000
    --- a/testsuite/unittests/test_free_mask_donut_anchor_01.sli
    +++ /dev/null
    @@ -1,243 +0,0 @@
    -/*
    - *  test_free_mask_donut_anchor_01.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Doughnut mask, outer radius 0.25, inner radius 0.1
    -%
    -% Setup:
    -%     - 5x5 -> 5x5, extent 1.25x1.25
    -%     - nodes "freely placed" at regular grid locations
    -% expectation:
    -%   /anchor [ -0.25 0.0 ] : right edge of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the node two grid steps to the left of that location
    -%     - the two nodes to the left and above and below that location
    -%     - should give identical results to reg_mask_donut_anchor_01.sli
    -%
    -%   nodes at the edges have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28    17 -> 33    43    22 -> 38    48
    -%	                   39                44
    -%
    -%                          41                46
    -%      6 -> 32    21 -> 37    47    26 -> 42    52
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /doughnut << /outer_radius 0.25 /inner_radius 0.1 >> /anchor [ -0.25 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [2 27 1 1 0 0]
    - [3 28 1 1 0 0]
    - [4 29 1 1 0 0]
    - [5 30 1 1 0 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [7 26 1 1 -0.25 0.25]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [8 27 1 1 -0.25 0.25]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [9 28 1 1 -0.25 0.25]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [10 29 1 1 -0.25 0.25]
    - [10 35 1 1 0 0]
    - [11 26 1 1 -0.5 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [12 27 1 1 -0.5 0]
    - [12 31 1 1 -0.25 0.25]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [13 28 1 1 -0.5 0]
    - [13 32 1 1 -0.25 0.25]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [14 29 1 1 -0.5 0]
    - [14 33 1 1 -0.25 0.25]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [15 30 1 1 -0.5 0]
    - [15 34 1 1 -0.25 0.25]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [17 32 1 1 -0.5 0]
    - [17 36 1 1 -0.25 0.25]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [18 33 1 1 -0.5 0]
    - [18 37 1 1 -0.25 0.25]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [19 34 1 1 -0.5 0]
    - [19 38 1 1 -0.25 0.25]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [20 35 1 1 -0.5 0]
    - [20 39 1 1 -0.25 0.25]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [22 37 1 1 -0.5 0]
    - [22 41 1 1 -0.25 0.25]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [23 38 1 1 -0.5 0]
    - [23 42 1 1 -0.25 0.25]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [24 39 1 1 -0.5 0]
    - [24 43 1 1 -0.25 0.25]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [25 40 1 1 -0.5 0]
    - [25 44 1 1 -0.25 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_donut_anchor_10.sli b/testsuite/unittests/test_free_mask_donut_anchor_10.sli
    deleted file mode 100644
    index 9991ecca0d..0000000000
    --- a/testsuite/unittests/test_free_mask_donut_anchor_10.sli
    +++ /dev/null
    @@ -1,271 +0,0 @@
    -/*
    - *  test_free_mask_donut_anchor_10.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Doughnut mask, outer radius 0.25, inner radius 0.1
    -%
    -% Setup:
    -%     - 5x5 -> 5x5, extent 1.25x1.25
    -%     - nodes "freely placed" at regular grid locations
    -% expectation:
    -%   each node is connected to
    -%     - the two nodes to the right and left of the source location in the target layer
    -%     - the two nodes above and below that location
    -%     - should give identical results to reg_mask_donut_anchor_10.sli
    -%
    -%   like free_mask_donut_anchor_00, but with periodic boundary conditions
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%
    -%              32                47                52
    -%      2 -> 48    33    17 -> 38    48    22 -> 43    28
    -%	       29                44                49
    -%
    -%              31                46                51
    -%      6 -> 52    37    21 -> 42    52    26 -> 47    32
    -%              28                43                48
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /doughnut << /outer_radius 0.25 /inner_radius 0.1 >> /anchor [ 0.0 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 27 1 1 0 -0.25]
    - [1 30 1 1 0 0.25]
    - [1 31 1 1 0.25 0]
    - [1 46 1 1 -0.25 0]
    - [2 26 1 1 0 0.25]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 47 1 1 -0.25 0]
    - [3 27 1 1 0 0.25]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 48 1 1 -0.25 0]
    - [4 28 1 1 0 0.25]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 49 1 1 -0.25 0]
    - [5 26 1 1 0 -0.25]
    - [5 29 1 1 0 0.25]
    - [5 35 1 1 0.25 0]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 32 1 1 0 -0.25]
    - [6 35 1 1 0 0.25]
    - [6 36 1 1 0.25 0]
    - [7 27 1 1 -0.25 0]
    - [7 31 1 1 0 0.25]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [8 28 1 1 -0.25 0]
    - [8 32 1 1 0 0.25]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [9 29 1 1 -0.25 0]
    - [9 33 1 1 0 0.25]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [10 30 1 1 -0.25 0]
    - [10 31 1 1 0 -0.25]
    - [10 34 1 1 0 0.25]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 37 1 1 0 -0.25]
    - [11 40 1 1 0 0.25]
    - [11 41 1 1 0.25 0]
    - [12 32 1 1 -0.25 0]
    - [12 36 1 1 0 0.25]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [13 33 1 1 -0.25 0]
    - [13 37 1 1 0 0.25]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [14 34 1 1 -0.25 0]
    - [14 38 1 1 0 0.25]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [15 35 1 1 -0.25 0]
    - [15 36 1 1 0 -0.25]
    - [15 39 1 1 0 0.25]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 42 1 1 0 -0.25]
    - [16 45 1 1 0 0.25]
    - [16 46 1 1 0.25 0]
    - [17 37 1 1 -0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [18 38 1 1 -0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [19 39 1 1 -0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [20 40 1 1 -0.25 0]
    - [20 41 1 1 0 -0.25]
    - [20 44 1 1 0 0.25]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 47 1 1 0 -0.25]
    - [21 50 1 1 0 0.25]
    - [22 27 1 1 0.25 0]
    - [22 42 1 1 -0.25 0]
    - [22 46 1 1 0 0.25]
    - [22 48 1 1 0 -0.25]
    - [23 28 1 1 0.25 0]
    - [23 43 1 1 -0.25 0]
    - [23 47 1 1 0 0.25]
    - [23 49 1 1 0 -0.25]
    - [24 29 1 1 0.25 0]
    - [24 44 1 1 -0.25 0]
    - [24 48 1 1 0 0.25]
    - [24 50 1 1 0 -0.25]
    - [25 30 1 1 0.25 0]
    - [25 45 1 1 -0.25 0]
    - [25 46 1 1 0 -0.25]
    - [25 49 1 1 0 0.25]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_donut_anchor_11.sli b/testsuite/unittests/test_free_mask_donut_anchor_11.sli
    deleted file mode 100644
    index e996f66ca4..0000000000
    --- a/testsuite/unittests/test_free_mask_donut_anchor_11.sli
    +++ /dev/null
    @@ -1,273 +0,0 @@
    -/*
    - *  test_free_mask_donut_anchor_11.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Doughnut mask, outer radius 0.25, inner radius 0.1
    -%
    -% Setup:
    -%     - 5x5 -> 5x5, extent 1.25x1.25
    -%     - nodes "freely placed" at regular grid locations
    -% expectation:
    -%   /anchor [ -0.25 0.0 ] : right edge of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the node two grid steps to the left of that location
    -%     - the two nodes to the left and above and below that location
    -%     - should give identical results to reg_mask_donut_anchor_11.sli
    -%
    -%   like free_mask_donut_anchor_01, but with periodic boundary conditions
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%              52                42                47
    -%      2 -> 43    28    17 -> 33    43    22 -> 38    48
    -%	       49                39                44
    -%
    -%              51                41                46
    -%      6 -> 47    32    21 -> 37    47    26 -> 42    52
    -%              48                38                43
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /doughnut << /outer_radius 0.25 /inner_radius 0.1 >> /anchor [ -0.25 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 41 1 1 -0.5 0]
    - [1 47 1 1 -0.25 -0.25]
    - [1 50 1 1 -0.25 0.25]
    - [2 27 1 1 0 0]
    - [2 42 1 1 -0.5 0]
    - [2 46 1 1 -0.25 0.25]
    - [2 48 1 1 -0.25 -0.25]
    - [3 28 1 1 0 0]
    - [3 43 1 1 -0.5 0]
    - [3 47 1 1 -0.25 0.25]
    - [3 49 1 1 -0.25 -0.25]
    - [4 29 1 1 0 0]
    - [4 44 1 1 -0.5 0]
    - [4 48 1 1 -0.25 0.25]
    - [4 50 1 1 -0.25 -0.25]
    - [5 30 1 1 0 0]
    - [5 45 1 1 -0.5 0]
    - [5 46 1 1 -0.25 -0.25]
    - [5 49 1 1 -0.25 0.25]
    - [6 27 1 1 -0.25 -0.25]
    - [6 30 1 1 -0.25 0.25]
    - [6 31 1 1 0 0]
    - [6 46 1 1 -0.5 0]
    - [7 26 1 1 -0.25 0.25]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 47 1 1 -0.5 0]
    - [8 27 1 1 -0.25 0.25]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 48 1 1 -0.5 0]
    - [9 28 1 1 -0.25 0.25]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 49 1 1 -0.5 0]
    - [10 26 1 1 -0.25 -0.25]
    - [10 29 1 1 -0.25 0.25]
    - [10 35 1 1 0 0]
    - [10 50 1 1 -0.5 0]
    - [11 26 1 1 -0.5 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 35 1 1 -0.25 0.25]
    - [11 36 1 1 0 0]
    - [12 27 1 1 -0.5 0]
    - [12 31 1 1 -0.25 0.25]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [13 28 1 1 -0.5 0]
    - [13 32 1 1 -0.25 0.25]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [14 29 1 1 -0.5 0]
    - [14 33 1 1 -0.25 0.25]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [15 30 1 1 -0.5 0]
    - [15 31 1 1 -0.25 -0.25]
    - [15 34 1 1 -0.25 0.25]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 40 1 1 -0.25 0.25]
    - [16 41 1 1 0 0]
    - [17 32 1 1 -0.5 0]
    - [17 36 1 1 -0.25 0.25]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [18 33 1 1 -0.5 0]
    - [18 37 1 1 -0.25 0.25]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [19 34 1 1 -0.5 0]
    - [19 38 1 1 -0.25 0.25]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [20 35 1 1 -0.5 0]
    - [20 36 1 1 -0.25 -0.25]
    - [20 39 1 1 -0.25 0.25]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 45 1 1 -0.25 0.25]
    - [21 46 1 1 0 0]
    - [22 37 1 1 -0.5 0]
    - [22 41 1 1 -0.25 0.25]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [23 38 1 1 -0.5 0]
    - [23 42 1 1 -0.25 0.25]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [24 39 1 1 -0.5 0]
    - [24 43 1 1 -0.25 0.25]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [25 40 1 1 -0.5 0]
    - [25 41 1 1 -0.25 -0.25]
    - [25 44 1 1 -0.25 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_rect_00.sli b/testsuite/unittests/test_free_mask_rect_00.sli
    deleted file mode 100644
    index 73fab3f8f7..0000000000
    --- a/testsuite/unittests/test_free_mask_rect_00.sli
    +++ /dev/null
    @@ -1,276 +0,0 @@
    -/*
    - *  test_free_mask_rect_00.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.25x1.25 ->
    -%  - nodes "freely placed" at regular grid locations
    -%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
    -%  - anchor [0,0]
    -%  - should give identical results to reg_mask_rect_00.sli
    -%
    -%   nodes in the bottom row connect only to nodes on the corresponding row
    -%   nodes at the right edge have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 38    17 -> 43 48    22 -> 48
    -%
    -%      3 -> 28 33 38    18 -> 43 48    23 -> 48
    -%	    29 34 39	      44 49	     49
    -%
    -%      6 -> 31 36 41    21 -> 46 51    26 -> 51
    -%           32 37 42          47 52          52
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [0.0 0.0] /upper_right [0.6 0.3] >>
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 31 1 1 0.25 0]
    - [1 36 1 1 0.5 0]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 31 1 1 0.25 0.25]
    - [2 32 1 1 0.25 0]
    - [2 36 1 1 0.5 0.25]
    - [2 37 1 1 0.5 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 32 1 1 0.25 0.25]
    - [3 33 1 1 0.25 0]
    - [3 37 1 1 0.5 0.25]
    - [3 38 1 1 0.5 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 33 1 1 0.25 0.25]
    - [4 34 1 1 0.25 0]
    - [4 38 1 1 0.5 0.25]
    - [4 39 1 1 0.5 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 34 1 1 0.25 0.25]
    - [5 35 1 1 0.25 0]
    - [5 39 1 1 0.5 0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 36 1 1 0.25 0]
    - [6 41 1 1 0.5 0]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 36 1 1 0.25 0.25]
    - [7 37 1 1 0.25 0]
    - [7 41 1 1 0.5 0.25]
    - [7 42 1 1 0.5 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 37 1 1 0.25 0.25]
    - [8 38 1 1 0.25 0]
    - [8 42 1 1 0.5 0.25]
    - [8 43 1 1 0.5 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 38 1 1 0.25 0.25]
    - [9 39 1 1 0.25 0]
    - [9 43 1 1 0.5 0.25]
    - [9 44 1 1 0.5 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 39 1 1 0.25 0.25]
    - [10 40 1 1 0.25 0]
    - [10 44 1 1 0.5 0.25]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 41 1 1 0.25 0]
    - [11 46 1 1 0.5 0]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 41 1 1 0.25 0.25]
    - [12 42 1 1 0.25 0]
    - [12 46 1 1 0.5 0.25]
    - [12 47 1 1 0.5 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 42 1 1 0.25 0.25]
    - [13 43 1 1 0.25 0]
    - [13 47 1 1 0.5 0.25]
    - [13 48 1 1 0.5 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 43 1 1 0.25 0.25]
    - [14 44 1 1 0.25 0]
    - [14 48 1 1 0.5 0.25]
    - [14 49 1 1 0.5 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 44 1 1 0.25 0.25]
    - [15 45 1 1 0.25 0]
    - [15 49 1 1 0.5 0.25]
    - [15 50 1 1 0.5 0]
    - [16 41 1 1 0 0]
    - [16 46 1 1 0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 46 1 1 0.25 0.25]
    - [17 47 1 1 0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 47 1 1 0.25 0.25]
    - [18 48 1 1 0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 48 1 1 0.25 0.25]
    - [19 49 1 1 0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 49 1 1 0.25 0.25]
    - [20 50 1 1 0.25 0]
    - [21 46 1 1 0 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_rect_01.sli b/testsuite/unittests/test_free_mask_rect_01.sli
    deleted file mode 100644
    index e290af5a8a..0000000000
    --- a/testsuite/unittests/test_free_mask_rect_01.sli
    +++ /dev/null
    @@ -1,258 +0,0 @@
    -/*
    - *  test_free_mask_rect_01.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.25x1.25 ->
    -%  - nodes "freely placed" at regular grid locations
    -%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
    -%  - anchor [-0.5,-0.25]
    -%  - should give identical results to reg_mask_rect_01.sli
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [0.0 0.0] /upper_right [0.6 0.3] >>
    -                   /anchor      [ -0.5 -0.25 ]
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [5 30 1 1 0 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [10 30 1 1 -0.25 0]
    - [10 35 1 1 0 0]
    - [11 26 1 1 -0.5 0]
    - [11 27 1 1 -0.5 -0.25]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [12 27 1 1 -0.5 0]
    - [12 28 1 1 -0.5 -0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [13 28 1 1 -0.5 0]
    - [13 29 1 1 -0.5 -0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [14 29 1 1 -0.5 0]
    - [14 30 1 1 -0.5 -0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [15 30 1 1 -0.5 0]
    - [15 35 1 1 -0.25 0]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 32 1 1 -0.5 -0.25]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [17 32 1 1 -0.5 0]
    - [17 33 1 1 -0.5 -0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [18 33 1 1 -0.5 0]
    - [18 34 1 1 -0.5 -0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [19 34 1 1 -0.5 0]
    - [19 35 1 1 -0.5 -0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [20 35 1 1 -0.5 0]
    - [20 40 1 1 -0.25 0]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 37 1 1 -0.5 -0.25]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 37 1 1 -0.5 0]
    - [22 38 1 1 -0.5 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 38 1 1 -0.5 0]
    - [23 39 1 1 -0.5 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 39 1 1 -0.5 0]
    - [24 40 1 1 -0.5 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 40 1 1 -0.5 0]
    - [25 45 1 1 -0.25 0]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_rect_11.sli b/testsuite/unittests/test_free_mask_rect_11.sli
    deleted file mode 100644
    index f02342de34..0000000000
    --- a/testsuite/unittests/test_free_mask_rect_11.sli
    +++ /dev/null
    @@ -1,301 +0,0 @@
    -/*
    - *  test_free_mask_rect_11.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.25x1.25
    -%  - nodes "freely placed" at regular grid locations
    -%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
    -%  - anchor [-0.5,-0.25]
    -%  - periodic BC
    -%  - should give identical results to reg_mask_rect_11.sli
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.25 1.25]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [0.0 0.0] /upper_right [0.6 0.3] >>
    -                   /anchor      [ -0.5 -0.25 ]
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 41 1 1 -0.5 0]
    - [1 42 1 1 -0.5 -0.25]
    - [1 46 1 1 -0.25 0]
    - [1 47 1 1 -0.25 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 42 1 1 -0.5 0]
    - [2 43 1 1 -0.5 -0.25]
    - [2 47 1 1 -0.25 0]
    - [2 48 1 1 -0.25 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 43 1 1 -0.5 0]
    - [3 44 1 1 -0.5 -0.25]
    - [3 48 1 1 -0.25 0]
    - [3 49 1 1 -0.25 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 44 1 1 -0.5 0]
    - [4 45 1 1 -0.5 -0.25]
    - [4 49 1 1 -0.25 0]
    - [4 50 1 1 -0.25 -0.25]
    - [5 26 1 1 0 -0.25]
    - [5 30 1 1 0 0]
    - [5 41 1 1 -0.5 -0.25]
    - [5 45 1 1 -0.5 0]
    - [5 46 1 1 -0.25 -0.25]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 46 1 1 -0.5 0]
    - [6 47 1 1 -0.5 -0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 47 1 1 -0.5 0]
    - [7 48 1 1 -0.5 -0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 48 1 1 -0.5 0]
    - [8 49 1 1 -0.5 -0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 49 1 1 -0.5 0]
    - [9 50 1 1 -0.5 -0.25]
    - [10 26 1 1 -0.25 -0.25]
    - [10 30 1 1 -0.25 0]
    - [10 31 1 1 0 -0.25]
    - [10 35 1 1 0 0]
    - [10 46 1 1 -0.5 -0.25]
    - [10 50 1 1 -0.5 0]
    - [11 26 1 1 -0.5 0]
    - [11 27 1 1 -0.5 -0.25]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [12 27 1 1 -0.5 0]
    - [12 28 1 1 -0.5 -0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [13 28 1 1 -0.5 0]
    - [13 29 1 1 -0.5 -0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [14 29 1 1 -0.5 0]
    - [14 30 1 1 -0.5 -0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [15 26 1 1 -0.5 -0.25]
    - [15 30 1 1 -0.5 0]
    - [15 31 1 1 -0.25 -0.25]
    - [15 35 1 1 -0.25 0]
    - [15 36 1 1 0 -0.25]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 32 1 1 -0.5 -0.25]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [17 32 1 1 -0.5 0]
    - [17 33 1 1 -0.5 -0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [18 33 1 1 -0.5 0]
    - [18 34 1 1 -0.5 -0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [19 34 1 1 -0.5 0]
    - [19 35 1 1 -0.5 -0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [20 31 1 1 -0.5 -0.25]
    - [20 35 1 1 -0.5 0]
    - [20 36 1 1 -0.25 -0.25]
    - [20 40 1 1 -0.25 0]
    - [20 41 1 1 0 -0.25]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 37 1 1 -0.5 -0.25]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 37 1 1 -0.5 0]
    - [22 38 1 1 -0.5 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 38 1 1 -0.5 0]
    - [23 39 1 1 -0.5 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 39 1 1 -0.5 0]
    - [24 40 1 1 -0.5 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 36 1 1 -0.5 -0.25]
    - [25 40 1 1 -0.5 0]
    - [25 41 1 1 -0.25 -0.25]
    - [25 45 1 1 -0.25 0]
    - [25 46 1 1 0 -0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_free_mask_rect_13.sli b/testsuite/unittests/test_free_mask_rect_13.sli
    deleted file mode 100644
    index bb41e5d866..0000000000
    --- a/testsuite/unittests/test_free_mask_rect_13.sli
    +++ /dev/null
    @@ -1,387 +0,0 @@
    -/*
    - *  test_free_mask_rect_13.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.05 x 1.05 :
    -%    Similar to _11, but with minimally enlarged extent, avoiding overlaps
    -%  - nodes "freely placed" at regular grid locations
    -%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
    -%  - anchor [0,0]
    -%  - periodic BC
    -%  - should give identical results to reg_mask_rect_11.sli
    -
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%  Expected projections for some nodes
    -%
    -%    14 -> 39 44 49 29
    -%          40 45 50 30
    -%
    -%     2 -> 28 33 38
    -%          31 36 41
    -%          32 37 42
    -%
    -%    26 -> 51 31 36 41
    -%          52 32 37 42
    -
    -
    -% loop y-coords backwards so that we get same node_id-pos mapping as on grid
    -[-0.5 0.5 0.25] Range
    -{ /x Set [0.5 -0.5 -0.25] Range { x exch 2 arraystore } Map } Map 1 Flatten
    -/pos Set
    -
    -/layer << /positions pos
    -          /extent [1.05 1.05]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [-0.001 -0.001] /upper_right [0.6 0.301] >>
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 29 1 1 0 0.3]
    - [1 30 1 1 0 0.05]
    - [1 31 1 1 0.25 0]
    - [1 34 1 1 0.25 0.3]
    - [1 35 1 1 0.25 0.05]
    - [1 36 1 1 0.5 0]
    - [1 39 1 1 0.5 0.3]
    - [1 40 1 1 0.5 0.05]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 30 1 1 0 0.3]
    - [2 31 1 1 0.25 0.25]
    - [2 32 1 1 0.25 0]
    - [2 35 1 1 0.25 0.3]
    - [2 36 1 1 0.5 0.25]
    - [2 37 1 1 0.5 0]
    - [2 40 1 1 0.5 0.3]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 32 1 1 0.25 0.25]
    - [3 33 1 1 0.25 0]
    - [3 37 1 1 0.5 0.25]
    - [3 38 1 1 0.5 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 33 1 1 0.25 0.25]
    - [4 34 1 1 0.25 0]
    - [4 38 1 1 0.5 0.25]
    - [4 39 1 1 0.5 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 34 1 1 0.25 0.25]
    - [5 35 1 1 0.25 0]
    - [5 39 1 1 0.5 0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 34 1 1 0 0.3]
    - [6 35 1 1 0 0.05]
    - [6 36 1 1 0.25 0]
    - [6 39 1 1 0.25 0.3]
    - [6 40 1 1 0.25 0.05]
    - [6 41 1 1 0.5 0]
    - [6 44 1 1 0.5 0.3]
    - [6 45 1 1 0.5 0.05]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 35 1 1 0 0.3]
    - [7 36 1 1 0.25 0.25]
    - [7 37 1 1 0.25 0]
    - [7 40 1 1 0.25 0.3]
    - [7 41 1 1 0.5 0.25]
    - [7 42 1 1 0.5 0]
    - [7 45 1 1 0.5 0.3]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 37 1 1 0.25 0.25]
    - [8 38 1 1 0.25 0]
    - [8 42 1 1 0.5 0.25]
    - [8 43 1 1 0.5 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 38 1 1 0.25 0.25]
    - [9 39 1 1 0.25 0]
    - [9 43 1 1 0.5 0.25]
    - [9 44 1 1 0.5 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 39 1 1 0.25 0.25]
    - [10 40 1 1 0.25 0]
    - [10 44 1 1 0.5 0.25]
    - [10 45 1 1 0.5 0]
    - [11 26 1 1 -0.5 0]
    - [11 29 1 1 -0.5 0.3]
    - [11 30 1 1 -0.5 0.05]
    - [11 36 1 1 0 0]
    - [11 39 1 1 0 0.3]
    - [11 40 1 1 0 0.05]
    - [11 41 1 1 0.25 0]
    - [11 44 1 1 0.25 0.3]
    - [11 45 1 1 0.25 0.05]
    - [11 46 1 1 0.5 0]
    - [11 49 1 1 0.5 0.3]
    - [11 50 1 1 0.5 0.05]
    - [12 26 1 1 -0.5 0.25]
    - [12 27 1 1 -0.5 0]
    - [12 30 1 1 -0.5 0.3]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 40 1 1 0 0.3]
    - [12 41 1 1 0.25 0.25]
    - [12 42 1 1 0.25 0]
    - [12 45 1 1 0.25 0.3]
    - [12 46 1 1 0.5 0.25]
    - [12 47 1 1 0.5 0]
    - [12 50 1 1 0.5 0.3]
    - [13 27 1 1 -0.5 0.25]
    - [13 28 1 1 -0.5 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 42 1 1 0.25 0.25]
    - [13 43 1 1 0.25 0]
    - [13 47 1 1 0.5 0.25]
    - [13 48 1 1 0.5 0]
    - [14 28 1 1 -0.5 0.25]
    - [14 29 1 1 -0.5 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 43 1 1 0.25 0.25]
    - [14 44 1 1 0.25 0]
    - [14 48 1 1 0.5 0.25]
    - [14 49 1 1 0.5 0]
    - [15 29 1 1 -0.5 0.25]
    - [15 30 1 1 -0.5 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 44 1 1 0.25 0.25]
    - [15 45 1 1 0.25 0]
    - [15 49 1 1 0.5 0.25]
    - [15 50 1 1 0.5 0]
    - [16 26 1 1 0.3 0]
    - [16 29 1 1 0.3 0.3]
    - [16 30 1 1 0.3 0.05]
    - [16 31 1 1 -0.5 0]
    - [16 34 1 1 -0.5 0.3]
    - [16 35 1 1 -0.5 0.05]
    - [16 41 1 1 0 0]
    - [16 44 1 1 0 0.3]
    - [16 45 1 1 0 0.05]
    - [16 46 1 1 0.25 0]
    - [16 49 1 1 0.25 0.3]
    - [16 50 1 1 0.25 0.05]
    - [17 26 1 1 0.3 0.25]
    - [17 27 1 1 0.3 0]
    - [17 30 1 1 0.3 0.3]
    - [17 31 1 1 -0.5 0.25]
    - [17 32 1 1 -0.5 0]
    - [17 35 1 1 -0.5 0.3]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 45 1 1 0 0.3]
    - [17 46 1 1 0.25 0.25]
    - [17 47 1 1 0.25 0]
    - [17 50 1 1 0.25 0.3]
    - [18 27 1 1 0.3 0.25]
    - [18 28 1 1 0.3 0]
    - [18 32 1 1 -0.5 0.25]
    - [18 33 1 1 -0.5 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 47 1 1 0.25 0.25]
    - [18 48 1 1 0.25 0]
    - [19 28 1 1 0.3 0.25]
    - [19 29 1 1 0.3 0]
    - [19 33 1 1 -0.5 0.25]
    - [19 34 1 1 -0.5 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 48 1 1 0.25 0.25]
    - [19 49 1 1 0.25 0]
    - [20 29 1 1 0.3 0.25]
    - [20 30 1 1 0.3 0]
    - [20 34 1 1 -0.5 0.25]
    - [20 35 1 1 -0.5 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 49 1 1 0.25 0.25]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.05 0]
    - [21 29 1 1 0.05 0.3]
    - [21 30 1 1 0.05 0.05]
    - [21 31 1 1 0.3 0]
    - [21 34 1 1 0.3 0.3]
    - [21 35 1 1 0.3 0.05]
    - [21 36 1 1 -0.5 0]
    - [21 39 1 1 -0.5 0.3]
    - [21 40 1 1 -0.5 0.05]
    - [21 46 1 1 0 0]
    - [21 49 1 1 0 0.3]
    - [21 50 1 1 0 0.05]
    - [22 26 1 1 0.05 0.25]
    - [22 27 1 1 0.05 0]
    - [22 30 1 1 0.05 0.3]
    - [22 31 1 1 0.3 0.25]
    - [22 32 1 1 0.3 0]
    - [22 35 1 1 0.3 0.3]
    - [22 36 1 1 -0.5 0.25]
    - [22 37 1 1 -0.5 0]
    - [22 40 1 1 -0.5 0.3]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [22 50 1 1 0 0.3]
    - [23 27 1 1 0.05 0.25]
    - [23 28 1 1 0.05 0]
    - [23 32 1 1 0.3 0.25]
    - [23 33 1 1 0.3 0]
    - [23 37 1 1 -0.5 0.25]
    - [23 38 1 1 -0.5 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [24 28 1 1 0.05 0.25]
    - [24 29 1 1 0.05 0]
    - [24 33 1 1 0.3 0.25]
    - [24 34 1 1 0.3 0]
    - [24 38 1 1 -0.5 0.25]
    - [24 39 1 1 -0.5 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [25 29 1 1 0.05 0.25]
    - [25 30 1 1 0.05 0]
    - [25 34 1 1 0.3 0.25]
    - [25 35 1 1 0.3 0]
    - [25 39 1 1 -0.5 0.25]
    - [25 40 1 1 -0.5 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_gamma_sup_generator.sli b/testsuite/unittests/test_gamma_sup_generator.sli
    deleted file mode 100644
    index c7cfe78956..0000000000
    --- a/testsuite/unittests/test_gamma_sup_generator.sli
    +++ /dev/null
    @@ -1,331 +0,0 @@
    -/*
    - *  test_gamma_sup_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_gamma_sup_generator - sli script for test of gamma_sup_generator output 
    -
    -Synopsis: (test_gamma_sup_generator) run -> compare spike train statistics with expectations
    -
    -
    -Description:
    - 
    - test_gamma_sup_generator is a collection of tests which require basic 
    - functionality of the generator. It tests
    - 1) if the firing rate of a superposition is close to the preset one.
    - 2) if the coefficient of variation of a superposition agrees with theory
    - 3) if the coefficient of variation of a single process agrees with theory
    - 4) if the spike trains generated for two different targets differ
    -
    - All of these tests are based on random number realizations, which is 
    - necessarily so  since the model is stochastic. There is thus a finite 
    - probability of test failure, even if everything is fine. The choice of the 
    - variable err, which is the allowed relative deviation from the reference value, 
    - can be used to make the test more or less strict. Increasing T inside the test 
    - functions can also help to get more reliable statistics and a reduced 
    - probability of false alarms.
    - 
    - The values are chosen to have a reasonable execution time. False alarms were 
    - never observed yet. Since random numbers are preserved through repetitions of
    - the simulations, the test should work for sure as long as the random number 
    - generation procedure of nest is not changed. If it is changed, failure of the
    - test is still very unlikely.
    - 
    - The intention of this script is to make sure that there are no gross errors in
    - the main functions of the gamma_sup_generator. 
    -
    -Remarks:
    -  This test script was adapted from test_ppd_sup_generator.sli  
    -
    -
    -Author:  June 2011, Moritz Deger
    -SeeAlso: gamma_sup_generator, testsuite::test_ppd_sup_generator
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -
    -0.2 /err Set
    -
    -
    -% 1) check for reasonable superposition spike rate
    -% 2) check if superposition cv agrees with theory
    -
    -/check_sup_rate_and_cv
    -{    
    -   % test parameters
    -    5 /gamma_shape Set
    -    10.0 /rate Set
    -    10000.0 /T Set
    -    5 /n_proc Set
    -    1. /h Set
    -
    -    ResetKernel
    -    
    -    << 
    -      /resolution  h
    -    >> /kernelparams Set
    -    
    -    kernelparams SetKernelStatus 
    -    
    -    /gamma_sup_generator Create /psg Set
    -
    -    <<
    -      /rate  rate
    -      /gamma_shape gamma_shape
    -      /n_proc n_proc
    -    >> /params Set
    -    
    -    psg params SetStatus
    -    
    -    /spike_recorder Create /sr Set
    -
    -    psg sr Connect
    -    T Simulate
    -    
    -    sr /events get /times get /spikes Set
    -
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes cva size T 1e-3 mul div /rate_sim Set /spikes_array Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    rate n_proc mul /rate_ana Set
    -    
    -    % ratio = rate_sim / rate_ana
    -    rate_sim rate_ana div /ratio Set
    -    
    -    % this could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -    
    -    %isi = []
    -    %for i in xrange(1,len(spikes)):
    -    %    isi.append(spikes[i]-spikes[i-1])
    -    0.0 /t Set
    -    spikes cva { dup t sub exch /t Set  } Map /isi Set
    -
    -
    -    %# compute moments of ISI to get mean and variance
    -    %isi_m1 = 0. 
    -    %isi_m2 = 0.
    -    %for t in isi:
    -    %    isi_m1 += t
    -    %    isi_m2 += t**2
    -    0. /isi_m1 Set
    -    0. /isi_m2 Set
    -    isi { dup isi_m1 add /isi_m1 Set dup mul isi_m2 add /isi_m2 Set} forall
    -    
    -    %isi_mean = isi_m1 / len(isi)
    -    %isi_var = isi_m2/ len(isi) - isi_mean**2
    -    %cvsq = isi_var/isi_mean**2
    -    isi_m1 isi size exch pop div /isi_mean Set
    -    isi_m2 isi size exch pop div isi_mean dup mul sub /isi_var Set
    -    isi_var isi_mean 2 pow  div /cvsq_sim Set
    -
    -    %theoretical CV**2 for PPD, should match gamma also, see Deger et al 2011, JCNS
    -    1.0 1.0 gamma_shape sqrt div sub /dbar Set
    -    1.0 rate div 1e3 mul /mu Set
    -    mu dbar mul /dead_time Set
    -    
    -    1.0 1.0 n_proc add div /cvfact1 Set
    -    n_proc 1.0 sub 2.0 1.0 dbar sub n_proc 1 add pow mul add /cvfact2 Set
    -    cvfact1 cvfact2 mul /cvsq_theo Set
    -
    -    cvsq_sim cvsq_theo div /ratio_cvsq Set 
    -    1.0 err sub ratio_cvsq leq
    -    ratio_cvsq 1.0 err add leq
    -    and assert_or_die
    -    
    -} def
    -
    -
    -
    -%3) check if single process respect isi moments
    -
    -/check_single_rate_and_isi
    -{    
    -   % test parameters
    -    7 /gamma_shape Set
    -    15.0 /rate Set
    -    100000.0 /T Set
    -    1 /n_proc Set
    -    1.0 /h Set
    -
    -    ResetKernel
    -    
    -    << 
    -      /resolution  h
    -    >> /kernelparams Set
    -    
    -    kernelparams SetKernelStatus 
    -    
    -    /gamma_sup_generator Create /psg Set
    -
    -    <<
    -      /rate  rate
    -      /gamma_shape gamma_shape
    -      /n_proc n_proc
    -    >> /params Set
    -    
    -    psg params SetStatus
    -    
    -    /spike_recorder Create /sr Set
    -    
    -    psg sr Connect
    -    T Simulate
    -    
    -    sr /events get /times get /spikes Set
    -
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes cva size T 1e-3 mul div /rate_sim Set /spikes_array Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    rate n_proc mul /rate_ana Set
    -    
    -    % ratio = rate_sim / rate_ana
    -    rate_sim rate_ana div /ratio Set
    -    
    -    % this could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -    
    -    %isi = []
    -    %for i in xrange(1,len(spikes)):
    -    %    isi.append(spikes[i]-spikes[i-1])
    -    % Assert that min(isi)>=d
    -    0.0 /t Set
    -    spikes cva { dup t sub exch /t Set  } Map /isi Set
    -%    isi Rest Min dead_time geq assert_or_die
    -
    -    %# compute moments of ISI to get mean and variance
    -    %isi_m1 = 0. 
    -    %isi_m2 = 0.
    -    %for t in isi:
    -    %    isi_m1 += t
    -    %    isi_m2 += t**2
    -    0. /isi_m1 Set
    -    0. /isi_m2 Set
    -    isi { dup isi_m1 add /isi_m1 Set dup mul isi_m2 add /isi_m2 Set} forall
    -    
    -    %isi_mean = isi_m1 / len(isi)
    -    %isi_var = isi_m2/ len(isi) - isi_mean**2
    -    %cvsq = isi_var/isi_mean**2
    -    isi_m1 isi size exch pop div /isi_mean Set
    -    isi_m2 isi size exch pop div isi_mean dup mul sub /isi_var Set
    -    isi_var isi_mean 2 pow div /cvsq_sim Set
    -
    -    %theoretical CV**2, see Deger et al 2011, JCNS
    -    % here we first match the equivalent PPD and then compute its CV**2
    -    % this is done because formulas are simpler to remember and code can
    -    % be reused.
    -    1.0 1.0 gamma_shape div sqrt sub /dbar Set
    -    1.0 rate div 1e3 mul /mu Set
    -    mu dbar mul /dead_time Set
    -
    -    1.0 rate div /mu Set
    -    mu dead_time sub /lam Set
    -    1.0 lam div mu div 2 pow /cvsq_theo Set
    -    
    -    cvsq_sim cvsq_theo div /ratio_cvsq Set 
    -    1.0 err sub ratio_cvsq leq
    -    ratio_cvsq 1.0 err add leq
    -    and assert_or_die
    -    
    -} def
    -
    -
    -/check_different_outputs
    -   {
    -
    -   % test parameters
    -    2 /gamma_shape Set
    -    25.0 /rate Set
    -    10.0 /T Set
    -    1000 /n_proc Set
    -    0.01 /h Set
    -
    -    ResetKernel
    -    
    -    << 
    -      /resolution  h
    -    >> /kernelparams Set
    -    
    -    kernelparams SetKernelStatus 
    -    
    -    /gamma_sup_generator Create /psg Set
    -
    -    <<
    -      /rate  rate
    -      /gamma_shape gamma_shape
    -      /n_proc n_proc
    -    >> /params Set
    -    
    -    psg params SetStatus
    -    
    -    /spike_recorder Create /sr1 Set
    -    /spike_recorder Create /sr2 Set
    -
    -    psg sr1 Connect
    -    psg sr2 Connect
    -    T Simulate
    -
    -    %first we check if the spike trains are different
    -    [sr1 sr2] {[/events /times] get} forall  neq  % spike trains differ
    -    assert_or_die
    -    
    -    %and we also check the rates since we simulated anyway
    -    sr1 /events get /times get /spikes1 Set
    -    sr2 /events get /times get /spikes2 Set
    -    
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes1 cva size T 1e-3 mul div /rate_sim1 Set /spikes_array1 Set
    -    spikes2 cva size T 1e-3 mul div /rate_sim2 Set /spikes_array2 Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    rate n_proc mul /rate_ana Set
    -    
    -    % ratio = rate_sim / rate_ana
    -    rate_sim1 rate_ana div /ratio1 Set
    -    rate_sim2 rate_ana div /ratio2 Set
    -    
    -    % this could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    1.0 err sub ratio1 lt
    -    ratio1 1.0 err add lt
    -    and assert_or_die
    -    
    -    1.0 err sub ratio2 lt
    -    ratio2 1.0 err add lt
    -    and assert_or_die
    -} def
    -
    -
    -
    -check_sup_rate_and_cv
    -check_single_rate_and_isi
    -check_different_outputs
    -
    diff --git a/testsuite/unittests/test_gap_junction.sli b/testsuite/unittests/test_gap_junction.sli
    deleted file mode 100644
    index 9c07e7c545..0000000000
    --- a/testsuite/unittests/test_gap_junction.sli
    +++ /dev/null
    @@ -1,200 +0,0 @@
    -/*
    - *  test_gap_junction.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -  /** @BeginDocumentation
    -
    -    Name: testsuite::test_gap_junction - Ensure that gap_junction connection can only be created between neurons which support them.
    -
    -    Synopsis: (test_gap_junction) run -> NEST exits if test fails
    -
    -    Description:
    -    Ensure that NEST throws an exception if one tries to create illegal gap-junction connections. 
    -    Furthermore it is checked that the delay cannot be set for gap-junction connections.
    -
    -    Author: Jan Hahne, October 2015
    -    SeeAlso: testsuite::test_hh_psc_alpha_gap, hh_psc_alpha_gap, gap_junction
    -  */
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -M_ERROR setverbosity
    -
    -/setup
    -{
    -  ResetKernel
    -
    -  2.0 /wfr_comm Set
    -  << /wfr_comm_interval wfr_comm >> SetKernelStatus
    -
    -  /iaf_psc_alpha Create /neuron_no_gap Set
    -  /hh_psc_alpha_gap Create /neuron_gap Set
    -} def
    -
    -% Check that accurate gap-junction connections can be created
    -{
    -  setup
    -  neuron_gap neuron_gap
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction >>
    -  Connect
    -} pass_or_die
    -
    -{
    -  setup
    -  neuron_gap neuron_gap
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction /weight 2.0 >>
    -  Connect
    -} pass_or_die
    -
    -{
    -  setup
    -  neuron_gap neuron_gap
    -  << /rule /all_to_all >> 
    -  << /synapse_model /gap_junction >>
    -  Connect
    -} pass_or_die
    -
    -% Check that delay cannot be set for gap-junction connections
    -{
    -  setup
    -  neuron_gap neuron_gap
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction /delay 2.0 >>
    -  Connect
    -} fail_or_die
    -
    -{
    -  setup
    -  neuron_gap neuron_gap
    -  << /rule /all_to_all >> 
    -  << /synapse_model /gap_junction /delay 2.0 >>
    -  Connect
    -} fail_or_die
    -
    -% Check that illegal gap-junction connections cannot be created
    -{
    -  setup
    -  neuron_no_gap neuron_no_gap
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction >>
    -  Connect
    -} fail_or_die
    -
    -{
    -  setup
    -  neuron_no_gap neuron_gap
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction >>
    -  Connect
    -} fail_or_die
    -
    -% Check that non-symmetric gap-junction connections cannot be created
    -{
    -  setup
    -  neuron_gap neuron_no_gap
    -  << /rule /one_to_one /make_symmetric false >> 
    -  << /synapse_model /gap_junction /weight 2.0 >>
    -  Connect
    -} fail_or_die
    -
    -% Check that gap-junction connections contribute to the min_delay with wfr_comm_interval
    -{
    -  setup
    -
    -  % First create one connection to change min_delay, max_delay... 
    -  neuron_no_gap neuron_no_gap 3.0 3.0 Connect
    -
    -  GetKernelStatus /max_delay get /old_max Set
    -  GetKernelStatus /min_delay get /old_min Set
    -
    -  % ... then create a gap-junction connection
    -  neuron_gap neuron_gap
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction >>
    -  Connect
    -
    -  GetKernelStatus /max_delay get /new_max Set
    -  GetKernelStatus /min_delay get /new_min Set
    -
    -  % now check for correct min_delay and max_delay
    -  old_min wfr_comm leq 
    -  { 
    -    old_min new_min eq
    -  }
    -  {
    -    wfr_comm new_min eq  
    -  } ifelse
    -  old_max wfr_comm geq 
    -  { 
    -    old_max new_max eq 
    -  }
    -  {
    -    wfr_comm new_max eq   
    -  } ifelse
    -  and
    -} assert_or_die
    -
    -% Check that gap-junction connections contribute to the max_delay with wfr_comm_interval
    -{
    -  setup
    -
    -  % First create one connection to change min_delay, max_delay... 
    -  neuron_no_gap neuron_no_gap 1.0 1.0 Connect
    -
    -  GetKernelStatus /max_delay get /old_max Set
    -  GetKernelStatus /min_delay get /old_min Set
    -
    -  % ... then create a gap-junction connection
    -  neuron_gap neuron_gap
    -  << /rule /one_to_one /make_symmetric true >> 
    -  << /synapse_model /gap_junction >>
    -  Connect
    -
    -  GetKernelStatus /max_delay get /new_max Set
    -  GetKernelStatus /min_delay get /new_min Set
    -
    -  % now check for correct min_delay and max_delay
    -  old_min wfr_comm leq 
    -  { 
    -    old_min new_min eq
    -  }
    -  {
    -    wfr_comm new_min eq  
    -  } ifelse
    -  old_max wfr_comm geq 
    -  { 
    -    old_max new_max eq 
    -  }
    -  {
    -    wfr_comm new_max eq   
    -  } ifelse
    -  and
    -} assert_or_die
    -
    -endusing
    -
    diff --git a/testsuite/unittests/test_gif_cond_exp.sli b/testsuite/unittests/test_gif_cond_exp.sli
    deleted file mode 100644
    index 0f56ad84f9..0000000000
    --- a/testsuite/unittests/test_gif_cond_exp.sli
    +++ /dev/null
    @@ -1,123 +0,0 @@
    -/*
    - *  test_gif_cond_exp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_gif_cond_exp - sli script for test of gif_cond_exp with
    -      external DC current and spike generators
    -
    -Synopsis: (test_gif_cond_exp) run
    -
    -
    -Description:
    -
    - This testscript checks the correctness of gif_cond_exp neuron model. It
    - injects external DC current and also three spikes to neuron and measures its
    - spike times. The spike times should match the expected values. The expected
    - spike times are computed by the Python code used for the publication
    - (Code/GIF.py in http://wiki.epfl.ch/giftoolbox/documents/GIF_Toolbox.zip).
    - In order to use the Python code, the adaptation parameters (q_stc/sfa) should
    - be converted using the formula described in the model documentation.
    -
    -Author:  March 2016, Setareh
    -SeeAlso: gif_cond_exp, testsuite::test_gif_cond_exp_multisynapse
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% This test should only run if we have GSL
    -skip_if_without_gsl
    -
    -% Revised reference data obtained by running model with NEST 3.0
    -% Should be replaced with statistical test.
    - 398  /t1_neuron1  Set
    - 740  /t2_neuron1  Set
    -1101  /t3_neuron1  Set
    -1500  /t4_neuron1  Set
    -
    -171  /t1_neuron2  Set
    -676  /t2_neuron2  Set
    -
    -/:run_test
    -{
    -  /params Set
    -
    -  ResetKernel
    -  <<
    -      /local_num_threads 1
    -      /resolution 0.1
    -      /rng_seed 1
    -  >> SetKernelStatus
    -
    -  /gif_cond_exp Create /neuron Set
    -  neuron params SetStatus
    -
    -  /spike_generator Create /sg Set
    -  sg << /spike_times [10.0 20.0 30.0]>> SetStatus
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  /amplitude 170. >> SetStatus
    -
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -
    -  dc_gen neuron Connect
    -
    -  neuron sr Connect
    -
    -  sg neuron Connect
    -
    -  150.0 Simulate
    -
    -  sr /events get /times get
    -} def
    -
    -% Test 1: wrong parameters (negative lambda)
    -{
    -  << /lambda_0 -10.0 >> :run_test
    -} fail_or_die
    -clear
    -
    -% Test 2: wrong parameters (unequal size of arrays)
    -{
    -  << /tau_sfa [120.0] /q_sfa [10.0 25.0] >> :run_test
    -} fail_or_die
    -clear
    -
    -% Test 3: default parameters
    -{
    -  << >> :run_test
    -  arrayload 4 eq rot
    -  t4_neuron1 eq rot
    -  t3_neuron1 eq rot
    -  t2_neuron1 eq rot
    -  t1_neuron1 eq and and and and
    -} assert_or_die
    -
    -% Test 4: defined parameters
    -{
    -  << /C_m 40.0 /Delta_V 0.2 /tau_syn_ex 8.0 /tau_sfa [120.0 10.0]
    -     /q_sfa [10.0 25.0] /tau_stc [10.0 20.0] /q_stc [20.0 -5.0] >> :run_test
    -  arrayload 2 eq rot
    -  t2_neuron2 eq rot
    -  t1_neuron2 eq and and
    -} assert_or_die
    diff --git a/testsuite/unittests/test_gif_cond_exp_multisynapse.sli b/testsuite/unittests/test_gif_cond_exp_multisynapse.sli
    deleted file mode 100644
    index f89d6dcc3b..0000000000
    --- a/testsuite/unittests/test_gif_cond_exp_multisynapse.sli
    +++ /dev/null
    @@ -1,130 +0,0 @@
    -/*
    - *  test_gif_cond_exp_multisynapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_gif_cond_exp_multisynapse - sli script for test of
    -gif_cond_exp_multisynapse with external DC current and spike generators
    -
    -Synopsis: (test_gif_cond_exp_multisynapse) run
    -
    -
    -Description:
    -
    - This testscript checks the correctness of gif_cond_exp_multisynapse neuron
    - model. It injects external DC current and also six spikes to neuron and
    - measures its spike times. The spike times should match the expected values.
    - The expected spike times are computed by the Python code used for the
    - publication (Code/GIF.py in
    - http://wiki.epfl.ch/giftoolbox/documents/GIF_Toolbox.zip).
    - In order to use the Python code, the adaptation parameters (q_stc/sfa) should
    - be converted using the formula described in the model documentation.
    -
    -Author:  March 2016, Setareh
    -SeeAlso: gif_cond_exp_multisynapse, testsuite::test_gif_cond_exp
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% This test should only run if we have GSL
    -skip_if_without_gsl
    -
    -% Revised reference data obtained by running model with NEST 3.0
    -274  /t1_neuron1  Set
    -571  /t2_neuron1  Set
    -988  /t3_neuron1  Set
    -1400 /t4_neuron1  Set
    -
    -165  /t1_neuron2  Set
    -438  /t2_neuron2  Set
    -
    -/:run_test
    -{
    -  /params Set
    -
    -  ResetKernel
    -  <<
    -      /local_num_threads 1
    -      /resolution 0.1
    -      /rng_seed 1
    -  >> SetKernelStatus
    -
    -  /gif_cond_exp_multisynapse Create /neuron Set
    -
    -  neuron << /tau_syn [8.0 4.0]
    -            /E_rev [0.0 0.0]>> SetStatus
    -  neuron params SetStatus
    -
    -  /spike_generator Create /sg1 Set
    -  sg1 << /spike_times [10.0 20.0 30.0]>> SetStatus
    -
    -  /spike_generator Create /sg2 Set
    -  sg2 << /spike_times [15.0 25.0 35.0]>> SetStatus
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  /amplitude 170. >> SetStatus
    -
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -
    -  dc_gen neuron Connect
    -
    -  neuron sr Connect
    -
    -  sg1 neuron << >> << /receptor_type 1 >> Connect
    -  sg2 neuron << >> << /receptor_type 2 >> Connect
    -
    -  150.0 Simulate
    -
    -  sr /events get /times get
    -} def
    -
    -% Test 1: wrong parameters (negative lambda)
    -{
    -  << /lambda_0 -10.0 >> :run_test
    -} fail_or_die
    -clear
    -
    -% Test 2: wrong parameters (unequal size of arrays)
    -{
    -  << /tau_sfa [120.0] /q_sfa [10.0 25.0] >> :run_test
    -} fail_or_die
    -clear
    -
    -% Test 3: default parameters
    -{
    -  << >> :run_test
    -  arrayload 4 eq rot
    -  t4_neuron1 eq rot
    -  t3_neuron1 eq rot
    -  t2_neuron1 eq rot
    -  t1_neuron1 eq and and and and
    -} assert_or_die
    -
    -% Test 4: defined parameters
    -{
    -  << /C_m 40.0 /Delta_V 0.2 /tau_sfa [120.0 10.0] /q_sfa [10.0 25.0]
    -     /tau_stc [10.0 20.0] /q_stc [20.0 -5.0] >> :run_test
    -  arrayload 2 eq rot
    -  t2_neuron2 eq rot
    -  t1_neuron2 eq and and
    -} assert_or_die
    diff --git a/testsuite/unittests/test_gif_pop_psc_exp.sli b/testsuite/unittests/test_gif_pop_psc_exp.sli
    deleted file mode 100644
    index cf709a9cd2..0000000000
    --- a/testsuite/unittests/test_gif_pop_psc_exp.sli
    +++ /dev/null
    @@ -1,113 +0,0 @@
    -/*
    - *  test_gif_pop_psc_exp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_gif_pop_psc_exp - sli script for test of gif_pop_psc_exp
    -
    -Synopsis: (test_gif_pop_psc_exp) run -> compare mean and variance of population rate of the model with desired values
    -
    -Description:
    - 
    - This script simulate an inhibitory population with the population model. After each simulation, it calculates
    - the mean and variance of population rate and compare them with desired values. The simulated values should be 
    - in a acceptable margin.
    -
    -
    -Author:  December 2017, Setareh, Schwalger
    -SeeAlso: gif_pop_psc_exp, testsuite::test_pp_pop_psc_delta
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% This test should only run if we have GSL
    -skip_if_without_gsl
    -
    -1.0 /err_mean Set      % error margin for mean rate (Hz)
    -6.0 /err_var Set       % error margin for variance of rate (Hz^2)
    -0.5 /res Set           % simulation time step (ms)
    -10000.0 /T Set         % simulation duration (ms)
    -1000.0 /start_time Set % time for starting calculating mean and variance (ms)
    -
    -start_time res div int /start_step Set
    -T 1 sub res div start_step sub int /remaining_step Set
    -
    -/inh_test
    -{
    -
    -    500 /pop_size Set
    -    22.0 /expected_rate Set
    -    102.0 /expected_var Set
    -
    -    ResetKernel
    -    << /resolution res >> SetKernelStatus
    -
    -    /gif_pop_psc_exp Create /node Set
    -
    -    <<
    -      /N pop_size
    -      /V_reset 0.0
    -      /V_T_star 10.0
    -      /E_L 0.0
    -      /Delta_V 2.0
    -      /C_m 250.0
    -      /tau_m 20.0
    -      /t_ref 4.0
    -      /I_e 500.0
    -      /lambda_0 10.0
    -      /tau_syn_in 2.0
    -      /tau_sfa [ 500.0 ]
    -      /q_sfa [ 1.0 ]
    -    >> /params_pop Set
    -    
    -    node params_pop SetStatus
    -    
    -    /static_synapse << /delay 1.0 /weight -6.25 >> SetDefaults
    -    node node Connect
    -
    -    /voltmeter Create /vm Set
    -    vm << /record_from [ /n_events ] /interval res >> SetStatus
    -    vm node Connect
    -
    -    T Simulate
    -    
    -    vm /events get /n_events get
    -    {} forall remaining_step arraystore /nspike Set % removing initial elements
    -    clear
    -
    -    nspike Plus remaining_step div /mean_nspike Set % calculating mean nspike
    -    mean_nspike pop_size div res div 1000.0 mul /mean_rate Set % convert to mean rate
    -
    -    nspike nspike mul Plus remaining_step div mean_nspike sqr sub /var_nspike Set % calculating var of nspike
    -    var_nspike pop_size div res div 1000.0 mul
    -    pop_size div res div 1000.0 mul /var_rate Set % convert to var of rate
    -
    -    mean_rate expected_rate sub abs
    -    err_mean leq assert_or_die
    -
    -    var_rate expected_var sub abs
    -    err_var leq assert_or_die
    -} def
    -
    -inh_test
    diff --git a/testsuite/unittests/test_gif_psc_exp.sli b/testsuite/unittests/test_gif_psc_exp.sli
    deleted file mode 100644
    index 180d464f7d..0000000000
    --- a/testsuite/unittests/test_gif_psc_exp.sli
    +++ /dev/null
    @@ -1,118 +0,0 @@
    -/*
    - *  test_gif_psc_exp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_gif_psc_exp - sli script for test of gif_psc_exp with
    -      external DC current and spike generators
    -
    -Synopsis: (test_gif_psc_exp) run
    -
    -
    -Description:
    -
    - This testscript checks the correctness of gif_psc_exp neuron model. It injects
    - external DC current and also three spikes to neuron and measures its spike
    - times. The spike times should match the expected values. The expected spike
    - times are computed by the Python code used for the publication (Code/GIF.py in
    - http://wiki.epfl.ch/giftoolbox/documents/GIF_Toolbox.zip).
    - In order to use the Python code, the adaptation parameters (q_stc/sfa) should
    - be converted using the formula described in the model documentation.
    -
    -Author:  March 2016, Setareh
    -SeeAlso: gif_psc_exp, testsuite::test_gif_psc_exp_multisynapse
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% Revised reference data obtained by running model with NEST 3.0
    -% Should be replaced with statistical test.
    - 462  /t1_neuron1  Set
    - 850  /t2_neuron1  Set
    -1288  /t3_neuron1  Set
    -
    -207  /t1_neuron2  Set
    -740  /t2_neuron2  Set
    -
    -/:run_test
    -{
    -  /params Set
    -
    -  ResetKernel
    -  <<
    -      /local_num_threads 1
    -      /resolution 0.1
    -      /rng_seed 1
    -  >> SetKernelStatus
    -
    -  /gif_psc_exp Create /neuron Set
    -  neuron params SetStatus
    -
    -  /spike_generator Create /sg Set
    -  sg << /spike_times [10.0 20.0 30.0]>> SetStatus
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  /amplitude 170. >> SetStatus
    -
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -
    -  dc_gen neuron Connect
    -
    -  neuron sr Connect
    -
    -  sg neuron Connect
    -
    -  150.0 Simulate
    -
    -  sr /events get /times get
    -} def
    -
    -% Test 1: wrong parameters (negative lambda)
    -{
    -  << /lambda_0 -10.0 >> :run_test
    -} fail_or_die
    -clear
    -
    -% Test 2: wrong parameters (unequal size of arrays)
    -{
    -  << /tau_sfa [120.0] /q_sfa [10.0 25.0] >> :run_test
    -} fail_or_die
    -clear
    -
    -% Test 3: default parameters
    -{
    -  << >> :run_test
    -  arrayload 3 eq rot
    -  t3_neuron1 eq rot
    -  t2_neuron1 eq rot
    -  t1_neuron1 eq and and and
    -} assert_or_die
    -
    -% Test 4: defined parameters
    -{
    -  << /C_m 40.0 /Delta_V 0.2 /tau_syn_ex 8.0 /tau_sfa [120.0 10.0]
    -     /q_sfa [10.0 25.0] /tau_stc [10.0 20.0] /q_stc [20.0 -5.0] >> :run_test
    -  arrayload 2 eq rot
    -  t2_neuron2 eq rot
    -  t1_neuron2 eq and and
    -} assert_or_die
    diff --git a/testsuite/unittests/test_gif_psc_exp_multisynapse.sli b/testsuite/unittests/test_gif_psc_exp_multisynapse.sli
    deleted file mode 100644
    index 9c6e12c0d8..0000000000
    --- a/testsuite/unittests/test_gif_psc_exp_multisynapse.sli
    +++ /dev/null
    @@ -1,125 +0,0 @@
    -/*
    - *  test_gif_psc_exp_multisynapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_gif_psc_exp_multisynapse - sli script for test of
    -gif_psc_exp_multisynapse with external DC current and spike generators
    -
    -Synopsis: (test_gif_psc_exp_multisynapse) run
    -
    -
    -Description:
    -
    - This testscript checks the correctness of gif_psc_exp_multisynapse neuron
    - model. It injects external DC current and also six spikes to neuron and
    - measures its spike times. The spike times should match the expected values.
    - The expected spike times are computed by the Python code used for the
    - publication (Code/GIF.py in
    - http://wiki.epfl.ch/giftoolbox/documents/GIF_Toolbox.zip).
    - In order to use the Python code, the adaptation parameters (q_stc/sfa) should
    - be converted using the formula described in the model documentation.
    -
    -Author:  March 2016, Setareh
    -SeeAlso: gif_psc_exp_multisynapse, testsuite::test_gif_psc_exp
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% Revised reference data obtained by running model with NEST 3.0
    -% Should be replaced with statistical test.
    - 462  /t1_neuron1  Set
    - 850  /t2_neuron1  Set
    -1288  /t3_neuron1  Set
    -
    -207  /t1_neuron2  Set
    -740  /t2_neuron2  Set
    -
    -/:run_test
    -{
    -  /params Set
    -
    -  ResetKernel
    -  <<
    -      /local_num_threads 1
    -      /resolution 0.1
    -      /rng_seed 1
    -  >> SetKernelStatus
    -
    -  /gif_psc_exp_multisynapse Create /neuron Set
    -  neuron params SetStatus
    -
    -  neuron << /tau_syn [8.0 4.0]>> SetStatus
    -
    -  /spike_generator Create /sg1 Set
    -  sg1 << /spike_times [10.0 20.0 30.0]>> SetStatus
    -
    -  /spike_generator Create /sg2 Set
    -  sg2 << /spike_times [15.0 25.0 35.0]>> SetStatus
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  /amplitude 170. >> SetStatus
    -
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -
    -  dc_gen neuron Connect
    -
    -  neuron sr Connect
    -
    -  sg1 neuron << >> << /receptor_type 1 >> Connect
    -  sg2 neuron << >> << /receptor_type 2 >> Connect
    -
    -  150.0 Simulate
    -
    -  sr /events get /times get
    -} def
    -
    -% Test 1: wrong parameters (negative lambda)
    -{
    -  << /lambda_0 -10.0 >> :run_test
    -} fail_or_die
    -clear
    -
    -% Test 2: wrong parameters (unequal size of arrays)
    -{
    -  << /tau_sfa [120.0] /q_sfa [10.0 25.0] >> :run_test
    -} fail_or_die
    -clear
    -
    -% Test 3: default parameters
    -{
    -  << >> :run_test
    -  arrayload 3 eq rot
    -  t3_neuron1 eq rot
    -  t2_neuron1 eq rot
    -  t1_neuron1 eq and and and
    -} assert_or_die
    -
    -% Test 4: defined parameters
    -{
    -  << /C_m 40.0 /Delta_V 0.2 /tau_sfa [120.0 10.0] /q_sfa [10.0 25.0]
    -     /tau_stc [10.0 20.0] /q_stc [20.0 -5.0] >> :run_test
    -  arrayload 2 eq rot
    -  t2_neuron2 eq rot
    -  t1_neuron2 eq and and
    -} assert_or_die
    diff --git a/testsuite/unittests/test_ginzburg_and_mcculloch.sli b/testsuite/unittests/test_ginzburg_and_mcculloch.sli
    deleted file mode 100644
    index ad1c45e999..0000000000
    --- a/testsuite/unittests/test_ginzburg_and_mcculloch.sli
    +++ /dev/null
    @@ -1,56 +0,0 @@
    -/*
    - *  test_ginzburg_and_mcculloch.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    - 
    - 
    -/** @BeginDocumentation
    - Name: testsuite::test_ginzburg_and_mcculloch
    -  
    - Synopsis: (test_ginzburg_and_mcculloch) run -> NEST exits if test fails
    -  
    - Description:
    - This test ensures that we are able to connect a ginzburg_neuron with a
    - mcculloch_pitts_neuron and that we can then run a simulation.
    -  
    - Author: Stine B. Vennemo
    - FirstVersion: May 2018
    - SeeAlso:
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -ResetKernel
    -
    -/ginzburg /ginzburg_neuron Create def
    -/mcculloch /mcculloch_pitts_neuron Create def
    -
    -ginzburg mcculloch Connect
    -
    -GetKernelStatus /num_connections get 1 eq assert_or_die
    -
    -100. Simulate
    -
    -GetKernelStatus /local_spike_counter get 1 geq assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_hh_cond_beta_gap_traub.sli b/testsuite/unittests/test_hh_cond_beta_gap_traub.sli
    deleted file mode 100644
    index ea4883223e..0000000000
    --- a/testsuite/unittests/test_hh_cond_beta_gap_traub.sli
    +++ /dev/null
    @@ -1,160 +0,0 @@
    -/*
    - *  test_hh_cond_beta_gap_traub.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_hh_cond_beta_gap_traub - sli script for overall test of hh_cond_beta_gap_traub model 
    -    with gap_junction connection
    -
    -    Synopsis: (test_hh_cond_beta_gap_traub) run -> compares response to current step with reference data 
    -
    -    Description:
    -    test_hh_cond_beta_gap_traub.sli is an overall test of the hh_cond_beta_gap_traub model connected
    -    by gap_junction connection.
    -
    -    Two neurons of whom one receives an constant input current of 200 pA are connected
    -    by gap_junction with an (unrealistic) high gap weight. The accurate functionality
    -    of the gap_junction feature is tested by measuring the membrane potential of the
    -    neuron without input current.
    -    
    -    Although 0.1 cannot be represented in the IEEE double data type, it
    -    is safe to simulate with a resolution (computation step size) of 0.1
    -    ms because by default nest is built with a timebase enabling exact
    -    representation of 0.1 ms.
    -
    -    The expected output is documented at the end of 
    -    the script. The textual output of the voltmeter documented in this file
    -    can be regenerated by setting adding /to_screen true to the SetStatus
    -    call of vm below.
    -    
    -    Author:  October 2015, Hahne
    -    SeeAlso: testsuite::test_gap_junction, hh_cond_beta_gap_traub, gap_junction
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_cond_beta_gap_traub, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -  /local_num_threads 1 
    -  /resolution h
    -  /use_wfr true
    -  /wfr_tol 0.0001
    -  /wfr_interpolation_order 3
    -  /wfr_max_iterations 10
    -  /wfr_comm_interval 1.0
    ->> SetKernelStatus
    -    
    -/hh_cond_beta_gap_traub Create /neuron1 Set
    -/hh_cond_beta_gap_traub Create /neuron2 Set
    -
    -neuron1
    -<< 
    -  /I_e 200.
    ->> SetStatus
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -neuron1 neuron2 
    -<< /rule /one_to_one /make_symmetric true >> 
    -<< /synapse_model /gap_junction /weight 20.0 >>  Connect
    -
    -vm neuron2     1.0 h Connect
    -
    -
    -20 Simulate
    -
    -{                                            % reference data
    - dup Transpose First /test_times Set         % times of reference 
    -                               
    - vm [/events [/times /V_m]] get cva          % array of recorded data
    -  5 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of 
    -% the output of the voltmeter.
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -[ 1    -60           ]
    -[ 2    -5.999800e+01 ]
    -[ 3    -5.999600e+01 ]
    -[ 4    -5.999200e+01 ]
    -[ 5    -5.998800e+01 ]
    -[ 6    -5.998300e+01 ]
    -[ 7    -5.997700e+01 ]
    -[ 8    -5.997000e+01 ]
    -[ 9    -5.996300e+01 ]
    -[ 10   -5.995500e+01 ]
    -[ 11   -5.994600e+01 ]
    -[ 12   -5.993600e+01 ]
    -[ 13   -5.992600e+01 ]
    -[ 14   -5.991400e+01 ]
    -[ 15   -5.990300e+01 ]
    -%
    -% ...
    -%
    -[ 117  -5.746100e+01 ]
    -[ 118  -5.743600e+01 ]
    -[ 119  -5.741100e+01 ]
    -[ 120  -5.738600e+01 ]
    -[ 121  -5.736100e+01 ]
    -[ 122  -5.733600e+01 ]
    -[ 123  -5.731100e+01 ]
    -[ 124  -5.728600e+01 ]
    -[ 125  -5.726100e+01 ]
    -[ 126  -5.723700e+01 ]
    -[ 127  -5.721200e+01 ]
    -[ 128  -5.718800e+01 ]
    -[ 129  -5.716300e+01 ]
    -[ 130  -5.713900e+01 ]
    -[ 131  -5.711500e+01 ]
    -%
    -% ...
    -%
    -[ 190  -5.583700e+01 ]
    -[ 191  -5.581800e+01 ]
    -[ 192  -5.579900e+01 ]
    -[ 193  -5.578000e+01 ]
    -[ 194  -5.576100e+01 ]
    -[ 195  -5.574200e+01 ]
    -[ 196  -5.572400e+01 ]
    -[ 197  -5.570500e+01 ]
    -[ 198  -5.568600e+01 ]
    -[ 199  -5.566800e+01 ]
    -]
    -
    -exch assert_or_die
    \ No newline at end of file
    diff --git a/testsuite/unittests/test_hh_cond_exp_traub.sli b/testsuite/unittests/test_hh_cond_exp_traub.sli
    deleted file mode 100644
    index 2f90a5f980..0000000000
    --- a/testsuite/unittests/test_hh_cond_exp_traub.sli
    +++ /dev/null
    @@ -1,155 +0,0 @@
    -/*
    - *  test_hh_cond_exp_traub.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_hh_cond_exp_traub - sli script for overall test of hh_cond_exp_traub model
    -
    -    Synopsis: (test_hh_cond_exp_traub) run -> 
    -
    -    Description:
    -
    -    Author:  
    -    SeeAlso: 
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_cond_exp_traub, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -  /local_num_threads 1 
    -  /resolution h
    ->> SetKernelStatus
    -
    -%% Test: Node creation
    -
    -/hh_cond_exp_traub Create /neuron Set
    -
    -%% Test: Set/GetStatus
    -
    -<< /V_m 10.0
    -   /g_Na 19000.0
    -   /g_K	  5000.0
    -   /g_L	     9.0
    -   /C_m	   110.0
    -   /E_Na    40.0
    -   /E_K    -80.0   
    -   /E_L	   -70.0
    -   /E_ex     1.0
    -   /E_in   -90.0
    -   /tau_syn_ex 0.3
    -   /tau_syn_in 3.0
    -   /t_ref    3.5
    -   /I_e	     1.0
    ->> /hh_params Set
    -
    -neuron hh_params SetStatus
    -neuron GetStatus 0 get /result Set
    -
    -{
    -  result /V_m  get 6 ToUnitTestPrecision 10 eq
    -  result /g_Na get 6 ToUnitTestPrecision 19000 eq and
    -  result /g_K  get 6 ToUnitTestPrecision 5000 eq and
    -  result /g_L  get 6 ToUnitTestPrecision 9 eq and
    -  result /C_m  get 6 ToUnitTestPrecision 110 eq and
    -  result /E_Na get 6 ToUnitTestPrecision 40 eq and
    -  result /E_K  get 6 ToUnitTestPrecision -80 eq and
    -  result /E_L  get 6 ToUnitTestPrecision -70 eq and
    -  result /E_ex get 6 ToUnitTestPrecision  1 eq and
    -  result /E_in get 6 ToUnitTestPrecision -90 eq and
    -  result /tau_syn_ex get 6 ToUnitTestPrecision 0.3 eq and
    -  result /tau_syn_in get 6 ToUnitTestPrecision 3 eq and
    -  result /t_ref get 6 ToUnitTestPrecision 3.5 eq and
    -  result /I_e get 6 ToUnitTestPrecision 1 eq and
    -} assert_or_die
    -
    -%% Test: Handling of events
    -
    -% CurrentEvent
    -/dc_generator Create /dc_gen Set
    -dc_gen << /amplitude 100.0 >> SetStatus
    -
    -% SpikeEvent
    -/spike_generator Create /sg Set
    -sg << /precise_times false /spike_times [0.1 1.2] >> SetStatus
    -
    -% PotentialRequest
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -% SynapticConductanceRequest
    -/multimeter Create /mm Set
    -mm << /time_in_steps true /interval h /record_from [/g_ex /g_in] >> SetStatus
    -
    -sg neuron Connect
    -dc_gen neuron Connect
    -vm neuron Connect
    -mm neuron Connect
    -neuron sr Connect
    -
    -%% Test: Simulation --- check that implementation provides consistent results
    -5 Simulate
    -
    -{
    -  vm [/events [/times /V_m]] get cva     % array of recorded data
    -  6 ToUnitTestPrecision Transpose dup == % to precision of reference
    -  [[1 3.919340e+01] [2 3.850370e+01] [3 3.315630e+01] [4 2.217610e+01]
    -   [5 7.131720e+00] [6 -8.728460e+00] [7 -2.312210e+01] [8 -3.595260e+01]
    -   [9 -5.182590e+01] [10 -6.699940e+01] [11 -7.398330e+01] [12 -7.647150e+01]
    -   [13 -7.748650e+01] [14 -7.793770e+01] [15 -7.813580e+01] [16 -7.820390e+01]
    -   [17 -7.819780e+01] [18 -7.814580e+01] [19 -7.806380e+01] [20 -7.796150e+01]
    -   [21 -7.784520e+01] [22 -7.771910e+01] [23 -7.752600e+01] [24 -7.734640e+01]
    -   [25 -7.717640e+01] [26 -7.701340e+01] [27 -7.685560e+01] [28 -7.670190e+01]
    -   [29 -7.655140e+01] [30 -7.640350e+01] [31 -7.625770e+01] [32 -7.611370e+01]
    -   [33 -7.597140e+01] [34 -7.583060e+01] [35 -7.569110e+01] [36 -7.555300e+01]
    -   [37 -7.541600e+01] [38 -7.528030e+01] [39 -7.514570e+01] [40 -7.501230e+01]]
    -  eq 
    -} assert_or_die
    -
    -{
    -  mm [/events [/times /g_ex /g_in]] get cva   % array of recorded data
    -  6 ToUnitTestPrecision Transpose dup ==      % to precision of reference
    -  [[1 0 0] [2 0 0] [3 0 0] [4 0 0] [5 0 0] [6 0 0] [7 0 0] [8 0 0] [9 0 0]
    -   [10 0 0] [11 1 0] [12 7.165310e-01 0] [13 5.134160e-01 0] [14 3.678790e-01 0]
    -   [15 2.635960e-01 0] [16 1.888750e-01 0] [17 1.353340e-01 0] [18 9.697120e-02 0]
    -   [19 6.948280e-02 0] [20 4.978650e-02 0] [21 3.567350e-02 0] [22 1.025560e+00 0]
    -   [23 7.348450e-01 0] [24 5.265390e-01 0] [25 3.772810e-01 0] [26 2.703330e-01 0]
    -   [27 1.937020e-01 0] [28 1.387930e-01 0] [29 9.944960e-02 0] [30 7.125860e-02 0]
    -   [31 5.105890e-02 0] [32 3.658530e-02 0] [33 2.621440e-02 0] [34 1.878340e-02 0]
    -   [35 1.345890e-02 0] [36 9.643710e-03 0] [37 6.910010e-03 0] [38 4.951230e-03 0]
    -   [39 3.547710e-03 0] [40 2.542040e-03 0]] eq
    -} assert_or_die
    -
    -{
    -  sr [/events /times] get cva dup ==
    -  [2] eq 
    -} assert_or_die
    diff --git a/testsuite/unittests/test_hh_psc_alpha_gap.sli b/testsuite/unittests/test_hh_psc_alpha_gap.sli
    deleted file mode 100644
    index 99994d0f61..0000000000
    --- a/testsuite/unittests/test_hh_psc_alpha_gap.sli
    +++ /dev/null
    @@ -1,160 +0,0 @@
    -/*
    - *  test_hh_psc_alpha_gap.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_hh_psc_alpha_gap - sli script for overall test of hh_psc_alpha_gap model 
    -    with gap_junction connection
    -
    -    Synopsis: (test_hh_psc_alpha_gap) run -> compares response to current step with reference data 
    -
    -    Description:
    -    test_hh_psc_alpha_gap.sli is an overall test of the hh_psc_alpha_gap model connected
    -    by gap_junction connection.
    -
    -    Two neurons of whom one receives an constant input current of 200 pA are connected
    -    by gap_junction with an (unrealistic) high gap weight. The accurate functionality
    -    of the gap_junction feature is tested by measuring the membrane potential of the
    -    neuron without input current.
    -    
    -    Although 0.1 cannot be represented in the IEEE double data type, it
    -    is safe to simulate with a resolution (computation step size) of 0.1
    -    ms because by default nest is built with a timebase enabling exact
    -    representation of 0.1 ms.
    -
    -    The expected output is documented at the end of 
    -    the script.
    -    
    -    Author:  October 2015, Hahne
    -    SeeAlso: testsuite::test_gap_junction, hh_psc_alpha_gap, gap_junction
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution h
    -      /use_wfr true
    -      /wfr_tol 0.0001
    -      /wfr_interpolation_order 3
    -      /wfr_max_iterations 10
    -      /wfr_comm_interval 1.0
    -    >> SetKernelStatus
    -    
    -/hh_psc_alpha_gap Create /neuron1 Set
    -/hh_psc_alpha_gap Create /neuron2 Set
    -
    -neuron1
    -<< 
    -  /I_e 200.
    ->> SetStatus
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -neuron1 neuron2
    -<< /rule /one_to_one /make_symmetric true >> 
    -<< /synapse_model /gap_junction /weight 20.0 >>
    -Connect
    -vm neuron2     1.0 h Connect
    -
    -
    -20 Simulate
    -
    -{                                             % reference data
    - dup Transpose First /test_times Set         % times of reference 
    -                               
    - vm [/events [/times /V_m]] get cva   % array of recorded data
    -  5 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of 
    -% the output of the voltmeter.
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -[ 1    -69.592 ]
    -[ 2    -69.559 ]
    -[ 3    -69.507 ]
    -[ 4    -69.439 ]
    -[ 5    -69.357 ]
    -[ 6    -69.264 ]
    -[ 7    -69.162 ]
    -[ 8    -69.051 ]
    -[ 9    -68.933 ]
    -[ 10   -68.809 ]
    -[ 11   -68.681 ]
    -[ 12   -68.548 ]
    -[ 13   -68.413 ]
    -[ 14   -68.276 ]
    -[ 15   -68.136 ] 
    -%
    -% ...
    -%
    -[ 117  -33.771 ]
    -[ 118  -24.103 ]
    -[ 119    8.7117 ]
    -[ 120   62.019 ]
    -[ 121   39.042 ]
    -[ 122   27.485 ]
    -[ 123   18.856 ]
    -[ 124   11.201 ]
    -[ 125    3.6210 ]
    -[ 126   -4.6956 ]
    -[ 127  -15.006 ]
    -[ 128  -29.464 ]
    -[ 129  -49.786 ]
    -[ 130  -71.323 ]
    -[ 131  -83.787 ]
    -% 
    -% ...
    -%   
    -[ 190  -71.023 ]
    -[ 191  -70.833 ]
    -[ 192  -70.647 ]
    -[ 193  -70.466 ]
    -[ 194  -70.289 ]
    -[ 195  -70.116 ]
    -[ 196  -69.948 ]
    -[ 197  -69.783 ]
    -[ 198  -69.622 ]
    -[ 199  -69.464 ]
    -]   
    -
    -exch assert_or_die
    -
    -
    diff --git a/testsuite/unittests/test_hpc_synapse.sli b/testsuite/unittests/test_hpc_synapse.sli
    deleted file mode 100644
    index 62d33bfdf8..0000000000
    --- a/testsuite/unittests/test_hpc_synapse.sli
    +++ /dev/null
    @@ -1,237 +0,0 @@
    -/*
    - *  test_hpc_synapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::test_hpc_synapse - Basic tests on hpc synapses
    -
    -Synopsis: (test_hpc_synapse) run -> NEST exits if test fails
    -
    -Description:
    -Test basic properties of HPC synapses as follows:
    -
    -1. For all known synapses with _hpc ending and counterparts without _hpc
    -   connect spike generator to one neuron with normal, one with _hpc synapse,
    -   ensure that simulation yields identical membrane potentials.
    -
    -2. Check that adding and freezing/thawing of nodes either is blocked or
    -   does not affect results, i.e., that the TargetIdentifierIndicies are ok.
    -   These tests proceed as follows:
    -   1. Connect spike_generator to N neurons with different weights,
    -      disable spiking in receptors. We use membrane potential after simulation
    -      as indicator for through which synpse a neuron received input.
    -   2. Build network once with plain static_synapse to get reference data.
    -   3. Then build with respective test cases and compare.
    -
    -Author: Hans E Plesser, 2014-11-14
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -% convert name with _hpc to equivalent without
    -/hpctoplain
    -{
    -  cvs dup length 4 sub Take cvlit
    -} bind def
    -
    -
    -% Test if synapse can be used without additional setup; stdp_dopamine_synpase does not
    -/synapse_works  % expects lit specifying hpc synapse
    -{
    -  /syn Set
    -  mark
    -  {
    -    /iaf_psc_alpha Create dup syn Connect
    -    10 Simulate
    -  }
    -  stopped
    -  dup /failed Set
    -  {
    -    % error, need to clean up
    -    counttomark npop % pop all but mark
    -    errordict begin /newerror false def end
    -  }
    -  if
    -  pop % mark
    -  failed not
    -} def
    -
    -
    -% find all hpc synapses with non-hpc counterparts that can be used without
    -% additional setup
    -/synmodels GetKernelStatus /synapse_models get def
    -/hpcsyns synmodels { cvs -4 Take (_hpc) eq } Select def
    -/hpcwithpartner hpcsyns { dup hpctoplain synmodels exch MemberQ exch synapse_works and } Select def
    -
    -
    -% first set of tests: compare hpc to plain variant
    -/run_sim_test_one  % expects synapse model, returns membrane potential
    -{
    -  /syn Set
    -
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -
    -  % we connect via a parrot neuron, so we can test plastic synapses, too
    -  /sg /spike_generator << /spike_times [ 5.0 ] >> Create def
    -  /pn /parrot_neuron Create def
    -  /nrn /iaf_psc_alpha << /V_th 100000. >> Create def
    -  sg pn Connect
    -  pn nrn syn Connect
    -  10 Simulate
    -
    -  nrn /V_m get
    -
    -} def
    -
    -hpcwithpartner
    -{
    -  /hpc_syn Set
    -  (Test 1: ) =only hpc_syn ==
    -  /plain_syn hpc_syn hpctoplain def
    -
    -  {
    -    hpc_syn run_sim_test_one
    -    plain_syn run_sim_test_one
    -    eq
    -  } assert_or_die
    -} forall
    -
    -
    -% second test: build in some neurons, connect, then some more neurons, connect
    -/test_two_step_build  % expects syntype
    -{
    -  /syn Set
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -  /sg /spike_generator << /spike_times [ 1.0 ] >> Create def
    -  /pn /parrot_neuron Create def
    -
    -  /iaf_psc_alpha 2 << /V_th 100000. >> Create ;
    -  sg pn Connect
    -  [3 4] { /tnode_id Set pn [tnode_id] cvnodecollection /one_to_one << /synapse_model syn /weight tnode_id 100. mul >> Connect } forall
    -
    -  /iaf_psc_alpha 2 << /V_th 100000. >> Create ;
    -  [5 6] { /tnode_id Set pn [tnode_id] cvnodecollection /one_to_one << /synapse_model syn /weight tnode_id 100. mul >> Connect } forall
    -
    -  10. Simulate
    -  [3 4 5 6] { /V_m get } Map
    -} def
    -
    -{
    -  /static_synapse test_two_step_build
    -  (Test 2 plain: ) =only dup ==
    -  /static_synapse_hpc test_two_step_build
    -  (Test 2 hpc  : ) =only dup ==
    -  eq
    -} assert_or_die
    -
    -
    -
    -% third test: build, freeze one, then connect non-frozen, should work
    -/test_freeze_before_connect_nonfrozen  % expects syntype
    -{
    -  /syn Set
    -
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -  /sg /spike_generator << /spike_times [ 1.0 ] >> Create def
    -  /pn /parrot_neuron Create def
    -
    -  /iaf_psc_alpha 4 << /V_th 100000. >> Create ;
    -  3 << /frozen true >> SetStatus
    -  sg pn Connect
    -  [4 5 6] { /tnode_id Set pn [tnode_id] cvnodecollection /one_to_one << /synapse_model syn /weight tnode_id 100. mul >> Connect } forall
    -
    -  10. Simulate
    -  [4 5 6] { /V_m get } Map
    -} def
    -
    -{
    -  /static_synapse test_freeze_before_connect_nonfrozen
    -  (Test 3 plain: ) =only dup ==
    -  /static_synapse_hpc test_freeze_before_connect_nonfrozen
    -  (Test 3 hpc  : ) =only dup ==
    -  eq
    -} assert_or_die
    -
    -% fourth test: build, freeze one, then connect all, should also work
    -% because frozen synapse has invalid Target ID
    -/test_freeze_before_connect_all  % expects syntype
    -{
    -  /syn Set
    -
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -  /sg /spike_generator << /spike_times [ 1.0 ] >> Create def
    -  /pn /parrot_neuron Create def
    -
    -  /iaf_psc_alpha 4 << /V_th 100000. >> Create ;
    -  3 << /frozen true >> SetStatus
    -  sg pn Connect
    -  [3 4 5 6] { /tnode_id Set pn [tnode_id] cvnodecollection /one_to_one << /synapse_model syn /weight tnode_id 100. mul >> Connect } forall
    -
    -  10. Simulate
    -  [3 4 5 6] { /V_m get } Map
    -} def
    -
    -{
    -  /static_synapse test_freeze_before_connect_all
    -  /static_synapse_hpc test_freeze_before_connect_all
    -  eq
    -} assert_or_die
    -
    -% fifth test: build, then connect all, then freeze one
    -/test_freeze_after_connect_all  % expects syntype
    -{
    -  /syn Set
    -
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -  /sg /spike_generator << /spike_times [ 1.0 ] >> Create def
    -  /pn /parrot_neuron Create def
    -
    -  /iaf_psc_alpha 4 << /V_th 100000. >> Create ;
    -  sg pn Connect
    -  [3 4 5 6] { /tnode_id Set pn [tnode_id] cvnodecollection /one_to_one << /synapse_model syn /weight tnode_id 100. mul >> Connect } forall
    -  3 << /frozen true >> SetStatus
    -
    -  10. Simulate
    -  [3 4 5 6] { /V_m get } Map
    -} def
    -
    -{
    -  /static_synapse test_freeze_after_connect_all
    -  (Test 5 plain: ) =only dup ==
    -  /static_synapse_hpc test_freeze_after_connect_all
    -  (Test 5 hpc  : ) =only dup ==
    -  eq
    -} assert_or_die
    -
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_iaf.sli b/testsuite/unittests/test_iaf.sli
    deleted file mode 100644
    index 42184d6ff0..0000000000
    --- a/testsuite/unittests/test_iaf.sli
    +++ /dev/null
    @@ -1,180 +0,0 @@
    -/*
    - *  test_iaf.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_iaf - sli script for overall test of iaf_psc_alpha model
    -
    -    Synopsis: (test_iaf) run -> compares response to current step with reference data 
    -
    -    Description:
    -    test_iaf.sli is an overall test of the iaf_psc_alpha model connected
    -    to some useful devices.
    -
    -    A DC current is injected into the neuron using a current generator 
    -    device. The membrane potential as well as the spiking activity are 
    -    recorded by corresponding devices.
    -
    -    It can be observed how the current charges the membrane, a spike
    -    is emitted, the neuron becomes absolute refractory, and finally
    -    starts to recover.
    -
    -    The timing of the various events on the simulation grid is of 
    -    particular interest and crucial for the consistency of the 
    -    simulation scheme.
    -
    -    Although 0.1 cannot be represented in the IEEE double data type, it
    -    is safe to simulate with a resolution (computation step size) of 0.1
    -    ms because by default nest is built with a timebase enabling exact
    -    representation of 0.1 ms.
    -
    -    The expected output is documented and briefly commented at the end of 
    -    the script.
    -
    -    Other test programs discuss the various aspects of this script in detail,
    -    see the SeeAlso key below.    
    -
    -    Author:  July 2004, Diesmann
    -    SeeAlso: iaf_psc_alpha, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution h
    -    >> SetKernelStatus
    -
    -/iaf_psc_alpha Create /neuron Set
    -
    -/dc_generator Create /dc_gen Set
    -dc_gen << /amplitude 1000. >> SetStatus
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -
    -dc_gen neuron 1.0 h Connect
    -vm neuron     1.0 h Connect
    -neuron sr     1.0 h Connect
    -
    -8 Simulate
    -
    -
    -
    -{                                             % reference data
    - dup Transpose First /test_times Set         % times of reference 
    -                               
    - vm [/events [/times /V_m]] get cva   % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    - 
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -[ 1       -70      ] %<----- The earliest time dc_gen can be switched on.
    -[ 2       -70      ] %<----- The DC current arrives at the neuron, it is
    -[ 3       -69.602  ] %<-     reflected in the neuron's state variable y0,
    -[ 4       -69.2079 ] %  |    (initial condition) but has not yet affected
    -[ 5       -68.8178 ] %  |    the membrane potential.
    -[ 6       -68.4316 ] %  |
    -[ 7       -68.0492 ] %   --- the effect of the DC current is visible in the
    -[ 8       -67.6706 ] %       membrane potential
    -[ 9       -67.2958 ] %
    -[ 10      -66.9247 ] %
    -%
    -% ...
    -%
    -[ 45      -56.0204 ] %
    -[ 46      -55.7615 ] %
    -[ 47      -55.5051 ] %
    -[ 48      -55.2513 ] %
    -[ 49      -55.0001 ] %
    -[ 50      -70      ] % <---- The membrane potential crossed threshold in the
    -[ 51      -70      ] %       step 4.9 ms -> 5.0 ms. The membrane potential is 
    -[ 52      -70      ] %       reset (no super-threshold values can be observed).
    -[ 53      -70      ] %       The spike is reported at 5.0 ms
    -[ 54      -70      ] %
    -[ 55      -70      ] %
    -[ 56      -70      ] %
    -[ 57      -70      ] %
    -[ 58      -70      ] %
    -[ 59      -70      ] %
    -[ 60      -70      ] %
    -[ 61      -70      ] %
    -[ 62      -70      ] %
    -[ 63      -70      ] %
    -[ 64      -70      ] %
    -[ 65      -70      ] %
    -[ 66      -70      ] %
    -[ 67      -70      ] %
    -[ 68      -70      ] %
    -[ 69      -70      ] %
    -[ 70      -70      ] % <---- The last point in time at which the membrane potential
    -[ 71      -69.602  ] % <-    is clamped. The fact that the neuron is not refractory
    -[ 72      -69.2079 ] %   |   anymore is reflected in the state variable r==0.
    -[ 73      -68.8178 ] %   |   The neuron was refractory for 2.0 ms.
    -[ 74      -68.4316 ] %   |
    -[ 75      -68.0492 ] %   --- The membrane potential starts to increase 
    -[ 76      -67.6706 ] %       immediately afterwards and the neuron can generate 
    -[ 77      -67.2958 ] %       spikes again (at this resolution reported with time
    -[ 78      -66.9247 ] %       stamp 7.1 ms on the grid)
    -[ 79      -66.5572 ] % <--
    -]                    %    |
    -%                         |
    -%                          - The simulation was run for 8.0 ms. However, in the step
    -%                            7.9 ms -> 8.0 ms the voltmeter necessarily receives the
    -%                            voltages that occurred at time 7.9 ms (delay h). This 
    -%                            results in different end times of the recorded voltage 
    -%                            traces at different resolutions. In the current 
    -%                            simulation kernel there is no general cure for this 
    -%                            problem. One workaround is to end the simulation script
    -%                            with "h Simulate", thereby making the script resolution
    -%                            dependent.
    -%
    -
    -
    -exch assert_or_die
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_iaf_1to2.sli b/testsuite/unittests/test_iaf_1to2.sli
    deleted file mode 100644
    index 56e04cba1a..0000000000
    --- a/testsuite/unittests/test_iaf_1to2.sli
    +++ /dev/null
    @@ -1,180 +0,0 @@
    -/*
    - *  test_iaf_1to2.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_1to2 - sli script for test of iaf_psc_alpha spike interaction
    -
    -Synopsis: (test_iaf_1to2) run -> compare response with reference data
    -
    -Description:
    -
    - test_iaf_1to2 checks the spike interaction of two iaf_psc_alpha model
    - neurons.
    -
    - In order to obtain identical results for different computation step
    - sizes h, the SLI script needs to be independent of h.  This is
    - achieved by specifying all time parameters in milliseconds (ms). In
    - particular the time of spike emission and the synaptic delay need to
    - be integer multiples of the computation step sizes to be
    - tested. test_iaf_dc_aligned_delay demonstrates the strategy for the
    - case of DC current input.
    -
    - A DC current in the pre-synaptic neuron is adjusted to cause a spike
    - at a grid position (t=3.0 ms) joined by all computation step sizes to
    - be tested.
    - 
    - Note that in a neuron model where synaptic events are modeled by a
    - truncated exponential the effect of the incoming spike would be
    - visible at the time of impact (here, t=4.0 ms). This is because the
    - initial condition for the postsynaptic potential (PSP) has a
    - non-zero voltage component. For PSPs with finite rise time the
    - situation is different. In this case the voltage component of the
    - initial condition is zero (see documentation of
    - test_iaf_psp). Therefore, at the time of impact the PSP is only
    - visible in other components of the state vector.
    -
    - The expected output is documented and briefly commented at the end of
    - the script.
    -
    -Author:  July 2004, Diesmann
    -SeeAlso: testsuite::test_iaf, testsuite::test_iaf_psp, testsuite::test_iaf_dc_aligned_delay
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/delay 1.0 def % connection delay to be used
    -/simtime 8.0 def % simulation time
    -
    -
    -/AlignedImpact
    -{
    -  << >> begin    
    - /d Set /h Set   
    -
    -  ResetKernel
    -
    -
    -
    -      << 
    -      /local_num_threads 1   
    -      /resolution h
    -      >> SetKernelStatus
    -
    -      /iaf_psc_alpha Create /neuron1 Set
    -      neuron1 << /I_e 1450.0 >> SetStatus
    -
    -      /iaf_psc_alpha Create /neuron2 Set
    -
    -      /voltmeter Create /vm Set
    -      vm << /time_in_steps true /interval h >> SetStatus
    -
    -      /spike_recorder Create /sr Set
    -      sr << /time_in_steps true >> SetStatus
    -
    -      neuron1 neuron2 100.0 delay Connect
    -
    -      vm neuron2 Connect
    -
    -      neuron1 sr Connect
    -      neuron2 sr Connect
    -
    -      simtime Simulate
    -
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -  {First test_times exch MemberQ } Select   % those with reference 
    -
    - d eq                                       % compare
    -
    -} def 
    -
    -
    -{
    - % h d,  vector of resolutions and compressed reference data   
    - InflateUnitTestData 
    -
    - Transpose {AlignedImpact} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -%
    -% h=   (in ms)
    -[ 0.1   0.2    0.5   1.0]
    -%
    -% time                    voltage
    -[
    -% ...
    -[ 25           5           -70]%         <-- Voltage trace of the postsynaptic neuron
    -[ 26    13                 -70]%              (neuron2), at rest until a spike arrives.
    -[ 27                       -70]
    -[ 28    14                 -70]
    -[ 29                       -70]
    -[ 30    15     6     3     -70]
    -% 1       30                   %         <-- The pre-synaptic neuron (neuron1) emits a 
    -[ 31                       -70]%             spike at t=3.0 ms.
    -[ 32    16                 -70]
    -[ 33                       -70]
    -[ 34    17                 -70]
    -[ 35           7           -70]%         <--  Synaptic delay of 1.0 ms.
    -[ 36    18                 -70]
    -[ 37                       -70]
    -[ 38    19                 -70]
    -[ 39                       -70]
    -[ 40    20     8    4      -70]% <-----------  Spike arrives at the postsynaptic neuron
    -[ 41                       -69.9974]%    <-    (neuron2) and changes the state vector of
    -[ 42    21                 -69.9899]%      |   the neuron, not visible in voltage because
    -[ 43                       -69.9781]%      |   voltage of PSP initial condition is 0.
    -[ 44    22                 -69.9624]%      |
    -[ 45           9           -69.9434]%       -  Arbitrarily close to the time of impact 
    -[ 46    23                 -69.9213]%          (t=4.0 ms) the effect of the spike (PSP) 
    -[ 47                       -69.8967]%          is visible in the voltage trace.
    -[ 48    24                 -69.8699]
    -[ 49                       -69.8411]
    -[ 50    25    10     5     -69.8108]
    -[ 51                       -69.779 ]
    -[ 52    26                 -69.7463]%    <---  The voltage trace is independent
    -[ 53                       -69.7126]%          of the computation step size h.
    -[ 54    27                 -69.6783]%          Larger step sizes only have fewer
    -[ 55          11           -69.6435]%          sample points.
    -[ 56    28                 -69.6084]
    -[ 57                       -69.5732]
    -% ...
    -]
    -%
    -
    -rolld assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_1to2_default_delay.sli b/testsuite/unittests/test_iaf_1to2_default_delay.sli
    deleted file mode 100644
    index 84d4ac1c6c..0000000000
    --- a/testsuite/unittests/test_iaf_1to2_default_delay.sli
    +++ /dev/null
    @@ -1,185 +0,0 @@
    -/*
    - *  test_iaf_1to2_default_delay.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_1to2 - sli script for test of iaf_psc_alpha spike interaction
    -
    -Synopsis: (test_iaf_1to2) run -> compare response with reference data
    -
    -Description:
    -
    - test_iaf_1to2 checks the spike interaction of two iaf_psc_alpha model
    - neurons.
    -
    - In order to obtain identical results for different computation step
    - sizes h, the SLI script needs to be independent of h.  This is
    - achieved by specifying all time parameters in milliseconds (ms). In
    - particular the time of spike emission and the synaptic delay need to
    - be integer multiples of the computation step sizes to be
    - tested. test_iaf_dc_aligned_delay demonstrates the strategy for the
    - case of DC current input.
    -
    - A DC current in the pre-synaptic neuron is adjusted to cause a spike
    - at a grid position (t=3.0 ms) joined by all computation step sizes to
    - be tested.
    - 
    - Note that in a neuron model where synaptic events are modeled by a
    - truncated exponential the effect of the incoming spike would be
    - visible at the time of impact (here, t=4.0 ms). This is because the
    - initial condition for the postsynaptic potential (PSP) has a
    - non-zero voltage component. For PSPs with finite rise time the
    - situation is different. In this case the voltage component of the
    - initial condition is zero (see documentation of
    - test_iaf_psp). Therefore, at the time of impact the PSP is only
    - visible in other components of the state vector.
    -
    - The expected output is documented and briefly commented at the end of
    - the script.
    -
    -Author:  July 2004, Diesmann
    -SeeAlso: testsuite::test_iaf, testsuite::test_iaf_psp, testsuite::test_iaf_dc_aligned_delay
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_INFO setverbosity
    -
    -/delay 1.0 def % connection delay to be used
    -/simtime 8.0 def % simulation time
    -
    -
    -/AlignedImpact
    -{
    -  << >> begin    
    - /d Set /h Set
    -
    -  ResetKernel
    -      << 
    -      /local_num_threads 1   
    -      /resolution h
    -      >> SetKernelStatus
    -
    -      /iaf_psc_alpha Create /neuron1 Set
    -      neuron1 << /I_e 1450.0 >> SetStatus
    -
    -      /iaf_psc_alpha Create /neuron2 Set
    -
    -      /voltmeter Create /vm Set
    -      vm << /time_in_steps true /interval h >> SetStatus
    -
    -      /spike_recorder Create /sr Set
    -      sr << /time_in_steps true >> SetStatus
    -
    -
    -% testing that  "/delay 1.0" is not needed here
    -%                                     | 
    -%                                     v  
    -      /static_synapse << /weight 100.0 >> SetDefaults
    -      neuron1 neuron2 Connect
    -
    -      vm neuron2 Connect
    -
    -      neuron1 sr Connect
    -      neuron2 sr Connect
    -
    -      simtime Simulate
    -
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -  {First test_times exch MemberQ } Select   % those with reference 
    -
    -  d 
    -  eq                                        % compare
    -
    -} def 
    -
    -
    -{
    - % h d,  vector of resolutions and compressed reference data   
    - InflateUnitTestData 
    -
    - Transpose {AlignedImpact} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -%
    -% h=   (in ms)
    -[ 0.1   0.2    0.5   1.0]
    -%
    -% time                    voltage
    -[
    -% ...
    -[ 25           5           -70]%         <-- Voltage trace of the postsynaptic neuron
    -[ 26    13                 -70]%              (neuron2), at rest until a spike arrives.
    -[ 27                       -70]
    -[ 28    14                 -70]
    -[ 29                       -70]
    -[ 30    15     6     3     -70]
    -% 1       30                   %         <-- The pre-synaptic neuron (neuron1) emits a 
    -[ 31                       -70]%             spike at t=3.0 ms.
    -[ 32    16                 -70]
    -[ 33                       -70]
    -[ 34    17                 -70]
    -[ 35           7           -70]%         <--  Synaptic delay of 1.0 ms.
    -[ 36    18                 -70]
    -[ 37                       -70]
    -[ 38    19                 -70]
    -[ 39                       -70]
    -[ 40    20     8    4      -70]% <-----------  Spike arrives at the postsynaptic neuron
    -[ 41                       -69.9974]%    <-    (neuron2) and changes the state vector of
    -[ 42    21                 -69.9899]%      |   the neuron, not visible in voltage because
    -[ 43                       -69.9781]%      |   voltage of PSP initial condition is 0.
    -[ 44    22                 -69.9624]%      |
    -[ 45           9           -69.9434]%       -  Arbitrarily close to the time of impact 
    -[ 46    23                 -69.9213]%          (t=4.0 ms) the effect of the spike (PSP) 
    -[ 47                       -69.8967]%          is visible in the voltage trace.
    -[ 48    24                 -69.8699]
    -[ 49                       -69.8411]
    -[ 50    25    10     5     -69.8108]
    -[ 51                       -69.779 ]
    -[ 52    26                 -69.7463]%    <---  The voltage trace is independent
    -[ 53                       -69.7126]%          of the computation step size h.
    -[ 54    27                 -69.6783]%          Larger step sizes only have fewer
    -[ 55          11           -69.6435]%          sample points.
    -[ 56    28                 -69.6084]
    -[ 57                       -69.5732]
    -% ...
    -]
    -%
    -
    -rolld assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_1to2_ex.sli b/testsuite/unittests/test_iaf_1to2_ex.sli
    deleted file mode 100644
    index 6c7ea80ac1..0000000000
    --- a/testsuite/unittests/test_iaf_1to2_ex.sli
    +++ /dev/null
    @@ -1,203 +0,0 @@
    -/*
    - *  test_iaf_1to2_ex.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_1to2_ex - sli script for test of min_delay
    -
    -Synopsis: (test_iaf_1to2_ex) run -> compare with reference data
    -
    -Description:
    -
    - test_iaf_1to2_ex checks the invariance of the spike interaction of 
    - two iaf_psc_alpha model neurons with respect to the min_delay of the
    - kernel.
    -
    - In order to obtain identical results for different computation step
    - sizes h, the SLI script needs to be independent of h.  This is
    - achieved by specifying all time parameters in milliseconds (ms). In
    - particular the time of spike emission and the synaptic delay need to
    - be integer multiples of the computation step sizes to be
    - tested. test_iaf_dc_aligned_delay demonstrates the strategy for the
    - case of DC current input.
    -
    - A DC current in the pre-synaptic neuron is adjusted to cause a spike
    - at a grid position (t=3.0 ms) joined by all computation step sizes to
    - be tested.
    - 
    - Note that in a neuron model where synaptic events are modeled by a
    - truncated exponential the effect of the incoming spike would be
    - visible at the time of impact (here, t=5.0 ms). This is because the
    - initial condition for the postsynaptic potential (PSP) has a
    - non-zero voltage component. For PSPs with finite rise time the
    - situation is different. In this case the voltage component of the
    - initial condition is zero (see documentation of
    - test_iaf_psp). Therefore, at the time of impact the PSP is only
    - visible in other components of the state vector.
    -
    - The expected output is documented and briefly commented at the end of
    - the script.
    -
    - The simulation is run with several values of min_delay, which all 
    - should yield identical results.
    -
    -Author: 
    -        January 2008, Diesmann
    -        January 2005, Plesser
    -        July 2004, Diesmann
    -
    -SeeAlso: testsuite::test_iaf, testsuite::test_iaf_psp, testsuite::test_iaf_dc_aligned_delay
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -0.1  /h Set       % time resolution
    -
    -2.0 /delay   Set  % actual delay between neurons
    -8.0 /simtime Set  % simulation time
    -
    -
    -
    -/RunMinDelay
    -{
    - << >> begin    
    - /d Set /min_delay Set   
    - 
    - min_delay delay leq assert  
    -
    - ResetKernel
    -
    -
    - 
    -  << 
    -    /local_num_threads 1   
    -    /resolution h
    -    /min_delay min_delay
    -    /max_delay delay
    -  >> SetKernelStatus
    -
    -  /iaf_psc_alpha Create /neuron1 Set
    -  /iaf_psc_alpha Create /neuron2 Set
    -
    -  neuron1 << /I_e 1450.0 >> SetStatus
    -
    -
    -  /voltmeter Create /vm Set
    -  vm << /time_in_steps true /interval h >> SetStatus
    -
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -
    -
    -  /static_synapse 
    -  << 
    -     /delay delay 
    -     /weight 100.0 
    -  >> SetDefaults
    -
    -  neuron1 neuron2 Connect
    -
    -  vm neuron2 Connect
    -
    -  neuron1 sr Connect
    -  neuron2 sr Connect
    -
    -  simtime Simulate
    -
    - d Transpose First /test_times Set           % times of reference
    -
    - vm [/events [/times /V_m]] get cva   % array of recorded voltages
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference 
    -
    - d eq                                        % compare data
    - GetKernelStatus /min_delay get min_delay eq   % compare kernel setting
    - and
    -
    -end
    -} def 
    -
    -
    -{
    - % m d,  vector of mind_delays and reference data   
    - 
    - {2 arraystore } exch prepend   % prepare function containing the test data
    - Map                            % supply each min_delay with a copy of the data
    -
    - Transpose {RunMinDelay} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. The voltmeter ist connected 
    -% to the postsynaptic neuron and the spike recorder to both neurons.
    -%
    -% 
    -% min_delay (in ms)
    -[0.1   0.5   2.0]
    -%
    -% time (steps)  voltage (mV)
    -[
    -% 0	-70
    -[ 1	-70]
    -[ 2	-70]
    -[ 3	-70]
    -[ 4	-70]
    -[ 5	-70]
    -% ...
    -[ 28	-70]
    -[ 29	-70]
    -[ 30	-70]
    -% 1 	30	% <--- neuron1 
    -[ 31	-70]
    -[ 32	-70]
    -[ 33	-70]
    -[ 34	-70]
    -[ 35	-70]
    -% ...
    -[ 48	-70]
    -[ 49	-70]
    -[ 50	-70]
    -[ 51	-69.9974]
    -[ 52	-69.9899]
    -[ 53	-69.9781]
    -[ 54	-69.9624]
    -[ 55	-69.9434]
    -[ 56	-69.9213]
    -[ 57	-69.8967]
    -[ 58	-69.8699]
    -[ 59	-69.8411]
    -[ 60	-69.8108]
    -%...
    -]
    -
    -rolld assert_or_die
    -
    -
    diff --git a/testsuite/unittests/test_iaf_dc.sli b/testsuite/unittests/test_iaf_dc.sli
    deleted file mode 100644
    index 7db35a8005..0000000000
    --- a/testsuite/unittests/test_iaf_dc.sli
    +++ /dev/null
    @@ -1,148 +0,0 @@
    -/*
    - *  test_iaf_dc.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_dc - sli script for test of iaf_psc_alpha with external DC current
    -
    -Synopsis: (test_iaf_dc) run -> compare cout with comments in file
    -
    -
    -Description:
    -
    - test_iaf_dc.sli is a test of a specific feature of the iaf_psc_alpha
    - model. It is tested at which time and how an external DC current affects 
    - the state of the neuron, the membrane potential in particular.
    -
    - This is probably the simplest setup demonstrating how an external
    - continuous function (the DC) can be incorporated into a system with
    - point event interaction. A general introduction, including examples
    - not restricted to piecewise constant functions, can be found in [1].
    -
    - The expected output is documented and briefly commented at the end of 
    - the script.
    -
    - Cleary, the result of this script is not resolution independent. The 
    - choice of the computation step size determines at which point in time 
    - the current affects the neuron. 
    -
    - There are 2 problems with this script:
    -  1. A network element (here the DC generator) can only change its state
    -     when it performs a computation (update) step t -> t + h.
    -     Thus, the earliest possible time the DC generator can be switched on
    -     is at t=h. This is the default. Therefore, the time of onset depends
    -     on the computation step size.
    -  2. The default delay between the DC generator and the neuron is the minimal
    -     allowed value of 1 h. Therefore, the delay of the current depends on
    -     the computation step size.
    -
    - A sequence of further test scripts (SeeAlso key below) demonstrates and 
    - verifies how the SLI script can be made independent of the computation 
    - step size. This leads to properly aligned and identical voltage traces 
    - for simulations carried out with different computation step sizes.
    -
    -
    -References:
    -  [1] Rotter S & Diesmann M (1999) Exact simulation of time-invariant linear
    -      systems with applications to neuronal modeling. Biologial Cybernetics
    -      81:381-402.
    -
    -Author:  February 2004, Diesmann, Gewaltig, Plesser
    -SeeAlso: iaf_psc_alpha, testsuite::test_iaf_dc_aligned, testsuite::test_iaf_dc_aligned_delay, testsuite::test_iaf_dc_aligned_stop
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution h
    -    >> SetKernelStatus
    -
    -/iaf_psc_alpha Create /neuron Set
    -
    -/dc_generator Create /dc_gen Set
    -dc_gen <<  /amplitude 1000. >> SetStatus
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -dc_gen neuron 1.0 h Connect
    -vm neuron Connect
    -neuron sr Connect
    -
    -2 Simulate
    -
    -
    -{
    - /d Set
    - 
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -  {First test_times exch MemberQ } Select   % those with reference 
    -
    - d eq                                       % compare
    -}
    -  
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -% time (in steps)  voltage (in mV)
    -%
    -[
    -% 0       -70 <--------------- Voltage trace of neuron, membrane potential
    -[ 1       -70] %   <--------   is at rest (initial condition).
    -[ 2       -70] % <-------   |
    -[ 3       -69.602]  %<-  |   - In the first update step 0ms  -> 0.1 ms, i.e. at 
    -[ 4       -69.2079] %  | |     the earliest possible time, the current generator 
    -[ 5       -68.8178] %  | |     is switched on and emits a current event with time 
    -[ 6       -68.4316] %  | |     stamp 0.1 ms.
    -[ 7       -68.0492] %  | |
    -[ 8       -67.6706] %  |  ---- After the minimal delay of 1 computation time step,
    -[ 9       -67.2958] %  |       the current affects the state of the neuron. This is
    -[ 10      -66.9247] %  |       reflected in the neuron's state variable y0 (initial
    -[ 11      -66.5572] %  |       condition) but has not yet affected the membrane
    -[ 12      -66.1935] %  |       potential.
    -[ 13      -65.8334] %  |
    -[ 14      -65.4768] %   ------ The effect of the DC current, influencing the neuron 
    -[ 15      -65.1238] %          for 0.1 ms now, becomes visible in the membrane potential.
    -[ 16      -64.7743]
    -% ...
    -%
    -]
    -
    -exch assert_or_die
    diff --git a/testsuite/unittests/test_iaf_dc_aligned.sli b/testsuite/unittests/test_iaf_dc_aligned.sli
    deleted file mode 100644
    index 0a7928fee4..0000000000
    --- a/testsuite/unittests/test_iaf_dc_aligned.sli
    +++ /dev/null
    @@ -1,226 +0,0 @@
    -/*
    - *  test_iaf_dc_aligned.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_dc_aligned - sli script for test of iaf_psc_alpha resolution independence
    -
    -Synopsis: (test_iaf_dc_aligned) run -> compare response with reference data
    -
    -
    -Description:
    -
    - test_iaf_dc_aligned.sli is a modified version of test_iaf_dc. Here,
    - we discuss and remove one of the problems of test_iaf_dc leading to
    - simulation results not independent of the computation step size
    - (resolution). The remaining flaw is corrected in the follow up script
    - test_iaf_dc_delay.sli .
    -
    - The expected output is documented and briefly commented at the end of
    - the script.
    -
    - The intention of this script is that the current starts to affect the
    - neuron (is present from) at time t=3ms. By default, the delay of the
    - connection between DC generator and neuron assumes the minimal value
    - of 1 computation step h.  Therefore, the time stamp of the emitted
    - current event needs to be 3ms - h. according to the definitions of
    - the timing scheme, the DC generator consequently needs to emit the
    - appropriate event in the step 3ms - 2h -> 3ms - h.
    -
    - The property /start of a device specifies in ms the earliest time at
    - which the device emits an event. This enables resolution independent
    - specification of the emission time because at any computation step
    - size h the device can be activated in the step start - h ->
    - start. The only requirement being that start - h is a time larger or
    - equal to the current time.  Otherwise the device cannot fulfill the
    - request. The additional property /origin enables a shift of the
    - device's time axis, see the documentation of devices for details. If
    - resolution independence is desired origin should be specified in ms,
    - often 0. is a useful value.  The above considerations result in the
    - following settings for the DC generator device: 
    -
    -    /origin 0.             % in ms
    -    /start arrival h sub   % in ms
    -
    - It should be pointed out that not specifying the delay of a
    - connection in the .sli script, like it is done here
    -
    -    dc_gen neuron Connect ;
    -
    - results in a simulation script that is not independent of the
    - computation step size. This is because at the time of creation of the
    - connection the minimal delay (1 computation step) is
    - assumed. Therefore we have to compensate for this dependency in the
    - start time of the DC generator as described above.  The alternative
    - approach would be to specify a delay between the DC generator and the
    - Neuron larger or equal to the largest computation time step to be
    - used. This approach is investigated in
    -
    -   test_iaf_dc_aligned.sli  
    -
    -
    -Remarks:
    -
    - In earlier versions /start was defined to specify the time step t at
    - which the device becomes activated, which is the transition t -> t+h.
    - On the basis of this definition, the correct code was:
    -
    -   /start  arrival 2 h mul sub     % in ms
    -
    - During the development of this script a conversion problem of device
    - start time expressed in ms was observed:
    -
    -  dc_gen << /start  1.8  >> SetStatus  
    -    dc_gen GetStatus /start get ==   --> 1.800000e+00
    -  dc_gen << /start  2.8  >> SetStatus  
    -    dc_gen GetStatus /start get ==   --> 2.799000e+00
    -
    - For the purpose of this script, the problem was temporarily fixed by
    - adding an epsilon 0.0001
    -
    -   /start arrival 2 h mul sub 0.0001 add  % in ms
    -
    - The problem was fixed by Gewaltig 3.3.2004 and the code of this test
    - script changed accordingly, Diesmann .
    -
    -
    -Author:  February 2004, Diesmann, Gewaltig, Plesser
    -SeeAlso: testsuite::test_iaf_dc, testsuite::test_iaf_dc_aligned_delay, testsuite::test_iaf_dc_aligned_automatic
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -
    -3.0 /arrival Set    % in ms, desired arrival time
    -
    -
    -/AlignedInjection  
    -{
    - << >> begin    
    - /d Set /h Set   
    -  
    - ResetKernel
    -
    -  << 
    -         /local_num_threads 1 
    -         /resolution h
    -       >> SetKernelStatus
    -
    -  /iaf_psc_alpha Create /neuron Set
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  
    -           /amplitude 1000.            % in pA
    -           /origin 0.                  % in ms
    -           /start  arrival h sub       % in ms
    -          >> SetStatus %   ^
    -                       %   |
    -                       %    -- SLI code explicitly depends on 
    -                       %       computation step size h.
    -
    -  /voltmeter Create /vm Set
    -  vm << /time_in_steps true /interval h >> SetStatus
    -
    -
    -  /spike_recorder Create /sr Set 
    -  sr << /time_in_steps true >> SetStatus
    -
    -
    -  dc_gen neuron 1.0 h Connect % code depends on computation step size
    -                              % because the default delay is 1 h.
    -
    -  vm neuron Connect
    -
    -  neuron sr Connect
    -
    -
    -  6 Simulate
    -
    -  
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -  {First test_times exch MemberQ } Select   % those with reference 
    -
    - d eq                                       % compare
    -
    - end
    -} def
    -
    -
    -
    -
    -{
    -
    - % h d,  vector of resolutions and compressed reference data   
    - InflateUnitTestData 
    -
    - Transpose {AlignedInjection} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -%
    -% h=   (in ms)
    -[0.1   0.2    0.5   1.0]
    -%
    -% time                    voltage
    -[
    -% ...
    -[ 25            5           -70]
    -[ 26     12                 -70]
    -[ 27                        -70]
    -[ 28     14                 -70]
    -[ 29                        -70]
    -[ 30     15     6     3     -70] %  <---- Current starts to affect
    -[ 31                        -69.602]  %   neuron (visible in state variable
    -[ 32     16                 -69.2079] %   y0). This is the desired onset of
    -[ 33                        -68.8178] %    t= 3.0 ms.
    -[ 34     17                 -68.4316]
    -[ 35            7           -68.0492]
    -[ 36     18                 -67.6706]
    -[ 37                        -67.2958]
    -[ 38     19                 -66.9247]
    -[ 39                        -66.5572]
    -[ 40     20     8     4     -66.1935]
    -[ 41                        -65.8334]
    -[ 42     21                 -65.4768]
    -% ...
    -]
    -%
    -
    -
    -rolld 
    -assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_dc_aligned_automatic.sli b/testsuite/unittests/test_iaf_dc_aligned_automatic.sli
    deleted file mode 100644
    index c88fb4642c..0000000000
    --- a/testsuite/unittests/test_iaf_dc_aligned_automatic.sli
    +++ /dev/null
    @@ -1,232 +0,0 @@
    -/*
    - *  test_iaf_dc_aligned_automatic.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_dc_aligned_automatic - sli script for test of iaf_psc_alpha resolution independence
    -
    -Synopsis: (test_iaf_dc_aligned_automatic) run -> compare response with reference data
    -
    -
    -Description:
    -
    -  test_iaf_dc_aligned_automatic.sli is a modified version of 
    -  test_iaf_dc_aligned_delay.sli .
    -
    -  The code of this program is now identical to
    -  test_iaf_dc_aligned_delay.sli. Previous versions used a different
    -  definition of start which was not independent of the resolution.
    -  Therefore, an additional device property /on was required.  See
    -  test_iaf_dc_aligned_automatic.sli for details.
    -
    -  The documentation below refers to the old definition of start
    -
    -  The output generated is exactly identical to the output of the 
    -  previous file. The dependence  of the simulation script on the 
    -  computation step size is completely removed by using the capability
    -  of the DC generator to adjust the required starting time to the 
    -  computation time step. This functionality is implemented in the Device
    -  base class and, thus, available to all devices.
    -
    -  Instead of specifying the start time of the generator as in 
    -  test_iaf_dc_aligned_delay.sli, the emission time of the first current
    -  event is specified. A device can only take action in a step t-h -> t.
    -  When t-h represents the start time of the device, t is the earliest time
    -  stamp of an emitted event. In our case the time stamp is the onset of the
    -  current. Thus, both times can not simultaneously be independent of the 
    -  computation time step h. It is sufficient to specify one of the two measures,
    -  the other one is computed automatically. Internally, only the start time 
    -  is stored. A warning is issued when both measures are specified because 
    -  a difference other than h would be meaningless and a difference of h may
    -  not be representable by the two double values. In case both properties are 
    -  specified, on  overrides start. The timer of the device does not rely on
    -  computing differences between doubles but uses the exact representation of 
    -  time provided by the simulation kernel.
    -
    -  An inspection of the property dictionary of the DC generator at different
    -  computation step sizes shows the relationship between DC generator 
    -  on and start.
    -
    -    h=0.1ms                   h=0.5ms  
    -    <<                        <<
    -       /start 1.9                /start 1.5
    -       /on 2.0                   /on 2.0
    -    >>                         >>
    -
    -  No output of the spike recorder is visible here because of the short simulation
    -  time of only 6 ms. Set the simulation time to larger values to verify the 
    -  consistency of voltage meter and spike recorder.
    -
    -  The expected output is documented at the end of the script.
    -
    -  July 2004,
    -   updated, Diesmann
    -
    -Author:  February 2004, Diesmann, Gewaltig, Plesser
    -SeeAlso: testsuite::test_iaf_dc, testsuite::test_iaf_dc_aligned, testsuite::test_iaf_dc_aligned_delay
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -
    -1.0 /max_h Set       % in ms, maximal computation time step
    -
    -1.0 /dc_delay Set    % in ms, delay of the connection from 
    -                     % DC generator to neuron
    -
    -3.0 /dc_visible Set  % in ms, desired onset of the DC current
    -                     % in the neuron
    -
    -dc_visible dc_delay sub /dc_on Set
    -                     % the onset time of the DC generator 
    -                     % required to make the current visible at
    -                     % the neuron at the desired time
    -
    -dc_delay /max_delay Set
    -                     % the maximal delay tolereated by the 
    -                     % simulation kernel (in ms) needs to be
    -                     % larger or equal to the maximal delay
    -                     % used in this script
    -
    -
    -
    -dc_delay max_h lt
    -{
    - cout (Delay between DC generator and neuron is too small) <-- endl
    -      (for the range of step sizes to be tested) <-- endl ;
    -} if
    -
    -dc_delay max_delay gt
    -{
    - cout (the maximal delay tolerated by the simulation kernel) <-- endl
    -      (is too small for the specified delays) <-- endl ;
    -} if
    -
    -
    -
    -
    -/AlignedInjection  
    -{
    - << >> begin    
    - /d Set /h Set   
    - 
    -  ResetKernel
    -
    -  << 
    -         /local_num_threads 1
    -         /resolution h
    -       >> SetKernelStatus
    -
    -
    -  /iaf_psc_alpha Create /neuron Set
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  
    -           /amplitude 1000.          % in pA
    -           /origin 0.                % in ms
    -           /start  dc_on             % in ms,   was /on dc_on
    -          >> SetStatus %  ^
    -                       %  |
    -                       %   -- SLI code does not depend on
    -                       %      computation step size h.
    -
    -  /voltmeter Create /vm Set
    -  vm << /time_in_steps true /interval h >> SetStatus
    -
    -  /spike_recorder Create /sr Set 
    -  sr << /time_in_steps true >> SetStatus
    -
    -  dc_gen neuron 1.0 dc_delay Connect
    -                     %  ^
    -  vm neuron Connect  %  | 
    -                     %   --- no dependence on the computation 
    -  neuron sr Connect  %       step size h
    -
    -  6 Simulate
    -
    -  
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -  {First test_times exch MemberQ } Select   % those with reference 
    -
    - d eq                                       % compare
    -
    - end
    -} def
    -
    -
    -
    -
    -{
    - % h d,  vector of resolutions and compressed reference data   
    - InflateUnitTestData 
    -
    - Transpose {AlignedInjection} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -%
    -% h=   (in ms)
    -[0.1   0.2    0.5   1.0]
    -%
    -% time                    voltage
    -[
    -% ...
    -[ 25            5           -70]
    -[ 26     12                 -70]
    -[ 27                        -70]
    -[ 28     14                 -70]
    -[ 29                        -70]
    -[ 30     15     6     3     -70] %  <---- Current starts to affect
    -[ 31                        -69.602]  %   neuron (visible in state variable
    -[ 32     16                 -69.2079] %   y0). This is the desired onset of
    -[ 33                        -68.8178] %    t= 3.0 ms.
    -[ 34     17                 -68.4316]
    -[ 35            7           -68.0492]
    -[ 36     18                 -67.6706]
    -[ 37                        -67.2958]
    -[ 38     19                 -66.9247]
    -[ 39                        -66.5572]
    -[ 40     20     8     4     -66.1935]
    -[ 41                        -65.8334]
    -[ 42     21                 -65.4768]
    -% ...
    -]
    -%
    -
    -
    -rolld assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_dc_aligned_delay.sli b/testsuite/unittests/test_iaf_dc_aligned_delay.sli
    deleted file mode 100644
    index ff5287be07..0000000000
    --- a/testsuite/unittests/test_iaf_dc_aligned_delay.sli
    +++ /dev/null
    @@ -1,221 +0,0 @@
    -/*
    - *  test_iaf_dc_aligned_delay.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_dc_aligned_delay - sli script for test of iaf_psc_alpha resolution independence
    -
    -Synopsis: (test_iaf_dc_aligned_delay) run -> compare response with reference data
    -
    -
    -Description:
    -
    - test_iaf_dc_aligned_delay.sli is a modified version of
    - test_iaf_dc_aligned. The output generated by the former is exactly
    - identical to the output of the latter. However, the  dependence of the
    - simulation script on the computation step size is fully removed by
    - replacing the default value of the delay between DC generator and
    - neuron by a value specified in ms and larger than the largest
    - computation step size to be used in the simulation. Note that the
    - specification of the delay is now independent of the computation step
    - size.
    -
    - In addition, variables are introduced to clarify the meaning of 
    - of various time measures and a few relationships are tested.
    -
    - The expected output is documented and briefly commented at the end of
    - the script.
    -
    - The intention of this script is that the current starts to affect the
    - neuron (is present from) at time t=3ms (dc_visible). With a delay of
    - 1ms (dc_delay), the time stamp of the emitted current event (dc_on)
    - needs to be dc_visible - dc_delay. Thus, according to the definitions
    - of the timing scheme, the emission time of the DC generator (start)
    - needs to be dc_visible - dc_delay.
    -
    -Remarks:
    -
    -  In earlier versions, the file
    -
    -     test_iaf_dc_aligned_automatic.sli
    -
    -  contained a further improved version of this script. Here, /start
    -  specified the activation time t of the device not the time stamp t+h
    -  of the first event that can be emitted. An additional property /on
    -  was required to make the SLI code independent of the resolution. The
    -  device carried out the transformation start = on - h (see also
    -  test_iaf_dc_aligned.sli).  Now the code in
    -  test_iaf_dc_aligned_automatic.sli is identical to the code in this
    -  file.
    -
    -
    -Author:  February 2004, Diesmann, Gewaltig, Plesser
    -SeeAlso: testsuite::test_iaf_dc, testsuite::test_iaf_dc_aligned, testsuite::test_iaf_dc_aligned_automatic
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -
    -1.0 /max_h Set       % in ms, maximal computation time step
    -
    -1.0 /dc_delay Set    % in ms, delay of the connection from 
    -                     % DC generator to neuron
    -
    -3.0 /dc_visible Set  % in ms, desired onset of the DC current
    -                     % in the neuron
    -
    -dc_visible dc_delay sub /dc_on Set
    -                     % the onset time of the DC generator 
    -                     % required to make the current visible at
    -                     % the neuron at the desired time
    -
    -dc_delay /max_delay Set
    -                     % the maximal delay tolereated by the 
    -                     % simulation kernel (in ms) needs to be
    -                     % larger or equal to the maximal delay
    -                     % used in this script
    -
    -
    -
    -dc_delay max_h lt
    -{
    - cout (Delay between DC generator and neuron is too small) <-- endl
    -      (for the range of step sizes to be tested) <-- endl ;
    -} if
    -
    -dc_delay max_delay gt
    -{
    - cout (the maximal delay tolerated by the simulation kernel) <-- endl
    -      (is too small for the specified delays) <-- endl ;
    -} if
    -
    -
    -
    -/AlignedInjection  
    -{
    - << >> begin    
    - /d Set /h Set   
    - 
    -  ResetKernel
    -
    -  << 
    -         /local_num_threads 1
    -         /resolution h
    -       >> SetKernelStatus
    -
    -
    -  /iaf_psc_alpha Create /neuron Set
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  
    -           /amplitude 1000.          % in pA
    -           /origin 0.                % in ms
    -           /start  dc_on             % in ms
    -          >> SetStatus %  ^
    -                       %  |
    -                       %   -- SLI code does not depend on
    -                       %      computation step size h.
    -
    -  /voltmeter Create /vm Set
    -  vm << /time_in_steps true /interval h >> SetStatus
    -
    -  /spike_recorder Create /sr Set 
    -  sr << /time_in_steps true >> SetStatus
    -
    -  dc_gen neuron 1.0 dc_delay Connect
    -                     %  ^
    -  vm neuron Connect  %  | 
    -                     %   --- no dependence on the computation 
    -  neuron sr Connect  %       step size h
    -
    -  6 Simulate
    -
    -  
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -  {First test_times exch MemberQ } Select   % those with reference 
    -
    - d eq                                       % compare
    -
    - end
    -} def
    -
    -
    -
    -
    -{
    - % h d,  vector of resolutions and compressed reference data   
    - InflateUnitTestData 
    -
    - Transpose {AlignedInjection} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -%
    -% h=   (in ms)
    -[0.1   0.2    0.5   1.0]
    -%
    -% time                    voltage
    -[
    -% ...
    -[ 25            5           -70]
    -[ 26     12                 -70]
    -[ 27                        -70]
    -[ 28     14                 -70]
    -[ 29                        -70]
    -[ 30     15     6     3     -70] %  <---- Current starts to affect
    -[ 31                        -69.602]  %   neuron (visible in state variable
    -[ 32     16                 -69.2079] %   y0). This is the desired onset of
    -[ 33                        -68.8178] %    t= 3.0 ms.
    -[ 34     17                 -68.4316]
    -[ 35            7           -68.0492]
    -[ 36     18                 -67.6706]
    -[ 37                        -67.2958]
    -[ 38     19                 -66.9247]
    -[ 39                        -66.5572]
    -[ 40     20     8     4     -66.1935]
    -[ 41                        -65.8334]
    -[ 42     21                 -65.4768]
    -% ...
    -]
    -%
    -
    -
    -rolld assert_or_die
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_iaf_dc_aligned_stop.sli b/testsuite/unittests/test_iaf_dc_aligned_stop.sli
    deleted file mode 100644
    index fc88e1ceef..0000000000
    --- a/testsuite/unittests/test_iaf_dc_aligned_stop.sli
    +++ /dev/null
    @@ -1,227 +0,0 @@
    -/*
    - *  test_iaf_dc_aligned_stop.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_dc_aligned_stop - sli script for test of iaf_psc_alpha resolution independence
    -
    -Synopsis: (test_iaf_dc_aligned_stop) run -> compare response with reference data
    -
    -
    -Description:
    -
    -  test_iaf_dc_aligned_stop.sli is an extended version of
    -  test_iaf_dc_aligned_delay.sli . In addition to the time when the
    -  current is switched on (/start) (test_iaf_dc_aligned_delay.sli) also
    -  a finite duration of the current is specified. This is done by
    -  supplying the DC generator device with the time stamp of the
    -  earliest DC event that should not be emitted.  Consequently, stop =
    -  start + duration.
    -
    -  In the step stop - h -> stop, no DC event is emitted anymore. A neuron
    -  connected to the DC generator interprets this as a DC current that is 
    -  switched off precisely at time stop. Therefore, the DC current specified
    -  by start and stop is independent of the resolution h. The minimal duration
    -  is h.  
    -
    -  See [1] for details on why the DC generator specification is
    -  consistent with a grid based integration scheme of systems of
    -  differential equations.  In this scheme DC currents are represeted
    -  by the differential equation d/dt I = 0.
    -
    -  The resulting SLI code is independent of the resolution and
    -  generates exactly the same voltage trace at all resolutions.
    -
    -  No output of the spike recorder is visible here because of the short
    -  stimulation period of 2 ms.
    -
    -  The expected output is documented at the end of the script.
    -
    -References:
    -  [1] Rotter S & Diesmann M (1999) Exact simulation of time-invariant linear
    -      systems with applications to neuronal modeling. Biologial Cybernetics
    -      81:381-402.
    -
    -Author:  July 2004, Diesmann
    -SeeAlso: testsuite::test_iaf_dc, testsuite::test_iaf_dc_aligned_delay
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -1.0 /max_h Set       % in ms, maximal computation time step
    -
    -1.0 /dc_delay Set    % in ms, delay of the connection from 
    -                     % DC generator to neuron
    -
    -3.0 /dc_visible Set  % in ms, desired onset of the DC current
    -                     % in the neuron
    -
    -2.0 /dc_duration Set % the duration of the stimulation
    -
    -dc_visible dc_delay sub /dc_on Set
    -                     % the onset time of the DC generator 
    -                     % required to make the current visible at
    -                     % the neuron at the desired time
    -
    -dc_on dc_duration add /dc_off Set
    -
    -
    -dc_delay /max_delay Set
    -                     % the maximal delay tolereated by the 
    -                     % simulation kernel (in ms) needs to be
    -                     % larger or equal to the maximal delay
    -                     % used in this script
    -
    -
    -
    -dc_delay max_h lt
    -{
    - cout (Delay between DC generator and neuron is too small) <-- endl
    -      (for the range of step sizes to be tested) <-- endl ;
    -} if
    -
    -dc_delay max_delay gt
    -{
    - cout (the maximal delay tolerated by the simulation kernel) <-- endl
    -      (is too small for the specified delays) <-- endl ;
    -} if
    -
    -
    -
    -
    -/AlignedInjection  
    -{
    - << >> begin    
    - /d Set /h Set   
    - 
    - ResetKernel
    -
    -
    -  << 
    -         /local_num_threads 1 
    -         /resolution h
    -       >> SetKernelStatus
    -
    -  /iaf_psc_alpha Create /neuron Set
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  
    -           /amplitude 1000.             % in pA
    -           /origin 0.                   % in ms
    -           /start  dc_on                % in ms
    -           /stop   dc_off               % in ms
    -          >> SetStatus
    -
    -  /voltmeter Create /vm Set
    -  vm << /time_in_steps true /interval h >> SetStatus
    -
    -  /spike_recorder Create /sr Set 
    -  sr << /time_in_steps true >> SetStatus
    -
    -  dc_gen neuron 1.0 dc_delay Connect
    -  vm neuron Connect
    -  neuron sr Connect
    -
    -  10 Simulate
    -
    -
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -
    -  {First test_times exch MemberQ } Select   % those with reference 
    -
    - d eq                                       % compare
    -
    - end
    -} def
    -
    -
    -{
    - % h d,  vector of resolutions and compressed reference data   
    - InflateUnitTestData 
    -
    - Transpose {AlignedInjection} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -%
    -% h=   (in ms)
    -[0.1   0.2    0.5   1.0]
    -%
    -% time                    voltage
    -% ...
    -[
    -[ 25            5           -70]
    -[ 26     12                 -70]
    -[ 27                        -70]
    -[ 28     14                 -70]
    -[ 29                        -70]
    -[ 30     15     6     3     -70]%         <-- current starts to affect
    -[ 31                        -69.602 ] %         neuron (visible in state variable
    -[ 32     16                 -69.2079] %       y0). This is the desired onset of
    -[ 33                        -68.8178] %       t= 3.0 ms.
    -[ 34     17                 -68.4316]
    -[ 35            7           -68.0492]
    -[ 36     18                 -67.6706]
    -[ 37                        -67.2958]
    -[ 38     19                 -66.9247]
    -[ 39                        -66.5572]
    -[ 40     20     8     4     -66.1935]
    -[ 41                        -65.8334]
    -[ 42     21                 -65.4768]
    -[ 43                        -65.1238]
    -[ 44     22                 -64.7743]
    -[ 45            9           -64.4283]
    -[ 46     23                 -64.0858]
    -[ 47                        -63.7466]
    -[ 48     24                 -63.4108]
    -[ 49                        -63.0784]
    -[ 50     25    10    5      -62.7492]%   <-- current ends to affect neuron
    -[ 51                        -62.8214]%       (visible in state variable y0),
    -[ 52     26                 -62.8928]%       the highest voltage is observed.
    -[ 53                        -62.9635]%       The current was applied for the desired
    -[ 54     27                 -63.0335]%       duration (2ms).
    -[ 55           11           -63.1029]
    -[ 56     28                 -63.1715]
    -[ 57                        -63.2394]
    -[ 58     29                 -63.3067]
    -[ 59                        -63.3733]
    -[ 60     30    12      6    -63.4392]
    -]
    -
    -
    -rolld assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_fudge.sli b/testsuite/unittests/test_iaf_fudge.sli
    deleted file mode 100644
    index 3baf2b3eaf..0000000000
    --- a/testsuite/unittests/test_iaf_fudge.sli
    +++ /dev/null
    @@ -1,100 +0,0 @@
    -/*
    - *  test_iaf_fudge.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_fudge - sli script to test normalization of PSP for iaf_psc_alpha model
    -
    -Synopsis: (test_iaf_fudge) run -> compares response to spike input step with reference data 
    -
    -Description:
    -    
    -The peak time of the postsynaptic potential (PSP) is calculated using
    -the LambertW function. The theoretical peak voltage amplitude for a
    -postsynaptic current of amplitude 1pA is then used to adjust the
    -synaptic weight such that a PSP of amplitude 1mV is generated.  The
    -success of this approach is verified by comparing the theoretical
    -value with the result of a simulation where a single spike is sent to
    -the neuron.
    -
    -The name of this test script has a historical explanation. Prior to
    -July 2009 the analytical expression for the peak time of the PSP was
    -not known to the NEST developers. Therefore the normalization factor
    -required to adjust the PSP amplitude was computed by root finding
    -outside of NEST. The factor was called "fudge" in examples and
    -application code. The root finding was not done in NEST because infix
    -mathematical notation only become available in SLI in January
    -2009. The name "fudge" indicated that the origin of this value was not
    -obvious from the simulation scripts and usage was inherently dangerous
    -because a change of the time constants of the neuron model would
    -invalidate the value of "fudge".
    -    
    -Author:  July 2009, Helias
    -SeeAlso: iaf_psc_alpha, testsuite::test_iaf, testsuite::test_lambertw, LambertWm1
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -20.0 /tau_m Set
    -0.5 /tau_syn Set
    -250.0 /C_m Set
    -
    -% calculate the normalization factor for the PSP
    -(tau_m / tau_syn) ExecMath /a Set
    -(1.0 / tau_syn - 1.0 / tau_m) ExecMath /b Set
    -% time of maximum
    -(1.0/b * (-LambertWm1(-exp(-1.0/a)/a)-1.0/a)) ExecMath /t_max Set
    -% maximum of PSP for current of unit amplitude
    -( exp(1)/(tau_syn*C_m*b) * ((exp(-t_max/tau_m) - exp(-t_max/tau_syn)) / b - t_max*exp(-t_max/tau_syn)) ) ExecMath /V_max Set
    -
    -cout (t_max=) <- t_max <- pop 
    -cout (V_max_unit=) <- V_max <- pop
    -
    -ResetKernel
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution h
    -  >> SetKernelStatus
    -
    -/iaf_psc_alpha Create /neuron Set
    -neuron << /tau_m tau_m /tau_syn_ex tau_syn /tau_syn_in tau_syn /C_m C_m >> SetStatus
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -/spike_generator Create /sg Set
    -sg << /precise_times false /spike_times [h] >> SetStatus
    -
    -sg neuron 1.0 V_max div h Connect
    -vm neuron 1.0 h Connect
    -
    -20.0 Simulate
    -
    -% position in voltage array to find maximum
    -t_max h div 2 add int /ti Set  % time in steps, where maximum of PSP is reached 
    -
    -% check, if maximum is at right position
    -vm [/events [/V_m]] get 0 get cva ==
    -vm [/events [/V_m]] get 0 get cva ti get -69.0 sub abs 1e-4 leq assert_or_die
    diff --git a/testsuite/unittests/test_iaf_i0.sli b/testsuite/unittests/test_iaf_i0.sli
    deleted file mode 100644
    index 714de62e07..0000000000
    --- a/testsuite/unittests/test_iaf_i0.sli
    +++ /dev/null
    @@ -1,136 +0,0 @@
    -/*
    - *  test_iaf_i0.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_i0 - sli script for test of iaf_psc_alpha internal DC current
    -
    -Synopsis: (test_iaf_i0) run -> compares response to internal dc with reference data
    -
    -
    -Description:
    -
    - test_iaf_i0.sli is a test of a specific feature of the iaf_psc_alpha
    - model. It is tested whether an internal DC current that is present
    - from the time of neuron initialization, correctly affects the membrane
    - potential.
    -
    - This is probably the simplest setup in which we can study how the 
    - dynamics develops from an initial condition.
    -
    - The expected output is documented and briefly commented at the end of 
    - the script.
    -
    - When the DC current is supplied by a device external to the neuron
    - the situation is more complex because additional delays are introduced.
    -  
    -
    -Author:  February 2004, Diesmann, Gewaltig, Plesser
    -SeeAlso: iaf_psc_alpha
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -       /local_num_threads 1  
    -       /resolution h  
    -     >> SetKernelStatus
    -
    -
    -
    -/iaf_psc_alpha Create /neuron Set
    -neuron << /I_e 1000.0 >> SetStatus
    -
    -% we must manually set the recording interval to single time step
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -
    -vm neuron Connect
    -neuron sr Connect
    -
    -6 Simulate
    -
    -{                                            % 1. argument, reference spikes
    - sr [/events [/senders /times]] get cva      % array of recorded spikes
    -  Transpose                                  % all recorded tuples
    - eq                                          % compare
    -
    - exch                                        % 2. argument, reference voltages
    - dup Transpose First /test_times Set         % times of reference
    -
    - vm [/events [/times /V_m]] get cva   % array of recorded voltages
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference 
    - eq                                          % compare
    -
    - and                                         % spikes and voltages ok?
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -%  0      -70          <------ Voltage trace. the membrane is at rest
    -[  1      -69.602  ] % <-      because the current has not yet had the 
    -[  2      -69.2079 ] %   |     chance to influence the membrane potential.
    -[  3      -68.8178 ] %   |     However, the current is reflected in state
    -[  4      -68.4316 ] %   |     variable I0 in this initial condition of the 
    -[  5      -68.0492 ] %   |     system.
    -%                    %   |
    -%  ...               %    ---  At the next observation point on the simulation
    -%                    %         grid, the current present from time 0 on has 
    -[ 43      -56.0204 ] %         affected the membrane potential.
    -[ 44      -55.7615 ] %
    -[ 45      -55.5051 ] %
    -[ 46      -55.2513 ] %
    -[ 47      -55.0001 ] %
    -[ 48      -70      ] %
    -[ 49      -70      ] %  
    -[ 50      -70      ] %
    -]                    %
    -%
    -% ...
    -%
    -
    -[                    %
    -[ 1       48       ] %       <-- the neuron emits a spike with time
    -]                    %           stamp 4.8 ms
    -
    -
    -rolld assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_i0_refractory.sli b/testsuite/unittests/test_iaf_i0_refractory.sli
    deleted file mode 100644
    index 9c1d2aa8ec..0000000000
    --- a/testsuite/unittests/test_iaf_i0_refractory.sli
    +++ /dev/null
    @@ -1,205 +0,0 @@
    -/*
    - *  test_iaf_i0_refractory.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_i0_refractory - sli script for test of iaf_psc_alpha internal DC current
    -
    -Synopsis: (test_iaf_i0_refractory) run -> compare cout with comments in file
    -
    -
    -Description:
    -
    - test_iaf_i0_refractory.sli is a test of a specific feature of the
    - iaf_psc_alpha model. It is tested whether the voltage traces of simulations
    - carried out at different resolutions (computation step sizes) are well
    - aligned and identical when the neuron recovers from refractoriness.
    -
    - In grid based simulation a prerequisite is that the spike is reported at
    - a grid position shared by all the resolutions compared.
    -
    - Here, we compare resolutions 0.1, 0.2, 0.5, and 1.0 ms. Therefore, the 
    - internal DC current is adjusted such (1450.0 pA) that the spike is 
    - reported at time 3.0 ms, corresponding to computation step 30, 15, 6, 
    - and 3, respectively.
    -
    - The results are consistent with those of iaf_psc_alpha_ps capable of
    - handling off-grid spike timing when the interpolation order is set to
    - 0.
    -
    - The expected output is documented and briefly commented at the end of 
    - the script.
    -
    - The file is an extended version of test_iaf_i0.sli .
    -
    -Author:  July 2004, Diesmann
    -SeeAlso: iaf_psc_alpha, testsuite::test_iaf_i0
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -% h d, arguments are resolution and voltage trace
    -/AlignedRecovery 
    -{
    - << >> begin    
    - /d Set /h Set   
    -
    -ResetKernel
    -
    -
    -<< 
    -       /local_num_threads 1   
    -       /resolution h
    -     >> SetKernelStatus
    -
    -
    -/iaf_psc_alpha Create /neuron Set
    -neuron << /I_e 1450.0 >> SetStatus  
    -
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -vm neuron 1.0 h Connect
    -neuron sr 1.0 h Connect
    -
    -7 Simulate
    -
    -                                            % 2. argument, reference voltages
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -  {First test_times exch MemberQ } Select   % those with reference 
    -
    - d eq                                       % compare
    -
    -
    - end
    -} def
    -
    -
    -{
    - % h d,  vector of resolutions and compressed reference data   
    - InflateUnitTestData 
    -
    - Transpose {AlignedRecovery} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -% h=   (in ms)
    -[ 0.1   0.2    0.5   1.0 ]
    -%
    -% time                    voltage
    -[
    -%  0     0     0     0   -70                <-- voltage trace. the membrane is at rest
    -[  1                     -69.4229] %              because the current has not yet had the
    -[  2     1               -68.8515] %              chance to influence the membrane
    -[  3                     -68.2858] %              potential (initial conditions).
    -[  4     2               -67.7258]
    -[  5           1         -67.1713]
    -[  6     3               -66.6223]
    -[  7                     -66.0788]
    -[  8     4               -65.5407]
    -[  9                     -65.008]
    -[ 10     5     2    1    -64.4806]
    -[ 11                     -63.9584]
    -[ 12     6               -63.4414]
    -[ 13                     -62.9295]
    -[ 14     7               -62.4228]
    -[ 15           3         -61.9211]
    -[ 16     8               -61.4243]
    -[ 17                     -60.9326]
    -[ 18     9               -60.4457]
    -[ 19                     -59.9636]
    -[ 20    10     4    2    -59.4864]
    -[ 21                     -59.0139]
    -[ 22    11               -58.5461]
    -[ 23                     -58.0829]
    -[ 24    12               -57.6244]
    -[ 25           5         -57.1704]
    -[ 26    13               -56.721]
    -[ 27                     -56.276]
    -[ 28    14               -55.8355]
    -[ 29                     -55.3993]
    -[ 30    15     6    3    -70] %       <- The membrane potential crossed threshold in the
    -% 1 30    15    6   3          <-        step 2.9 ms -> 3.0 ms. The membrane potential is 
    -[ 31                     -70] %  |       reset (no super-threshold values can be observed).     
    -[ 32    16               -70] %  |
    -[ 33                     -70] %   ------ The spike is reported at 3.0 ms
    -[ 34    17               -70]
    -[ 35           7         -70]
    -[ 36    18               -70]
    -[ 37                     -70]
    -[ 38    19               -70]
    -[ 39                     -70]
    -[ 40    20     8    4    -70]
    -[ 41                     -70]
    -[ 42    21               -70]
    -[ 43                     -70]
    -[ 44    22               -70]
    -[ 45           9         -70]
    -[ 46    23               -70]
    -[ 47                     -70]
    -[ 48    24               -70]
    -[ 49                     -70]
    -[ 50    25    10    5    -70     ] %   <- The last point in time at which the membrane potential
    -[ 51                     -69.4229] % <-   is clamped. The fact that the neuron is not refractory
    -[ 52    26               -68.8515] %   |  anymore is reflected in the state variable r==0.
    -[ 53                     -68.2858] %   |  The neuron was refractory for 2.0 ms.
    -[ 54    27               -67.7258] %   |
    -[ 55          11         -67.1713] %    -- The membrane potential starts to increase 
    -[ 56    28               -66.6223] %       immediately afterwards (step 5ms -> 5ms + h),  
    -[ 57                     -66.0788] %       and the neuron can generate spikes again  
    -[ 58    29               -65.5407] %       (with time stamp 5ms + h).  
    -[ 59                     -65.008 ] %       The membrane trace is independent of the resolution.
    -[ 60    30    12    6    -64.4806]
    -[ 61                     -63.9584]
    -[ 62    31               -63.4414]
    -[ 63                     -62.9295]
    -[ 64    32               -62.4228]
    -[ 65          13         -61.9211]
    -[ 66    33               -61.4243]
    -[ 67                     -60.9326]
    -[ 68    34               -60.4457]
    -[ 69                     -59.9636]
    -]
    -%
    -%
    -
    -rolld assert_or_die
    diff --git a/testsuite/unittests/test_iaf_min_delay_create.sli b/testsuite/unittests/test_iaf_min_delay_create.sli
    deleted file mode 100644
    index 4aca4ab12d..0000000000
    --- a/testsuite/unittests/test_iaf_min_delay_create.sli
    +++ /dev/null
    @@ -1,97 +0,0 @@
    -/*
    - *  test_iaf_min_delay_create.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_min_delay_create - sli script for testing automatic adjustment of min_delay
    -
    -Synopsis: (test_iaf_min_delay_create) run -> compares results for different min_delays
    -
    -
    -Description:
    -
    -  The simulation is run with a range of different min_delays. All
    -  should give identical results. This is achieved by sampling the
    -  membrane potential at a fixed interval.
    -
    -  The min_delay is specified by creating a corresponding
    -  connection.  The companion test test_iaf_min_delay_set sets 
    -  the value explicitly as a default value of the synapse type.
    -
    -  Other test scripts discuss the various aspects of this script in detail,
    -  see the SeeAlso key below. If this test fails go back to the simpler ones.
    -
    -Author:  July 2004, Diesmann, January 2005, Plesser, September 2010, Diesmann
    -SeeAlso: iaf_psc_alpha, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc, testsuite::test_min_delay, testsuite::test_min_delay
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/delay 2.0 def  % actual delay between dc generator and neuron
    -/h 0.1 def      % computation step size
    -
    -/RunMinDelay {
    -
    -  /min_del  Set      % argument: minimal delay in ms
    -  min_del delay leq assert  
    -
    -  ResetKernel
    -
    -  << /local_num_threads 1 /resolution h >> SetKernelStatus
    -
    -  /iaf_psc_alpha Create
    -  /iaf_psc_alpha Create
    -  1.0 min_del Connect
    -
    -  /iaf_psc_alpha Create /neuron Set
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  /amplitude 1000. >> SetStatus
    -
    -  /voltmeter Create /vm Set
    -
    -  % must connect with explicit delay to assure
    -  % consistency as min_delay varies      
    -  dc_gen neuron 1.0 delay Connect
    -
    -  vm neuron Connect
    -
    -  10.5 Simulate   % vm samples at 1ms intervals, therefore we 
    -                  % get 10 data points for each min_elay if we make
    -                  % sure that simulation time exceeds the last required 
    -                  % min_delay step
    -
    -  vm [/events [/times /V_m]] get cva Transpose 
    -
    -} def
    -
    -
    -{
    -[0.1 0.2 0.3 0.4 0.5 0.6 1.0 2.0] 
    - {RunMinDelay} Map 
    - dup
    - First exch Rest {1 index eq } Map 
    - exch pop
    - true exch {and} Fold 
    -}
    -assert_or_die
    \ No newline at end of file
    diff --git a/testsuite/unittests/test_iaf_min_delay_set.sli b/testsuite/unittests/test_iaf_min_delay_set.sli
    deleted file mode 100644
    index 46159d10d8..0000000000
    --- a/testsuite/unittests/test_iaf_min_delay_set.sli
    +++ /dev/null
    @@ -1,103 +0,0 @@
    -/*
    - *  test_iaf_min_delay_set.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_min_delay_set - sli script for testing explicit specification of min_delay
    -
    -Synopsis: (test_iaf_min_delay_set) run -> compares results for different min_delays
    -
    -
    -Description:
    -
    -  The simulation is run with a range of different min_delays. All
    -  should give identical results. This is achieved by sampling the
    -  membrane potential at a fixed interval.
    -
    -  The min_delay is specified by explicitly setting the corresponding
    -  default property of a synapse type. The companion test
    -  test_iaf_min_delay_create sets the value by creating a corresponding
    -  connection.
    -
    -  Other test scripts discuss the various aspects of this script in detail,
    -  see the SeeAlso key below. If this test fails go back to the simpler ones.
    -
    -Author:  July 2004, Diesmann, January 2005, Plesser, September 2010, Diesmann
    -SeeAlso: iaf_psc_alpha, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc, testsuite::test_min_delay, testsuite::test_min_delay
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/delay 2.0 def  % actual delay between dc generator and neuron
    -/h 0.1 def      % computation step size
    -
    -/RunMinDelay {
    -
    -  /min_del  Set      % argument: minimal delay in ms
    -  min_del delay leq assert  
    -
    -  ResetKernel
    -
    -  <<
    -    /local_num_threads 1
    -    /resolution h
    -    /min_delay min_del
    -    /max_delay delay
    -  >> SetKernelStatus
    -
    -  /static_synapse <<
    -    /delay delay  
    -  >> SetDefaults
    -
    -  /iaf_psc_alpha Create /neuron Set
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  /amplitude 1000. >> SetStatus
    -
    -  /voltmeter Create /vm Set
    -
    -  % must connect with explicit delay to assure
    -  % consistency as min_delay varies      
    -  dc_gen neuron 1.0 delay Connect
    -
    -  vm neuron Connect
    -
    -  10.5 Simulate   % vm samples at 1ms intervals, therefore we 
    -                  % get 10 data points for each min_elay if we make
    -                  % sure that simulation time exceeds the last required 
    -                  % min_delay step
    -
    -  vm [/events [/times /V_m]] get cva Transpose 
    -
    -} def
    -
    -
    -{
    -[0.1 0.2 0.3 0.4 0.5 0.6 1.0 2.0] 
    - {RunMinDelay} Map 
    - dup
    - First exch Rest {1 index eq } Map 
    - exch pop
    - true exch {and} Fold 
    -}
    -assert_or_die
    \ No newline at end of file
    diff --git a/testsuite/unittests/test_iaf_min_delay_simblocks.sli b/testsuite/unittests/test_iaf_min_delay_simblocks.sli
    deleted file mode 100644
    index 4c89029cdc..0000000000
    --- a/testsuite/unittests/test_iaf_min_delay_simblocks.sli
    +++ /dev/null
    @@ -1,109 +0,0 @@
    -/*
    - *  test_iaf_min_delay_simblocks.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_min_delay_simblocks - sli script for testing block wise simulation
    -
    -Synopsis: (test_iaf_min_delay_simblocks) run -> compares results for different min_delays
    -
    -
    -Description:
    -
    -  The simulation is run with a range of different min_delays. All
    -  should give identical results. This is achieved by sampling the
    -  membrane potential at a fixed interval.
    -
    -  The test is identical to test_iaf_min_delay_set except that the
    -  simulation is carried out by 20 subsequent calls of Simulate()
    -  instead of only a single one.
    -
    -  Other test scripts discuss the various aspects of this script in detail,
    -  see the SeeAlso key below. If this test fails go back to the simpler ones.
    -
    -Author:  July 2004, Diesmann, January 2005, Plesser, September 2010, Diesmann
    -SeeAlso: iaf_psc_alpha, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc, testsuite::test_min_delay, testsuite::test_min_delay
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/delay 2.0 def  % actual delay between dc generator and neuron
    -/h 0.1 def      % computation step size
    -
    -/RunMinDelay {
    -
    -  /min_del  Set      % argument: minimal delay in ms
    -  min_del delay leq assert  
    -
    -  ResetKernel
    -
    -  <<
    -    /local_num_threads 1
    -    /resolution h
    -    /min_delay min_del
    -    /max_delay delay
    -  >> SetKernelStatus
    -
    -  /static_synapse <<
    -    /delay delay
    -  >> SetDefaults
    -
    -%  /iaf_psc_alpha_ps Create /neuron Set
    -  /iaf_psc_alpha Create /neuron Set
    -
    -  /dc_generator Create /dc_gen Set
    -  dc_gen <<  /amplitude 1000. >> SetStatus
    -
    -  /voltmeter Create /vm Set
    -
    -  % must connect with explicit delay to assure
    -  % consistency as min_delay varies      
    -  dc_gen neuron 1.0 delay Connect
    -
    -  vm neuron Connect
    -
    -  1 1 21 {
    -  	;
    -  	0.5 Simulate
    -  } for
    -
    -                  % vm samples at 1ms intervals, therefore we 
    -                  % get 10 data points for each min_elay if we make
    -                  % sure that simulation time exceeds the last required 
    -                  % min_delay step
    -
    -  vm [/events [/times /V_m]] get cva Transpose 
    -
    -} def
    -
    -
    -{
    -[0.1 0.2 0.3 0.4 0.5 0.6 1.0 2.0] 
    - {RunMinDelay} Map 
    - dup
    - First exch Rest {1 index eq } Map 
    - exch pop
    - true exch {and} Fold 
    -}
    -assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_ps_dc_accuracy.sli b/testsuite/unittests/test_iaf_ps_dc_accuracy.sli
    deleted file mode 100644
    index 7e24bb6cd9..0000000000
    --- a/testsuite/unittests/test_iaf_ps_dc_accuracy.sli
    +++ /dev/null
    @@ -1,348 +0,0 @@
    -/*
    - *  test_iaf_ps_dc_accuracy.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_ps_dc_accuracy - test of accuracy of neuron models subject to DC current
    -
    -Synopsis: (test_iaf_ps_dc_accuracy) run -> comparison with analytical solution
    -
    -Description:
    -
    - A DC current is injected for a finite duration. The membrane potential at
    - the end of the simulated interval is compared to the theoretical value for
    - different computation step sizes.
    -
    - Computation step sizes are specified as base 2 values.
    -
    - Two different intervals are tested. At the end of the first interval the membrane
    - potential still steeply increases. At the end of the second, the membrane 
    - potential has within double precision already reached the limit for large t.
    -
    - The high accuracy of the neuron models is achieved by the use of Exact Integration [1]
    - and an appropriate arrangement of the terms [2]. For small computation step sizes the 
    - accuracy at large simulation time decreases because of the accumulation of errors.
    -
    - Reference output is documented at the end of the script.
    - 
    - Individual simulation results can be inspected by uncommented the call 
    - to function print_details.
    -
    -Remarks:
    -
    - The script checks whether the kernel can be appropriately configured.
    - The script can be used to check whether the accuracy has survived optimization
    - by the C++ compiler.
    -
    - In case the accuracy is higher than specified by IEEE arithmetics this might
    - be due to the use of processor registers. The compiler option   
    - -ffloat-store of the gcc compiler ensures that doubles are not stored in 
    - registers.
    -
    -FirstVersion: May 2005
    -Author: March 2009, Diesmann
    -References:
    - [1] Rotter S & Diesmann M (1999) Exact simulation of time-invariant linear
    -     systems with applications to neuronal modeling. Biologial Cybernetics
    -     81:381-402.
    - [2] Morrison A, Straube S, Plesser H E, & Diesmann M (2007) Exact Subthreshold 
    -     Integration with Continuous Spike Times in Discrete Time Neural Network 
    -     Simulations. Neural Computation 19:47--79
    -SeeAlso: iaf_psc_alpha_ps, iaf_psc_delta_ps,  testsuite::test_iaf_ps_dc_t_accuracy
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of simulation schedule.
    -%
    --14 /min_exponent Set
    -
    -[0 min_exponent -1] Range   /hlist Set
    -
    -[ % time [ms]   tolerated error [mV]
    -  [    5.0           1e-13 ]       
    -  [  500.0           1e-9  ]  % error larger because of accumulation
    -] /Tlist Set                  % at very small computation step sizes
    -
    -% Models to be tested by this test
    -[
    -  /iaf_psc_alpha_ps 
    -  /iaf_psc_delta_ps
    -  /iaf_psc_exp_ps
    -  /iaf_psc_exp_ps_lossless
    -  % other precise models should be added to this list
    -]
    - /models Set
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Check if kernel accepts high precision
    -%
    -<< 
    -  /tics_per_ms min_exponent neg dexp 
    -  /resolution 0 dexp                   % 1 ms default 
    ->> SetKernelStatus
    -
    -
    -GetKernelStatus /ms_per_tic get frexp
    -
    -exch
    -{0.5 eq} assert_or_die                  % base 2 tic size?
    -{1 sub min_exponent leq} assert_or_die  % sufficient resolution?
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of neuron model.
    -%
    -<<
    -  /E_L       0.0      % resting potential in mV 
    -  /V_m       0.0      % initial membrane potential in mV
    -  /V_th   2000.0      % spike threshold in mV
    -  /I_e    1000.0      % DC current in pA
    -  /tau_m    10.0      % membrane time constant in ms
    -  /C_m     250.0      % membrane capacity in pF
    ->> /params Set
    -
    -
    -params begin userdict begin
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -%  Simulation at given resolution returns membrane potential 
    -%  at end of simulation time and difference to exact value 
    -%  for both implementations.
    -%
    -/SimAtResolution
    -{
    -  dup /i Set
    -  dexp /h Set
    -
    -  ResetKernel          % resets tic base and computation time step
    -  << /tics_per_ms min_exponent neg dexp /resolution h >> SetKernelStatus
    -
    -  models {Create dup params SetStatus} Map /neurons Set
    -
    -  T Simulate
    -
    -  neurons 
    -  { [ exch /V_m get dup V sub abs] } Map Flatten
    -  i prepend
    -} def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% helper function for debugging, 
    -% prints detailed table of results
    -%
    -/print_details
    -{
    -  cout default 15 setprecision 
    -
    -  endl endl
    -  (Exact value of membrane potential after ) <-
    -  T <- ( ms is ) <- V <- ( mV.) <- endl endl
    -
    -  (             log_2 h) <-
    -  models
    -  {
    -    exch (  ) <- exch <- ( [mV]) <-
    -    (           error [mV]) <-
    -  } forall
    -  endl
    -
    -  models length 2 mul 1 add
    -  {
    -    (----------------------) <-
    -  } repeat
    -  endl
    -
    -  exch
    -  {
    -    { exch 20 setw exch <- (  ) <- } forall endl
    -  }
    -  forall 
    -  ;
    -}
    -def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Perform test for different simulation durations
    -%
    -{
    -  Tlist        
    -  {
    -    [/T /tolerance] Set
    -
    -    % Reference value
    -    (I_e * tau_m/C_m * (1. - exp(-T/tau_m)) ) ExecMath /V Set
    -
    -    % Simulate at different resolutions
    -    hlist {SimAtResolution} Map 
    -  
    -    dup print_details 
    -
    -    % select columns with voltage errors
    -    { Rest 2 Partition [/All 2] Part } Map
    -    
    -    % check against tolerance
    -    Flatten {tolerance lt} Map
    -  } 
    -  Map
    -
    -  % combine results
    -  Flatten true exch {and} Fold
    -}
    -assert_or_die
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% The output below was generated on a  Pentium 4M with  GSL-1.5, gcc-4.0.0 -O2.
    -% 
    -%
    -% Theory for the fixed point of the iteration (case T=500ms)
    -% ----------------------------------------------------------
    -%
    -% The difference between the theoretical value reached by the membrane potential
    -% at large t and the fixed point of the iteration is neither determined by
    -% the accuracy exponentials can be computed nor by the accumulation of round-off
    -% errors. The only relevant term is the smallest increment to the membrane potential
    -% that can be represented in the vicinity the fixed point. The increment in
    -% the iteration is the product of the distance from the limiting value and a term
    -% decreasing with decreasing h. Thus, for smaller h a larger error is 
    -% to be tolerated.
    -%  
    -%
    -% The iteration for the membrane potential is of the form
    -%
    -%      y_{i+1}  =  p * (y_i - y^*) + y_i
    -%
    -% where y^* is the theoretical fixed point
    -%
    -%           y^* = Tau/C * I0
    -%
    -% and p element in (-1,0] an h-dependent coefficient (i.e. p=expm1(-h/Tau) ).
    -% The iteration
    -%
    -%    for(int j=0; j<(500/ldexp(1,i)); j++)
    -%    {
    -%     y = p * (y - ystar) + y;
    -%    }
    -%
    -% exactly reproduces the values of the fourth column in the second table below.
    -%
    -% The fixed point y of the iteration is reached when p*(y-y^*) is so small
    -% that compared to y in double representation the sum of the two is 
    -% indistinguishable from y. 
    -% Let us assume that y is close to the theoretical value. The smallest 
    -% representable difference is then given by
    -%
    -%   s = 2^floor( log2(y^*) ) * eps
    -%
    -% where eps is the machine epsilon. In C++ this reads
    -%
    -%  x=std::frexp(ystar,&p); s=std::ldexp(1,p -1)*std::numeric_limits<double>::epsilon();
    -%
    -% The difference that can just not be represented is s/2.
    -% The condition for the fixed point of the iteration therefore is
    -%
    -%      s/2 = p * (y - y^*)
    -%
    -% solving for the difference dy between the fixed point and its 
    -% theoretical value we obtain
    -%
    -%      dy = s/2/p 
    -% or
    -%       y = y^* + s/2/p 
    -%
    -% The fixed points predicted by these considerations are:
    -%
    -%  h in ms              y^* + s/2/p 
    -% -------------------------------------------
    -%    0               40.0000000000000
    -%   -1               39.9999999999999
    -%   -2               39.9999999999999
    -%   -3               39.9999999999997
    -%   -4               39.9999999999994
    -%   -5               39.9999999999989
    -%   -6               39.9999999999977
    -%   -7               39.9999999999955
    -%   -8               39.9999999999909
    -%   -9               39.9999999999818
    -%  -10               39.9999999999636 
    -%  -11               39.9999999999272 
    -%  -12               39.9999999998545
    -%  -13               39.9999999997090  
    -%  -14               39.9999999994179  
    -%
    -%
    -%
    -% Exact value of membrane potential after 5 ms is 15.7387736114947 mV.
    -%
    -% h in ms            exp*y       [mV]        error         [mV]          expm1*y + y   [mV]    error         [mV]
    -% ---------------------------------------------------------------------------------------------------------------
    -%   0          15.7387736114947        7.105427357601e-15          15.7387736114947                         0
    -%  -1          15.7387736114947                         0          15.7387736114947      1.77635683940025e-15
    -%  -2          15.7387736114947       2.8421709430404e-14          15.7387736114947      1.77635683940025e-15
    -%  -3          15.7387736114947      1.24344978758018e-14          15.7387736114947                         0
    -%  -4          15.7387736114947      5.50670620214078e-14          15.7387736114947      5.32907051820075e-15
    -%  -5          15.7387736114947        7.105427357601e-15          15.7387736114947      1.77635683940025e-15
    -%  -6          15.7387736114948      1.35003119794419e-13          15.7387736114947       3.5527136788005e-15
    -%  -7          15.7387736114945      1.15463194561016e-13          15.7387736114946       1.4210854715202e-14
    -%  -8          15.7387736114961       1.4228618283596e-12          15.7387736114947       3.5527136788005e-15
    -%  -9          15.7387736114945      1.49213974509621e-13          15.7387736114947                         0
    -% -10           15.738773611496      1.30384592011978e-12          15.7387736114946       1.4210854715202e-14
    -% -11          15.7387736114969      2.22577511976851e-12          15.7387736114947      1.77635683940025e-15
    -% -12          15.7387736114679      2.67803557107982e-11          15.7387736114947      5.32907051820075e-15
    -% -13          15.7387736115287      3.40296679723906e-11          15.7387736114947      7.46069872548105e-14
    -% -14          15.7387736114987      4.08384437378118e-12          15.7387736114946      3.01980662698043e-14
    -%
    -%
    -% Exact value of membrane potential after 500 ms is 40 mV.
    -%
    -% h in ms            exp*y       [mV]        error         [mV]          expm1*y + y   [mV]    error         [mV]
    -% ---------------------------------------------------------------------------------------------------------------
    -%   0                        40       3.5527136788005e-14                        40       3.5527136788005e-14
    -%  -1          39.9999999999999        7.105427357601e-14          39.9999999999999        7.105427357601e-14
    -%  -2          39.9999999999999       1.4210854715202e-13          39.9999999999999      1.35003119794419e-13
    -%  -3          39.9999999999997       2.8421709430404e-13          39.9999999999997       2.8421709430404e-13
    -%  -4          39.9999999999994      5.61328761250479e-13          39.9999999999994      5.61328761250479e-13
    -%  -5          39.9999999999989      1.13686837721616e-12          39.9999999999989      1.13686837721616e-12
    -%  -6          39.9999999999977      2.26663132707472e-12          39.9999999999977      2.27373675443232e-12
    -%  -7          39.9999999999955      4.54036808150704e-12          39.9999999999955      4.54747350886464e-12
    -%  -8          39.9999999999909      9.09494701772928e-12          39.9999999999909      9.09494701772928e-12
    -%  -9          39.9999999999818      1.81898940354586e-11          39.9999999999818      1.81898940354586e-11
    -% -10          39.9999999999636      3.63939989256323e-11          39.9999999999636      3.63939989256323e-11
    -% -11          39.9999999999272      7.27879978512647e-11          39.9999999999272      7.27879978512647e-11
    -% -12          39.9999999998544      1.45590206557245e-10          39.9999999998544      1.45590206557245e-10
    -% -13          39.9999999997088      2.91180413114489e-10          39.9999999997088      2.91180413114489e-10
    -% -14          39.9999999994176      5.82360826228978e-10          39.9999999994176      5.82360826228978e-10
    diff --git a/testsuite/unittests/test_iaf_ps_dc_t_accuracy.sli b/testsuite/unittests/test_iaf_ps_dc_t_accuracy.sli
    deleted file mode 100644
    index 3cf88e8fb5..0000000000
    --- a/testsuite/unittests/test_iaf_ps_dc_t_accuracy.sli
    +++ /dev/null
    @@ -1,210 +0,0 @@
    -/*
    - *  test_iaf_ps_dc_t_accuracy.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_iaf_ps_dc_t_accuracy - test of temporal accuracy of precise integrate-and-fire neurons subject to DC current
    -
    -Synopsis: (test_iaf_ps_dc_t_accuracy) run ->  comparison with analytical solution
    -
    -Description:
    -
    -
    - A DC current is injected for a finite duration. The time of the first
    - spike is compared to the theoretical value for different computation
    - step sizes.
    -
    - Computation step sizes are specified as base 2 values.
    -
    - The high accuracy of the neuron models is achieved by the use of
    - Exact Integration [1] and an appropriate arrangement of the terms
    - [2]. For small computation step sizes the accuracy at large
    - simulation time decreases because of the accumulation of errors.
    -
    - The expected output is documented at the end of the script.
    - Individual simulation results can be inspected by uncommented the
    - call to function print_details.
    -
    -
    -Remarks:
    -
    - The script checks whether the simulator is appropriately configured.
    - The script can be used to check whether the accuracy has survived optimization.
    -
    - In case the accuracy is higher than specified by IEEE arithmetics this might
    - be due to the use of processor registers. The compiler option   
    - -ffloat-store of the gcc compiler ensures that doubles are not stored in 
    - registers.
    -
    -FirstVersion: May 2005
    -Author: March 2009, Diesmann
    -References:
    - [1] Rotter S & Diesmann M (1999) Exact simulation of time-invariant linear
    -     systems with applications to neuronal modeling. Biologial Cybernetics
    -     81:381-402.
    - [2] Morrison A, Straube S, Plesser H E, & Diesmann M (2007) Exact Subthreshold 
    -     Integration with Continuous Spike Times in Discrete Time Neural Network 
    -     Simulations. Neural Computation 19:47--79
    -SeeAlso: iaf_psc_alpha_ps, iaf_psc_delta_ps, testsuite::test_iaf_ps_dc_accuracy
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Test parameters
    -%
    -
    --14 /min_exponent Set
    -[0 min_exponent -1] Range /hlist Set
    -5.0 /T Set
    -1e-13 /tolerance Set  % tolerated error [mv]
    -
    -% models to be tested
    -[
    -  /iaf_psc_alpha_ps 
    -  /iaf_psc_delta_ps
    -  /iaf_psc_exp_ps
    -  /iaf_psc_exp_ps_lossless
    -  % other precise models should be tested as well
    - ] 
    - /models Set
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Check if configuration of simulation kernel is appropriate
    -%
    -<< 
    - /tics_per_ms min_exponent neg dexp 
    - /resolution 0 dexp                   % 1 ms default 
    ->> SetKernelStatus
    -
    -GetKernelStatus /ms_per_tic get frexp
    -
    -exch
    -{0.5 eq} assert_or_die                  % base 2 tic size?
    -{1 sub min_exponent leq} assert_or_die  % sufficient resolution?
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of neuron model.
    -%
    -
    -<<
    -  /E_L       0.0      % resting potential in mV 
    -  /V_m       0.0      % initial membrane potential in mV
    -  /V_th     15.0      % spike threshold in mV
    -  /I_e    1000.0      % DC current in pA
    -  /tau_m    10.0      % membrane time constant in ms
    -  /C_m     250.0      % membrane capacity in pF
    ->> /params Set
    -
    -params begin userdict begin
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -%  Simulation at given resolution returns membrane potential 
    -%  at end of simulation time and difference to exact value 
    -%  for both implementations.
    -%
    -/SimAtResolution
    -{
    -  dup /i Set
    -  dexp /h Set
    -
    -  ResetKernel
    -  << /tics_per_ms min_exponent neg dexp /resolution h >> SetKernelStatus
    -
    -  models {Create dup params SetStatus} Map /neurons Set
    -
    -  T Simulate
    -
    -  neurons
    -  { [ exch /t_spike get dup t sub abs ] } Map Flatten
    -  i prepend
    -} def
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% prints detailed table of results
    -%
    -/print_details
    -{
    -  cout default 15 setprecision 
    -
    -  endl endl
    -  (The precise spike time is ) <- t <- ( ms.) <- endl endl
    -
    -  (             log_2 h) <-
    -  models
    -  {
    -    exch (  ) <- exch <- ( [ms]) <-
    -    (           error [ms]) <-
    -  } forall
    -  endl
    -
    -  models length 2 mul 1 add
    -  {
    -    (----------------------) <-
    -  } repeat
    -  endl
    -
    -  exch
    -  {
    -    { exch 20 setw exch <- (  ) <- } forall endl
    -  }
    -  forall 
    -  ;
    -}
    -def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Perform test
    -%
    -{
    -  % Reference value
    -  (-tau_m*ln( 1.0 - (C_m*V_th)/(tau_m*I_e) )) ExecMath /t Set
    -
    -  % Perform simulations across resolutions
    -  hlist { SimAtResolution } Map 
    -
    -  dup print_details
    -
    -  % select columns with timing errors, highest resolution only
    -  { Rest 2 Partition [/All 2] Part } Map [-1] Part
    -  
    -  % test against tolerance limit                             
    -  Flatten { tolerance lt } Map
    -
    -  % combine results
    -  Flatten true exch {and} Fold
    -}
    -assert_or_die
    diff --git a/testsuite/unittests/test_iaf_ps_psp_accuracy.sli b/testsuite/unittests/test_iaf_ps_psp_accuracy.sli
    deleted file mode 100644
    index b8739f05e8..0000000000
    --- a/testsuite/unittests/test_iaf_ps_psp_accuracy.sli
    +++ /dev/null
    @@ -1,206 +0,0 @@
    -/*
    - *  test_iaf_ps_psp_accuracy.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_ps_psp_accuracy - test of precise integrate-and-fire neurons' accuracy of PSP
    -
    -Synopsis: (test_iaf_ps_psp_accuracy) run -> compare one voltage with analytics
    -
    -Description:
    -
    -code updated for NEST 2 but not yet this comment
    -
    - test_iaf_ps_psp_accuracy.sli checks the voltage response of the precise versions of the iaf_psc_alpha
    - model neurons to a single incoming spike. The voltage excursion is
    - called postsynaptic potential (PSP). In the model neurons
    - the postsynaptic current is described by an alpha-function 
    - (see [1] and references therein). The resulting PSP has a finite 
    - rise-time, with voltage and current beeing zero in the initial 
    - condition (see [1]).
    -
    - The dynamics is tested by connecting a device that emits spikes
    - at individually configurable times (see test_spike_generator) to 
    - a model neuron. 
    -
    - The weight of the connection specifies the peak value (amplitude)
    - of the postsynaptic current (PSC) in pA.
    -
    - The subthreshold dynamics of the model neurons is integrated exactly.
    - Therefore, it is suitable to check whether the simulation kernel 
    - produces results independent of the computation step size
    - (resolution).
    -
    - In order to obtain identical results for different computation
    - step sizes h, the SLI script needs to be independent of h.
    - This is achieved by specifying all time parameters in milliseconds
    - (ms). In particular the time of spike emission and the synaptic
    - delay need to be integer multiples of the computation step sizes 
    - to be tested. test_iaf_dc_aligned_delay demonstrates the strategy
    - for the case of DC current input.
    -
    -
    -References:
    -  [1] Rotter S & Diesmann M (1999) Exact simulation of time-invariant linear
    -      systems with applications to neuronal modeling. Biologial Cybernetics
    -      81:381-402.
    -
    -Author:  May 2005, February 2008, Diesmann
    -SeeAlso: testsuite::test_iaf_psp, testsuite::test_iaf_ps_dc_accuracy
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of simulation schedule.
    -%
    --14                         /min_exponent Set
    -2.0                         /emission Set % in ms
    -1.0                         /delay Set   % in ms 
    -500.0                       /weight Set  % in pA
    -[0 min_exponent -2] Range   /hlist Set
    -0                           /O Set
    -
    -6.0                         /T     Set
    -%20.0                         /T     Set
    -%3.5                         /T     Set
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of neuron model.
    -%
    -
    -
    -<<
    -  /E_L         0.0      % resting potential in mV 
    -  /V_m         0.0      % initial membrane potential in mV  
    -  /V_th        15.0      % spike threshold in mV
    -  /I_e         0.0      % DC current in pA
    -  /tau_m       10.0      % membrane time constant in ms
    -  /tau_syn_ex  0.3      % synaptic time constant in ms
    -  /tau_syn_in  0.3      % synaptic time constant in ms
    -  /C_m         250.0      % membrane capacity in pF
    ->> /P Set
    -
    -
    -
    -
    -/AlignedImpact
    -{
    - /model Set
    - dup /i Set
    - dexp /h Set        % argument: computation step size in ms  
    -
    -
    -ResetKernel
    -
    -<< /tics_per_ms min_exponent neg dexp /resolution h  >> SetKernelStatus
    -
    -
    -/spike_generator Create /sg Set
    -
    -sg <<
    -     /precise_times false
    -     /origin 0.0                 % in ms
    -     /spike_times [ emission ]   % in ms
    -     /start 0.0                  % in ms 
    -     /stop  5.0                  % in ms
    -   >> SetStatus
    -
    -model Create /neuron Set
    -neuron P SetStatus
    -
    -sg neuron weight delay Connect
    -
    -T Simulate
    -
    -neuron /V_m get /u Set
    -
    -V u sub abs /d Set
    -[u d]
    -
    -} def
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Reference value
    -%
    -% V is the exact value of the membrane potential at the end 
    -% of the simulation time T.       
    -%
    -P begin
    - << >> begin
    - T emission sub delay sub /t Set
    -
    - % traditional infix math notation: 
    - ( 
    -  weight * E/tau_syn_ex * 1/C_m 
    -    * ( (exp(-t/tau_m)-exp(-t/tau_syn_ex))/(1/tau_syn_ex - 1/tau_m)^2 - t*exp(-t/tau_syn_ex)/(1/tau_syn_ex - 1/tau_m) ) 
    - )
    - ExecMath 
    -
    -
    - % the same expression as SLI code for the stack engine:
    - %
    - % tau_syn inv tau_m inv sub /dti Set
    - % weight C_m inv mul
    - % E tau_syn div mul
    - % t neg tau_m div exp t neg tau_syn div exp sub
    - % dti dup mul div
    - % t t neg tau_syn div exp mul
    - % dti div
    - % sub mul
    -
    - end
    -end
    -/V Set
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Perform simulations at all resolutions and collect results
    -%
    -
    -hlist
    -{
    - /i Set
    - [ i ]
    - i /iaf_psc_alpha_ps AlignedImpact join
    -}
    -Map
    -/r Set
    -
    -r Transpose [3] Part Flatten {1e-12 leq} Map % comment to see individual results
    -
    -true exch {and} Fold % all accurate ?
    -
    -
    -assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_ps_psp_poisson_accuracy.sli b/testsuite/unittests/test_iaf_ps_psp_poisson_accuracy.sli
    deleted file mode 100644
    index e186d13d8c..0000000000
    --- a/testsuite/unittests/test_iaf_ps_psp_poisson_accuracy.sli
    +++ /dev/null
    @@ -1,299 +0,0 @@
    -/*
    - *  test_iaf_ps_psp_poisson_accuracy.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_ps_psp_poisson_accuracy - probes interaction of precise poisson generator and neuron model
    -
    -Synopsis: (test_iaf_ps_psp_poisson_accuracy) run -> compare with analytical result
    -
    -Description:
    -The test probes the interaction of a spike generator implementing a
    -poisson process in continuous time with a neuron model capable of
    -handling off-grid spike times. The result is verified by comparing the
    -superposition of postsynaptic potentials in the neuron model to the
    -the corresonding analytical solution. To achieve this, spike
    -generation of the neuron mode is prevented by setting the spike
    -threshold to a very high value. The test employs the parrot neuron for
    -precise spike times to provide the neuron model and the spike recorder
    -with an identical sequence of spike times. The independence of the
    -result from the computations step size is ensured by comparing the
    -results for a range of temporal resolutions. Due to this setup the
    -test requires that several critical timing relations between network
    -nodes of different types operate correctly. If the test fails go back
    -to simpler tests verifying individual node types.
    -
    -Author:  May 2005, February 2008, March 2009; Diesmann
    -References:
    - [1] Morrison A, Straube S, Plesser H E, & Diesmann M (2007) Exact Subthreshold 
    -     Integration with Continuous Spike Times in Discrete Time Neural Network 
    -     Simulations. Neural Computation 19:47--79
    -SeeAlso: testsuite::test_iaf_ps_psp_accuracy, testsuite::test_iaf_ps_dc_accuracy
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of simulation schedule.
    -%
    --10                         /min_exponent Set
    -1.0                         /delay Set          % in ms 
    -65.0                        /weight Set         % in pA
    -[-4 min_exponent -2] Range  /hlist Set
    -1e-12                       /tolerance Set      % in mV
    -
    -%100.0                         /T     Set
    -5.0                         /T     Set
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of neuron model.
    -%
    -
    -
    -<<
    -  /E_L         0.0      % resting potential in mV 
    -  /V_m         0.0      % initial membrane potential in mV  
    -  /V_reset     0.0
    -  /V_th     1000.0      % spike threshold in mV
    -  /I_e      -530.0      % DC current in pA
    -  /tau_m      10.0      % membrane time constant in ms
    -  /tau_syn_ex  0.3      % PSC rise time in ms
    -  /tau_syn_in  0.3      % PSC rise time in ms
    -  /C_m       250.0      % membrane capacity in pF
    ->> /params Set
    -
    -/rate 16.0 def               % in spikes/ms 
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Reference value
    -%
    -% The function /potential computes the exact value of the membrane
    -% potential at the end of the simulation for a given input spike train.       
    -%
    -
    -/psp 
    - [/t]
    - ( 
    -  UnitStep(t)*weight * E/tau_syn_ex * 1/C_m 
    -    * ( (exp(-t/tau_m)-exp(-t/tau_syn_ex))/(1/tau_syn_ex - 1/tau_m)^2 - t*exp(-t/tau_syn_ex)/(1/tau_syn_ex - 1/tau_m) ) 
    - )
    - Function
    -def
    -
    -
    -/dc
    - [/t]
    - ( I_e*tau_m/C_m*(1-exp(-t/tau_m)) )
    - Function 
    -def
    -
    -
    -/potential
    -{                  % argument is the input spike train
    - params begin
    -
    -  ( psp(T-t-delay) ) /t Function Map
    -
    -  Sort Total       % the present Total does not control accuracy 
    -
    -  T dc add 
    -
    - end
    -} def
    -
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Simulation for a given computation step size
    -%
    -/AlignedImpact
    -[/i /model]
    -{
    - i dexp /h Set        % computation step size in ms  
    -
    -
    - ResetKernel
    - << /tics_per_ms min_exponent neg dexp /resolution h  >> SetKernelStatus
    -
    - /poisson_generator_ps Create /pg Set
    - pg << /rate rate 1000.0 mul  >> SetStatus   % rate in Hz 
    -
    -
    - /parrot_neuron_ps Create /pn Set
    -
    - model Create /n Set
    - n params SetStatus
    -
    - /spike_recorder Create /sr Set
    -
    - pg pn  Connect
    - pn sr  Connect
    - pn n weight delay Connect 
    -
    - T Simulate
    -
    - sr [/events /times] get cva potential  /V Set % potential from closed form expression
    - n /V_m get                             /Y Set % potential from simulation
    -
    -
    - [i Y Y V sub abs]    % full results to enable detailed report
    -
    -
    -}
    -Function
    -def
    -
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Perform simulations at all resolutions and collect results
    -%
    -{
    - hlist
    - {
    -  /iaf_psc_alpha_ps AlignedImpact 
    - }
    - Map 
    -
    -%dup print_details   % uncomment for debugging
    - 
    - Transpose dup 
    -
    -  [2] Part dup Rest exch First sub       % check whether simulation results are 
    -  {tolerance lt} Map                     % identical for all resolutions
    -  true exch {and} Fold
    -  exch
    -
    -  [3] Part                               % check whether individual simulation results 
    -  {tolerance lt} Map                     % are identical to analytical solution
    -  true exch {and} Fold
    -
    - and
    -}
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% helper function for debugging, 
    -% prints detailed table of results
    -%
    -/print_details
    -{
    - cout default 15 setprecision 
    - endl endl endl
    -
    - (               h in ms    ) <-
    - (     simul. potential [mV]) <-
    - (                error [mV]) <-
    - endl
    - (--------------------------) <-
    - (--------------------------) <-
    - (--------------------------) <-
    - endl
    -
    - exch
    - {
    -  {
    -   exch 24 setw exch <- (  ) <-
    -  }
    -  forall
    -  endl
    - }
    - forall 
    - ;
    -}
    -def
    -
    -
    -
    -% executes the overall test
    -assert_or_die
    -
    -
    -
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% RPN expression for the reference value
    -%
    -% Below is the code used to compute the reference value before
    -% the compiler for infix mathematical notation became available.
    -%
    -% V is the exact value of the membrane potential at the end 
    -% of the simulation.       
    -%
    -
    -%params begin
    -%userdict begin
    -% << >> begin
    -%
    -% s
    -% {
    -%  T exch sub delay sub /t Set
    -%
    -%  t 0.0 geq 
    -%  {
    -%   TauSyn inv Tau inv sub /dti Set
    -%   weight C inv mul
    -%   E TauSyn div mul
    -%   t neg Tau div exp t neg TauSyn div exp sub
    -%   dti dup mul div
    -%   t t neg TauSyn div exp mul
    -%   dti div
    -%   sub mul
    -%  }
    -%  { 0.0 }
    -%  ifelse
    -% } Map
    -%
    -% Sort
    -% 0 exch {add} forall
    -%
    -% % I0 Tau/C (1 -e^-T/Tau)
    -% 
    -% I0 Tau C div mul 1.0 T neg Tau div exp sub mul
    -% add 
    -%
    -% end
    -%end
    -%end
    -%
    -%/V Set
    diff --git a/testsuite/unittests/test_iaf_ps_psp_poisson_generator_accuracy.sli b/testsuite/unittests/test_iaf_ps_psp_poisson_generator_accuracy.sli
    deleted file mode 100644
    index 492293417b..0000000000
    --- a/testsuite/unittests/test_iaf_ps_psp_poisson_generator_accuracy.sli
    +++ /dev/null
    @@ -1,351 +0,0 @@
    -/*
    - *  test_iaf_ps_psp_poisson_generator_accuracy.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_ps_psp_poisson_generator_accuracy - test precise poisson generator input to neuron model
    -
    -Synopsis: (test_iaf_ps_psp_poisson_generator_accuracy) run -> compare with analytical solution
    -
    -Description:
    -The tests generates a poisson spike train using the poisson generator
    -for precise spike times. In a second step this spike train is supplied
    -to a neuron model and the resulting subthreshold membrane potential
    -fluctuations are compared to the analytical solution.  Thus, in
    -contrast to the more advanced test_iaf_ps_psp_poisson_accuracy, this
    -test does not require the interaction of the generator and the neuron
    -model to work and does not require the availability of a parrot
    -neuron.  In contrast to test_iaf_ps_psp_poisson_accuracy the DC
    -required to maintain a subthreshold membrane potential is generated by
    -a dc generator not a property of the neuron model.  The
    -spike_generator used to supply the neuron model with spikes,
    -constraints spike times to the tic grid of the simulation kernel. This
    -is the temporal resolution in which the computation step size and
    -simulation times are expressed. Therefore, the results of simulations
    -at different computation step sizes only differ because of limited
    -machine precision.  The difference between the analytical result and
    -the simulation, however, is dictated by the number of tics per
    -millisecond.
    -
    -Author:  May 2005, March 2009 Diesmann
    -References:
    - [1] Morrison A, Straube S, Plesser H E, & Diesmann M (2007) Exact Subthreshold 
    -     Integration with Continuous Spike Times in Discrete Time Neural Network 
    -     Simulations. Neural Computation 19:47--79
    -SeeAlso: testsuite::test_iaf_ps_psp_accuracy, testsuite::test_iaf_ps_psp_poisson_accuracy,testsuite::test_iaf_ps_psp_poisson_spike_accuracy 
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of simulation schedule.
    -%
    --10                         /min_exponent Set
    -1.0                         /delay Set          % in ms 
    -65.0                        /weight Set         % in pA
    --530.0                      /I0  Set            % in pA 
    -[-4 min_exponent -2] Range  /hlist Set
    -1e-12                       /tolerance Set      % in mV
    -1e-4                        /tic_tolerance Set  % in mV
    -
    -100.0                         /T     Set
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Parameters of neuron model.
    -%
    -
    -
    -<<
    -  /E_L         0.0      % resting potential in mV 
    -  /V_m         0.0      % initial membrane potential in mV  
    -  /V_reset     0.0
    -  /V_th     1000.0      % spike threshold in mV
    -  /tau_m      10.0      % membrane time constant in ms
    -  /tau_syn_ex  0.3      % PSC rise time in ms
    -  /tau_syn_in  0.3      % PSC rise time in ms
    -  /C_m       250.0      % membrane capacity in pF
    ->> /params Set
    -
    -/rate 16.0 def               % in spikes/ms 
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Reference value
    -%
    -% The function /potential computes the exact value of the membrane
    -% potential at the end of the simulation for a given input spike train.       
    -%
    -
    -/psp 
    - [/t]
    - ( 
    -  UnitStep(t)*weight * E/tau_syn_ex * 1/C_m 
    -    * ( (exp(-t/tau_m)-exp(-t/tau_syn_ex))/(1/tau_syn_ex - 1/tau_m)^2 - t*exp(-t/tau_syn_ex)/(1/tau_syn_ex - 1/tau_m) ) 
    - )
    - Function
    -def
    -
    -
    -/dc
    - [/t]
    - ( I0*tau_m/C_m*(1-exp(-t/tau_m)) )
    - Function 
    -def
    -
    -
    -/potential
    -{                  % argument is the input spike train
    - params begin
    -
    -  ( psp(T-t-delay) ) /t Function Map
    -
    -  Sort Total       % the present Total does not control accuracy 
    -
    -  ( dc(T-2*delay) ) ExecMath add 
    -
    - end
    -} def
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Create the input spike train
    -%
    -
    -/CreateSpikeTrain
    -{
    - 0 dexp /h Set    % any computation time step is ok
    -
    - ResetKernel
    -
    -
    - << /tics_per_ms min_exponent neg dexp /resolution h >> SetKernelStatus
    -
    - /poisson_generator_ps Create /pg Set
    - pg << /rate  rate 1000.0 mul >> SetStatus      % in Hz 
    -
    -
    - /spike_recorder Create /sr Set
    -
    - pg sr Connect 
    -
    - T Simulate
    -
    - sr [/events /times] get cva   % return value is spike train in ms
    -} def 
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -%  Simulation for a given computation step size
    -%
    -/AlignedImpact
    -[/i /model /s]
    -{
    - i dexp /h Set        % computation step size in ms  
    -
    - ResetKernel
    - << /tics_per_ms min_exponent neg dexp /resolution h  >> SetKernelStatus
    -
    - /dc_generator Create /dc Set
    - dc <<    
    -       /start  1.0      % in ms 
    -       /amplitude I0    % in pA 
    -    >> SetStatus               
    -
    - /spike_generator Create /sg Set
    - sg <<
    -      /start 0.0          % in ms 
    -      /spike_times s      % in ms
    -      /precise_times true % interpret times as precise points
    -    >> SetStatus
    -
    - model Create /n Set
    - n params SetStatus
    -
    -
    - sg n weight delay Connect
    - dc n              Connect
    -
    -
    - T Simulate
    -
    - n /V_m get     % potential in mV at end of simulation
    -} 
    -Function
    -def
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Perform simulations at all resolutions and collect results
    -%
    -
    -CreateSpikeTrain /s Set
    -s potential      /V Set  % potential from closed form expression
    -
    -[/iaf_psc_alpha_ps] /models Set 
    -
    -
    -{
    -hlist
    -{
    - /i Set
    - [ 
    -  i 
    -  models 
    -  {
    -   i exch s AlignedImpact dup V sub abs 
    -  } forall
    - ]
    -
    -}
    -Map
    -
    -%dup print_details   % uncomment for debugging
    - 
    -Transpose 
    -Rest 2 Partition 
    -dup 
    -
    - [/All 1] Part Flatten 
    - dup Rest exch First sub       % check whether simulation results are 
    - {tolerance lt} Map                     % identical for all resolutions
    -  true exch {and} Fold
    -  exch
    -
    - [/All 2] Part Flatten                            % check whether individual simulation results 
    - {tic_tolerance lt} Map                     % are identical to analytical solution
    - true exch {and} Fold
    -
    - and
    -}
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% print results
    -%
    -/print_details
    -{
    -cout default 15 setprecision 
    -
    -endl
    -endl
    -(Exact value of membrane potential after ) <-
    -T <- ( ms is ) <-
    -V <- ( mV.) <- endl 
    -
    -endl
    -
    -(               h in ms    ) <-
    -(     simul. potential [mV]) <-
    -(        error         [mV]) <-
    -(     simul. potential [mV]) <-
    -(        error         [mV]) <- 
    -endl
    -(--------------------------) <-
    -(--------------------------) <-
    -(--------------------------) <-
    -(--------------------------) <-
    -(--------------------------) <-
    -endl
    -
    -r
    -{
    - {
    -  exch 24 setw exch <- (  ) <-
    - }
    - forall
    - endl
    -}
    -forall 
    -;
    -} 
    -def
    -
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% RPN expression for the reference value
    -%
    -% Below is the code used to compute the reference value before
    -% the compiler for infix mathematical notation became available.
    -%
    -% V is the exact value of the membrane potential at the end 
    -% of the simulation.       
    -%
    -
    -%params begin
    -%userdict begin
    -% << >> begin
    -%
    -% s
    -% {
    -%  T exch sub delay sub /t Set
    -%
    -%  t 0.0 geq 
    -%  {
    -%   TauSyn inv Tau inv sub /dti Set
    -%   weight C inv mul
    -%   E TauSyn div mul
    -%   t neg Tau div exp t neg TauSyn div exp sub
    -%   dti dup mul div
    -%   t t neg TauSyn div exp mul
    -%   dti div
    -%   sub mul
    -%  }
    -%  { 0.0 }
    -%  ifelse
    -% } Map
    -%
    -% Sort
    -% 0 exch {add} forall
    -%
    -% % I0 Tau/C (1 -e^-T/Tau)
    -% 
    -% I0 Tau C div mul 1.0 T 2.0 sub neg Tau div exp sub mul
    -% add 
    -%
    -% end
    -%end
    -%end
    -%
    -%/V Set
    -
    -
    -assert_or_die
    diff --git a/testsuite/unittests/test_iaf_psc_alpha_multisynapse.sli b/testsuite/unittests/test_iaf_psc_alpha_multisynapse.sli
    deleted file mode 100644
    index 1a447949b8..0000000000
    --- a/testsuite/unittests/test_iaf_psc_alpha_multisynapse.sli
    +++ /dev/null
    @@ -1,233 +0,0 @@
    -/*
    - *  test_iaf_psc_alpha_multisynapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_iaf_psc_alpha_multisynapse - sli script for the multisynapse model
    -
    -   Synopsis: (test_iaf_psc_alpha_multisynapse) run
    -
    -   Description:
    -   This test creates a multisynapse neuron and first checks if time constants
    -   can be set correctly. Afterwards, it simulates with four different time constants
    -   and records the neuron's synaptic current. The expected PSC-maxima are
    -   calculated and compared with the simulated I_syn.
    -  
    -
    -   SeeAlso: testsuite::test_iaf_psc_exp_multisynapse, iaf_psc_alpha_multisynapse
    -
    -   FirstVersion: March 2009
    -   Author: Sven Schrader
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -/tolerance  1e-2 def %mV
    -/n_syn 4 def
    -/taus       [2. 20. 60. 100.] def
    -/delays     [100. 200. 500. 1200. ] def % ms
    -/spike_time 100. def
    -/dt         0.1 def
    -
    -/iaf_psc_alpha_multisynapse Create /npost Set
    -npost << /tau_syn taus >> SetStatus
    -
    -npost /tau_syn get
    -taus eq assert_or_die
    -
    -/multimeter Create /mm Set
    -mm <<
    -    /record_from [/I_syn]
    -    /interval 0.1 >> SetStatus
    -    
    -/spike_generator Create /sg Set
    -sg << /spike_times [spike_time] >> SetStatus
    -
    -[ delays [ 4 ] Range ]
    -{
    -  /receptor Set
    -  /delay Set
    -  sg npost /one_to_one << /weight 1.0 /delay delay /receptor_type receptor >> Connect
    -} ScanThread
    -
    -mm npost 1. 8. /static_synapse Connect
    -
    -2500 ms Simulate
    -
    -/d mm /events get def
    -d /I_syn get cva /I_syn Set
    -
    -% find indices where I_syn should be maximal (weight==1.0)
    -/expected_maxima [delays taus] { add dt div spike_time dt div add 1 add cvi } MapThread def 
    -
    -% compare I_syn at above positions with the given unit weight. 
    -expected_maxima { I_syn exch get 1.0 sub abs tolerance lt } Map
    -n_syn { true } repeat n_syn arraystore eq assert_or_die
    -
    -% --------------------------------------------
    -
    -% The following tests address #800
    -% - Test that the default recordables are V_m, w and I_syn_1
    -% - Test that the recordable I_syn's change when changing the number of receptor ports
    -
    -% test default recordables include I_syn_1
    -{
    -  << >> begin
    -  ResetKernel
    -  
    -  /nrn /iaf_psc_alpha_multisynapse Create def
    -  
    -  /mm /multimeter << /time_in_steps true
    -                     /interval 1.0
    -		     /record_from [ /V_m /I_syn /I_syn_1 ]
    -		  >> Create def
    -  
    -  mm nrn Connect
    -  
    -  /len nrn /recordables get length def
    -  len 3 eq
    -  end
    -}
    -assert_or_die
    -
    -% test resize recordables
    -{
    -  << >> begin
    -  ResetKernel
    -  
    -  /tau_syn1  [5.0  1.0  25.0] def
    -  /tau_syn2  [5.0  1.0] def
    -  /tau_syn3  [5.0  1.0  25.0 50.] def
    -  
    -  /nrn /iaf_psc_alpha_multisynapse << /tau_syn tau_syn1 >> Create def
    -  /len1 nrn /recordables get length def
    -  
    -  nrn << /tau_syn tau_syn2 >> SetStatus
    -  /len2 nrn /recordables get length def
    -  
    -  nrn << /tau_syn tau_syn3 >> SetStatus
    -  /len3 nrn /recordables get length def
    -  
    -  len1 5 eq len2 4 eq and len3 6 eq and
    -  end
    -}
    -assert_or_die
    -
    -% test record I_syn_i and check for alpha function synapse
    -{
    -  << >> begin
    -  ResetKernel
    -  /tau_syn     [40.0 20.0  30.0 25.] def % synaptic time constants
    -  /weights     [1.0  0.5   2.0  1.0] def % synaptic weights
    -  /delays      [1.0  3.0   10.0 10.] def % ms - synaptic delays
    -  /spike_time  10.  def    % time at which the single spike occurs
    -  /dt          0.1  def    % time step
    -  /total_t     500. def    % total simulation time
    -  /tolerance   1e-7 def    % tolerable difference between theoretic and simulated alpha synapse conductances
    -
    -  /alpha_function
    -  {
    -    % Call like t0 W tau t alpha_function
    -    << /tau 1.0 /W 1.0 /t0 0. >>
    -    begin
    -      /t exch def
    -      /tau exch def
    -      /W exch def
    -      /t0 exch def
    -      
    -      t
    -      {
    -        /tt exch def
    -        tt t0 geq
    -        {
    -          /tdiff_over_tau tt t0 sub tau div def
    -          tdiff_over_tau neg exp E tdiff_over_tau W mul mul mul
    -        }
    -        % else
    -        {
    -          0.
    -        } ifelse
    -      } Map
    -    end
    -  } def
    -
    -  << /resolution dt >> SetKernelStatus
    -
    -  % Create a spike generator that generates a single spike
    -  /spike_generator Create /sg Set
    -  sg << /spike_times [spike_time] >> SetStatus % generates a single peak
    -
    -
    -  % Create the multisynapse neuron
    -  /nrn /iaf_psc_alpha_multisynapse 
    -    <<  /I_e 0. /tau_syn tau_syn  >> Create def
    -
    -  % Create an array of synaptic indexes to loop through 
    -  delays length 1 arraystore Range /synapses_idx exch def
    -  [delays weights synapses_idx] % loop on synaptic receptor ports
    -  {
    -    /syn_id exch def
    -    /W exch def
    -    /delay exch def
    -    % Connect spike generator to each port
    -    sg nrn /one_to_one <<
    -      /synapse_model /static_synapse
    -      /delay delay
    -      /weight W
    -      /receptor_type syn_id >>
    -      Connect
    -  } ScanThread
    -
    -  % Create the multimeter that will record from the 4 synapse channels
    -  /mm /multimeter << /time_in_steps true
    -                     /interval dt
    -		     /record_from [ /I_syn_1 /I_syn_2 /I_syn_3 /I_syn_4 ]
    -                  >> Create def
    -
    -  mm nrn Connect
    -
    -  % Simulate
    -  total_t Simulate
    -
    -  % Get the conductances measured during the simulation
    -  /t       mm /events get /times get cva dt mul def
    -  /sim_I_syn_1 mm /events get /I_syn_1   get cva def
    -  /sim_I_syn_2 mm /events get /I_syn_2   get cva def
    -  /sim_I_syn_3 mm /events get /I_syn_3   get cva def
    -  /sim_I_syn_4 mm /events get /I_syn_4   get cva def
    -  /sim_I_syns [sim_I_syn_1 sim_I_syn_2 sim_I_syn_3 sim_I_syn_4] def
    -
    -  true
    -  [delays weights tau_syn sim_I_syns]
    -  {
    -    /sim_I_syn  exch def
    -    /tau        exch def
    -    /W          exch def
    -    /t0         exch spike_time add def
    -    /theo_I_syn t0 W tau t alpha_function def
    -    sim_I_syn theo_I_syn sub { abs } Map Max tolerance leq and
    -  } ScanThread
    -  end
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_iaf_psc_exp.sli b/testsuite/unittests/test_iaf_psc_exp.sli
    deleted file mode 100644
    index c220aa0e83..0000000000
    --- a/testsuite/unittests/test_iaf_psc_exp.sli
    +++ /dev/null
    @@ -1,178 +0,0 @@
    -/*
    - *  test_iaf_psc_exp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_iaf_psc_exp - sli script for overall test of iaf_psc_exp model
    -
    -    Synopsis: (test_iaf_psc_exp) run -> compares response to current step with reference data 
    -
    -    Description:
    -    test_iaf_psc_exp.sli is an overall test of the iaf_psc_exp model connected
    -    to some useful devices.
    -
    -    A DC current is injected into the neuron using a current generator 
    -    device. The membrane potential as well as the spiking activity are 
    -    recorded by corresponding devices.
    -
    -    It can be observed how the current charges the membrane, a spike
    -    is emitted, the neuron becomes absolute refractory, and finally
    -    starts to recover.
    -
    -    The timing of the various events on the simulation grid is of 
    -    particular interest and crucial for the consistency of the 
    -    simulation scheme.
    -
    -    Although 0.1 cannot be represented in the IEEE double data type, it
    -    is safe to simulate with a resolution (computation step size) of 0.1
    -    ms because by default nest is built with a timebase enabling exact
    -    representation of 0.1 ms.
    -
    -    The expected output is documented and briefly commented at the end of 
    -    the script.
    -
    -    Other test programs discuss the various aspects of this script in detail,
    -    see the SeeAlso key below.    
    -
    -    Author:  July 2004, Diesmann
    -	     March 2006, Moritz Helias
    -    SeeAlso: iaf_psc_exp, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution h
    -  >> SetKernelStatus
    -
    -/iaf_psc_exp Create /neuron Set
    -
    -/dc_generator Create /dc_gen Set
    -dc_gen << /amplitude 1000. >> SetStatus
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -
    -dc_gen neuron 1.0 h Connect
    -vm neuron     1.0 h Connect
    -neuron sr     1.0 h Connect
    -
    -8 Simulate
    -
    -
    -
    -{                                             % reference data
    - dup Transpose First /test_times Set         % times of reference 
    -                               
    - vm [/events [/times /V_m]] get cva   % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    - 
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -[ 1       -70      ] %<----- The earliest time dc_gen can be switched on.
    -[ 2       -70      ] %<----- The DC current arrives at the neuron, it is
    -[ 3       -69.602  ] %<-     reflected in the neuron's state variable y0,
    -[ 4       -69.2079 ] %  |    (initial condition) but has not yet affected
    -[ 5       -68.8178 ] %  |    the membrane potential.
    -[ 6       -68.4316 ] %  |
    -[ 7       -68.0492 ] %   --- the effect of the DC current is visible in the
    -[ 8       -67.6706 ] %       membrane potential
    -[ 9       -67.2958 ] %
    -[ 10      -66.9247 ] %
    -%
    -% ...
    -%
    -[ 45      -56.0204 ] %
    -[ 46      -55.7615 ] %
    -[ 47      -55.5051 ] %
    -[ 48      -55.2513 ] %
    -[ 49      -55.0001 ] %
    -[ 50      -70      ] % <---- The membrane potential crossed threshold in the
    -[ 51      -70      ] %       step 4.9 ms -> 5.0 ms. The membrane potential is 
    -[ 52      -70      ] %       reset (no super-threshold values can be observed).
    -[ 53      -70      ] %       The spike is reported at 5.0 ms
    -[ 54      -70      ] %
    -[ 55      -70      ] %
    -[ 56      -70      ] %
    -[ 57      -70      ] %
    -[ 58      -70      ] %
    -[ 59      -70      ] %
    -[ 60      -70      ] %
    -[ 61      -70      ] %
    -[ 62      -70      ] %
    -[ 63      -70      ] %
    -[ 64      -70      ] %
    -[ 65      -70      ] %
    -[ 66      -70      ] %
    -[ 67      -70      ] %
    -[ 68      -70      ] %
    -[ 69      -70      ] %
    -[ 70      -70      ] % <---- The last point in time at which the membrane potential
    -[ 71      -69.602  ] % <-    is clamped. The fact that the neuron is not refractory
    -[ 72      -69.2079 ] %   |   anymore is reflected in the state variable r==0.
    -[ 73      -68.8178 ] %   |   The neuron was refractory for 2.0 ms.
    -[ 74      -68.4316 ] %   |
    -[ 75      -68.0492 ] %   --- The membrane potential starts to increase 
    -[ 76      -67.6706 ] %       immediately afterwards and the neuron can generate 
    -[ 77      -67.2958 ] %       spikes again (at this resolution reported with time
    -[ 78      -66.9247 ] %       stamp 7.1 ms on the grid)
    -[ 79      -66.5572 ] % <--
    -]                    %    |
    -%                         |
    -%                          - The simulation was run for 8.0 ms. However, in the step
    -%                            7.9 ms -> 8.0 ms the voltmeter necessarily receives the
    -%                            voltages that occurred at time 7.9 ms (delay h). This 
    -%                            results in different end times of the recorded voltage 
    -%                            traces at different resolutions. In the current 
    -%                            simulation kernel there is no general cure for this 
    -%                            problem. One workaround is to end the simulation script
    -%                            with "h Simulate", thereby making the script resolution
    -%                            dependent.
    -%
    -
    -
    -exch assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_psc_exp_multisynapse.sli b/testsuite/unittests/test_iaf_psc_exp_multisynapse.sli
    deleted file mode 100644
    index 58732e3688..0000000000
    --- a/testsuite/unittests/test_iaf_psc_exp_multisynapse.sli
    +++ /dev/null
    @@ -1,296 +0,0 @@
    -/*
    - *  test_iaf_psc_exp_multisynapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_iaf_psc_exp_multisynapse - sli script for the multisynapse model
    -
    -   Synopsis: (test_iaf_psc_exp_multisynapse) run
    -
    -   Description:
    -   This test creates a multisynapse neuron and first checks if time constants
    -   can be set correctly.
    -   Afterwards a neuron with four synaptic time constants with different weights and delays
    -   is simulated and the resulting membrane potential values after the income of one spike
    -   are checked against analytically obtained values.
    -  
    -   SeeAlso: testsuite::test_iaf_psc_alpha_multisynapse, iaf_psc_exp_multisynapse
    -
    -   FirstVersion: April 2013
    -   Author: Hannah Bos
    - */
    -
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<<
    -      /local_num_threads 1
    -      /resolution h
    -  >> SetKernelStatus
    -
    -/taus       [2. 20. 60. 100.] def
    -/delays     [7. 5. 2. 1. ] def % ms
    -/weights    [30. 50. 20. 10.] def
    -/spike_time 0.1 def
    -/dt         0.1 def
    -
    -/iaf_psc_exp_multisynapse Create /npost Set
    -npost << /tau_syn taus >> SetStatus
    -
    -npost 0 get GetStatus /tau_syn get
    -taus eq assert_or_die
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -   
    -/spike_generator Create /sg Set
    -sg << /spike_times [spike_time] >> SetStatus
    -
    -[ weights delays [ 4 ] Range ]
    -{
    -  /receptor Set
    -  /delay Set
    -  /weight Set
    -  sg npost /one_to_one pstack << /weight weight /delay delay /receptor_type receptor >> Connect
    -} ScanThread
    -
    -
    -vm npost 1.0 h Connect
    -
    -8 ms Simulate
    -
    -
    -{                                            % reference data
    - dup Transpose First /test_times Set         % times of reference
    -
    - vm [/events [/times /V_m]] get cva   % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Expected output of this program:
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -[ 1       -70      ] % <----- Spike time
    -[ 2       -70      ]
    -[ 3       -70      ]
    -[ 4       -70      ]
    -[ 5       -70      ]
    -[ 6       -70      ]
    -[ 7       -70      ]
    -[ 8       -70      ]
    -[ 9       -70      ]
    -[ 10      -70      ]
    -[ 11      -70      ] % <----- The spike arrives at the first synapse but has not yet effected the snynaptic current and membrane potential.
    -[ 12      -69.9960 ] % <-
    -[ 13      -69.9921 ] %   |
    -[ 14      -69.9882 ] %   |
    -[ 15      -69.9843 ] %    --- the effect of the synaptic current is visible in the membrane potential
    -%
    -% ...
    -%
    -[ 20      -69.9657 ] %<----- The spike arrives at the second synapse but has not yet effected the snynaptic current and membrane potential.
    -[ 21      -69.9621 ] %<-
    -[ 22      -69.9506 ] %  |
    -[ 23      -69.9392 ] %  |
    -[ 24      -69.928  ] %   --- the effect of the two synaptic currents is visible in the membrane potential
    -[ 25      -69.9169 ] %
    -%
    -% ...
    -%
    -[ 50      -69.6771 ] %<----- The spike arrives at the third synapse but has not yet effected the snynaptic current and membrane potential.
    -[ 51      -69.6689 ] %<-
    -[ 52      -69.641  ] %  |
    -[ 53      -69.6134 ] %  |
    -[ 54      -69.5863 ] %   --- the effect of the three synaptic currents is visible in the membrane potential
    -[ 55      -69.5595 ] %
    -%
    -% ...
    -%
    -[ 70      -69.2011 ] %<----- The spike arrives at the fourth synapse but has not yet effected the snynaptic current and membrane potential.
    -[ 71      -69.18   ] %<-
    -[ 72      -69.1474 ] %  |
    -[ 73      -69.1159 ] %  |
    -[ 74      -69.0854 ] %   --- the effect of the four synaptic currents is visible in the membrane potential
    -[ 75      -69.0557 ] %
    -]
    -%
    -%
    -
    -exch assert_or_die
    -
    -% --------------------------------------------
    -
    -% The following tests address #800
    -% - Test that the default recordables are V_m, w and I_syn_1
    -% - Test that the recordable I_syn's change when changing the number of receptor ports
    -
    -% test default recordables include I_syn_1
    -{
    -  << >> begin
    -  ResetKernel
    -
    -  /nrn /iaf_psc_exp_multisynapse Create def
    -  
    -  /mm /multimeter << /time_in_steps true
    -                     /interval 1.0
    -		     /record_from [ /V_m /I_syn /I_syn_1 ]
    -		  >> Create def
    -  
    -  mm nrn Connect
    -
    -  /len nrn /recordables get length def
    -  len 3 eq
    -  end
    -}
    -assert_or_die
    -
    -% test resize recordables
    -{
    -  << >> begin
    -  ResetKernel
    -
    -  /tau_syn1  [5.0  1.0  25.0] def
    -  /tau_syn2  [5.0  1.0] def
    -  /tau_syn3  [5.0  1.0  25.0 50.] def
    -
    -  /nrn /iaf_psc_exp_multisynapse << /tau_syn tau_syn1 >> Create def
    -  /len1 nrn /recordables get length def
    -
    -  nrn << /tau_syn tau_syn2 >> SetStatus
    -  /len2 nrn /recordables get length def
    -
    -  nrn << /tau_syn tau_syn3 >> SetStatus
    -  /len3 nrn /recordables get length def
    -
    -  len1 5 eq len2 4 eq and len3 6 eq and
    -  end
    -}
    -assert_or_die
    -
    -% test record I_syn_i and check for exp function synapse
    -{
    -  << >> begin
    -  ResetKernel
    -  /tau_syn     [40.0 20.0  30.0 25.] def % synaptic time constants
    -  /weight     [1.0  0.5   2.0  1.0] def % synaptic weights
    -  /delays      [1.0  3.0   10.0 10.] def % ms - synaptic delays
    -  /spike_time  10.  def    % time at which the single spike occurs
    -  /dt          0.1  def    % time step
    -  /total_t     500. def    % total simulation time
    -  /tolerance   1e-7 def    % tolerable difference between theoretic and simulated alpha synapse currents
    -
    -  /exp_function
    -  {
    -    % Call like t0 W tau t alpha_function
    -    << /tau 1.0 /W 1.0 /t0 0. >>
    -    begin
    -      /t exch def
    -      /tau exch def
    -      /W exch def
    -      /t0 exch def
    -
    -      t
    -      {
    -        /tt exch def
    -        tt t0 geq
    -        {
    -          /tdiff_over_tau tt t0 sub tau div def
    -          tdiff_over_tau neg exp W mul
    -        }
    -        % else
    -        {
    -          0.
    -        } ifelse
    -      } Map
    -    end
    -  } def
    -
    -  << /resolution dt >> SetKernelStatus
    -
    -  % Create a spike generator that generates a single spike
    -  /spike_generator Create /sg Set
    -  sg << /spike_times [spike_time] >> SetStatus % generates a single peak
    -
    -  % Create the multisynapse neuron
    -  /nrn /iaf_psc_exp_multisynapse
    -    <<  /I_e 0. /tau_syn tau_syn  >> Create def
    -
    -  % Create an array of synaptic indexes to loop through
    -  delays length 1 arraystore Range /synapses_idx exch def
    -  [delays weights synapses_idx] % loop on synaptic receptor ports
    -  {
    -    /syn_id exch def
    -    /W exch def
    -    /delay exch def
    -    % Connect spike generator to each port
    -    sg nrn /one_to_one <<
    -      /synapse_model /static_synapse
    -      /delay delay
    -      /weight W
    -      /receptor_type syn_id >>
    -      Connect
    -  } ScanThread
    -
    -  % Create the multimeter that will record from the 4 synapse channels
    -  /mm /multimeter << /time_in_steps true
    -                     /interval dt
    -		     /record_from [ /I_syn_1 /I_syn_2 /I_syn_3 /I_syn_4 ]
    -                  >> Create def
    -
    -  mm nrn Connect
    -
    -  % Simulate
    -  total_t Simulate
    -
    -  % Get the conductances measured during the simulation
    -  /t       mm /events get /times get cva dt mul def
    -  /sim_I_syn_1 mm /events get /I_syn_1   get cva def
    -  /sim_I_syn_2 mm /events get /I_syn_2   get cva def
    -  /sim_I_syn_3 mm /events get /I_syn_3   get cva def
    -  /sim_I_syn_4 mm /events get /I_syn_4   get cva def
    -  /sim_I_syns [sim_I_syn_1 sim_I_syn_2 sim_I_syn_3 sim_I_syn_4] def
    -
    -  true
    -  [delays weights tau_syn sim_I_syns]
    -  {
    -    /sim_I_syn  exch def
    -    /tau        exch def
    -    /W          exch def
    -    /t0         exch spike_time add def
    -    /theo_I_syn t0 W tau t exp_function def
    -    sim_I_syn theo_I_syn sub { abs } Map Max tolerance leq and
    -  } ScanThread
    -  end
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_iaf_psc_exp_ps.sli b/testsuite/unittests/test_iaf_psc_exp_ps.sli
    deleted file mode 100644
    index 14479a98de..0000000000
    --- a/testsuite/unittests/test_iaf_psc_exp_ps.sli
    +++ /dev/null
    @@ -1,172 +0,0 @@
    -/*
    - *  test_iaf_psc_exp_ps.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_iaf_psc_exp_ps - sli script for overall test of iaf_psc_exp_ps model
    -
    -    Synopsis: (test_iaf_psc_exp_ps) run -> compares response to current step with reference data 
    -
    -    Description:
    -    test_iaf_psc_exp_ps.sli is an overall test of the iaf_psc_exp_ps model connected
    -    to some useful devices.
    -
    -    A DC current is injected into the neuron using a current generator 
    -    device. The membrane potential as well as the spiking activity are 
    -    recorded by corresponding devices.
    -
    -    It can be observed how the current charges the membrane, a spike
    -    is emitted, the neuron becomes absolute refractory, and finally
    -    starts to recover.
    -
    -    The timing of the various events on the simulation grid is of 
    -    particular interest and crucial for the consistency of the 
    -    simulation scheme.
    -
    -    Although 0.1 cannot be represented in the IEEE double data type, it
    -    is safe to simulate with a resolution (computation step size) of 0.1
    -    ms because by default nest is built with a timebase enabling exact
    -    representation of 0.1 ms.
    -
    -    The expected output is documented and briefly commented at the end of 
    -    the script.
    -
    -    Other test programs discuss the various aspects of this script in detail,
    -    see the SeeAlso key below.    
    -
    -    Author:  Jeyashree Krishnan, 2017
    -    SeeAlso: iaf_psc_exp, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc, testsuite::test_iaf_psc_exp_ps_lossless
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -  /local_num_threads 1 
    -  /resolution h
    ->> SetKernelStatus
    -
    -/iaf_psc_exp_ps Create /neuron Set
    -
    -/dc_generator Create /dc_gen Set
    -dc_gen << /amplitude 1000. >> SetStatus
    -
    -/voltmeter << /time_in_steps true /interval h >> Create /vm Set
    -
    -/spike_recorder Create /sp_det Set
    -
    -
    -dc_gen neuron 1.0 h Connect
    -vm neuron     1.0 h Connect
    -neuron sp_det 1.0 h Connect
    -
    -8 Simulate
    -
    -sp_det /events get /times get First stack    % prints spike time
    -
    -{                                             % reference data
    - dup Transpose First /test_times Set         % times of reference 
    -                               
    - vm [/events [/times /V_m]] get cva   % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose           dup ==                       % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    - 
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Expected output of this program:
    -%
    -% The output send to std::cout is a superposition of the output of
    -% the voltmeter and the spike recorder. Both, voltmeter and spike
    -% recorder are connected to the same neuron.
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -[ 1       -70      ] %<----- The earliest time dc_gen can be switched on.
    -[ 2       -70      ] %<----- The DC current arrives at the neuron, it is
    -[ 3       -69.602  ] %<-     reflected in the neuron's state variable y0,
    -[ 4       -69.2079 ] %  |    (initial condition) but has not yet affected
    -[ 5       -68.8178 ] %  |    the membrane potential.
    -[ 6       -68.4316 ] %  |
    -[ 7       -68.0492 ] %   --- the effect of the DC current is visible in the
    -[ 8       -67.6706 ] %       membrane potential
    -[ 9       -67.2958 ] %
    -[ 10      -66.9247 ] %
    -%
    -% ...
    -%
    -[ 45      -56.0204 ] %
    -[ 46      -55.7615 ] %
    -[ 47      -55.5051 ] %
    -[ 48      -55.2513 ] %
    -[ 49      -55.0001 ] %
    -[ 50      -70      ] % <---- The membrane potential crossed threshold in the
    -[ 51      -70      ] %       step 4.9 ms -> 5.0 ms. The membrane potential is 
    -[ 52      -70      ] %       reset (no super-threshold values can be observed).
    -[ 53      -70      ] %       The precise spike time is reported at 4.90004 ms.
    -[ 54      -70      ] %
    -[ 55      -70      ] %
    -[ 56      -70      ] %
    -[ 57      -70      ] %
    -[ 58      -70      ] %
    -[ 59      -70      ] %
    -[ 60      -70      ] %
    -[ 61      -70      ] %
    -[ 62      -70      ] %
    -[ 63      -70      ] %
    -[ 64      -70      ] %
    -[ 65      -70      ] %
    -[ 66      -70      ] %
    -[ 67      -70      ] %
    -[ 68      -70      ] %
    -[ 69      -70      ] %
    -[ 70      -69.6021 ] % <---- Since the neuron uses precise spike times that are not
    -[ 71      -69.2081 ] %       locked to the grid, the refractory period ended after 
    -[ 72      -68.818  ] %       2.0 ms during the timestep 6.9 ms -> 7.0 ms. The membrane 
    -[ 73      -68.4317 ] %       potential has already started to increase again.
    -[ 74      -68.0493 ] %       
    -[ 75      -67.6707 ] %
    -[ 76      -67.2959 ] %
    -[ 77      -66.9248 ] %
    -[ 78      -66.5574 ] % 
    -[ 79      -66.1936 ] % <--
    -]                    %    |
    -%                         |
    -%                          - The simulation was run for 8.0 ms. However, in the step
    -%                            7.9 ms -> 8.0 ms the voltmeter necessarily receives the
    -%                            voltages that occurred at time 7.9 ms (delay h). This 
    -%                            results in different end times of the recorded voltage 
    -%                            traces at different resolutions. In the current 
    -%                            simulation kernel there is no general cure for this 
    -%                            problem. One workaround is to end the simulation script
    -%                            with "h Simulate", thereby making the script resolution
    -%                            dependent.
    -%
    -
    -exch assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_psc_exp_ps_lossless.sli b/testsuite/unittests/test_iaf_psc_exp_ps_lossless.sli
    deleted file mode 100644
    index 6877b48dca..0000000000
    --- a/testsuite/unittests/test_iaf_psc_exp_ps_lossless.sli
    +++ /dev/null
    @@ -1,310 +0,0 @@
    -/*
    - *  test_iaf_psc_exp_ps_lossless.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -    Name: testsuite::test_iaf_psc_exp_ps_lossless - sli script for overall test of iaf_psc_exp_ps_lossless model
    -
    -    Synopsis: (test_iaf_psc_exp_ps_lossless) run -> compares response to current step with reference data and tests lossless spike detection
    -
    -    Description:
    -    test_iaf_psc_exp_ps_lossless.sli is an overall test of the iaf_psc_exp_ps_lossless model connected
    -    to some useful devices.
    -
    -    The first part of this test is exactly the same as test_iaf_psc_exp_ps,
    -    demonstrating the numerical equivalency of both models in usual conditions.
    -    The only difference between the models, which is tested in the second part,
    -    is the detection of double threshold crossings during a simulation step 
    -    (so the membrane potential is again below V_th at the end of the step)
    -    by the lossless model.
    -
    -    A DC current is injected into the neuron using a current generator 
    -    device. The membrane potential as well as the spiking activity are 
    -    recorded by corresponding devices.
    -
    -    It can be observed how the current charges the membrane, a spike
    -    is emitted, the neuron becomes absolute refractory, and finally
    -    starts to recover.
    -
    -    The timing of the various events on the simulation grid is of 
    -    particular interest and crucial for the consistency of the 
    -    simulation scheme.
    -
    -    Although 0.1 cannot be represented in the IEEE double data type, it
    -    is safe to simulate with a resolution (computation step size) of 0.1
    -    ms because by default nest is built with a timebase enabling exact
    -    representation of 0.1 ms.
    -
    -    The expected output is documented and briefly commented at the end of 
    -    the script.
    -
    -    Other test programs discuss the various aspects of this script in detail,
    -    see the SeeAlso key below.
    -
    -
    -    The second part tests wether the lossless spike detection algorithm [1] is
    -    working correctly.
    -
    -    The algorithm checks whether a spike is emitted on the basis of the neurons position 
    -    in state space. There are 4 regions in state space (see [1]): NS1, NS2, S1 and S2.
    -    S1 corresponds to threshold crossings that would also be detected by the lossy 
    -    implementation /iaf_psc_exp_ps. S2 corresponds to crossings that would be missed.
    -    The lossless model detects both.
    -
    -    The test brings 3 neurons into the state space regions NS2, S1 and S2,
    -    which is done by keeping their membrane potential close to threshold and then 
    -    sending a single spike to them, which, received via different synaptic weights,
    -    sets the synaptic current such that the neurons are in the respective region.
    -    The existence and precise times of the resulting spikes are compared to reference data.
    -
    -    If you need to reproduce the reference data, ask the authors of [1] for the script
    -    regions_algorithm.py which they used to generate Fig. 6. Here you can adjust the
    -    parameters as whished and obtain the respective regions. 
    -    
    -
    -    References:
    -    [1] Krishnan J, Porta Mana P, Helias M, Diesmann M and Di Napoli E
    -        (2018) Perfect Detection of Spikes in the Linear Sub-threshold
    -        Dynamics of Point Neurons. Front. Neuroinform. 11:75.
    -        doi: 10.3389/fninf.2017.00075
    -
    -    Author:  Jeyashree Krishnan, 2017, and Christian Keup, 2018
    -    SeeAlso: iaf_psc_exp, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc, testsuite::iaf_psc_exp_ps
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -  /local_num_threads 1 
    -  /resolution h
    ->> SetKernelStatus
    -
    -/iaf_psc_exp_ps_lossless Create /neuron Set
    -
    -/dc_generator Create /dc_gen Set
    -dc_gen << /amplitude 1000. >> SetStatus
    -
    -/voltmeter << /time_in_steps true /interval h >> Create /vm Set
    -
    -/spike_recorder Create /sr Set
    -
    -
    -dc_gen neuron 1.0 h Connect
    -vm neuron     1.0 h Connect
    -neuron sr     1.0 h Connect
    -
    -8 Simulate
    -
    -sr /events get /times get First stack    % prints spike time
    -
    -{                                             % reference data
    - dup Transpose First /test_times Set         % times of reference 
    -                               
    - vm [/events [/times /V_m]] get cva   % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose           dup ==                       % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    - 
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Expected output of this program:
    -%
    -% The output send to std::cout is a superposition of the output of
    -% the voltmeter and the spike recorder. Both, voltmeter and spike
    -% recorder are connected to the same neuron.
    -%
    -% time (in steps)  voltage (in mV)
    -[
    -[ 1       -70      ] %<----- The earliest time dc_gen can be switched on.
    -[ 2       -70      ] %<----- The DC current arrives at the neuron, it is
    -[ 3       -69.602  ] %<-     reflected in the neuron's state variable y0,
    -[ 4       -69.2079 ] %  |    (initial condition) but has not yet affected
    -[ 5       -68.8178 ] %  |    the membrane potential.
    -[ 6       -68.4316 ] %  |
    -[ 7       -68.0492 ] %   --- the effect of the DC current is visible in the
    -[ 8       -67.6706 ] %       membrane potential
    -[ 9       -67.2958 ] %
    -[ 10      -66.9247 ] %
    -%
    -% ...
    -%
    -[ 45      -56.0204 ] %
    -[ 46      -55.7615 ] %
    -[ 47      -55.5051 ] %
    -[ 48      -55.2513 ] %
    -[ 49      -55.0001 ] %
    -[ 50      -70      ] % <---- The membrane potential crossed threshold in the
    -[ 51      -70      ] %       step 4.9 ms -> 5.0 ms. The membrane potential is 
    -[ 52      -70      ] %       reset (no super-threshold values can be observed).
    -[ 53      -70      ] %       The precise spike time is reported at 4.90004 ms.
    -[ 54      -70      ] %
    -[ 55      -70      ] %
    -[ 56      -70      ] %
    -[ 57      -70      ] %
    -[ 58      -70      ] %
    -[ 59      -70      ] %
    -[ 60      -70      ] %
    -[ 61      -70      ] %
    -[ 62      -70      ] %
    -[ 63      -70      ] %
    -[ 64      -70      ] %
    -[ 65      -70      ] %
    -[ 66      -70      ] %
    -[ 67      -70      ] %
    -[ 68      -70      ] %
    -[ 69      -70      ] %
    -[ 70      -69.6021 ] % <---- Since the neuron uses precise spike times that are not
    -[ 71      -69.2081 ] %       locked to the grid, the refractory period ended after 
    -[ 72      -68.818  ] %       2.0 ms during the timestep 6.9 ms -> 7.0 ms. The membrane 
    -[ 73      -68.4317 ] %       potential has already started to increase again.
    -[ 74      -68.0493 ] %       
    -[ 75      -67.6707 ] %
    -[ 76      -67.2959 ] %
    -[ 77      -66.9248 ] %
    -[ 78      -66.5574 ] % 
    -[ 79      -66.1936 ] % <--
    -]                    %    |
    -%                         |
    -%                          - The simulation was run for 8.0 ms. However, in the step
    -%                            7.9 ms -> 8.0 ms the voltmeter necessarily receives the
    -%                            voltages that occurred at time 7.9 ms (delay h). This 
    -%                            results in different end times of the recorded voltage 
    -%                            traces at different resolutions. In the current 
    -%                            simulation kernel there is no general cure for this 
    -%                            problem. One workaround is to end the simulation script
    -%                            with "h Simulate", thereby making the script resolution
    -%                            dependent.
    -%
    -
    -exch assert_or_die
    -
    -
    -
    -
    -%%%%%%%%%
    -%
    -% Beginning of 2nd part. Testing the spike detection algorithm 
    -%
    -
    -ResetKernel
    -
    -reset
    -
    -(unittest) run
    -/unittest using
    -
    -<< 
    -  /local_num_threads 1 
    -  /resolution 1.     % low resolution is crucial.
    ->> SetKernelStatus
    -
    -/iaf_psc_exp_ps_lossless << 
    -      /tau_m 100.
    -      /tau_syn_ex 1.
    -      /tau_syn_in 1.
    -      /C_m 250.
    -      /V_th -49.
    -   >> SetDefaults
    -
    -% 3 neurons that will test the detection of different types of threshold crossing
    -/iaf_psc_exp_ps_lossless Create /nrn_nospike Set
    -/iaf_psc_exp_ps_lossless Create /nrn_missingspike Set
    -/iaf_psc_exp_ps_lossless Create /nrn_spike Set
    -
    -
    -%syn weights of trigger spike that will put the nrn in the different state space regions
    -55. /I_nospike Set
    -70. /I_missingspike Set
    -90. /I_spike Set
    -
    -%send one trigger spike to the nrns at specified time:
    -
    -/spike_generator << /precise_times true /spike_times [3.0] >> Create  /sp_gen  Set
    -
    -sp_gen nrn_nospike I_nospike 1. Connect
    -sp_gen nrn_missingspike I_missingspike 1. Connect
    -sp_gen nrn_spike I_spike 1. Connect
    -
    -
    -%external current to keep nrns close to threshold:
    -
    -/dc_generator << /amplitude 52.5 >> Create  /dc_gen Set
    -
    -dc_gen nrn_nospike 1. 1. Connect
    -dc_gen nrn_missingspike 1. 1. Connect
    -dc_gen nrn_spike 1. 1. Connect
    -
    -
    -%read out spike response of nrns:
    -
    -/spike_recorder Create /sr_nospike Set
    -nrn_nospike sr_nospike Connect
    -
    -/spike_recorder Create /sr_missingspike Set
    -nrn_missingspike sr_missingspike Connect
    -
    -/spike_recorder Create /sr_spike Set
    -nrn_spike sr_spike Connect
    -
    -
    -2 Simulate
    -
    -% set nrns close to threshold
    -nrn_nospike << /V_m -49.001 >> SetStatus
    -nrn_missingspike << /V_m -49.001 >> SetStatus
    -nrn_spike << /V_m -49.001 >> SetStatus
    -
    -% swich off ext. current. This effect will reach the nrns at 3.0 due to syn delay,
    -% so that the external current will be zero when the trigger spike arrives at 4.0 . 
    -dc_gen << /amplitude 0. >> SetStatus  
    -
    -10 Simulate
    -
    -
    -% get spike times
    -
    -sr_nospike /events get /times get cva    % array of spike times (this one should be empty)
    -  Total                                  % sum of array elements. works also for empty array
    -  6 ToUnitTestPrecision
    -  /time_nospike Set
    -
    -sr_missingspike /events get /times get cva
    -  Total
    -  6 ToUnitTestPrecision
    -  /time_missingspike Set
    -
    -sr_spike /events get /times get cva
    -  Total
    -  6 ToUnitTestPrecision
    -  /time_spike Set
    -
    -
    -{ time_nospike 0 eq } assert_or_die
    -{ time_missingspike 4.01442 eq } assert_or_die
    -{ time_spike 4.00659 eq } assert_or_die
    diff --git a/testsuite/unittests/test_iaf_psp.sli b/testsuite/unittests/test_iaf_psp.sli
    deleted file mode 100644
    index e62b01a1d6..0000000000
    --- a/testsuite/unittests/test_iaf_psp.sli
    +++ /dev/null
    @@ -1,223 +0,0 @@
    -/*
    - *  test_iaf_psp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_psp - sli script for test of iaf_psc_alpha spike input
    -
    -Synopsis: (test_iaf_psp) run -> compare response with reference data
    -
    -Description:
    -
    - test_iaf_psp.sli checks the voltage response of the iaf_psc_alpha
    - model neuron to a single incoming spike. The voltage excursion is
    - called postsynaptic potential (PSP). In the iaf_psc_alpha model neuron
    - the postsynaptic current is described by an alpha-function 
    - (see [1] and references therein). The resulting PSP has a finite 
    - rise-time, with voltage and current beeing zero in the initial 
    - condition (see [1]).
    -
    - The dynamics is tested by connecting a device that emits spikes
    - at individually configurable times (see test_spike_generator) to 
    - a model neuron. 
    -
    - The weight of the connection specifies the peak value (amplitude)
    - of the postsynaptic current (PSC) in pA.
    -
    - The subthreshold dynamics of the iaf_psc_alpha is integrated exactly.
    - Therefore, it is suitable to check whether the simulation kernel 
    - produces results independent of the computation step size
    - (resolution).
    -
    - In order to obtain identical results for different computation
    - step sizes h, the SLI script needs to be independent of h.
    - This is achieved by specifying all time parameters in milliseconds
    - (ms). In particular the time of spike emission and the synaptic
    - delay need to be integer multiples of the computation step sizes 
    - to be tested. test_iaf_dc_aligned_delay demonstrates the strategy
    - for the case of DC current input.
    -
    - The expected output is documented and briefly commented at the end of
    - the script.
    -
    -References:
    -  [1] Rotter S & Diesmann M (1999) Exact simulation of time-invariant linear
    -      systems with applications to neuronal modeling. Biologial Cybernetics
    -      81:381-402.
    -
    -Author:  July 2004, Diesmann
    -SeeAlso: testsuite::test_iaf, testsuite::test_iaf_dc_aligned_delay, testsuite::test_spike_generator
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -1.0 /delay Set   % in ms 
    -
    -
    -/AlignedImpact
    -{
    - << >> begin    
    - /d Set /h Set   
    -
    -
    -ResetKernel
    -
    -
    -<< 
    -       /local_num_threads 1   
    -       /resolution h
    -     >> SetKernelStatus
    -
    -
    -/spike_generator Create /sg Set
    -
    -
    -sg <<
    -     /precise_times false
    -     /origin 0.0            % in ms
    -     /spike_times [ 2.0 ]   % in ms
    -     /start 1.0             % in ms 
    -     /stop 3.0              % in ms
    -   >> SetStatus
    -
    -/iaf_psc_alpha Create /neuron Set
    -
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -
    -sg neuron 100.0  delay Connect
    -
    -vm neuron Connect
    -
    -neuron sr Connect
    -
    -7.0 Simulate
    -
    - d Transpose First /test_times Set          % times of reference
    -
    - vm [/events [/times /V_m]] get cva  % array of recorded voltages
    -  6 ToUnitTestPrecision                     % to precision of reference
    -  Transpose                                 % all recorded tuples
    -  {First test_times exch MemberQ } Select   % those with reference 
    -  d eq                                      % compare
    -  
    -  
    -end
    -} def
    -
    -
    -{
    - % h d,  vector of resolutions and compressed reference data   
    - InflateUnitTestData 
    -
    - Transpose {AlignedImpact} MapThread
    -
    - true exch {and} Fold   % remove this line to see individual results
    -}
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of  
    -% the voltmeter and the spike recorder. Both, voltmeter and spike 
    -% recorder are connected to the same neuron. 
    -%
    -%
    -% h=   (in ms)
    -[ 0.1   0.2    0.5   1.0 ]
    -%
    -% time                    voltage
    -%
    -[
    -%  0     0     0     0     -70
    -[  1                       -70]
    -[  2     1                 -70]
    -[  3                       -70]
    -[  4     2                 -70]
    -[  5           1           -70]
    -[  6     3                 -70]
    -[  7                       -70]
    -[  8     4                 -70]
    -[  9                       -70]
    -[ 10     5     2     1     -70]
    -[ 11                       -70]
    -[ 12     6                 -70]
    -[ 13                       -70]
    -[ 14     7                 -70]
    -[ 15           3           -70]
    -[ 16     8                 -70]
    -[ 17                       -70]
    -[ 18     9                 -70]
    -[ 19                       -70]
    -[ 20    10     4     2     -70]%       <-- Spike generator emits spike
    -[ 21                       -70]%           with time stamp t=2.0 ms.
    -[ 22    11                 -70]
    -[ 23                       -70]
    -[ 24    12                 -70]%       <--  Synaptic delay of 1.0 ms.
    -[ 25           5           -70]
    -[ 26    13                 -70]
    -[ 27                       -70]
    -[ 28    14                 -70]
    -[ 29                       -70]
    -[ 30    15     6     3     -70]% <---------  Spike arrives at neuron and
    -[ 31                       -69.9974]% <-     changes the state vector of the  
    -[ 32    16                 -69.9899]%   |    neuron, not visible in voltage 
    -[ 33                       -69.9781]%   |    because voltage of PSP initial 
    -[ 34    17                 -69.9624]%   |    condition is 0.
    -[ 35           7           -69.9434]%   |
    -[ 36    18                 -69.9213]%    --  Arbitrarily close to the time
    -[ 37                       -69.8967]%        of impact (t=3.0 ms) the effect
    -[ 38    19                 -69.8699]%        of the spike (PSP) is visible in
    -[ 39                       -69.8411]%        the voltage trace.
    -[ 40    20     8    4      -69.8108]%
    -[ 41                       -69.779 ]
    -[ 42    21                 -69.7463]
    -[ 43                       -69.7126]
    -[ 44    22                 -69.6783]
    -[ 45           9           -69.6435]
    -[ 46    23                 -69.6084]
    -[ 47                       -69.5732]
    -[ 48    24                 -69.538 ]
    -[ 49                       -69.5029]
    -[ 50    25    10    5      -69.4681]% <---  The voltage trace is independent
    -[ 51                       -69.4336]%       of the computation step size h.
    -[ 52    26                 -69.3995]%       Larger step sizes only have fewer
    -[ 53                       -69.366 ]%       sample points.
    -[ 54    27                 -69.333 ]
    -[ 55          11           -69.3008]
    -[ 56    28                 -69.2692]
    -[ 57                       -69.2383]
    -% ...
    -]
    -%
    -
    -rolld exec assert_or_die
    -
    diff --git a/testsuite/unittests/test_iaf_psp_normalized.sli b/testsuite/unittests/test_iaf_psp_normalized.sli
    deleted file mode 100644
    index e9b17db3e0..0000000000
    --- a/testsuite/unittests/test_iaf_psp_normalized.sli
    +++ /dev/null
    @@ -1,183 +0,0 @@
    -/*
    - *  test_iaf_psp_normalized.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_psp_normalized - check if PSP can be normalized 
    -
    -Synopsis: (test_iaf_psp_normalized) run -> compare response with desired outcome
    -
    -Description:
    -
    -The script computes the peak location of the PSP analytically for a
    -neuron model with an alpha-shaped postsynaptic current (PSC) [1]. In case
    -the GNU Scientific Library (GSL) is not present the peak location is
    -found by searching for the root of the derivative of the PSP. We then
    -compute the peak value for a PSC with unit amplitude and show how the
    -synaptic weight can be adjusted to cause a PSP of a specific
    -amplitiude. Finally, we check whether the simulation indeed generates
    -a PSP of the desired amplitude.
    -
    -In application code the test for the availability of the GSL is not
    -necessary because NEST has a built in version of the LambertWm1 which
    -automatically replaces the GSL function if required. This removes the
    -need to specify the derivative of the function of interest, here the
    -PSP, in application code.  A further alternative is used in
    -test_lambertw where knowledge of the range of values of the
    -non-principal branch of the Lambert-W function [-1,-\infty) is
    -exploited to find the inverse of x*exp(x) by bisectioning.
    -
    -
    -References:
    -  [1] Rotter S & Diesmann M (1999) Exact simulation of time-invariant linear
    -      systems with applications to neuronal modeling. Biologial Cybernetics
    -      81:381-402.
    -  [2] Galassi, M., Davies, J., Theiler, J., Gough, B., Jungman, G., Booth, M.,
    -      & Rossi, F. (2006). GNU Scientific Library Reference Manual (2nd Ed.).
    -      Network Theory Limited.
    -
    -Author:  July 2009, Diesmann
    -SeeAlso: testsuite::test_iaf_psp_peak, testsuite::test_iaf_psp, testsuite::test_lambertw, LambertWm1
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -1.0    /delay Set   % in ms 
    -0.001  /h     Set
    -
    -1.0  /u Set   % requested PSP size in mV
    -
    -<<                 % parameter of the Brunel network examples
    -  /tau_m   20.0    % membrane time constant in ms
    -  /tau_syn  0.5    % synaptic time constant in ms
    -  /C_m      1.0    % membrane capacity in pF 
    -  /E_L      0.0
    -  /V_reset  0.0
    -  /V_th    15.0
    -  /V_m      0.0
    ->>
    -/P Set
    -
    -
    -/psp
    - [/t]
    - ( 
    -  E/tau_syn * 1/C_m 
    -    * ( (exp(-t/tau_m)-exp(-t/tau_syn))/(1/tau_syn - 1/tau_m)^2 - t*exp(-t/tau_syn)/(1/tau_syn - 1/tau_m) ) 
    - )
    - Function
    -def
    -
    -
    -% derivative of the postsynaptic potential
    -% only required in case the GSL is not available
    -/dpsp
    - [/t]
    - (
    -  E/tau_syn * 1/C_m 
    -    * (   (-1/tau_m*exp(-t/tau_m)+1/tau_syn*exp(-t/tau_syn)) / (1/tau_syn - 1/tau_m)^2 
    -        - (exp(-t/tau_syn) - 1/tau_syn*t*exp(-t/tau_syn)) / (1/tau_syn - 1/tau_m) 
    -      )
    - )
    - Function
    -def
    -
    -
    -
    -P begin
    -<< >> begin
    -
    - statusdict/have_gsl :: 
    - {
    -  (                                               % closed form solution
    -   a=tau_m/tau_syn;
    -   t= (-a*LambertWm1(-exp(-1/a)/a) -1)/a / (1/tau_syn - 1/tau_m);
    -  ) ExecMath 
    - }
    - {                                                % numerical solution in absence of GSL
    -  {dpsp} 0. 5.0 0.00000000001 FindRoot /t Set 
    - }
    - ifelse
    - t psp inv
    -
    - end
    -end
    -/f Set  % f is the weight required for a PSP with unit amplitude
    -
    -u  f mul /w Set 
    -
    -
    -
    -ResetKernel
    -
    -
    -<< 
    -    /resolution h
    -  >> SetKernelStatus
    -
    -
    -/spike_generator Create /sg Set
    -
    -
    -sg <<
    -     /precise_times false
    -     /origin 0.0            % in ms
    -     /spike_times [ 2.0 ]   % in ms
    -     /start 1.0             % in ms 
    -     /stop 3.0              % in ms
    -   >> SetStatus
    -
    -/tau_syn P /tau_syn get def
    -P /tau_syn_ex tau_syn put
    -P /tau_syn_in tau_syn put
    -P /tau_syn undef
    -
    -/iaf_psc_alpha Create /neuron Set
    -neuron P SetStatus
    -
    -
    -
    -
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -
    -sg neuron w  delay Connect
    -
    -vm neuron Connect
    -
    -
    -7.0 Simulate
    -
    -
    -vm [/events /V_m] get cva Max 
    -
    -
    -1.0 sub abs 1e-6 lt   assert_or_die
    -
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_iaf_psp_peak.sli b/testsuite/unittests/test_iaf_psp_peak.sli
    deleted file mode 100644
    index 53e6b4fbd5..0000000000
    --- a/testsuite/unittests/test_iaf_psp_peak.sli
    +++ /dev/null
    @@ -1,118 +0,0 @@
    -/*
    - *  test_iaf_psp_peak.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_iaf_psp_peak - test of closed form expression for peak
    -
    -Synopsis: (test_iaf_psp_peak) run -> compare expression with numerics
    -
    -Description:
    -
    -Several NEST neuron models have an alpha-shaped postsynaptic current (PSC).
    -In these models the PSC is normalized to unit amplitude. Thus, a synaptic weight
    -w leads to a PSC with amplitude w in units of pA.
    -In order to adjust the amplitude of the postsynaptic potential (PSP) of a 
    -neuron model with an alpha-shaped postsynaptic current (PSC) to a particular
    -amplitude we need to first find the location of the maximum tmax of the PSP. 
    -Here, this is done in two different ways:
    -1. We numerically search for the root of the derivative of the PSP
    -2. We used a closed form expression to compute the position of the maximum
    -The test verifies that the methods lead to the same result. The test file 
    -test_iaf_psp_normalized shows how this value is used to specify w such that a 
    -PSP with a desired amplitude u in units of mV results.
    -
    -The closed form expression can be found by first transforming the expression 
    -   d psp(t) / dt = 0
    -into the normal form
    -   exp(s) = 1 + a * s,
    -where s is the scaled time s=bt and a and b depend on the time constants
    -a = tau_m/tau_alpha, b = 1/tau_alpha - 1/tau_m . 
    -
    -The solution for s can then be expressed with the help of the Lambert W-function W
    -which is the inverse of x=W*exp(W) and reads
    - 
    -  s = 1/a * ( -a W(-exp(-1/a)/a) - 1 )
    -
    -
    -References:
    -  [1] Weisstein, Lambert W-function
    -
    -Author:  July 2009, Diesmann
    -SeeAlso: testsuite::test_lambertw, testsuite::test_iaf_psp_normalized, LambertWm1
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -
    -% parameter of the Brunel network examples
    -%
    - 20.0   /tau_m   Set  % membrane time constant in ms
    -  0.5   /tau_syn Set  % synaptic time constant in ms
    -  1.0   /C_m     Set  % membrane capacity in pF 
    -
    -
    -% In NEST neuron models with alpha-shaped PSC, the PSCs are normalized to
    -% unit amplitude. Thus, a weight w results in a PSC with amplitude w.
    -
    -/psp
    - [/t]
    - ( 
    -  E/tau_syn * 1/C_m 
    -    * ( (exp(-t/tau_m)-exp(-t/tau_syn))/(1/tau_syn - 1/tau_m)^2 - t*exp(-t/tau_syn)/(1/tau_syn - 1/tau_m) ) 
    - )
    - Function
    -def
    -
    -% derivative of the postsynaptic potential
    -/dpsp
    - [/t]
    - (
    -  E/tau_syn * 1/C_m 
    -    * (   (-1/tau_m*exp(-t/tau_m)+1/tau_syn*exp(-t/tau_syn)) / (1/tau_syn - 1/tau_m)^2 
    -        - (exp(-t/tau_syn) - 1/tau_syn*t*exp(-t/tau_syn)) / (1/tau_syn - 1/tau_m) 
    -      )
    - )
    - Function
    -def
    -
    -
    -{dpsp} 0. 5.0 0.00000000001 FindRoot /t0 Set   % 
    -
    -
    -
    -/psp_peaktime
    - []
    - ( a=tau_m/tau_syn;( -a*LambertWm1(-exp(-1./a)/a) -1. )/a / (1/tau_syn - 1/tau_m) )
    - Function
    -def 
    -
    -
    -% assert that peak times from direct root finding and 
    -% close form solution are the same 
    -%
    -psp_peaktime t0 sub abs 1e-10 lt assert_or_die
    -
    diff --git a/testsuite/unittests/test_inh_stdp_synapse.sli b/testsuite/unittests/test_inh_stdp_synapse.sli
    deleted file mode 100644
    index 4a1196db66..0000000000
    --- a/testsuite/unittests/test_inh_stdp_synapse.sli
    +++ /dev/null
    @@ -1,243 +0,0 @@
    -/*
    - *  test_inh_stdp_synapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_inh_stdp_synapse - basic test of stdp_synapse
    -
    -Synopsis: (test_inh_stdp_synapse) run
    -
    -Description:
    -  A parrot_neuron that repeats the spikes from a poisson generator is
    -  connected to an iaf_psc_alpha that is driven by inh. and exc. poisson input.
    -  The synapse is an stdp_synapse. After the simulation, we go through the pre-
    -  and postsyn. spike-trains spike by spike and try to reproduce the STDP
    -  results. The final weight obtained after simulation is compared to the final
    -  weight obtained from the test.
    -
    -Author: Weidel Mar 2016
    -Based on: Kunkel, Nov 2010
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -/resolution 0.1 def %1.0 def %2.0 -4 pow def  % simulation step size
    -<< /resolution resolution >> SetKernelStatus
    -
    -
    -%%% input parameters %%%
    -
    -/K_exc         8000.0 def  % number of exc. inputs
    -/K_inh         2000.0 def  % number of inh. inputs
    -/nu              10.0 def  % equil. firing rate
    -/nu_x             1.7 def  % external rate
    -/w_exc           45.0 def  % strength of exc. connections
    -/w_neuron       -45.0 def  % strength of connections between neuron and parrot
    -/w_inh w_exc -5.0 mul def  % strength of inh. connections
    -/delay            1.0 def  % synaptic transmission delay
    -
    -/axonal_delay 0.0 def
    -/backpr_delay delay axonal_delay sub def
    -
    -
    -%%% STDP parameters %%%
    -
    -/alpha              1.1  def
    -/lambda             0.01 def
    -/tau_plus          20.0  def
    -/tau_minus         30.0  def
    -/mu_plus            1.0  def  % multiplicative
    -/mu_minus           1.0  def  % multiplicative
    -/w_max  w_neuron 2.0 mul def
    -
    -
    -%%% create poisson generators, neurons and spike recorder %%%
    -
    -/pg_exc /poisson_generator << /rate K_exc nu nu_x add mul >> Create def
    -/pg_inh /poisson_generator << /rate K_inh nu mul          >> Create def
    -
    -/pg_pre /poisson_generator << /rate nu >> Create def
    -
    -/parrot /parrot_neuron Create def
    -/neuron /iaf_psc_alpha << /tau_minus tau_minus >> Create def
    -
    -/sr_pre  /spike_recorder Create def
    -/sr_post /spike_recorder Create def
    -
    -
    -%%% connect %%%
    -
    -/stdp_synapse << /weight w_neuron
    -     /alpha    alpha
    -     /lambda   lambda
    -		 /tau_plus tau_plus
    -		 /mu_plus  mu_plus
    -		 /mu_minus mu_minus
    -		 /Wmax     w_max
    -              >> SetDefaults
    -
    -pg_exc neuron w_exc delay Connect
    -pg_inh neuron w_inh delay Connect
    -pg_pre parrot w_exc delay Connect
    -
    -parrot neuron w_neuron delay /stdp_synapse Connect
    -
    -parrot sr_pre  Connect
    -neuron sr_post Connect
    -
    -%%% simulate and get data %%%
    -
    -10000.0 Simulate
    -
    -/pre_spikes  sr_pre  /events get /times get cva { axonal_delay add } Map def
    -/post_spikes sr_post /events get /times get cva { backpr_delay add } Map def
    -
    -
    -/final_weight << /source parrot /target neuron >> GetConnections 0 get /weight get def
    -
    -%%% check final weight %%%
    -
    -
    -cout 15 setprecision
    -
    -/K_plus    0.0 def
    -/K_minus   0.0 def
    -/last_pre  0   def
    -/last_post 0   def
    -/j         0   def
    -/i         0   def
    -
    -/post_spike post_spikes i get def
    -/pre_spike  pre_spikes  j get def
    -/w          w_neuron w_max div   def
    -
    -/update_K_plus
    -{
    -  last_pre pre_spike sub tau_plus div exp K_plus mul 1.0 add /K_plus Set
    -}
    -def
    -
    -/update_K_minus
    -{
    -  last_post post_spike sub tau_minus div exp K_minus mul 1.0 add /K_minus Set
    -}
    -def
    -
    -/next_pre_spike
    -{
    -  j 1 add /j Set
    -  pre_spike /last_pre Set
    -  pre_spikes j get /pre_spike Set
    -}
    -def
    -
    -/next_post_spike
    -{
    -  i 1 add /i Set
    -  post_spike /last_post Set
    -  post_spikes i get /post_spike Set
    -}
    -def
    -
    -/facilitate
    -{
    -  ( w + lambda * (1.0-w)**mu_plus * K_plus * exp((last_pre-post_spike)/tau_plus) ) ExecMath
    -  dup 1.0 lt { /w Set } { pop 1.0 /w Set } ifelse
    -  %(facilitation) =only (\t) =only last_pre =only (\t) =only post_spike =only (\t) =only w w_max mul =
    -}
    -def
    -
    -/depress
    -{
    -  ( w - lambda * alpha * w**mu_minus * K_minus * exp((last_post-pre_spike)/tau_minus) ) ExecMath
    -  dup 0.0 gt { /w Set } { pop 0.0 /w Set } ifelse
    -  %(depression) =only (\t) =only last_post =only (\t) =only pre_spike =only (\t) =only w w_max mul =
    -}
    -def
    -
    -
    -{
    -  {
    -    pre_spike post_spike eq
    -    { % pre- and post-syn. spike at the same time
    -      last_post post_spike neq { facilitate } if
    -      last_pre pre_spike neq { depress } if
    -      %(pre == post) =only (\t) =only pre_spike =only (\t) =only post_spike =only (\t) =only w w_max mul =
    -      j 1 add pre_spikes length lt
    -      {
    -        update_K_plus
    -        next_pre_spike
    -        i 1 add post_spikes length lt
    -        {
    -          update_K_minus
    -        	next_post_spike
    -        }
    -        if
    -      }
    -      {
    -        exit
    -      }
    -      ifelse
    -    }
    -    {
    -      pre_spike post_spike lt
    -      { % next spike is a pre-syn. spike
    -        depress
    -        update_K_plus
    -        j 1 add pre_spikes length lt
    -        {
    -          next_pre_spike
    -        }
    -        {
    -          %(last presyn spike) =
    -          % we don't consider the post-syn. spikes after the last pre-syn. spike
    -          exit
    -        }
    -        ifelse
    -      }
    -      { % next spike is a post-syn. spike
    -        facilitate
    -        update_K_minus
    -        i 1 add post_spikes length lt
    -        {
    -          next_post_spike
    -        }
    -        {
    -          %(last postsyn spike) =
    -          % we DO consider the pre-syn. spikes after the last post-syn. spike
    -          post_spike /last_post Set
    -          pre_spikes dup length 1 sub get resolution add /post_spike Set  % to make sure we don't come here again
    -        }
    -        ifelse
    -      }
    -      ifelse
    -    }
    -    ifelse
    -  }
    -  loop
    -  
    -  w w_max mul 13 ToUnitTestPrecision final_weight 13 ToUnitTestPrecision eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_inhomogeneous_poisson_generator.sli b/testsuite/unittests/test_inhomogeneous_poisson_generator.sli
    deleted file mode 100644
    index 6a1c6cc446..0000000000
    --- a/testsuite/unittests/test_inhomogeneous_poisson_generator.sli
    +++ /dev/null
    @@ -1,178 +0,0 @@
    -/*
    - *  test_inhomogeneous_poisson_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_inhomogeneous_poisson_generator - sli script to test
    -   inhomogeneous_poisson_generator device
    -
    -   Synopsis: (test_inhomogeneous_poisson_generator) run
    -
    -   Description:
    -   test_inhomogeneous_poisson_generator checks the
    -   inhomogeneous_poisson_generator device and its
    -   consistency with the nest simulation kernel.
    -
    -
    -   FirstVersion: December 2017
    -   Author: Barna Zajzon
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% Test 1.a
    -% Rate times and values must be set together.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /inhomogeneous_poisson_generator Create /ipg Set
    -  ipg <<
    -        /rate_times [1.]
    -  >> SetStatus
    -}
    -fail_or_die
    -
    -% Test 1.b
    -% Rate times and values must be set together.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /inhomogeneous_poisson_generator Create /ipg Set
    -  ipg <<
    -        /rate_values [10.]
    -  >> SetStatus
    -}
    -fail_or_die
    -
    -% Test 2
    -% Length of rate times and values must match.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /inhomogeneous_poisson_generator Create /ipg Set
    -  ipg <<
    -        /rate_times [1. 2.]
    -        /rate_values [10.]
    -  >> SetStatus
    -}
    -fail_or_die
    -
    -% Test 3
    -% Rate times must be strictly increasing.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /inhomogeneous_poisson_generator Create /ipg Set
    -  ipg <<
    -        /rate_times [1. 5. 3.]
    -        /rate_values [10. 20. 5.]
    -  >> SetStatus
    -}
    -fail_or_die
    -
    -% Test 4.a
    -% Try offgrid time point.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /inhomogeneous_poisson_generator Create /ipg Set
    -  ipg <<
    -        /rate_times [1.23]
    -        /rate_values [10.]
    -  >> SetStatus
    -}
    -fail_or_die
    -
    -% Test 4.b
    -% Try wrong time point representation but allow offgrid times.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /ipg /inhomogeneous_poisson_generator << /allow_offgrid_times true >> Create def
    -
    -  ipg <<
    -        /rate_times [1.23]
    -        /rate_values [10.]
    -  >> SetStatus
    -}
    -pass_or_die
    -
    -% Test 5.a
    -% allow_offgrid_times can't be modified separately after rates have been set.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /ipg /inhomogeneous_poisson_generator Create def
    -
    -  ipg <<
    -      /rate_times [1.2]
    -      /rate_values [10.]
    -  >> SetStatus
    -
    -  ipg <<
    -      /allow_offgrid_times true
    -  >> SetStatus
    -}
    -fail_or_die
    -
    -% Test 5.b
    -% allow_offgrid_times can't be modified separately after rates have been set.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /ipg /inhomogeneous_poisson_generator << /allow_offgrid_times true >> Create def
    -
    -  ipg <<
    -      /rate_times [1.23]
    -      /rate_values [10.]
    -  >> SetStatus
    -
    -  ipg <<
    -      /allow_offgrid_times false
    -      /rate_times [1.25]
    -      /rate_values [10.]
    -  >> SetStatus
    -}
    -fail_or_die
    -
    -% Test 6
    -% time points should lie strictly in the future.
    -{
    -  ResetKernel
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /inhomogeneous_poisson_generator Create /ipg Set
    -  ipg <<
    -        /rate_times [0.]
    -        /rate_values [30.]
    -  >> SetStatus
    -}
    -fail_or_die
    diff --git a/testsuite/unittests/test_lambertw.sli b/testsuite/unittests/test_lambertw.sli
    deleted file mode 100644
    index d57a5c1f1a..0000000000
    --- a/testsuite/unittests/test_lambertw.sli
    +++ /dev/null
    @@ -1,126 +0,0 @@
    -/*
    - *  test_lambertw.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_lambertw - check if lambertw function works
    -
    -Synopsis: (test_lambertw) run -> some known relations
    -
    -Description:
    -The script tests whether the Lambert W-function [1] provided by the 
    -GNU Scientific Library (GSL) [2] fulfills some known relations [3].
    -In the absence of the GSL NEST uses a simple iterative scheme to
    -compute the Lambert-W function. In this case we apply less strict
    -criteria for the required accuracy.
    -The relationships tested are:
    - (1) the principal branch crosses the origin
    - (2) at -1/e both branches meet athe value W=-1
    - (3) the principal branch fulfills the "golden ratio" of exponentials
    - (4) the non-principal branch yields the same result as we find by
    -     bisectioning for the problem given as an example in the documentation
    -     of LambertWm1 with realistic parameters.
    -
    -References:
    -  [1] Corless, R. M., Gonnet, G. H., Hare, D. E. G., Jeffrey, D. J., & Knuth, D. E.
    -      (1996). On the lambert w function. Advances in Computational Mathematics 
    -      5, 329{359.
    -  [2] Galassi, M., Davies, J., Theiler, J., Gough, B., Jungman, G., Booth, M.,
    -      & Rossi, F. (2006). GNU Scientific Library Reference Manual (2nd Ed.).
    -      Network Theory Limited.
    -  [3] Weisstein, E. W. (1999). CRC Concise Encyclopedia of Mathematics. 
    -      "Lambert W-Function" Boca Raton, London, New York, Washington D.C.: CRC Press.
    -
    -Author:  July 2009, Diesmann
    -SeeAlso: LambertW, LambertW0, LambertWm1, testsuite::test_iaf_psp_peak, testsuite::test_iaf_psp_normalized
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -
    -
    -% (1)
    -%  LambertW0 crosses the origin
    -
    -0. LambertW0 0. eq                 assert_or_die
    -
    -
    -% (2)
    -% at -1/e the values of both branches coincide with W=-1
    -
    -statusdict/have_gsl :: 
    -{
    - -1. exp neg LambertW0  -1. eq      assert_or_die
    - -1. exp neg LambertWm1 -1. eq      assert_or_die
    -}
    -{
    - -1. exp neg LambertW0  -1. sub abs 1e-8 lt  assert_or_die
    - -1. exp neg LambertWm1 -1. sub abs 1e-8 lt  assert_or_die
    -}
    -ifelse
    -
    -
    -% (3)
    -%  W(1)=0.567143.. is called the omega constant 
    -%  or the  "golden ratio" of exponentials  because of the relation 
    -%     exp -W(1) == W(1), 
    -%  see [2]
    -
    -statusdict/have_gsl :: 
    -{
    - 1. LambertW0   1. LambertW0 neg exp eq                 assert_or_die
    -}
    -{
    - 1. LambertW0   1. LambertW0 neg exp sub abs 1e-12 lt   assert_or_die
    -}
    -ifelse 
    -
    -
    -
    -% (4)
    -% In the example of finding the peak time of the postsynaptic potential (PSP)
    -% generated by an alpha-function shaped current (PSC) the Lambert-W function
    -% is evaluated for the argument -exp(-1/a)/a, where a is the ratio of the 
    -% membrane time constant tau_m and the time constant of the alpha-function
    -% tau_syn. The physically meaning full solution leading to a positive peak time
    -% is located on the non-principal branch of the Lambert-W function LambertWm1.
    -% Here, we evaluate LambertWm1 for the argument discussed above with realistic 
    -% choices of the parameters. The result is compared with the value obtained by
    -% a simple bisectioning algorithm.
    -
    -
    -20.  /tau_m  Set
    -0.5  /tau_syn Set
    -tau_m tau_syn div /a Set
    -
    -
    -(LambertWm1(-exp(-1./a)/a)) ExecMath 
    -
    -[/w] (w*exp(w)+exp(-1./a)/a) Function  -10. -1.  1e-11 FindRoot
    -
    -sub abs 1e-9 lt assert_or_die
    -
    -
    diff --git a/testsuite/unittests/test_mat2_psc_exp.sli b/testsuite/unittests/test_mat2_psc_exp.sli
    deleted file mode 100644
    index c32b2a1165..0000000000
    --- a/testsuite/unittests/test_mat2_psc_exp.sli
    +++ /dev/null
    @@ -1,163 +0,0 @@
    -/*
    - *  test_mat2_psc_exp.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_mat2_psc_exp - sli script for overall test of mat2_psc_exp neuron model
    -
    -    Synopsis: (test_mat2_psc_exp) run -> compares response to current step with reference data 
    -
    -    Description:
    -    test_mat2_psc_exp.sli is an overall test of the mat2_neuron model connected
    -    to some useful devices.
    -
    -    A DC current is injected into the neuron using a current generator
    -    device. The membrane potential, the threshold potential as well as the
    -    spiking activity are recorded by corresponding devices.
    -
    -    It can be observed how the current charges the membrane, a spike
    -    is emitted, the threshold potential is updated and evaluated whereas
    -    the membrane potential is not resetted and further evaluated, too.
    -    Additionally the neuron becomes refractory after emitting a spike.
    -
    -    The timing of the various events on the simulation grid is of
    -    particular interest and crucial for the consistency of the
    -    simulation scheme.
    -
    -    Although 0.1 cannot be represented in the IEEE double data type, it
    -    is safe to simulate with a resolution (computation step size) of 0.1
    -    ms because by default nest is built with a timebase enabling exact
    -    representation of 0.1 ms.
    -
    -    The expected output is documented and briefly commented at the end of
    -    the script.
    -
    -    Other test programs discuss the various aspects of this script in detail,
    -    see the SeeAlso key below.
    -
    -    Author:  October 2009, T. Pfeil
    -    SeeAlso: testsuite::test_iaf, testsuite::test_iaf_i0, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution h
    -  >> SetKernelStatus
    -
    -% explicitly set threshold omega here to ensure that after 
    -% change of definition of omega from relative to E_L to absolute
    -% we still get the original results; see #506.
    -/mat2_psc_exp << /omega -51.0 >> Create /neuron Set
    -
    -/dc_generator Create /dc_gen Set
    -dc_gen << /amplitude 2400. >> SetStatus
    -
    -/multimeter Create /mm Set
    -mm <<
    -     /interval h
    -     /record_from [/V_m /V_th] % record non-resetting membrane potential
    -                               % and evaluated threshold potential
    -     /time_in_steps true
    -   >> SetStatus
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -
    -dc_gen neuron 1.0 h Connect
    -mm neuron     1.0 h Connect
    -neuron sr     1.0 h Connect
    -
    -8 Simulate
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of
    -% the multimeter and the spike recorder. Both, multimeter and spike
    -% recorder are connected to the same neuron. 
    -%
    -
    -{
    - sr [/events [/times]] get cva   	     % array of recorded data
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%
    -% spike times (in steps)
    -
    -[[11 32 54]] % The threshold potential crosses the membrane potential at time
    -     	     % step 31. But due to the refractory period of 2 ms the neuron
    -	     % is not allowed to fire until time step 32.
    -
    -exch assert_or_die
    -
    -
    -{                                            % reference data
    - dup Transpose First /test_times Set         % times of reference
    -
    - mm [/events [/times /V_m /V_th]] get cva    % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%
    -% time (in steps)  membrane potential V_m (in mV)  threshold V_th (in mV)
    -
    -[
    -[ 1	-70		-51	 ] % <--- dc_gen is switched on
    -[ 2	-70		-51	 ] % <--- The DC current arrives at neuron,
    -[ 3	-67.6238	-51	 ] % <-	  but has not affected the potential yet
    -[ 4	-65.2947	-51	 ] %   |
    -[ 5	-63.0117	-51	 ] %    - First evaluation of the DC current. The
    -[ 6	-60.774		-51	 ] %      threshold potential stays constant,
    -[ 7	-58.5805	-51	 ] %      because it is at its resting level.
    -[ 8	-56.4305	-51	 ]
    -[ 9	-54.323		-51	 ]
    -[ 10	-52.2573	-51	 ]
    -[ 11	-50.2324	-12	 ] % <--- The membrane potential crossed the
    -[ 12	-48.2477	-12.3692 ] % <-   threshold potential the first time.
    -[ 13	-46.3023	-12.7346 ] %   |  The threshold potential is updated and
    -[ 14	-44.3953	-13.0965 ] %   |  the membrane potential is further evaluated
    -[ 15	-42.5262	-13.4548 ] %   |  without resetting.
    -[ 16	-40.694		-13.8095 ] %   |
    -[ 17	-38.8982	-14.1607 ] %    - The threshold potential decays double
    -[ 18	-37.1379	-14.5084 ] %      exponential towards its resting level.
    -[ 19	-35.4124	-14.8527 ]
    -[ 20	-33.7212	-15.1935 ]
    -[ 21	-32.0634	-15.531	 ]
    -]
    -
    -
    -exch assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_max_delay.sli b/testsuite/unittests/test_max_delay.sli
    deleted file mode 100644
    index 76323ec5c3..0000000000
    --- a/testsuite/unittests/test_max_delay.sli
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  test_max_delay.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_max_delay - sli script to test whether max_delay is updated correctly
    -
    -   Synopsis: (test_max_delay) run
    -
    -   Description:
    -   This script tests whether max_delay is updated correctly. It does this by checking
    -   whether the value is updated correctly in the static_synapse and in the root node.
    -
    -   FirstVersion: July 2007
    -   Author: Eppler
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -/delay 123.4 def
    -
    -/iaf_psc_alpha Create
    -/iaf_psc_alpha Create
    -1.0 delay Connect
    -
    -{ GetKernelStatus /max_delay get delay eq } assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_message.sli b/testsuite/unittests/test_message.sli
    deleted file mode 100644
    index 01554974c7..0000000000
    --- a/testsuite/unittests/test_message.sli
    +++ /dev/null
    @@ -1,365 +0,0 @@
    -/*
    - *  test_message.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -%% TEST IF message() CAN DISPLAY LARGE MESSAGES 
    -%% WITHOUT SEGMENTATION FAULT
    -
    -{
    -M_INFO (Hamlet)
    -
    -(ACT I
    -SCENE I. Elsinore. A platform before the castle.
    -
    -FRANCISCO at his post. Enter to him BERNARDO 
    -BERNARDO 
    -Who's there?
    -
    -FRANCISCO 
    -Nay, answer me: stand, and unfold yourself.
    -
    -BERNARDO 
    -Long live the king!
    -
    -FRANCISCO 
    -Bernardo?
    -
    -BERNARDO 
    -He.
    -
    -FRANCISCO 
    -You come most carefully upon your hour.
    -
    -BERNARDO 
    -'Tis now struck twelve; get thee to bed, Francisco.
    -
    -FRANCISCO 
    -For this relief much thanks: 'tis bitter cold,
    -And I am sick at heart.
    -
    -BERNARDO 
    -Have you had quiet guard?
    -
    -FRANCISCO 
    -Not a mouse stirring.
    -
    -BERNARDO 
    -Well, good night.
    -If you do meet Horatio and Marcellus,
    -The rivals of my watch, bid them make haste.
    -
    -FRANCISCO 
    -I think I hear them. Stand, ho! Who's there?
    -
    -Enter HORATIO and MARCELLUS
    -
    -HORATIO 
    -Friends to this ground.
    -
    -MARCELLUS 
    -And liegemen to the Dane.
    -
    -FRANCISCO 
    -Give you good night.
    -
    -MARCELLUS 
    -O, farewell, honest soldier:
    -Who hath relieved you?
    -
    -FRANCISCO 
    -Bernardo has my place.
    -Give you good night.
    -
    -Exit
    -
    -MARCELLUS 
    -Holla! Bernardo!
    -
    -BERNARDO 
    -Say,
    -What, is Horatio there?
    -
    -HORATIO 
    -A piece of him.
    -
    -BERNARDO 
    -Welcome, Horatio: welcome, good Marcellus.
    -
    -MARCELLUS 
    -What, has this thing appear'd again to-night?
    -
    -BERNARDO 
    -I have seen nothing.
    -
    -MARCELLUS 
    -Horatio says 'tis but our fantasy,
    -And will not let belief take hold of him
    -Touching this dreaded sight, twice seen of us:
    -Therefore I have entreated him along
    -With us to watch the minutes of this night;
    -That if again this apparition come,
    -He may approve our eyes and speak to it.
    -
    -HORATIO 
    -Tush, tush, 'twill not appear.
    -
    -BERNARDO 
    -Sit down awhile;
    -And let us once again assail your ears,
    -That are so fortified against our story
    -What we have two nights seen.
    -
    -HORATIO 
    -Well, sit we down,
    -And let us hear Bernardo speak of this.
    -
    -BERNARDO 
    -Last night of all,
    -When yond same star that's westward from the pole
    -Had made his course to illume that part of heaven
    -Where now it burns, Marcellus and myself,
    -The bell then beating one,--
    -
    -Enter Ghost
    -
    -MARCELLUS 
    -Peace, break thee off; look, where it comes again!
    -
    -BERNARDO 
    -In the same figure, like the king that's dead.
    -
    -MARCELLUS 
    -Thou art a scholar; speak to it, Horatio.
    -
    -BERNARDO 
    -Looks it not like the king? mark it, Horatio.
    -
    -HORATIO 
    -Most like: it harrows me with fear and wonder.
    -
    -BERNARDO 
    -It would be spoke to.
    -
    -MARCELLUS 
    -Question it, Horatio.
    -
    -HORATIO 
    -What art thou that usurp'st this time of night,
    -Together with that fair and warlike form
    -In which the majesty of buried Denmark
    -Did sometimes march? by heaven I charge thee, speak!
    -
    -MARCELLUS 
    -It is offended.
    -
    -BERNARDO 
    -See, it stalks away!
    -
    -HORATIO 
    -Stay! speak, speak! I charge thee, speak!
    -
    -Exit Ghost
    -
    -MARCELLUS 
    -'Tis gone, and will not answer.
    -
    -BERNARDO 
    -How now, Horatio! you tremble and look pale:
    -Is not this something more than fantasy?
    -What think you on't?
    -
    -HORATIO 
    -Before my God, I might not this believe
    -Without the sensible and true avouch
    -Of mine own eyes.
    -
    -MARCELLUS 
    -Is it not like the king?
    -
    -HORATIO 
    -As thou art to thyself:
    -Such was the very armour he had on
    -When he the ambitious Norway combated;
    -So frown'd he once, when, in an angry parle,
    -He smote the sledded Polacks on the ice.
    -'Tis strange.
    -
    -MARCELLUS 
    -Thus twice before, and jump at this dead hour,
    -With martial stalk hath he gone by our watch.
    -
    -HORATIO 
    -In what particular thought to work I know not;
    -But in the gross and scope of my opinion,
    -This bodes some strange eruption to our state.
    -
    -MARCELLUS 
    -Good now, sit down, and tell me, he that knows,
    -Why this same strict and most observant watch
    -So nightly toils the subject of the land,
    -And why such daily cast of brazen cannon,
    -And foreign mart for implements of war;
    -Why such impress of shipwrights, whose sore task
    -Does not divide the Sunday from the week;
    -What might be toward, that this sweaty haste
    -Doth make the night joint-labourer with the day:
    -Who is't that can inform me?
    -
    -HORATIO 
    -That can I;
    -At least, the whisper goes so. Our last king,
    -Whose image even but now appear'd to us,
    -Was, as you know, by Fortinbras of Norway,
    -Thereto prick'd on by a most emulate pride,
    -Dared to the combat; in which our valiant Hamlet--
    -For so this side of our known world esteem'd him--
    -Did slay this Fortinbras; who by a seal'd compact,
    -Well ratified by law and heraldry,
    -Did forfeit, with his life, all those his lands
    -Which he stood seized of, to the conqueror:
    -Against the which, a moiety competent
    -Was gaged by our king; which had return'd
    -To the inheritance of Fortinbras,
    -Had he been vanquisher; as, by the same covenant,
    -And carriage of the article design'd,
    -His fell to Hamlet. Now, sir, young Fortinbras,
    -Of unimproved mettle hot and full,
    -Hath in the skirts of Norway here and there
    -Shark'd up a list of lawless resolutes,
    -For food and diet, to some enterprise
    -That hath a stomach in't; which is no other--
    -As it doth well appear unto our state--
    -But to recover of us, by strong hand
    -And terms compulsatory, those foresaid lands
    -So by his father lost: and this, I take it,
    -Is the main motive of our preparations,
    -The source of this our watch and the chief head
    -Of this post-haste and romage in the land.
    -
    -BERNARDO 
    -I think it be no other but e'en so:
    -Well may it sort that this portentous figure
    -Comes armed through our watch; so like the king
    -That was and is the question of these wars.
    -
    -HORATIO 
    -A mote it is to trouble the mind's eye.
    -In the most high and palmy state of Rome,
    -A little ere the mightiest Julius fell,
    -The graves stood tenantless and the sheeted dead
    -Did squeak and gibber in the Roman streets:
    -As stars with trains of fire and dews of blood,
    -Disasters in the sun; and the moist star
    -Upon whose influence Neptune's empire stands
    -Was sick almost to doomsday with eclipse:
    -And even the like precurse of fierce events,
    -As harbingers preceding still the fates
    -And prologue to the omen coming on,
    -Have heaven and earth together demonstrated
    -Unto our climatures and countrymen.--
    -But soft, behold! lo, where it comes again!
    -
    -Re-enter Ghost
    -
    -I'll cross it, though it blast me. Stay, illusion!
    -If thou hast any sound, or use of voice,
    -Speak to me:
    -If there be any good thing to be done,
    -That may to thee do ease and grace to me,
    -Speak to me:
    -
    -Cock crows
    -
    -If thou art privy to thy country's fate,
    -Which, happily, foreknowing may avoid, O, speak!
    -Or if thou hast uphoarded in thy life
    -Extorted treasure in the womb of earth,
    -For which, they say, you spirits oft walk in death,
    -Speak of it: stay, and speak! Stop it, Marcellus.
    -
    -MARCELLUS 
    -Shall I strike at it with my partisan?
    -
    -HORATIO 
    -Do, if it will not stand.
    -
    -BERNARDO 
    -'Tis here!
    -
    -HORATIO 
    -'Tis here!
    -
    -MARCELLUS 
    -'Tis gone!
    -
    -Exit Ghost
    -
    -We do it wrong, being so majestical,
    -To offer it the show of violence;
    -For it is, as the air, invulnerable,
    -And our vain blows malicious mockery.
    -
    -BERNARDO 
    -It was about to speak, when the cock crew.
    -
    -HORATIO 
    -And then it started like a guilty thing
    -Upon a fearful summons. I have heard,
    -The cock, that is the trumpet to the morn,
    -Doth with his lofty and shrill-sounding throat
    -Awake the god of day; and, at his warning,
    -Whether in sea or fire, in earth or air,
    -The extravagant and erring spirit hies
    -To his confine: and of the truth herein
    -This present object made probation.
    -
    -MARCELLUS 
    -It faded on the crowing of the cock.
    -Some say that ever 'gainst that season comes
    -Wherein our Saviour's birth is celebrated,
    -The bird of dawning singeth all night long:
    -And then, they say, no spirit dares stir abroad;
    -The nights are wholesome; then no planets strike,
    -No fairy takes, nor witch hath power to charm,
    -So hallow'd and so gracious is the time.
    -
    -HORATIO 
    -So have I heard and do in part believe it.
    -But, look, the morn, in russet mantle clad,
    -Walks o'er the dew of yon high eastward hill:
    -Break we our watch up; and by my advice,
    -Let us impart what we have seen to-night
    -Unto young Hamlet; for, upon my life,
    -This spirit, dumb to us, will speak to him.
    -Do you consent we shall acquaint him with it,
    -As needful in our loves, fitting our duty?
    -
    -MARCELLUS 
    -Let's do't, I pray; and I this morning know
    -Where we shall find him most conveniently.
    -
    -Exeunt)
    -
    -message
    -} pass_or_die
    diff --git a/testsuite/unittests/test_min_delay.sli b/testsuite/unittests/test_min_delay.sli
    deleted file mode 100644
    index 186ff1cd04..0000000000
    --- a/testsuite/unittests/test_min_delay.sli
    +++ /dev/null
    @@ -1,48 +0,0 @@
    -/*
    - *  test_min_delay.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_min_delay - sli script to test whether min_delay is updated correctly
    -
    -   Synopsis: (test_min_delay) run
    -
    -   Description:
    -   This script tests whether min_delay is updated correctly. It does this by checking
    -   whether the value is updated correctly in the static_synapse and in the root node.
    -
    -   FirstVersion: July 2007
    -   Author: Eppler
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -/delay 2.5 def
    - 
    -/iaf_psc_alpha Create
    -/iaf_psc_alpha Create
    -1.0 delay Connect
    -
    -{ GetKernelStatus /min_delay get delay eq } assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_min_delay_tics_reset.sli b/testsuite/unittests/test_min_delay_tics_reset.sli
    deleted file mode 100644
    index 079474b56e..0000000000
    --- a/testsuite/unittests/test_min_delay_tics_reset.sli
    +++ /dev/null
    @@ -1,92 +0,0 @@
    -/*
    - *  test_min_delay_tics_reset.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -M_ERROR setverbosity
    -
    -
    -% Diesmann 080423
    -
    -(unittest) run
    -/unittest using
    -
    -1.0 /delay Set   % in ms 
    -
    --14 /min_exponent Set
    -
    -[0 min_exponent -4] Range {dexp} Map /hlist Set
    -
    -
    -/sim
    -{
    -
    - /h Set   
    -
    -
    -ResetKernel
    -
    -
    -<<  
    -     /tics_per_ms min_exponent neg dexp
    -     /resolution h
    -   >> SetKernelStatus
    -
    -/spike_recorder Create /sr Set
    -
    -
    -/iaf_psc_alpha_ps Create /neuron Set
    -
    -   % works if "100.0 delay" is inserted
    -   %              | 
    -   %     ----------
    -   %     |
    -   %     v
    -neuron sr Connect
    -
    -
    -1.0 Simulate
    -
    -
    -GetKernelStatus /min_delay get
    -
    -} def
    -
    -
    -
    -{
    - hlist {sim} Map 
    -
    - true exch {delay eq and } Fold % comment this line to see individual results
    -} 
    -
    -
    -assert_or_die
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -  
    \ No newline at end of file
    diff --git a/testsuite/unittests/test_mip_corrdet.sli b/testsuite/unittests/test_mip_corrdet.sli
    deleted file mode 100644
    index bad516e03b..0000000000
    --- a/testsuite/unittests/test_mip_corrdet.sli
    +++ /dev/null
    @@ -1,138 +0,0 @@
    -/*
    - *  test_mip_corrdet.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_mip_corrdet - sli script for testing mip_generator and correlation_detector
    -
    -Synopsis: (test_mip_corrdet) run -> compare cout with comments in file
    -
    -
    -Description:
    -  test_mip_corrdet.sli creates two poisson spiking sources with a rate of
    -  50 Hz each, which have half of their events in common. The correlation
    -  detector records these spike trains and calculates the raw cross correlation
    -  in a time window of +-100 ms with a bin width of 10 ms.
    -  After the simulation, the accumulated number of events in the bins is displayed.
    -
    -Author:  October 2007, Helias
    -SeeAlso: mip_generator, correlation_detector
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -
    -%
    -% Cross check generated with cross_check_test_mip_corrdet.py
    -%
    -[ 2335 2317 2364 2370 2376 2336 2308 2325 2292
    -  2393 4806 2378 2373 2356 2357 2400 2420 2325 2367 2338 2293 ] { cvd } Map /expected_hist Set
    -
    -/run_test
    -{
    - 0.1 /h Set        % computation step size in ms
    - 100000.0 /T Set   % total duration
    - 10.0 /delta_tau Set
    - 100.0 /tau_max Set
    - 0.5 /pc Set
    - 100.0 /nu Set
    -
    -ResetKernel
    -
    -userdict begin
    -
    -<<
    -    /local_num_threads 1
    -    /resolution h
    -    /overwrite_files true
    -    /rng_seed 12345
    ->> SetKernelStatus
    -
    -/mip_generator Create dup /mg Set
    -<<
    -    /rate nu
    -    /p_copy pc
    ->> SetStatus
    -
    -
    -/correlation_detector Create dup /cd Set
    -<<
    -    /tau_max   tau_max
    -    /delta_tau delta_tau
    ->> SetStatus
    -
    -/spike_recorder Create dup /sr Set
    -<< /time_in_steps true >> SetStatus
    -
    -/parrot_neuron Create /pn1 Set
    -/parrot_neuron Create /pn2 Set
    -
    -mg pn1 Connect
    -mg pn2 Connect
    -
    -pn1 sr Connect
    -pn2 sr Connect
    -
    -/static_synapse
    -<<
    -    /weight 1.0
    -    /receptor_type 0
    ->> SetDefaults
    -
    -pn1 cd Connect
    -
    -/static_synapse
    -<<
    -    /weight 1.0
    -    /receptor_type 1
    ->> SetDefaults
    -
    -pn2 cd Connect
    -
    -T Simulate
    -
    -cd /histogram get cva /hist Set
    -cd /n_events get cva arrayload ; /n2 Set /n1 Set
    -
    -n1 T tau_max sub div 1000.0 mul /lmbd1 Set
    -n2 T tau_max sub div 1000.0 mul /lmbd2 Set
    -
    -%cout
    -%(rate 1=) <- lmbd1 <- (\n) <-
    -%(rate 2=) <- lmbd2 <- (\n) <-
    -%(background =) <- lmbd1 lmbd2 mul delta_tau 1000 div mul T tau_max sub 1000 div mul <- (\n) <- pop
    -
    -%hist ==
    -%0 hist { add } forall ==
    -
    -
    -hist expected_hist eq
    -assert_or_die
    -
    -end
    -} def
    -
    -run_test
    -
    -endusing
    diff --git a/testsuite/unittests/test_multimeter.sli b/testsuite/unittests/test_multimeter.sli
    deleted file mode 100644
    index 14db5dc193..0000000000
    --- a/testsuite/unittests/test_multimeter.sli
    +++ /dev/null
    @@ -1,127 +0,0 @@
    -/*
    - *  test_multimeter.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_multimeter - Minimal test for correct multimeter setup
    -
    -Synopsis: (test_multimeter) run -> NEST exits if test fails
    -
    -Description:
    -  This test provides a minimal check for correct multimeter setup.
    -
    -  For each model with a "recordables" property, it creates an instance,
    -  connects a multimeter to them requestin all properties, simulates briefly
    -  and checks that the correct number of data items is collected for each
    -  recordable.
    -
    -  This test mainly ensures that init_buffers_() initializes the data logger.
    -  If a developer has forgotten to add recordables to get_status(), this test
    -  will ignore the pertaining neuron.
    -
    -Author: Hans Ekkehard Plesser, 2010-05-05
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% use power-of-two resolution to avoid roundof problems
    -/res -3 dexp def
    -
    -% simulation time
    -/simtime 100. def
    -
    -% recording interval --- different from default to check setting works
    -/recint 2. def
    -
    -% number of data points expected
    -/n_data simtime recint div cvi 1 sub def
    -
    -{
    -  GetKernelStatus /node_models get
    -  {
    -    /model Set
    -
    -    % some logging information to make failure localization easier
    -    (Testing model: ) model cvs join ==
    -
    -    ResetKernel
    -    << /resolution res >> SetKernelStatus
    -
    -    % get recordables, if none, return true
    -    model GetDefaults dup
    -    /recordables known
    -    {
    -      % set up for simulation and simulate
    -      /recordables get /recs Set
    -      /n model Create def
    -
    -      % if the model is a compartmental model,
    -      % we need to add at least a root compartment
    -      model GetDefaults dup
    -      /compartments known
    -      {
    -        n
    -        <<
    -          /compartments << /parent_idx -1  >>
    -        >> SetStatus
    -      }
    -      if
    -
    -      /mm /multimeter << /interval recint /record_from recs >> Create def
    -      mm n Connect
    -      simtime Simulate
    -
    -      % check results
    -      /result mm /events get def
    -      true
    -      recs % for each recordable, see if we have correct number of data points
    -      {
    -        result exch get cva
    -        length n_data eq
    -	and
    -      }
    -      Fold
    -    }
    -    { ; true }
    -    ifelse
    -  }
    -  Map
    -
    -  % see if all entries are true
    -  true exch { and } Fold
    -
    -}
    -assert_or_die
    -
    -% make sure multimeter cannot be frozen
    -{
    -  ResetKernel
    -  /multimeter Create << /frozen true >> SetStatus
    -} fail_or_die
    -
    -% but this should pass
    -{
    -  ResetKernel
    -  /multimeter Create << /frozen false >> SetStatus
    -} pass_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_multimeter_freeze_thaw.sli b/testsuite/unittests/test_multimeter_freeze_thaw.sli
    deleted file mode 100644
    index 781ba826be..0000000000
    --- a/testsuite/unittests/test_multimeter_freeze_thaw.sli
    +++ /dev/null
    @@ -1,171 +0,0 @@
    -/*
    - *  test_multimeter_freeze_thaw.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_multimeter_freeze_thaw - test if multimeter handles frozen nodes properly
    -
    -Synopsis: (test_multimeter_freeze_thaw.sli) run -> dies if assertion fails
    -
    -Description:
    -1. Record from neuron initially frozen, then thawed, then frozen, then thawed. See
    -   that correct number of data points collected.
    -2. Same as above, simultaneously record from thawed node.
    -
    -Author: Plesser
    -FirstVersion: 2011-02-11
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -/clear_error
    -{
    -  counttomark npop % pop all but mark
    -  errordict begin /newerror false def end
    -} def
    -
    -% integer_data --- return array with only unique entries in ascending order
    -%                  data must be intergers
    -%
    -/unique_ascending
    -{
    -  /d << >> def
    -  { cvs cvlit d exch 0 put } forall
    -  d keys { cvs cvi } Map Sort
    -}
    -def
    -
    -% sender data --- split data by sender
    -/split_data
    -{
    -  /data Set
    -  dup { cvs cvlit } Map /senders Set
    -  unique_ascending { cvs cvlit } Map /us Set
    -  /res << >> def
    -  us { res exch [] put } forall
    -  [ data senders ] { /key Set res key get exch append res exch key exch put  } ScanThread
    -  res
    -}
    -def
    -
    -% times data --- times and data have corresponding entries; entries in
    -%                data with equal times are summed.
    -/sum_by_times
    -{
    -  /data Set
    -  dup { cvs cvlit } Map /times Set
    -  unique_ascending { cvs cvlit } Map /utimes Set
    -  /res << >> def
    -  utimes { res exch 0 put } forall
    -  [ data times ] { /key Set res key get add res exch key exch put  } ScanThread
    -  [ ] utimes { res exch get append } forall
    -}
    -def
    -
    -
    -% first test:
    -% one noded, cycled
    -{
    -  << >> begin
    -   /build_net {
    -     /iaf_psc_alpha << /I_e 50.0 >> SetDefaults
    -     /n  /iaf_psc_alpha Create def
    -     /mm /multimeter << /record_from [ /V_m ] /interval 0.5 >> Create def
    -     mm n Connect
    -   } def
    -
    -   % sim with freeze/thaw
    -   ResetKernel
    -   build_net
    -   n << /frozen true >> SetStatus
    -   5. Simulate
    -   n << /frozen false >> SetStatus
    -   5. Simulate
    -   n << /frozen true >> SetStatus
    -   5. Simulate
    -   n << /frozen false >> SetStatus
    -   5. Simulate
    -   mm /events get /V_m get cva /fV Set
    -
    -   % simulate for same equivalent time (ie thawed time only) without freezing
    -   ResetKernel
    -   build_net
    -   10. Simulate
    -   mm /events get /V_m get cva /rV Set
    -
    -   fV rV eq  % both should give same result
    -
    -  end
    -} assert_or_die
    -
    -% second test:
    -% two nodes, one cycled
    -{
    -  << >> begin
    -   /build_net {
    -     /iaf_psc_alpha << /I_e 50.0 >> SetDefaults
    -     /nc /iaf_psc_alpha Create def
    -     /np /iaf_psc_alpha Create def
    -     /mm /multimeter << /record_from [ /V_m ]
    -                        /interval 0.5
    -			/time_in_steps true >> Create def
    -     mm nc Connect
    -     mm np Connect
    -   } def
    -
    -   % sim with freeze/thaw
    -   ResetKernel
    -   build_net
    -   nc << /frozen true >> SetStatus
    -   5. Simulate
    -   nc << /frozen false >> SetStatus
    -   5. Simulate
    -   nc << /frozen true >> SetStatus
    -   5. Simulate
    -   nc << /frozen false >> SetStatus
    -   5. Simulate
    -
    -   mm /events get /ev Set
    -   ev /times   get cva /tall Set
    -   ev /senders get cva /sall Set
    -   ev /V_m     get cva /Vall Set
    -   % check event times by sender
    -   sall tall split_data dup
    -   np 0 get cvs cvlit get [5 190 5] Range eq exch
    -   nc 0 get cvs cvlit get [55 100 5] Range [155 190 5] Range join eq
    -   and
    -
    -   % check event data by sender---frozen data equal to first points in non-frozen
    -   sall Vall split_data dup
    -   nc 0 get cvs cvlit get /Vc Set
    -   np 0 get cvs cvlit get Vc length Take Vc eq
    -   and
    -
    -  end
    -} assert_or_die
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_multimeter_offset.sli b/testsuite/unittests/test_multimeter_offset.sli
    deleted file mode 100644
    index c19a608888..0000000000
    --- a/testsuite/unittests/test_multimeter_offset.sli
    +++ /dev/null
    @@ -1,348 +0,0 @@
    -/*
    - *  test_multimeter_offset.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_multimeter_offset - Test if offset attribute works properly
    - 
    -Synopsis: (test_multimeter_offset) run -> NEST exits if test fails
    -
    -Description:
    -  This test checks if the offset attribute of multimeter works as expected;
    -  contains 3 tests:
    -
    -  1) checks if recorded times are indeed relative to an offset, and the first
    -     sampled time point is the offset itself
    -  2) check if data logger is initialized correctly
    -  3) ensures offset can only be set before the multimeter is connected to nodes
    -  4) ensures offset works correctly even if origin, start and stop are modified
    -  5) ensures offsets behave correctly when we create a second multimeter after an
    -     initial similation
    -  6) ensures that offset behave correctly after initial simulation time
    -  7) ensures that multimeter with offset behave correctly after initial simulation
    -     time longer than offset
    -
    -Author: Barna Zajzon, 2017-03-10, Stine B. Vennemo, September 2020
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -% use power-of-two resolution to avoid roundof problems
    -/res -3 dexp def
    -
    -
    -% Test 1
    -% checks if recorded times are indeed relative to an offset
    -{
    -  (Test 1) ==
    -
    -  /simtime 15. def % simulation time
    -  /recoffs 5.  def % offset time --- different from default
    -  /recint  3.  def % recording interval --- different from default
    -
    -  /recs    [/V_m]       def % recording devices
    -  /refdata [5. 8. 11. 14.] def % offset data
    -
    -  ResetKernel
    -  << /resolution res >> SetKernelStatus
    -
    -  /n /iaf_psc_alpha Create def
    -
    -  /mm /multimeter << /interval recint /offset recoffs /record_from recs >>
    -    Create def
    -
    -  % connect and simulate
    -  mm n Connect
    -  simtime Simulate
    -
    -  % check results
    -  /result mm /events get def
    -  result /times get cva
    -
    -  % compare to reference data
    -  refdata eq
    -}
    -assert_or_die
    -
    -
    -% Test 2
    -% check if data logger is initialized correctly
    -{
    -  (Test 2) ==
    -
    -  /simtimeinit  10. def % initial simulation time
    -  /simtime      20. def % second simulation time
    -  /recoffs      5.  def % offset time --- different from default
    -  /recint       3.  def % recording interval --- different from default
    -  /recstart     20. def % start of recording window
    -  /recstop      30. def % end of recording window
    -
    -  /recs    [/V_m]        def % recording devices
    -  /refdata [23. 26. 29.] def % offset data
    -
    -  ResetKernel
    -  << /resolution res >> SetKernelStatus
    -
    -  /n /iaf_psc_alpha Create def
    -
    -  /mm /multimeter << /start recstart /stop recstop
    -    /interval recint /offset recoffs /record_from recs >> Create def
    -
    -  % connect and simulate
    -  mm n Connect
    -  simtimeinit Simulate
    -
    -  % create second multimeter
    -  /mmtwo /multimeter << /start recstart /stop recstop
    -    /interval recint /offset recoffs /record_from recs >> Create def
    -
    -  % connect second multimeter and simulate further
    -  mmtwo n Connect
    -  simtime Simulate
    -
    -  % check results
    -  /result mm /events get def
    -  result /times get cva
    -
    -  % compare first multimeter to reference data
    -  refdata eq
    -
    -  % extract results for second multimeter
    -  /resulttwo mmtwo /events get def
    -  resulttwo /times get cva
    -
    -  % compare second multimeter to reference data
    -  refdata eq
    -}
    -assert_or_die
    -
    -
    -% Test 3
    -% make sure offset cannot be changed after connecting to a node
    -{
    -  (Test 3) ==
    -
    -  ResetKernel
    -  
    -  % create multimeter and node
    -  /mm /multimeter Create def
    -  /neuron /iaf_psc_exp Create def
    -
    -  % connect
    -  mm neuron Connect
    -
    -  % changing offset should fail
    -  mm << /offset 5. >> SetStatus
    -}
    -fail_or_die
    -
    -
    -% Test 4
    -% ensure offset behaves correctly with respect to origin / start / stop; set start and stop
    -% different from their initial values, simulate, check recordings. Then modify origin,
    -% simulate again, and check for consistency.
    -{
    -  (Test 4) ==
    -
    -  /recint  3. def
    -  /recoffs 5. def
    -  /start   3. def
    -  /stop    15. def
    -  /origin  20. def
    -  /simtime 20. def
    -
    -  /recs    [/V_m] def
    -  /times_1 [5. 8. 11. 14.] def
    -  /times_2 [5. 8. 11. 14. 26. 29. 32. 35.] def
    -
    -  ResetKernel
    -  << /resolution res >> SetKernelStatus
    -
    -  % create multimeter and node
    -  /mm /multimeter
    -    << /interval recint /offset recoffs /start start /stop stop /record_from recs >>
    -    Create def
    -  /neuron /iaf_psc_exp Create def
    -
    -  % connect and simulate
    -  mm neuron Connect
    -  simtime Simulate
    -
    -  % check results
    -  /result mm /events get /times get cva
    -
    -  % compare to first reference data
    -  times_1 eq
    -
    -  % change origin; this shouldn't affect the offset but only shift start-stop window
    -  mm << /origin origin >> SetStatus
    -  simtime Simulate
    -
    -  % check results
    -  /result mm /events get /times get cva
    -
    -  % compare to extended reference
    -  times_2 eq
    -}
    -assert_or_die
    -
    -% Test 5
    -% Ensure offsets behave correctly when we create a second multimeter after an initial similation.
    -% Create two multimeters; one before initial simtime, one after. The offset and start time indicates
    -% that all samples should be taken from the second simulation, and the recordings from the two
    -% multimeters should be equal.
    -{
    -  (Test 5) ==
    -
    -  /initsimtime 10. def
    -  /simtime     20. def
    -  /recoffs      1. def
    -  /recint       3. def
    -  /recstart    10. def
    -  /recstop     30. def
    -
    -  /resolution 0.1 def
    -
    -  ResetKernel
    -
    -  << /resolution resolution >> SetKernelStatus
    -
    -  % Create neuron
    -  /neuron /iaf_psc_exp Create def
    -
    -  % Create multimeter
    -  /mm1 /multimeter Create def
    -  mm1 << /record_from [/V_m]
    -         /interval recint
    -         /offset recoffs
    -         /start recstart
    -         /stop recstop
    -      >> SetStatus
    -
    -  mm1 neuron << /rule /all_to_all >> << /delay 0.1 >> Connect
    -
    -  % Init simtime, nothing should be recorded
    -  initsimtime Simulate
    -
    -  % Create second multimeter
    -  /mm2 /multimeter Create def
    -  mm2 << /record_from [/V_m]
    -         /interval recint
    -         /offset recoffs
    -         /start recstart
    -         /stop recstop
    -      >> SetStatus
    -
    -  mm2 neuron << /rule /all_to_all >> << /delay 0.1 >> Connect
    -
    -  % Simulate, all recordings should be from here
    -  simtime Simulate
    -
    -  /times1 mm1 /events get /times get def
    -  /times2 mm2 /events get /times get def
    -
    -  times1 times2 eq
    -}
    -assert_or_die
    -
    -% Test 6
    -% Ensure that offset behave correctly after initial simulation time. The sample should
    -% occur at 'offset' when initial simulation time is less than offset and we have not recorded
    -% any parameters yet.
    -{
    -  (Test 6) ==
    -
    -  /initsimtime 110.  def
    -  /simtime     250.  def
    -  /interval     60.  def
    -  /offset      170.3 def
    -
    -  /resolution 0.1 def
    -
    -  /reference_solution [offset initsimtime simtime add interval] Range def
    -
    -  ResetKernel
    -
    -  << /resolution resolution >> SetKernelStatus
    -
    -  % Create neuron
    -  /neuron /iaf_psc_exp Create def
    -
    -  initsimtime Simulate
    -
    -  % Create multimeter
    -  /mm /multimeter Create def
    -  mm << /record_from [/V_m]
    -        /interval interval
    -        /offset offset
    -      >> SetStatus
    -
    -  mm neuron << /rule /all_to_all >> << /delay 0.1 >> Connect
    -
    -  simtime Simulate
    -
    -  /time mm /events get /times get def
    -  time cva reference_solution eq
    -}
    -assert_or_die
    -
    -% Test 7
    -% Ensure that multimeter with offset behave correctly after initial simulation time longer than offset.
    -% First recorded event should be between init simtime and interval.
    -{
    -  (Test 7) ==
    -
    -  /initsimtime 250.  def  % initial simulation time longer than offset
    -  /simtime     250.  def
    -  /interval     60.  def
    -  /offset      170.3 def
    -
    -  /resolution 0.1 def
    -
    -  /reference_solution [offset interval add interval add initsimtime simtime add interval] Range def
    -
    -  ResetKernel
    -
    -  << /resolution resolution >> SetKernelStatus
    -
    -  % Create neuron
    -  /neuron /iaf_psc_exp Create def
    -
    -  initsimtime Simulate
    -
    -  % Create multimeter
    -  /mm /multimeter Create def
    -  mm << /record_from [/V_m]
    -        /interval interval
    -        /offset offset
    -      >> SetStatus
    -
    -  mm neuron << /rule /all_to_all >> << /delay 0.1 >> Connect
    -
    -  simtime Simulate
    -
    -  /time mm /events get /times get def
    -  time cva reference_solution eq
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_multimeter_stepping.sli b/testsuite/unittests/test_multimeter_stepping.sli
    deleted file mode 100644
    index c83a44ab53..0000000000
    --- a/testsuite/unittests/test_multimeter_stepping.sli
    +++ /dev/null
    @@ -1,133 +0,0 @@
    -/*
    - *  test_multimeter_stepping.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_multimeter_stepping - test if multimeter returns same values for stepped simulation
    -
    -Synopsis: (test_multimeter_stepping.sli) run -> dies if assertion fails
    -
    -Description:
    -The script checks all models providing a "recordables" entry in their
    -status dict.  It creates a multimeter, sets it to record from all
    -recordables. The neuron receives Poisson input. This is done once for
    -a single 50 x MinDelay simulation and once for 50 subsequent MinDelay simulations. The test passes
    -if both cases produce identical results.
    -
    -Author: Plesser
    -FirstVersion: 2010-10-05
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/skip_list [ ] def
    -
    -/clear_error
    -{
    -  counttomark npop % pop all but mark
    -  errordict begin /newerror false def end
    -} def
    -
    -
    -% single simulation run
    -% arg: model
    -% arg: continuous
    -/run_sim
    -{
    -  /continuous Set
    -  /model Set
    -  ResetKernel
    -  model GetDefaults /recordables get /recs Set
    -  /n model Create def
    -  /mm /multimeter << /record_from recs /interval 0.1  >> Create def
    -
    -  mark
    -  {
    -    mm n Connect
    -    /pg /poisson_generator << /rate 1e4 >> Create def
    -    pg n Connect
    -    /minDelay GetKernelStatus /min_delay get def
    -    continuous
    -    {
    -      50 minDelay mul Simulate
    -    }
    -    {
    -      50 { minDelay Simulate } repeat
    -    }
    -    ifelse
    -    mm /events get [ recs ] get { cva } Map
    -  }
    -  stopped
    -  {
    -    clear_error
    -    pop % remove mark
    -    []
    -  }
    -  {
    -    exch pop   % remove mark
    -  }
    -  ifelse
    -
    -} def
    -
    -% Execute test for one model
    -% Argument: model name
    -% Result: true or false
    -% Returns true if model does not have recordables
    -/run_tests
    -{
    -  /model Set
    -  model GetDefaults
    -  /recordables known
    -  {
    -    (Testing: ) =only model =only
    -    model true  run_sim /res1 Set
    -    model false run_sim /res2 Set
    -
    -    % should have two arrays of events results on the stack now, should be equal
    -    res1 res2 eq
    -
    -    dup { ( ... ok) == } { ( ... FAIL) ==  } ifelse
    -   }
    -  {
    -    true
    -  }
    -  ifelse
    -}
    -def
    -
    -{
    -  GetKernelStatus /node_models get {
    -    dup skip_list exch MemberQ not
    -    {
    -      run_tests
    -    }
    -    {
    -      pop true  % pop model, define as true
    -    } ifelse
    -   } Map
    -   true exch { and } Fold
    -}
    -assert_or_die
    diff --git a/testsuite/unittests/test_multimeter_support.sli b/testsuite/unittests/test_multimeter_support.sli
    deleted file mode 100644
    index 5d3a87104e..0000000000
    --- a/testsuite/unittests/test_multimeter_support.sli
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/*
    - *  test_multimeter_support.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_multimeter_support - test if multimeter support works in neurons
    -
    -Synopsis: (test_multimeter_support.sli) run -> dies if assertion fails
    -
    -Description:
    -The script checks all modes providing a "recordables" entry in their status dict.
    -It creates a multimeter, sets it to record from all recordables and checks whether
    -the correct amount of data is collected. It does not check the content of the data
    -collected.
    -Author: Plesser
    -FirstVersion: 2010-10-01
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -% Execute test for one model
    -% Argument: model name
    -% Result: true or false
    -% Returns true if model does not have recordables
    -/run_test
    -{
    -  /model Set
    -
    -  model GetDefaults dup
    -  /recordables known
    -  {
    -    /recordables get /recs Set
    -    /n model Create def
    -
    -    % if the model is a compartmental model,
    -    % we need to add at least a root compartment
    -    model GetDefaults dup
    -    /compartments known
    -    {
    -      n
    -      <<
    -        /compartments << /parent_idx -1  >>
    -      >> SetStatus
    -    }
    -    if
    -
    -    /mm /multimeter << /record_from recs >> Create def
    -    mm n Connect
    -    10.0 Simulate
    -    mm /events get [ recs ] get { cva length 9 eq } Map
    -    true exch { and } Fold
    -  }
    -  {
    -    pop
    -    true
    -  }
    -  ifelse
    -}
    -def
    -
    -{
    -  GetKernelStatus /node_models get { run_test } Map
    -  true exch { and } Fold
    -}
    -assert_or_die
    -
    diff --git a/testsuite/unittests/test_multiple_multimeter.sli b/testsuite/unittests/test_multiple_multimeter.sli
    deleted file mode 100644
    index bbb231567d..0000000000
    --- a/testsuite/unittests/test_multiple_multimeter.sli
    +++ /dev/null
    @@ -1,156 +0,0 @@
    -/*
    - *  test_multiple_multimeter.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_multiple_multimeter - test support for multiple multimeters
    -
    -Synopsis: (test_multiple_multimeter.sli) run -> dies if assertion fails
    -
    -Description:
    -This script tests support for multiple multimeters:
    -- Connections created must have receptor != 0
    -  (this test is crucial to find models that have not been modified from
    -
    -  inline
    -  port aeif_cond_alpha::connect_sender(DataLoggingRequest& dlr,
    -				      port receptor_type)
    -  {
    -    if (receptor_type != 0)
    -      throw UnknownReceptorType(receptor_type, get_name());
    -    B_.logger_.connect_logging_device(dlr, recordablesMap_);
    -    return 0;
    -  }
    -
    -  to
    -
    -  inline
    -  port aeif_cond_alpha::connect_sender(DataLoggingRequest& dlr,
    -				      port receptor_type)
    -  {
    -    if (receptor_type != 0)
    -      throw UnknownReceptorType(receptor_type, get_name());
    -    return B_.logger_.connect_logging_device(dlr, recordablesMap_);
    -  }
    -
    -- Check that one multimeter cannot be connected more than once to
    -  one neuron
    -
    -- Multiple meters with identcial configurations connected to the
    -  same neuron record identical data
    -
    -Author: Plesser
    -FirstVersion: 2011-02-04
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/* The following models do not support multimeter
    -*/
    -/skip_list [ ] def
    -
    -/clear_error
    -{
    -  counttomark npop % pop all but mark
    -  errordict begin /newerror false def end
    -} def
    -
    -
    -% first test:
    -% check that we can connect one multimeter once
    -{
    -  ResetKernel
    -  << >> begin
    -    /mm /multimeter Create def
    -    /n /iaf_psc_alpha Create def
    -    mm n Connect
    -  end
    -} pass_or_die
    -
    -% second test:
    -% check that we cannot connect one multimeter twice
    -{
    -  ResetKernel
    -  << >> begin
    -    /mm /multimeter Create def
    -    /n /iaf_psc_alpha Create def
    -    mm n Connect
    -    mm n Connect
    -  end
    -} fail_or_die
    -
    -
    -% third test:
    -% check that connections from two multimeters get
    -% receptors 1 and 2 for all models with recordables
    -{
    -  << >> begin
    -    GetKernelStatus /node_models get
    -    {
    -      ResetKernel
    -      /model Set
    -      model GetDefaults /recordables known
    -      {
    -	/n model Create def
    -        /mmd << /record_from n /recordables get >> def
    -        /mm1 /multimeter mmd Create def
    -        /mm2 /multimeter mmd Create def
    -        mm1 n Connect
    -        mm2 n Connect
    -        [mm1 mm2] { /m Set << /source m >> GetConnections
    -                    arrayload 1 eq assert /receptor get } Map
    -        [1 2] eq
    -      }
    -      { true }
    -      ifelse
    -    } Map
    -
    -    true exch { and } Fold
    -} assert_or_die
    -
    -% fourth test:
    -% run simulation to see that two multimeters record same stuff
    -{
    -  ResetKernel
    -  << >> begin
    -    /recvars [ /V_m ] def
    -    /n /iaf_psc_alpha Create def
    -    /mm1 /multimeter << /record_from recvars >> Create def
    -    /mm2 /multimeter << /record_from recvars >> Create def
    -    mm1 n Connect
    -    mm2 n Connect
    -    /pge /poisson_generator << /rate 10000. >> Create def
    -    /pgi /poisson_generator << /rate 10000. >> Create def
    -    pge n  1.0 1.0 Connect
    -    pgi n -1.0 1.0 Connect
    -    100 Simulate
    -    /e1 mm1 /events get def
    -    /e2 mm2 /events get def
    -    recvars { /rv Set [ e1 e2 ] { rv get cva } Map arrayload ; eq } Map
    -    true exch { and } Fold
    -  end
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_multiple_random_source_stepping.sli b/testsuite/unittests/test_multiple_random_source_stepping.sli
    deleted file mode 100644
    index 0f1ca2837e..0000000000
    --- a/testsuite/unittests/test_multiple_random_source_stepping.sli
    +++ /dev/null
    @@ -1,89 +0,0 @@
    -/*
    - *  test_multiple_random_source_stepping.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_multiple_random_source_stepping - test NEST's behavior when using multiple random sources and different stepping schemes
    -
    -Synopsis: (test_multiple_random_source_stepping.sli) run -> dies if assertion fails
    -
    -Description:
    -The script checks whether simulations of a network with more than one node consuming random numbers
    -creates identical output under different stepping regimes, e.g., 1x10.0ms vs 100x0.1ms.
    -Per r9131, this tests works well only if the stepping interval is a multiple of the minimal delay.
    -Otherwise, random numbers will be fed to consumers in different orders, as nodes are updated for 
    -parts of minimal delay periods only.
    -
    -Author: Plesser
    -FirstVersion: 2011-01-20
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -/clear_error
    -{ 
    -  counttomark npop % pop all but mark
    -  errordict begin /newerror false def end
    -} def
    -
    -
    -% single simulation run
    -% arg: steppings
    -% arg: interval
    -/run_sim
    -{
    -  /interval Set
    -  /steppings Set
    -  ResetKernel
    -  /pg1 /poisson_generator_ps << /rate 1000. >> Create def
    -  /pg2 /poisson_generator_ps << /rate 1000. >> Create def
    -  /sr1 /spike_recorder Create def
    -  /sr2 /spike_recorder Create def
    -  pg1 sr1 Connect
    -  pg2 sr2 Connect
    -
    -  steppings { interval Simulate } repeat
    -  sr1 /events get /times get cva
    -  sr2 /events get /times get cva
    -  2 arraystore
    -}
    -def				   
    -
    -{
    -   1 10.0 run_sim /ref Set
    -   5  2.0 run_sim
    -  10  1.0 run_sim
    -  2 arraystore
    -  true exch { ref eq and } Fold
    -  
    -  % the following two will lead to different results and are thus excluded
    -  %  20  0.5 run_sim
    -  % 100  0.1 run_sim  
    -  %4 arraystore
    -  %true exch { ref eq and } Fold
    -} 
    -assert_or_die
    -
    diff --git a/testsuite/unittests/test_multisynapse_models.sli b/testsuite/unittests/test_multisynapse_models.sli
    deleted file mode 100644
    index 508aee51de..0000000000
    --- a/testsuite/unittests/test_multisynapse_models.sli
    +++ /dev/null
    @@ -1,104 +0,0 @@
    -/*
    - *  test_multisynapse_models.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -   Name: testsuite::test_multisynapse_models - test properties of multisynapse models
    -
    -   Synopsis: (test_multisynapse_models) run
    -
    -   Description:
    -   For all models with names ending in _multisynapse, this test checks
    -
    -   - that the neuron does not accept input to rport 0
    -   - that the neuron will accept input to rport 1 in default config
    -   - that it is possible to set tau_syn/E_rev to empty vectors
    -
    -   SeeAlso:
    -
    -   FirstVersion: December 2016
    -   Author: Hans Ekkehard Plesser
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_WARNING setverbosity
    -
    -% select multisynapse models
    -/models
    - GetKernelStatus /node_models get
    - { cvs dup length neg -13 max Take (_multisynapse) eq } Select
    - def
    -
    -% test 1 --- no connection to rport 0
    -( == Test 1 == ) =
    -ResetKernel
    -models
    -{
    -  dup ==
    -  { Create dup Connect } fail_or_die
    -  4 npop  % remove debris after failed test
    -} forall
    -
    -{ count 0 eq } assert_or_die  % check for empty stack
    -
    -% test 2 --- connect to default port
    -( == Test 2 == ) =
    -ResetKernel
    -models
    -{
    -  exch dup ==
    -  {
    -    Create dup << >> << /receptor_type 1 >> Connect
    -
    -    1 add  % index + 1 == num expected connections
    -    GetKernelStatus /num_connections get eq
    -  } assert_or_die
    -} forallindexed
    -
    -{ count 0 eq } assert_or_die  % check for empty stack
    -
    -% test 3 --- empty tau_syn/E_rev
    -( == Test 3 == ) =
    -<< >> begin
    -ResetKernel
    -models
    -{
    -  dup ==
    -  {
    -    Create /n Set
    -    /sdict << >> def
    -    sdict begin
    -    [ /E_rev /tau_syn /tau_rise /tau_decay ]
    -    {
    -      dup n 0 get exch known { [] def } { pop } ifelse
    -    } forall
    -    end
    -    n sdict SetStatus
    -    true sdict keys { n exch get empty exch ; and } Fold
    -  } assert_or_die
    -} forall
    -end
    -
    -{ count 0 eq } assert_or_die  % check for empty stack
    -
    -endusing
    diff --git a/testsuite/unittests/test_multithreading.sli b/testsuite/unittests/test_multithreading.sli
    deleted file mode 100644
    index 09dde51c92..0000000000
    --- a/testsuite/unittests/test_multithreading.sli
    +++ /dev/null
    @@ -1,90 +0,0 @@
    -/*
    - *  test_multithreading.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_multithreading - sli script for several tests regarding multithreading
    -
    -Synopsis: (test_multithreading) run
    -
    -Description:
    -This is a simple testscript to test if multithreading is working
    -correctly. The following things are tested:
    -  * Does setting the number of threads to x result in x threads?
    -  * Does ResetKernel reset the number of threads to 1?
    -  * Does default node distribution (modulo) work as expected?
    -  * Are spikes transmitted between threads as expected?
    -
    -The data collection over threads is tested in a separate script. See
    -SeeAlso key below.
    -
    -SeeAlso:testsuite::test_multithreading_devices
    -
    -Author: Jochen Martin Eppler
    -FirstVersion: July 2008 
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -/threads 4 def
    -
    -% check if setting the number of threads works
    -<< /local_num_threads threads >> SetKernelStatus
    -GetKernelStatus /local_num_threads get threads eq assert_or_die
    -
    -% check ResetKernel
    -ResetKernel
    -GetKernelStatus /local_num_threads get 1 eq assert_or_die
    -
    -% use 4 threads again
    -<< /local_num_threads threads >> SetKernelStatus
    -
    -% check if modulo node distribution works
    -/iaf_psc_alpha 4 Create {
    -  dup threads mod exch [ /vp ] get eq assert_or_die
    -} forall
    -
    -
    -% check if spikes are transmitted between threads
    -ResetKernel
    -/t_spike 1. def 
    -/delay 1. def
    -<< /local_num_threads threads >> SetKernelStatus
    -/sg /spike_generator << /spike_times [ t_spike ] >> Create def
    -/pA /parrot_neuron threads Create def
    -/pB /parrot_neuron threads Create def
    -/sr /spike_recorder Create def
    -
    -sg pA /all_to_all << /delay delay >> Connect
    -pA pB /all_to_all << /delay delay >> Connect
    -pB sr Connect
    -
    -t_spike delay 3 mul add Simulate
    -
    -% expectation: each parrot in pA sends one spike to each parrot in pB,
    -%              thus in total threads**2 spikes in pB, all at t_spike + 2*delay
    -sr /events get /times get cva
    -[ threads dup mul ] { ; t_spike delay 2 mul add } Table
    -eq assert_or_die
    diff --git a/testsuite/unittests/test_neurons_handle_multiplicity.sli b/testsuite/unittests/test_neurons_handle_multiplicity.sli
    deleted file mode 100644
    index 04df69e6bf..0000000000
    --- a/testsuite/unittests/test_neurons_handle_multiplicity.sli
    +++ /dev/null
    @@ -1,215 +0,0 @@
    -/*
    - *  test_neurons_handle_multiplicity.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/*
    - * Test that all neuron models heed the multiplicity of incoming spikes.
    - *
    - * This test inputs two spikes at the same time into each neuron.
    - * The spikes arrive once as one event with multiplicity two, once
    - * as two events with multiplicity one. The membrane potential after
    - * the spikes have arrived must be identical in both cases.
    - *
    - * This tests solves Github issue #80.
    - *
    - * Hans Ekkehard Plesser, 2016-03-03
    - *
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -% The following models will not be tested:
    -/skip_list [
    -             /ginzburg_neuron             % binary neuron
    -             /mcculloch_pitts_neuron      % binary neuron
    -             /erfc_neuron                 % binary neuron
    -             /lin_rate_ipn                % rate neuron
    -             /lin_rate_opn                % rate neuron
    -             /tanh_rate_ipn               % rate neuron
    -             /tanh_rate_opn               % rate neuron
    -             /threshold_lin_rate_ipn      % rate neuron
    -             /threshold_lin_rate_opn      % rate neuron
    -             /siegert_neuron              % rate neuron
    -             /gauss_rate_ipn              % rate neuron
    -             /sigmoid_rate_gg_1998_ipn    % rate neuron
    -             /sigmoid_rate_ipn            % rate neuron
    -             /rate_transformer_lin             % rate transformer
    -             /rate_transformer_tanh            % rate transformer
    -             /rate_transformer_threshold_lin   % rate transformer
    -             /rate_transformer_gauss           % rate transformer
    -             /rate_transformer_sigmoid         % rate transformer
    -             /rate_transformer_sigmoid_gg_1998 % rate transformer
    -             /parrot_neuron
    -             /parrot_neuron_ps
    -             /cm_default                % cannot readout V_m directly
    -             /iaf_cond_alpha_mc         % cannot readout V_m directly
    -             /pp_cond_exp_mc_urbanczik  % cannot readout V_m directly
    -             /music_event_in_proxy        % music device
    -             /music_event_out_proxy       % music device
    -             /music_cont_in_proxy         % music device
    -             /music_cont_out_proxy        % music device
    -             /music_message_in_proxy      % music device
    -             /music_message_out_proxy     % music device
    -             /music_rate_in_proxy         % music device
    -             /music_rate_out_proxy        % music device
    -           ] def
    -
    -% The following models require connections to rport 1:
    -/extra_params <<
    -   /iaf_psc_alpha_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /iaf_psc_exp_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /gif_psc_exp_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /gif_cond_exp_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /glif_cond << /params << /tau_syn [ 1.0 ] /E_rev [ -85.0 ] >>
    -                                  /receptor_type 1 >>
    -   /glif_psc << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /aeif_cond_alpha_multisynapse << /params << /tau_syn [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /aeif_cond_beta_multisynapse << /params << /E_rev [ 0.0 ]
    -                                              /tau_rise [ 1.0 ]
    -                                              /tau_decay [ 1.0 ] >>
    -                                  /receptor_type 1 >>
    -   /ht_neuron << /receptor_type 1 >>
    -   >>
    -   def
    -
    -% We first test that the spike generator really sends spikes with
    -% correct multiplicity. We go through a parrot neuron for this purpose.
    -{
    -  ResetKernel
    -  /sg /spike_generator << /spike_times [ 1.0 2.0 3.0 ]
    -                          /spike_multiplicities [ 1 3 2 ] >> Create def
    -  /pn /parrot_neuron Create def
    -  /sr /spike_recorder Create def
    -
    -  sg pn Connect
    -  pn sr Connect
    -
    -  10 Simulate
    -  sr /events get /times get cva
    -  [ 2.0 3.0 3.0 3.0 4.0 4.0 ]
    -  eq
    -} assert_or_die
    -
    -
    -
    -% Now the real test
    -{
    -  % apply to all models of element_type neuron
    -  GetKernelStatus /node_models get
    -  {
    -    /model Set
    -
    -    model skip_list exch MemberQ not
    -    model GetDefaults /element_type get /neuron eq and
    -    {
    -      ResetKernel
    -      /n1 model Create def
    -      /n2 model Create def
    -      extra_params model known
    -      {
    -         extra_params model get /params known
    -         {
    -           /pars extra_params model get /params get def
    -           n1 pars SetStatus
    -           n2 pars SetStatus
    -         } if
    -      } if
    -
    -      % two spike generators send one spike with multiplicity 1,
    -      % a third generator one spike with multiplicity 2
    -      /sg1a /spike_generator << /spike_times [ 5.0 ] >> Create def
    -      /sg1b /spike_generator << /spike_times [ 5.0 ] >> Create def
    -      /sg2 /spike_generator << /spike_times [ 5.0 ]
    -                               /spike_multiplicities [ 2 ] >> Create def
    -
    -      /syn_spec << /synapse_model /static_synapse
    -                   /receptor_type
    -                     extra_params model known
    -                     {
    -                       extra_params model get /receptor_type known
    -                       {
    -                         extra_params model get /receptor_type get
    -                       }
    -                       {
    -                         0
    -                       } ifelse
    -                     }
    -                     {
    -                       0
    -                     } ifelse
    -                >> def
    -
    -      % n1 receives two spikes with multiplicity 1
    -      sg1a sg1b join n1 /all_to_all syn_spec Connect
    -
    -      % n2 receives one spike with multiplicity 2
    -      sg2 n2 /all_to_all syn_spec Connect
    -
    -      (Testing model ) =only model ==
    -
    -      /v1_0 n1 /V_m get def
    -      /v2_0 n2 /V_m get def
    -
    -      8 Simulate
    -
    -      /v1 n1 /V_m get def
    -      /v2 n2 /V_m get def
    -
    -      % ensure initial values were equal
    -      v1_0 v2_0 eq
    -
    -      % ensure final values are equal
    -      v1 v2 sub 12 ToUnitTestPrecision 0 eq
    -
    -      % ensure final value differs from initial value
    -      v1_0 v1 neq
    -      and and  % combine
    -      dup not {
    -       (FAILED: ) model cvs join ==
    -       (  v1_0 ) =only v1_0 =
    -       (  v2_0 ) =only v2_0 =
    -       (  v1   ) =only v1 =
    -       (  v2   ) =only v2 =
    -      }
    -      if
    -    }
    -    { true }
    -    ifelse
    -  }
    -  Map
    -
    -  % see if all entries are true
    -  true exch { and } Fold
    -
    -}
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_node_collection.sli b/testsuite/unittests/test_node_collection.sli
    deleted file mode 100644
    index 7486ae0f26..0000000000
    --- a/testsuite/unittests/test_node_collection.sli
    +++ /dev/null
    @@ -1,1185 +0,0 @@
    -/*
    - *  test_node_collection.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /* BeginDocumentation
    -Name: testsuite::test_node_collection - test handling of node collections
    -
    -Synopsis: (test_node_collection) run
    -
    -
    -Description:
    -
    - This testscript checks that node collections work correctly from the SLI
    - level.
    -
    -Author:  November 2016, Plesser
    -*/
    -
    -M_PROGRESS setverbosity
    -
    -(unittest) run
    -/unittest using
    -
    -/skip_test { (SKIPPING) M_WARNING message ; } def
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (No node collection without nodes) M_PROGRESS message
    -  ResetKernel
    -
    -  [ 1 2 3 ] cvnodecollection pop
    -
    -  end
    -} fail_or_die
    -
    -pop  % remove argument to failing command above
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Create returns NodeCollection) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create type /nodecollectiontype eq
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check length of NodeCollections from Create) M_PROGRESS message
    -  ResetKernel
    -
    -  true
    -  [ 1 2 10 100 ]
    -  { dup
    -    /iaf_psc_alpha exch Create
    -    size eq
    -    and
    -  }
    -  Fold
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that NodeCollection can be converted to array) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  cva
    -  [ 10 ] Range
    -  eq
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check array can be converted to NodeCollection for existing neurons) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create /dummy Set
    -  /node_ids [ 10 ] Range def
    -  node_ids cvnodecollection
    -  cva
    -  node_ids eq
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check intvector can be converted to NodeCollection for existing neurons) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create /dummy Set
    -  /node_ids [ 10 ] Range def
    -  node_ids cv_iv cvnodecollection
    -  cva
    -  node_ids eq
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check converting unsorted array to NodeCollection raises error) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create /dummy Set
    -  [ 5 3 4 7 ] cvnodecollection
    -} fail_or_die
    -
    -% remove argument of failed command
    -pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check contiguous join) M_PROGRESS message
    -  ResetKernel
    -
    -  /n 10 def
    -  /iaf_psc_alpha n Create
    -  /iaf_psc_alpha n Create
    -  join
    -  cva
    -  [ n 2 mul ] Range eq
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check contiguous join with inverted order) M_PROGRESS message
    -  ResetKernel
    -
    -  /n 10 def
    -  /iaf_psc_alpha n Create
    -  /iaf_psc_alpha n Create
    -  exch
    -  join
    -  cva
    -  [ n 2 mul ] Range eq
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check non-contiguous join) M_PROGRESS message
    -  ResetKernel
    -
    -  /n 10 def
    -  /iaf_psc_alpha n Create
    -  /iaf_psc_alpha n Create pop
    -  /iaf_psc_alpha n Create
    -  join
    -  cva
    -  [  1 n ] Range
    -  [ n 2 mul 1 add n 3 mul ] Range join
    -  eq
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check inhomogeneous join) M_PROGRESS message
    -  ResetKernel
    -
    -  /n 10 def
    -  /iaf_psc_alpha n Create
    -  /iaf_psc_exp n Create
    -  join
    -  cva
    -  [ n 2 mul ] Range
    -  eq
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Illegal join with different metadata) M_PROGRESS message
    -  ResetKernel
    -
    -  << /shape [ 1 1 ] /elements /iaf_psc_alpha >> CreateLayer
    -  << /shape [ 1 1 ] /elements /iaf_psc_alpha >> CreateLayer
    -  join
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed commands
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check create with multiple equal node IDs) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  [ 1 2 2 ] cvnodecollection
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed commands
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check join primitives with overlapping node IDs) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  [ 4 5 ] cvnodecollection
    -  join
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed commands
    -pop pop
    -
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check join composites with overlapping node IDs) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join
    -  [ 4 5 11 12 ] cvnodecollection
    -  join
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed commands
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check join primitive with composite with overlapping node IDs) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  [ 4 5 11 12 ] cvnodecollection
    -  join
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed commands
    -pop pop
    -
    -{
    -  << >> begin
    -  (Check join composite with primitive with overlapping node IDs) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join
    -  [ 11 12 ] cvnodecollection
    -  join
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed commands
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check element access) M_PROGRESS message
    -  ResetKernel
    -
    -  /nc
    -    /iaf_psc_alpha 10 Create
    -    /iaf_psc_exp 10 Create
    -  join def
    -
    -  true [ 0 5 10 19 ] { dup 1 add exch nc exch get eq and } Fold
    -  true [ -1 -20 ] { dup 21 add exch nc exch get eq and } Fold
    -  and
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check too large positive index fails) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  11 get
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check too large negative index fails) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  -11 get
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Test iteration with forall) M_PROGRESS message
    -  ResetKernel
    -
    -  /ok true def
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join
    -  {
    -    dup /global_id get eq ok and /ok Set
    -  }
    -  forall
    -  ok
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Test iteration with Map) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join
    -  {
    -    dup /global_id get eq
    -  }
    -  Map
    -  true exch { and } Fold
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Test slicing with Take, primitive) M_PROGRESS message
    -  ResetKernel
    -
    -  /nc
    -  /iaf_psc_alpha 20 Create
    -  def
    -
    -  true
    -  [ << /s 3 /e [ 1 2 3 ] >>
    -    << /s -3 /e [ 18 19 20 ] >>
    -    << /s [ 1 ] /e [ 1 ] >>
    -    << /s [ 2 ] /e [ 2 ] >>
    -    << /s [ -1 ] /e [ 20 ] >>
    -    << /s [ -2 ] /e [ 19 ] >>
    -    << /s [ 7 12 ] /e [ 7 8 9 10 11 12 ] >>
    -    << /s [ -4 -2 ] /e [ 17 18 19 ] >>
    -    << /s [ -12 10 ] /e [ 9 10 ] >>
    -    << /s [ -2 20 ] /e [ 19 20 ] >>
    -    << /s [ 12 -8 ] /e [ 12 13 ] >>
    -    << /s [ 19 -1 ] /e [ 19 20 ] >>
    -    << /s [ 1 20 7 ] /e [ 1 8 15 ] >>
    -    << /s [ 1 20 70 ] /e [ 1 ] >>
    -    << /s [ 5 20 5 ] /e [ 5 10 15 20 ] >>
    -  ]
    -  {
    -    begin
    -      nc s
    -      Take
    -      cva e eq and
    -    end
    -  }
    -  Fold
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Test slicing with Take, composite) M_PROGRESS message
    -  ResetKernel
    -
    -  /nc
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join def
    -
    -  true
    -  [ << /s 3 /e [ 1 2 3 ] >>
    -    << /s -3 /e [ 18 19 20 ] >>
    -    << /s [ 1 ] /e [ 1 ] >>
    -    << /s [ 2 ] /e [ 2 ] >>
    -    << /s [ -1 ] /e [ 20 ] >>
    -    << /s [ -2 ] /e [ 19 ] >>
    -    << /s [ 7 12 ] /e [ 7 8 9 10 11 12 ] >>
    -    << /s [ -4 -2 ] /e [ 17 18 19 ] >>
    -    << /s [ -12 10 ] /e [ 9 10 ] >>
    -    << /s [ -2 20 ] /e [ 19 20 ] >>
    -    << /s [ 12 -8 ] /e [ 12 13 ] >>
    -    << /s [ 19 -1 ] /e [ 19 20 ] >>
    -    << /s [ 1 20 7 ] /e [ 1 8 15 ] >>
    -    << /s [ 1 20 70 ] /e [ 1 ] >>
    -    << /s [ 5 20 5 ] /e [ 5 10 15 20 ] >>
    -  ]
    -  {
    -    begin
    -      nc s Take
    -      cva e eq and
    -    end
    -  }
    -  Fold
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (More complex Take example, checking result in various ways) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 15 Create pop
    -  /iaf_psc_delta 30 Create
    -  join
    -  [1 20 2] Take /nc Set
    -
    -  /expected [1 3 5 7 9 26 28 30 32 34] def
    -
    -  nc cva expected eq      % loops at C++ level
    -  nc { } Map expected eq  % loops at SLI level
    -  nc size expected length eq
    -
    -  and and
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Slice attempt with out-of-bound value 1) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create 20 Take
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Slice attempt with out-of-bound value 2) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create -20 Take
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Slice attempt with out-of-bound value 3) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create [ 1 30 ] Take
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Slice attempt with negative step) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create [ 1 5 -1 ] Take
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Test select all) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  { pop true } Select
    -  [ 10 ] Range eq
    -}
    -assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Test select none) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  { 50 gt } Select
    -  [ ] eq
    -}
    -assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Test select some) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  { 2 mod 0 eq } Select
    -  [ 2 4 6 8 10 ] eq
    -}
    -assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Element membership) M_PROGRESS message
    -  ResetKernel
    -
    -  /nc
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join def
    -
    -  nc 1 InCollection
    -  nc 15 InCollection and
    -  nc 20 InCollection and
    -  nc 21 InCollection not and
    -  nc 40 InCollection not and
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (GetStatus on collection) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join
    -  GetStatus
    -  { /global_id get } Map
    -  [ 20 ] Range eq
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (SetStatus on collection) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join dup
    -  << /V_m -100.0 >> SetStatus
    -  GetStatus
    -  true exch
    -  { /V_m get -100.0 eq and } Fold
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (SetStatus on collection with multiple dicts) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 3 Create
    -  dup
    -  [ << /V_m -100. >> << /V_m -200. >> << /V_m -300. >> ] SetStatus
    -  GetStatus
    -  { /V_m get } Map
    -  [ -100. -200. -300. ] eq
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (SetStatus on collection with multiple dicts error) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 3 Create
    -  [ << /V_m -100. >> << /V_m -200. >> ] SetStatus
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Basic Connect test) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 5 Create dup Connect
    -
    -  end
    -} pass_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check connect with sliced composite with step>1) M_PROGRESS message
    -  ResetKernel
    -
    -  /a /iaf_psc_alpha 100 Create def
    -  /b /iaf_psc_alpha 100 Create def
    -  /c /iaf_psc_exp 20 Create def
    -  /m b c join def
    -  /m_step m [ 6 117 6 ] Take def
    -  m_step ==
    -  m_step m_step /all_to_all Connect
    -
    -  << >> GetConnections length
    -  m_step size dup mul eq
    -
    -  ResetKernel
    -
    -  /a /iaf_psc_alpha 100 Create def
    -  /b /iaf_psc_alpha 100 Create def
    -  /c /iaf_psc_exp 20 Create def
    -  /m b c join def
    -  /m_step m [ 6 117 6 ] Take def
    -  m_step m_step /one_to_one Connect
    -
    -  << >> GetConnections length
    -  m_step size eq and
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that Connect checks NC validity, first arg) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  n m Connect
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that Connect checks NC validity, second arg) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  m n Connect
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that GetStatus checks NC validity) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /iaf_psc_alpha 5 Create ;
    -
    -  n GetStatus
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that SetStatus checks NC validty) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /iaf_psc_alpha 5 Create ;
    -
    -  n << /V_m -75. >> SetStatus
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that join checks NC validity, first arg) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  n m join
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Slice attempt with out-of-bound value 2) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create -20 Take
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Slice attempt with out-of-bound value 3) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create [ 1 30 ] Take
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Slice attempt with negative step) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create [ 1 5 -1 ] Take
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Element membership) M_PROGRESS message
    -  ResetKernel
    -
    -  /nc
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join def
    -
    -  nc 1 MemberQ
    -  nc 15 MemberQ and
    -  nc 40 MemberQ not and
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (GetStatus on collection) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join
    -  GetStatus
    -  { /global_id get } Map
    -  [ 20 ] Range eq
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (SetStatus on collection) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 10 Create
    -  /iaf_psc_exp 10 Create
    -  join dup
    -  << /V_m -100.0 >> SetStatus
    -  GetStatus
    -  true exch
    -  { /V_m get -100.0 eq and } Fold
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (SetStatus on collection with multiple dicts) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 3 Create
    -  dup
    -  [ << /V_m -100. >> << /V_m -200. >> << /V_m -300. >> ] SetStatus
    -  GetStatus
    -  { /V_m get } Map
    -  [ -100. -200. -300. ] eq
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (SetStatus on collection with multiple dicts error) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 3 Create
    -  [ << /V_m -100. >> << /V_m -200. >> ] SetStatus
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Basic Connect test) M_PROGRESS message
    -  ResetKernel
    -
    -  /iaf_psc_alpha 5 Create dup Connect
    -
    -  end
    -} pass_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that Connect checks NC validity, first arg) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  n m Connect
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that Connect checks NC validity, second arg) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  m n Connect
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that GetStatus checks NC validity) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /iaf_psc_alpha 5 Create ;
    -
    -  n GetStatus
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that SetStatus checks NC validty) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /iaf_psc_alpha 5 Create ;
    -
    -  n << /V_m -75. >> SetStatus
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that join checks NC validity, first arg) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  n m join
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that join checks NC validity, second arg) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  m n join
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that GetConnections works) M_PROGRESS message
    -  ResetKernel
    -
    -  /a /iaf_psc_alpha 5 Create def
    -  /e /iaf_psc_exp 5 Create def
    -  /nc a e join def
    -
    -  nc nc Connect
    -
    -  << >> GetConnections length 100 eq
    -  << /source a /target e >> GetConnections length 25 eq
    -
    -  and
    -
    -  end
    -} assert_or_die
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that GetConnections checks NC validity, source) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  m m Connect
    -  << /source n >> GetConnections
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that GetConnections checks NC validity, target) M_PROGRESS message
    -  ResetKernel
    -
    -  /n /iaf_psc_alpha 5 Create def
    -
    -  ResetKernel
    -
    -  /m /iaf_psc_alpha 5 Create def
    -
    -  m m Connect
    -  << /target n >> GetConnections
    -
    -  end
    -} fail_or_die
    -
    -% remove arguments of failed command
    -pop
    -
    -% --------------------------------------------------
    -
    -{
    -  << >> begin
    -  (Check that stack is empty at end of test) M_PROGRESS message
    -
    -  count 0 eq
    -  end
    -} assert_or_die
    -
    -
    -end % using
    diff --git a/testsuite/unittests/test_noise_generator.sli b/testsuite/unittests/test_noise_generator.sli
    deleted file mode 100644
    index ee6dc86abc..0000000000
    --- a/testsuite/unittests/test_noise_generator.sli
    +++ /dev/null
    @@ -1,124 +0,0 @@
    -/*
    - *  test_noise_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_noise_generator - minimal test of noise_generator
    -
    -Synopsis: (test_noise_generator) run -> dies if assertion fails
    -
    -Description:
    -Tests parameter setting and statistical correctness for one application.
    -
    -Author: Plesser
    -FirstVersion: July 2008
    -SeeAlso: noise_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% First test: parameter setting on model and instance
    -(Test 1) ==
    -{
    -    ResetKernel
    -    /tdict << /mean 10.5 /std 0.23 /dt 0.5 >> def
    -
    -    /ng1 /noise_generator Create def
    -    ng1 tdict SetStatus
    -
    -    /noise_generator tdict SetDefaults
    -    /ng2 /noise_generator Create def
    -
    -    ng1 [tdict keys] get
    -    ng2 [tdict keys] get
    -    eq
    -} assert_or_die
    -clear
    -ResetKernel
    -
    -% Second test: error if uncommensurable delta_tau
    -(Test 2) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /noise_generator << /dt 0.25 >> SetDefaults
    -} fail_or_die  
    -
    -% Third test: error if uncommensurable change of resolution
    -(Test 3) ==
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /noise_generator << /dt 0.1 >> SetDefaults
    -  << /resolution 1.0 >> SetKernelStatus
    -  /noise_generator Create % cannot create now with dt==0.1
    -} fail_or_die  
    -
    -% Fourth test: recording at two different dt
    -(Test 4) ==
    -/vb verbosity def
    -M_ERROR setverbosity  % suppress warning from time reset
    -{
    -  % run for resolution dt=0.1 project to iaf_psc_alpha
    -  % create 100 repetitions of 1000ms simulations
    -  % collect membrane potential at end 
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /ng  /noise_generator Create def
    -  /nrn /iaf_psc_alpha Create def
    -  ng nrn Connect
    -
    -  ng  << /mean 0.0 /std 1.0 /dt 0.1 >> SetStatus
    -
    -  % no spiking, all parameters 1, 0 leak potential
    -  nrn << /V_th 1e10 /C_m 1.0 /tau_m 1.0 /E_L 0.0 >> SetStatus
    -
    -
    -  % now simulate 
    -  /Nsims 100 def
    -  [Nsims] {
    -    pop
    -    1000 Simulate 
    -    nrn [/V_m] get
    -  } Table 
    -  dup length Nsims eq assert
    -
    -  % compute mean and std dev of potential
    -  dup Plus Nsims cvd div /meanV Set
    -  dup mul Plus Nsims cvd div meanV dup mul sub sqrt /stdV Set
    -
    -  % expected values
    -  /emeanV 0.0 def
    -  /estdV ng [/dt] get nrn [/tau_m] get div neg exp 
    -         dup 1 exch sub exch 1 add div sqrt 
    -         ng [/std] get mul def
    -  /estdstdV estdV 2 Nsims cvd mul sqrt div def  % std dev of std dev
    -
    -  % require mean within 3 std dev, std dev within three std dev of std dev
    -  meanV emeanV sub abs estdV 3 mul lt
    -  stdV estdV sub abs estdstdV 3 mul lt
    -  and
    -} assert_or_die
    -vb setverbosity  % restore default verbosity
    -
    -endusing
    diff --git a/testsuite/unittests/test_ntree_split.sli b/testsuite/unittests/test_ntree_split.sli
    deleted file mode 100644
    index 2485d3a850..0000000000
    --- a/testsuite/unittests/test_ntree_split.sli
    +++ /dev/null
    @@ -1,97 +0,0 @@
    -/*
    - *  test_ntree_split.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /* BeginDocumentation
    -Name: testsuite::test_ntree_split - test cornercases when splitting ntree
    -
    -Synopsis: (test_ntree_split) run
    -
    -
    -Description:
    -
    - This testscript connects spatial populations where the positions of nodes
    - are defined such that they cause roundoff errors when the ntree is split.
    -*/
    -
    -M_PROGRESS setverbosity
    -
    -(unittest) run
    -/unittest using
    -
    -{
    -  << >> begin
    -  ResetKernel
    -
    -  % Generate positions. The parameters pre_n_x and r should be defined such
    -  % that we get roundoff errors. pre_n_x must be larger than 100 to make the
    -  % ntree split.
    -  /pre_n_x 110 def
    -  /r 0.45 def
    -  /positions [] def
    -  /low_xy 0 r sub def
    -  /high_xy r def
    -  /dx high_xy low_xy sub pre_n_x 1 sub div def
    -  /x_vals [low_xy high_xy dx] Range def
    -  /y 0.0 def
    -  /z 0.0 def
    -
    -  x_vals
    -  {
    -    /x Set
    -    /positions positions [ x y z ] append def
    -  } forall
    -
    -  % Create a source layer based on the positions generated.
    -  <<
    -    /positions positions
    -    /elements /iaf_psc_alpha
    -    /edge_wrap true
    -  >>
    -  CreateLayer /pre Set
    -
    -  % Create a target layer with a single position.
    -  <<
    -    /positions [ [ 1.0 0.0 0.0 ] ]
    -    /elements /iaf_psc_alpha
    -    /extent [1.0 1.0 1.0]
    -    /edge_wrap true
    -  >>
    -  CreateLayer /post Set
    -
    -  % We must specify a mask to make it generate a MaskedLayer, which splits the ntree.
    -  /mask << /box << /lower_left [ -0.5 -0.5 -0.5 ]
    -                   /upper_right [ 0.5 0.5 0.5 ] >> >> def
    -
    -  pre post
    -  <<
    -    /connection_type /pairwise_bernoulli_on_target
    -    % Probability intentionally set to zero because we don't have to actually create the connections in this test.
    -    /kernel 0.0
    -    /mask mask
    -    /allow_oversized_mask true
    -  >>
    -  ConnectLayers
    -
    -  end
    -} pass_or_die
    -
    -end % using
    diff --git a/testsuite/unittests/test_oversize_mask.sli b/testsuite/unittests/test_oversize_mask.sli
    deleted file mode 100644
    index 837bedec4e..0000000000
    --- a/testsuite/unittests/test_oversize_mask.sli
    +++ /dev/null
    @@ -1,191 +0,0 @@
    -/*
    - *  test_oversize_mask.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -% this test ensures that ConnectLayers accepts oversized masks only
    -% when explicitly allowed
    -
    -(unittest) run
    -/unittest using
    -
    -/make_grid_layer
    -{
    -  << /shape [ 1 1 ] /elements /iaf_psc_alpha /edge_wrap true >> CreateLayer
    -}
    -def
    -
    -/make_free_layer
    -{
    -  << /positions [[0. 0.]] /elements /iaf_psc_alpha /edge_wrap true /extent [1.0 1.0] >> CreateLayer
    -}
    -def
    -
    -% correct, grid-based
    -{
    -  ResetKernel
    -  make_grid_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -     /mask << /grid << /shape [ 1 1 ] >> >>
    -  >>
    -  ConnectLayers
    -} pass_or_die
    -
    -% incorrect, grid-based, too wide
    -{
    -  ResetKernel
    -  make_grid_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -     /mask << /grid << /shape [ 2 1 ] >> >>
    -  >>
    -  ConnectLayers
    -} fail_or_die
    -
    -% incorrect, grid-based, too tall
    -{
    -  ResetKernel
    -  make_grid_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -     /mask << /grid << /shape [ 1 2 ] >> >>
    -  >>
    -  ConnectLayers
    -} fail_or_die
    -
    -% incorrect, grid-based, too wide and tall
    -{
    -  ResetKernel
    -  make_grid_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -     /mask << /grid << /shape [ 2 2 ] >> >>
    -  >>
    -  ConnectLayers
    -} fail_or_die
    -
    -% correct, grid-based, too wide and tall, but oversized allowed
    -{
    -  ResetKernel
    -  make_grid_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -     /mask << /grid << /shape [ 2 2 ] >> >>
    -     /allow_oversized_mask true
    -  >>
    -  ConnectLayers
    -} pass_or_die
    -
    -% ----------------------------
    -
    -% correct, circular
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /circular << /radius 0.5 >> >>
    -  >>
    -  ConnectLayers
    -} pass_or_die
    -
    -% incorrect, circular, too wide
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /circular << /radius 0.51 >> >>
    -  >>
    -  ConnectLayers
    -} fail_or_die
    -
    -% correct, circular, too wide but allowed
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /circular << /radius 0.51 >> >>
    -      /allow_oversized_mask true
    -  >>
    -  ConnectLayers
    -} pass_or_die
    -
    -% ----------------------------------------------------------
    -
    -% correct, doughnut
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /doughnut << /inner_radius 0.2 /outer_radius 0.5 >> >>
    -  >>
    -  ConnectLayers
    -} pass_or_die
    -
    -% incorrect, doughnut, too wide
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /doughnut << /inner_radius 0.2 /outer_radius 0.51 >> >>
    -  >>
    -  ConnectLayers
    -} fail_or_die
    -
    -% correct, doughnut, too wide but allowed
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /doughnut << /inner_radius 0.2 /outer_radius 0.51 >> >>
    -      /allow_oversized_mask true
    -  >>
    -  ConnectLayers
    -} pass_or_die
    -
    -% -------------------------------------------
    -
    -% correct, rectangular
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /rectangular << /lower_left [-0.5 -0.5] /upper_right [0.5 0.5] >> >>
    -  >>
    -  ConnectLayers
    -} pass_or_die
    -
    -% incorrect, rectangular, too wide
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /rectangular << /lower_left [-0.5 -0.5] /upper_right [0.51 0.5] >> >>
    -  >>
    -  ConnectLayers
    -} fail_or_die
    -
    -% correct, rectangular, too wide but allowed
    -{
    -  ResetKernel
    -  make_free_layer dup
    -  << /connection_type (pairwise_bernoulli_on_target)
    -      /mask << /rectangular << /lower_left [-0.5 -0.5] /upper_right [0.51 0.5] >> >>
    -      /allow_oversized_mask true
    -  >>
    -  ConnectLayers
    -} pass_or_die
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_poisson_generator_campbell_alpha.sli b/testsuite/unittests/test_poisson_generator_campbell_alpha.sli
    deleted file mode 100644
    index 952b9b54e1..0000000000
    --- a/testsuite/unittests/test_poisson_generator_campbell_alpha.sli
    +++ /dev/null
    @@ -1,87 +0,0 @@
    -/*
    - *  test_poisson_generator_campbell_alpha.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_poisson_generator_campbell_alpha - test if of poisson noise generates correct membrane potential
    -
    -Synopsis: (test_poisson_generator_campbell_alpha) run -> dies if assertion fails
    -
    -Description:
    -
    -
    -Author: Schrader
    -FirstVersion: Mar 2009
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -/n_neurons 1500  def % number of neurons to simulate
    -/simtime   1000. def % simulation duration (ms)
    -/pot       20.   def % desired membrane potential (mV)
    -/tolerance 1.5e-2  def % potential tolerance (mV)
    -
    -% neuron&synapse parameters (cf. brunel*.sli)
    -/tauMem 20.0 def
    -/tauSyn  0.5 def
    -/E_L     0.0 def
    -
    -/J     0.01  def % small psp amplitude
    -/fudge 0.41363506632638 def
    -/JE    J tauSyn div fudge mul def
    -
    -ResetKernel
    -
    -/p_rate (1000.*pot/(fudge*J*tauMem*exp(1))) CompileMath exec def
    -
    -/iaf_psc_alpha
    -    <<
    -        /tau_m       tauMem
    -        /tau_syn_ex  tauSyn
    -	/tau_syn_in  tauSyn
    -        /E_L         E_L
    -        /V_th        999. % no firing
    -        /C_m         1.0
    -    >> SetDefaults
    -
    -
    -% create n_neurons neurons
    -/neurons /iaf_psc_alpha n_neurons Create def
    -
    -/static_synapse /syn << /weight JE >> CopyModel
    -
    -/poisson_generator << /rate p_rate >> SetDefaults
    -
    -/poisson /poisson_generator Create def
    -
    -poisson neurons << /rule /all_to_all >> << /synapse_model /static_synapse /weight JE >> Connect
    -
    -simtime Simulate
    -
    -% check if the membrane potential is equal to desired value (pot)
    -neurons {GetStatus /V_m get } forall n_neurons arraystore Mean
    -pot sub abs
    -tolerance lt
    -assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_poisson_generator_ps.sli b/testsuite/unittests/test_poisson_generator_ps.sli
    deleted file mode 100644
    index 2e32c6bd2f..0000000000
    --- a/testsuite/unittests/test_poisson_generator_ps.sli
    +++ /dev/null
    @@ -1,79 +0,0 @@
    -/*
    - *  test_poisson_generator_ps.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_poisson_generator_ps - basic test of poisson_generator_ps
    -
    -Synopsis: (test_poisson_generator_ps) run -> fails if targets receive identical spikes trains
    -
    -Description:
    - This basic test checks whether two targets receive different spikes trains 
    - and whether the start and stop properties of the generator are respected.
    - The test does neither check that spikes indeed have high resolution nor 
    - that grid-constrained neuron models receive consistent spike times.
    -Remarks:
    - This test fails for a correct implementation if in the simulation interval both targets 
    - receive no spikes. The seed set in the default configuration of NEST avoids this 
    - problem. Therefore, failure of this script indicates that the configuration is not
    - portable.
    -Author:  February 2008, Diesmann, Plesser
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -/poisson_generator_ps Create /pg Set
    -/spike_recorder Create /sr1 Set
    -/spike_recorder Create /sr2 Set
    -
    -pg sr1 Connect
    -pg sr2 Connect
    -
    -pg << /rate 100.0 /start 200.0 /stop 500.0 >> SetStatus
    -
    -
    -1000 Simulate
    -
    -pg << /start 1200. /stop 1800. >> SetStatus
    -
    -1000 Simulate
    -
    -[sr1 sr2] {[/events /times] get} forall  neq  % spike trains differ
    -
    -
    -[sr1 sr2] 
    -{
    - [/events /times] get
    - cva {dup 500.0 gt exch 1200.0 lt and   } Select [] eq  % there is a gap
    -} forall and  % in both channels
    -
    -and
    -
    -assert_or_die
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_poisson_ps_intervals.sli b/testsuite/unittests/test_poisson_ps_intervals.sli
    deleted file mode 100644
    index 4de62fff1d..0000000000
    --- a/testsuite/unittests/test_poisson_ps_intervals.sli
    +++ /dev/null
    @@ -1,88 +0,0 @@
    -/*
    - *  test_poisson_ps_intervals.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_poisson_ps_intervals - checks coefficient of variation
    -
    -Synopsis: (test_poisson_ps_intervals) run -> CV sufficiently close to 1
    -
    -Description:
    - The inter spike interval (ISI) distribution of a Poisson process is 
    - exponential. The coefficient of variation defined as the standard deviation
    - of the intervals normalized by the mean interval is 1. The test checks whether
    - the output of the poisson_generator_ps as recorded by the spike_recorder is
    - sufficiently close to 1. Without the property /precise_times the error is larger
    - than 0.1 .
    -Remarks:
    - An improved version of this test should check whether the observed deviation from
    - unity is within the error bounds given by the number of spikes.
    - Even a correct implementation generates with low probability spike trains  which
    - do not pass the test. The seed set in the default configuration of NEST avoids 
    - this problem. Therefore, failure of this script indicates that the configuration 
    - is not portable.
    - The test in r8067 worked even with ticket #157 unresolved. Only the presence of a 
    - neuron (see test_spike_transmission_ps_iaf) exhibited the problem. Prior to the 
    - fix of ticket #164 this test produced inconsistent results without specifying 
    - /local_num_threads 1 for the kernel.
    -
    -FirstVersion: February 2008
    -Author: Diesmann, Plesser
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -
    -M_ERROR setverbosity
    -
    -
    -
    -
    -10000.0 /T Set
    -
    -
    -<< /resolution 0.1  >> SetKernelStatus
    -
    -
    -/spike_recorder Create /sp Set
    -
    -
    -/poisson_generator_ps Create /pn Set
    -pn << /rate 12892.25 >> SetStatus
    -
    -
    -pn sp Connect
    -
    -
    -T Simulate
    -
    -sp [/events /times] get cva                     % spike train
    -  2 1 Partition Transpose {sub neg} MapThread   % inter spike intervals
    -  dup  StandardDeviation 
    -  exch Mean
    -  div                                           % coefficient of variation
    -
    -
    -1.0 sub abs 0.001 lt  assert_or_die             % should converge to 1
    -
    diff --git a/testsuite/unittests/test_poisson_ps_min_interval.sli b/testsuite/unittests/test_poisson_ps_min_interval.sli
    deleted file mode 100644
    index 2f30806601..0000000000
    --- a/testsuite/unittests/test_poisson_ps_min_interval.sli
    +++ /dev/null
    @@ -1,72 +0,0 @@
    -/*
    - *  test_poisson_ps_min_interval.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_poisson_ps_min_interval - checks that intervals are independent of tic size
    -
    -Synopsis: (test_poisson_ps_min_interval) run -> minimum interal close to 0
    -
    -Description:
    - The inter spike interval (ISI) distribution of a Poisson process is 
    - exponential. The test verifies that the minimum interval is arbitrarily 
    - small and not constrained by the ms_per_tic property of the simlation kernel.
    -Remarks:
    - Even a correct implementation generates with low probability spike trains where the
    - minimal interval is larger than ms_per_tic. The seed set in the default configuration 
    - of NEST avoids this problem. Therefore, failure of this script indicates that the
    - configuration is not portable.
    -FirstVersion: February 2009
    -Author: Diesmann
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -10000.0 /T Set
    -
    -
    -<< /resolution 0.1  >> SetKernelStatus
    -
    -
    -/spike_recorder Create /sp Set
    -
    -
    -/poisson_generator_ps Create /pn Set
    -pn << /rate 12892.25 >> SetStatus
    -
    -
    -pn sp Connect
    -
    -
    -T Simulate
    -
    -sp [/events /times] get cva                     % spike train
    -  2 1 Partition Transpose {sub neg} MapThread   % inter spike intervals
    -  Min
    -
    -
    -GetKernelStatus /ms_per_tic get 10.0 div lt  assert_or_die    % should converge to 0
    -
    diff --git a/testsuite/unittests/test_pp_pop_psc_delta.sli b/testsuite/unittests/test_pp_pop_psc_delta.sli
    deleted file mode 100755
    index bf7792595f..0000000000
    --- a/testsuite/unittests/test_pp_pop_psc_delta.sli
    +++ /dev/null
    @@ -1,200 +0,0 @@
    -/*
    - *  test_pp_pop_psc_delta.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_pp_pop_psc_delta - sli script for test of pp_pop_psc_delta
    -
    -Synopsis: (test_pp_pop_psc_delta) run -> compare numbers of generated spikes of the model and a group of pp_psc_delta neurons
    -
    -Description:
    - 
    - This script simulate three point process population models with different sets of parameters. After each simulation, it compares
    - the number of generated spikes by the model and the same quantity of a group of pp_psc_delta neurons. The parameters of 
    - pp_psc_delta neurons (including the number of neurons) are the same as represented in the point process population model. 
    - The ratio of number of spikes must not be less than 1-err and greater than 1+err. Here we choose err=0.2.
    -
    -
    -
    -Author:  May 2014, Setareh, Deger
    -SeeAlso: pp_pop_psc_delta, testsuite::test_pp_psc_delta
    -
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -
    -0.2 /err Set
    -10000.0 /T Set
    -
    -
    -/first_test
    -{
    -   
    -    ResetKernel
    -    << 
    -       /resolution 1.0
    -     >> SetKernelStatus
    -
    -    /pp_pop_psc_delta Create /node Set
    -
    -    <<
    -      /N 500
    -      /rho_0 1.0
    -      /delta_u 1.0
    -      /tau_m  10.0
    -      /C_m   15.0
    -      /tau_eta [10.0 300.0]
    -      /val_eta [3.0  1.0  ]
    -      /len_kernel  5.0
    -      /I_e -0.5 
    -    >> /params_pop Set
    -    
    -    node params_pop SetStatus
    -
    -    /dc_generator Create /current Set
    -
    -    <<
    -       /amplitude 3.0
    -    >> /params_cur Set
    -
    -    current  params_cur SetStatus
    -    
    -    /spike_recorder Create /sr Set
    -
    -    current node Connect
    -    node sr Connect
    -    T Simulate
    -    
    -    sr /n_events get
    -
    -    13179.0   % expected number of generated spikes (generated by a group of pp_psc_delta neurons with the same parameter set)
    -    div /ratio Set
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -    
    -} def
    -
    -
    -/second_test
    -{
    -   
    -    ResetKernel
    -    << 
    -       /resolution 1.0
    -     >> SetKernelStatus
    -
    -    /pp_pop_psc_delta Create /node Set
    -
    -    <<
    -      /N 300
    -      /rho_0 1.0
    -      /delta_u 5.0
    -      /tau_m  9.0
    -      /C_m   5.0
    -      /tau_eta [15.0 200.0]
    -      /val_eta [4.0  2.0  ]
    -      /len_kernel  5.0
    -      /I_e 1.0 
    -    >> /params_pop Set
    -    
    -    node params_pop SetStatus
    -
    -    /dc_generator Create /current Set
    -
    -    <<
    -       /amplitude 3.0
    -    >> /params_cur Set
    -
    -    current  params_cur SetStatus
    -    
    -    /spike_recorder Create /sr Set
    -
    -    current node Connect
    -    node sr Connect
    -    T Simulate
    -    
    -    sr /n_events get
    -
    -    9667.0   % expected number of generated spikes (generated by a group of pp_psc_delta neurons with the same parameter set)
    -    div /ratio Set
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -    
    -} def
    -
    -
    -/third_test
    -{
    -   
    -    ResetKernel
    -    << 
    -       /resolution 1.0
    -     >> SetKernelStatus
    -
    -    /pp_pop_psc_delta Create /node Set
    -
    -    <<
    -      /N 400
    -      /rho_0 1.0
    -      /delta_u 3.0
    -      /tau_m  5.0
    -      /C_m   10.0
    -      /tau_eta [25.0 100.0]
    -      /val_eta [5.0  1.0  ]
    -      /len_kernel  7.0
    -      /I_e 8.0 
    -    >> /params_pop Set
    -    
    -    node params_pop SetStatus
    -
    -    /dc_generator Create /current Set
    -
    -    <<
    -       /amplitude 3.0
    -    >> /params_cur Set
    -
    -    current  params_cur SetStatus
    -    
    -    /spike_recorder Create /sr Set
    -
    -    current node Connect
    -    node sr Connect
    -    T Simulate
    -    
    -    sr /n_events get
    -
    -    19128.0   % expected number of generated spikes (generated by a group of pp_psc_delta neurons with the same parameter set)
    -    div /ratio Set
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -    
    -} def
    -
    -first_test
    -second_test
    -third_test
    diff --git a/testsuite/unittests/test_pp_psc_delta.sli b/testsuite/unittests/test_pp_psc_delta.sli
    deleted file mode 100644
    index ed28bc6ab3..0000000000
    --- a/testsuite/unittests/test_pp_psc_delta.sli
    +++ /dev/null
    @@ -1,444 +0,0 @@
    -/*
    - *  test_pp_psc_delta.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_pp_psc_delta - test of pp_psc_delta neuron functionality
    -
    -Synopsis: (test_pp_psc_delta) run -> compare spike train statistics with expectations
    -
    -Description:
    - 
    - This simulation tests the basic functionality of the pp_psc_delta neuron model.
    - Specifically, it checks whether:
    -
    - - the firing rate is close to the preset one
    -
    - - the fixed dead-time is respected in all cases
    -
    - - for randomly distributed dead-times, the mean and the variance of the
    -   dead-times are close to the theoretical values
    -
    - - the threshold adaptation works by looking for negative serial correlation of
    -   the inter-spike intervals
    -   
    - - that threshold adaptation with time constant of the membrane is equivalent
    -   to an inhibitory self-connection with the same strength
    -
    - All of these tests are based on random number realizations, which is necessary
    - since the model is stochastic. Thus there is a finite probability for the test
    - to fail, even if everything is fine.
    -
    - The choice of the variable err, which is the allowed relative deviation from
    - the reference value, can be used to make the test more or less strict.
    - Increasing T inside the test functions can also help to get more reliable
    - statistics and a reduced probability of false alarms.
    -
    - The values are chosen to have a reasonable execution time. False alarms were 
    - never observed yet. Since random numbers are preserved through repetitions of
    - the simulations, the test should work for sure as long as the random number 
    - generation procedure of NEST is not changed. If it is changed, failure of the
    - test is still very unlikely.
    -
    - The intention of this script is to make sure that there are no gross errors in
    - the functionality of the neuron model pp_psc_delta.
    -
    -Remarks:
    -
    -  This test script is based on the Python version 
    -  
    -      test_pp_psc_delta.py
    -      
    -  and was adapted to SLI using
    -  
    -      test_iaf_dc_aligned.sli
    -      
    -  as a guideline. The commented code is the original Python test code.
    -  
    -  Test 5) was added later (2014), when support for several adaptation time 
    -  constants was added to pp_psc_delta.
    -
    -
    -Author:  June 2011, Deger, Zaytsev
    -SeeAlso: pp_psc_delta
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -
    -0.2 /err Set
    -
    -
    -% 1) check for reasonable firing rate
    -% 2) check if fixed dead-time is respected
    -
    -/check_rate_and_fixed_dead_time
    -{
    -    
    -
    -    % test parameters
    -    25.0 /d Set
    -    10.0 /lam Set
    -    100000.0 /T Set
    -
    -    ResetKernel
    -    /pp_psc_delta Create /nrn Set
    -
    -    <<
    -      /tau_m  10.0
    -      /C_m   250.0
    -      /dead_time d 
    -      /dead_time_random  false
    -      /dead_time_shape  1
    -      /with_reset false
    -      /tau_sfa 34.0
    -      /q_sfa 0.0
    -      /c_1  0.0
    -      /c_2 lam 
    -      /c_3   0.25
    -      /I_e   0.0
    -      /t_ref_remaining   0.0
    -    >> /params Set
    -    
    -    nrn params SetStatus
    -    
    -    /spike_recorder Create /sr Set
    -
    -    nrn sr Connect
    -    T Simulate
    -    
    -    sr /events get /times get /spikes Set
    -
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes cva size T 1e-3 mul div /rate_sim Set /spikes_array Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    1.0 lam div d 1e-3 mul add /mu_ana Set 
    -    1.0 mu_ana div /rate_ana Set
    -    
    -    % ratio = rate_sim / rate_ana
    -    rate_sim rate_ana div /ratio Set
    -    
    -    % This could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -    
    -    %isi = []
    -    %for i in xrange(1,len(spikes)):
    -    %    isi.append(spikes[i]-spikes[i-1])
    -    %assert( min(isi)>=d )
    -    0.0 /t Set
    -    spikes cva { dup t sub exch /t Set  } Map /l Set
    -    l Rest Min d geq assert_or_die
    -    
    -} def
    -
    -
    -
    -%3) check if random dead-time moments are respected
    -
    -/check_random_dead_time
    -{
    -    % test parameters
    -    50.0 /d Set
    -    10  /n Set
    -    1.0e6 /lam Set
    -    10000.0 /T Set
    -
    -    ResetKernel
    -    /pp_psc_delta Create /nrn Set
    -
    -    <<
    -      /tau_m  10.0
    -      /C_m   250.0
    -      /dead_time d 
    -      /dead_time_random  true
    -      /dead_time_shape  10
    -      /with_reset false
    -      /tau_sfa [34.0]
    -      /q_sfa [0.0]
    -      /c_1  0.0
    -      /c_2 lam 
    -      /c_3   0.25
    -      /I_e   0.0
    -      /t_ref_remaining   0.0
    -    >> /params Set
    -
    -    nrn params SetStatus
    -
    -
    -
    -    /spike_recorder Create /sr Set
    -
    -    nrn sr Connect
    -    T Simulate
    -
    -    sr /events get /times get /spikes Set
    -
    -
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes cva size T 1e-3 mul div /rate_sim Set /spikes_array Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    1.0 lam div d 1e-3 mul add /mu_ana Set 
    -    1.0 mu_ana div /rate_ana Set
    -    %1.0 1.0 lam div d 1e-3 mul add div /rate_ana Set
    -    
    -    % ratio = rate_sim / rate_ana
    -    rate_sim rate_ana div /ratio Set
    -    
    -    % This could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -
    -    %isi = []
    -    %for i in xrange(1,len(spikes)):
    -    %    isi.append(spikes[i]-spikes[i-1])
    -    0.0 /t Set
    -    spikes cva { dup t sub exch /t Set  } Map Rest /isi Set
    -    
    -    %# compute moments of ISI to get mean and variance
    -    %isi_m1 = 0. 
    -    %isi_m2 = 0.
    -    %for t in isi:
    -    %    isi_m1 += t
    -    %    isi_m2 += t**2
    -    0. /isi_m1 Set
    -    0. /isi_m2 Set
    -    isi { dup isi_m1 add /isi_m1 Set dup mul isi_m2 add /isi_m2 Set} forall
    -    
    -    %isi_mean = isi_m1 / len(isi)
    -    %isi_var = isi_m2/ len(isi) - isi_mean**2
    -    %ratio_mean = isi_mean / d
    -    isi_m1 isi size exch pop div /isi_mean Set
    -    isi_m2 isi size exch pop div isi_mean dup mul sub /isi_var Set
    -    isi_mean d div /ratio_mean Set 
    -    1.0 err sub ratio_mean leq
    -    ratio_mean 1.0 err add leq
    -    and assert_or_die
    -    
    -    %isi_var_th = n / (n/d)**2
    -    %ratio_var = isi_var / isi_var_th
    -    %assert( 1.0<=ratio_var<=1.5 )
    -    n d div dup mul n exch div /isi_var_th Set
    -    isi_var isi_var_th div /ratio_var Set
    -    1.0 err sub ratio_var leq
    -    ratio_var 1.0 err add leq
    -    and assert_or_die
    -    
    -} def
    -
    -
    -% 4) check if threshold adaptation works by looking for negative serial correlation of ISI
    -
    -/check_adapting_threshold
    -{
    -    
    -    %# test parameters
    -    1e-8 /d Set
    -    30.0 /lam Set
    -    10000.0 /T Set
    -
    -    ResetKernel
    -
    -
    -    /pp_psc_delta Create /nrn Set
    -
    -    <<
    -      /tau_m  10.0
    -      /C_m   250.0
    -      /dead_time d 
    -      /dead_time_random  false
    -      /dead_time_shape  1
    -      /with_reset false
    -      /tau_sfa [34.0]
    -      /q_sfa [7.0]
    -      /c_1  0.0
    -      /c_2 lam 
    -      /c_3   0.25
    -      /I_e   0.0
    -      /t_ref_remaining   0.0
    -    >> /params Set
    -    
    -    nrn params SetStatus
    -    
    -    /spike_recorder Create /sr Set
    -    
    -    nrn sr Connect
    -    T Simulate
    -
    -    sr /events get /times get /spikes Set
    -
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes cva size T 1e-3 mul div /rate_sim Set /spikes_array Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    1.0 lam div d 1e-3 mul add /mu_ana Set 
    -    1.0 mu_ana div /rate_ana Set
    -    %1.0 1.0 lam div d 1e-3 mul add div /rate_ana Set
    -    
    -    % ratio = rate_sim / rate_ana
    -    rate_sim rate_ana div /ratio Set
    -    
    -
    -    %# Adaptive threshold changes rate, thus not asserted here
    -    %0.5 ratio lt
    -    %ratio 1.5 lt
    -    %and assert_or_die
    -
    -    %isi = []
    -    %for i in xrange(1,len(spikes)):
    -    %    isi.append(spikes[i]-spikes[i-1])
    -    0.0 /t Set
    -    spikes cva { dup t sub exch /t Set  } Map Rest /isi Set
    -    
    -    %    # compute moments of ISI to get mean and variance
    -    %    isi_m1 = isi[-1]
    -    %    isi_m2 = isi[-1]**2
    -    %    isi_12 = 0.
    -    %    for t,t1 in zip(isi[:-1],isi[1:]):
    -    %        isi_m1 += t
    -    %        isi_m2 += t**2
    -    %        isi_12 += t*t1
    -    0. /isi_m1 Set
    -    0. /isi_m2 Set
    -    isi { dup isi_m1 add /isi_m1 Set dup mul isi_m2 add /isi_m2 Set} forall
    -
    -    isi size exch pop /isi_size Set
    -
    -    0. /isi_12 Set
    -    [] isi_size 1 sub append /dummylist Set
    -    dummylist Range {dup isi exch get exch 1 sub isi exch get mul isi_12 add /isi_12 Set} forall
    - 
    -    %    
    -    %    isi_mean = isi_m1 / len(isi)
    -    %    isi_var = (isi_m2 - isi_m1)**2 / len(isi)
    -    %    isi_corr = (isi_12 / (len(isi)-1) - isi_mean**2) / isi_var
    -    isi_m1 isi_size div /isi_mean Set
    -    isi_m2 isi_size div isi_mean dup mul sub /isi_var Set
    -    isi_size 1 sub isi_12 exch div isi_mean dup mul sub isi_var div /isi_corr Set
    -
    -    % This could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    %    assert( -1.0<isi_corr<0.0 )
    -    -1.0 isi_corr lt
    -    isi_corr 0. lt 
    -    and assert_or_die
    -} def
    -
    -
    -% 5) check if threshold adaptation with membrane time constant corresponds to an
    -% inhibitory self-connection
    -
    -/compare_adaptation_and_self_inhibition
    -{
    -
    -    % test parameters
    -    0.001 /d Set
    -    10.0 /lam Set
    -    200000.0 /T Set
    -    25.0 /tau_m Set
    -    50.0 /J_self Set
    -    0.1 /J_adapt Set
    -
    -    ResetKernel
    -
    -    % create a neuron where adaptation does the reset, and one where a 
    -    % synapse does.
    -    /pp_psc_delta Create /nrn1 Set
    -    /pp_psc_delta Create /nrn2 Set
    -
    -    <<
    -      /tau_m  tau_m
    -      /C_m   250.0
    -      /dead_time d 
    -      /dead_time_random  false
    -      /dead_time_shape  1
    -      /with_reset false
    -      /tau_sfa [300.0 tau_m]
    -      /q_sfa [J_adapt J_self]
    -      /c_1  0.0
    -      /c_2 lam 
    -      /c_3   1.0
    -      /I_e   0.0
    -      /t_ref_remaining   0.0
    -    >> /params1 Set
    -
    -    <<
    -      /tau_m  tau_m
    -      /C_m   250.0
    -      /dead_time d 
    -      /dead_time_random  false
    -      /dead_time_shape  1
    -      /with_reset false
    -      /tau_sfa 300.0
    -      /q_sfa J_adapt
    -      /c_1  0.0
    -      /c_2 lam 
    -      /c_3   1.0
    -      /I_e   0.0
    -      /t_ref_remaining   0.0
    -    >> /params2 Set
    -
    -    nrn1 params1 SetStatus
    -    nrn2 params2 SetStatus
    -
    -    /spike_recorder Create /sr1 Set
    -    /spike_recorder Create /sr2 Set
    -
    -    nrn1 sr1 Connect
    -    nrn2 sr2 Connect
    -
    -    <<
    -      /weight  -1 J_self mul
    -      /delay   1.0
    -    >> /synparams Set
    -    
    -    /static_synapse synparams SetDefaults
    -    nrn2 nrn2 Connect
    -    
    -    T Simulate
    -
    -    sr1 /n_events get /n1 Set
    -    sr2 /n_events get /n2 Set
    -
    -    n1 cvd n2 cvd div /ratio Set
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    % for debugging of the test, print the observed spike numbers, ratio, and lam*T
    -    % cerr [n1 n2 ratio T lam mul 1000 div] pprint endl ;
    -    and assert_or_die
    -    
    -} def
    -
    -
    -check_rate_and_fixed_dead_time 
    -check_random_dead_time
    -check_adapting_threshold
    -compare_adaptation_and_self_inhibition
    -
    diff --git a/testsuite/unittests/test_ppd_sup_generator.sli b/testsuite/unittests/test_ppd_sup_generator.sli
    deleted file mode 100644
    index 03d7073cf9..0000000000
    --- a/testsuite/unittests/test_ppd_sup_generator.sli
    +++ /dev/null
    @@ -1,340 +0,0 @@
    -/*
    - *  test_ppd_sup_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_ppd_sup_generator - sli script for test of ppd_sup_generator output
    -
    -Synopsis: (test_ppd_sup_generator) run -> compare spike train statistics with expectations
    -
    -
    -Description:
    -
    - test_ppd_sup_generator is a collection of tests which require basic
    - functionality of the generator. It tests
    - 1) if the firing rate of a superposition is close to the preset one.
    - 2) if the coefficient of variation of a superposition agrees with theory
    - 3) if a fixed dead-time is respected absolutely in case of a single generated
    -    process.
    - 4) if the coefficient of variation of a single process agrees with theory
    - 5) if the spike trains generated for two different targets differ
    -
    - All of these tests are based on random number realizations, which is
    - necessarily so  since the model is stochastic. There is thus a finite
    - probability of test failure, even if everything is fine. The choice of the
    - variable err, which is the allowed relative deviation from the reference value,
    - can be used to make the test more or less strict. Increasing T inside the test
    - functions can also help to get more reliable statistics and a reduced
    - probability of false alarms.
    -
    - The values are chosen to have a reasonable execution time. False alarm were
    - never observed yet. Since random numbers are preserved through repetitions of
    - the simulations, the test should work for sure as long as the random number
    - generation procedure of nest is not changed. If it is changed, failure of the
    - test is still very unlikely.
    -
    - The intention of this script is to make sure that there are no gross errors in
    - the main functions of the ppd_sup_generator. It does not test the sinusoidal
    - hazard feature yet.
    -
    -Remarks:
    -  This test script was adapted from test_pp_psc_delta.sli
    -
    -
    -Author:  June 2011, Moritz Deger
    -SeeAlso: ppd_sup_generator, testsuite::test_pp_psc_delta, testsuite::test_poisson_generator_ps
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    -
    -
    -0.2 /err Set
    -
    -
    -% 1) check for reasonable superposition spike rate
    -% 2) check if superposition cv agrees with theory
    -
    -/check_sup_rate_and_cv
    -{
    -  (Sup rate and cv) =
    -   % test parameters
    -    25.0 /dead_time Set
    -    10.0 /rate Set
    -    10000.0 /T Set
    -    5 /n_proc Set
    -    1. /h Set
    -
    -
    -    ResetKernel
    -
    -    <<
    -      /resolution  h
    -    >> /kernelparams Set
    -
    -    kernelparams SetKernelStatus
    -
    -    /ppd_sup_generator Create /psg Set
    -
    -    <<
    -      /rate  rate
    -      /dead_time dead_time
    -      /n_proc n_proc
    -      /frequency 0.
    -      /relative_amplitude 0.
    -    >> /params Set
    -
    -    psg params SetStatus
    -
    -    /spike_recorder Create /sr Set
    -
    -    psg sr Connect
    -    T Simulate
    -
    -    sr /events get /times get /spikes Set
    -
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes cva size T 1e-3 mul div /rate_sim Set /spikes_array Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    rate n_proc mul /rate_ana Set
    -
    -    % ratio = rate_sim / rate_ana
    -    rate_sim rate_ana div /ratio Set
    -
    -    (Ratio test) =
    -    % this could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -
    -    %isi = []
    -    %for i in xrange(1,len(spikes)):
    -    %    isi.append(spikes[i]-spikes[i-1])
    -    0.0 /t Set
    -    spikes cva { dup t sub exch /t Set  } Map /isi Set
    -
    -
    -    %# compute moments of ISI to get mean and variance
    -    %isi_m1 = 0.
    -    %isi_m2 = 0.
    -    %for t in isi:
    -    %    isi_m1 += t
    -    %    isi_m2 += t**2
    -    0. /isi_m1 Set
    -    0. /isi_m2 Set
    -    isi { dup isi_m1 add /isi_m1 Set dup mul isi_m2 add /isi_m2 Set} forall
    -
    -    %isi_mean = isi_m1 / len(isi)
    -    %isi_var = isi_m2/ len(isi) - isi_mean**2
    -    %cvsq = isi_var/isi_mean**2
    -    isi_m1 isi size exch pop div /isi_mean Set
    -    isi_m2 isi size exch pop div isi_mean dup mul sub /isi_var Set
    -    isi_var isi_mean 2 pow  div /cvsq_sim Set
    -
    -    %theoretical CV**2, see Deger et al 2011, JCNS
    -    1.0 rate div 1e3 mul /mu Set
    -    1.0 1.0 n_proc add div /cvfact1 Set
    -    n_proc 1.0 sub 2.0 1.0 dead_time mu div sub  n_proc 1 add pow mul add /cvfact2 Set
    -    cvfact1 cvfact2 mul /cvsq_theo Set
    -
    -    (Ratio cvsq test) =
    -    cvsq_sim cvsq_theo div /ratio_cvsq Set
    -    1.0 err sub ratio_cvsq leq
    -    ratio_cvsq 1.0 err add leq
    -    and assert_or_die
    -
    -
    -} def
    -
    -
    -
    -%3) check if single process respects dead-time
    -
    -/check_single_rate_and_dead_time
    -{
    -  (Single rate and dead time) =
    -   % test parameters
    -    45.0 /dead_time Set
    -    15.0 /rate Set
    -    100000.0 /T Set
    -    1 /n_proc Set
    -    1.0 /h Set
    -
    -    ResetKernel
    -
    -    <<
    -      /resolution  h
    -    >> /kernelparams Set
    -
    -    kernelparams SetKernelStatus
    -
    -    /ppd_sup_generator Create /psg Set
    -
    -    <<
    -      /rate  rate
    -      /dead_time dead_time
    -      /n_proc n_proc
    -      /frequency 0.
    -      /relative_amplitude 0.
    -    >> /params Set
    -
    -    psg params SetStatus
    -
    -    /spike_recorder Create /sr Set
    -
    -    psg sr Connect
    -    T Simulate
    -
    -    sr /events get /times get /spikes Set
    -
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes cva size T 1e-3 mul div /rate_sim Set /spikes_array Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    rate n_proc mul /rate_ana Set
    -
    -    % ratio = rate_sim / rate_ana
    -    rate_sim rate_ana div /ratio Set
    -
    -    (Ratio check) =
    -    % this could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    1.0 err sub ratio lt
    -    ratio 1.0 err add lt
    -    and assert_or_die
    -
    -    %isi = []
    -    %for i in xrange(1,len(spikes)):
    -    %    isi.append(spikes[i]-spikes[i-1])
    -    % Assert that min(isi)>=d
    -    0.0 /t Set
    -    spikes cva { dup t sub exch /t Set  } Map /isi Set
    -    isi Rest Min dead_time geq assert_or_die
    -
    -    %# compute moments of ISI to get mean and variance
    -    %isi_m1 = 0.
    -    %isi_m2 = 0.
    -    %for t in isi:
    -    %    isi_m1 += t
    -    %    isi_m2 += t**2
    -    0. /isi_m1 Set
    -    0. /isi_m2 Set
    -    isi { dup isi_m1 add /isi_m1 Set dup mul isi_m2 add /isi_m2 Set} forall
    -
    -    %isi_mean = isi_m1 / len(isi)
    -    %isi_var = isi_m2/ len(isi) - isi_mean**2
    -    %cvsq = isi_var/isi_mean**2
    -    isi_m1 isi size exch pop div /isi_mean Set
    -    isi_m2 isi size exch pop div isi_mean dup mul sub /isi_var Set
    -    isi_var isi_mean 2 pow div /cvsq_sim Set
    -
    -    %theoretical CV**2, see Deger et al 2011, JCNS
    -    1.0 rate div /mu Set
    -    mu dead_time sub /lam Set
    -    1.0 lam div mu div 2 pow /cvsq_theo Set
    -
    -    (Ratio cvsq check) =
    -    cvsq_sim cvsq_theo div /ratio_cvsq Set
    -    1.0 err sub ratio_cvsq leq
    -    ratio_cvsq 1.0 err add leq
    -    and assert_or_die
    -
    -} def
    -
    -
    -/check_different_outputs
    -   {
    -     (Different outputs) =
    -   % test parameters
    -    5.0 /dead_time Set
    -    25.0 /rate Set
    -    10.0 /T Set
    -    1000 /n_proc Set
    -    0.01 /h Set
    -
    -    ResetKernel
    -
    -    <<
    -      /resolution  h
    -    >> /kernelparams Set
    -
    -    kernelparams SetKernelStatus
    -
    -    /ppd_sup_generator Create /psg Set
    -
    -    <<
    -      /rate  rate
    -      /dead_time dead_time
    -      /n_proc n_proc
    -      /frequency 0.
    -      /relative_amplitude 0.
    -    >> /params Set
    -
    -    psg params SetStatus
    -
    -    /spike_recorder Create /sr1 Set
    -    /spike_recorder Create /sr2 Set
    -
    -    psg sr1 Connect
    -    psg sr2 Connect
    -    T Simulate
    -
    -    (Check spike trains) =
    -    %first we check if the spike trains are different
    -    [sr1 sr2] {[/events /times] get} forall  neq  % spike trains differ
    -    assert_or_die
    -
    -    %and we also check the rates since we simulated anyway
    -    sr1 /events get /times get /spikes1 Set
    -    sr2 /events get /times get /spikes2 Set
    -
    -    % rate_sim = size(spikes) / (T*1e-3)
    -    spikes1 cva size T 1e-3 mul div /rate_sim1 Set /spikes_array1 Set
    -    spikes2 cva size T 1e-3 mul div /rate_sim2 Set /spikes_array2 Set
    -
    -    % rate_ana = 1./(1./lam + d*1e-3)
    -    rate n_proc mul /rate_ana Set
    -
    -    % ratio = rate_sim / rate_ana
    -    rate_sim1 rate_ana div /ratio1 Set
    -    rate_sim2 rate_ana div /ratio2 Set
    -
    -    (Check ratio1) =
    -    % this could fail due to bad luck. However, if it passes once, then it should
    -    % always do so, since the random numbers are reproducible in NEST.
    -    1.0 err sub ratio1 lt
    -    ratio1 1.0 err add lt
    -    and assert_or_die
    -
    -    (Check ratio2) =
    -    1.0 err sub ratio2 lt
    -    ratio2 1.0 err add lt
    -    and assert_or_die
    -} def
    -
    -
    -
    -check_sup_rate_and_cv
    -check_single_rate_and_dead_time
    -check_different_outputs
    diff --git a/testsuite/unittests/test_psp_amplitude_consistency.sli b/testsuite/unittests/test_psp_amplitude_consistency.sli
    deleted file mode 100644
    index cb25d90c42..0000000000
    --- a/testsuite/unittests/test_psp_amplitude_consistency.sli
    +++ /dev/null
    @@ -1,162 +0,0 @@
    -/*
    - *  test_psp_amplitude_consistency.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_psp_amplitude_consistency - test the consistency of PSP amplitudes across models.
    -
    -Synopsis: (test_psp_amplitude_consistency) run -> 
    -
    -Description:
    -
    -This test computes the peak amplitude of the postsynaptic potential
    -for different neuron models and checks whether their PSP peak
    -amplitudes match approximately.
    -
    -The maximal PSP amplitude is computed for different synaptic time
    -constants to ensure that the scaling of the postsynaptic response is
    -consinstent between models.
    -
    -Author:  December 2012, Gewaltig
    -SeeAlso: testsuite::test_iaf_psp, testsuite::test_iaf_ps_dc_accuracy
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -[ 0.5 1.0 2.0 5.0 15. ] /tau_syns Set % synaptic time constants to test
    -
    - 10. /emission Set             % Time of the spike
    -
    -% Parameters for conductance based models
    -<<
    -  /E_L       0.0      % resting potential in mV 
    -  /g_L      30.0
    -  /V_m       0.0      % initial membrane potential in mV  
    -  /V_th     30.0      % spike threshold in mV
    -  /I_e       0.0      % DC current in pA
    -  /E_ex     40.0
    -  /E_Na     40.0
    -  /E_in    -40.0
    -  /E_K     -40.0
    -  /C_m     250.0      % membrane capacity in pF
    -  /V_m       0.0
    -  /V_peak   50.0
    ->> /P_cond Set
    -
    -% Parameters for current based models
    -<<
    -  /tau_m    10.0
    -  /E_L       0.0      % resting potential in mV 
    -  /V_m       0.0      % initial membrane potential in mV  
    -  /V_th     15.0      % spike threshold in mV
    -  /I_e       0.0      % DC current in pA
    -  /C_m     250.0      % membrane capacity in pF
    ->> /P_psc Set
    -
    -/ComputePSP << 
    -                /model /aeif_cond_alpha 
    -                /params P_cond
    -            >> Options
    -
    -/ComputePSP
    -{
    -  /ComputePSP GetOptions begin
    -  /tau_syn Set
    -
    -  ResetKernel
    -  << /dict_miss_is_error false >> SetKernelStatus
    -  /spike_generator Create /sg Set
    -  sg <<
    -     /origin 50.0            % in ms
    -     /spike_times [ 20.0 ]   % in ms
    -     /start 0.0              % in ms 
    -     /stop  50.0             % in ms
    -   >> SetStatus
    -
    -   /voltmeter Create /vm Set
    -
    -   model Create /neuron Set
    -   params /tau_syn_ex tau_syn put
    -   neuron params SetStatus
    -
    -   sg neuron 1.5 1.0 Connect
    -   vm neuron Connect
    -
    -   150.0 Simulate
    -
    -   /V_max 0.0 def
    -   vm /events get /V_m get
    -   {
    -     dup V_max gt { /V_max Set }{ pop } ifelse
    -   } forall
    -   V_max
    -  end
    -} def
    -
    -% Testing conductance based alpha response models
    -GetKernelStatus /node_models get /aeif_cond_alpha MemberQ
    -{
    -  (Testing /aeif_cond_alpha) =
    -  /ComputePSP << /synapse_model /aeif_cond_alpha >> SetOptions
    -  tau_syns { ComputePSP } Map
    -  /ComputePSP << /synapse_model /iaf_cond_alpha >> SetOptions
    -  tau_syns { ComputePSP } Map
    -
    -  sub {sqr} Map Mean 1.e-4 lt assert_or_die
    -
    -  (Testing /aeif_cond_exp) =
    -  /ComputePSP << /synapse_model /aeif_cond_exp >> SetOptions
    -  tau_syns { ComputePSP } Map
    -  /ComputePSP << /synapse_model /iaf_cond_exp >> SetOptions
    -  tau_syns { ComputePSP } Map
    -
    -  sub {sqr} Map Mean 1.e-4 lt assert_or_die
    -
    -} if
    -
    -GetKernelStatus /node_models get /iaf_cond_exp_sfa_rr MemberQ
    -{
    -  (Testing /iaf_cond_exp_sfa_rr ) =
    -  /ComputePSP << /synapse_model /iaf_cond_exp_sfa_rr >> SetOptions
    -  tau_syns { ComputePSP } Map
    -  /ComputePSP << /synapse_model /iaf_cond_exp >> SetOptions
    -  tau_syns { ComputePSP } Map
    -
    -  sub {sqr} Map Mean 1.e-4 lt assert_or_die
    -
    -} if
    -
    -/* This test fails due to inappropriate parametrization of the hh model
    -GetKernelStatus /node_models get /hh_psc_alpha MemberQ
    -{
    -  (Testing /hh_psc_alpha) =
    -  /ComputePSP << /synapse_model /iaf_cond_alpha >> SetOptions
    -  tau_syns { ComputePSP } Map
    -  /ComputePSP << /synapse_model /hh_psc_alpha >> SetOptions
    -  tau_syns { ComputePSP } Map
    -
    -  sub {sqr} Map Mean 1.e-4 lt assert_or_die
    -} if
    -*/
    diff --git a/testsuite/unittests/test_pulsepacket_generator.sli b/testsuite/unittests/test_pulsepacket_generator.sli
    deleted file mode 100644
    index f67c9e50f7..0000000000
    --- a/testsuite/unittests/test_pulsepacket_generator.sli
    +++ /dev/null
    @@ -1,129 +0,0 @@
    -/*
    - *  test_pulsepacket_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_pulsepacket_generator - minimal test of pulsepacket_generator
    -
    -Synopsis: (test_pulsepacket_generator) run -> dies if assertion fails
    -
    -Description:
    -Tests parameter setting and statistical correctness for one application.
    -
    -Author: July 2008, Plesser
    -SeeAlso: noise_generator, testsuite::test_poisson_ps_min_interval
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% flatten arrays that may contain vectors and numbers
    -/allflat {
    -  { { cva } stopped { ; errordict begin /newerror false def end } if  } Map 
    -    Flatten
    -} def
    -
    -% First test: parameter setting on model and instance
    -{
    -    ResetKernel
    -    /tdict << /pulse_times [ 1.0 2.5 4.6 ] 
    -              /activity    150
    -              /sdev        0.1234  >> def
    -
    -    /ng1 /pulsepacket_generator Create def
    -    ng1 tdict SetStatus
    -
    -    /pulsepacket_generator tdict SetDefaults
    -    /ng2 /pulsepacket_generator Create def
    -
    -    ng1 [tdict keys] get allflat
    -    ng2 [tdict keys] get allflat
    -    eq
    -} assert_or_die
    -clear
    -ResetKernel
    -
    -% Second test: error if sdev negative
    -{
    -  ResetKernel
    -  /pulsepacket_generator << /sdev -0.5 >> SetDefaults
    -} fail_or_die  
    -
    -% Third test: error if activity negative
    -{
    -  ResetKernel
    -  /pulsepacket_generator << /activity -5 >> SetDefaults
    -} fail_or_die  
    -
    -% Fourth test: assure empty pulse times and zero otherwise is ok
    -{
    -  ResetKernel
    -  /pulsepacket_generator Create
    -  << /pulse_times [] /activity 0 /sdev 0.0 >> SetStatus
    -  1 Simulate
    -} pass_or_die  
    -
    -% Fifth test: feed spike recorder
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /ppg /pulsepacket_generator Create def
    -  /sr  /spike_recorder Create def
    - 
    -  /tstart  75.0 def
    -  /tstop  225.0 def
    -  /nspk    10   def
    -  /pulset [ 10.0 125.0 175.0 275.0 ] def
    -  /stddev   5.0 def
    -  % find number of pulse centers in start..stop
    -  /npulseff
    -    0 pulset { dup tstart gt exch tstop lt and { 1 } { 0 } ifelse add } Fold
    -  def
    -  % since start, stop are far from pulse times, it is highly likely that
    -  % only spikes belonging to the pulses with centers in start..stop are
    -  % fired and then we get for the total spike number 
    -  /nspktot nspk npulseff mul def
    -
    -  ppg << /start        tstart
    -         /stop         tstop
    -         /pulse_times  pulset
    -         /activity     nspk
    -         /sdev         stddev
    -      >> SetStatus
    -
    -  ppg sr Connect
    -
    -  300 Simulate
    -
    -  sr [ /events /times ] get cva /spks Set
    -
    -  % check min and max are inside start .. stop
    -  tstart spks Min leq
    -  spks Max tstop  leq and
    -
    -  % check number of spikes
    -  spks length nspktot eq
    -  and 
    -
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_rate_connections.sli b/testsuite/unittests/test_rate_connections.sli
    deleted file mode 100644
    index 63cb9cd7a1..0000000000
    --- a/testsuite/unittests/test_rate_connections.sli
    +++ /dev/null
    @@ -1,251 +0,0 @@
    -/*
    - *  test_rate_connections.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -  /** @BeginDocumentation
    -
    -    Name: testsuite::test_rate_connections - This test ensures that rate connections
    -    (rate_connection_instantaneous, rate_connection_delayed, diffusion_connection) work properly.
    -
    -    Synopsis: (test_rate_connections) run -> NEST exits if test fails
    -
    -    Description:
    -    The test ensures that legal rate connections can be created and that an exception 
    -    is thrown if one tries to create illegal rate connections. 
    -    Furthermore it is checked that the delay cannot be set for rate_connection_instantaneous connections and
    -    that delay and weight cannot be set for diffusion_connection connections.
    -
    -    Author: Jan Hahne
    -    SeeAlso: rate_connection_instantaneous, rate_connection_delayed, diffusion_connection
    -  */
    -
    -(unittest) run
    -/unittest using
    -
    -% The following test needs the model siegert_neuron, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -M_ERROR setverbosity
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% Checks for rate_connection_instantaneous %
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/supported
    -[ /lin_rate_ipn 
    -  /lin_rate_opn
    -  /threshold_lin_rate_ipn
    -  /threshold_lin_rate_opn
    -  /tanh_rate_ipn
    -  /tanh_rate_opn ]
    -def
    -
    -/not_supported
    -[ /hh_psc_alpha_gap
    -  /siegert_neuron
    -  /iaf_psc_alpha]
    -def
    -
    -supported
    -{
    - /model_supported Set
    -
    - % check that legal connections can be created
    - {
    -   ResetKernel
    -   model_supported Create /neuron_supported Set
    -   neuron_supported neuron_supported
    -   << /rule /one_to_one >> 
    -   << /synapse_model /rate_connection_instantaneous >>
    -   Connect
    - }
    - pass_or_die
    -
    - not_supported
    - {
    -    /model_not_supported Set
    -
    -    % check that illegal connection cannot be created
    -    {
    -      ResetKernel
    -      model_supported Create /neuron_supported Set
    -      model_not_supported Create /neuron_not_supported Set
    -      neuron_supported neuron_not_supported
    -      << /rule /one_to_one >> 
    -      << /synapse_model /rate_connection_instantaneous >>
    -      Connect
    -    }
    -    fail_or_die
    -  }
    -  forall
    -}
    -forall
    -
    -% Check that delay cannot be set for rate_connection_instantaneous connections
    -{
    -  ResetKernel
    -  /lin_rate_ipn Create /neuron_supported Set
    -  neuron_supported neuron_supported
    -  << /rule /all_to_all >> 
    -  << /synapse_model /rate_connection_instantaneous /delay 2.0 >>
    -  Connect
    -} fail_or_die
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% Checks for rate_connection_delayed %
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/supported
    -[ /lin_rate_ipn 
    -  /lin_rate_opn
    -  /threshold_lin_rate_ipn
    -  /threshold_lin_rate_opn
    -  /tanh_rate_ipn
    -  /tanh_rate_opn ]
    -def
    -
    -/not_supported
    -[ /hh_psc_alpha_gap
    -  /siegert_neuron
    -  /iaf_psc_alpha]
    -def
    -
    -supported
    -{
    - /model_supported Set
    -
    - % check that legal connections can be created
    - {
    -   ResetKernel
    -   model_supported Create /neuron_supported Set
    -   neuron_supported neuron_supported
    -   << /rule /one_to_one >> 
    -   << /synapse_model /rate_connection_delayed >>
    -   Connect
    - }
    - pass_or_die
    -
    - not_supported
    - {
    -    /model_not_supported Set
    -
    -    % check that illegal connection cannot be created
    -    {
    -      ResetKernel
    -      model_supported Create /neuron_supported Set
    -      model_not_supported Create /neuron_not_supported Set
    -      neuron_supported neuron_not_supported
    -      << /rule /one_to_one >> 
    -      << /synapse_model /rate_connection_delayed >>
    -      Connect
    -    }
    -    fail_or_die    
    -  }
    -  forall
    -}
    -forall
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -% Checks for diffusion_connection %
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -
    -/supported
    -[ /siegert_neuron ]
    -def
    -
    -/not_supported
    -[ /hh_psc_alpha_gap
    -  /iaf_psc_alpha
    -  /lin_rate_ipn 
    -  /lin_rate_opn
    -  /threshold_lin_rate_ipn
    -  /threshold_lin_rate_opn
    -  /tanh_rate_ipn
    -  /tanh_rate_opn ]
    -def
    -
    -supported
    -{
    - /model_supported Set
    -
    - % check that legal connections can be created
    - {
    -   ResetKernel
    -   model_supported Create /neuron_supported Set
    -   neuron_supported neuron_supported
    -   << /rule /one_to_one >> 
    -   << /synapse_model /diffusion_connection >>
    -   Connect
    - }
    - pass_or_die
    -
    - not_supported
    - {
    -    /model_not_supported Set
    -
    -    % check that illegal connection cannot be created
    -    {
    -      ResetKernel
    -      model_supported Create /neuron_supported Set
    -      model_not_supported Create /neuron_not_supported Set
    -      neuron_supported neuron_not_supported
    -      << /rule /one_to_one >> 
    -      << /synapse_model /diffusion_connection >>
    -      Connect
    -    }
    -    fail_or_die
    -  }
    -  forall
    -}
    -forall
    -
    -% Check that delay cannot be set for diffusion_connection connections
    -{
    -  ResetKernel
    -  /siegert_neuron Create /neuron_supported Set
    -  neuron_supported neuron_supported
    -  << /rule /all_to_all >> 
    -  << /synapse_model /diffusion_connection /delay 2.0 >>
    -  Connect
    -} fail_or_die
    -
    -% Check that weight cannot be set for diffusion_connection connections
    -{
    -  ResetKernel
    -  /siegert_neuron Create /neuron_supported Set
    -  neuron_supported neuron_supported
    -  << /rule /all_to_all >> 
    -  << /synapse_model /diffusion_connection /weight 2.0 >>
    -  Connect
    -} fail_or_die
    -
    -% Check that diffusion_factor and drift_factor can be set
    -{
    -  ResetKernel
    -  /siegert_neuron Create /neuron_supported Set
    -  neuron_supported neuron_supported
    -  << /rule /all_to_all >> 
    -  << /synapse_model /diffusion_connection /diffusion_factor 2.0 /drift_factor 2.0 >>
    -  Connect
    -} pass_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_reg_mask_circ_anchor_00.sli b/testsuite/unittests/test_reg_mask_circ_anchor_00.sli
    deleted file mode 100644
    index 37c75a8cf2..0000000000
    --- a/testsuite/unittests/test_reg_mask_circ_anchor_00.sli
    +++ /dev/null
    @@ -1,267 +0,0 @@
    -/*
    - *  test_reg_mask_circ_anchor_00.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Circular mask, radius 0.25
    -%
    -% expectation:
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the two nodes to the right and left of that location
    -%     - the two nodes above and below that location
    -%
    -%   nodes at the edges have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33    17 -> 38 43 48    22 -> 43 48
    -%	    29 	              44                49
    -%
    -%           31                46                51
    -%      6 -> 32 37    21 -> 42 47 52    26 -> 47 52
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /circular << /radius 0.25 >> /anchor [ 0.0 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 35 1 1 0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [7 27 1 1 -0.25 0]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [8 28 1 1 -0.25 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [9 29 1 1 -0.25 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [10 30 1 1 -0.25 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [12 32 1 1 -0.25 0]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [13 33 1 1 -0.25 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [14 34 1 1 -0.25 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [15 35 1 1 -0.25 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [17 37 1 1 -0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [18 38 1 1 -0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [19 39 1 1 -0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [20 40 1 1 -0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 50 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 45 1 1 -0.25 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_circ_anchor_01.sli b/testsuite/unittests/test_reg_mask_circ_anchor_01.sli
    deleted file mode 100644
    index 351d99a3e5..0000000000
    --- a/testsuite/unittests/test_reg_mask_circ_anchor_01.sli
    +++ /dev/null
    @@ -1,256 +0,0 @@
    -/*
    - *  test_reg_mask_circ_anchor_01.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Circular mask, radius 0.25
    -%
    -% expectation:
    -%   /anchor [ -0.25 0.0 ] : right edge of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - two nodes to the left of that location
    -%     - the two nodes to the left and above and below that location
    -%
    -%   nodes at the edges have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28    17 -> 33 38 43    22 -> 38 43 48
    -%	                   39                44
    -%
    -%                          41                46
    -%      6 -> 32    21 -> 37 42 47    26 -> 42 47 52
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /circular << /radius 0.25 >> /anchor [ -0.25 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [2 27 1 1 0 0]
    - [3 28 1 1 0 0]
    - [4 29 1 1 0 0]
    - [5 30 1 1 0 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [7 26 1 1 -0.25 0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [8 27 1 1 -0.25 0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [9 28 1 1 -0.25 0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [10 29 1 1 -0.25 0.25]
    - [10 30 1 1 -0.25 0]
    - [10 35 1 1 0 0]
    - [11 26 1 1 -0.5 0]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [12 27 1 1 -0.5 0]
    - [12 31 1 1 -0.25 0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [13 28 1 1 -0.5 0]
    - [13 32 1 1 -0.25 0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [14 29 1 1 -0.5 0]
    - [14 33 1 1 -0.25 0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [15 30 1 1 -0.5 0]
    - [15 34 1 1 -0.25 0.25]
    - [15 35 1 1 -0.25 0]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [17 32 1 1 -0.5 0]
    - [17 36 1 1 -0.25 0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [18 33 1 1 -0.5 0]
    - [18 37 1 1 -0.25 0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [19 34 1 1 -0.5 0]
    - [19 38 1 1 -0.25 0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [20 35 1 1 -0.5 0]
    - [20 39 1 1 -0.25 0.25]
    - [20 40 1 1 -0.25 0]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [22 37 1 1 -0.5 0]
    - [22 41 1 1 -0.25 0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [23 38 1 1 -0.5 0]
    - [23 42 1 1 -0.25 0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [24 39 1 1 -0.5 0]
    - [24 43 1 1 -0.25 0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [25 40 1 1 -0.5 0]
    - [25 44 1 1 -0.25 0.25]
    - [25 45 1 1 -0.25 0]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_circ_anchor_10.sli b/testsuite/unittests/test_reg_mask_circ_anchor_10.sli
    deleted file mode 100644
    index da59826f7f..0000000000
    --- a/testsuite/unittests/test_reg_mask_circ_anchor_10.sli
    +++ /dev/null
    @@ -1,290 +0,0 @@
    -/*
    - *  test_reg_mask_circ_anchor_10.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Circular mask, radius 0.25
    -%
    -% expectation:
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the two nodes to the right and left of that location
    -%     - the two nodes above and below that location
    -%
    -%   like reg_mask_circ_anchor_00, but with periodic boundary conditions
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%
    -%              32                47                52
    -%      2 -> 48 28 33    17 -> 38 43 48    22 -> 43 48 28
    -%	       29                44                49
    -%
    -%              31                46                51
    -%      6 -> 52 32 37    21 -> 42 47 52    26 -> 47 52 32
    -%              28                43                48
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /circular << /radius 0.25 >> /anchor [ 0.0 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 30 1 1 0 0.25]
    - [1 31 1 1 0.25 0]
    - [1 46 1 1 -0.25 0]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 47 1 1 -0.25 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 48 1 1 -0.25 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 49 1 1 -0.25 0]
    - [5 26 1 1 0 -0.25]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 35 1 1 0.25 0]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 35 1 1 0 0.25]
    - [6 36 1 1 0.25 0]
    - [7 27 1 1 -0.25 0]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [8 28 1 1 -0.25 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [9 29 1 1 -0.25 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [10 30 1 1 -0.25 0]
    - [10 31 1 1 0 -0.25]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 40 1 1 0 0.25]
    - [11 41 1 1 0.25 0]
    - [12 32 1 1 -0.25 0]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [13 33 1 1 -0.25 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [14 34 1 1 -0.25 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [15 35 1 1 -0.25 0]
    - [15 36 1 1 0 -0.25]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 45 1 1 0 0.25]
    - [16 46 1 1 0.25 0]
    - [17 37 1 1 -0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [18 38 1 1 -0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [19 39 1 1 -0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [20 40 1 1 -0.25 0]
    - [20 41 1 1 0 -0.25]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [21 50 1 1 0 0.25]
    - [22 27 1 1 0.25 0]
    - [22 42 1 1 -0.25 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 28 1 1 0.25 0]
    - [23 43 1 1 -0.25 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 29 1 1 0.25 0]
    - [24 44 1 1 -0.25 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 30 1 1 0.25 0]
    - [25 45 1 1 -0.25 0]
    - [25 46 1 1 0 -0.25]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_circ_anchor_11.sli b/testsuite/unittests/test_reg_mask_circ_anchor_11.sli
    deleted file mode 100644
    index 56d23051d2..0000000000
    --- a/testsuite/unittests/test_reg_mask_circ_anchor_11.sli
    +++ /dev/null
    @@ -1,291 +0,0 @@
    -/*
    - *  test_reg_mask_circ_anchor_11.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Circular mask, radius 0.25
    -%
    -% expectation:
    -%   /anchor [ -0.25 0.0 ] : right edge of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - two nodes to the left of that location
    -%     - the two nodes to the left and above and below that location
    -%
    -%   like reg_mask_circ_anchor_01, but with periodic boundary conditions
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%              52                42                47
    -%      2 -> 43 48 28    17 -> 33 38 43    22 -> 38 43 48
    -%	       49                39                44
    -%
    -%              51                41                46
    -%      6 -> 47 52 32    21 -> 37 42 47    26 -> 42 47 52
    -%              48                38                43
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /circular << /radius 0.25 >> /anchor [ -0.25 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 41 1 1 -0.5 0]
    - [1 46 1 1 -0.25 0]
    - [1 47 1 1 -0.25 -0.25]
    - [1 50 1 1 -0.25 0.25]
    - [2 27 1 1 0 0]
    - [2 42 1 1 -0.5 0]
    - [2 46 1 1 -0.25 0.25]
    - [2 47 1 1 -0.25 0]
    - [2 48 1 1 -0.25 -0.25]
    - [3 28 1 1 0 0]
    - [3 43 1 1 -0.5 0]
    - [3 47 1 1 -0.25 0.25]
    - [3 48 1 1 -0.25 0]
    - [3 49 1 1 -0.25 -0.25]
    - [4 29 1 1 0 0]
    - [4 44 1 1 -0.5 0]
    - [4 48 1 1 -0.25 0.25]
    - [4 49 1 1 -0.25 0]
    - [4 50 1 1 -0.25 -0.25]
    - [5 30 1 1 0 0]
    - [5 45 1 1 -0.5 0]
    - [5 46 1 1 -0.25 -0.25]
    - [5 49 1 1 -0.25 0.25]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 30 1 1 -0.25 0.25]
    - [6 31 1 1 0 0]
    - [6 46 1 1 -0.5 0]
    - [7 26 1 1 -0.25 0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 47 1 1 -0.5 0]
    - [8 27 1 1 -0.25 0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 48 1 1 -0.5 0]
    - [9 28 1 1 -0.25 0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 49 1 1 -0.5 0]
    - [10 26 1 1 -0.25 -0.25]
    - [10 29 1 1 -0.25 0.25]
    - [10 30 1 1 -0.25 0]
    - [10 35 1 1 0 0]
    - [10 50 1 1 -0.5 0]
    - [11 26 1 1 -0.5 0]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 35 1 1 -0.25 0.25]
    - [11 36 1 1 0 0]
    - [12 27 1 1 -0.5 0]
    - [12 31 1 1 -0.25 0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [13 28 1 1 -0.5 0]
    - [13 32 1 1 -0.25 0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [14 29 1 1 -0.5 0]
    - [14 33 1 1 -0.25 0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [15 30 1 1 -0.5 0]
    - [15 31 1 1 -0.25 -0.25]
    - [15 34 1 1 -0.25 0.25]
    - [15 35 1 1 -0.25 0]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 40 1 1 -0.25 0.25]
    - [16 41 1 1 0 0]
    - [17 32 1 1 -0.5 0]
    - [17 36 1 1 -0.25 0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [18 33 1 1 -0.5 0]
    - [18 37 1 1 -0.25 0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [19 34 1 1 -0.5 0]
    - [19 38 1 1 -0.25 0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [20 35 1 1 -0.5 0]
    - [20 36 1 1 -0.25 -0.25]
    - [20 39 1 1 -0.25 0.25]
    - [20 40 1 1 -0.25 0]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 45 1 1 -0.25 0.25]
    - [21 46 1 1 0 0]
    - [22 37 1 1 -0.5 0]
    - [22 41 1 1 -0.25 0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [23 38 1 1 -0.5 0]
    - [23 42 1 1 -0.25 0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [24 39 1 1 -0.5 0]
    - [24 43 1 1 -0.25 0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [25 40 1 1 -0.5 0]
    - [25 41 1 1 -0.25 -0.25]
    - [25 44 1 1 -0.25 0.25]
    - [25 45 1 1 -0.25 0]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_donut_anchor_00.sli b/testsuite/unittests/test_reg_mask_donut_anchor_00.sli
    deleted file mode 100644
    index 2e9723b528..0000000000
    --- a/testsuite/unittests/test_reg_mask_donut_anchor_00.sli
    +++ /dev/null
    @@ -1,241 +0,0 @@
    -/*
    - *  test_reg_mask_donut_anchor_00.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Doughnut mask, outer radius 0.25, inner radius 0.1
    -%
    -% expectation:
    -%   each node is connected to
    -%     - the two nodes to the right and left of the source location in the target layer
    -%     - the two nodes above and below that location
    -%
    -%   nodes at the edges have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 ->    33    17 -> 38    48    22 -> 43
    -%	    29 	              44                49
    -%
    -%           31                46                51
    -%      6 ->    37    21 -> 42    52    26 -> 47
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /doughnut << /outer_radius 0.25 /inner_radius 0.1 >> /anchor [ 0.0 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [2 26 1 1 0 0.25]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [3 27 1 1 0 0.25]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [4 28 1 1 0 0.25]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [5 29 1 1 0 0.25]
    - [5 35 1 1 0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [7 27 1 1 -0.25 0]
    - [7 31 1 1 0 0.25]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [8 28 1 1 -0.25 0]
    - [8 32 1 1 0 0.25]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [9 29 1 1 -0.25 0]
    - [9 33 1 1 0 0.25]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [10 30 1 1 -0.25 0]
    - [10 34 1 1 0 0.25]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [12 32 1 1 -0.25 0]
    - [12 36 1 1 0 0.25]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [13 33 1 1 -0.25 0]
    - [13 37 1 1 0 0.25]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [14 34 1 1 -0.25 0]
    - [14 38 1 1 0 0.25]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [15 35 1 1 -0.25 0]
    - [15 39 1 1 0 0.25]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [17 37 1 1 -0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [18 38 1 1 -0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [19 39 1 1 -0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [20 40 1 1 -0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 50 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 47 1 1 0 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 46 1 1 0 0.25]
    - [22 48 1 1 0 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 47 1 1 0 0.25]
    - [23 49 1 1 0 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 48 1 1 0 0.25]
    - [24 50 1 1 0 -0.25]
    - [25 45 1 1 -0.25 0]
    - [25 49 1 1 0 0.25]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_donut_anchor_01.sli b/testsuite/unittests/test_reg_mask_donut_anchor_01.sli
    deleted file mode 100644
    index c5677cce68..0000000000
    --- a/testsuite/unittests/test_reg_mask_donut_anchor_01.sli
    +++ /dev/null
    @@ -1,236 +0,0 @@
    -/*
    - *  test_reg_mask_donut_anchor_01.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Doughnut mask, outer radius 0.25, inner radius 0.1
    -%
    -% expectation:
    -%   /anchor [ -0.25 0.0 ] : right edge of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the node two grid steps to the left of that location
    -%     - the two nodes to the left and above and below that location
    -%
    -%   nodes at the edges have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28    17 -> 33    43    22 -> 38    48
    -%	                   39                44
    -%
    -%                          41                46
    -%      6 -> 32    21 -> 37    47    26 -> 42    52
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /doughnut << /outer_radius 0.25 /inner_radius 0.1 >> /anchor [ -0.25 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [2 27 1 1 0 0]
    - [3 28 1 1 0 0]
    - [4 29 1 1 0 0]
    - [5 30 1 1 0 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [7 26 1 1 -0.25 0.25]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [8 27 1 1 -0.25 0.25]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [9 28 1 1 -0.25 0.25]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [10 29 1 1 -0.25 0.25]
    - [10 35 1 1 0 0]
    - [11 26 1 1 -0.5 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [12 27 1 1 -0.5 0]
    - [12 31 1 1 -0.25 0.25]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [13 28 1 1 -0.5 0]
    - [13 32 1 1 -0.25 0.25]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [14 29 1 1 -0.5 0]
    - [14 33 1 1 -0.25 0.25]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [15 30 1 1 -0.5 0]
    - [15 34 1 1 -0.25 0.25]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [17 32 1 1 -0.5 0]
    - [17 36 1 1 -0.25 0.25]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [18 33 1 1 -0.5 0]
    - [18 37 1 1 -0.25 0.25]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [19 34 1 1 -0.5 0]
    - [19 38 1 1 -0.25 0.25]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [20 35 1 1 -0.5 0]
    - [20 39 1 1 -0.25 0.25]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [22 37 1 1 -0.5 0]
    - [22 41 1 1 -0.25 0.25]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [23 38 1 1 -0.5 0]
    - [23 42 1 1 -0.25 0.25]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [24 39 1 1 -0.5 0]
    - [24 43 1 1 -0.25 0.25]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [25 40 1 1 -0.5 0]
    - [25 44 1 1 -0.25 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_donut_anchor_10.sli b/testsuite/unittests/test_reg_mask_donut_anchor_10.sli
    deleted file mode 100644
    index 9218d21fe1..0000000000
    --- a/testsuite/unittests/test_reg_mask_donut_anchor_10.sli
    +++ /dev/null
    @@ -1,264 +0,0 @@
    -/*
    - *  test_reg_mask_donut_anchor_10.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Doughnut mask, outer radius 0.25, inner radius 0.1
    -%
    -% expectation:
    -%   each node is connected to
    -%     - the two nodes to the right and left of the source location in the target layer
    -%     - the two nodes above and below that location
    -%
    -%   like reg_mask_donut_anchor_00, but with periodic boundary conditions
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%
    -%              32                47                52
    -%      2 -> 48    33    17 -> 38    48    22 -> 43    28
    -%	       29                44                49
    -%
    -%              31                46                51
    -%      6 -> 52    37    21 -> 42    52    26 -> 47    32
    -%              28                43                48
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /doughnut << /outer_radius 0.25 /inner_radius 0.1 >> /anchor [ 0.0 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 27 1 1 0 -0.25]
    - [1 30 1 1 0 0.25]
    - [1 31 1 1 0.25 0]
    - [1 46 1 1 -0.25 0]
    - [2 26 1 1 0 0.25]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 47 1 1 -0.25 0]
    - [3 27 1 1 0 0.25]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 48 1 1 -0.25 0]
    - [4 28 1 1 0 0.25]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 49 1 1 -0.25 0]
    - [5 26 1 1 0 -0.25]
    - [5 29 1 1 0 0.25]
    - [5 35 1 1 0.25 0]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 32 1 1 0 -0.25]
    - [6 35 1 1 0 0.25]
    - [6 36 1 1 0.25 0]
    - [7 27 1 1 -0.25 0]
    - [7 31 1 1 0 0.25]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [8 28 1 1 -0.25 0]
    - [8 32 1 1 0 0.25]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [9 29 1 1 -0.25 0]
    - [9 33 1 1 0 0.25]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [10 30 1 1 -0.25 0]
    - [10 31 1 1 0 -0.25]
    - [10 34 1 1 0 0.25]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 37 1 1 0 -0.25]
    - [11 40 1 1 0 0.25]
    - [11 41 1 1 0.25 0]
    - [12 32 1 1 -0.25 0]
    - [12 36 1 1 0 0.25]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [13 33 1 1 -0.25 0]
    - [13 37 1 1 0 0.25]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [14 34 1 1 -0.25 0]
    - [14 38 1 1 0 0.25]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [15 35 1 1 -0.25 0]
    - [15 36 1 1 0 -0.25]
    - [15 39 1 1 0 0.25]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 42 1 1 0 -0.25]
    - [16 45 1 1 0 0.25]
    - [16 46 1 1 0.25 0]
    - [17 37 1 1 -0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [18 38 1 1 -0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [19 39 1 1 -0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [20 40 1 1 -0.25 0]
    - [20 41 1 1 0 -0.25]
    - [20 44 1 1 0 0.25]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 47 1 1 0 -0.25]
    - [21 50 1 1 0 0.25]
    - [22 27 1 1 0.25 0]
    - [22 42 1 1 -0.25 0]
    - [22 46 1 1 0 0.25]
    - [22 48 1 1 0 -0.25]
    - [23 28 1 1 0.25 0]
    - [23 43 1 1 -0.25 0]
    - [23 47 1 1 0 0.25]
    - [23 49 1 1 0 -0.25]
    - [24 29 1 1 0.25 0]
    - [24 44 1 1 -0.25 0]
    - [24 48 1 1 0 0.25]
    - [24 50 1 1 0 -0.25]
    - [25 30 1 1 0.25 0]
    - [25 45 1 1 -0.25 0]
    - [25 46 1 1 0 -0.25]
    - [25 49 1 1 0 0.25]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_donut_anchor_11.sli b/testsuite/unittests/test_reg_mask_donut_anchor_11.sli
    deleted file mode 100644
    index a541e1fe2a..0000000000
    --- a/testsuite/unittests/test_reg_mask_donut_anchor_11.sli
    +++ /dev/null
    @@ -1,266 +0,0 @@
    -/*
    - *  test_reg_mask_donut_anchor_11.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% Doughnut mask, outer radius 0.25, inner radius 0.1
    -%
    -% expectation:
    -%   /anchor [ -0.25 0.0 ] : right edge of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the node two grid steps to the left of that location
    -%     - the two nodes to the left and above and below that location
    -%
    -%   like reg_mask_donut_anchor_01, but with periodic boundary conditions
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%              52                42                47
    -%      2 -> 43    28    17 -> 33    43    22 -> 38    48
    -%	       49                39                44
    -%
    -%              51                41                46
    -%      6 -> 47    32    21 -> 37    47    26 -> 42    52
    -%              48                38                43
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /doughnut << /outer_radius 0.25 /inner_radius 0.1 >> /anchor [ -0.25 0.0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 41 1 1 -0.5 0]
    - [1 47 1 1 -0.25 -0.25]
    - [1 50 1 1 -0.25 0.25]
    - [2 27 1 1 0 0]
    - [2 42 1 1 -0.5 0]
    - [2 46 1 1 -0.25 0.25]
    - [2 48 1 1 -0.25 -0.25]
    - [3 28 1 1 0 0]
    - [3 43 1 1 -0.5 0]
    - [3 47 1 1 -0.25 0.25]
    - [3 49 1 1 -0.25 -0.25]
    - [4 29 1 1 0 0]
    - [4 44 1 1 -0.5 0]
    - [4 48 1 1 -0.25 0.25]
    - [4 50 1 1 -0.25 -0.25]
    - [5 30 1 1 0 0]
    - [5 45 1 1 -0.5 0]
    - [5 46 1 1 -0.25 -0.25]
    - [5 49 1 1 -0.25 0.25]
    - [6 27 1 1 -0.25 -0.25]
    - [6 30 1 1 -0.25 0.25]
    - [6 31 1 1 0 0]
    - [6 46 1 1 -0.5 0]
    - [7 26 1 1 -0.25 0.25]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 47 1 1 -0.5 0]
    - [8 27 1 1 -0.25 0.25]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 48 1 1 -0.5 0]
    - [9 28 1 1 -0.25 0.25]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 49 1 1 -0.5 0]
    - [10 26 1 1 -0.25 -0.25]
    - [10 29 1 1 -0.25 0.25]
    - [10 35 1 1 0 0]
    - [10 50 1 1 -0.5 0]
    - [11 26 1 1 -0.5 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 35 1 1 -0.25 0.25]
    - [11 36 1 1 0 0]
    - [12 27 1 1 -0.5 0]
    - [12 31 1 1 -0.25 0.25]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [13 28 1 1 -0.5 0]
    - [13 32 1 1 -0.25 0.25]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [14 29 1 1 -0.5 0]
    - [14 33 1 1 -0.25 0.25]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [15 30 1 1 -0.5 0]
    - [15 31 1 1 -0.25 -0.25]
    - [15 34 1 1 -0.25 0.25]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 40 1 1 -0.25 0.25]
    - [16 41 1 1 0 0]
    - [17 32 1 1 -0.5 0]
    - [17 36 1 1 -0.25 0.25]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [18 33 1 1 -0.5 0]
    - [18 37 1 1 -0.25 0.25]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [19 34 1 1 -0.5 0]
    - [19 38 1 1 -0.25 0.25]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [20 35 1 1 -0.5 0]
    - [20 36 1 1 -0.25 -0.25]
    - [20 39 1 1 -0.25 0.25]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 45 1 1 -0.25 0.25]
    - [21 46 1 1 0 0]
    - [22 37 1 1 -0.5 0]
    - [22 41 1 1 -0.25 0.25]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [23 38 1 1 -0.5 0]
    - [23 42 1 1 -0.25 0.25]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [24 39 1 1 -0.5 0]
    - [24 43 1 1 -0.25 0.25]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [25 40 1 1 -0.5 0]
    - [25 41 1 1 -0.25 -0.25]
    - [25 44 1 1 -0.25 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_00.sli b/testsuite/unittests/test_reg_mask_grid_anchor_00.sli
    deleted file mode 100644
    index 9195aadc0d..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_00.sli
    +++ /dev/null
    @@ -1,268 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_00.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% expectation:
    -%   each node is connected to
    -%     - the node in the same location in the target layer
    -%     - the two nodes to the right of that location
    -%     - the three corresponding nodes in the row below
    -%
    -%   nodes in the bottom row connect only to nodes on the corresponding row
    -%   nodes at the right edge have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 38    17 -> 43 48    22 -> 48
    -%	    29 34 39	      44 49	     49
    -%
    -%      6 -> 32 37 42    21 -> 47 52    26 -> 52
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 0 0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [1 32 1 1 0.25 -0.25]
    - [1 36 1 1 0.5 0]
    - [1 37 1 1 0.5 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 33 1 1 0.25 -0.25]
    - [2 37 1 1 0.5 0]
    - [2 38 1 1 0.5 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 34 1 1 0.25 -0.25]
    - [3 38 1 1 0.5 0]
    - [3 39 1 1 0.5 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 35 1 1 0.25 -0.25]
    - [4 39 1 1 0.5 0]
    - [4 40 1 1 0.5 -0.25]
    - [5 30 1 1 0 0]
    - [5 35 1 1 0.25 0]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [6 37 1 1 0.25 -0.25]
    - [6 41 1 1 0.5 0]
    - [6 42 1 1 0.5 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [7 38 1 1 0.25 -0.25]
    - [7 42 1 1 0.5 0]
    - [7 43 1 1 0.5 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [8 39 1 1 0.25 -0.25]
    - [8 43 1 1 0.5 0]
    - [8 44 1 1 0.5 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [9 40 1 1 0.25 -0.25]
    - [9 44 1 1 0.5 0]
    - [9 45 1 1 0.5 -0.25]
    - [10 35 1 1 0 0]
    - [10 40 1 1 0.25 0]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [11 42 1 1 0.25 -0.25]
    - [11 46 1 1 0.5 0]
    - [11 47 1 1 0.5 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [12 43 1 1 0.25 -0.25]
    - [12 47 1 1 0.5 0]
    - [12 48 1 1 0.5 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [13 44 1 1 0.25 -0.25]
    - [13 48 1 1 0.5 0]
    - [13 49 1 1 0.5 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [14 45 1 1 0.25 -0.25]
    - [14 49 1 1 0.5 0]
    - [14 50 1 1 0.5 -0.25]
    - [15 40 1 1 0 0]
    - [15 45 1 1 0.25 0]
    - [15 50 1 1 0.5 0]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [16 47 1 1 0.25 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [17 48 1 1 0.25 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [18 49 1 1 0.25 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [19 50 1 1 0.25 -0.25]
    - [20 45 1 1 0 0]
    - [20 50 1 1 0.25 0]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_01.sli b/testsuite/unittests/test_reg_mask_grid_anchor_01.sli
    deleted file mode 100644
    index 9b805202b8..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_01.sli
    +++ /dev/null
    @@ -1,269 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_01.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% expectation:
    -%   /anchor [ 0 1 ] : lower left corner of mask aligned with source
    -%
    -%   each node is connected to
    -%     - the node in the same location column and one row above in the target layer
    -%     - the two nodes to the right of that location
    -%     - the three corresponding nodes in the row below
    -%
    -%   nodes at the right edge have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 38    17 -> 43 48    22 -> 48
    -%
    -%      6 -> 31 36 41    21 -> 46 51    26 -> 51
    -%           32 37 42   	      47 52    	     52
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 0 1 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 31 1 1 0.25 0]
    - [1 36 1 1 0.5 0]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 31 1 1 0.25 0.25]
    - [2 32 1 1 0.25 0]
    - [2 36 1 1 0.5 0.25]
    - [2 37 1 1 0.5 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 32 1 1 0.25 0.25]
    - [3 33 1 1 0.25 0]
    - [3 37 1 1 0.5 0.25]
    - [3 38 1 1 0.5 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 33 1 1 0.25 0.25]
    - [4 34 1 1 0.25 0]
    - [4 38 1 1 0.5 0.25]
    - [4 39 1 1 0.5 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 34 1 1 0.25 0.25]
    - [5 35 1 1 0.25 0]
    - [5 39 1 1 0.5 0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 36 1 1 0.25 0]
    - [6 41 1 1 0.5 0]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 36 1 1 0.25 0.25]
    - [7 37 1 1 0.25 0]
    - [7 41 1 1 0.5 0.25]
    - [7 42 1 1 0.5 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 37 1 1 0.25 0.25]
    - [8 38 1 1 0.25 0]
    - [8 42 1 1 0.5 0.25]
    - [8 43 1 1 0.5 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 38 1 1 0.25 0.25]
    - [9 39 1 1 0.25 0]
    - [9 43 1 1 0.5 0.25]
    - [9 44 1 1 0.5 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 39 1 1 0.25 0.25]
    - [10 40 1 1 0.25 0]
    - [10 44 1 1 0.5 0.25]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 41 1 1 0.25 0]
    - [11 46 1 1 0.5 0]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 41 1 1 0.25 0.25]
    - [12 42 1 1 0.25 0]
    - [12 46 1 1 0.5 0.25]
    - [12 47 1 1 0.5 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 42 1 1 0.25 0.25]
    - [13 43 1 1 0.25 0]
    - [13 47 1 1 0.5 0.25]
    - [13 48 1 1 0.5 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 43 1 1 0.25 0.25]
    - [14 44 1 1 0.25 0]
    - [14 48 1 1 0.5 0.25]
    - [14 49 1 1 0.5 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 44 1 1 0.25 0.25]
    - [15 45 1 1 0.25 0]
    - [15 49 1 1 0.5 0.25]
    - [15 50 1 1 0.5 0]
    - [16 41 1 1 0 0]
    - [16 46 1 1 0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 46 1 1 0.25 0.25]
    - [17 47 1 1 0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 47 1 1 0.25 0.25]
    - [18 48 1 1 0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 48 1 1 0.25 0.25]
    - [19 49 1 1 0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 49 1 1 0.25 0.25]
    - [20 50 1 1 0.25 0]
    - [21 46 1 1 0 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_02.sli b/testsuite/unittests/test_reg_mask_grid_anchor_02.sli
    deleted file mode 100644
    index 21dc00ec8e..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_02.sli
    +++ /dev/null
    @@ -1,241 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_02.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% expectation:
    -%   /anchor [ 0 -1 ] : fictional point above upper left corner of mask aligned with source
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 29 34 39    17 -> 44 49    22 -> 49
    -%	    30 35 40	      45 50	     50
    -%
    -%      5 -> 32 37 42    20 -> 47 52    25 -> 52
    -%
    -%      6 ->    	        21 ->  	       26 ->
    -
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 0 -1 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 27 1 1 0 -0.25]
    - [1 28 1 1 0 -0.5]
    - [1 32 1 1 0.25 -0.25]
    - [1 33 1 1 0.25 -0.5]
    - [1 37 1 1 0.5 -0.25]
    - [1 38 1 1 0.5 -0.5]
    - [2 28 1 1 0 -0.25]
    - [2 29 1 1 0 -0.5]
    - [2 33 1 1 0.25 -0.25]
    - [2 34 1 1 0.25 -0.5]
    - [2 38 1 1 0.5 -0.25]
    - [2 39 1 1 0.5 -0.5]
    - [3 29 1 1 0 -0.25]
    - [3 30 1 1 0 -0.5]
    - [3 34 1 1 0.25 -0.25]
    - [3 35 1 1 0.25 -0.5]
    - [3 39 1 1 0.5 -0.25]
    - [3 40 1 1 0.5 -0.5]
    - [4 30 1 1 0 -0.25]
    - [4 35 1 1 0.25 -0.25]
    - [4 40 1 1 0.5 -0.25]
    - [6 32 1 1 0 -0.25]
    - [6 33 1 1 0 -0.5]
    - [6 37 1 1 0.25 -0.25]
    - [6 38 1 1 0.25 -0.5]
    - [6 42 1 1 0.5 -0.25]
    - [6 43 1 1 0.5 -0.5]
    - [7 33 1 1 0 -0.25]
    - [7 34 1 1 0 -0.5]
    - [7 38 1 1 0.25 -0.25]
    - [7 39 1 1 0.25 -0.5]
    - [7 43 1 1 0.5 -0.25]
    - [7 44 1 1 0.5 -0.5]
    - [8 34 1 1 0 -0.25]
    - [8 35 1 1 0 -0.5]
    - [8 39 1 1 0.25 -0.25]
    - [8 40 1 1 0.25 -0.5]
    - [8 44 1 1 0.5 -0.25]
    - [8 45 1 1 0.5 -0.5]
    - [9 35 1 1 0 -0.25]
    - [9 40 1 1 0.25 -0.25]
    - [9 45 1 1 0.5 -0.25]
    - [11 37 1 1 0 -0.25]
    - [11 38 1 1 0 -0.5]
    - [11 42 1 1 0.25 -0.25]
    - [11 43 1 1 0.25 -0.5]
    - [11 47 1 1 0.5 -0.25]
    - [11 48 1 1 0.5 -0.5]
    - [12 38 1 1 0 -0.25]
    - [12 39 1 1 0 -0.5]
    - [12 43 1 1 0.25 -0.25]
    - [12 44 1 1 0.25 -0.5]
    - [12 48 1 1 0.5 -0.25]
    - [12 49 1 1 0.5 -0.5]
    - [13 39 1 1 0 -0.25]
    - [13 40 1 1 0 -0.5]
    - [13 44 1 1 0.25 -0.25]
    - [13 45 1 1 0.25 -0.5]
    - [13 49 1 1 0.5 -0.25]
    - [13 50 1 1 0.5 -0.5]
    - [14 40 1 1 0 -0.25]
    - [14 45 1 1 0.25 -0.25]
    - [14 50 1 1 0.5 -0.25]
    - [16 42 1 1 0 -0.25]
    - [16 43 1 1 0 -0.5]
    - [16 47 1 1 0.25 -0.25]
    - [16 48 1 1 0.25 -0.5]
    - [17 43 1 1 0 -0.25]
    - [17 44 1 1 0 -0.5]
    - [17 48 1 1 0.25 -0.25]
    - [17 49 1 1 0.25 -0.5]
    - [18 44 1 1 0 -0.25]
    - [18 45 1 1 0 -0.5]
    - [18 49 1 1 0.25 -0.25]
    - [18 50 1 1 0.25 -0.5]
    - [19 45 1 1 0 -0.25]
    - [19 50 1 1 0.25 -0.25]
    - [21 47 1 1 0 -0.25]
    - [21 48 1 1 0 -0.5]
    - [22 48 1 1 0 -0.25]
    - [22 49 1 1 0 -0.5]
    - [23 49 1 1 0 -0.25]
    - [23 50 1 1 0 -0.5]
    - [24 50 1 1 0 -0.25]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_03.sli b/testsuite/unittests/test_reg_mask_grid_anchor_03.sli
    deleted file mode 100644
    index 0e4fb62b84..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_03.sli
    +++ /dev/null
    @@ -1,272 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_03.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% expectation:
    -%   /anchor [ 1 0 ] : horizonal center, top row aligned with source
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33    17 -> 38 43 48    22 -> 43 48
    -%	    29 34   	   39 44 49	     44 49
    -%
    -%      6 -> 32 37    21 -> 42 47 52    26 -> 47 52
    -
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 1 0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [1 32 1 1 0.25 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 33 1 1 0.25 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 34 1 1 0.25 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 35 1 1 0.25 -0.25]
    - [5 30 1 1 0 0]
    - [5 35 1 1 0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [6 37 1 1 0.25 -0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [7 38 1 1 0.25 -0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [8 39 1 1 0.25 -0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [9 40 1 1 0.25 -0.25]
    - [10 30 1 1 -0.25 0]
    - [10 35 1 1 0 0]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [11 42 1 1 0.25 -0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [12 43 1 1 0.25 -0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [13 44 1 1 0.25 -0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [14 45 1 1 0.25 -0.25]
    - [15 35 1 1 -0.25 0]
    - [15 40 1 1 0 0]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [16 47 1 1 0.25 -0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [17 48 1 1 0.25 -0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [18 49 1 1 0.25 -0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [19 50 1 1 0.25 -0.25]
    - [20 40 1 1 -0.25 0]
    - [20 45 1 1 0 0]
    - [20 50 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 45 1 1 -0.25 0]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_04.sli b/testsuite/unittests/test_reg_mask_grid_anchor_04.sli
    deleted file mode 100644
    index 68c715a99b..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_04.sli
    +++ /dev/null
    @@ -1,235 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_04.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% expectation:
    -%   /anchor [ -1 0 ] : ficitonal point one right of left edge, top row aligned with source
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 33 38 43    17 -> 48       22 ->
    -%	    34 39 44	      49
    -%
    -%      6 -> 37 42 47    21 -> 52       26 ->
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ -1 0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 31 1 1 0.25 0]
    - [1 32 1 1 0.25 -0.25]
    - [1 36 1 1 0.5 0]
    - [1 37 1 1 0.5 -0.25]
    - [1 41 1 1 0.75 0]
    - [1 42 1 1 0.75 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 33 1 1 0.25 -0.25]
    - [2 37 1 1 0.5 0]
    - [2 38 1 1 0.5 -0.25]
    - [2 42 1 1 0.75 0]
    - [2 43 1 1 0.75 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 34 1 1 0.25 -0.25]
    - [3 38 1 1 0.5 0]
    - [3 39 1 1 0.5 -0.25]
    - [3 43 1 1 0.75 0]
    - [3 44 1 1 0.75 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 35 1 1 0.25 -0.25]
    - [4 39 1 1 0.5 0]
    - [4 40 1 1 0.5 -0.25]
    - [4 44 1 1 0.75 0]
    - [4 45 1 1 0.75 -0.25]
    - [5 35 1 1 0.25 0]
    - [5 40 1 1 0.5 0]
    - [5 45 1 1 0.75 0]
    - [6 36 1 1 0.25 0]
    - [6 37 1 1 0.25 -0.25]
    - [6 41 1 1 0.5 0]
    - [6 42 1 1 0.5 -0.25]
    - [6 46 1 1 0.75 0]
    - [6 47 1 1 0.75 -0.25]
    - [7 37 1 1 0.25 0]
    - [7 38 1 1 0.25 -0.25]
    - [7 42 1 1 0.5 0]
    - [7 43 1 1 0.5 -0.25]
    - [7 47 1 1 0.75 0]
    - [7 48 1 1 0.75 -0.25]
    - [8 38 1 1 0.25 0]
    - [8 39 1 1 0.25 -0.25]
    - [8 43 1 1 0.5 0]
    - [8 44 1 1 0.5 -0.25]
    - [8 48 1 1 0.75 0]
    - [8 49 1 1 0.75 -0.25]
    - [9 39 1 1 0.25 0]
    - [9 40 1 1 0.25 -0.25]
    - [9 44 1 1 0.5 0]
    - [9 45 1 1 0.5 -0.25]
    - [9 49 1 1 0.75 0]
    - [9 50 1 1 0.75 -0.25]
    - [10 40 1 1 0.25 0]
    - [10 45 1 1 0.5 0]
    - [10 50 1 1 0.75 0]
    - [11 41 1 1 0.25 0]
    - [11 42 1 1 0.25 -0.25]
    - [11 46 1 1 0.5 0]
    - [11 47 1 1 0.5 -0.25]
    - [12 42 1 1 0.25 0]
    - [12 43 1 1 0.25 -0.25]
    - [12 47 1 1 0.5 0]
    - [12 48 1 1 0.5 -0.25]
    - [13 43 1 1 0.25 0]
    - [13 44 1 1 0.25 -0.25]
    - [13 48 1 1 0.5 0]
    - [13 49 1 1 0.5 -0.25]
    - [14 44 1 1 0.25 0]
    - [14 45 1 1 0.25 -0.25]
    - [14 49 1 1 0.5 0]
    - [14 50 1 1 0.5 -0.25]
    - [15 45 1 1 0.25 0]
    - [15 50 1 1 0.5 0]
    - [16 46 1 1 0.25 0]
    - [16 47 1 1 0.25 -0.25]
    - [17 47 1 1 0.25 0]
    - [17 48 1 1 0.25 -0.25]
    - [18 48 1 1 0.25 0]
    - [18 49 1 1 0.25 -0.25]
    - [19 49 1 1 0.25 0]
    - [19 50 1 1 0.25 -0.25]
    - [20 50 1 1 0.25 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_05.sli b/testsuite/unittests/test_reg_mask_grid_anchor_05.sli
    deleted file mode 100644
    index 99e21a0256..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_05.sli
    +++ /dev/null
    @@ -1,162 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_05.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% to be run by run_test.sli
    -
    -% expectation:
    -%   /anchor [ 5 5 ]
    -%   The fictional point (5,5) measured from the top-left corner of the mask towards
    -%   the bottom right is aligned with each source, i.e., the top left corner of the mask
    -%   displaced by (-5,-5) relative to the source node, measured in grid coordinates.
    -%   With a grid origin at (0,0), the "last" node in the 5x5 grid is at (4,4). For
    -%   connections from this node, the box upper left corner of the 2x3 mask is placed
    -%   at (-1,-1) and spans to (0,1), i.e., it contains nodes only at (0,0) and (0,1).
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    All connections:
    -%      21 -> 28
    -%      26 -> 28 33
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 5 5 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [20 26 1 1 -0.75 1]
    - [25 26 1 1 -1 1]
    - [25 31 1 1 -0.75 1]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_06.sli b/testsuite/unittests/test_reg_mask_grid_anchor_06.sli
    deleted file mode 100644
    index 798552e732..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_06.sli
    +++ /dev/null
    @@ -1,326 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_06.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% to be run by run_test.sli
    -
    -% expectation:
    -%    Symmetric 3x3 mask
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections:
    -%       2 -> 28 33    17 -> 38 43 48    22 -> 43 48
    -%	     29 34          39 44 49 	      44 49
    -%
    -%      14 -> 34 39 44
    -%	     35 40 45
    -%            36 41 46
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 3 ] >> /anchor [ 1 1 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [1 32 1 1 0.25 -0.25]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 31 1 1 0.25 0.25]
    - [2 32 1 1 0.25 0]
    - [2 33 1 1 0.25 -0.25]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 32 1 1 0.25 0.25]
    - [3 33 1 1 0.25 0]
    - [3 34 1 1 0.25 -0.25]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 33 1 1 0.25 0.25]
    - [4 34 1 1 0.25 0]
    - [4 35 1 1 0.25 -0.25]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 34 1 1 0.25 0.25]
    - [5 35 1 1 0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [6 37 1 1 0.25 -0.25]
    - [7 26 1 1 -0.25 0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 36 1 1 0.25 0.25]
    - [7 37 1 1 0.25 0]
    - [7 38 1 1 0.25 -0.25]
    - [8 27 1 1 -0.25 0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 37 1 1 0.25 0.25]
    - [8 38 1 1 0.25 0]
    - [8 39 1 1 0.25 -0.25]
    - [9 28 1 1 -0.25 0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 38 1 1 0.25 0.25]
    - [9 39 1 1 0.25 0]
    - [9 40 1 1 0.25 -0.25]
    - [10 29 1 1 -0.25 0.25]
    - [10 30 1 1 -0.25 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 39 1 1 0.25 0.25]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [11 42 1 1 0.25 -0.25]
    - [12 31 1 1 -0.25 0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 41 1 1 0.25 0.25]
    - [12 42 1 1 0.25 0]
    - [12 43 1 1 0.25 -0.25]
    - [13 32 1 1 -0.25 0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 42 1 1 0.25 0.25]
    - [13 43 1 1 0.25 0]
    - [13 44 1 1 0.25 -0.25]
    - [14 33 1 1 -0.25 0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 43 1 1 0.25 0.25]
    - [14 44 1 1 0.25 0]
    - [14 45 1 1 0.25 -0.25]
    - [15 34 1 1 -0.25 0.25]
    - [15 35 1 1 -0.25 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 44 1 1 0.25 0.25]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [16 47 1 1 0.25 -0.25]
    - [17 36 1 1 -0.25 0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 46 1 1 0.25 0.25]
    - [17 47 1 1 0.25 0]
    - [17 48 1 1 0.25 -0.25]
    - [18 37 1 1 -0.25 0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 47 1 1 0.25 0.25]
    - [18 48 1 1 0.25 0]
    - [18 49 1 1 0.25 -0.25]
    - [19 38 1 1 -0.25 0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 48 1 1 0.25 0.25]
    - [19 49 1 1 0.25 0]
    - [19 50 1 1 0.25 -0.25]
    - [20 39 1 1 -0.25 0.25]
    - [20 40 1 1 -0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 49 1 1 0.25 0.25]
    - [20 50 1 1 0.25 0]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 41 1 1 -0.25 0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 42 1 1 -0.25 0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 43 1 1 -0.25 0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 44 1 1 -0.25 0.25]
    - [25 45 1 1 -0.25 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_10.sli b/testsuite/unittests/test_reg_mask_grid_anchor_10.sli
    deleted file mode 100644
    index 28bcb01d59..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_10.sli
    +++ /dev/null
    @@ -1,304 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_10.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% expectation:
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 38    17 -> 43 48 28    22 -> 48 28 33
    -%	    29 34 39	      44 49 29	        49 29 34
    -%
    -%      6 -> 32 37 42    21 -> 47 52 32    26 -> 52 32 37
    -%           28 33 38          43 48 28          48 28 33
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 0 0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [1 32 1 1 0.25 -0.25]
    - [1 36 1 1 0.5 0]
    - [1 37 1 1 0.5 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 33 1 1 0.25 -0.25]
    - [2 37 1 1 0.5 0]
    - [2 38 1 1 0.5 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 34 1 1 0.25 -0.25]
    - [3 38 1 1 0.5 0]
    - [3 39 1 1 0.5 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 35 1 1 0.25 -0.25]
    - [4 39 1 1 0.5 0]
    - [4 40 1 1 0.5 -0.25]
    - [5 26 1 1 0 -0.25]
    - [5 30 1 1 0 0]
    - [5 31 1 1 0.25 -0.25]
    - [5 35 1 1 0.25 0]
    - [5 36 1 1 0.5 -0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [6 37 1 1 0.25 -0.25]
    - [6 41 1 1 0.5 0]
    - [6 42 1 1 0.5 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [7 38 1 1 0.25 -0.25]
    - [7 42 1 1 0.5 0]
    - [7 43 1 1 0.5 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [8 39 1 1 0.25 -0.25]
    - [8 43 1 1 0.5 0]
    - [8 44 1 1 0.5 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [9 40 1 1 0.25 -0.25]
    - [9 44 1 1 0.5 0]
    - [9 45 1 1 0.5 -0.25]
    - [10 31 1 1 0 -0.25]
    - [10 35 1 1 0 0]
    - [10 36 1 1 0.25 -0.25]
    - [10 40 1 1 0.25 0]
    - [10 41 1 1 0.5 -0.25]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [11 42 1 1 0.25 -0.25]
    - [11 46 1 1 0.5 0]
    - [11 47 1 1 0.5 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [12 43 1 1 0.25 -0.25]
    - [12 47 1 1 0.5 0]
    - [12 48 1 1 0.5 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [13 44 1 1 0.25 -0.25]
    - [13 48 1 1 0.5 0]
    - [13 49 1 1 0.5 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [14 45 1 1 0.25 -0.25]
    - [14 49 1 1 0.5 0]
    - [14 50 1 1 0.5 -0.25]
    - [15 36 1 1 0 -0.25]
    - [15 40 1 1 0 0]
    - [15 41 1 1 0.25 -0.25]
    - [15 45 1 1 0.25 0]
    - [15 46 1 1 0.5 -0.25]
    - [15 50 1 1 0.5 0]
    - [16 26 1 1 0.5 0]
    - [16 27 1 1 0.5 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [16 47 1 1 0.25 -0.25]
    - [17 27 1 1 0.5 0]
    - [17 28 1 1 0.5 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [17 48 1 1 0.25 -0.25]
    - [18 28 1 1 0.5 0]
    - [18 29 1 1 0.5 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [18 49 1 1 0.25 -0.25]
    - [19 29 1 1 0.5 0]
    - [19 30 1 1 0.5 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [19 50 1 1 0.25 -0.25]
    - [20 26 1 1 0.5 -0.25]
    - [20 30 1 1 0.5 0]
    - [20 41 1 1 0 -0.25]
    - [20 45 1 1 0 0]
    - [20 46 1 1 0.25 -0.25]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 27 1 1 0.25 -0.25]
    - [21 31 1 1 0.5 0]
    - [21 32 1 1 0.5 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 27 1 1 0.25 0]
    - [22 28 1 1 0.25 -0.25]
    - [22 32 1 1 0.5 0]
    - [22 33 1 1 0.5 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 28 1 1 0.25 0]
    - [23 29 1 1 0.25 -0.25]
    - [23 33 1 1 0.5 0]
    - [23 34 1 1 0.5 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 29 1 1 0.25 0]
    - [24 30 1 1 0.25 -0.25]
    - [24 34 1 1 0.5 0]
    - [24 35 1 1 0.5 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 26 1 1 0.25 -0.25]
    - [25 30 1 1 0.25 0]
    - [25 31 1 1 0.5 -0.25]
    - [25 35 1 1 0.5 0]
    - [25 46 1 1 0 -0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_11.sli b/testsuite/unittests/test_reg_mask_grid_anchor_11.sli
    deleted file mode 100644
    index b39124b1ed..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_11.sli
    +++ /dev/null
    @@ -1,304 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_11.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% expectation:
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 38    17 -> 43 48 28    22 -> 48 28 33
    -%           32 37 42          47 52 32          52 32 37
    -%
    -%      6 -> 31 36 41    21 -> 46 51 31    26 -> 51 31 36
    -%           32 37 42   	      47 52 32   	52 32 37
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 0 1 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 30 1 1 0 0.25]
    - [1 31 1 1 0.25 0]
    - [1 35 1 1 0.25 0.25]
    - [1 36 1 1 0.5 0]
    - [1 40 1 1 0.5 0.25]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 31 1 1 0.25 0.25]
    - [2 32 1 1 0.25 0]
    - [2 36 1 1 0.5 0.25]
    - [2 37 1 1 0.5 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 32 1 1 0.25 0.25]
    - [3 33 1 1 0.25 0]
    - [3 37 1 1 0.5 0.25]
    - [3 38 1 1 0.5 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 33 1 1 0.25 0.25]
    - [4 34 1 1 0.25 0]
    - [4 38 1 1 0.5 0.25]
    - [4 39 1 1 0.5 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 34 1 1 0.25 0.25]
    - [5 35 1 1 0.25 0]
    - [5 39 1 1 0.5 0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 35 1 1 0 0.25]
    - [6 36 1 1 0.25 0]
    - [6 40 1 1 0.25 0.25]
    - [6 41 1 1 0.5 0]
    - [6 45 1 1 0.5 0.25]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 36 1 1 0.25 0.25]
    - [7 37 1 1 0.25 0]
    - [7 41 1 1 0.5 0.25]
    - [7 42 1 1 0.5 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 37 1 1 0.25 0.25]
    - [8 38 1 1 0.25 0]
    - [8 42 1 1 0.5 0.25]
    - [8 43 1 1 0.5 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 38 1 1 0.25 0.25]
    - [9 39 1 1 0.25 0]
    - [9 43 1 1 0.5 0.25]
    - [9 44 1 1 0.5 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 39 1 1 0.25 0.25]
    - [10 40 1 1 0.25 0]
    - [10 44 1 1 0.5 0.25]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 40 1 1 0 0.25]
    - [11 41 1 1 0.25 0]
    - [11 45 1 1 0.25 0.25]
    - [11 46 1 1 0.5 0]
    - [11 50 1 1 0.5 0.25]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 41 1 1 0.25 0.25]
    - [12 42 1 1 0.25 0]
    - [12 46 1 1 0.5 0.25]
    - [12 47 1 1 0.5 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 42 1 1 0.25 0.25]
    - [13 43 1 1 0.25 0]
    - [13 47 1 1 0.5 0.25]
    - [13 48 1 1 0.5 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 43 1 1 0.25 0.25]
    - [14 44 1 1 0.25 0]
    - [14 48 1 1 0.5 0.25]
    - [14 49 1 1 0.5 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 44 1 1 0.25 0.25]
    - [15 45 1 1 0.25 0]
    - [15 49 1 1 0.5 0.25]
    - [15 50 1 1 0.5 0]
    - [16 26 1 1 0.5 0]
    - [16 30 1 1 0.5 0.25]
    - [16 41 1 1 0 0]
    - [16 45 1 1 0 0.25]
    - [16 46 1 1 0.25 0]
    - [16 50 1 1 0.25 0.25]
    - [17 26 1 1 0.5 0.25]
    - [17 27 1 1 0.5 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 46 1 1 0.25 0.25]
    - [17 47 1 1 0.25 0]
    - [18 27 1 1 0.5 0.25]
    - [18 28 1 1 0.5 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 47 1 1 0.25 0.25]
    - [18 48 1 1 0.25 0]
    - [19 28 1 1 0.5 0.25]
    - [19 29 1 1 0.5 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 48 1 1 0.25 0.25]
    - [19 49 1 1 0.25 0]
    - [20 29 1 1 0.5 0.25]
    - [20 30 1 1 0.5 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 49 1 1 0.25 0.25]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 30 1 1 0.25 0.25]
    - [21 31 1 1 0.5 0]
    - [21 35 1 1 0.5 0.25]
    - [21 46 1 1 0 0]
    - [21 50 1 1 0 0.25]
    - [22 26 1 1 0.25 0.25]
    - [22 27 1 1 0.25 0]
    - [22 31 1 1 0.5 0.25]
    - [22 32 1 1 0.5 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [23 27 1 1 0.25 0.25]
    - [23 28 1 1 0.25 0]
    - [23 32 1 1 0.5 0.25]
    - [23 33 1 1 0.5 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [24 28 1 1 0.25 0.25]
    - [24 29 1 1 0.25 0]
    - [24 33 1 1 0.5 0.25]
    - [24 34 1 1 0.5 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [25 29 1 1 0.25 0.25]
    - [25 30 1 1 0.25 0]
    - [25 34 1 1 0.5 0.25]
    - [25 35 1 1 0.5 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_13.sli b/testsuite/unittests/test_reg_mask_grid_anchor_13.sli
    deleted file mode 100644
    index 175413b8c5..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_13.sli
    +++ /dev/null
    @@ -1,304 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_13.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% expectation:
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 48    17 -> 38 43 48    22 -> 43 48 28
    -%	    29 34 49  	      39 44 49	        44 49 29
    -%
    -%      6 -> 32 37 52    21 -> 42 47 52    26 -> 47 52 32
    -%           28 33 48          38 43 48          43 48 28
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 1 0 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [1 32 1 1 0.25 -0.25]
    - [1 46 1 1 -0.25 0]
    - [1 47 1 1 -0.25 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 33 1 1 0.25 -0.25]
    - [2 47 1 1 -0.25 0]
    - [2 48 1 1 -0.25 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 34 1 1 0.25 -0.25]
    - [3 48 1 1 -0.25 0]
    - [3 49 1 1 -0.25 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 35 1 1 0.25 -0.25]
    - [4 49 1 1 -0.25 0]
    - [4 50 1 1 -0.25 -0.25]
    - [5 26 1 1 0 -0.25]
    - [5 30 1 1 0 0]
    - [5 31 1 1 0.25 -0.25]
    - [5 35 1 1 0.25 0]
    - [5 46 1 1 -0.25 -0.25]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [6 37 1 1 0.25 -0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [7 38 1 1 0.25 -0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [8 39 1 1 0.25 -0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [9 40 1 1 0.25 -0.25]
    - [10 26 1 1 -0.25 -0.25]
    - [10 30 1 1 -0.25 0]
    - [10 31 1 1 0 -0.25]
    - [10 35 1 1 0 0]
    - [10 36 1 1 0.25 -0.25]
    - [10 40 1 1 0.25 0]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [11 42 1 1 0.25 -0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [12 43 1 1 0.25 -0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [13 44 1 1 0.25 -0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [14 45 1 1 0.25 -0.25]
    - [15 31 1 1 -0.25 -0.25]
    - [15 35 1 1 -0.25 0]
    - [15 36 1 1 0 -0.25]
    - [15 40 1 1 0 0]
    - [15 41 1 1 0.25 -0.25]
    - [15 45 1 1 0.25 0]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [16 47 1 1 0.25 -0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [17 48 1 1 0.25 -0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [18 49 1 1 0.25 -0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [19 50 1 1 0.25 -0.25]
    - [20 36 1 1 -0.25 -0.25]
    - [20 40 1 1 -0.25 0]
    - [20 41 1 1 0 -0.25]
    - [20 45 1 1 0 0]
    - [20 46 1 1 0.25 -0.25]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 27 1 1 0.25 -0.25]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 27 1 1 0.25 0]
    - [22 28 1 1 0.25 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 28 1 1 0.25 0]
    - [23 29 1 1 0.25 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 29 1 1 0.25 0]
    - [24 30 1 1 0.25 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 26 1 1 0.25 -0.25]
    - [25 30 1 1 0.25 0]
    - [25 41 1 1 -0.25 -0.25]
    - [25 45 1 1 -0.25 0]
    - [25 46 1 1 0 -0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_grid_anchor_15.sli b/testsuite/unittests/test_reg_mask_grid_anchor_15.sli
    deleted file mode 100644
    index 8a2c5523a3..0000000000
    --- a/testsuite/unittests/test_reg_mask_grid_anchor_15.sli
    +++ /dev/null
    @@ -1,319 +0,0 @@
    -/*
    - *  test_reg_mask_grid_anchor_15.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% to be run by run_test.sli
    -
    -% expectation:
    -%   /anchor [ 5 5 ]
    -%   The fictional point (5,5) measured from the top-left corner of the mask towards
    -%   the bottom right is aligned with each source, i.e., the top left corner of the mask
    -%   displaced by (-5,-5) relative to the source node, measured in grid coordinates.
    -%   With a grid origin at (0,0), the "last" node in the 5x5 grid is at (4,4). For
    -%   connections from this node, the box upper left corner of the 2x3 mask is placed
    -%   at (-1,-1) and spans to (0,1). The coordinates are then wrapped.
    -%
    -%   What for the source node at (0,0)? The box refererence point is mapped to (-5,-5),
    -%   which is identical to (0,0) in a 5x5 periodic system. Thus, we get the same
    -%   connectivity pattern as for anchor (0,0). Note: the order of connection creation
    -%   can differ, so cnn-files need to be sorted before comaprison with reg_mask_grid_anchor_15.
    -%
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections:
    -%
    -%       2 -> 28 33 38
    -%            29 34 39
    -%
    -%      26 -> 52 32 37
    -%	     48 28 33
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /grid << /shape [ 3 2 ] >> /anchor [ 5 5 ] >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 31 1 1 0.25 0]
    - [1 32 1 1 0.25 -0.25]
    - [1 36 1 1 0.5 0]
    - [1 37 1 1 0.5 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 32 1 1 0.25 0]
    - [2 33 1 1 0.25 -0.25]
    - [2 37 1 1 0.5 0]
    - [2 38 1 1 0.5 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 33 1 1 0.25 0]
    - [3 34 1 1 0.25 -0.25]
    - [3 38 1 1 0.5 0]
    - [3 39 1 1 0.5 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 34 1 1 0.25 0]
    - [4 35 1 1 0.25 -0.25]
    - [4 39 1 1 0.5 0]
    - [4 40 1 1 0.5 -0.25]
    - [5 26 1 1 0 -0.25]
    - [5 30 1 1 0 0]
    - [5 31 1 1 0.25 -0.25]
    - [5 35 1 1 0.25 0]
    - [5 36 1 1 0.5 -0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 36 1 1 0.25 0]
    - [6 37 1 1 0.25 -0.25]
    - [6 41 1 1 0.5 0]
    - [6 42 1 1 0.5 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 37 1 1 0.25 0]
    - [7 38 1 1 0.25 -0.25]
    - [7 42 1 1 0.5 0]
    - [7 43 1 1 0.5 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 38 1 1 0.25 0]
    - [8 39 1 1 0.25 -0.25]
    - [8 43 1 1 0.5 0]
    - [8 44 1 1 0.5 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 39 1 1 0.25 0]
    - [9 40 1 1 0.25 -0.25]
    - [9 44 1 1 0.5 0]
    - [9 45 1 1 0.5 -0.25]
    - [10 31 1 1 0 -0.25]
    - [10 35 1 1 0 0]
    - [10 36 1 1 0.25 -0.25]
    - [10 40 1 1 0.25 0]
    - [10 41 1 1 0.5 -0.25]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [11 41 1 1 0.25 0]
    - [11 42 1 1 0.25 -0.25]
    - [11 46 1 1 0.5 0]
    - [11 47 1 1 0.5 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [12 42 1 1 0.25 0]
    - [12 43 1 1 0.25 -0.25]
    - [12 47 1 1 0.5 0]
    - [12 48 1 1 0.5 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [13 43 1 1 0.25 0]
    - [13 44 1 1 0.25 -0.25]
    - [13 48 1 1 0.5 0]
    - [13 49 1 1 0.5 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [14 44 1 1 0.25 0]
    - [14 45 1 1 0.25 -0.25]
    - [14 49 1 1 0.5 0]
    - [14 50 1 1 0.5 -0.25]
    - [15 36 1 1 0 -0.25]
    - [15 40 1 1 0 0]
    - [15 41 1 1 0.25 -0.25]
    - [15 45 1 1 0.25 0]
    - [15 46 1 1 0.5 -0.25]
    - [15 50 1 1 0.5 0]
    - [16 26 1 1 0.5 0]
    - [16 27 1 1 0.5 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [16 46 1 1 0.25 0]
    - [16 47 1 1 0.25 -0.25]
    - [17 27 1 1 0.5 0]
    - [17 28 1 1 0.5 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [17 47 1 1 0.25 0]
    - [17 48 1 1 0.25 -0.25]
    - [18 28 1 1 0.5 0]
    - [18 29 1 1 0.5 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [18 48 1 1 0.25 0]
    - [18 49 1 1 0.25 -0.25]
    - [19 29 1 1 0.5 0]
    - [19 30 1 1 0.5 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [19 49 1 1 0.25 0]
    - [19 50 1 1 0.25 -0.25]
    - [20 26 1 1 0.5 -0.25]
    - [20 30 1 1 0.5 0]
    - [20 41 1 1 0 -0.25]
    - [20 45 1 1 0 0]
    - [20 46 1 1 0.25 -0.25]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 27 1 1 0.25 -0.25]
    - [21 31 1 1 0.5 0]
    - [21 32 1 1 0.5 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 27 1 1 0.25 0]
    - [22 28 1 1 0.25 -0.25]
    - [22 32 1 1 0.5 0]
    - [22 33 1 1 0.5 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 28 1 1 0.25 0]
    - [23 29 1 1 0.25 -0.25]
    - [23 33 1 1 0.5 0]
    - [23 34 1 1 0.5 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 29 1 1 0.25 0]
    - [24 30 1 1 0.25 -0.25]
    - [24 34 1 1 0.5 0]
    - [24 35 1 1 0.5 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 26 1 1 0.25 -0.25]
    - [25 30 1 1 0.25 0]
    - [25 31 1 1 0.5 -0.25]
    - [25 35 1 1 0.5 0]
    - [25 46 1 1 0 -0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_rect_00.sli b/testsuite/unittests/test_reg_mask_rect_00.sli
    deleted file mode 100644
    index a6f4fbbab7..0000000000
    --- a/testsuite/unittests/test_reg_mask_rect_00.sli
    +++ /dev/null
    @@ -1,271 +0,0 @@
    -/*
    - *  test_reg_mask_rect_00.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.25x1.25 -> -0.5, -0.25, 0, 0.25, 0.5
    -%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
    -%  - anchor [0,0]
    -%
    -%   nodes in the bottom row connect only to nodes on the corresponding row
    -%   nodes at the right edge have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 38    17 -> 43 48    22 -> 48
    -%
    -%      3 -> 28 33 38    18 -> 43 48    23 -> 48
    -%	    29 34 39	      44 49	     49
    -%
    -%      6 -> 31 36 41    21 -> 46 51    26 -> 51
    -%           32 37 42          47 52          52
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [0.0 0.0] /upper_right [0.6 0.3] >>
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 31 1 1 0.25 0]
    - [1 36 1 1 0.5 0]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 31 1 1 0.25 0.25]
    - [2 32 1 1 0.25 0]
    - [2 36 1 1 0.5 0.25]
    - [2 37 1 1 0.5 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 32 1 1 0.25 0.25]
    - [3 33 1 1 0.25 0]
    - [3 37 1 1 0.5 0.25]
    - [3 38 1 1 0.5 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 33 1 1 0.25 0.25]
    - [4 34 1 1 0.25 0]
    - [4 38 1 1 0.5 0.25]
    - [4 39 1 1 0.5 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 34 1 1 0.25 0.25]
    - [5 35 1 1 0.25 0]
    - [5 39 1 1 0.5 0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 36 1 1 0.25 0]
    - [6 41 1 1 0.5 0]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 36 1 1 0.25 0.25]
    - [7 37 1 1 0.25 0]
    - [7 41 1 1 0.5 0.25]
    - [7 42 1 1 0.5 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 37 1 1 0.25 0.25]
    - [8 38 1 1 0.25 0]
    - [8 42 1 1 0.5 0.25]
    - [8 43 1 1 0.5 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 38 1 1 0.25 0.25]
    - [9 39 1 1 0.25 0]
    - [9 43 1 1 0.5 0.25]
    - [9 44 1 1 0.5 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 39 1 1 0.25 0.25]
    - [10 40 1 1 0.25 0]
    - [10 44 1 1 0.5 0.25]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 41 1 1 0.25 0]
    - [11 46 1 1 0.5 0]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 41 1 1 0.25 0.25]
    - [12 42 1 1 0.25 0]
    - [12 46 1 1 0.5 0.25]
    - [12 47 1 1 0.5 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 42 1 1 0.25 0.25]
    - [13 43 1 1 0.25 0]
    - [13 47 1 1 0.5 0.25]
    - [13 48 1 1 0.5 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 43 1 1 0.25 0.25]
    - [14 44 1 1 0.25 0]
    - [14 48 1 1 0.5 0.25]
    - [14 49 1 1 0.5 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 44 1 1 0.25 0.25]
    - [15 45 1 1 0.25 0]
    - [15 49 1 1 0.5 0.25]
    - [15 50 1 1 0.5 0]
    - [16 41 1 1 0 0]
    - [16 46 1 1 0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 46 1 1 0.25 0.25]
    - [17 47 1 1 0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 47 1 1 0.25 0.25]
    - [18 48 1 1 0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 48 1 1 0.25 0.25]
    - [19 49 1 1 0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 49 1 1 0.25 0.25]
    - [20 50 1 1 0.25 0]
    - [21 46 1 1 0 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_rect_01.sli b/testsuite/unittests/test_reg_mask_rect_01.sli
    deleted file mode 100644
    index 300bf6cc45..0000000000
    --- a/testsuite/unittests/test_reg_mask_rect_01.sli
    +++ /dev/null
    @@ -1,274 +0,0 @@
    -/*
    - *  test_reg_mask_rect_01.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.25x1.25 -> -0.5, -0.25, 0, 0.25, 0.5
    -%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
    -%  - anchor [-0.5, -0.25]
    -%
    -%  Expectation:
    -%  - anchor moves rectangle to lower left of source
    -%  - for source 14 [0.0,0.0] box-ll at [-0.5,-0.25], ie 5, ie T:31
    -%  - for source 14, box-ur at [0.1, 0.05], ie top-right of 14, ie T:40
    -%
    -%   nodes in the bottom row connect only to nodes on the corresponding row
    -%   nodes at the right edge have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 29       17 -> 33 38 43   22 -> 38 43 48
    -%			      34 39 44	       39 44 49
    -%
    -%      6 -> 32          21 -> 37 42 47   26 -> 42 47 52
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [0.0 0.0] /upper_right [0.6 0.3] >>
    -                   /anchor      [ -0.5 -0.25 ]
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [5 30 1 1 0 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [10 30 1 1 -0.25 0]
    - [10 35 1 1 0 0]
    - [11 26 1 1 -0.5 0]
    - [11 27 1 1 -0.5 -0.25]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [12 27 1 1 -0.5 0]
    - [12 28 1 1 -0.5 -0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [13 28 1 1 -0.5 0]
    - [13 29 1 1 -0.5 -0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [14 29 1 1 -0.5 0]
    - [14 30 1 1 -0.5 -0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [15 30 1 1 -0.5 0]
    - [15 35 1 1 -0.25 0]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 32 1 1 -0.5 -0.25]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [17 32 1 1 -0.5 0]
    - [17 33 1 1 -0.5 -0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [18 33 1 1 -0.5 0]
    - [18 34 1 1 -0.5 -0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [19 34 1 1 -0.5 0]
    - [19 35 1 1 -0.5 -0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [20 35 1 1 -0.5 0]
    - [20 40 1 1 -0.25 0]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 37 1 1 -0.5 -0.25]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 37 1 1 -0.5 0]
    - [22 38 1 1 -0.5 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 38 1 1 -0.5 0]
    - [23 39 1 1 -0.5 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 39 1 1 -0.5 0]
    - [24 40 1 1 -0.5 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 40 1 1 -0.5 0]
    - [25 45 1 1 -0.25 0]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_rect_02.sli b/testsuite/unittests/test_reg_mask_rect_02.sli
    deleted file mode 100644
    index 49a17d0fb4..0000000000
    --- a/testsuite/unittests/test_reg_mask_rect_02.sli
    +++ /dev/null
    @@ -1,269 +0,0 @@
    -/*
    - *  test_reg_mask_rect_02.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.25x1.25 -> -0.5, -0.25, 0, 0.25, 0.5
    -%  - rectangular mask ll: [0.,0.] ur: [0.5,0.25]
    -%
    -%  - Demonstrates that both edges are included.
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 38    17 -> 43 48    22 -> 48
    -%
    -%      3 -> 28 33 38    18 -> 43 48    23 -> 48
    -%	    29 34 39	      44 49	     49
    -%
    -%      6 -> 31 36 41    21 -> 46 51    26 -> 51
    -%           32 37 42          47 52          52
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap false
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [0.0 0.0] /upper_right [0.5 0.25] >>
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 31 1 1 0.25 0]
    - [1 36 1 1 0.5 0]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 31 1 1 0.25 0.25]
    - [2 32 1 1 0.25 0]
    - [2 36 1 1 0.5 0.25]
    - [2 37 1 1 0.5 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 32 1 1 0.25 0.25]
    - [3 33 1 1 0.25 0]
    - [3 37 1 1 0.5 0.25]
    - [3 38 1 1 0.5 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 33 1 1 0.25 0.25]
    - [4 34 1 1 0.25 0]
    - [4 38 1 1 0.5 0.25]
    - [4 39 1 1 0.5 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 34 1 1 0.25 0.25]
    - [5 35 1 1 0.25 0]
    - [5 39 1 1 0.5 0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 36 1 1 0.25 0]
    - [6 41 1 1 0.5 0]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 36 1 1 0.25 0.25]
    - [7 37 1 1 0.25 0]
    - [7 41 1 1 0.5 0.25]
    - [7 42 1 1 0.5 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 37 1 1 0.25 0.25]
    - [8 38 1 1 0.25 0]
    - [8 42 1 1 0.5 0.25]
    - [8 43 1 1 0.5 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 38 1 1 0.25 0.25]
    - [9 39 1 1 0.25 0]
    - [9 43 1 1 0.5 0.25]
    - [9 44 1 1 0.5 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 39 1 1 0.25 0.25]
    - [10 40 1 1 0.25 0]
    - [10 44 1 1 0.5 0.25]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 41 1 1 0.25 0]
    - [11 46 1 1 0.5 0]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 41 1 1 0.25 0.25]
    - [12 42 1 1 0.25 0]
    - [12 46 1 1 0.5 0.25]
    - [12 47 1 1 0.5 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 42 1 1 0.25 0.25]
    - [13 43 1 1 0.25 0]
    - [13 47 1 1 0.5 0.25]
    - [13 48 1 1 0.5 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 43 1 1 0.25 0.25]
    - [14 44 1 1 0.25 0]
    - [14 48 1 1 0.5 0.25]
    - [14 49 1 1 0.5 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 44 1 1 0.25 0.25]
    - [15 45 1 1 0.25 0]
    - [15 49 1 1 0.5 0.25]
    - [15 50 1 1 0.5 0]
    - [16 41 1 1 0 0]
    - [16 46 1 1 0.25 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 46 1 1 0.25 0.25]
    - [17 47 1 1 0.25 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 47 1 1 0.25 0.25]
    - [18 48 1 1 0.25 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 48 1 1 0.25 0.25]
    - [19 49 1 1 0.25 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 49 1 1 0.25 0.25]
    - [20 50 1 1 0.25 0]
    - [21 46 1 1 0 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_rect_10.sli b/testsuite/unittests/test_reg_mask_rect_10.sli
    deleted file mode 100644
    index 7de706717e..0000000000
    --- a/testsuite/unittests/test_reg_mask_rect_10.sli
    +++ /dev/null
    @@ -1,313 +0,0 @@
    -/*
    - *  test_reg_mask_rect_10.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.25x1.25 -> -0.5, -0.25, 0, 0.25, 0.5
    -%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
    -%  - anchor [0,0]
    -%  - periodic bc
    -%
    -%   nodes in the bottom row connect only to nodes on the corresponding row
    -%   nodes at the right edge have no connections beyond the edge
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 33 38    17 -> 43 48 28    22 -> 48 28 33
    -%           32 37 42          47 52 32          49 29 34
    -%
    -%      6 -> 31 36 41    21 -> 46 51 31    26 -> 51 31 36
    -%           32 37 42          47 52 32          52 32 37
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [-0.001 -0.001] /upper_right [0.6 0.3] >>
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 30 1 1 0 0.25]
    - [1 31 1 1 0.25 0]
    - [1 35 1 1 0.25 0.25]
    - [1 36 1 1 0.5 0]
    - [1 40 1 1 0.5 0.25]
    - [2 26 1 1 0 0.25]
    - [2 27 1 1 0 0]
    - [2 31 1 1 0.25 0.25]
    - [2 32 1 1 0.25 0]
    - [2 36 1 1 0.5 0.25]
    - [2 37 1 1 0.5 0]
    - [3 27 1 1 0 0.25]
    - [3 28 1 1 0 0]
    - [3 32 1 1 0.25 0.25]
    - [3 33 1 1 0.25 0]
    - [3 37 1 1 0.5 0.25]
    - [3 38 1 1 0.5 0]
    - [4 28 1 1 0 0.25]
    - [4 29 1 1 0 0]
    - [4 33 1 1 0.25 0.25]
    - [4 34 1 1 0.25 0]
    - [4 38 1 1 0.5 0.25]
    - [4 39 1 1 0.5 0]
    - [5 29 1 1 0 0.25]
    - [5 30 1 1 0 0]
    - [5 34 1 1 0.25 0.25]
    - [5 35 1 1 0.25 0]
    - [5 39 1 1 0.5 0.25]
    - [5 40 1 1 0.5 0]
    - [6 31 1 1 0 0]
    - [6 35 1 1 0 0.25]
    - [6 36 1 1 0.25 0]
    - [6 40 1 1 0.25 0.25]
    - [6 41 1 1 0.5 0]
    - [6 45 1 1 0.5 0.25]
    - [7 31 1 1 0 0.25]
    - [7 32 1 1 0 0]
    - [7 36 1 1 0.25 0.25]
    - [7 37 1 1 0.25 0]
    - [7 41 1 1 0.5 0.25]
    - [7 42 1 1 0.5 0]
    - [8 32 1 1 0 0.25]
    - [8 33 1 1 0 0]
    - [8 37 1 1 0.25 0.25]
    - [8 38 1 1 0.25 0]
    - [8 42 1 1 0.5 0.25]
    - [8 43 1 1 0.5 0]
    - [9 33 1 1 0 0.25]
    - [9 34 1 1 0 0]
    - [9 38 1 1 0.25 0.25]
    - [9 39 1 1 0.25 0]
    - [9 43 1 1 0.5 0.25]
    - [9 44 1 1 0.5 0]
    - [10 34 1 1 0 0.25]
    - [10 35 1 1 0 0]
    - [10 39 1 1 0.25 0.25]
    - [10 40 1 1 0.25 0]
    - [10 44 1 1 0.5 0.25]
    - [10 45 1 1 0.5 0]
    - [11 36 1 1 0 0]
    - [11 40 1 1 0 0.25]
    - [11 41 1 1 0.25 0]
    - [11 45 1 1 0.25 0.25]
    - [11 46 1 1 0.5 0]
    - [11 50 1 1 0.5 0.25]
    - [12 36 1 1 0 0.25]
    - [12 37 1 1 0 0]
    - [12 41 1 1 0.25 0.25]
    - [12 42 1 1 0.25 0]
    - [12 46 1 1 0.5 0.25]
    - [12 47 1 1 0.5 0]
    - [13 37 1 1 0 0.25]
    - [13 38 1 1 0 0]
    - [13 42 1 1 0.25 0.25]
    - [13 43 1 1 0.25 0]
    - [13 47 1 1 0.5 0.25]
    - [13 48 1 1 0.5 0]
    - [14 38 1 1 0 0.25]
    - [14 39 1 1 0 0]
    - [14 43 1 1 0.25 0.25]
    - [14 44 1 1 0.25 0]
    - [14 48 1 1 0.5 0.25]
    - [14 49 1 1 0.5 0]
    - [15 39 1 1 0 0.25]
    - [15 40 1 1 0 0]
    - [15 44 1 1 0.25 0.25]
    - [15 45 1 1 0.25 0]
    - [15 49 1 1 0.5 0.25]
    - [15 50 1 1 0.5 0]
    - [16 26 1 1 0.5 0]
    - [16 30 1 1 0.5 0.25]
    - [16 41 1 1 0 0]
    - [16 45 1 1 0 0.25]
    - [16 46 1 1 0.25 0]
    - [16 50 1 1 0.25 0.25]
    - [17 26 1 1 0.5 0.25]
    - [17 27 1 1 0.5 0]
    - [17 41 1 1 0 0.25]
    - [17 42 1 1 0 0]
    - [17 46 1 1 0.25 0.25]
    - [17 47 1 1 0.25 0]
    - [18 27 1 1 0.5 0.25]
    - [18 28 1 1 0.5 0]
    - [18 42 1 1 0 0.25]
    - [18 43 1 1 0 0]
    - [18 47 1 1 0.25 0.25]
    - [18 48 1 1 0.25 0]
    - [19 28 1 1 0.5 0.25]
    - [19 29 1 1 0.5 0]
    - [19 43 1 1 0 0.25]
    - [19 44 1 1 0 0]
    - [19 48 1 1 0.25 0.25]
    - [19 49 1 1 0.25 0]
    - [20 29 1 1 0.5 0.25]
    - [20 30 1 1 0.5 0]
    - [20 44 1 1 0 0.25]
    - [20 45 1 1 0 0]
    - [20 49 1 1 0.25 0.25]
    - [20 50 1 1 0.25 0]
    - [21 26 1 1 0.25 0]
    - [21 30 1 1 0.25 0.25]
    - [21 31 1 1 0.5 0]
    - [21 35 1 1 0.5 0.25]
    - [21 46 1 1 0 0]
    - [21 50 1 1 0 0.25]
    - [22 26 1 1 0.25 0.25]
    - [22 27 1 1 0.25 0]
    - [22 31 1 1 0.5 0.25]
    - [22 32 1 1 0.5 0]
    - [22 46 1 1 0 0.25]
    - [22 47 1 1 0 0]
    - [23 27 1 1 0.25 0.25]
    - [23 28 1 1 0.25 0]
    - [23 32 1 1 0.5 0.25]
    - [23 33 1 1 0.5 0]
    - [23 47 1 1 0 0.25]
    - [23 48 1 1 0 0]
    - [24 28 1 1 0.25 0.25]
    - [24 29 1 1 0.25 0]
    - [24 33 1 1 0.5 0.25]
    - [24 34 1 1 0.5 0]
    - [24 48 1 1 0 0.25]
    - [24 49 1 1 0 0]
    - [25 29 1 1 0.25 0.25]
    - [25 30 1 1 0.25 0]
    - [25 34 1 1 0.5 0.25]
    - [25 35 1 1 0.5 0]
    - [25 49 1 1 0 0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_reg_mask_rect_11.sli b/testsuite/unittests/test_reg_mask_rect_11.sli
    deleted file mode 100644
    index 0a561f57e6..0000000000
    --- a/testsuite/unittests/test_reg_mask_rect_11.sli
    +++ /dev/null
    @@ -1,315 +0,0 @@
    -/*
    - *  test_reg_mask_rect_11.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -%  Setup:
    -%  - 5x5 -> 5x5, extent 1.25x1.25 -> -0.5, -0.25, 0, 0.25, 0.5
    -%  - rectangular mask ll: [0.,0.] ur: [0.6,0.3]
    -%  - anchor [-0.5, -0.25]
    -%  - periodic bc
    -%
    -%  Expectation:
    -%  - anchor moves rectangle to lower left of source
    -%  - for source 14 [0.0,0.0] box-ll at [-0.5,-0.25], ie 5, ie T:31
    -%  - for source 14, box-ur at [0.1, 0.05], ie top-right of 14, ie T:40
    -%
    -%    Sources                      Targets
    -%     2  7 12 17 22    	          28 33 38 43 48
    -%     3  8 13 18 23		  29 34	39 44 49
    -%     4	 9 14 19 24		  30 35	40 45 50
    -%     5	10 15 20 25		  31 36	41 46 51
    -%     6	11 16 21 26		  32 37	42 47 52
    -%
    -%    Exemplary connections
    -%      2 -> 28 43 48       17 -> 33 38 43   22 -> 38 43 48
    -%	    29 44 49		 34 39 44	  39 44 49
    -%
    -%      6 -> 32 47 52       21 -> 37 42 47   26 -> 42 47 52
    -%           28 43 48             33 38 43         38 43 48
    -
    -/layer << /shape [ 5 5 ]
    -          /extent [1.25 1.25]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask << /rectangular << /lower_left [0.0 0.0] /upper_right [0.6 0.3] >>
    -                   /anchor      [ -0.5 -0.25 ]
    -                >>
    -       >> def
    -
    -/source_layer_ref
    -[
    - [1 -0.5 0.5]
    - [2 -0.5 0.25]
    - [3 -0.5 0]
    - [4 -0.5 -0.25]
    - [5 -0.5 -0.5]
    - [6 -0.25 0.5]
    - [7 -0.25 0.25]
    - [8 -0.25 0]
    - [9 -0.25 -0.25]
    - [10 -0.25 -0.5]
    - [11 0 0.5]
    - [12 0 0.25]
    - [13 0 0]
    - [14 0 -0.25]
    - [15 0 -0.5]
    - [16 0.25 0.5]
    - [17 0.25 0.25]
    - [18 0.25 0]
    - [19 0.25 -0.25]
    - [20 0.25 -0.5]
    - [21 0.5 0.5]
    - [22 0.5 0.25]
    - [23 0.5 0]
    - [24 0.5 -0.25]
    - [25 0.5 -0.5]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [26 -0.5 0.5]
    - [27 -0.5 0.25]
    - [28 -0.5 0]
    - [29 -0.5 -0.25]
    - [30 -0.5 -0.5]
    - [31 -0.25 0.5]
    - [32 -0.25 0.25]
    - [33 -0.25 0]
    - [34 -0.25 -0.25]
    - [35 -0.25 -0.5]
    - [36 0 0.5]
    - [37 0 0.25]
    - [38 0 0]
    - [39 0 -0.25]
    - [40 0 -0.5]
    - [41 0.25 0.5]
    - [42 0.25 0.25]
    - [43 0.25 0]
    - [44 0.25 -0.25]
    - [45 0.25 -0.5]
    - [46 0.5 0.5]
    - [47 0.5 0.25]
    - [48 0.5 0]
    - [49 0.5 -0.25]
    - [50 0.5 -0.5]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 26 1 1 0 0]
    - [1 27 1 1 0 -0.25]
    - [1 41 1 1 -0.5 0]
    - [1 42 1 1 -0.5 -0.25]
    - [1 46 1 1 -0.25 0]
    - [1 47 1 1 -0.25 -0.25]
    - [2 27 1 1 0 0]
    - [2 28 1 1 0 -0.25]
    - [2 42 1 1 -0.5 0]
    - [2 43 1 1 -0.5 -0.25]
    - [2 47 1 1 -0.25 0]
    - [2 48 1 1 -0.25 -0.25]
    - [3 28 1 1 0 0]
    - [3 29 1 1 0 -0.25]
    - [3 43 1 1 -0.5 0]
    - [3 44 1 1 -0.5 -0.25]
    - [3 48 1 1 -0.25 0]
    - [3 49 1 1 -0.25 -0.25]
    - [4 29 1 1 0 0]
    - [4 30 1 1 0 -0.25]
    - [4 44 1 1 -0.5 0]
    - [4 45 1 1 -0.5 -0.25]
    - [4 49 1 1 -0.25 0]
    - [4 50 1 1 -0.25 -0.25]
    - [5 26 1 1 0 -0.25]
    - [5 30 1 1 0 0]
    - [5 41 1 1 -0.5 -0.25]
    - [5 45 1 1 -0.5 0]
    - [5 46 1 1 -0.25 -0.25]
    - [5 50 1 1 -0.25 0]
    - [6 26 1 1 -0.25 0]
    - [6 27 1 1 -0.25 -0.25]
    - [6 31 1 1 0 0]
    - [6 32 1 1 0 -0.25]
    - [6 46 1 1 -0.5 0]
    - [6 47 1 1 -0.5 -0.25]
    - [7 27 1 1 -0.25 0]
    - [7 28 1 1 -0.25 -0.25]
    - [7 32 1 1 0 0]
    - [7 33 1 1 0 -0.25]
    - [7 47 1 1 -0.5 0]
    - [7 48 1 1 -0.5 -0.25]
    - [8 28 1 1 -0.25 0]
    - [8 29 1 1 -0.25 -0.25]
    - [8 33 1 1 0 0]
    - [8 34 1 1 0 -0.25]
    - [8 48 1 1 -0.5 0]
    - [8 49 1 1 -0.5 -0.25]
    - [9 29 1 1 -0.25 0]
    - [9 30 1 1 -0.25 -0.25]
    - [9 34 1 1 0 0]
    - [9 35 1 1 0 -0.25]
    - [9 49 1 1 -0.5 0]
    - [9 50 1 1 -0.5 -0.25]
    - [10 26 1 1 -0.25 -0.25]
    - [10 30 1 1 -0.25 0]
    - [10 31 1 1 0 -0.25]
    - [10 35 1 1 0 0]
    - [10 46 1 1 -0.5 -0.25]
    - [10 50 1 1 -0.5 0]
    - [11 26 1 1 -0.5 0]
    - [11 27 1 1 -0.5 -0.25]
    - [11 31 1 1 -0.25 0]
    - [11 32 1 1 -0.25 -0.25]
    - [11 36 1 1 0 0]
    - [11 37 1 1 0 -0.25]
    - [12 27 1 1 -0.5 0]
    - [12 28 1 1 -0.5 -0.25]
    - [12 32 1 1 -0.25 0]
    - [12 33 1 1 -0.25 -0.25]
    - [12 37 1 1 0 0]
    - [12 38 1 1 0 -0.25]
    - [13 28 1 1 -0.5 0]
    - [13 29 1 1 -0.5 -0.25]
    - [13 33 1 1 -0.25 0]
    - [13 34 1 1 -0.25 -0.25]
    - [13 38 1 1 0 0]
    - [13 39 1 1 0 -0.25]
    - [14 29 1 1 -0.5 0]
    - [14 30 1 1 -0.5 -0.25]
    - [14 34 1 1 -0.25 0]
    - [14 35 1 1 -0.25 -0.25]
    - [14 39 1 1 0 0]
    - [14 40 1 1 0 -0.25]
    - [15 26 1 1 -0.5 -0.25]
    - [15 30 1 1 -0.5 0]
    - [15 31 1 1 -0.25 -0.25]
    - [15 35 1 1 -0.25 0]
    - [15 36 1 1 0 -0.25]
    - [15 40 1 1 0 0]
    - [16 31 1 1 -0.5 0]
    - [16 32 1 1 -0.5 -0.25]
    - [16 36 1 1 -0.25 0]
    - [16 37 1 1 -0.25 -0.25]
    - [16 41 1 1 0 0]
    - [16 42 1 1 0 -0.25]
    - [17 32 1 1 -0.5 0]
    - [17 33 1 1 -0.5 -0.25]
    - [17 37 1 1 -0.25 0]
    - [17 38 1 1 -0.25 -0.25]
    - [17 42 1 1 0 0]
    - [17 43 1 1 0 -0.25]
    - [18 33 1 1 -0.5 0]
    - [18 34 1 1 -0.5 -0.25]
    - [18 38 1 1 -0.25 0]
    - [18 39 1 1 -0.25 -0.25]
    - [18 43 1 1 0 0]
    - [18 44 1 1 0 -0.25]
    - [19 34 1 1 -0.5 0]
    - [19 35 1 1 -0.5 -0.25]
    - [19 39 1 1 -0.25 0]
    - [19 40 1 1 -0.25 -0.25]
    - [19 44 1 1 0 0]
    - [19 45 1 1 0 -0.25]
    - [20 31 1 1 -0.5 -0.25]
    - [20 35 1 1 -0.5 0]
    - [20 36 1 1 -0.25 -0.25]
    - [20 40 1 1 -0.25 0]
    - [20 41 1 1 0 -0.25]
    - [20 45 1 1 0 0]
    - [21 36 1 1 -0.5 0]
    - [21 37 1 1 -0.5 -0.25]
    - [21 41 1 1 -0.25 0]
    - [21 42 1 1 -0.25 -0.25]
    - [21 46 1 1 0 0]
    - [21 47 1 1 0 -0.25]
    - [22 37 1 1 -0.5 0]
    - [22 38 1 1 -0.5 -0.25]
    - [22 42 1 1 -0.25 0]
    - [22 43 1 1 -0.25 -0.25]
    - [22 47 1 1 0 0]
    - [22 48 1 1 0 -0.25]
    - [23 38 1 1 -0.5 0]
    - [23 39 1 1 -0.5 -0.25]
    - [23 43 1 1 -0.25 0]
    - [23 44 1 1 -0.25 -0.25]
    - [23 48 1 1 0 0]
    - [23 49 1 1 0 -0.25]
    - [24 39 1 1 -0.5 0]
    - [24 40 1 1 -0.5 -0.25]
    - [24 44 1 1 -0.25 0]
    - [24 45 1 1 -0.25 -0.25]
    - [24 49 1 1 0 0]
    - [24 50 1 1 0 -0.25]
    - [25 36 1 1 -0.5 -0.25]
    - [25 40 1 1 -0.5 0]
    - [25 41 1 1 -0.25 -0.25]
    - [25 45 1 1 -0.25 0]
    - [25 46 1 1 0 -0.25]
    - [25 50 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_round.sli b/testsuite/unittests/test_round.sli
    deleted file mode 100644
    index 1032031a8b..0000000000
    --- a/testsuite/unittests/test_round.sli
    +++ /dev/null
    @@ -1,43 +0,0 @@
    -/*
    - *  test_round.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_round - check if round function works
    -
    -Synopsis: (test_round) run ->
    -
    -Description:
    -
    -Tests basic properties of round.
    -Author:  130531, Diesmann; 161006, Plesser
    -SeeAlso: floor, cvi
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -{ 1.4 round 1.0 eq } assert_or_die
    -{ 1.5 round 2.0 eq } assert_or_die
    -{ 2      round 2.0 eq } assert_or_die
    diff --git a/testsuite/unittests/test_rows_cols_pos.sli b/testsuite/unittests/test_rows_cols_pos.sli
    deleted file mode 100644
    index b87a2926f0..0000000000
    --- a/testsuite/unittests/test_rows_cols_pos.sli
    +++ /dev/null
    @@ -1,53 +0,0 @@
    -/*
    - *  test_rows_cols_pos.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -% this test ensures that one can specify either shape or positions,
    -% but not both
    -
    -(unittest) run
    -/unittest using
    -
    -% correct, shape
    -{
    -  ResetKernel
    -  << /shape [ 1 1 ] /elements /iaf_psc_alpha >> CreateLayer
    -} pass_or_die
    -
    -% correct, positions
    -{
    -  ResetKernel
    -  << /positions [[0. 0.]] /extent [1.0 1.0] /elements /iaf_psc_alpha >> CreateLayer
    -} pass_or_die
    -
    -% incorrect, shape and positions
    -{
    -  ResetKernel
    -  << /shape [ 1 1 ] /positions [[0. 0.]] /elements /iaf_psc_alpha >> CreateLayer
    -} fail_or_die
    -
    -% incorrect, single element shape
    -{
    -  ResetKernel
    -  << /shape [ 1 ] /elements /iaf_psc_alpha >> CreateLayer
    -} fail_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_set_Vm.sli b/testsuite/unittests/test_set_Vm.sli
    deleted file mode 100644
    index fc249af41e..0000000000
    --- a/testsuite/unittests/test_set_Vm.sli
    +++ /dev/null
    @@ -1,102 +0,0 @@
    -/*
    - *  test_set_Vm.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_set_Vm - test if setting V_m work via SetModelStatus and SetStatus
    -
    -Synopsis: (test_set_Vm) run -> dies if assertion fails
    -
    -Description:
    -This test goes through all registered node models for which V_m can be
    -set, and attempts to set V_m via SetModelStatus and SetStatus. It then
    -compares results. If both ways of setting V_m give different results,
    -something is wtong with state initialization.
    -
    -Remarks:
    -The tests exploits that almost all neuron models have a state variable
    -V_m. It ignores all other models (the test returns true for them). The
    -new membrane potential that is set it the potential found in the
    -neuron +0.1mV. This should not conflict with any limitation requiring
    -the potential to be set to subthreshold values, but in pathological
    -cases it may lead to the exclusion of a model that should be tested.
    -
    -Author: Plesser
    -FirstVersion: July 2008
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -<< >> begin
    -
    -/clear_error_push_true 
    -{ 
    -	counttomark npop % pop all but mark
    -    errordict begin /newerror false def end /res true def 
    -} def
    -
    -{
    -  GetKernelStatus /node_models get
    -  {
    -    /model Set
    -    /res false def
    -    ResetKernel
    -    mark
    -    { 
    -      model GetDefaults /V_m get 0.1 add /newvm Set 
    -    } 
    -    stopped
    -    {
    -      clear_error_push_true % V_m unknown 
    -    } 
    -    {
    -      {
    -        % create neuron, set V_m on instance
    -  	    model Create dup /dirsetnrn Set
    -	    << /V_m newvm >> SetStatus
    -	
    -	    % set model status, then create instance
    -  	    model << /V_m newvm >> SetDefaults
    -	    model Create /modsetnrn Set
    -	  } stopped
    -  	  {
    -        clear_error_push_true % V_m cannot be set
    -  	  } 
    -      { 
    -        dirsetnrn [ /V_m ] get 
    -        modsetnrn [ /V_m ] get 
    -	    eq /res Set
    -	  }
    -	  ifelse
    -    }
    -    ifelse
    -
    -    counttomark 1 add npop  % pop mark
    -    res
    -  } Map
    -
    -  true exch { and } Fold
    -}
    -assert_or_die
    -
    -end
    diff --git a/testsuite/unittests/test_set_delay_extrema.sli b/testsuite/unittests/test_set_delay_extrema.sli
    deleted file mode 100644
    index 2ac5ad3375..0000000000
    --- a/testsuite/unittests/test_set_delay_extrema.sli
    +++ /dev/null
    @@ -1,72 +0,0 @@
    -/*
    - *  test_set_delay_extrema.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_set_delay_extrema - sli script to test if min_ and max_delay
    -   can be set by the user correctly
    -
    -   Synopsis: (test_set_delay_extrema) run -> compare output with comments in file
    -
    -   FirstVersion: July 2004
    -   Author: Diesmann
    -   SeeAlso: testsuite::test_iaf_1to2, testsuite::test_iaf_psp, testsuite::test_iaf_dc_aligned_delay
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/smalldelay 0.5 def    % small connection delay used in network
    -/largedelay 1.0 def    % large connection delay used in netwokr
    -/simtime    1.0 def    % simulation time
    -
    -
    -/AlignedImpact
    -{
    -  /h Set              % argument: computation step size in ms  
    -
    -  ResetKernel
    -
    -  <<
    -    /resolution h
    -                                 % settings not required but respected:
    -    /min_delay h                 % smallest delay expected by user 
    -    /max_delay largedelay 2 mul  % largest delay expected by user
    -  >> SetKernelStatus
    -
    -  /iaf_psc_alpha << /I_e 1450.0 >> Create /neuron1 Set
    -  /iaf_psc_alpha Create /neuron2 Set
    -
    -  neuron1 neuron2 100.0 smalldelay Connect
    -  neuron2 neuron1 100.0 largedelay Connect
    -
    -  simtime Simulate
    -
    -} def 
    -
    -0.1 AlignedImpact
    -
    -
    -{ GetKernelStatus [[/max_delay /min_delay]] get [largedelay 2 mul h] eq } assert_or_die
    -
    -
    diff --git a/testsuite/unittests/test_set_start_stop_origin.sli b/testsuite/unittests/test_set_start_stop_origin.sli
    deleted file mode 100644
    index 29a250e213..0000000000
    --- a/testsuite/unittests/test_set_start_stop_origin.sli
    +++ /dev/null
    @@ -1,174 +0,0 @@
    -/*
    - *  test_set_start_stop_origin.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_set_start_stop_origin - sli script to test if start, stop and origin are set properly
    -
    -   Synopsis: (test_set_start_stop_origin) run
    -
    -   Description:
    -   For all models having start, stop, and origin parameters, this test checks that
    -   - default values can be set successfully
    -   - nodes are created with correct default values
    -   - nodes can be created with correct default values from the command line
    -   - parameters can be set via SetStatus
    -
    -   FirstVersion: December 2011
    -   Author: Hans E Plesser
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -M_WARNING setverbosity
    -
    -/deviceparams [/start /stop /origin] def
    -/testvalue 1237. def   % unlikely value
    -
    -ResetKernel
    -
    -% build list of all models having at least one of deviceparams
    -/devmodels [] def
    -GetKernelStatus /node_models get {
    -  /mod Set
    -  mod GetDefaults /defs Set
    -  false deviceparams { defs exch known or } Fold 
    -  {
    -    /devmodels devmodels mod append def
    -  } if
    -} forall
    -
    -% First test: check that any model that has one deviceparam has all
    -{
    -  ResetKernel
    -  
    -  true devmodels
    -  {
    -    GetDefaults /defs Set
    -    true deviceparams { defs exch known and } Fold 
    -    and
    -  } Fold
    -} assert_or_die
    -
    -% Second test: ensure that no default value is equal to test value
    -{
    -  ResetKernel
    -  
    -  true devmodels
    -  {
    -    GetDefaults /defs Set
    -    true deviceparams { defs exch get /testvalue neq and } Fold 
    -    and
    -  } Fold
    -} assert_or_die
    -
    -% Third test: check that default values can be set
    -{
    -  ResetKernel
    -
    -  true
    -  devmodels
    -  {
    -    /model Set
    -    true    
    -    deviceparams 
    -    { 
    -      /p Set 
    -      model << p testvalue >> SetDefaults
    -      model GetDefaults p get
    -      testvalue eq 
    -      dup not { (Failed on: ) model cvs join == } if
    -      and
    -    } Fold
    -    and
    -  } Fold
    -} assert_or_die
    -
    -% Fourth test: check that default values are transferred to neurons
    -{
    -  ResetKernel
    -
    -  true
    -  devmodels
    -  {
    -    /model Set
    -    true    
    -    deviceparams 
    -    { 
    -      /p Set 
    -      model << p testvalue >> SetDefaults
    -      model Create p get      
    -      testvalue eq 
    -      dup not { (Failed on: ) model cvs join == } if
    -      and
    -    } Fold
    -    and
    -  } Fold
    -} assert_or_die
    -
    -% Fifth test: check that values can be set on construction
    -{
    -  ResetKernel
    -
    -  true
    -  devmodels
    -  {
    -    /model Set
    -    true    
    -    deviceparams 
    -    { 
    -      /p Set 
    -      model << p testvalue >> Create p get      
    -      testvalue eq 
    -      dup not { (Failed on: ) model cvs join == } if
    -      and
    -    } Fold
    -    and
    -  } Fold
    -} assert_or_die
    -
    -% Sixth test: check that values can be set on node
    -{
    -  ResetKernel
    -
    -  true
    -  devmodels
    -  {
    -    /model Set
    -    true    
    -    deviceparams 
    -    { 
    -      /p Set 
    -      model Create /n Set
    -      n p get testvalue neq
    -      n << p testvalue >> SetStatus
    -      n p get testvalue eq 
    -      and
    -      dup not { (Failed on: ) model cvs join == } if
    -      and
    -    } Fold
    -    and
    -  } Fold
    -} assert_or_die
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_set_tics.sli b/testsuite/unittests/test_set_tics.sli
    deleted file mode 100644
    index d67f9fe26a..0000000000
    --- a/testsuite/unittests/test_set_tics.sli
    +++ /dev/null
    @@ -1,77 +0,0 @@
    -/*
    - *  test_set_tics.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_set_tics - test whether tics can be configured at run time
    -
    -Synopsis: (test_set_tics) run -> comparison with reference data
    -
    -Description:
    -The base of the integer clock tics of NEST and the number of those tics 
    -per computation time step are specified at configuration time with
    -options like
    -   --with-tics-per-ms='std::ldexp(1.0,14)' --with-tics-per-step='1024' 
    -. However, these values can also be changed at run time. This is of advantage
    -if the correctness of a script or the validity of a result need to be checked 
    -by running the same simulation at different computation step sizes. While it
    -is more comfortable in demonstrations and for beginners to operate with tics 
    -to the base of 10, in production it is often better to use base 2 because of 
    -the increased density of data points and exact representation in the double
    -data type. Therefore, these parameters can also be specified at run time 
    -in the root object prior to the creation of any network element. Here, it is
    -often more convenient to specify the resolution (the computation time step) in
    -units of milliseconds instead of the number of tics per step.
    -
    -This script tests whether the NEST kernel accepts a modification of the 
    -parameters and whether the corresponding conversions are correct.
    -
    -
    -FirstVersion: January 2008
    -Author: Diesmann
    -SeeAlso: get, dexp 
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -<< /tics_per_ms 14 dexp /resolution -4 dexp  >> SetKernelStatus
    -% this is equivalent to:
    -%    << /tics_per_ms 16384. /resolution 0.625  >> SetKernelStatus
    -%
    -% with the conversion of units:
    -%  tics/ms * ms/step = tics/step
    -%   2^14   * 2^-4    = 2^10 = 1024 
    -
    -
    -{
    - GetKernelStatus /tics_per_ms get    14 dexp       eq
    - GetKernelStatus /resolution get    -4 dexp       eq and
    - GetKernelStatus /tics_per_step get    10 dexp cvi   eq and
    - GetKernelStatus /ms_per_tic get   -14 dexp       eq and
    -}
    -assert_or_die
    -
    -
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_setconnections_threads.sli b/testsuite/unittests/test_setconnections_threads.sli
    deleted file mode 100644
    index 49456397dd..0000000000
    --- a/testsuite/unittests/test_setconnections_threads.sli
    +++ /dev/null
    @@ -1,51 +0,0 @@
    -/*
    - *  test_setconnections_threads.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% test SetStatus for connections
    -%
    -% we interpret node ID as the node_id of the source (pre-synaptic) neuron
    -%
    -% 090406, Morrison Diesmann
    -
    -
    -(unittest) run
    -/unittest using
    -
    -/num_threads is_threaded { 2 } { 1 } ifelse def
    -
    -ResetKernel
    -
    -<< /local_num_threads num_threads >> SetKernelStatus
    -
    -/iaf_psc_alpha Create /source Set
    -/iaf_psc_alpha Create /target Set
    -
    -source target << >> /stdp_synapse Connect
    -
    -<< /source source /synapse_model /stdp_synapse >> GetConnections 0 get /conn Set
    -
    -{ conn /weight get 1.0 eq} assert_or_die
    -{ conn /synapse_model get /stdp_synapse eq} assert_or_die
    -conn << /weight 2.0 >> SetStatus
    -
    -{ conn /weight get 2.0 eq} assert_or_die
    diff --git a/testsuite/unittests/test_sinusoidal_gamma_generator.sli b/testsuite/unittests/test_sinusoidal_gamma_generator.sli
    deleted file mode 100644
    index 8df58fcd73..0000000000
    --- a/testsuite/unittests/test_sinusoidal_gamma_generator.sli
    +++ /dev/null
    @@ -1,334 +0,0 @@
    -/*
    - *  test_sinusoidal_gamma_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_gamma_generator - test basic properties of sinusoidal gamma generator
    -
    -Synopsis: (test_sinusoidal_gamma_generator) run -> dies if assertion fails
    -
    -Description:
    -This test asserts that
    - - that /individual_spike_trains is true by default
    - - the /individual_spike_trains property can be set on the model, but not on instances
    - - that instances inherit the correct /individual_spike_trains value
    - - that different targets (on same or different threads)
    -     * identical spike trains if /individual_spike_trains is false
    -     * different spike trains otherwise
    - - that a multimeter can be connected to record the rate
    -     * independent of /individual_spike_trains ..., only a single trace is returned
    - - the recorded rate profile is tested against expectation
    -
    -This test DOES NOT test the statistical properties of the spike trains generated.
    -
    -Author: Plesser
    -FirstVersion: May 2013
    -SeeAlso: testsuite::test_sinusoidal_gamma_generator_1, testsuite::test_sinusoidal_poisson_generator 
    -*/
    -
    -% return success if generator not known due to missing GSL
    -GetKernelStatus /node_models get /sinusoidal_gamma_generator MemberQ not
    -{
    -  (Skipping test: generator missing) ==
    -  quit  
    -} if
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity 
    -
    -% test 1: individual_spike_trains true by default
    -{
    -  ResetKernel
    -  /sinusoidal_gamma_generator Create
    -  /individual_spike_trains get
    -} assert_or_die
    -(passed 1) ==
    -
    -% test 2: individual_spike_trains can be set on model and is passed on
    -{
    -  ResetKernel
    -  /sinusoidal_gamma_generator << /individual_spike_trains false >> SetDefaults
    -  /sinusoidal_gamma_generator Create
    -  /individual_spike_trains get
    -  not
    -} assert_or_die
    -(passed 2) ==
    -
    -% test 2a: individual_spike_trains can be set on model and is passed on
    -{
    -  ResetKernel
    -  /sinusoidal_gamma_generator 
    -    /sspg << /individual_spike_trains false >> CopyModel
    -  /sspg Create
    -  /individual_spike_trains get
    -  not
    -} assert_or_die
    -(passed 2a) ==
    -
    -
    -% test 3: individual_spike_trains cannot be set on instances
    -{
    -  ResetKernel
    -  /spg /sinusoidal_gamma_generator Create def
    -
    -  mark
    -  {
    -    spg << /individual_spike_trains false >> SetStatus
    -  } stopped
    -  {
    -    /passed true def
    -
    -    % we got an exception, need to clean up
    -    errordict /message undef
    -    errordict /command undef
    -    errordict begin /newerror false def end
    -  }
    -  {
    -    /passed false def
    -  } ifelse
    -
    -  counttomark npop pop % clear stack, including mark
    -
    -  passed
    -} assert_or_die
    -  
    -(passed 3) ==
    -
    -% function building n neuron network with spike recorders
    -% num_nrns build_simple_net -> [ spike_recorders ]
    -/build_simple_net
    -{
    -  /n Set
    -  /parrots /parrot_neuron n Create def
    -  
    -  /srs /spike_recorder n Create def
    -
    -  /gen /sinusoidal_gamma_generator Create def
    -  
    -  gen parrots Connect
    -  parrots srs /one_to_one Connect
    -  srs
    -} def
    - 
    -% return true if all arrays inside an array are identical
    -% [l1 l2 ...] all_equal -> bool
    -/all_equal
    -{
    -  dup First /reference Set
    -  true exch { reference eq and } Fold
    -} def
    -
    -% return true if all arrays inside an array are different from each other
    -% [l1 l2 ...] all_different -> bool
    -/all_different
    -{
    -  empty
    -  {
    -    ; true 
    -  }
    -  {
    -    /items Set
    -    items [ 1 -2 ] Take  % all except last element
    -    { 1 add -1 2 arraystore items exch Take 
    -      exch /item Set 
    -      true exch { item neq and } Fold
    -    } MapIndexed 
    -    true exch { and } Fold
    -  } ifelse
    -
    -} def
    -
    -% Run test for given value for individual spike train and thread number
    -% individual(true/false) num_threads nrns_per_thread test4_function -> bool
    -/test4_function
    -{
    -  /nrns_per_thread Set
    -  /num_threads Set
    -  /individual Set
    -
    -  ResetKernel
    -  << /local_num_threads num_threads >> SetKernelStatus
    -
    -  /sinusoidal_gamma_generator 
    -  << 
    -     /rate  100.
    -     /amplitude   50.
    -     /frequency 10.
    -     /order 3.  
    -     /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /srs num_threads nrns_per_thread mul build_simple_net def
    -
    -  1000. Simulate
    -
    -  srs { [/events /times] get cva } Map
    -  individual
    -  {
    -    all_different 
    -  }
    -  {
    -    all_equal 
    -  }
    -  ifelse
    -} def
    -
    -% test 4a: single thread, one spike train for all targets
    -{
    -  false 1 4 test4_function
    -} assert_or_die
    -(passed 4a) ==
    -
    -% test 4b: single thread, different spike trains for all targets
    -{
    -  true 1 4 test4_function
    -} assert_or_die
    -(passed 4b) ==
    -
    -% test 4c: two threads, one spike train for all targets
    -{
    -  false 2 4 test4_function
    -} assert_or_die
    -(passed 4c) ==
    -
    -% test 4d: two threads, different spike trains for all targets
    -{
    -  true 2 4 test4_function
    -} assert_or_die
    -(passed 4d) ==
    -
    -
    -% now let's add multimeters
    -% function building n neuron network with multimeter
    -% num_nrns build_simple_net -> [ multimeter ]
    -/build_mm_net
    -{
    -  /n Set
    -  /parrots /parrot_neuron n Create def
    -  
    -  /gen /sinusoidal_gamma_generator Create def
    -  /mm /multimeter << /record_from [ /rate ] >> Create def
    -
    -  gen parrots Connect
    -  mm gen Connect  
    -
    -  mm
    -} def
    -
    -% Run test for given value for individual spike train and thread number
    -% individual(true/false) num_threads nrns_per_thread test4_function -> bool
    -/test5_function
    -{
    -  /nrns_per_thread Set
    -  /num_threads Set
    -  /individual Set
    -
    -  ResetKernel
    -  << /local_num_threads num_threads >> SetKernelStatus
    -
    -  /sinusoidal_gamma_generator 
    -  << 
    -     /rate  100.
    -     /amplitude   50.
    -     /frequency 10.
    -     /order 3.  
    -     /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /mm num_threads nrns_per_thread mul build_mm_net def
    -
    -  /tsim 100. def
    -  tsim Simulate
    -
    -  /ndata tsim cvi 1 sub def
    -
    -  % times and rates must be arrays of ndata points
    -    mm [/events /times] get pstack length ndata eq
    -    mm [/events /rate ] get length ndata eq
    -    and    
    -} def
    -
    -% test 5a: single thread, one spike train for all targets
    -{
    -  false 1 4 test5_function
    -} assert_or_die
    -(passed 5a) ==
    -
    -% test 5b: single thread, different spike trains for all targets
    -{
    -  true 1 4 test5_function
    -} assert_or_die
    -(passed 5b) ==
    -
    -% test 5c: two threads, one spike train for all targets
    -{
    -  false 2 4 test5_function
    -} assert_or_die
    -(passed 5c) ==
    -
    -% test 5d: two threads, different spike trains for all targets
    -{
    -  true 2 4 test5_function
    -} assert_or_die
    -(passed 5d) ==
    -
    -
    -%% finally, check multimeter whether rate is correct
    -{
    -  ResetKernel
    -
    -  /dc    1. def
    -  /ac    0.5 def
    -  /freq 10. def
    -  /phi   2. def  
    -  /order 3. def
    -
    -  /sinusoidal_gamma_generator 
    -  << 
    -     /rate   dc
    -     /amplitude   ac
    -     /frequency freq
    -     /phase  phi Pi div 180. mul
    -     /order order
    -  >> SetDefaults
    -
    -  /mm 1 build_mm_net def
    -  mm << /start 100. >> SetStatus  % leave time for equilibration
    -
    -  /tsim 200. def
    -  tsim Simulate
    -  
    -  /t mm [ /events /times ] get cva def
    -  /r mm [ /events /rate  ] get cva def
    -
    -  /r0 dc ac 2. Pi mul freq 1000. div mul t mul phi add { sin } Map mul add def
    -  true r r0 sub { abs 1e-14 lt and } Fold
    - 
    -} assert_or_die
    -(passed 6) ==
    -
    -
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_sinusoidal_poisson_generator.sli b/testsuite/unittests/test_sinusoidal_poisson_generator.sli
    deleted file mode 100644
    index 2708685308..0000000000
    --- a/testsuite/unittests/test_sinusoidal_poisson_generator.sli
    +++ /dev/null
    @@ -1,325 +0,0 @@
    -/*
    - *  test_sinusoidal_poisson_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_sinusoidal_poisson_generator - test basic properties of sinusoidal poisson generator
    -
    -Synopsis: (test_sinusoidal_poisson_generator) run -> dies if assertion fails
    -
    -Description:
    -This test asserts that
    - - that /individual_spike_trains is true by default
    - - the /individual_spike_trains property can be set on the model, but not on instances
    - - that instances inherit the correct /individual_spike_trains value
    - - that different targets (on same or different threads)
    -     * identical spike trains if /individual_spike_trains is false
    -     * different spike trains otherwise
    - - that a multimeter can be connected to record the rate
    -     * independent of /individual_spike_trains ..., only a single trace is returned
    - - the recorded rate profile is tested against expectation
    -
    -This test DOES NOT test the statistical properties of the spike trains generated.
    -
    -Author: Plesser
    -FirstVersion: May 2013
    -SeeAlso: testsuite::test_sinusoidal_poisson_generator_1, testsuite::test_sinusoidal_gamma_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity 
    -
    -% test 1: individual_spike_trains true by default
    -{
    -  ResetKernel
    -  /sinusoidal_poisson_generator Create
    -  /individual_spike_trains get
    -} assert_or_die
    -(passed 1) ==
    -
    -% test 2: individual_spike_trains can be set on model and is passed on
    -{
    -  ResetKernel
    -  /sinusoidal_poisson_generator << /individual_spike_trains false >> SetDefaults
    -  /sinusoidal_poisson_generator Create
    -  /individual_spike_trains get
    -  not
    -} assert_or_die
    -(passed 2) ==
    -
    -% test 2a: individual_spike_trains can be set on model and is passed on
    -{
    -  ResetKernel
    -  /sinusoidal_poisson_generator 
    -    /sspg << /individual_spike_trains false >> CopyModel
    -  /sspg Create
    -  /individual_spike_trains get
    -  not
    -} assert_or_die
    -(passed 2a) ==
    -
    -
    -% test 3: individual_spike_trains cannot be set on instances
    -{
    -  ResetKernel
    -  /spg /sinusoidal_poisson_generator Create def
    -
    -  mark
    -  {
    -    spg << /individual_spike_trains false >> SetStatus
    -  } stopped
    -  {
    -    /passed true def
    -
    -    % we got an exception, need to clean up
    -    errordict /message undef
    -    errordict /command undef
    -    errordict begin /newerror false def end
    -  }
    -  {
    -    /passed false def
    -  } ifelse
    -
    -  counttomark npop pop % clear stack, including mark
    -
    -  passed
    -} assert_or_die
    -  
    -(passed 3) ==
    -
    -% function building n neuron network with spike recorders
    -% num_nrns build_simple_net -> [ spike_recorders ]
    -/build_simple_net
    -{
    -  /n Set
    -  /parrots /parrot_neuron n Create def
    -
    -  /srs /spike_recorder n Create def
    -
    -  /gen /sinusoidal_poisson_generator Create def
    -
    -  gen parrots Connect
    -
    -  parrots srs /one_to_one Connect
    -
    -  srs
    -} def
    - 
    -% return true if all arrays inside an array are identical
    -% [l1 l2 ...] all_equal -> bool
    -/all_equal
    -{
    -  dup First /reference Set
    -  true exch { reference eq and } Fold
    -} def
    -
    -% return true if all arrays inside an array are different from each other
    -% [l1 l2 ...] all_different -> bool
    -/all_different
    -{
    -  empty
    -  {
    -    ; true 
    -  }
    -  {
    -    /items Set
    -    items [ 1 -2 ] Take  % all except last element
    -    { 1 add -1 2 arraystore items exch Take 
    -      exch /item Set 
    -      true exch { item neq and } Fold
    -    } MapIndexed 
    -    true exch { and } Fold
    -  } ifelse
    -
    -} def
    -
    -
    -% Run test for given value for individual spike train and thread number
    -% individual(true/false) num_threads nrns_per_thread test4_function -> bool
    -/test4_function
    -{
    -  /nrns_per_thread Set
    -  /num_threads Set
    -  /individual Set
    -
    -  ResetKernel
    -  << /local_num_threads num_threads >> SetKernelStatus
    -
    -  /sinusoidal_poisson_generator 
    -  << 
    -     /rate  100.
    -     /amplitude   50.
    -     /frequency 10.
    -     /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /srs num_threads nrns_per_thread mul build_simple_net def
    -
    -  1000. Simulate
    -
    -  srs { [/events /times] get cva } Map
    -  individual
    -  {
    -    all_different 
    -  }
    -  {
    -    all_equal 
    -  }
    -  ifelse
    -} def
    -
    -% test 4a: single thread, one spike train for all targets
    -{
    -  false 1 4 test4_function
    -} assert_or_die
    -(passed 4a) ==
    -
    -% test 4b: single thread, different spike trains for all targets
    -{
    -  true 1 4 test4_function
    -} assert_or_die
    -(passed 4b) ==
    -
    -% test 4c: two threads, one spike train for all targets
    -{
    -  false 2 4 test4_function
    -} assert_or_die
    -(passed 4c) ==
    -
    -% test 4d: two threads, different spike trains for all targets
    -{
    -  true 2 4 test4_function
    -} assert_or_die
    -(passed 4d) ==
    -
    -
    -% now let's add multimeters
    -% function building n neuron network with multimeter
    -% num_nrns build_simple_net -> [ multimeter ]
    -/build_mm_net
    -{
    -  /n Set
    -  /parrots /parrot_neuron n Create def
    -  
    -  /gen /sinusoidal_poisson_generator Create def
    -  /mm /multimeter << /record_from [ /rate ] >> Create def
    -
    -  gen parrots Connect
    -  mm gen Connect  
    -
    -  mm
    -} def
    -
    -% Run test for given value for individual spike train and thread number
    -% individual(true/false) num_threads nrns_per_thread test4_function -> bool
    -/test5_function
    -{
    -  /nrns_per_thread Set
    -  /num_threads Set
    -  /individual Set
    -
    -  ResetKernel
    -  << /local_num_threads num_threads >> SetKernelStatus
    -
    -  /sinusoidal_poisson_generator 
    -  << 
    -     /rate  100.
    -     /amplitude   50.
    -     /frequency 10.
    -     /individual_spike_trains individual
    -  >> SetDefaults
    -
    -  /mm num_threads nrns_per_thread mul build_mm_net def
    -
    -  /tsim 100. def
    -  tsim Simulate
    -
    -  /ndata tsim cvi 1 sub def
    -
    -  % times and rates must be arrays of ndata points    
    -    mm [/events /times] get length ndata eq
    -    mm [/events /rate ] get length ndata eq
    -    and    
    -} def
    -
    -% test 5a: single thread, one spike train for all targets
    -{
    -  false 1 4 test5_function
    -} assert_or_die
    -(passed 5a) ==
    -
    -% test 5b: single thread, different spike trains for all targets
    -{
    -  true 1 4 test5_function
    -} assert_or_die
    -(passed 5b) ==
    -
    -% test 5c: two threads, one spike train for all targets
    -{
    -  false 2 4 test5_function
    -} assert_or_die
    -(passed 5c) ==
    -
    -% test 5d: two threads, different spike trains for all targets
    -{
    -  true 2 4 test5_function
    -} assert_or_die
    -(passed 5d) ==
    -
    -
    -%% finally, check multimeter whether rate is correct
    -{
    -  ResetKernel
    -
    -  /dc    1. def
    -  /ac    0.5 def
    -  /freq 10. def
    -  /phi   2. def  
    -
    -  /sinusoidal_poisson_generator 
    -  << 
    -     /rate   dc
    -     /amplitude   ac
    -     /frequency freq
    -     /phase  phi Pi div 180. mul
    -  >> SetDefaults
    -
    -  /mm 1 build_mm_net def
    -
    -  /tsim 100. def
    -  tsim Simulate
    -  
    -  /t mm [ /events /times ] get cva def
    -  /r mm [ /events /rate  ] get cva def
    -
    -  /r0 dc ac 2. Pi mul freq 1000. div mul t mul phi add { sin } Map mul add def
    -  true r r0 sub { abs 1e-14 lt and } Fold
    - 
    -} assert_or_die
    -(passed 6) ==
    -
    -
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_sort.sli b/testsuite/unittests/test_sort.sli
    deleted file mode 100644
    index b23e9540b6..0000000000
    --- a/testsuite/unittests/test_sort.sli
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -/*
    - *  test_sort.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_sort - sli script to test if sorting works
    -
    -   Synopsis: (test_sort) run
    -
    -   Description:
    -   This test generates a list of descending doubles, sorts them and checks if
    -   it is equal to the ascending list.
    -
    -   FirstVersion: July 2007
    -   Author: Jochen Martin Eppler
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -{ [10.0 1.0 -1.0] Range Sort [1.0 10.0] Range eq } assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_spike_dilutor.sli b/testsuite/unittests/test_spike_dilutor.sli
    deleted file mode 100644
    index 3f7c9f71d2..0000000000
    --- a/testsuite/unittests/test_spike_dilutor.sli
    +++ /dev/null
    @@ -1,154 +0,0 @@
    -/*
    - *  test_spike_dilutor.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::test_spike_dilutor - test of spike_dilutor functionality
    -
    -Synopsis: (test_spike_dilutor) run -> count the average number of spikes repeated by the spike dilutor
    -
    -Description:
    -100 spikes are given to spike_dilutor and it has to repeat 20% of them (20 spikes) to 10 different spike recorders.
    -If the average number of spikes detected by spike recorders is within 5% relative to the expected value, the dilutor works fine.
    -
    -Note:
    -spike_dilutor is deprecated. Use bernoulli_synapse instead.
    -
    -Author: Hesam Setareh, April 2015
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -/t 5000.0 def
    -/p 0.2 def
    -/expected t p mul def
    -/eps 0.05 def
    -
    -[
    -1.0
    -{ dup
    - exch
    - 1.0 add
    - dup t eq {exit} if
    -}loop
    -]
    -
    -/sp_t Set
    -
    -%sp_t
    -%stack
    -%{=}forall
    -%exit
    -
    -
    -ResetKernel
    -/spike_generator Create /sg Set
    -  sg <<
    -        /spike_times sp_t   % in ms
    -  >> SetStatus
    -
    -/spike_dilutor Create /dilutor Set
    -dilutor << /p_copy 0.2 >> SetStatus
    -
    -/spike_recorder Create /sp_det0 Set
    -/spike_recorder Create /sp_det1 Set
    -/spike_recorder Create /sp_det2 Set
    -/spike_recorder Create /sp_det3 Set
    -/spike_recorder Create /sp_det4 Set
    -/spike_recorder Create /sp_det5 Set
    -/spike_recorder Create /sp_det6 Set
    -/spike_recorder Create /sp_det7 Set
    -/spike_recorder Create /sp_det8 Set
    -/spike_recorder Create /sp_det9 Set
    -
    -
    -sg dilutor Connect
    -dilutor sp_det0 Connect
    -dilutor sp_det1 Connect
    -dilutor sp_det2 Connect
    -dilutor sp_det3 Connect
    -dilutor sp_det4 Connect
    -dilutor sp_det5 Connect
    -dilutor sp_det6 Connect
    -dilutor sp_det7 Connect
    -dilutor sp_det8 Connect
    -dilutor sp_det9 Connect
    -
    -t 2 add Simulate
    -
    -sp_det0 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -
    -sp_det1 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -sp_det2 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -sp_det3 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -sp_det4 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -sp_det5 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -sp_det6 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -sp_det7 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -sp_det8 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -sp_det9 /events get /times get /spikes Set
    -spikes size
    -exch pop
    -add
    -
    -10.0
    -div
    -
    -dup expected sub abs expected div /relative_error Set
    -(relative error: ) relative_error cvs join =
    -relative_error eps lt
    -assert_or_die
    diff --git a/testsuite/unittests/test_spike_generator.sli b/testsuite/unittests/test_spike_generator.sli
    deleted file mode 100644
    index c25f4674af..0000000000
    --- a/testsuite/unittests/test_spike_generator.sli
    +++ /dev/null
    @@ -1,532 +0,0 @@
    -/*
    - *  test_spike_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_spike_generator - sli script to test spike_generator device
    -
    -   Synopsis: (test_spike_generator) run
    -
    -   Description:
    -   test_spike_generator checks the spike_generator device and its
    -   consistency with the nest simulation kernel.
    -
    -   /start specifies the earliest possible time stamp of a spike event to
    -   be emitted. /stop specifies the earliest time stamp of a potential
    -   spike event that is not emitted.
    - 
    -   spike_generator is a device emitting spike events restricted to the
    -   time grid spanned by the computation step size h. Nevertheless, the
    -   time stamps of the spike events to be emitted are specified by device
    -   property /spike_times as double floats in milliseconds (ms). The
    -   spike_generator automatically assigns the appropriate time stamps on
    -   the simulation grid. For an arbitrary spike time s this is t=i*h with
    -   s in the interval (t-h, t], the corresponding event with time stamp t
    -   is emitted in the simulation step t-h -> t. See test_iaf_i0_refractory
    -   for consistency with spike generation in integrate-and-fire type neuron
    -   models and test_iaf_dc_aligned_stop.sli for consistency with the
    -   generation of grid based dc currents.
    -
    -   A a consequence of the restriction of spike events to the simulation
    -   grid, multiple spike events with identical time stamps may be emitted.
    -
    -   The results at different computation step sizes (resolutions) require
    -   some further discussion. Let us assume that /start and /stop are at
    -   joined grid positions of all resolutions tested. If all spike events
    -   are specified on joined grid positions, the simulation results are
    -   inependent of the computation step size.  However, if spikes occur on
    -   non-joined grid positions, spike times are shifted to the appropriate
    -   position on the current grid and simulation results will differ. Also,
    -   the spike count cannot be preserved because spikes at the end of the
    -   interval may be shifted to grid position /stop which is not a valid
    -   time stamp of a spike event anymore.
    -
    -   Note that the number of emitted spike events can always be made 
    -   independent of the computation step size by setting /stop to an
    -   appropriately late joined grid position.
    -
    -   The usage of values for /start and /stop that are not simultaneous
    -   grid positions of the computation step sizes to be used should be
    -   avoided because the set of spike events delivered in the simulation
    -   will vary in complex ways.
    -
    -   The expected output is documented at the end of the script.
    -
    -   FirstVersion: July 2004
    -   Author: Diesmann
    -   SeeAlso: spike_generator, testsuite::test_iaf_i0_refractory, testsuite::test_iaf_dc_aligned_stop
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -
    -% check, if setting a spike time to 0 causes an exception
    -{
    -  ResetKernel
    -  /spike_generator Create /sg Set
    -  sg << /spike_times [0.0] >> SetStatus
    -}
    -fail_or_die
    -(----------------------- 1 ------------------------------) ==
    -
    -% check, if truncating spike times to grid causes an assertion
    -% if precise_times is set to false
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -  >> SetKernelStatus
    -      
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /precise_times false
    -        /spike_times [4.33]   % in ms
    -        /origin 0.0           % in ms
    -        /start 0.0            % in ms  
    -        /stop  6.0            % in ms, 
    -  >> SetStatus
    -  10.0 Simulate
    -}
    -fail_or_die
    -(----------------------- 2 ------------------------------) ==
    -
    -% check, if spike times are rounded up or down,
    -% if doube value is closer than tic/2 to next grid point
    -% tic = 1 mu s
    -%
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -  >> SetKernelStatus
    -      
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /precise_times false
    -        /spike_times [2.9999 4.3001]   % in ms
    -        /origin 0.0                    % in ms
    -        /start 0.0                     % in ms  
    -        /stop  6.0                     % in ms
    -  >> SetStatus
    -  
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -  sg sr 1.0 1.0 Connect
    -
    -  10.0 Simulate
    -  
    -  sr [ /events /times ] get cva
    -  [30 43]
    -  eq
    -}
    -assert_or_die
    -
    -% test first example from documentation
    -%    /spike_generator << /spike_times [1.0 1.9999 3.0001] >> Create
    -%    ---> spikes at steps 10 (==1.0ms), 20 (==2.0ms) and 30 (==3.0ms)
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -  >> SetKernelStatus
    -      
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /spike_times [1.0 1.9999 3.0001]   % in ms
    -        /origin 0.0                        % in ms
    -        /start 0.0                         % in ms  
    -        /stop  6.0                         % in ms
    -  >> SetStatus
    -  
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -  sg sr 1.0 1.0 Connect
    -
    -  10.0 Simulate
    -  
    -  sr [ /events /times ] get cva
    -  [10 20 30]
    -  eq
    -}
    -assert_or_die
    -
    -% test second example from documentation
    -%    /spike_generator << /spike_times [1.0 1.05 3.0001] >> Create
    -%    ---> error, spike time 1.05 not within tic/2 of step
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -  >> SetKernelStatus
    -      
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /spike_times [1.0 1.05 3.0001]   % in ms
    -        /origin 0.0                        % in ms
    -        /start 0.0                         % in ms  
    -        /stop  6.0                         % in ms
    -  >> SetStatus
    -} fail_or_die  
    -(----------------------- 3 ------------------------------) ==
    -
    -% test third example from documentation
    -%    /spike_generator << /spike_times [1.0 1.05 3.0001] 
    -%                        /allow_offgrid_times true >> Create
    -%    ---> spikes at steps 10, 11 (mid-step time rounded up),
    -%         30 (time within tic/2 of step moved to step)
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -  >> SetKernelStatus
    -      
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /spike_times [1.0 1.05 3.0001]   % in ms
    -        /allow_offgrid_times true  
    -        /origin 0.0                        % in ms
    -        /start 0.0                         % in ms  
    -        /stop  6.0                         % in ms
    -  >> SetStatus
    -  
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -  sg sr 1.0 1.0 Connect
    -
    -  10.0 Simulate
    -  
    -  sr [ /events /times ] get cva
    -  [10 11 30]
    -  eq
    -}
    -assert_or_die
    -(----------------------- 3.1 ------------------------------) ==
    -
    -% fourth example from documentation
    -%    /spike_generator << /spike_times [1.0 1.05 3.0001] 
    -%                        /precise_times true >> Create
    -%    ---> spikes at step 10, offset 0.0; step 11, offset 0.05; 
    -%         step 31, offset 0.0999
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -      /off_grid_spiking true  
    -  >> SetKernelStatus
    -      
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /spike_times [1.0 1.05 3.0001]   % in ms
    -        /precise_times true   
    -        /origin 0.0                        % in ms
    -        /start 0.0                         % in ms  
    -        /stop  6.0                         % in ms
    -  >> SetStatus
    -  
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -  sg sr 1.0 1.0 Connect
    -
    -  10.0 Simulate
    -  
    -  sr [ /events /times ] get cva [10 11 31] eq
    -  sr [ /events /offsets ] get cva 5 ToUnitTestPrecision [0 0.05 0.0999] eq
    -  and
    -}
    -assert_or_die
    -(----------------------- 3.2 ------------------------------) ==
    -
    -% fifth example from documentation
    -%    Assume we have simulated 10.0ms and simulation times is thus 10.0 (step 100).
    -%    Then, any spike times set, at this time, must be later than step 100.
    -%
    -%    /spike_generator << /spike_times [10.0001] >> Create 
    -%    ---> spike time is within tic/2 of step 100, rounded down to 100 thus
    -%         not in the future and should not be emitted
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -  >> SetKernelStatus
    -        
    -  /spike_generator Create /sg Set
    -  /spike_recorder Create /sr Set
    -  sg sr Connect
    -
    -  10 Simulate
    -  sg <<
    -        /spike_times [10.0001]   % in ms
    -        /origin 0.0                        % in ms
    -        /start 0.0                         % in ms  
    -        /stop  16.0                         % in ms
    -  >> SetStatus
    -
    -  10 Simulate
    -  sr /n_events get 0 eq  
    -} assert_or_die  
    -(----------------------- 3.3 ------------------------------) ==
    -
    -% sixth example from documentation
    -%    /spike_generator << /spike_times [10.0001] /precise_times true >> Create 
    -%    ---> spike at step 101, offset 0.0999 is in the future, requires recipients
    -%         that respect the offset (precise-timing model neurons)
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -      /off_grid_spiking true  
    -  >> SetKernelStatus
    -     
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /precise_times true   
    -        /origin 0.0                        % in ms
    -        /start 0.0                         % in ms  
    -  >> SetStatus
    -  
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -  sg sr Connect
    -
    -  10.0 Simulate
    -
    -  sg << /spike_times [10.0001] >> SetStatus   % in ms
    -  
    -  10.0 Simulate  
    -  
    -  sr [ /events /times ] get cva [101] eq
    -  sr [ /events /offsets ] get cva 5 ToUnitTestPrecision [0.0999] eq
    -  and  
    -}
    -assert_or_die
    -(----------------------- 3.4 ------------------------------) ==
    -
    -% seventh example from documentation
    -%    /spike_generator << /spike_times [10.0001 11.0001] /shift_now_spikes true >> Create 
    -%    ---> spike at step 101, spike shifted into the future; spike at 110 not shifted
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -  >> SetKernelStatus
    -     
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /shift_now_spikes true   
    -        /origin 0.0                        % in ms
    -        /start 0.0                         % in ms  
    -  >> SetStatus
    -  
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -  sg sr 1.0 1.0 Connect
    -
    -  10.0 Simulate
    -
    -  sg << /spike_times [10.0001 11.0001] >> SetStatus   % in ms
    -  
    -  10.0 Simulate  
    -  
    -  sr [ /events /times ] get cva
    -  [101 110] eq
    -  sr [ /events /offsets ] get cva
    -  5 ToUnitTestPrecision [0 0] eq
    -  and
    -}
    -assert_or_die	 
    -(----------------------- 3.5 ------------------------------) ==
    -
    -% seventh example from documentation, but with origin
    -%    /spike_generator << /spike_times [0.0001 1.0001] /origin 10.0 /shift_now_spikes true >> Create 
    -%    ---> spike at step 101, spike shifted into the future; spike at 110 not shifted
    -{
    -  ResetKernel
    -  << 
    -      /local_num_threads 1
    -      /resolution 0.1
    -  >> SetKernelStatus
    -     
    -  /spike_generator Create /sg Set
    -  sg <<
    -        /shift_now_spikes true   
    -        /origin 0.0                        % in ms
    -        /start 0.0                         % in ms  
    -  >> SetStatus
    -  
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps true >> SetStatus
    -  sg sr 1.0 1.0 Connect
    -
    -  10.0 Simulate
    -
    -  sg << /origin 10.0 /spike_times [0.0001 1.0001] >> SetStatus   % in ms
    -  
    -  10.0 Simulate  
    -  
    -  sr [ /events /times ] get cva
    -  [101 110] eq
    -  sr [ /events /offsets ] get cva
    -  5 ToUnitTestPrecision [0 0] eq
    -  and
    -}
    -assert_or_die	 
    -(----------------------- 3.6 ------------------------------) ==
    -
    -
    -% ensure exclusivity between /precise_times and /allow_offgrid_times and /shift_now_spikes
    -{ /spike_generator << /precise_times true /allow_offgrid_times true >> Create } fail_or_die
    -(----------------------- 4 ------------------------------) ==
    -
    -
    -
    -{ /spike_generator << /precise_times true /shift_now_spikes true >> Create } fail_or_die
    -(----------------------- 5 ------------------------------) ==
    -
    -% test set-get
    -{
    -  ResetKernel  
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /spike_generator << /spike_times [ 0.1 10.0 10.5 10.50001 ] >> Create
    -  /spike_times get cva 5 ToUnitTestPrecision
    -  [0.1 10.0 10.5 10.5] 5 ToUnitTestPrecision
    -  eq
    -}
    -assert_or_die
    -(----------------------- 3.7 ------------------------------) ==  
    -
    -
    -{
    -  ResetKernel  
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /spike_generator << /spike_times [ 0.1 10.0 10.5 10.50001 10.55 ] 
    -                      /allow_offgrid_times true >> Create
    -  /spike_times get cva 5 ToUnitTestPrecision
    -  [0.1 10.0 10.5 10.5 10.6 ] 5 ToUnitTestPrecision pstack
    -  eq
    -}
    -assert_or_die
    -(----------------------- 3.8 ------------------------------) ==
    -
    -{
    -  ResetKernel  
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /spike_generator << /spike_times [ 0.1 10.0 10.5 10.50001 10.55 ] 
    -                      /precise_times true >> Create
    -  /spike_times get cva 5 ToUnitTestPrecision
    -  [0.1 10.0 10.5 10.5 10.55 ] 5 ToUnitTestPrecision
    -  eq
    -}
    -assert_or_die
    -(----------------------- 3.9 ------------------------------) ==
    -
    -{
    -  ResetKernel  
    -  << /local_num_threads 1 /resolution 0.1 >> SetKernelStatus
    -
    -  /spike_generator << /spike_times [ 0.0 10.0 10.5 10.50001 ] 
    -                      /shift_now_spikes true >> Create
    -  /spike_times get cva 5 ToUnitTestPrecision
    -  [0.1 10.0 10.5 10.5 ] 5 ToUnitTestPrecision
    -  eq
    -}
    -assert_or_die
    -
    -%
    -% check, if precise times are conveyed up to desired precision
    -% check, if events outside [start, stop] are skipped
    -/AlignedEmission
    -{
    -  /expected Set
    -  /h Set
    -
    -  ResetKernel
    -
    -  << 
    -         /local_num_threads 1
    -         /resolution h
    -	 /off_grid_spiking true
    -      >> SetKernelStatus
    -      
    -  /spike_generator Create /sg Set
    -  sg <<
    -	/precise_times true
    -        /spike_times [0.1 5.0 5.3 5.300001 5.399999 5.9 6.0 9.3]   % in ms
    -        /origin 0.0                                                % in ms
    -        /start 5.0                                                 % in ms  
    -        /stop 6.0                                                  % in ms, set to 6.0 to keep number of emitted spikes constant
    -     >> SetStatus
    -
    -  /spike_recorder Create /sr Set
    -  sr << /time_in_steps false >> SetStatus
    -
    -  sg sr 1.0 1.0 Connect
    -
    -  7.0 Simulate
    -
    -  sr [ /events /times ] get cva
    -  expected
    -  eq
    -
    -} def
    -
    -
    -{
    - Transpose
    - {
    -  dup First exch Rest
    -  AlignedEmission
    - } Map
    - true exch {and} Fold   % all equal ?
    -} 
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -%     
    -[
    -% h =  
    -  [ 0.1     0.2     0.5     1.0 ]
    -  %        time stamp
    -% [5.0      5.0      5.0      5.0]%  <-- would be here with /start 4.0
    -  [5.3      5.3      5.3      5.3]
    -  [5.300001 5.300001 5.300001 5.300001]
    -  [5.399999 5.399999 5.399999 5.399999]
    -  [5.9      5.9      5.9      5.9]
    -  [6.0      6.0      6.0      6.0]% <-- with /stop 6.0 this spike is still emitted
    -]%           
    -
    -
    -exch exec assert_or_die
    diff --git a/testsuite/unittests/test_spike_poisson_ps.sli b/testsuite/unittests/test_spike_poisson_ps.sli
    deleted file mode 100644
    index 051041fcc7..0000000000
    --- a/testsuite/unittests/test_spike_poisson_ps.sli
    +++ /dev/null
    @@ -1,111 +0,0 @@
    -/*
    - *  test_spike_poisson_ps.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_spike_poisson_ps - tests if spikes independent of resolution
    -
    -Synopsis: (test_spike_poisson_ps) run -> compare with results at other resolutions
    -
    -Description:
    -
    -The difference in spike times is exactly 0.0 between
    -all resolutions.
    - test_spike_poisson_ps_precision.sli
    -already verified that spikes are produced and recorded with
    -double resolution.
    -
    -This script will give identical results almost always, even if the resolution
    -is not representable as a double. The main reason for this is that the
    -poisson_generator_ps generates spikes without attention to resolution. This
    -means that exactly the same sequence of spike times is generated internally
    -in the generator independent of resolution. Rounding errors occur, if at all,
    -only when the spike time is split into a multiple of the resolution and the
    -offset. In this calculation, the resolution enters as a fixed multiple of tics.
    -The calculation is reversed in the spike recorder, when step-multiple and offset
    -are recombined. This splitting and recombination apparently gives reproducible
    -results. The only deviation observed was for two spikes at very early times (<0.01 ms)
    -and coarse resolution (0.1 ms); total of 388.533 spikes tested. Therefore I
    -introduced the check against the 1e-15 relative error limit below.
    -
    -If this test fails go back to
    - test_spike_poisson_ps_precision.sli
    -to check whether poisson_generator_ps can emit spike times at
    -double precision or whether spike times are limited to the
    -precision of a tic.
    -
    -FirstVersion: February 2007
    -Author: Plesser, Diesmann
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -
    -/Transmission
    -{
    -/h Set
    -
    -% End of stimulation period
    -/stimtime 30.0 def
    -
    -% We need to ensure that all spikes arrive at the spike recorder.
    -% Thus, the simulation time needs to exceed the end of stimulation
    -% by at least two multiples of the delay, which is 1 ms by default.
    -% We also need to ensure that the simulation time is a multiple of
    -% the resolution.
    -% To be on the safe side, we add 3 ms and then round up to the
    -% nearest multiple of the resolution.
    -/simtime stimtime 3.0 add h div ceil h mul def
    -
    -ResetKernel
    -
    -<< /resolution h >> SetKernelStatus
    -
    -
    -/spike_recorder Create /sr Set
    -
    -
    -/poisson_generator_ps Create /pg Set
    -pg << /rate 128921.3 /stop stimtime >> SetStatus
    -
    -pg sr Connect
    -
    -simtime Simulate
    -
    -sr [/events /times] get cva
    -} def
    -
    -
    -
    -{
    -  [0.1 0.03 0.02 0.01 0.001]
    -  { Transmission } Map
    -
    -  % compute absolute relative error
    -  dup First /refval Set
    -  Rest { refval sub refval div { abs } Map } Map
    -  Flatten { 1e-14 gt } Select [] eq
    -}
    -assert_or_die
    diff --git a/testsuite/unittests/test_spike_poisson_ps_base2.sli b/testsuite/unittests/test_spike_poisson_ps_base2.sli
    deleted file mode 100644
    index a10e734c61..0000000000
    --- a/testsuite/unittests/test_spike_poisson_ps_base2.sli
    +++ /dev/null
    @@ -1,136 +0,0 @@
    -/*
    - *  test_spike_poisson_ps_base2.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_spike_poisson_ps_base2.sli
    -
    -Synopsis: (test_spike_poisson_ps_base2) run
    -
    -Description:
    -In NEST spike times are represented by an integer part in units of h
    -and an offset in units of milliseconds. This helps to maintain a
    -uniform absolute accuracy of spike times even for long simulation
    -times.
    -
    -The user has access to the two components of the spike if the spike 
    -recorder is set to /time_in_steps true.
    -In this case the spike_recorder returns events with the properties
    -/times and /offsets, where /times are the integer parts s in units of h
    -and offsets are the fractional parts o in milliseconds. According to
    -NEST's definition of a grid-constrained spike as a spike occuring 
    -somewhere in (t-h,t], the precise spike time is
    -   t = s*h - o
    -
    -Access to spike times with a uniform absolute accuracy is benefitial
    -when testing and comparing integrators for neuron models, see appendix
    -A.2 of [1] for details.
    -
    -This script tests whether the accuracy of spike times is maintained
    -independent of the choice of computation step size h.
    -
    -This assumes that also the poisson generator is capable of maintaining
    -the accuracy independent of computation step size.
    -If this test fails go back to
    - test_spike_poisson_ps.sli
    -to check whether poisson_generator_ps can emit spike times at double
    -precision or whether spike times are limited to the precision of a
    -tic.
    -
    -References:
    -[1] Morrison A, Straube S, Plesser H E, Diesmann M (2007) Exact
    -subthreshold integration with continuous spike times in discrete time
    -neural network simulations. Neural Computation 19: 47-79
    -
    -Author: May 2010, adapted to NEST2, Diesmann
    -SeeAlso: testsuite::test_spike_poisson_ps
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    --20    /min_exponent Set
    -1e-15  /spike_absolute_accuracy Set
    -
    -/T 4.0 def 
    -
    -min_exponent dexp /h_min Set
    -
    -
    -/Transmission
    -{
    - /h Set
    -
    - ResetKernel
    -
    - <<  /tics_per_ms min_exponent neg dexp  /resolution h >>  SetKernelStatus
    -
    - /spike_recorder << /time_in_steps true >> Create /sp Set
    -
    - /poisson_generator_ps << /rate 16384.0 >> Create /pn Set
    -
    - pn sp Connect
    -
    -
    - T Simulate 
    -                          
    - sp [/events [/times /offsets]] get cva 
    -} def
    -
    -
    -
    -[0 min_exponent -2] Range 
    -{ 
    - dup min_exponent sub dexp exch  % ratio (integer) of h to smallest h
    - dexp Transmission
    -
    - dup First exch Last rollu    % all time steps in units of smallest h
    - mul
    - exch
    - 2 arraystore
    -
    -} Map
    -
    -
    -dup Last exch Most   % combine results with the one at smallest h as reference
    -{                    % to 4-tuples [s o sr or]
    - 1 index join
    -}
    -Map exch pop
    -
    -
    -{
    - arrayload pop           % s o sr or, we compute (s*hmin-o)-(sr*hmin-or)
    -                         % trying to keep the highest possible accuracy    
    - exch 4 -1 roll exch     % o or s sr 
    - sub                     % o or (s-sr)
    - h_min mul               % o or (s-sr)*hmin
    - rolld sub               % or (s-sr)*hmin - o
    - exch add                % (s-sr)*hmin - o + or
    -}
    -Map
    -
    -
    -Flatten {abs spike_absolute_accuracy gt } Select [] eq  % comment these two last lines to inspect the 
    -assert_or_die                                           % differences causing the failure
    diff --git a/testsuite/unittests/test_spike_rec_reset.sli b/testsuite/unittests/test_spike_rec_reset.sli
    deleted file mode 100644
    index 85182f8247..0000000000
    --- a/testsuite/unittests/test_spike_rec_reset.sli
    +++ /dev/null
    @@ -1,75 +0,0 @@
    -/*
    - *  test_spike_rec_reset.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_spike_rec_reset - test if resetting works on spike_recorder
    -
    -Synopsis: (test_spike_rec_reset) run -> dies if assertion fails
    -
    -Description:
    -	Feeds spike recorder with given set of spikes, checks if they
    -	are recorded properly to memory, then resets, then records a
    -	few more and checks.
    -
    -Author: August 2008, Plesser
    -SeeAlso: spike_recorder
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -{
    -  ResetKernel
    -
    -  /spike_generator Create /sg Set
    -  sg << /precise_times false /spike_times [ 10. 200. 10. ] Range >> SetStatus
    -
    -  /spike_recorder Create /sr Set
    -
    -  sg sr Connect
    -
    -  /res [] def  % array to collect bool results
    -
    -  105 Simulate  % should record spikes 10..100 -> 10 spikes
    -  sr [ /n_events ] get                   10 eq res exch append /res Set
    -  sr [ /events /senders ] get cva length 10 eq res exch append /res Set
    -  sr [ /events /times   ] get cva length 10 eq res exch append /res Set
    -
    -  % reset
    -  sr << /n_events 0 >> SetStatus
    -  sr [ /n_events ] get                   0 eq res exch append /res Set
    -  sr [ /events /senders ] get cva length 0 eq res exch append /res Set
    -  sr [ /events /times   ] get cva length 0 eq res exch append /res Set
    -
    -  % simulate more, till 160
    -  55 Simulate % spikes 110 .. 160 -> 6 spikes
    -  sr [ /n_events ] get                   6 eq res exch append /res Set
    -  sr [ /events /senders ] get cva length 6 eq res exch append /res Set
    -  sr [ /events /times   ] get cva length 6 eq res exch append /res Set
    -
    -  % combine results
    -  res First res Rest { and } Fold
    -
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_spike_recorder.sli b/testsuite/unittests/test_spike_recorder.sli
    deleted file mode 100644
    index b8cd218428..0000000000
    --- a/testsuite/unittests/test_spike_recorder.sli
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -/*
    - *  test_spike_recorder.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_spike_recorder - sli script to test spike_recorder device
    -
    -   Synopsis: (test_spike_recorder) run
    -
    -   Description:
    - 
    -
    -   First Version: Jan 2008
    -   Author: Diesmann, Eppler
    -	
    -   Second Version: Aug 2016
    -   Description: added more tests
    -   Author: Sepehr Mahmoudian
    - */
    -
    -(unittest) run
    -/unittest using
    -
    -/Transmission
    -{
    - /h Set
    -
    -ResetKernel
    -
    -<< 
    -     /resolution h
    -  >> SetKernelStatus
    -
    -/spk_tms [0.1 5.0 5.3 5.33 5.4 5.9 6.0 ] def
    -/spike_generator Create /sg Set
    -sg <<
    -     /spike_times spk_tms   % in ms
    -     /precise_times true    % send spikes with precise offset
    -   >> SetStatus     
    -
    -/spike_recorder Create /sr Set
    -
    -sg sr Connect
    -
    -% must simulate to 8.0 to record 6.0 spike when using 1.0 resolution
    -8.0 Simulate
    -
    -% get maximum relative error in measure times
    -sr [ /events /times ] get cva 
    -spk_tms sub spk_tms div { abs } Map Max
    -1e-15 lt
    -
    -} def
    -
    -[1.0 0.1 0.02 0.01]
    - { Transmission } Map
    -true exch {and} Fold   % all equal ?
    -
    -assert_or_die
    diff --git a/testsuite/unittests/test_spike_transmission_ps.sli b/testsuite/unittests/test_spike_transmission_ps.sli
    deleted file mode 100644
    index 44dd2f3f94..0000000000
    --- a/testsuite/unittests/test_spike_transmission_ps.sli
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -/*
    - *  test_spike_transmission_ps.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* Testscript 
    -
    -Setup:
    -- poisson_generator_ps with high rate
    -- spike_recorder recording precise spike times
    -- connected with default connection, delay 1ms
    -
    -Test:
    -- simulate for T at different resolutions h
    -- record until Tstop <= T - min_delay
    -- compare recorded spike times: must be equal
    -
    -Important:
    -- Recording must end at the same time for all resolutions.
    -  No data newer than one min_delay before the end of the
    -  simulation can be recorded. To avoid any problems caused
    -  by min_delay depending on the resolution (see #161), we
    -  set the end of the recording time explicitly. We check
    -  by assertion that the end of recording is no later than
    -  T - min_delay.
    -- Connection delay must be set explicitly because
    -  of default delay recalibration error reported in
    -  #161. Once #161 is fixed, it should no longer be
    -  necessary to explicitly set the delay.
    -  
    -Historic information:
    -- related to tickets #157, #164, #210
    -
    -worked even with ticket #157 unresolved.
    -Only the presence of a neuron (see test_spike_transmission_ps_iaf)
    -exhibited the problem.
    -Prior to the fix of ticket #164 this test produced
    -inconsistent results without specifying /local_num_threads 1
    -for the kernel.
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% test parameters -------------------------------------------------
    -
    -/T         4.0 def   % simulation time
    -/Tstop     3.0 def   % end of recording
    -/prate 12892.3 def   % rate of Poisson generator
    -/delay     1.0 def   % connection delay, needs to be set explicity due to #161
    -
    -/resolutions [0.1 0.01 0.001] def
    -
    -% test routine ----------------------------------------------------
    -
    -/Transmission
    -{
    -  /h Set
    -
    -  ResetKernel
    -
    -  <<  
    -       /resolution h
    -      >> SetKernelStatus
    -
    -  % build and connect first
    -  /spike_recorder Create /sp Set  
    -  /poisson_generator_ps Create /pn Set
    - 
    -  % now configure
    -  sp  << /stop Tstop >> SetStatus
    -
    -  pn << /rate prate >> SetStatus
    -
    -  pn sp 1.0 delay Connect
    -
    -  % check in-delay condition
    -  /mindel GetKernelStatus /min_delay get def
    -  Tstop T mindel sub leq assert
    -
    -  % simulate
    -  T Simulate 
    -
    -  % obtain event time stamps and offsets
    -  sp [/events /times] get cva
    -
    -} def
    -
    -% execute test -----------------------------------------------------
    -
    -resolutions
    -{ 
    -  Transmission 
    -} Map
    -
    -% Stack now contains one array of spike times per
    -% resolution. Check if spike times are equal to within 4.5e-16 ms.
    -dup First /ref Set   % reference
    -Rest true exch { ref sub 0 exch { abs max } Fold 4.5e-16 lt and } Fold
    -
    -assert_or_die
    diff --git a/testsuite/unittests/test_spike_transmission_ps_iaf.sli b/testsuite/unittests/test_spike_transmission_ps_iaf.sli
    deleted file mode 100644
    index 1d2c01b204..0000000000
    --- a/testsuite/unittests/test_spike_transmission_ps_iaf.sli
    +++ /dev/null
    @@ -1,67 +0,0 @@
    -/*
    - *  test_spike_transmission_ps_iaf.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* Testscript 
    -  
    -checks for consistent calculation of time stamps in 
    -poisson_generator_ps. 
    -This test exhibited the problem described in ticket #157
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/T 3.0 def   
    -
    -
    -/Transmission
    -{
    - /h Set
    -
    -ResetKernel
    -
    -<< 
    -      /resolution h
    -     >> SetKernelStatus
    -
    -/iaf_psc_alpha Create /n Set
    - 
    -/poisson_generator_ps Create /p Set
    -p << /rate  10000. >> SetStatus
    -
    -p n Connect
    -
    -T Simulate 
    -
    -} def
    -
    -
    -[0.1 0.01 0.001]
    -{
    - Transmission
    -} forall
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_spin_detector.sli b/testsuite/unittests/test_spin_detector.sli
    deleted file mode 100644
    index 888b134073..0000000000
    --- a/testsuite/unittests/test_spin_detector.sli
    +++ /dev/null
    @@ -1,81 +0,0 @@
    -/*
    - *  test_spin_detector.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -    Name: testsuite::test_spin_detector - test decoding mechanism of binary events by spin_detector
    -
    -    Synopsis: (test_spin_detector) run -> test decoding mechanism of binary events by spin_detector
    -
    -    Description:
    -    Test, whether the communication mechanism for binary neurons
    -    works and whether the spin detector correctly decodes binary transitions.
    -    Finally, setting the precision is tested.
    -
    -    FirstVersion: March 2013
    -    Author: Mortiz Helias, Sepehr Mahmoudian
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/run_test
    -{
    -
    -    0.1 /h Set
    -
    -    ResetKernel
    -
    -    <<
    -	/local_num_threads 1 
    -	/resolution h
    -    >> SetKernelStatus
    -    
    -    % check, if double spikes are correctly interpreted as up transition
    -    % and single spikes are interpreted as down transition
    -
    -    /sp /spin_detector Create def
    -
    -    /sg /spike_generator Create def
    -
    -
    -    sg << /spike_times [10. 10. 15.] >> SetStatus
    -
    -    sg sp 1. 1. Connect
    -
    -    20. Simulate
    -
    -    % check if right state is decoded
    -
    -    sp /events get /state get /s Set
    -    s 0 get 1 eq assert_or_die
    -    s 1 get 0 eq assert_or_die
    -
    -    % check if recorded at the right times
    -    sp /events get /times get /times Set
    -    times cva
    -    [ 10. 15.] eq
    -    assert_or_die
    -
    -} def
    -
    -run_test
    diff --git a/testsuite/unittests/test_stdp_synapse.sli b/testsuite/unittests/test_stdp_synapse.sli
    deleted file mode 100644
    index 1f8c08ac94..0000000000
    --- a/testsuite/unittests/test_stdp_synapse.sli
    +++ /dev/null
    @@ -1,238 +0,0 @@
    -/*
    - *  test_stdp_synapse.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_stdp_synapse - basic test of stdp_synapse
    -
    -Synopsis: (test_stdp_synapse) run
    -
    -Description:
    -  A parrot_neuron that repeats the spikes from a poisson generator is
    -  connected to an iaf_psc_alpha that is driven by inh. and exc. poisson input.
    -  The synapse is an stdp_synapse. After the simulation, we go through the pre-
    -  and postsyn. spike-trains spike by spike and try to reproduce the STDP
    -  results. The final weight obtained after simulation is compared to the final
    -  weight obtained from the test.
    -
    -Author: Kunkel, Nov 2010
    -*/
    -
    -
    -(unittest) run
    -/unittest using
    - 
    -ResetKernel
    - 
    -/resolution 0.1 def %1.0 def %2.0 -4 pow def  % simulation step size
    -<< /resolution resolution >> SetKernelStatus 
    -
    -
    -%%% input parameters %%%
    -
    -/K_exc         8000.0 def  % number of exc. inputs
    -/K_inh         2000.0 def  % number of inh. inputs
    -/nu              10.0 def  % equil. firing rate
    -/nu_x             1.7 def  % external rate
    -/w_exc           45.0 def  % strength of exc. connections
    -/w_inh w_exc -5.0 mul def  % strength of inh. connections
    -/delay            1.0 def  % synaptic transmission delay
    -
    -/axonal_delay 0.0 def
    -/backpr_delay delay axonal_delay sub def
    -
    -
    -%%% STDP parameters %%%
    -
    -/alpha              1.1  def
    -/lambda             0.01 def
    -/tau_plus          20.0  def
    -/tau_minus         30.0  def
    -/mu_plus            1.0  def  % multiplicative
    -/mu_minus           1.0  def  % multiplicative
    -/w_max     w_exc 2.0 mul def
    -
    -
    -%%% create poisson generators, neurons and spike recorder %%%
    -
    -/pg_exc /poisson_generator << /rate K_exc nu nu_x add mul >> Create def
    -/pg_inh /poisson_generator << /rate K_inh nu mul          >> Create def
    -
    -/pg_pre /poisson_generator << /rate nu >> Create def
    -
    -/parrot /parrot_neuron Create def
    -/neuron /iaf_psc_alpha << /tau_minus tau_minus >> Create def
    -
    -/sr_pre  /spike_recorder Create def
    -/sr_post /spike_recorder Create def
    -
    -
    -%%% connect %%%
    -
    -/stdp_synapse << /alpha    alpha
    -                 /lambda   lambda
    -            		 /tau_plus tau_plus
    -            		 /mu_plus  mu_plus
    -            		 /mu_minus mu_minus
    -            		 /Wmax     w_max
    -              >> SetDefaults
    -
    -pg_exc neuron w_exc delay Connect
    -pg_inh neuron w_inh delay Connect
    -pg_pre parrot w_exc delay Connect
    -
    -parrot neuron w_exc delay /stdp_synapse Connect
    -
    -parrot sr_pre  Connect
    -neuron sr_post Connect
    -
    -
    -%%% simulate and get data %%%
    -
    -10000.0 Simulate
    -
    -/pre_spikes  sr_pre  /events get /times get cva { axonal_delay add } Map def
    -/post_spikes sr_post /events get /times get cva { backpr_delay add } Map def
    -
    -/final_weight << /source parrot /target neuron >> GetConnections 0 get /weight get def
    -
    -
    -%%% check final weight %%%
    -
    -/K_plus    0.0 def
    -/K_minus   0.0 def
    -/last_pre  0   def
    -/last_post 0   def
    -/j         0   def
    -/i         0   def
    -
    -/post_spike post_spikes i get def
    -/pre_spike  pre_spikes  j get def
    -/w          w_exc w_max div   def
    -
    -/update_K_plus
    -{
    -  last_pre pre_spike sub tau_plus div exp K_plus mul 1.0 add /K_plus Set
    -}
    -def
    -
    -/update_K_minus
    -{
    -  last_post post_spike sub tau_minus div exp K_minus mul 1.0 add /K_minus Set
    -}
    -def
    -
    -/next_pre_spike
    -{
    -  j 1 add /j Set
    -  pre_spike /last_pre Set
    -  pre_spikes j get /pre_spike Set  
    -}
    -def
    -
    -/next_post_spike
    -{
    -  i 1 add /i Set
    -  post_spike /last_post Set
    -  post_spikes i get /post_spike Set
    -}
    -def
    -
    -/facilitate
    -{
    -  ( w + lambda * (1.0-w)**mu_plus * K_plus * exp((last_pre-post_spike)/tau_plus) ) ExecMath
    -  dup 1.0 lt { /w Set } { pop 1.0 /w Set } ifelse
    -  %(facilitation) =only (\t) =only last_pre =only (\t) =only post_spike =only (\t) =only w w_max mul =
    -}
    -def
    -
    -/depress
    -{
    -  ( w - lambda * alpha * w**mu_minus * K_minus * exp((last_post-pre_spike)/tau_minus) ) ExecMath
    -  dup 0.0 gt { /w Set } { pop 0.0 /w Set } ifelse
    -  %(depression) =only (\t) =only last_post =only (\t) =only pre_spike =only (\t) =only w w_max mul =
    -}
    -def
    -
    -
    -{
    -  {
    -    pre_spike post_spike eq
    -    { % pre- and post-syn. spike at the same time
    -      last_post post_spike neq { facilitate } if
    -      last_pre pre_spike neq { depress } if
    -      %(pre == post) =only (\t) =only pre_spike =only (\t) =only post_spike =only (\t) =only w w_max mul =
    -      j 1 add pre_spikes length lt
    -      {
    -        update_K_plus
    -        next_pre_spike
    -        i 1 add post_spikes length lt
    -        {
    -          update_K_minus
    -  	next_post_spike
    -        }
    -        if
    -      }
    -      {
    -        exit  
    -      }
    -      ifelse
    -    }
    -    {
    -      pre_spike post_spike lt
    -      { % next spike is a pre-syn. spike
    -        depress
    -        update_K_plus
    -        j 1 add pre_spikes length lt
    -        {
    -          next_pre_spike
    -        }
    -        {
    -          %(last presyn spike) =
    -          % we don't consider the post-syn. spikes after the last pre-syn. spike
    -          exit
    -        }
    -        ifelse
    -      }
    -      { % next spike is a post-syn. spike
    -        facilitate
    -        update_K_minus
    -        i 1 add post_spikes length lt
    -        {
    -          next_post_spike
    -        }
    -        {
    -          %(last postsyn spike) =
    -          % we DO consider the pre-syn. spikes after the last post-syn. spike
    -          post_spike /last_post Set
    -          pre_spikes dup length 1 sub get resolution add /post_spike Set  % to make sure we don't come here again
    -        }
    -        ifelse
    -      }
    -      ifelse
    -    }
    -    ifelse
    -  }
    -  loop
    -  
    -  w w_max mul 13 ToUnitTestPrecision final_weight 13 ToUnitTestPrecision eq
    -} assert_or_die
    diff --git a/testsuite/unittests/test_step_current_generator.sli b/testsuite/unittests/test_step_current_generator.sli
    deleted file mode 100644
    index 230047a1d0..0000000000
    --- a/testsuite/unittests/test_step_current_generator.sli
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -/*
    - *  test_step_current_generator.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_step_current_generator - minimal test of step_current_generator
    -
    -Synopsis: (test_step_current_generator) run -> dies if assertion fails
    -
    -Description:
    -Tests parameter setting and statistical correctness for one application.
    -
    -Author: Plesser
    -FirstVersion: July 2008
    -SeeAlso: noise_generator
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% First test: parameter setting on model and instance
    -{
    -    ResetKernel
    -    /tdict << /amplitude_times [ 1.0 2.5 4.6 ] 
    -              /amplitude_values [ 100.0 -100.0 200.0 ]  >> def
    -
    -    /ng1 /step_current_generator Create def
    -    ng1 tdict SetStatus
    -
    -    /step_current_generator tdict SetDefaults
    -    /ng2 /step_current_generator Create def
    -
    -    ng1 [tdict keys] get cva
    -    ng2 [tdict keys] get cva
    -    eq
    -} assert_or_die
    -clear
    -ResetKernel
    -
    -% Second test: error if only times given
    -{
    -  ResetKernel
    -  /step_current_generator << /amplitude_times [ 1.0 2.0 ] >> SetDefaults
    -} fail_or_die  
    -
    -% Third test: error if only values given
    -{
    -  ResetKernel
    -  /step_current_generator << /amplitude_values [ 1.0 2.0 ] >> SetDefaults
    -} fail_or_die  
    -
    -% Fourth test: error if different sizes
    -{
    -  ResetKernel
    -  /step_current_generator << /amplitude_values [ 1.0 2.0 ]
    -                             /amplitude_times  [ 1.0 2.0 3.0 ]
    -  >> SetDefaults
    -} fail_or_die  
    -
    -% Fifth test: error if times not strictly increasing
    -{
    -  ResetKernel
    -  /step_current_generator << /amplitude_values [ 1.0 2.0 3.0 ]
    -                             /amplitude_times  [ 1.0 2.0 2.0 ]
    -  >> SetDefaults
    -} fail_or_die  
    -
    -% Sixth test: feed neuron and check response
    -{
    -  ResetKernel
    -  << /resolution 0.1 >> SetKernelStatus
    -  /scg /step_current_generator Create def
    -  /nrn /iaf_psc_alpha Create def
    -  /vm  /voltmeter Create def
    -
    -  % no spiking, all parameters 1, 0 leak potential
    -  nrn << /V_th 1e10 /C_m 1.0 /tau_m 1.0 /E_L 0.0 /V_reset 0.0 /V_m 0.0 >> SetStatus
    -
    -  scg << /start 5.0 /stop 15.0 
    -         /amplitude_times  [ 1.5 5.5 7.5 10.0 14.9 15.0 20.0 ]
    -         /amplitude_values [ 1.  -2.  4.  -8.  16. -32. 64.  ]
    -      >> SetStatus
    -
    -  vm << /interval 0.1 >> SetStatus
    -
    -  scg nrn Connect
    -  vm  nrn Connect
    -
    -  25 Simulate
    -
    -/referenceSolution [
    -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.516260e-02 1.812690e-01 2.591820e-01 3.296800e-01 3.934690e-01 1.657010e-01 -4.039300e-02 -2.268740e-01 -3.956100e-01 -5.482870e-01 -6.864360e-01 -8.114380e-01 -9.245450e-01 -1.026890e+00 -1.119490e+00 -1.203280e+00 -1.279100e+00 -1.347700e+00 -1.409780e+00 -1.465940e+00 -1.516770e+00 -1.562750e+00 -1.604360e+00 -1.642010e+00 -1.676080e+00 -1.135930e+00 -6.471810e-01 -2.049430e-01 1.952100e-01 5.572840e-01 8.849020e-01 1.181340e+00 1.449570e+00 1.692280e+00 1.911890e+00 2.110600e+00 2.290400e+00 2.453090e+00 2.600300e+00 2.733500e+00 2.854020e+00 2.963070e+00 3.061750e+00 3.151040e+00 3.231830e+00 3.304930e+00 3.371070e+00 3.430920e+00 3.485080e+00 3.534080e+00 2.436470e+00 1.443310e+00 5.446560e-01 -2.684760e-01 -1.004230e+00 -1.669960e+00 -2.272350e+00 -2.817400e+00 -3.310590e+00 -3.756850e+00 -4.160640e+00 -4.526000e+00 -4.856600e+00 -5.155730e+00 -5.426400e+00 -5.671310e+00 -5.892910e+00 -6.093430e+00 -6.274860e+00 -6.439030e+00 -6.587580e+00 -6.721990e+00 -6.843610e+00 -6.953650e+00 -7.053230e+00 -7.143320e+00 -7.224850e+00 -7.298610e+00 -7.365360e+00 -7.425750e+00 -7.480400e+00 -7.529850e+00 -7.574590e+00 -7.615070e+00 -7.651700e+00 -7.684850e+00 -7.714840e+00 -7.741970e+00 -7.766530e+00 -7.788750e+00 -7.808850e+00 -7.827040e+00 -7.843500e+00 -7.858390e+00 -7.871870e+00 -7.884060e+00 -7.895090e+00 -7.905080e+00 -7.914110e+00 -5.638380e+00 -5.101820e+00 -4.616320e+00 -4.177020e+00 -3.779520e+00 -3.419850e+00 -3.094410e+00 -2.799940e+00 -2.533490e+00 -2.292400e+00 -2.074240e+00 -1.876850e+00 -1.698250e+00 -1.536640e+00 -1.390410e+00 -1.258090e+00 -1.138370e+00 -1.030040e+00 -9.320180e-01 -8.433250e-01 -7.630720e-01 -6.904560e-01 -6.247510e-01 -5.652980e-01 -5.115020e-01 -4.628270e-01 -4.187830e-01 -3.789300e-01 -3.428700e-01 -3.102420e-01 -2.807190e-01 -2.540050e-01 -2.298330e-01 -2.079610e-01 -1.881710e-01 -1.702640e-01 -1.540620e-01 -1.394010e-01 -1.261350e-01 -1.141320e-01 -1.032710e-01 -9.344310e-02 -8.455080e-02 -7.650470e-02 -6.922430e-02 -6.263680e-02 -5.667610e-02 -5.128260e-02 -4.640250e-02 -4.198670e-02 -3.799110e-02 -3.437580e-02 -3.110450e-02 -2.814450e-02 -2.546620e-02 -2.304280e-02 -2.085000e-02 -1.886580e-02 -1.707050e-02 -1.544600e-02 -1.397620e-02 -1.264610e-02 -1.144270e-02 -1.035380e-02 -9.368490e-03 -8.476960e-03 -7.670270e-03 -6.940350e-03 -6.279890e-03 -5.682280e-03 -5.141540e-03 -4.652260e-03 -4.209540e-03 -3.808950e-03 -3.446480e-03 -3.118500e-03 -2.821740e-03 -2.553210e-03 -2.310240e-03 -2.090390e-03 -1.891470e-03
    -] def
    -
    -  vm [ /events /V_m ] get cva 6 ToUnitTestPrecision 
    -  referenceSolution 
    -  eq
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_steppedsim.sli b/testsuite/unittests/test_steppedsim.sli
    deleted file mode 100644
    index bb2d555ba9..0000000000
    --- a/testsuite/unittests/test_steppedsim.sli
    +++ /dev/null
    @@ -1,74 +0,0 @@
    -/*
    - *  test_steppedsim.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -   Name: testsuite::test_steppedsim - test multiple calls of Simulate
    -
    -   Synopsis: (test_steppedsim) run
    -
    -   Description:
    -   The script tests if multiple calls to Simulate give the same result as 
    -   a single one.
    -   This test is a reduced version of ticket-452.sli
    -
    -   FirstVersion: October 2010
    -   Author: Diesmann
    -   SeeAlso: testsuite::ticket-452
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/Run
    -{
    - /simcommand Set
    -
    - ResetKernel
    -
    -  /iaf_psc_delta_ps Create  /nrn Set   
    - 
    -  /spike_generator  << /precise_times false /spike_times [ 0.4 ] >> Create /sg Set
    -
    -  sg nrn 15.0 1.0 Connect
    -
    -  /spike_recorder Create /sr Set
    -
    -  nrn sr Connect
    -
    -  simcommand
    -
    -  sr [/events /times] get cva 
    -
    -} def 
    -
    -
    -{3.0 Simulate} Run 
    -
    -{1 1 3  {; 1.0 Simulate} for}  Run 
    -
    -eq assert_or_die
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_symmetric_connections.sli b/testsuite/unittests/test_symmetric_connections.sli
    deleted file mode 100644
    index 0cd19ecd19..0000000000
    --- a/testsuite/unittests/test_symmetric_connections.sli
    +++ /dev/null
    @@ -1,234 +0,0 @@
    -/*
    - *  test_symmetric_connections.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/** @BeginDocumentation
    -
    -Name: testsuite::test_symmetric_connections - Tests that the functionality to create
    -symmetric connections works properly.
    -
    -Synopsis: (test_symmetric_connections) run -> NEST exits if test fails
    -
    -Description: 
    -This test ensures that the functionality to create symmetric connections
    -via flag "make_symmetric" works properly. It also ensures that the 
    -built-in property "requires_symmetric" for synapse models works properly.
    -
    -In more detail the test ensures that
    -- the "make_symmetric" flag works properly with one-to-one connection rule
    -- the usage of the "make_symmetric" flag with any other connections throws
    -  an NotImplemented exception
    -- synapse models that "require_symmetric" cannot be created without
    -  "make_symmetric" except for suitable uniform all-to-all connections
    -
    -Author: Jan Hahne, 2016-04-22, updated 2016-11-02
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -/setup
    -{
    -  ResetKernel
    -  
    -  /set1 /iaf_psc_alpha 5 Create def
    -  /set2 /iaf_psc_alpha 5 Create def
    -} def
    -
    -% Check that make_symmetric flag cannot be used with other connection rules than one_to_one
    -{
    -  setup
    -  set1 set2 << /rule /all_to_all /make_symmetric true >> /static_synapse Connect
    -}
    -fail_or_die
    -
    -{
    -  setup
    -  set1 set2 << /rule /fixed_indegree /indegree 3 /make_symmetric true >> /static_synapse Connect
    -}
    -fail_or_die
    -
    -{
    -  setup
    -  set1 set2 << /rule /fixed_outdegree /outdegree 3 /make_symmetric true >> /static_synapse Connect
    -}
    -fail_or_die
    -
    -{
    -  setup
    -  set1 set2 << /rule /fixed_total_number /N 3 /make_symmetric true >> /static_synapse Connect
    -}
    -fail_or_die
    -
    -% Check that make_symmetric flag works properly for basic one_to_one connections
    -{
    -  setup
    -  set1 set2 << /rule /one_to_one /make_symmetric true >> /static_synapse Connect
    -
    -  << /source set1 >> GetConnections /fwd Set
    -  << /source set2 >> GetConnections /bck Set
    -  
    -  [ fwd bck ] 
    -  {
    -    /b Set /f Set
    -    f /source get b /target get eq
    -    b /source get f /target get eq and
    -    f /weight get b /weight get eq and
    -    f /delay get b /delay get eq and
    -  } MapThread
    -  true exch { and } Fold
    -} assert_or_die
    -
    -% Check that make_symmetric flag cannot be used with random parameters
    -{
    -  setup
    -  set1 set2 
    -  << /rule /one_to_one 
    -     /make_symmetric true >> 
    -  << /synapse_model /stdp_synapse
    -     /weight << /distribution  /uniform >> >> 
    -  Connect
    -}
    -fail_or_die
    -
    -{
    -  setup
    -  set1 set2 
    -  << /rule /one_to_one 
    -     /make_symmetric true >> 
    -  << /synapse_model /stdp_synapse
    -     /alpha << /distribution  /uniform >> >> 
    -  Connect
    -}
    -fail_or_die
    -
    -% Check that make_symmetric flag works properly for one_to_one connections
    -% containing array-parameters
    -{
    -  setup
    -  set1 set2 
    -  << /rule /one_to_one 
    -     /make_symmetric true >> 
    -  << /synapse_model /stdp_synapse
    -     /weight <. 1.0 2.0 3.0 4.0 5.0 .>
    -     /delay <. 1.5 2.5 3.5 4.5 5.5 .>
    -     /alpha <. 1.2 2.2 3.2 4.2 5.2 .> >> 
    -  Connect
    -
    -  << /source set1 >> GetConnections /fwd Set
    -  << /source set2 >> GetConnections /bck Set
    -  
    -  [ fwd bck ] 
    -  {
    -    /b Set /f Set
    -    f /source get b /target get eq
    -    b /source get f /target get eq and
    -    f /weight get b /weight get eq and
    -    f /delay get b /delay get eq and
    -    f /alpha get b /alpha get eq and
    -  } MapThread
    -  true exch { and } Fold
    -} assert_or_die
    -
    -
    -% The now following tests need the synapse model
    -% gap_junction (which has require_make_symmetric=true) and
    -% ergo the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -/setup2
    -{
    -  ResetKernel
    -  
    -  /set1 /hh_psc_alpha_gap 2 Create def
    -  /set2 /hh_psc_alpha_gap 2 Create def
    -} def
    -
    -% Check that connections that require_symmetric cannot be created without make_symmetric=true
    -{
    -  setup2
    -  set1 set2 << /rule /one_to_one /make_symmetric false >> /gap_junction Connect
    -}
    -fail_or_die
    -
    -{
    -  setup2
    -  set1 set2 << /rule /fixed_indegree /indegree 3 /make_symmetric false >> /gap_junction Connect
    -}
    -fail_or_die
    -
    -{
    -  setup2
    -  set1 set2 << /rule /fixed_outdegree /outdegree 3 /make_symmetric false >> /gap_junction Connect
    -}
    -fail_or_die
    -
    -{
    -  setup2
    -  set1 set2 << /rule /fixed_total_number /N 3 /make_symmetric false >> /gap_junction Connect
    -}
    -fail_or_die
    -
    -% Check that all-to-all connection can only be created with scalar parameters and
    -% sources == targets. These connections are inherently symmetric.
    -{
    -  setup2
    -  set1 set2 << /rule /all_to_all /make_symmetric false >> /gap_junction Connect
    -}
    -fail_or_die
    -
    -{
    -  setup2
    -  set1 set1 
    -  << /rule /all_to_all /make_symmetric false >> 
    -  << /synapse_model /gap_junction /weight <. 1.0 2.0 3.0 4.0 .> >>
    -  Connect
    -}
    -fail_or_die
    -
    -{
    -  setup2
    -  set1 set1 
    -  << /rule /all_to_all /make_symmetric false >> 
    -  << /synapse_model /gap_junction /weight << /distribution  /uniform >> >>
    -  Connect
    -}
    -fail_or_die
    -
    -{
    -  setup2
    -  set1 set1 << /rule /all_to_all /make_symmetric false >> /gap_junction Connect
    -}
    -pass_or_die
    -
    -{
    -  setup2
    -  set1 set1 
    -  << /rule /all_to_all /make_symmetric false >> 
    -  << /synapse_model /gap_junction /weight 2.0 >>
    -  Connect
    -}
    -pass_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_syn_hom_w.sli b/testsuite/unittests/test_syn_hom_w.sli
    deleted file mode 100644
    index 5c7a492255..0000000000
    --- a/testsuite/unittests/test_syn_hom_w.sli
    +++ /dev/null
    @@ -1,139 +0,0 @@
    -/*
    - *  test_syn_hom_w.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - 
    -/** @BeginDocumentation
    -Name: testsuite::test_syn_hom_w - sli script for test synapse with homogeneous weight and delay.
    -
    -Synopsis: (test_syn_hom_w) run -> compare response with reference data
    -
    -Description:
    -Test of the overall function of static_synapse_hom_w.
    -A simple integrate-and-fire neuron is created. It is connected to a spike
    -generator and a voltmeter by static synapses with homogeneous weight.
    -
    -FirstVersion: April 2008
    -
    -Author: Moritz Helias, Susanne Kunkel
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -1.0 /delay Set   % in ms
    -
    -0.1 /h Set
    -
    -ResetKernel
    -
    -<<
    -       /local_num_threads 1
    -       /resolution h
    -     >> SetKernelStatus
    -
    -/spike_generator Create /sg Set
    -
    -sg <<
    -     /precise_times false
    -     /origin 0.0            % in ms
    -     /spike_times [ 2.0 ]   % in ms
    -     /start 1.0             % in ms
    -     /stop 3.0              % in ms
    -   >> SetStatus
    -
    -/iaf_psc_alpha Create /neuron Set
    -
    -/voltmeter Create /vm Set
    -vm << /time_in_steps true /interval h >> SetStatus
    -
    -/spike_recorder Create /sr Set
    -sr << /time_in_steps true >> SetStatus
    -
    -/static_synapse_hom_w
    -<<
    -    /weight 100.0
    -    /delay 1.0
    ->> SetDefaults
    -
    -sg neuron << >> /static_synapse_hom_w Connect
    -vm neuron << >> /static_synapse_hom_w Connect
    -neuron sr << >> /static_synapse_hom_w Connect
    -
    -7.0 Simulate
    -
    -% function expecting testdata on stack
    -{                                            % reference data
    - dup Transpose First /test_times Set         % times of reference 
    -
    - vm [/events [/times /V_m]] get cva   % array of recorded data
    -  6 ToUnitTestPrecision                      % to precision of reference
    -  Transpose                                  % all recorded tuples
    -  {First test_times exch MemberQ } Select    % those with reference
    - eq                                          % compare
    -}
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The output send to std::cout is a superposition of the output of
    -% the voltmeter and the spike recorder. Both, voltmeter and spike
    -% recorder are connected to the same neuron.
    -%
    -% time (in steps)  voltage (in mV)
    -[
    - [1 -70]
    - [2 -70]
    - [3 -70]
    - [4 -70]
    -%
    - [27 -70]
    - [28 -70]
    - [29 -70]
    - [30 -70]
    - [31 -6.999740e+01]
    - [32 -6.998990e+01]
    - [33 -6.997810e+01]
    - [34 -6.996240e+01]
    - [35 -6.994340e+01]
    -%
    - [45 -6.964350e+01]
    - [46 -6.960840e+01]
    - [47 -6.957320e+01]
    - [48 -6.953800e+01]
    - [49 -6.950290e+01]
    - [50 -6.946810e+01]
    - [51 -6.943360e+01]
    - [52 -6.939950e+01]
    - [53 -6.936600e+01]
    - [54 -6.933300e+01]
    - [55 -6.930080e+01]
    -%
    - [60 -6.915080e+01]
    -]
    -
    -exch assert_or_die
    -
    -
    -
    -
    -
    diff --git a/testsuite/unittests/test_thread_local_ids.sli b/testsuite/unittests/test_thread_local_ids.sli
    deleted file mode 100644
    index 8e43784724..0000000000
    --- a/testsuite/unittests/test_thread_local_ids.sli
    +++ /dev/null
    @@ -1,67 +0,0 @@
    -/*
    - *  test_thread_local_ids.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/** @BeginDocumentation
    -Name: testsuite::test_thread_local_ids - test that thread-local ids are set correctly 
    -
    -Synopsis: (test_thread_local_ids.sli) run -> dies if assertion fails
    -
    -Description:
    -Ensures that thread-local IDs are set correctly on multithreaded simulations.
    -
    -Author: Plesser, Ippen
    -FirstVersion: 2014-11-21
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -{
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -  
    -  /iaf_psc_alpha 4 Create ;
    -  [ 1 ] [ 2 ] /all_to_all << /synapse_model /static_synapse_hpc >> Connect
    -   
    -  [ 4 ] { [[ /thread_local_id ]] get } Table dup ==
    -  [ [0] [0] [0] [0] ]
    -  eq
    -} assert_or_die
    -
    -{
    -  ResetKernel
    -  << /local_num_threads 4 >> SetKernelStatus
    -
    -  /iaf_psc_alpha 4 Create ;
    -  10 Simulate
    -
    -  [ 4 ] { [[ /thread_local_id ]] get } Table dup ==
    -  [ [0] [0] [0] [0] ]
    -  eq
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_threaded_multimeter.sli b/testsuite/unittests/test_threaded_multimeter.sli
    deleted file mode 100644
    index 962539cc46..0000000000
    --- a/testsuite/unittests/test_threaded_multimeter.sli
    +++ /dev/null
    @@ -1,84 +0,0 @@
    -/*
    - *  test_threaded_multimeter.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/* BeginDocumentation
    -   Name: testsuite::test_threaded_multimeter - test support for multimeter
    -    
    -   Synopsis: (test_threaded_multimeter.sli) run -> dies if assertion fails
    -    
    -   Description:
    -   Tests that multimeter works when we use threads.
    -    
    -   Author: Stine B. Vennemo
    -   FirstVersion: June 2017
    -   SeeAlso: test_treaded_spike_recorder.sli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -/run_multimeter
    -{
    -  << >> begin
    -    /n_threads Set
    -
    -    /N 10 def  % should not be divisible by thread number
    -  
    -    ResetKernel
    -    GetKernelStatus /num_processes get 1 eq assert % distributed setting not covered
    -    << /local_num_threads n_threads >> SetKernelStatus
    -
    -    % actual neurons
    -    /nrns /iaf_psc_alpha N << /I_e 40. >> Create def
    -    nrns { dup /global_id get 1 sub 30. N div mul -90. add 
    -               /foo << >> def foo exch /V_m exch put foo SetStatus } forall
    -
    -    % multimeter
    -    /ac /multimeter << /record_from [ /V_m ] /interval 1.0 >> Create def
    -                       
    -    ac nrns Connect
    -
    -    5. Simulate
    -
    -    % obtain data 
    -    ac /events get dup /V_m get cva exch /senders get cva
    -  end
    -}
    -def
    -
    -{
    -  << >> begin
    - 1 run_multimeter /r1s Set /r1V Set
    - 3 run_multimeter /r3s Set /r3V Set
    -
    - r1V Sort r3V Sort eq
    - r1s Sort r3s Sort eq
    - 
    -  end
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_threaded_spike_recorder.sli b/testsuite/unittests/test_threaded_spike_recorder.sli
    deleted file mode 100644
    index f854001ff1..0000000000
    --- a/testsuite/unittests/test_threaded_spike_recorder.sli
    +++ /dev/null
    @@ -1,83 +0,0 @@
    -/*
    - *  test_threaded_spike_recorder.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -/* BeginDocumentation
    -   Name: testsuite::test_threaded_spike_recorder - test support for spike_recorder
    -
    -   Synopsis: (test_threaded_spike_recorder.sli) run -> dies if assertion fails
    -
    -   Description:
    -   Tests that spike_recorder works when we use threads.
    -
    -   Author: Stine B. Vennemo
    -   FirstVersion: June 2017
    -   SeeAlso: test_threaded_multimeter.sli
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -skip_if_not_threaded
    -
    -M_ERROR setverbosity
    -
    -/run_sr
    -{
    -  << >> begin
    -    /n_threads Set
    -
    -    /N 10 def  % should not be divisible by thread number
    -  
    -    ResetKernel
    -    GetKernelStatus /num_processes get 1 eq assert % distributed setting not covered
    -    << /local_num_threads n_threads >> SetKernelStatus
    -
    -    % actual neurons
    -    /nrns /iaf_psc_alpha N << /I_e 376. >> Create def
    -
    -    % spike_recorder
    -    /sr  /spike_recorder Create def
    -
    -    nrns sr Connect
    -
    -    200. Simulate
    -
    -    % obtain data 
    -    sr /events get dup /times get cva exch /senders get cva
    -  end
    -}
    -def
    -
    -{
    -  << >> begin
    -  1 run_sr /r1s Set /r1t Set
    -  3 run_sr /r3s Set /r3t Set
    - 
    -  r1t Sort r3t Sort eq
    -  r1s Sort r3s Sort eq
    - 
    -  end
    -} assert_or_die
    -
    -
    -endusing
    diff --git a/testsuite/unittests/test_time_input.sli b/testsuite/unittests/test_time_input.sli
    deleted file mode 100644
    index 3b51c909a2..0000000000
    --- a/testsuite/unittests/test_time_input.sli
    +++ /dev/null
    @@ -1,96 +0,0 @@
    -/*
    - *  test_time_input.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    -%  Event Timing Test Program:     SLI Input of Time Values
    -%  --------------------------
    -%
    -%  This program is part of a series of test programs verifying the 
    -%  consistency of event timing in the simulation kernel.
    -%  
    -%  Here we check whether the SLI code specification of time 
    -%  values in units of ms works.
    -%
    -%  The expected output is documented at the end of the script.
    -%
    -%  July 2004,
    -%    updated, Diesmann
    -%  February 2004,
    -%    Markus Diesmann
    -%    Marc-Oliver Gewaltig
    -%    Hans Ekkehard Plesser
    -
    -
    -(unittest) run
    -/unittest using
    -
    -<< 
    -      /local_num_threads 1 
    -      /resolution 0.1       % in ms
    -     >> SetKernelStatus
    -  
    - /dc_generator Create /dg Set
    -
    -[1.8 2.8] dup
    -{
    - << >> begin
    -  /s Set
    -  dg << /start  s  >> SetStatus  
    -  dg /start get
    -  cvs cvd
    - end
    -} Map 
    -sub { abs } Map Plus  
    -0.0 eq assert_or_die
    -
    -endusing
    -
    -
    -
    -
    -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
    -%
    -% Expected output of this program:
    -% 
    -% The expected output probably is that the value of /start remains
    -% equal to the specified value at least to the accuracy of the time
    -% base of the simulation kernel 
    -% (not the current computation step size).
    -% 
    -% Program 
    -%      test_iaf_dc_aligned.sli
    -% is an application exhibiting the problem
    -%
    -%  output              desired output
    -%              
    -%  1.800000e+00        1.8
    -%  2.799000e+00        2.8
    -%
    -%  checking version of 3.3.2004, MD
    -%
    -%  1.800000e+00
    -%  2.800000e+00
    -%     ok.
    -%
    -%
    -
    -
    diff --git a/testsuite/unittests/test_tsodyks_depressing.sli b/testsuite/unittests/test_tsodyks_depressing.sli
    deleted file mode 100644
    index afbbfe7708..0000000000
    --- a/testsuite/unittests/test_tsodyks_depressing.sli
    +++ /dev/null
    @@ -1,200 +0,0 @@
    -/*
    - *  test_tsodyks_depressing.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: test_tsodyks_depressing - SLI script for overall test of Tsodyks synapse models
    -
    -Synopsis:(test_tsodyks_depressing) run -> compare cout with comments in file
    -
    -Description:
    -Script to test Tsodyks short term plasticity depressing synapses according to
    -'Neural Networks with Dynamic Synapses'
    -Misha Tsodyks, Klaus Pawelzik, Henry Markram
    -Neural computation 10, 821--853 (1998)
    -
    -Reproduces figure 1 A
    -
    -Revised by Hans Ekkehard Plesser 2016 using explicit input spike train.
    -
    -Author:  Markus Diesmann, Moritz Helias
    -FirstVersion: March 2006
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% -------
    -%
    -% Expected solution
    -%
    -% -------
    -
    -/vm_expected
    -[
    -  [25 0]
    -  [50 0]
    -  [75 0]
    -  [100 2.401350000000000e+00]
    -  [125 5.302440000000000e+00]
    -  [150 4.108330000000000e+00]
    -  [175 4.322170000000000e+00]
    -  [200 3.053390000000000e+00]
    -  [225 2.871240000000000e+00]
    -  [250 2.028640000000000e+00]
    -  [275 1.908020000000000e+00]
    -  [300 1.396960000000000e+00]
    -  [325 1.375850000000000e+00]
    -  [350 1.057780000000000e+00]
    -  [375 1.103490000000000e+00]
    -  [400 8.865690000000001e-01]
    -  [425 9.693530000000000e-01]
    -  [450 8.028760000000000e-01]
    -  [475 9.046710000000000e-01]
    -  [500 7.626880000000000e-01]
    -  [525 8.738550000000000e-01]
    -  [550 7.435880000000000e-01]
    -  [575 8.592780000000000e-01]
    -  [600 7.345670000000000e-01]
    -  [625 8.524119999999999e-01]
    -  [650 7.303210000000000e-01]
    -  [675 8.491860000000000e-01]
    -  [700 7.283280000000000e-01]
    -  [725 8.476730000000000e-01]
    -  [750 7.273930000000000e-01]
    -  [775 8.469640000000001e-01]
    -  [800 7.269550000000000e-01]
    -  [825 8.466320000000001e-01]
    -  [850 7.267500000000000e-01]
    -  [875 8.464760000000000e-01]
    -  [900 7.266540000000000e-01]
    -  [925 8.464030000000000e-01]
    -  [950 7.266089999999999e-01]
    -  [975 8.463690000000000e-01]
    -  [1000 7.265880000000000e-01]
    -  [1025 8.463530000000000e-01]
    -  [1050 7.265779999999999e-01]
    -  [1075 8.463460000000000e-01]
    -  [1100 4.531260000000000e-01]
    -  [1125 2.425410000000000e-01]
    -  [1150 1.298230000000000e-01]
    -  [1175 6.948920000000000e-02]
    -]
    -def
    -
    -% ---------
    -% Model parameters
    -% ---------
    -
    -/local_num_threads 1 def
    -/h 0.1 def
    -
    -/Tau 40.0 def        % membrane time constant
    -/Theta 15.0 def      % threshold
    -/E_L 0.0 def         % reset potential of Vm
    -/R 1.0 def
    -/C Tau R div def     % Tau [ms] / 1.0 GOhm in NEST units
    -/TauR 2.0 def        % refractory time
    -/Tau_psc 3.0 def     % time constant of PSC (=Tau_inact)
    -/Tau_rec 800.0 def   % recovery time
    -/Tau_fac 0.0 def     % facilitation time: 0 == no facilitation
    -/U 0.5 def           % facilitation parameter U
    -/A 250.0 def         % PSC weight in pA
    -
    -/input_train 
    -[
    -    98.0             % first spike [ms]
    -  1048.0             % last spike [ms]
    -    50.0             % interspike interval [ms]
    -] Range def
    -
    -/T_sim 1200. def     % simulation time [ms]     
    -
    -% ---------
    -
    -[/tsodyks_synapse /tsodyks_synapse_hom] 
    -{
    -  /synapse_model Set
    -
    -  ResetKernel      % clear all existing network elements
    -
    -  
    -  % set resolution and limits on delays
    -  % limits must be set BEFORE connecting any elements
    -  <<
    -    /resolution h
    -    /local_num_threads local_num_threads
    -  >> SetKernelStatus
    -
    -  /sg /spike_generator << /spike_times input_train >> Create def
    -  /pn /parrot_neuron Create def
    -  
    -  /neuron 
    -    /iaf_psc_exp_htum
    -    << /tau_m Tau
    -       /t_ref_tot TauR
    -       /t_ref_abs TauR
    -       /tau_syn_ex Tau_psc
    -       /tau_syn_in Tau_psc
    -       /C_m C
    -       /V_reset E_L
    -       /E_L E_L
    -       /V_th Theta
    -       /V_m E_L >>
    -  Create def
    -
    -  /vm 
    -    /voltmeter 
    -    << /interval 25.0 >>
    -  Create def
    -
    -  synapse_model 
    -  << /tau_psc Tau_psc 
    -     /tau_rec Tau_rec
    -  	 /tau_fac Tau_fac
    -  	 /U U
    -  	 /delay 0.1
    -  	 /weight A
    -  	 /u 0.0
    -  	 /x 1.0
    -  >> SetDefaults
    -
    -  sg pn Connect   % pn required, devices cannot project to plastic synapses
    -  pn neuron << >> synapse_model Connect
    -  vm neuron Connect
    -
    -  T_sim Simulate
    -
    -  % compare results to expected voltage trace
    -  vm [/events [/times /V_m]] get cva
    -  6 ToUnitTestPrecision
    -  Transpose /vm_sim Set  % array of recorded data
    -
    -  % to print to screen
    -  vm_sim {
    -    ==	  
    -  } forall
    -
    -  vm_sim vm_expected eq assert_or_die
    -
    -} forall % tsodyks models
    -
    -endusing % unittest
    diff --git a/testsuite/unittests/test_tsodyks_facilitating.sli b/testsuite/unittests/test_tsodyks_facilitating.sli
    deleted file mode 100644
    index 6d7b8ea7b7..0000000000
    --- a/testsuite/unittests/test_tsodyks_facilitating.sli
    +++ /dev/null
    @@ -1,200 +0,0 @@
    -/*
    - *  test_tsodyks_facilitating.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    - /** @BeginDocumentation
    -Name: test_tsodyks_facilitating - SLI script for overall test of Tsodyks synapse models
    -
    -Synopsis:(test_tsodyks_facilitating) run -> compare cout with comments in file
    -
    -Description:
    -Script to test Tsodyks short term plasticity facilitating synapses according to
    -'Neural Networks with Dynamic Synapses'
    -Misha Tsodyks, Klaus Pawelzik, Henry Markram
    -Neural computation 10, 821--853 (1998)
    -
    -Reproduces figure 1 B, (C)
    -
    -Revised by Hans Ekkehard Plesser 2016 using explicit input spike train.
    -
    -Author:  Markus Diesmann, Moritz Helias
    -FirstVersion: March 2006
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -% -------
    -%
    -% Expected solution
    -%
    -% -------
    -
    -/vm_expected
    -[
    -[25 0]
    -[50 0]
    -[75 0]
    -[100 4.739750000000000e-01]
    -[125 7.706030000000000e-01]
    -[150 1.297120000000000e+00]
    -[175 1.757990000000000e+00]
    -[200 2.114420000000000e+00]
    -[225 2.714490000000000e+00]
    -[250 2.785530000000000e+00]
    -[275 3.546150000000000e+00]
    -[300 3.272710000000000e+00]
    -[325 4.233240000000000e+00]
    -[350 3.583070000000000e+00]
    -[375 4.788130000000000e+00]
    -[400 3.739560000000000e+00]
    -[425 5.233850000000000e+00]
    -[450 3.767230000000000e+00]
    -[475 5.593890000000000e+00]
    -[500 3.687720000000000e+00]
    -[525 5.888270000000000e+00]
    -[550 3.881790000000000e+00]
    -[575 6.132580000000000e+00]
    -[600 4.042850000000000e+00]
    -[625 6.338430000000000e+00]
    -[650 4.178550000000000e+00]
    -[675 6.514250000000000e+00]
    -[700 4.294460000000000e+00]
    -[725 6.666160000000000e+00]
    -[750 4.394600000000000e+00]
    -[775 6.798620000000000e+00]
    -[800 4.481930000000000e+00]
    -[825 6.914990000000000e+00]
    -[850 4.558640000000000e+00]
    -[875 7.017830000000000e+00]
    -[900 4.626440000000000e+00]
    -[925 7.109160000000000e+00]
    -[950 4.686650000000000e+00]
    -[975 7.190620000000000e+00]
    -[1000 4.740350000000000e+00]
    -[1025 7.263560000000000e+00]
    -[1050 4.788430000000000e+00]
    -[1075 7.329110000000000e+00]
    -[1100 4.831650000000000e+00]
    -[1125 3.185220000000000e+00]
    -[1150 2.099830000000000e+00]
    -[1175 1.384290000000000e+00]
    -]
    -def
    -
    -% ---------
    -% Model parameters
    -% ---------
    -
    -/local_num_threads 1 def
    -/h 0.1 def
    -
    -/Tau 60.0 def        % membrane time constant
    -/Theta 15.0 def      % threshold
    -/E_L 0.0 def         % reset potential of Vm
    -/R 1.0 def
    -/C Tau R div def     % Tau [ms] / 1.0 GOhm in NEST units
    -/TauR 2.0 def        % refractory time
    -/Tau_psc 1.5 def     % time constant of PSC (=Tau_inact)
    -/Tau_rec 130.0 def   % recovery time
    -/Tau_fac 530.0 def   % facilitation time
    -/U 0.03 def          % facilitation parameter U
    -/A 1540.0 def        % PSC weight in pA
    -
    -/input_train 
    -[
    -    98.1             % first spike [ms]
    -  1050.0             % last spike [ms]
    -    50.1             % interspike interval [ms]
    -] Range def
    -
    -/T_sim 1200. def     % simulation time [ms]     
    -
    -% ---------
    -
    -[/tsodyks_synapse /tsodyks_synapse_hom] 
    -{
    -  /synapse_model Set
    -
    -  ResetKernel      % clear all existing network elements
    -
    -  
    -  % set resolution and limits on delays
    -  % limits must be set BEFORE connecting any elements
    -  <<
    -    /resolution h
    -    /local_num_threads local_num_threads
    -  >> SetKernelStatus
    -
    -  /sg /spike_generator << /spike_times input_train >> Create def
    -  /pn /parrot_neuron Create def
    -  
    -  /neuron 
    -    /iaf_psc_exp_htum
    -    << /tau_m Tau
    -       /t_ref_tot TauR
    -       /t_ref_abs TauR
    -       /tau_syn_ex Tau_psc
    -       /tau_syn_in Tau_psc
    -       /C_m C
    -       /V_reset E_L
    -       /E_L E_L
    -       /V_th Theta
    -       /V_m E_L >>
    -  Create def
    -
    -  /vm 
    -    /voltmeter 
    -    << /interval 25.0 >>
    -  Create def
    -
    -  synapse_model 
    -  << /tau_psc Tau_psc 
    -     /tau_rec Tau_rec
    -  	 /tau_fac Tau_fac
    -  	 /U U
    -  	 /delay 0.1
    -  	 /weight A
    -  	 /u 0.0
    -  	 /x 1.0
    -  >> SetDefaults
    -
    -  sg pn Connect   % pn required, devices cannot project to plastic synapses
    -  pn neuron << >> synapse_model Connect
    -  vm neuron Connect
    -
    -  T_sim Simulate
    -
    -  % compare results to expected voltage trace
    -  vm [/events [/times /V_m]] get cva
    -  6 ToUnitTestPrecision
    -  Transpose /vm_sim Set  % array of recorded data
    -
    -  % to print to screen
    -  vm_sim {
    -    ==	  
    -  } forall
    -
    -  vm_sim vm_expected eq assert_or_die
    -
    -} forall % tsodyks models
    -
    -endusing % unittest
    diff --git a/testsuite/unittests/test_two_devices.sli b/testsuite/unittests/test_two_devices.sli
    deleted file mode 100644
    index 14a9bee71d..0000000000
    --- a/testsuite/unittests/test_two_devices.sli
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    - *  test_two_devices.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -/* Testscript 
    -  
    -
    -tests for the correctness of calibration to the new 
    -resolution after kernel reset. In particular the 
    -correct calculation of the default delay and consequently
    -also the mindelay.
    -Using this test the problem described in ticket #164 which
    -is connected to the solution of #120 was investigated 
    -and fixed.
    -
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -
    -/Transmission
    -{
    - /d Set
    -
    -0.01 /h Set
    -
    -3.0 /T Set 
    -
    -ResetKernel
    -
    -d SetKernelStatus
    -<< /resolution h >> SetKernelStatus
    -
    -/spike_recorder Create /sp Set   
    - 
    -/poisson_generator_ps Create /pn Set
    -pn << /rate 10000.0 >> SetStatus
    -
    -pn sp Connect
    -
    -T Simulate 
    -
    -sp [/events /times ] get cva length
    -
    -} def
    -
    -<< /local_num_threads 1 >> Transmission
    -<<                      >> Transmission
    -eq
    -
    -
    -assert_or_die
    diff --git a/testsuite/unittests/test_voltmeter_reset.sli b/testsuite/unittests/test_voltmeter_reset.sli
    deleted file mode 100644
    index 702ddbefe3..0000000000
    --- a/testsuite/unittests/test_voltmeter_reset.sli
    +++ /dev/null
    @@ -1,76 +0,0 @@
    -/*
    - *  test_voltmeter_reset.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    - /** @BeginDocumentation
    -Name: testsuite::test_voltmeter_reset - test if resetting works on voltmeter
    -
    -Synopsis: (test_voltmeter_reset) run -> dies if assertion fails
    -
    -Description:
    -  The voltmeter records from iaf_psc_alpha to memory, checks if proper number
    -  of data points is acquired, deleted on reset, and recorded again on further
    -  simulation. This test ascertains that also data stored in the derived recorder
    -  class, not only in RecordingDevice, is reset.
    -
    -Author: August 2008, Plesser
    -SeeAlso: multimeter, testsuite::test_spike_det_reset
    -*/
    -
    -(unittest) run
    -/unittest using
    -
    -{
    -  ResetKernel
    -
    -  /iaf_psc_alpha Create /n Set
    -
    -  /voltmeter Create /vm Set
    -  vm << /interval 1.0 >> SetStatus
    -
    -  vm n Connect
    -
    -  /res [] def  % array to collect bool results
    -
    -  10.5 Simulate  % should record voltage at 1, 2, ..., 10
    -  vm [ /n_events ] get                      10 eq res exch append /res Set
    -  vm [ /events /V_m ] get cva length 10 eq res exch append /res Set
    -  vm [ /events /times   ]    get cva length 10 eq res exch append /res Set
    -  
    -  % reset
    -  vm << /n_events 0 >> SetStatus
    -  vm [ /n_events ] get                      0 eq res exch append /res Set
    -  vm [ /events /V_m ] get cva length 0 eq res exch append /res Set
    -  vm [ /events /times   ]    get cva length 0 eq res exch append /res Set
    -
    -  % simulate more
    -  5 Simulate % should record voltage at 11, ..., 15 
    -  vm [ /n_events ] get                      5 eq res exch append /res Set
    -  vm [ /events /V_m ] get cva length 5 eq res exch append /res Set
    -  vm [ /events /times   ] get cva length    5 eq res exch append /res Set
    -
    -  % combine results
    -  res First res Rest { and } Fold
    -
    -} assert_or_die
    -
    -endusing
    diff --git a/testsuite/unittests/test_weight_delay.sli b/testsuite/unittests/test_weight_delay.sli
    deleted file mode 100644
    index 35083acdcd..0000000000
    --- a/testsuite/unittests/test_weight_delay.sli
    +++ /dev/null
    @@ -1,229 +0,0 @@
    -/*
    - *  test_weight_delay.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% this tests checks if weights and delays can be set to
    -% arbitrary values within the limits set by resolution
    -%
    -% It creates a grid with a single row and uses linear functions for weights and delays
    -% Expected weights are 1., 0.98, 0.96, 0.94, 0.92, 0.90, 0.88, 0.86, 0.84, 0.82
    -% Expected delays with resolution 0.04 are 1.0 0.96 0.96 0.92 0.92 0.88 0.84
    -
    -/layer << /shape [ 10 1 ]
    -          /extent [10. 1.]
    -          /center [0. 0.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -<< /constant << /value 1.0 >> >> CreateParameter
    -<< /constant << /value -0.02 >> >> CreateParameter
    -<< /distance << >> >> CreateParameter
    -mul add /linear_parameter Set
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask    << /grid << /shape [ 10 1 ] >> /anchor [ 0 0 ] >>
    -          /weight linear_parameter
    -          /delay  linear_parameter
    -       >> def
    -
    -% required to make sure that resolution goes into userdict
    -userdict begin
    -  /resolution 0.04 def
    -end
    -
    -/source_layer_ref
    -[
    - [1 -4.5 0]
    - [2 -3.5 0]
    - [3 -2.5 0]
    - [4 -1.5 0]
    - [5 -0.5 0]
    - [6 0.5 0]
    - [7 1.5 0]
    - [8 2.5 0]
    - [9 3.5 0]
    - [10 4.5 0]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [11 -4.5 0]
    - [12 -3.5 0]
    - [13 -2.5 0]
    - [14 -1.5 0]
    - [15 -0.5 0]
    - [16 0.5 0]
    - [17 1.5 0]
    - [18 2.5 0]
    - [19 3.5 0]
    - [20 4.5 0]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 11 1 1 0 0]
    - [1 12 0.98 1 1 0]
    - [1 13 0.96 0.96 2 0]
    - [1 14 0.94 0.96 3 0]
    - [1 15 0.92 0.92 4 0]
    - [1 16 0.9 0.92 -5 0]
    - [1 17 0.92 0.92 -4 0]
    - [1 18 0.94 0.96 -3 0]
    - [1 19 0.96 0.96 -2 0]
    - [1 20 0.98 1 -1 0]
    - [2 11 0.98 1 -1 0]
    - [2 12 1 1 0 0]
    - [2 13 0.98 1 1 0]
    - [2 14 0.96 0.96 2 0]
    - [2 15 0.94 0.96 3 0]
    - [2 16 0.92 0.92 4 0]
    - [2 17 0.9 0.92 -5 0]
    - [2 18 0.92 0.92 -4 0]
    - [2 19 0.94 0.96 -3 0]
    - [2 20 0.96 0.96 -2 0]
    - [3 11 0.96 0.96 -2 0]
    - [3 12 0.98 1 -1 0]
    - [3 13 1 1 0 0]
    - [3 14 0.98 1 1 0]
    - [3 15 0.96 0.96 2 0]
    - [3 16 0.94 0.96 3 0]
    - [3 17 0.92 0.92 4 0]
    - [3 18 0.9 0.92 -5 0]
    - [3 19 0.92 0.92 -4 0]
    - [3 20 0.94 0.96 -3 0]
    - [4 11 0.94 0.96 -3 0]
    - [4 12 0.96 0.96 -2 0]
    - [4 13 0.98 1 -1 0]
    - [4 14 1 1 0 0]
    - [4 15 0.98 1 1 0]
    - [4 16 0.96 0.96 2 0]
    - [4 17 0.94 0.96 3 0]
    - [4 18 0.92 0.92 4 0]
    - [4 19 0.9 0.92 -5 0]
    - [4 20 0.92 0.92 -4 0]
    - [5 11 0.92 0.92 -4 0]
    - [5 12 0.94 0.96 -3 0]
    - [5 13 0.96 0.96 -2 0]
    - [5 14 0.98 1 -1 0]
    - [5 15 1 1 0 0]
    - [5 16 0.98 1 1 0]
    - [5 17 0.96 0.96 2 0]
    - [5 18 0.94 0.96 3 0]
    - [5 19 0.92 0.92 4 0]
    - [5 20 0.9 0.92 -5 0]
    - [6 11 0.9 0.92 -5 0]
    - [6 12 0.92 0.92 -4 0]
    - [6 13 0.94 0.96 -3 0]
    - [6 14 0.96 0.96 -2 0]
    - [6 15 0.98 1 -1 0]
    - [6 16 1 1 0 0]
    - [6 17 0.98 1 1 0]
    - [6 18 0.96 0.96 2 0]
    - [6 19 0.94 0.96 3 0]
    - [6 20 0.92 0.92 4 0]
    - [7 11 0.92 0.92 4 0]
    - [7 12 0.9 0.92 -5 0]
    - [7 13 0.92 0.92 -4 0]
    - [7 14 0.94 0.96 -3 0]
    - [7 15 0.96 0.96 -2 0]
    - [7 16 0.98 1 -1 0]
    - [7 17 1 1 0 0]
    - [7 18 0.98 1 1 0]
    - [7 19 0.96 0.96 2 0]
    - [7 20 0.94 0.96 3 0]
    - [8 11 0.94 0.96 3 0]
    - [8 12 0.92 0.92 4 0]
    - [8 13 0.9 0.92 -5 0]
    - [8 14 0.92 0.92 -4 0]
    - [8 15 0.94 0.96 -3 0]
    - [8 16 0.96 0.96 -2 0]
    - [8 17 0.98 1 -1 0]
    - [8 18 1 1 0 0]
    - [8 19 0.98 1 1 0]
    - [8 20 0.96 0.96 2 0]
    - [9 11 0.96 0.96 2 0]
    - [9 12 0.94 0.96 3 0]
    - [9 13 0.92 0.92 4 0]
    - [9 14 0.9 0.92 -5 0]
    - [9 15 0.92 0.92 -4 0]
    - [9 16 0.94 0.96 -3 0]
    - [9 17 0.96 0.96 -2 0]
    - [9 18 0.98 1 -1 0]
    - [9 19 1 1 0 0]
    - [9 20 0.98 1 1 0]
    - [10 11 0.98 1 1 0]
    - [10 12 0.96 0.96 2 0]
    - [10 13 0.94 0.96 3 0]
    - [10 14 0.92 0.92 4 0]
    - [10 15 0.9 0.92 -5 0]
    - [10 16 0.92 0.92 -4 0]
    - [10 17 0.94 0.96 -3 0]
    - [10 18 0.96 0.96 -2 0]
    - [10 19 0.98 1 -1 0]
    - [10 20 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -userdict /resolution known { << /resolution resolution >> SetKernelStatus } if
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_weight_delay_free.sli b/testsuite/unittests/test_weight_delay_free.sli
    deleted file mode 100644
    index f0eaa9c54e..0000000000
    --- a/testsuite/unittests/test_weight_delay_free.sli
    +++ /dev/null
    @@ -1,231 +0,0 @@
    -/*
    - *  test_weight_delay_free.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -% this tests checks if weights and delays can be set to
    -% arbitrary values within the limits set by resolution
    -%
    -% It creates a grid with a single row and uses linear functions for weights and delays
    -% Expected weights are 1., 0.98, 0.96, 0.94, 0.92, 0.90, 0.88, 0.86, 0.84, 0.82
    -% Expected delays with resolution 0.04 are 1.0 0.96 0.96 0.92 0.92 0.88 0.84
    -
    -[ -4.5 4.5 1.0 ] Range
    -{ 0.0 2 arraystore } Map /pos Set
    -
    -/layer << /positions pos
    -          /extent [10. 1.]
    -          /edge_wrap true
    -          /elements /iaf_psc_alpha
    -        >> def
    -
    -/src_layer layer def
    -/tgt_layer layer def
    -
    -<< /constant << /value 1.0 >> >> CreateParameter
    -<< /constant << /value -0.02 >> >> CreateParameter
    -<< /distance << >> >> CreateParameter
    -mul add /linear_parameter Set
    -
    -/conns << /connection_type (pairwise_bernoulli_on_target)
    -          /mask    << /rectangular << /lower_left [ -0.5 -0.5 ] /upper_right [ 9.5 0.5 ] >> >>
    -          /weight linear_parameter
    -          /delay  linear_parameter
    -       >> def
    -
    -% required to make sure that resolution goes into userdict
    -userdict begin
    -  /resolution 0.04 def
    -end
    -
    -/source_layer_ref
    -[
    - [1 -4.5 0]
    - [2 -3.5 0]
    - [3 -2.5 0]
    - [4 -1.5 0]
    - [5 -0.5 0]
    - [6 0.5 0]
    - [7 1.5 0]
    - [8 2.5 0]
    - [9 3.5 0]
    - [10 4.5 0]
    -]
    -def
    -
    -/target_layer_ref
    -[
    - [11 -4.5 0]
    - [12 -3.5 0]
    - [13 -2.5 0]
    - [14 -1.5 0]
    - [15 -0.5 0]
    - [16 0.5 0]
    - [17 1.5 0]
    - [18 2.5 0]
    - [19 3.5 0]
    - [20 4.5 0]
    -]
    -def
    -
    -/conn_ref
    -[
    - [1 11 1 1 0 0]
    - [1 12 0.98 1 1 0]
    - [1 13 0.96 0.96 2 0]
    - [1 14 0.94 0.96 3 0]
    - [1 15 0.92 0.92 4 0]
    - [1 16 0.9 0.92 -5 0]
    - [1 17 0.92 0.92 -4 0]
    - [1 18 0.94 0.96 -3 0]
    - [1 19 0.96 0.96 -2 0]
    - [1 20 0.98 1 -1 0]
    - [2 11 0.98 1 -1 0]
    - [2 12 1 1 0 0]
    - [2 13 0.98 1 1 0]
    - [2 14 0.96 0.96 2 0]
    - [2 15 0.94 0.96 3 0]
    - [2 16 0.92 0.92 4 0]
    - [2 17 0.9 0.92 -5 0]
    - [2 18 0.92 0.92 -4 0]
    - [2 19 0.94 0.96 -3 0]
    - [2 20 0.96 0.96 -2 0]
    - [3 11 0.96 0.96 -2 0]
    - [3 12 0.98 1 -1 0]
    - [3 13 1 1 0 0]
    - [3 14 0.98 1 1 0]
    - [3 15 0.96 0.96 2 0]
    - [3 16 0.94 0.96 3 0]
    - [3 17 0.92 0.92 4 0]
    - [3 18 0.9 0.92 -5 0]
    - [3 19 0.92 0.92 -4 0]
    - [3 20 0.94 0.96 -3 0]
    - [4 11 0.94 0.96 -3 0]
    - [4 12 0.96 0.96 -2 0]
    - [4 13 0.98 1 -1 0]
    - [4 14 1 1 0 0]
    - [4 15 0.98 1 1 0]
    - [4 16 0.96 0.96 2 0]
    - [4 17 0.94 0.96 3 0]
    - [4 18 0.92 0.92 4 0]
    - [4 19 0.9 0.92 -5 0]
    - [4 20 0.92 0.92 -4 0]
    - [5 11 0.92 0.92 -4 0]
    - [5 12 0.94 0.96 -3 0]
    - [5 13 0.96 0.96 -2 0]
    - [5 14 0.98 1 -1 0]
    - [5 15 1 1 0 0]
    - [5 16 0.98 1 1 0]
    - [5 17 0.96 0.96 2 0]
    - [5 18 0.94 0.96 3 0]
    - [5 19 0.92 0.92 4 0]
    - [5 20 0.9 0.92 -5 0]
    - [6 11 0.9 0.92 -5 0]
    - [6 12 0.92 0.92 -4 0]
    - [6 13 0.94 0.96 -3 0]
    - [6 14 0.96 0.96 -2 0]
    - [6 15 0.98 1 -1 0]
    - [6 16 1 1 0 0]
    - [6 17 0.98 1 1 0]
    - [6 18 0.96 0.96 2 0]
    - [6 19 0.94 0.96 3 0]
    - [6 20 0.92 0.92 4 0]
    - [7 11 0.92 0.92 4 0]
    - [7 12 0.9 0.92 -5 0]
    - [7 13 0.92 0.92 -4 0]
    - [7 14 0.94 0.96 -3 0]
    - [7 15 0.96 0.96 -2 0]
    - [7 16 0.98 1 -1 0]
    - [7 17 1 1 0 0]
    - [7 18 0.98 1 1 0]
    - [7 19 0.96 0.96 2 0]
    - [7 20 0.94 0.96 3 0]
    - [8 11 0.94 0.96 3 0]
    - [8 12 0.92 0.92 4 0]
    - [8 13 0.9 0.92 -5 0]
    - [8 14 0.92 0.92 -4 0]
    - [8 15 0.94 0.96 -3 0]
    - [8 16 0.96 0.96 -2 0]
    - [8 17 0.98 1 -1 0]
    - [8 18 1 1 0 0]
    - [8 19 0.98 1 1 0]
    - [8 20 0.96 0.96 2 0]
    - [9 11 0.96 0.96 2 0]
    - [9 12 0.94 0.96 3 0]
    - [9 13 0.92 0.92 4 0]
    - [9 14 0.9 0.92 -5 0]
    - [9 15 0.92 0.92 -4 0]
    - [9 16 0.94 0.96 -3 0]
    - [9 17 0.96 0.96 -2 0]
    - [9 18 0.98 1 -1 0]
    - [9 19 1 1 0 0]
    - [9 20 0.98 1 1 0]
    - [10 11 0.98 1 1 0]
    - [10 12 0.96 0.96 2 0]
    - [10 13 0.94 0.96 3 0]
    - [10 14 0.92 0.92 4 0]
    - [10 15 0.9 0.92 -5 0]
    - [10 16 0.92 0.92 -4 0]
    - [10 17 0.94 0.96 -3 0]
    - [10 18 0.96 0.96 -2 0]
    - [10 19 0.98 1 -1 0]
    - [10 20 1 1 0 0]
    -]
    -def
    -
    -(unittest) run
    -/unittest using
    -
    -ResetKernel
    -
    -<< /sort_connections_by_source false /use_compressed_spikes false >> SetKernelStatus
    -
    -userdict /resolution known { << /resolution resolution >> SetKernelStatus } if
    -
    -/sources src_layer CreateLayer def
    -/targets tgt_layer CreateLayer def
    -
    -sources targets conns ConnectLayers
    -
    -/sources_oss osstream ; def
    -/targets_oss osstream ; def
    -/sources_conns_oss osstream ; def
    -
    -sources_oss sources DumpLayerNodes ;
    -targets_oss targets DumpLayerNodes ;
    -sources_conns_oss sources targets /static_synapse DumpLayerConnections ;
    -
    -/source_layer_result sources_oss str cst 3 Partition def
    -/target_layer_result targets_oss str cst 3 Partition def
    -/conn_result sources_conns_oss str cst 6 Partition def
    -
    -{
    -  source_layer_ref source_layer_result eq
    -} assert_or_die
    -
    -{
    -  target_layer_ref target_layer_result eq
    -} assert_or_die
    -
    -{
    -  conn_ref conn_result eq
    -} assert_or_die
    -
    diff --git a/testsuite/unittests/test_wfr_settings.sli b/testsuite/unittests/test_wfr_settings.sli
    deleted file mode 100644
    index feace71b40..0000000000
    --- a/testsuite/unittests/test_wfr_settings.sli
    +++ /dev/null
    @@ -1,144 +0,0 @@
    -/*
    - *  test_wfr_settings.sli
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -  /** @BeginDocumentation
    -
    -    Name: testsuite::test_wfr_settings - Tests the possible settings for the waveform relaxation method
    -
    -    Synopsis: (test_wfr_settings) run -> NEST exits if test fails
    -
    -    Description:
    -    The waveform relaxation method is used for iterative solution when connections
    -    without delay are present (e.g. gap junctions)
    -    
    -    This test ensures that 
    -    - use_wfr can only be set before nodes are created
    -    - wfr_comm_interval can only be set greater or equal the resolution and if use_wfr = true
    -    - setting of use_wfr = false sets wfr_comm_interval to resolution
    -    - wfr_comm_interval is updated when resolution is changed and use_wfr = false
    -    - use_wfr is set correctly in created nodes
    -
    -    Author: Jan Hahne, March 2016
    -    SeeAlso: testsuite::test_hh_psc_alpha_gap, hh_psc_alpha_gap, gap_junction
    -  */
    -
    -(unittest) run
    -/unittest using
    -
    -M_ERROR setverbosity
    -
    -ResetKernel
    -
    -% Check if use_wfr can be set
    -{
    -  << /use_wfr false >> SetKernelStatus
    -} pass_or_die
    -
    -% Check that use_wfr cannot be set after nodes are created
    -{
    -  /iaf_psc_alpha Create
    -  << /use_wfr true >> SetKernelStatus
    -} fail_or_die
    -
    -ResetKernel
    -<< /use_wfr true >> SetKernelStatus
    -
    -% Check that wfr_comm_interval cannot be set lower as the resolution
    -{
    -  << /resolution 0.1 >> SetKernelStatus
    -  << /wfr_comm_interval 0.05 >> SetKernelStatus
    -} fail_or_die
    -
    -ResetKernel
    -
    -% Check that wfr_comm_interval cannot be set if use_wfr = false
    -{
    -  << /use_wfr false >> SetKernelStatus
    -  << /wfr_comm_interval 0.5 >> SetKernelStatus
    -} fail_or_die
    -
    -ResetKernel
    -<< /use_wfr true >> SetKernelStatus
    -<< /wfr_comm_interval 0.5 >> SetKernelStatus
    -
    -% Check that wfr_comm_interval is set to resolution if use_wfr = false is set
    -<< /resolution 0.1
    -     /use_wfr false
    -  >> SetKernelStatus
    -
    -GetKernelStatus /wfr_comm_interval get /wfr_comm Set  
    -
    -{wfr_comm 0.1 eq}assert_or_die
    -
    -
    -% Check that wfr_comm_interval is updated with resolution if use_wfr = false
    -<< /resolution 0.2 >> SetKernelStatus
    -
    -GetKernelStatus /wfr_comm_interval get /wfr_comm Set  
    -
    -{wfr_comm 0.2 eq}assert_or_die
    -
    -ResetKernel
    -
    -% Check that wfr_comm_interval is not updated with resolution if use_wfr = true
    -<< /use_wfr true
    -     /wfr_comm_interval 2.0
    -  >> SetKernelStatus
    -
    -<< /resolution 0.1 >> SetKernelStatus  
    -  
    -GetKernelStatus /wfr_comm_interval get /wfr_comm Set  
    -
    -{wfr_comm 2.0 eq}assert_or_die
    -
    -% The now following test needs the model hh_psc_alpha_gap, so
    -% this test should only run if we have GSL
    -skip_if_without_gsl
    -
    -ResetKernel
    -
    -% Check that setting of use_wfr is correctly set in created nodes
    -% case use_wfr = true
    -<< /use_wfr true >> SetKernelStatus
    -
    -/hh_psc_alpha_gap Create /neuron_gap Set
    -
    -5.0 Simulate
    -
    -neuron_gap /node_uses_wfr get /wfr Set
    -
    -{wfr true eq}assert_or_die
    -
    -ResetKernel
    -
    -% case use_wfr = false
    -<< /use_wfr false >> SetKernelStatus
    -
    -/hh_psc_alpha_gap Create /neuron_gap Set
    -
    -5.0 Simulate
    -
    -neuron_gap /node_uses_wfr get /wfr Set
    -
    -{wfr false eq}assert_or_die
    -
    -endusing
    
    From 7e5a79780fa3a2bb56d425275b71122bb7444a3c Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 1 Dec 2022 11:41:43 +0100
    Subject: [PATCH 096/375] Fix formatting
    
    ---
     libnestutil/block_vector.h                    | 18 ++++++---
     libnestutil/dictionary.cpp                    |  2 +-
     .../dictionary_access_flag_manager.cpp        |  4 +-
     libnestutil/dictionary_access_flag_manager.h  |  4 +-
     models/cm_compartmentcurrents.h               |  6 +--
     models/cm_default.cpp                         |  7 ++--
     models/correlation_detector.cpp               |  2 +-
     models/hh_cond_beta_gap_traub.cpp             |  2 +-
     models/ht_neuron.cpp                          |  8 ++--
     models/iaf_cond_alpha_mc.h                    | 18 ++++-----
     models/multimeter.cpp                         |  2 +-
     models/music_cont_out_proxy.cpp               | 12 +++---
     models/music_message_in_proxy.h               |  4 +-
     models/music_rate_in_proxy.h                  |  1 -
     models/pp_cond_exp_mc_urbanczik.h             | 12 +++---
     models/spike_generator.cpp                    |  6 +--
     nestkernel/connection_creator.cpp             |  5 +--
     nestkernel/connection_manager.cpp             | 18 +++++----
     nestkernel/device.cpp                         |  6 +--
     nestkernel/exceptions.cpp                     | 12 +++---
     nestkernel/exceptions.h                       |  8 ++--
     nestkernel/free_layer.h                       |  2 +-
     nestkernel/growth_curve.h                     |  3 +-
     nestkernel/kernel_manager.cpp                 |  4 +-
     nestkernel/layer_impl.h                       |  2 +-
     nestkernel/model_manager.cpp                  |  2 +-
     nestkernel/model_manager_impl.h               |  2 +-
     nestkernel/nest.cpp                           |  6 +--
     nestkernel/nest.h                             |  2 +-
     nestkernel/node_manager.cpp                   |  2 +-
     nestkernel/parameter.cpp                      | 12 ++----
     nestkernel/parameter.h                        | 39 +++++++------------
     nestkernel/random_manager.cpp                 |  3 +-
     nestkernel/recording_backend_memory.cpp       |  6 ++-
     nestkernel/simulation_manager.cpp             |  2 +-
     nestkernel/spatial.h                          |  2 +-
     nestkernel/target_data.h                      |  3 +-
     37 files changed, 120 insertions(+), 129 deletions(-)
    
    diff --git a/libnestutil/block_vector.h b/libnestutil/block_vector.h
    index 2c92a0c83c..519158c2f0 100644
    --- a/libnestutil/block_vector.h
    +++ b/libnestutil/block_vector.h
    @@ -344,7 +344,8 @@ template < typename value_type_ >
     inline BlockVector< value_type_ >::~BlockVector() = default;
     
     template < typename value_type_ >
    -inline value_type_& BlockVector< value_type_ >::operator[]( const size_t pos )
    +inline value_type_&
    +BlockVector< value_type_ >::operator[]( const size_t pos )
     {
       // Using bitwise operations to efficiently map the index to the
       // right block and element.
    @@ -354,7 +355,8 @@ inline value_type_& BlockVector< value_type_ >::operator[]( const size_t pos )
     }
     
     template < typename value_type_ >
    -inline const value_type_& BlockVector< value_type_ >::operator[]( const size_t pos ) const
    +inline const value_type_&
    +BlockVector< value_type_ >::operator[]( const size_t pos ) const
     {
       // Using bitwise operations to efficiently map the index to the
       // right block and element.
    @@ -593,7 +595,8 @@ inline bv_iterator< value_type_, ref_, ptr_ >::bv_iterator( const BlockVector< v
     }
     
     template < typename value_type_, typename ref_, typename ptr_ >
    -inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, ptr_ >::operator++()
    +inline bv_iterator< value_type_, ref_, ptr_ >&
    +bv_iterator< value_type_, ref_, ptr_ >::operator++()
     {
       ++block_it_;
       if ( block_it_ == current_block_end_ )
    @@ -613,7 +616,8 @@ inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, p
     }
     
     template < typename value_type_, typename ref_, typename ptr_ >
    -inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, ptr_ >::operator--()
    +inline bv_iterator< value_type_, ref_, ptr_ >&
    +bv_iterator< value_type_, ref_, ptr_ >::operator--()
     {
       // If we are still within the block, we can just decrement the block iterator.
       // If not, we need to switch to the previous block.
    @@ -639,7 +643,8 @@ inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, p
     }
     
     template < typename value_type_, typename ref_, typename ptr_ >
    -inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, ptr_ >::operator+=( difference_type val )
    +inline bv_iterator< value_type_, ref_, ptr_ >&
    +bv_iterator< value_type_, ref_, ptr_ >::operator+=( difference_type val )
     {
       if ( val < 0 )
       {
    @@ -653,7 +658,8 @@ inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, p
     }
     
     template < typename value_type_, typename ref_, typename ptr_ >
    -inline bv_iterator< value_type_, ref_, ptr_ >& bv_iterator< value_type_, ref_, ptr_ >::operator-=( difference_type val )
    +inline bv_iterator< value_type_, ref_, ptr_ >&
    +bv_iterator< value_type_, ref_, ptr_ >::operator-=( difference_type val )
     {
       if ( val < 0 )
       {
    diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp
    index 42286cf53c..51542e4b30 100644
    --- a/libnestutil/dictionary.cpp
    +++ b/libnestutil/dictionary.cpp
    @@ -22,8 +22,8 @@
     
     #include <algorithm>
     #include <boost/any.hpp>
    -#include <iostream>
     #include <iomanip>
    +#include <iostream>
     #include <map>
     #include <string>
     #include <vector>
    diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp
    index 8cac9794c2..9bb1b82a76 100644
    --- a/libnestutil/dictionary_access_flag_manager.cpp
    +++ b/libnestutil/dictionary_access_flag_manager.cpp
    @@ -39,8 +39,8 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
       std::vector< dictionary::value_type > not_accessed_kv_pairs;
     
       const auto& access_set = access_flags_.at( &dict );
    -  const auto comparator = [&access_set](
    -                            dictionary::value_type kv ) { return access_set.find( kv.first ) == access_set.end(); };
    +  const auto comparator = [ &access_set ]( dictionary::value_type kv )
    +  { return access_set.find( kv.first ) == access_set.end(); };
     
       std::copy_if( dict.begin(), dict.end(), std::back_inserter( not_accessed_kv_pairs ), comparator );
     
    diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h
    index 6bb121d516..e78072eef0 100644
    --- a/libnestutil/dictionary_access_flag_manager.h
    +++ b/libnestutil/dictionary_access_flag_manager.h
    @@ -68,7 +68,7 @@ DictionaryAccessFlagManager::init_access_flags( const dictionary& dict )
     {
     #pragma omp critical( init_access_flags )
       {
    -    access_flags_[&dict ] = {};
    +    access_flags_[ &dict ] = {};
       }
     }
     
    @@ -77,7 +77,7 @@ DictionaryAccessFlagManager::register_access( const dictionary& dict, const key_
     {
     #pragma omp critical( register_access )
       {
    -    access_flags_[&dict ].insert( key );
    +    access_flags_[ &dict ].insert( key );
       }
     }
     
    diff --git a/models/cm_compartmentcurrents.h b/models/cm_compartmentcurrents.h
    index 152e69f816..20c08af17d 100644
    --- a/models/cm_compartmentcurrents.h
    +++ b/models/cm_compartmentcurrents.h
    @@ -477,7 +477,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type] = "AMPA";
    +      dd[ names::receptor_type ] = "AMPA";
           info.push_back( dd );
         }
         // receptor info for GABA synapses
    @@ -485,8 +485,8 @@ class CompartmentCurrents
         {
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
    -      dd[ names::comp_idx] = compartment_index;
    -      dd[ names::receptor_type] = "GABA";
    +      dd[ names::comp_idx ] = compartment_index;
    +      dd[ names::receptor_type ] = "GABA";
           info.push_back( dd );
         }
         // receptor info for NMDA synapses
    diff --git a/models/cm_default.cpp b/models/cm_default.cpp
    index 08b61eea3a..db0fb129ee 100644
    --- a/models/cm_default.cpp
    +++ b/models/cm_default.cpp
    @@ -133,7 +133,7 @@ nest::cm_default::set_status( const dictionary& statusdict )
         else if ( is_type< dictionary >( compartment_data ) )
         {
           // A single compartment is provided, we add add it to the tree
    -      add_compartment_( boost::any_cast< dictionary& >( compartment_data )  );
    +      add_compartment_( boost::any_cast< dictionary& >( compartment_data ) );
         }
         else
         {
    @@ -216,8 +216,7 @@ nest::cm_default::add_receptor_( dictionary& dd )
       Compartment* compartment = c_tree_.get_compartment( compartment_idx );
       if ( dd.known( names::params ) )
       {
    -    compartment->compartment_currents.add_synapse(
    -      receptor_type, syn_idx, dd.get< dictionary >( names::params ) );
    +    compartment->compartment_currents.add_synapse( receptor_type, syn_idx, dd.get< dictionary >( names::params ) );
       }
       else
       {
    @@ -234,7 +233,7 @@ nest::cm_default::init_recordables_pointers_()
        *     voltage (e.g. "v_comp1") or by the synapse index for receptor currents
        * --> values are pointers to the specific state variables
        */
    -  std::map< std::string , double* > recordables = c_tree_.get_recordables();
    +  std::map< std::string, double* > recordables = c_tree_.get_recordables();
     
       for ( auto rec_it = recordables.begin(); rec_it != recordables.end(); rec_it++ )
       {
    diff --git a/models/correlation_detector.cpp b/models/correlation_detector.cpp
    index 5f27ad95ef..2de6e13054 100644
    --- a/models/correlation_detector.cpp
    +++ b/models/correlation_detector.cpp
    @@ -106,7 +106,7 @@ nest::correlation_detector::Parameters_::get( dictionary& d ) const
     void
     nest::correlation_detector::State_::get( dictionary& d ) const
     {
    -  d[ names::n_events ] = n_events_ ;
    +  d[ names::n_events ] = n_events_;
       d[ names::histogram ] = histogram_;
       d[ names::histogram_correction ] = histogram_correction_;
       d[ names::count_histogram ] = count_histogram_;
    diff --git a/models/hh_cond_beta_gap_traub.cpp b/models/hh_cond_beta_gap_traub.cpp
    index 251dd4bfee..744877cedc 100644
    --- a/models/hh_cond_beta_gap_traub.cpp
    +++ b/models/hh_cond_beta_gap_traub.cpp
    @@ -241,7 +241,7 @@ nest::hh_cond_beta_gap_traub::Parameters_::get( dictionary& d ) const
     }
     
     void
    -nest::hh_cond_beta_gap_traub::Parameters_::set( const dictionary& d, Node* node)
    +nest::hh_cond_beta_gap_traub::Parameters_::set( const dictionary& d, Node* node )
     {
       d.update_value( names::g_Na, g_Na );
       d.update_value( names::g_K, g_K );
    diff --git a/models/ht_neuron.cpp b/models/ht_neuron.cpp
    index 8a2d698e12..ebe51a8257 100644
    --- a/models/ht_neuron.cpp
    +++ b/models/ht_neuron.cpp
    @@ -735,10 +735,10 @@ nest::ht_neuron::get_status( dictionary& d ) const
     
       dictionary receptor_type;
     
    -  receptor_type[ names::AMPA ] = static_cast< long >(AMPA);
    -  receptor_type[ names::NMDA ] = static_cast< long >(NMDA);
    -  receptor_type[ names::GABA_A ] = static_cast< long >(GABA_A);
    -  receptor_type[ names::GABA_B ] = static_cast< long >(GABA_B);
    +  receptor_type[ names::AMPA ] = static_cast< long >( AMPA );
    +  receptor_type[ names::NMDA ] = static_cast< long >( NMDA );
    +  receptor_type[ names::GABA_A ] = static_cast< long >( GABA_A );
    +  receptor_type[ names::GABA_B ] = static_cast< long >( GABA_B );
     
       d[ names::receptor_types ] = receptor_type;
       d[ names::recordables ] = recordablesMap_.get_list();
    diff --git a/models/iaf_cond_alpha_mc.h b/models/iaf_cond_alpha_mc.h
    index 7fccfd97be..f3d14fd8fa 100644
    --- a/models/iaf_cond_alpha_mc.h
    +++ b/models/iaf_cond_alpha_mc.h
    @@ -536,17 +536,17 @@ iaf_cond_alpha_mc::get_status( dictionary& d ) const
        * a seg fault on exit, see #328
        */
       dictionary receptor_dict_;
    -  receptor_dict_[ names::soma_exc ] = static_cast< long >(SOMA_EXC);
    -  receptor_dict_[ names::soma_inh ] = static_cast< long >(SOMA_INH);
    -  receptor_dict_[ names::soma_curr ] = static_cast< long >(I_SOMA);
    +  receptor_dict_[ names::soma_exc ] = static_cast< long >( SOMA_EXC );
    +  receptor_dict_[ names::soma_inh ] = static_cast< long >( SOMA_INH );
    +  receptor_dict_[ names::soma_curr ] = static_cast< long >( I_SOMA );
     
    -  receptor_dict_[ names::proximal_exc ] = static_cast< long >(PROX_EXC);
    -  receptor_dict_[ names::proximal_inh ] = static_cast< long >(PROX_INH);
    -  receptor_dict_[ names::proximal_curr ] = static_cast< long >(I_PROX);
    +  receptor_dict_[ names::proximal_exc ] = static_cast< long >( PROX_EXC );
    +  receptor_dict_[ names::proximal_inh ] = static_cast< long >( PROX_INH );
    +  receptor_dict_[ names::proximal_curr ] = static_cast< long >( I_PROX );
     
    -  receptor_dict_[ names::distal_exc ] = static_cast< long >(DIST_EXC);
    -  receptor_dict_[ names::distal_inh ] = static_cast< long >(DIST_INH);
    -  receptor_dict_[ names::distal_curr ] = static_cast< long >(I_DIST);
    +  receptor_dict_[ names::distal_exc ] = static_cast< long >( DIST_EXC );
    +  receptor_dict_[ names::distal_inh ] = static_cast< long >( DIST_INH );
    +  receptor_dict_[ names::distal_curr ] = static_cast< long >( I_DIST );
     
       d[ names::receptor_types ] = receptor_dict_;
     }
    diff --git a/models/multimeter.cpp b/models/multimeter.cpp
    index d40fc6078f..cd003251d6 100644
    --- a/models/multimeter.cpp
    +++ b/models/multimeter.cpp
    @@ -96,7 +96,7 @@ nest::multimeter::Parameters_::get( dictionary& d ) const
       d[ names::interval ] = interval_.get_ms();
       d[ names::offset ] = offset_.get_ms();
     
    -  //JME: Why can't this be done using std::copy?
    +  // JME: Why can't this be done using std::copy?
       std::vector< std::string > ad;
       for ( size_t j = 0; j < record_from_.size(); ++j )
       {
    diff --git a/models/music_cont_out_proxy.cpp b/models/music_cont_out_proxy.cpp
    index 9b765a4cb3..18505d1e63 100644
    --- a/models/music_cont_out_proxy.cpp
    +++ b/models/music_cont_out_proxy.cpp
    @@ -92,12 +92,12 @@ nest::music_cont_out_proxy::Parameters_::get( dictionary& d ) const
       d[ names::port_name ] = port_name_;
       d[ names::interval ] = interval_.get_ms();
     
    -///  std::vector< std::string > record_from;
    -///
    -///  for ( size_t j = 0; j < record_from_.size(); ++j )
    -///  {
    -///    record_from.push_back( record_from_[ j ] );
    -///  }
    +  ///  std::vector< std::string > record_from;
    +  ///
    +  ///  for ( size_t j = 0; j < record_from_.size(); ++j )
    +  ///  {
    +  ///    record_from.push_back( record_from_[ j ] );
    +  ///  }
     
       d[ names::record_from ] = record_from_;
       d[ names::targets ] = targets_;
    diff --git a/models/music_message_in_proxy.h b/models/music_message_in_proxy.h
    index c2f9728dd0..eb9024b651 100644
    --- a/models/music_message_in_proxy.h
    +++ b/models/music_message_in_proxy.h
    @@ -97,8 +97,8 @@ EndUserDocs */
     
     class MsgHandler : public MUSIC::MessageHandler
     {
    -  std::vector< std::string > messages;  //!< The buffer for incoming message
    -  std::vector< double > message_times;  //!< The times for incoming message
    +  std::vector< std::string > messages; //!< The buffer for incoming message
    +  std::vector< double > message_times; //!< The times for incoming message
     
       void
       operator()( double t, void* msg, size_t size )
    diff --git a/models/music_rate_in_proxy.h b/models/music_rate_in_proxy.h
    index 846e9f3404..86062b2f24 100644
    --- a/models/music_rate_in_proxy.h
    +++ b/models/music_rate_in_proxy.h
    @@ -40,7 +40,6 @@
     #include "node.h"
     
     
    -
     /* BeginUserDocs: device, rate, MUSIC
     
     Short description
    diff --git a/models/pp_cond_exp_mc_urbanczik.h b/models/pp_cond_exp_mc_urbanczik.h
    index dfc172bf99..1d03299f15 100644
    --- a/models/pp_cond_exp_mc_urbanczik.h
    +++ b/models/pp_cond_exp_mc_urbanczik.h
    @@ -616,13 +616,13 @@ pp_cond_exp_mc_urbanczik::get_status( dictionary& d ) const
        * a seg fault on exit, see #328
        */
       dictionary receptor_dict_;
    -  receptor_dict_[ names::soma_exc ] = static_cast< long >(SOMA_EXC);
    -  receptor_dict_[ names::soma_inh ] = static_cast< long >(SOMA_INH);
    -  receptor_dict_[ names::soma_curr ] = static_cast< long >(I_SOMA);
    +  receptor_dict_[ names::soma_exc ] = static_cast< long >( SOMA_EXC );
    +  receptor_dict_[ names::soma_inh ] = static_cast< long >( SOMA_INH );
    +  receptor_dict_[ names::soma_curr ] = static_cast< long >( I_SOMA );
     
    -  receptor_dict_[ names::dendritic_exc ] = static_cast< long >(DEND_EXC);
    -  receptor_dict_[ names::dendritic_inh ] = static_cast< long >(DEND_INH);
    -  receptor_dict_[ names::dendritic_curr ] = static_cast< long >(I_DEND);
    +  receptor_dict_[ names::dendritic_exc ] = static_cast< long >( DEND_EXC );
    +  receptor_dict_[ names::dendritic_inh ] = static_cast< long >( DEND_INH );
    +  receptor_dict_[ names::dendritic_curr ] = static_cast< long >( I_DEND );
     
       d[ names::receptor_types ] = receptor_dict_;
     }
    diff --git a/models/spike_generator.cpp b/models/spike_generator.cpp
    index 3ebcf6d696..ceff93a76f 100644
    --- a/models/spike_generator.cpp
    +++ b/models/spike_generator.cpp
    @@ -66,14 +66,14 @@ nest::spike_generator::Parameters_::get( dictionary& d ) const
     
       std::vector< double > times_ms( n_spikes );
       for ( size_t n = 0; n < n_spikes; ++n )
    -  {    
    +  {
         times_ms[ n ] = spike_stamps_[ n ].get_ms();
         if ( precise_times_ )
         {
           times_ms[ n ] -= spike_offsets_[ n ];
         }
       }
    -  
    +
       d[ names::spike_times ] = times_ms;
       d[ names::spike_weights ] = spike_weights_;
       d[ names::spike_multiplicities ] = spike_multiplicities_;
    @@ -126,7 +126,7 @@ nest::spike_generator::Parameters_::assert_valid_spike_time_and_insert_( double
       // when we get here, we know that the spike time is valid and
       // t_spike is the correct time stamp given the chosen options
       spike_stamps_.push_back( t_spike );
    -  
    +
       if ( precise_times_ )
       {
         // t_spike is created with ms_stamp() that aligns the time to the next
    diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp
    index 8f2b9d54d0..925074b11d 100644
    --- a/nestkernel/connection_creator.cpp
    +++ b/nestkernel/connection_creator.cpp
    @@ -158,9 +158,8 @@ ConnectionCreator::ConnectionCreator( const dictionary& dict )
     void
     ConnectionCreator::extract_params_( const dictionary& dict, std::vector< dictionary >& params )
     {
    -  const std::string syn_name = dict.known( names::synapse_model )
    -    ? dict.get< std::string >( names::synapse_model )
    -    : std::string( "static_synapse" );
    +  const std::string syn_name = dict.known( names::synapse_model ) ? dict.get< std::string >( names::synapse_model )
    +                                                                  : std::string( "static_synapse" );
     
       // The following call will throw "UnknownSynapseType" if syn_name is not naming a known model
       const index synapse_model_id = kernel().model_manager.get_synapse_model_id( syn_name );
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index bdb12d8063..5ed2b9231f 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -404,7 +404,7 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
     
       const std::string rule_name = conn_spec.get< std::string >( names::rule );
     
    -  
    +
       if ( not connruledict_.known( rule_name ) )
       {
         throw BadProperty( String::compose( "Unknown connectivity rule: %1", rule_name ) );
    @@ -413,7 +413,7 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
       const auto rule_id = connruledict_.get< int >( rule_name );
       ConnBuilder* cb = connbuilder_factories_.at( rule_id )->create( sources, targets, conn_spec, syn_specs );
       assert( cb );
    -  
    +
       // at this point, all entries in conn_spec and syn_spec have been checked
       conn_spec.all_entries_accessed( "Connect", "conn_spec" );
       for ( auto& syn_param : syn_specs )
    @@ -430,7 +430,9 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
     
     // PYNEST-NG: This needs conversion
     void
    -nest::ConnectionManager::connect( std::vector< index > sources, std::vector< index > targets, const dictionary& syn_spec )
    +nest::ConnectionManager::connect( std::vector< index > sources,
    +  std::vector< index > targets,
    +  const dictionary& syn_spec )
     {
       size_t syn_id = 0; // Use "static_synapse" (which has id 0) if no model is given
     
    @@ -607,7 +609,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
           }
     
           // If the default value is an integer, the synapse parameter must also be an integer.
    -      if ( boost::any_cast< bool >( syn_model_default_it->second ) )  //PyNEST-NG? Was:
    +      if ( boost::any_cast< bool >( syn_model_default_it->second ) ) // PyNEST-NG? Was:
           // if ( dynamic_cast< IntegerDatum* >( syn_model_default_it->second.datum() ) )
           // or:      if ( Name( param_keys ) == names::receptor_type )
           {
    @@ -690,8 +692,8 @@ nest::ConnectionManager::connect_arrays( long* sources,
               auto* param = param_pointer + index_counter;
     
               // PyNEST-NG had
    -          //Receptor type must be an integer.
    -          //if ( param_pointer_pair.first == names::receptor_type )
    +          // Receptor type must be an integer.
    +          // if ( param_pointer_pair.first == names::receptor_type )
     
               // Integer parameters are stored as IntegerDatums.
               if ( is_int )
    @@ -700,8 +702,8 @@ nest::ConnectionManager::connect_arrays( long* sources,
     
                 if ( *param > 1L << 31 or std::abs( *param - rtype_as_long ) > 0 ) // To avoid rounding errors
                 {
    -              const auto msg = std::string( "Expected integer value for " ) + param_pointer_pair.first
    -                + ", but got double.";
    +              const auto msg =
    +                std::string( "Expected integer value for " ) + param_pointer_pair.first + ", but got double.";
                   throw BadParameter( msg );
                 }
     
    diff --git a/nestkernel/device.cpp b/nestkernel/device.cpp
    index 08451d8201..a5a30622e4 100644
    --- a/nestkernel/device.cpp
    +++ b/nestkernel/device.cpp
    @@ -109,19 +109,19 @@ void
     nest::Device::Parameters_::set( const dictionary& d )
     {
       double origin;
    -  if (d.update_value( names::origin, origin ) )
    +  if ( d.update_value( names::origin, origin ) )
       {
         origin_ = Time::ms( origin );
       }
     
       double start;
    -  if (d.update_value( names::start, start ) )
    +  if ( d.update_value( names::start, start ) )
       {
         start_ = Time::ms( start );
       }
     
       double stop;
    -  if (d.update_value( names::stop, stop ) )
    +  if ( d.update_value( names::stop, stop ) )
       {
         stop_ = Time::ms( stop );
       }
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index bd96a62565..1e63e13324 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -58,7 +58,7 @@ nest::UnknownComponent::compose_msg_( const std::string& component_name ) const
     std::string
     nest::NewModelNameExists::compose_msg_( const std::string& model_name ) const
     {
    -  std::string msg  = "Model " + model_name + " is the name of an existing model and cannot be re-used.";
    +  std::string msg = "Model " + model_name + " is the name of an existing model and cannot be re-used.";
       return msg;
     }
     
    @@ -113,8 +113,8 @@ std::string
     nest::NodeWithProxiesExpected::compose_msg_( const int id ) const
     {
       std::ostringstream out;
    -  out << "A node with proxies (usually a neuron) is expected, but the node with id "
    -      << id << " is a node without proxies (usually a device).";
    +  out << "A node with proxies (usually a neuron) is expected, but the node with id " << id
    +      << " is a node without proxies (usually a device).";
       return out.str();
     }
     
    @@ -136,7 +136,9 @@ nest::UnknownReceptorType::compose_msg_( const long receptor_type, const std::st
     }
     
     std::string
    -nest::IncompatibleReceptorType::compose_msg( const long receptor_type, const std::string name, const std::string event_type)
    +nest::IncompatibleReceptorType::compose_msg( const long receptor_type,
    +  const std::string name,
    +  const std::string event_type )
     {
       std::ostringstream msg;
       msg << "Receptor type " << receptor_type << " in " << name << " does not accept " << event_type << ".";
    @@ -225,7 +227,7 @@ std::string
     nest::UnsupportedEvent::compose_msg_() const
     {
       return "The current synapse type does not support the event type of the sender.\n"
    -    "    A common cause for this is a plastic synapse between a device and a neuron.";
    +         "    A common cause for this is a plastic synapse between a device and a neuron.";
     }
     
     const char*
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 99aa84a767..85a069daca 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -343,7 +343,7 @@ class UnknownReceptorType : public KernelException
     
     class IncompatibleReceptorType : public KernelException
     {
    -  std::string compose_msg( const long receptor_type, const std::string name, const std::string event);
    +  std::string compose_msg( const long receptor_type, const std::string name, const std::string event );
     
     public:
       IncompatibleReceptorType( long receptor_type, std::string name, std::string event_type )
    @@ -362,7 +362,7 @@ class UnknownPort : public KernelException
     {
       std::string compose_msg_( const int id ) const;
       std::string compose_msg_( const int id, const std::string msg ) const;
    -  
    +
     public:
       UnknownPort( int id )
         : KernelException( compose_msg_( id ) )
    @@ -505,7 +505,7 @@ class UnexpectedEvent : public KernelException
     class UnsupportedEvent : public KernelException
     {
       std::string compose_msg_() const;
    -  
    +
     public:
       UnsupportedEvent()
         : KernelException( compose_msg_() )
    @@ -631,7 +631,7 @@ class DimensionMismatch : public KernelException
       {
       }
     
    - const char* what() const noexcept override;
    +  const char* what() const noexcept override;
     };
     
     /**
    diff --git a/nestkernel/free_layer.h b/nestkernel/free_layer.h
    index 73c13b2bbc..4664ae98a3 100644
    --- a/nestkernel/free_layer.h
    +++ b/nestkernel/free_layer.h
    @@ -139,7 +139,7 @@ FreeLayer< D >::set_status( const dictionary& d )
           positions_.reserve( num_local_nodes_ );
     
           auto nc_it = this->node_collection_->begin();
    -      const auto pos = boost::any_cast< std::vector< std::vector< double > > >(positions);
    +      const auto pos = boost::any_cast< std::vector< std::vector< double > > >( positions );
           for ( auto it = pos.begin(); it != pos.end(); ++it, ++nc_it )
           {
             assert( nc_it != this->node_collection_->end() );
    diff --git a/nestkernel/growth_curve.h b/nestkernel/growth_curve.h
    index 1617e2ceb9..749438013b 100644
    --- a/nestkernel/growth_curve.h
    +++ b/nestkernel/growth_curve.h
    @@ -216,8 +216,7 @@ class GrowthCurveGaussian : public GrowthCurve
       void get( dictionary& d ) const;
       void set( const dictionary& d );
     
    -  double
    -  update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const;
    +  double update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const;
     
     private:
       double eta_;
    diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp
    index 2fd3138bc2..f10778a748 100644
    --- a/nestkernel/kernel_manager.cpp
    +++ b/nestkernel/kernel_manager.cpp
    @@ -68,8 +68,8 @@ nest::KernelManager::get_build_info_()
       build_info[ "mpiexec" ] = std::string( MPIEXEC );
       build_info[ "mpiexec_numproc_flag" ] = std::string( MPIEXEC_NUMPROC_FLAG );
       build_info[ "mpiexec_max_numprocs" ] = std::string( MPIEXEC_MAX_NUMPROCS );
    -  build_info[ "mpiexec_preflags"] = std::string( MPIEXEC_PREFLAGS );
    -  build_info[ "mpiexec_postflags"] = std::string( MPIEXEC_POSTFLAGS );
    +  build_info[ "mpiexec_preflags" ] = std::string( MPIEXEC_PREFLAGS );
    +  build_info[ "mpiexec_postflags" ] = std::string( MPIEXEC_POSTFLAGS );
     #else
       build_info[ "have_mpi" ] = false;
     #endif
    diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h
    index 1565ed4a57..4f228e59bd 100644
    --- a/nestkernel/layer_impl.h
    +++ b/nestkernel/layer_impl.h
    @@ -396,7 +396,7 @@ MaskedLayer< D >::check_mask_( Layer< D >& layer, bool allow_oversized )
         lower_left[ 1 ] = -upper_right[ 1 ];
         upper_right[ 1 ] = -y;
     
    -    mask_ = MaskPTR (new BoxMask< D >( lower_left, upper_right ) );
    +    mask_ = MaskPTR( new BoxMask< D >( lower_left, upper_right ) );
       }
       catch ( std::bad_cast& )
       {
    diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp
    index 56dfe89b17..c05005b547 100644
    --- a/nestkernel/model_manager.cpp
    +++ b/nestkernel/model_manager.cpp
    @@ -24,8 +24,8 @@
     
     // C++ includes:
     #include <algorithm>
    -#include <iostream>
     #include <iomanip>
    +#include <iostream>
     #include <vector>
     
     // Includes from libnestutil:
    diff --git a/nestkernel/model_manager_impl.h b/nestkernel/model_manager_impl.h
    index 638a089356..0dcb6387f7 100644
    --- a/nestkernel/model_manager_impl.h
    +++ b/nestkernel/model_manager_impl.h
    @@ -30,8 +30,8 @@
     #include "string_utils.h"
     
     // Includes from nestkernel:
    -#include "exceptions.h"
     #include "connection_label.h"
    +#include "exceptions.h"
     #include "kernel_manager.h"
     #include "nest.h"
     #include "target_identifier.h"
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 8d6b053bb9..3af5e1ae98 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -882,11 +882,11 @@ slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR nc )
       // If metadata contains node positions and the NodeCollection is sliced, get only positions of the sliced nodes.
       if ( dict.known( names::positions ) )
       {
    -    //PyNEST-NG: Check if TokenArray is the correct type here
    -    const auto positions = dict.get< std::vector < std::vector < double > > >( names::positions );
    +    // PyNEST-NG: Check if TokenArray is the correct type here
    +    const auto positions = dict.get< std::vector< std::vector< double > > >( names::positions );
         if ( nc->size() != positions.size() )
         {
    -      std::vector < std::vector < double > > sliced_points;
    +      std::vector< std::vector< double > > sliced_points;
           // Iterate only local nodes
           NodeCollection::const_iterator nc_begin = nc->has_proxies() ? nc->MPI_local_begin() : nc->begin();
           NodeCollection::const_iterator nc_end = nc->end();
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index bbe25fdff4..183097cf58 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -103,7 +103,7 @@ void set_kernel_status( const dictionary& dict );
     dictionary get_kernel_status();
     
     dictionary get_nc_status( NodeCollectionPTR node_collection );
    -  void set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params );
    +void set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params );
     
     void set_node_status( const index node_id, const dictionary& dict );
     dictionary get_node_status( const index node_id );
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index 8e647599db..41beb048c7 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -23,8 +23,8 @@
     #include "node_manager.h"
     
     // C++ includes:
    -#include <set>
     #include <iomanip>
    +#include <set>
     
     // Includes from libnestutil:
     #include "compose.hpp"
    diff --git a/nestkernel/parameter.cpp b/nestkernel/parameter.cpp
    index 7b7fca026c..9257020eb9 100644
    --- a/nestkernel/parameter.cpp
    +++ b/nestkernel/parameter.cpp
    @@ -405,17 +405,13 @@ subtract_parameter( const ParameterPTR first, const ParameterPTR second )
     }
     
     ParameterPTR
    -compare_parameter( const ParameterPTR first,
    -  const ParameterPTR second,
    -  const dictionary& d )
    +compare_parameter( const ParameterPTR first, const ParameterPTR second, const dictionary& d )
     {
       return ParameterPTR( new ComparingParameter( first, second, d ) );
     }
     
     ParameterPTR
    -conditional_parameter( const ParameterPTR condition,
    -  const ParameterPTR if_true,
    -  const ParameterPTR if_false )
    +conditional_parameter( const ParameterPTR condition, const ParameterPTR if_true, const ParameterPTR if_false )
     {
       return ParameterPTR( new ConditionalParameter( condition, if_true, if_false ) );
     }
    @@ -469,9 +465,7 @@ dimension_parameter( const ParameterPTR x_parameter, const ParameterPTR y_parame
     }
     
     ParameterPTR
    -dimension_parameter( const ParameterPTR x_parameter,
    -  const ParameterPTR y_parameter,
    -  const ParameterPTR z_parameter )
    +dimension_parameter( const ParameterPTR x_parameter, const ParameterPTR y_parameter, const ParameterPTR z_parameter )
     {
       return ParameterPTR( new DimensionParameter( x_parameter, y_parameter, z_parameter ) );
     }
    diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h
    index 10b7bfcb90..c8d03251ab 100644
    --- a/nestkernel/parameter.h
    +++ b/nestkernel/parameter.h
    @@ -40,7 +40,7 @@ namespace nest
     {
     class Parameter;
     using ParameterPTR = std::shared_ptr< Parameter >;
    -  
    +
     class AbstractLayer;
     
     /**
    @@ -761,9 +761,7 @@ class ConditionalParameter : public Parameter
        * Construct the choice of two given parameters, based on a third.
        * Copies are made of the supplied Parameter objects.
        */
    -  ConditionalParameter( ParameterPTR condition,
    -    ParameterPTR if_true,
    -    ParameterPTR if_false )
    +  ConditionalParameter( ParameterPTR condition, ParameterPTR if_true, ParameterPTR if_false )
         : Parameter( condition->is_spatial() or if_true->is_spatial() or if_false->is_spatial(),
           if_true->returns_int_only() and if_false->returns_int_only() )
         , condition_( condition )
    @@ -1191,9 +1189,7 @@ class DimensionParameter : public Parameter
       {
       }
     
    -  DimensionParameter( ParameterPTR px,
    -    ParameterPTR py,
    -    ParameterPTR pz )
    +  DimensionParameter( ParameterPTR px, ParameterPTR py, ParameterPTR pz )
         : Parameter( true )
         , num_dimensions_( 3 )
         , px_( px )
    @@ -1486,37 +1482,31 @@ Parameter::value_is_integer_( const double value ) const
      * Create the product of one parameter with another.
      * @returns a new dynamically allocated parameter.
      */
    -ParameterPTR multiply_parameter( const ParameterPTR first,
    -  const ParameterPTR second );
    +ParameterPTR multiply_parameter( const ParameterPTR first, const ParameterPTR second );
     
     /**
      * Create the quotient of one parameter with another.
      * @returns a new dynamically allocated parameter.
      */
    -ParameterPTR divide_parameter( const ParameterPTR first,
    -  const ParameterPTR second );
    +ParameterPTR divide_parameter( const ParameterPTR first, const ParameterPTR second );
     
     /**
      * Create the sum of one parameter with another.
      * @returns a new dynamically allocated parameter.
      */
    -ParameterPTR add_parameter( const ParameterPTR first,
    -  const ParameterPTR second );
    +ParameterPTR add_parameter( const ParameterPTR first, const ParameterPTR second );
     
     /**
      * Create the difference between one parameter and another.
      * @returns a new dynamically allocated parameter.
      */
    -ParameterPTR subtract_parameter( const ParameterPTR first,
    -  const ParameterPTR second );
    +ParameterPTR subtract_parameter( const ParameterPTR first, const ParameterPTR second );
     
     /**
      * Create comparison of one parameter with another.
      * @returns a new dynamically allocated parameter.
      */
    -ParameterPTR compare_parameter( const ParameterPTR first,
    -  const ParameterPTR second,
    -  const dictionary& d );
    +ParameterPTR compare_parameter( const ParameterPTR first, const ParameterPTR second, const dictionary& d );
     
     /**
      * Create a parameter that chooses between two other parameters,
    @@ -1525,9 +1515,8 @@ ParameterPTR compare_parameter( const ParameterPTR first,
      * evaluate as true.
      * @returns a new dynamically allocated parameter.
      */
    -ParameterPTR conditional_parameter( const ParameterPTR condition,
    -  const ParameterPTR if_true,
    -  const ParameterPTR if_false );
    +ParameterPTR
    +conditional_parameter( const ParameterPTR condition, const ParameterPTR if_true, const ParameterPTR if_false );
     
     /**
      * Create parameter whose value is the minimum of a given parameter's value and the given value.
    @@ -1575,12 +1564,10 @@ ParameterPTR pow_parameter( const ParameterPTR parameter, const double exponent
      * Create a parameter that can generate position vectors from a given set of parameters.
      * @returns a new dynamically allocated parameter.
      */
    -ParameterPTR dimension_parameter( const ParameterPTR x_parameter,
    -  const ParameterPTR y_parameter );
    +ParameterPTR dimension_parameter( const ParameterPTR x_parameter, const ParameterPTR y_parameter );
     
    -ParameterPTR dimension_parameter( const ParameterPTR x_parameter,
    -  const ParameterPTR y_parameter,
    -  const ParameterPTR z_parameter );
    +ParameterPTR
    +dimension_parameter( const ParameterPTR x_parameter, const ParameterPTR y_parameter, const ParameterPTR z_parameter );
     
     
     } // namespace nest
    diff --git a/nestkernel/random_manager.cpp b/nestkernel/random_manager.cpp
    index 77a5228fd5..32b351fa42 100644
    --- a/nestkernel/random_manager.cpp
    +++ b/nestkernel/random_manager.cpp
    @@ -107,7 +107,8 @@ nest::RandomManager::reset_rngs_()
       // Delete existing RNGs.
       delete rank_synced_rng_;
     
    -  auto delete_rngs = []( std::vector< RngPtr >& rng_vec ) {
    +  auto delete_rngs = []( std::vector< RngPtr >& rng_vec )
    +  {
         for ( auto rng : rng_vec )
         {
           delete rng;
    diff --git a/nestkernel/recording_backend_memory.cpp b/nestkernel/recording_backend_memory.cpp
    index ce544765c0..87346884b2 100644
    --- a/nestkernel/recording_backend_memory.cpp
    +++ b/nestkernel/recording_backend_memory.cpp
    @@ -224,14 +224,16 @@ nest::RecordingBackendMemory::DeviceData::get_status( dictionary& d ) const
         events = d.get< dictionary >( names::events );
       }
     
    -  auto init_intvector = [&events]( std::string key ) -> std::vector< int >& {
    +  auto init_intvector = [ &events ]( std::string key ) -> std::vector< int >&
    +  {
         if ( not events.known( key ) )
         {
           events[ key ] = std::vector< int >();
         }
         return boost::any_cast< std::vector< int >& >( events[ key ] );
       };
    -  auto init_doublevector = [&events]( std::string key ) -> std::vector< double >& {
    +  auto init_doublevector = [ &events ]( std::string key ) -> std::vector< double >&
    +  {
         if ( not events.known( key ) )
         {
           events[ key ] = std::vector< double >();
    diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp
    index 60022c6977..e3c5a69070 100644
    --- a/nestkernel/simulation_manager.cpp
    +++ b/nestkernel/simulation_manager.cpp
    @@ -26,8 +26,8 @@
     #include <sys/time.h>
     
     // C++ includes:
    -#include <limits>
     #include <iomanip>
    +#include <limits>
     #include <vector>
     
     // Includes from libnestutil:
    diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h
    index 66f42ca6b8..691510964e 100644
    --- a/nestkernel/spatial.h
    +++ b/nestkernel/spatial.h
    @@ -121,7 +121,7 @@ MaskPTR union_mask( const MaskPTR mask1, const MaskPTR mask2 );
     MaskPTR minus_mask( const MaskPTR mask1, const MaskPTR mask2 );
     void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict );
     void dump_layer_nodes( NodeCollectionPTR layer_nc, std::ostream& out );
    -  void dump_layer_connections( const std::string& syn_model,
    +void dump_layer_connections( const std::string& syn_model,
       NodeCollectionPTR source_layer_nc,
       NodeCollectionPTR target_layer_nc,
       std::ostream& out_file );
    diff --git a/nestkernel/target_data.h b/nestkernel/target_data.h
    index ebc6764c32..4c9d21042d 100644
    --- a/nestkernel/target_data.h
    +++ b/nestkernel/target_data.h
    @@ -192,7 +192,8 @@ class TargetData
     
     public:
       //! variant fields
    -  union {
    +  union
    +  {
         TargetDataFields target_data;
         SecondaryTargetDataFields secondary_data;
       };
    
    From 99e4fa662b9a7e479f5750885835b843e1ee06d6 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Fri, 2 Dec 2022 15:03:26 +0100
    Subject: [PATCH 097/375] Updated for new pynest
    
    ---
     libnestutil/dictionary.cpp              |  19 ++-
     libnestutil/dictionary.h                |   2 +-
     models/cm_compartmentcurrents.h         |  10 +-
     models/glif_psc.cpp                     |   6 +-
     models/pp_psc_delta.h                   |   2 +-
     nestkernel/connection_creator.cpp       |   9 +-
     nestkernel/connection_manager.cpp       |  20 +--
     nestkernel/genericmodel.h               |   4 +-
     nestkernel/mask.h                       |  18 +--
     nestkernel/mask_impl.h                  |   6 +-
     nestkernel/model.cpp                    |   2 +-
     nestkernel/model.h                      |   4 +-
     nestkernel/model_manager.cpp            |   1 +
     nestkernel/nest.cpp                     |  61 +++++++-
     nestkernel/nest.h                       |  41 +++++-
     nestkernel/recording_backend_memory.cpp |   2 +-
     nestkernel/recording_device.cpp         |   3 +-
     nestkernel/sp_manager.cpp               |   4 +-
     nestkernel/sp_manager.h                 |   2 +-
     nestkernel/spatial.cpp                  | 184 ++++++++++--------------
     nestkernel/spatial.h                    |   3 +-
     pynest/nest/lib/hl_api_connections.py   |  12 +-
     pynest/nest/lib/hl_api_helper.py        |   3 +-
     pynest/nest/lib/hl_api_info.py          |   9 +-
     pynest/nest/lib/hl_api_nodes.py         |  14 +-
     pynest/nest/lib/hl_api_spatial.py       |   5 +-
     pynest/nest/lib/hl_api_types.py         |   3 +-
     pynest/nest/ll_api.py                   |   3 +-
     pynest/nest/random/hl_api_random.py     |   8 +-
     pynest/nestkernel_api.pxd               |  11 +-
     pynest/nestkernel_api.pyx               | 118 ++++++++++++++-
     31 files changed, 395 insertions(+), 194 deletions(-)
    
    diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp
    index 811bbfd118..a05bdc3e3e 100644
    --- a/libnestutil/dictionary.cpp
    +++ b/libnestutil/dictionary.cpp
    @@ -22,6 +22,7 @@
     
     #include <algorithm>
     #include <boost/any.hpp>
    +#include <boost/core/demangle.hpp>
     #include <iostream>
     #include <map>
     #include <string>
    @@ -57,7 +58,7 @@ operator<<( std::ostream& os, const std::vector< T >& vec )
     std::string
     debug_type( const boost::any& operand )
     {
    -  return operand.type().name();
    +  return boost::core::demangle( operand.type().name() );
     }
     
     std::string
    @@ -310,6 +311,19 @@ value_equal( const boost::any first, const boost::any second )
           return false;
         }
       }
    +  else if ( is_type< std::vector< size_t > >( first ) )
    +  {
    +    if ( not is_type< std::vector< size_t > >( second ) )
    +    {
    +      return false;
    +    }
    +    const auto this_value = boost::any_cast< std::vector< size_t > >( first );
    +    const auto other_value = boost::any_cast< std::vector< size_t > >( second );
    +    if ( this_value != other_value )
    +    {
    +      return false;
    +    }
    +  }
       else if ( is_type< dictionary >( first ) )
       {
         if ( not is_type< dictionary >( second ) )
    @@ -340,6 +354,9 @@ value_equal( const boost::any first, const boost::any second )
       {
         // TODO-PYNEST-NG: raise error
         assert( false );
    +    std::string msg = std::string( "Unsupported type in dictionary::value_equal(): " ) + debug_type( first );
    +    std::cerr << msg << "\n";
    +    throw nest::TypeMismatch( msg );
       }
       return true;
     }
    diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h
    index a026deb179..c8e4286046 100644
    --- a/libnestutil/dictionary.h
    +++ b/libnestutil/dictionary.h
    @@ -93,7 +93,7 @@ class dictionary : public std::map< std::string, boost::any >
         catch ( const boost::bad_any_cast& )
         {
           std::string msg = std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type "
    -        + std::string( typeid( T ).name() );
    +        + std::string( boost::core::demangle( typeid( T ).name() ) );
           std::cerr << msg << "\n";
           throw nest::TypeMismatch( msg );
         }
    diff --git a/models/cm_compartmentcurrents.h b/models/cm_compartmentcurrents.h
    index 152e69f816..00d5a52cf8 100644
    --- a/models/cm_compartmentcurrents.h
    +++ b/models/cm_compartmentcurrents.h
    @@ -477,7 +477,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type] = "AMPA";
    +      dd[ names::receptor_type ] = std::string( "AMPA" );
           info.push_back( dd );
         }
         // receptor info for GABA synapses
    @@ -485,8 +485,8 @@ class CompartmentCurrents
         {
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
    -      dd[ names::comp_idx] = compartment_index;
    -      dd[ names::receptor_type] = "GABA";
    +      dd[ names::comp_idx ] = compartment_index;
    +      dd[ names::receptor_type ] = std::string( "GABA" );
           info.push_back( dd );
         }
         // receptor info for NMDA synapses
    @@ -495,7 +495,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = "NMDA";
    +      dd[ names::receptor_type ] = std::string( "NMDA" );
           info.push_back( dd );
         }
         // receptor info for AMPA_NMDA synapses
    @@ -504,7 +504,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = "AMPA_NMDA";
    +      dd[ names::receptor_type ] = std::string( "AMPA_NMDA" );
           info.push_back( dd );
         }
       };
    diff --git a/models/glif_psc.cpp b/models/glif_psc.cpp
    index fbb213592b..85d6835592 100644
    --- a/models/glif_psc.cpp
    +++ b/models/glif_psc.cpp
    @@ -305,7 +305,7 @@ nest::glif_psc::State_::get( dictionary& d, const Parameters_& p ) const
     void
     nest::glif_psc::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  if ( d.update_value( names::V_m, U_ ) )
    +  if ( update_value_param( d, names::V_m, U_, node ) )
       {
         U_ -= p.E_L_;
       }
    @@ -330,12 +330,12 @@ nest::glif_psc::State_::set( const dictionary& d, const Parameters_& p, double d
         }
       }
     
    -  if ( d.update_value( names::threshold_spike, threshold_spike_ ) and not p.has_theta_spike_ )
    +  if ( update_value_param( d, names::threshold_spike, threshold_spike_, node ) and not p.has_theta_spike_ )
       {
         throw BadProperty( "Threshold spike component is not supported or settable in the current model mechanisms." );
       }
     
    -  if ( d.update_value( names::threshold_voltage, threshold_voltage_ ) and not p.has_theta_voltage_ )
    +  if ( update_value_param( d, names::threshold_voltage, threshold_voltage_, node ) and not p.has_theta_voltage_ )
       {
         throw BadProperty( "Threshold voltage component is not supported or settable in the current model mechanisms." );
       }
    diff --git a/models/pp_psc_delta.h b/models/pp_psc_delta.h
    index 75ceeaa97f..4216c68bee 100644
    --- a/models/pp_psc_delta.h
    +++ b/models/pp_psc_delta.h
    @@ -252,7 +252,7 @@ class pp_psc_delta : public ArchivingNode
         bool dead_time_random_;
     
         /** Shape parameter of random dead time gamma distribution. */
    -    unsigned long dead_time_shape_;
    +    long dead_time_shape_;
     
         /** Do we reset the membrane potential after each spike? */
         bool with_reset_;
    diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp
    index e9951699f6..70b09f5afe 100644
    --- a/nestkernel/connection_creator.cpp
    +++ b/nestkernel/connection_creator.cpp
    @@ -23,6 +23,7 @@
     #include "connection_creator.h"
     
     #include "nest.h"
    +#include "spatial.h"
     
     namespace nest
     {
    @@ -57,10 +58,10 @@ ConnectionCreator::ConnectionCreator( const dictionary& dict )
         number_of_connections_ = number_of_connections;
       }
       // TODO-PYNEST-NG: implement mask with dictionary
    -  // if ( dict.known( names::mask ) )
    -  // {
    -  //   mask_ = NestModule::create_mask( ( *dict )[ names::mask ] );
    -  // }
    +  if ( dict.known( names::mask ) )
    +  {
    +    mask_ = create_mask( dict.get< dictionary >( names::mask ) );
    +  }
       if ( dict.known( names::kernel ) )
       {
         kernel_ = create_parameter( dict.at( names::kernel ) );
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 2277ded60d..f93b006361 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -404,7 +404,7 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
     
       const std::string rule_name = conn_spec.get< std::string >( names::rule );
     
    -  
    +
       if ( not connruledict_.known( rule_name ) )
       {
         throw BadProperty( String::compose( "Unknown connectivity rule: %1", rule_name ) );
    @@ -413,7 +413,7 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
       const auto rule_id = connruledict_.get< int >( rule_name );
       ConnBuilder* cb = connbuilder_factories_.at( rule_id )->create( sources, targets, conn_spec, syn_specs );
       assert( cb );
    -  
    +
       // at this point, all entries in conn_spec and syn_spec have been checked
       conn_spec.all_entries_accessed( "Connect", "conn_spec" );
       for ( auto& syn_param : syn_specs )
    @@ -430,7 +430,9 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
     
     // PYNEST-NG: This needs conversion
     void
    -nest::ConnectionManager::connect( std::vector< index > sources, std::vector< index > targets, const dictionary& syn_spec )
    +nest::ConnectionManager::connect( std::vector< index > sources,
    +  std::vector< index > targets,
    +  const dictionary& syn_spec )
     {
       size_t syn_id = 0; // Use "static_synapse" (which has id 0) if no model is given
     
    @@ -607,9 +609,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
           }
     
           // If the default value is an integer, the synapse parameter must also be an integer.
    -      if ( boost::any_cast< bool >( syn_model_default_it->second ) )  //PyNEST-NG? Was:
    -      // if ( dynamic_cast< IntegerDatum* >( syn_model_default_it->second.datum() ) )
    -      // or:      if ( Name( param_keys ) == names::receptor_type )
    +      if ( is_type< long >( syn_model_default_it->second ) )
           {
             param_pointers[ param_key ].second = true;
             param_dicts[ i ][ param_key ] = 0;
    @@ -690,8 +690,8 @@ nest::ConnectionManager::connect_arrays( long* sources,
               auto* param = param_pointer + index_counter;
     
               // PyNEST-NG had
    -          //Receptor type must be an integer.
    -          //if ( param_pointer_pair.first == names::receptor_type )
    +          // Receptor type must be an integer.
    +          // if ( param_pointer_pair.first == names::receptor_type )
     
               // Integer parameters are stored as IntegerDatums.
               if ( is_int )
    @@ -700,8 +700,8 @@ nest::ConnectionManager::connect_arrays( long* sources,
     
                 if ( *param > 1L << 31 or std::abs( *param - rtype_as_long ) > 0 ) // To avoid rounding errors
                 {
    -              const auto msg = std::string( "Expected integer value for " ) + param_pointer_pair.first
    -                + ", but got double.";
    +              const auto msg =
    +                std::string( "Expected integer value for " ) + param_pointer_pair.first + ", but got double.";
                   throw BadParameter( msg );
                 }
     
    diff --git a/nestkernel/genericmodel.h b/nestkernel/genericmodel.h
    index 76e6a15528..b8ca5b87d1 100644
    --- a/nestkernel/genericmodel.h
    +++ b/nestkernel/genericmodel.h
    @@ -95,7 +95,7 @@ class GenericModel : public Model
       void deprecation_warning( const std::string& ) override;
     
     private:
    -  void set_status_( dictionary ) override;
    +  void set_status_( const dictionary& ) override;
       dictionary get_status_() override;
     
       size_t get_element_size() const override;
    @@ -229,7 +229,7 @@ GenericModel< ElementT >::sends_signal() const
     
     template < typename ElementT >
     void
    -GenericModel< ElementT >::set_status_( dictionary d )
    +GenericModel< ElementT >::set_status_( const dictionary& d )
     {
       proto_.set_status( d );
     }
    diff --git a/nestkernel/mask.h b/nestkernel/mask.h
    index cb038650d8..9469153c7e 100644
    --- a/nestkernel/mask.h
    +++ b/nestkernel/mask.h
    @@ -251,7 +251,7 @@ class BoxMask : public Mask< D >
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     protected:
       /**
    @@ -352,7 +352,7 @@ class BallMask : public Mask< D >
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     protected:
       Position< D > center_;
    @@ -457,7 +457,7 @@ class EllipseMask : public Mask< D >
       /**
        * @returns the name of this mask type.
        */
    -  static Name get_name();
    +  static std::string get_name();
     
     private:
       void create_bbox_();
    @@ -728,14 +728,14 @@ class AnchoredMask : public Mask< D >
     };
     
     template <>
    -inline Name
    +inline std::string
     BoxMask< 2 >::get_name()
     {
       return names::rectangular;
     }
     
     template <>
    -inline Name
    +inline std::string
     BoxMask< 3 >::get_name()
     {
       return names::box;
    @@ -889,14 +889,14 @@ inline BoxMask< D >::BoxMask( const Position< D >& lower_left,
     }
     
     template <>
    -inline Name
    +inline std::string
     BallMask< 2 >::get_name()
     {
       return names::circular;
     }
     
     template <>
    -inline Name
    +inline std::string
     BallMask< 3 >::get_name()
     {
       return names::spherical;
    @@ -920,14 +920,14 @@ BallMask< D >::BallMask( const dictionary& d )
     }
     
     template <>
    -inline Name
    +inline std::string
     EllipseMask< 2 >::get_name()
     {
       return names::elliptical;
     }
     
     template <>
    -inline Name
    +inline std::string
     EllipseMask< 3 >::get_name()
     {
       return names::ellipsoidal;
    diff --git a/nestkernel/mask_impl.h b/nestkernel/mask_impl.h
    index 603ceac0f7..6100df7658 100644
    --- a/nestkernel/mask_impl.h
    +++ b/nestkernel/mask_impl.h
    @@ -133,7 +133,7 @@ BoxMask< D >::get_dict() const
     {
       dictionary d;
       dictionary maskd;
    -  d[ get_name().toString() ] = maskd;
    +  d[ get_name() ] = maskd;
       maskd[ names::lower_left ] = lower_left_.get_vector();
       maskd[ names::upper_right ] = upper_right_.get_vector();
       maskd[ names::azimuth_angle ] = azimuth_angle_;
    @@ -209,9 +209,9 @@ BallMask< D >::get_dict() const
     {
       dictionary d;
       dictionary maskd;
    -  d[ get_name().toString() ] = maskd;
       maskd[ names::radius ] = radius_;
       maskd[ names::anchor ] = center_.get_vector();
    +  d[ get_name() ] = maskd;
       return d;
     }
     
    @@ -287,13 +287,13 @@ EllipseMask< D >::get_dict() const
     {
       dictionary d;
       dictionary maskd;
    -  d[ get_name().toString() ] = maskd;
       maskd[ names::major_axis ] = major_axis_;
       maskd[ names::minor_axis ] = minor_axis_;
       maskd[ names::polar_axis ] = polar_axis_;
       maskd[ names::anchor ] = center_.get_vector();
       maskd[ names::azimuth_angle ] = azimuth_angle_;
       maskd[ names::polar_angle ] = polar_angle_;
    +  d[ get_name() ] = maskd;
       return d;
     }
     
    diff --git a/nestkernel/model.cpp b/nestkernel/model.cpp
    index 779722aab0..a103cad236 100644
    --- a/nestkernel/model.cpp
    +++ b/nestkernel/model.cpp
    @@ -103,7 +103,7 @@ Model::mem_capacity()
     }
     
     void
    -Model::set_status( dictionary d )
    +Model::set_status( const dictionary& d )
     {
       try
       {
    diff --git a/nestkernel/model.h b/nestkernel/model.h
    index 39e6076010..e7ab76ab92 100644
    --- a/nestkernel/model.h
    +++ b/nestkernel/model.h
    @@ -133,7 +133,7 @@ class Model
        * @param d Dictionary with named parameter settings.
        * @ingroup status_interface
        */
    -  void set_status( dictionary );
    +  void set_status( const dictionary& );
     
       /**
        * Export properties of the prototype node by setting
    @@ -201,7 +201,7 @@ class Model
       }
     
     private:
    -  virtual void set_status_( dictionary ) = 0;
    +  virtual void set_status_( const dictionary& ) = 0;
     
       virtual dictionary get_status_() = 0;
     
    diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp
    index 2b48cb13cb..f5de042514 100644
    --- a/nestkernel/model_manager.cpp
    +++ b/nestkernel/model_manager.cpp
    @@ -317,6 +317,7 @@ ModelManager::set_node_defaults_( index model_id, const dictionary& params )
       get_node_model( model_id )->set_status( params );
     
       params.all_entries_accessed( "ModelManager::set_node_defaults_", "params" );
    +  model_defaults_modified_ = true;
     }
     
     void
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index c52136bfbe..11fbad0ecf 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -113,6 +113,7 @@
     #include "volume_transmitter.h"
     #include "weight_recorder.h"
     
    +#include "grid_mask.h"
     #include "spatial.h"
     
     #include "connection_manager_impl.h"
    @@ -127,6 +128,9 @@
     namespace nest
     {
     
    +
    +AbstractMask* create_doughnut( const dictionary& d );
    +
     void
     init_nest( int* argc, char** argv[] )
     {
    @@ -235,6 +239,15 @@ init_nest( int* argc, char** argv[] )
       register_parameter< Gaussian2DParameter >( "gaussian2d" );
       register_parameter< GammaParameter >( "gamma" );
       register_parameter< ExpDistParameter >( "exp_distribution" );
    +
    +  register_mask< BallMask< 2 > >();
    +  register_mask< BallMask< 3 > >();
    +  register_mask< EllipseMask< 2 > >();
    +  register_mask< EllipseMask< 3 > >();
    +  register_mask< BoxMask< 2 > >();
    +  register_mask< BoxMask< 3 > >();
    +  register_mask( "doughnut", create_doughnut );
    +  register_mask< GridMask< 2 > >();
     }
     
     void
    @@ -390,6 +403,7 @@ set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params )
     void
     set_connection_status( const std::deque< ConnectionID >& conns, const dictionary& dict )
     {
    +  dict.init_access_flags();
       for ( auto& conn : conns )
       {
         kernel().connection_manager.set_synapse_status( conn.get_source_node_id(),
    @@ -399,6 +413,7 @@ set_connection_status( const std::deque< ConnectionID >& conns, const dictionary
           conn.get_port(),
           dict );
       }
    +  dict.all_entries_accessed( "connection.set()", "params" );
     }
     
     //// void
    @@ -584,6 +599,7 @@ get_metadata( const NodeCollectionPTR nc )
       if ( meta.get() )
       {
         meta->get_status( status_dict );
    +    slice_positions_if_sliced_nc( status_dict, nc );
         status_dict[ names::network_size ] = nc->size();
       }
       return status_dict;
    @@ -598,6 +614,16 @@ connect( NodeCollectionPTR sources,
       kernel().connection_manager.connect( sources, targets, connectivity, synapse_params );
     }
     
    +void
    +disconnect( NodeCollectionPTR sources,
    +  NodeCollectionPTR targets,
    +  const dictionary& connectivity,
    +  const dictionary& synapse_params )
    +{
    +  kernel().sp_manager.disconnect( sources, targets, connectivity, synapse_params );
    +}
    +
    +
     void
     connect_arrays( long* sources,
       long* targets,
    @@ -797,6 +823,12 @@ parameter_factory_( void )
       return factory;
     }
     
    +MaskFactory&
    +mask_factory_( void )
    +{
    +  static MaskFactory factory;
    +  return factory;
    +}
     
     double
     get_value( const ParameterPTR param )
    @@ -872,10 +904,10 @@ slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR nc )
       if ( dict.known( names::positions ) )
       {
         // PyNEST-NG: Check if TokenArray is the correct type here
    -    const auto positions = dict.get< TokenArray >( names::positions );
    +    const auto positions = dict.get< std::vector< std::vector< double > > >( names::positions );
         if ( nc->size() != positions.size() )
         {
    -      TokenArray sliced_points;
    +      std::vector< std::vector< double > > sliced_points;
           // Iterate only local nodes
           NodeCollection::const_iterator nc_begin = nc->has_proxies() ? nc->MPI_local_begin() : nc->begin();
           NodeCollection::const_iterator nc_end = nc->end();
    @@ -892,5 +924,30 @@ slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR nc )
       }
     }
     
    +AbstractMask*
    +create_doughnut( const dictionary& d )
    +{
    +  // The doughnut (actually an annulus) is created using a DifferenceMask
    +  Position< 2 > center( 0, 0 );
    +  if ( d.known( names::anchor ) )
    +  {
    +    center = d.get< std::vector< double > >( names::anchor );
    +  }
    +
    +  const double outer = d.get< double >( names::outer_radius );
    +  const double inner = d.get< double >( names::inner_radius );
    +  if ( inner >= outer )
    +  {
    +    throw BadProperty(
    +      "nest::create_doughnut: "
    +      "inner_radius < outer_radius required." );
    +  }
    +
    +  BallMask< 2 > outer_circle( center, outer );
    +  BallMask< 2 > inner_circle( center, inner );
    +
    +  return new DifferenceMask< 2 >( outer_circle, inner_circle );
    +}
    +
     
     } // namespace nest
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 6869dd010e..8ab195dec3 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -33,6 +33,8 @@
     
     // Includes from nestkernel:
     #include "connection_id.h"
    +#include "mask.h"
    +#include "mask_impl.h"
     #include "nest_time.h"
     #include "nest_types.h"
     #include "parameter.h"
    @@ -103,7 +105,7 @@ void set_kernel_status( const dictionary& dict );
     dictionary get_kernel_status();
     
     dictionary get_nc_status( NodeCollectionPTR node_collection );
    -  void set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params );
    +void set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params );
     
     void set_node_status( const index node_id, const dictionary& dict );
     dictionary get_node_status( const index node_id );
    @@ -152,6 +154,11 @@ void connect( NodeCollectionPTR sources,
       const dictionary& connectivity,
       const std::vector< dictionary >& synapse_params );
     
    +void disconnect( NodeCollectionPTR sources,
    +  NodeCollectionPTR targets,
    +  const dictionary& connectivity,
    +  const dictionary& synapse_params );
    +
     /**
      * @brief Connect arrays of node IDs one-to-one
      *
    @@ -223,6 +230,14 @@ void prepare();
      */
     void cleanup();
     
    +/**
    + * Create a new Mask object using the mask factory.
    + * @param name Mask type to create.
    + * @param d    Dictionary with parameters specific for this mask type.
    + * @returns dynamically allocated new Mask object.
    + */
    +static MaskPTR create_mask( const std::string& name, const dictionary& d );
    +
     void copy_model( const std::string& oldmodname, const std::string& newmodname, const dictionary& dict );
     
     void set_model_defaults( const std::string& model_name, const dictionary& );
    @@ -237,8 +252,12 @@ ParameterPTR create_parameter( const dictionary& param_dict );
     ParameterPTR create_parameter( const std::string& name, const dictionary& d );
     
     using ParameterFactory = GenericFactory< Parameter >;
    +using MaskFactory = GenericFactory< AbstractMask >;
    +using MaskCreatorFunction = MaskFactory::CreatorFunction;
    +
     
     ParameterFactory& parameter_factory_();
    +MaskFactory& mask_factory_();
     
     
     double get_value( const ParameterPTR param );
    @@ -256,6 +275,13 @@ register_parameter( const std::string& name )
       return parameter_factory_().register_subtype< T >( name );
     }
     
    +template < class T >
    +inline bool
    +register_mask()
    +{
    +  return mask_factory_().register_subtype< T >( T::get_name() );
    +}
    +
     /**
      * @brief Get only positions of the sliced nodes if metadata contains node positions and the NodeCollection is sliced.
      *
    @@ -265,6 +291,19 @@ register_parameter( const std::string& name )
      * NodeCollection.
      */
     void slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR node_collection );
    +
    +inline bool
    +register_mask( const std::string& name, MaskCreatorFunction creator )
    +{
    +  return mask_factory_().register_subtype( name, creator );
    +}
    +
    +inline static MaskPTR
    +create_mask( const std::string& name, const dictionary& d )
    +{
    +  return MaskPTR( mask_factory_().create( name, d ) );
    +}
    +
     }
     
     
    diff --git a/nestkernel/recording_backend_memory.cpp b/nestkernel/recording_backend_memory.cpp
    index ce544765c0..d028ae8082 100644
    --- a/nestkernel/recording_backend_memory.cpp
    +++ b/nestkernel/recording_backend_memory.cpp
    @@ -286,7 +286,7 @@ nest::RecordingBackendMemory::DeviceData::set_status( const dictionary& d )
         time_in_steps_ = time_in_steps;
       }
     
    -  size_t n_events = 1;
    +  long n_events = 1;
       if ( d.update_value( names::n_events, n_events ) and n_events == 0 )
       {
         clear();
    diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp
    index 153296cd52..187b92926d 100644
    --- a/nestkernel/recording_device.cpp
    +++ b/nestkernel/recording_device.cpp
    @@ -109,7 +109,8 @@ nest::RecordingDevice::State_::get( dictionary& d ) const
     void
     nest::RecordingDevice::State_::set( const dictionary& d )
     {
    -  size_t n_events = 0;
    +  long n_events = 0;
    +
       if ( d.update_value( names::n_events, n_events ) )
       {
         if ( n_events != 0 )
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index 6afd930fd8..a45bffeb0e 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -261,8 +261,8 @@ SPManager::disconnect( const index snode_id, Node* target, thread target_thread,
     void
     SPManager::disconnect( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
    -  dictionary& conn_spec,
    -  dictionary& syn_spec )
    +  const dictionary& conn_spec,
    +  const dictionary& syn_spec )
     {
       if ( kernel().connection_manager.connections_have_changed() )
       {
    diff --git a/nestkernel/sp_manager.h b/nestkernel/sp_manager.h
    index b258afcd8d..01896f142a 100644
    --- a/nestkernel/sp_manager.h
    +++ b/nestkernel/sp_manager.h
    @@ -90,7 +90,7 @@ class SPManager : public ManagerInterface
        * \param connectivityParams connectivity Dictionary
        * \param synapseParams synapse parameters Dictionary
        */
    -  void disconnect( NodeCollectionPTR, NodeCollectionPTR, dictionary&, dictionary& );
    +  void disconnect( NodeCollectionPTR, NodeCollectionPTR, const dictionary&, const dictionary& );
     
       /**
        * Disconnect two nodes.
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index 3bb877cd65..b76227b457 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -364,117 +364,89 @@ create_mask( const dictionary& mask_dict )
     {
       mask_dict.init_access_flags();
     
    -  // TODO-PYNEST-NG: move and convert to use dictionary
    -  // // t can be either an existing MaskPTR, or a Dictionary containing
    -  // // mask parameters
    -  // MaskPTR* maskd = dynamic_cast< MaskPTR* >( t.datum() );
    -  // if ( maskd )
    -  // {
    -  //   return *maskd;
    -  // }
    -  // else
    -  // {
    -
    -  //   DictionaryPTR* dd = dynamic_cast< DictionaryPTR* >( t.datum() );
    -  //   if ( dd == 0 )
    -  //   {
    -  //     throw BadProperty( "Mask must be masktype or dictionary." );
    -  //   }
    +  // TODO-PYNEST-NG: move
     
       //   // The dictionary should contain one key which is the name of the
       //   // mask type, and optionally the key 'anchor'. To find the unknown
       //   // mask type key, we must loop through all keys. The value for the
       //   // anchor key will be stored in the anchor_token variable.
    -  //   Token anchor_token;
    -  //   bool has_anchor = false;
    -  //   AbstractMask* mask = 0;
    -
    -  //   for ( Dictionary::iterator dit = ( *dd )->begin(); dit != ( *dd )->end(); ++dit )
    -  //   {
    -
    -  //     if ( dit->first == names::anchor )
    -  //     {
    -
    -  //       anchor_token = dit->second;
    -  //       has_anchor = true;
    -  //     }
    -  //     else
    -  //     {
    -
    -  //       if ( mask )
    -  //       { // mask has already been defined
    -  //         throw BadProperty( "Mask definition dictionary contains extraneous items." );
    -  //       }
    -  //       mask = create_mask( dit->first, getValue< DictionaryPTR >( dit->second ) );
    -  //     }
    -  //   }
    -
    -  //   if ( has_anchor )
    -  //   {
    -
    -  //     // The anchor may be an array of doubles (a spatial position).
    -  //     // For grid layers only, it is also possible to provide an array of longs.
    -  //     try
    -  //     {
    -  //       std::vector< long > anchor = getValue< std::vector< long > >( anchor_token );
    -
    -  //       switch ( anchor.size() )
    -  //       {
    -  //       case 2:
    -  //         try
    -  //         {
    -  //           GridMask< 2 >& grid_mask_2d = dynamic_cast< GridMask< 2 >& >( *mask );
    -  //           grid_mask_2d.set_anchor( Position< 2, int >( anchor[ 0 ], anchor[ 1 ] ) );
    -  //         }
    -  //         catch ( std::bad_cast& e )
    -  //         {
    -  //           throw BadProperty( "Mask must be 2-dimensional grid mask." );
    -  //         }
    -  //         break;
    -  //       case 3:
    -  //         try
    -  //         {
    -  //           GridMask< 3 >& grid_mask_3d = dynamic_cast< GridMask< 3 >& >( *mask );
    -  //           grid_mask_3d.set_anchor( Position< 3, int >( anchor[ 0 ], anchor[ 1 ], anchor[ 2 ] ) );
    -  //         }
    -  //         catch ( std::bad_cast& e )
    -  //         {
    -  //           throw BadProperty( "Mask must be 3-dimensional grid mask." );
    -  //         }
    -  //         break;
    -  //       }
    -  //     }
    -  //     catch ( TypeMismatch& e )
    -  //     {
    -  //       std::vector< double > anchor = getValue< std::vector< double > >( anchor_token );
    -  //       AbstractMask* amask;
    -
    -  //       switch ( anchor.size() )
    -  //       {
    -  //       case 2:
    -  //         amask = new AnchoredMask< 2 >( dynamic_cast< Mask< 2 >& >( *mask ), anchor );
    -  //         break;
    -  //       case 3:
    -  //         amask = new AnchoredMask< 3 >( dynamic_cast< Mask< 3 >& >( *mask ), anchor );
    -  //         break;
    -  //       default:
    -  //         throw BadProperty( "Anchor must be 2- or 3-dimensional." );
    -  //       }
    -
    -  //       delete mask;
    -  //       mask = amask;
    -  //     }
    -  //   }
    -
    -  //   return mask;
    -  // }
    -
    -
    -  MaskPTR datum;
    -
    -  mask_dict.all_entries_accessed( "CreateMask", "params" );
    -
    -  return datum;
    +  std::vector< long > anchor;
    +  bool has_anchor = false;
    +  MaskPTR mask;
    +
    +  for ( auto& kv : mask_dict )
    +  {
    +    if ( kv.first == names::anchor )
    +    {
    +      anchor = mask_dict.get< std::vector< long > >( kv.first );
    +      has_anchor = true;
    +    }
    +    else
    +    {
    +      mask = create_mask( kv.first, mask_dict.get< dictionary >( kv.first ) );
    +    }
    +  }
    +
    +  if ( has_anchor )
    +  {
    +
    +    // The anchor may be an array of doubles (a spatial position).
    +    // For grid layers only, it is also possible to provide an array of longs.
    +    try
    +    {
    +      switch ( anchor.size() )
    +      {
    +      case 2:
    +        try
    +        {
    +          auto grid_mask_2d = dynamic_cast< GridMask< 2 >& >( *mask );
    +          grid_mask_2d.set_anchor( Position< 2, int >( anchor[ 0 ], anchor[ 1 ] ) );
    +        }
    +        catch ( std::bad_cast& e )
    +        {
    +          throw BadProperty( "Mask must be 2-dimensional grid mask." );
    +        }
    +        break;
    +      case 3:
    +        try
    +        {
    +          auto grid_mask_3d = dynamic_cast< GridMask< 3 >& >( *mask );
    +          grid_mask_3d.set_anchor( Position< 3, int >( anchor[ 0 ], anchor[ 1 ], anchor[ 2 ] ) );
    +        }
    +        catch ( std::bad_cast& e )
    +        {
    +          throw BadProperty( "Mask must be 3-dimensional grid mask." );
    +        }
    +        break;
    +      default:
    +        throw BadProperty( "Anchor must be 2- or 3-dimensional." );
    +      }
    +    }
    +    catch ( TypeMismatch& e )
    +    {
    +      std::vector< double > double_anchor = mask_dict.get< std::vector< double > >( names::anchor );
    +      std::shared_ptr< AbstractMask > amask;
    +
    +      switch ( anchor.size() )
    +      {
    +      case 2:
    +        amask = std::shared_ptr< AbstractMask >(
    +          new AnchoredMask< 2 >( dynamic_cast< Mask< 2 >& >( *mask ), double_anchor ) );
    +        break;
    +      case 3:
    +        amask = std::shared_ptr< AbstractMask >(
    +          new AnchoredMask< 3 >( dynamic_cast< Mask< 3 >& >( *mask ), double_anchor ) );
    +        break;
    +      default:
    +        throw BadProperty( "Anchor must be 2- or 3-dimensional." );
    +      }
    +
    +      mask = amask;
    +    }
    +  }
    +  mask_dict.all_entries_accessed( "CreateMask", "mask_dict" );
    +
    +  return mask;
     }
     
     bool
    diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h
    index 87e648c24b..d9f0ef7e4f 100644
    --- a/nestkernel/spatial.h
    +++ b/nestkernel/spatial.h
    @@ -110,7 +110,8 @@ NodeCollectionPTR create_layer( const dictionary& layer_dict );
     std::vector< std::vector< double > > get_position( NodeCollectionPTR layer_nc );
     std::vector< double > get_position( const index node_id );
     std::vector< std::vector< double > > displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc );
    -std::vector< std::vector< double > > displacement( NodeCollectionPTR layer_nc, const std::vector< double > point );
    +std::vector< std::vector< double > > displacement( NodeCollectionPTR layer_nc,
    +  const std::vector< std::vector< double > >& point );
     std::vector< double > distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc );
     std::vector< double > distance( NodeCollectionPTR layer_nc, const std::vector< std::vector< double > >& point );
     std::vector< double > distance( const std::vector< ConnectionID >& conns );
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index 4a1af9b5f4..4052389837 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -25,8 +25,6 @@
     
     import numpy
     
    -from ..ll_api import connect_arrays
    -from .. import pynestkernel as kernel
     from .. import nestkernel_api as nestkernel
     
     from .hl_api_connection_helpers import (_process_input_nodes, _connect_layers_needed,
    @@ -246,7 +244,7 @@ def Connect(pre, post, conn_spec=None, syn_spec=None,
                 syn_param_keys = None
                 syn_param_values = None
     
    -        connect_arrays(pre, post, weights, delays, synapse_model, syn_param_keys, syn_param_values)
    +        nestkernel.ll_api_connect_arrays(pre, post, weights, delays, synapse_model, syn_param_keys, syn_param_values)
             return
     
         if not isinstance(pre, NodeCollection):
    @@ -335,15 +333,9 @@ def Disconnect(pre, post, conn_spec='one_to_one', syn_spec='static_synapse'):
     
         """
     
    -    sps(pre)
    -    sps(post)
    -
         if isinstance(conn_spec, str):
             conn_spec = {'rule': conn_spec}
         if isinstance(syn_spec, str):
             syn_spec = {'synapse_model': syn_spec}
     
    -    sps(conn_spec)
    -    sps(syn_spec)
    -
    -    sr('Disconnect_g_g_D_D')
    +    nestkernel.llapi_disconnect(pre._datum, post._datum, conn_spec, syn_spec)
    diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py
    index 78bef2a1aa..6960ab6678 100644
    --- a/pynest/nest/lib/hl_api_helper.py
    +++ b/pynest/nest/lib/hl_api_helper.py
    @@ -438,7 +438,6 @@ def restructure_data(result, keys):
                         final_result.append(result_dict[keys])
                     elif keys in all_keys:
                         final_result.append(None)
    -            final_result = tuple(final_result)
             else:
                 final_result = result[0][keys]
     
    @@ -577,7 +576,7 @@ def __enter__(self):
         def __exit__(self, *args):
     
             # Reset the verbosity level and deprecation warning status
    -        sr("{} setverbosity".format((self._verbosity_level)))
    +        #sr("{} setverbosity".format((self._verbosity_level)))
     
             for func_name, deprec_dict in self._deprecation_status.items():
                 _deprecation_warning[func_name]['deprecation_issued'] = (
    diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py
    index bbfe696ac1..21e11fc3d1 100644
    --- a/pynest/nest/lib/hl_api_info.py
    +++ b/pynest/nest/lib/hl_api_info.py
    @@ -178,8 +178,9 @@ def get_verbosity():
             The current verbosity level
         """
     
    -    sr('verbosity')
    -    return spp()
    +    #sr('verbosity')
    +    #return spp()
    +    pass  # TODO-PYNEST-NG: See set_verbosity
     
     
     def set_verbosity(level):
    @@ -208,7 +209,7 @@ def set_verbosity(level):
         # TODO-PYNEST-NG: There are no SLI messages anymore, so verbosity
         #                 is now irrelevant and should be replaced when a
         #                 replacement for message() exists.
    -    
    +
         # sr("{} setverbosity".format(level))
         pass
     
    @@ -273,7 +274,7 @@ def SetStatus(nodes, params, val=None):
     
         if not isinstance(nodes, (nest.NodeCollection, nest.SynapseCollection)):
             raise TypeError("'nodes' must be NodeCollection or a SynapseCollection.")
    -    
    +
         if isinstance(params, str) and val is not None:
             params = {params: val}
     
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index 237bcc1fe4..b4d25e46bf 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -101,6 +101,13 @@ def Create(model, n=1, params=None, positions=None):
         if isinstance(params, dict) and params:  # if params is a dict and not empty
             iterable_or_parameter_in_params = any(is_iterable(v) or isinstance(v, Parameter) for k, v in params.items())
     
    +    if isinstance(params, (list, tuple)) and len(params) != n:
    +        raise TypeError('list of params must have one dictionary per node')
    +
    +    if params is not None and not (isinstance(params, dict) or (isinstance(params, (list, tuple))
    +                                                                and all(isinstance(e, dict) for e in params))):
    +        raise TypeError('params must be either a dict of parameters or a list or tuple of dicts')
    +
         if positions is not None:
             # Explicitly retrieve lazy loaded spatial property from the module class.
             # This is needed because the automatic lookup fails. See #2135.
    @@ -121,9 +128,9 @@ def Create(model, n=1, params=None, positions=None):
                     raise kernel.NESTError('Cannot specify number of nodes with grid positions')
                 layer_specs['shape'] = positions.shape
                 if positions.center is not None:
    -                layer_specs['center'] = positions.center
    +                layer_specs['center'] = [float(v) for v in positions.center]
             if positions.extent is not None:
    -            layer_specs['extent'] = positions.extent
    +            layer_specs['extent'] = [float(v) for v in positions.extent]
     
             layer = nestkernel.llapi_create_spatial(layer_specs)
             layer.set(params if params else {})
    @@ -131,7 +138,8 @@ def Create(model, n=1, params=None, positions=None):
     
         node_ids = nestkernel.llapi_create(model, n)
     
    -    if isinstance(params, dict) and params:  # if params is a dict and not empty
    +    if (isinstance(params, dict) and params) or isinstance(params, (list, tuple)):
    +        # if params is a dict and not empty or a list of dicts
             try:
                 node_ids.set(params)
             except Exception:
    diff --git a/pynest/nest/lib/hl_api_spatial.py b/pynest/nest/lib/hl_api_spatial.py
    index 24986d5308..f2e49cc06e 100644
    --- a/pynest/nest/lib/hl_api_spatial.py
    +++ b/pynest/nest/lib/hl_api_spatial.py
    @@ -26,7 +26,6 @@
     
     import numpy as np
     
    -from .. import pynestkernel as kernel
     from .. import nestkernel_api as nestkernel
     from .hl_api_helper import is_iterable
     from .hl_api_connections import GetConnections
    @@ -312,7 +311,7 @@ def Displacement(from_arg, to_arg):
                 len(from_arg) == len(to_arg)):
             raise ValueError("to_arg and from_arg must have same size unless one have size 1.")
     
    -    return sli_func('Displacement', from_arg, to_arg)
    +    return nestkernel.llapi_displacement(from_arg, to_arg)
     
     
     def Distance(from_arg, to_arg):
    @@ -380,7 +379,7 @@ def Distance(from_arg, to_arg):
                 len(from_arg) == len(to_arg)):
             raise ValueError("to_arg and from_arg must have same size unless one have size 1.")
     
    -    return sli_func('Distance', from_arg, to_arg)
    +    return nestkernel.llapi_spatial_distance(from_arg, to_arg)
     
     
     def FindNearestElement(layer, locations, find_all=False):
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index fb3ee4a6a7..3158dd7eac 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -481,7 +481,6 @@ def set(self, params=None, **kwargs):
     
             print("### 2", params)
     
    -        print(params)
             nestkernel.llapi_set_nc_status(self._datum, params)
     
         def tolist(self):
    @@ -1032,7 +1031,7 @@ def __truediv__(self, other):
             return nestkernel.llapi_divide_parameter(self._datum, self._arg_as_parameter(other)._datum)
     
         def __pow__(self, exponent):
    -        return nestkernel.llapi_pow_parameter(self._datum, self._arg_as_parameter(float(exponent))._datum)
    +        return nestkernel.llapi_pow_parameter(self._datum, float(exponent))
     
         def __lt__(self, other):
             return nestkernel.llapi_compare_parameter(self._datum, self._arg_as_parameter(other)._datum, {'comparator': 0})
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index 0ee38bfcde..b5e521513b 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -53,7 +53,6 @@
     
     __all__ = [
         'check_stack',
    -    'connect_arrays',
         'set_communicator',
         # 'take_array_index',
         'KernelAttribute',
    @@ -63,7 +62,7 @@
     engine = kernel.NESTEngine()
     
     # take_array_index = engine.take_array_index
    -connect_arrays = engine.connect_arrays
    +# connect_arrays = engine.connect_arrays
     
     
     initialized = False
    diff --git a/pynest/nest/random/hl_api_random.py b/pynest/nest/random/hl_api_random.py
    index 3be383b2c2..56370a459c 100644
    --- a/pynest/nest/random/hl_api_random.py
    +++ b/pynest/nest/random/hl_api_random.py
    @@ -53,7 +53,7 @@ def uniform(min=0.0, max=1.0):
         Parameter:
             Object yielding values drawn from the distribution.
         """
    -    return CreateParameter('uniform', {'min': min, 'max': max})
    +    return CreateParameter('uniform', {'min': float(min), 'max': float(max)})
     
     
     def uniform_int(max):
    @@ -91,7 +91,7 @@ def normal(mean=0.0, std=1.0):
         Parameter:
             Object yielding values drawn from the distribution.
         """
    -    return CreateParameter('normal', {'mean': mean, 'std': std})
    +    return CreateParameter('normal', {'mean': float(mean), 'std': float(std)})
     
     
     def exponential(beta=1.0):
    @@ -108,7 +108,7 @@ def exponential(beta=1.0):
         Parameter:
             Object yielding values drawn from the distribution.
         """
    -    return CreateParameter('exponential', {'beta': beta})
    +    return CreateParameter('exponential', {'beta': float(beta)})
     
     
     def lognormal(mean=0.0, std=1.0):
    @@ -127,4 +127,4 @@ def lognormal(mean=0.0, std=1.0):
         Parameter:
             Object yielding values drawn from the distribution.
         """
    -    return CreateParameter('lognormal', {'mean': mean, 'std': std})
    +    return CreateParameter('lognormal', {'mean': float(mean), 'std': float(std)})
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 842421a2a6..8b4681d2b6 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -93,7 +93,7 @@ cdef extern from "nest.h" namespace "nest":
         void init_nest( int* argc, char** argv[] )
         void reset_kernel()
         NodeCollectionPTR create( const string model_name, const long n ) except +
    -    NodeCollectionPTR create_spatial( const dictionary& )
    +    NodeCollectionPTR create_spatial( const dictionary& ) except +
     
         NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except +
     
    @@ -107,6 +107,10 @@ cdef extern from "nest.h" namespace "nest":
                      NodeCollectionPTR targets,
                      const dictionary& connectivity,
                      const vector[dictionary]& synapse_params ) except +
    +    void disconnect(NodeCollectionPTR sources,
    +                 NodeCollectionPTR targets,
    +                 const dictionary& connectivity,
    +                 const dictionary& synapse_params) except +
         int get_rank() except +
         int get_num_mpi_processes() except +
         string print_nodes_to_string()
    @@ -141,5 +145,10 @@ cdef extern from "nest.h" namespace "nest":
     # PYNEST-NG: Move these global functions to nest.h?
     cdef extern from "spatial.h" namespace "nest":
         vector[vector[double]] get_position( NodeCollectionPTR layer_nc ) except +
    +    vector[double] distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) except +
    +    vector[double] distance( NodeCollectionPTR layer_nc, const vector[vector[double]]& point ) except +
         vector[double] distance( const vector[ConnectionID]& conns ) except +
    +    vector[vector[double]] displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) except +
    +    vector[vector[double]] displacement( NodeCollectionPTR layer_nc, const vector[vector[double]]& point ) except +
    +
         void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ) except +
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index dfd7459147..3c6eae18a3 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -174,7 +174,10 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
                 cdict[pystr_to_string(key)] = pylist_or_ndarray_to_doublevec(value)
             elif is_list_tuple_ndarray_of_int(value):
                 cdict[pystr_to_string(key)] = pylist_to_intvec(value)
    -        elif type(value) is list and type(value[0]) is list:
    +        elif type(value) is list and isinstance(value[0], (list, tuple)):
    +            cdict[pystr_to_string(key)] = list_of_list_to_doublevec(value)
    +        elif type(value) is list and isinstance(value[0], numpy.ndarray):
    +            print("list of np arrays")
                 cdict[pystr_to_string(key)] = list_of_list_to_doublevec(value)
             elif type(value) is list and type(value[0]) is str:
                 cdict[pystr_to_string(key)] = pylist_to_stringvec(value)
    @@ -189,6 +192,8 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
             elif type(value) is ParameterObject:
                 cdict[pystr_to_string(key)] = (<ParameterObject>value).thisptr
             else:
    +            if type(value) is list:
    +                print("list of ", type(value[0]))
                 raise AttributeError(f'when converting Python dictionary: value of key ({key}) is not a known type, got {type(value)}')
         return cdict
     
    @@ -278,6 +283,28 @@ def llapi_get_position(NodeCollectionObject layer):
         else:
             return result
     
    +@catch_cpp_error
    +def llapi_spatial_distance(object from_arg, to_arg):
    +    cdef vector[vector[double]] from_vec
    +    if isinstance(from_arg, nest.NodeCollection):
    +        return distance((<NodeCollectionObject>(to_arg._datum)).thisptr, (<NodeCollectionObject>(from_arg._datum)).thisptr)
    +    elif isinstance(from_arg, (list, tuple)):
    +        from_vec = from_arg
    +        return distance((<NodeCollectionObject>(to_arg._datum)).thisptr, from_vec)
    +    else:
    +        raise TypeError("from_arg must be either a NodeCollection or a list/tuple of positions")
    +
    +@catch_cpp_error
    +def llapi_displacement(object from_arg, to_arg):
    +    cdef vector[vector[double]] from_vec
    +    if isinstance(from_arg, nest.NodeCollection):
    +        return displacement((<NodeCollectionObject>(to_arg._datum)).thisptr, (<NodeCollectionObject>(from_arg._datum)).thisptr)
    +    elif isinstance(from_arg, (list, tuple)):
    +        from_vec = from_arg
    +        return displacement((<NodeCollectionObject>(to_arg._datum)).thisptr, from_vec)
    +    else:
    +        raise TypeError("from_arg must be either a NodeCollection or a list/tuple of positions")
    +
     @catch_cpp_error
     def llapi_distance(object conn):  # PYNEST-NG: should there be a SynapseCollectionObject?
         cdef vector[ConnectionID] conn_vec
    @@ -304,13 +331,9 @@ def llapi_make_nodecollection(object node_ids):
     
     @catch_cpp_error
     def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params):
    -    print("aaaaaaaaa", conn_params)
    -    print("bbbbbbbbb", synapse_params)
         conn_params = conn_params if conn_params is not None else {}
         synapse_params = synapse_params if synapse_params is not None else {}
     
    -    print(type(synapse_params))
    -
         if ("rule" in conn_params and conn_params["rule"] is None) or "rule" not in conn_params:
             conn_params["rule"] = "all_to_all"
     
    @@ -319,7 +342,6 @@ def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object co
     
         cdef vector[dictionary] syn_param_vec
         if isinstance(synapse_params, nest.CollocatedSynapses):
    -        print(synapse_params.syn_specs)
             syn_param_vec = pylist_to_dictvec(synapse_params.syn_specs)
         elif synapse_params is not None:
             syn_param_vec.push_back(pydict_to_dictionary(synapse_params))
    @@ -328,6 +350,22 @@ def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object co
                 pydict_to_dictionary(conn_params),
                 syn_param_vec)
     
    +@catch_cpp_error
    +def llapi_disconnect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params):
    +    conn_params = conn_params if conn_params is not None else {}
    +    synapse_params = synapse_params if synapse_params is not None else {}
    +
    +    if ("rule" in conn_params and conn_params["rule"] is None) or "rule" not in conn_params:
    +        conn_params["rule"] = "all_to_all"
    +
    +    if synapse_params is dict and "synapse_model" not in synapse_params:
    +        synapse_params["synapse_model"] = "static_synapse"
    +
    +    disconnect(pre.thisptr, post.thisptr,
    +            pydict_to_dictionary(conn_params),
    +            pydict_to_dictionary(synapse_params))
    +
    +@catch_cpp_error
     def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, object projections):
         print("### 9", projections)
         connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections))
    @@ -673,3 +711,71 @@ def llapi_set_connection_status(object conns, object params):
             set_connection_status(conn_deque, list_of_dict_to_vec(params))
         else:
             raise TypeError('params must be a dict or a list of dicts')
    +
    +
    +@catch_cpp_error
    +def ll_api_connect_arrays(sources, targets, weights, delays, synapse_model, syn_param_keys, syn_param_values):
    +    """Calls connect_arrays function, bypassing SLI to expose pointers to the NumPy arrays"""
    +
    +    if not (isinstance(sources, numpy.ndarray) and sources.ndim == 1) or not numpy.issubdtype(sources.dtype, numpy.integer):
    +        raise TypeError('sources must be a 1-dimensional NumPy array of integers')
    +    if not (isinstance(targets, numpy.ndarray) and targets.ndim == 1) or not numpy.issubdtype(targets.dtype, numpy.integer):
    +        raise TypeError('targets must be a 1-dimensional NumPy array of integers')
    +    if weights is not None and not (isinstance(weights, numpy.ndarray) and weights.ndim == 1):
    +        raise TypeError('weights must be a 1-dimensional NumPy array')
    +    if delays is not None and  not (isinstance(delays, numpy.ndarray) and delays.ndim == 1):
    +        raise TypeError('delays must be a 1-dimensional NumPy array')
    +    if syn_param_keys is not None and not ((isinstance(syn_param_keys, numpy.ndarray) and syn_param_keys.ndim == 1) and
    +                                            numpy.issubdtype(syn_param_keys.dtype, numpy.string_)):
    +        raise TypeError('syn_param_keys must be a 1-dimensional NumPy array of strings')
    +    if syn_param_values is not None and not ((isinstance(syn_param_values, numpy.ndarray) and syn_param_values.ndim == 2)):
    +        raise TypeError('syn_param_values must be a 2-dimensional NumPy array')
    +
    +    if not len(sources) == len(targets):
    +        raise ValueError('Sources and targets must be arrays of the same length.')
    +    if weights is not None:
    +        if not len(sources) == len(weights):
    +            raise ValueError('weights must be an array of the same length as sources and targets.')
    +    if delays is not None:
    +        if not len(sources) == len(delays):
    +            raise ValueError('delays must be an array of the same length as sources and targets.')
    +    if syn_param_values is not None:
    +        if not len(syn_param_keys) == syn_param_values.shape[0]:
    +            raise ValueError('syn_param_values must be a matrix with one array per key in syn_param_keys.')
    +        if not len(sources) == syn_param_values.shape[1]:
    +            raise ValueError('syn_param_values must be a matrix with arrays of the same length as sources and targets.')
    +
    +    # Get pointers to the first element in each NumPy array
    +    cdef long[::1] sources_mv = numpy.ascontiguousarray(sources, dtype=numpy.int64)
    +    cdef long* sources_ptr = &sources_mv[0]
    +
    +    cdef long[::1] targets_mv = numpy.ascontiguousarray(targets, dtype=numpy.int64)
    +    cdef long* targets_ptr = &targets_mv[0]
    +
    +    cdef double[::1] weights_mv
    +    cdef double* weights_ptr = NULL
    +    if weights is not None:
    +        weights_mv = numpy.ascontiguousarray(weights, dtype=numpy.double)
    +        weights_ptr = &weights_mv[0]
    +
    +    cdef double[::1] delays_mv
    +    cdef double* delays_ptr = NULL
    +    if delays is not None:
    +        delays_mv = numpy.ascontiguousarray(delays, dtype=numpy.double)
    +        delays_ptr = &delays_mv[0]
    +
    +    # Storing parameter keys in a vector of strings
    +    cdef vector[string] param_keys_ptr
    +    if syn_param_keys is not None:
    +        for i, key in enumerate(syn_param_keys):
    +            param_keys_ptr.push_back(key)
    +
    +    cdef double[:, ::1] param_values_mv
    +    cdef double* param_values_ptr = NULL
    +    if syn_param_values is not None:
    +        param_values_mv = numpy.ascontiguousarray(syn_param_values, dtype=numpy.double)
    +        param_values_ptr = &param_values_mv[0][0]
    +
    +    cdef string syn_model_string = synapse_model.encode('UTF-8')
    +
    +    connect_arrays( sources_ptr, targets_ptr, weights_ptr, delays_ptr, param_keys_ptr, param_values_ptr, len(sources), syn_model_string )
    
    From 6a06921defbc0dbc634d47b7e45d4a610119a31c Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Fri, 2 Dec 2022 15:03:56 +0100
    Subject: [PATCH 098/375] Updated tests for new pynest
    
    ---
     testsuite/pytests/test_NodeCollection.py      | 16 +++++------
     testsuite/pytests/test_clopath_synapse.py     |  4 +--
     testsuite/pytests/test_compartmental_model.py | 20 ++++++-------
     testsuite/pytests/test_connect_arrays.py      |  8 +++---
     testsuite/pytests/test_create.py              | 14 +++++-----
     .../test_current_recording_generators.py      | 20 ++++++-------
     testsuite/pytests/test_errors.py              |  4 +--
     testsuite/pytests/test_getconnections.py      | 24 ++++++++--------
     testsuite/pytests/test_jonke_synapse.py       |  5 ++--
     testsuite/pytests/test_mc_neuron.py           | 28 ++++++++++---------
     testsuite/pytests/test_multiple_synapses.py   |  2 +-
     testsuite/pytests/test_nodeParametrization.py |  4 +--
     testsuite/pytests/test_parrot_neuron.py       | 15 ++++++----
     testsuite/pytests/test_parrot_neuron_ps.py    | 19 +++++++++----
     .../test_poisson_generator_rate_change.py     |  4 +--
     testsuite/pytests/test_pp_psc_delta_stdp.py   |  8 +++---
     testsuite/pytests/test_rate_neuron.py         | 19 +++++++------
     .../pytests/test_recording_backend_ascii.py   |  8 +++---
     .../pytests/test_recording_backend_memory.py  | 23 ++++++++-------
     testsuite/pytests/test_refractory.py          |  6 ++--
     .../test_SynapseCollection_distance.py        |  2 +-
     testsuite/pytests/test_spatial/test_basics.py | 10 +++----
     .../test_spatial/test_create_spatial.py       | 10 +++----
     .../test_layer_GetStatus_SetStatus.py         | 16 +++++------
     testsuite/pytests/test_status.py              | 19 +++++--------
     testsuite/pytests/test_stdp_nn_synapses.py    |  8 ++++--
     testsuite/pytests/test_stdp_synapse.py        | 11 +++++---
     .../pytests/test_stdp_triplet_synapse.py      |  2 +-
     testsuite/pytests/test_threads.py             |  4 +--
     testsuite/pytests/test_tsodyks2_synapse.py    |  5 ++--
     testsuite/pytests/test_urbanczik_synapse.py   |  6 ++--
     testsuite/pytests/test_visualization.py       |  4 +--
     .../pytests/test_vogels_sprekeler_synapse.py  |  2 +-
     33 files changed, 183 insertions(+), 167 deletions(-)
    
    diff --git a/testsuite/pytests/test_NodeCollection.py b/testsuite/pytests/test_NodeCollection.py
    index 3b747fd5cc..1f02bb1c63 100644
    --- a/testsuite/pytests/test_NodeCollection.py
    +++ b/testsuite/pytests/test_NodeCollection.py
    @@ -582,8 +582,8 @@ def test_GetConnections(self):
             self.assertEqual(get_conn_all.get('source'), get_conn.get('source'))
             self.assertEqual(get_conn_all.get('target'), get_conn.get('target'))
     
    -        compare_source = (1, 1, 1, 3, 3, 3)
    -        compare_target = (1, 2, 3, 1, 2, 3)
    +        compare_source = [1, 1, 1, 3, 3, 3]
    +        compare_target = [1, 2, 3, 1, 2, 3]
             self.assertEqual(get_conn_some.get('source'), compare_source)
             self.assertEqual(get_conn_some.get('target'), compare_target)
     
    @@ -620,7 +620,7 @@ def test_GetConnections_with_slice(self):
     
             conns = nest.GetConnections(nodes[1:9:3])
             source = conns.get('source')
    -        source_ref = tuple([2] * 11 + [5] * 11 + [8] * 11)
    +        source_ref = [2] * 11 + [5] * 11 + [8] * 11
     
             self.assertEqual(source_ref, source)
     
    @@ -643,19 +643,19 @@ def test_senders_and_targets(self):
             wr = nest.Create('weight_recorder')
             pre = nest.Create("parrot_neuron", 5)
             post = nest.Create("parrot_neuron", 5)
    -        
    +
             # Senders and targets lists empty
             self.assertFalse(nest.GetStatus(wr, "senders"))
             self.assertFalse(nest.GetStatus(wr, "targets"))
    -        
    +
             nest.SetStatus(wr, {"senders": pre[1:3], "targets": post[3:]})
    -        
    +
             gss = nest.GetStatus(wr, "senders")
             gst = nest.GetStatus(wr, "targets")
    -        
    +
             self.assertEqual(gss.tolist(), [3, 4])
             self.assertEqual(gst.tolist(), [10, 11])
    -        
    +
         def test_apply(self):
             """
             NodeCollection apply
    diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py
    index e3972c8941..d6b217fb28 100644
    --- a/testsuite/pytests/test_clopath_synapse.py
    +++ b/testsuite/pytests/test_clopath_synapse.py
    @@ -220,8 +220,8 @@ def test_SynapseFunctionWithAeifModel(self):
     
             # Evaluation
             data = nest.GetStatus(mm)
    -        senders = data[0]['events']['senders']
    -        voltages = data[0]['events']['V_m']
    +        senders = np.array(data[0]['events']['senders'])
    +        voltages = np.array(data[0]['events']['V_m'])
     
             vm1 = voltages[np.where(senders == 1)]
             vm2 = voltages[np.where(senders == 2)]
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index d12c9e2a38..677f1bab4a 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -755,7 +755,7 @@ def test_error_handling(self):
             n_neat = nest.Create('cm_default')
     
             with self.assertRaisesRegex(nest.kernel.NESTError,
    -                                    "UnknownCompartment in SLI function SetStatus_id: "
    +                                    "in llapi_set_nc_status: "
                                         "Compartment 0 , the root, "
                                         "has already been instantiated."):
                 n_neat.compartments = [
    @@ -767,7 +767,7 @@ def test_error_handling(self):
             n_neat = nest.Create('cm_default')
     
             with self.assertRaisesRegex(nest.kernel.NESTError,
    -                                    "UnknownCompartment in SLI function SetStatus_id: "
    +                                    "in llapi_set_nc_status: "
                                         "Compartment 15 does not exist in tree, "
                                         "but was specified as a parent."):
                 n_neat.compartments = [
    @@ -780,7 +780,7 @@ def test_error_handling(self):
             n_neat.compartments = {"parent_idx": -1, "params": SP}
     
             with self.assertRaisesRegex(nest.kernel.NESTError,
    -                                    "UnknownCompartment in SLI function SetStatus_id: "
    +                                    "in llapi_set_nc_status: "
                                         "Compartment 12 does not exist in tree."):
                 n_neat.receptors = {"comp_idx": 12, "receptor_type": "GABA"}
     
    @@ -788,7 +788,7 @@ def test_error_handling(self):
             n_neat = nest.Create('cm_default')
     
             with self.assertRaisesRegex(nest.kernel.NESTError,
    -                                    "UnknownCompartment in SLI function Simulate_d: "
    +                                    "in llapi_simulate: "
                                         "Compartment 0 does not exist in tree, "
                                         "meaning that no compartments have been added."):
                 nest.Simulate(10.)
    @@ -802,9 +802,9 @@ def test_error_handling(self):
             dc = nest.Create('dc_generator', params={'amplitude': 2.0})
     
             with self.assertRaisesRegex(nest.kernel.NESTError,
    -                                    r"UnknownPort in SLI function Connect_g_g_D_D: "
    +                                    r"in llapi_connect: "
                                         r"Port with id 3 does not exist. Valid current "
    -                                    r"receptor ports for cm_default are in \[0, 2\[."):
    +                                    r"receptor ports for cm_default are in \[0, 2\["):
                 nest.Connect(dc, n_neat, syn_spec={'synapse_model': 'static_synapse', 'weight': 1.,
                                                    'receptor_type': 3})
     
    @@ -819,9 +819,9 @@ def test_error_handling(self):
             sg = nest.Create('spike_generator', 1, {'spike_times': [10.]})
     
             with self.assertRaisesRegex(nest.kernel.NESTError,
    -                                    r"UnknownPort in SLI function Connect_g_g_D_D: "
    +                                    r"in llapi_connect: "
                                         r"Port with id 3 does not exist. Valid spike "
    -                                    r"receptor ports for cm_default are in \[0, 3\[."):
    +                                    r"receptor ports for cm_default are in \[0, 3\["):
                 nest.Connect(sg, n_neat, syn_spec={'synapse_model': 'static_synapse', 'weight': 1.,
                                                    'receptor_type': 3})
     
    @@ -831,8 +831,8 @@ def test_error_handling(self):
             mm = nest.Create('multimeter', 1, {'record_from': ['v_comp1'], 'interval': 1.})
     
             with self.assertRaisesRegex(nest.kernel.NESTError,
    -                                    "IllegalConnection in SLI function Connect_g_g_D_D: "
    -                                    "Creation of connection is not possible because:\n"
    +                                    "in llapi_connect: "
    +                                    "Creation of connection is not possible because:"
                                         "Cannot connect with unknown recordable v_comp1"):
                 nest.Connect(mm, n_neat)
     
    diff --git a/testsuite/pytests/test_connect_arrays.py b/testsuite/pytests/test_connect_arrays.py
    index 748d9aa5bd..0b6c10b65a 100644
    --- a/testsuite/pytests/test_connect_arrays.py
    +++ b/testsuite/pytests/test_connect_arrays.py
    @@ -285,10 +285,10 @@ def test_connect_arrays_float_rtype(self):
             syn_model = 'vogels_sprekeler_synapse'
             receptor_type = 1.5*np.ones(len(sources))
     
    -        with self.assertRaises(nest.kernel.NESTErrors.BadParameter):
    +        with self.assertRaises(nest.kernel.NESTError):
                 nest.Connect(sources, targets, conn_spec='one_to_one',
    -                         syn_spec={'weight': weights, 'delay': delays, 'synapse_model': syn_model,
    -                                   'receptor_type': receptor_type})
    +                            syn_spec={'weight': weights, 'delay': delays, 'synapse_model': syn_model,
    +                                    'receptor_type': receptor_type})
     
         def test_connect_arrays_wrong_dtype(self):
             """Raises exception when connecting NumPy arrays with wrong dtype"""
    @@ -314,7 +314,7 @@ def test_connect_arrays_unknown_nodes(self):
             delays = np.ones(len(sources))
             syn_model = 'static_synapse'
     
    -        with self.assertRaises(nest.kernel.NESTErrors.UnknownNode):
    +        with self.assertRaises(nest.kernel.NESTError):
                 nest.Connect(sources, targets, syn_spec={'weight': weights, 'delay': delays,
                                                          'synapse_model': syn_model})
     
    diff --git a/testsuite/pytests/test_create.py b/testsuite/pytests/test_create.py
    index c1ef297ca0..aaf90080eb 100644
    --- a/testsuite/pytests/test_create.py
    +++ b/testsuite/pytests/test_create.py
    @@ -62,18 +62,18 @@ def test_ModelCreateNdict(self):
         def test_erroneous_param_to_create(self):
             """Erroneous param to Create raises exception"""
             num_nodes = 3
    -        nest_errors = nest.kernel.NESTErrors
    -        params = [(tuple(), TypeError),
    -                  ({'V_m': [-50]}, IndexError),
    -                  ({'V_mm': num_nodes*[-50.]}, nest_errors.DictError),
    +        params = [(tuple(), TypeError, False),
    +                  ({'V_m': [-50]}, IndexError, True),
    +                  ({'V_mm': num_nodes*[-50.]}, nest.kernel.NESTError, True),
                       ]
     
    -        for p, err in params:
    +        for p, err, expects_warning in params:
                 with warnings.catch_warnings(record=True) as w:
                     warnings.simplefilter('always')
                     self.assertRaises(err, nest.Create, 'iaf_psc_alpha', num_nodes, p)
    -                self.assertEqual(len(w), 1, 'warning was not issued')
    -                self.assertTrue(issubclass(w[0].category, UserWarning))
    +                if expects_warning:
    +                    self.assertEqual(len(w), 1, 'warning was not issued')
    +                    self.assertTrue(issubclass(w[0].category, UserWarning))
     
         def test_ModelDicts(self):
             """IAF Creation with N and dicts"""
    diff --git a/testsuite/pytests/test_current_recording_generators.py b/testsuite/pytests/test_current_recording_generators.py
    index 53e2979d8b..9b7cd28d76 100644
    --- a/testsuite/pytests/test_current_recording_generators.py
    +++ b/testsuite/pytests/test_current_recording_generators.py
    @@ -133,24 +133,24 @@ def test_RecordedCurrentVectors(self):
     
             # retrieve vectors
             events_Vm = nest.GetStatus(m_Vm)[0]['events']
    -        t_Vm = events_Vm['times']
    -        v_Vm = events_Vm['V_m']
    +        t_Vm = numpy.array(events_Vm['times'])
    +        v_Vm = numpy.array(events_Vm['V_m'])
     
             events_ac = nest.GetStatus(m_ac)[0]['events']
    -        t_ac = events_ac['times']
    -        i_ac = events_ac['I']
    +        t_ac = numpy.array(events_ac['times'])
    +        i_ac = numpy.array(events_ac['I'])
     
             events_dc = nest.GetStatus(m_dc)[0]['events']
    -        t_dc = events_dc['times']
    -        i_dc = events_dc['I']
    +        t_dc = numpy.array(events_dc['times'])
    +        i_dc = numpy.array(events_dc['I'])
     
             events_step = nest.GetStatus(m_step)[0]['events']
    -        t_step = events_step['times']
    -        i_step = events_step['I']
    +        t_step = numpy.array(events_step['times'])
    +        i_step = numpy.array(events_step['I'])
     
             events_noise = nest.GetStatus(m_noise)[0]['events']
    -        t_noise = events_noise['times']
    -        i_noise = events_noise['I']
    +        t_noise = numpy.array(events_noise['times'])
    +        i_noise = numpy.array(events_noise['I'])
     
             # test the length of current vectors
             assert len(i_ac) == len(v_Vm), \
    diff --git a/testsuite/pytests/test_errors.py b/testsuite/pytests/test_errors.py
    index 5977ea2cc3..838398913d 100644
    --- a/testsuite/pytests/test_errors.py
    +++ b/testsuite/pytests/test_errors.py
    @@ -85,7 +85,7 @@ def test_UnknownNode(self):
             nc = nest.Create('iaf_psc_alpha', 10)
             nest.ResetKernel()
     
    -        msg = "UnknownNode"
    +        msg = "99 doesn't exist"
             self.assertRaisesRegex(nest.kernel.NESTError, msg, nest.NodeCollection, [99])
     
         def test_UnknownModel(self):
    @@ -93,7 +93,7 @@ def test_UnknownModel(self):
     
             nest.ResetKernel()
     
    -        msg = "UnknownNode"
    +        msg = "not a known model name"
             self.assertRaisesRegex(nest.kernel.NESTError, msg, nest.Create, "unknown_model")
     
     
    diff --git a/testsuite/pytests/test_getconnections.py b/testsuite/pytests/test_getconnections.py
    index 091e262f01..4c1291bb35 100644
    --- a/testsuite/pytests/test_getconnections.py
    +++ b/testsuite/pytests/test_getconnections.py
    @@ -44,19 +44,19 @@ def test_GetConnections(self):
             c2 = nest.GetConnections(a, synapse_model="static_synapse")
             self.assertEqual(c1, c2)
     
    -        weights = (2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0)
    +        weights = [2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
             d1 = tuple({"weight": w} for w in weights)
     
             c3 = nest.GetConnections(a, a)
             nest.SetStatus(c3, d1)
    -        
    +
             s1 = nest.GetStatus(c3, "weight")
             self.assertEqual(s1, weights)
     
             c4 = nest.GetConnections()
             self.assertEqual(c1, c4)
     
    -        weights = (11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0)
    +        weights = [11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0]
             d1 = tuple({"weight": w} for w in weights)
     
             c5 = nest.GetConnections(a, a)
    @@ -136,17 +136,17 @@ def test_GetConnectionsSynapseModel(self):
                     reference_list += ['static_synapse']
     
                 conns = nest.GetConnections(synapse_model=synapse_model)
    -            self.assertEqual(tuple(reference_list), conns.synapse_model)
    +            self.assertEqual(reference_list, conns.synapse_model)
     
                 # Also test that it works if we specify source/target and synapse_model
                 conns = nest.GetConnections(source=src, target=tgt, synapse_model=synapse_model)
    -            self.assertEqual(tuple(reference_list), conns.synapse_model)
    +            self.assertEqual(reference_list, conns.synapse_model)
     
                 conns = nest.GetConnections(source=src, synapse_model=synapse_model)
    -            self.assertEqual(tuple(reference_list), conns.synapse_model)
    +            self.assertEqual(reference_list, conns.synapse_model)
     
                 conns = nest.GetConnections(target=tgt, synapse_model=synapse_model)
    -            self.assertEqual(tuple(reference_list), conns.synapse_model)
    +            self.assertEqual(reference_list, conns.synapse_model)
     
         def test_GetConnectionsSynapseLabel(self):
             """GetConnections using synapse_label as argument"""
    @@ -178,18 +178,18 @@ def test_GetConnectionsSynapseLabel(self):
                 # corresponding model are returned
                 conns = nest.GetConnections(synapse_label=label)
     
    -            self.assertEqual(tuple(reference_list), conns.synapse_model)
    -            self.assertEqual(tuple(label_list), conns.synapse_label)
    +            self.assertEqual(reference_list, conns.synapse_model)
    +            self.assertEqual(label_list, conns.synapse_label)
     
                 # Also test that it works if we specify source/target and synapse_label
                 conns = nest.GetConnections(source=src, target=tgt, synapse_label=label)
    -            self.assertEqual(tuple(reference_list), conns.synapse_model)
    +            self.assertEqual(reference_list, conns.synapse_model)
     
                 conns = nest.GetConnections(source=src, synapse_label=label)
    -            self.assertEqual(tuple(reference_list), conns.synapse_model)
    +            self.assertEqual(reference_list, conns.synapse_model)
     
                 conns = nest.GetConnections(target=tgt, synapse_label=label)
    -            self.assertEqual(tuple(reference_list), conns.synapse_model)
    +            self.assertEqual(reference_list, conns.synapse_model)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_jonke_synapse.py b/testsuite/pytests/test_jonke_synapse.py
    index 67c6c6eb3d..c812cba368 100644
    --- a/testsuite/pytests/test_jonke_synapse.py
    +++ b/testsuite/pytests/test_jonke_synapse.py
    @@ -149,8 +149,9 @@ def do_the_nest_simulation(self):
             nest.Simulate(self.simulation_duration)
     
             all_spikes = spike_recorder.events
    -        pre_spikes = all_spikes['times'][all_spikes['senders'] == presynaptic_neuron.tolist()[0]]
    -        post_spikes = all_spikes['times'][all_spikes['senders'] == postsynaptic_neuron.tolist()[0]]
    +        senders = np.array(all_spikes['senders'])
    +        pre_spikes = np.array(all_spikes['times'])[senders == presynaptic_neuron.tolist()[0]]
    +        post_spikes = np.array(all_spikes['times'])[senders == postsynaptic_neuron.tolist()[0]]
     
             weight = plastic_synapse_of_interest.weight
             return (pre_spikes, post_spikes, weight)
    diff --git a/testsuite/pytests/test_mc_neuron.py b/testsuite/pytests/test_mc_neuron.py
    index 2c8f89e673..bac9e6938f 100644
    --- a/testsuite/pytests/test_mc_neuron.py
    +++ b/testsuite/pytests/test_mc_neuron.py
    @@ -22,8 +22,10 @@
     import unittest
     import nest
     import numpy as np
    +import numpy.testing as np_testing
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +# HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = True
     
     
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
    @@ -136,23 +138,23 @@ def testNeuron(self):
             nest.Simulate(self.t_stim)
             rec = nest.GetStatus(self.mm)[0]['events']
             # test membrane potential recorded in the soma
    -        self.assertTrue(np.allclose(rec['V_m.s'][self.I0:self.I1],
    -                                    self.Vm_soma_test))
    +        np_testing.assert_allclose(rec['V_m.s'][self.I0:self.I1],
    +                                   self.Vm_soma_test, rtol=1e-4)
             # test membrane potential in the proximal compartment
    -        self.assertTrue(np.allclose(rec['V_m.p'][self.I0:self.I1],
    -                                    self.Vm_prox_test))
    +        np_testing.assert_allclose(rec['V_m.p'][self.I0:self.I1],
    +                                   self.Vm_prox_test, rtol=1e-4)
             # test membrane potential in the distal compartment
    -        self.assertTrue(np.allclose(rec['V_m.d'][self.I0:self.I1],
    -                                    self.Vm_dist_test))
    +        np_testing.assert_allclose(rec['V_m.d'][self.I0:self.I1],
    +                                   self.Vm_dist_test, rtol=1e-4)
             # test conductance recorded in the soma
    -        self.assertTrue(np.allclose(rec['g_ex.s'][self.I0:self.I1],
    -                                    self.gex_soma_test))
    +        np_testing.assert_allclose(rec['g_ex.s'][self.I0:self.I1],
    +                                   self.gex_soma_test, rtol=1e-4)
             # test conductance in the proximal compartment
    -        self.assertTrue(np.allclose(rec['g_ex.p'][self.I0:self.I1],
    -                                    self.gex_prox_test))
    +        np_testing.assert_allclose(rec['g_ex.p'][self.I0:self.I1],
    +                                   self.gex_prox_test, rtol=1e-4)
             # test conductance in the distal compartment
    -        self.assertTrue(np.allclose(rec['g_ex.d'][self.I0:self.I1],
    -                                    self.gex_dist_test))
    +        np_testing.assert_allclose(rec['g_ex.d'][self.I0:self.I1],
    +                                   self.gex_dist_test, rtol=1e-4)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_multiple_synapses.py b/testsuite/pytests/test_multiple_synapses.py
    index 8a8cbb19d6..97261a497c 100644
    --- a/testsuite/pytests/test_multiple_synapses.py
    +++ b/testsuite/pytests/test_multiple_synapses.py
    @@ -57,7 +57,7 @@ def test_MultipleSynapses(self):
             self.assertEqual(2, nest.num_connections)
     
             conns = nest.GetConnections()
    -        self.assertEqual((-2, 3), conns.weight)
    +        self.assertEqual([-2, 3], conns.weight)
     
         def test_MultipleSynapses_one_to_one(self):
             """Test co-location of synapses when we use one_to_one as connection rule"""
    diff --git a/testsuite/pytests/test_nodeParametrization.py b/testsuite/pytests/test_nodeParametrization.py
    index 4cb26b4977..f1a02de463 100644
    --- a/testsuite/pytests/test_nodeParametrization.py
    +++ b/testsuite/pytests/test_nodeParametrization.py
    @@ -189,8 +189,8 @@ def test_SetStatus_with_dict_with_lists(self):
         def test_SetStatus_with_dict_with_single_element_lists(self):
             """Test SetStatus with dict with single element lists"""
             node = nest.Create('iaf_psc_alpha')
    -        Vm_ref = (-13.,)
    -        Cm_ref = (222.,)
    +        Vm_ref = -13.
    +        Cm_ref = 222.
             nest.SetStatus(node, {'V_m': [-13.], 'C_m': [222.]})
     
             self.assertAlmostEqual(nest.GetStatus(node, 'V_m'), Vm_ref)
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index 88bc0098f9..cfccb87eb5 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -25,6 +25,7 @@
     import nest
     import unittest
     import math
    +import numpy as np
     
     
     @nest.ll_api.check_stack
    @@ -56,8 +57,9 @@ def test_ParrotNeuronRepeatSpike(self):
     
             # get spike from parrot neuron
             events = nest.GetStatus(self.spikes)[0]["events"]
    -        post_time = events['times'][
    -            events['senders'] == self.parrot[0].get('global_id')]
    +        times = np.array(events['times'])
    +        senders = np.array(events['senders'])
    +        post_time = times[senders == self.parrot[0].get('global_id')]
     
             # assert spike was repeated at correct time
             assert post_time, "Parrot neuron failed to repeat spike."
    @@ -74,8 +76,9 @@ def test_ParrotNeuronIgnoreSpike(self):
     
             # get spike from parrot neuron, assert it was ignored
             events = nest.GetStatus(self.spikes)[0]["events"]
    -        post_time = events['times'][
    -            events['senders'] == self.parrot.get('global_id')]
    +        times = np.array(events['times'])
    +        senders = np.array(events['senders'])
    +        post_time = times[senders == self.parrot.get('global_id')]
             assert len(post_time) == 0, \
                 "Parrot neuron failed to ignore spike arriving on port 1"
     
    @@ -94,8 +97,8 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
     
             # get spikes from parrot neuron, assert two were transmitted
             events = nest.GetStatus(self.spikes)[0]["events"]
    -        post_times = events['times'][
    -            events['senders'] == self.parrot.get('global_id')]
    +        post_times = np.array(events['times'])[
    +            np.array(events['senders']) == self.parrot.get('global_id')]
             assert len(post_times) == 2 and post_times[0] == post_times[1], \
                 "Parrot neuron failed to correctly repeat multiple spikes."
     
    diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index 89087a49b0..e2324487c9 100644
    --- a/testsuite/pytests/test_parrot_neuron_ps.py
    +++ b/testsuite/pytests/test_parrot_neuron_ps.py
    @@ -25,6 +25,7 @@
     import nest
     import unittest
     import math
    +import numpy as np
     
     
     def _round_up(simtime):
    @@ -66,8 +67,10 @@ def test_ParrotNeuronRepeatSpike(self):
     
             # get spike from parrot neuron
             events = nest.GetStatus(self.spikes)[0]["events"]
    -        post_time = events['times'][
    -            events['senders'] == self.parrot[0].get('global_id')]
    +        times = np.array(events['times'])
    +        senders = np.array(events['senders'])
    +        post_time = times[
    +            senders == self.parrot[0].get('global_id')]
     
             # assert spike was repeated at correct time
             assert post_time, "Parrot neuron failed to repeat spike."
    @@ -84,8 +87,10 @@ def test_ParrotNeuronIgnoreSpike(self):
     
             # get spike from parrot neuron, assert it was ignored
             events = nest.GetStatus(self.spikes)[0]["events"]
    -        post_time = events['times'][
    -            events['senders'] == self.parrot.get('global_id')]
    +        times = np.array(events['times'])
    +        senders = np.array(events['senders'])
    +        post_time = times[
    +            senders == self.parrot.get('global_id')]
             assert len(post_time) == 0, \
                 "Parrot neuron failed to ignore spike arriving on port 1"
     
    @@ -104,8 +109,10 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
     
             # get spikes from parrot neuron, assert two were transmitted
             events = nest.GetStatus(self.spikes)[0]["events"]
    -        post_times = events['times'][
    -            events['senders'] == self.parrot.get('global_id')]
    +        times = np.array(events['times'])
    +        senders = np.array(events['senders'])
    +        post_times = times[
    +            senders == self.parrot.get('global_id')]
             assert len(post_times) == 2 and post_times[0] == post_times[1], \
                 "Parrot neuron failed to correctly repeat multiple spikes."
     
    diff --git a/testsuite/pytests/test_poisson_generator_rate_change.py b/testsuite/pytests/test_poisson_generator_rate_change.py
    index 39e4325f0b..87d90fe396 100644
    --- a/testsuite/pytests/test_poisson_generator_rate_change.py
    +++ b/testsuite/pytests/test_poisson_generator_rate_change.py
    @@ -30,8 +30,8 @@ class TestPgRateChange(unittest.TestCase):
     
         def _kstest_first_spiketimes(self, sr, start_t, expon_scale, resolution, p_value_lim):
             events = nest.GetStatus(sr)[0]['events']
    -        senders = events['senders']
    -        times = events['times']
    +        senders = np.array(events['senders'])
    +        times = np.array(events['times'])
             min_times = [np.min(times[np.where(senders == s)])
                          for s in np.unique(senders)]
             d, p_val = scipy.stats.kstest(
    diff --git a/testsuite/pytests/test_pp_psc_delta_stdp.py b/testsuite/pytests/test_pp_psc_delta_stdp.py
    index ae132cebc8..9fbf8dbbc8 100644
    --- a/testsuite/pytests/test_pp_psc_delta_stdp.py
    +++ b/testsuite/pytests/test_pp_psc_delta_stdp.py
    @@ -59,13 +59,13 @@ def test_pp_psc_delta_stdp(self):
     
             w1 = np.zeros(nsteps+1)
             w2 = np.zeros(nsteps+1)
    -        w1[0] = nest.GetStatus(conn1, keys=['weight'])[0][0]
    -        w2[0] = nest.GetStatus(conn2, keys=['weight'])[0][0]
    +        w1[0] = conn1.weight
    +        w2[0] = conn2.weight
     
             for i in range(nsteps):
                 nest.Simulate(Dt)
    -            w1[i+1] = nest.GetStatus(conn1, keys=['weight'])[0][0]
    -            w2[i+1] = nest.GetStatus(conn2, keys=['weight'])[0][0]
    +            w1[i+1] = conn1.weight
    +            w2[i+1] = conn2.weight
     
             self.assertEqual(list(w1), list(w2))
     
    diff --git a/testsuite/pytests/test_rate_neuron.py b/testsuite/pytests/test_rate_neuron.py
    index caf5c483ae..6d3b73aad4 100644
    --- a/testsuite/pytests/test_rate_neuron.py
    +++ b/testsuite/pytests/test_rate_neuron.py
    @@ -73,14 +73,15 @@ def test_RateNeuronMean(self):
     
             # get noise from rate neurons
             events = nest.GetStatus(self.multimeter)[0]["events"]
    -        senders = events['senders']
    +        senders = np.array(events['senders'])
    +        rate = np.array(events['rate'])
             senders_ipn = np.where(
                 senders == self.rate_neuron_ipn.get('global_id'))[0]
             senders_opn = np.where(
                 senders == self.rate_neuron_opn.get('global_id'))[0]
     
    -        mean_rate_ipn = np.mean(events['rate'][senders_ipn])
    -        mean_rate_opn = np.mean(events['rate'][senders_opn])
    +        mean_rate_ipn = np.mean(rate[senders_ipn])
    +        mean_rate_opn = np.mean(rate[senders_opn])
     
             self.assertTrue(
                 np.isclose(mean_rate_ipn, self.neuron_params['mu'],
    @@ -97,15 +98,16 @@ def test_RateNeuronNoise(self):
     
             # get noise from rate neurons
             events = nest.GetStatus(self.multimeter)[0]["events"]
    -        senders = events['senders']
    +        senders = np.array(events['senders'])
    +        noise = np.array(events['noise'])
             senders_ipn = np.where(
                 senders == self.rate_neuron_ipn.get('global_id'))[0]
             senders_opn = np.where(
                 senders == self.rate_neuron_opn.get('global_id'))[0]
     
    -        noise_ipn = events['noise'][senders_ipn]
    +        noise_ipn = noise[senders_ipn]
             std_noise_ipn = np.std(noise_ipn)
    -        noise_opn = events['noise'][senders_opn]
    +        noise_opn = noise[senders_opn]
             std_noise_opn = np.std(noise_opn)
     
             self.assertTrue(
    @@ -123,11 +125,12 @@ def test_RateNeuronVariance(self):
     
             # get variance of the rate
             events = nest.GetStatus(self.multimeter)[0]["events"]
    -        senders = events['senders']
    +        senders = np.array(events['senders'])
    +        rate = np.array(events['rate'])
             senders_ipn = np.where(
                 senders == self.rate_neuron_ipn.get('global_id'))[0]
     
    -        rate = events['rate'][senders_ipn]
    +        rate = rate[senders_ipn]
             var_rate = np.var(rate)
     
             # expected variance
    diff --git a/testsuite/pytests/test_recording_backend_ascii.py b/testsuite/pytests/test_recording_backend_ascii.py
    index 667f3e5298..a3284717e8 100644
    --- a/testsuite/pytests/test_recording_backend_ascii.py
    +++ b/testsuite/pytests/test_recording_backend_ascii.py
    @@ -46,7 +46,7 @@ def testAAAOverwriteFiles(self):
             mm = nest.Create("multimeter", params=mm_params)
             nest.Connect(mm, nest.Create("iaf_psc_alpha"))
     
    -        with self.assertRaises(nest.kernel.NESTErrors.IOError):
    +        with self.assertRaises(nest.kernel.NESTError):
                 nest.Simulate(100)
     
             nest.Cleanup()
    @@ -76,7 +76,7 @@ def testDataPrefixDataPathAndFilenameExtension(self):
                 "record_from": ["V_m"],
                 "file_extension": file_extension,
             }
    -        mm = nest.Create("multimeter", mm_params)
    +        mm = nest.Create("multimeter", params=mm_params)
             fname = mm.get("filenames")[0]
     
             self.assertTrue(data_path in fname)
    @@ -95,7 +95,7 @@ def testLabel(self):
                 "record_from": ["V_m"],
                 "label": label,
             }
    -        mm = nest.Create("multimeter", mm_params)
    +        mm = nest.Create("multimeter", params=mm_params)
             fname = mm.get("filenames")[0]
     
             self.assertTrue(label in fname)
    @@ -174,7 +174,7 @@ def testResetEventCounter(self):
             nest.Simulate(15)
     
             # Check that an error is raised when setting n_events to a number != 0
    -        with self.assertRaises(nest.kernel.NESTErrors.BadProperty):
    +        with self.assertRaises(nest.kernel.NESTError):
                 mm.n_events = 10
     
             # Check that the event counter was indeed not changed
    diff --git a/testsuite/pytests/test_recording_backend_memory.py b/testsuite/pytests/test_recording_backend_memory.py
    index c404a89c8a..ebe5e3ee8b 100644
    --- a/testsuite/pytests/test_recording_backend_memory.py
    +++ b/testsuite/pytests/test_recording_backend_memory.py
    @@ -21,6 +21,7 @@
     
     import unittest
     import nest
    +import numpy as np
     
     
     class TestRecordingBackendMemory(unittest.TestCase):
    @@ -44,11 +45,11 @@ def testEventCounter(self):
     
             nest.Simulate(15)
             self.assertEqual(mm.get("n_events"), 140)
    -        self.assertEqual(mm.get("events")["times"].size, 140)
    +        self.assertEqual(len(mm.get("events")["times"]), 140)
     
             nest.Simulate(1)
             self.assertEqual(mm.get("n_events"), 150)
    -        self.assertEqual(mm.get("events")["times"].size, 150)
    +        self.assertEqual(len(mm.get("events")["times"]), 150)
     
             # Now with multithreading
     
    @@ -61,11 +62,11 @@ def testEventCounter(self):
     
             nest.Simulate(15)
             self.assertEqual(mm.get("n_events"), 280)
    -        self.assertEqual(mm.get("events")["times"].size, 280)
    +        self.assertEqual(len(mm.get("events")["times"]), 280)
     
             nest.Simulate(1)
             self.assertEqual(mm.get("n_events"), 300)
    -        self.assertEqual(mm.get("events")["times"].size, 300)
    +        self.assertEqual(len(mm.get("events")["times"]), 300)
     
         def testResetEventCounter(self):
             """"""
    @@ -79,17 +80,17 @@ def testResetEventCounter(self):
             nest.Simulate(15)
     
             # Check that an error is raised when setting n_events to a number != 0
    -        with self.assertRaises(nest.kernel.NESTErrors.BadProperty):
    +        with self.assertRaises(nest.kernel.NESTError):
                 mm.n_events = 10
     
             # Check that the event counter was indeed not changed and the
             # events dictionary is still intact
             self.assertEqual(mm.get("n_events"), 140)
    -        self.assertEqual(mm.get("events")["times"].size, 140)
    +        self.assertEqual(len(mm.get("events")["times"]), 140)
     
             # Check that the events dict is cleared when setting n_events to 0
             mm.n_events = 0
    -        self.assertEqual(mm.get("events")["times"].size, 0)
    +        self.assertEqual(len(mm.get("events")["times"]), 0)
     
         def testTimeInSteps(self):
             """"""
    @@ -103,20 +104,18 @@ def testTimeInSteps(self):
     
             # Check times are in float (i.e. ms) and offsets are not there
             # if time_in_steps == False
    -        self.assertEqual(mm.get("events")["times"].dtype, "float64")
    +        self.assertEqual(np.array(mm.get("events")["times"]).dtype, "float64")
             self.assertFalse("offsets" in mm.get("events"))
     
             # Check times are in int (i.e.steps) and offsets are there and of
             # type float if time_in_steps == True
             mm.time_in_steps = True
    -        self.assertEqual(mm.get("events")["times"].dtype, "int64")
    -        self.assertTrue("offsets" in mm.get("events"))
    -        self.assertEqual(mm.get("events")["offsets"].dtype, "float64")
    +        self.assertTrue(all(isinstance(e, int) for e in mm.get("events")["times"]))
     
             # Check that time_in_steps cannot be set after Simulate has
             # been called.
             nest.Simulate(10)
    -        with self.assertRaises(nest.kernel.NESTErrors.BadProperty):
    +        with self.assertRaises(nest.kernel.NESTError):
                 mm.time_in_steps = False
     
     
    diff --git a/testsuite/pytests/test_refractory.py b/testsuite/pytests/test_refractory.py
    index f1cda2805c..625bdf7391 100644
    --- a/testsuite/pytests/test_refractory.py
    +++ b/testsuite/pytests/test_refractory.py
    @@ -149,8 +149,8 @@ def compute_reftime(self, model, sr, vm, neuron):
             elif model in neurons_interspike_ps:
                 return spike_times[1]-spike_times[0]
             else:
    -            Vr = nest.GetStatus(neuron, "V_reset")[0]
    -            times = nest.GetStatus(vm, "events")[0]["times"]
    +            Vr = nest.GetStatus(neuron, "V_reset")
    +            times = np.array(nest.GetStatus(vm, "events")[0]["times"])
     
                 # Index of the 2nd spike
                 idx_max = np.argwhere(times == spike_times[1])[0][0]
    @@ -211,7 +211,7 @@ def test_refractory_time(self):
                 t_ref_sim = self.compute_reftime(model, sr, vm, neuron)
     
                 if model in neurons_with_clamping:
    -                t_ref_sim = t_ref_sim - nest.GetStatus(neuron, "t_clamp")[0]
    +                t_ref_sim = t_ref_sim - nest.GetStatus(neuron, "t_clamp")
     
                 # Approximate result for precise spikes (interpolation error)
                 if model in neurons_interspike_ps:
    diff --git a/testsuite/pytests/test_spatial/test_SynapseCollection_distance.py b/testsuite/pytests/test_spatial/test_SynapseCollection_distance.py
    index 186e87c857..14d0d5c423 100644
    --- a/testsuite/pytests/test_spatial/test_SynapseCollection_distance.py
    +++ b/testsuite/pytests/test_spatial/test_SynapseCollection_distance.py
    @@ -55,7 +55,7 @@ def calculate_distance(self, conns, s_nodes, t_nodes):
                 ref_dist = math.sqrt(x_ref * x_ref + y_ref * y_ref + z_ref * z_ref)
                 ref_distance.append(ref_dist)
     
    -        return tuple(ref_distance)
    +        return ref_distance
     
         def test_SynapseCollection_distance_simple(self):
             """Test distance on SynapseCollection where source and target are equal"""
    diff --git a/testsuite/pytests/test_spatial/test_basics.py b/testsuite/pytests/test_spatial/test_basics.py
    index b506b1bb11..fa702cfd83 100644
    --- a/testsuite/pytests/test_spatial/test_basics.py
    +++ b/testsuite/pytests/test_spatial/test_basics.py
    @@ -55,7 +55,7 @@ def test_create_layer_with_param(self):
     
         def test_GetPosition(self):
             """Check if GetPosition returns proper positions."""
    -        pos = ((1.0, 0.0), (0.0, 1.0), (3.5, 1.5))
    +        pos = [[1.0, 0.0], [0.0, 1.0], [3.5, 1.5]]
             nest.ResetKernel()
             layer = nest.Create('iaf_psc_alpha', positions=nest.spatial.free(pos))
     
    @@ -79,7 +79,7 @@ def test_GetPosition(self):
     
             # GetPosition on some of the node IDs
             nodepos_exp = nest.GetPosition(layer[:2])
    -        self.assertEqual(nodepos_exp, (pos[0], pos[1]))
    +        self.assertEqual(nodepos_exp, [pos[0], pos[1]])
     
         @unittest.skipIf(not HAVE_NUMPY, 'NumPy package is not available')
         def test_Displacement(self):
    @@ -92,7 +92,7 @@ def test_Displacement(self):
             # node IDs -> node IDs, all displacements must be zero here
             d = nest.Displacement(layer, layer)
             self.assertEqual(len(d), len(layer))
    -        self.assertTrue(all(dd == (0., 0.) for dd in d))
    +        self.assertTrue(all(dd == [0., 0.] for dd in d))
     
             # single node ID -> node IDs
             d = nest.Displacement(layer[:1], layer)
    @@ -550,8 +550,8 @@ def testSlicedPositions(self):
             positions = nest.spatial.free(nest.random.uniform(min=-1, max=1), num_dimensions=2)
             nodes = nest.Create('iaf_psc_alpha', 10, positions=positions)
             all_positions = sum([list(nodes[i].spatial['positions']) for i in range(len(nodes))], start=[])
    -        self.assertEqual(tuple(all_positions), nodes.spatial['positions'])
    -        self.assertEqual(tuple(nodes[::2].spatial['positions']), nodes.spatial['positions'][::2])
    +        self.assertEqual(all_positions, nodes.spatial['positions'])
    +        self.assertEqual(nodes[::2].spatial['positions'], nodes.spatial['positions'][::2])
     
     
     def suite():
    diff --git a/testsuite/pytests/test_spatial/test_create_spatial.py b/testsuite/pytests/test_spatial/test_create_spatial.py
    index 94ddcc5790..b84cab5255 100644
    --- a/testsuite/pytests/test_spatial/test_create_spatial.py
    +++ b/testsuite/pytests/test_spatial/test_create_spatial.py
    @@ -46,7 +46,7 @@ def test_Create_3D_grid(self):
                                 positions=nest.spatial.grid(shape=[3, 4, 5]))
     
             self.assertEqual(len(layer), 60)
    -        self.assertEqual(layer.spatial['shape'], (3, 4, 5))
    +        self.assertEqual(layer.spatial['shape'], [3, 4, 5])
     
         def test_Create_grid_with_extent(self):
             """Test Create simple grid with extent."""
    @@ -54,7 +54,7 @@ def test_Create_grid_with_extent(self):
                                 positions=nest.spatial.grid(shape=[3, 3],
                                                             extent=[2., 2.]))
     
    -        self.assertEqual(layer.spatial['extent'], (2., 2.))
    +        self.assertEqual(layer.spatial['extent'], [2., 2.])
     
         def test_Create_grid_with_nodeParams(self):
             """Test Create grid layer with node parameters."""
    @@ -69,7 +69,7 @@ def test_Create_grid_with_nodeParams(self):
     
         def test_Create_free_layer(self):
             """Test Create simple free layer."""
    -        pos = ((1., 1.), (2., 2.), (3., 3.))
    +        pos = [[1., 1.], [2., 2.], [3., 3.]]
             layer = nest.Create('iaf_psc_alpha',
                                 positions=nest.spatial.free(pos))
     
    @@ -80,8 +80,8 @@ def test_Create_free_layer(self):
     
         def test_Create_free_layer_with_extent(self):
             """Test Create free layer with extent."""
    -        pos = ((1., 1.), (2., 2.), (3., 3.))
    -        extent = (5., 3.)
    +        pos = [[1., 1.], [2., 2.], [3., 3.]]
    +        extent = [5., 3.]
             layer = nest.Create('iaf_psc_alpha',
                                 positions=nest.spatial.free(pos, extent=extent))
     
    diff --git a/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py b/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py
    index e742293733..6007c78071 100644
    --- a/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py
    +++ b/testsuite/pytests/test_spatial/test_layer_GetStatus_SetStatus.py
    @@ -41,7 +41,7 @@ def test_LayerSetStatus(self):
                                     extent=[2., 2.],
                                     edge_wrap=True))
     
    -        with self.assertRaises(nest.kernel.NESTErrors.DictError):
    +        with self.assertRaises(nest.kernel.NESTError):
                 nest.SetStatus(layer, {'center': [1., 1.]})
     
             nest.SetStatus(layer, 'V_m', -50.)
    @@ -63,10 +63,10 @@ def test_LayerSpatial(self):
             network_size = layer.spatial['network_size']
             shape_y = layer.spatial['shape'][1]
     
    -        self.assertEqual(center, (0.0, 0.0))
    +        self.assertEqual(center, [0.0, 0.0])
             self.assertEqual(shape_x, 3)
             self.assertTrue(edge_wrap)
    -        self.assertEqual(extent, (2., 2.))
    +        self.assertEqual(extent, [2., 2.])
             self.assertEqual(network_size, 9)
             self.assertEqual(shape_y, 3)
     
    @@ -77,10 +77,10 @@ def test_LayerSpatial(self):
             # Test get all values
             all_values = layer.spatial
             self.assertEqual(len(all_values.keys()), 5)
    -        self.assertEqual(all_values['center'], (0.0, 0.0))
    +        self.assertEqual(all_values['center'], [0.0, 0.0])
             self.assertEqual(all_values['shape'][0], 3)
             self.assertTrue(all_values['edge_wrap'])
    -        self.assertEqual(all_values['extent'], (2., 2.))
    +        self.assertEqual(all_values['extent'], [2., 2.])
             self.assertEqual(all_values['network_size'], 9)
             self.assertEqual(all_values['shape'][1], 3)
     
    @@ -95,9 +95,9 @@ def test_SingleElementLayerSpatial(self):
             columns = layer.spatial['shape'][0]
             all_values = layer.spatial
     
    -        self.assertEqual(center, (0., 0.))
    +        self.assertEqual(center, [0., 0.])
             self.assertEqual(columns, 1)
    -        self.assertEqual(all_values['center'], (0.0, 0.0))
    +        self.assertEqual(all_values['center'], [0.0, 0.0])
     
         def test_LayerGet(self):
             """Test get function on layer NodeCollection"""
    @@ -113,7 +113,7 @@ def test_LayerSet(self):
             layer = nest.Create('iaf_psc_alpha', positions=nest.spatial.grid(
                 shape=[3, 3], extent=[2., 2.], edge_wrap=True))
     
    -        with self.assertRaises(nest.kernel.NESTErrors.DictError):
    +        with self.assertRaises(nest.kernel.NESTError):
                 layer.set({'center': [1., 1.]})
     
             layer.set(V_m=-50.)
    diff --git a/testsuite/pytests/test_status.py b/testsuite/pytests/test_status.py
    index 7d266968fc..fd6d3ce5a1 100644
    --- a/testsuite/pytests/test_status.py
    +++ b/testsuite/pytests/test_status.py
    @@ -82,7 +82,7 @@ def test_GetDefaults(self):
                 self.assertIsInstance(model_status, dict)
                 self.assertGreater(len(model_status), 1)
     
    -            self.assertRaises(TypeError, nest.GetDefaults, model, 42)
    +            self.assertRaises(KeyError, nest.GetDefaults, model, 42)
     
                 if "V_m" in model_status:
                     test_value = nest.GetDefaults(model, "V_m")
    @@ -108,7 +108,7 @@ def test_SetDefaults(self):
                     self.assertEqual(nest.GetDefaults(model, 'V_m'), v_m)
     
                     self.assertRaisesRegex(
    -                    nest.kernel.NESTError, "DictError",
    +                    nest.kernel.NESTError, "unaccessed",
                         nest.SetDefaults, model, 'nonexistent_status_key', 0)
     
         def test_GetStatus(self):
    @@ -126,7 +126,7 @@ def test_GetStatus(self):
                     self.assertGreater(len(d[0]), 1)
     
                     v1 = nest.GetStatus(n)[0]['V_m']
    -                v2 = nest.GetStatus(n, 'V_m')[0]
    +                v2 = nest.GetStatus(n, 'V_m')
                     self.assertEqual(v1, v2)
     
                     n = nest.Create(model, 10)
    @@ -134,11 +134,6 @@ def test_GetStatus(self):
                     self.assertEqual(len(d), len(n))
                     self.assertIsInstance(d[0], float)
     
    -                test_keys = ("V_m", ) * 3
    -                d = nest.GetStatus(n, test_keys)
    -                self.assertEqual(len(d), len(n))
    -                self.assertEqual(len(d[0]), len(test_keys))
    -
         def test_SetStatus(self):
             """SetStatus with dict"""
     
    @@ -147,7 +142,7 @@ def test_SetStatus(self):
                     nest.ResetKernel()
                     n = nest.Create(model)
                     nest.SetStatus(n, {'V_m': 1.})
    -                self.assertEqual(nest.GetStatus(n, 'V_m')[0], 1.)
    +                self.assertEqual(nest.GetStatus(n, 'V_m'), 1.)
     
         def test_SetStatusList(self):
             """SetStatus with list"""
    @@ -157,7 +152,7 @@ def test_SetStatusList(self):
                     nest.ResetKernel()
                     n = nest.Create(model)
                     nest.SetStatus(n, [{'V_m': 2.}])
    -                self.assertEqual(nest.GetStatus(n, 'V_m')[0], 2.)
    +                self.assertEqual(nest.GetStatus(n, 'V_m'), 2.)
     
         def test_SetStatusParam(self):
             """SetStatus with parameter"""
    @@ -167,7 +162,7 @@ def test_SetStatusParam(self):
                     nest.ResetKernel()
                     n = nest.Create(model)
                     nest.SetStatus(n, 'V_m', 3.)
    -                self.assertEqual(nest.GetStatus(n, 'V_m')[0], 3.)
    +                self.assertEqual(nest.GetStatus(n, 'V_m'), 3.)
     
         def test_SetStatusVth_E_L(self):
             """SetStatus of reversal and threshold potential """
    @@ -208,7 +203,7 @@ def test_SetStatusV_th_smaller_V_reset(self):
     
                     # should raise exception
                     self.assertRaisesRegex(
    -                    nest.kernel.NESTError, "BadProperty",
    +                    nest.kernel.NESTError, "Setting status",
                         nest.SetStatus, neuron,
                         {'V_reset': 10., 'V_th': 0.}
                     )
    diff --git a/testsuite/pytests/test_stdp_nn_synapses.py b/testsuite/pytests/test_stdp_nn_synapses.py
    index cdc3ed3733..3ef8f958f8 100644
    --- a/testsuite/pytests/test_stdp_nn_synapses.py
    +++ b/testsuite/pytests/test_stdp_nn_synapses.py
    @@ -150,9 +150,11 @@ def do_the_nest_simulation(self):
             nest.Simulate(self.simulation_duration)
     
             all_spikes = nest.GetStatus(spike_recorder, keys='events')[0]
    -        pre_spikes = all_spikes['times'][all_spikes['senders'] == presynaptic_neuron.tolist()[0]]
    -        post_spikes = all_spikes['times'][all_spikes['senders'] == postsynaptic_neuron.tolist()[0]]
    -        weight = nest.GetStatus(plastic_synapse_of_interest, keys='weight')[0]
    +        times = np.array(all_spikes['times'])
    +        senders = np.array(all_spikes['senders'])
    +        pre_spikes = times[senders == presynaptic_neuron.tolist()[0]]
    +        post_spikes = times[senders == postsynaptic_neuron.tolist()[0]]
    +        weight = nest.GetStatus(plastic_synapse_of_interest, keys='weight')
             return (pre_spikes, post_spikes, weight)
     
         def reproduce_weight_drift(self, _pre_spikes, _post_spikes,
    diff --git a/testsuite/pytests/test_stdp_synapse.py b/testsuite/pytests/test_stdp_synapse.py
    index ac26431027..31519653a0 100644
    --- a/testsuite/pytests/test_stdp_synapse.py
    +++ b/testsuite/pytests/test_stdp_synapse.py
    @@ -97,6 +97,7 @@ def do_nest_simulation_and_compare_to_reproduced_weight(self, fname_snip):
             # contains the weight at pre *and* post times: check that weights are equal only for pre spike times
             assert len(weight_by_nest) > 0
             for idx_pre_spike_nest, t_pre_spike_nest in enumerate(t_weight_by_nest):
    +            print(t_pre_spike_nest, t_weight_reproduced_independently)
                 idx_pre_spike_reproduced_independently = \
                     np.argmin((t_pre_spike_nest - t_weight_reproduced_independently)**2)
                 np.testing.assert_allclose(t_pre_spike_nest,
    @@ -159,11 +160,13 @@ def do_the_nest_simulation(self):
             nest.Simulate(self.simulation_duration)
     
             all_spikes = nest.GetStatus(spike_recorder, keys='events')[0]
    -        pre_spikes = all_spikes['times'][all_spikes['senders'] == presynaptic_neuron.tolist()[0]]
    -        post_spikes = all_spikes['times'][all_spikes['senders'] == postsynaptic_neuron.tolist()[0]]
    +        times = np.array(all_spikes['times'])
    +        senders = np.array(all_spikes['senders'])
    +        pre_spikes = times[senders == presynaptic_neuron.tolist()[0]]
    +        post_spikes = times[senders == postsynaptic_neuron.tolist()[0]]
     
    -        t_hist = nest.GetStatus(wr, "events")[0]["times"]
    -        weight = nest.GetStatus(wr, "events")[0]["weights"]
    +        t_hist = np.array(nest.GetStatus(wr, "events")[0]["times"])
    +        weight = np.array(nest.GetStatus(wr, "events")[0]["weights"])
     
             return pre_spikes, post_spikes, t_hist, weight
     
    diff --git a/testsuite/pytests/test_stdp_triplet_synapse.py b/testsuite/pytests/test_stdp_triplet_synapse.py
    index c8f97e3154..492422200f 100644
    --- a/testsuite/pytests/test_stdp_triplet_synapse.py
    +++ b/testsuite/pytests/test_stdp_triplet_synapse.py
    @@ -119,7 +119,7 @@ def setupProperty(property):
                 nest.Connect(self.pre_neuron, self.post_neuron, syn_spec=bad_syn_spec)
     
             def badPropertyWith(content, parameters):
    -            msg = "BadProperty(.+)" + content
    +            msg = content
                 self.assertRaisesRegex(nest.kernel.NESTError, msg, setupProperty, parameters)
     
             badPropertyWith("Kplus", {"Kplus": -1.0})
    diff --git a/testsuite/pytests/test_threads.py b/testsuite/pytests/test_threads.py
    index a0b5a2640c..989b6580b3 100644
    --- a/testsuite/pytests/test_threads.py
    +++ b/testsuite/pytests/test_threads.py
    @@ -101,8 +101,8 @@ def test_ThreadsGetEvents(self):
     
                 nest.Simulate(Simtime)
     
    -            n_events_sr.append(nest.GetStatus(sr, 'n_events')[0])
    -            n_events_vm.append(nest.GetStatus(vm, 'n_events')[0])
    +            n_events_sr.append(nest.GetStatus(sr, 'n_events'))
    +            n_events_vm.append(nest.GetStatus(vm, 'n_events'))
     
             ref_vm = N * (Simtime - 1)
             ref_sr = n_events_sr[0]
    diff --git a/testsuite/pytests/test_tsodyks2_synapse.py b/testsuite/pytests/test_tsodyks2_synapse.py
    index 7099f71d47..9c526444ee 100644
    --- a/testsuite/pytests/test_tsodyks2_synapse.py
    +++ b/testsuite/pytests/test_tsodyks2_synapse.py
    @@ -96,8 +96,9 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        all_spikes = spike_recorder.events
    -        pre_spikes = all_spikes["times"][all_spikes["senders"] == presynaptic_neuron.get("global_id")]
    +        senders = np.array(spike_recorder.events["senders"])
    +        times = np.array(spike_recorder.events["times"])
    +        pre_spikes = times[senders == presynaptic_neuron.get("global_id")]
     
             weights = wr.get("events", "weights")
     
    diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py
    index 540ec15b78..551f01d0ab 100644
    --- a/testsuite/pytests/test_urbanczik_synapse.py
    +++ b/testsuite/pytests/test_urbanczik_synapse.py
    @@ -183,8 +183,8 @@ def test_SynapseDepressionFacilitation(self):
             '''
             # multimeter
             rec = nest.GetStatus(mm)[0]['events']
    -        t = rec['times']
    -        V_w = rec['V_m.p']
    +        t = np.array(rec['times'])
    +        V_w = np.array(rec['V_m.p'])
     
             # compute dendritic prediction of somatic membrane potential
             g_D = nrn_params['g_sp']
    @@ -201,7 +201,7 @@ def test_SynapseDepressionFacilitation(self):
     
             # spike recorder
             data = nest.GetStatus(sr_soma)[0]['events']
    -        spike_times_soma = data['times']
    +        spike_times_soma = np.array(data['times'])
     
             # compute predicted rate
             phi_max = nrn_params['phi_max']
    diff --git a/testsuite/pytests/test_visualization.py b/testsuite/pytests/test_visualization.py
    index 69ba6d0f25..8385c29d8c 100644
    --- a/testsuite/pytests/test_visualization.py
    +++ b/testsuite/pytests/test_visualization.py
    @@ -126,7 +126,7 @@ def test_voltage_trace_from_device(self):
     
         def spike_recorder_data_setup(self, to_file=False):
             nest.ResetKernel()
    -        pg = nest.Create('poisson_generator', {'rate': 1000.})
    +        pg = nest.Create('poisson_generator', params={'rate': 1000.})
             sr = nest.Create('spike_recorder')
             if to_file:
                 parrot = nest.Create('parrot_neuron')
    @@ -158,7 +158,7 @@ def test_raster_plot(self):
     
             sr, sr_to_file = self.spike_recorder_data_setup(to_file=True)
             spikes = sr.get('events')
    -        sr_ref = spikes['times']
    +        sr_ref = np.array(spikes['times'])
     
             # Test from_device
             nest.raster_plot.from_device(sr)
    diff --git a/testsuite/pytests/test_vogels_sprekeler_synapse.py b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    index de5ed590c7..9ad8afc721 100644
    --- a/testsuite/pytests/test_vogels_sprekeler_synapse.py
    +++ b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    @@ -101,7 +101,7 @@ def setupProperty(property):
                 nest.Connect(self.pre_neuron, self.post_neuron, syn_spec=bad_syn_spec)
     
             def badPropertyWith(content, parameters):
    -            msg = "BadProperty(.+)" + content
    +            msg = content
                 self.assertRaisesRegex(nest.kernel.NESTError, msg, setupProperty, parameters)
     
             badPropertyWith("Kplus", {"Kplus": -1.0})
    
    From 1d5372028640ae34934b675f6407072abeabe5df Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Mon, 5 Dec 2022 10:15:00 +0100
    Subject: [PATCH 099/375] Updated mask functions
    
    ---
     nestkernel/spatial.cpp            | 52 +++++++++++++++++++++++++++++++
     nestkernel/spatial.h              |  2 ++
     pynest/nest/lib/hl_api_spatial.py | 11 ++-----
     pynest/nest/lib/hl_api_types.py   | 11 ++++---
     pynest/nestkernel_api.pxd         |  8 +++++
     pynest/nestkernel_api.pyx         | 31 ++++++++++++++++++
     6 files changed, 102 insertions(+), 13 deletions(-)
    
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index b76227b457..f5853123c1 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -449,6 +449,58 @@ create_mask( const dictionary& mask_dict )
       return mask;
     }
     
    +NodeCollectionPTR
    +select_nodes_by_mask( const NodeCollectionPTR layer_nc, const std::vector< double >& anchor, const MaskPTR mask )
    +{
    +  std::vector< index > mask_node_ids;
    +
    +  const auto dim = anchor.size();
    +
    +  if ( dim != 2 and dim != 3 )
    +  {
    +    throw BadProperty( "Center must be 2- or 3-dimensional." );
    +  }
    +
    +  AbstractLayerPTR abstract_layer = get_layer( layer_nc );
    +
    +  if ( dim == 2 )
    +  {
    +    auto layer = dynamic_cast< Layer< 2 >* >( abstract_layer.get() );
    +    if ( not layer )
    +    {
    +      throw TypeMismatch( "2D layer", "other type" );
    +    }
    +
    +    auto ml = MaskedLayer< 2 >( *layer, mask, false, layer_nc );
    +
    +    for ( Ntree< 2, index >::masked_iterator it = ml.begin( Position< 2 >( anchor[ 0 ], anchor[ 1 ] ) ); it != ml.end();
    +          ++it )
    +    {
    +      mask_node_ids.push_back( it->second );
    +    }
    +  }
    +  else
    +  {
    +    auto layer = dynamic_cast< Layer< 3 >* >( abstract_layer.get() );
    +    if ( not layer )
    +    {
    +      throw TypeMismatch( "3D layer", "other type" );
    +    }
    +
    +    auto ml = MaskedLayer< 3 >( *layer, mask, false, layer_nc );
    +
    +    for ( Ntree< 3, index >::masked_iterator it = ml.begin( Position< 3 >( anchor[ 0 ], anchor[ 1 ], anchor[ 2 ] ) );
    +          it != ml.end();
    +          ++it )
    +    {
    +      mask_node_ids.push_back( it->second );
    +    }
    +  }
    +  // Nodes must be sorted when creating a NodeCollection
    +  std::sort( mask_node_ids.begin(), mask_node_ids.end() );
    +  return NodeCollection::create( mask_node_ids );
    +}
    +
     bool
     inside( const std::vector< double >& point, const MaskPTR mask )
     {
    diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h
    index d9f0ef7e4f..9ca5e604d4 100644
    --- a/nestkernel/spatial.h
    +++ b/nestkernel/spatial.h
    @@ -116,6 +116,8 @@ std::vector< double > distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR
     std::vector< double > distance( NodeCollectionPTR layer_nc, const std::vector< std::vector< double > >& point );
     std::vector< double > distance( const std::vector< ConnectionID >& conns );
     MaskPTR create_mask( const dictionary& mask_dict );
    +NodeCollectionPTR
    +select_nodes_by_mask( const NodeCollectionPTR layer_nc, const std::vector< double >& anchor, const MaskPTR mask );
     bool inside( const std::vector< double >& point, const MaskPTR mask );
     MaskPTR intersect_mask( const MaskPTR mask1, const MaskPTR mask2 );
     MaskPTR union_mask( const MaskPTR mask1, const MaskPTR mask2 );
    diff --git a/pynest/nest/lib/hl_api_spatial.py b/pynest/nest/lib/hl_api_spatial.py
    index f2e49cc06e..109dcefbab 100644
    --- a/pynest/nest/lib/hl_api_spatial.py
    +++ b/pynest/nest/lib/hl_api_spatial.py
    @@ -187,10 +187,9 @@ def CreateMask(masktype, specs, anchor=None):
                 nest.Connect(l, l, conndict)
         """
         if anchor is None:
    -        return sli_func('CreateMask', {masktype: specs})
    +        return nestkernel.llapi_create_mask({masktype: specs})
         else:
    -        return sli_func('CreateMask',
    -                        {masktype: specs, 'anchor': anchor})
    +        return nestkernel.llapi_create_mask({masktype: specs, 'anchor': anchor})
     
     
     def GetPosition(nodes):
    @@ -996,11 +995,7 @@ def SelectNodesByMask(layer, anchor, mask_obj):
     
         mask_datum = mask_obj._datum
     
    -    node_id_list = sli_func('SelectNodesByMask',
    -                            layer, anchor, mask_datum)
    -
    -    # When creating a NodeCollection, the input list of nodes IDs must be sorted.
    -    return NodeCollection(sorted(node_id_list))
    +    return nestkernel.llapi_select_nodes_by_mask(layer._datum, anchor, mask_datum)
     
     
     def _draw_extent(ax, xctr, yctr, xext, yext):
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 3158dd7eac..8675ae27ad 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -937,12 +937,13 @@ class Mask:
         _datum = None
     
         # The constructor should not be called by the user
    -    def __init__(self, datum):
    +    def __init__(self, data):
             """Masks must be created using the CreateMask command."""
    -        if not isinstance(datum, kernel.SLIDatum) or datum.dtype != "masktype":
    -            raise TypeError("expected mask Datum")
    -        self._datum = datum
    +        if (not isinstance(data, nestkernel.MaskObject)):
    +            raise TypeError("Expected MaskObject.")
    +        self._datum = data
     
    +    # TODO-PYNEST-NG: Convert operators
         # Generic binary operation
         def _binop(self, op, other):
             if not isinstance(other, Mask):
    @@ -972,7 +973,7 @@ def Inside(self, point):
             out : bool
                 True if the point is inside the mask, False otherwise
             """
    -        return sli_func("Inside", point, self._datum)
    +        return nestkernel.llapi_inside_mask(point, self._datum)
     
     
     # TODO-PYNEST-NG: We may consider moving the entire (or most of) Parameter class to the cython level.
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 8b4681d2b6..412adc1ea6 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -89,6 +89,11 @@ cdef extern from "parameter.h" namespace "nest":
         ParameterPTR dimension_parameter(const ParameterPTR x, const ParameterPTR y) except +
         ParameterPTR dimension_parameter(const ParameterPTR x, const ParameterPTR y, const ParameterPTR z) except +
     
    +
    +cdef extern from "mask.h" namespace "nest":
    +    cppclass MaskPTR:
    +        MaskPTR()
    +
     cdef extern from "nest.h" namespace "nest":
         void init_nest( int* argc, char** argv[] )
         void reset_kernel()
    @@ -152,3 +157,6 @@ cdef extern from "spatial.h" namespace "nest":
         vector[vector[double]] displacement( NodeCollectionPTR layer_nc, const vector[vector[double]]& point ) except +
     
         void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ) except +
    +    MaskPTR create_mask( const dictionary& mask_dict )
    +    NodeCollectionPTR select_nodes_by_mask( const NodeCollectionPTR layer_nc, const vector[double]& anchor, const MaskPTR mask ) except +
    +    cbool inside(const vector[double]& point, const MaskPTR mask ) except +
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 3c6eae18a3..d77904eeb9 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -75,6 +75,17 @@ cdef class ParameterObject:
             self.thisptr = parameter_ptr
     
     
    +cdef class MaskObject:
    +
    +    cdef MaskPTR thisptr
    +
    +    def __repr__(self):
    +        return "<MaskObject>"
    +
    +    cdef _set_mask(self, MaskPTR mask_ptr):
    +        self.thisptr = mask_ptr
    +
    +
     cdef object any_vector_to_list(vector[any] cvec):
         cdef tmp = []
         cdef vector[any].iterator it = cvec.begin()
    @@ -370,6 +381,26 @@ def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, ob
         print("### 9", projections)
         connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections))
     
    +@catch_cpp_error
    +def llapi_create_mask(object specs):
    +    cdef dictionary specs_dictionary = pydict_to_dictionary(specs)
    +    cdef MaskPTR mask
    +    mask = create_mask(specs_dictionary)
    +    obj = MaskObject()
    +    obj._set_mask(mask)
    +    return nest.Mask(obj)
    +
    +@catch_cpp_error
    +def llapi_select_nodes_by_mask(NodeCollectionObject layer, vector[double] anchor, MaskObject mask_datum):
    +    nodes = select_nodes_by_mask(layer.thisptr, anchor, mask_datum.thisptr)
    +    obj = NodeCollectionObject()
    +    obj._set_nc(nodes)
    +    return nest.NodeCollection(obj)
    +
    +@catch_cpp_error
    +def llapi_inside_mask(vector[double] point, MaskObject mask):
    +    return inside(point, mask.thisptr)
    +
     @catch_cpp_error
     def llapi_slice(NodeCollectionObject nc, long start, long stop, long step):
         cdef NodeCollectionPTR nc_ptr
    
    From b3e9430d360b5364bc1e3dd00a65aa0c287082ea Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Tue, 6 Dec 2022 10:06:11 +0100
    Subject: [PATCH 100/375] Updated node and connection dumping
    
    ---
     nestkernel/layer.h                            |  4 +--
     nestkernel/layer_impl.h                       | 25 ++++++++-----------
     nestkernel/spatial.cpp                        | 15 +++++++----
     nestkernel/spatial.h                          | 10 ++++----
     pynest/nest/lib/hl_api_spatial.py             | 16 ++----------
     pynest/nestkernel_api.pxd                     |  8 +++++-
     pynest/nestkernel_api.pyx                     |  8 ++++++
     .../test_spatial/test_layerNodeCollection.py  |  2 +-
     8 files changed, 46 insertions(+), 42 deletions(-)
    
    diff --git a/nestkernel/layer.h b/nestkernel/layer.h
    index 6405022cd2..cedb49344d 100644
    --- a/nestkernel/layer.h
    +++ b/nestkernel/layer.h
    @@ -166,7 +166,7 @@ class AbstractLayer
       virtual void dump_connections( std::ostream& out,
         NodeCollectionPTR node_collection,
         AbstractLayerPTR target_layer,
    -    const Token& syn_model ) = 0;
    +    const std::string& syn_model ) = 0;
     
       void set_node_collection( NodeCollectionPTR );
       NodeCollectionPTR get_node_collection();
    @@ -404,7 +404,7 @@ class Layer : public AbstractLayer
       void dump_connections( std::ostream& out,
         NodeCollectionPTR node_collection,
         AbstractLayerPTR target_layer,
    -    const Token& syn_model ) override;
    +    const std::string& syn_model ) override;
     
     protected:
       /**
    diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h
    index beb419ea57..dfd1054118 100644
    --- a/nestkernel/layer_impl.h
    +++ b/nestkernel/layer_impl.h
    @@ -298,9 +298,9 @@ void
     Layer< D >::dump_connections( std::ostream& out,
       NodeCollectionPTR node_collection,
       AbstractLayerPTR target_layer,
    -  const Token& syn_model )
    +  const std::string& syn_model )
     {
    -  std::vector< std::pair< Position< D >, index > >* src_vec = get_global_positions_vector( node_collection );
    +  auto src_vec = get_global_positions_vector( node_collection );
     
       // Dictionary with parameters for get_connections()
       dictionary ncdict;
    @@ -309,36 +309,33 @@ Layer< D >::dump_connections( std::ostream& out,
       // Avoid setting up new array for each iteration of the loop
       std::vector< index > source_array( 1 );
     
    -  for ( typename std::vector< std::pair< Position< D >, index > >::iterator src_iter = src_vec->begin();
    -        src_iter != src_vec->end();
    -        ++src_iter )
    +  for ( auto src_iter = src_vec->begin(); src_iter != src_vec->end(); ++src_iter )
       {
    -
         const index source_node_id = src_iter->second;
         const Position< D > source_pos = src_iter->first;
     
         source_array[ 0 ] = source_node_id;
         ncdict[ names::source ] = NodeCollectionPTR( NodeCollection::create( source_array ) );
    -    auto connectome = kernel().connection_manager.get_connections( ncdict );
    +    const auto connectome = kernel().connection_manager.get_connections( ncdict );
     
         // Print information about all local connections for current source
         for ( size_t i = 0; i < connectome.size(); ++i )
         {
    -      auto con_id = connectome[ i ];
    -      dictionary result_dict = kernel().connection_manager.get_synapse_status( con_id.get_source_node_id(),
    +      const auto& con_id = connectome[ i ];
    +      const dictionary result_dict = kernel().connection_manager.get_synapse_status( con_id.get_source_node_id(),
             con_id.get_target_node_id(),
             con_id.get_target_thread(),
             con_id.get_synapse_model_id(),
             con_id.get_port() );
     
    -      long target_node_id = result_dict.get< long >( names::target );
    -      double weight = result_dict.get< double >( names::weight );
    -      double delay = result_dict.get< double >( names::delay );
    +      const auto target_node_id = result_dict.get< size_t >( names::target );
    +      const auto weight = result_dict.get< double >( names::weight );
    +      const auto delay = result_dict.get< double >( names::delay );
     
           // Print source, target, weight, delay, rports
           out << source_node_id << ' ' << target_node_id << ' ' << weight << ' ' << delay;
     
    -      Layer< D >* tgt_layer = dynamic_cast< Layer< D >* >( target_layer.get() );
    +      const auto tgt_layer = dynamic_cast< Layer< D >* >( target_layer.get() );
     
           out << ' ';
           const index tnode_id = tgt_layer->node_collection_->find( target_node_id );
    @@ -396,7 +393,7 @@ MaskedLayer< D >::check_mask_( Layer< D >& layer, bool allow_oversized )
         lower_left[ 1 ] = -upper_right[ 1 ];
         upper_right[ 1 ] = -y;
     
    -    mask_ = MaskPTR (new BoxMask< D >( lower_left, upper_right ) );
    +    mask_ = MaskPTR( new BoxMask< D >( lower_left, upper_right ) );
       }
       catch ( std::bad_cast& )
       {
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index f5853123c1..4f20d57e5c 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -23,6 +23,7 @@
     #include "spatial.h"
     
     // C++ includes:
    +#include <fstream>
     #include <memory>
     #include <ostream>
     #include <string>
    @@ -544,29 +545,33 @@ connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const
     }
     
     void
    -dump_layer_nodes( NodeCollectionPTR layer_nc, std::ostream& out )
    +dump_layer_nodes( const NodeCollectionPTR layer_nc, const std::string& filename )
     {
       AbstractLayerPTR layer = get_layer( layer_nc );
     
    +  std::ofstream out( filename );
       if ( out.good() )
       {
         layer->dump_nodes( out );
       }
    +  out.close();
     }
     
     void
    -dump_layer_connections( const Token& syn_model,
    -  NodeCollectionPTR source_layer_nc,
    -  NodeCollectionPTR target_layer_nc,
    -  std::ostream& out )
    +dump_layer_connections( const NodeCollectionPTR source_layer_nc,
    +  const NodeCollectionPTR target_layer_nc,
    +  const std::string& syn_model,
    +  const std::string& filename )
     {
       AbstractLayerPTR source_layer = get_layer( source_layer_nc );
       AbstractLayerPTR target_layer = get_layer( target_layer_nc );
     
    +  std::ofstream out( filename );
       if ( out.good() )
       {
         source_layer->dump_connections( out, source_layer_nc, target_layer, syn_model );
       }
    +  out.close();
     }
     
     dictionary
    diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h
    index 9ca5e604d4..c0dafaaf1d 100644
    --- a/nestkernel/spatial.h
    +++ b/nestkernel/spatial.h
    @@ -123,11 +123,11 @@ MaskPTR intersect_mask( const MaskPTR mask1, const MaskPTR mask2 );
     MaskPTR union_mask( const MaskPTR mask1, const MaskPTR mask2 );
     MaskPTR minus_mask( const MaskPTR mask1, const MaskPTR mask2 );
     void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict );
    -void dump_layer_nodes( NodeCollectionPTR layer_nc, std::ostream& out );
    -void dump_layer_connections( const Token& syn_model,
    -  NodeCollectionPTR source_layer_nc,
    -  NodeCollectionPTR target_layer_nc,
    -  std::ostream& out_file );
    +void dump_layer_nodes( NodeCollectionPTR layer_nc, const std::string& filename );
    +void dump_layer_connections( const NodeCollectionPTR source_layer,
    +  const NodeCollectionPTR target_layer,
    +  const std::string& synapse_model,
    +  const std::string& filename );
     dictionary get_layer_status( NodeCollectionPTR layer_nc );
     }
     
    diff --git a/pynest/nest/lib/hl_api_spatial.py b/pynest/nest/lib/hl_api_spatial.py
    index 109dcefbab..4790037228 100644
    --- a/pynest/nest/lib/hl_api_spatial.py
    +++ b/pynest/nest/lib/hl_api_spatial.py
    @@ -533,10 +533,7 @@ def DumpLayerNodes(layer, outname):
         if not isinstance(layer, NodeCollection):
             raise TypeError("layer must be a NodeCollection")
     
    -    sli_func("""
    -             (w) file exch DumpLayerNodes close
    -             """,
    -             layer, _rank_specific_filename(outname))
    +    nestkernel.llapi_dump_layer_nodes(layer._datum, outname)
     
     
     def DumpLayerConnections(source_layer, target_layer, synapse_model, outname):
    @@ -601,16 +598,7 @@ def DumpLayerConnections(source_layer, target_layer, synapse_model, outname):
         if not isinstance(target_layer, NodeCollection):
             raise TypeError("target_layer must be a NodeCollection")
     
    -    sli_func("""
    -             /oname  Set
    -             cvlit /synmod Set
    -             /lyr_target Set
    -             /lyr_source Set
    -             oname (w) file lyr_source lyr_target synmod
    -             DumpLayerConnections close
    -             """,
    -             source_layer, target_layer, synapse_model,
    -             _rank_specific_filename(outname))
    +    nestkernel.llapi_dump_layer_connections(source_layer._datum, target_layer._datum, synapse_model, outname)
     
     
     def FindCenterElement(layer):
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 412adc1ea6..2df38aaffa 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -157,6 +157,12 @@ cdef extern from "spatial.h" namespace "nest":
         vector[vector[double]] displacement( NodeCollectionPTR layer_nc, const vector[vector[double]]& point ) except +
     
         void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ) except +
    -    MaskPTR create_mask( const dictionary& mask_dict )
    +    MaskPTR create_mask( const dictionary& mask_dict ) except +
         NodeCollectionPTR select_nodes_by_mask( const NodeCollectionPTR layer_nc, const vector[double]& anchor, const MaskPTR mask ) except +
         cbool inside(const vector[double]& point, const MaskPTR mask ) except +
    +
    +    void dump_layer_nodes(const NodeCollectionPTR layer_nc, const string& filename)
    +    void dump_layer_connections(const NodeCollectionPTR source_layer,
    +                                const NodeCollectionPTR target_layer,
    +                                const string& synapse_model,
    +                                const string& filename) except +
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index d77904eeb9..23551a6178 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -401,6 +401,14 @@ def llapi_select_nodes_by_mask(NodeCollectionObject layer, vector[double] anchor
     def llapi_inside_mask(vector[double] point, MaskObject mask):
         return inside(point, mask.thisptr)
     
    +@catch_cpp_error
    +def llapi_dump_layer_nodes(NodeCollectionObject layer, object filename):
    +    dump_layer_nodes(layer.thisptr, pystr_to_string(filename))
    +
    +@catch_cpp_error
    +def llapi_dump_layer_connections(NodeCollectionObject source_layer, NodeCollectionObject target_layer, synapse_model, filename):
    +    dump_layer_connections(source_layer.thisptr, target_layer.thisptr, pystr_to_string(synapse_model), pystr_to_string(filename))
    +
     @catch_cpp_error
     def llapi_slice(NodeCollectionObject nc, long start, long stop, long step):
         cdef NodeCollectionPTR nc_ptr
    diff --git a/testsuite/pytests/test_spatial/test_layerNodeCollection.py b/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    index 67e1c1e402..32b1635dd6 100644
    --- a/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    +++ b/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    @@ -112,7 +112,7 @@ def test_extent_center_single(self):
     
             spatial = nodes.spatial  # Extract spatial information
             self.assertEqual(spatial["center"], spatial["positions"][0])  # Center will be at the position of the only node
    -        self.assertEqual(spatial["extent"], tuple(extent))
    +        self.assertEqual(spatial["extent"], extent)
     
     
     def suite():
    
    From a922f83e472ad738075614c3d85f8b0b1b9c1c78 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Tue, 6 Dec 2022 11:30:42 +0100
    Subject: [PATCH 101/375] Updated SP synaptic elements
    
    ---
     nestkernel/nest.cpp                       |  7 ++++
     nestkernel/sp_manager.h                   |  2 +-
     nestkernel/structural_plasticity_node.cpp | 51 +++++++++++------------
     nestkernel/synaptic_element.cpp           | 12 ++----
     4 files changed, 36 insertions(+), 36 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 11fbad0ecf..2e05439754 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -31,6 +31,9 @@
     #include "mpi_manager_impl.h"
     #include "parameter.h"
     
    +#include "sp_manager.h"
    +#include "sp_manager_impl.h"
    +
     #include "connector_model_impl.h"
     
     #include "ac_generator.h"
    @@ -248,6 +251,10 @@ init_nest( int* argc, char** argv[] )
       register_mask< BoxMask< 3 > >();
       register_mask( "doughnut", create_doughnut );
       register_mask< GridMask< 2 > >();
    +
    +  kernel().sp_manager.register_growth_curve< GrowthCurveSigmoid >( "sigmoid" );
    +  kernel().sp_manager.register_growth_curve< GrowthCurveGaussian >( "gaussian" );
    +  kernel().sp_manager.register_growth_curve< GrowthCurveLinear >( "linear" );
     }
     
     void
    diff --git a/nestkernel/sp_manager.h b/nestkernel/sp_manager.h
    index 01896f142a..7622c616f0 100644
    --- a/nestkernel/sp_manager.h
    +++ b/nestkernel/sp_manager.h
    @@ -196,7 +196,7 @@ class SPManager : public ManagerInterface
     inline GrowthCurve*
     SPManager::new_growth_curve( std::string name )
     {
    -  const long nc_id = growthcurvedict_.get< long >( name );
    +  const int nc_id = growthcurvedict_.get< int >( name );
       return growthcurve_factories_.at( nc_id )->create();
     }
     
    diff --git a/nestkernel/structural_plasticity_node.cpp b/nestkernel/structural_plasticity_node.cpp
    index e629da19cf..ba255fa425 100644
    --- a/nestkernel/structural_plasticity_node.cpp
    +++ b/nestkernel/structural_plasticity_node.cpp
    @@ -51,21 +51,21 @@ nest::StructuralPlasticityNode::StructuralPlasticityNode( const StructuralPlasti
     void
     nest::StructuralPlasticityNode::get_status( dictionary& d ) const
     {
    -  dictionary synaptic_elements_d;
     
       d[ names::Ca ] = Ca_minus_;
       d[ names::tau_Ca ] = tau_Ca_;
       d[ names::beta_Ca ] = beta_Ca_;
     
    -  d[ names::synaptic_elements ] = synaptic_elements_d;
    +  dictionary synaptic_elements_d;
       for ( std::map< std::string, SynapticElement >::const_iterator it = synaptic_elements_map_.begin();
             it != synaptic_elements_map_.end();
             ++it )
       {
         dictionary synaptic_element_d;
    -    synaptic_elements_d[ it->first ] = synaptic_element_d;
         it->second.get( synaptic_element_d );
    +    synaptic_elements_d[ it->first ] = synaptic_element_d;
       }
    +  d[ names::synaptic_elements ] = synaptic_elements_d;
     }
     
     void
    @@ -99,22 +99,21 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d )
         clear_history();
       }
     
    -  // TODO-PYNEST-NG: fix
    -  // if ( d.known( names::synaptic_elements_param ) )
    -  // {
    -  //   const dictionary synaptic_elements_dict = d.get<dictionary>(names::synaptic_elements_param);
    -
    -  //   for ( std::map< std::string, SynapticElement >::iterator it = synaptic_elements_map_.begin();
    -  //         it != synaptic_elements_map_.end();
    -  //         ++it )
    -  //   {
    -  //     if ( synaptic_elements_dict.known( it->first.toString() ) )
    -  //     {
    -  //       const dictionary synaptic_elements_a = synaptic_elements_dict.get<dictionary>(it->first.toString());
    -  //       it->second.set( synaptic_elements_a );
    -  //     }
    -  //   }
    -  // }
    +  if ( d.known( names::synaptic_elements_param ) )
    +  {
    +    const dictionary synaptic_elements_dict = d.get< dictionary >( names::synaptic_elements_param );
    +
    +    for ( std::map< std::string, SynapticElement >::iterator it = synaptic_elements_map_.begin();
    +          it != synaptic_elements_map_.end();
    +          ++it )
    +    {
    +      if ( synaptic_elements_dict.known( it->first ) )
    +      {
    +        const dictionary synaptic_elements_a = synaptic_elements_dict.get< dictionary >( it->first );
    +        it->second.set( synaptic_elements_a );
    +      }
    +    }
    +  }
       if ( not d.known( names::synaptic_elements ) )
       {
         return;
    @@ -126,14 +125,12 @@ nest::StructuralPlasticityNode::set_status( const dictionary& d )
       synaptic_elements_map_ = std::map< std::string, SynapticElement >();
       synaptic_elements_d = d.get< dictionary >( names::synaptic_elements );
     
    -  // TODO-PYNEST-NG: fix
    -  // for ( Dictionary::const_iterator i = synaptic_elements_d->begin(); i != synaptic_elements_d->end(); ++i )
    -  // {
    -  //   insert_result = synaptic_elements_map_.insert( std::pair< std::string, SynapticElement >( i->first,
    -  //   SynapticElement() )
    -  //   );
    -  //   ( insert_result.first->second ).set( synaptic_elements_d.get< dictionary >( i->first ) );
    -  // }
    +  for ( auto& syn_element : synaptic_elements_d )
    +  {
    +    SynapticElement se;
    +    se.set( synaptic_elements_d.get< dictionary >( syn_element.first ) );
    +    synaptic_elements_map_.insert( std::pair< std::string, SynapticElement >( syn_element.first, se ) );
    +  }
     }
     
     void
    diff --git a/nestkernel/synaptic_element.cpp b/nestkernel/synaptic_element.cpp
    index abb7d57217..8efe5aecb1 100644
    --- a/nestkernel/synaptic_element.cpp
    +++ b/nestkernel/synaptic_element.cpp
    @@ -64,8 +64,7 @@ nest::SynapticElement::SynapticElement( const SynapticElement& se )
       assert( growth_curve_ );
       dictionary nc_parameters;
       se.get( nc_parameters );
    -  // TODO-PYNEST-NG: fix growth curve with dictionary
    -  // growth_curve_->set( nc_parameters );
    +  growth_curve_->set( nc_parameters );
     }
     
     nest::SynapticElement&
    @@ -78,8 +77,7 @@ nest::SynapticElement::operator=( const SynapticElement& other )
         dictionary nc_parameters;
     
         other.get( nc_parameters );
    -    // TODO-PYNEST-NG: fix growth curve with dictionary
    -    // new_nc->set( nc_parameters );
    +    new_nc->set( nc_parameters );
     
         delete growth_curve_;
         growth_curve_ = new_nc;
    @@ -108,8 +106,7 @@ nest::SynapticElement::get( dictionary& d ) const
       d[ names::z_connected ] = z_connected_;
     
       // Store growth curve
    -  // TODO-PYNEST-NG: fix growth curve with dictionary
    -  // growth_curve_->get( d );
    +  growth_curve_->get( d );
     }
     
     /* ----------------------------------------------------------------
    @@ -134,8 +131,7 @@ nest::SynapticElement::set( const dictionary& d )
           growth_curve_ = kernel().sp_manager.new_growth_curve( growth_curve_name );
         }
       }
    -  // TODO-PYNEST-NG: fix growth curve with dictionary
    -  // growth_curve_->set( d );
    +  growth_curve_->set( d );
     
       if ( new_tau_vacant <= 0.0 )
       {
    
    From 7e8e40d136f2a1a53b8036118f519d6abe389b41 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Fri, 9 Dec 2022 15:55:48 +0100
    Subject: [PATCH 102/375] Small cleanup
    
    ---
     libnestutil/dictionary.cpp                     |  3 +--
     libnestutil/dictionary.h                       |  4 +---
     libnestutil/dictionary_access_flag_manager.cpp |  6 +++---
     libnestutil/dictionary_access_flag_manager.h   | 11 +++++++++--
     pynest/nest/lib/hl_api_helper.py               |  1 -
     5 files changed, 14 insertions(+), 11 deletions(-)
    
    diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp
    index a05bdc3e3e..2742f5b259 100644
    --- a/libnestutil/dictionary.cpp
    +++ b/libnestutil/dictionary.cpp
    @@ -355,7 +355,6 @@ value_equal( const boost::any first, const boost::any second )
         // TODO-PYNEST-NG: raise error
         assert( false );
         std::string msg = std::string( "Unsupported type in dictionary::value_equal(): " ) + debug_type( first );
    -    std::cerr << msg << "\n";
         throw nest::TypeMismatch( msg );
       }
       return true;
    @@ -438,7 +437,7 @@ dictionary::init_access_flags() const
     }
     
     void
    -dictionary::all_entries_accessed( const std::string where, const std::string what ) const
    +dictionary::all_entries_accessed( const std::string& where, const std::string& what ) const
     {
       nest::kernel().get_dict_access_flag_manager().all_accessed( *this, where, what );
     }
    diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h
    index c8e4286046..8615bd6379 100644
    --- a/libnestutil/dictionary.h
    +++ b/libnestutil/dictionary.h
    @@ -94,7 +94,6 @@ class dictionary : public std::map< std::string, boost::any >
         {
           std::string msg = std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type "
             + std::string( boost::core::demangle( typeid( T ).name() ) );
    -      std::cerr << msg << "\n";
           throw nest::TypeMismatch( msg );
         }
       }
    @@ -125,7 +124,6 @@ class dictionary : public std::map< std::string, boost::any >
         // Not an integer type
         std::string msg =
           std::string( "Failed to cast '" ) + key + "' from " + debug_type( at( key ) ) + " to an integer type ";
    -    std::cerr << msg << "\n";
         throw nest::TypeMismatch( msg );
       }
     
    @@ -249,7 +247,7 @@ class dictionary : public std::map< std::string, boost::any >
        * @param what Which parameter triggers the error.
        * @throws UnaccessedDictionaryEntry if there are unaccessed dictionary entries.
        */
    -  void all_entries_accessed( const std::string where, const std::string what ) const;
    +  void all_entries_accessed( const std::string& where, const std::string& what ) const;
     
       // Wrappers for access flags
       boost::any& operator[]( const std::string& key );
    diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp
    index 8cac9794c2..68a5f11673 100644
    --- a/libnestutil/dictionary_access_flag_manager.cpp
    +++ b/libnestutil/dictionary_access_flag_manager.cpp
    @@ -39,8 +39,8 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
       std::vector< dictionary::value_type > not_accessed_kv_pairs;
     
       const auto& access_set = access_flags_.at( &dict );
    -  const auto comparator = [&access_set](
    -                            dictionary::value_type kv ) { return access_set.find( kv.first ) == access_set.end(); };
    +  const auto comparator = [ &access_set ]( dictionary::value_type kv )
    +  { return access_set.find( kv.first ) == access_set.end(); };
     
       std::copy_if( dict.begin(), dict.end(), std::back_inserter( not_accessed_kv_pairs ), comparator );
     
    @@ -59,7 +59,7 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
     }
     
     bool
    -DictionaryAccessFlagManager::accessed( const dictionary& dict, const key_type_& key )
    +DictionaryAccessFlagManager::accessed( const dictionary& dict, const key_type_& key ) const
     {
       return access_flags_.at( &dict ).count( key ) > 0;
     }
    diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h
    index 6bb121d516..b361dbfaa9 100644
    --- a/libnestutil/dictionary_access_flag_manager.h
    +++ b/libnestutil/dictionary_access_flag_manager.h
    @@ -29,6 +29,13 @@
     
     #include "dictionary.h"
     
    +/**
    + * @brief Access flag manager for the dictionary class
    + *
    + * Manages access flags for dictionary keys and can check if all keys
    + * in a dictionary has been accessed. Key access is not integrated into
    + * the dictionary class to be able to keep the dictionary const.
    + */
     class DictionaryAccessFlagManager
     {
     private:
    @@ -60,7 +67,7 @@ class DictionaryAccessFlagManager
        * @return true if key has been accessed
        * @return false if key has not been accessed
        */
    -  bool accessed( const dictionary& dict, const key_type_& key );
    +  bool accessed( const dictionary& dict, const key_type_& key ) const;
     };
     
     inline void
    @@ -68,7 +75,7 @@ DictionaryAccessFlagManager::init_access_flags( const dictionary& dict )
     {
     #pragma omp critical( init_access_flags )
       {
    -    access_flags_[&dict ] = {};
    +    access_flags_[ &dict ] = {};
       }
     }
     
    diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py
    index 6960ab6678..0226a6a2c3 100644
    --- a/pynest/nest/lib/hl_api_helper.py
    +++ b/pynest/nest/lib/hl_api_helper.py
    @@ -486,7 +486,6 @@ def get_parameters(nc, param):
         """
         # param is single literal
         if isinstance(param, str):
    -        print("### 6", param)
             result = nestkernel.llapi_get_nc_status(nc._datum, param)
         elif is_iterable(param):
             result = {param_name: get_parameters(nc, param_name) for param_name in param}
    
    From 0991fa73dbb56a63bf454890fddd5072027da125 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Fri, 9 Dec 2022 15:58:10 +0100
    Subject: [PATCH 103/375] Added registration of missing models
    
    ---
     models/CMakeLists.txt     |  2 ++
     nestkernel/CMakeLists.txt | 10 ++++++++--
     nestkernel/nest.cpp       | 15 +++++++++++++++
     3 files changed, 25 insertions(+), 2 deletions(-)
    
    diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt
    index af5ad8bd52..5d40900af1 100644
    --- a/models/CMakeLists.txt
    +++ b/models/CMakeLists.txt
    @@ -40,6 +40,7 @@ set( models_sources
         correlospinmatrix_detector.h correlospinmatrix_detector.cpp
         dc_generator.h dc_generator.cpp
         diffusion_connection.h
    +    rate_connection_delayed.h
         erfc_neuron.h erfc_neuron.cpp
         gamma_sup_generator.h gamma_sup_generator.cpp
         gap_junction.h
    @@ -110,6 +111,7 @@ set( models_sources
         rate_neuron_ipn.h rate_neuron_ipn_impl.h
         rate_transformer_node.h rate_transformer_node_impl.h
         siegert_neuron.h siegert_neuron.cpp
    +    sigmoid_rate_gg_1998.h sigmoid_rate_gg_1998.cpp
         sigmoid_rate.h sigmoid_rate.cpp
         sigmoid_rate_gg_1998.h sigmoid_rate_gg_1998.cpp
         sinusoidal_poisson_generator.h sinusoidal_poisson_generator.cpp
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index 099d6c04bb..a06eef5590 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -118,7 +118,13 @@ set ( nestkernel_sources
           ../models/aeif_psc_exp.h ../models/aeif_psc_exp.cpp
           ../models/spin_detector.h ../models/spin_detector.cpp
           ../models/pp_cond_exp_mc_urbanczik.h ../models/pp_cond_exp_mc_urbanczik.cpp
    -      
    +      ../models/siegert_neuron.h ../models/siegert_neuron.cpp
    +      ../models/sigmoid_rate_gg_1998.h ../models/sigmoid_rate_gg_1998.cpp
    +      ../models/gap_junction.h
    +      ../models/rate_connection_instantaneous.h
    +      ../models/rate_connection_delayed.h
    +      ../models/diffusion_connection.h
    +
           synaptic_element.h synaptic_element.cpp
           growth_curve.h growth_curve.cpp
           growth_curve_factory.h
    @@ -178,7 +184,7 @@ if ( HAVE_MPI )
     endif ()
     
     
    -# Prevent problems with Conda path substitution (see #2348) 
    +# Prevent problems with Conda path substitution (see #2348)
     set_source_files_properties( dynamicloader.cpp PROPERTIES COMPILE_OPTIONS "-O0" )
     
     
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 2e05439754..50f43f963b 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -66,6 +66,8 @@
     #include "parrot_neuron_ps.h"
     #include "step_current_generator.h"
     #include "step_rate_generator.h"
    +#include "siegert_neuron.h"
    +#include "sigmoid_rate_gg_1998.h"
     
     #include "aeif_psc_alpha.h"
     #include "aeif_psc_delta.h"
    @@ -88,6 +90,7 @@
     #include "cont_delay_synapse.h"
     #include "cont_delay_synapse_impl.h"
     #include "diffusion_connection.h"
    +#include "rate_connection_delayed.h"
     #include "gap_junction.h"
     #include "ht_synapse.h"
     #include "jonke_synapse.h"
    @@ -165,6 +168,7 @@ init_nest( int* argc, char** argv[] )
       kernel().model_manager.register_node_model< pp_psc_delta >( "pp_psc_delta" );
       kernel().model_manager.register_node_model< lin_rate_ipn >( "lin_rate_ipn" );
       kernel().model_manager.register_node_model< iaf_cond_alpha >( "iaf_cond_alpha" );
    +  kernel().model_manager.register_node_model< rate_transformer_sigmoid_gg_1998 >( "rate_transformer_sigmoid_gg_1998" );
     
       kernel().model_manager.register_node_model< tanh_rate_ipn >( "tanh_rate_ipn" );
       kernel().model_manager.register_node_model< lin_rate_opn >( "lin_rate_opn" );
    @@ -174,6 +178,7 @@ init_nest( int* argc, char** argv[] )
       kernel().model_manager.register_node_model< hh_psc_alpha_clopath >( "hh_psc_alpha_clopath" );
       kernel().model_manager.register_node_model< iaf_cond_exp >( "iaf_cond_exp" );
       kernel().model_manager.register_node_model< aeif_cond_exp >( "aeif_cond_exp" );
    +  kernel().model_manager.register_node_model< siegert_neuron >( "siegert_neuron" );
     
       kernel().model_manager.register_node_model< aeif_psc_alpha >( "aeif_psc_alpha" );
       kernel().model_manager.register_node_model< aeif_psc_delta >( "aeif_psc_delta" );
    @@ -217,6 +222,16 @@ init_nest( int* argc, char** argv[] )
         "urbanczik_synapse", default_connection_model_flags | RegisterConnectionModelFlags::REQUIRES_URBANCZIK_ARCHIVING );
       kernel().model_manager.register_connection_model< vogels_sprekeler_synapse >( "vogels_sprekeler_synapse" );
     
    +  // register secondary connection models
    +  kernel().model_manager.register_secondary_connection_model< GapJunction >(
    +    "gap_junction", RegisterConnectionModelFlags::REQUIRES_SYMMETRIC | RegisterConnectionModelFlags::SUPPORTS_WFR );
    +  kernel().model_manager.register_secondary_connection_model< RateConnectionInstantaneous >(
    +    "rate_connection_instantaneous", RegisterConnectionModelFlags::SUPPORTS_WFR );
    +  kernel().model_manager.register_secondary_connection_model< RateConnectionDelayed >(
    +    "rate_connection_delayed", RegisterConnectionModelFlags::HAS_DELAY );
    +  kernel().model_manager.register_secondary_connection_model< DiffusionConnection >(
    +    "diffusion_connection", RegisterConnectionModelFlags::SUPPORTS_WFR );
    +
     
       // Add connection rules
       kernel().connection_manager.register_conn_builder< OneToOneBuilder >( "one_to_one" );
    
    From 4f1153aca92df31b5fa3662b9df2c512b9e57a0d Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Fri, 9 Dec 2022 15:59:41 +0100
    Subject: [PATCH 104/375] Updates for new pynest
    
    ---
     nestkernel/exceptions.cpp                     | 13 --------
     nestkernel/exceptions.h                       | 19 ++++--------
     nestkernel/nest.cpp                           | 13 ++++++++
     nestkernel/nest.h                             |  3 ++
     nestkernel/parameter.h                        |  4 +--
     nestkernel/vp_manager.cpp                     |  2 +-
     pynest/nest/lib/hl_api_nodes.py               |  1 +
     pynest/nest/lib/hl_api_simulation.py          |  4 +--
     pynest/nest/lib/hl_api_types.py               |  2 +-
     pynest/nestkernel_api.pxd                     |  4 +++
     pynest/nestkernel_api.pyx                     |  8 +++++
     testsuite/pytests/test_compartmental_model.py |  2 +-
     testsuite/pytests/test_onetooneconnect.py     |  4 +--
     testsuite/pytests/test_rate_copy_model.py     | 10 +++----
     .../test_rate_instantaneous_and_delayed.py    | 16 +++++-----
     .../pytests/test_rate_neuron_communication.py | 30 +++++++++----------
     .../pytests/test_sp/test_growth_curves.py     |  8 ++---
     testsuite/pytests/test_step_rate_generator.py |  9 ++----
     18 files changed, 79 insertions(+), 73 deletions(-)
    
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index de48128134..73a4e1a91a 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -159,19 +159,6 @@ nest::UnknownPort::compose_msg_( const int id, const std::string msg ) const
       return out.str();
     }
     
    -const char*
    -nest::IllegalConnection::what() const noexcept
    -{
    -  if ( msg_.empty() )
    -  {
    -    return "Creation of connection is not possible.";
    -  }
    -  else
    -  {
    -    return ( "Creation of connection is not possible because:\n" + msg_ ).c_str();
    -  }
    -}
    -
     const char*
     nest::InexistentConnection::what() const noexcept
     {
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 5f365beeb6..ef3d1989fd 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -343,7 +343,7 @@ class UnknownReceptorType : public KernelException
     
     class IncompatibleReceptorType : public KernelException
     {
    -  std::string compose_msg( const long receptor_type, const std::string name, const std::string event);
    +  std::string compose_msg( const long receptor_type, const std::string name, const std::string event );
     
     public:
       IncompatibleReceptorType( long receptor_type, std::string name, std::string event_type )
    @@ -362,7 +362,7 @@ class UnknownPort : public KernelException
     {
       std::string compose_msg_( const int id ) const;
       std::string compose_msg_( const int id, const std::string msg ) const;
    -  
    +
     public:
       UnknownPort( int id )
         : KernelException( compose_msg_( id ) )
    @@ -385,21 +385,14 @@ class IllegalConnection : public KernelException
     {
     public:
       IllegalConnection()
    -    : KernelException( "IllegalConnection" )
    -    , msg_()
    +    : KernelException( "Creation of connection is not possible." )
       {
       }
     
       IllegalConnection( std::string msg )
    -    : KernelException( "IllegalConnection" )
    -    , msg_( msg )
    +    : KernelException( "Creation of connection is not possible because:\n" + msg )
       {
       }
    -
    -  const char* what() const noexcept override;
    -
    -private:
    -  std::string msg_;
     };
     
     /**
    @@ -505,7 +498,7 @@ class UnexpectedEvent : public KernelException
     class UnsupportedEvent : public KernelException
     {
       std::string compose_msg_() const;
    -  
    +
     public:
       UnsupportedEvent()
         : KernelException( compose_msg_() )
    @@ -631,7 +624,7 @@ class DimensionMismatch : public KernelException
       {
       }
     
    - const char* what() const noexcept override;
    +  const char* what() const noexcept override;
     };
     
     /**
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 50f43f963b..d112526f9c 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -294,6 +294,19 @@ enable_dryrun_mode( const index n_procs )
       kernel().mpi_manager.set_num_processes( n_procs );
     }
     
    +void
    +enable_structural_plasticity()
    +{
    +  kernel().sp_manager.enable_structural_plasticity();
    +}
    +
    +
    +void
    +disable_structural_plasticity()
    +{
    +  kernel().sp_manager.disable_structural_plasticity();
    +}
    +
     void
     register_logger_client( const deliver_logging_event_ptr client_callback )
     {
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 8ab195dec3..2ac209621a 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -90,6 +90,9 @@ void reset_kernel();
     
     void enable_dryrun_mode( const index n_procs );
     
    +void enable_structural_plasticity();
    +void disable_structural_plasticity();
    +
     void register_logger_client( const deliver_logging_event_ptr client_callback );
     
     int get_rank();
    diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h
    index 40c333fdc9..e772e2a0cb 100644
    --- a/nestkernel/parameter.h
    +++ b/nestkernel/parameter.h
    @@ -39,7 +39,7 @@ namespace nest
     {
     class Parameter;
     using ParameterPTR = std::shared_ptr< Parameter >;
    -  
    +
     class AbstractLayer;
     
     /**
    @@ -421,7 +421,7 @@ class SpatialDistanceParameter : public Parameter
         : Parameter( true )
         , dimension_( 0 )
       {
    -    d.update_value( names::dimension, dimension_ );
    +    d.update_integer_value( names::dimension, dimension_ );
         if ( dimension_ < 0 )
         {
           throw BadParameterValue( "Spatial distance parameter dimension cannot be negative." );
    diff --git a/nestkernel/vp_manager.cpp b/nestkernel/vp_manager.cpp
    index 20f4ea7533..d96da14ca1 100644
    --- a/nestkernel/vp_manager.cpp
    +++ b/nestkernel/vp_manager.cpp
    @@ -71,7 +71,7 @@ nest::VPManager::set_status( const dictionary& d )
       long n_vps = get_num_virtual_processes();
     
       bool n_threads_updated = d.update_value( names::local_num_threads, n_threads );
    -  bool n_vps_updated = d.update_value( names::local_num_virtual_procs, n_vps );
    +  bool n_vps_updated = d.update_value( names::total_num_virtual_procs, n_vps );
     
       if ( n_vps_updated )
       {
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index b4d25e46bf..f25994f411 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -32,6 +32,7 @@
     from .hl_api_helper import is_iterable, model_deprecation_warning
     from .hl_api_info import SetStatus
     from .hl_api_types import NodeCollection, Parameter
    +from .hl_api_parallel_computing import Rank, NumProcesses
     
     __all__ = [
         'Create',
    diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py
    index 512e72aad7..daea391373 100644
    --- a/pynest/nest/lib/hl_api_simulation.py
    +++ b/pynest/nest/lib/hl_api_simulation.py
    @@ -329,7 +329,7 @@ def EnableStructuralPlasticity():
     
         """
     
    -    sr('EnableStructuralPlasticity')
    +    nestkernel.llapi_enable_structural_plasticity()
     
     
     @check_stack
    @@ -341,4 +341,4 @@ def DisableStructuralPlasticity():
         EnableStructuralPlasticity
     
         """
    -    sr('DisableStructuralPlasticity')
    +    nestkernel.llapi_disable_structural_plasticity()
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 8675ae27ad..89fa816868 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -396,7 +396,7 @@ def get(self, *params, **kwargs):
             if isinstance(result, dict) and len(self) == 1:
                 new_result = {}
                 for k, v in result.items():
    -                new_result[k] = v[0] if is_iterable(v) and len(v) == 1 else v
    +                new_result[k] = v[0] if is_iterable(v) and len(v) == 1 and type(v) is not dict else v
                 result = new_result
     
             if pandas_output:
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 2df38aaffa..1fc5637468 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -97,6 +97,10 @@ cdef extern from "mask.h" namespace "nest":
     cdef extern from "nest.h" namespace "nest":
         void init_nest( int* argc, char** argv[] )
         void reset_kernel()
    +
    +    void enable_structural_plasticity() except +
    +    void disable_structural_plasticity() except +
    +
         NodeCollectionPTR create( const string model_name, const long n ) except +
         NodeCollectionPTR create_spatial( const dictionary& ) except +
     
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 23551a6178..83173abfc2 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -270,6 +270,14 @@ def catch_cpp_error(func):
     def llapi_reset_kernel():
         reset_kernel()
     
    +@catch_cpp_error
    +def llapi_enable_structural_plasticity():
    +    enable_structural_plasticity()
    +
    +@catch_cpp_error
    +def llapi_disable_structural_plasticity():
    +    disable_structural_plasticity()
    +
     @catch_cpp_error
     def llapi_create(model, long n):
         cdef NodeCollectionPTR gids
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index 677f1bab4a..36c1d21857 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -832,7 +832,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(nest.kernel.NESTError,
                                         "in llapi_connect: "
    -                                    "Creation of connection is not possible because:"
    +                                    "Creation of connection is not possible because:\n"
                                         "Cannot connect with unknown recordable v_comp1"):
                 nest.Connect(mm, n_neat)
     
    diff --git a/testsuite/pytests/test_onetooneconnect.py b/testsuite/pytests/test_onetooneconnect.py
    index ec2bae9f45..de16285fdc 100644
    --- a/testsuite/pytests/test_onetooneconnect.py
    +++ b/testsuite/pytests/test_onetooneconnect.py
    @@ -94,8 +94,8 @@ def test_IllegalConnection(self):
             vm = nest.Create('voltmeter')
             sr = nest.Create('spike_recorder')
     
    -        self.assertRaisesRegex(nest.kernel.NESTError, "IllegalConnection", nest.Connect, n, vm)
    -        self.assertRaisesRegex(nest.kernel.NESTError, "IllegalConnection", nest.Connect, sr, n)
    +        self.assertRaisesRegex(nest.kernel.NESTError, "Creation of connection is not possible", nest.Connect, n, vm)
    +        self.assertRaisesRegex(nest.kernel.NESTError, "Creation of connection is not possible", nest.Connect, sr, n)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_rate_copy_model.py b/testsuite/pytests/test_rate_copy_model.py
    index cb9bc8485c..43df0bd195 100644
    --- a/testsuite/pytests/test_rate_copy_model.py
    +++ b/testsuite/pytests/test_rate_copy_model.py
    @@ -86,11 +86,11 @@ def test_rate_copy_model(self):
     
             # make sure rates are identical
             events = nest.GetStatus(multimeter)[0]['events']
    -        senders = events['senders']
    -        rate_1 = np.array(events['rate'][
    -            np.where(senders == rate_neuron_1.get('global_id'))])
    -        rate_2 = np.array(events['rate'][
    -            np.where(senders == rate_neuron_2.get('global_id'))])
    +        senders = np.array(events['senders'])
    +        rate_1 = np.array(events['rate'])[
    +            np.where(senders == rate_neuron_1.get('global_id'))]
    +        rate_2 = np.array(events['rate'])[
    +            np.where(senders == rate_neuron_2.get('global_id'))]
             assert(np.sum(np.abs(rate_2 - rate_1)) < 1e-12)
     
     
    diff --git a/testsuite/pytests/test_rate_instantaneous_and_delayed.py b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    index 95c60b7f1c..192caab3d4 100644
    --- a/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    +++ b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    @@ -85,14 +85,14 @@ def test_rate_instantaneous_and_delayed(self):
     
             # make sure shifted rates are identical
             events = nest.GetStatus(multimeter)[0]['events']
    -        senders = events['senders']
    -
    -        rate_1 = np.array(events['rate'][
    -            np.where(senders == rate_neuron_1.get('global_id'))])
    -        times_2 = np.array(events['times'][
    -            np.where(senders == rate_neuron_2.get('global_id'))])
    -        rate_2 = np.array(events['rate'][
    -            np.where(senders == rate_neuron_2.get('global_id'))])
    +        senders = np.array(events['senders'])
    +
    +        rate_1 = np.array(events['rate'])[
    +            np.where(senders == rate_neuron_1.get('global_id'))]
    +        times_2 = np.array(events['times'])[
    +            np.where(senders == rate_neuron_2.get('global_id'))]
    +        rate_2 = np.array(events['rate'])[
    +            np.where(senders == rate_neuron_2.get('global_id'))]
     
             # get shifted rate_2
             rate_2 = rate_2[times_2 > delay]
    diff --git a/testsuite/pytests/test_rate_neuron_communication.py b/testsuite/pytests/test_rate_neuron_communication.py
    index 2f2bfb3880..ccac92edb0 100644
    --- a/testsuite/pytests/test_rate_neuron_communication.py
    +++ b/testsuite/pytests/test_rate_neuron_communication.py
    @@ -133,14 +133,14 @@ def test_RateNeuronDelay(self):
     
             # get noise from rate neuron
             events = nest.GetStatus(self.multimeter)[0]["events"]
    -        senders = events['senders']
    +        senders = np.array(events['senders'])
     
             rate_neuron_1_node_id = self.rate_neuron_1.get('global_id')
    -        times = events['times'][np.where(senders == rate_neuron_1_node_id)]
    -        rate_1 = events['rate'][np.where(senders == rate_neuron_1_node_id)]
    +        times = np.array(events['times'])[np.where(senders == rate_neuron_1_node_id)]
    +        rate_1 = np.array(events['rate'])[np.where(senders == rate_neuron_1_node_id)]
     
             rate_neuron_2_node_id = self.rate_neuron_2.get('global_id')
    -        rate_2 = events['rate'][np.where(senders == rate_neuron_2_node_id)]
    +        rate_2 = np.array(events['rate'])[np.where(senders == rate_neuron_2_node_id)]
     
             delay_rate_1 = times[np.where(rate_1 > 0)[0][0]]
             test_delay_1 = self.delay + self.dt
    @@ -155,10 +155,10 @@ def test_RateNeuronWeight(self):
     
             # get noise from rate neuron
             events = nest.GetStatus(self.multimeter)[0]["events"]
    -        senders = events['senders']
    +        senders = np.array(events['senders'])
     
             rate_neuron_1_node_id = self.rate_neuron_1.get('global_id')
    -        rate_1 = events['rate'][np.where(senders == rate_neuron_1_node_id)]
    +        rate_1 = np.array(events['rate'])[np.where(senders == rate_neuron_1_node_id)]
     
             value = rate_1[-1]
             value_test = self.drive * self.weight
    @@ -179,19 +179,19 @@ def test_RateNeuronNL(self):
     
                 # get noise from rate neuron
                 events = nest.GetStatus(self.multimeter)[0]["events"]
    -            senders = events['senders']
    +            senders = np.array(events['senders'])
     
                 rate_neuron_1_node_id = self.rate_neuron_1.get('global_id')
    -            rate_1 = events['rate'][np.where(senders == rate_neuron_1_node_id)][-1]
    +            rate_1 = np.array(events['rate'])[np.where(senders == rate_neuron_1_node_id)][-1]
     
                 rate_neuron_2_node_id = self.rate_neuron_2.get('global_id')
    -            rate_2 = events['rate'][np.where(senders == rate_neuron_2_node_id)][-1]
    +            rate_2 = np.array(events['rate'])[np.where(senders == rate_neuron_2_node_id)][-1]
     
                 rate_neuron_3_node_id = self.rate_neuron_3.get('global_id')
    -            rate_3 = events['rate'][np.where(senders == rate_neuron_3_node_id)][-1]
    +            rate_3 = np.array(events['rate'])[np.where(senders == rate_neuron_3_node_id)][-1]
     
                 rate_neuron_4_node_id = self.rate_neuron_4.get('global_id')
    -            rate_4 = events['rate'][np.where(senders == rate_neuron_4_node_id)][-1]
    +            rate_4 = np.array(events['rate'])[np.where(senders == rate_neuron_4_node_id)][-1]
     
                 rates = np.array([rate_1, rate_2, rate_3, rate_4])
     
    @@ -225,10 +225,10 @@ def test_RectifyOutput(self):
     
             # get activity from rate neuron
             events = nest.GetStatus(self.multimeter)[0]["events"]
    -        senders = events['senders']
    +        senders = np.array(events['senders'])
     
             rate_neuron_5_node_id = self.rate_neuron_5.get('global_id')
    -        rate_5 = events['rate'][np.where(senders == rate_neuron_5_node_id)]
    +        rate_5 = np.array(events['rate'])[np.where(senders == rate_neuron_5_node_id)]
     
             value = rate_5[-1]
             value_test = 0.
    @@ -244,10 +244,10 @@ def test_ParrotRateNeuron(self):
     
             # get activity from rate neuron
             events = nest.GetStatus(self.multimeter)[0]["events"]
    -        senders = events['senders']
    +        senders = np.array(events['senders'])
     
             parrot_node_id = self.parrot_neuron.get('global_id')
    -        parrot_rate = events['rate'][np.where(senders == parrot_node_id)]
    +        parrot_rate = np.array(events['rate'])[np.where(senders == parrot_node_id)]
     
             value = parrot_rate[-1]
             g = nest.GetStatus(self.parrot_neuron)[0]['g']
    diff --git a/testsuite/pytests/test_sp/test_growth_curves.py b/testsuite/pytests/test_sp/test_growth_curves.py
    index 089bd8a01e..2e888ca18c 100644
    --- a/testsuite/pytests/test_sp/test_growth_curves.py
    +++ b/testsuite/pytests/test_sp/test_growth_curves.py
    @@ -309,14 +309,14 @@ def simulate(self):
     
             for t_i, t in enumerate(self.sim_steps):
                 for n_i in range(len(self.pop)):
    -                self.ca_nest[n_i][t_i], synaptic_elements = nest.GetStatus(
    -                    self.pop[n_i], ('Ca', 'synaptic_elements'))[0]
    +                pop_status = nest.GetStatus(self.pop[n_i], (['Ca', 'synaptic_elements']))[0]
    +                self.ca_nest[n_i][t_i], synaptic_elements = [pop_status[k] for k in ('Ca', 'synaptic_elements')]
                     self.se_nest[n_i][t_i] = synaptic_elements['se']['z']
                 nest.Simulate(self.sim_step)
     
             tmp = nest.GetStatus(self.spike_recorder, 'events')[0]
    -        spikes_all = tmp['times']
    -        senders_all = tmp['senders']
    +        spikes_all = numpy.array(tmp['times'])
    +        senders_all = numpy.array(tmp['senders'])
             for n_i, n in enumerate(self.pop):
                 spikes = spikes_all[senders_all == n.get('global_id')]
                 [sei.reset() for sei in self.se_integrator]
    diff --git a/testsuite/pytests/test_step_rate_generator.py b/testsuite/pytests/test_step_rate_generator.py
    index 1cbbfa9004..a0fccb3a40 100644
    --- a/testsuite/pytests/test_step_rate_generator.py
    +++ b/testsuite/pytests/test_step_rate_generator.py
    @@ -64,12 +64,9 @@ def test_step_rate_generator(self):
     
             # read data from multimeter
             data = nest.GetStatus(mm)[0]['events']
    -        rates_neuron = np.array(
    -            data['rate'][np.where(data['senders'] == neuron.get('global_id'))])
    -        rates_srg = np.array(data['rate'][
    -            np.where(data['senders'] == srg.get('global_id'))])
    -        times = np.array(data['times'][
    -            np.where(data['senders'] == neuron.get('global_id'))])
    +        senders = np.array(data['senders'])
    +        rates_neuron = np.array(data['rate'])[senders == neuron.get('global_id')]
    +        rates_srg = np.array(data['rate'])[np.where(senders == srg.get('global_id'))]
     
             # make sure that srg produces the desired rates
             assert(np.array_equal(rates, rates_srg))
    
    From f4c83aab3c4e30a0d49b5fcfc30e41d217a57dc4 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Tue, 13 Dec 2022 10:43:40 +0100
    Subject: [PATCH 105/375] Cleanup
    
    ---
     libnestutil/dict_util.h                       | 31 -------------
     libnestutil/dictionary.cpp                    |  2 -
     .../dictionary_access_flag_manager.cpp        |  3 --
     models/hh_cond_beta_gap_traub.cpp             | 34 +++++++-------
     nestkernel/common_synapse_properties.cpp      |  2 +-
     nestkernel/connection_creator.cpp             | 15 +++----
     nestkernel/logging_manager.cpp                | 45 -------------------
     nestkernel/logging_manager.h                  | 16 -------
     nestkernel/nestmodule.cpp                     |  1 -
     pynest/nest/lib/hl_api_models.py              |  5 ---
     pynest/nest/lib/hl_api_parallel_computing.py  |  6 ---
     pynest/nest/lib/hl_api_simulation.py          | 11 -----
     pynest/nest/ll_api.py                         |  8 ----
     testsuite/pytests/test_NodeCollection.py      |  1 -
     testsuite/pytests/test_changing_tic_base.py   |  9 ++--
     testsuite/pytests/test_clopath_synapse.py     |  1 -
     testsuite/pytests/test_compartmental_model.py |  1 -
     testsuite/pytests/test_connect_all_to_all.py  |  2 -
     .../test_connect_array_fixed_indegree.py      |  1 -
     .../test_connect_array_fixed_outdegree.py     |  1 -
     testsuite/pytests/test_connect_conngen.py     |  1 -
     testsuite/pytests/test_copy_model.py          |  1 -
     testsuite/pytests/test_create.py              |  1 -
     .../test_current_recording_generators.py      |  1 -
     testsuite/pytests/test_errors.py              |  1 -
     testsuite/pytests/test_events.py              |  1 -
     testsuite/pytests/test_get_set.py             |  2 -
     testsuite/pytests/test_getconnections.py      |  1 -
     testsuite/pytests/test_getnodes.py            |  1 -
     testsuite/pytests/test_jonke_synapse.py       |  1 -
     testsuite/pytests/test_json.py                |  1 -
     testsuite/pytests/test_labeled_synapses.py    |  1 -
     testsuite/pytests/test_multiple_synapses.py   |  2 -
     testsuite/pytests/test_onetooneconnect.py     |  1 -
     testsuite/pytests/test_parrot_neuron.py       |  3 --
     testsuite/pytests/test_parrot_neuron_ps.py    |  3 --
     testsuite/pytests/test_quantal_stp_synapse.py |  1 -
     testsuite/pytests/test_rate_copy_model.py     |  2 -
     .../test_rate_instantaneous_and_delayed.py    |  2 -
     testsuite/pytests/test_rate_neuron.py         |  2 -
     .../pytests/test_rate_neuron_communication.py |  2 -
     testsuite/pytests/test_siegert_neuron.py      |  1 -
     testsuite/pytests/test_status.py              |  1 -
     testsuite/pytests/test_stdp_multiplicity.py   |  1 -
     testsuite/pytests/test_stdp_nn_synapses.py    |  3 +-
     testsuite/pytests/test_stdp_synapse.py        |  1 -
     .../pytests/test_stdp_triplet_synapse.py      |  3 --
     testsuite/pytests/test_step_rate_generator.py |  2 -
     testsuite/pytests/test_synapsecollection.py   |  1 -
     testsuite/pytests/test_threads.py             |  1 -
     testsuite/pytests/test_tsodyks2_synapse.py    |  1 -
     testsuite/pytests/test_urbanczik_synapse.py   |  1 -
     .../pytests/test_vogels_sprekeler_synapse.py  |  2 -
     testsuite/pytests/test_weight_recorder.py     |  1 -
     testsuite/pytests/test_weights_as_lists.py    |  1 -
     55 files changed, 30 insertions(+), 216 deletions(-)
    
    diff --git a/libnestutil/dict_util.h b/libnestutil/dict_util.h
    index 1f29bab427..ee76c900d6 100644
    --- a/libnestutil/dict_util.h
    +++ b/libnestutil/dict_util.h
    @@ -31,37 +31,6 @@
     
     namespace nest
     {
    -
    -
    -// /** Update a variable from a dictionary entry if it exists, skip call if it
    -//  * doesn't. If the dictionary entry is a parameter, return value generated from
    -//  * the parameter parameter.
    -//  */
    -// template < typename FT, typename VT >
    -// bool
    -// updateValueParam( DictionaryDatum const& d, Name const n, VT& value, nest::Node* node )
    -// {
    -//   const Token& t = d->lookup( n );
    -
    -//   ParameterDatum* pd = dynamic_cast< ParameterDatum* >( t.datum() );
    -//   if ( pd )
    -//   {
    -//     if ( not node )
    -//     {
    -//       throw BadParameter( "Cannot use Parameter with this model." );
    -//     }
    -//     auto vp = kernel().vp_manager.node_id_to_vp( node->get_node_id() );
    -//     auto tid = kernel().vp_manager.vp_to_thread( vp );
    -//     auto rng = get_vp_specific_rng( tid );
    -//     value = pd->get()->value( rng, node );
    -//     return true;
    -//   }
    -//   else
    -//   {
    -//     return updateValue< FT >( d, n, value );
    -//   }
    -// }
    -
     template < typename T >
     bool
     update_value_param( dictionary const& d, const std::string& key, T& value, nest::Node* node )
    diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp
    index 2742f5b259..1b565eec58 100644
    --- a/libnestutil/dictionary.cpp
    +++ b/libnestutil/dictionary.cpp
    @@ -352,8 +352,6 @@ value_equal( const boost::any first, const boost::any second )
       }
       else
       {
    -    // TODO-PYNEST-NG: raise error
    -    assert( false );
         std::string msg = std::string( "Unsupported type in dictionary::value_equal(): " ) + debug_type( first );
         throw nest::TypeMismatch( msg );
       }
    diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp
    index 68a5f11673..5a6a0211a9 100644
    --- a/libnestutil/dictionary_access_flag_manager.cpp
    +++ b/libnestutil/dictionary_access_flag_manager.cpp
    @@ -51,11 +51,8 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
           key_type_(),
           []( const key_type_& a, const dictionary::value_type& b ) { return a + " " + b.first; } );
     
    -    // TODO-PYNEST-NG: special case for blank <what> ("unaccessed elements in function <where>")?
    -
         throw nest::UnaccessedDictionaryEntry( what, where, missed );
       }
    -  // TODO-PYNEST-NG: clear access_flags_[ &dict ] to reclaim memory?
     }
     
     bool
    diff --git a/models/hh_cond_beta_gap_traub.cpp b/models/hh_cond_beta_gap_traub.cpp
    index b3dc839a3f..edbf2c93ee 100644
    --- a/models/hh_cond_beta_gap_traub.cpp
    +++ b/models/hh_cond_beta_gap_traub.cpp
    @@ -244,24 +244,24 @@ nest::hh_cond_beta_gap_traub::Parameters_::get( dictionary& d ) const
     }
     
     void
    -nest::hh_cond_beta_gap_traub::Parameters_::set( const dictionary& d, Node* node)
    +nest::hh_cond_beta_gap_traub::Parameters_::set( const dictionary& d, Node* node )
     {
    -  d.update_value( names::g_Na, g_Na );
    -  d.update_value( names::g_K, g_K );
    -  d.update_value( names::g_L, g_L );
    -  d.update_value( names::C_m, C_m );
    -  d.update_value( names::E_Na, E_Na );
    -  d.update_value( names::E_K, E_K );
    -  d.update_value( names::E_L, E_L );
    -  d.update_value( names::V_T, V_T );
    -  d.update_value( names::E_ex, E_ex );
    -  d.update_value( names::E_in, E_in );
    -  d.update_value( names::tau_rise_ex, tau_rise_ex );
    -  d.update_value( names::tau_decay_ex, tau_decay_ex );
    -  d.update_value( names::tau_rise_in, tau_rise_in );
    -  d.update_value( names::tau_decay_in, tau_decay_in );
    -  d.update_value( names::t_ref, t_ref_ );
    -  d.update_value( names::I_e, I_e );
    +  update_value_param( d, names::g_Na, g_Na, node );
    +  update_value_param( d, names::g_K, g_K, node );
    +  update_value_param( d, names::g_L, g_L, node );
    +  update_value_param( d, names::C_m, C_m, node );
    +  update_value_param( d, names::E_Na, E_Na, node );
    +  update_value_param( d, names::E_K, E_K, node );
    +  update_value_param( d, names::E_L, E_L, node );
    +  update_value_param( d, names::V_T, V_T, node );
    +  update_value_param( d, names::E_ex, E_ex, node );
    +  update_value_param( d, names::E_in, E_in, node );
    +  update_value_param( d, names::tau_rise_ex, tau_rise_ex, node );
    +  update_value_param( d, names::tau_decay_ex, tau_decay_ex, node );
    +  update_value_param( d, names::tau_rise_in, tau_rise_in, node );
    +  update_value_param( d, names::tau_decay_in, tau_decay_in, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::I_e, I_e, node );
     
       if ( C_m <= 0 )
       {
    diff --git a/nestkernel/common_synapse_properties.cpp b/nestkernel/common_synapse_properties.cpp
    index eb8db680be..db0540180a 100644
    --- a/nestkernel/common_synapse_properties.cpp
    +++ b/nestkernel/common_synapse_properties.cpp
    @@ -55,7 +55,7 @@ CommonSynapseProperties::get_status( dictionary& d ) const
       }
       else
       {
    -    const auto nc = NodeCollectionPTR(); // TODO-PYNEST-NG: check that this gives an empty NC
    +    const auto nc = NodeCollectionPTR( NodeCollection::create( std::vector< index >() ) );
         d[ names::weight_recorder ] = nc;
       }
     }
    diff --git a/nestkernel/connection_creator.cpp b/nestkernel/connection_creator.cpp
    index 70b09f5afe..8c58760bdc 100644
    --- a/nestkernel/connection_creator.cpp
    +++ b/nestkernel/connection_creator.cpp
    @@ -57,7 +57,6 @@ ConnectionCreator::ConnectionCreator( const dictionary& dict )
         // We are sure that number of connections isn't negative, so it is safe to store it in a size_t.
         number_of_connections_ = number_of_connections;
       }
    -  // TODO-PYNEST-NG: implement mask with dictionary
       if ( dict.known( names::mask ) )
       {
         mask_ = create_mask( dict.get< dictionary >( names::mask ) );
    @@ -67,15 +66,18 @@ ConnectionCreator::ConnectionCreator( const dictionary& dict )
         kernel_ = create_parameter( dict.at( names::kernel ) );
       }
     
    -  // TODO-PYNEST-NG: collocated synapses
       if ( dict.known( names::synapse_parameters ) )
       {
         // If synapse_parameters exists, we have collocated synapses.
         std::vector< dictionary > syn_params_dvd;
    -    // ArrayDatum* syn_params_dvd =
    -    //   dynamic_cast< ArrayDatum* >( ( *dict )[ names::synapse_parameters ].datum() );
    -    if ( not dict.update_value( names::synapse_parameters, syn_params_dvd ) )
    +
    +    try
    +    {
    +      dict.update_value( names::synapse_parameters, syn_params_dvd );
    +    }
    +    catch ( const nest::TypeMismatch& )
         {
    +      // Give a more helpful message if the provided type is wrong.
           throw BadProperty( "synapse_parameters must be list of dictionaries" );
         }
     
    @@ -84,7 +86,6 @@ ConnectionCreator::ConnectionCreator( const dictionary& dict )
         for ( auto syn_param_it = syn_params_dvd.begin(); syn_param_it < syn_params_dvd.end();
               ++syn_param_it, ++param_dict )
         {
    -      // auto syn_param = dynamic_cast< dictionary* >( synapse_datum->datum() );
           extract_params_( *syn_param_it, *param_dict );
         }
       }
    @@ -96,8 +97,6 @@ ConnectionCreator::ConnectionCreator( const dictionary& dict )
         extract_params_( dict, param_dicts_[ 0 ] );
       }
     
    -  // dict.all_entries_accessed( "ConnectionCreator", "dict" );
    -
       // Set default synapse_model, weight and delay if not given explicitly
       if ( synapse_model_.empty() )
       {
    diff --git a/nestkernel/logging_manager.cpp b/nestkernel/logging_manager.cpp
    index d846d2d5bb..791a720ac1 100644
    --- a/nestkernel/logging_manager.cpp
    +++ b/nestkernel/logging_manager.cpp
    @@ -116,51 +116,6 @@ nest::LoggingManager::publish_log( const nest::severity_t s,
       }
     }
     
    -void
    -nest::LoggingManager::all_entries_accessed( const dictionary& d,
    -  const std::string& where,
    -  const std::string& msg,
    -  const std::string& file,
    -  const size_t line ) const
    -{
    -  // TODO-PYNEST-NG: Access flags (function never used?)
    -  // std::string missed;
    -  // if ( not d.all_accessed( missed ) )
    -  // {
    -  //   if ( dict_miss_is_error_ )
    -  //   {
    -  //     throw UnaccessedDictionaryEntry( missed );
    -  //   }
    -  //   else
    -  //   {
    -  //     publish_log( M_WARNING, where, msg + missed, file, line );
    -  //   }
    -  // }
    -}
    -
    -void
    -nest::LoggingManager::all_entries_accessed( const dictionary& d,
    -  const std::string& where,
    -  const std::string& msg1,
    -  const std::string& msg2,
    -  const std::string& file,
    -  const size_t line ) const
    -{
    -  // TODO-PYNEST-NG: Access flags (function never used?)
    -  // std::string missed;
    -  // if ( not d.all_accessed( missed ) )
    -  // {
    -  //   if ( dict_miss_is_error_ )
    -  //   {
    -  //     throw UnaccessedDictionaryEntry( missed + "\n" + msg2 );
    -  //   }
    -  //   else
    -  //   {
    -  //     publish_log( M_WARNING, where, msg1 + missed + "\n" + msg2, file, line );
    -  //   }
    -  // }
    -}
    -
     void
     nest::LoggingManager::set_logging_level( const nest::severity_t level )
     {
    diff --git a/nestkernel/logging_manager.h b/nestkernel/logging_manager.h
    index 02338ffbc9..836e3e6d0d 100644
    --- a/nestkernel/logging_manager.h
    +++ b/nestkernel/logging_manager.h
    @@ -85,22 +85,6 @@ class LoggingManager : public ManagerInterface
        */
       void publish_log( const severity_t, const std::string&, const std::string&, const std::string&, const size_t ) const;
     
    -  /**
    -   * Implements standard behaviour for dictionary entry misses. Use with define
    -   * ALL_ENTRIES_ACCESSED.
    -   */
    -  void all_entries_accessed( const dictionary&,
    -    const std::string&,
    -    const std::string&,
    -    const std::string&,
    -    const size_t ) const;
    -
    -  void all_entries_accessed( const dictionary&,
    -    const std::string&,
    -    const std::string&,
    -    const std::string&,
    -    const std::string&,
    -    const size_t ) const;
     
     private:
       /**
    diff --git a/nestkernel/nestmodule.cpp b/nestkernel/nestmodule.cpp
    index 63620e3ac3..583678907e 100644
    --- a/nestkernel/nestmodule.cpp
    +++ b/nestkernel/nestmodule.cpp
    @@ -171,7 +171,6 @@ NestModule::mask_factory_()
     MaskDatum
     NestModule::create_mask( const dictionary& params )
     {
    -  // TODO-PYNEST-NG: move and convert to use dictionary
       // // t can be either an existing MaskDatum, or a Dictionary containing
       // // mask parameters
       // MaskDatum* maskd = dynamic_cast< MaskDatum* >( t.datum() );
    diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py
    index d9d7efe99a..02022bb96f 100644
    --- a/pynest/nest/lib/hl_api_models.py
    +++ b/pynest/nest/lib/hl_api_models.py
    @@ -38,7 +38,6 @@
     
     
     @deprecated("nest.node_models or nest.synapse_models")
    -@check_stack
     def Models(mtype="all", sel=None):
         """Return a tuple of neuron, device, or synapse model names.
     
    @@ -90,7 +89,6 @@ def Models(mtype="all", sel=None):
     
     
     @deprecated("nest.connection_rules")
    -@check_stack
     def ConnectionRules():
         """Return a tuple of all available connection rules, sorted by name.
     
    @@ -104,7 +102,6 @@ def ConnectionRules():
         return tuple(sorted(GetKernelStatus('connection_rules')))
     
     
    -@check_stack
     def SetDefaults(model, params, val=None):
         """Set defaults for the given model or recording backend.
     
    @@ -129,7 +126,6 @@ def SetDefaults(model, params, val=None):
         nestkernel.llapi_set_defaults(model, params)
     
     
    -@check_stack
     def GetDefaults(model, keys=None, output=''):
         """Return defaults of the given model or recording backend.
     
    @@ -177,7 +173,6 @@ def GetDefaults(model, keys=None, output=''):
         return result
     
     
    -@check_stack
     def CopyModel(existing, new, params=None):
         """Create a new model by copying an existing one.
     
    diff --git a/pynest/nest/lib/hl_api_parallel_computing.py b/pynest/nest/lib/hl_api_parallel_computing.py
    index e8efca7e9a..2820de145c 100644
    --- a/pynest/nest/lib/hl_api_parallel_computing.py
    +++ b/pynest/nest/lib/hl_api_parallel_computing.py
    @@ -37,7 +37,6 @@
     ]
     
     
    -@check_stack
     def Rank():
         """Return the MPI rank of the local process.
     
    @@ -60,7 +59,6 @@ def Rank():
         return nestkernel.llapi_get_rank()
     
     
    -@check_stack
     def NumProcesses():
         """Return the overall number of MPI processes.
     
    @@ -73,7 +71,6 @@ def NumProcesses():
         return nestkernel.llapi_get_num_mpi_processes()
     
     
    -@check_stack
     def SetAcceptableLatency(port_name, latency):
         """Set the acceptable `latency` (in ms) for a MUSIC port.
     
    @@ -90,7 +87,6 @@ def SetAcceptableLatency(port_name, latency):
         sr("SetAcceptableLatency")
     
     
    -@check_stack
     def SetMaxBuffered(port_name, size):
         """Set the maximum buffer size for a MUSIC port.
     
    @@ -107,7 +103,6 @@ def SetMaxBuffered(port_name, size):
         sr("SetMaxBuffered")
     
     
    -@check_stack
     def SyncProcesses():
         """Synchronize all MPI processes.
         """
    @@ -115,7 +110,6 @@ def SyncProcesses():
         sr("SyncProcesses")
     
     
    -@check_stack
     def GetLocalVPs():
         """Return iterable representing the VPs local to the MPI rank.
         """
    diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py
    index daea391373..5ba98c86eb 100644
    --- a/pynest/nest/lib/hl_api_simulation.py
    +++ b/pynest/nest/lib/hl_api_simulation.py
    @@ -48,7 +48,6 @@
     ]
     
     
    -@check_stack
     def Simulate(t):
         """Simulate the network for `t` milliseconds.
     
    @@ -66,7 +65,6 @@ def Simulate(t):
         nestkernel.llapi_simulate(t)
     
     
    -@check_stack
     def Run(t):
         """Simulate the network for `t` milliseconds.
     
    @@ -103,7 +101,6 @@ def Run(t):
         nestkernel.llapi_run(t)
     
     
    -@check_stack
     def Prepare():
         """Calibrate the system before a `Run` call. Not needed for `Simulate`.
     
    @@ -118,7 +115,6 @@ def Prepare():
         nestkernel.llapi_prepare()
     
     
    -@check_stack
     def Cleanup():
         """Cleans up resources after a `Run` call. Not needed for `Simulate`.
     
    @@ -171,7 +167,6 @@ def RunManager():
             Cleanup()
     
     
    -@check_stack
     def ResetKernel():
         """Reset the simulation kernel.
     
    @@ -194,7 +189,6 @@ def ResetKernel():
         nestkernel.llapi_reset_kernel()
     
     
    -@check_stack
     def SetKernelStatus(params):
         """Set parameters for the simulation kernel.
     
    @@ -218,7 +212,6 @@ def SetKernelStatus(params):
         # imported during nest module initialization, we can't put the import on
         # the module level, but have to have it on the function level.
         import nest    # noqa
    -    # TODO-PYNEST-NG: Enable again when KernelAttribute works
         raise_errors = params.get('dict_miss_is_error', nest.dict_miss_is_error)
         valids = nest._kernel_attr_names
         readonly = nest._readonly_kernel_attrs
    @@ -241,7 +234,6 @@ def SetKernelStatus(params):
         nestkernel.llapi_set_kernel_status(params)
     
     
    -@check_stack
     def GetKernelStatus(keys=None):
         """Obtain parameters of the simulation kernel.
     
    @@ -289,7 +281,6 @@ def GetKernelStatus(keys=None):
             raise TypeError("keys should be either a string or an iterable")
     
     
    -@check_stack
     def Install(module_name):
         """Load a dynamically linked NEST module.
     
    @@ -319,7 +310,6 @@ def Install(module_name):
         return sr("(%s) Install" % module_name)
     
     
    -@check_stack
     def EnableStructuralPlasticity():
         """Enable structural plasticity for the network simulation
     
    @@ -332,7 +322,6 @@ def EnableStructuralPlasticity():
         nestkernel.llapi_enable_structural_plasticity()
     
     
    -@check_stack
     def DisableStructuralPlasticity():
         """Disable structural plasticity for the network simulation
     
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index b5e521513b..2c21d79ad7 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -52,7 +52,6 @@
     from . import nestkernel_api as nestkernel  # noqa
     
     __all__ = [
    -    'check_stack',
         'set_communicator',
         # 'take_array_index',
         'KernelAttribute',
    @@ -61,17 +60,10 @@
     
     engine = kernel.NESTEngine()
     
    -# take_array_index = engine.take_array_index
    -# connect_arrays = engine.connect_arrays
    -
     
     initialized = False
     
     
    -def check_stack(thing):  # # TODO-PYNEST-NG: remove
    -    return thing
    -
    -
     def set_communicator(comm):
         """Set global communicator for NEST.
     
    diff --git a/testsuite/pytests/test_NodeCollection.py b/testsuite/pytests/test_NodeCollection.py
    index 1f02bb1c63..e4b7a9677d 100644
    --- a/testsuite/pytests/test_NodeCollection.py
    +++ b/testsuite/pytests/test_NodeCollection.py
    @@ -33,7 +33,6 @@
         HAVE_NUMPY = False
     
     
    -@nest.ll_api.check_stack
     class TestNodeCollection(unittest.TestCase):
         """NodeCollection tests"""
     
    diff --git a/testsuite/pytests/test_changing_tic_base.py b/testsuite/pytests/test_changing_tic_base.py
    index 928b4319e0..160bae75df 100644
    --- a/testsuite/pytests/test_changing_tic_base.py
    +++ b/testsuite/pytests/test_changing_tic_base.py
    @@ -24,7 +24,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class TestChangingTicBase(unittest.TestCase):
         eps = 1e-7  # Tolerance value
     
    @@ -47,10 +46,10 @@ def test_models(self):
             # be the same after a change of those. We therefore exclude
             # them from the checks below.
             ignored_params = {
    -          "correlation_detector": ["delta_tau"],
    -          "correlomatrix_detector": ["delta_tau"],
    -          "correlospinmatrix_detector": ["delta_tau"],
    -          "noise_generator":  ["dt"],
    +            "correlation_detector": ["delta_tau"],
    +            "correlomatrix_detector": ["delta_tau"],
    +            "correlospinmatrix_detector": ["delta_tau"],
    +            "noise_generator":  ["dt"],
             }
     
             # Generate a dictionary of reference values for each model.
    diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py
    index d6b217fb28..f6db0a5e70 100644
    --- a/testsuite/pytests/test_clopath_synapse.py
    +++ b/testsuite/pytests/test_clopath_synapse.py
    @@ -30,7 +30,6 @@
     HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
     
     
    -@nest.ll_api.check_stack
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
     class ClopathSynapseTestCase(unittest.TestCase):
         """Test Clopath synapse"""
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index 36c1d21857..a9636e10ba 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -441,7 +441,6 @@ def create_2tdend_4comp(dt=0.1):
         return (n_neat, m_neat), (aa, bb), ss
     
     
    -@nest.ll_api.check_stack
     class NEASTTestCase(unittest.TestCase):
         """ tests for compartmental NEST models """
     
    diff --git a/testsuite/pytests/test_connect_all_to_all.py b/testsuite/pytests/test_connect_all_to_all.py
    index e920d13c43..208573cef8 100644
    --- a/testsuite/pytests/test_connect_all_to_all.py
    +++ b/testsuite/pytests/test_connect_all_to_all.py
    @@ -27,9 +27,7 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class TestAllToAll(connect_test_base.ConnectTestBase):
    -
         # specify connection pattern
         rule = 'all_to_all'
         conn_dict = {'rule': rule}
    diff --git a/testsuite/pytests/test_connect_array_fixed_indegree.py b/testsuite/pytests/test_connect_array_fixed_indegree.py
    index bd6e63c36c..db60c90b3a 100644
    --- a/testsuite/pytests/test_connect_array_fixed_indegree.py
    +++ b/testsuite/pytests/test_connect_array_fixed_indegree.py
    @@ -29,7 +29,6 @@
     import numpy
     
     
    -@nest.ll_api.check_stack
     class ConnectArrayFixedIndegreeTestCase(unittest.TestCase):
         """Tests of connections with fixed indegree and parameter arrays"""
     
    diff --git a/testsuite/pytests/test_connect_array_fixed_outdegree.py b/testsuite/pytests/test_connect_array_fixed_outdegree.py
    index b715cbb374..566ea242ac 100644
    --- a/testsuite/pytests/test_connect_array_fixed_outdegree.py
    +++ b/testsuite/pytests/test_connect_array_fixed_outdegree.py
    @@ -29,7 +29,6 @@
     import numpy
     
     
    -@nest.ll_api.check_stack
     class ConnectArrayFixedOutdegreeTestCase(unittest.TestCase):
         """Tests of connections with fixed outdegree and parameter arrays"""
     
    diff --git a/testsuite/pytests/test_connect_conngen.py b/testsuite/pytests/test_connect_conngen.py
    index a87b8bc61e..6997bc889c 100644
    --- a/testsuite/pytests/test_connect_conngen.py
    +++ b/testsuite/pytests/test_connect_conngen.py
    @@ -41,7 +41,6 @@
     HAVE_LIBNEUROSIM = nest.GetKernelStatus("build_info")["have_libneurosim"]
     
     
    -@nest.ll_api.check_stack
     @unittest.skipIf(not HAVE_CSA, 'Python CSA package is not available')
     @unittest.skipIf(
         not HAVE_LIBNEUROSIM,
    diff --git a/testsuite/pytests/test_copy_model.py b/testsuite/pytests/test_copy_model.py
    index 90143932cd..0f920d68a5 100644
    --- a/testsuite/pytests/test_copy_model.py
    +++ b/testsuite/pytests/test_copy_model.py
    @@ -28,7 +28,6 @@
     import pytest
     
     
    -@nest.ll_api.check_stack
     class TestCopyModel:
         """nest.CopyModel Test"""
     
    diff --git a/testsuite/pytests/test_create.py b/testsuite/pytests/test_create.py
    index aaf90080eb..0e6afd80ae 100644
    --- a/testsuite/pytests/test_create.py
    +++ b/testsuite/pytests/test_create.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class CreateTestCase(unittest.TestCase):
         """Creation tests"""
     
    diff --git a/testsuite/pytests/test_current_recording_generators.py b/testsuite/pytests/test_current_recording_generators.py
    index 9b7cd28d76..3108b283e4 100644
    --- a/testsuite/pytests/test_current_recording_generators.py
    +++ b/testsuite/pytests/test_current_recording_generators.py
    @@ -28,7 +28,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class CurrentRecordingGeneratorTestCase(unittest.TestCase):
         """
         Test if currents from generators are recorded properly. Specifically:
    diff --git a/testsuite/pytests/test_errors.py b/testsuite/pytests/test_errors.py
    index 838398913d..3bf69a5cf4 100644
    --- a/testsuite/pytests/test_errors.py
    +++ b/testsuite/pytests/test_errors.py
    @@ -27,7 +27,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class ErrorTestCase(unittest.TestCase):
         """Tests if errors are handled correctly"""
     
    diff --git a/testsuite/pytests/test_events.py b/testsuite/pytests/test_events.py
    index ea1052b886..f08ce78d71 100644
    --- a/testsuite/pytests/test_events.py
    +++ b/testsuite/pytests/test_events.py
    @@ -27,7 +27,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class EventsTestCase(unittest.TestCase):
         """Tests of the Connect API"""
     
    diff --git a/testsuite/pytests/test_get_set.py b/testsuite/pytests/test_get_set.py
    index 8150adf162..bb3c8c83e5 100644
    --- a/testsuite/pytests/test_get_set.py
    +++ b/testsuite/pytests/test_get_set.py
    @@ -41,7 +41,6 @@
         HAVE_PANDAS = False
     
     
    -@nest.ll_api.check_stack
     class TestNestGetSet(unittest.TestCase):
         """nest module get/set tests"""
     
    @@ -89,7 +88,6 @@ def test_set(self):
                 nest.get = 5
     
     
    -@nest.ll_api.check_stack
     class TestNodeCollectionGetSet(unittest.TestCase):
         """NodeCollection get/set tests"""
     
    diff --git a/testsuite/pytests/test_getconnections.py b/testsuite/pytests/test_getconnections.py
    index 4c1291bb35..1f52145d8d 100644
    --- a/testsuite/pytests/test_getconnections.py
    +++ b/testsuite/pytests/test_getconnections.py
    @@ -29,7 +29,6 @@
     nest.set_verbosity('M_ERROR')
     
     
    -@nest.ll_api.check_stack
     class GetConnectionsTestCase(unittest.TestCase):
         """Find connections and test if values can be set."""
     
    diff --git a/testsuite/pytests/test_getnodes.py b/testsuite/pytests/test_getnodes.py
    index b32c70a59d..9cd2205416 100644
    --- a/testsuite/pytests/test_getnodes.py
    +++ b/testsuite/pytests/test_getnodes.py
    @@ -27,7 +27,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class GetNodesTestCase(unittest.TestCase):
         """Test GetNodes function"""
     
    diff --git a/testsuite/pytests/test_jonke_synapse.py b/testsuite/pytests/test_jonke_synapse.py
    index c812cba368..b539cbbf5f 100644
    --- a/testsuite/pytests/test_jonke_synapse.py
    +++ b/testsuite/pytests/test_jonke_synapse.py
    @@ -27,7 +27,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class TestJonkeSynapse:
         """
         Test the weight change by STDP.
    diff --git a/testsuite/pytests/test_json.py b/testsuite/pytests/test_json.py
    index bbb88fbab9..2e7ae1b0d6 100644
    --- a/testsuite/pytests/test_json.py
    +++ b/testsuite/pytests/test_json.py
    @@ -27,7 +27,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class StatusTestCase(unittest.TestCase):
         """Tests of data in JSON format"""
     
    diff --git a/testsuite/pytests/test_labeled_synapses.py b/testsuite/pytests/test_labeled_synapses.py
    index 6d35464c21..4a470a2956 100644
    --- a/testsuite/pytests/test_labeled_synapses.py
    +++ b/testsuite/pytests/test_labeled_synapses.py
    @@ -29,7 +29,6 @@
     HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
     
     
    -@nest.ll_api.check_stack
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
     class LabeledSynapsesTestCase(unittest.TestCase):
         """Test labeled synapses"""
    diff --git a/testsuite/pytests/test_multiple_synapses.py b/testsuite/pytests/test_multiple_synapses.py
    index 97261a497c..52ddcaaa29 100644
    --- a/testsuite/pytests/test_multiple_synapses.py
    +++ b/testsuite/pytests/test_multiple_synapses.py
    @@ -27,9 +27,7 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class MultipleSynapsesTestCase(unittest.TestCase):
    -
         def setUp(self):
             nest.ResetKernel()
     
    diff --git a/testsuite/pytests/test_onetooneconnect.py b/testsuite/pytests/test_onetooneconnect.py
    index de16285fdc..473fe8c063 100644
    --- a/testsuite/pytests/test_onetooneconnect.py
    +++ b/testsuite/pytests/test_onetooneconnect.py
    @@ -27,7 +27,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class OneToOneConnectTestCase(unittest.TestCase):
         """Tests of Connect with OneToOne pattern"""
     
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index cfccb87eb5..298ae788d1 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -28,7 +28,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class ParrotNeuronTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
    @@ -103,7 +102,6 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
                 "Parrot neuron failed to correctly repeat multiple spikes."
     
     
    -@nest.ll_api.check_stack
     class ParrotNeuronPoissonTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
    @@ -157,7 +155,6 @@ def test_ParrotNeuronIncomingMultiplicity(self):
                 "parrot_neuron adds spikes."
     
     
    -@nest.ll_api.check_stack
     class ParrotNeuronSTDPTestCase(unittest.TestCase):
         """
         Check STDP protocol between two parrot_neurons connected by a stdp_synapse.
    diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index e2324487c9..2d6ee95921 100644
    --- a/testsuite/pytests/test_parrot_neuron_ps.py
    +++ b/testsuite/pytests/test_parrot_neuron_ps.py
    @@ -37,7 +37,6 @@ def _round_up(simtime):
         return res * math.ceil(float(simtime) / float(res))
     
     
    -@nest.ll_api.check_stack
     class ParrotNeuronPSTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
    @@ -117,7 +116,6 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
                 "Parrot neuron failed to correctly repeat multiple spikes."
     
     
    -@nest.ll_api.check_stack
     class ParrotNeuronPSPoissonTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
    @@ -174,7 +172,6 @@ def test_ParrotNeuronIncomingMultiplicity(self):
                 "parrot_neuron adds spikes."
     
     
    -@nest.ll_api.check_stack
     class ParrotNeuronPSSTDPTestCase(unittest.TestCase):
         """
         Check STDP protocol between two parrot_neurons_ps connected by a
    diff --git a/testsuite/pytests/test_quantal_stp_synapse.py b/testsuite/pytests/test_quantal_stp_synapse.py
    index ae37ba05c8..68ea5196ec 100644
    --- a/testsuite/pytests/test_quantal_stp_synapse.py
    +++ b/testsuite/pytests/test_quantal_stp_synapse.py
    @@ -26,7 +26,6 @@
     import unittest
     
     
    -@nest.ll_api.check_stack
     class QuantalSTPSynapseTestCase(unittest.TestCase):
         """Compare quantal_stp_synapse with its deterministic equivalent."""
     
    diff --git a/testsuite/pytests/test_rate_copy_model.py b/testsuite/pytests/test_rate_copy_model.py
    index 43df0bd195..debbde1fe5 100644
    --- a/testsuite/pytests/test_rate_copy_model.py
    +++ b/testsuite/pytests/test_rate_copy_model.py
    @@ -24,9 +24,7 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class RateCopyModelTestCase(unittest.TestCase):
    -
         '''
         Test whether a rate connection created by copy model behaves
         identical to the original version
    diff --git a/testsuite/pytests/test_rate_instantaneous_and_delayed.py b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    index 192caab3d4..1bfb8eacf5 100644
    --- a/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    +++ b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    @@ -24,9 +24,7 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class RateInstantaneousAndDelayedTestCase(unittest.TestCase):
    -
         '''
         Test whether delayed rate connections have same properties as
         instantaneous connections but with the correct delay
    diff --git a/testsuite/pytests/test_rate_neuron.py b/testsuite/pytests/test_rate_neuron.py
    index 6d3b73aad4..46c49b3e81 100644
    --- a/testsuite/pytests/test_rate_neuron.py
    +++ b/testsuite/pytests/test_rate_neuron.py
    @@ -30,9 +30,7 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class RateNeuronTestCase(unittest.TestCase):
    -
         """Check rate_neuron"""
     
         def setUp(self):
    diff --git a/testsuite/pytests/test_rate_neuron_communication.py b/testsuite/pytests/test_rate_neuron_communication.py
    index ccac92edb0..5620dbeb5e 100644
    --- a/testsuite/pytests/test_rate_neuron_communication.py
    +++ b/testsuite/pytests/test_rate_neuron_communication.py
    @@ -32,9 +32,7 @@ def H(x):
         return 0.5 * (np.sign(x) + 1.)
     
     
    -@nest.ll_api.check_stack
     class RateNeuronCommunicationTestCase(unittest.TestCase):
    -
         """Check rate_neuron"""
     
         def setUp(self):
    diff --git a/testsuite/pytests/test_siegert_neuron.py b/testsuite/pytests/test_siegert_neuron.py
    index 053e13f2f4..e2e6e03107 100644
    --- a/testsuite/pytests/test_siegert_neuron.py
    +++ b/testsuite/pytests/test_siegert_neuron.py
    @@ -28,7 +28,6 @@
     HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
     
     
    -@nest.ll_api.check_stack
     @unittest.skipIf(not HAVE_GSL, "GSL is not available")
     class SiegertNeuronTestCase(unittest.TestCase):
         """
    diff --git a/testsuite/pytests/test_status.py b/testsuite/pytests/test_status.py
    index fd6d3ce5a1..aba38fa2e8 100644
    --- a/testsuite/pytests/test_status.py
    +++ b/testsuite/pytests/test_status.py
    @@ -27,7 +27,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class StatusTestCase(unittest.TestCase):
         """Tests of Get/SetStatus, Get/SetDefaults, and Get/SetKernelStatus via get/set"""
     
    diff --git a/testsuite/pytests/test_stdp_multiplicity.py b/testsuite/pytests/test_stdp_multiplicity.py
    index 80ade69bef..24ae7427a8 100644
    --- a/testsuite/pytests/test_stdp_multiplicity.py
    +++ b/testsuite/pytests/test_stdp_multiplicity.py
    @@ -34,7 +34,6 @@
         DEBUG_PLOTS = False
     
     
    -@nest.ll_api.check_stack
     class TestStdpSpikeMultiplicity:
         """
         Test correct handling of spike multiplicity in STDP.
    diff --git a/testsuite/pytests/test_stdp_nn_synapses.py b/testsuite/pytests/test_stdp_nn_synapses.py
    index 3ef8f958f8..fbf7fa16d3 100644
    --- a/testsuite/pytests/test_stdp_nn_synapses.py
    +++ b/testsuite/pytests/test_stdp_nn_synapses.py
    @@ -29,7 +29,6 @@
     from math import exp
     
     
    -@nest.ll_api.check_stack
     class TestSTDPNNSynapses:
         """
         Test the weight change by STDP
    @@ -95,7 +94,7 @@ def do_nest_simulation_and_compare_to_reproduced_weight(self,
                 err_msg=synapse_model + " test: "
                                         "Resulting synaptic weight %e "
                                         "differs from expected %e" % (
    -                                       weight_by_nest, weight_reproduced_independently))
    +                                        weight_by_nest, weight_reproduced_independently))
     
         def do_the_nest_simulation(self):
             """
    diff --git a/testsuite/pytests/test_stdp_synapse.py b/testsuite/pytests/test_stdp_synapse.py
    index 31519653a0..8b4c26e89e 100644
    --- a/testsuite/pytests/test_stdp_synapse.py
    +++ b/testsuite/pytests/test_stdp_synapse.py
    @@ -32,7 +32,6 @@
         DEBUG_PLOTS = False
     
     
    -@nest.ll_api.check_stack
     class TestSTDPSynapse:
         """
         Compare the STDP synaptic plasticity model against a self-contained Python reference.
    diff --git a/testsuite/pytests/test_stdp_triplet_synapse.py b/testsuite/pytests/test_stdp_triplet_synapse.py
    index 492422200f..b943146233 100644
    --- a/testsuite/pytests/test_stdp_triplet_synapse.py
    +++ b/testsuite/pytests/test_stdp_triplet_synapse.py
    @@ -27,7 +27,6 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class STDPTripletSynapseTestCase(unittest.TestCase):
         """Check stdp_triplet_synapse model properties."""
     
    @@ -293,9 +292,7 @@ def test_maxWeightStaturatesWeight(self):
                 "weight"), "weight should have been limited")
     
     
    -@nest.ll_api.check_stack
     class STDPTripletInhTestCase(STDPTripletSynapseTestCase):
    -
         def setUp(self):
             nest.set_verbosity('M_WARNING')
             nest.ResetKernel()
    diff --git a/testsuite/pytests/test_step_rate_generator.py b/testsuite/pytests/test_step_rate_generator.py
    index a0fccb3a40..41f0fc1cc8 100644
    --- a/testsuite/pytests/test_step_rate_generator.py
    +++ b/testsuite/pytests/test_step_rate_generator.py
    @@ -24,9 +24,7 @@
     import numpy as np
     
     
    -@nest.ll_api.check_stack
     class StepRateGeneratorTestCase(unittest.TestCase):
    -
         '''
         Test whether the step_rate_generator produces and
         communicates the desired rates
    diff --git a/testsuite/pytests/test_synapsecollection.py b/testsuite/pytests/test_synapsecollection.py
    index 34c7043f62..07b37956b8 100644
    --- a/testsuite/pytests/test_synapsecollection.py
    +++ b/testsuite/pytests/test_synapsecollection.py
    @@ -33,7 +33,6 @@
         HAVE_PANDAS = False
     
     
    -@nest.ll_api.check_stack
     class TestSynapseCollection(unittest.TestCase):
         """SynapseCollection tests"""
     
    diff --git a/testsuite/pytests/test_threads.py b/testsuite/pytests/test_threads.py
    index 989b6580b3..c3b0662e64 100644
    --- a/testsuite/pytests/test_threads.py
    +++ b/testsuite/pytests/test_threads.py
    @@ -27,7 +27,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class ThreadTestCase(unittest.TestCase):
         """Tests for multi-threading"""
     
    diff --git a/testsuite/pytests/test_tsodyks2_synapse.py b/testsuite/pytests/test_tsodyks2_synapse.py
    index 9c526444ee..8513b152cd 100644
    --- a/testsuite/pytests/test_tsodyks2_synapse.py
    +++ b/testsuite/pytests/test_tsodyks2_synapse.py
    @@ -24,7 +24,6 @@
     import unittest
     
     
    -@nest.ll_api.check_stack
     class Tsodyks2SynapseTest(unittest.TestCase):
         """
         Functional test for the "tsodyks2" synapse: compare NEST implementation to
    diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py
    index 551f01d0ab..ded6642d76 100644
    --- a/testsuite/pytests/test_urbanczik_synapse.py
    +++ b/testsuite/pytests/test_urbanczik_synapse.py
    @@ -30,7 +30,6 @@
     HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
     
     
    -@nest.ll_api.check_stack
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
     class UrbanczikSynapseTestCase(unittest.TestCase):
         """Test Urbanczik synapse"""
    diff --git a/testsuite/pytests/test_vogels_sprekeler_synapse.py b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    index 9ad8afc721..589516478a 100644
    --- a/testsuite/pytests/test_vogels_sprekeler_synapse.py
    +++ b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    @@ -26,9 +26,7 @@
     from math import exp
     
     
    -@nest.ll_api.check_stack
     class VogelsSprekelerConnectionTestCase(unittest.TestCase):
    -
         """Check vogels_sprekeler_synapse model properties."""
     
         def setUp(self):
    diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py
    index bd13c518ad..d112eed8ff 100644
    --- a/testsuite/pytests/test_weight_recorder.py
    +++ b/testsuite/pytests/test_weight_recorder.py
    @@ -30,7 +30,6 @@
     HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
     
     
    -@nest.ll_api.check_stack
     class WeightRecorderTestCase(unittest.TestCase):
         """Tests for the Weight Recorder"""
     
    diff --git a/testsuite/pytests/test_weights_as_lists.py b/testsuite/pytests/test_weights_as_lists.py
    index 59e2f2c3b9..eb242289d5 100644
    --- a/testsuite/pytests/test_weights_as_lists.py
    +++ b/testsuite/pytests/test_weights_as_lists.py
    @@ -27,7 +27,6 @@
     import nest
     
     
    -@nest.ll_api.check_stack
     class WeightsAsListTestCase(unittest.TestCase):
         """Test weights given as lists"""
     
    
    From a1949ac85951e7b94255f3b9d3c365319bd64d3f Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Thu, 15 Dec 2022 13:54:52 +0100
    Subject: [PATCH 106/375] Updated RecordingDevice for new dictionary access
     flags
    
    ---
     nestkernel/recording_device.cpp | 20 +++++++++-----------
     1 file changed, 9 insertions(+), 11 deletions(-)
    
    diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp
    index 187b92926d..824527abeb 100644
    --- a/nestkernel/recording_device.cpp
    +++ b/nestkernel/recording_device.cpp
    @@ -145,11 +145,10 @@ nest::RecordingDevice::set_status( const dictionary& d )
         // copy all properties not previously accessed from d to backend_params
         for ( auto& kv_pair : d )
         {
    -      // TODO-PYNEST-NG: Fix when access flags are added
    -      // if ( not kv_pair.second.accessed() )
    -      // {
    -      //   backend_params[ kv_pair.first.toString() ] = kv_pair.second;
    -      // }
    +      if ( not kernel().get_dict_access_flag_manager().accessed( d, kv_pair.first ) )
    +      {
    +        backend_params[ kv_pair.first ] = kv_pair.second;
    +      }
         }
     
         kernel().io_manager.check_recording_backend_device_status( ptmp.record_to_, backend_params );
    @@ -158,12 +157,11 @@ nest::RecordingDevice::set_status( const dictionary& d )
         backend_params_.clear();
         for ( auto& kv_pair : backend_params )
         {
    -      // TODO-PYNEST-NG: Fix when access flags are added
    -      // if ( kv_pair->second.accessed() )
    -      // {
    -      //   backend_params_[ kv_pair->first.toString() ] = kv_pair->second;
    -      //   d->lookup( kv_pair->first ).set_access_flag();
    -      // }
    +      if ( kernel().get_dict_access_flag_manager().accessed( backend_params, kv_pair.first ) )
    +      {
    +        backend_params_[ kv_pair.first ] = kv_pair.second;
    +        kernel().get_dict_access_flag_manager().register_access( d, kv_pair.first );
    +      }
         }
       }
       else
    
    From 1e8d9ac1d9d7dbdbc73fd159adbf5ff8baba2306 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Thu, 15 Dec 2022 15:11:40 +0100
    Subject: [PATCH 107/375] Updated cm_default for new dictionary
    
    ---
     models/cm_default.cpp | 89 +++++++++++++++++++++++++------------------
     models/cm_default.h   |  4 +-
     2 files changed, 53 insertions(+), 40 deletions(-)
    
    diff --git a/models/cm_default.cpp b/models/cm_default.cpp
    index 08b61eea3a..afa088bea7 100644
    --- a/models/cm_default.cpp
    +++ b/models/cm_default.cpp
    @@ -110,30 +110,21 @@ nest::cm_default::set_status( const dictionary& statusdict )
        * single compartment or multiple compartments, depending on wether the
        * entry was a list of dicts or a single dict
        */
    -  if ( statusdict.known( names::compartments ) )
    +  const auto add_compartments_list_or_dict = [ this, &statusdict ]( const std::string name )
       {
    -    /**
    -     * Until an operator to explicititly append compartments is added to the
    -     * API, we disable this functionality
    -     */
    -    if ( c_tree_.get_size() > 0 )
    -    {
    -      throw BadProperty( "\'compartments\' is already defined for this model" );
    -    }
    -
    -    auto compartment_data = statusdict.at( names::compartments );
    -    if ( is_type< std::vector< dictionary > >( compartment_data ) )
    +    if ( is_type< std::vector< dictionary > >( statusdict.at( name ) ) )
         {
    +      const auto compartments = statusdict.get< std::vector< dictionary > >( name );
           // A list of compartments is provided, we add them all to the tree
    -      for ( auto compartment : boost::any_cast< std::vector< dictionary > >( compartment_data ) )
    +      for ( const auto& compartment_dict : compartments )
           {
    -        add_compartment_( compartment );
    +        add_compartment_( compartment_dict );
           }
         }
    -    else if ( is_type< dictionary >( compartment_data ) )
    +    else if ( is_type< dictionary >( statusdict.at( name ) ) )
         {
           // A single compartment is provided, we add add it to the tree
    -      add_compartment_( boost::any_cast< dictionary& >( compartment_data )  );
    +      add_compartment_( statusdict.get< dictionary >( name ) );
         }
         else
         {
    @@ -141,7 +132,7 @@ nest::cm_default::set_status( const dictionary& statusdict )
             "\'compartments\' entry could not be identified, provide "
             "list of parameter dicts for multiple compartments" );
         }
    -  }
    +  };
     
       /**
        * Add a receptor (or receptors) to the tree, so that the new receptor
    @@ -150,28 +141,19 @@ nest::cm_default::set_status( const dictionary& statusdict )
        * single receptor or multiple receptors, depending on wether the
        * entry was a list of dicts or a single dict
        */
    -  if ( statusdict.known( names::receptors ) )
    +  const auto add_receptors_list_or_dict = [ this, &statusdict ]( const std::string name )
       {
    -    /**
    -     * Until an operator to explicititly append receptors is added to the
    -     * API, we disable this functionality
    -     */
    -    if ( long( syn_buffers_.size() ) > 0 )
    +    if ( is_type< std::vector< dictionary > >( statusdict.at( name ) ) )
         {
    -      throw BadProperty( "\'receptors\' is already defined for this model" );
    -    }
    -
    -    auto receptor_data = statusdict.at( names::receptors );
    -    if ( is_type< std::vector< dictionary > >( receptor_data ) )
    -    {
    -      for ( auto receptor : boost::any_cast< std::vector< dictionary > >( receptor_data ) )
    +      const auto receptors = statusdict.get< std::vector< dictionary > >( name );
    +      for ( const auto& receptor_dict : receptors )
           {
    -        add_receptor_( receptor );
    +        add_receptor_( receptor_dict );
           }
         }
    -    else if ( is_type< dictionary >( receptor_data ) )
    +    else if ( is_type< dictionary >( statusdict.at( name ) ) )
         {
    -      add_receptor_( boost::any_cast< dictionary& >( receptor_data ) );
    +      add_receptor_( statusdict.get< dictionary >( name ) );
         }
         else
         {
    @@ -179,7 +161,39 @@ nest::cm_default::set_status( const dictionary& statusdict )
             "\'receptors\' entry could not be identified, provide "
             "list of parameter dicts for multiple receptors" );
         }
    +  };
    +
    +  if ( statusdict.known( names::compartments ) )
    +  {
    +    // Compartments can only be set on a newly created compartment model.
    +    // To add additional compartments, add_compartments should be used.
    +    if ( c_tree_.get_size() > 0 )
    +    {
    +      throw BadProperty( "\'compartments\' is already defined for this model" );
    +    }
    +    add_compartments_list_or_dict( names::compartments );
    +  }
    +
    +  if ( statusdict.known( names::add_compartments ) )
    +  {
    +    add_compartments_list_or_dict( names::add_compartments );
    +  }
    +
    +  if ( statusdict.known( names::receptors ) )
    +  {
    +    // Receptors can only be set on a newly created compartment model.
    +    // To add additional receptors, add_receptors should be used.
    +    if ( syn_buffers_.size() > 0 )
    +    {
    +      throw BadProperty( "\'receptors\' is already defined for this model" );
    +    }
    +    add_receptors_list_or_dict( names::receptors );
    +  }
    +  if ( statusdict.known( names::add_receptors ) )
    +  {
    +    add_receptors_list_or_dict( names::add_receptors );
       }
    +
       /**
        * we need to initialize the recordables pointers to guarantee that the
        * recordables of the new compartments and/or receptors will be in the
    @@ -188,7 +202,7 @@ nest::cm_default::set_status( const dictionary& statusdict )
       init_recordables_pointers_();
     }
     void
    -nest::cm_default::add_compartment_( dictionary& dd )
    +nest::cm_default::add_compartment_( const dictionary& dd )
     {
       if ( dd.known( names::params ) )
       {
    @@ -200,7 +214,7 @@ nest::cm_default::add_compartment_( dictionary& dd )
       }
     }
     void
    -nest::cm_default::add_receptor_( dictionary& dd )
    +nest::cm_default::add_receptor_( const dictionary& dd )
     {
       const long compartment_idx = dd.get< long >( names::comp_idx );
       const std::string receptor_type = dd.get< std::string >( names::receptor_type );
    @@ -216,8 +230,7 @@ nest::cm_default::add_receptor_( dictionary& dd )
       Compartment* compartment = c_tree_.get_compartment( compartment_idx );
       if ( dd.known( names::params ) )
       {
    -    compartment->compartment_currents.add_synapse(
    -      receptor_type, syn_idx, dd.get< dictionary >( names::params ) );
    +    compartment->compartment_currents.add_synapse( receptor_type, syn_idx, dd.get< dictionary >( names::params ) );
       }
       else
       {
    @@ -234,7 +247,7 @@ nest::cm_default::init_recordables_pointers_()
        *     voltage (e.g. "v_comp1") or by the synapse index for receptor currents
        * --> values are pointers to the specific state variables
        */
    -  std::map< std::string , double* > recordables = c_tree_.get_recordables();
    +  std::map< std::string, double* > recordables = c_tree_.get_recordables();
     
       for ( auto rec_it = recordables.begin(); rec_it != recordables.end(); rec_it++ )
       {
    diff --git a/models/cm_default.h b/models/cm_default.h
    index 45b2466203..f8d075df3a 100644
    --- a/models/cm_default.h
    +++ b/models/cm_default.h
    @@ -249,8 +249,8 @@ class cm_default : public ArchivingNode
       void set_status( const dictionary& ) override;
     
     private:
    -  void add_compartment_( dictionary& dd );
    -  void add_receptor_( dictionary& dd );
    +  void add_compartment_( const dictionary& dd );
    +  void add_receptor_( const dictionary& dd );
     
       void init_recordables_pointers_();
       void pre_run_hook() override;
    
    From 41b12317100209c72b93022e8678f12eebb3c0c8 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Thu, 15 Dec 2022 15:12:12 +0100
    Subject: [PATCH 108/375] Fixed compiler warning
    
    ---
     nestkernel/exceptions.cpp | 14 ++++++++------
     1 file changed, 8 insertions(+), 6 deletions(-)
    
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index 5864260b45..20e4f09da5 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -58,7 +58,7 @@ nest::UnknownComponent::compose_msg_( const std::string& component_name ) const
     std::string
     nest::NewModelNameExists::compose_msg_( const std::string& model_name ) const
     {
    -  std::string msg  = "Model " + model_name + " is the name of an existing model and cannot be re-used.";
    +  std::string msg = "Model " + model_name + " is the name of an existing model and cannot be re-used.";
       return msg;
     }
     
    @@ -113,8 +113,8 @@ std::string
     nest::NodeWithProxiesExpected::compose_msg_( const int id ) const
     {
       std::ostringstream out;
    -  out << "A node with proxies (usually a neuron) is expected, but the node with id "
    -      << id << " is a node without proxies (usually a device).";
    +  out << "A node with proxies (usually a neuron) is expected, but the node with id " << id
    +      << " is a node without proxies (usually a device).";
       return out.str();
     }
     
    @@ -136,7 +136,9 @@ nest::UnknownReceptorType::compose_msg_( const long receptor_type, const std::st
     }
     
     std::string
    -nest::IncompatibleReceptorType::compose_msg( const long receptor_type, const std::string name, const std::string event_type)
    +nest::IncompatibleReceptorType::compose_msg( const long receptor_type,
    +  const std::string name,
    +  const std::string event_type )
     {
       std::ostringstream msg;
       msg << "Receptor type " << receptor_type << " in " << name << " does not accept " << event_type << ".";
    @@ -212,7 +214,7 @@ std::string
     nest::UnsupportedEvent::compose_msg_() const
     {
       return "The current synapse type does not support the event type of the sender.\n"
    -    "    A common cause for this is a plastic synapse between a device and a neuron.";
    +         "    A common cause for this is a plastic synapse between a device and a neuron.";
     }
     
     const char*
    @@ -333,7 +335,7 @@ nest::RangeCheck::what() const noexcept
     const char*
     nest::IOError::what() const noexcept
     {
    -  return std::string().c_str();
    +  return "";
     }
     
     const char*
    
    From a4aed6aba73d58f892c4e67d9931d7667d541073 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Fri, 16 Dec 2022 14:48:32 +0100
    Subject: [PATCH 109/375] Updated disconnect for new pynest
    
    ---
     nestkernel/sp_manager.cpp             | 14 +++++++++-----
     pynest/nest/lib/hl_api_connections.py | 12 ++++++++----
     pynest/nest/lib/hl_api_types.py       |  3 +--
     pynest/nestkernel_api.pxd             |  1 +
     pynest/nestkernel_api.pyx             |  9 +++++++++
     5 files changed, 28 insertions(+), 11 deletions(-)
    
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index a45bffeb0e..95276ca04b 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -273,9 +273,13 @@ SPManager::disconnect( NodeCollectionPTR sources,
         }
       }
     
    +  // The ConnBuilder expects synapse specifications in a vector. We have to define
    +  // the vector here to keep track of access flags.
    +  const std::vector< dictionary > syn_spec_vec = { syn_spec };
    +
       ConnBuilder* cb = nullptr;
       conn_spec.init_access_flags();
    -  syn_spec.init_access_flags();
    +  syn_spec_vec[ 0 ].init_access_flags();
     
       if ( not conn_spec.known( names::rule ) )
       {
    @@ -293,10 +297,10 @@ SPManager::disconnect( NodeCollectionPTR sources,
     
         for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ )
         {
    -      std::string syn_model = syn_spec.get< std::string >( names::synapse_model );
    +      std::string syn_model = syn_spec_vec[ 0 ].get< std::string >( names::synapse_model );
           if ( ( *i )->get_synapse_model() == kernel().model_manager.get_synapse_model_id( syn_model ) )
           {
    -        cb = kernel().connection_manager.get_conn_builder( rule_name, sources, targets, conn_spec, { syn_spec } );
    +        cb = kernel().connection_manager.get_conn_builder( rule_name, sources, targets, conn_spec, syn_spec_vec );
             cb->set_post_synaptic_element_name( ( *i )->get_post_synaptic_element_name() );
             cb->set_pre_synaptic_element_name( ( *i )->get_pre_synaptic_element_name() );
           }
    @@ -304,13 +308,13 @@ SPManager::disconnect( NodeCollectionPTR sources,
       }
       else
       {
    -    cb = kernel().connection_manager.get_conn_builder( rule_name, sources, targets, conn_spec, { syn_spec } );
    +    cb = kernel().connection_manager.get_conn_builder( rule_name, sources, targets, conn_spec, syn_spec_vec );
       }
       assert( cb );
     
       // at this point, all entries in conn_spec and syn_spec have been checked
       conn_spec.all_entries_accessed( "Disconnect", "conn_spec" );
    -  syn_spec.all_entries_accessed( "Disconnect", "syn_spec" );
    +  syn_spec_vec[ 0 ].all_entries_accessed( "Disconnect", "syn_spec" );
     
       // Set flag before calling cb->disconnect() in case exception is thrown after some connections have been removed.
       kernel().connection_manager.set_connections_have_changed();
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index caf688e5e7..877a5aa98b 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -341,9 +341,13 @@ def Disconnect(*args, conn_spec=None, syn_spec=None):
             # Fill default values
             conn_spec = 'one_to_one' if conn_spec is None else conn_spec
             syn_spec = 'static_synapse' if syn_spec is None else syn_spec
    -        if is_string(conn_spec):
    +        if isinstance(conn_spec, str):
                 conn_spec = {'rule': conn_spec}
    -        if is_string(syn_spec):
    +        if isinstance(syn_spec, str):
                 syn_spec = {'synapse_model': syn_spec}
    -
    -    nestkernel.llapi_disconnect(pre._datum, post._datum, conn_spec, syn_spec)
    +        pre, post = args
    +        if not isinstance(pre, NodeCollection) or not isinstance(post, NodeCollection):
    +            raise TypeError('Arguments must be either a SynapseCollection or two NodeCollections')
    +        nestkernel.llapi_disconnect(pre._datum, post._datum, conn_spec, syn_spec)
    +    else:
    +        raise TypeError('Arguments must be either a SynapseCollection or two NodeCollections')
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 278342ca99..0af3b2fd03 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -901,8 +901,7 @@ def disconnect(self):
             """
             Disconnect the connections in the `SynapseCollection`.
             """
    -        sps(self._datum)
    -        sr('Disconnect_a')
    +        nestkernel.llapi_disconnect_syncoll(self._datum)
     
     
     class CollocatedSynapses:
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 1fc5637468..2182610a4b 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -120,6 +120,7 @@ cdef extern from "nest.h" namespace "nest":
                      NodeCollectionPTR targets,
                      const dictionary& connectivity,
                      const dictionary& synapse_params) except +
    +    void disconnect( const deque[ConnectionID]& conns ) except +
         int get_rank() except +
         int get_num_mpi_processes() except +
         string print_nodes_to_string()
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index b9bd37d751..27b404eee0 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -423,6 +423,15 @@ def llapi_disconnect(NodeCollectionObject pre, NodeCollectionObject post, object
                 pydict_to_dictionary(conn_params),
                 pydict_to_dictionary(synapse_params))
     
    +@catch_cpp_error
    +def llapi_disconnect_syncoll(object conns):
    +    cdef deque[ConnectionID] conn_deque
    +    cdef ConnectionObject conn_object
    +    for conn_object in conns:
    +        conn_deque.push_back(conn_object.thisobj)
    +
    +    disconnect(conn_deque)
    +
     @catch_cpp_error
     def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, object projections):
         print("### 9", projections)
    
    From c08f4695e2c510d2b9c1c292dc701a363dc928f5 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Wed, 4 Jan 2023 15:33:37 +0100
    Subject: [PATCH 110/375] Implemented getter and setter for verbosity
    
    ---
     nestkernel/nest.cpp            | 12 ++++++++++++
     nestkernel/nest.h              |  3 +++
     pynest/nest/lib/hl_api_info.py | 24 +++++++++++-------------
     pynest/nestkernel_api.pxd      | 16 ++++++++++++++++
     pynest/nestkernel_api.pyx      |  8 ++++++++
     5 files changed, 50 insertions(+), 13 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 70614d7a4b..7fe0060e0f 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -287,6 +287,18 @@ reset_kernel()
       kernel().reset();
     }
     
    +severity_t
    +get_verbosity()
    +{
    +  return kernel().logging_manager.get_logging_level();
    +}
    +
    +void
    +set_verbosity( severity_t s )
    +{
    +  kernel().logging_manager.set_logging_level( s );
    +}
    +
     void
     enable_dryrun_mode( const index n_procs )
     {
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 9510d4ad70..745d6a1f5d 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -88,6 +88,9 @@ void install_module( const std::string& module_name );
     
     void reset_kernel();
     
    +severity_t get_verbosity();
    +void set_verbosity( severity_t s );
    +
     void enable_dryrun_mode( const index n_procs );
     
     void enable_structural_plasticity();
    diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py
    index 91d6a73518..1b4d2ff67c 100644
    --- a/pynest/nest/lib/hl_api_info.py
    +++ b/pynest/nest/lib/hl_api_info.py
    @@ -42,8 +42,11 @@
         'message',
         'set_verbosity',
         'sysinfo',
    +    'verbosity',
     ]
     
    +verbosity = nestkernel.severity_t
    +
     
     def sysinfo():
         """Print information on the platform on which NEST was compiled.
    @@ -172,13 +175,11 @@ def get_verbosity():
     
         Returns
         -------
    -    int:
    +    severity_t:
             The current verbosity level
         """
     
    -    #sr('verbosity')
    -    #return spp()
    -    pass  # TODO-PYNEST-NG: See set_verbosity
    +    return nestkernel.llapi_get_verbosity()
     
     
     def set_verbosity(level):
    @@ -199,14 +200,11 @@ def set_verbosity(level):
     
         Parameters
         ----------
    -    level : str, default: 'M_INFO'
    -        Can be one of 'M_FATAL', 'M_ERROR', 'M_WARNING', 'M_DEPRECATED',
    -        'M_INFO' or 'M_ALL'.
    +    level : severity_t, default: 'M_ALL'
    +        Can be one of the values of the nest.verbosity enum.
         """
     
    -    # TODO-PYNEST-NG: There are no SLI messages anymore, so verbosity
    -    #                 is now irrelevant and should be replaced when a
    -    #                 replacement for message() exists.
    -    
    -    # sr("{} setverbosity".format(level))
    -    pass
    +    if type(level) is not verbosity:
    +        raise TypeError('"level" must be a value of the nest.verbosity enum.')
    +
    +    nestkernel.llapi_set_verbosity(level)
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 2182610a4b..b9fd42ce19 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -50,6 +50,19 @@ cdef extern from "dictionary.h":
         string debug_dict_types(const dictionary&)
         cbool is_type[T](const any&)
     
    +cdef extern from "logging.h" namespace "nest":
    +    cpdef enum severity_t:
    +        M_ALL,
    +        M_DEBUG,
    +        M_STATUS,
    +        M_INFO,
    +        M_PROGRESS,
    +        M_DEPRECATED,
    +        M_WARNING,
    +        M_ERROR,
    +        M_FATAL,
    +        M_QUIET
    +
     cdef extern from "connection_id.h" namespace "nest":
         cppclass ConnectionID:
             ConnectionID()
    @@ -98,6 +111,9 @@ cdef extern from "nest.h" namespace "nest":
         void init_nest( int* argc, char** argv[] )
         void reset_kernel()
     
    +    severity_t get_verbosity()
    +    void set_verbosity( severity_t )
    +
         void enable_structural_plasticity() except +
         void disable_structural_plasticity() except +
     
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 27b404eee0..712edc2111 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -309,6 +309,14 @@ def llapi_init_nest(argv):
     def llapi_reset_kernel():
         reset_kernel()
     
    +@catch_cpp_error
    +def llapi_get_verbosity():
    +    return severity_t(get_verbosity())
    +
    +@catch_cpp_error
    +def llapi_set_verbosity(severity_t s):
    +    set_verbosity(s)
    +
     @catch_cpp_error
     def llapi_enable_structural_plasticity():
         enable_structural_plasticity()
    
    From 170ea8af5b19911ae5a0317ef5675024c0189aee Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Wed, 4 Jan 2023 15:37:59 +0100
    Subject: [PATCH 111/375] Updated tests for new setting of verbosity
    
    ---
     testsuite/pytests/connect_test_base.py           |  4 ++--
     testsuite/pytests/test_clopath_synapse.py        |  6 +++---
     testsuite/pytests/test_connect_arrays.py         |  2 +-
     .../pytests/test_current_recording_generators.py |  2 +-
     testsuite/pytests/test_erfc_neuron.py            |  2 +-
     testsuite/pytests/test_getconnections.py         |  2 +-
     testsuite/pytests/test_helper_functions.py       | 16 +++-------------
     testsuite/pytests/test_jonke_synapse.py          |  2 +-
     testsuite/pytests/test_parrot_neuron.py          |  8 ++++----
     testsuite/pytests/test_parrot_neuron_ps.py       |  6 +++---
     testsuite/pytests/test_quantal_stp_synapse.py    |  2 +-
     testsuite/pytests/test_random123.py              |  2 +-
     testsuite/pytests/test_random_parameter.py       |  2 +-
     testsuite/pytests/test_rate_copy_model.py        |  2 +-
     .../test_rate_instantaneous_and_delayed.py       |  2 +-
     testsuite/pytests/test_rate_neuron.py            |  2 +-
     .../pytests/test_rate_neuron_communication.py    |  2 +-
     testsuite/pytests/test_regression_issue-1034.py  |  2 +-
     testsuite/pytests/test_regression_issue-1409.py  |  2 +-
     testsuite/pytests/test_regression_issue-2125.py  |  2 +-
     testsuite/pytests/test_regression_issue-2480.py  |  2 +-
     testsuite/pytests/test_siegert_neuron.py         |  2 +-
     testsuite/pytests/test_sp/test_disconnect.py     |  2 +-
     .../pytests/test_sp/test_disconnect_multiple.py  |  2 +-
     .../pytests/test_sp/test_enable_multithread.py   |  2 +-
     testsuite/pytests/test_sp/test_growth_curves.py  |  2 +-
     testsuite/pytests/test_sp/test_sp_manager.py     |  2 +-
     .../pytests/test_spatial/test_connect_layers.py  |  2 +-
     .../pytests/test_spatial/test_connect_sliced.py  |  2 +-
     testsuite/pytests/test_stdp_multiplicity.py      |  2 +-
     testsuite/pytests/test_stdp_nn_synapses.py       |  4 ++--
     testsuite/pytests/test_stdp_synapse.py           |  2 +-
     testsuite/pytests/test_stdp_triplet_synapse.py   |  4 ++--
     testsuite/pytests/test_step_rate_generator.py    |  2 +-
     testsuite/pytests/test_tsodyks2_synapse.py       |  2 +-
     testsuite/pytests/test_urbanczik_synapse.py      |  4 ++--
     .../pytests/test_vogels_sprekeler_synapse.py     |  2 +-
     37 files changed, 50 insertions(+), 60 deletions(-)
    
    diff --git a/testsuite/pytests/connect_test_base.py b/testsuite/pytests/connect_test_base.py
    index 8c76726da9..7c0c91c610 100644
    --- a/testsuite/pytests/connect_test_base.py
    +++ b/testsuite/pytests/connect_test_base.py
    @@ -74,14 +74,14 @@ def setUpNetwork(self, conn_dict=None, syn_dict=None, N1=None, N2=None):
                 N2 = self.N2
             self.pop1 = nest.Create('iaf_psc_alpha', N1)
             self.pop2 = nest.Create('iaf_psc_alpha', N2)
    -        nest.set_verbosity('M_FATAL')
    +        nest.set_verbosity(nest.verbosity.M_FATAL)
             nest.Connect(self.pop1, self.pop2, conn_dict, syn_dict)
     
         def setUpNetworkOnePop(self, conn_dict=None, syn_dict=None, N=None):
             if N is None:
                 N = self.N1
             self.pop = nest.Create('iaf_psc_alpha', N)
    -        nest.set_verbosity('M_FATAL')
    +        nest.set_verbosity(nest.verbosity.M_FATAL)
             nest.Connect(self.pop, self.pop, conn_dict, syn_dict)
     
         def testWeightSetting(self):
    diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py
    index 1e91929776..f2869810e3 100644
    --- a/testsuite/pytests/test_clopath_synapse.py
    +++ b/testsuite/pytests/test_clopath_synapse.py
    @@ -37,7 +37,7 @@ class ClopathSynapseTestCase(unittest.TestCase):
         def test_ConnectNeuronsWithClopathSynapse(self):
             """Ensures that the restriction to supported neuron models works."""
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
     
             supported_models = [
                 'aeif_psc_delta_clopath',
    @@ -67,7 +67,7 @@ def test_ConnectNeuronsWithClopathSynapse(self):
         def test_SynapseDepressionFacilitation(self):
             """Ensure that depression and facilitation work correctly"""
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
     
             # This is done using the spike pairing experiment of
             # Clopath et al. 2010. First we specify the parameters
    @@ -187,7 +187,7 @@ def test_SynapseDepressionFacilitation(self):
         def test_SynapseFunctionWithAeifModel(self):
             """Ensure that spikes are properly processed"""
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # Create neurons and devices
    diff --git a/testsuite/pytests/test_connect_arrays.py b/testsuite/pytests/test_connect_arrays.py
    index fac15a4f9b..e77f181f7d 100644
    --- a/testsuite/pytests/test_connect_arrays.py
    +++ b/testsuite/pytests/test_connect_arrays.py
    @@ -24,7 +24,7 @@
     
     import nest
     
    -nest.set_verbosity('M_WARNING')
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no"
     
    diff --git a/testsuite/pytests/test_current_recording_generators.py b/testsuite/pytests/test_current_recording_generators.py
    index 5a0cd69e23..185119b857 100644
    --- a/testsuite/pytests/test_current_recording_generators.py
    +++ b/testsuite/pytests/test_current_recording_generators.py
    @@ -38,7 +38,7 @@ class CurrentRecordingGeneratorTestCase(unittest.TestCase):
         """
     
         def setUp(self):
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # setting up the neuron and the generators
    diff --git a/testsuite/pytests/test_erfc_neuron.py b/testsuite/pytests/test_erfc_neuron.py
    index 657bdd51cb..485f0093ff 100644
    --- a/testsuite/pytests/test_erfc_neuron.py
    +++ b/testsuite/pytests/test_erfc_neuron.py
    @@ -84,7 +84,7 @@ def setUp(self):
     
         def build_and_connect_nodes(self, sigma, theta):
             """ sets up an erfc neuron and spin detector. """
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.rng_seed = 1
     
    diff --git a/testsuite/pytests/test_getconnections.py b/testsuite/pytests/test_getconnections.py
    index ef0753ac29..1be46be925 100644
    --- a/testsuite/pytests/test_getconnections.py
    +++ b/testsuite/pytests/test_getconnections.py
    @@ -26,7 +26,7 @@
     import unittest
     import nest
     
    -nest.set_verbosity('M_ERROR')
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     
     
     class GetConnectionsTestCase(unittest.TestCase):
    diff --git a/testsuite/pytests/test_helper_functions.py b/testsuite/pytests/test_helper_functions.py
    index 6ad9571bb0..a0a6e5cc6e 100644
    --- a/testsuite/pytests/test_helper_functions.py
    +++ b/testsuite/pytests/test_helper_functions.py
    @@ -27,23 +27,13 @@ class TestHelperFunctions(unittest.TestCase):
     
         def test_get_verbosity(self):
             verbosity = nest.get_verbosity()
    -        self.assertTrue(isinstance(verbosity, int))
    +        self.assertTrue(isinstance(verbosity, nest.verbosity))
     
         def test_set_verbosity(self):
    -        levels = [('M_ALL', 0),
    -                  ('M_DEBUG', 5),
    -                  ('M_STATUS', 7),
    -                  ('M_INFO', 10),
    -                  ('M_DEPRECATED', 18),
    -                  ('M_WARNING', 20),
    -                  ('M_ERROR', 30),
    -                  ('M_FATAL', 40),
    -                  ('M_QUIET', 100)
    -                  ]
    -        for level, code in levels:
    +        for level in nest.verbosity:
                 nest.set_verbosity(level)
                 verbosity = nest.get_verbosity()
    -            self.assertEqual(verbosity, code)
    +            self.assertEqual(verbosity, level)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_jonke_synapse.py b/testsuite/pytests/test_jonke_synapse.py
    index b539cbbf5f..dfbfea0ff4 100644
    --- a/testsuite/pytests/test_jonke_synapse.py
    +++ b/testsuite/pytests/test_jonke_synapse.py
    @@ -84,7 +84,7 @@ def do_the_nest_simulation(self):
             Returns the generated pre- and post spike sequences
             and the resulting weight established by STDP.
             """
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = self.resolution
     
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index 226cd0b3ad..94bcccc829 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -32,7 +32,7 @@ class ParrotNeuronTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
         def setUp(self):
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # set up source spike generator, as well as parrot neurons
    @@ -133,7 +133,7 @@ def test_ParrotNeuronIncomingMultiplicity(self):
             assert spikes_expected - 3 * spikes_std > 10. * t_sim / resolution, \
                 "Internal inconsistency: too few spikes."
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = resolution
             nest.rng_seed = 123
    @@ -166,7 +166,7 @@ def run_protocol(self, dt):
             """Set up a network with pre-post spike pairings
             with t_post - t_pre = dt"""
     
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # set pre and postsynaptic spike times
    @@ -207,7 +207,7 @@ def run_protocol(self, dt):
             conn_spec = {
                 "rule": "one_to_one",
             }
    -        nest.Connect(pre_parrot, post_parrot,syn_spec=syn_spec, conn_spec=conn_spec)
    +        nest.Connect(pre_parrot, post_parrot, syn_spec=syn_spec, conn_spec=conn_spec)
     
             # get STDP synapse and weight before protocol
             syn = nest.GetConnections(source=pre_parrot, synapse_model="stdp_synapse")
    diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index d4109b6c7d..81998216c8 100644
    --- a/testsuite/pytests/test_parrot_neuron_ps.py
    +++ b/testsuite/pytests/test_parrot_neuron_ps.py
    @@ -41,7 +41,7 @@ class ParrotNeuronPSTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
         def setUp(self):
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # set up source spike generator, as well as parrot neurons
    @@ -150,7 +150,7 @@ def test_ParrotNeuronIncomingMultiplicity(self):
             assert spikes_expected - 3 * spikes_std > 10. * t_sim / resolution, \
                 "Internal inconsistency: too few spikes."
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = resolution
             nest.rng_seed = 123
    @@ -183,7 +183,7 @@ def run_protocol(self, dt):
             """Set up a network with pre-post spike pairings with
             t_post - t_pre = dt"""
     
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # set pre and postsynaptic spike times
    diff --git a/testsuite/pytests/test_quantal_stp_synapse.py b/testsuite/pytests/test_quantal_stp_synapse.py
    index 46ddda69e1..5c61fd3973 100644
    --- a/testsuite/pytests/test_quantal_stp_synapse.py
    +++ b/testsuite/pytests/test_quantal_stp_synapse.py
    @@ -33,7 +33,7 @@ def test_QuantalSTPSynapse(self):
             """Compare quantal_stp_synapse with its deterministic equivalent"""
             nest.ResetKernel()
             nest.rng_seed = 1
    -        nest.set_verbosity(100)
    +        nest.set_verbosity(nest.verbosity.M_QUIET)
             n_syn = 12  # number of synapses in a connection
             n_trials = 100  # number of measurement trials
     
    diff --git a/testsuite/pytests/test_random123.py b/testsuite/pytests/test_random123.py
    index 126dcf6057..66351bf0ae 100644
    --- a/testsuite/pytests/test_random123.py
    +++ b/testsuite/pytests/test_random123.py
    @@ -37,7 +37,7 @@
     except ImportError:
         HAVE_SCIPY = False
     
    -nest.set_verbosity('M_WARNING')
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     
     class BaseTestCases:
    diff --git a/testsuite/pytests/test_random_parameter.py b/testsuite/pytests/test_random_parameter.py
    index 2f4159ee33..93f3209222 100644
    --- a/testsuite/pytests/test_random_parameter.py
    +++ b/testsuite/pytests/test_random_parameter.py
    @@ -33,7 +33,7 @@
     except ImportError:
         HAVE_SCIPY = False
     
    -nest.set_verbosity('M_WARNING')
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     
     @unittest.skipIf(not HAVE_SCIPY, 'SciPy package is not available')
    diff --git a/testsuite/pytests/test_rate_copy_model.py b/testsuite/pytests/test_rate_copy_model.py
    index 35127993d6..b86693ba9b 100644
    --- a/testsuite/pytests/test_rate_copy_model.py
    +++ b/testsuite/pytests/test_rate_copy_model.py
    @@ -41,7 +41,7 @@ def test_rate_copy_model(self):
             simtime = 100.
             dt = 0.001
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = dt
             nest.use_wfr = True
    diff --git a/testsuite/pytests/test_rate_instantaneous_and_delayed.py b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    index ae3f53323b..2b7784cdf3 100644
    --- a/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    +++ b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    @@ -42,7 +42,7 @@ def test_rate_instantaneous_and_delayed(self):
             simtime = 100.
             dt = 0.001
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = dt
             nest.use_wfr = True
    diff --git a/testsuite/pytests/test_rate_neuron.py b/testsuite/pytests/test_rate_neuron.py
    index fda4938cc3..f9e44ab693 100644
    --- a/testsuite/pytests/test_rate_neuron.py
    +++ b/testsuite/pytests/test_rate_neuron.py
    @@ -45,7 +45,7 @@ def setUp(self):
             self.dt = 0.1
             self.tstart = 10. * self.neuron_params['tau']
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = self.dt
             nest.use_wfr = False
    diff --git a/testsuite/pytests/test_rate_neuron_communication.py b/testsuite/pytests/test_rate_neuron_communication.py
    index d2ef149ee9..7e2ce3bf70 100644
    --- a/testsuite/pytests/test_rate_neuron_communication.py
    +++ b/testsuite/pytests/test_rate_neuron_communication.py
    @@ -53,7 +53,7 @@ def setUp(self):
             self.simtime = 100.
             self.dt = 0.1
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = self.dt
             nest.use_wfr = True
    diff --git a/testsuite/pytests/test_regression_issue-1034.py b/testsuite/pytests/test_regression_issue-1034.py
    index 79e0b4a9e1..adad6b7529 100644
    --- a/testsuite/pytests/test_regression_issue-1034.py
    +++ b/testsuite/pytests/test_regression_issue-1034.py
    @@ -52,7 +52,7 @@ def __init__(self, pre_spike_times, post_spike_times, delay, resolution,
         def run_post_trace_test_nest_(self,
                                       show_all_nest_trace_samples=False):
     
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
     
             nest.ResetKernel()
             nest.resolution = self.resolution_
    diff --git a/testsuite/pytests/test_regression_issue-1409.py b/testsuite/pytests/test_regression_issue-1409.py
    index 6c49f6e367..d7bbbd1d2c 100644
    --- a/testsuite/pytests/test_regression_issue-1409.py
    +++ b/testsuite/pytests/test_regression_issue-1409.py
    @@ -41,7 +41,7 @@ def test_multiple_poisson_generators(self):
             for i in range(num_iterations):
                 nest.ResetKernel()
                 nest.local_num_threads = local_num_threads
    -            nest.set_verbosity('M_WARNING')
    +            nest.set_verbosity(nest.verbosity.M_WARNING)
                 print('num iter {:>5d}/{}'.format(i+1, num_iterations), end='\r')
     
                 parrots = nest.Create('parrot_neuron', num_neurons)
    diff --git a/testsuite/pytests/test_regression_issue-2125.py b/testsuite/pytests/test_regression_issue-2125.py
    index b9a28e2765..442e688519 100644
    --- a/testsuite/pytests/test_regression_issue-2125.py
    +++ b/testsuite/pytests/test_regression_issue-2125.py
    @@ -31,7 +31,7 @@ class ThreadedDisconnectTestCase(unittest.TestCase):
         def test_threaded_disconnect(self):
             """Test that threaded disconnect does not produce segmentation fault"""
             nest.ResetKernel()
    -        nest.set_verbosity('M_ERROR')
    +        nest.set_verbosity(nest.verbosity.M_ERROR)
             nest.local_num_threads = 2
     
             neurons = nest.Create('iaf_psc_alpha', 3)
    diff --git a/testsuite/pytests/test_regression_issue-2480.py b/testsuite/pytests/test_regression_issue-2480.py
    index c4428a1bff..b5d2e50667 100644
    --- a/testsuite/pytests/test_regression_issue-2480.py
    +++ b/testsuite/pytests/test_regression_issue-2480.py
    @@ -31,7 +31,7 @@ def reset():
     
     @pytest.mark.parametrize("model", [m for m in nest.node_models if 'V_m' in nest.GetDefaults(m)])
     def test_set_vm(model):
    -    nest.set_verbosity('M_FATAL')
    +    nest.set_verbosity(nest.verbosity.M_FATAL)
         warnings.simplefilter('ignore')  # Suppress warnings
         n = nest.Create(model)
     
    diff --git a/testsuite/pytests/test_siegert_neuron.py b/testsuite/pytests/test_siegert_neuron.py
    index 213afe62f7..ec412f9355 100644
    --- a/testsuite/pytests/test_siegert_neuron.py
    +++ b/testsuite/pytests/test_siegert_neuron.py
    @@ -59,7 +59,7 @@ def setUp(self):
             self.start = 100.
     
             # reset kernel
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = self.dt
             nest.use_wfr = False
    diff --git a/testsuite/pytests/test_sp/test_disconnect.py b/testsuite/pytests/test_sp/test_disconnect.py
    index f3f9c83af4..be11cb712f 100644
    --- a/testsuite/pytests/test_sp/test_disconnect.py
    +++ b/testsuite/pytests/test_sp/test_disconnect.py
    @@ -37,7 +37,7 @@ class TestDisconnectSingle(unittest.TestCase):
     
         def setUp(self):
             nest.ResetKernel()
    -        nest.set_verbosity('M_ERROR')
    +        nest.set_verbosity(nest.verbosity.M_ERROR)
             if test_with_mpi:
                 self.comm = MPI.COMM_WORLD
                 self.rank = self.comm.Get_rank()
    diff --git a/testsuite/pytests/test_sp/test_disconnect_multiple.py b/testsuite/pytests/test_sp/test_disconnect_multiple.py
    index bda8479083..ecfa716b0e 100644
    --- a/testsuite/pytests/test_sp/test_disconnect_multiple.py
    +++ b/testsuite/pytests/test_sp/test_disconnect_multiple.py
    @@ -29,7 +29,7 @@ class TestDisconnect(unittest.TestCase):
     
         def setUp(self):
             nest.ResetKernel()
    -        nest.set_verbosity('M_ERROR')
    +        nest.set_verbosity(nest.verbosity.M_ERROR)
             self.exclude_synapse_model = [
                 'stdp_dopamine_synapse',
                 'stdp_dopamine_synapse_lbl',
    diff --git a/testsuite/pytests/test_sp/test_enable_multithread.py b/testsuite/pytests/test_sp/test_enable_multithread.py
    index ee66c19640..81e824d750 100644
    --- a/testsuite/pytests/test_sp/test_enable_multithread.py
    +++ b/testsuite/pytests/test_sp/test_enable_multithread.py
    @@ -38,7 +38,7 @@ class TestEnableMultithread(unittest.TestCase):
     
         def setUp(self):
             nest.ResetKernel()
    -        nest.set_verbosity('M_ERROR')
    +        nest.set_verbosity(nest.verbosity.M_ERROR)
     
         def test_enable_multithread(self):
     
    diff --git a/testsuite/pytests/test_sp/test_growth_curves.py b/testsuite/pytests/test_sp/test_growth_curves.py
    index 3db32f5bfe..ffd721ea49 100644
    --- a/testsuite/pytests/test_sp/test_growth_curves.py
    +++ b/testsuite/pytests/test_sp/test_growth_curves.py
    @@ -272,7 +272,7 @@ class TestGrowthCurve(unittest.TestCase):
     
         def setUp(self):
             nest.ResetKernel()
    -        nest.set_verbosity('M_ERROR')
    +        nest.set_verbosity(nest.verbosity.M_ERROR)
             nest.total_num_virtual_procs = 4
             nest.rng_seed = 1
     
    diff --git a/testsuite/pytests/test_sp/test_sp_manager.py b/testsuite/pytests/test_sp/test_sp_manager.py
    index c6ca3b0587..fe96172d5b 100644
    --- a/testsuite/pytests/test_sp/test_sp_manager.py
    +++ b/testsuite/pytests/test_sp/test_sp_manager.py
    @@ -33,7 +33,7 @@ class TestStructuralPlasticityManager(unittest.TestCase):
     
         def setUp(self):
             nest.ResetKernel()
    -        nest.set_verbosity('M_INFO')
    +        nest.set_verbosity(nest.verbosity.M_INFO)
             self.exclude_synapse_model = [
                 'stdp_dopamine_synapse',
                 'stdp_dopamine_synapse_lbl',
    diff --git a/testsuite/pytests/test_spatial/test_connect_layers.py b/testsuite/pytests/test_spatial/test_connect_layers.py
    index fb7f01daae..4e62c49160 100644
    --- a/testsuite/pytests/test_spatial/test_connect_layers.py
    +++ b/testsuite/pytests/test_spatial/test_connect_layers.py
    @@ -33,7 +33,7 @@
     except ImportError:
         HAVE_SCIPY = False
     
    -nest.set_verbosity('M_ERROR')
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     
     
     class ConnectLayersTestCase(unittest.TestCase):
    diff --git a/testsuite/pytests/test_spatial/test_connect_sliced.py b/testsuite/pytests/test_spatial/test_connect_sliced.py
    index 7f75e7d217..1f88988987 100644
    --- a/testsuite/pytests/test_spatial/test_connect_sliced.py
    +++ b/testsuite/pytests/test_spatial/test_connect_sliced.py
    @@ -27,7 +27,7 @@
     import numpy as np
     import numpy.testing as np_testing
     
    -nest.set_verbosity('M_ERROR')
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     
     
     class ConnectSlicedSpatialTestCase(unittest.TestCase):
    diff --git a/testsuite/pytests/test_stdp_multiplicity.py b/testsuite/pytests/test_stdp_multiplicity.py
    index 24ae7427a8..03684e9b8f 100644
    --- a/testsuite/pytests/test_stdp_multiplicity.py
    +++ b/testsuite/pytests/test_stdp_multiplicity.py
    @@ -120,7 +120,7 @@ def run_protocol(self, pre_post_shift):
             # k spikes will be emitted at these two times
             pre_spike_times_base = [100., 200.]
     
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
     
             post_weights = {'parrot': [], 'parrot_ps': []}
     
    diff --git a/testsuite/pytests/test_stdp_nn_synapses.py b/testsuite/pytests/test_stdp_nn_synapses.py
    index d0bd9281f8..142907a232 100644
    --- a/testsuite/pytests/test_stdp_nn_synapses.py
    +++ b/testsuite/pytests/test_stdp_nn_synapses.py
    @@ -94,7 +94,7 @@ def do_nest_simulation_and_compare_to_reproduced_weight(self,
                 err_msg=synapse_model + " test: "
                                         "Resulting synaptic weight %e "
                                         "differs from expected %e" % (
    -                                       weight_by_nest, weight_reproduced_independently))
    +                                        weight_by_nest, weight_reproduced_independently))
     
         def do_the_nest_simulation(self):
             """
    @@ -102,7 +102,7 @@ def do_the_nest_simulation(self):
             Returns the generated pre- and post spike sequences
             and the resulting weight established by STDP.
             """
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = self.resolution
     
    diff --git a/testsuite/pytests/test_stdp_synapse.py b/testsuite/pytests/test_stdp_synapse.py
    index d9436b8eb8..50a1cd613c 100644
    --- a/testsuite/pytests/test_stdp_synapse.py
    +++ b/testsuite/pytests/test_stdp_synapse.py
    @@ -109,7 +109,7 @@ def do_the_nest_simulation(self):
             This function is where calls to NEST reside. Returns the generated pre- and post spike sequences and the
             resulting weight established by STDP.
             """
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.SetKernelStatus({'resolution': self.resolution})
     
    diff --git a/testsuite/pytests/test_stdp_triplet_synapse.py b/testsuite/pytests/test_stdp_triplet_synapse.py
    index 151f9d74f1..359e514152 100644
    --- a/testsuite/pytests/test_stdp_triplet_synapse.py
    +++ b/testsuite/pytests/test_stdp_triplet_synapse.py
    @@ -31,7 +31,7 @@ class STDPTripletSynapseTestCase(unittest.TestCase):
         """Check stdp_triplet_synapse model properties."""
     
         def setUp(self):
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # settings
    @@ -294,7 +294,7 @@ def test_maxWeightStaturatesWeight(self):
     
     class STDPTripletInhTestCase(STDPTripletSynapseTestCase):
         def setUp(self):
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # settings
    diff --git a/testsuite/pytests/test_step_rate_generator.py b/testsuite/pytests/test_step_rate_generator.py
    index 2ed7584fed..83d1d43bda 100644
    --- a/testsuite/pytests/test_step_rate_generator.py
    +++ b/testsuite/pytests/test_step_rate_generator.py
    @@ -34,7 +34,7 @@ def test_step_rate_generator(self):
     
             rates = np.array([400.0, 1000.0, 200.0])
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = 0.1
             nest.use_wfr = False
    diff --git a/testsuite/pytests/test_tsodyks2_synapse.py b/testsuite/pytests/test_tsodyks2_synapse.py
    index 8513b152cd..d387e56c64 100644
    --- a/testsuite/pytests/test_tsodyks2_synapse.py
    +++ b/testsuite/pytests/test_tsodyks2_synapse.py
    @@ -64,7 +64,7 @@ def do_the_nest_simulation(self):
             Returns the generated pre- and post spike sequences
             and the resulting weight established by the tsodyks2 synapse.
             """
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = self.resolution
     
    diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py
    index ad24c68119..d18aeca498 100644
    --- a/testsuite/pytests/test_urbanczik_synapse.py
    +++ b/testsuite/pytests/test_urbanczik_synapse.py
    @@ -37,7 +37,7 @@ class UrbanczikSynapseTestCase(unittest.TestCase):
         def test_ConnectNeuronsWithUrbanczikSynapse(self):
             """Ensures that the restriction to supported neuron models works."""
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
     
             mc_models = ["iaf_cond_alpha_mc", "pp_cond_exp_mc_urbanczik"]  # Multi-compartment models
             supported_models = ["pp_cond_exp_mc_urbanczik"]
    @@ -76,7 +76,7 @@ def test_ConnectNeuronsWithUrbanczikSynapse(self):
         def test_SynapseDepressionFacilitation(self):
             """Ensure that depression and facilitation work correctly"""
     
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             resolution = 0.1
    diff --git a/testsuite/pytests/test_vogels_sprekeler_synapse.py b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    index c5b7bdabc3..5ff512f7d3 100644
    --- a/testsuite/pytests/test_vogels_sprekeler_synapse.py
    +++ b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    @@ -31,7 +31,7 @@ class VogelsSprekelerConnectionTestCase(unittest.TestCase):
     
         def setUp(self):
             """Set up the test."""
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # settings
    
    From 07a8ba9c2879ae5206e45e3bf6194d5b5e74cdff Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?H=C3=A5kon=20M=C3=B8rk?= <hakon.mork@nmbu.no>
    Date: Wed, 4 Jan 2023 15:43:51 +0100
    Subject: [PATCH 112/375] Updated examples and documentation for new setter of
     verbosity
    
    ---
     doc/htmldoc/connect_nest/using_nest_with_music.rst           | 4 ++--
     doc/htmldoc/tutorials/music_tutorial/music_tutorial_tips.rst | 2 +-
     pynest/examples/CampbellSiegert.py                           | 2 +-
     pynest/examples/balancedneuron.py                            | 2 +-
     pynest/examples/brunel_alpha_evolution_strategies.py         | 2 +-
     pynest/examples/evaluate_quantal_stp_synapse.py              | 2 +-
     pynest/examples/gif_pop_psc_exp.py                           | 2 +-
     pynest/examples/hh_phaseplane.py                             | 2 +-
     pynest/examples/hh_psc_alpha.py                              | 2 +-
     pynest/examples/if_curve.py                                  | 2 +-
     pynest/examples/intrinsic_currents_spiking.py                | 2 +-
     pynest/examples/intrinsic_currents_subthreshold.py           | 2 +-
     pynest/examples/one_neuron.py                                | 2 +-
     pynest/examples/one_neuron_with_noise.py                     | 2 +-
     pynest/examples/pong/run_simulations.py                      | 2 +-
     pynest/examples/pulsepacket.py                               | 2 +-
     pynest/examples/spatial/conncomp.py                          | 2 +-
     pynest/examples/spatial/conncon_sources.py                   | 2 +-
     pynest/examples/store_restore_network.py                     | 2 +-
     pynest/examples/structural_plasticity.py                     | 2 +-
     pynest/examples/sudoku/sudoku_solver.py                      | 2 +-
     pynest/examples/twoneurons.py                                | 2 +-
     22 files changed, 23 insertions(+), 23 deletions(-)
    
    diff --git a/doc/htmldoc/connect_nest/using_nest_with_music.rst b/doc/htmldoc/connect_nest/using_nest_with_music.rst
    index 17c553e50f..7949b5e6d7 100644
    --- a/doc/htmldoc/connect_nest/using_nest_with_music.rst
    +++ b/doc/htmldoc/connect_nest/using_nest_with_music.rst
    @@ -77,7 +77,7 @@ continuing.
            print("NEST was not compiled with support for MUSIC, not running.")
            sys.exit()
     
    -   nest.set_verbosity("M_ERROR")
    +   nest.set_verbosity(nest.verbosity.M_ERROR)
     
     Next we create a ``spike_generator`` and set the spike times. We then create
     our neuron model (``iaf_psc_alpha``) and connect the neuron with the spike
    @@ -131,7 +131,7 @@ script, but without the spike generator.
           print("NEST was not compiled with support for MUSIC, not running.")
           sys.exit()
     
    -  nest.set_verbosity("M_ERROR")
    +  nest.set_verbosity(nest.verbosity.M_ERROR)
     
       meip = nest.Create('music_event_in_proxy')
       nest.SetStatus(meip, {'port_name': 'spikes_in', 'music_channel': 0})
    diff --git a/doc/htmldoc/tutorials/music_tutorial/music_tutorial_tips.rst b/doc/htmldoc/tutorials/music_tutorial/music_tutorial_tips.rst
    index bd1ae7a4cd..3f54341334 100644
    --- a/doc/htmldoc/tutorials/music_tutorial/music_tutorial_tips.rst
    +++ b/doc/htmldoc/tutorials/music_tutorial/music_tutorial_tips.rst
    @@ -47,7 +47,7 @@ Disable messages
     
         .. code:: python
     
    -        nest.set_verbosity("M_ERROR")
    +        nest.set_verbosity(nest.verbosity.M_ERROR)
     
         There is unfortunately no straightforward way to suppress the
         initial welcome message. That is somewhat unfortunate, as they add
    diff --git a/pynest/examples/CampbellSiegert.py b/pynest/examples/CampbellSiegert.py
    index e781860dbb..653c5da3dd 100755
    --- a/pynest/examples/CampbellSiegert.py
    +++ b/pynest/examples/CampbellSiegert.py
    @@ -161,7 +161,7 @@ def psp(x):
     
     nest.ResetKernel()
     
    -nest.set_verbosity('M_WARNING')
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     neurondict = {'V_th': V_th,
                   'tau_m': tau_m,
                   'tau_syn_ex': tau_syn_ex,
    diff --git a/pynest/examples/balancedneuron.py b/pynest/examples/balancedneuron.py
    index 59fdc4c0d3..76431e951d 100644
    --- a/pynest/examples/balancedneuron.py
    +++ b/pynest/examples/balancedneuron.py
    @@ -57,7 +57,7 @@
     # suppress info messages.
     
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     ###############################################################################
    diff --git a/pynest/examples/brunel_alpha_evolution_strategies.py b/pynest/examples/brunel_alpha_evolution_strategies.py
    index 2f0c159f8a..fe3d8b4a0e 100644
    --- a/pynest/examples/brunel_alpha_evolution_strategies.py
    +++ b/pynest/examples/brunel_alpha_evolution_strategies.py
    @@ -227,7 +227,7 @@ def ComputePSPnorm(tauMem, CMem, tauSyn):
         p_rate = 1000.0 * nu_ex * CE
     
         nest.ResetKernel()
    -    nest.set_verbosity('M_FATAL')
    +    nest.set_verbosity(nest.verbosity.M_FATAL)
     
         nest.rng_seed = parameters['seed']
         nest.resolution = parameters['dt']
    diff --git a/pynest/examples/evaluate_quantal_stp_synapse.py b/pynest/examples/evaluate_quantal_stp_synapse.py
    index c6089d060a..837137b8d8 100644
    --- a/pynest/examples/evaluate_quantal_stp_synapse.py
    +++ b/pynest/examples/evaluate_quantal_stp_synapse.py
    @@ -126,7 +126,7 @@
     # make NEST less verbose, and set some kernel attributes.
     
     nest.ResetKernel()
    -nest.set_verbosity("M_ERROR")
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     nest.resolution = resolution
     nest.rng_seed = seed
     
    diff --git a/pynest/examples/gif_pop_psc_exp.py b/pynest/examples/gif_pop_psc_exp.py
    index be5061f402..1f7bcfa97c 100644
    --- a/pynest/examples/gif_pop_psc_exp.py
    +++ b/pynest/examples/gif_pop_psc_exp.py
    @@ -117,7 +117,7 @@
     # neurons), we can build the populations using the NEST model
     # ``gif_pop_psc_exp``:
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     nest.resolution = dt
     nest.print_time = True
    diff --git a/pynest/examples/hh_phaseplane.py b/pynest/examples/hh_phaseplane.py
    index 86d1e08e99..fb394c51bd 100644
    --- a/pynest/examples/hh_phaseplane.py
    +++ b/pynest/examples/hh_phaseplane.py
    @@ -60,7 +60,7 @@
     num_n_steps = len(n_vec)
     
     nest.ResetKernel()
    -nest.set_verbosity('M_ERROR')
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     nest.resolution = dt
     
     neuron = nest.Create('hh_psc_alpha')
    diff --git a/pynest/examples/hh_psc_alpha.py b/pynest/examples/hh_psc_alpha.py
    index 3d79e079fa..01ec170864 100644
    --- a/pynest/examples/hh_psc_alpha.py
    +++ b/pynest/examples/hh_psc_alpha.py
    @@ -35,7 +35,7 @@
     import numpy as np
     import matplotlib.pyplot as plt
     
    -nest.set_verbosity('M_WARNING')
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     simtime = 1000
    diff --git a/pynest/examples/if_curve.py b/pynest/examples/if_curve.py
    index a3c79cd113..feaef05bb9 100644
    --- a/pynest/examples/if_curve.py
    +++ b/pynest/examples/if_curve.py
    @@ -124,7 +124,7 @@ def compute_transfer(self, i_mean=(400.0, 900.0, 50.0),
             self.i_range = numpy.arange(*i_mean)
             self.std_range = numpy.arange(*i_std)
             self.rate = numpy.zeros((self.i_range.size, self.std_range.size))
    -        nest.set_verbosity('M_WARNING')
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             for n, i in enumerate(self.i_range):
                 print('I  =  {0}'.format(i))
                 for m, std in enumerate(self.std_range):
    diff --git a/pynest/examples/intrinsic_currents_spiking.py b/pynest/examples/intrinsic_currents_spiking.py
    index 79cc1e6642..4d190f9e79 100644
    --- a/pynest/examples/intrinsic_currents_spiking.py
    +++ b/pynest/examples/intrinsic_currents_spiking.py
    @@ -58,7 +58,7 @@
     # Additionally, we set the verbosity using ``set_verbosity`` to suppress info
     # messages. We also reset the kernel to be sure to start with a clean NEST.
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     ###############################################################################
    diff --git a/pynest/examples/intrinsic_currents_subthreshold.py b/pynest/examples/intrinsic_currents_subthreshold.py
    index 6d99285f85..fa7805acf2 100644
    --- a/pynest/examples/intrinsic_currents_subthreshold.py
    +++ b/pynest/examples/intrinsic_currents_subthreshold.py
    @@ -57,7 +57,7 @@
     # Additionally, we set the verbosity using ``set_verbosity`` to suppress info
     # messages. We also reset the kernel to be sure to start with a clean NEST.
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     ###############################################################################
    diff --git a/pynest/examples/one_neuron.py b/pynest/examples/one_neuron.py
    index 3fa7143eca..dbbbb66680 100755
    --- a/pynest/examples/one_neuron.py
    +++ b/pynest/examples/one_neuron.py
    @@ -47,7 +47,7 @@
     import nest.voltage_trace
     import matplotlib.pyplot as plt
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     ###############################################################################
    diff --git a/pynest/examples/one_neuron_with_noise.py b/pynest/examples/one_neuron_with_noise.py
    index 28d18f9d39..b944fb465c 100755
    --- a/pynest/examples/one_neuron_with_noise.py
    +++ b/pynest/examples/one_neuron_with_noise.py
    @@ -41,7 +41,7 @@
     import nest.voltage_trace
     import matplotlib.pyplot as plt
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     ###############################################################################
    diff --git a/pynest/examples/pong/run_simulations.py b/pynest/examples/pong/run_simulations.py
    index d42d2e0891..2c496f4011 100644
    --- a/pynest/examples/pong/run_simulations.py
    +++ b/pynest/examples/pong/run_simulations.py
    @@ -195,7 +195,7 @@ def run_games(self, max_runs=10000):
     
     
     if __name__ == "__main__":
    -    nest.set_verbosity("M_WARNING")
    +    nest.set_verbosity(nest.verbosity.M_WARNING)
     
         parser = argparse.ArgumentParser()
         parser.add_argument("--runs",
    diff --git a/pynest/examples/pulsepacket.py b/pynest/examples/pulsepacket.py
    index e859c03bd4..adbf7f9606 100755
    --- a/pynest/examples/pulsepacket.py
    +++ b/pynest/examples/pulsepacket.py
    @@ -194,7 +194,7 @@ def find_loc_pspmax(tau_s, tau_m):
     # verbosity using ``set_verbosity`` to suppress info messages.
     
     nest.ResetKernel()
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.resolution = simulation_resolution
     
     
    diff --git a/pynest/examples/spatial/conncomp.py b/pynest/examples/spatial/conncomp.py
    index 77062033d9..9f69898873 100644
    --- a/pynest/examples/spatial/conncomp.py
    +++ b/pynest/examples/spatial/conncomp.py
    @@ -36,7 +36,7 @@
     import numpy as np
     
     nest.ResetKernel()
    -nest.set_verbosity('M_WARNING')
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     nest.CopyModel('iaf_psc_alpha', 'pyr')
     nest.CopyModel('iaf_psc_alpha', 'in')
    diff --git a/pynest/examples/spatial/conncon_sources.py b/pynest/examples/spatial/conncon_sources.py
    index 0c8e2f3b9c..12e4ef7541 100644
    --- a/pynest/examples/spatial/conncon_sources.py
    +++ b/pynest/examples/spatial/conncon_sources.py
    @@ -37,7 +37,7 @@
     import numpy as np
     
     nest.ResetKernel()
    -nest.set_verbosity('M_WARNING')
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     pos = nest.spatial.grid(shape=[30, 30], extent=[3., 3.], edge_wrap=True)
     
    diff --git a/pynest/examples/store_restore_network.py b/pynest/examples/store_restore_network.py
    index 9de07b0fc9..60d5b568ba 100644
    --- a/pynest/examples/store_restore_network.py
    +++ b/pynest/examples/store_restore_network.py
    @@ -290,7 +290,7 @@ def add_to_plot(self, net, n_max=100, t_min=0, t_max=1000, lbl=""):
     
     ###############################################################################
     # Ensure clean slate and make NEST less chatty
    -    nest.set_verbosity("M_WARNING")
    +    nest.set_verbosity(nest.verbosity.M_WARNING)
         nest.ResetKernel()
     
     ###############################################################################
    diff --git a/pynest/examples/structural_plasticity.py b/pynest/examples/structural_plasticity.py
    index ada2b243e3..702888474c 100644
    --- a/pynest/examples/structural_plasticity.py
    +++ b/pynest/examples/structural_plasticity.py
    @@ -149,7 +149,7 @@ def __init__(self):
     
         def prepare_simulation(self):
             nest.ResetKernel()
    -        nest.set_verbosity('M_ERROR')
    +        nest.set_verbosity(nest.verbosity.M_ERROR)
     
     
     ####################################################################################
    diff --git a/pynest/examples/sudoku/sudoku_solver.py b/pynest/examples/sudoku/sudoku_solver.py
    index bdd2e1e59b..c081e4acf0 100644
    --- a/pynest/examples/sudoku/sudoku_solver.py
    +++ b/pynest/examples/sudoku/sudoku_solver.py
    @@ -65,7 +65,7 @@
     import matplotlib.pyplot as plt
     
     nest.SetKernelStatus({'local_num_threads': 8})
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     logging.basicConfig(level=logging.INFO)
     
     puzzle_index = 4
    diff --git a/pynest/examples/twoneurons.py b/pynest/examples/twoneurons.py
    index 396600f327..e183440206 100644
    --- a/pynest/examples/twoneurons.py
    +++ b/pynest/examples/twoneurons.py
    @@ -43,7 +43,7 @@
     import nest.voltage_trace
     import matplotlib.pyplot as plt
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     ###############################################################################
    
    From d4dd63ec85dda0ea90476d8d7f38170facfdd121 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Fri, 13 Jan 2023 16:35:17 +0100
    Subject: [PATCH 113/375] Fix final tests
    
    ---
     models/cm_compartmentcurrents.h               |  8 +--
     models/iaf_cond_alpha_mc.cpp                  | 18 +++----
     nestkernel/io_manager.cpp                     |  2 +-
     pynest/examples/urbanczik_synapse_example.py  | 12 ++---
     pynest/nest/lib/hl_api_types.py               |  6 +--
     testsuite/pytests/test_clopath_synapse.py     |  2 +-
     .../test_current_recording_generators.py      | 10 ++--
     testsuite/pytests/test_mc_neuron.py           | 27 +++++-----
     testsuite/pytests/test_parrot_neuron.py       | 49 +++++++++----------
     testsuite/pytests/test_parrot_neuron_ps.py    | 12 ++---
     .../test_poisson_generator_rate_change.py     | 12 ++---
     testsuite/pytests/test_rate_neuron.py         | 39 ++++++---------
     testsuite/pytests/test_refractory.py          | 10 ++--
     testsuite/pytests/test_stdp_nn_synapses.py    |  2 +-
     testsuite/pytests/test_stdp_synapse.py        |  6 +--
     testsuite/pytests/test_threads.py             |  8 +--
     testsuite/pytests/test_urbanczik_synapse.py   | 37 ++++++--------
     17 files changed, 120 insertions(+), 140 deletions(-)
    
    diff --git a/models/cm_compartmentcurrents.h b/models/cm_compartmentcurrents.h
    index 3e8f9796d9..64d8f2834b 100644
    --- a/models/cm_compartmentcurrents.h
    +++ b/models/cm_compartmentcurrents.h
    @@ -477,7 +477,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = "AMPA";
    +      dd[ names::receptor_type ] = std::string("AMPA");
           info.push_back( dd );
         }
         // receptor info for GABA synapses
    @@ -486,7 +486,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = "GABA";
    +      dd[ names::receptor_type ] = std::string("GABA");
           info.push_back( dd );
         }
         // receptor info for NMDA synapses
    @@ -495,7 +495,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = "NMDA";
    +      dd[ names::receptor_type ] = std::string("NMDA");
           info.push_back( dd );
         }
         // receptor info for AMPA_NMDA synapses
    @@ -504,7 +504,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = "AMPA_NMDA";
    +      dd[ names::receptor_type ] = std::string("AMPA_NMDA");
           info.push_back( dd );
         }
       };
    diff --git a/models/iaf_cond_alpha_mc.cpp b/models/iaf_cond_alpha_mc.cpp
    index 848768d551..5be56c48ee 100644
    --- a/models/iaf_cond_alpha_mc.cpp
    +++ b/models/iaf_cond_alpha_mc.cpp
    @@ -346,14 +346,14 @@ nest::iaf_cond_alpha_mc::Parameters_::set( const dictionary& d, Node* node )
         {
           auto dd = d.get< dictionary >( comp_names_[ n ] );
     
    -      update_value_param( d, names::E_L, E_L[ n ], node );
    -      update_value_param( d, names::E_ex, E_ex[ n ], node );
    -      update_value_param( d, names::E_in, E_in[ n ], node );
    -      update_value_param( d, names::C_m, C_m[ n ], node );
    -      update_value_param( d, names::g_L, g_L[ n ], node );
    -      update_value_param( d, names::tau_syn_ex, tau_synE[ n ], node );
    -      update_value_param( d, names::tau_syn_in, tau_synI[ n ], node );
    -      update_value_param( d, names::I_e, I_e[ n ], node );
    +      update_value_param( dd, names::E_L, E_L[ n ], node );
    +      update_value_param( dd, names::E_ex, E_ex[ n ], node );
    +      update_value_param( dd, names::E_in, E_in[ n ], node );
    +      update_value_param( dd, names::C_m, C_m[ n ], node );
    +      update_value_param( dd, names::g_L, g_L[ n ], node );
    +      update_value_param( dd, names::tau_syn_ex, tau_synE[ n ], node );
    +      update_value_param( dd, names::tau_syn_in, tau_synI[ n ], node );
    +      update_value_param( dd, names::I_e, I_e[ n ], node );
         }
       }
       if ( V_reset >= V_th )
    @@ -402,7 +402,7 @@ nest::iaf_cond_alpha_mc::State_::set( const dictionary& d, const Parameters_&, N
         if ( d.known( comp_names_[ n ] ) )
         {
           auto dd = d.get< dictionary >( comp_names_[ n ] );
    -      update_value_param( d, names::V_m, y_[ idx( n, V_M ) ], node );
    +      update_value_param( dd, names::V_m, y_[ idx( n, V_M ) ], node );
         }
       }
     }
    diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp
    index 56a13905c0..b0093e07f9 100644
    --- a/nestkernel/io_manager.cpp
    +++ b/nestkernel/io_manager.cpp
    @@ -197,7 +197,7 @@ IOManager::get_recording_backend_status( std::string recording_backend )
     {
       dictionary status;
       recording_backends_[ recording_backend ]->get_status( status );
    -  status[ names::element_type ] = "recording_backend";
    +  status[ names::element_type ] = std::string("recording_backend");
       return status;
     }
     
    diff --git a/pynest/examples/urbanczik_synapse_example.py b/pynest/examples/urbanczik_synapse_example.py
    index 4d5b0b8161..d50cf469f1 100644
    --- a/pynest/examples/urbanczik_synapse_example.py
    +++ b/pynest/examples/urbanczik_synapse_example.py
    @@ -266,17 +266,15 @@ def h(U, nrn_params):
     # for recording the spiking of the soma
     sr_soma = nest.Create('spike_recorder')
     
    -
     # create connections
     nest.Connect(sg_prox, prrt_nrns, {'rule': 'one_to_one'})
    -nest.CopyModel('urbanczik_synapse', 'urbanczik_synapse_wr',
    -               {'weight_recorder': wr[0]})
    +nest.CopyModel('urbanczik_synapse', 'urbanczik_synapse_wr', {'weight_recorder': wr})
     nest.Connect(prrt_nrns, nrn, syn_spec=syn_params)
     nest.Connect(mm, nrn, syn_spec={'delay': 0.1})
    -nest.Connect(sg_soma_exc, nrn,
    -             syn_spec={'receptor_type': syns['soma_exc'], 'weight': 10.0 * resolution, 'delay': resolution})
    -nest.Connect(sg_soma_inh, nrn,
    -             syn_spec={'receptor_type': syns['soma_inh'], 'weight': 10.0 * resolution, 'delay': resolution})
    +syn_spec_exc = {'receptor_type': syns['soma_exc'], 'weight': 10.0 * resolution, 'delay': resolution}
    +nest.Connect(sg_soma_exc, nrn, syn_spec=syn_spec_exc)
    +syn_spec_inh = {'receptor_type': syns['soma_inh'], 'weight': 10.0 * resolution, 'delay': resolution}
    +nest.Connect(sg_soma_inh, nrn, syn_spec=syn_spec_inh)
     nest.Connect(nrn, sr_soma)
     
     # simulation divided into intervals of the pattern duration
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 0af3b2fd03..f84169621a 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -376,8 +376,6 @@ def get(self, *params, **kwargs):
             else:
                 raise TypeError('Got unexpected keyword argument')
     
    -        pandas_output = output == 'pandas'
    -
             if len(params) == 0:
                 # get() is called without arguments
                 result = nestkernel.llapi_get_nc_status(self._datum)
    @@ -393,13 +391,15 @@ def get(self, *params, **kwargs):
                 # TODO-PYNEST-NG: Drop this? Not sure anyone ever used it...
                 result = get_parameters_hierarchical_addressing(self, params)
     
    +        # TODO-PYNEST-NG: Decide if the behavior should be the same
    +        # for single-node node collections or different. 
             if isinstance(result, dict) and len(self) == 1:
                 new_result = {}
                 for k, v in result.items():
                     new_result[k] = v[0] if is_iterable(v) and len(v) == 1 and type(v) is not dict else v
                 result = new_result
     
    -        if pandas_output:
    +        if output == 'pandas':
                 index = self.get('global_id')
                 if len(params) == 1 and isinstance(params[0], str):
                     # params is a string
    diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py
    index 00aff0aae3..5c3562c957 100644
    --- a/testsuite/pytests/test_clopath_synapse.py
    +++ b/testsuite/pytests/test_clopath_synapse.py
    @@ -217,7 +217,7 @@ def test_SynapseFunctionWithAeifModel(self):
             nest.Simulate(20.)
     
             # Evaluation
    -        data = mm.events[0]
    +        data = mm.events
             senders = np.array(data['senders'])
             voltages = np.array(data['V_m'])
     
    diff --git a/testsuite/pytests/test_current_recording_generators.py b/testsuite/pytests/test_current_recording_generators.py
    index ff99f80bf1..185119b857 100644
    --- a/testsuite/pytests/test_current_recording_generators.py
    +++ b/testsuite/pytests/test_current_recording_generators.py
    @@ -131,23 +131,23 @@ def test_RecordedCurrentVectors(self):
             nest.Simulate(50)
     
             # retrieve vectors
    -        events_Vm = m_Vm.events[0]
    +        events_Vm = m_Vm.events
             t_Vm = numpy.array(events_Vm['times'])
             v_Vm = numpy.array(events_Vm['V_m'])
     
    -        events_ac = m_ac.events[0]
    +        events_ac = m_ac.events
             t_ac = numpy.array(events_ac['times'])
             i_ac = numpy.array(events_ac['I'])
     
    -        events_dc = m_dc.events[0]
    +        events_dc = m_dc.events
             t_dc = numpy.array(events_dc['times'])
             i_dc = numpy.array(events_dc['I'])
     
    -        events_step = m_step.events[0]
    +        events_step = m_step.events
             t_step = numpy.array(events_step['times'])
             i_step = numpy.array(events_step['I'])
     
    -        events_noise = m_noise.events[0]
    +        events_noise = m_noise.events
             t_noise = numpy.array(events_noise['times'])
             i_noise = numpy.array(events_noise['I'])
     
    diff --git a/testsuite/pytests/test_mc_neuron.py b/testsuite/pytests/test_mc_neuron.py
    index 1573bebc58..9fddf853b0 100644
    --- a/testsuite/pytests/test_mc_neuron.py
    +++ b/testsuite/pytests/test_mc_neuron.py
    @@ -22,7 +22,6 @@
     import unittest
     import nest
     import numpy as np
    -import numpy.testing as np_testing
     
     HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
     
    @@ -102,16 +101,18 @@ def setUp(self):
         def setUpNodes(self):
             self.n = nest.Create('iaf_cond_alpha_mc')
             rqs = nest.GetDefaults('iaf_cond_alpha_mc')['recordables']
    -        self.mm = nest.Create('multimeter', params={'record_from': rqs,
    -                                                    'interval': 0.1})
    +        self.mm = nest.Create('multimeter', params={'record_from': rqs, 'interval': 0.1})
             self.cgs = nest.Create('dc_generator', 3)
             self.cgs.set([self.rec_dic_dc_soma, self.rec_dic_dc_proximal, self.rec_dic_dc_distal])
     
             self.sgs = nest.Create('spike_generator', 6)
             self.sgs.set([
    -            {'spike_times': self.rec_sp_soma_ex}, {'spike_times': self.rec_sp_soma_in},
    -            {'spike_times': self.rec_sp_prox_ex}, {'spike_times': self.rec_sp_prox_in},
    -            {'spike_times': self.rec_sp_dist_ex}, {'spike_times': self.rec_sp_dist_in}
    +            {'spike_times': self.rec_sp_soma_ex},
    +            {'spike_times': self.rec_sp_soma_in},
    +            {'spike_times': self.rec_sp_prox_ex},
    +            {'spike_times': self.rec_sp_prox_in},
    +            {'spike_times': self.rec_sp_dist_ex},
    +            {'spike_times': self.rec_sp_dist_in},
             ])
     
         def setUpNetwork(self):
    @@ -131,20 +132,20 @@ def testNeuron(self):
             nest.Simulate(self.t0)
             self.n.soma = {'I_e': self.I_e}
             nest.Simulate(self.t_stim)
    -        rec = self.mm.events[0]
    +        rec = self.mm.events
     
             # test membrane potential recorded in the soma
    -        np_testing.assert_allclose(rec['V_m.s'][self.I0:self.I1], self.Vm_soma_test, rtol=1e-4)
    +        assert np.allclose(rec['V_m.s'][self.I0:self.I1], self.Vm_soma_test)
             # test membrane potential in the proximal compartment
    -        np_testing.assert_allclose(rec['V_m.p'][self.I0:self.I1], self.Vm_prox_test, rtol=1e-4)
    +        assert np.allclose(rec['V_m.p'][self.I0:self.I1], self.Vm_prox_test)
             # test membrane potential in the distal compartment
    -        np_testing.assert_allclose(rec['V_m.d'][self.I0:self.I1], self.Vm_dist_test, rtol=1e-4)
    +        assert np.allclose(rec['V_m.d'][self.I0:self.I1], self.Vm_dist_test)
             # test conductance recorded in the soma
    -        np_testing.assert_allclose(rec['g_ex.s'][self.I0:self.I1], self.gex_soma_test, rtol=1e-4)
    +        assert np.allclose(rec['g_ex.s'][self.I0:self.I1], self.gex_soma_test)
             # test conductance in the proximal compartment
    -        np_testing.assert_allclose(rec['g_ex.p'][self.I0:self.I1], self.gex_prox_test, rtol=1e-4)
    +        assert np.allclose(rec['g_ex.p'][self.I0:self.I1], self.gex_prox_test)
             # test conductance in the distal compartment
    -        np_testing.assert_allclose(rec['g_ex.d'][self.I0:self.I1], self.gex_dist_test, rtol=1e-4)
    +        assert np.allclose(rec['g_ex.d'][self.I0:self.I1], self.gex_dist_test)
     
     
     def suite():
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index e5a56ace3b..079ddb2862 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -36,10 +36,9 @@ def setUp(self):
             nest.ResetKernel()
     
             # set up source spike generator, as well as parrot neurons
    -        self.spike_time = 1.
    -        self.delay = .2
    -        self.source = nest.Create("spike_generator", 1,
    -                                  {"spike_times": [self.spike_time]})
    +        self.spike_time = 1.0
    +        self.delay = 0.2
    +        self.source = nest.Create("spike_generator", params={"spike_times": [self.spike_time]})
             self.parrot = nest.Create('parrot_neuron')
             self.spikes = nest.Create("spike_recorder")
     
    @@ -55,10 +54,10 @@ def test_ParrotNeuronRepeatSpike(self):
             nest.Simulate(self.spike_time + 2 * self.delay)
     
             # get spike from parrot neuron
    -        events = self.spikes.events[0]
    +        events = self.spikes.events
             times = np.array(events['times'])
             senders = np.array(events['senders'])
    -        post_time = times[senders == self.parrot.global_id[0]]
    +        post_time = times[senders == self.parrot.global_id]
     
             # assert spike was repeated at correct time
             assert post_time, "Parrot neuron failed to repeat spike."
    @@ -74,10 +73,10 @@ def test_ParrotNeuronIgnoreSpike(self):
             nest.Simulate(self.spike_time + 2. * self.delay)
     
             # get spike from parrot neuron, assert it was ignored
    -        events = self.spikes.events[0]
    +        events = self.spikes.events
             times = np.array(events['times'])
             senders = np.array(events['senders'])
    -        post_time = times[senders == self.parrot.global_id[0]]
    +        post_time = times[senders == self.parrot.global_id]
             assert len(post_time) == 0, \
                 "Parrot neuron failed to ignore spike arriving on port 1"
     
    @@ -95,10 +94,10 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
             nest.Simulate(self.spike_time + 2. * self.delay)
     
             # get spikes from parrot neuron, assert two were transmitted
    -        events = self.spikes.events[0]
    +        events = self.spikes.events
             times = np.array(events['times'])
             senders = np.array(events['senders'])
    -        post_times = times[senders == self.parrot.global_id[0]]
    +        post_times = times[senders == self.parrot.global_id]
             assert len(post_times) == 2 and post_times[0] == post_times[1], \
                 "Parrot neuron failed to correctly repeat multiple spikes."
     
    @@ -122,16 +121,16 @@ def test_ParrotNeuronIncomingMultiplicity(self):
     
             # set up source spike generator, as well as parrot neurons
             resolution = 0.1  # ms
    -        rate = 1000000.  # spikes / s
    -        delay = 1.    # ms
    -        t_base = 1000.  # ms
    +        rate = 1000000.0  # spikes / s
    +        delay = 1.0       # ms
    +        t_base = 1000.0   # ms
             t_sim = t_base + 3 * delay   # after t_sim, spikes from t_base arrived
    -        spikes_expected = rate * t_base / 1000.
    +        spikes_expected = rate * t_base / 1000.0
             spikes_std = math.sqrt(spikes_expected)
     
             # if the test is to be meaningful we must expect signficantly more
             # spikes than time steps
    -        assert spikes_expected - 3 * spikes_std > 10. * t_sim / resolution, \
    +        assert spikes_expected - 3 * spikes_std > 10.0 * t_sim / resolution, \
                 "Internal inconsistency: too few spikes."
     
             nest.set_verbosity(nest.verbosity.M_WARNING)
    @@ -171,23 +170,21 @@ def run_protocol(self, dt):
             nest.ResetKernel()
     
             # set pre and postsynaptic spike times
    -        delay = 1.  # delay for connections
    -        dspike = 100.  # ISI
    +        delay = 1.0     # delay for connections
    +        dspike = 100.0  # ISI
     
             # set the correct real spike times for generators (correcting for
             # delays)
    -        pre_times = [100., 100. + dspike]
    +        pre_times = [100.0, 100.0 + dspike]
             post_times = [k + dt for k in pre_times]
     
             # create spike_generators with these times
    -        pre_spikes = nest.Create("spike_generator", 1, {
    -                                 "spike_times": pre_times})
    -        post_spikes = nest.Create("spike_generator", 1, {
    -                                  "spike_times": post_times})
    +        pre_spikes = nest.Create("spike_generator", params={"spike_times": pre_times})
    +        post_spikes = nest.Create("spike_generator", params={"spike_times": post_times})
     
             # create parrot neurons and connect spike_generators
    -        pre_parrot = nest.Create("parrot_neuron", 1)
    -        post_parrot = nest.Create("parrot_neuron", 1)
    +        pre_parrot = nest.Create("parrot_neuron")
    +        post_parrot = nest.Create("parrot_neuron")
     
             nest.Connect(pre_spikes, pre_parrot, syn_spec={"delay": delay})
             nest.Connect(post_spikes, post_parrot, syn_spec={"delay": delay})
    @@ -226,7 +223,7 @@ def test_ParrotNeuronSTDPProtocolPotentiation(self):
             """Check pre-post spike pairings between parrot_neurons
             increments weights."""
     
    -        dt = 10.
    +        dt = 10.0
             w_pre, w_post = self.run_protocol(dt)
             assert w_pre < w_post, "Parrot neuron STDP potentiation \
                 protocol failed to elicit positive weight changes."
    @@ -235,7 +232,7 @@ def test_ParrotNeuronSTDPProtocolDepression(self):
             """Check post-pre spike pairings between parrot_neurons
             decrement weights."""
     
    -        dt = -10.
    +        dt = -10.0
             w_pre, w_post = self.run_protocol(dt)
             assert w_pre > w_post, "Parrot neuron STDP potentiation \
             protocol failed to elicit negative weight changes."
    diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index f577b8c08f..115f34b60c 100644
    --- a/testsuite/pytests/test_parrot_neuron_ps.py
    +++ b/testsuite/pytests/test_parrot_neuron_ps.py
    @@ -65,10 +65,10 @@ def test_ParrotNeuronRepeatSpike(self):
             nest.Simulate(_round_up(self.spike_time + 2 * self.delay))
     
             # get spike from parrot neuron
    -        events = self.spikes.events[0]
    +        events = self.spikes.events
             times = np.array(events['times'])
             senders = np.array(events['senders'])
    -        post_time = times[senders == self.parrot.global_id[0]]
    +        post_time = times[senders == self.parrot.global_id]
     
             # assert spike was repeated at correct time
             assert post_time, "Parrot neuron failed to repeat spike."
    @@ -84,10 +84,10 @@ def test_ParrotNeuronIgnoreSpike(self):
             nest.Simulate(_round_up(self.spike_time + 2. * self.delay))
     
             # get spike from parrot neuron, assert it was ignored
    -        events = self.spikes.events[0]
    +        events = self.spikes.events
             times = np.array(events['times'])
             senders = np.array(events['senders'])
    -        post_time = times[senders == self.parrot.global_id[0]]
    +        post_time = times[senders == self.parrot.global_id]
             assert len(post_time) == 0, \
                 "Parrot neuron failed to ignore spike arriving on port 1"
     
    @@ -105,10 +105,10 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
             nest.Simulate(_round_up(self.spike_time + 2. * self.delay))
     
             # get spikes from parrot neuron, assert two were transmitted
    -        events = self.spikes.events[0]
    +        events = self.spikes.events
             times = np.array(events['times'])
             senders = np.array(events['senders'])
    -        post_times = times[senders == self.parrot.global_id[0]]
    +        post_times = times[senders == self.parrot.global_id]
             assert len(post_times) == 2 and post_times[0] == post_times[1], \
                 "Parrot neuron failed to correctly repeat multiple spikes."
     
    diff --git a/testsuite/pytests/test_poisson_generator_rate_change.py b/testsuite/pytests/test_poisson_generator_rate_change.py
    index 425b946644..9969298553 100644
    --- a/testsuite/pytests/test_poisson_generator_rate_change.py
    +++ b/testsuite/pytests/test_poisson_generator_rate_change.py
    @@ -29,11 +29,10 @@
     class TestPgRateChange(unittest.TestCase):
     
         def _kstest_first_spiketimes(self, sr, start_t, expon_scale, resolution, p_value_lim):
    -        events = sr.events[0]
    -        senders = events['senders']
    -        times = events['times']
    -        min_times = [np.min(times[np.where(senders == s)])
    -                     for s in np.unique(senders)]
    +        events = sr.events
    +        senders = np.array(events['senders'])
    +        times = np.array(events['times'])
    +        min_times = [np.min(times[np.where(senders == s)]) for s in np.unique(senders)]
             d, p_val = scipy.stats.kstest(
                 min_times, 'expon', args=(start_t + resolution, expon_scale))
             print('p_value =', p_val)
    @@ -52,8 +51,7 @@ def test_statistical_rate_change(self):
             rate = 100.
             pg = nest.Create('poisson_generator_ps', params={'rate': rate})
             parrots = nest.Create('parrot_neuron_ps', n_parrots)
    -        sr = nest.Create('spike_recorder',
    -                         params={'start': 0., 'stop': float(sim_time)})
    +        sr = nest.Create('spike_recorder', params={'start': 0., 'stop': float(sim_time)})
             nest.Connect(pg, parrots, syn_spec={'delay': resolution})
             nest.Connect(parrots, sr, syn_spec={'delay': resolution})
     
    diff --git a/testsuite/pytests/test_rate_neuron.py b/testsuite/pytests/test_rate_neuron.py
    index cca54cb409..654bdbc217 100644
    --- a/testsuite/pytests/test_rate_neuron.py
    +++ b/testsuite/pytests/test_rate_neuron.py
    @@ -51,29 +51,24 @@ def setUp(self):
             nest.use_wfr = False
     
             # set up rate neuron and devices
    -        self.rate_neuron_ipn = nest.Create(
    -            'lin_rate_ipn', params=self.neuron_params)
    -        self.rate_neuron_opn = nest.Create(
    -            'lin_rate_opn', params=self.neuron_params)
    -        self.multimeter = nest.Create(
    -            "multimeter", params={'record_from': ['rate', 'noise'],
    -                                  'interval': self.dt, 'start': self.tstart})
    +        self.rate_neuron_ipn = nest.Create('lin_rate_ipn', params=self.neuron_params)
    +        self.rate_neuron_opn = nest.Create('lin_rate_opn', params=self.neuron_params)
    +        mm_params = {'record_from': ['rate', 'noise'], 'interval': self.dt, 'start': self.tstart}
    +        self.multimeter = nest.Create("multimeter", params=mm_params)
     
             # record rates and noise
    -        nest.Connect(
    -            self.multimeter, self.rate_neuron_ipn + self.rate_neuron_opn)
    +        nest.Connect(self.multimeter, self.rate_neuron_ipn + self.rate_neuron_opn)
     
         def test_RateNeuronMean(self):
             """Check the mean value of the rate_neurons"""
     
    -        # simulate
             nest.Simulate(self.simtime)
     
             # get noise from rate neurons
    -        events = self.multimeter.events[0]
    +        events = self.multimeter.events
             senders = np.array(events['senders'])
    -        senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id[0])
    -        senders_opn = np.where(senders == self.rate_neuron_opn.global_id[0])
    +        senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id)[0]
    +        senders_opn = np.where(senders == self.rate_neuron_opn.global_id)[0]
     
             rate = np.array(events['rate'])
             mean_rate_ipn = np.mean(rate[senders_ipn])
    @@ -85,14 +80,13 @@ def test_RateNeuronMean(self):
         def test_RateNeuronNoise(self):
             """Check noise of the rate_neurons"""
     
    -        # simulate
             nest.Simulate(self.simtime)
     
             # get noise from rate neurons
    -        events = self.multimeter.events[0]
    +        events = self.multimeter.events
             senders = np.array(events['senders'])
    -        senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id[0])
    -        senders_opn = np.where(senders == self.rate_neuron_opn.global_id[0])
    +        senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id)[0]
    +        senders_opn = np.where(senders == self.rate_neuron_opn.global_id)[0]
     
             noise = np.array(events['noise'])
             noise_ipn = noise[senders_ipn]
    @@ -106,13 +100,12 @@ def test_RateNeuronNoise(self):
         def test_RateNeuronVariance(self):
             """Check the variance of the rate of the rate_neuron for input noise"""
     
    -        # simulate
             nest.Simulate(self.simtime)
     
             # get variance of the rate
    -        events = self.multimeter.events[0]
    -        senders = events['senders']
    -        senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id[0])
    +        events = self.multimeter.events
    +        senders = np.array(events['senders'])
    +        senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id)[0]
     
             rate = np.array(events['rate'])[senders_ipn]
             var_rate = np.var(rate)
    @@ -120,9 +113,7 @@ def test_RateNeuronVariance(self):
             # expected variance
             var_test = self.neuron_params['sigma']**2 / 2.
     
    -        # assert
    -        self.assertTrue(
    -            np.isclose(var_rate, var_test, rtol=self.rtol))
    +        self.assertTrue(np.isclose(var_rate, var_test, rtol=self.rtol))
     
     
     def suite():
    diff --git a/testsuite/pytests/test_refractory.py b/testsuite/pytests/test_refractory.py
    index 835d3f7929..d76b2846aa 100644
    --- a/testsuite/pytests/test_refractory.py
    +++ b/testsuite/pytests/test_refractory.py
    @@ -144,12 +144,12 @@ def compute_reftime(self, model, sr, vm, neuron):
     
             if model in neurons_interspike:
                 # Spike emitted at next timestep so substract resolution
    -            return spike_times[1]-spike_times[0]-resolution
    +            return spike_times[1] - spike_times[0] - resolution
             elif model in neurons_interspike_ps:
    -            return spike_times[1]-spike_times[0]
    +            return spike_times[1] - spike_times[0]
             else:
    -            Vr = neuron.V_reset[0]
    -            times = np.array(vm.events[0]["times"])
    +            Vr = neuron.V_reset
    +            times = np.array(vm.events["times"])
     
                 # Index of the 2nd spike
                 idx_max = np.argwhere(times == spike_times[1])[0][0]
    @@ -210,7 +210,7 @@ def test_refractory_time(self):
                 t_ref_sim = self.compute_reftime(model, sr, vm, neuron)
     
                 if model in neurons_with_clamping:
    -                t_ref_sim = t_ref_sim - neuron.t_clamp[0]
    +                t_ref_sim = t_ref_sim - neuron.t_clamp
     
                 # Approximate result for precise spikes (interpolation error)
                 if model in neurons_interspike_ps:
    diff --git a/testsuite/pytests/test_stdp_nn_synapses.py b/testsuite/pytests/test_stdp_nn_synapses.py
    index c277fbffb2..ebe0249ccd 100644
    --- a/testsuite/pytests/test_stdp_nn_synapses.py
    +++ b/testsuite/pytests/test_stdp_nn_synapses.py
    @@ -148,7 +148,7 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        all_spikes = spike_recorder.events[0]
    +        all_spikes = spike_recorder.events
             times = np.array(all_spikes['times'])
             senders = np.array(all_spikes['senders'])
             pre_spikes = times[senders == presynaptic_neuron.tolist()[0]]
    diff --git a/testsuite/pytests/test_stdp_synapse.py b/testsuite/pytests/test_stdp_synapse.py
    index c2e32720bb..c3402b8770 100644
    --- a/testsuite/pytests/test_stdp_synapse.py
    +++ b/testsuite/pytests/test_stdp_synapse.py
    @@ -158,14 +158,14 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        all_spikes = spike_recorder.events[0]
    +        all_spikes = spike_recorder.events
             times = np.array(all_spikes['times'])
             senders = np.array(all_spikes['senders'])
             pre_spikes = times[senders == presynaptic_neuron.tolist()[0]]
             post_spikes = times[senders == postsynaptic_neuron.tolist()[0]]
     
    -        t_hist = np.array(wr.events["times"][0])
    -        weight = np.array(wr.events["weights"][0])
    +        t_hist = np.array(wr.events["times"])
    +        weight = np.array(wr.events["weights"])
     
             return pre_spikes, post_spikes, t_hist, weight
     
    diff --git a/testsuite/pytests/test_threads.py b/testsuite/pytests/test_threads.py
    index b275f10d86..26abf3423f 100644
    --- a/testsuite/pytests/test_threads.py
    +++ b/testsuite/pytests/test_threads.py
    @@ -100,12 +100,12 @@ def test_ThreadsGetEvents(self):
     
                 nest.Simulate(Simtime)
     
    -            n_events_sr.append(sr.n_events[0])
    -            n_events_vm.append(vm.n_events[0])
    +            n_events_sr.append(sr.n_events)
    +            n_events_vm.append(vm.n_events)
     
             ref_vm = N * (Simtime - 1)
    -        ref_sr = n_events_sr
    -
    +        ref_sr = n_events_sr[0]
    +        
             # could be done more elegantly with any(), ravel(),
             # but we dont want to be dependent on numpy et al
             [self.assertEqual(x, ref_vm) for x in n_events_vm]
    diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py
    index ade9ac5503..2baee4c701 100644
    --- a/testsuite/pytests/test_urbanczik_synapse.py
    +++ b/testsuite/pytests/test_urbanczik_synapse.py
    @@ -140,19 +140,17 @@ def test_SynapseDepressionFacilitation(self):
     
             # excitatory input to the dendrite
             pre_syn_spike_times = np.array([1.0, 98.0])
    -        sg_prox = nest.Create('spike_generator', params={
    -                              'spike_times': pre_syn_spike_times})
    +        sg_prox = nest.Create('spike_generator', params={'spike_times': pre_syn_spike_times})
     
             # excitatory input to the soma
             spike_times_soma_inp = np.arange(10.0, 50.0, resolution)
             spike_weights_soma = 10.0*np.ones_like(spike_times_soma_inp)
    -        sg_soma_exc = nest.Create('spike_generator',
    -                                  params={'spike_times': spike_times_soma_inp, 'spike_weights': spike_weights_soma})
    +        sg_params = {'spike_times': spike_times_soma_inp, 'spike_weights': spike_weights_soma}
    +        sg_soma_exc = nest.Create('spike_generator', params=sg_params)
     
             # for recording all parameters of the Urbanczik neuron
             rqs = nest.GetDefaults(nrn_model)['recordables']
    -        mm = nest.Create('multimeter', params={
    -                         'record_from': rqs, 'interval': 0.1})
    +        mm = nest.Create('multimeter', params={'record_from': rqs, 'interval': 0.1})
     
             # for recoding the synaptic weights of the Urbanczik synapses
             wr = nest.Create('weight_recorder')
    @@ -164,11 +162,10 @@ def test_SynapseDepressionFacilitation(self):
             create connections
             '''
             nest.Connect(sg_prox, prrt_nrn, syn_spec={'delay': resolution})
    -        nest.CopyModel('urbanczik_synapse', 'urbanczik_synapse_wr',
    -                       {'weight_recorder': wr[0]})
    +        nest.CopyModel('urbanczik_synapse', 'urbanczik_synapse_wr', {'weight_recorder': wr})
             nest.Connect(prrt_nrn, nrn, syn_spec=syn_params)
    -        nest.Connect(sg_soma_exc, nrn,
    -                     syn_spec={'receptor_type': syns['soma_exc'], 'weight': 10.0*resolution, 'delay': resolution})
    +        syn_spec_exc = {'receptor_type': syns['soma_exc'], 'weight': 10.0*resolution, 'delay': resolution}
    +        nest.Connect(sg_soma_exc, nrn, syn_spec=syn_spec_exc)
             nest.Connect(mm, nrn, syn_spec={'delay': resolution})
             nest.Connect(nrn, sr_soma, syn_spec={'delay': resolution})
     
    @@ -181,7 +178,7 @@ def test_SynapseDepressionFacilitation(self):
             read out devices
             '''
             # multimeter
    -        rec = mm.events[0]
    +        rec = mm.events
             t = np.array(rec['times'])
             V_w = np.array(rec['V_m.p'])
     
    @@ -199,8 +196,8 @@ def test_SynapseDepressionFacilitation(self):
             times = data['events']['times']
     
             # spike recorder
    -        data = sr_soma.events[0]
    -        spike_times_soma = np.array(ndata['times'])
    +        data = sr_soma.events
    +        spike_times_soma = np.array(data['times'])
     
             # compute predicted rate
             phi_max = nrn_params['phi_max']
    @@ -219,7 +216,7 @@ def test_SynapseDepressionFacilitation(self):
             tau_L = C_m_prox / g_L_prox
             E_L_prox = nrn_params['dendritic']['E_L']
             t0 = 1.2
    -        alpha_response = (np.heaviside(t - t0, 0.5)*tau_s*(np.exp(-(t - t0) / tau_L) - np.exp(-(t - t0) / tau_s)) /
    +        alpha_response = (np.heaviside(t - t0, 0.5) * tau_s * (np.exp(-(t - t0) / tau_L) - np.exp(-(t - t0) / tau_s)) /
                               (g_L_prox*(tau_L - tau_s)))
     
             # compute PI(t)
    @@ -229,14 +226,14 @@ def test_SynapseDepressionFacilitation(self):
                 idx = np.nonzero(np.in1d(t, spike_times_soma))[0]
                 rate[idx] -= 1.0 / resolution
     
    -        w_change_raw = -15.0*C_m_prox*rate*h*alpha_response
    +        w_change_raw = -15.0 * C_m_prox * rate * h * alpha_response
     
             # compute low pass filtered version of PI
             tau_Delta = syn_params['tau_Delta']
             eta = syn_params['eta']
    -        w_change_low_pass = eta * np.exp(-t / tau_Delta)*np.cumsum(
    -            np.exp(t / tau_Delta)*w_change_raw)*resolution / tau_Delta
    -        integrated_w_change = np.cumsum(w_change_low_pass)*resolution
    +        w_change_low_pass = eta * np.exp(-t / tau_Delta) * np.cumsum(
    +            np.exp(t / tau_Delta) * w_change_raw) * resolution / tau_Delta
    +        integrated_w_change = np.cumsum(w_change_low_pass) * resolution
             syn_weight_comp = init_w + integrated_w_change
     
             '''
    @@ -245,9 +242,7 @@ def test_SynapseDepressionFacilitation(self):
             # extract the weight computed in python at the times of the presynaptic spikes
             idx = np.nonzero(np.in1d(np.around(t, 4), np.around(pre_syn_spike_times + resolution, 4)))[0]
             syn_w_comp_at_spike_times = syn_weight_comp[idx]
    -        realtive_error = (
    -            (weights[-1] - syn_w_comp_at_spike_times[-1]) / (weights[-1] - init_w))
    -
    +        realtive_error = ((weights[-1] - syn_w_comp_at_spike_times[-1]) / (weights[-1] - init_w))
             self.assertTrue(abs(realtive_error) < 0.001)
     
     
    
    From 9e3b79f521fad49a9965e42b58bfe112307aa29b Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Fri, 13 Jan 2023 16:36:36 +0100
    Subject: [PATCH 114/375] Fix formatting
    
    ---
     models/cm_compartmentcurrents.h | 8 ++++----
     models/music_cont_in_proxy.cpp  | 2 +-
     models/music_cont_in_proxy.h    | 4 ++--
     nestkernel/io_manager.cpp       | 2 +-
     4 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/models/cm_compartmentcurrents.h b/models/cm_compartmentcurrents.h
    index 64d8f2834b..ed3f52c5e6 100644
    --- a/models/cm_compartmentcurrents.h
    +++ b/models/cm_compartmentcurrents.h
    @@ -477,7 +477,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = std::string("AMPA");
    +      dd[ names::receptor_type ] = std::string( "AMPA" );
           info.push_back( dd );
         }
         // receptor info for GABA synapses
    @@ -486,7 +486,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = std::string("GABA");
    +      dd[ names::receptor_type ] = std::string( "GABA" );
           info.push_back( dd );
         }
         // receptor info for NMDA synapses
    @@ -495,7 +495,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = std::string("NMDA");
    +      dd[ names::receptor_type ] = std::string( "NMDA" );
           info.push_back( dd );
         }
         // receptor info for AMPA_NMDA synapses
    @@ -504,7 +504,7 @@ class CompartmentCurrents
           dictionary dd;
           dd[ names::receptor_idx ] = syn_it->get_syn_idx();
           dd[ names::comp_idx ] = compartment_index;
    -      dd[ names::receptor_type ] = std::string("AMPA_NMDA");
    +      dd[ names::receptor_type ] = std::string( "AMPA_NMDA" );
           info.push_back( dd );
         }
       };
    diff --git a/models/music_cont_in_proxy.cpp b/models/music_cont_in_proxy.cpp
    index a8c69fc0de..71c2f6f72f 100644
    --- a/models/music_cont_in_proxy.cpp
    +++ b/models/music_cont_in_proxy.cpp
    @@ -161,7 +161,7 @@ nest::music_cont_in_proxy::get_status( dictionary& d ) const
     void
     nest::music_cont_in_proxy::set_status( const dictionary& d )
     {
    -  Parameters_ ptmp = P_; // temporary copy in case of errors
    +  Parameters_ ptmp = P_;   // temporary copy in case of errors
       ptmp.set( d, S_, this ); // throws if BadProperty
     
       State_ stmp = S_;
    diff --git a/models/music_cont_in_proxy.h b/models/music_cont_in_proxy.h
    index eb90313641..5da7d8c114 100644
    --- a/models/music_cont_in_proxy.h
    +++ b/models/music_cont_in_proxy.h
    @@ -128,8 +128,8 @@ class music_cont_in_proxy : public DeviceNode
     
         Parameters_(); //!< Sets default parameter values
     
    -    void get( dictionary& ) const;                  //!< Store current values in dictionary
    -    void set( const dictionary&, State_&, Node* );  //!< Set values from dictionary
    +    void get( dictionary& ) const;                 //!< Store current values in dictionary
    +    void set( const dictionary&, State_&, Node* ); //!< Set values from dictionary
       };
     
       // ------------------------------------------------------------
    diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp
    index b0093e07f9..decc74bbcb 100644
    --- a/nestkernel/io_manager.cpp
    +++ b/nestkernel/io_manager.cpp
    @@ -197,7 +197,7 @@ IOManager::get_recording_backend_status( std::string recording_backend )
     {
       dictionary status;
       recording_backends_[ recording_backend ]->get_status( status );
    -  status[ names::element_type ] = std::string("recording_backend");
    +  status[ names::element_type ] = std::string( "recording_backend" );
       return status;
     }
     
    
    From bfd0c3578d63ed6f66eea893b8eaa349da7c9b88 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Fri, 13 Jan 2023 16:46:26 +0100
    Subject: [PATCH 115/375] Fix copyright headers
    
    ---
     models/iaf_psc_exp_multisynapse.cpp | 1 +
     pynest/nestkernel_api.pxd           | 2 +-
     pynest/nestkernel_api.pyx           | 2 +-
     3 files changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/models/iaf_psc_exp_multisynapse.cpp b/models/iaf_psc_exp_multisynapse.cpp
    index 17925f5346..b7a7353841 100644
    --- a/models/iaf_psc_exp_multisynapse.cpp
    +++ b/models/iaf_psc_exp_multisynapse.cpp
    @@ -17,6 +17,7 @@
      *
      *  You should have received a copy of the GNU General Public License
      *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    + *
      */
     
     #include "iaf_psc_exp_multisynapse.h"
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index b9fd42ce19..b9dc6bb676 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -1,6 +1,6 @@
     # -*- coding: utf-8 -*-
     #
    -# ll_api.pxd
    +# nestkernel_api.pxd
     #
     # This file is part of NEST.
     #
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 36c0504ece..843fba00f2 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -1,6 +1,6 @@
     # -*- coding: utf-8 -*-
     #
    -# ll_api.pyx
    +# nestkernel_api.pyx
     #
     # This file is part of NEST.
     #
    
    From 32dce3c436ec53bee4e84d031a6e133c200241f7 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Mon, 16 Jan 2023 11:00:08 +0100
    Subject: [PATCH 116/375] Fix compilation errors
    
    ---
     models/music_cont_out_proxy.cpp     | 4 +---
     models/music_message_in_proxy.h     | 2 +-
     nestkernel/conn_builder_conngen.cpp | 2 +-
     nestkernel/conn_builder_conngen.h   | 3 +++
     nestkernel/nest.cpp                 | 2 ++
     5 files changed, 8 insertions(+), 5 deletions(-)
    
    diff --git a/models/music_cont_out_proxy.cpp b/models/music_cont_out_proxy.cpp
    index 18505d1e63..91f6b7edcd 100644
    --- a/models/music_cont_out_proxy.cpp
    +++ b/models/music_cont_out_proxy.cpp
    @@ -221,9 +221,7 @@ nest::music_cont_out_proxy::pre_run_hook()
       // only publish the output port once,
       if ( S_.published_ == false )
       {
    -    assert( synmodel.known( "static_synapse" ) and "synapse 'static_synapse' not available" );
    -
    -    const index synmodel_id = synmodel.get< synindex >( "static_synapse" );
    +    const index synmodel_id = kernel().model_manager.get_synapse_model_id( "static_synapse" );
         std::vector< MUSIC::GlobalIndex > music_index_map;
     
         dictionary dummy_params;
    diff --git a/models/music_message_in_proxy.h b/models/music_message_in_proxy.h
    index ed6d9fee57..78cbb69367 100644
    --- a/models/music_message_in_proxy.h
    +++ b/models/music_message_in_proxy.h
    @@ -104,7 +104,7 @@ class MsgHandler : public MUSIC::MessageHandler
       operator()( double t, void* msg, size_t size )
       {
         message_times.push_back( t * 1000.0 );
    -    messages.push_back( static_cast< char* >( msg ), size );
    +    messages.push_back( std::string( static_cast< char* >( msg ), size ) );
       }
     
     public:
    diff --git a/nestkernel/conn_builder_conngen.cpp b/nestkernel/conn_builder_conngen.cpp
    index ee28cf19d4..457fea4d5f 100644
    --- a/nestkernel/conn_builder_conngen.cpp
    +++ b/nestkernel/conn_builder_conngen.cpp
    @@ -36,7 +36,7 @@ ConnectionGeneratorBuilder::ConnectionGeneratorBuilder( NodeCollectionPTR source
       const dictionary& conn_spec,
       const std::vector< dictionary >& syn_specs )
       : ConnBuilder( sources, targets, conn_spec, syn_specs )
    -  , cg_( ConnectionGeneratorDatum() )
    +  , cg_( )
       , params_map_()
     {
       conn_spec.update_value( "cg", cg_ );
    diff --git a/nestkernel/conn_builder_conngen.h b/nestkernel/conn_builder_conngen.h
    index 0643d10f97..fc4b0590f1 100644
    --- a/nestkernel/conn_builder_conngen.h
    +++ b/nestkernel/conn_builder_conngen.h
    @@ -26,6 +26,9 @@
     #include "config.h"
     #ifdef HAVE_LIBNEUROSIM
     
    +// External includes:
    +#include <neurosim/connection_generator.h>
    +
     // C++ includes:
     #include <map>
     #include <vector>
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 7fe0060e0f..6c8e812df4 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -118,6 +118,8 @@
     #include "volume_transmitter.h"
     #include "weight_recorder.h"
     
    +#include "conn_builder_conngen.h"
    +
     #include "grid_mask.h"
     #include "spatial.h"
     
    
    From 2685d2004091ff01a0365ee9b0f6ac40f94fdcf5 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Mon, 6 Feb 2023 21:59:35 +0100
    Subject: [PATCH 117/375] Remove the SLI based MUSIC tutorial
    
    ---
     doc/htmldoc/tutorials/index.rst               |   1 -
     .../music_tutorial/music_tutorial_sli.rst     | 123 ------------------
     2 files changed, 124 deletions(-)
     delete mode 100644 doc/htmldoc/tutorials/music_tutorial/music_tutorial_sli.rst
    
    diff --git a/doc/htmldoc/tutorials/index.rst b/doc/htmldoc/tutorials/index.rst
    index adde54b3b7..e996a03c89 100644
    --- a/doc/htmldoc/tutorials/index.rst
    +++ b/doc/htmldoc/tutorials/index.rst
    @@ -18,7 +18,6 @@ Tutorials
        * :ref:`music_tutorial_2`
        * :ref:`music_tutorial_3`
        * :ref:`music_tutorial_4`
    -   * :ref:`music_sli`
        * :ref:`tips_music`
     
     .. grid::
    diff --git a/doc/htmldoc/tutorials/music_tutorial/music_tutorial_sli.rst b/doc/htmldoc/tutorials/music_tutorial/music_tutorial_sli.rst
    deleted file mode 100644
    index 3d23ed4297..0000000000
    --- a/doc/htmldoc/tutorials/music_tutorial/music_tutorial_sli.rst
    +++ /dev/null
    @@ -1,123 +0,0 @@
    -:orphan:
    -
    -.. _music_sli:
    -
    -MUSIC with SLI
    -==============
    -
    -SLI is the built-in scripting language in NEST. It is a stack-based
    -language loosely modelled on PostScript. It is quite cumbersome to work
    -with, is not extensively documented, and has quite a few corner cases,
    -design issues and unintended behaviours. But it is small, already built
    -into NEST and is much more memory efficient than using Python. If your
    -models are very large and memory is tight, or you are using a system
    -where Python isn't available, then SLI is the way to go.
    -
    -We won't discuss the code extensively as learning SLI is really outside
    -the scope of this tutorial. The code follows the same structure as the
    -other examples, and should be straightforward to follow. But we will
    -give a few pointers for how to connect things with MUSIC.
    -
    -The SLI version of the sending process file from
    -:ref:`Part 2 of the MUSIC tutorial <music_tutorial_2>`, *sender.sli*, is outlined
    -below. Comments are prefixed with a "%".
    -
    -::
    -
    -    % create 2 neurons, get NodeCollection representing IDs.
    -    /NUM_NEURONS 2 def
    -    /iaf_psc_alpha NUM_NEURONS Create /neuron_out Set
    -
    -    % create output proxy.
    -    /music_event_out_proxy << /port_name (p_out) >> Create /music_out Set
    -
    -    % connect the neurons to the proxy, and give them a separate channel each
    -    [NUM_NEURONS] Range
    -    {
    -        /index Set
    -        neuron_out [index] Take music_out << /rule /one_to_one >> << /music_channel index 1 sub >> Connect
    -    } forall
    -
    -    1000.0 Simulate
    -
    -On line 2-3 we create two `iaf_psc_alpha` in a NodeCollection and save it in `neuron_out`.
    -
    -The difference between ``def`` on line 2 and
    -``Set`` on line 3 is the order of the arguments: with
    -``Set`` you first give the object, then the name you want
    -to associate with it. With ``def`` you give the name first,
    -then the object.  Both are used extensively so you need to be aware
    -of them.
    -
    -On line 6 we create a MUSIC output proxy with port name
    -`p_out`. Dictionaries are bracketed with "<<" and ">>",
    -and strings are bracketed with parenthesis.
    -
    -On lines 9-13 we iterate over the range of all neurons and store the index
    -in `index`. Then we connect each neuron in the NodeCollection to the output
    -proxy with its own music channel. To get the individual node we use ``Take``.
    -Note that we use ``Set`` to assign the index on the stack
    -to a variable. We'd have to rotate the top stack elements if we wanted to
    -use ``def``.
    -
    -For the receiving SLI file, *receiver.sli*, we have:
    -
    -::
    -
    -    % Create 2 MUSIC nodes, get NodeCollection representing IDs.
    -    /NUM_NODES 2 def
    -    /music_event_in_proxy NUM_NODES Create /music_in Set
    -
    -    % Create 2 parrot neurons.
    -    /parrot_neuron NUM_NODES Create /parrot_in Set
    -
    -    % Create spike recorder
    -    /spike_recorder Create /sr Set
    -    sr << /record_to /ascii
    -                 /label (output)
    -    >> SetStatus
    -
    -    % set port name and channel for all music input proxies.
    -    music_in
    -    {
    -      /music_node Set
    -      /channel music_node 1 sub def
    -      music_node << /port_name (p_in) /music_channel channel >> SetStatus
    -    } forall
    -
    -    % set acceptable latency
    -    (p_in) 2.0 SetAcceptableLatency
    -
    -    % connect music proxies to parrots, one to one
    -    music_in parrot_in << /rule /one_to_one >> << /delay 2.0 >> Connect
    -
    -    parrot_in sr Connect
    -
    -    1000.0 Simulate
    -
    -SLI, like PyNEST, has a specific function for setting the acceptable
    -latency, as we do on line 23. In line 26 we do a one-to-one
    -connection between the input proxies and the parrot neurons, and set
    -the desired delay.
    -
    -For the MUSIC configuration file, we now need to use `binary=nest` to make it
    -run with nest, and pass the correct files as arguments:
    -
    -.. code-block:: sh
    -
    -        [from]
    -            binary=nest
    -            np=2
    -            args=send.sli
    -
    -        [to]
    -            binary=nest
    -            np=2
    -            args=receive.sli
    -
    -        from.p_out -> to.p_in [2]
    -
    -For more information on using SLI, the browser based help we mentioned
    -in the introduction is quite helpful, but the best resource is the set
    -of example models in the NEST source code distribution. That will show
    -you many useful idioms and typical ways to accomplish common tasks.
    
    From 962c10ed5131d900074f24dad6de36628a78baac Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Mon, 6 Feb 2023 22:02:34 +0100
    Subject: [PATCH 118/375] Remove SLI support for VIM
    
    ---
     .../guidelines/styleguide/vim_support_sli.rst | 21 -------------------
     doc/htmldoc/developer_space/index.rst         |  3 ---
     doc/htmldoc/installation/configuration.rst    |  3 ---
     3 files changed, 27 deletions(-)
     delete mode 100644 doc/htmldoc/developer_space/guidelines/styleguide/vim_support_sli.rst
    
    diff --git a/doc/htmldoc/developer_space/guidelines/styleguide/vim_support_sli.rst b/doc/htmldoc/developer_space/guidelines/styleguide/vim_support_sli.rst
    deleted file mode 100644
    index 9055eccfe6..0000000000
    --- a/doc/htmldoc/developer_space/guidelines/styleguide/vim_support_sli.rst
    +++ /dev/null
    @@ -1,21 +0,0 @@
    -:orphan:
    -
    -.. _vim_sli:
    -
    -Vim support for SLI files
    -=========================
    -
    -A simple syntax file for Vim users is provided below. Copy it to your Vim configuration folder to make it available to Vim:
    -
    -
    -.. code-block::
    -
    -   $ cp ${prefix}/share/doc/nest/EditorSupport/vim/syntax/sli.vim ~/.vim/syntax/sli.vim
    -
    -Then add the following lines to your ``~/.vimrc`` file to use it:
    -
    -.. code-block::
    -
    -    " sli
    -    au BufRead,BufNewFile *.sli set filetype=sli
    -    au FileType sli setl foldenable foldmethod=syntax
    diff --git a/doc/htmldoc/developer_space/index.rst b/doc/htmldoc/developer_space/index.rst
    index 64d4ec2742..01dc8a03fd 100644
    --- a/doc/htmldoc/developer_space/index.rst
    +++ b/doc/htmldoc/developer_space/index.rst
    @@ -108,8 +108,6 @@ Developer guides
     
            * :ref:`Developing NEST with IDEs <nest_ides>`
     
    -       * :ref:`vim_sli`
    -
     .. toctree::
        :maxdepth: 1
        :hidden: 
    @@ -120,7 +118,6 @@ Developer guides
        workflows/documentation_workflow/*
        guidelines/*
        guidelines/styleguide/styleguide
    -   guidelines/styleguide/vim_support_sli
        templates/*
        sli_docs/index
        *
    diff --git a/doc/htmldoc/installation/configuration.rst b/doc/htmldoc/installation/configuration.rst
    index 9a2cdc29fa..31f8e8c241 100644
    --- a/doc/htmldoc/installation/configuration.rst
    +++ b/doc/htmldoc/installation/configuration.rst
    @@ -44,9 +44,6 @@ Scripts can be run by typing:
     
        <nest_install_dir>/nest <file>
     
    -If you are a Vim user and require support for SLI files, please refer to
    -our :ref:`vim_sli`.
    -
     Supplying SLI scripts with parameters
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    
    From 3326064d79a92cee1adc6a624a6da19f58e991e6 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Mon, 6 Feb 2023 22:10:31 +0100
    Subject: [PATCH 119/375] Removing SLI tutorial
    
    ---
     doc/htmldoc/developer_space/index.rst         |  18 +-
     .../sli_docs/an-introduction-to-sli.rst       |  44 --
     .../developer_space/sli_docs/first-steps.rst  | 170 ------
     .../developer_space/sli_docs/index.rst        |  16 -
     .../sli_docs/neural-simulations.rst           | 515 ------------------
     .../sli_docs/objects-and-data-types.rst       | 238 --------
     .../sli_docs/programming-in-sli.rst           | 312 -----------
     .../using-files-and-keyboard-input.rst        | 119 ----
     doc/htmldoc/installation/configuration.rst    |  78 ---
     9 files changed, 5 insertions(+), 1505 deletions(-)
     delete mode 100644 doc/htmldoc/developer_space/sli_docs/an-introduction-to-sli.rst
     delete mode 100644 doc/htmldoc/developer_space/sli_docs/first-steps.rst
     delete mode 100644 doc/htmldoc/developer_space/sli_docs/index.rst
     delete mode 100644 doc/htmldoc/developer_space/sli_docs/neural-simulations.rst
     delete mode 100644 doc/htmldoc/developer_space/sli_docs/objects-and-data-types.rst
     delete mode 100644 doc/htmldoc/developer_space/sli_docs/programming-in-sli.rst
     delete mode 100644 doc/htmldoc/developer_space/sli_docs/using-files-and-keyboard-input.rst
     delete mode 100644 doc/htmldoc/installation/configuration.rst
    
    diff --git a/doc/htmldoc/developer_space/index.rst b/doc/htmldoc/developer_space/index.rst
    index 01dc8a03fd..34ecc453c6 100644
    --- a/doc/htmldoc/developer_space/index.rst
    +++ b/doc/htmldoc/developer_space/index.rst
    @@ -88,26 +88,19 @@ Developer guides
     
             * Here you can find details on our :ref:`CI workflow <cont_integration>`
     
    -.. grid:: 1 1 2 2
    -
    -    .. grid-item-card:: SLI documentation
    -        :link: sli_doc
    -        :link-type: ref
    -
    -
    -    .. grid-item-card:: C++ documentation
    -
    -        * see :ref:`devdoc_workflow`
    -
     .. grid:: 1 1 2 2
     
         .. grid-item-card:: Helpful guides
     
            Here are a few miscellaneous guides that you might find useful:
     
    -
            * :ref:`Developing NEST with IDEs <nest_ides>`
     
    +    .. grid-item-card:: C++ documentation
    +
    +        * see :ref:`devdoc_workflow`
    +
    +	 
     .. toctree::
        :maxdepth: 1
        :hidden: 
    @@ -119,5 +112,4 @@ Developer guides
        guidelines/*
        guidelines/styleguide/styleguide
        templates/*
    -   sli_docs/index
        *
    diff --git a/doc/htmldoc/developer_space/sli_docs/an-introduction-to-sli.rst b/doc/htmldoc/developer_space/sli_docs/an-introduction-to-sli.rst
    deleted file mode 100644
    index c980fe971c..0000000000
    --- a/doc/htmldoc/developer_space/sli_docs/an-introduction-to-sli.rst
    +++ /dev/null
    @@ -1,44 +0,0 @@
    -:orphan:
    -
    -.. _sli_intro:
    -
    -An Introduction to SLI
    -======================
    -
    -NEST can be started by typing
    -
    -::
    -
    -   <nest_install_dir>/nest
    -
    -at the command prompt. You should then see something like this:
    -
    -::
    -
    -               -- N E S T 2 beta --
    -
    -     Copyright 1995-2009 The NEST Initiative
    -      Version 1.9-svn Feb  6 2010 00:33:50
    -
    -   This program is provided AS IS and comes with
    -   NO WARRANTY. See the file LICENSE for details.
    -
    -   Problems or suggestions?
    -     Website     : https://www.nest-initiative.org
    -     Mailing list: users@nest-simulator.org
    -
    -   Type 'help' to get more information.
    -   Type 'quit' or CTRL-D to quit NEST.
    -
    -See :ref:`here <config_options>` for advanced configuration options.
    -
    -SLI user manual
    ----------------
    -
    -This manual gives a brief overview of the SLI programming language.
    -
    -1. :ref:`First Steps <first_steps_sli>`
    -2. :ref:`Objects and data types <obj_data_sli>`
    -3. :ref:`Programming in SLI <programming_sli>`
    -4. :ref:`Using files and keyboard input <files_keyboard_sli>`
    -5. :ref:`Neural simulations <neural_sims_sli>`
    diff --git a/doc/htmldoc/developer_space/sli_docs/first-steps.rst b/doc/htmldoc/developer_space/sli_docs/first-steps.rst
    deleted file mode 100644
    index 2b7db37d8e..0000000000
    --- a/doc/htmldoc/developer_space/sli_docs/first-steps.rst
    +++ /dev/null
    @@ -1,170 +0,0 @@
    -:orphan:
    -
    -.. _first_steps_sli:
    -
    -First Steps
    -===========
    -
    -Overview
    ---------
    -
    -SLI is the simulation language interface of NEST. It is a stack language
    -where each command expects to find its arguments on the stack.
    -
    -A stack is a place where data can be stored. The stack is organized into
    -levels and the data can be thought of being on top of each other. As new
    -data is entered, it is placed on the *top* of the stack. If a piece of
    -data is removed or manipulated, this is usually done to the top level of
    -the stack. The levels of the stack are numbered from zero onwards. Level
    -zero corresponds to the top of the stack.
    -
    -Initially the stack is empty. In general, you enter data onto the stack
    -and then execute commands to manipulate the data.
    -
    -Each command expects to find its arguments on the stack. When a SLI
    -command is executed, it usually removes all arguments from the stack and
    -pushes one or more results back on the stack. The basic concepts of
    -stack operation are:
    -
    --  Commands that require *arguments* take their arguments from the
    -   stack. Thus, this data must be present before you execute the
    -   command.
    -
    --  The arguments are then removed by the command as it is executed.
    -
    --  Any results which are produced by the command are returned to the
    -   stack, so you can use them in other operations.
    -
    -Commands with one argument
    ---------------------------
    -
    -Commands which need one argument take their argument from the top of the
    -stack. If the command produces a result, it is placed on top of the
    -stack, after the argument has been removed. Thus, the argument is
    -replaced by the result:
    -
    -Example
    -~~~~~~~
    -
    -::
    -
    -   SLI ] 10 log =
    -   1
    -
    -Here, the command ``log`` is used to compute the decadic logarithm of
    -10. Then, the command ``=`` is used to display the result of this
    -computation.
    -
    -Commands with more arguments
    -----------------------------
    -
    -Commands which need more than one argument, take their arguments from
    -level 0, 1, 2, and so forth and return their result to level 0, the top
    -of the stack. Examples are the arithmetic functions ``add``, ``sub``,
    -``mul``, and ``div``, which take two arguments and return one result.
    -
    -::
    -
    -   SLI ] 1 2 add =
    -   3
    -   SLI ] 1 2. div =
    -   0.5
    -
    -So far, we have used the command ``=`` to display the top object on the
    -stack. In addition, this command removes the object. You can also list
    -the contents of the stack without changing it.
    -
    -::
    -
    -   SLI ] 1 2
    -   SLI [2] stack
    -   2
    -   1
    -   SLI [2] add
    -   SLI [1] stack
    -   3
    -   SLI [1]
    -
    -Using previous results
    -----------------------
    -
    -Chain calculations are calculations which involve more than one
    -operation. A stack is particularly useful for chaining
    -operations,because it retains intermediate results.
    -
    -This example shows, how the stack can be used for chain calculations.
    -Calculate (10+13) \\(cdot\) (8-12)
    -
    -::
    -
    -   SLI [1] 10 13 add 8 12 sub
    -   SLI [2] stack
    -   -4
    -   23
    -   SLI [2] mul =
    -   -92
    -
    -Notice that the results of the fist two operations remain on the stack,
    -until they are used in the multiplication.
    -
    -Exchanging the first two stack levels
    --------------------------------------
    -
    -The command ``exch`` exchanges the contents of the levels 0 and 1. This
    -is useful, if the order of objects on the stack does not match the order
    -required by the desired command.
    -
    -Example 1
    -~~~~~~~~~
    -
    -Calculate 1/ln(2).
    -
    -::
    -
    -   SLI ] 2 ln
    -   SLI [1] 1
    -   SLI [2] exch div
    -   SLI [1] =
    -   1.4427
    -
    -Removing stack elements
    ------------------------
    -
    -The command ``pop`` removes the top object (level 0) of the stack. The
    -remaining items move up on the stack, so that the object which was at
    -level 1 is now at level 0.
    -
    -The command ``clear`` clears the entire stack.
    -
    -Duplicating the top element
    ----------------------------
    -
    -The command ``dup`` duplicates the contents of the object at level 0 and
    -pushes the other element down one level. This command is useful if the
    -result of an operation is needed more than once in a chain calculation.
    -
    -Example 2
    -~~~~~~~~~
    -
    -Calculate (1+4/2) + exp(1+4/2)
    -
    -::
    -
    -   SLI ] 1 4 2.0 div add
    -   SLI [1] dup
    -   SLI [2] exp
    -   SLI [2] add
    -   SLI [1] =
    -   23.0855
    -
    -Important stack commands
    -------------------------
    -
    -Command Description ``=`` Print the object at level 0. ``==`` Print the
    -object at level 0 in syntax form. ``count`` Count the number of objects
    -on the stack. ``patsck`` Display the stack in syntax form. ``stack``
    -Display the stack. ``pop``, ``;`` Pop object from stack. ``npop`` Pop
    -``n`` objects from stack. ``dup`` Duplicate top object of stack.
    -``copy`` Copy the first n objects of the stack. ``index`` Copy the
    -``n``\ 'th object of the stack. ``roll`` Roll a portion of ``n`` stack
    -levels ``k`` times. ``exec`` Execute the top element on the stack.
    diff --git a/doc/htmldoc/developer_space/sli_docs/index.rst b/doc/htmldoc/developer_space/sli_docs/index.rst
    deleted file mode 100644
    index 7aec67abbf..0000000000
    --- a/doc/htmldoc/developer_space/sli_docs/index.rst
    +++ /dev/null
    @@ -1,16 +0,0 @@
    -.. _sli_doc:
    -
    -SLI documentation
    -=================
    -
    -
    -.. toctree::
    -   :maxdepth: 1
    -
    -   an-introduction-to-sli
    -   first-steps
    -   neural-simulations
    -   objects-and-data-types
    -   programming-in-sli
    -   using-files-and-keyboard-input
    -
    diff --git a/doc/htmldoc/developer_space/sli_docs/neural-simulations.rst b/doc/htmldoc/developer_space/sli_docs/neural-simulations.rst
    deleted file mode 100644
    index 624af2aafb..0000000000
    --- a/doc/htmldoc/developer_space/sli_docs/neural-simulations.rst
    +++ /dev/null
    @@ -1,515 +0,0 @@
    -:orphan:
    -
    -.. _neural_sims_sli:
    -
    -Neural simulations
    -==================
    -
    -Overview
    ---------
    -
    -A simulation of a network is like an experiment with the difference that
    -it takes place inside the computer's memory rather than in the physical
    -world.
    -
    -Like in a real experiment, you need a system which you want to
    -investigate. Moreover, you need a clear idea of *what* you want to learn
    -from the experiment. In the context of a network simulation this means
    -that you have to know *which input* you want to give to your network and
    -*which output* you expect.
    -
    -The next section will illustrate the main concepts of NEST simulations,
    -using a simple simulation. The following sections will then give a
    -step-by-step introduction to the main concepts of NEST simulations.
    -Finally, we will discuss a complex example.
    -
    -A simple simulation
    --------------------
    -
    -The simplest simulation in NEST is that of a network which contains just
    -one neuron:
    -
    -::
    -
    -   SLI ] /iaf_psc_alpha Create /neuron Set
    -
    -We are going to simulate a standard integrate and fire model with
    -resting potential at -70 mV and spike threshold at -55 mV. In this line,
    -we use the model ``iaf_psc_alpha`` to create a neuron. The command
    -``Create`` returns a handle to the created neuron, which we store in the
    -variable ``neuron``.
    -
    -Next, we would like to add a stimulation and a recording device to the
    -neuron, so that we will see something during the simulation.
    -
    -In our little example, we want to inject a current into the neuron and
    -record its membrane potential. Thus, we need to create the corresponding
    -devices and connect them to the neuron:
    -
    -::
    -
    -   SLI ] /voltmeter Create  /vm Set
    -
    -This command creates a voltmeter node. The handle to the new voltmeter
    -is stored in the variable ``vm``.
    -
    -By default, the voltmeter will only record membrane potential values, so
    -we configure it to show us the time stamp of each value as well. We also
    -set it to print the time and potential to the screen and we set the
    -recording interval to 0.1 ms. The default is 1.0 ms.
    -
    -::
    -
    -   SLI ] vm << /record_to /screen /interval 0.1 >> SetStatus
    -
    -The double angled brackets ``<<`` and ``>>``\ delimit a dictionary
    -definition which consists of successive ``/key value`` pairs.
    -
    -After setting the parameters of the voltmeter, we connect it to the
    -neuron, using the handles we have created above:
    -
    -::
    -
    -   SLI ] vm neuron Connect
    -
    -Now we create a DC generator which will supply a constant current to our
    -neuron:
    -
    -::
    -
    -   SLI ] /dc_generator Create /stim Set
    -
    -Next, we want to set the amplitude of the DC generator such that it
    -delivers enough current to elicit a spike in the neuron:
    -
    -::
    -
    -   SLI ] stim << /amplitude 600.0 >> SetStatus
    -
    -Here, we only adjust the strength of the input, we set its new value to
    -``600.0``, which is the amplitude in pA.
    -
    -We have to connect the DC generator to the neuron:
    -
    -::
    -
    -   SLI ] stim neuron Connect
    -
    -We can now run the simulation and expect to see some results:
    -
    -::
    -
    -   SLI ] 15.0 Simulate
    -
    -The command ``Simulate`` runs the simulation for the specified number of
    -milliseconds. Below, you see a transcript of the simulation:
    -
    -::
    -
    -   Nov 10 08:57:51 Simulate [Info]:
    -       Simulating 15 ms.
    -   Nov 10 08:57:51 Scheduler::prepare_nodes [Info]:
    -       Please wait. Preparing elements.
    -   Nov 10 08:57:51 Scheduler::prepare_nodes [Info]:
    -       Simulating 3 local nodes.
    -   Nov 10 08:57:51 Scheduler::update [Info]:
    -       Simulating using OpenMP.
    -
    -   1   0.1 -70
    -   1   0.2 -70
    -   1   0.3 -70
    -   1   0.4 -70
    -   1   0.5 -70
    -   1   0.6 -70
    -   1   0.7 -70
    -   1   0.8 -70
    -   1   0.9 -70
    -   1   1   -70
    -   1   1.1 -70
    -   1   1.2 -69.7612
    -   1   1.3 -69.5248
    -   1   1.4 -69.2907
    -   1   1.5 -69.0589
    -
    -   :
    -
    -   1   10.5    -55.3751
    -   1   10.6    -55.2818
    -   1   10.7    -55.1894
    -   1   10.8    -55.098
    -   1   10.9    -55.0075
    -   1   11  -70
    -   1   11.1    -70
    -   1   11.2    -70
    -   1   11.3    -70
    -
    -   :
    -
    -   1   12.7    -70
    -   1   12.8    -70
    -   1   12.9    -70
    -   1   13  -70
    -   1   13.1    -69.7612
    -   1   13.2    -69.5248
    -   1   13.3    -69.2907
    -   1   13.4    -69.0589
    -   1   13.5    -68.8295
    -   1   13.6    -68.6023
    -   1   13.7    -68.3775
    -   1   13.8    -68.1548
    -   1   13.9    -67.9343
    -   1   14  -67.7161
    -
    -   Nov 10 08:57:51 Scheduler::resume [Info]:
    -       Simulation finished.
    -   Nov 10 08:57:51 Scheduler::finalize_nodes() [Info]:
    -        using OpenMP.
    -
    -After some initial messages from the simulation scheduler, we see the
    -output from the voltmeter. The number in the left column represents the
    -node ID of the model neuron and the center column the network
    -time in milliseconds. The right column contains the values of the
    -membrane potential at that time. The potential is given in mV.
    -
    -By default, NEST uses a simulation stepsize of 0.1 ms. With a simulation
    -time of 15.0 ms, we have 150 simulation steps.
    -
    -The neuron that we have simulated was a standard *integrate-and-fire*
    -neuron [Tuckwell91] with a resting potential of -70 mV and a threshold
    -at -55.0 mV. We see the first effect of the DC input current at 1.2 ms.
    -This time delay is due to several reasons: The ``dc_generator`` emits
    -the first current output at the end of the first time step, i.e., at 0.1
    -ms. Since the connection between generator and neuron was created with
    -the default delay of 1 ms, the current signal arrives at the neuron at
    -1.1 ms and thus affects the membrane potential for the first time during
    -the time step from 1.1 ms to 1.2 ms.
    -
    -During the time step from 10.9 ms to 11.0 ms, the membrane potential
    -crosses the threshold value -55.0 mV. Thus, the neuron emits an output
    -spike at 11.0 ms and the membrane potential is then reset to -70.0 mV
    -and clamped to the resting value for 2 ms, the :hxt_ref:`refractory period` of the
    -neuron. After the refractory period, the membrane continues to
    -depolarize due to the continuing input current.
    -
    -Nodes and Models
    -----------------
    -
    -A neuronal model in NEST is represented as a directed weighted graph.
    -Nodes in the graph can either be neurons or devices, while the edges
    -correspond to the synapses. On the level of their implementation,
    -these elements are C++ classes.
    -
    -An overview of all available node models can be retrieved from the
    -NEST kernel using ``GetKernelStatus /node_models get``, while passing
    -the key 'synapse_models' will return the list of available synapse
    -models.
    -
    -You can find a list of all available neuron models in our :doc:`model
    -directory <../../models/index_neuron>`.
    -
    -Creating nodes
    -~~~~~~~~~~~~~~
    -
    -Before continuing with the example, we reset NEST, to clear all nodes
    -that we have created before.
    -
    -::
    -
    -   SLI ] ResetKernel
    -   Sep 21 10:13:39 Network::clear_models [Info]:
    -    Models will be cleared and parameters reset.
    -
    -Nodes are created from a model, using the command ``Create``.
    -
    -::
    -
    -   SLI ] /iaf_psc_alpha Create ==
    -   1
    -
    -In the fist line, we create one integrate and fire neuron from the model
    -``iaf_psc_alpha``.
    -
    -The return value of ``Create`` is an integer that identifies the last
    -node that was created in the network (note that this can be different
    -from 1 if you have not called ``ResetKernel before)``. This integer is
    -called the node's *node ID* (the network as a whole owns the node ID
    -``0``, therefore the ids of user-created nodes start with ``1``). Often,
    -it is neccessary to have a large number of nodes of the same type. The
    -command Create can also be used for this purpose. The following line of
    -code create 10 integrate and fire neurons:
    -
    -::
    -
    -   SLI ] /iaf_psc_alpha 10 Create ==
    -   11
    -
    -Status information
    -------------------
    -
    -Nodes have a state which can be extracted and modified. In the follwing
    -example, we display the status information of one the neurons in the
    -layer we have created above:
    -
    -::
    -
    -   SLI ] 1 ShowStatus
    -   --------------------------------------------------
    -   Name                     Type                Value
    -   --------------------------------------------------
    -   archiver_length          integertype         0
    -   C_m                      doubletype          250
    -   E_L                      doubletype          -70
    -   frozen                   booltype            false
    -   global_id                integertype         1
    -   I_e                      doubletype          0
    -   local                    booltype            true
    -   local_id                 integertype         1
    -   model                    literaltype         iaf_psc_alpha
    -   node_type                literaltype         neuron
    -   parent                   integertype         0
    -   recordables              arraytype           <arraytype>
    -   state                    integertype         0
    -   tau_m                    doubletype          10
    -   tau_minus                doubletype          20
    -   tau_minus_triplet        doubletype          110
    -   tau_syn_ex               doubletype          2
    -   tau_syn_in               doubletype          2
    -   thread                   integertype         0
    -   t_ref                    doubletype          2
    -   t_spike                  doubletype          -1
    -   vp                       integertype         0
    -   V_m                      doubletype          -70
    -   V_reset                  doubletype          -70
    -   V_th                     doubletype          -55
    -   --------------------------------------------------
    -   Total number of entries: 24
    -
    -Using the command ``SetStatus``, it is possible to change the entries of
    -this so called *status dictionary*. The following lines of code change
    -the threshold value :hxt_ref:`V_th` to -60 mV:
    -
    -::
    -
    -   SLI ] 1 << /V_th -60.0 >> SetStatus
    -   SLI ] 1 GetStatus /V_th get =
    -   -60
    -
    -Please note, that ``SetStatus`` checks if a property really exists in a
    -node and will issue an error if it doesn't. This behavior can be changed
    -by the following command:
    -
    -::
    -
    -   << /dict_miss_is_error false >> SetKernelStatus
    -
    -Then, NEST is very tolerant with respect to the property that you are
    -trying to change: If it does not know the property, or if the property
    -cannot be changed, there will be no error, but only a warning. In any
    -case, ``SetStatus`` does complain if the new value does not match in the
    -expected type:
    -
    -::
    -
    -   SLI ] 1 << /V_th (60) >> SetStatus
    -
    -
    -   Dec 01 15:33:54 SetStatus_ad [Error]: TypeMismatch
    -       Expected datatype: doubletype
    -       Provided datatype: stringtype
    -
    -In order to find out, which properties of a given model can be changed
    -an which not, you have to refer to the model's documentation.
    -
    -Connections
    ------------
    -
    -Connections between nodes define possible channels for interactions
    -between them. A connection between two nodes is established, using the
    -command ``Connect``.
    -
    -Each connection has two basic parameters, *weight* and *delay*. The
    -weight determines the strength of the connection, the delay determines
    -how long an event needs to travel from the sending to the receiving
    -node. The delay must be a positive number greater or equal to the
    -simulation stepsize and is given in ms.
    -
    -Example 1
    -~~~~~~~~~
    -
    -::
    -
    -   SLI ] /iaf_psc_alpha Create /n1 Set
    -   SLI ] /iaf_psc_alpha Create /n2 Set
    -   SLI ] /iaf_psc_alpha Create /n3 Set
    -   SLI ]
    -   SLI ] n1 n2 Connect
    -   SLI ] n1 n3 Connect
    -
    -To inspect the parameters of a connection, one first needs to obtain a
    -handle to the connection. This is done using the command
    -``GetConnections``. It takes a dictionary that at least contains the id
    -of the source node and will return a list of handles for all outgoing
    -connections. The search can be restricted by using the optional
    -parameters *target* and *synapse_type*.
    -
    -Example 2
    -~~~~~~~~~
    -
    -::
    -
    -   SLI ] << /source n1 >> GetConnections /c1 Set
    -   SLI ] c1 length ==
    -   2
    -   SLI ] << /source n1 /target n2 >> GetConnections /c2 Set
    -   SLI ] c2 length ==
    -   1
    -
    -To actually see the parameters of the connection, ``GetStatus`` is used,
    -just like it is for nodes.
    -
    -Example 3
    -~~~~~~~~~
    -
    -::
    -
    -   SLI ] c1 0 get GetStatus info
    -   --------------------------------------------------
    -   Name                     Type                Value
    -   --------------------------------------------------
    -   delay                    doubletype          1
    -   receptor                 integertype         0
    -   sizeof                   integertype         32
    -   source                   integertype         1
    -   synapse_model            literaltype         static_synapse
    -   target                   integertype         2
    -   weight                   doubletype          1
    -   --------------------------------------------------
    -   Total number of entries: 7
    -
    -To change the parameters of a connection, ``SetStatus`` is used, just
    -like it is for nodes.
    -
    -Example 4
    -~~~~~~~~~
    -
    -::
    -
    -   SLI ] c1 0 get << /weight 2.0 >> SetStatus
    -   SLI ] c1 0 get GetStatus /weight get ==
    -   2.000000e+00
    -
    -Devices
    --------
    -
    -Devices are network nodes which provide input to the network or record
    -its output. They encapsulate the stimulation and measurement process. If
    -you want to extract certain information from a simulation, you need a
    -device which is able to deliver this information. Likewise, if you want
    -to send specific input to the network, you need a device which delivers
    -this input.
    -
    -Devices have a built-in timer which controls the period they are active.
    -Outside this interval, a device will remain silent. The timer can be
    -configured using the command ``SetStatus``.
    -
    -By definition, a device is active in the interval \\((t_1,t_2)\) if we
    -can observe events \\(E\) with time stamps \\(t_E\) which obey \\(t_1 <=
    -t_E < t_2\) for all \\(E\) . In other words, the interval during which
    -the device is active corresponds to the range of time-stamps of the
    -device's events.
    -
    -Note that it is not possible to generate/observe an event with time
    -stamp 0.
    -
    -Device parameters
    -~~~~~~~~~~~~~~~~~
    -
    -The following entries of the status dictionary are the same for all
    -stimulation and recording devices:
    -
    -Property Type Description ``/start`` double First time of activity,
    -relative to the value of ``origin`` in ms. ``/stop`` double First time
    -of inactivity, relative to the value of ``origin`` in ms. ``/origin``
    -double Origin of the device clock, relative to the network time in ms.
    -In general, the following must hold:
    -
    -1. *stop* >= *start*
    -2. If *stop =* start\ *, the device is inactive.*
    -
    -Stimulation devices
    -~~~~~~~~~~~~~~~~~~~
    -
    -A range of devices is available for the stimulation of neurons. The most
    -important ones are listed in the following table. For details, refer to
    -the documentation of the respective decive.
    -
    -Model name Description ``spike_generator`` Device to generate spikes at
    -specific times. ``poisson_generator`` Device to generate poisson
    -shotnoise. ``dc_generator`` Device to generate a constant current.
    -``ac_generator`` Device to generate an alternating (sine) current.
    -``step_current_generator`` Device to generate a step current with
    -different amplitudes at different times.
    -
    -Example 5
    -^^^^^^^^^
    -
    -::
    -
    -   SLI ] /iaf_psc_alpha Create /n Set
    -   SLI ] /poisson_generator Create /pg Set
    -   SLI ] pg << /rate 220.0 Hz >> SetStatus
    -   SLI ] pg n Connect
    -
    -Recording devices
    -~~~~~~~~~~~~~~~~~
    -
    -All devices which are used to observe the state of other network nodes
    -are called recording devices. Examples are :hxt_ref:`multimeter` and
    -``spike_recorder``.
    -
    -Recording devices have properties which control the amount, the
    -format, and the destination of their output. The latter is done by
    -setting their property ``record_to`` to the name of the recording
    -backend to use. To dump recorded data to a file, set ``ascii``, to
    -print to the screen, use ``screen`` and to hold the data in memory,
    -set ``memory``, which is also the default for all devices. Data
    -stored in memory can be retrieved after the simulation using
    -``GetStatus``. To get a list of all available recording backends, run
    -
    -::
    -
    -   SLI ] GetKernelStatus /recording_backends get ==
    -
    -A list of node models including all available device models can be retrieved by calling
    -``GetKernelStatus /node_models get`. The most important devices are:
    -
    -* ``voltmeter`` Device to observe membrane potentials.
    -* :hxt_ref:`multimeter` Device to observe arbitrary analog quantities.
    -* ``spike_recorder`` Device to observe spike times.
    -
    -Please note that the connection direction for analog recorders (all
    -except ``spike_recorder`` in above list) is inverted with respect to
    -other recorders, i.e. the recorder has to connected to the neurons in
    -this case.
    -
    -Example 6
    -^^^^^^^^^
    -
    -::
    -
    -   SLI ] /iaf_psc_alpha Create /n Set
    -   SLI ] /voltmeter Create /vm Set
    -   SLI ] /spike_recorder Create /sr Set
    -   SLI ] vm n Connect
    -   SLI ] n sr Connect
    -
    -Simulation
    -----------
    -
    -NEST simulations are time driven. The simulation time proceeds in
    -discrete steps of size ``dt``, set using the property ``resolution`` of
    -the root node. In each time slice, all nodes in the system are updated
    -and pending events are delivered.
    -
    -The simulation is run by calling the command ``t Simulate``, where ``t``
    -is the simulation time in milliseconds
    diff --git a/doc/htmldoc/developer_space/sli_docs/objects-and-data-types.rst b/doc/htmldoc/developer_space/sli_docs/objects-and-data-types.rst
    deleted file mode 100644
    index 2967f94a4d..0000000000
    --- a/doc/htmldoc/developer_space/sli_docs/objects-and-data-types.rst
    +++ /dev/null
    @@ -1,238 +0,0 @@
    -:orphan:
    -
    -.. _obj_data_sli:
    -
    -Objects and data types
    -======================
    -
    -Overview
    ---------
    -
    -Anything that can be put on the stack is called object. There are
    -several different types of objects, which can store different types of
    -data. For a number of object types there exist two different states:
    -*executable* and *literal*. Some object types can change between these
    -two states. Literal objects are the majority and are simply pushed on
    -the stack when they are entered. By contrast, executable objects perform
    -some operation when they are entered and cannot easily be pushed on the
    -stack.
    -
    -Numbers
    --------
    -
    -SLI distinguishes between real and integer numbers. Real numbers
    -correspond to the type ``double`` in C/C++. Integer numbers correspond
    -to the type ``long int`` of C/C++.
    -
    -Examples 1
    -~~~~~~~~~~
    -
    -Real numers are: ``1.4``, ``.5``, ``1.``, ``1e-2``
    -
    -Integer numers are ``1``, ``2``, ``3000``
    -
    -Arrays
    -------
    -
    -Arrays are sequential containers which can hold any SLI object. The
    -elements of an array are indexed, starting with zero (0) as the first
    -index.
    -
    -SLI arrays are heterogeneous. Objects of different type may be mixed
    -within one array. Arrays may also be nested to define matrices or
    -tensors of arbitrary rank.
    -
    -Arrays are delimited by square brackets. The different elements of an
    -array are separated by white-spaces.
    -
    -Examples 2
    -~~~~~~~~~~
    -
    -::
    -
    -   [1 2 3]   % a simple array with integers
    -   [1 a b]   % a mixed array
    -   [[1 2 3] [4 5 6]] % a 2x3 Matrix defined by nested array
    -
    -Calculate the dot product of the vectors \\([1 2 3]cdot[4 5 6]\)
    -
    -::
    -
    -   SLI ] [1 2 3]
    -   SLI [1] [4 5 6]
    -   SLI [2] Dot =
    -   32
    -
    -Names
    ------
    -
    -Names are used to create variables and to identify specific SLI objects.
    -If a name is entered, it is immediately executed.
    -
    -If you want to put a name on the stack without evaluating it, you need
    -to protect it by prepending a shash character (e.g. ``/a``). In this
    -case, the name is called a *literal name*.
    -
    -The command ``def`` is used to create an association between a name an
    -an object.
    -
    -Example 3
    -~~~~~~~~~
    -
    -::
    -
    -   SLI ] /pi 3.1415 def
    -   SLI ] pi
    -   SLI [1] =
    -   3.1415
    -
    -The command ``who`` gives the list of names which have been defined
    -during the SLI session.
    -
    -Example 4
    -~~~~~~~~~
    -
    -Define the variables *a* and *b* with values 1 and 2 and calculate *a+b*
    -
    -::
    -
    -   SLI ] /a 1 def
    -   SLI ] /b 2 def
    -   SLI ] a b add
    -   SLI ] =
    -   3
    -   SLI ] who
    -   --------------------------------------------------
    -   Name                     Type                Value
    -   --------------------------------------------------
    -   pi                       doubletype          3.1415
    -   a                        integertype         1
    -   b                        integertype         2
    -   --------------------------------------------------
    -   Total number of dictionary entries: 3
    -
    -Strings
    --------
    -
    -Strings are sequences of characters, delimited by parenthesis. In SLI,
    -characters are represented by interger numbers, e.g. 97 represents the
    -letter "a", while 32 represents the *space* character.
    -
    -The elements of a string are indexed, starting with zero (0) as the
    -first index.
    -
    -Matched pairs of parentheses may be used inside strings.
    -
    -Example 5
    -~~~~~~~~~
    -
    -::
    -
    -   SLI ] (Hello World!) =
    -   Hello World!
    -
    -Procedures
    -----------
    -
    -Procedures are a sequence of SLI commands, enclosed by the delimiters
    -``{`` and ``}``. The delimiters prevent the objects from being executed
    -as you enter them. Instead, they will be executed when you evaluate the
    -procedure.
    -
    -Bound to a name, procedures can be used like any builtin SLI command.
    -
    -Example: Hello World
    -~~~~~~~~~~~~~~~~~~~~
    -
    -Print the string *Hello World!*.
    -
    -::
    -
    -   /HelloWorld
    -   {
    -     (Hello World !) =
    -   } def
    -
    -Dictionaries
    -------------
    -
    -A dictionary is an associative array. It stores pairs of names and
    -objects, where the name acts as a key to access the object inside the
    -dictionary.
    -
    -The pairs are delimited by the characters ``<<`` and ``>>``. Note that
    -the pairs are evaluated during the construction of the dictionary. Thus,
    -literal names have to be used here. The individual name/value pairs have
    -no defined sequential order (unlike a real dictionary where the keys are
    -ordered alphabetically).
    -
    -Example 6
    -~~~~~~~~~
    -
    -Create a dictionary which stores named parameters.
    -
    -::
    -
    -   SLI ] /parameters << /alpha 1.0 /beta 3.5 /tau 10.0 >> def
    -   SLI ] parameters /tau get =
    -   10
    -
    -Example: Showing dictionaries
    -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    -
    -The command ``info`` can be used to examine the contents of a
    -dictionary.
    -
    -::
    -
    -   SLI ] parameters info
    -   --------------------------------------------------
    -   Name                     Type                Value
    -   --------------------------------------------------
    -   alpha                    doubletype          1
    -   beta                     doubletype          3.5
    -   tau                      doubletype          10
    -   --------------------------------------------------
    -   Total number of dictionary entries: 3
    -
    -Object types
    -------------
    -
    -There are a number of different object types in SLI. Each type is
    -represented by a literal name (i.e. a name with a prepended slash). Here
    -is a list of the most important types:
    -
    -\|—————–|——————-\| \| ``/integertype`` \| ``/doubletype`` \| \|
    -``/booltype`` \| ``/stringtype`` \| \| ``/nametype`` \| ``/literaltype``
    -\| \| ``/arraytype`` \| ``/proceduretype`` \| \| ``/modeltype`` \|
    -``/dictionarytype`` \| \| ``/ostreamtype`` \| ``/istreamtype`` \| \|
    -``/xistreamtype`` \| ``/trietype`` \|
    -
    -Getting type information
    -~~~~~~~~~~~~~~~~~~~~~~~~
    -
    -The command ``type`` returns the type-name of the top element of the
    -stack. Note that type removes the element.
    -
    -The command ``typeinfo`` returns the type of an object without popping
    -it off the stack.
    -
    -Conversion between types
    -~~~~~~~~~~~~~~~~~~~~~~~~
    -
    -It is possible to perform conversions between types. However, unlike in
    -C or C++ this type conversion is never done implicitly. Some of the
    -conversion operators are inherited from PostScript. Others are special
    -to SLI.
    -
    -Here, we list the most important conversion operators. Each conversion
    -operator gets one argument which can, in general, be of any type. If the
    -operator is meaningless for a given object, an argument type error is
    -raised.
    -
    -Command Description ``cvd`` Convert a number to a double. ``cvi``
    -Convert a number to an integer. ``cvs`` Tries to convert the object to a
    -string. ``cst`` Convert a string to an array. ``cvx`` Convert an object
    -to an executable object, e.g. string to a procedure, or a literal name
    -to a name. ``cvlit`` Convert an object to a literal object, e.g. a
    -procedure to an array or a string to a literal name.
    diff --git a/doc/htmldoc/developer_space/sli_docs/programming-in-sli.rst b/doc/htmldoc/developer_space/sli_docs/programming-in-sli.rst
    deleted file mode 100644
    index fbe9b6252f..0000000000
    --- a/doc/htmldoc/developer_space/sli_docs/programming-in-sli.rst
    +++ /dev/null
    @@ -1,312 +0,0 @@
    -:orphan:
    -
    -.. _programming_sli:
    -
    -Programming in SLI
    -==================
    -
    -Overview
    ---------
    -
    -A procedure is a sequence of SLI objects whose execution is delayed
    -until the procedure is executed. Because procedures are objects, they
    -can be:
    -
    --  placed on the stack
    --  bound to a name
    --  executed repeatedly
    --  executed by another procedure
    -
    -A program is a sequence of SLI objects and procedures which are defined
    -in a file. This section introduces the fundamentals of SLI programming.
    -
    -This chapter covers the basic programming concepts of the SLI language
    -features.
    -
    -Entering and executing programs
    --------------------------------
    -
    -A program is a sequence of SLI objects and procedures which are defined
    -in a file. Program files are ordinary ASCII text files, which can be
    -created and modified with an editor of your choice (e.g. GNU Emacs).
    -
    -SLI programs usually have the file ending "sli", for example
    -``hello_world.sli``.
    -
    -The ``run`` command is used to execute a program file.
    -
    -Example: "Hello World!"
    -~~~~~~~~~~~~~~~~~~~~~~~
    -
    -Write the program ``hello_world.sli`` according to the example, given
    -above.
    -
    -1. Create an empty file ``hello_world.sli`` in the directory from which
    -   the interpreter was started.
    -
    -2. Copy the *Hello World* example to the file and save it.
    -
    -3. Enter ``(hello_world.sli) run`` at the command prompt.
    -
    -   /HelloWorld { (Hello World !) = } def
    -
    -   SLI ] (hello_world.sli) run SLI ] HelloWorld Hello World !
    -
    -Note that the procedure is not immediately executed by ``run``. Rather,
    -all objects which are contained in the file are read and executed.
    -
    -Using local variables
    ----------------------
    -
    -Usually, all names you define are globally accessible. But, if you use a
    -lot of procedures that define their own variables, there is an
    -increasing danger that two procedures use the same name for different
    -purposes. This problem can be solved by keeping variable *local* to the
    -procedure that defines them.
    -
    -SLI uses dictionaries to store and resolve variables.
    -
    -Example 2
    -~~~~~~~~~
    -
    -Compute the alpha-function of *t* according to *a(t)=t*Exp(-t/tau)*
    -
    -::
    -
    -   /alpha
    -   {
    -     << /tau -1.0 >> % create dictionary for local variables
    -     begin           % open local name space
    -       /t exch def     % store argument in local variable t
    -       t tau div exp   % compute formula
    -       t mul
    -     end             % close local name space
    -   } def
    -
    -Conditionals
    -------------
    -
    -Conditional expressions allow a program to ask questions and make
    -decisions:
    -
    --  Comparisons and logical functions
    -
    --  Conditional structures which test a certain condition and use the
    -   result to make a decision.
    -
    -In general, conditional structures take a *boolean* object as well as
    -one or more procedure objects as argument and evaluate one of the
    -procedures, depending on the value of the boolean.
    -
    -Example 3
    -~~~~~~~~~
    -
    -The program in this example implements the faculty function according to
    -the definition:
    -
    -::
    -
    -   fac(1) := 1
    -   fac(n) := n*fac(n-1), for n>1
    -
    -The program expects the argument on the stack and replaces it by the
    -result. Here, we use the ``if`` command to test whether the argument is
    -greater than 1. The ``if`` command takes two arguments, a boolean and a
    -procedure object. The boolean is supplied by the ``gt`` command which
    -test if the object at stack level 1 is greater than the object at level
    -0.
    -
    -::
    -
    -   /fac
    -   {
    -     dup    % duplicate the argument, since we still need it.
    -     1 gt   % If n > 1 we call fac recursively
    -     {      % according to fac(n)=n*fac(n-1)
    -       dup
    -       1 sub fac % call fac with n-1 as argument
    -       mul       % multiply the result with the argument
    -     } if
    -   } def
    -
    -This example also shows how procedures can be called *recursively*. It
    -is, however, important to supply a *termination condition* for the
    -recursion like in this example.
    -
    -Comparison functions
    ---------------------
    -
    -Comparison functions are used to compare objects. The result of
    -comparison functions are of type ``/booltype`` and can be used for
    -logical functions and conditional structures.
    -
    -Command Description ``eq`` Test whether two objects are equal. ``ne``
    -Test whether two objects are not equal. ``gt`` Test whether the object
    -at level 1 is greater than the object at level 0. ``lt`` Test whether
    -the object at level 1 is less than the object at level 0. ``leq`` Test
    -whether the object at level 1 is less than or equal to the object at
    -level 0. ``geq`` Test whether the object at level 1 is greater than or
    -equal to the object at level 0.
    -
    -Logical functions
    ------------------
    -
    -Command Description ``not`` Negates a bool. ``and`` Returns true if both
    -arguments are true. ``or`` Returns true if at least one of the arguments
    -is true. ``xor`` Returns true if and only if one of the arguments is
    -true.  
    -
    -The *if-ifelse* structure
    --------------------------
    -
    -Command Description ``bool proc if`` Executes ``proc`` if the boolean is
    -true. ``bool proc_1 proc_2 ifelse`` Executes ``proc_1`` if the boolean
    -is true and ``proc_2`` otherwise.
    -
    -Example
    -~~~~~~~
    -
    -::
    -
    -   SLI ] 1 2 eq {(Equal!) = } { (Not equal !) =} ifelse
    -   Not equal !
    -   SLI ] 2 2 eq {(Equal!) = } { (Not equal !) =} ifelse
    -   Equal!
    -
    -The *case-switch* structure
    ----------------------------
    -
    -While the commands ``if`` and ``ifelse`` test only one condition, the
    -*case-switch* structure can be used to test a number of different
    -conditions.
    -
    -The *case-switch* structure has the general form:
    -
    -::
    -
    -   mark
    -    bool_1 proc_1 case
    -    bool_2 proc_2 case
    -           :
    -    bool_n proc_n case
    -   switch
    -
    -In this structure, ``proc_i`` is executed, if the corresponding value of
    -``bool_i`` is true.
    -
    -Sometimes it is necessary to provide a default procedure, which is
    -evaluated if none of the boolean is true.
    -
    -The *case-switchdefault* structure has the general form
    -
    -::
    -
    -   mark
    -    bool_1 proc_1 case
    -    bool_2 proc_2 case
    -           :
    -    bool_n proc_n case
    -    procdefault
    -   switchdefault
    -
    -Here, ``procdefault`` is executed if none of the booleans was true.
    -
    -Loops
    ------
    -
    -Loops and control structures are commands that take procedure objects as
    -arguments.
    -
    -Infinite loops
    -~~~~~~~~~~~~~~
    -
    -The simplest loop is performed by the command ``loop``:
    -
    -::
    -
    -   SLI ] {(Hello World) =} loop
    -   Hello World
    -   Hello World
    -   Hello World
    -   Hello World
    -   Hello World
    -   Hello World
    -   Hello World
    -   Hello World
    -      :
    -
    -``loop`` performs the procedure repeatedly and thus in the example, an
    -infinite succession of the words "Hello World" is printed. The only way
    -to leave a ``loop``-structure is to call the command ``exit`` somewhere
    -inside the loop:
    -
    -::
    -
    -   SLI ] 0
    -   SLI [1] { 1 add dup  (Hello World) = 10 eq {exit} if }
    -   SLI [2] loop
    -
    -it prints ten times "Hello World". First the initial value 0 is pushed
    -on the operand stack. The procedure adds 1 in each cycle and takes care
    -that one copy of the counter stays on the stack to serve as the initial
    -value for the next cycle. After the message has been printed, the stop
    -value 10 is pushed and is compared with the counter. If the counter is
    -equal to 10, the nested procedure s executed. This procedure then
    -executes the command ``exit``, and interrupts the loop.
    -
    -Command Description ``proc loop`` Repeatedly execute procedure ``proc``.
    -``exit`` Exit the innermost loop structure.
    -
    -Finite loops
    -~~~~~~~~~~~~
    -
    -The last example can be implemented much easier, using a ``repeat``
    -loop. ``repeat`` takes two arguments: An integer, and a procedure
    -object. The integer determines how often the procedure is executed.
    -Thus, in order to print ten times "Hello World" we write:
    -
    -::
    -
    -   SLI ] 10 { (Hello World) = } repeat
    -
    -Sometimes, one needs to know the counter of the loop and one may also be
    -interested in influencing the step-size of the iterations. For this
    -purpose SLI offers the ``for``-loop. ``for`` is called like this:
    -
    -::
    -
    -   start step stop proc for
    -
    -``for`` executes the procedure ``proc`` as long as the counter is
    -smaller than the stop-value (for positive step values) (please refer to
    -reference *RedBook* for the exact termination conditions).
    -
    -In each cycle, the current value of the counter is pushed automatically.
    -This value can be consumed by the procedure. Actually, in very long
    -running loops, the counter must be removed by the procedure in order to
    -avoid stack overflow. The following example prints the first ten cubic
    -numbers:
    -
    -::
    -
    -   SLI ] 1 1 10 { dup mul = } for
    -   1
    -   4
    -   9
    -   16
    -   25
    -   36
    -   49
    -   64
    -   81
    -   100
    -   SLI ]
    -
    -Command Description ``n proc repeat`` Execute procedure proc n times.
    -``i s e proc for`` Execute procedure proc for all values from i to e
    -with steps. ``array proc forall`` Execute procedure proc for all
    -elements of ``array``. ``array proc forallindexed`` Execute procedure
    -proc for all elements of ``array``. ``array proc Map`` Apply ``proc`` to
    -all elements of ``array``. ``array proc MapIndexed`` Apply ``proc`` to
    -all elements of ``array``. ``x proc n NestList`` Gives a list of the
    -results of applying ``proc`` to\ ``x`` 0 through ``n`` times.
    diff --git a/doc/htmldoc/developer_space/sli_docs/using-files-and-keyboard-input.rst b/doc/htmldoc/developer_space/sli_docs/using-files-and-keyboard-input.rst
    deleted file mode 100644
    index 77f98a81b1..0000000000
    --- a/doc/htmldoc/developer_space/sli_docs/using-files-and-keyboard-input.rst
    +++ /dev/null
    @@ -1,119 +0,0 @@
    -:orphan:
    -
    -.. _files_keyboard_sli:
    -
    -Using files and keyboard input
    -==============================
    -
    -Overview
    ---------
    -
    -SLI's input/output fascilities differ from those of PostScript and are
    -close to the stream concept of C++. However, for compatibility some
    -PostScript output commands are implemented.
    -
    -Like in C++, files are represented as *streams*, which can be put on the
    -stack. All i/o commands leave their stream argument on the stack, so
    -that operations can be chained.
    -
    -Example
    -~~~~~~~
    -
    -Print *Hello World* to the standard output.
    -
    -::
    -
    -   SLI ] cout (Hello World) <- endl
    -   Hello World
    -   SLI [1] ;
    -   SLI ]
    -
    -``cout`` is the standard output of SLI. The command ``<-`` takes the
    -role of C++'s ``<<`` output operator and prints the ASCII representation
    -of the object at stack level 0 to the stream at level 1. After this, the
    -object is removed and the stream remains at level 0.
    -
    -The command ``endl`` corresponds to the C++ manipulator of the same
    -name. It prints an end of line character to the stream at level 0.
    -Again, it leaves the stream argument on the stack.
    -
    -Now, the abbreviated form of ``pop``, i.e. the command ``;``, is used to
    -remove the stream object from the stack.
    -
    -Standard streams
    -----------------
    -
    -The standard streams of a UNIX program are mapped to the following
    -names. Note that these streams should not be closed by a SLI program,
    -since the result is undefined.
    -
    -Name Description ``cin`` Standart input stream. ``cout`` Standart output
    -stream. ``cerr`` Standart error output stream.
    -
    -Opening and closing a stream
    -----------------------------
    -
    -Streams are objects which handle the input and output of data to or from
    -some external target. The target of a stream can be a file, a string, a
    -devide, or another process.
    -
    -Command Description ``(name) (r) file`` Open file for reading.
    -``(name) ifstream`` Open file for reading. ``(name) (w) file`` Open file
    -for writing. ``(name) ofstream`` Open file for writing.
    -``(string) istrstream`` Open string-stream for reading.
    -``(string) ostrstream`` Open string-stream for writing. ``strstream``
    -Extract a string from a string-stream. ``stream close`` Close the
    -stream.
    -
    -Writing to streams
    -------------------
    -
    -Command Description ``stream obj <-`` Print ASCII representation of
    -``obj`` to ``stream``. ``stream obj <--`` Print detailed ASCII
    -representation of ``obj`` to ``stream``. ``stream obj =`` Print ASCII
    -representation of ``obj`` to ``cout``. ``stream obj ==`` Print detailed
    -ASCII representation of ``obj`` to ``cout``.
    -
    -.. _example-1:
    -
    -Example
    -~~~~~~~
    -
    -Print *Hello World* to a text file.
    -
    -::
    -
    -   SLI ] (test.txt) (w) file
    -   SLI [1] (Hello World!) <-
    -   SLI [1] endl
    -   SLI [1] ;
    -
    -Manipulators
    -------------
    -
    -Manipulators are used to manipulate the state of a stream object. Such
    -changes can, for instance, affect the precision with which numbers are
    -printed.
    -
    -Manipulators take one or more arguments. In general, the manipulator
    -leaves the stream object at the top of the stack and removes all other
    -arguments.
    -
    -Manipulator Description ``ofstream flush`` Write contents of buffer to
    -file. ``ofstream endl`` Line terminator. ``osstream ends`` char[] string
    -terminator. ``ifstream ws`` Eat white-spaces. ``ofstream boolalpha``
    -Prints bool as true/false. ``ofstream noboolalpha`` Opposite.
    -``fstream n setw`` Set width of input/output fields to ``n``.
    -``stream (c) setfill`` Defines a fill symbol ``c`` for the field.
    -``ostream left`` Allign to left of the field. ``ostream right`` Allign
    -to right of the field. ``ostream internal`` Sign left and number right.
    -``ostream showpos`` Print positive sign. ``ostream noshowpos`` Opposite.
    -``stream uppercase`` ``ostream nouppercase`` ``ostream oct`` Switch to
    -octal notation. ``ostream dec`` Switch to decimal notation.
    -``ostream hex`` Switch to hexadecimal notation. ``ostream showbase``
    -Show base according to use of oct/dec/hex. ``ostream noshowbase`` Don't
    -show base according to use of oct/dec/hex. ``ostream showpoint`` Decimal
    -point is always printed. ``ostream noshowpoint`` Decimal point is never
    -printed. ``ostream n setprecision`` Set number of decimal places to
    -``n``. ``ostream fixed`` Use fixed point notation.
    -``ostream scientific`` Use scientific notation.
    diff --git a/doc/htmldoc/installation/configuration.rst b/doc/htmldoc/installation/configuration.rst
    deleted file mode 100644
    index 31f8e8c241..0000000000
    --- a/doc/htmldoc/installation/configuration.rst
    +++ /dev/null
    @@ -1,78 +0,0 @@
    -.. _config_options:
    -
    -Configuration Options
    -=====================
    -
    -The behavior of the NEST executable can be tweaked by supplying it
    -with command line switches, SLI scripts, and additional parameters for
    -the scripts.
    -
    -Command line switches for the nest executable
    ----------------------------------------------
    -
    -Type
    -
    -::
    -
    -   nest --help
    -
    -to find out about NEST's command-line parameters.
    -
    -::
    -
    -  usage: nest [options] [ - | file [file ...] ]
    -    file1 file2 ... filen     read SLI code from file1 to filen in ascending order
    -                              Quits with exit code 126 on error.
    -    -   --batch               read SLI code from stdin/pipe.
    -                              Quits with exit code 126 on error.
    -    -c cmd                    Execute cmd and exit
    -    -h  --help                print usage and exit
    -    -v  --version             print version information and exit
    -        --userargs=arg1:...   put user defined arguments in statusdict::userargs
    -    -d  --debug               start in debug mode (implies --verbosity=ALL)
    -        --verbosity=ALL       turn on all messages.
    -        --verbosity=DEBUG|STATUS|INFO|WARNING|ERROR|FATAL
    -                              show messages of this priority and above.
    -        --verbosity=QUIET     turn off all messages.
    -
    -SLI scripts
    ------------
    -
    -Scripts can be run by typing:
    -
    -::
    -
    -   <nest_install_dir>/nest <file>
    -
    -Supplying SLI scripts with parameters
    -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    -
    -Using the ``--userargs=arg1:...`` command line switch, it is possible to
    -supply a SLI script with parameters from the outside of NEST. A common
    -use case for this are parameter sweeps, where the parameters are defined
    -in a bash script and multiple instances of NEST are used to test one
    -parameter each. A bash script for this could look like this:
    -
    -::
    -
    -   for lambda in `seq 1 20`; do
    -     for gamma in `seq 1 5`; do
    -       nest --userargs=lambda=$lambda:$gamma=$gamma simulation.sli
    -     done
    -   done
    -
    -The corresponding SLI script ``simulation.sli`` could use the supplied
    -parameters like this:
    -
    -::
    -
    -   /args mark statusdict/userargs :: {(=) breakup} Map { arrayload pop int exch cvlit exch } forall >> def
    -   args /lambda get ==
    -
    -The first line first gets the array of user supplied arguments
    -(``userargs``) from the ``statusdict`` and breaks each element at the
    -"="-symbol. It then converts the first element (lambda, gamma) to a
    -literal and the second argument (the number) to an integer. Using
    -``mark`` and ``>>``, the content of the userargs array is added to a
    -dictionary, which is stored under the name ``args``. The second line
    -just prints the content of the lambda variable.
    
    From bdb469da60d164f02fae12143eb9a4bc0d9d395e Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Wed, 8 Feb 2023 16:33:39 +0100
    Subject: [PATCH 120/375] Remove call to sli_func
    
    ---
     doc/htmldoc/connect_nest/using_nest_with_music.rst | 12 ++++--------
     1 file changed, 4 insertions(+), 8 deletions(-)
    
    diff --git a/doc/htmldoc/connect_nest/using_nest_with_music.rst b/doc/htmldoc/connect_nest/using_nest_with_music.rst
    index 99d7dcf5ed..0f7685918c 100644
    --- a/doc/htmldoc/connect_nest/using_nest_with_music.rst
    +++ b/doc/htmldoc/connect_nest/using_nest_with_music.rst
    @@ -71,11 +71,9 @@ continuing.
     
        import nest
     
    -   if not nest.ll_api.sli_func("statusdict/have_music ::"):
    -       import sys
    -
    +   if not nest.build_info["have_music"]:
            print("NEST was not compiled with support for MUSIC, not running.")
    -       sys.exit()
    +       exit()
     
        nest.set_verbosity(nest.verbosity.M_ERROR)
     
    @@ -125,11 +123,9 @@ script, but without the spike generator.
     
       import nest
     
    -  if not nest.ll_api.sli_func("statusdict/have_music ::"):
    -      import sys
    -
    +  if not nest.build_info["have_music"]:
           print("NEST was not compiled with support for MUSIC, not running.")
    -      sys.exit()
    +      exit()
     
       nest.set_verbosity(nest.verbosity.M_ERROR)
     
    
    From e7f5df31f9e21424398f8eb6cd665ebd49d6d3fa Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Wed, 8 Feb 2023 16:37:14 +0100
    Subject: [PATCH 121/375] Remove SLI documentation header
    
    ---
     doc/doc_header.txt | 71 ----------------------------------------------
     1 file changed, 71 deletions(-)
     delete mode 100644 doc/doc_header.txt
    
    diff --git a/doc/doc_header.txt b/doc/doc_header.txt
    deleted file mode 100644
    index 3efd9c74b3..0000000000
    --- a/doc/doc_header.txt
    +++ /dev/null
    @@ -1,71 +0,0 @@
    -/*
    -%%==========================================
    -%% SLI documentation header.
    -%%
    -%% For an annotated version of this header,
    -%% see file synod2/doc/quickref.html
    -%%
    -%% If you want to add, remove, or modify
    -%% any of the documentation keywords,
    -%% change the code of the "HTML" command
    -%% in file lib/sli/helpinit.sli
    -%%
    -%% IF YOU ADD, REMOVE, OR MODIFY ANY OF
    -%% THE DOCUMENTATION KEYWORDS, YOU MUST
    -%% ALSO UPDATE FILES
    -%% doc/doc_header.txt AND doc/quickref.html!
    -%%
    -%% 26.08.2005 Jochen Eppler
    -%%==========================================
    -*/
    -
    -
    -/** @BeginDocumentation
    -Name: [namespace::]Command - Short description.
    -
    -Synopsis: arg1 ... argn Command -> res1 ... resn
    -
    -Description:
    -(start here.)
    -
    -Parameters:
    -(start here.)
    -
    -Options:
    -(start here.)
    -
    -Examples:
    -(start here.)
    -
    -Variants:
    -(start here.)
    -
    -Bugs:
    -(start here.)
    -
    -Diagnostics:
    -(start here.)
    -
    -Author: (start here.)
    -
    -FirstVersion: (start here.)
    -
    -Remarks:
    -(start here.)
    -
    -Availability: (start here.)
    -
    -References:
    -(start here.)
    -
    -Sends: (start here.)
    -
    -Receives: (start here.)
    -
    -Transmits: (start here.)
    -
    -SeeAlso: (start here, all on one line!!)
    -*/
    -/*
    -%% NOTE: There must be a carriage return after the last line in each file, i.e., here:
    -*/
    
    From 9ca58a44920716ba6c604d755bd54dfa721b04f6 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Wed, 8 Feb 2023 16:54:06 +0100
    Subject: [PATCH 122/375] Remove references to SLI from documentation
    
    ---
     .../workflows/development_workflow.rst        |  3 +--
     .../workflows/nest_with_ides.rst              | 23 ------------------
     doc/htmldoc/installation/developer.rst        |  2 --
     .../spatially_structured_networks.rst         | 24 +++++++------------
     ...t_1_neurons_and_simple_neural_networks.rst | 13 +++++-----
     5 files changed, 16 insertions(+), 49 deletions(-)
    
    diff --git a/doc/htmldoc/developer_space/workflows/development_workflow.rst b/doc/htmldoc/developer_space/workflows/development_workflow.rst
    index cdee160f6c..c194296874 100644
    --- a/doc/htmldoc/developer_space/workflows/development_workflow.rst
    +++ b/doc/htmldoc/developer_space/workflows/development_workflow.rst
    @@ -242,8 +242,7 @@ Editing workflow - commands explained
     
     1. Make some changes. When you feel that you've made a complete, working set of
        related changes, move on to the next steps.
    -2. Please ensure that you have followed the coding guidelines for
    -   C++ and SLI coding guidelines.
    +2. Please ensure that you have followed the coding guidelines for C++ PyNEST.
     3. Test your changes by building the source code and running the tests.
        (Usually ``cmake``, ``make``, ``make install``, ``make installcheck``. Please see the
        :ref:`installation section <install_nest>` for details.)
    diff --git a/doc/htmldoc/developer_space/workflows/nest_with_ides.rst b/doc/htmldoc/developer_space/workflows/nest_with_ides.rst
    index 2f9fe0a91c..28cedaca0d 100644
    --- a/doc/htmldoc/developer_space/workflows/nest_with_ides.rst
    +++ b/doc/htmldoc/developer_space/workflows/nest_with_ides.rst
    @@ -123,9 +123,6 @@ Requirements and limitations
     * Assumes a suitable compiler (GCC/Clang/etc.) is installed.
     * Assumes CMake version 3.15 or newer is installed.
     * C++ debugging assumes GDB is installed if on Linux, and Xcode and LLDB is installed if on macOS.
    -* Debugging C++ from VS Code is only possible with a SLI script. It is probably possible to launch
    -  the Python debugger, then attach a C++ debugging instance to that process, but that is left
    -  as an exercise for the reader.
     * Tested with VS Code 1.53.2.
     
     Preparations
    @@ -227,25 +224,6 @@ documentation on Python debugging in VS Code, see the
        the hotkey ``F5``).
     #. A panel with output will open, and the program will run until it finishes, or encounters an error or a breakpoint.
     
    -Running a SLI script with a debugger
    -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    -
    -The steps below give a rough guide to how you can run NEST with GDB in VS Code. For more detailed
    -documentation on C++ debugging in VS Code, see the
    -`VS Code C++ debugging documentation <https://code.visualstudio.com/docs/cpp/cpp-debug>`_.
    -
    -#. In the Side Bar, open the **Run** pane, or press ``Ctrl+Shift+D``.
    -#. Add a debug config by either
    -
    -   * selecting **Add configuration...** from the dropdown menu, or
    -   * clicking the ``Create a launch.json file`` link, if the ``launch.json`` doesn't exist
    -#. Choose the template for ``C/C++ (gdb) launch`` (or ``C/C++ (lldb) launch`` if on macOS) and
    -
    -   * change the entry for ``program`` to ``"${workspaceFolder}/../build/install/bin/nest"``
    -   * add ``"${file}"`` to the ``args`` list
    -#. Open your SLI script and start debugging by selecting the debug configuration from the dropdown in the Run pane.
    -#. A panel with output will open, and the program will run until it finishes, or encounters an error or a breakpoint.
    -
     Xcode Workflow
     --------------
     
    @@ -375,7 +353,6 @@ Also add the generated files:
       .. code-block::
     
         <somebase>/NEST/build/libnestutil/config.h
    -    <somebase>/NEST/build/libnestutil/sliconfig.h
         <somebase>/NEST/build/nest/static_modules.h
     
     1. On the left panel select the newly created project ``NEST-fork``, then select the created target.
    diff --git a/doc/htmldoc/installation/developer.rst b/doc/htmldoc/installation/developer.rst
    index 23f3635cf4..93df3aa5b9 100644
    --- a/doc/htmldoc/installation/developer.rst
    +++ b/doc/htmldoc/installation/developer.rst
    @@ -47,8 +47,6 @@ By default, everything will be installed to the subdirectories ``<nest_install_d
     
     - Executables ``<nest_install_dir>/bin``
     - Dynamic libraries ``<nest_install_dir>/lib/``
    -- SLI libraries ``<nest_install_dir>/share/nest/sli``
    -- SLI documentation ``<nest_install_dir>/share/doc/nest``
     - Examples ``<nest_install_dir>/share/doc/nest/examples``
     - PyNEST ``<nest_install_dir>/lib/pythonX.Y/site-packages/nest``
     - PyNEST examples ``<nest_install_dir>/share/doc/nest/examples/pynest``
    diff --git a/doc/htmldoc/networks/spatially_structured_networks.rst b/doc/htmldoc/networks/spatially_structured_networks.rst
    index 8e00838833..7bcddaef06 100644
    --- a/doc/htmldoc/networks/spatially_structured_networks.rst
    +++ b/doc/htmldoc/networks/spatially_structured_networks.rst
    @@ -3,21 +3,15 @@
     Spatially-structured networks
     =============================
     
    -NEST provides  a convenient interface for creating neurons placed in
    -space and connecting those neurons with probabilities and
    -properties depending on the relative placement of neurons. This permits
    -the creation of complex networks with spatial structure.
    -
    -This user manual provides an introduction to the functionalities provided for
    -defining spatial networks in NEST. It is based exclusively on the PyNEST, the
    -Python interface to NEST. NEST users using the SLI
    -interface should be able to map instructions to corresponding SLI code.
    -This manual is not meant as a comprehensive reference manual. Please
    -consult the online documentation in PyNEST for details; where
    -appropriate, that documentation also points to relevant SLI
    -documentation.
    -
    -This manual describes the spatial functionalities included with NEST 3.0.
    +NEST provides a convenient interface for creating neurons placed in
    +space and connecting those neurons with probabilities and properties
    +depending on the relative placement of neurons. This permits the
    +creation of complex networks with spatial structure.
    +
    +This user manual provides an introduction to the functionalities for
    +defining spatial networks in NEST. This manual is not meant as a
    +comprehensive reference manual. Please consult the online
    +documentation in PyNEST for details.
     
     In the next sections of this manual, we introduce the commands and
     concepts required to work with spatially distributed nodes. In
    diff --git a/doc/htmldoc/tutorials/pynest_tutorial/part_1_neurons_and_simple_neural_networks.rst b/doc/htmldoc/tutorials/pynest_tutorial/part_1_neurons_and_simple_neural_networks.rst
    index aa1be5cc8f..d27d834944 100644
    --- a/doc/htmldoc/tutorials/pynest_tutorial/part_1_neurons_and_simple_neural_networks.rst
    +++ b/doc/htmldoc/tutorials/pynest_tutorial/part_1_neurons_and_simple_neural_networks.rst
    @@ -41,13 +41,12 @@ PyNEST - an interface to the NEST Simulator
        :width: 600px
     
        Python Interface Figure.
    -   The Python interpreter imports NEST as a module and
    -   dynamically loads the NEST Simulator kernel (``pynestkernel.so``).
    -   A simulation script of
    -   the user (``mysimulation.py``) uses functions defined in this high-level
    -   API. These functions generate code in SLI (Simulation Language
    -   Interpreter), the native language of the interpreter of NEST. This
    -   interpreter, in turn, controls the NEST simulation kernel.
    +   
    +   The Python interpreter imports NEST as a module and dynamically
    +   loads the NEST simulation kernel (``nestkernel_api.so``). A
    +   simulation script of the user (``mysimulation.py``) uses functions
    +   defined in this high-level API, which control the simulation
    +   kernel.
     
     The NEural Simulation Tool (NEST: www.nest-initiative.org) [1]_
     is designed for the simulation of large heterogeneous networks of point
    
    From b2905191509db718412601da1a6332e125610c4e Mon Sep 17 00:00:00 2001
    From: janeirik <>
    Date: Mon, 27 Feb 2023 15:37:36 +0100
    Subject: [PATCH 123/375] work in progress
    
    ---
     nestkernel/CMakeLists.txt         |  2 +-
     nestkernel/connection_manager.cpp |  2 +-
     nestkernel/connection_manager.h   |  2 +-
     nestkernel/sonata_connector.cpp   | 60 +++++++++++++++++--------------
     nestkernel/sonata_connector.h     | 19 +++++-----
     pynest/nest/lib/hl_api_sonata.py  | 11 +++---
     6 files changed, 54 insertions(+), 42 deletions(-)
    
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index 8e08014a68..ff77e3b0e7 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -196,7 +196,7 @@ set_target_properties( nestkernel
         SOVERSION 3
         )
     target_link_libraries( nestkernel
    -    nestutil sli_lib
    +    nestutil
         ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES} ${HDF5_LIBRARIES}
         )
     
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 1721d793fb..1fd63746e3 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -743,7 +743,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
     }
     
     void
    -nest::ConnectionManager::connect_sonata( const DictionaryDatum& graph_specs, const long chunk_size )
    +nest::ConnectionManager::connect_sonata( const dictionary& graph_specs, const long chunk_size )
     {
     #ifdef HAVE_HDF5
       SonataConnector sonata_connector( graph_specs, chunk_size );
    diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h
    index bff392490b..160b8d37d6 100644
    --- a/nestkernel/connection_manager.h
    +++ b/nestkernel/connection_manager.h
    @@ -154,7 +154,7 @@ class ConnectionManager : public ManagerInterface
         size_t n,
         std::string syn_model );
     
    -  void connect_sonata( const DictionaryDatum& graph_specs, const long chunk_size );
    +  void connect_sonata( const dictionary& graph_specs, const long chunk_size );
     
       index find_connection( const thread tid, const synindex syn_id, const index snode_id, const index tnode_id );
     
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index fee7d14639..3429ad5706 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -27,14 +27,14 @@
     
     // C++ includes:
     #include <cstdlib> // for div()
    +                  
    +// Includes from libnestutil
    +#include "dict_util.h"
     
     // Includes from nestkernel:
     #include "kernel_manager.h"
     #include "vp_manager_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     #include "H5Cpp.h"
     
     extern "C" herr_t get_member_names_callback_( hid_t loc_id, const char* name, const H5L_info_t* linfo, void* opdata );
    @@ -42,7 +42,7 @@ extern "C" herr_t get_member_names_callback_( hid_t loc_id, const char* name, co
     namespace nest
     {
     
    -SonataConnector::SonataConnector( const DictionaryDatum& graph_specs, const long chunk_size )
    +SonataConnector::SonataConnector( const dictionary& graph_specs, const long chunk_size )
       : graph_specs_( graph_specs )
       , chunk_size_( chunk_size )
       , weight_dataset_exist_( false )
    @@ -91,19 +91,18 @@ SonataConnector::connect()
       */
       // clang-format on
     
    -  auto edges_container = getValue< ArrayDatum >( graph_specs_->lookup( "edges" ) );
    +  auto edges_container = graph_specs_[ "edges" ]; 
     
       // Iterate edge files
    -  for ( auto edge_dict_datum : edges_container )
    +  for ( auto edge_dict : edges_container )
       {
     
    -    const auto edge_dict = getValue< DictionaryDatum >( edge_dict_datum );
    -    cur_fname_ = getValue< std::string >( edge_dict->lookup( "edges_file" ) );
    +    cur_fname_ = edge_dict[ "edges_file" ];
         const auto file = open_file_( cur_fname_ );
         const auto edges_top_level_grp = open_group_( file, "edges" );
     
         // Create map of edge type ids to NEST synapse_model ids
    -    cur_edge_params_ = getValue< DictionaryDatum >( edge_dict->lookup( "syn_specs" ) );
    +    cur_edge_params_ = edge_dict[ "syn_specs" ];
         create_edge_type_id_2_syn_spec_( cur_edge_params_ );
     
         // Get names of population groups (usually just one population group)
    @@ -381,9 +380,9 @@ SonataConnector::connect_chunk_( const hsize_t chunk_size, const hsize_t offset
       std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() );
     
       // Retrieve the correct NodeCollections
    -  const auto nest_nodes = getValue< DictionaryDatum >( graph_specs_->lookup( "nodes" ) );
    -  const auto src_nc = getValue< NodeCollectionPTR >( nest_nodes->lookup( source_attribute_value_ ) );
    -  const auto tgt_nc = getValue< NodeCollectionPTR >( nest_nodes->lookup( target_attribute_value_ ) );
    +  const auto nest_nodes = graph_specs_[ "nodes" ];
    +  const auto src_nc = nest_nodes[ source_attribute_value_ ];
    +  const auto tgt_nc = nest_nodes[ target_attribute_value_ ];
       const auto snode_begin = src_nc->begin();
       const auto tnode_begin = tgt_nc->begin();
     
    @@ -413,7 +412,7 @@ SonataConnector::connect_chunk_( const hsize_t chunk_size, const hsize_t offset
             const thread target_thread = target->get_thread();
     
             const auto edge_type_id = edge_type_id_data_subset[ i ];
    -        const auto syn_spec = getValue< DictionaryDatum >( cur_edge_params_->lookup( std::to_string( edge_type_id ) ) );
    +        const auto syn_spec = cur_edge_params_[ std::to_string( edge_type_id ) ];
             const double weight =
               get_syn_property_( syn_spec, i, weight_dataset_exist_, syn_weight_data_subset, names::weight );
             const double delay = get_syn_property_( syn_spec, i, delay_dataset_exist_, delay_data_subset, names::delay );
    @@ -515,13 +514,13 @@ SonataConnector::read_subset_( const H5::DataSet& dataset,
     }
     
     void
    -SonataConnector::create_edge_type_id_2_syn_spec_( DictionaryDatum edge_params )
    +SonataConnector::create_edge_type_id_2_syn_spec_( dictionary edge_params )
     {
       for ( auto it = edge_params->begin(); it != edge_params->end(); ++it )
       {
         const auto type_id = std::stoi( it->first.toString() );
    -    auto d = getValue< DictionaryDatum >( it->second );
    -    const auto syn_name = getValue< std::string >( ( *d )[ "synapse_model" ] );
    +    auto d =  it->second;
    +    const auto syn_name = ( *d )[ "synapse_model" ];
     
         // The following call will throw "UnknownSynapseType" if syn_name is not naming a known model
         const index synapse_model_id = kernel().model_manager.get_synapse_model_id( syn_name );
    @@ -532,16 +531,16 @@ SonataConnector::create_edge_type_id_2_syn_spec_( DictionaryDatum edge_params )
     }
     
     void
    -SonataConnector::set_synapse_params_( DictionaryDatum syn_dict, index synapse_model_id, int type_id )
    +SonataConnector::set_synapse_params_( dictionary syn_dict, index synapse_model_id, int type_id )
     {
    -  DictionaryDatum syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
    +  auto syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
       std::set< Name > skip_syn_params_ = {
         names::weight, names::delay, names::min_delay, names::max_delay, names::num_connections, names::synapse_model
       };
     
       ConnParameterMap synapse_params;
     
    -  for ( Dictionary::const_iterator default_it = syn_defaults->begin(); default_it != syn_defaults->end(); ++default_it )
    +  for ( auto default_it = syn_defaults->begin(); default_it != syn_defaults->end(); ++default_it )
       {
         const Name param_name = default_it->first;
         if ( skip_syn_params_.find( param_name ) != skip_syn_params_.end() )
    @@ -558,7 +557,8 @@ SonataConnector::set_synapse_params_( DictionaryDatum syn_dict, index synapse_mo
       }
     
       // Now create dictionary with dummy values that we will use to pass settings to the synapses created. We
    -  // create it here once to avoid re-creating the object over and over again.
    +  // create it here once to avoid re-creating the object over and over again. 
    +  // TODO: See if nullptr can be changed to dictionary
       edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads(), nullptr );
       edge_type_id_2_syn_spec_[ type_id ] = synapse_params;
     
    @@ -569,17 +569,17 @@ SonataConnector::set_synapse_params_( DictionaryDatum syn_dict, index synapse_mo
       // Note that this also applies to the equivalent loop in conn_builder.cpp
       for ( thread tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
       {
    -    edge_type_id_2_param_dicts_[ type_id ][ tid ] = new Dictionary;
    +    edge_type_id_2_param_dicts_[ type_id ][ tid ].emplace_back();
     
         for ( auto param : synapse_params )
         {
           if ( param.second->provides_long() )
           {
    -        ( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = Token( new IntegerDatum( 0 ) );
    +        ( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = 0;
           }
           else
           {
    -        ( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = Token( new DoubleDatum( 0.0 ) );
    +       ( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = 0.0;
           }
         }
       }
    @@ -594,24 +594,30 @@ SonataConnector::get_synapse_params_( index snode_id, Node& target, thread targe
         const auto param = syn_param.second;
     
         if ( param->provides_long() )
    -    {
    +    { 
    +      auto dd =  ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ]; 
           // change value of dictionary entry without allocating new datum
    +      /*
           IntegerDatum* dd = static_cast< IntegerDatum* >(
             ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
    -      ( *dd ) = param->value_int( target_thread, rng, snode_id, &target );
    +      */
    +      ( *dd ) = param->value_int( target_thread, rng, snode_id, &target ); 
         }
         else
         {
           // change value of dictionary entry without allocating new datum
    +      auto dd =  ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ]; 
    +      /*
           DoubleDatum* dd = static_cast< DoubleDatum* >(
             ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
    +      */
           ( *dd ) = param->value_double( target_thread, rng, snode_id, &target );
         }
       }
     }
     
     double
    -SonataConnector::get_syn_property_( const DictionaryDatum& syn_spec,
    +SonataConnector::get_syn_property_( const dictionary& syn_spec,
       hsize_t index,
       const bool dataset_exists,
       std::vector< double >& data,
    @@ -633,6 +639,7 @@ void
     SonataConnector::reset_params_()
     {
       edge_type_id_2_syn_model_.clear();
    +  /*
       for ( auto syn_params_vec_map : edge_type_id_2_syn_spec_ )
       {
         for ( auto syn_params : syn_params_vec_map.second )
    @@ -640,6 +647,7 @@ SonataConnector::reset_params_()
           syn_params.second->reset();
         }
       }
    +  */
       edge_type_id_2_syn_spec_.clear();
       edge_type_id_2_param_dicts_.clear();
     }
    diff --git a/nestkernel/sonata_connector.h b/nestkernel/sonata_connector.h
    index 09bc9055ee..06ac7e5cbc 100644
    --- a/nestkernel/sonata_connector.h
    +++ b/nestkernel/sonata_connector.h
    @@ -31,10 +31,13 @@
     #include <map>
     #include <vector>
     
    +// Includes from libnestutil
    +#include "dict_util.h"
    +
     // Includes from nestkernel:
     #include "conn_parameter.h"
     #include "kernel_manager.h"
    -#include "nest_datums.h"
    +//#include "nest_datums.h"
     
     #include "H5Cpp.h"
     
    @@ -77,7 +80,7 @@ class SonataConnector
        * The `chunk_size` applies to all HDF5 datasets that need to be read in
        * each read operation to extract connectivity data.
        */
    -  SonataConnector( const DictionaryDatum& graph_specs, const long chunk_size );
    +  SonataConnector( const dictionary& graph_specs, const long chunk_size );
     
       ~SonataConnector();
     
    @@ -154,7 +157,7 @@ class SonataConnector
        *
        * @param edge_dict Dictionary containing edge type ids and synapse parameters.
        */
    -  void create_edge_type_id_2_syn_spec_( DictionaryDatum edge_dict );
    +  void create_edge_type_id_2_syn_spec_( dictionary edge_dict );
     
     
       /**
    @@ -166,7 +169,7 @@ class SonataConnector
        * @param synapse_model_id Model id of synapse
        * @param type_id SONATA edge type id for mapping synapse parameters.
        */
    -  void set_synapse_params_( DictionaryDatum syn_dict, index synapse_model_id, int type_id );
    +  void set_synapse_params_( dictionary syn_dict, index synapse_model_id, int type_id );
     
       /**
        * @brief Get synapse parameters.
    @@ -194,7 +197,7 @@ class SonataConnector
        * @param name name of the synaptic property
        * @return double
        */
    -  double get_syn_property_( const DictionaryDatum& syn_spec,
    +  double get_syn_property_( const dictionary& syn_spec,
         hsize_t index,
         const bool dataset_exists,
         std::vector< double >& data,
    @@ -264,7 +267,7 @@ class SonataConnector
       typedef std::map< Name, std::shared_ptr< ConnParameter > > ConnParameterMap;
     
       //! Dictionary containing SONATA graph specifications
    -  DictionaryDatum graph_specs_;
    +  dictionary graph_specs_;
     
       //! Size of chunk that is read into memory in one read operation. Applies to all relevant HDF5 datasets.
       hsize_t chunk_size_;
    @@ -282,7 +285,7 @@ class SonataConnector
       std::string target_attribute_value_;
     
       //! Current edge parameters
    -  DictionaryDatum cur_edge_params_;
    +  dictionary cur_edge_params_;
     
       //! Map from edge type id (SONATA specification) to synapse model
       std::map< int, index > edge_type_id_2_syn_model_;
    @@ -291,7 +294,7 @@ class SonataConnector
       std::map< int, ConnParameterMap > edge_type_id_2_syn_spec_;
     
       //! Map from edge type id (SONATA specification) to param dictionaries (one per thread) used when creating connections
    -  std::map< int, std::vector< DictionaryDatum > > edge_type_id_2_param_dicts_;
    +  std::map< int, std::vector< dictionary > > edge_type_id_2_param_dicts_;
     
       //! Datasets
       std::string cur_fname_;
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index 369d0ead98..4c8ed72b49 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -27,7 +27,7 @@
     from pathlib import Path, PurePath
     
     from .. import pynestkernel as kernel
    -from ..ll_api import sps, sr, sli_func
    +#from ..ll_api import sps, sr, sli_func
     from .hl_api_models import GetDefaults
     from .hl_api_nodes import Create
     from .hl_api_simulation import SetKernelStatus, Simulate
    @@ -39,7 +39,8 @@
     except ImportError:
         have_h5py = False
     
    -have_hdf5 = sli_func("statusdict/have_hdf5 ::")
    +#have_hdf5 = sli_func("statusdict/have_hdf5 ::")
    +have_hdf5 = True
     
     __all__ = [
         "SonataNetwork"
    @@ -448,9 +449,9 @@ def Connect(self, chunk_size=None):
                 except BlockingIOError as err:
                     raise BlockingIOError(f"{err.strerror} for {os.path.realpath(d['edges_file'])}") from None
     
    -        sps(graph_specs)
    -        sps(chunk_size)
    -        sr("ConnectSonata")
    +#        sps(graph_specs)
    +#        sps(chunk_size)
    +#        sr("ConnectSonata")
     
             self._is_network_built = True
     
    
    From 8c872327f7a11ad14ac031dc40e63c4e1157af59 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 2 Mar 2023 16:54:08 +0100
    Subject: [PATCH 124/375] Fix macOS linking issues
    
    ---
     libnestutil/CMakeLists.txt |  38 ++--
     models/CMakeLists.txt      |  40 ++--
     nestkernel/CMakeLists.txt  | 374 +++++++++++++++++++------------------
     3 files changed, 240 insertions(+), 212 deletions(-)
    
    diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt
    index 4e411d29cc..3536a912b0 100644
    --- a/libnestutil/CMakeLists.txt
    +++ b/libnestutil/CMakeLists.txt
    @@ -17,7 +17,7 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -set( nestutil_sources
    +set(nestutil_sources
         allocator.h allocator.cpp
         beta_normalization_factor.h
         block_vector.h
    @@ -36,33 +36,41 @@ set( nestutil_sources
         stopwatch.h stopwatch.cpp
         string_utils.h
         vector_util.h
    -    )
    +)
     
    -add_library( nestutil ${nestutil_sources} )
    +add_library(nestutil ${nestutil_sources})
     
    -set_target_properties( nestutil
    -    PROPERTIES
    -    VERSION ${NEST_VERSION}
    -    SOVERSION 3
    +if(APPLE)
    +    set_target_properties(nestutil
    +        PROPERTIES
    +        VERSION ${NEST_VERSION}
    +        SOVERSION 3
    +        LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup"
         )
    +else()
    +    set_target_properties(nestutil
    +        PROPERTIES
    +        VERSION ${NEST_VERSION}
    +        SOVERSION 3
    +    )
    +endif()
     
    +target_link_libraries(nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS})
     
    -target_link_libraries( nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS} )
    -
    -target_include_directories( nestutil PRIVATE
    +target_include_directories(nestutil PRIVATE
         ${PROJECT_SOURCE_DIR}/libnestutil
         ${PROJECT_BINARY_DIR}/libnestutil
         ${PROJECT_SOURCE_DIR}/nestkernel
         ${PROJECT_SOURCE_DIR}/thirdparty
         ${Boost_INCLUDE_DIRS}
    -    )
    +)
     
    -install( TARGETS nestutil
    +install(TARGETS nestutil
         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    -    )
    +)
     
    -FILTER_HEADERS("${nestutil_sources}" install_headers )
    -install( FILES ${install_headers} ${PROJECT_BINARY_DIR}/libnestutil/config.h
    +FILTER_HEADERS("${nestutil_sources}" install_headers)
    +install(FILES ${install_headers} ${PROJECT_BINARY_DIR}/libnestutil/config.h
         DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest)
    diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt
    index c1c2adaa92..011d03806c 100644
    --- a/models/CMakeLists.txt
    +++ b/models/CMakeLists.txt
    @@ -17,7 +17,7 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -set( models_sources
    +set(models_sources
         ac_generator.h ac_generator.cpp
         aeif_cond_alpha.h aeif_cond_alpha.cpp
         aeif_cond_alpha_multisynapse.h aeif_cond_alpha_multisynapse.cpp
    @@ -83,6 +83,7 @@ set( models_sources
         mat2_psc_exp.h mat2_psc_exp.cpp
         mcculloch_pitts_neuron.h mcculloch_pitts_neuron.cpp
         mip_generator.h mip_generator.cpp
    +
         # modelsmodule.h modelsmodule.cpp
         multimeter.h multimeter.cpp
         music_cont_in_proxy.h music_cont_in_proxy.cpp
    @@ -140,29 +141,40 @@ set( models_sources
         vogels_sprekeler_synapse.h
         weight_recorder.h weight_recorder.cpp
         spike_dilutor.h spike_dilutor.cpp
    -    )
    +)
     
    -add_library( models ${models_sources} )
    -set_target_properties( models
    -    PROPERTIES
    -    VERSION ${NEST_VERSION}
    -    SOVERSION 3
    +add_library(models ${models_sources})
    +
    +if(APPLE)
    +    set_target_properties(models
    +        PROPERTIES
    +        VERSION ${NEST_VERSION}
    +        SOVERSION 3
    +        LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup"
    +    )
    +else()
    +    set_target_properties(models
    +        PROPERTIES
    +        VERSION ${NEST_VERSION}
    +        SOVERSION 3
         )
    -target_link_libraries( models nestutil nestkernel )
    +endif()
     
    -target_include_directories( models PRIVATE
    +target_link_libraries(models nestutil nestkernel)
    +
    +target_include_directories(models PRIVATE
         ${PROJECT_SOURCE_DIR}/thirdparty
         ${PROJECT_SOURCE_DIR}/libnestutil
         ${PROJECT_BINARY_DIR}/libnestutil
         ${PROJECT_SOURCE_DIR}/nestkernel
    -    )
    +)
     
    -install( TARGETS models
    +install(TARGETS models
         LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
         ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    -    )
    +)
     
    -FILTER_HEADERS("${models_sources}" install_headers )
    -install( FILES ${install_headers}
    +FILTER_HEADERS("${models_sources}" install_headers)
    +install(FILES ${install_headers}
         DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest)
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index 2989f14ea0..25da01a757 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -17,203 +17,211 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -set ( nestkernel_sources
    -      universal_data_logger_impl.h universal_data_logger.h
    -      recordables_map.h
    -      archiving_node.h archiving_node.cpp
    -      clopath_archiving_node.h clopath_archiving_node.cpp
    -      urbanczik_archiving_node.h urbanczik_archiving_node_impl.h
    -      common_synapse_properties.h common_synapse_properties.cpp
    -      connection.h
    -      connection_label.h
    -      common_properties_hom_w.h
    -      syn_id_delay.h
    -      connector_base.h connector_base_impl.h
    -      connector_model.h connector_model_impl.h connector_model.cpp
    -      connection_id.h connection_id.cpp
    -      deprecation_warning.h deprecation_warning.cpp
    -      device.h device.cpp
    -      device_node.h
    -      event.h event.cpp
    -      exceptions.h exceptions.cpp
    -      genericmodel.h genericmodel_impl.h
    -      node_collection.h node_collection.cpp
    -      generic_factory.h
    -      histentry.h histentry.cpp
    -      model.h model.cpp
    -      model_manager.h model_manager_impl.h model_manager.cpp
    -      nest_types.h
    -      nest_names.h
    -      nest_time.h nest_time.cpp
    -      nest_timeconverter.h nest_timeconverter.cpp
    -      modelrange.h modelrange.cpp
    -      modelrange_manager.h modelrange_manager.cpp
    -      node.h node.cpp
    -      parameter.h parameter.cpp
    -      per_thread_bool_indicator.h per_thread_bool_indicator.cpp
    -      proxynode.h proxynode.cpp
    -      random_generators.h
    -      recording_device.h recording_device.cpp
    -      pseudo_recording_device.h
    -      ring_buffer.h ring_buffer_impl.h ring_buffer.cpp
    -      secondary_event.h
    -      slice_ring_buffer.cpp slice_ring_buffer.h
    -      spikecounter.h spikecounter.cpp
    -      stimulation_device.h stimulation_device.cpp
    -      target_identifier.h
    -      sparse_node_array.h sparse_node_array.cpp
    -      conn_parameter.h conn_parameter.cpp
    -      conn_builder.h conn_builder_impl.h conn_builder.cpp
    -      conn_builder_factory.h
    -      conn_builder_conngen.h conn_builder_conngen.cpp
    -      music_event_handler.h music_event_handler.cpp
    -      music_rate_in_handler.h music_rate_in_handler.cpp
    -      music_manager.cpp music_manager.h
    -      nest.h nest_impl.h nest.cpp
    -      ../models/iaf_psc_alpha.h ../models/iaf_psc_alpha.cpp
    -      ../models/iaf_psc_delta.h ../models/iaf_psc_delta.cpp
    -      ../models/iaf_psc_exp.h ../models/iaf_psc_exp.cpp
    -      ../models/iaf_psc_exp_multisynapse.h ../models/iaf_psc_exp_multisynapse.cpp
    -      ../models/parrot_neuron.h ../models/parrot_neuron.cpp
    -      ../models/weight_recorder.h ../models/weight_recorder.cpp
    -      ../models/stdp_pl_synapse_hom.h ../models/stdp_pl_synapse_hom.cpp
    -      ../models/stdp_dopamine_synapse.h ../models/stdp_dopamine_synapse.cpp
    -      ../models/stdp_synapse_hom.h ../models/stdp_synapse_hom.cpp
    -      ../models/volume_transmitter.h ../models/volume_transmitter.cpp
    -      ../models/tsodyks_synapse_hom.h ../models/tsodyks_synapse_hom.cpp
    -      ../models/ac_generator.h ../models/ac_generator.cpp
    -      ../models/dc_generator.h ../models/dc_generator.cpp
    -      ../models/spike_generator.h ../models/spike_generator.cpp
    -      ../models/spike_recorder.h ../models/spike_recorder.cpp
    -      ../models/poisson_generator.h ../models/poisson_generator.cpp
    -      ../models/poisson_generator_ps.h ../models/poisson_generator_ps.cpp
    -      ../models/multimeter.h ../models/multimeter.cpp
    -      ../models/noise_generator.h ../models/noise_generator.cpp
    -      ../models/aeif_cond_alpha.h ../models/aeif_cond_alpha.cpp
    -      ../models/aeif_cond_alpha_multisynapse.h ../models/aeif_cond_alpha_multisynapse.cpp
    -      ../models/aeif_cond_beta_multisynapse.h ../models/aeif_cond_beta_multisynapse.cpp
    -      ../models/aeif_psc_delta_clopath.h ../models/aeif_psc_delta_clopath.cpp
    -      ../models/cm_default.h ../models/cm_default.cpp
    -      ../models/cm_tree.h ../models/cm_tree.cpp
    -      ../models/cm_compartmentcurrents.h ../models/cm_compartmentcurrents.cpp
    -      ../models/erfc_neuron.h ../models/erfc_neuron.cpp
    -      ../models/glif_cond.h ../models/glif_cond.cpp
    -      ../models/glif_psc.h ../models/glif_psc.cpp
    -      ../models/hh_psc_alpha_gap.h ../models/hh_psc_alpha_gap.cpp
    -      ../models/ht_neuron.h ../models/ht_neuron.cpp
    -      ../models/iaf_cond_alpha_mc.h ../models/iaf_cond_alpha_mc.cpp
    -      ../models/pp_psc_delta.h ../models/pp_psc_delta.cpp
    -      ../models/lin_rate.h ../models/lin_rate.cpp
    -      ../models/tanh_rate.h ../models/tanh_rate.cpp
    -      ../models/threshold_lin_rate.h ../models/threshold_lin_rate.cpp
    -      ../models/iaf_cond_alpha.h ../models/iaf_cond_alpha.cpp
    -      ../models/parrot_neuron_ps.h ../models/parrot_neuron_ps.cpp
    -      ../models/step_rate_generator.h ../models/step_rate_generator.cpp
    -      ../models/step_current_generator.h ../models/step_current_generator.cpp
    -      ../models/hh_psc_alpha_clopath.h ../models/hh_psc_alpha_clopath.cpp
    -      ../models/iaf_cond_exp.h ../models/iaf_cond_exp.cpp
    -      ../models/aeif_cond_exp.h ../models/aeif_cond_exp.cpp
    -      ../models/aeif_psc_alpha.h ../models/aeif_psc_alpha.cpp
    -      ../models/aeif_psc_delta.h ../models/aeif_psc_delta.cpp
    -      ../models/aeif_psc_exp.h ../models/aeif_psc_exp.cpp
    -      ../models/spin_detector.h ../models/spin_detector.cpp
    -      ../models/pp_cond_exp_mc_urbanczik.h ../models/pp_cond_exp_mc_urbanczik.cpp
    -      ../models/siegert_neuron.h ../models/siegert_neuron.cpp
    -      ../models/sigmoid_rate_gg_1998.h ../models/sigmoid_rate_gg_1998.cpp
    -      ../models/gap_junction.h
    -      ../models/rate_connection_instantaneous.h
    -      ../models/rate_connection_delayed.h
    -      ../models/diffusion_connection.h
    +set(nestkernel_sources
    +  universal_data_logger_impl.h universal_data_logger.h
    +  recordables_map.h
    +  archiving_node.h archiving_node.cpp
    +  clopath_archiving_node.h clopath_archiving_node.cpp
    +  urbanczik_archiving_node.h urbanczik_archiving_node_impl.h
    +  common_synapse_properties.h common_synapse_properties.cpp
    +  connection.h
    +  connection_label.h
    +  common_properties_hom_w.h
    +  syn_id_delay.h
    +  connector_base.h connector_base_impl.h
    +  connector_model.h connector_model_impl.h connector_model.cpp
    +  connection_id.h connection_id.cpp
    +  deprecation_warning.h deprecation_warning.cpp
    +  device.h device.cpp
    +  device_node.h
    +  event.h event.cpp
    +  exceptions.h exceptions.cpp
    +  genericmodel.h genericmodel_impl.h
    +  node_collection.h node_collection.cpp
    +  generic_factory.h
    +  histentry.h histentry.cpp
    +  model.h model.cpp
    +  model_manager.h model_manager_impl.h model_manager.cpp
    +  nest_types.h
    +  nest_names.h
    +  nest_time.h nest_time.cpp
    +  nest_timeconverter.h nest_timeconverter.cpp
    +  modelrange.h modelrange.cpp
    +  modelrange_manager.h modelrange_manager.cpp
    +  node.h node.cpp
    +  parameter.h parameter.cpp
    +  per_thread_bool_indicator.h per_thread_bool_indicator.cpp
    +  proxynode.h proxynode.cpp
    +  random_generators.h
    +  recording_device.h recording_device.cpp
    +  pseudo_recording_device.h
    +  ring_buffer.h ring_buffer_impl.h ring_buffer.cpp
    +  secondary_event.h
    +  slice_ring_buffer.cpp slice_ring_buffer.h
    +  spikecounter.h spikecounter.cpp
    +  stimulation_device.h stimulation_device.cpp
    +  target_identifier.h
    +  sparse_node_array.h sparse_node_array.cpp
    +  conn_parameter.h conn_parameter.cpp
    +  conn_builder.h conn_builder_impl.h conn_builder.cpp
    +  conn_builder_factory.h
    +  conn_builder_conngen.h conn_builder_conngen.cpp
    +  music_event_handler.h music_event_handler.cpp
    +  music_rate_in_handler.h music_rate_in_handler.cpp
    +  music_manager.cpp music_manager.h
    +  nest.h nest_impl.h nest.cpp
    +  ../models/iaf_psc_alpha.h ../models/iaf_psc_alpha.cpp
    +  ../models/iaf_psc_delta.h ../models/iaf_psc_delta.cpp
    +  ../models/iaf_psc_exp.h ../models/iaf_psc_exp.cpp
    +  ../models/iaf_psc_exp_multisynapse.h ../models/iaf_psc_exp_multisynapse.cpp
    +  ../models/parrot_neuron.h ../models/parrot_neuron.cpp
    +  ../models/weight_recorder.h ../models/weight_recorder.cpp
    +  ../models/stdp_pl_synapse_hom.h ../models/stdp_pl_synapse_hom.cpp
    +  ../models/stdp_dopamine_synapse.h ../models/stdp_dopamine_synapse.cpp
    +  ../models/stdp_synapse_hom.h ../models/stdp_synapse_hom.cpp
    +  ../models/volume_transmitter.h ../models/volume_transmitter.cpp
    +  ../models/tsodyks_synapse_hom.h ../models/tsodyks_synapse_hom.cpp
    +  ../models/ac_generator.h ../models/ac_generator.cpp
    +  ../models/dc_generator.h ../models/dc_generator.cpp
    +  ../models/spike_generator.h ../models/spike_generator.cpp
    +  ../models/spike_recorder.h ../models/spike_recorder.cpp
    +  ../models/poisson_generator.h ../models/poisson_generator.cpp
    +  ../models/poisson_generator_ps.h ../models/poisson_generator_ps.cpp
    +  ../models/multimeter.h ../models/multimeter.cpp
    +  ../models/noise_generator.h ../models/noise_generator.cpp
    +  ../models/aeif_cond_alpha.h ../models/aeif_cond_alpha.cpp
    +  ../models/aeif_cond_alpha_multisynapse.h ../models/aeif_cond_alpha_multisynapse.cpp
    +  ../models/aeif_cond_beta_multisynapse.h ../models/aeif_cond_beta_multisynapse.cpp
    +  ../models/aeif_psc_delta_clopath.h ../models/aeif_psc_delta_clopath.cpp
    +  ../models/cm_default.h ../models/cm_default.cpp
    +  ../models/cm_tree.h ../models/cm_tree.cpp
    +  ../models/cm_compartmentcurrents.h ../models/cm_compartmentcurrents.cpp
    +  ../models/erfc_neuron.h ../models/erfc_neuron.cpp
    +  ../models/glif_cond.h ../models/glif_cond.cpp
    +  ../models/glif_psc.h ../models/glif_psc.cpp
    +  ../models/hh_psc_alpha_gap.h ../models/hh_psc_alpha_gap.cpp
    +  ../models/ht_neuron.h ../models/ht_neuron.cpp
    +  ../models/iaf_cond_alpha_mc.h ../models/iaf_cond_alpha_mc.cpp
    +  ../models/pp_psc_delta.h ../models/pp_psc_delta.cpp
    +  ../models/lin_rate.h ../models/lin_rate.cpp
    +  ../models/tanh_rate.h ../models/tanh_rate.cpp
    +  ../models/threshold_lin_rate.h ../models/threshold_lin_rate.cpp
    +  ../models/iaf_cond_alpha.h ../models/iaf_cond_alpha.cpp
    +  ../models/parrot_neuron_ps.h ../models/parrot_neuron_ps.cpp
    +  ../models/step_rate_generator.h ../models/step_rate_generator.cpp
    +  ../models/step_current_generator.h ../models/step_current_generator.cpp
    +  ../models/hh_psc_alpha_clopath.h ../models/hh_psc_alpha_clopath.cpp
    +  ../models/iaf_cond_exp.h ../models/iaf_cond_exp.cpp
    +  ../models/aeif_cond_exp.h ../models/aeif_cond_exp.cpp
    +  ../models/aeif_psc_alpha.h ../models/aeif_psc_alpha.cpp
    +  ../models/aeif_psc_delta.h ../models/aeif_psc_delta.cpp
    +  ../models/aeif_psc_exp.h ../models/aeif_psc_exp.cpp
    +  ../models/spin_detector.h ../models/spin_detector.cpp
    +  ../models/pp_cond_exp_mc_urbanczik.h ../models/pp_cond_exp_mc_urbanczik.cpp
    +  ../models/siegert_neuron.h ../models/siegert_neuron.cpp
    +  ../models/sigmoid_rate_gg_1998.h ../models/sigmoid_rate_gg_1998.cpp
    +  ../models/gap_junction.h
    +  ../models/rate_connection_instantaneous.h
    +  ../models/rate_connection_delayed.h
    +  ../models/diffusion_connection.h
     
    -      synaptic_element.h synaptic_element.cpp
    -      growth_curve.h growth_curve.cpp
    -      growth_curve_factory.h
    -      kernel_manager.h kernel_manager.cpp
    -      vp_manager.h vp_manager_impl.h vp_manager.cpp
    -      io_manager.h io_manager_impl.h io_manager.cpp
    -      mpi_manager.h mpi_manager_impl.h mpi_manager.cpp
    -      simulation_manager.h simulation_manager.cpp
    -      connection_manager.h connection_manager_impl.h connection_manager.cpp
    -      sp_manager.h sp_manager_impl.h sp_manager.cpp
    -      delay_checker.h delay_checker.cpp
    -      random_manager.h random_manager.cpp
    -      event_delivery_manager.h event_delivery_manager_impl.h
    -      event_delivery_manager.cpp
    -      node_manager.h node_manager.cpp
    -      logging_manager.h logging_manager.cpp
    -      recording_backend.h recording_backend.cpp
    -      recording_backend_ascii.h recording_backend_ascii.cpp
    -      recording_backend_memory.h recording_backend_memory.cpp
    -      recording_backend_screen.h recording_backend_screen.cpp
    -      manager_interface.h
    -      target_table.h target_table.cpp
    -      target_table_devices.h target_table_devices.cpp target_table_devices_impl.h
    -      target.h target_data.h static_assert.h
    -      send_buffer_position.h
    -      source.h
    -      source_table.h source_table.cpp
    -      source_table_position.h
    -      spike_data.h
    -      structural_plasticity_node.h structural_plasticity_node.cpp
    -      connection_creator.h connection_creator.cpp connection_creator_impl.h
    -      free_layer.h
    -      grid_layer.h
    -      grid_mask.h
    -      layer.h layer.cpp layer_impl.h
    -      mask.h mask.cpp mask_impl.h
    -      ntree.h ntree_impl.h
    -      position.h
    -      spatial.h spatial.cpp
    -      stimulation_backend.h
    -      )
    +  synaptic_element.h synaptic_element.cpp
    +  growth_curve.h growth_curve.cpp
    +  growth_curve_factory.h
    +  kernel_manager.h kernel_manager.cpp
    +  vp_manager.h vp_manager_impl.h vp_manager.cpp
    +  io_manager.h io_manager_impl.h io_manager.cpp
    +  mpi_manager.h mpi_manager_impl.h mpi_manager.cpp
    +  simulation_manager.h simulation_manager.cpp
    +  connection_manager.h connection_manager_impl.h connection_manager.cpp
    +  sp_manager.h sp_manager_impl.h sp_manager.cpp
    +  delay_checker.h delay_checker.cpp
    +  random_manager.h random_manager.cpp
    +  event_delivery_manager.h event_delivery_manager_impl.h
    +  event_delivery_manager.cpp
    +  node_manager.h node_manager.cpp
    +  logging_manager.h logging_manager.cpp
    +  recording_backend.h recording_backend.cpp
    +  recording_backend_ascii.h recording_backend_ascii.cpp
    +  recording_backend_memory.h recording_backend_memory.cpp
    +  recording_backend_screen.h recording_backend_screen.cpp
    +  manager_interface.h
    +  target_table.h target_table.cpp
    +  target_table_devices.h target_table_devices.cpp target_table_devices_impl.h
    +  target.h target_data.h static_assert.h
    +  send_buffer_position.h
    +  source.h
    +  source_table.h source_table.cpp
    +  source_table_position.h
    +  spike_data.h
    +  structural_plasticity_node.h structural_plasticity_node.cpp
    +  connection_creator.h connection_creator.cpp connection_creator_impl.h
    +  free_layer.h
    +  grid_layer.h
    +  grid_mask.h
    +  layer.h layer.cpp layer_impl.h
    +  mask.h mask.cpp mask_impl.h
    +  ntree.h ntree_impl.h
    +  position.h
    +  spatial.h spatial.cpp
    +  stimulation_backend.h
    +)
     
    +if(HAVE_SIONLIB)
    +  set(nestkernel_sources
    +    ${nestkernel_sources}
    +    recording_backend_sionlib.h recording_backend_sionlib.cpp
    +  )
    +endif()
     
    -if ( HAVE_SIONLIB )
    -  set( nestkernel_sources
    -       ${nestkernel_sources}
    -       recording_backend_sionlib.h recording_backend_sionlib.cpp
    -       )
    -endif ()
    -
    -if ( HAVE_MPI )
    -  set( nestkernel_sources
    +if(HAVE_MPI)
    +  set(nestkernel_sources
         ${nestkernel_sources}
         recording_backend_mpi.h recording_backend_mpi.cpp
         stimulation_backend_mpi.h stimulation_backend_mpi.cpp
       )
    -endif ()
    -
    +endif()
     
     # Prevent problems with Conda path substitution (see #2348)
    -set_source_files_properties( dynamicloader.cpp PROPERTIES COMPILE_OPTIONS "-O0" )
    +set_source_files_properties(dynamicloader.cpp PROPERTIES COMPILE_OPTIONS "-O0")
     
    +add_library(nestkernel ${nestkernel_sources})
     
    -add_library( nestkernel ${nestkernel_sources} )
    -set_target_properties( nestkernel
    +if(APPLE)
    +  set_target_properties(nestkernel
    +    PROPERTIES
    +    VERSION ${NEST_VERSION}
    +    SOVERSION 3
    +    LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup"
    +  )
    +else()
    +  set_target_properties(nestkernel
         PROPERTIES
         VERSION ${NEST_VERSION}
         SOVERSION 3
    -    )
    -target_link_libraries( nestkernel
    -    nestutil
    -    ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES}
    -    )
    +  )
    +endif()
    +
    +target_link_libraries(nestkernel
    +  nestutil
    +  ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES}
    +)
     
    -target_include_directories( nestkernel PRIVATE
    -    ${PROJECT_SOURCE_DIR}/thirdparty
    -    ${PROJECT_SOURCE_DIR}/libnestutil
    -    ${PROJECT_BINARY_DIR}/libnestutil
    -    ${PROJECT_SOURCE_DIR}/nestkernel
    -    ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    -    ${PROJECT_SOURCE_DIR}/models
    -    )
    +target_include_directories(nestkernel PRIVATE
    +  ${PROJECT_SOURCE_DIR}/thirdparty
    +  ${PROJECT_SOURCE_DIR}/libnestutil
    +  ${PROJECT_BINARY_DIR}/libnestutil
    +  ${PROJECT_SOURCE_DIR}/nestkernel
    +  ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    +  ${PROJECT_SOURCE_DIR}/models
    +)
     
    -install( TARGETS nestkernel
    -    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
    -    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
    -    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    -    )
    +install(TARGETS nestkernel
    +  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
    +  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/nest
    +  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    +)
     
    -FILTER_HEADERS("${nestkernel_sources}" install_headers )
    -install( FILES ${install_headers}
    -    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest)
    +FILTER_HEADERS("${nestkernel_sources}" install_headers)
    +install(FILES ${install_headers}
    +  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest)
    
    From 97ce7ed509ca8ada9bcede3a376ae5a0a843ff40 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 3 Mar 2023 00:21:32 +0100
    Subject: [PATCH 125/375] WIP: Next gen NEST-SONATA [skip ci]
    
    ---
     nestkernel/sonata_connector.cpp | 113 ++++++++++++++++++++------------
     nestkernel/sonata_connector.h   |   5 +-
     2 files changed, 73 insertions(+), 45 deletions(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index 3429ad5706..fb882010c7 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -26,8 +26,11 @@
     #ifdef HAVE_HDF5
     
     // C++ includes:
    -#include <cstdlib> // for div()
    -                  
    +#include <boost/any.hpp> // TODO: probably not needed if boost::any_cast goes away
    +#include <cstdlib>       // for div()
    +#include <string>
    +#include <vector>
    +
     // Includes from libnestutil
     #include "dict_util.h"
     
    @@ -91,18 +94,27 @@ SonataConnector::connect()
       */
       // clang-format on
     
    -  auto edges_container = graph_specs_[ "edges" ]; 
    +
    +  // auto edges_container = graph_specs_[ "edges" ];
    +  // auto edges_container = graph_specs_.at( "edges" );
    +  auto edges_container = boost::any_cast< std::vector< dictionary > >( graph_specs_.at( "edges" ) );
    +
     
       // Iterate edge files
       for ( auto edge_dict : edges_container )
       {
     
    -    cur_fname_ = edge_dict[ "edges_file" ];
    +    // cur_fname_ = edge_dict[ "edges_file" ];
    +    cur_fname_ = boost::any_cast< std::string >( edge_dict.at( "edges_file" ) );
    +
    +
         const auto file = open_file_( cur_fname_ );
         const auto edges_top_level_grp = open_group_( file, "edges" );
     
         // Create map of edge type ids to NEST synapse_model ids
    -    cur_edge_params_ = edge_dict[ "syn_specs" ];
    +    // cur_edge_params_ = edge_dict[ "syn_specs" ];
    +    cur_edge_params_ = boost::any_cast< dictionary >( edge_dict.at( "syn_specs" ) );
    +
         create_edge_type_id_2_syn_spec_( cur_edge_params_ );
     
         // Get names of population groups (usually just one population group)
    @@ -351,6 +363,7 @@ SonataConnector::sequential_chunkwise_connector_()
       }
     }
     
    +///*
     void
     SonataConnector::connect_chunk_( const hsize_t chunk_size, const hsize_t offset )
     {
    @@ -380,9 +393,14 @@ SonataConnector::connect_chunk_( const hsize_t chunk_size, const hsize_t offset
       std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() );
     
       // Retrieve the correct NodeCollections
    -  const auto nest_nodes = graph_specs_[ "nodes" ];
    -  const auto src_nc = nest_nodes[ source_attribute_value_ ];
    -  const auto tgt_nc = nest_nodes[ target_attribute_value_ ];
    +  // const auto nest_nodes = graph_specs_[ "nodes" ];
    +  // const auto src_nc = nest_nodes[ source_attribute_value_ ];
    +  // const auto tgt_nc = nest_nodes[ target_attribute_value_ ];
    +
    +  const auto nest_nodes = boost::any_cast< dictionary >( graph_specs_.at( "nodes" ) );
    +  const auto src_nc = boost::any_cast< NodeCollectionPTR >( nest_nodes.at( source_attribute_value_ ) );
    +  const auto tgt_nc = boost::any_cast< NodeCollectionPTR >( nest_nodes.at( target_attribute_value_ ) );
    +
       const auto snode_begin = src_nc->begin();
       const auto tnode_begin = tgt_nc->begin();
     
    @@ -412,7 +430,10 @@ SonataConnector::connect_chunk_( const hsize_t chunk_size, const hsize_t offset
             const thread target_thread = target->get_thread();
     
             const auto edge_type_id = edge_type_id_data_subset[ i ];
    -        const auto syn_spec = cur_edge_params_[ std::to_string( edge_type_id ) ];
    +
    +        // const auto syn_spec = cur_edge_params_[ std::to_string( edge_type_id ) ];
    +        const auto syn_spec = boost::any_cast< dictionary >( cur_edge_params_.at( std::to_string( edge_type_id ) ) );
    +
             const double weight =
               get_syn_property_( syn_spec, i, weight_dataset_exist_, syn_weight_data_subset, names::weight );
             const double delay = get_syn_property_( syn_spec, i, delay_dataset_exist_, delay_data_subset, names::delay );
    @@ -516,11 +537,11 @@ SonataConnector::read_subset_( const H5::DataSet& dataset,
     void
     SonataConnector::create_edge_type_id_2_syn_spec_( dictionary edge_params )
     {
    -  for ( auto it = edge_params->begin(); it != edge_params->end(); ++it )
    +  for ( auto& syn_kv_pair : edge_params )
       {
    -    const auto type_id = std::stoi( it->first.toString() );
    -    auto d =  it->second;
    -    const auto syn_name = ( *d )[ "synapse_model" ];
    +    const auto type_id = std::stoi( syn_kv_pair.first );
    +    auto d = boost::any_cast< dictionary >( syn_kv_pair.second );
    +    const auto syn_name = boost::any_cast< std::string >( d.at( "synapse_model" ) );
     
         // The following call will throw "UnknownSynapseType" if syn_name is not naming a known model
         const index synapse_model_id = kernel().model_manager.get_synapse_model_id( syn_name );
    @@ -534,34 +555,39 @@ void
     SonataConnector::set_synapse_params_( dictionary syn_dict, index synapse_model_id, int type_id )
     {
       auto syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
    -  std::set< Name > skip_syn_params_ = {
    +  // TODO: skip_syn_params_ only needs to be defined once somewhere
    +  std::set< std::string > skip_syn_params_ = {
         names::weight, names::delay, names::min_delay, names::max_delay, names::num_connections, names::synapse_model
       };
     
       ConnParameterMap synapse_params;
     
    -  for ( auto default_it = syn_defaults->begin(); default_it != syn_defaults->end(); ++default_it )
    +  for ( auto& syn_kv_pair : syn_defaults )
       {
    -    const Name param_name = default_it->first;
    +    const std::string param_name = syn_kv_pair.first;
         if ( skip_syn_params_.find( param_name ) != skip_syn_params_.end() )
         {
           continue; // weight, delay or other not-settable parameter
         }
     
    -    if ( syn_dict->known( param_name ) )
    +    if ( syn_dict.known( param_name ) )
         {
    -
           synapse_params[ param_name ] = std::shared_ptr< ConnParameter >(
    -        ConnParameter::create( ( *syn_dict )[ param_name ], kernel().vp_manager.get_num_threads() ) );
    +        ConnParameter::create( syn_dict.at( param_name ), kernel().vp_manager.get_num_threads() ) );
         }
       }
     
    +
       // Now create dictionary with dummy values that we will use to pass settings to the synapses created. We
    -  // create it here once to avoid re-creating the object over and over again. 
    +  // create it here once to avoid re-creating the object over and over again.
       // TODO: See if nullptr can be changed to dictionary
    -  edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads(), nullptr );
    +  // edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads(), nullptr );
    +  edge_type_id_2_param_dicts_.at( type_id ).resize( kernel().vp_manager.get_num_threads() );
    +
       edge_type_id_2_syn_spec_[ type_id ] = synapse_params;
     
    +  // const auto nest_nodes = boost::any_cast< dictionary >( graph_specs_.at( "nodes" ) );
    +
       // TODO: Once NEST is SLIless, the below loop over threads should be parallelizable. In order to parallelize, the
       // change would be to replace the for loop with #pragma omp parallel and get the thread id (tid) inside the parallel
       // region. Currently, creation of NumericDatum objects is not thread-safe because sli::pool memory is a static
    @@ -569,17 +595,19 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, index synapse_model_i
       // Note that this also applies to the equivalent loop in conn_builder.cpp
       for ( thread tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
       {
    -    edge_type_id_2_param_dicts_[ type_id ][ tid ].emplace_back();
    +    // edge_type_id_2_param_dicts_[ type_id ][ tid ].emplace_back();
     
         for ( auto param : synapse_params )
         {
           if ( param.second->provides_long() )
           {
    -        ( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = 0;
    +        //( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = 0;
    +        edge_type_id_2_param_dicts_.at( type_id ).at( tid ).at( param.first ) = 0;
           }
           else
           {
    -       ( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = 0.0;
    +        //( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = 0.0;
    +        edge_type_id_2_param_dicts_.at( type_id ).at( tid ).at( param.first ) = 0.0;
           }
         }
       }
    @@ -590,27 +618,27 @@ SonataConnector::get_synapse_params_( index snode_id, Node& target, thread targe
     {
       for ( auto const& syn_param : edge_type_id_2_syn_spec_.at( edge_type_id ) )
       {
    -    const Name param_name = syn_param.first;
    +    const auto param_name = syn_param.first;
         const auto param = syn_param.second;
     
         if ( param->provides_long() )
    -    { 
    -      auto dd =  ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ]; 
    -      // change value of dictionary entry without allocating new datum
    -      /*
    -      IntegerDatum* dd = static_cast< IntegerDatum* >(
    -        ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
    -      */
    -      ( *dd ) = param->value_int( target_thread, rng, snode_id, &target ); 
    +    {
    +
    +      auto dd = edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ).at( param_name );
    +      // auto dd = ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ];
    +      //  change value of dictionary entry without allocating new datum
    +
    +      // IntegerDatum* dd = static_cast< IntegerDatum* >(
    +      //  ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
    +
    +      ( *dd ) = param->value_int( target_thread, rng, snode_id, &target );
         }
         else
         {
           // change value of dictionary entry without allocating new datum
    -      auto dd =  ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ]; 
    -      /*
    -      DoubleDatum* dd = static_cast< DoubleDatum* >(
    -        ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
    -      */
    +      auto dd = ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ];
    +      // DoubleDatum* dd = static_cast< DoubleDatum* >(
    +      //  ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
           ( *dd ) = param->value_double( target_thread, rng, snode_id, &target );
         }
       }
    @@ -621,15 +649,15 @@ SonataConnector::get_syn_property_( const dictionary& syn_spec,
       hsize_t index,
       const bool dataset_exists,
       std::vector< double >& data,
    -  const Name& name )
    +  const std::string& name )
     {
       if ( dataset_exists )
       {
         return data[ index ];
       }
    -  else if ( syn_spec->known( name ) )
    +  else if ( syn_spec.known( name ) )
       {
    -    return static_cast< double >( ( *syn_spec )[ name ] );
    +    return boost::any_cast< double >( syn_spec.at( name ) );
       }
       // default value is NaN
       return numerics::nan;
    @@ -639,7 +667,6 @@ void
     SonataConnector::reset_params_()
     {
       edge_type_id_2_syn_model_.clear();
    -  /*
       for ( auto syn_params_vec_map : edge_type_id_2_syn_spec_ )
       {
         for ( auto syn_params : syn_params_vec_map.second )
    @@ -647,10 +674,10 @@ SonataConnector::reset_params_()
           syn_params.second->reset();
         }
       }
    -  */
       edge_type_id_2_syn_spec_.clear();
       edge_type_id_2_param_dicts_.clear();
     }
    +//*/
     
     } // end namespace nest
     
    diff --git a/nestkernel/sonata_connector.h b/nestkernel/sonata_connector.h
    index 06ac7e5cbc..922c130e4e 100644
    --- a/nestkernel/sonata_connector.h
    +++ b/nestkernel/sonata_connector.h
    @@ -29,6 +29,7 @@
     
     // C++ includes:
     #include <map>
    +#include <string>
     #include <vector>
     
     // Includes from libnestutil
    @@ -201,7 +202,7 @@ class SonataConnector
         hsize_t index,
         const bool dataset_exists,
         std::vector< double >& data,
    -    const Name& name );
    +    const std::string& name );
     
       /**
        * @brief Manage the sequential chunkwise connections to be created.
    @@ -264,7 +265,7 @@ class SonataConnector
        */
       void reset_params_();
     
    -  typedef std::map< Name, std::shared_ptr< ConnParameter > > ConnParameterMap;
    +  typedef std::map< std::string, std::shared_ptr< ConnParameter > > ConnParameterMap;
     
       //! Dictionary containing SONATA graph specifications
       dictionary graph_specs_;
    
    From 85f716c2bbe1bfc7955a2ecae30ec04e9da5188c Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 3 Mar 2023 00:38:09 +0100
    Subject: [PATCH 126/375] WIP: Next gen NEST-SONATA [skip ci]
    
    ---
     nestkernel/sonata_connector.cpp | 7 ++++---
     1 file changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index fb882010c7..5be5947e0c 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -631,15 +631,16 @@ SonataConnector::get_synapse_params_( index snode_id, Node& target, thread targe
           // IntegerDatum* dd = static_cast< IntegerDatum* >(
           //  ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
     
    -      ( *dd ) = param->value_int( target_thread, rng, snode_id, &target );
    +      dd = param->value_int( target_thread, rng, snode_id, &target );
         }
         else
         {
    +      auto dd = edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ).at( param_name );
           // change value of dictionary entry without allocating new datum
    -      auto dd = ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ];
    +      // auto dd = ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ];
           // DoubleDatum* dd = static_cast< DoubleDatum* >(
           //  ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
    -      ( *dd ) = param->value_double( target_thread, rng, snode_id, &target );
    +      dd = param->value_double( target_thread, rng, snode_id, &target );
         }
       }
     }
    
    From 7b7d04f18ac018e425ae02fa0a4fdcd3722693bc Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 3 Mar 2023 15:24:09 +0100
    Subject: [PATCH 127/375] Auto formatting and fix NEST-SONATA compilation
    
    ---
     CMakeLists.txt               | 358 ++++++++++++------------
     cmake/ConfigureSummary.cmake | 521 ++++++++++++++++++-----------------
     nestkernel/CMakeLists.txt    |   3 +-
     pynest/CMakeLists.txt        |  68 +++--
     4 files changed, 489 insertions(+), 461 deletions(-)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index 729497bb39..ad8e98eee7 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -19,15 +19,15 @@
     
     # Version range from minimum required (3.12 for macOS OpenMP)
     # up to newest version tested, see https://cliutils.gitlab.io/modern-cmake/chapters/basics.html
    -cmake_minimum_required( VERSION 3.12...3.16 )
    +cmake_minimum_required(VERSION 3.12...3.16)
     
     # add cmake modules: for all `include(...)` first look here
    -list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
    +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
     
    -project( nest CXX C )
    -set( NEST_USER_EMAIL "users@nest-simulator.org" )
    +project(nest CXX C)
    +set(NEST_USER_EMAIL "users@nest-simulator.org")
     
    -include( ColorMessages )
    +include(ColorMessages)
     
     # check if the given CMAKE_INSTALL_PREFIX is not empty
     if("${CMAKE_INSTALL_PREFIX}" STREQUAL "")
    @@ -35,99 +35,98 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "")
     endif()
     
     # handle relative installation prefixes
    -if( NOT IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
    -    # convert relative path to absolute path
    -    get_filename_component(absPath ${CMAKE_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
    -    set(CMAKE_INSTALL_PREFIX ${absPath})
    -    printInfo("Relative CMAKE_INSTALL_PREFIX has been converted to absolute path ${CMAKE_INSTALL_PREFIX}")
    +if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
    +  # convert relative path to absolute path
    +  get_filename_component(absPath ${CMAKE_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
    +  set(CMAKE_INSTALL_PREFIX ${absPath})
    +  printInfo("Relative CMAKE_INSTALL_PREFIX has been converted to absolute path ${CMAKE_INSTALL_PREFIX}")
     endif()
     
    -################################################################################
    -##################         All User Defined options           ##################
    -################################################################################
    +# ###############################################################################
    +# #################         All User Defined options           ##################
    +# ###############################################################################
     
     # use Python to build PyNEST
    -set( with-python ON CACHE STRING "Build PyNEST [default=ON]." )
    -option( cythonize-pynest "Use Cython to cythonize pynestkernel.pyx [default=ON]. If OFF, PyNEST has to be build from a pre-cythonized pynestkernel.pyx." ON )
    +set(with-python ON CACHE STRING "Build PyNEST [default=ON].")
    +option(cythonize-pynest "Use Cython to cythonize pynestkernel.pyx [default=ON]. If OFF, PyNEST has to be build from a pre-cythonized pynestkernel.pyx." ON)
     
     # select parallelization scheme
    -set( with-mpi OFF CACHE STRING "Build with MPI parallelization [default=OFF]." )
    -set( with-openmp ON CACHE BOOL "Build with OpenMP multi-threading [default=ON]. Optionally set OMP compiler flags." )
    +set(with-mpi OFF CACHE STRING "Build with MPI parallelization [default=OFF].")
    +set(with-openmp ON CACHE BOOL "Build with OpenMP multi-threading [default=ON]. Optionally set OMP compiler flags.")
     
     # external libraries
    -set( with-libneurosim OFF CACHE STRING "Build with libneurosim [default=OFF]. Optionally give the directory where libneurosim is installed." )
    -set( with-music OFF CACHE STRING "Build with MUSIC [default=OFF]. Optionally give the directory where MUSIC is installed." )
    -set( with-sionlib OFF CACHE STRING "Build with SIONlib [default=OFF]. Optionally give the directory where sionlib is installed." )
    -set( with-boost ON CACHE STRING "Build with Boost [default=ON]. To set a specific Boost installation, give the install path." )
    -set( with-sonata ON CACHE STRING "Find a HDF5 library. To set a specific HDF5 installation, set install path. [default=ON]" )
    -set( with-readline ON CACHE STRING "Build with GNU Readline library [default=ON]. To set a specific library, give the install path." )
    -set( with-ltdl ON CACHE STRING "Build with ltdl library [default=ON]. To set a specific ltdl, give the  install path. NEST uses ltdl for dynamic loading of external user modules." )
    -set( with-gsl ON CACHE STRING "Build with the GSL library [default=ON]. To set a specific library, give the install path." )
    +set(with-libneurosim OFF CACHE STRING "Build with libneurosim [default=OFF]. Optionally give the directory where libneurosim is installed.")
    +set(with-music OFF CACHE STRING "Build with MUSIC [default=OFF]. Optionally give the directory where MUSIC is installed.")
    +set(with-sionlib OFF CACHE STRING "Build with SIONlib [default=OFF]. Optionally give the directory where sionlib is installed.")
    +set(with-boost ON CACHE STRING "Build with Boost [default=ON]. To set a specific Boost installation, give the install path.")
    +set(with-sonata ON CACHE STRING "Find a HDF5 library. To set a specific HDF5 installation, set install path. [default=ON]")
    +set(with-readline ON CACHE STRING "Build with GNU Readline library [default=ON]. To set a specific library, give the install path.")
    +set(with-ltdl ON CACHE STRING "Build with ltdl library [default=ON]. To set a specific ltdl, give the  install path. NEST uses ltdl for dynamic loading of external user modules.")
    +set(with-gsl ON CACHE STRING "Build with the GSL library [default=ON]. To set a specific library, give the install path.")
     
     # NEST properties
    -set( tics_per_ms "1000.0" CACHE STRING "Specify elementary unit of time [default=1000 tics per ms]." )
    -set( tics_per_step "100" CACHE STRING "Specify resolution [default=100 tics per step]." )
    -set( external-modules OFF CACHE STRING "External NEST modules to be linked in, separated by ';', [default=OFF]." )
    -set( with-detailed-timers OFF CACHE STRING "Build with detailed internal time measurements [default=OFF]. Detailed timers can affect the performance." )
    -set( target-bits-split "standard" CACHE STRING "Split of the 64-bit target neuron identifier type [default='standard']. 'standard' is recommended for most users. If running on more than 262144 MPI processes or more than 512 threads, change to 'hpc'." )
    +set(tics_per_ms "1000.0" CACHE STRING "Specify elementary unit of time [default=1000 tics per ms].")
    +set(tics_per_step "100" CACHE STRING "Specify resolution [default=100 tics per step].")
    +set(external-modules OFF CACHE STRING "External NEST modules to be linked in, separated by ';', [default=OFF].")
    +set(with-detailed-timers OFF CACHE STRING "Build with detailed internal time measurements [default=OFF]. Detailed timers can affect the performance.")
    +set(target-bits-split "standard" CACHE STRING "Split of the 64-bit target neuron identifier type [default='standard']. 'standard' is recommended for most users. If running on more than 262144 MPI processes or more than 512 threads, change to 'hpc'.")
     
     # generic build configuration
    -option( static-libraries "Build static executable and libraries [default=OFF]" OFF )
    -set( with-optimize ON CACHE STRING "Enable user defined optimizations [default=ON (uses '-O2')]. When OFF, no '-O' flag is passed to the compiler. Explicit compiler flags can be given; separate multiple flags by ';'." )
    -set( with-warning ON CACHE STRING "Enable user defined warnings [default=ON (uses '-Wall')]. Separate  multiple flags by ';'." )
    -set( with-debug OFF CACHE STRING "Enable user defined debug flags [default=OFF]. When ON, '-g' is used. Separate  multiple flags by ';'." )
    -set( with-cpp-std "c++11" CACHE STRING "C++ standard to use for compilation [default='c++11']." )
    -set( with-intel-compiler-flags OFF CACHE STRING "User defined flags for the Intel compiler [default='-fp-model strict']. Separate multiple flags by ';'." )
    -set( with-libraries OFF CACHE STRING "Link additional libraries [default=OFF]. Give full path. Separate multiple libraries by ';'." )
    -set( with-includes OFF CACHE STRING "Add additional include paths [default=OFF]. Give full path without '-I'. Separate multiple include paths by ';'." )
    -set( with-defines OFF CACHE STRING "Additional defines, e.g. '-DXYZ=1' [default=OFF]. Separate multiple defines by ';'." )
    -set( with-version-suffix "" CACHE STRING "Set a user defined version suffix [default='']." )
    +option(static-libraries "Build static executable and libraries [default=OFF]" OFF)
    +set(with-optimize ON CACHE STRING "Enable user defined optimizations [default=ON (uses '-O2')]. When OFF, no '-O' flag is passed to the compiler. Explicit compiler flags can be given; separate multiple flags by ';'.")
    +set(with-warning ON CACHE STRING "Enable user defined warnings [default=ON (uses '-Wall')]. Separate  multiple flags by ';'.")
    +set(with-debug OFF CACHE STRING "Enable user defined debug flags [default=OFF]. When ON, '-g' is used. Separate  multiple flags by ';'.")
    +set(with-cpp-std "c++11" CACHE STRING "C++ standard to use for compilation [default='c++11'].")
    +set(with-intel-compiler-flags OFF CACHE STRING "User defined flags for the Intel compiler [default='-fp-model strict']. Separate multiple flags by ';'.")
    +set(with-libraries OFF CACHE STRING "Link additional libraries [default=OFF]. Give full path. Separate multiple libraries by ';'.")
    +set(with-includes OFF CACHE STRING "Add additional include paths [default=OFF]. Give full path without '-I'. Separate multiple include paths by ';'.")
    +set(with-defines OFF CACHE STRING "Additional defines, e.g. '-DXYZ=1' [default=OFF]. Separate multiple defines by ';'.")
    +set(with-version-suffix "" CACHE STRING "Set a user defined version suffix [default=''].")
     
     # documentation build configuration
    -set( with-userdoc OFF CACHE STRING "Build user documentation [default=OFF]")
    -set( with-devdoc OFF CACHE STRING "Build developer documentation [default=OFF]")
    +set(with-userdoc OFF CACHE STRING "Build user documentation [default=OFF]")
    +set(with-devdoc OFF CACHE STRING "Build developer documentation [default=OFF]")
     
    -################################################################################
    -##################      Project Directory variables           ##################
    -################################################################################
    +# ###############################################################################
    +# #################      Project Directory variables           ##################
    +# ###############################################################################
     
     # In general use the CMAKE_INSTALL_<dir> and CMAKE_INSTALL_FULL_<dir> vars from
     # GNUInstallDirs (included after calling nest_process_with_python()), but the
     # CMAKE_INSTALL_DATADIR is usually just CMAKE_INSTALL_DATAROOTDIR
     # and we want it to be CMAKE_INSTALL_DATAROOTDIR/PROJECT_NAME
    -set( CMAKE_INSTALL_DATADIR "share/${PROJECT_NAME}" CACHE STRING "Relative directory, where NEST installs its data (share/nest)" )
    +set(CMAKE_INSTALL_DATADIR "share/${PROJECT_NAME}" CACHE STRING "Relative directory, where NEST installs its data (share/nest)")
     
    -################################################################################
    -##################           Find utility programs            ##################
    -################################################################################
    +# ###############################################################################
    +# #################           Find utility programs            ##################
    +# ###############################################################################
    +find_program(SED NAMES sed gsed)
     
    -find_program( SED NAMES sed gsed )
    -
    -################################################################################
    -##################                Load includes               ##################
    -################################################################################
    +# ###############################################################################
    +# #################                Load includes               ##################
    +# ###############################################################################
     
     # This include checks the symbols, etc.
    -include( CheckIncludesSymbols )
    +include(CheckIncludesSymbols)
     
     # These includes publish function names.
    -include( ProcessOptions )
    -include( WriteStaticModules_h )
    -include( CheckExtraCompilerFeatures )
    -include( ConfigureSummary )
    -include( GetTriple )
    +include(ProcessOptions)
    +include(WriteStaticModules_h)
    +include(CheckExtraCompilerFeatures)
    +include(ConfigureSummary)
    +include(GetTriple)
     
     # get triples arch-vendor-os
    -get_host_triple( NEST_HOST_TRIPLE NEST_HOST_ARCH NEST_HOST_VENDOR NEST_HOST_OS )
    -get_target_triple( NEST_TARGET_TRIPLE NEST_TARGET_ARCH NEST_TARGET_VENDOR NEST_TARGET_OS )
    +get_host_triple(NEST_HOST_TRIPLE NEST_HOST_ARCH NEST_HOST_VENDOR NEST_HOST_OS)
    +get_target_triple(NEST_TARGET_TRIPLE NEST_TARGET_ARCH NEST_TARGET_VENDOR NEST_TARGET_OS)
     
     # Process the command line arguments
     # IMPORTANT: Do not change the order of nest_process_with_python() and include( GNUInstallDirs )!
    -#            If NEST is built with Python, nest_process_with_python() defaults CMAKE_INSTALL_PREFIX
    -#            to the active virtual Python environment. This effects the inclusion
    -#            of GNUInstallDirs defining CMAKE_INSTALL_<dir> and CMAKE_INSTALL_FULL_<dir>.
    +# If NEST is built with Python, nest_process_with_python() defaults CMAKE_INSTALL_PREFIX
    +# to the active virtual Python environment. This effects the inclusion
    +# of GNUInstallDirs defining CMAKE_INSTALL_<dir> and CMAKE_INSTALL_FULL_<dir>.
     nest_process_with_python()
    -include( GNUInstallDirs )
    +include(GNUInstallDirs)
     nest_post_process_with_python()
     nest_process_with_std()
     nest_process_with_intel_compiler_flags()
    @@ -163,8 +162,8 @@ nest_process_with_optimize()
     nest_process_with_debug()
     
     nest_get_color_flags()
    -set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NEST_C_COLOR_FLAGS}" )
    -set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NEST_CXX_COLOR_FLAGS}" )
    +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NEST_C_COLOR_FLAGS}")
    +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NEST_CXX_COLOR_FLAGS}")
     
     # requires HAVE_LIBNEUROSIM
     nest_default_modules()
    @@ -185,101 +184,102 @@ nest_check_have_std_nan()
     nest_check_have_std_isnan()
     nest_check_random123()
     
    -################################################################################
    -##################           Create version string            ##################
    -################################################################################
    -
    -include( NestVersionInfo )
    +# ###############################################################################
    +# #################           Create version string            ##################
    +# ###############################################################################
    +include(NestVersionInfo)
     get_version_info()
     printInfo("-- NEST version: ${NEST_VERSION_STRING}")
     
    -################################################################################
    -##################         Enable Testing Targets             ##################
    -################################################################################
    +# ###############################################################################
    +# #################         Enable Testing Targets             ##################
    +# ###############################################################################
     enable_testing()
    -set( TEST_OPTS "" )
    +set(TEST_OPTS "")
     
    -if ( HAVE_PYTHON )
    -  set( TEST_OPTS "${TEST_OPTS};--with-python=${PYTHON}" )
    -endif ()
    +if(HAVE_PYTHON)
    +  set(TEST_OPTS "${TEST_OPTS};--with-python=${PYTHON}")
    +endif()
     
    -if ( HAVE_MUSIC )
    -  set( TEST_OPTS "${TEST_OPTS};--with-music=${MUSIC_EXECUTABLE}" )
    -endif ()
    +if(HAVE_MUSIC)
    +  set(TEST_OPTS "${TEST_OPTS};--with-music=${MUSIC_EXECUTABLE}")
    +endif()
     
    -add_custom_target( installcheck
    +add_custom_target(installcheck
       COMMAND ${CMAKE_COMMAND} -E env
    -    ${CMAKE_INSTALL_FULL_DATADIR}/testsuite/do_tests.sh
    -	--prefix=${CMAKE_INSTALL_PREFIX}
    -	--report-dir="${PROJECT_BINARY_DIR}/reports"
    -	${TEST_OPTS}
    +  ${CMAKE_INSTALL_FULL_DATADIR}/testsuite/do_tests.sh
    +  --prefix=${CMAKE_INSTALL_PREFIX}
    +  --report-dir="${PROJECT_BINARY_DIR}/reports"
    +  ${TEST_OPTS}
       WORKING_DIRECTORY "${PROJECT_BINARY_DIR}"
       COMMENT "Executing NEST's testsuite..."
     )
     
     # N.B. to ensure "make install" is always run before "make installcheck", we
     # would ideally like to add:
    -#   add_dependencies( installcheck install )
    +# add_dependencies( installcheck install )
     # However, an issue in CMake at time of writing (May 2020, see
     # https://gitlab.kitware.com/cmake/cmake/-/issues/8438) precludes us from doing
     # so.
     
    -################################################################################
    -##################        Define Subdirectories here          ##################
    -################################################################################
    -
    -add_subdirectory( doc )
    -add_subdirectory( bin )
    -add_subdirectory( examples )
    -add_subdirectory( build_support )
    -add_subdirectory( libnestutil )
    -add_subdirectory( models )
    -add_subdirectory( nestkernel )
    -add_subdirectory( thirdparty )
    -add_subdirectory( testsuite )
    -if ( HAVE_PYTHON )
    -  add_subdirectory( pynest )
    -endif ()
    -
    -################################################################################
    -##################           Summary of flags                 ##################
    -################################################################################
    +# ###############################################################################
    +# #################        Define Subdirectories here          ##################
    +# ###############################################################################
    +add_subdirectory(doc)
    +add_subdirectory(bin)
    +add_subdirectory(examples)
    +add_subdirectory(build_support)
    +add_subdirectory(libnestutil)
    +add_subdirectory(models)
    +add_subdirectory(nestkernel)
    +add_subdirectory(thirdparty)
    +add_subdirectory(testsuite)
    +
    +if(HAVE_PYTHON)
    +  add_subdirectory(pynest)
    +endif()
    +
    +# ###############################################################################
    +# #################           Summary of flags                 ##################
    +# ###############################################################################
     
     # used in nest-config
     
     # all compiler flags
    -if ( NOT CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" STREQUAL "None" )
    -  set( ALL_CFLAGS "${CMAKE_C_FLAGS}" )
    -  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS}" )
    -elseif ( ${CMAKE_BUILD_TYPE} STREQUAL "Debug" )
    -  set( ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_DEBUG}" )
    -  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}" )
    -elseif ( ${CMAKE_BUILD_TYPE} STREQUAL "Release" )
    -  set( ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_RELEASE}" )
    -  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}" )
    -elseif ( ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo" )
    -  set( ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_RELWITHDEBINFO}" )
    -  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
    -elseif ( ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel" )
    -  set( ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_MINSIZEREL}" )
    -  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}" )
    -else ()
    -  printError( "Unknown build type: '${CMAKE_BUILD_TYPE}'" )
    -endif ()
    -if ( with-defines )
    -  foreach ( def ${with-defines} )
    -    set( ALL_CFLAGS "${def} ${ALL_CFLAGS}" )
    -    set( ALL_CXXFLAGS "${def} ${ALL_CXXFLAGS}" )
    -  endforeach ()
    -endif ()
    +if(NOT CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" STREQUAL "None")
    +  set(ALL_CFLAGS "${CMAKE_C_FLAGS}")
    +  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS}")
    +elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
    +  set(ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_DEBUG}")
    +  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
    +elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release")
    +  set(ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_RELEASE}")
    +  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
    +elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
    +  set(ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
    +  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
    +elseif(${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel")
    +  set(ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_MINSIZEREL}")
    +  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}")
    +else()
    +  printError("Unknown build type: '${CMAKE_BUILD_TYPE}'")
    +endif()
    +
    +if(with-defines)
    +  foreach(def ${with-defines})
    +    set(ALL_CFLAGS "${def} ${ALL_CFLAGS}")
    +    set(ALL_CXXFLAGS "${def} ${ALL_CXXFLAGS}")
    +  endforeach()
    +endif()
    +
     # add sionlib defines
    -foreach ( def ${SIONLIB_DEFINES} )
    -    set( ALL_CFLAGS "${ALL_CFLAGS} ${def}" )
    -    set( ALL_CXXFLAGS "${ALL_CXXFLAGS} ${def}" )
    -endforeach ()
    +foreach(def ${SIONLIB_DEFINES})
    +  set(ALL_CFLAGS "${ALL_CFLAGS} ${def}")
    +  set(ALL_CXXFLAGS "${ALL_CXXFLAGS} ${def}")
    +endforeach()
     
     # libraries required to link extension modules
    -set( MODULE_LINK_LIBS
    +set(MODULE_LINK_LIBS
       "-lnestutil"
       "-lnestkernel"
       "${OpenMP_CXX_FLAGS}"
    @@ -290,21 +290,22 @@ set( MODULE_LINK_LIBS
       "${MUSIC_LIBRARIES}"
       "${MPI_CXX_LIBRARIES}"
       "${SIONLIB_LIBRARIES}"
    -  "${BOOST_LIBRARIES}" )
    +  "${BOOST_LIBRARIES}"
    +  "${HDF5_LIBRARIES}")
    +
    +if(with-libraries)
    +  set(MODULE_LINK_LIBS "${MODULE_LINK_LIBS};${with-libraries}")
    +endif()
     
    -if ( with-libraries )
    -  set( MODULE_LINK_LIBS "${MODULE_LINK_LIBS};${with-libraries}" )
    -endif ()
    -string( REPLACE ";" " " MODULE_LINK_LIBS "${MODULE_LINK_LIBS}" )
    +string(REPLACE ";" " " MODULE_LINK_LIBS "${MODULE_LINK_LIBS}")
     
     # libraries requied to link NEST
    -set( ALL_LIBS
    +set(ALL_LIBS
       "-lnest"
    -  ${MODULE_LINK_LIBS} )
    -
    +  ${MODULE_LINK_LIBS})
     
     # all includes
    -set( ALL_INCLUDES_tmp
    +set(ALL_INCLUDES_tmp
       "${CMAKE_INSTALL_FULL_INCLUDEDIR}/nest"
       "${LTDL_INCLUDE_DIRS}"
       "${READLINE_INCLUDE_DIRS}"
    @@ -312,56 +313,55 @@ set( ALL_INCLUDES_tmp
       "${LIBNEUROSIM_INCLUDE_DIRS}"
       "${MUSIC_INCLUDE_DIRS}"
       "${MPI_CXX_INCLUDE_PATH}"
    -  "${BOOST_INCLUDE_DIR}" )
    -set( ALL_INCLUDES "" )
    -foreach ( INC ${ALL_INCLUDES_tmp} ${with-includes} )
    -  if ( INC AND NOT INC STREQUAL "" )
    -    set( ALL_INCLUDES "${ALL_INCLUDES} -I${INC}" )
    -  endif ()
    -endforeach ()
    -set( ALL_INCLUDES "${ALL_INCLUDES} ${SIONLIB_INCLUDE}" )
    -
    -################################################################################
    -##################           File generation here             ##################
    -################################################################################
    +  "${BOOST_INCLUDE_DIR}")
    +set(ALL_INCLUDES "")
    +
    +foreach(INC ${ALL_INCLUDES_tmp} ${with-includes})
    +  if(INC AND NOT INC STREQUAL "")
    +    set(ALL_INCLUDES "${ALL_INCLUDES} -I${INC}")
    +  endif()
    +endforeach()
     
    +set(ALL_INCLUDES "${ALL_INCLUDES} ${SIONLIB_INCLUDE}")
    +
    +# ###############################################################################
    +# #################           File generation here             ##################
    +# ###############################################################################
     configure_file(
    -    "${PROJECT_SOURCE_DIR}/libnestutil/config.h.in"
    -    "${PROJECT_BINARY_DIR}/libnestutil/config.h" @ONLY
    +  "${PROJECT_SOURCE_DIR}/libnestutil/config.h.in"
    +  "${PROJECT_BINARY_DIR}/libnestutil/config.h" @ONLY
     )
     
     configure_file(
    -    "${PROJECT_SOURCE_DIR}/pynest/setup.py.in"
    -    "${PROJECT_BINARY_DIR}/pynest/setup.py" @ONLY
    +  "${PROJECT_SOURCE_DIR}/pynest/setup.py.in"
    +  "${PROJECT_BINARY_DIR}/pynest/setup.py" @ONLY
     )
     
     configure_file(
    -    "${PROJECT_SOURCE_DIR}/bin/nest-config.in"
    -    "${PROJECT_BINARY_DIR}/bin/nest-config" @ONLY
    +  "${PROJECT_SOURCE_DIR}/bin/nest-config.in"
    +  "${PROJECT_BINARY_DIR}/bin/nest-config" @ONLY
     )
     
     configure_file(
    -    "${PROJECT_SOURCE_DIR}/bin/nest_vars.sh.in"
    -    "${PROJECT_BINARY_DIR}/bin/nest_vars.sh" @ONLY
    +  "${PROJECT_SOURCE_DIR}/bin/nest_vars.sh.in"
    +  "${PROJECT_BINARY_DIR}/bin/nest_vars.sh" @ONLY
     )
     
     configure_file(
    -    "${PROJECT_SOURCE_DIR}/doc/fulldoc.conf.in"
    -    "${PROJECT_BINARY_DIR}/doc/fulldoc.conf" @ONLY
    +  "${PROJECT_SOURCE_DIR}/doc/fulldoc.conf.in"
    +  "${PROJECT_BINARY_DIR}/doc/fulldoc.conf" @ONLY
     )
     
     configure_file(
    -    "${PROJECT_SOURCE_DIR}/pynest/nest/versionchecker.py.in"
    -    "${PROJECT_BINARY_DIR}/pynest/nest/versionchecker.py" @ONLY
    +  "${PROJECT_SOURCE_DIR}/pynest/nest/versionchecker.py.in"
    +  "${PROJECT_BINARY_DIR}/pynest/nest/versionchecker.py" @ONLY
     )
     
    -
    -################################################################################
    -##################            Install Extra Files             ##################
    -################################################################################
    -
    -install( FILES LICENSE README.md
    -    DESTINATION ${CMAKE_INSTALL_DOCDIR}
    -    )
    +# ###############################################################################
    +# #################            Install Extra Files             ##################
    +# ###############################################################################
    +install(FILES LICENSE README.md
    +  DESTINATION ${CMAKE_INSTALL_DOCDIR}
    +)
     
     nest_print_config_summary()
    diff --git a/cmake/ConfigureSummary.cmake b/cmake/ConfigureSummary.cmake
    index 2b202774f7..50c37c33b1 100644
    --- a/cmake/ConfigureSummary.cmake
    +++ b/cmake/ConfigureSummary.cmake
    @@ -17,260 +17,289 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -function( NEST_PRINT_CONFIG_SUMMARY )
    +function(NEST_PRINT_CONFIG_SUMMARY)
       # set summary color: here please choose appropriate color!
    -  message( "${BoldCyan}" )
    -  message( "--------------------------------------------------------------------------------" )
    -  message( "NEST Configuration Summary" )
    -  message( "--------------------------------------------------------------------------------" )
    -  message( "" )
    -  if ( CMAKE_BUILD_TYPE )
    -    message( "Build type          : ${CMAKE_BUILD_TYPE}" )
    -  endif ()
    -  message( "Target System       : ${CMAKE_SYSTEM_NAME}" )
    -  message( "Cross Compiling     : ${CMAKE_CROSSCOMPILING}" )
    -  message( "C compiler          : ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} (${CMAKE_C_COMPILER})" )
    -  message( "C compiler flags    : ${ALL_CFLAGS}" )
    -  message( "C++ compiler        : ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} (${CMAKE_CXX_COMPILER})" )
    -  message( "C++ compiler flags  : ${ALL_CXXFLAGS}" )
    -  message( "Build dynamic       : ${BUILD_SHARED_LIBS}" )
    -
    -  message( "" )
    -  message( "Built-in modules    : ${SLI_MODULES}" )
    -  if ( external-modules )
    -    message( "User modules        : ${external-modules}" )
    -    foreach ( mod ${external-modules} )
    -      message( "  ${mod}:" )
    -      message( "    Header          : ${${mod}_EXT_MOD_INCLUDE}" )
    -      message( "    Library         : ${${mod}_EXT_MOD_LIBRARY}" )
    -    endforeach ()
    -  else ()
    -    message( "User modules        : None" )
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_PYTHON )
    -    message( "Python bindings     : Yes (Python ${Python_VERSION}: ${PYTHON})" )
    -    message( "    Includes        : ${Python_INCLUDE_DIRS}" )
    -    message( "    Libraries       : ${Python_LIBRARIES}" )
    -    if ( CYTHON_FOUND )
    -      message( "    Cython          : Yes (Cython ${CYTHON_VERSION}: ${CYTHON_EXECUTABLE})" )
    -    else ()
    -      message( "    Cython          : No. Make sure to cythonize `pynestkernel.pyx` manually." )
    -    endif ()
    -    if ( HAVE_MPI4PY )
    -      message( "    MPI4Py          : Yes (${PY_MPI4PY}/include)" )
    +  message("${BoldCyan}")
    +  message("--------------------------------------------------------------------------------")
    +  message("NEST Configuration Summary")
    +  message("--------------------------------------------------------------------------------")
    +  message("")
    +
    +  if(CMAKE_BUILD_TYPE)
    +    message("Build type          : ${CMAKE_BUILD_TYPE}")
    +  endif()
    +
    +  message("Target System       : ${CMAKE_SYSTEM_NAME}")
    +  message("Cross Compiling     : ${CMAKE_CROSSCOMPILING}")
    +  message("C compiler          : ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION} (${CMAKE_C_COMPILER})")
    +  message("C compiler flags    : ${ALL_CFLAGS}")
    +  message("C++ compiler        : ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} (${CMAKE_CXX_COMPILER})")
    +  message("C++ compiler flags  : ${ALL_CXXFLAGS}")
    +  message("Build dynamic       : ${BUILD_SHARED_LIBS}")
    +
    +  message("")
    +  message("Built-in modules    : ${SLI_MODULES}")
    +
    +  if(external-modules)
    +    message("User modules        : ${external-modules}")
    +
    +    foreach(mod ${external-modules})
    +      message("  ${mod}:")
    +      message("    Header          : ${${mod}_EXT_MOD_INCLUDE}")
    +      message("    Library         : ${${mod}_EXT_MOD_LIBRARY}")
    +    endforeach()
    +  else()
    +    message("User modules        : None")
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_PYTHON)
    +    message("Python bindings     : Yes (Python ${Python_VERSION}: ${PYTHON})")
    +    message("    Includes        : ${Python_INCLUDE_DIRS}")
    +    message("    Libraries       : ${Python_LIBRARIES}")
    +
    +    if(CYTHON_FOUND)
    +      message("    Cython          : Yes (Cython ${CYTHON_VERSION}: ${CYTHON_EXECUTABLE})")
         else()
    -      message( "    MPI4Py          : No " )
    -    endif ()
    -  else ()
    -    message( "Python bindings     : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( BUILD_DOCS )
    -    message( "Documentation       : Yes" )
    -    if ( BUILD_SPHINX_DOCS )
    -      message( "  Sphinx doc build  : Yes (${SPHINX_EXECUTABLE})" )
    +      message("    Cython          : No. Make sure to cythonize `pynestkernel.pyx` manually.")
    +    endif()
    +
    +    if(HAVE_MPI4PY)
    +      message("    MPI4Py          : Yes (${PY_MPI4PY}/include)")
    +    else()
    +      message("    MPI4Py          : No ")
    +    endif()
    +  else()
    +    message("Python bindings     : No")
    +  endif()
    +
    +  message("")
    +
    +  if(BUILD_DOCS)
    +    message("Documentation       : Yes")
    +
    +    if(BUILD_SPHINX_DOCS)
    +      message("  Sphinx doc build  : Yes (${SPHINX_EXECUTABLE})")
         else()
    -      message( "  Sphinx doc build  : No" )
    +      message("  Sphinx doc build  : No")
         endif()
    -    if ( BUILD_DOXYGEN_DOCS )
    -      message( "  Doxygen doc build : Yes (${DOXYGEN_EXECUTABLE})" )
    -      message( "    Graphviz        : Yes (${DOXYGEN_DOT_EXECUTABLE})" )
    +
    +    if(BUILD_DOXYGEN_DOCS)
    +      message("  Doxygen doc build : Yes (${DOXYGEN_EXECUTABLE})")
    +      message("    Graphviz        : Yes (${DOXYGEN_DOT_EXECUTABLE})")
         else()
    -      message( "  Doxygen doc build : No" )
    +      message("  Doxygen doc build : No")
    +    endif()
    +  else()
    +    message("Documentation       : No")
    +  endif()
    +
    +  message("")
    +
    +  if(OPENMP_FOUND)
    +    message("Use threading       : Yes (OpenMP: ${OpenMP_CXX_FLAGS})")
    +  else()
    +    message("Use threading       : No")
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_GSL)
    +    message("Use GSL             : Yes (GSL ${GSL_VERSION})")
    +    message("    Includes        : ${GSL_INCLUDE_DIRS}")
    +    message("    Libraries       : ${GSL_LIBRARIES}")
    +  else()
    +    message("Use GSL             : No")
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_READLINE)
    +    message("Use Readline        : Yes (GNU Readline ${READLINE_VERSION})")
    +    message("    Includes        : ${READLINE_INCLUDE_DIRS}")
    +    message("    Libraries       : ${READLINE_LIBRARIES}")
    +  else()
    +    message("Use Readline        : No")
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_LIBLTDL)
    +    message("Use libltdl         : Yes (LTDL ${LTDL_VERSION})")
    +    message("    Includes        : ${LTDL_INCLUDE_DIRS}")
    +    message("    Libraries       : ${LTDL_LIBRARIES}")
    +  else()
    +    message("Use libltdl         : No")
    +
    +    if(APPLE AND with-ltdl AND NOT static-libraries)
    +      message("                    : (OS X does not provide libltdl with its libtool.")
    +      message("                    :  If you require dynamic loading of user modules, please")
    +      message("                    :  install GNU libtool, e.g. via `brew install libtool`.)")
    +    endif()
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_MPI)
    +    message("Use MPI             : Yes (MPI: ${MPI_CXX_COMPILER})")
    +    message("    Includes        : ${MPI_CXX_INCLUDE_PATH}")
    +    message("    Libraries       : ${MPI_CXX_LIBRARIES}")
    +
    +    if(MPI_CXX_COMPILE_FLAGS)
    +      message("    Compile Flags   : ${MPI_CXX_COMPILE_FLAGS}")
    +    endif()
    +
    +    if(MPI_CXX_LINK_FLAGS)
    +      message("    Link Flags      : ${MPI_CXX_LINK_FLAGS}")
         endif()
    -  else ()
    -    message( "Documentation       : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( OPENMP_FOUND )
    -    message( "Use threading       : Yes (OpenMP: ${OpenMP_CXX_FLAGS})" )
    -  else ()
    -    message( "Use threading       : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_GSL )
    -    message( "Use GSL             : Yes (GSL ${GSL_VERSION})" )
    -    message( "    Includes        : ${GSL_INCLUDE_DIRS}" )
    -    message( "    Libraries       : ${GSL_LIBRARIES}" )
    -  else ()
    -    message( "Use GSL             : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_READLINE )
    -    message( "Use Readline        : Yes (GNU Readline ${READLINE_VERSION})" )
    -    message( "    Includes        : ${READLINE_INCLUDE_DIRS}" )
    -    message( "    Libraries       : ${READLINE_LIBRARIES}" )
    -  else ()
    -    message( "Use Readline        : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_LIBLTDL )
    -    message( "Use libltdl         : Yes (LTDL ${LTDL_VERSION})" )
    -    message( "    Includes        : ${LTDL_INCLUDE_DIRS}" )
    -    message( "    Libraries       : ${LTDL_LIBRARIES}" )
    -  else ()
    -    message( "Use libltdl         : No" )
    -    if ( APPLE AND with-ltdl AND NOT static-libraries )
    -      message( "                    : (OS X does not provide libltdl with its libtool." )
    -      message( "                    :  If you require dynamic loading of user modules, please" )
    -      message( "                    :  install GNU libtool, e.g. via `brew install libtool`.)" )
    -    endif ()
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_MPI )
    -    message( "Use MPI             : Yes (MPI: ${MPI_CXX_COMPILER})" )
    -    message( "    Includes        : ${MPI_CXX_INCLUDE_PATH}" )
    -    message( "    Libraries       : ${MPI_CXX_LIBRARIES}" )
    -    if ( MPI_CXX_COMPILE_FLAGS )
    -      message( "    Compile Flags   : ${MPI_CXX_COMPILE_FLAGS}" )
    -    endif ()
    -    if ( MPI_CXX_LINK_FLAGS )
    -      message( "    Link Flags      : ${MPI_CXX_LINK_FLAGS}" )
    -    endif ()
    -    set( MPI_LAUNCHER "${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} <np> ${MPIEXEC_PREFLAGS} <prog> ${MPIEXEC_POSTFLAGS} <args>" )
    +
    +    set(MPI_LAUNCHER "${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} <np> ${MPIEXEC_PREFLAGS} <prog> ${MPIEXEC_POSTFLAGS} <args>")
         string(REPLACE "  " " " MPI_LAUNCHER ${MPI_LAUNCHER})
    -    message( "    Launcher        : ${MPI_LAUNCHER}")
    -  else ()
    -    message( "Use MPI             : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( TIMER_DETAILED )
    -    message( "Detailed timers     : Yes" )
    -  else ()
    -    message( "Detailed timers     : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_MUSIC )
    -    message( "Use MUSIC           : Yes (MUSIC ${MUSIC_VERSION})" )
    -    message( "    Includes        : ${MUSIC_INCLUDE_DIRS}" )
    -    message( "    Libraries       : ${MUSIC_LIBRARIES}" )
    -  else ()
    -    message( "Use MUSIC           : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_LIBNEUROSIM )
    -    message( "Use libneurosim     : Yes (LibNeurosim ${LIBNEUROSIM_VERSION})" )
    -    message( "    Includes        : ${LIBNEUROSIM_INCLUDE_DIRS}" )
    -    message( "    Libraries       : ${LIBNEUROSIM_LIBRARIES}" )
    -  else ()
    -    message( "Use libneurosim     : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_BOOST )
    -    message( "Use Boost           : Yes (Boost ${BOOST_VERSION})" )
    -    message( "    Includes        : ${BOOST_INCLUDE_DIR}" )
    -    message( "    Libraries       : ${BOOST_LIBRARIES}" )
    -  else ()
    -    message( "Use Boost           : No" )
    -  endif ()
    -
    -  message( "" )
    -  if ( HAVE_SIONLIB )
    -    message( "Use SIONlib         : Yes (SIONlib ${SION_EXECUTABLE})")
    -    message( "    Includes        : ${SIONLIB_INCLUDE}" )
    -    message( "    Libraries       : ${SIONLIB_LIBRARIES}" )
    -  else ()
    -    message( "Use SIONlib         : No")
    -  endif ()
    -
    -  if ( HAVE_HDF5 )
    -    message( "Use sonata          : Yes (HDF5 ${HDF5_VERSION})" )
    -    message( "    Includes        : ${HDF5_INCLUDE_DIR}" )
    -    message( "    Libraries       : ${HDF5_LIBRARIES}" )
    -    message( "" )
    -  else ()
    -    message( "Use sonata          : No" )
    -  endif ()
    -
    -  if ( with-libraries )
    -    message( "" )
    -    message( "Additional libraries:" )
    -    foreach ( lib ${with-libraries} )
    -      message( "                     ${lib}" )
    -    endforeach ()
    -  endif ()
    -
    -  if ( with-includes )
    -    message( "" )
    -    message( "Additional includes:" )
    -    foreach ( inc ${with-includes} )
    -      message( "                     -I${inc}" )
    -    endforeach ()
    -  endif ()
    -
    -  if ( with-intel-compiler-flags AND NOT ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") )
    -    message( "" )
    -    message( "You have specified flags for the Intel compiler (-Dwith-intel-compiler-flags)," )
    -    message( "but the Intel compiler is not used. These flags are therefore ignored." )
    -  endif ()
    -
    -  if ( HAVE_MPI )
    -    message( "" )
    -    message( "For details on setting specific flags for your MPI launcher command, see the" )
    -    message( "CMake documentation at https://cmake.org/cmake/help/latest/module/FindMPI.html")
    -  endif ()
    -
    -  message( "" )
    -  message( "--------------------------------------------------------------------------------" )
    -  message( "" )
    -  message( "The NEST executable will be installed to:" )
    -  message( "  ${CMAKE_INSTALL_FULL_BINDIR}/" )
    -  message( "" )
    -  message( "NEST dynamic libraries and user modules will be installed to:" )
    -  message( "  ${CMAKE_INSTALL_FULL_LIBDIR}/nest/" )
    -  message( "" )
    -  if ( BUILD_DOCS )
    -    message( "Documentation and examples will be installed to:" )
    -    message( "  ${CMAKE_INSTALL_FULL_DOCDIR}/" )
    -    message( "" )
    +    message("    Launcher        : ${MPI_LAUNCHER}")
    +  else()
    +    message("Use MPI             : No")
    +  endif()
    +
    +  message("")
    +
    +  if(TIMER_DETAILED)
    +    message("Detailed timers     : Yes")
    +  else()
    +    message("Detailed timers     : No")
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_MUSIC)
    +    message("Use MUSIC           : Yes (MUSIC ${MUSIC_VERSION})")
    +    message("    Includes        : ${MUSIC_INCLUDE_DIRS}")
    +    message("    Libraries       : ${MUSIC_LIBRARIES}")
    +  else()
    +    message("Use MUSIC           : No")
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_LIBNEUROSIM)
    +    message("Use libneurosim     : Yes (LibNeurosim ${LIBNEUROSIM_VERSION})")
    +    message("    Includes        : ${LIBNEUROSIM_INCLUDE_DIRS}")
    +    message("    Libraries       : ${LIBNEUROSIM_LIBRARIES}")
    +  else()
    +    message("Use libneurosim     : No")
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_BOOST)
    +    message("Use Boost           : Yes (Boost ${BOOST_VERSION})")
    +    message("    Includes        : ${BOOST_INCLUDE_DIR}")
    +    message("    Libraries       : ${BOOST_LIBRARIES}")
    +  else()
    +    message("Use Boost           : No")
    +  endif()
    +
    +  message("")
    +
    +  if(HAVE_SIONLIB)
    +    message("Use SIONlib         : Yes (SIONlib ${SION_EXECUTABLE})")
    +    message("    Includes        : ${SIONLIB_INCLUDE}")
    +    message("    Libraries       : ${SIONLIB_LIBRARIES}")
    +  else()
    +    message("Use SIONlib         : No")
       endif()
    -  if ( HAVE_PYTHON )
    -    message( "PyNEST will be installed to:" )
    -    message( "    ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}" )
    -    message( "" )
    -  endif ()
    -  message( "To set necessary environment variables, add the following line" )
    -  message( "to your ~/.bashrc :" )
    -  message( "  source ${CMAKE_INSTALL_FULL_BINDIR}/nest_vars.sh" )
    -  message( "" )
    -  message( "--------------------------------------------------------------------------------" )
    -  message( "" )
    -
    -  if ( NOT HAVE_GSL )
    -    message( "" )
    -    message( "ATTENTION!" )
    -    message( "You are about to compile NEST without the GNU Scientific" )
    -    message( "Library or your GSL is too old (before v1.11). This means" )
    -    message( "that conductance-based neuron models and some random number" )
    -    message( "generators will not be available." )
    -    message( "" )
    -    message( "--------------------------------------------------------------------------------" )
    -    message( "" )
    -  endif ()
    -
    -  message( "You can now build and install NEST with" )
    -  message( "  make" )
    -  message( "  make install" )
    -  message( "  make installcheck" )
    -  message( "" )
    -
    -  message( "If you experience problems with the installation or the use of NEST," )
    -  message( "please see https://www.nest-simulator.org/frequently_asked_questions" )
    -  message( "or go to https://www.nest-simulator.org/community to find out how to" )
    -  message( "join the user mailing list." )
    +
    +  if(HAVE_HDF5)
    +    message("Use SONATA          : Yes (HDF5 ${HDF5_VERSION})")
    +    message("    Includes        : ${HDF5_INCLUDE_DIR}")
    +    message("    Libraries       : ${HDF5_LIBRARIES}")
    +    message("")
    +  else()
    +    message("Use SONATA          : No")
    +  endif()
    +
    +  if(with-libraries)
    +    message("")
    +    message("Additional libraries:")
    +
    +    foreach(lib ${with-libraries})
    +      message("                     ${lib}")
    +    endforeach()
    +  endif()
    +
    +  if(with-includes)
    +    message("")
    +    message("Additional includes:")
    +
    +    foreach(inc ${with-includes})
    +      message("                     -I${inc}")
    +    endforeach()
    +  endif()
    +
    +  if(with-intel-compiler-flags AND NOT("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
    +    message("")
    +    message("You have specified flags for the Intel compiler (-Dwith-intel-compiler-flags),")
    +    message("but the Intel compiler is not used. These flags are therefore ignored.")
    +  endif()
    +
    +  if(HAVE_MPI)
    +    message("")
    +    message("For details on setting specific flags for your MPI launcher command, see the")
    +    message("CMake documentation at https://cmake.org/cmake/help/latest/module/FindMPI.html")
    +  endif()
    +
    +  message("")
    +  message("--------------------------------------------------------------------------------")
    +  message("")
    +  message("The NEST executable will be installed to:")
    +  message("  ${CMAKE_INSTALL_FULL_BINDIR}/")
    +  message("")
    +  message("NEST dynamic libraries and user modules will be installed to:")
    +  message("  ${CMAKE_INSTALL_FULL_LIBDIR}/nest/")
    +  message("")
    +
    +  if(BUILD_DOCS)
    +    message("Documentation and examples will be installed to:")
    +    message("  ${CMAKE_INSTALL_FULL_DOCDIR}/")
    +    message("")
    +  endif()
    +
    +  if(HAVE_PYTHON)
    +    message("PyNEST will be installed to:")
    +    message("    ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}")
    +    message("")
    +  endif()
    +
    +  message("To set necessary environment variables, add the following line")
    +  message("to your ~/.bashrc :")
    +  message("  source ${CMAKE_INSTALL_FULL_BINDIR}/nest_vars.sh")
    +  message("")
    +  message("--------------------------------------------------------------------------------")
    +  message("")
    +
    +  if(NOT HAVE_GSL)
    +    message("")
    +    message("ATTENTION!")
    +    message("You are about to compile NEST without the GNU Scientific")
    +    message("Library or your GSL is too old (before v1.11). This means")
    +    message("that conductance-based neuron models and some random number")
    +    message("generators will not be available.")
    +    message("")
    +    message("--------------------------------------------------------------------------------")
    +    message("")
    +  endif()
    +
    +  message("You can now build and install NEST with")
    +  message("  make")
    +  message("  make install")
    +  message("  make installcheck")
    +  message("")
    +
    +  message("If you experience problems with the installation or the use of NEST,")
    +  message("please see https://www.nest-simulator.org/frequently_asked_questions")
    +  message("or go to https://www.nest-simulator.org/community to find out how to")
    +  message("join the user mailing list.")
     
       # reset output color
    -  message( "${Reset}" )
    +  message("${Reset}")
     endfunction()
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index 25da01a757..4fd4085a7b 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -58,6 +58,7 @@ set(nestkernel_sources
       ring_buffer.h ring_buffer_impl.h ring_buffer.cpp
       secondary_event.h
       slice_ring_buffer.cpp slice_ring_buffer.h
    +  sonata_connector.cpp sonata_connector.h
       spikecounter.h spikecounter.cpp
       stimulation_device.h stimulation_device.cpp
       target_identifier.h
    @@ -204,7 +205,7 @@ endif()
     
     target_link_libraries(nestkernel
       nestutil
    -  ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES}
    +  ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES} ${HDF5_LIBRARIES}
     )
     
     target_include_directories(nestkernel PRIVATE
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 94c314ac45..3b7ae4ca9d 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -17,42 +17,41 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -if ( HAVE_PYTHON )
    +if(HAVE_PYTHON)
    +  if(CYTHON_FOUND)
    +    include(UseCython)
    +    set_source_files_properties(nestkernel_api.pyx PROPERTIES CYTHON_IS_CXX TRUE)
    +    cython_add_module(nestkernel_api nestkernel_api.pyx)
    +  else()
    +    message(FATAL_ERROR "Building PyNEST requires Cython.")
    +  endif()
     
    -  if ( CYTHON_FOUND )
    -    include( UseCython )
    -    set_source_files_properties( nestkernel_api.pyx PROPERTIES CYTHON_IS_CXX TRUE )
    -    cython_add_module( nestkernel_api nestkernel_api.pyx )
    -  else ()
    -    message( FATAL_ERROR "Building PyNEST requires Cython." )
    -  endif ()
    -
    -  target_link_libraries( nestkernel_api
    -      nestutil nestkernel
    -      ${SLI_MODULES} ${EXTERNAL_MODULE_LIBRARIES}
    -      )
    +  target_link_libraries(nestkernel_api
    +    nestutil nestkernel
    +    ${EXTERNAL_MODULE_LIBRARIES}
    +  )
     
    -  target_include_directories( nestkernel_api PRIVATE
    -      ${PROJECT_BINARY_DIR}/libnestutil
    -      ${PROJECT_SOURCE_DIR}/libnestutil
    -      ${PROJECT_SOURCE_DIR}/pynest
    -      ${PROJECT_SOURCE_DIR}/nestkernel
    -      ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    -      ${PROJECT_SOURCE_DIR}/thirdparty
    -      ${SLI_MODULE_INCLUDE_DIRS}
    -      ${Python_INCLUDE_DIRS}
    -      )
    +  target_include_directories(nestkernel_api PRIVATE
    +    ${PROJECT_BINARY_DIR}/libnestutil
    +    ${PROJECT_SOURCE_DIR}/libnestutil
    +    ${PROJECT_SOURCE_DIR}/pynest
    +    ${PROJECT_SOURCE_DIR}/nestkernel
    +    ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    +    ${PROJECT_SOURCE_DIR}/thirdparty
    +    ${SLI_MODULE_INCLUDE_DIRS}
    +    ${Python_INCLUDE_DIRS}
    +  )
     
    -  target_compile_definitions( nestkernel_api PRIVATE
    -      -D_IS_PYNEST
    -      )
    +  target_compile_definitions(nestkernel_api PRIVATE
    +    -D_IS_PYNEST
    +  )
     
    -  install(DIRECTORY  nest/ ${PROJECT_BINARY_DIR}/pynest/nest/
    -      DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest
    -      PATTERN "versionchecker.py.in" EXCLUDE
    +  install(DIRECTORY nest/ ${PROJECT_BINARY_DIR}/pynest/nest/
    +    DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest
    +    PATTERN "versionchecker.py.in" EXCLUDE
       )
    -  install( TARGETS nestkernel_api DESTINATION ${PYEXECDIR}/nest/ )
    -  install( CODE "
    +  install(TARGETS nestkernel_api DESTINATION ${PYEXECDIR}/nest/)
    +  install(CODE "
           execute_process(
               COMMAND ${PYTHON} ${CMAKE_CURRENT_BINARY_DIR}/setup.py install_egg_info
                 --install-dir=${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}
    @@ -68,8 +67,7 @@ if ( HAVE_PYTHON )
           "
       )
     
    -  install( DIRECTORY examples/
    -      DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/pynest
    +  install(DIRECTORY examples/
    +    DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/pynest
       )
    -
    -endif ()
    +endif()
    
    From a68f6aa9059f9a664acf351834c2ce81f4fa016d Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 3 Mar 2023 15:24:50 +0100
    Subject: [PATCH 128/375] Add SONATA connector
    
    ---
     nestkernel/nest.cpp       | 6 ++++++
     nestkernel/nest.h         | 3 +++
     pynest/nestkernel_api.pxd | 1 +
     pynest/nestkernel_api.pyx | 5 ++++-
     4 files changed, 14 insertions(+), 1 deletion(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index f5a9e6e18e..39fe6e06de 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -678,6 +678,12 @@ connect_arrays( long* sources,
       kernel().connection_manager.connect_arrays( sources, targets, weights, delays, p_keys, p_values, n, syn_model );
     }
     
    +void
    +connect_sonata( const dictionary& graph_specs, const long chunk_size )
    +{
    +  kernel().connection_manager.connect_sonata( graph_specs, chunk_size );
    +}
    +
     std::deque< ConnectionID >
     get_connections( const dictionary& dict )
     {
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 5bc7f1cf56..f2fd8a7af9 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -158,6 +158,9 @@ void connect_arrays( long* sources,
       size_t n,
       std::string syn_model );
     
    +
    +void connect_sonata( const dictionary& graph_specs, const long chunk_size );
    +
     std::deque< ConnectionID > get_connections( const dictionary& dict );
     
     void disconnect( const std::deque< ConnectionID >& conns );
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index b9dc6bb676..24623774ff 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -164,6 +164,7 @@ cdef extern from "nest.h" namespace "nest":
         NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except +
         NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except +
         void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except +
    +    void connect_sonata( const dictionary& graph_specs, const long chunk_size ) except +
         vector[double] apply( const ParameterPTR param, const NodeCollectionPTR nc ) except +
         vector[double] apply( const ParameterPTR param, const dictionary& positions ) except +
     
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 843fba00f2..1f73d0f6bc 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -464,9 +464,12 @@ def llapi_disconnect_syncoll(object conns):
     
     @catch_cpp_error
     def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, object projections):
    -    print("### 9", projections)
         connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections))
     
    +@catch_cpp_error
    +def llapi_connect_sonata(object graph_specs, long chunk_size):
    +    connect_sonata(pydict_to_dictionary(graph_specs), chunk_size)
    +
     @catch_cpp_error
     def llapi_create_mask(object specs):
         cdef dictionary specs_dictionary = pydict_to_dictionary(specs)
    
    From 5149492c71e4cada4b13382dc37b96f9c9694e0a Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 3 Mar 2023 15:25:55 +0100
    Subject: [PATCH 129/375] Ease type restriction of n (number of nodes) to also
     include np.int_
    
    ---
     pynest/nest/lib/hl_api_nodes.py | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index 0fd33bec6d..18806faeac 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -24,8 +24,9 @@
     """
     
     import warnings
    -
     import nest
    +import numpy as np
    +
     from ..ll_api import *
     from .. import nestkernel_api as nestkernel
     from .hl_api_helper import is_iterable, model_deprecation_warning
    @@ -94,7 +95,7 @@ def Create(model, n=1, params=None, positions=None):
         # we can pass the parameter specification to SLI when the nodes are created.
         iterable_or_parameter_in_params = True
     
    -    if not isinstance(n, int):
    +    if not isinstance(n, (int, np.integer)):
             raise TypeError('n must be an integer')
     
         # PYNEST-NG: can we support the usecase above by passing the dict into ll_create?
    
    From 24982b2aa152500902865277aabe013fa00ecaa9 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 3 Mar 2023 15:27:13 +0100
    Subject: [PATCH 130/375] Prepare SONATA connector for the next generation
    
    ---
     nestkernel/sonata_connector.cpp   | 15 +++++++++++++--
     pynest/examples/sonata_network.py | 31 ++++++++++++++++++-------------
     pynest/nest/lib/hl_api_sonata.py  | 20 ++++++++++----------
     3 files changed, 41 insertions(+), 25 deletions(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index 5be5947e0c..0ba34db4d7 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -28,6 +28,7 @@
     // C++ includes:
     #include <boost/any.hpp> // TODO: probably not needed if boost::any_cast goes away
     #include <cstdlib>       // for div()
    +#include <iostream>      // for debugging
     #include <string>
     #include <vector>
     
    @@ -98,6 +99,7 @@ SonataConnector::connect()
       // auto edges_container = graph_specs_[ "edges" ];
       // auto edges_container = graph_specs_.at( "edges" );
       auto edges_container = boost::any_cast< std::vector< dictionary > >( graph_specs_.at( "edges" ) );
    +  // std::vector< dictionary > edges_container = graph_specs_.at( "edges" );
     
     
       // Iterate edge files
    @@ -539,7 +541,16 @@ SonataConnector::create_edge_type_id_2_syn_spec_( dictionary edge_params )
     {
       for ( auto& syn_kv_pair : edge_params )
       {
    -    const auto type_id = std::stoi( syn_kv_pair.first );
    +    std::cerr << "Before conversion\n";
    +    std::cerr << "The value: " << syn_kv_pair.first << "\n";
    +    std::cerr << "The value: " << boost::any_cast< std::string >( syn_kv_pair.first ) << "\n";
    +
    +    // const auto type_id = std::stoi( syn_kv_pair.first );
    +    // const auto type_id = boost::any_cast< int >( syn_kv_pair.first );
    +    const int type_id = std::stoi( boost::any_cast< std::string >( syn_kv_pair.first ) );
    +    std::cerr << "After conversion\n";
    +
    +
         auto d = boost::any_cast< dictionary >( syn_kv_pair.second );
         const auto syn_name = boost::any_cast< std::string >( d.at( "synapse_model" ) );
     
    @@ -555,7 +566,7 @@ void
     SonataConnector::set_synapse_params_( dictionary syn_dict, index synapse_model_id, int type_id )
     {
       auto syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
    -  // TODO: skip_syn_params_ only needs to be defined once somewhere
    +  // TODO: skip_syn_params_ only needs to be defined once somewhere, probably best in .h file
       std::set< std::string > skip_syn_params_ = {
         names::weight, names::delay, names::min_delay, names::max_delay, names::num_connections, names::synapse_model
       };
    diff --git a/pynest/examples/sonata_network.py b/pynest/examples/sonata_network.py
    index 1729c202db..8c2ca57cfa 100644
    --- a/pynest/examples/sonata_network.py
    +++ b/pynest/examples/sonata_network.py
    @@ -57,9 +57,13 @@
     
     n_procs = 1
     n_threads = 1
    -nest.set(total_num_virtual_procs=n_procs * n_threads,
    -         print_time=True)
    -
    +''' 
    +nest.set(total_num_virtual_procs=n_procs * n_threads, print_time=True)
    +'''
    +'''
    +nest.SetKernelStatus({"total_num_virtual_procs": n_procs * n_threads,
    +                      "print_time": True})
    +'''
     ###############################################################################
     # Specify the path to the SONATA .json configuration file(s).
     # The `300_pointneurons` model has two configuration files: one network and
    @@ -98,15 +102,16 @@
     # the created :py:class:`.NodeCollection`\s. The population names are the
     # dictionary keys.
     
    +#node_collections = sonata_net.Create()
     node_collections = sonata_net.BuildNetwork(chunk_size=2**20)
     
     ###############################################################################
     # We can now verify whether the built network has the expected number of
     # nodes and connections.
     
    -kernel_status = nest.GetKernelStatus()
    -print(f"number of nodes: {kernel_status['network_size']:,}")
    -print(f"number of connections: {kernel_status['num_connections']:,}")
    +#kernel_status = nest.GetKernelStatus()
    +#print(f"number of nodes: {kernel_status['network_size']:,}")
    +#print(f"number of connections: {kernel_status['num_connections']:,}")
     
     ###############################################################################
     # NEST does not currently support SONATA Spike Train Reports or utilize other
    @@ -120,21 +125,21 @@
     # by using the internal population's name. Then we slice the :py:class:`.NodeCollection`
     # with a list specifying the node ids of the neurons we wish to record from.
     
    -s_rec = nest.Create("spike_recorder")
    -pop_name = "internal"
    -record_node_ids = [1, 80, 160, 240, 270]
    -nest.Connect(node_collections[pop_name][record_node_ids], s_rec)
    +#s_rec = nest.Create("spike_recorder")
    +#pop_name = "internal"
    +#record_node_ids = [1, 80, 160, 240, 270]
    +#nest.Connect(node_collections[pop_name][record_node_ids], s_rec)
     
     ###############################################################################
     # Finally, we call the membership function :py:meth:`~.SonataNetwork.Simulate`
     # to simulate the network. Note that the simulation time and resolution are
     # expected to be provided in the SONATA config.
     
    -sonata_net.Simulate()
    +# sonata_net.Simulate()
     
     ###############################################################################
     # After the simulation has finished, we can obtain the data recorded by the
     # spike recorder for further analysis.
     
    -nest.raster_plot.from_device(s_rec)
    -plt.show()
    +# nest.raster_plot.from_device(s_rec)
    +# plt.show()
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index 4c8ed72b49..590b6852fe 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -26,12 +26,13 @@
     import itertools
     from pathlib import Path, PurePath
     
    -from .. import pynestkernel as kernel
    -#from ..ll_api import sps, sr, sli_func
    +from .. import nestkernel_api as nestkernel
     from .hl_api_models import GetDefaults
     from .hl_api_nodes import Create
     from .hl_api_simulation import SetKernelStatus, Simulate
     from .hl_api_types import NodeCollection
    +from .hl_api_exceptions import NESTError
    +
     
     try:
         import h5py
    @@ -39,6 +40,7 @@
     except ImportError:
         have_h5py = False
     
    +# TODO
     #have_hdf5 = sli_func("statusdict/have_hdf5 ::")
     have_hdf5 = True
     
    @@ -104,11 +106,11 @@ def __init__(self, config, sim_config=None):
             if not have_hdf5:
                 msg = ("SonataNetwork unavailable because NEST was compiled "
                        "without HDF5 support")
    -            raise kernel.NESTError(msg)
    +            raise NESTError(msg)
             if not have_h5py:
                 msg = ("SonataNetwork unavailable because h5py is not installed "
                        "or could not be imported")
    -            raise kernel.NESTError(msg)
    +            raise NESTError(msg)
     
             self._node_collections = {}
             self._edges_maps = []
    @@ -130,7 +132,7 @@ def __init__(self, config, sim_config=None):
                        "file")
                 raise ValueError(msg)
     
    -        SetKernelStatus({"resolution": self._conf["run"]["dt"]})
    +        #SetKernelStatus({"resolution": self._conf["run"]["dt"]})
     
         def _parse_config(self, config):
             """Parse JSON configuration file.
    @@ -432,7 +434,7 @@ def Connect(self, chunk_size=None):
             if not self._is_nodes_created:
                 msg = ("The SONATA network nodes must be created before any "
                        "connections can be made")
    -            raise kernel.NESTError(msg)
    +            raise NESTError(msg)
     
             if chunk_size is None:
                 chunk_size = self._chunk_size_default
    @@ -449,9 +451,7 @@ def Connect(self, chunk_size=None):
                 except BlockingIOError as err:
                     raise BlockingIOError(f"{err.strerror} for {os.path.realpath(d['edges_file'])}") from None
     
    -#        sps(graph_specs)
    -#        sps(chunk_size)
    -#        sr("ConnectSonata")
    +        nestkernel.llapi_connect_sonata(graph_specs, chunk_size)
     
             self._is_network_built = True
     
    @@ -633,7 +633,7 @@ def Simulate(self):
             if not self._is_network_built:
                 msg = ("The SONATA network must be built before a simulation "
                        "can be done")
    -            raise kernel.NESTError(msg)
    +            raise NESTError(msg)
     
             if "tstop" in self._conf["run"]:
                 T_sim = self._conf["run"]["tstop"]
    
    From d3b03bb3cc5720855608b69d8efc0655f223d13a Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Mon, 6 Mar 2023 11:14:57 +0100
    Subject: [PATCH 131/375] Add more casts to cython conversion table
    
    ---
     pynest/nestkernel_api.pyx | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 1f73d0f6bc..64ddd7eaa9 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -45,6 +45,7 @@ import numpy
     
     
     from libc.stdlib cimport malloc, free
    +from libc.stdint cimport uint64_t, int64_t
     
     
     def init(args):
    @@ -133,6 +134,10 @@ cdef object any_to_pyobj(any operand):
             return any_cast[long](operand)
         if is_type[size_t](operand):
             return any_cast[size_t](operand)
    +    if is_type[uint64_t](operand):
    +        return any_cast[uint64_t](operand)
    +    if is_type[int64_t](operand):
    +        return any_cast[int64_t](operand)
         if is_type[double](operand):
             return any_cast[double](operand)
         if is_type[cbool](operand):
    
    From 0ac89cc7af8c8a512ca0bad2ac7091d353057419 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Mon, 6 Mar 2023 11:16:19 +0100
    Subject: [PATCH 132/375] Bug hunting: not possible to cast dict key to int
    
    ---
     nestkernel/sonata_connector.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index 0ba34db4d7..948c06cc65 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -547,7 +547,7 @@ SonataConnector::create_edge_type_id_2_syn_spec_( dictionary edge_params )
     
         // const auto type_id = std::stoi( syn_kv_pair.first );
         // const auto type_id = boost::any_cast< int >( syn_kv_pair.first );
    -    const int type_id = std::stoi( boost::any_cast< std::string >( syn_kv_pair.first ) );
    +    const auto type_id = std::stoi( boost::any_cast< std::string >( syn_kv_pair.first ) );
         std::cerr << "After conversion\n";
     
     
    
    From 99da325f997a826af9625851e527a19fc8f896ee Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Mon, 6 Mar 2023 13:32:22 +0100
    Subject: [PATCH 133/375] Add more conversions to Cython table
    
    ---
     pynest/nestkernel_api.pyx | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 843fba00f2..50d047e831 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -45,6 +45,7 @@ import numpy
     
     
     from libc.stdlib cimport malloc, free
    +from libc.stdint cimport uint64_t, int64_t
     
     
     def init(args):
    @@ -133,6 +134,10 @@ cdef object any_to_pyobj(any operand):
             return any_cast[long](operand)
         if is_type[size_t](operand):
             return any_cast[size_t](operand)
    +    if is_type[uint64_t](operand):
    +        return any_cast[uint64_t](operand)
    +    if is_type[int64_t](operand):
    +        return any_cast[int64_t](operand)
         if is_type[double](operand):
             return any_cast[double](operand)
         if is_type[cbool](operand):
    
    From 464f37f99a07f21721effb6eef7412ba521ab472 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Mon, 6 Mar 2023 15:24:50 +0100
    Subject: [PATCH 134/375] Add missing overrides
    
    ---
     nestkernel/conn_parameter.h |  4 +---
     nestkernel/growth_curve.h   | 10 ++++++----
     nestkernel/proxynode.h      |  2 +-
     3 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/nestkernel/conn_parameter.h b/nestkernel/conn_parameter.h
    index 9854989318..3e70d81ea3 100644
    --- a/nestkernel/conn_parameter.h
    +++ b/nestkernel/conn_parameter.h
    @@ -231,7 +231,6 @@ class ScalarIntegerParameter : public ConnParameter
      * - All parameters are  doubles, thus calling the function value_int()
      *   throws an error.
      */
    -
     class ArrayDoubleParameter : public ConnParameter
     {
     public:
    @@ -274,7 +273,7 @@ class ArrayDoubleParameter : public ConnParameter
       }
     
       long
    -  value_int( thread, RngPtr, index, Node* ) const
    +  value_int( thread, RngPtr, index, Node* ) const override
       {
         throw KernelException( "ConnParameter calls value function with false return type." );
       }
    @@ -313,7 +312,6 @@ class ArrayDoubleParameter : public ConnParameter
      * - All parameters are integer, thus calling the function value_double()
      *   throws an error.
      */
    -
     class ArrayLongParameter : public ConnParameter
     {
     public:
    diff --git a/nestkernel/growth_curve.h b/nestkernel/growth_curve.h
    index 749438013b..b4738d0f9c 100644
    --- a/nestkernel/growth_curve.h
    +++ b/nestkernel/growth_curve.h
    @@ -128,7 +128,8 @@ class GrowthCurveLinear : public GrowthCurve
       void get( dictionary& d ) const override;
       void set( const dictionary& d ) override;
     
    -  double update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const;
    +  double
    +  update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const override;
     
     private:
       double eps_;
    @@ -213,10 +214,11 @@ class GrowthCurveGaussian : public GrowthCurve
     {
     public:
       GrowthCurveGaussian();
    -  void get( dictionary& d ) const;
    -  void set( const dictionary& d );
    +  void get( dictionary& d ) const override;
    +  void set( const dictionary& d ) override;
     
    -  double update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const;
    +  double
    +  update( double t, double t_minus, double Ca_minus, double z, double tau_Ca, double growth_rate ) const override;
     
     private:
       double eta_;
    diff --git a/nestkernel/proxynode.h b/nestkernel/proxynode.h
    index be1ff73ca8..8fe3bff936 100644
    --- a/nestkernel/proxynode.h
    +++ b/nestkernel/proxynode.h
    @@ -90,7 +90,7 @@ class proxynode : public Node
       void sends_secondary_event( DelayedRateConnectionEvent& ) override;
     
       void
    -  handle( SpikeEvent& )
    +  handle( SpikeEvent& ) override
       {
       }
     
    
    From 59596507b791bf2bb240a051cdd020da6ee5e2b8 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 7 Mar 2023 11:26:19 +0100
    Subject: [PATCH 135/375] Add missing comma
    
    ---
     pynest/examples/aeif_cond_beta_multisynapse.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/pynest/examples/aeif_cond_beta_multisynapse.py b/pynest/examples/aeif_cond_beta_multisynapse.py
    index d1d8763ffe..d14b510622 100644
    --- a/pynest/examples/aeif_cond_beta_multisynapse.py
    +++ b/pynest/examples/aeif_cond_beta_multisynapse.py
    @@ -32,7 +32,7 @@
     neuron = nest.Create('aeif_cond_beta_multisynapse', params={
         "V_peak": 0.0,
         "a": 4.0,
    -    "b": 80.5
    +    "b": 80.5,
         'E_rev': [0.0, 0.0, 0.0, -85.0],
         'tau_decay': [50.0, 20.0, 20.0, 20.0],
         'tau_rise': [10.0, 10.0, 1.0, 1.0],
    
    From 6c0a98d76111f4f0d5691fdc20d50b1931aab4be Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 7 Mar 2023 11:27:54 +0100
    Subject: [PATCH 136/375] Small optimization and cleanup
    
    ---
     nestkernel/sonata_connector.cpp | 42 +++++++++++----------------------
     nestkernel/sonata_connector.h   |  3 +++
     2 files changed, 17 insertions(+), 28 deletions(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index 948c06cc65..cc028fc8d6 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -95,18 +95,17 @@ SonataConnector::connect()
       */
       // clang-format on
     
    -
    -  // auto edges_container = graph_specs_[ "edges" ];
    -  // auto edges_container = graph_specs_.at( "edges" );
       auto edges_container = boost::any_cast< std::vector< dictionary > >( graph_specs_.at( "edges" ) );
    -  // std::vector< dictionary > edges_container = graph_specs_.at( "edges" );
    +
    +  // synapse-specific parameters that should be skipped when we set default synapse parameters
    +  skip_syn_params_ = {
    +    names::weight, names::delay, names::min_delay, names::max_delay, names::num_connections, names::synapse_model
    +  };
     
     
       // Iterate edge files
       for ( auto edge_dict : edges_container )
       {
    -
    -    // cur_fname_ = edge_dict[ "edges_file" ];
         cur_fname_ = boost::any_cast< std::string >( edge_dict.at( "edges_file" ) );
     
     
    @@ -432,8 +431,6 @@ SonataConnector::connect_chunk_( const hsize_t chunk_size, const hsize_t offset
             const thread target_thread = target->get_thread();
     
             const auto edge_type_id = edge_type_id_data_subset[ i ];
    -
    -        // const auto syn_spec = cur_edge_params_[ std::to_string( edge_type_id ) ];
             const auto syn_spec = boost::any_cast< dictionary >( cur_edge_params_.at( std::to_string( edge_type_id ) ) );
     
             const double weight =
    @@ -541,16 +538,7 @@ SonataConnector::create_edge_type_id_2_syn_spec_( dictionary edge_params )
     {
       for ( auto& syn_kv_pair : edge_params )
       {
    -    std::cerr << "Before conversion\n";
    -    std::cerr << "The value: " << syn_kv_pair.first << "\n";
    -    std::cerr << "The value: " << boost::any_cast< std::string >( syn_kv_pair.first ) << "\n";
    -
    -    // const auto type_id = std::stoi( syn_kv_pair.first );
    -    // const auto type_id = boost::any_cast< int >( syn_kv_pair.first );
         const auto type_id = std::stoi( boost::any_cast< std::string >( syn_kv_pair.first ) );
    -    std::cerr << "After conversion\n";
    -
    -
         auto d = boost::any_cast< dictionary >( syn_kv_pair.second );
         const auto syn_name = boost::any_cast< std::string >( d.at( "synapse_model" ) );
     
    @@ -565,12 +553,7 @@ SonataConnector::create_edge_type_id_2_syn_spec_( dictionary edge_params )
     void
     SonataConnector::set_synapse_params_( dictionary syn_dict, index synapse_model_id, int type_id )
     {
    -  auto syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
    -  // TODO: skip_syn_params_ only needs to be defined once somewhere, probably best in .h file
    -  std::set< std::string > skip_syn_params_ = {
    -    names::weight, names::delay, names::min_delay, names::max_delay, names::num_connections, names::synapse_model
    -  };
    -
    +  dictionary syn_defaults = kernel().model_manager.get_connector_defaults( synapse_model_id );
       ConnParameterMap synapse_params;
     
       for ( auto& syn_kv_pair : syn_defaults )
    @@ -593,7 +576,10 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, index synapse_model_i
       // create it here once to avoid re-creating the object over and over again.
       // TODO: See if nullptr can be changed to dictionary
       // edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads(), nullptr );
    -  edge_type_id_2_param_dicts_.at( type_id ).resize( kernel().vp_manager.get_num_threads() );
    +
    +  // std::to_string()
    +  edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads() );
    +  // edge_type_id_2_param_dicts_.at( type_id ).resize( kernel().vp_manager.get_num_threads() );
     
       edge_type_id_2_syn_spec_[ type_id ] = synapse_params;
     
    @@ -612,13 +598,13 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, index synapse_model_i
         {
           if ( param.second->provides_long() )
           {
    -        //( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = 0;
    -        edge_type_id_2_param_dicts_.at( type_id ).at( tid ).at( param.first ) = 0;
    +        long tmp_val = 0;
    +        edge_type_id_2_param_dicts_.at( type_id ).at( tid )[ param.first ] = tmp_val;
           }
           else
           {
    -        //( *edge_type_id_2_param_dicts_.at( type_id ).at( tid ) )[ param.first ] = 0.0;
    -        edge_type_id_2_param_dicts_.at( type_id ).at( tid ).at( param.first ) = 0.0;
    +        std::cerr << param.first << " provides double\n";
    +        edge_type_id_2_param_dicts_.at( type_id ).at( tid )[ param.first ] = 0.0;
           }
         }
       }
    diff --git a/nestkernel/sonata_connector.h b/nestkernel/sonata_connector.h
    index 922c130e4e..2123bfe049 100644
    --- a/nestkernel/sonata_connector.h
    +++ b/nestkernel/sonata_connector.h
    @@ -267,6 +267,9 @@ class SonataConnector
     
       typedef std::map< std::string, std::shared_ptr< ConnParameter > > ConnParameterMap;
     
    +  //! synapse-specific parameters that should be skipped when we set default synapse parameters
    +  std::set< std::string > skip_syn_params_;
    +
       //! Dictionary containing SONATA graph specifications
       dictionary graph_specs_;
     
    
    From 23754690f7ec3b04cbb4ee6c3d07ba43695f981a Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 7 Mar 2023 11:29:46 +0100
    Subject: [PATCH 137/375] Use offgrid_times instead of precise_times
    
    ---
     pynest/nest/lib/hl_api_sonata.py | 6 +++++-
     1 file changed, 5 insertions(+), 1 deletion(-)
    
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index 590b6852fe..4e672d98bb 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -363,7 +363,9 @@ def _create_spike_generators(self, nodes_conf):
                     # Map node id's to spike times
                     # TODO: Can this be done in a more efficient way?
                     spikes_map = {node_id: timestamps[node_ids == node_id] for node_id in range(n_nodes)}
    -                params_lst = [{"spike_times": spikes_map[node_id], "precise_times": True} for node_id in range(n_nodes)]
    +                #params_lst = [{"spike_times": spikes_map[node_id], "precise_times": True} for node_id in range(n_nodes)]
    +                params_lst = [{"spike_times": spikes_map[node_id], "allow_offgrid_times": True}
    +                              for node_id in range(n_nodes)]
     
                     # Create and store NC
                     nest_nodes = Create("spike_generator", n=n_nodes, params=params_lst)
    @@ -531,6 +533,7 @@ def _create_edges_maps(self):
                 edges_df.rename(columns={"model_template": "synapse_model",
                                          "syn_weight": "weight"},
                                 inplace=True)
    +            edges_df["edge_type_id"] = edges_df["edge_type_id"].map(str)
     
                 models_arr = edges_df["synapse_model"].to_numpy()
                 is_one_model = (models_arr[0] == models_arr).all()
    @@ -561,6 +564,7 @@ def _create_edges_maps(self):
                             syn_specs[edge_type_id].pop("dynamics_params")
                 else:
                     # More than one synapse model in CSV file
    +                # TODO: new dictionary class requires cast edge_type_id key to str
                     syn_specs = {}
                     idx_map = {k: i for i, k in enumerate(list(edges_df), start=1)}
     
    
    From 8eea3c8af9cf9a6de540be1a6966374beca2ee72 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 7 Mar 2023 11:31:34 +0100
    Subject: [PATCH 138/375] NEST-SONATA example
    
    ---
     pynest/examples/sonata_network.py | 18 +++++++++---------
     1 file changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/pynest/examples/sonata_network.py b/pynest/examples/sonata_network.py
    index 8c2ca57cfa..7a20ff0111 100644
    --- a/pynest/examples/sonata_network.py
    +++ b/pynest/examples/sonata_network.py
    @@ -56,14 +56,9 @@
     # simulation of the network model.
     
     n_procs = 1
    -n_threads = 1
    -''' 
    +n_threads = 2
     nest.set(total_num_virtual_procs=n_procs * n_threads, print_time=True)
    -'''
    -'''
    -nest.SetKernelStatus({"total_num_virtual_procs": n_procs * n_threads,
    -                      "print_time": True})
    -'''
    +
     ###############################################################################
     # Specify the path to the SONATA .json configuration file(s).
     # The `300_pointneurons` model has two configuration files: one network and
    @@ -102,7 +97,6 @@
     # the created :py:class:`.NodeCollection`\s. The population names are the
     # dictionary keys.
     
    -#node_collections = sonata_net.Create()
     node_collections = sonata_net.BuildNetwork(chunk_size=2**20)
     
     ###############################################################################
    @@ -129,13 +123,19 @@
     #pop_name = "internal"
     #record_node_ids = [1, 80, 160, 240, 270]
     #nest.Connect(node_collections[pop_name][record_node_ids], s_rec)
    +#nest.Connect(node_collections[pop_name], s_rec)
     
     ###############################################################################
     # Finally, we call the membership function :py:meth:`~.SonataNetwork.Simulate`
     # to simulate the network. Note that the simulation time and resolution are
     # expected to be provided in the SONATA config.
     
    -# sonata_net.Simulate()
    +sonata_net.Simulate()
    +
    +kernel_status = nest.GetKernelStatus()
    +print(f"number of nodes: {kernel_status['network_size']:,}")
    +print(f"number of connections: {kernel_status['num_connections']:,}")
    +print(f"number of spikes: {kernel_status['local_spike_counter']:,}")
     
     ###############################################################################
     # After the simulation has finished, we can obtain the data recorded by the
    
    From 53a35095d1b084954cc63a33ee58b73d1c0bf18d Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 7 Mar 2023 14:22:24 +0100
    Subject: [PATCH 139/375] Fix get and set synapse params
    
    ---
     nestkernel/sonata_connector.cpp | 22 +++++-----------------
     1 file changed, 5 insertions(+), 17 deletions(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index cc028fc8d6..e3d63e9cc1 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -598,8 +598,7 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, index synapse_model_i
         {
           if ( param.second->provides_long() )
           {
    -        long tmp_val = 0;
    -        edge_type_id_2_param_dicts_.at( type_id ).at( tid )[ param.first ] = tmp_val;
    +        edge_type_id_2_param_dicts_.at( type_id ).at( tid )[ param.first ] = 0L;
           }
           else
           {
    @@ -620,24 +619,13 @@ SonataConnector::get_synapse_params_( index snode_id, Node& target, thread targe
     
         if ( param->provides_long() )
         {
    -
    -      auto dd = edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ).at( param_name );
    -      // auto dd = ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ];
    -      //  change value of dictionary entry without allocating new datum
    -
    -      // IntegerDatum* dd = static_cast< IntegerDatum* >(
    -      //  ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
    -
    -      dd = param->value_int( target_thread, rng, snode_id, &target );
    +      edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ).at( param_name ) =
    +        param->value_int( target_thread, rng, snode_id, &target );
         }
         else
         {
    -      auto dd = edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ).at( param_name );
    -      // change value of dictionary entry without allocating new datum
    -      // auto dd = ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ];
    -      // DoubleDatum* dd = static_cast< DoubleDatum* >(
    -      //  ( ( *edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ) )[ param_name ] ).datum() );
    -      dd = param->value_double( target_thread, rng, snode_id, &target );
    +      edge_type_id_2_param_dicts_.at( edge_type_id ).at( target_thread ).at( param_name ) =
    +        param->value_double( target_thread, rng, snode_id, &target );
         }
       }
     }
    
    From 24d8c341ef913adaf41f9b679bf23d1032fa4923 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 8 Mar 2023 23:45:13 +0100
    Subject: [PATCH 140/375] Update NEST exceptions to be in line with
     std::runtime_error
    
    ---
     nestkernel/exceptions.cpp | 390 +++-----------------------
     nestkernel/exceptions.h   | 568 +++++++++++++++++++++++++-------------
     2 files changed, 417 insertions(+), 541 deletions(-)
    
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index 20e4f09da5..22e6a36afd 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -28,111 +28,104 @@
     // Generated includes:
     #include "config.h"
     
    +// Includes from thirdparty:
    +#include "compose.hpp"
     
     std::string
     nest::UnknownModelName::compose_msg_( const std::string& model_name ) const
     {
    -  std::ostringstream msg;
    -  msg << model_name << " is not a known model name.";
    +  std::string msg = String::compose( "%1 is not a known model name.", model_name );
     #ifndef HAVE_GSL
    -  msg << " A frequent cause for this error is that NEST was compiled"
    -         " without the GNU Scientific Library, which is required for"
    -         " the conductance-based neuron models.";
    +  msg += "\nA frequent cause for this error is that NEST was compiled ";
    +  msg += "without the GNU Scientific Library, which is required for ";
    +  msg += "the conductance-based neuron models.";
     #endif
    -  return msg.str();
    +  return msg;
     }
     
     std::string
     nest::UnknownComponent::compose_msg_( const std::string& component_name ) const
     {
    -  std::ostringstream msg;
    -  msg << component_name << " is not a known component.";
    +  std::string msg = String::compose( "%1 is not a known component.", component_name );
     #ifndef HAVE_GSL
    -  msg << " A frequent cause for this error is that NEST was compiled"
    -         " without the GNU Scientific Library, which is required for"
    -         " the conductance-based neuron models.";
    +  msg += "\nA frequent cause for this error is that NEST was compiled ";
    +  msg += "without the GNU Scientific Library, which is required for ";
    +  msg += "the conductance-based neuron models.";
     #endif
    -  return msg.str();
    +  return msg;
     }
     
     std::string
     nest::NewModelNameExists::compose_msg_( const std::string& model_name ) const
     {
    -  std::string msg = "Model " + model_name + " is the name of an existing model and cannot be re-used.";
    +  std::string msg = String::compose( "Model %1 is the name of an existing model and cannot be re-used.", model_name );
       return msg;
     }
     
     std::string
     nest::ModelInUse::compose_msg_( const std::string& model_name ) const
     {
    -  std::string msg = "Model " + model_name + " is in use and cannot be unloaded/uninstalled.";
    +  std::string msg = String::compose( "Model %1 is in use and cannot be unloaded/uninstalled.", model_name );
       return msg;
     }
     
     std::string
     nest::UnknownSynapseType::compose_msg_( const int id ) const
     {
    -  std::ostringstream msg;
    -  msg << "Synapse with id " << id << " does not exist.";
    -  return msg.str();
    +  std::string msg = String::compose( "Synapse with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
     nest::UnknownSynapseType::compose_msg_( const std::string& name ) const
     {
    -  std::ostringstream msg;
    -  msg << "Synapse with name " << name << " does not exist.";
    -  return msg.str();
    +  std::string msg = String::compose( "Synapse with name %1 does not exist.", name );
    +  return msg;
     }
     
     std::string
     nest::UnknownNode::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "Node with id " << id << " doesn't exist.";
    -  return out.str();
    +  std::string msg = String::compose( "Node with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
     nest::NoThreadSiblingsAvailable::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "Node with id " << id << " does not have thread siblings.";
    -  return out.str();
    +  std::string msg = String::compose( "Node with id %1 does not have thread siblings.", id );
    +  return msg;
     }
     
     std::string
     nest::LocalNodeExpected::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "Node with id " << id << " is not a local node.";
    -  return out.str();
    +  std::string msg = String::compose( "Node with id %1 is not a local node.", id );
    +  return msg;
     }
     
     std::string
     nest::NodeWithProxiesExpected::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "A node with proxies (usually a neuron) is expected, but the node with id " << id
    -      << " is a node without proxies (usually a device).";
    -  return out.str();
    +  std::string msg = String::compose(
    +    "A node with proxies (usually a neuron) is expected, "
    +    "but the node with id %1 is a node without proxies (usually a device).",
    +    id );
    +  return msg;
     }
     
     std::string
     nest::UnknownCompartment::compose_msg_( const long compartment_idx, const std::string info ) const
     {
    -  std::ostringstream msg;
    -  msg << "Compartment " << compartment_idx << " " << info << ".";
    -  return msg.str();
    +  std::string msg = String::compose( "Compartment %1 %2.", compartment_idx, info );
    +  return msg;
     }
     
    -
     std::string
     nest::UnknownReceptorType::compose_msg_( const long receptor_type, const std::string name ) const
     {
    -  std::ostringstream msg;
    -  msg << "Receptor type " << receptor_type << " is not available in " << name << ".";
    -  return msg.str();
    +  std::string msg = String::compose( "Receptor type %1 is not available in %2.", receptor_type, name );
    +  return msg;
     }
     
     std::string
    @@ -140,324 +133,31 @@ nest::IncompatibleReceptorType::compose_msg( const long receptor_type,
       const std::string name,
       const std::string event_type )
     {
    -  std::ostringstream msg;
    -  msg << "Receptor type " << receptor_type << " in " << name << " does not accept " << event_type << ".";
    -  return msg.str();
    +  std::string msg = String::compose( "Receptor type %1 in %2 does not accept %3.", receptor_type, name, event_type );
    +  return msg;
     }
     
     std::string
     nest::UnknownPort::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "Port with id " << id << " does not exist.";
    -  return out.str();
    +  std::string msg = String::compose( "Port with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
     nest::UnknownPort::compose_msg_( const int id, const std::string msg ) const
     {
    -  std::ostringstream out;
    -  out << "Port with id " << id << " does not exist. " << msg;
    -  return out.str();
    -}
    -
    -const char*
    -nest::InexistentConnection::what() const noexcept
    -{
    -  if ( msg_.empty() )
    -  {
    -    return "Deletion of connection is not possible.";
    -  }
    -  else
    -  {
    -    return ( "Deletion of connection is not possible because:\n" + msg_ ).c_str();
    -  }
    -}
    -
    -const char*
    -nest::UnknownThread::what() const noexcept
    -{
    -  std::ostringstream out;
    -  out << "Thread with id " << id_ << " is outside of range.";
    -  return out.str().c_str();
    -}
    -
    -const char*
    -nest::BadDelay::what() const noexcept
    -{
    -  std::ostringstream out;
    -  out << "Delay value " << delay_ << " is invalid: " << message_;
    -  return out.str().c_str();
    -}
    -
    -const char*
    -nest::UnexpectedEvent::what() const noexcept
    -{
    -  if ( msg_.empty() )
    -  {
    -    return std::string(
    -      "Target node cannot handle input event.\n"
    -      "    A common cause for this is an attempt to connect recording devices incorrectly.\n"
    -      "    Note that recorders such as spike recorders must be connected as\n\n"
    -      "        nest.Connect(neurons, spike_det)\n\n"
    -      "    while meters such as voltmeters must be connected as\n\n"
    -      "        nest.Connect(meter, neurons) " )
    -      .c_str();
    -  }
    -  else
    -  {
    -    return ( "UnexpectedEvent: " + msg_ ).c_str();
    -  }
    +  std::string msg_out;
    +  msg_out = String::compose( "Port with id %1 does not exist. ", id );
    +  msg_out += msg;
    +  return msg_out;
     }
     
     std::string
     nest::UnsupportedEvent::compose_msg_() const
     {
    -  return "The current synapse type does not support the event type of the sender.\n"
    -         "    A common cause for this is a plastic synapse between a device and a neuron.";
    -}
    -
    -const char*
    -nest::BadProperty::what() const noexcept
    -{
    -  return msg_.c_str();
    -}
    -
    -const char*
    -nest::BadParameter::what() const noexcept
    -{
    -  return msg_.c_str();
    -}
    -
    -const char*
    -nest::DimensionMismatch::what() const noexcept
    -{
    -  std::ostringstream out;
    -
    -  if ( not msg_.empty() )
    -  {
    -    out << msg_;
    -  }
    -  else if ( expected_ == -1 )
    -  {
    -    out << "Dimensions of two or more variables do not match.";
    -  }
    -  else
    -  {
    -    out << "Expected dimension size: " << expected_ << "\nProvided dimension size: " << provided_;
    -  }
    -
    -  return out.str().c_str();
    -}
    -
    -const char*
    -nest::InvalidDefaultResolution::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The default resolution of " << Time::get_resolution() << " is not consistent with the value " << val_
    -      << " of property '" << prop_ << "' in model " << model_ << ".\n"
    -      << "This is an internal NEST error, please report it at "
    -         "https://github.com/nest/nest-simulator/issues";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::InvalidTimeInModel::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The time property " << prop_ << " = " << val_ << " of model " << model_
    -      << " is not compatible with the resolution " << Time::get_resolution() << ".\n"
    -      << "Please set a compatible value with SetDefaults!";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::StepMultipleRequired::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The time property " << prop_ << " = " << val_ << " of model " << model_
    -      << " must be a multiple of the resolution " << Time::get_resolution() << ".";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::TimeMultipleRequired::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "In model " << model_ << ", the time property " << prop_a_ << " = " << val_a_
    -      << " must be multiple of time property " << prop_b_ << " = " << val_b_ << '.';
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::GSLSolverFailure::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "In model " << model_ << ", the GSL solver "
    -      << "returned with exit status " << status_ << ".\n"
    -      << "Please make sure you have installed a recent "
    -      << "GSL version (> gsl-1.10).";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::NumericalInstability::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "NEST detected a numerical instability while "
    -      << "updating " << model_ << ".";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::NamingConflict::what() const noexcept
    -{
    -  return msg_.c_str();
    -}
    -
    -const char*
    -nest::RangeCheck::what() const noexcept
    -{
    -  if ( size_ > 0 )
    -  {
    -    std::ostringstream out;
    -    out << "Array with length " << size_ << " expected.";
    -    return out.str().c_str();
    -  }
    -  else
    -  {
    -    // TODO-PYNEST-NG: Fix usage, the comment below has been there already
    -    // Empty message. Added due to incorrect use of RangeCheck in nest.cpp
    -    return "";
    -  }
    -}
    -
    -const char*
    -nest::IOError::what() const noexcept
    -{
    -  return "";
    -}
    -
    -const char*
    -nest::KeyError::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Key '" << key_ << "' not found in map."
    -      << "Error encountered with map type: '" << map_type_ << "'"
    -      << " when applying operation: '" << map_op_ << "'";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::InternalError::what() const noexcept
    -{
    -  return msg_.c_str();
    -}
    -
    -#ifdef HAVE_MUSIC
    -const char*
    -nest::MUSICPortUnconnected::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Cannot use instance of model " << model_ << " because the MUSIC port " << portname_ << " is unconnected.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICPortHasNoWidth::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Cannot use instance of model " << model_ << " because the MUSIC port " << portname_
    -      << " has no width specified in configuration file.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICPortAlreadyPublished::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The instance of model " << model_ << " cannot change the MUSIC port / establish connections " << portname_
    -      << " since it is already published.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICSimulationHasRun::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The instance of model " << model_ << " won't work, since the simulation has already been running";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICChannelUnknown::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The port " << portname_ << " cannot be mapped in " << model_ << " because the channel " << channel_
    -      << " does not exists.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICPortUnknown::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The port " << portname_ << " does not exist.";
    -  return msg.str().c_str();
    -}
    -
    -
    -const char*
    -nest::MUSICChannelAlreadyMapped::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The channel " << channel_ << " of port " << portname_ << " has already be mapped to another proxy in "
    -      << model_;
    -  return msg.str().c_str();
    -}
    -#endif
    -
    -#ifdef HAVE_MPI
    -const char*
    -nest::MPIPortsFileUnknown::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The node with ID " << node_id_ << " requires a label,"
    -      << " which specifies the folder with files containing the MPI ports";
    -  return msg.str().c_str();
    -}
    -#endif
    -
    -const char*
    -nest::UnmatchedSteps::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Steps for backend device don't match NEST steps: "
    -      << "steps expected: " << total_steps_ << " "
    -      << "steps executed: " << current_step_ << ".";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::BackendPrepared::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Backend " << backend_ << " may not be prepare()'d multiple times.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::BackendNotPrepared::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Backend " << backend_ << " may not be cleanup()'d without preparation (multiple cleanups?).";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::UndefinedName::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The name " << name_ << " is not defined.";
    -  return msg.str().c_str();
    +  std::string msg;
    +  msg = "The current synapse type does not support the event type of the sender.\n";
    +  msg += "    A common cause for this is a plastic synapse between a device and a neuron.";
    +  return msg;
     }
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 55455b7555..c8559a213a 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -25,9 +25,15 @@
     
     #include <exception>
     
    +// C++ includes:
    +#include <sstream>
    +
     // Includes from nestkernel:
     #include "nest_time.h"
     
    +// Includes from thirdparty:
    +#include "compose.hpp"
    +
     namespace nest
     {
     
    @@ -88,7 +94,6 @@ class NotImplemented : public KernelException
      * Exception to be thrown if a given type does not match the expected type.
      * @ingroup KernelExceptions
      */
    -
     class TypeMismatch : public KernelException
     {
     
    @@ -138,7 +143,7 @@ class UnaccessedDictionaryEntry : public KernelException
     {
     public:
       UnaccessedDictionaryEntry( const std::string& what, const std::string& where, const std::string& missed )
    -    : KernelException( "unaccessed elements in " + what + ", in function " + where + ": " + missed )
    +    : KernelException( "Unaccessed elements in " + what + ", in function " + where + ": " + missed )
       {
       }
     };
    @@ -241,7 +246,6 @@ class UnknownSynapseType : public KernelException
      * -# a node id did not point to an existing node.
      * @ingroup KernelExceptions
      */
    -
     class UnknownNode : public KernelException
     {
       std::string compose_msg_( const int id ) const;
    @@ -266,7 +270,6 @@ class UnknownNode : public KernelException
      * -# a node id did not point to an existing node.
      * @ingroup KernelExceptions
      */
    -
     class NoThreadSiblingsAvailable : public KernelException
     {
       std::string compose_msg_( const int id ) const;
    @@ -324,7 +327,6 @@ class UnknownCompartment : public KernelException
      * Exception to be thrown if the specified
      * receptor type does not exist in the node.
      */
    -
     class UnknownReceptorType : public KernelException
     {
       std::string compose_msg_( const long receptor_type, const std::string name ) const;
    @@ -340,7 +342,6 @@ class UnknownReceptorType : public KernelException
      * Exception to be thrown if the specified
      * receptor type does not accept the event type.
      */
    -
     class IncompatibleReceptorType : public KernelException
     {
       std::string compose_msg( const long receptor_type, const std::string name, const std::string event );
    @@ -404,23 +405,28 @@ class IllegalConnection : public KernelException
      */
     class InexistentConnection : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       InexistentConnection()
    -    : KernelException( "The connection does not exist" )
    -    , msg_()
    +    : KernelException( "InexistentConnection" )
       {
    +    msg_ = "Deletion of connection is not possible because it does not exist.";
       }
     
    -  InexistentConnection( std::string msg )
    -    : KernelException( "The connection does not exist" )
    -    , msg_( msg )
    +  InexistentConnection( const std::string& msg )
    +    : KernelException( "InexistentConnection" )
       {
    +    msg_ = "Deletion of connection is not possible because:\n";
    +    msg_ += msg;
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  std::string msg_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -429,16 +435,21 @@ class InexistentConnection : public KernelException
      */
     class UnknownThread : public KernelException
     {
    -  int id_;
    +private:
    +  std::string msg_;
     
     public:
       UnknownThread( int id )
         : KernelException( "UnknownThread" )
    -    , id_( id )
       {
    +    msg_ = String::compose( "Thread with id %1 is outside of range.", id );
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -448,18 +459,21 @@ class UnknownThread : public KernelException
      */
     class BadDelay : public KernelException
     {
    -  double delay_;
    -  std::string message_;
    +private:
    +  std::string msg_;
     
     public:
    -  BadDelay( double delay, std::string message )
    +  BadDelay( double delay, const std::string& msg )
         : KernelException( "BadDelay" )
    -    , delay_( delay )
    -    , message_( message )
       {
    +    msg_ = String::compose( "Delay value %1 is invalid: %2", delay, msg );
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -470,22 +484,32 @@ class BadDelay : public KernelException
      */
     class UnexpectedEvent : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       UnexpectedEvent()
         : KernelException( "UnexpectedEvent" )
       {
    +    msg_ = "Target node cannot handle input event.\n";
    +    msg_ += "    A common cause for this is an attempt to connect recording devices incorrectly.\n";
    +    msg_ += "    Note that recorders such as spike recorders must be connected as\n\n";
    +    msg_ += "        nest.Connect(neurons, spike_det)\n\n";
    +    msg_ += "    while meters such as voltmeters must be connected as\n\n";
    +    msg_ += "        nest.Connect(meter, neurons) ";
       }
     
    -  UnexpectedEvent( std::string msg )
    +  UnexpectedEvent( const std::string& msg )
         : KernelException( "UnexpectedEvent" )
    -    , msg_( msg )
       {
    +    msg_ = msg;
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  std::string msg_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     
    @@ -514,6 +538,7 @@ class UnsupportedEvent : public KernelException
      */
     class BadProperty : public KernelException
     {
    +private:
       std::string msg_;
     
     public:
    @@ -529,7 +554,11 @@ class BadProperty : public KernelException
       {
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -540,6 +569,7 @@ class BadProperty : public KernelException
      */
     class BadParameter : public KernelException
     {
    +private:
       std::string msg_;
     
     public:
    @@ -555,7 +585,11 @@ class BadParameter : public KernelException
       {
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -595,36 +629,33 @@ class BadParameterValue : public KernelException
      */
     class DimensionMismatch : public KernelException
     {
    -  int expected_;
    -  int provided_;
    +private:
       std::string msg_;
     
     public:
       DimensionMismatch()
         : KernelException( "DimensionMismatch" )
    -    , expected_( -1 )
    -    , provided_( -1 )
    -    , msg_( "" )
       {
    +    msg_ = "Dimensions of two or more variables do not match.";
       }
     
       DimensionMismatch( int expected, int provided )
         : KernelException( "DimensionMismatch" )
    -    , expected_( expected )
    -    , provided_( provided )
    -    , msg_( "" )
       {
    +    msg_ = String::compose( "Expected dimension size: %1 Provided dimension size: %2.", expected, provided );
       }
     
       DimensionMismatch( const std::string& msg )
         : KernelException( "DimensionMismatch" )
    -    , expected_( -1 )
    -    , provided_( -1 )
    -    , msg_( msg )
       {
    +    msg_ = msg;
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -650,6 +681,9 @@ class DistributionError : public KernelException
      */
     class InvalidDefaultResolution : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -660,18 +694,20 @@ class InvalidDefaultResolution : public KernelException
        */
       InvalidDefaultResolution( const std::string& model, const std::string& property, const Time& value )
         : KernelException( "InvalidDefaultResolution" )
    -    , model_( model )
    -    , prop_( property )
    -    , val_( value )
       {
    -  }
    +    std::ostringstream oss;
    +    oss << "The default resolution of " << Time::get_resolution() << " is not consistent with the value " << value
    +        << " of property '" << property << "' in model " << model << ".\n"
    +        << "This is an internal NEST error, please report it at https://github.com/nest/nest-simulator/issues";
     
    -  const char* what() const noexcept override;
    +    msg_ = oss.str();
    +  }
     
    -private:
    -  const std::string model_;
    -  const std::string prop_;
    -  const Time val_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -683,6 +719,9 @@ class InvalidDefaultResolution : public KernelException
      */
     class InvalidTimeInModel : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -693,18 +732,20 @@ class InvalidTimeInModel : public KernelException
        */
       InvalidTimeInModel( const std::string& model, const std::string& property, const Time& value )
         : KernelException( "InvalidTimeInModel" )
    -    , model_( model )
    -    , prop_( property )
    -    , val_( value )
       {
    -  }
    +    std::ostringstream oss;
    +    oss << "The time property " << property << " = " << value << " of model " << model
    +        << " is not compatible with the resolution " << Time::get_resolution() << ".\n"
    +        << "Please set a compatible value with SetDefaults!";
     
    -  const char* what() const noexcept override;
    +    msg_ = oss.str();
    +  }
     
    -private:
    -  const std::string model_;
    -  const std::string prop_;
    -  const Time val_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -714,6 +755,9 @@ class InvalidTimeInModel : public KernelException
      */
     class StepMultipleRequired : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -724,18 +768,19 @@ class StepMultipleRequired : public KernelException
        */
       StepMultipleRequired( const std::string& model, const std::string& property, const Time& value )
         : KernelException( "StepMultipleRequired" )
    -    , model_( model )
    -    , prop_( property )
    -    , val_( value )
       {
    -  }
    +    std::ostringstream oss;
    +    oss << "The time property " << property << " = " << value << " of model " << model
    +        << " must be a multiple of the resolution " << Time::get_resolution() << ".";
     
    -  const char* what() const noexcept override;
    +    msg_ = oss.str();
    +  }
     
    -private:
    -  const std::string model_;
    -  const std::string prop_;
    -  const Time val_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -745,6 +790,9 @@ class StepMultipleRequired : public KernelException
      */
     class TimeMultipleRequired : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -761,22 +809,19 @@ class TimeMultipleRequired : public KernelException
         const std::string& name_b,
         const Time& value_b )
         : KernelException( "StepMultipleRequired" )
    -    , model_( model )
    -    , prop_a_( name_a )
    -    , val_a_( value_a )
    -    , prop_b_( name_b )
    -    , val_b_( value_b )
       {
    -  }
    +    std::ostringstream oss;
    +    oss << "In model " << model << ", the time property " << name_a << " = " << value_a
    +        << " must be multiple of time property " << name_b << " = " << value_b << '.';
     
    -  const char* what() const noexcept override;
    +    msg_ = oss.str();
    +  }
     
    -private:
    -  const std::string model_;
    -  const std::string prop_a_;
    -  const Time val_a_;
    -  const std::string prop_b_;
    -  const Time val_b_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -785,6 +830,9 @@ class TimeMultipleRequired : public KernelException
      */
     class GSLSolverFailure : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -794,16 +842,19 @@ class GSLSolverFailure : public KernelException
        */
       GSLSolverFailure( const std::string& model, const int status )
         : KernelException( "GSLSolverFailure" )
    -    , model_( model )
    -    , status_( status )
       {
    +    msg_ = String::compose(
    +      "In model %1 the GSL solver returned with exit status %2.\n"
    +      "Please make sure you have installed a recent GSL version (> gsl-1.10).",
    +      model,
    +      status );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    -  const int status_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -812,6 +863,9 @@ class GSLSolverFailure : public KernelException
      */
     class NumericalInstability : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -820,14 +874,15 @@ class NumericalInstability : public KernelException
        */
       NumericalInstability( const std::string& model )
         : KernelException( "NumericalInstability" )
    -    , model_( model )
       {
    +    msg_ = String::compose( "NEST detected a numerical instability while updating %1.", model );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -838,6 +893,9 @@ class NumericalInstability : public KernelException
      */
     class NamingConflict : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       NamingConflict( const std::string& msg )
         : KernelException( "NamingConflict" )
    @@ -845,10 +903,11 @@ class NamingConflict : public KernelException
       {
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  std::string msg_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -857,17 +916,30 @@ class NamingConflict : public KernelException
      */
     class RangeCheck : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       RangeCheck( int size = 0 )
         : KernelException( "RangeCheck" )
    -    , size_( size )
       {
    +    if ( size > 0 )
    +    {
    +      msg_ = String::compose( "Array with length %1 expected.", size );
    +    }
    +    else
    +    {
    +      // TODO-PYNEST-NG: Fix usage, the comment below has been there already
    +      // Empty message. Added due to incorrect use of RangeCheck in nest.cpp
    +      msg_ = "";
    +    }
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  int size_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -876,13 +948,21 @@ class RangeCheck : public KernelException
      */
     class IOError : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       IOError()
         : KernelException( "IOError" )
       {
    +    msg_ = "";
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -892,20 +972,25 @@ class IOError : public KernelException
      */
     class KeyError : public KernelException
     {
    -  const std::string key_;
    -  const std::string map_type_;
    -  const std::string map_op_;
    +private:
    +  std::string msg_;
     
     public:
       KeyError( const std::string& key, const std::string& map_type, const std::string& map_op )
         : KernelException( "KeyError" )
    -    , key_( key )
    -    , map_type_( map_type )
    -    , map_op_( map_op )
       {
    +    msg_ = String::compose(
    +      "Key '%1' not found in map. Error encountered with map type: '%2' when applying operation: '%3'.",
    +      key,
    +      map_type,
    +      map_op );
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -914,6 +999,7 @@ class KeyError : public KernelException
      */
     class InternalError : public KernelException
     {
    +private:
       std::string msg_;
     
     public:
    @@ -923,15 +1009,19 @@ class InternalError : public KernelException
         , msg_( "InternalError" )
       {
       }
    +
       InternalError( std::string msg )
         : KernelException( msg )
       {
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
    -
     #ifdef HAVE_MUSIC
     /**
      * Exception to be thrown if a music_event_out_proxy is generated, but the music
    @@ -940,6 +1030,9 @@ class InternalError : public KernelException
      */
     class MUSICPortUnconnected : public KernelException
     {
    +private:
    +  std::string msg;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -949,16 +1042,19 @@ class MUSICPortUnconnected : public KernelException
        */
       MUSICPortUnconnected( const std::string& model, const std::string& portname )
         : KernelException( "MUSICPortUnconnected" )
    -    , model_( model )
    -    , portname_( portname )
       {
    +    msg_ = String::compose(
    +      "Cannot use instance of model %1 because the MUSIC "
    +      "port %2 is unconnected.",
    +      model,
    +      portname );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -968,28 +1064,33 @@ class MUSICPortUnconnected : public KernelException
      */
     class MUSICPortHasNoWidth : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
        *             names of copied models are reported correctly.
        * @param model     name of model causing problem
    -   * @param portname  name of music port
    +   * @param portname  name of MUSIC port
        */
       MUSICPortHasNoWidth( const std::string& model, const std::string& portname )
         : KernelException( "MUSICPortHasNoWidth" )
    -    , model_( model )
    -    , portname_( portname )
       {
    +    msg_ = String::compose(
    +      "Cannot use instance of model %1 because the MUSIC "
    +      "port %2 has no width specified in configuration file.",
    +      model,
    +      portname );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
    -
     /**
      * Exception to be thrown if the user tries to change the name of an already
      * published port.
    @@ -997,24 +1098,31 @@ class MUSICPortHasNoWidth : public KernelException
      */
     class MUSICPortAlreadyPublished : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
        *             names of copied models are reported correctly.
        * @param model     name of model causing problem
    +   * @param portname  name of MUSIC port
        */
       MUSICPortAlreadyPublished( const std::string& model, const std::string& portname )
         : KernelException( "MUSICPortAlreadyPublished" )
    -    , model_( model )
    -    , portname_( portname )
       {
    +    msg_ = String::compose(
    +      "The instance of model %1 cannot change the MUSIC "
    +      "port / establish connections %2 since it is already published.",
    +      model,
    +      portname );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -1024,6 +1132,9 @@ class MUSICPortAlreadyPublished : public KernelException
      */
     class MUSICSimulationHasRun : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -1032,17 +1143,20 @@ class MUSICSimulationHasRun : public KernelException
        */
       MUSICSimulationHasRun( const std::string& model )
         : KernelException( "MUSICSimulationHasRun" )
    -    , model_( model )
       {
    +    msg_ = String::compose(
    +      "The instance of model %1 won't work, since the simulation "
    +      "has already been running",
    +      model );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
    -
     /**
      * Exception to be thrown if the user tries to map a channel that exceeds the
      * width of the MUSIC port.
    @@ -1050,26 +1164,33 @@ class MUSICSimulationHasRun : public KernelException
      */
     class MUSICChannelUnknown : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
        *             names of copied models are reported correctly.
        * @param model     name of model causing problem
    +   * @param portname  name of MUSIC port
    +   * @param channel   channel number
        */
       MUSICChannelUnknown( const std::string& model, const std::string& portname, int channel )
         : KernelException( "MUSICChannelUnknown" )
    -    , portname_( portname )
    -    , channel_( channel )
    -    , model_( model )
       {
    +    msg_ = String::compose(
    +      "The port %1 cannot be mapped in %2 because the channel %3 "
    +      "does not exist.",
    +      portname,
    +      model,
    +      channel );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string portname_;
    -  const int channel_;
    -  const std::string model_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -1079,17 +1200,24 @@ class MUSICChannelUnknown : public KernelException
      */
     class MUSICPortUnknown : public KernelException
     {
    +private:
    +  std::string msg_;
    +
    +  /**
    +   * @param portname  name of MUSIC port
    +   */
     public:
       MUSICPortUnknown( const std::string& portname )
         : KernelException( "MUSICPortUnknown" )
    -    , portname_( portname )
       {
    +    msg_ = String::compose( "The port %1 does not exist.", portname );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string portname_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -1104,6 +1232,8 @@ class MUSICChannelAlreadyMapped : public KernelException
        * @note model should be passed from get_name() to ensure that
        *             names of copied models are reported correctly.
        * @param model     name of model causing problem
    +   * @param portname  name of MUSIC port
    +   * @param channel   channel number
        */
       MUSICChannelAlreadyMapped( const std::string& model, const std::string& portname, int channel )
         : KernelException( "MUSICChannelAlreadyMapped" )
    @@ -1111,86 +1241,128 @@ class MUSICChannelAlreadyMapped : public KernelException
         , channel_( channel )
         , model_( model )
       {
    +    msg_ = String::compose(
    +      "The channel %1 of port %2 has already be mapped "
    +      "to another proxy in %3.",
    +      channel,
    +      portname,
    +      model );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string portname_;
    -  const int channel_;
    -  const std::string model_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
    -
    -#endif
    +#endif // HAVE_MUSIC
     
     #ifdef HAVE_MPI
     class MPIPortsFileUnknown : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       explicit MPIPortsFileUnknown( const index node_id )
    -    : node_id_( node_id )
       {
    +    msg_ = String::compose(
    +      "The node with ID %1 requires a label, which specifies the "
    +      "folder with files containing the MPI ports.",
    +      node_id );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const index node_id_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
    -#endif
    +#endif // HAVE_MPI
     
     class UnmatchedSteps : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       UnmatchedSteps( int steps_left, int total_steps )
    -    : current_step_( total_steps - steps_left )
    -    , total_steps_( total_steps )
    +    : KernelException( "UnmatchedSteps" )
       {
    +    msg_ = String::compose(
    +      "Steps for backend device don't match NEST steps: "
    +      "steps expected: %1 steps executed: %2.",
    +      total_steps,
    +      total_steps - steps_left );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const int current_step_;
    -  const int total_steps_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     class BackendPrepared : public KernelException
     {
    +private:
    +  const std::string backend_;
    +  std::string msg_;
    +
     public:
       BackendPrepared( const std::string& backend )
    -    : backend_( backend )
    +    : KernelException( "BackendPrepared" )
    +    , backend_( backend )
       {
    +    msg_ = String::compose( "Backend %1 may not be prepare()'d multiple times.", backend_ );
       }
     
       BackendPrepared( std::string&& backend )
    -    : backend_( std::move( backend ) )
    +    : KernelException( "BackendPrepared" )
    +    , backend_( std::move( backend ) )
       {
    +    msg_ = String::compose( "Backend %1 may not be prepare()'d multiple times.", backend_ );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string backend_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     class BackendNotPrepared : public KernelException
     {
    +private:
    +  const std::string backend_;
    +  std::string msg_;
    +
     public:
       BackendNotPrepared( const std::string& backend )
    -    : backend_( backend )
    +    : KernelException( "BackendNotPrepared" )
    +    , backend_( backend )
       {
    +    msg_ = String::compose(
    +      "Backend %1 may not be cleanup()'d "
    +      "without preparation (multiple cleanups?).",
    +      backend_ );
       }
     
       BackendNotPrepared( std::string&& backend )
    -    : backend_( std::move( backend ) )
    +    : KernelException( "BackendNotPrepared" )
    +    , backend_( std::move( backend ) )
       {
    +    msg_ = String::compose(
    +      "Backend %1 may not be cleanup()'d "
    +      "without preparation (multiple cleanups?).",
    +      backend_ );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string backend_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     class LayerExpected : public KernelException
    @@ -1213,18 +1385,22 @@ class LayerNodeExpected : public KernelException
     
     class UndefinedName : public KernelException
     {
    -  const std::string name_;
    +private:
    +  std::string msg_;
     
     public:
       UndefinedName( std::string name )
         : KernelException( "UndefinedName" )
    -    , name_( name )
       {
    +    msg_ = String::compose( "The name %1 is not defined.", name );
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     } // namespace nest
    -
    -#endif
    +#endif // EXCEPTIONS_H
    
    From 52e27ad891aa9ef5da9647c1fb597697456b5442 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 9 Mar 2023 21:49:09 +0100
    Subject: [PATCH 141/375] Brutally turn dictionary access checking off
    
    ---
     libnestutil/dictionary_access_flag_manager.cpp | 5 ++++-
     libnestutil/dictionary_access_flag_manager.h   | 4 ++++
     2 files changed, 8 insertions(+), 1 deletion(-)
    
    diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp
    index 5a6a0211a9..5c86f27011 100644
    --- a/libnestutil/dictionary_access_flag_manager.cpp
    +++ b/libnestutil/dictionary_access_flag_manager.cpp
    @@ -35,6 +35,7 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
       const std::string where,
       const std::string what ) const
     {
    +  /*
       // Vector of elements in the dictionary that are not accessed
       std::vector< dictionary::value_type > not_accessed_kv_pairs;
     
    @@ -53,10 +54,12 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
     
         throw nest::UnaccessedDictionaryEntry( what, where, missed );
       }
    +  */
     }
     
     bool
     DictionaryAccessFlagManager::accessed( const dictionary& dict, const key_type_& key ) const
     {
    -  return access_flags_.at( &dict ).count( key ) > 0;
    +  // return access_flags_.at( &dict ).count( key ) > 0;
    +  return true;
     }
    diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h
    index 4efe69b749..c5e91fe505 100644
    --- a/libnestutil/dictionary_access_flag_manager.h
    +++ b/libnestutil/dictionary_access_flag_manager.h
    @@ -73,19 +73,23 @@ class DictionaryAccessFlagManager
     inline void
     DictionaryAccessFlagManager::init_access_flags( const dictionary& dict )
     {
    +  /*
     #pragma omp critical( init_access_flags )
       {
         access_flags_[ &dict ] = {};
       }
    +  */
     }
     
     inline void
     DictionaryAccessFlagManager::register_access( const dictionary& dict, const key_type_& key )
     {
    +  /*
     #pragma omp critical( register_access )
       {
         access_flags_[ &dict ].insert( key );
       }
    +  */
     }
     
     #endif // DICTIONARY_ACCESS_FLAG_MANAGER_H
    
    From c1e5ce105eccc55377a4c1b897b1af035474d4a6 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Fri, 10 Mar 2023 10:38:55 +0100
    Subject: [PATCH 142/375] Fix typo
    
    ---
     doc/htmldoc/developer_space/workflows/development_workflow.rst | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/doc/htmldoc/developer_space/workflows/development_workflow.rst b/doc/htmldoc/developer_space/workflows/development_workflow.rst
    index c194296874..4399a1593b 100644
    --- a/doc/htmldoc/developer_space/workflows/development_workflow.rst
    +++ b/doc/htmldoc/developer_space/workflows/development_workflow.rst
    @@ -242,7 +242,7 @@ Editing workflow - commands explained
     
     1. Make some changes. When you feel that you've made a complete, working set of
        related changes, move on to the next steps.
    -2. Please ensure that you have followed the coding guidelines for C++ PyNEST.
    +2. Please ensure that you have followed the coding guidelines for C++ and PyNEST.
     3. Test your changes by building the source code and running the tests.
        (Usually ``cmake``, ``make``, ``make install``, ``make installcheck``. Please see the
        :ref:`installation section <install_nest>` for details.)
    
    From d587a62ff00ca8c3f5aed604366090a3cec79922 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Fri, 10 Mar 2023 11:03:58 +0100
    Subject: [PATCH 143/375] Delete obsolote and unused file
    
    ---
     nestkernel/nest_datums.cpp | 57 ----------------------------------
     nestkernel/nest_datums.h   | 63 --------------------------------------
     2 files changed, 120 deletions(-)
     delete mode 100644 nestkernel/nest_datums.cpp
     delete mode 100644 nestkernel/nest_datums.h
    
    diff --git a/nestkernel/nest_datums.cpp b/nestkernel/nest_datums.cpp
    deleted file mode 100644
    index 06748fb1cd..0000000000
    --- a/nestkernel/nest_datums.cpp
    +++ /dev/null
    @@ -1,57 +0,0 @@
    -/*
    - *  nest_datums.cpp
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#include "nest_datums.h"
    -
    -// instantiate memory management pool
    -// template <>
    -// nest::pool ConnectionDatum::memory( sizeof( nest::ConnectionID ), 10000, 1 );
    -
    -// simple type printing
    -template <>
    -void
    -ConnectionDatum::print( std::ostream& out ) const
    -{
    -  out << "/connectiontype";
    -}
    -
    -// printing of the objects
    -template <>
    -void
    -ConnectionDatum::pprint( std::ostream& out ) const
    -{
    -  pprint( out );
    -}
    -
    -template <>
    -void
    -NodeCollectionDatum::pprint( std::ostream& out ) const
    -{
    -  this->operator->()->print_me( out );
    -}
    -
    -template <>
    -void
    -NodeCollectionIteratorDatum::pprint( std::ostream& out ) const
    -{
    -  this->operator->()->print_me( out );
    -}
    diff --git a/nestkernel/nest_datums.h b/nestkernel/nest_datums.h
    deleted file mode 100644
    index d189c8d3d9..0000000000
    --- a/nestkernel/nest_datums.h
    +++ /dev/null
    @@ -1,63 +0,0 @@
    -/*
    - *  nest_datums.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef NEST_DATUMS_H
    -#define NEST_DATUMS_H
    -
    -/**
    - * SLI Datum types related to the NEST kernel.
    - */
    -
    -// Includes from nestkernel:
    -#include "connection_id.h"
    -#include "event.h"
    -#include "exceptions.h"
    -#include "generic_factory.h"
    -#include "nestmodule.h"
    -#include "node_collection.h"
    -#include "ntree.h"
    -#include "parameter.h"
    -#include "position.h"
    -
    -
    -#ifdef HAVE_LIBNEUROSIM
    -#include <neurosim/connection_generator.h>
    -typedef sharedPtrDatum< ConnectionGenerator, &nest::NestModule::ConnectionGeneratorType > ConnectionGeneratorDatum;
    -#endif
    -
    -typedef sharedPtrDatum< nest::ConnectionID, &nest::NestModule::ConnectionType > ConnectionDatum;
    -typedef sharedPtrDatum< nest::NodeCollection, &nest::NestModule::NodeCollectionType > NodeCollectionDatum;
    -typedef sharedPtrDatum< nest::nc_const_iterator, &nest::NestModule::NodeCollectionIteratorType >
    -  NodeCollectionIteratorDatum;
    -typedef sharedPtrDatum< nest::Parameter, &nest::NestModule::ParameterType > ParameterDatum;
    -
    -template <>
    -void ConnectionDatum::print( std::ostream& ) const;
    -
    -template <>
    -void ConnectionDatum::pprint( std::ostream& ) const;
    -template <>
    -void NodeCollectionDatum::pprint( std::ostream& ) const;
    -template <>
    -void NodeCollectionIteratorDatum::pprint( std::ostream& ) const;
    -
    -#endif /* #ifndef NEST_DATUMS_H */
    
    From 78b0a8e5e06b9e6e4170b17b3fe95660a6530e97 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Fri, 17 Mar 2023 14:58:06 +0100
    Subject: [PATCH 144/375] Replace GetKernelStatus call by direct attribute use
    
    ---
     testsuite/pytests/mpi/2/test_connect_arrays_mpi.py   | 2 +-
     testsuite/pytests/mpi/2/test_issue_576.py            | 2 +-
     testsuite/pytests/test_clopath_synapse.py            | 2 +-
     testsuite/pytests/test_connect_arrays.py             | 2 +-
     testsuite/pytests/test_connect_conngen.py            | 2 +-
     testsuite/pytests/test_glif_cond.py                  | 2 +-
     testsuite/pytests/test_labeled_synapses.py           | 2 +-
     testsuite/pytests/test_mc_neuron.py                  | 2 +-
     testsuite/pytests/test_recording_backend_ascii.py    | 2 +-
     testsuite/pytests/test_recording_backends.py         | 2 +-
     testsuite/pytests/test_regression_issue-1409.py      | 2 +-
     testsuite/pytests/test_regression_issue-2125.py      | 2 +-
     testsuite/pytests/test_siegert_neuron.py             | 2 +-
     testsuite/pytests/test_sp/test_disconnect.py         | 2 +-
     testsuite/pytests/test_sp/test_enable_multithread.py | 2 +-
     testsuite/pytests/test_sp/test_growth_curves.py      | 2 +-
     testsuite/pytests/test_threads.py                    | 2 +-
     testsuite/pytests/test_urbanczik_synapse.py          | 2 +-
     testsuite/pytests/test_weight_recorder.py            | 2 +-
     19 files changed, 19 insertions(+), 19 deletions(-)
    
    diff --git a/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py b/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    index 14eabf6fba..baba0f7e1c 100644
    --- a/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    +++ b/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    @@ -31,7 +31,7 @@
     except ImportError:
         HAVE_MPI4PY = False
     
    -HAVE_MPI = nest.GetKernelStatus("build_info")["have_mpi"]
    +HAVE_MPI = nest.build_info["have_mpi"]
     
     
     @unittest.skipIf(not HAVE_MPI4PY, 'mpi4py is not available')
    diff --git a/testsuite/pytests/mpi/2/test_issue_576.py b/testsuite/pytests/mpi/2/test_issue_576.py
    index 78747ee749..69429c840d 100644
    --- a/testsuite/pytests/mpi/2/test_issue_576.py
    +++ b/testsuite/pytests/mpi/2/test_issue_576.py
    @@ -23,7 +23,7 @@
     import nest
     import unittest
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(nest.NumProcesses() < 2, 'Requires >= 2 MPI process')
    diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py
    index 5c3562c957..d2799274d9 100644
    --- a/testsuite/pytests/test_clopath_synapse.py
    +++ b/testsuite/pytests/test_clopath_synapse.py
    @@ -27,7 +27,7 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
    diff --git a/testsuite/pytests/test_connect_arrays.py b/testsuite/pytests/test_connect_arrays.py
    index e77f181f7d..0de05ddd87 100644
    --- a/testsuite/pytests/test_connect_arrays.py
    +++ b/testsuite/pytests/test_connect_arrays.py
    @@ -26,7 +26,7 @@
     
     nest.set_verbosity(nest.verbosity.M_WARNING)
     
    -HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no"
    +HAVE_OPENMP = nest.build_info["threading"] != "no"
     
     
     class TestConnectArrays(unittest.TestCase):
    diff --git a/testsuite/pytests/test_connect_conngen.py b/testsuite/pytests/test_connect_conngen.py
    index 540d8fea49..d9bd8f9113 100644
    --- a/testsuite/pytests/test_connect_conngen.py
    +++ b/testsuite/pytests/test_connect_conngen.py
    @@ -38,7 +38,7 @@
     except ImportError:
         HAVE_NUMPY = False
     
    -HAVE_LIBNEUROSIM = nest.GetKernelStatus("build_info")["have_libneurosim"]
    +HAVE_LIBNEUROSIM = nest.build_info["have_libneurosim"]
     
     
     @unittest.skipIf(not HAVE_CSA, 'Python CSA package is not available')
    diff --git a/testsuite/pytests/test_glif_cond.py b/testsuite/pytests/test_glif_cond.py
    index feafc3751b..fd505c9eb1 100644
    --- a/testsuite/pytests/test_glif_cond.py
    +++ b/testsuite/pytests/test_glif_cond.py
    @@ -28,7 +28,7 @@
     except ImportError:
         HAVE_SCIPY = False
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
    diff --git a/testsuite/pytests/test_labeled_synapses.py b/testsuite/pytests/test_labeled_synapses.py
    index 59e2b33fec..b303c64e19 100644
    --- a/testsuite/pytests/test_labeled_synapses.py
    +++ b/testsuite/pytests/test_labeled_synapses.py
    @@ -26,7 +26,7 @@
     import unittest
     import nest
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
    diff --git a/testsuite/pytests/test_mc_neuron.py b/testsuite/pytests/test_mc_neuron.py
    index 9fddf853b0..bc4948f506 100644
    --- a/testsuite/pytests/test_mc_neuron.py
    +++ b/testsuite/pytests/test_mc_neuron.py
    @@ -23,7 +23,7 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
    diff --git a/testsuite/pytests/test_recording_backend_ascii.py b/testsuite/pytests/test_recording_backend_ascii.py
    index 53e83a7dbb..b932918deb 100644
    --- a/testsuite/pytests/test_recording_backend_ascii.py
    +++ b/testsuite/pytests/test_recording_backend_ascii.py
    @@ -119,7 +119,7 @@ def testFileContent(self):
     
                 self.assertEqual(len(lines), mm.get("n_events")+3)
     
    -            version = nest.GetKernelStatus("build_info")["version"]
    +            version = nest.build_info["version"]
                 self.assertEqual(lines[0], "# NEST version: {}\n".format(version))
     
                 header_2 = "# RecordingBackendASCII version:"
    diff --git a/testsuite/pytests/test_recording_backends.py b/testsuite/pytests/test_recording_backends.py
    index bf51873e44..7a8c7188aa 100644
    --- a/testsuite/pytests/test_recording_backends.py
    +++ b/testsuite/pytests/test_recording_backends.py
    @@ -22,7 +22,7 @@
     import unittest
     import nest
     
    -HAVE_SIONLIB = nest.GetKernelStatus("build_info")["have_sionlib"]
    +HAVE_SIONLIB = nest.build_info["have_sionlib"]
     
     
     class TestRecordingBackends(unittest.TestCase):
    diff --git a/testsuite/pytests/test_regression_issue-1409.py b/testsuite/pytests/test_regression_issue-1409.py
    index d7bbbd1d2c..1380c05694 100644
    --- a/testsuite/pytests/test_regression_issue-1409.py
    +++ b/testsuite/pytests/test_regression_issue-1409.py
    @@ -23,7 +23,7 @@
     import numpy as np
     import unittest
     
    -HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no"
    +HAVE_OPENMP = nest.build_info["threading"] != "no"
     
     
     @unittest.skipIf(not HAVE_OPENMP, 'NEST was compiled without multi-threading')
    diff --git a/testsuite/pytests/test_regression_issue-2125.py b/testsuite/pytests/test_regression_issue-2125.py
    index 442e688519..02f84b4e75 100644
    --- a/testsuite/pytests/test_regression_issue-2125.py
    +++ b/testsuite/pytests/test_regression_issue-2125.py
    @@ -22,7 +22,7 @@
     import nest
     import unittest
     
    -HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no"
    +HAVE_OPENMP = nest.build_info["threading"] != "no"
     
     
     @unittest.skipIf(not HAVE_OPENMP, 'NEST was compiled without multi-threading')
    diff --git a/testsuite/pytests/test_siegert_neuron.py b/testsuite/pytests/test_siegert_neuron.py
    index ec412f9355..b3821c8fd8 100644
    --- a/testsuite/pytests/test_siegert_neuron.py
    +++ b/testsuite/pytests/test_siegert_neuron.py
    @@ -25,7 +25,7 @@
     import unittest
     import numpy as np
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(not HAVE_GSL, "GSL is not available")
    diff --git a/testsuite/pytests/test_sp/test_disconnect.py b/testsuite/pytests/test_sp/test_disconnect.py
    index be11cb712f..62e9ca5e65 100644
    --- a/testsuite/pytests/test_sp/test_disconnect.py
    +++ b/testsuite/pytests/test_sp/test_disconnect.py
    @@ -29,7 +29,7 @@
     except ImportError:
         have_mpi4py = False
     
    -have_mpi = nest.GetKernelStatus("build_info")["have_mpi"]
    +have_mpi = nest.build_info["have_mpi"]
     test_with_mpi = have_mpi and have_mpi4py and nest.num_processes > 1
     
     
    diff --git a/testsuite/pytests/test_sp/test_enable_multithread.py b/testsuite/pytests/test_sp/test_enable_multithread.py
    index 81e824d750..a92ad21c3b 100644
    --- a/testsuite/pytests/test_sp/test_enable_multithread.py
    +++ b/testsuite/pytests/test_sp/test_enable_multithread.py
    @@ -30,7 +30,7 @@
     # and multiple threads are set, or if multiple threads are set and
     # the enable_structural_plasticity function is called.
     
    -HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no"
    +HAVE_OPENMP = nest.build_info["threading"] != "no"
     
     
     @unittest.skipIf(not HAVE_OPENMP, 'NEST was compiled without multi-threading')
    diff --git a/testsuite/pytests/test_sp/test_growth_curves.py b/testsuite/pytests/test_sp/test_growth_curves.py
    index ffd721ea49..5d8f9fea11 100644
    --- a/testsuite/pytests/test_sp/test_growth_curves.py
    +++ b/testsuite/pytests/test_sp/test_growth_curves.py
    @@ -28,7 +28,7 @@
     import time
     import sys
     
    -HAVE_OPENMP = nest.GetKernelStatus("build_info")["threading"] != "no"
    +HAVE_OPENMP = nest.build_info["threading"] != "no"
     
     
     class SynapticElementIntegrator:
    diff --git a/testsuite/pytests/test_threads.py b/testsuite/pytests/test_threads.py
    index 26abf3423f..3eb216c2fc 100644
    --- a/testsuite/pytests/test_threads.py
    +++ b/testsuite/pytests/test_threads.py
    @@ -33,7 +33,7 @@ class ThreadTestCase(unittest.TestCase):
         def nest_multithreaded(self):
             """Return True, if we have a thread-enabled NEST, False otherwise"""
     
    -        return nest.GetKernelStatus("build_info")["threading"] != "no"
    +        return nest.build_info["threading"] != "no"
     
         def test_Threads(self):
             """Multiple threads"""
    diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py
    index 2baee4c701..3913e0067c 100644
    --- a/testsuite/pytests/test_urbanczik_synapse.py
    +++ b/testsuite/pytests/test_urbanczik_synapse.py
    @@ -27,7 +27,7 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     @unittest.skipIf(not HAVE_GSL, 'GSL is not available')
    diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py
    index a6576c87c8..858d9e1771 100644
    --- a/testsuite/pytests/test_weight_recorder.py
    +++ b/testsuite/pytests/test_weight_recorder.py
    @@ -27,7 +27,7 @@
     import nest
     import numpy as np
     
    -HAVE_GSL = nest.GetKernelStatus("build_info")["have_gsl"]
    +HAVE_GSL = nest.build_info["have_gsl"]
     
     
     class WeightRecorderTestCase(unittest.TestCase):
    
    From 9e1d805671b4f77acac44706d3eff4016850c844 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Sat, 8 Apr 2023 15:22:58 +0200
    Subject: [PATCH 145/375] Remove obsolete file
    
    ---
     examples/matplotlib/matplotlibrc | 1 -
     1 file changed, 1 deletion(-)
     delete mode 100644 examples/matplotlib/matplotlibrc
    
    diff --git a/examples/matplotlib/matplotlibrc b/examples/matplotlib/matplotlibrc
    deleted file mode 100644
    index c6c9449e4b..0000000000
    --- a/examples/matplotlib/matplotlibrc
    +++ /dev/null
    @@ -1 +0,0 @@
    -backend : svg
    
    From b543f6227793b761209a1b3bf4e4e2df24efdb8a Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Sat, 8 Apr 2023 15:23:16 +0200
    Subject: [PATCH 146/375] Remove outdated README
    
    ---
     examples/README.md | 3 ---
     1 file changed, 3 deletions(-)
     delete mode 100644 examples/README.md
    
    diff --git a/examples/README.md b/examples/README.md
    deleted file mode 100644
    index 1f1a2d3171..0000000000
    --- a/examples/README.md
    +++ /dev/null
    @@ -1,3 +0,0 @@
    -# `examples` folder
    -
    -Examples for the usage of SLI and NEST. The examples for PyNEST can be found in the pynest directory. All examples are installed to the directory `$prefix/share/doc/nest/examples`.
    
    From c8fbb0744a2d39af4e84d76961e496169da435c5 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Sat, 8 Apr 2023 16:08:00 +0200
    Subject: [PATCH 147/375] Move examples to the examples directory
    
    ---
     CMakeLists.txt                                      |   6 +++++-
     {pynest/examples => examples}/BrodyHopfield.py      |   0
     {pynest/examples => examples}/CampbellSiegert.py    |   0
     .../examples => examples}/Potjans_2014/README.rst   |   0
     .../examples => examples}/Potjans_2014/box_plot.png | Bin
     .../examples => examples}/Potjans_2014/helpers.py   |   0
     .../Potjans_2014/microcircuit.png                   | Bin
     .../examples => examples}/Potjans_2014/network.py   |   0
     .../Potjans_2014/network_params.py                  |   0
     .../Potjans_2014/raster_plot.png                    | Bin
     .../reference_data/population_nodeids.dat           |   0
     .../Potjans_2014/reference_data/rate0.dat           |   0
     .../Potjans_2014/reference_data/rate1.dat           |   0
     .../Potjans_2014/reference_data/rate2.dat           |   0
     .../Potjans_2014/reference_data/rate3.dat           |   0
     .../Potjans_2014/reference_data/rate4.dat           |   0
     .../Potjans_2014/reference_data/rate5.dat           |   0
     .../Potjans_2014/reference_data/rate6.dat           |   0
     .../Potjans_2014/reference_data/rate7.dat           |   0
     .../reference_data/spike_recorder-7718-0.dat        |   0
     .../reference_data/spike_recorder-7719-0.dat        |   0
     .../reference_data/spike_recorder-7720-0.dat        |   0
     .../reference_data/spike_recorder-7721-0.dat        |   0
     .../reference_data/spike_recorder-7722-0.dat        |   0
     .../reference_data/spike_recorder-7723-0.dat        |   0
     .../reference_data/spike_recorder-7724-0.dat        |   0
     .../reference_data/spike_recorder-7725-0.dat        |   0
     .../Potjans_2014/run_microcircuit.py                |   0
     .../Potjans_2014/sim_params.py                      |   0
     .../Potjans_2014/stimulus_params.py                 |   0
     {pynest/examples => examples}/README.rst            |   0
     .../aeif_cond_beta_multisynapse.py                  |   0
     {pynest/examples => examples}/balancedneuron.py     |   0
     .../examples => examples}/brette_gerstner_fig_2c.py |   0
     .../examples => examples}/brette_gerstner_fig_3d.py |   0
     .../examples => examples}/brunel-py-ex-12502-0.gdf  |   0
     .../examples => examples}/brunel-py-in-12503-0.gdf  |   0
     .../brunel_alpha_evolution_strategies.py            |   0
     {pynest/examples => examples}/brunel_alpha_nest.py  |   0
     {pynest/examples => examples}/brunel_delta_nest.py  |   0
     .../brunel_exp_multisynapse_nest.py                 |   0
     .../examples => examples}/brunel_siegert_nest.py    |   0
     .../clopath_synapse_small_network.py                |   0
     .../clopath_synapse_spike_pairing.py                |   0
     .../compartmental_model/README.rst                  |   0
     .../compartmental_model/receptors_and_current.py    |   0
     .../compartmental_model/two_comps.py                |   0
     .../correlospinmatrix_detector_two_neuron.py        |   0
     .../cross_check_mip_corrdet.py                      |   0
     {pynest/examples => examples}/csa_example.py        |   0
     .../examples => examples}/csa_spatial_example.py    |   0
     .../evaluate_quantal_stp_synapse.py                 |   0
     .../evaluate_tsodyks2_synapse.py                    |   0
     .../gap_junctions_inhibitory_network.py             |   0
     .../gap_junctions_two_neurons.py                    |   0
     .../gif_cond_exp_multisynapse.py                    |   0
     {pynest/examples => examples}/gif_pop_psc_exp.py    |   0
     {pynest/examples => examples}/gif_population.py     |   0
     {pynest/examples => examples}/glif_cond_neuron.py   |   0
     {pynest/examples => examples}/glif_psc_neuron.py    |   0
     {pynest/examples => examples}/hh_phaseplane.py      |   0
     {pynest/examples => examples}/hh_psc_alpha.py       |   0
     {pynest/examples => examples}/hpc_benchmark.py      |   0
     .../hpc_benchmark_connectivity.svg                  |   0
     {pynest/examples => examples}/if_curve.py           |   0
     .../intrinsic_currents_spiking.py                   |   0
     .../intrinsic_currents_subthreshold.py              |   0
     .../examples => examples}/lin_rate_ipn_network.py   |   0
     {pynest/examples => examples}/mc_neuron.py          |   0
     {pynest/examples => examples}/multimeter_file.py    |   0
     .../music_cont_out_proxy_example/README.md          |   0
     .../music_cont_out_proxy_example/README.rst         |   0
     .../music_cont_out_proxy_example/nest_script.py     |   0
     .../music_cont_out_proxy_example/receiver_script.py |   0
     .../music_cont_out_proxy_example/test.music         |   0
     {pynest/examples => examples}/one_neuron.py         |   0
     .../examples => examples}/one_neuron_with_noise.py  |   0
     .../examples => examples}/plot_weight_matrices.py   |   0
     {pynest/examples => examples}/pong/README.rst       |   0
     {pynest/examples => examples}/pong/generate_gif.py  |   0
     {pynest/examples => examples}/pong/networks.py      |   0
     {pynest/examples => examples}/pong/pong.py          |   0
     .../examples => examples}/pong/run_simulations.py   |   0
     {pynest/examples => examples}/precise_spiking.py    |   0
     {pynest/examples => examples}/pulsepacket.py        |   0
     {pynest/examples => examples}/rate_neuron_dm.py     |   0
     {pynest/examples => examples}/recording_demo.py     |   0
     .../examples => examples}/repeated_stimulation.py   |   0
     examples/run_examples.sh                            |   5 +++--
     .../sensitivity_to_perturbation.py                  |   0
     .../sinusoidal_gamma_generator.py                   |   0
     .../sinusoidal_poisson_generator.py                 |   0
     {pynest/examples => examples}/spatial/README.rst    |   0
     {pynest/examples => examples}/spatial/conncomp.py   |   0
     .../spatial/conncon_sources.py                      |   0
     .../spatial/conncon_targets.py                      |   0
     {pynest/examples => examples}/spatial/connex.py     |   0
     {pynest/examples => examples}/spatial/connex_ew.py  |   0
     {pynest/examples => examples}/spatial/ctx_2n.py     |   0
     {pynest/examples => examples}/spatial/gaussex.py    |   0
     {pynest/examples => examples}/spatial/grid_iaf.py   |   0
     .../examples => examples}/spatial/grid_iaf_irr.py   |   0
     .../examples => examples}/spatial/grid_iaf_oc.py    |   0
     .../spatial/nodes_source_target.py                  |   0
     {pynest/examples => examples}/spatial/test_3d.py    |   0
     .../examples => examples}/spatial/test_3d_exp.py    |   0
     .../examples => examples}/spatial/test_3d_gauss.py  |   0
     .../examples => examples}/store_restore_network.py  |   0
     .../examples => examples}/structural_plasticity.py  |   0
     {pynest/examples => examples}/sudoku/README.rst     |   0
     .../examples => examples}/sudoku/helpers_sudoku.py  |   0
     .../sudoku/output/sudoku_noise_comparison.gif       | Bin
     .../sudoku/output/sudoku_solution.gif               | Bin
     .../sudoku/output/sudoku_solution.png               | Bin
     .../examples => examples}/sudoku/plot_progress.py   |   0
     {pynest/examples => examples}/sudoku/sudoku_net.py  |   0
     .../examples => examples}/sudoku/sudoku_solver.py   |   0
     {pynest/examples => examples}/synapsecollection.py  |   0
     {pynest/examples => examples}/testiaf.py            |   0
     {pynest/examples => examples}/tsodyks_depressing.py |   0
     .../examples => examples}/tsodyks_facilitating.py   |   0
     {pynest/examples => examples}/twoneurons.py         |   0
     .../urbanczik_synapse_example.py                    |   0
     {pynest/examples => examples}/vinit_example.py      |   0
     pynest/CMakeLists.txt                               |   4 ----
     125 files changed, 8 insertions(+), 7 deletions(-)
     rename {pynest/examples => examples}/BrodyHopfield.py (100%)
     rename {pynest/examples => examples}/CampbellSiegert.py (100%)
     rename {pynest/examples => examples}/Potjans_2014/README.rst (100%)
     rename {pynest/examples => examples}/Potjans_2014/box_plot.png (100%)
     rename {pynest/examples => examples}/Potjans_2014/helpers.py (100%)
     rename {pynest/examples => examples}/Potjans_2014/microcircuit.png (100%)
     rename {pynest/examples => examples}/Potjans_2014/network.py (100%)
     rename {pynest/examples => examples}/Potjans_2014/network_params.py (100%)
     rename {pynest/examples => examples}/Potjans_2014/raster_plot.png (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/population_nodeids.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/rate0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/rate1.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/rate2.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/rate3.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/rate4.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/rate5.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/rate6.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/rate7.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/spike_recorder-7718-0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/spike_recorder-7719-0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/spike_recorder-7720-0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/spike_recorder-7721-0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/spike_recorder-7722-0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/spike_recorder-7723-0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/spike_recorder-7724-0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/reference_data/spike_recorder-7725-0.dat (100%)
     rename {pynest/examples => examples}/Potjans_2014/run_microcircuit.py (100%)
     rename {pynest/examples => examples}/Potjans_2014/sim_params.py (100%)
     rename {pynest/examples => examples}/Potjans_2014/stimulus_params.py (100%)
     rename {pynest/examples => examples}/README.rst (100%)
     rename {pynest/examples => examples}/aeif_cond_beta_multisynapse.py (100%)
     rename {pynest/examples => examples}/balancedneuron.py (100%)
     rename {pynest/examples => examples}/brette_gerstner_fig_2c.py (100%)
     rename {pynest/examples => examples}/brette_gerstner_fig_3d.py (100%)
     rename {pynest/examples => examples}/brunel-py-ex-12502-0.gdf (100%)
     rename {pynest/examples => examples}/brunel-py-in-12503-0.gdf (100%)
     rename {pynest/examples => examples}/brunel_alpha_evolution_strategies.py (100%)
     rename {pynest/examples => examples}/brunel_alpha_nest.py (100%)
     rename {pynest/examples => examples}/brunel_delta_nest.py (100%)
     rename {pynest/examples => examples}/brunel_exp_multisynapse_nest.py (100%)
     rename {pynest/examples => examples}/brunel_siegert_nest.py (100%)
     rename {pynest/examples => examples}/clopath_synapse_small_network.py (100%)
     rename {pynest/examples => examples}/clopath_synapse_spike_pairing.py (100%)
     rename {pynest/examples => examples}/compartmental_model/README.rst (100%)
     rename {pynest/examples => examples}/compartmental_model/receptors_and_current.py (100%)
     rename {pynest/examples => examples}/compartmental_model/two_comps.py (100%)
     rename {pynest/examples => examples}/correlospinmatrix_detector_two_neuron.py (100%)
     rename {pynest/examples => examples}/cross_check_mip_corrdet.py (100%)
     rename {pynest/examples => examples}/csa_example.py (100%)
     rename {pynest/examples => examples}/csa_spatial_example.py (100%)
     rename {pynest/examples => examples}/evaluate_quantal_stp_synapse.py (100%)
     rename {pynest/examples => examples}/evaluate_tsodyks2_synapse.py (100%)
     rename {pynest/examples => examples}/gap_junctions_inhibitory_network.py (100%)
     rename {pynest/examples => examples}/gap_junctions_two_neurons.py (100%)
     rename {pynest/examples => examples}/gif_cond_exp_multisynapse.py (100%)
     rename {pynest/examples => examples}/gif_pop_psc_exp.py (100%)
     rename {pynest/examples => examples}/gif_population.py (100%)
     rename {pynest/examples => examples}/glif_cond_neuron.py (100%)
     rename {pynest/examples => examples}/glif_psc_neuron.py (100%)
     rename {pynest/examples => examples}/hh_phaseplane.py (100%)
     rename {pynest/examples => examples}/hh_psc_alpha.py (100%)
     rename {pynest/examples => examples}/hpc_benchmark.py (100%)
     rename {pynest/examples => examples}/hpc_benchmark_connectivity.svg (100%)
     rename {pynest/examples => examples}/if_curve.py (100%)
     rename {pynest/examples => examples}/intrinsic_currents_spiking.py (100%)
     rename {pynest/examples => examples}/intrinsic_currents_subthreshold.py (100%)
     rename {pynest/examples => examples}/lin_rate_ipn_network.py (100%)
     rename {pynest/examples => examples}/mc_neuron.py (100%)
     rename {pynest/examples => examples}/multimeter_file.py (100%)
     rename {pynest/examples => examples}/music_cont_out_proxy_example/README.md (100%)
     rename {pynest/examples => examples}/music_cont_out_proxy_example/README.rst (100%)
     rename {pynest/examples => examples}/music_cont_out_proxy_example/nest_script.py (100%)
     rename {pynest/examples => examples}/music_cont_out_proxy_example/receiver_script.py (100%)
     rename {pynest/examples => examples}/music_cont_out_proxy_example/test.music (100%)
     rename {pynest/examples => examples}/one_neuron.py (100%)
     rename {pynest/examples => examples}/one_neuron_with_noise.py (100%)
     rename {pynest/examples => examples}/plot_weight_matrices.py (100%)
     rename {pynest/examples => examples}/pong/README.rst (100%)
     rename {pynest/examples => examples}/pong/generate_gif.py (100%)
     rename {pynest/examples => examples}/pong/networks.py (100%)
     rename {pynest/examples => examples}/pong/pong.py (100%)
     rename {pynest/examples => examples}/pong/run_simulations.py (100%)
     rename {pynest/examples => examples}/precise_spiking.py (100%)
     rename {pynest/examples => examples}/pulsepacket.py (100%)
     rename {pynest/examples => examples}/rate_neuron_dm.py (100%)
     rename {pynest/examples => examples}/recording_demo.py (100%)
     rename {pynest/examples => examples}/repeated_stimulation.py (100%)
     rename {pynest/examples => examples}/sensitivity_to_perturbation.py (100%)
     rename {pynest/examples => examples}/sinusoidal_gamma_generator.py (100%)
     rename {pynest/examples => examples}/sinusoidal_poisson_generator.py (100%)
     rename {pynest/examples => examples}/spatial/README.rst (100%)
     rename {pynest/examples => examples}/spatial/conncomp.py (100%)
     rename {pynest/examples => examples}/spatial/conncon_sources.py (100%)
     rename {pynest/examples => examples}/spatial/conncon_targets.py (100%)
     rename {pynest/examples => examples}/spatial/connex.py (100%)
     rename {pynest/examples => examples}/spatial/connex_ew.py (100%)
     rename {pynest/examples => examples}/spatial/ctx_2n.py (100%)
     rename {pynest/examples => examples}/spatial/gaussex.py (100%)
     rename {pynest/examples => examples}/spatial/grid_iaf.py (100%)
     rename {pynest/examples => examples}/spatial/grid_iaf_irr.py (100%)
     rename {pynest/examples => examples}/spatial/grid_iaf_oc.py (100%)
     rename {pynest/examples => examples}/spatial/nodes_source_target.py (100%)
     rename {pynest/examples => examples}/spatial/test_3d.py (100%)
     rename {pynest/examples => examples}/spatial/test_3d_exp.py (100%)
     rename {pynest/examples => examples}/spatial/test_3d_gauss.py (100%)
     rename {pynest/examples => examples}/store_restore_network.py (100%)
     rename {pynest/examples => examples}/structural_plasticity.py (100%)
     rename {pynest/examples => examples}/sudoku/README.rst (100%)
     rename {pynest/examples => examples}/sudoku/helpers_sudoku.py (100%)
     rename {pynest/examples => examples}/sudoku/output/sudoku_noise_comparison.gif (100%)
     rename {pynest/examples => examples}/sudoku/output/sudoku_solution.gif (100%)
     rename {pynest/examples => examples}/sudoku/output/sudoku_solution.png (100%)
     rename {pynest/examples => examples}/sudoku/plot_progress.py (100%)
     rename {pynest/examples => examples}/sudoku/sudoku_net.py (100%)
     rename {pynest/examples => examples}/sudoku/sudoku_solver.py (100%)
     rename {pynest/examples => examples}/synapsecollection.py (100%)
     rename {pynest/examples => examples}/testiaf.py (100%)
     rename {pynest/examples => examples}/tsodyks_depressing.py (100%)
     rename {pynest/examples => examples}/tsodyks_facilitating.py (100%)
     rename {pynest/examples => examples}/twoneurons.py (100%)
     rename {pynest/examples => examples}/urbanczik_synapse_example.py (100%)
     rename {pynest/examples => examples}/vinit_example.py (100%)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index 1388b77564..03be1c7765 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -360,6 +360,10 @@ configure_file(
     
     install( FILES LICENSE README.md
         DESTINATION ${CMAKE_INSTALL_DOCDIR}
    -    )
    +)
    +
    +install( DIRECTORY examples/
    +    DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples
    +)
     
     nest_print_config_summary()
    diff --git a/pynest/examples/BrodyHopfield.py b/examples/BrodyHopfield.py
    similarity index 100%
    rename from pynest/examples/BrodyHopfield.py
    rename to examples/BrodyHopfield.py
    diff --git a/pynest/examples/CampbellSiegert.py b/examples/CampbellSiegert.py
    similarity index 100%
    rename from pynest/examples/CampbellSiegert.py
    rename to examples/CampbellSiegert.py
    diff --git a/pynest/examples/Potjans_2014/README.rst b/examples/Potjans_2014/README.rst
    similarity index 100%
    rename from pynest/examples/Potjans_2014/README.rst
    rename to examples/Potjans_2014/README.rst
    diff --git a/pynest/examples/Potjans_2014/box_plot.png b/examples/Potjans_2014/box_plot.png
    similarity index 100%
    rename from pynest/examples/Potjans_2014/box_plot.png
    rename to examples/Potjans_2014/box_plot.png
    diff --git a/pynest/examples/Potjans_2014/helpers.py b/examples/Potjans_2014/helpers.py
    similarity index 100%
    rename from pynest/examples/Potjans_2014/helpers.py
    rename to examples/Potjans_2014/helpers.py
    diff --git a/pynest/examples/Potjans_2014/microcircuit.png b/examples/Potjans_2014/microcircuit.png
    similarity index 100%
    rename from pynest/examples/Potjans_2014/microcircuit.png
    rename to examples/Potjans_2014/microcircuit.png
    diff --git a/pynest/examples/Potjans_2014/network.py b/examples/Potjans_2014/network.py
    similarity index 100%
    rename from pynest/examples/Potjans_2014/network.py
    rename to examples/Potjans_2014/network.py
    diff --git a/pynest/examples/Potjans_2014/network_params.py b/examples/Potjans_2014/network_params.py
    similarity index 100%
    rename from pynest/examples/Potjans_2014/network_params.py
    rename to examples/Potjans_2014/network_params.py
    diff --git a/pynest/examples/Potjans_2014/raster_plot.png b/examples/Potjans_2014/raster_plot.png
    similarity index 100%
    rename from pynest/examples/Potjans_2014/raster_plot.png
    rename to examples/Potjans_2014/raster_plot.png
    diff --git a/pynest/examples/Potjans_2014/reference_data/population_nodeids.dat b/examples/Potjans_2014/reference_data/population_nodeids.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/population_nodeids.dat
    rename to examples/Potjans_2014/reference_data/population_nodeids.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/rate0.dat b/examples/Potjans_2014/reference_data/rate0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/rate0.dat
    rename to examples/Potjans_2014/reference_data/rate0.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/rate1.dat b/examples/Potjans_2014/reference_data/rate1.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/rate1.dat
    rename to examples/Potjans_2014/reference_data/rate1.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/rate2.dat b/examples/Potjans_2014/reference_data/rate2.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/rate2.dat
    rename to examples/Potjans_2014/reference_data/rate2.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/rate3.dat b/examples/Potjans_2014/reference_data/rate3.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/rate3.dat
    rename to examples/Potjans_2014/reference_data/rate3.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/rate4.dat b/examples/Potjans_2014/reference_data/rate4.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/rate4.dat
    rename to examples/Potjans_2014/reference_data/rate4.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/rate5.dat b/examples/Potjans_2014/reference_data/rate5.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/rate5.dat
    rename to examples/Potjans_2014/reference_data/rate5.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/rate6.dat b/examples/Potjans_2014/reference_data/rate6.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/rate6.dat
    rename to examples/Potjans_2014/reference_data/rate6.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/rate7.dat b/examples/Potjans_2014/reference_data/rate7.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/rate7.dat
    rename to examples/Potjans_2014/reference_data/rate7.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/spike_recorder-7718-0.dat b/examples/Potjans_2014/reference_data/spike_recorder-7718-0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/spike_recorder-7718-0.dat
    rename to examples/Potjans_2014/reference_data/spike_recorder-7718-0.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/spike_recorder-7719-0.dat b/examples/Potjans_2014/reference_data/spike_recorder-7719-0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/spike_recorder-7719-0.dat
    rename to examples/Potjans_2014/reference_data/spike_recorder-7719-0.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/spike_recorder-7720-0.dat b/examples/Potjans_2014/reference_data/spike_recorder-7720-0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/spike_recorder-7720-0.dat
    rename to examples/Potjans_2014/reference_data/spike_recorder-7720-0.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/spike_recorder-7721-0.dat b/examples/Potjans_2014/reference_data/spike_recorder-7721-0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/spike_recorder-7721-0.dat
    rename to examples/Potjans_2014/reference_data/spike_recorder-7721-0.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/spike_recorder-7722-0.dat b/examples/Potjans_2014/reference_data/spike_recorder-7722-0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/spike_recorder-7722-0.dat
    rename to examples/Potjans_2014/reference_data/spike_recorder-7722-0.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/spike_recorder-7723-0.dat b/examples/Potjans_2014/reference_data/spike_recorder-7723-0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/spike_recorder-7723-0.dat
    rename to examples/Potjans_2014/reference_data/spike_recorder-7723-0.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/spike_recorder-7724-0.dat b/examples/Potjans_2014/reference_data/spike_recorder-7724-0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/spike_recorder-7724-0.dat
    rename to examples/Potjans_2014/reference_data/spike_recorder-7724-0.dat
    diff --git a/pynest/examples/Potjans_2014/reference_data/spike_recorder-7725-0.dat b/examples/Potjans_2014/reference_data/spike_recorder-7725-0.dat
    similarity index 100%
    rename from pynest/examples/Potjans_2014/reference_data/spike_recorder-7725-0.dat
    rename to examples/Potjans_2014/reference_data/spike_recorder-7725-0.dat
    diff --git a/pynest/examples/Potjans_2014/run_microcircuit.py b/examples/Potjans_2014/run_microcircuit.py
    similarity index 100%
    rename from pynest/examples/Potjans_2014/run_microcircuit.py
    rename to examples/Potjans_2014/run_microcircuit.py
    diff --git a/pynest/examples/Potjans_2014/sim_params.py b/examples/Potjans_2014/sim_params.py
    similarity index 100%
    rename from pynest/examples/Potjans_2014/sim_params.py
    rename to examples/Potjans_2014/sim_params.py
    diff --git a/pynest/examples/Potjans_2014/stimulus_params.py b/examples/Potjans_2014/stimulus_params.py
    similarity index 100%
    rename from pynest/examples/Potjans_2014/stimulus_params.py
    rename to examples/Potjans_2014/stimulus_params.py
    diff --git a/pynest/examples/README.rst b/examples/README.rst
    similarity index 100%
    rename from pynest/examples/README.rst
    rename to examples/README.rst
    diff --git a/pynest/examples/aeif_cond_beta_multisynapse.py b/examples/aeif_cond_beta_multisynapse.py
    similarity index 100%
    rename from pynest/examples/aeif_cond_beta_multisynapse.py
    rename to examples/aeif_cond_beta_multisynapse.py
    diff --git a/pynest/examples/balancedneuron.py b/examples/balancedneuron.py
    similarity index 100%
    rename from pynest/examples/balancedneuron.py
    rename to examples/balancedneuron.py
    diff --git a/pynest/examples/brette_gerstner_fig_2c.py b/examples/brette_gerstner_fig_2c.py
    similarity index 100%
    rename from pynest/examples/brette_gerstner_fig_2c.py
    rename to examples/brette_gerstner_fig_2c.py
    diff --git a/pynest/examples/brette_gerstner_fig_3d.py b/examples/brette_gerstner_fig_3d.py
    similarity index 100%
    rename from pynest/examples/brette_gerstner_fig_3d.py
    rename to examples/brette_gerstner_fig_3d.py
    diff --git a/pynest/examples/brunel-py-ex-12502-0.gdf b/examples/brunel-py-ex-12502-0.gdf
    similarity index 100%
    rename from pynest/examples/brunel-py-ex-12502-0.gdf
    rename to examples/brunel-py-ex-12502-0.gdf
    diff --git a/pynest/examples/brunel-py-in-12503-0.gdf b/examples/brunel-py-in-12503-0.gdf
    similarity index 100%
    rename from pynest/examples/brunel-py-in-12503-0.gdf
    rename to examples/brunel-py-in-12503-0.gdf
    diff --git a/pynest/examples/brunel_alpha_evolution_strategies.py b/examples/brunel_alpha_evolution_strategies.py
    similarity index 100%
    rename from pynest/examples/brunel_alpha_evolution_strategies.py
    rename to examples/brunel_alpha_evolution_strategies.py
    diff --git a/pynest/examples/brunel_alpha_nest.py b/examples/brunel_alpha_nest.py
    similarity index 100%
    rename from pynest/examples/brunel_alpha_nest.py
    rename to examples/brunel_alpha_nest.py
    diff --git a/pynest/examples/brunel_delta_nest.py b/examples/brunel_delta_nest.py
    similarity index 100%
    rename from pynest/examples/brunel_delta_nest.py
    rename to examples/brunel_delta_nest.py
    diff --git a/pynest/examples/brunel_exp_multisynapse_nest.py b/examples/brunel_exp_multisynapse_nest.py
    similarity index 100%
    rename from pynest/examples/brunel_exp_multisynapse_nest.py
    rename to examples/brunel_exp_multisynapse_nest.py
    diff --git a/pynest/examples/brunel_siegert_nest.py b/examples/brunel_siegert_nest.py
    similarity index 100%
    rename from pynest/examples/brunel_siegert_nest.py
    rename to examples/brunel_siegert_nest.py
    diff --git a/pynest/examples/clopath_synapse_small_network.py b/examples/clopath_synapse_small_network.py
    similarity index 100%
    rename from pynest/examples/clopath_synapse_small_network.py
    rename to examples/clopath_synapse_small_network.py
    diff --git a/pynest/examples/clopath_synapse_spike_pairing.py b/examples/clopath_synapse_spike_pairing.py
    similarity index 100%
    rename from pynest/examples/clopath_synapse_spike_pairing.py
    rename to examples/clopath_synapse_spike_pairing.py
    diff --git a/pynest/examples/compartmental_model/README.rst b/examples/compartmental_model/README.rst
    similarity index 100%
    rename from pynest/examples/compartmental_model/README.rst
    rename to examples/compartmental_model/README.rst
    diff --git a/pynest/examples/compartmental_model/receptors_and_current.py b/examples/compartmental_model/receptors_and_current.py
    similarity index 100%
    rename from pynest/examples/compartmental_model/receptors_and_current.py
    rename to examples/compartmental_model/receptors_and_current.py
    diff --git a/pynest/examples/compartmental_model/two_comps.py b/examples/compartmental_model/two_comps.py
    similarity index 100%
    rename from pynest/examples/compartmental_model/two_comps.py
    rename to examples/compartmental_model/two_comps.py
    diff --git a/pynest/examples/correlospinmatrix_detector_two_neuron.py b/examples/correlospinmatrix_detector_two_neuron.py
    similarity index 100%
    rename from pynest/examples/correlospinmatrix_detector_two_neuron.py
    rename to examples/correlospinmatrix_detector_two_neuron.py
    diff --git a/pynest/examples/cross_check_mip_corrdet.py b/examples/cross_check_mip_corrdet.py
    similarity index 100%
    rename from pynest/examples/cross_check_mip_corrdet.py
    rename to examples/cross_check_mip_corrdet.py
    diff --git a/pynest/examples/csa_example.py b/examples/csa_example.py
    similarity index 100%
    rename from pynest/examples/csa_example.py
    rename to examples/csa_example.py
    diff --git a/pynest/examples/csa_spatial_example.py b/examples/csa_spatial_example.py
    similarity index 100%
    rename from pynest/examples/csa_spatial_example.py
    rename to examples/csa_spatial_example.py
    diff --git a/pynest/examples/evaluate_quantal_stp_synapse.py b/examples/evaluate_quantal_stp_synapse.py
    similarity index 100%
    rename from pynest/examples/evaluate_quantal_stp_synapse.py
    rename to examples/evaluate_quantal_stp_synapse.py
    diff --git a/pynest/examples/evaluate_tsodyks2_synapse.py b/examples/evaluate_tsodyks2_synapse.py
    similarity index 100%
    rename from pynest/examples/evaluate_tsodyks2_synapse.py
    rename to examples/evaluate_tsodyks2_synapse.py
    diff --git a/pynest/examples/gap_junctions_inhibitory_network.py b/examples/gap_junctions_inhibitory_network.py
    similarity index 100%
    rename from pynest/examples/gap_junctions_inhibitory_network.py
    rename to examples/gap_junctions_inhibitory_network.py
    diff --git a/pynest/examples/gap_junctions_two_neurons.py b/examples/gap_junctions_two_neurons.py
    similarity index 100%
    rename from pynest/examples/gap_junctions_two_neurons.py
    rename to examples/gap_junctions_two_neurons.py
    diff --git a/pynest/examples/gif_cond_exp_multisynapse.py b/examples/gif_cond_exp_multisynapse.py
    similarity index 100%
    rename from pynest/examples/gif_cond_exp_multisynapse.py
    rename to examples/gif_cond_exp_multisynapse.py
    diff --git a/pynest/examples/gif_pop_psc_exp.py b/examples/gif_pop_psc_exp.py
    similarity index 100%
    rename from pynest/examples/gif_pop_psc_exp.py
    rename to examples/gif_pop_psc_exp.py
    diff --git a/pynest/examples/gif_population.py b/examples/gif_population.py
    similarity index 100%
    rename from pynest/examples/gif_population.py
    rename to examples/gif_population.py
    diff --git a/pynest/examples/glif_cond_neuron.py b/examples/glif_cond_neuron.py
    similarity index 100%
    rename from pynest/examples/glif_cond_neuron.py
    rename to examples/glif_cond_neuron.py
    diff --git a/pynest/examples/glif_psc_neuron.py b/examples/glif_psc_neuron.py
    similarity index 100%
    rename from pynest/examples/glif_psc_neuron.py
    rename to examples/glif_psc_neuron.py
    diff --git a/pynest/examples/hh_phaseplane.py b/examples/hh_phaseplane.py
    similarity index 100%
    rename from pynest/examples/hh_phaseplane.py
    rename to examples/hh_phaseplane.py
    diff --git a/pynest/examples/hh_psc_alpha.py b/examples/hh_psc_alpha.py
    similarity index 100%
    rename from pynest/examples/hh_psc_alpha.py
    rename to examples/hh_psc_alpha.py
    diff --git a/pynest/examples/hpc_benchmark.py b/examples/hpc_benchmark.py
    similarity index 100%
    rename from pynest/examples/hpc_benchmark.py
    rename to examples/hpc_benchmark.py
    diff --git a/pynest/examples/hpc_benchmark_connectivity.svg b/examples/hpc_benchmark_connectivity.svg
    similarity index 100%
    rename from pynest/examples/hpc_benchmark_connectivity.svg
    rename to examples/hpc_benchmark_connectivity.svg
    diff --git a/pynest/examples/if_curve.py b/examples/if_curve.py
    similarity index 100%
    rename from pynest/examples/if_curve.py
    rename to examples/if_curve.py
    diff --git a/pynest/examples/intrinsic_currents_spiking.py b/examples/intrinsic_currents_spiking.py
    similarity index 100%
    rename from pynest/examples/intrinsic_currents_spiking.py
    rename to examples/intrinsic_currents_spiking.py
    diff --git a/pynest/examples/intrinsic_currents_subthreshold.py b/examples/intrinsic_currents_subthreshold.py
    similarity index 100%
    rename from pynest/examples/intrinsic_currents_subthreshold.py
    rename to examples/intrinsic_currents_subthreshold.py
    diff --git a/pynest/examples/lin_rate_ipn_network.py b/examples/lin_rate_ipn_network.py
    similarity index 100%
    rename from pynest/examples/lin_rate_ipn_network.py
    rename to examples/lin_rate_ipn_network.py
    diff --git a/pynest/examples/mc_neuron.py b/examples/mc_neuron.py
    similarity index 100%
    rename from pynest/examples/mc_neuron.py
    rename to examples/mc_neuron.py
    diff --git a/pynest/examples/multimeter_file.py b/examples/multimeter_file.py
    similarity index 100%
    rename from pynest/examples/multimeter_file.py
    rename to examples/multimeter_file.py
    diff --git a/pynest/examples/music_cont_out_proxy_example/README.md b/examples/music_cont_out_proxy_example/README.md
    similarity index 100%
    rename from pynest/examples/music_cont_out_proxy_example/README.md
    rename to examples/music_cont_out_proxy_example/README.md
    diff --git a/pynest/examples/music_cont_out_proxy_example/README.rst b/examples/music_cont_out_proxy_example/README.rst
    similarity index 100%
    rename from pynest/examples/music_cont_out_proxy_example/README.rst
    rename to examples/music_cont_out_proxy_example/README.rst
    diff --git a/pynest/examples/music_cont_out_proxy_example/nest_script.py b/examples/music_cont_out_proxy_example/nest_script.py
    similarity index 100%
    rename from pynest/examples/music_cont_out_proxy_example/nest_script.py
    rename to examples/music_cont_out_proxy_example/nest_script.py
    diff --git a/pynest/examples/music_cont_out_proxy_example/receiver_script.py b/examples/music_cont_out_proxy_example/receiver_script.py
    similarity index 100%
    rename from pynest/examples/music_cont_out_proxy_example/receiver_script.py
    rename to examples/music_cont_out_proxy_example/receiver_script.py
    diff --git a/pynest/examples/music_cont_out_proxy_example/test.music b/examples/music_cont_out_proxy_example/test.music
    similarity index 100%
    rename from pynest/examples/music_cont_out_proxy_example/test.music
    rename to examples/music_cont_out_proxy_example/test.music
    diff --git a/pynest/examples/one_neuron.py b/examples/one_neuron.py
    similarity index 100%
    rename from pynest/examples/one_neuron.py
    rename to examples/one_neuron.py
    diff --git a/pynest/examples/one_neuron_with_noise.py b/examples/one_neuron_with_noise.py
    similarity index 100%
    rename from pynest/examples/one_neuron_with_noise.py
    rename to examples/one_neuron_with_noise.py
    diff --git a/pynest/examples/plot_weight_matrices.py b/examples/plot_weight_matrices.py
    similarity index 100%
    rename from pynest/examples/plot_weight_matrices.py
    rename to examples/plot_weight_matrices.py
    diff --git a/pynest/examples/pong/README.rst b/examples/pong/README.rst
    similarity index 100%
    rename from pynest/examples/pong/README.rst
    rename to examples/pong/README.rst
    diff --git a/pynest/examples/pong/generate_gif.py b/examples/pong/generate_gif.py
    similarity index 100%
    rename from pynest/examples/pong/generate_gif.py
    rename to examples/pong/generate_gif.py
    diff --git a/pynest/examples/pong/networks.py b/examples/pong/networks.py
    similarity index 100%
    rename from pynest/examples/pong/networks.py
    rename to examples/pong/networks.py
    diff --git a/pynest/examples/pong/pong.py b/examples/pong/pong.py
    similarity index 100%
    rename from pynest/examples/pong/pong.py
    rename to examples/pong/pong.py
    diff --git a/pynest/examples/pong/run_simulations.py b/examples/pong/run_simulations.py
    similarity index 100%
    rename from pynest/examples/pong/run_simulations.py
    rename to examples/pong/run_simulations.py
    diff --git a/pynest/examples/precise_spiking.py b/examples/precise_spiking.py
    similarity index 100%
    rename from pynest/examples/precise_spiking.py
    rename to examples/precise_spiking.py
    diff --git a/pynest/examples/pulsepacket.py b/examples/pulsepacket.py
    similarity index 100%
    rename from pynest/examples/pulsepacket.py
    rename to examples/pulsepacket.py
    diff --git a/pynest/examples/rate_neuron_dm.py b/examples/rate_neuron_dm.py
    similarity index 100%
    rename from pynest/examples/rate_neuron_dm.py
    rename to examples/rate_neuron_dm.py
    diff --git a/pynest/examples/recording_demo.py b/examples/recording_demo.py
    similarity index 100%
    rename from pynest/examples/recording_demo.py
    rename to examples/recording_demo.py
    diff --git a/pynest/examples/repeated_stimulation.py b/examples/repeated_stimulation.py
    similarity index 100%
    rename from pynest/examples/repeated_stimulation.py
    rename to examples/repeated_stimulation.py
    diff --git a/examples/run_examples.sh b/examples/run_examples.sh
    index b00119d3b1..a81433fa9c 100755
    --- a/examples/run_examples.sh
    +++ b/examples/run_examples.sh
    @@ -48,7 +48,7 @@ if [ "${#}" -eq 0 ]; then
         else
             EXAMPLES="$(grep -rl --include=\*\.sli 'autorun=true' examples/)"
         fi
    -    EXAMPLES+=" $(find ../pynest/examples -name '*.py')"
    +    EXAMPLES+=" $(find . -name '*.py')"
     else
         EXAMPLES+=${@}
     fi
    @@ -58,7 +58,8 @@ if [ ! -z "${SKIP_LIST+x}" ]; then
     fi
     
     # turn off plotting to the screen and waiting for input
    -export MPLCONFIGDIR="$(pwd)/matplotlib/"
    +export MPLCONFIGDIR=$(mktemp -d)
    +echo "backend : svg" > $MPLCONFIGDIR/matplotlibrc
     
     time_format="  time: {real: %E, user: %U, system: %S}\n\
       memory: {total: %K, max_rss: %M}"
    diff --git a/pynest/examples/sensitivity_to_perturbation.py b/examples/sensitivity_to_perturbation.py
    similarity index 100%
    rename from pynest/examples/sensitivity_to_perturbation.py
    rename to examples/sensitivity_to_perturbation.py
    diff --git a/pynest/examples/sinusoidal_gamma_generator.py b/examples/sinusoidal_gamma_generator.py
    similarity index 100%
    rename from pynest/examples/sinusoidal_gamma_generator.py
    rename to examples/sinusoidal_gamma_generator.py
    diff --git a/pynest/examples/sinusoidal_poisson_generator.py b/examples/sinusoidal_poisson_generator.py
    similarity index 100%
    rename from pynest/examples/sinusoidal_poisson_generator.py
    rename to examples/sinusoidal_poisson_generator.py
    diff --git a/pynest/examples/spatial/README.rst b/examples/spatial/README.rst
    similarity index 100%
    rename from pynest/examples/spatial/README.rst
    rename to examples/spatial/README.rst
    diff --git a/pynest/examples/spatial/conncomp.py b/examples/spatial/conncomp.py
    similarity index 100%
    rename from pynest/examples/spatial/conncomp.py
    rename to examples/spatial/conncomp.py
    diff --git a/pynest/examples/spatial/conncon_sources.py b/examples/spatial/conncon_sources.py
    similarity index 100%
    rename from pynest/examples/spatial/conncon_sources.py
    rename to examples/spatial/conncon_sources.py
    diff --git a/pynest/examples/spatial/conncon_targets.py b/examples/spatial/conncon_targets.py
    similarity index 100%
    rename from pynest/examples/spatial/conncon_targets.py
    rename to examples/spatial/conncon_targets.py
    diff --git a/pynest/examples/spatial/connex.py b/examples/spatial/connex.py
    similarity index 100%
    rename from pynest/examples/spatial/connex.py
    rename to examples/spatial/connex.py
    diff --git a/pynest/examples/spatial/connex_ew.py b/examples/spatial/connex_ew.py
    similarity index 100%
    rename from pynest/examples/spatial/connex_ew.py
    rename to examples/spatial/connex_ew.py
    diff --git a/pynest/examples/spatial/ctx_2n.py b/examples/spatial/ctx_2n.py
    similarity index 100%
    rename from pynest/examples/spatial/ctx_2n.py
    rename to examples/spatial/ctx_2n.py
    diff --git a/pynest/examples/spatial/gaussex.py b/examples/spatial/gaussex.py
    similarity index 100%
    rename from pynest/examples/spatial/gaussex.py
    rename to examples/spatial/gaussex.py
    diff --git a/pynest/examples/spatial/grid_iaf.py b/examples/spatial/grid_iaf.py
    similarity index 100%
    rename from pynest/examples/spatial/grid_iaf.py
    rename to examples/spatial/grid_iaf.py
    diff --git a/pynest/examples/spatial/grid_iaf_irr.py b/examples/spatial/grid_iaf_irr.py
    similarity index 100%
    rename from pynest/examples/spatial/grid_iaf_irr.py
    rename to examples/spatial/grid_iaf_irr.py
    diff --git a/pynest/examples/spatial/grid_iaf_oc.py b/examples/spatial/grid_iaf_oc.py
    similarity index 100%
    rename from pynest/examples/spatial/grid_iaf_oc.py
    rename to examples/spatial/grid_iaf_oc.py
    diff --git a/pynest/examples/spatial/nodes_source_target.py b/examples/spatial/nodes_source_target.py
    similarity index 100%
    rename from pynest/examples/spatial/nodes_source_target.py
    rename to examples/spatial/nodes_source_target.py
    diff --git a/pynest/examples/spatial/test_3d.py b/examples/spatial/test_3d.py
    similarity index 100%
    rename from pynest/examples/spatial/test_3d.py
    rename to examples/spatial/test_3d.py
    diff --git a/pynest/examples/spatial/test_3d_exp.py b/examples/spatial/test_3d_exp.py
    similarity index 100%
    rename from pynest/examples/spatial/test_3d_exp.py
    rename to examples/spatial/test_3d_exp.py
    diff --git a/pynest/examples/spatial/test_3d_gauss.py b/examples/spatial/test_3d_gauss.py
    similarity index 100%
    rename from pynest/examples/spatial/test_3d_gauss.py
    rename to examples/spatial/test_3d_gauss.py
    diff --git a/pynest/examples/store_restore_network.py b/examples/store_restore_network.py
    similarity index 100%
    rename from pynest/examples/store_restore_network.py
    rename to examples/store_restore_network.py
    diff --git a/pynest/examples/structural_plasticity.py b/examples/structural_plasticity.py
    similarity index 100%
    rename from pynest/examples/structural_plasticity.py
    rename to examples/structural_plasticity.py
    diff --git a/pynest/examples/sudoku/README.rst b/examples/sudoku/README.rst
    similarity index 100%
    rename from pynest/examples/sudoku/README.rst
    rename to examples/sudoku/README.rst
    diff --git a/pynest/examples/sudoku/helpers_sudoku.py b/examples/sudoku/helpers_sudoku.py
    similarity index 100%
    rename from pynest/examples/sudoku/helpers_sudoku.py
    rename to examples/sudoku/helpers_sudoku.py
    diff --git a/pynest/examples/sudoku/output/sudoku_noise_comparison.gif b/examples/sudoku/output/sudoku_noise_comparison.gif
    similarity index 100%
    rename from pynest/examples/sudoku/output/sudoku_noise_comparison.gif
    rename to examples/sudoku/output/sudoku_noise_comparison.gif
    diff --git a/pynest/examples/sudoku/output/sudoku_solution.gif b/examples/sudoku/output/sudoku_solution.gif
    similarity index 100%
    rename from pynest/examples/sudoku/output/sudoku_solution.gif
    rename to examples/sudoku/output/sudoku_solution.gif
    diff --git a/pynest/examples/sudoku/output/sudoku_solution.png b/examples/sudoku/output/sudoku_solution.png
    similarity index 100%
    rename from pynest/examples/sudoku/output/sudoku_solution.png
    rename to examples/sudoku/output/sudoku_solution.png
    diff --git a/pynest/examples/sudoku/plot_progress.py b/examples/sudoku/plot_progress.py
    similarity index 100%
    rename from pynest/examples/sudoku/plot_progress.py
    rename to examples/sudoku/plot_progress.py
    diff --git a/pynest/examples/sudoku/sudoku_net.py b/examples/sudoku/sudoku_net.py
    similarity index 100%
    rename from pynest/examples/sudoku/sudoku_net.py
    rename to examples/sudoku/sudoku_net.py
    diff --git a/pynest/examples/sudoku/sudoku_solver.py b/examples/sudoku/sudoku_solver.py
    similarity index 100%
    rename from pynest/examples/sudoku/sudoku_solver.py
    rename to examples/sudoku/sudoku_solver.py
    diff --git a/pynest/examples/synapsecollection.py b/examples/synapsecollection.py
    similarity index 100%
    rename from pynest/examples/synapsecollection.py
    rename to examples/synapsecollection.py
    diff --git a/pynest/examples/testiaf.py b/examples/testiaf.py
    similarity index 100%
    rename from pynest/examples/testiaf.py
    rename to examples/testiaf.py
    diff --git a/pynest/examples/tsodyks_depressing.py b/examples/tsodyks_depressing.py
    similarity index 100%
    rename from pynest/examples/tsodyks_depressing.py
    rename to examples/tsodyks_depressing.py
    diff --git a/pynest/examples/tsodyks_facilitating.py b/examples/tsodyks_facilitating.py
    similarity index 100%
    rename from pynest/examples/tsodyks_facilitating.py
    rename to examples/tsodyks_facilitating.py
    diff --git a/pynest/examples/twoneurons.py b/examples/twoneurons.py
    similarity index 100%
    rename from pynest/examples/twoneurons.py
    rename to examples/twoneurons.py
    diff --git a/pynest/examples/urbanczik_synapse_example.py b/examples/urbanczik_synapse_example.py
    similarity index 100%
    rename from pynest/examples/urbanczik_synapse_example.py
    rename to examples/urbanczik_synapse_example.py
    diff --git a/pynest/examples/vinit_example.py b/examples/vinit_example.py
    similarity index 100%
    rename from pynest/examples/vinit_example.py
    rename to examples/vinit_example.py
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 94c314ac45..f6cccbd745 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -68,8 +68,4 @@ if ( HAVE_PYTHON )
           "
       )
     
    -  install( DIRECTORY examples/
    -      DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/pynest
    -  )
    -
     endif ()
    
    From ee556004ad28913e6bff008b87ed0e8969ddcdda Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 12 Sep 2023 23:19:55 +0200
    Subject: [PATCH 148/375] Fix undefined references and formatting
    
    ---
     nestkernel/CMakeLists.txt            |  3 +-
     nestkernel/conn_builder.h            |  5 +-
     nestkernel/connection_manager.cpp    |  1 -
     nestkernel/connection_manager.h      |  5 +-
     nestkernel/grid_layer.h              |  8 +--
     nestkernel/kernel_manager.cpp        |  6 ++
     nestkernel/nest.cpp                  |  7 +-
     nestkernel/nest_names.h              |  2 +-
     nestkernel/node_collection.cpp       | 63 +-----------------
     nestkernel/node_collection_impl.h    | 95 ++++++++++++++++++++++++++++
     nestkernel/node_manager.cpp          |  1 +
     nestkernel/ntree.h                   |  2 -
     nestkernel/parameter.cpp             |  4 +-
     nestkernel/recording_backend_mpi.cpp |  2 +-
     nestkernel/sp_manager.cpp            |  8 +--
     nestkernel/sp_manager.h              |  5 +-
     nestkernel/spatial.cpp               |  3 +-
     pynest/nest/__init__.py              |  1 +
     pynest/nest/lib/hl_api_sonata.py     | 18 +++---
     19 files changed, 145 insertions(+), 94 deletions(-)
     create mode 100644 nestkernel/node_collection_impl.h
    
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index b7e9f853c8..867e5c0df2 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -37,7 +37,7 @@ set ( nestkernel_sources
           event.h event.cpp
           exceptions.h exceptions.cpp
           genericmodel.h genericmodel_impl.h
    -      node_collection.h node_collection.cpp
    +      node_collection.h node_collection_impl.h node_collection.cpp
           generic_factory.h
           histentry.h histentry.cpp
           model.h model.cpp
    @@ -127,6 +127,7 @@ set ( nestkernel_sources
       ../models/dc_generator.h ../models/dc_generator.cpp
       ../models/spike_generator.h ../models/spike_generator.cpp
       ../models/spike_recorder.h ../models/spike_recorder.cpp
    +  ../models/spike_train_injector.h ../models/spike_train_injector.cpp
       ../models/poisson_generator.h ../models/poisson_generator.cpp
       ../models/poisson_generator_ps.h ../models/poisson_generator_ps.cpp
       ../models/multimeter.h ../models/multimeter.cpp
    diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h
    index 0f44005073..380b299689 100644
    --- a/nestkernel/conn_builder.h
    +++ b/nestkernel/conn_builder.h
    @@ -67,7 +67,10 @@ class ConnBuilder
       //! Delete synapses with or without structural plasticity
       virtual void disconnect();
     
    -  ConnBuilder( NodeCollectionPTR sources, NodeCollectionPTR targets, const dictionary& conn_spec, const std::vector< dictionary >& syn_specs );
    +  ConnBuilder( NodeCollectionPTR sources,
    +    NodeCollectionPTR targets,
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs );
       virtual ~ConnBuilder();
     
       size_t
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 2c5556aef5..0785cdcbb0 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -57,7 +57,6 @@
     #include "vp_manager_impl.h"
     
     
    -
     nest::ConnectionManager::ConnectionManager()
       : connruledict_()
       , connbuilder_factories_()
    diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h
    index c58aa13223..4157353dad 100644
    --- a/nestkernel/connection_manager.h
    +++ b/nestkernel/connection_manager.h
    @@ -99,7 +99,10 @@ class ConnectionManager : public ManagerInterface
       /**
        * Create connections.
        */
    -  void connect( NodeCollectionPTR sources, NodeCollectionPTR targets, const dictionary& conn_spec, const std::vector< dictionary >& syn_specs );
    +  void connect( NodeCollectionPTR sources,
    +    NodeCollectionPTR targets,
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs );
     
       void connect( std::vector< size_t > sources, std::vector< size_t > targets, const dictionary& syn_spec );
     
    diff --git a/nestkernel/grid_layer.h b/nestkernel/grid_layer.h
    index a51c991b61..5f7c160d8a 100644
    --- a/nestkernel/grid_layer.h
    +++ b/nestkernel/grid_layer.h
    @@ -297,16 +297,16 @@ template < int D >
     void
     GridLayer< D >::insert_global_positions_ntree_( Ntree< D, size_t >& tree, NodeCollectionPTR node_collection )
     {
    -//  constexpr std::insert_iterator< Ntree< D, size_t > > ins1( std::insert_iterator( tree, tree.end() ) );
    -//  insert_global_positions_( ins1, node_collection );
    +  //  constexpr std::insert_iterator< Ntree< D, size_t > > ins1( std::insert_iterator( tree, tree.end() ) );
    +  //  insert_global_positions_( ins1, node_collection );
     
    -//  auto ins2 = std::inserter( tree, tree.end() );
    +  //  auto ins2 = std::inserter( tree, tree.end() );
       auto ins2 = std::back_inserter( tree );
       insert_global_positions_( ins2, node_collection );
     }
     
     
    -  template < int D >
    +template < int D >
     void
     GridLayer< D >::insert_global_positions_vector_( std::vector< std::pair< Position< D >, size_t > >& vec,
       NodeCollectionPTR node_collection )
    diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp
    index 77d1347fdb..0ffafd58ab 100644
    --- a/nestkernel/kernel_manager.cpp
    +++ b/nestkernel/kernel_manager.cpp
    @@ -99,6 +99,12 @@ nest::KernelManager::get_build_info_()
       build_info[ "have_sionlib" ] = false;
     #endif
     
    +#ifdef HAVE_HDF5
    +  build_info[ "have_hdf5" ] = true;
    +#else
    +  build_info[ "have_hdf5" ] = false;
    +#endif
    +
     #ifdef NDEBUG
       build_info[ "ndebug" ] = true;
     #else
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 94f44077cd..cfb179d06b 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -29,6 +29,7 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     #include "mpi_manager_impl.h"
    +#include "node_collection_impl.h"
     #include "parameter.h"
     
     #include "sp_manager.h"
    @@ -57,8 +58,8 @@
     #include "poisson_generator_ps.h"
     #include "pp_psc_delta.h"
     #include "spike_generator.h"
    -#include "spike_train_injector.h"
     #include "spike_recorder.h"
    +#include "spike_train_injector.h"
     #include "tanh_rate.h"
     
     #include "aeif_cond_exp.h"
    @@ -101,13 +102,13 @@
     #include "static_synapse.h"
     #include "static_synapse_hom_w.h"
     #include "stdp_dopamine_synapse.h"
    +#include "stdp_facetshw_synapse_hom.h"
    +#include "stdp_facetshw_synapse_hom_impl.h"
     #include "stdp_nn_pre_centered_synapse.h"
     #include "stdp_nn_restr_synapse.h"
     #include "stdp_nn_symm_synapse.h"
     #include "stdp_pl_synapse_hom.h"
     #include "stdp_synapse.h"
    -#include "stdp_facetshw_synapse_hom.h"
    -#include "stdp_facetshw_synapse_hom_impl.h"
     #include "stdp_synapse_hom.h"
     #include "stdp_triplet_synapse.h"
     #include "tsodyks2_synapse.h"
    diff --git a/nestkernel/nest_names.h b/nestkernel/nest_names.h
    index 24fd1b2a6d..7b9300528b 100644
    --- a/nestkernel/nest_names.h
    +++ b/nestkernel/nest_names.h
    @@ -304,7 +304,7 @@ const std::string min( "min" );
     const std::string min_delay( "min_delay" );
     const std::string min_update_time( "min_update_time" );
     const std::string minor_axis( "minor_axis" );
    -const std::string mpi_address( "mpi_address");
    +const std::string mpi_address( "mpi_address" );
     const std::string model( "model" );
     const std::string model_id( "model_id" );
     const std::string ms_per_tic( "ms_per_tic" );
    diff --git a/nestkernel/node_collection.cpp b/nestkernel/node_collection.cpp
    index 9a3cd7f4c2..6515944d3f 100644
    --- a/nestkernel/node_collection.cpp
    +++ b/nestkernel/node_collection.cpp
    @@ -26,6 +26,7 @@
     #include "kernel_manager.h"
     #include "mpi_manager_impl.h"
     #include "node.h"
    +#include "node_collection_impl.h"
     #include "vp_manager_impl.h"
     
     // C++ includes:
    @@ -266,74 +267,12 @@ NodeCollection::create( const Node* node )
       return NodeCollection::create_();
     }
     
    -NodeCollectionPTR
    -NodeCollection::create( const std::vector< auto >& node_ids_vector )
    -{
    -  if ( node_ids_vector.empty() )
    -  {
    -    return NodeCollection::create_();
    -  }
    -  if ( not std::is_sorted( node_ids_vector.begin(), node_ids_vector.end() ) )
    -  {
    -    throw BadProperty( "Indices must be sorted in ascending order" );
    -  }
    -  return NodeCollection::create_( node_ids_vector );
    -}
    -
     NodeCollectionPTR
     NodeCollection::create_()
     {
       return std::make_shared< NodeCollectionPrimitive >();
     }
     
    -NodeCollectionPTR
    -NodeCollection::create_( const std::vector< auto >& node_ids )
    -{
    -  size_t current_first = node_ids[ 0 ];
    -  size_t current_last = current_first;
    -  size_t current_model = kernel().modelrange_manager.get_model_id( node_ids[ 0 ] );
    -
    -  std::vector< NodeCollectionPrimitive > parts;
    -
    -  size_t old_node_id = current_first;
    -  for ( auto node_id = ++( node_ids.begin() ); node_id != node_ids.end(); ++node_id )
    -  {
    -    if ( *node_id == old_node_id )
    -    {
    -      throw BadProperty( "All node IDs in a NodeCollection have to be unique" );
    -    }
    -    old_node_id = *node_id;
    -
    -    const size_t next_model = kernel().modelrange_manager.get_model_id( *node_id );
    -
    -    if ( next_model == current_model and *node_id == ( current_last + 1 ) )
    -    {
    -      // node goes in Primitive
    -      ++current_last;
    -    }
    -    else
    -    {
    -      // store Primitive; node goes in new Primitive
    -      parts.emplace_back( current_first, current_last, current_model );
    -      current_first = *node_id;
    -      current_last = current_first;
    -      current_model = next_model;
    -    }
    -  }
    -
    -  // now push last section we opened
    -  parts.emplace_back( current_first, current_last, current_model );
    -
    -  if ( parts.size() == 1 )
    -  {
    -    return std::make_shared< NodeCollectionPrimitive >( parts[ 0 ] );
    -  }
    -  else
    -  {
    -    return std::make_shared< NodeCollectionComposite >( parts );
    -  }
    -}
    -
     bool
     NodeCollection::valid() const
     {
    diff --git a/nestkernel/node_collection_impl.h b/nestkernel/node_collection_impl.h
    new file mode 100644
    index 0000000000..370665745c
    --- /dev/null
    +++ b/nestkernel/node_collection_impl.h
    @@ -0,0 +1,95 @@
    +/*
    + *  node_collection_impl.h
    + *
    + *  This file is part of NEST.
    + *
    + *  Copyright (C) 2004 The NEST Initiative
    + *
    + *  NEST is free software: you can redistribute it and/or modify
    + *  it under the terms of the GNU General Public License as published by
    + *  the Free Software Foundation, either version 2 of the License, or
    + *  (at your option) any later version.
    + *
    + *  NEST is distributed in the hope that it will be useful,
    + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    + *  GNU General Public License for more details.
    + *
    + *  You should have received a copy of the GNU General Public License
    + *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    + *
    + */
    +
    +#ifndef NODE_COLLECTION_IMPL_H
    +#define NODE_COLLECTION_IMPL_H
    +
    +#include "node_collection.h"
    +
    +namespace nest
    +{
    +
    +NodeCollectionPTR
    +NodeCollection::create( const std::vector< auto >& node_ids_vector )
    +{
    +  if ( node_ids_vector.empty() )
    +  {
    +    return NodeCollection::create_();
    +  }
    +  if ( not std::is_sorted( node_ids_vector.begin(), node_ids_vector.end() ) )
    +  {
    +    throw BadProperty( "Indices must be sorted in ascending order" );
    +  }
    +  return NodeCollection::create_( node_ids_vector );
    +}
    +
    +NodeCollectionPTR
    +NodeCollection::create_( const std::vector< auto >& node_ids )
    +{
    +  size_t current_first = node_ids[ 0 ];
    +  size_t current_last = current_first;
    +  size_t current_model = kernel().modelrange_manager.get_model_id( node_ids[ 0 ] );
    +
    +  std::vector< NodeCollectionPrimitive > parts;
    +
    +  size_t old_node_id = current_first;
    +  for ( auto node_id = ++( node_ids.begin() ); node_id != node_ids.end(); ++node_id )
    +  {
    +    if ( *node_id == old_node_id )
    +    {
    +      throw BadProperty( "All node IDs in a NodeCollection have to be unique" );
    +    }
    +    old_node_id = *node_id;
    +
    +    const size_t next_model = kernel().modelrange_manager.get_model_id( *node_id );
    +
    +    if ( next_model == current_model and *node_id == ( current_last + 1 ) )
    +    {
    +      // node goes in Primitive
    +      ++current_last;
    +    }
    +    else
    +    {
    +      // store Primitive; node goes in new Primitive
    +      parts.emplace_back( current_first, current_last, current_model );
    +      current_first = *node_id;
    +      current_last = current_first;
    +      current_model = next_model;
    +    }
    +  }
    +
    +  // now push last section we opened
    +  parts.emplace_back( current_first, current_last, current_model );
    +
    +  if ( parts.size() == 1 )
    +  {
    +    return std::make_shared< NodeCollectionPrimitive >( parts[ 0 ] );
    +  }
    +  else
    +  {
    +    return std::make_shared< NodeCollectionComposite >( parts );
    +  }
    +}
    +
    +} // namespace nest
    +
    +#endif /* #ifndef NODE_COLLECTION_IMPL_H */
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index a0dabb6e82..655c9d678f 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -37,6 +37,7 @@
     #include "model.h"
     #include "model_manager_impl.h"
     #include "node.h"
    +#include "node_collection_impl.h"
     #include "vp_manager.h"
     #include "vp_manager_impl.h"
     
    diff --git a/nestkernel/ntree.h b/nestkernel/ntree.h
    index 714d92f5f1..94a2719243 100644
    --- a/nestkernel/ntree.h
    +++ b/nestkernel/ntree.h
    @@ -500,9 +500,7 @@ Ntree< D, T, max_capacity, max_depth >::push_back( const value_type& val )
     }
     
     
    -  
     } // namespace nest
     
     
    -
     #endif
    diff --git a/nestkernel/parameter.cpp b/nestkernel/parameter.cpp
    index d84ad4dd9a..0d8f05ea5b 100644
    --- a/nestkernel/parameter.cpp
    +++ b/nestkernel/parameter.cpp
    @@ -365,11 +365,11 @@ GaborParameter::GaborParameter( const dictionary& d )
       const auto std = d.get< double >( "std" );
       if ( std <= 0 )
       {
    -    throw BadProperty( String::compose("std > 0 required for gabor function parameter, got std=%1", std) );
    +    throw BadProperty( String::compose( "std > 0 required for gabor function parameter, got std=%1", std ) );
       }
       if ( gamma <= 0 )
       {
    -    throw BadProperty( String::compose("gamma > 0 required for gabor function parameter, got gamma=%1", gamma ) );
    +    throw BadProperty( String::compose( "gamma > 0 required for gabor function parameter, got gamma=%1", gamma ) );
       }
     }
     
    diff --git a/nestkernel/recording_backend_mpi.cpp b/nestkernel/recording_backend_mpi.cpp
    index be2b732bde..93b44b6606 100644
    --- a/nestkernel/recording_backend_mpi.cpp
    +++ b/nestkernel/recording_backend_mpi.cpp
    @@ -69,7 +69,7 @@ nest::RecordingBackendMPI::finalize()
     }
     
     void
    -nest::RecordingBackendMPI::enroll( const RecordingDevice& device, const dictionary& params)
    +nest::RecordingBackendMPI::enroll( const RecordingDevice& device, const dictionary& params )
     {
       if ( device.get_type() == RecordingDevice::SPIKE_RECORDER )
       {
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index d5e64e13c5..4371ba7af2 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -82,7 +82,7 @@ SPManager::get_status( dictionary& d )
         sp_synapse_params[ names::post_synaptic_element ] = ( *i )->get_post_synaptic_element_name();
         sp_synapse_params[ names::allow_autapses ] = ( *i )->allows_autapses();
         sp_synapse_params[ names::allow_multapses ] = ( *i )->allows_multapses();
    -  
    +
         sp_synapses[ ( *i )->get_name() ] = sp_synapse_params;
       }
     
    @@ -121,7 +121,7 @@ SPManager::set_status( const dictionary& d )
       sp_conn_builders_.clear();
     
       d.update_value< dictionary >( names::structural_plasticity_synapses, syn_specs );
    -  for ( auto& kv_pair: syn_specs )
    +  for ( auto& kv_pair : syn_specs )
       {
         syn_spec = boost::any_cast< dictionary >( kv_pair.second );
         if ( syn_spec.known( names::allow_autapses ) )
    @@ -132,7 +132,7 @@ SPManager::set_status( const dictionary& d )
         {
           conn_spec[ names::allow_multapses ] = d.get< bool >( names::allow_multapses );
         }
    -      
    +
         // We use a ConnBuilder with dummy values to check the synapse parameters
         SPBuilder* conn_builder = new SPBuilder( sources, targets, conn_spec, { syn_spec } );
         conn_builder->set_name( kv_pair.first );
    @@ -261,7 +261,7 @@ SPManager::disconnect( NodeCollectionPTR sources,
           {
             cb = kernel().connection_manager.get_conn_builder( rule_name, sources, targets, conn_spec, syn_specs );
             cb->set_synaptic_element_names(
    -	  ( *i )->get_pre_synaptic_element_name(), ( *i )->get_post_synaptic_element_name() );
    +          ( *i )->get_pre_synaptic_element_name(), ( *i )->get_post_synaptic_element_name() );
           }
         }
       }
    diff --git a/nestkernel/sp_manager.h b/nestkernel/sp_manager.h
    index e9b61dd4f3..1a98fa1f2d 100644
    --- a/nestkernel/sp_manager.h
    +++ b/nestkernel/sp_manager.h
    @@ -98,7 +98,10 @@ class SPManager : public ManagerInterface
        *  conn_spec disconnection specs. For now only all to all and one to one
        * rules are implemented.
        */
    -  void disconnect( NodeCollectionPTR sources, NodeCollectionPTR targets, const dictionary& conn_spec, const dictionary& syn_spec );
    +  void disconnect( NodeCollectionPTR sources,
    +    NodeCollectionPTR targets,
    +    const dictionary& conn_spec,
    +    const dictionary& syn_spec );
     
       /**
        * Disconnect two nodes.
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index a833a520a7..9afc51d5b2 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -471,7 +471,8 @@ select_nodes_by_mask( const NodeCollectionPTR layer_nc, const std::vector< doubl
     
         auto ml = MaskedLayer< 2 >( *layer, mask, false, layer_nc );
     
    -    for ( Ntree< 2, size_t >::masked_iterator it = ml.begin( Position< 2 >( anchor[ 0 ], anchor[ 1 ] ) ); it != ml.end();
    +    for ( Ntree< 2, size_t >::masked_iterator it = ml.begin( Position< 2 >( anchor[ 0 ], anchor[ 1 ] ) );
    +          it != ml.end();
               ++it )
         {
           mask_node_ids.push_back( it->second );
    diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py
    index 7f358a5c71..43cd36ac13 100644
    --- a/pynest/nest/__init__.py
    +++ b/pynest/nest/__init__.py
    @@ -143,6 +143,7 @@ def __dir__(self):
         kernel_status = KernelAttribute("dict", "Get the complete kernel status", readonly=True)
         resolution = KernelAttribute("float", "The resolution of the simulation (in ms)", default=0.1)
         biological_time = KernelAttribute("float", "The current simulation time (in ms)")
    +    build_info = KernelAttribute("dict", "Information about the build and compile configuration of NEST")
         to_do = KernelAttribute("int", "The number of steps yet to be simulated", readonly=True)
         max_delay = KernelAttribute("float", "The maximum delay in the network", default=0.1)
         min_delay = KernelAttribute("float", "The minimum delay in the network", default=0.1)
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index 5d5aa2c648..99e60f23bc 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -31,11 +31,11 @@
     
     import numpy as np
     
    -from .. import pynestkernel as kernel
    -from ..ll_api import sli_func, sps, sr
    +from .. import nestkernel_api as nestkernel
    +
     from .hl_api_models import GetDefaults
     from .hl_api_nodes import Create
    -from .hl_api_simulation import SetKernelStatus, Simulate
    +from .hl_api_simulation import GetKernelStatus, SetKernelStatus, Simulate
     from .hl_api_types import NodeCollection
     
     try:
    @@ -52,7 +52,7 @@
     except ImportError:
         have_h5py = False
     
    -have_hdf5 = sli_func("statusdict/have_hdf5 ::")
    +have_hdf5 = GetKernelStatus("build_info")["have_hdf5"]
     
     __all__ = ["SonataNetwork"]
     
    @@ -108,13 +108,13 @@ class SonataNetwork:
         def __init__(self, config, sim_config=None):
             if not have_hdf5:
                 msg = "SonataNetwork unavailable because NEST was compiled without HDF5 support"
    -            raise kernel.NESTError(msg)
    +            raise nestkernel.NESTError(msg)
             if not have_h5py:
                 msg = "SonataNetwork unavailable because h5py is not installed or could not be imported"
    -            raise kernel.NESTError(msg)
    +            raise nestkernel.NESTError(msg)
             if not have_pandas:
                 msg = "SonataNetwork unavailable because pandas is not installed or could not be imported"
    -            raise kernel.NESTError(msg)
    +            raise nestkernel.NESTError(msg)
     
             self._node_collections = {}
             self._edges_maps = []
    @@ -432,7 +432,7 @@ def Connect(self, hdf5_hyperslab_size=None):
     
             if not self._are_nodes_created:
                 msg = "The SONATA network nodes must be created before any connections can be made"
    -            raise kernel.NESTError(msg)
    +            raise nestkernel.NESTError(msg)
     
             if hdf5_hyperslab_size is None:
                 hdf5_hyperslab_size = self._hyperslab_size_default
    @@ -646,7 +646,7 @@ def Simulate(self):
             # Verify that network is built
             if not self._is_network_built:
                 msg = "The SONATA network must be built before a simulation can be done"
    -            raise kernel.NESTError(msg)
    +            raise nestkernel.NESTError(msg)
     
             if "tstop" in self._conf["run"]:
                 T_sim = self._conf["run"]["tstop"]
    
    From f0aa8e36b6491d33caf5d8652d2d81e5e7b0d9ce Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Wed, 13 Sep 2023 14:03:24 +0200
    Subject: [PATCH 149/375] Fixing calls to create and type conversions for
     receptor_type
    
    ---
     examples/clopath_synapse_spike_pairing.py     |   8 +-
     .../receptors_and_current.py                  |  10 +-
     examples/store_restore_network.py             |   4 +-
     nestkernel/connector_model_impl.h             |   8 +-
     nestkernel/vp_manager.cpp                     |   4 +-
     pynest/nest/lib/hl_api_connection_helpers.py  |  10 +-
     pynest/nest/lib/hl_api_connections.py         |   2 +-
     pynest/nest/ll_api.py                         |   4 +-
     .../sli2py_connect/test_gap_junction.py       |  10 +-
     .../sli2py_connect/test_rate_connections.py   |   8 +-
     .../test_multisynapse_models.py               |   2 +-
     .../test_neurons_handle_multiplicity.py       |  12 +-
     .../test_multiple_random_source_stepping.py   |   4 +-
     .../sli2py_other/test_multithreading.py       |   2 +-
     .../test_multimeter_offset.py                 |   2 +-
     .../test_multimeter_stepping.py               |   2 +-
     .../sli2py_regressions/test_issue_1242.py     |   2 +-
     .../sli2py_regressions/test_issue_1305.py     |   2 +-
     .../sli2py_regressions/test_issue_2282.py     |   4 +-
     .../test_issue_2636_2795.py                   |   4 +-
     .../sli2py_regressions/test_issue_264.py      |   6 +-
     .../sli2py_regressions/test_issue_351.py      |   2 +-
     .../sli2py_regressions/test_issue_368.py      |   4 +-
     .../sli2py_regressions/test_issue_410.py      |   8 +-
     .../sli2py_regressions/test_issue_545.py      |   6 +-
     .../sli2py_regressions/test_ticket_926.py     |   4 +-
     .../sli2py_regressions/test_ticket_941.py     |   2 +-
     .../sli2py_regressions/test_ticket_949.py     |   2 +-
     .../test_inhomogeneous_poisson_generator.py   |  22 ++--
     .../test_noise_generator.py                   |  11 +-
     .../test_pulsepacket_generator.py             |   2 +-
     .../test_sinusoidal_poisson_generator.py      |   6 +-
     .../test_spike_generator.py                   |  34 +++---
     .../test_step_current_generator.py            |   6 +-
     .../test_cont_delay_synapse.py                |   2 +-
     .../sli2py_synapses/test_hh_cond_exp_traub.py |  14 +--
     .../sli2py_synapses/test_hpc_synapse.py       |   8 +-
     .../sli2py_synapses/test_set_delay_extrema.py |   2 +-
     testsuite/pytests/test_bernoulli_synapse.py   |   6 +-
     testsuite/pytests/test_binary.py              |   8 +-
     testsuite/pytests/test_compartmental_model.py | 105 +++++++-----------
     .../pytests/test_connect_node_collection.py   |   6 +-
     testsuite/pytests/test_get_set.py             |   4 +-
     testsuite/pytests/test_gif_exp.py             |   4 +-
     testsuite/pytests/test_multimeter.py          |  12 +-
     .../test_node_collection_indexing_slicing.py  |  12 +-
     .../test_node_collection_operations.py        |   4 +-
     .../test_node_collection_to_from_object.py    |   6 +-
     .../test_spatial/test_create_spatial.py       |   2 +-
     .../test_spatial/test_layer_get_set.py        |   2 +-
     .../test_spatial/test_oversize_mask.py        |   8 +-
     .../test_spatial/test_parameter_apply.py      |   4 +-
     testsuite/pytests/test_tsodyks_synapse.py     |   4 +-
     testsuite/pytests/test_visualization.py       |   4 +-
     54 files changed, 200 insertions(+), 236 deletions(-)
    
    diff --git a/examples/clopath_synapse_spike_pairing.py b/examples/clopath_synapse_spike_pairing.py
    index 7752b0b08f..ee762b8a45 100644
    --- a/examples/clopath_synapse_spike_pairing.py
    +++ b/examples/clopath_synapse_spike_pairing.py
    @@ -111,18 +111,18 @@
         nest.resolution = resolution
     
         # Create one neuron
    -    nrn = nest.Create("aeif_psc_delta_clopath", 1, nrn_params)
    +    nrn = nest.Create("aeif_psc_delta_clopath", params=nrn_params)
     
         # We need a parrot neuron since spike generators can only
         # be connected with static connections
    -    prrt_nrn = nest.Create("parrot_neuron", 1)
    +    prrt_nrn = nest.Create("parrot_neuron")
     
         # Create and connect spike generators
    -    spike_gen_pre = nest.Create("spike_generator", {"spike_times": s_t_pre})
    +    spike_gen_pre = nest.Create("spike_generator", params={"spike_times": s_t_pre})
     
         nest.Connect(spike_gen_pre, prrt_nrn, syn_spec={"delay": resolution})
     
    -    spike_gen_post = nest.Create("spike_generator", {"spike_times": s_t_post})
    +    spike_gen_post = nest.Create("spike_generator", params={"spike_times": s_t_post})
     
         nest.Connect(spike_gen_post, nrn, syn_spec={"delay": resolution, "weight": 80.0})
     
    diff --git a/examples/compartmental_model/receptors_and_current.py b/examples/compartmental_model/receptors_and_current.py
    index 79c0ee17ec..38d5fc6211 100644
    --- a/examples/compartmental_model/receptors_and_current.py
    +++ b/examples/compartmental_model/receptors_and_current.py
    @@ -81,11 +81,11 @@
     
     ###############################################################################
     # create three spike generators
    -sg1 = nest.Create("spike_generator", 1, {"spike_times": [101.0, 105.0, 106.0, 110.0, 150.0]})
    +sg1 = nest.Create("spike_generator", params={"spike_times": [101.0, 105.0, 106.0, 110.0, 150.0]})
     sg2 = nest.Create(
    -    "spike_generator", 1, {"spike_times": [115.0, 155.0, 160.0, 162.0, 170.0, 254.0, 260.0, 272.0, 278.0]}
    +    "spike_generator", params={"spike_times": [115.0, 155.0, 160.0, 162.0, 170.0, 254.0, 260.0, 272.0, 278.0]}
     )
    -sg3 = nest.Create("spike_generator", 1, {"spike_times": [250.0, 255.0, 260.0, 262.0, 270.0]})
    +sg3 = nest.Create("spike_generator", params={"spike_times": [250.0, 255.0, 260.0, 262.0, 270.0]})
     
     ###############################################################################
     # connect the spike generators to the receptors
    @@ -101,12 +101,12 @@
     
     ###############################################################################
     # create and connect a current generator to compartment 1
    -dcg = nest.Create("dc_generator", {"amplitude": 1.0})
    +dcg = nest.Create("dc_generator", params={"amplitude": 1.0})
     nest.Connect(dcg, cm, syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "delay": 0.1, "receptor_type": 1})
     
     ###############################################################################
     # create and connect a multimeter to measure the three compartmental voltages
    -mm = nest.Create("multimeter", 1, {"record_from": ["v_comp0", "v_comp1", "v_comp2"], "interval": 0.1})
    +mm = nest.Create("multimeter", params={"record_from": ["v_comp0", "v_comp1", "v_comp2"], "interval": 0.1})
     nest.Connect(mm, cm)
     
     nest.Simulate(400.0)
    diff --git a/examples/store_restore_network.py b/examples/store_restore_network.py
    index 1b6ddac39f..8242ebd3e1 100644
    --- a/examples/store_restore_network.py
    +++ b/examples/store_restore_network.py
    @@ -108,7 +108,7 @@ def build(self):
             self.i_neurons = nest.Create(self.neuron_model, n=self.nI, params=self.nrn_params)
             self.neurons = self.e_neurons + self.i_neurons
     
    -        self.pg = nest.Create("poisson_generator", {"rate": self.poisson_rate})
    +        self.pg = nest.Create("poisson_generator", params={"rate": self.poisson_rate})
             self.sr = nest.Create("spike_recorder")
     
             nest.Connect(
    @@ -182,7 +182,7 @@ def restore(self, dump_filename):
     
             ###############################################################################
             # Reconstruct instrumentation
    -        self.pg = nest.Create("poisson_generator", {"rate": self.poisson_rate})
    +        self.pg = nest.Create("poisson_generator", params={"rate": self.poisson_rate})
             self.sr = nest.Create("spike_recorder")
     
             ###############################################################################
    diff --git a/nestkernel/connector_model_impl.h b/nestkernel/connector_model_impl.h
    index d1b5eef4dd..66a27f16bf 100644
    --- a/nestkernel/connector_model_impl.h
    +++ b/nestkernel/connector_model_impl.h
    @@ -111,10 +111,10 @@ template < typename ConnectionT >
     void
     GenericConnectorModel< ConnectionT >::set_status( const dictionary& d )
     {
    -  d.update_value( names::receptor_type, receptor_type_ );
    +  d.update_integer_value( names::receptor_type, receptor_type_ );
     #ifdef HAVE_MUSIC
       // We allow music_channel as alias for receptor_type during connection setup
    -  d.update_value( names::music_channel, receptor_type_ );
    +  d.update_integer_value( names::music_channel, receptor_type_ );
     #endif
     
       // If the parameter dict d contains /delay, this should set the delay
    @@ -253,9 +253,9 @@ GenericConnectorModel< ConnectionT >::add_connection( Node& src,
       size_t actual_receptor_type = receptor_type_;
     #ifdef HAVE_MUSIC
       // We allow music_channel as alias for receptor_type during connection setup
    -  p.update_value( names::music_channel, actual_receptor_type );
    +  p.update_integer_value( names::music_channel, actual_receptor_type );
     #endif
    -  p.update_value( names::receptor_type, actual_receptor_type );
    +  p.update_integer_value( names::receptor_type, actual_receptor_type );
     
       add_connection_( src, tgt, thread_local_connectors, syn_id, connection, actual_receptor_type );
     }
    diff --git a/nestkernel/vp_manager.cpp b/nestkernel/vp_manager.cpp
    index 5c21d4d569..c06026986e 100644
    --- a/nestkernel/vp_manager.cpp
    +++ b/nestkernel/vp_manager.cpp
    @@ -72,8 +72,8 @@ nest::VPManager::set_status( const dictionary& d )
       size_t n_threads = get_num_threads();
       size_t n_vps = get_num_virtual_processes();
     
    -  bool n_threads_updated = d.update_value( names::local_num_threads, n_threads );
    -  bool n_vps_updated = d.update_value( names::total_num_virtual_procs, n_vps );
    +  bool n_threads_updated = d.update_integer_value( names::local_num_threads, n_threads );
    +  bool n_vps_updated = d.update_integer_value( names::total_num_virtual_procs, n_vps );
     
       if ( n_vps_updated )
       {
    diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py
    index d40476ca16..a77dda951c 100644
    --- a/pynest/nest/lib/hl_api_connection_helpers.py
    +++ b/pynest/nest/lib/hl_api_connection_helpers.py
    @@ -85,7 +85,7 @@ def _process_syn_spec(syn_spec, conn_spec, prelength, postlength, use_connect_ar
                         if rule == "one_to_one":
                             if value.shape[0] != prelength:
                                 if use_connect_arrays:
    -                                raise kernel.NESTError(
    +                                raise nestkernel.NESTError(
                                         "'{}' has to be an array of dimension {}.".format(key, prelength)
                                     )
                                 else:
    @@ -98,7 +98,7 @@ def _process_syn_spec(syn_spec, conn_spec, prelength, postlength, use_connect_ar
                                 syn_spec[key] = value
                         elif rule == "fixed_total_number":
                             if "N" in conn_spec and value.shape[0] != conn_spec["N"]:
    -                            raise kernel.NESTError(
    +                            raise nestkernel.NESTError(
                                     "'{}' has to be an array of dimension {}, a scalar or a dictionary".format(
                                         key, conn_spec["N"]
                                     )
    @@ -123,7 +123,7 @@ def _process_syn_spec(syn_spec, conn_spec, prelength, postlength, use_connect_ar
                         elif rule == "fixed_indegree":
                             indegree = conn_spec["indegree"]
                             if value.shape[0] != postlength or value.shape[1] != indegree:
    -                            raise kernel.NESTError(
    +                            raise nestkernel.NESTError(
                                     "'{}' has to be an array of dimension {}x{} (n_target x indegree), a scalar "
                                     "or a dictionary.".format(key, postlength, indegree)
                                 )
    @@ -132,7 +132,7 @@ def _process_syn_spec(syn_spec, conn_spec, prelength, postlength, use_connect_ar
                         elif rule == "fixed_outdegree":
                             outdegree = conn_spec["outdegree"]
                             if value.shape[0] != prelength or value.shape[1] != outdegree:
    -                            raise kernel.NESTError(
    +                            raise nestkernel.NESTError(
                                     "'{}' has to be an array of dimension {}x{} (n_sources x outdegree), a scalar "
                                     "or a dictionary.".format(key, prelength, outdegree)
                                 )
    @@ -212,7 +212,7 @@ def _process_spatial_projections(conn_spec, syn_spec):
                 if "use_on_source" in projections:
                     projections.pop("use_on_source")
         else:
    -        raise kernel.NESTError(
    +        raise nestkernel.NESTError(
                 "When using kernel or mask, the only possible connection rules are "
                 "'pairwise_bernoulli', 'fixed_indegree', or 'fixed_outdegree'"
             )
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index 2951ac05fb..f83ec8d57c 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -132,7 +132,7 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, return_synapsecollection=F
     
         Raises
         ------
    -    kernel.NESTError
    +    nestkernel.NESTError
     
         Notes
         -----
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index 9b33d5a6d7..9114b29379 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -74,7 +74,7 @@ def set_communicator(comm):
     
         Raises
         ------
    -    _kernel.NESTError
    +    nestkernel.NESTError
         """
     
         if "mpi4py" not in sys.modules:
    @@ -143,7 +143,7 @@ def init(argv):
     
         Raises
         ------
    -    kernel.NESTError.PyNESTError
    +    nestkernel.NESTError.PyNESTError
         """
     
         global initialized
    diff --git a/testsuite/pytests/sli2py_connect/test_gap_junction.py b/testsuite/pytests/sli2py_connect/test_gap_junction.py
    index dcc94d7893..eb455c9b80 100644
    --- a/testsuite/pytests/sli2py_connect/test_gap_junction.py
    +++ b/testsuite/pytests/sli2py_connect/test_gap_junction.py
    @@ -72,7 +72,7 @@ def test_neuron_gap_connect_with_delay_fails(conn_spec):
         leads to an error.
         """
         syn_spec = {"synapse_model": "gap_junction", "delay": 2.0}
    -    with pytest.raises(nest.kernel.NESTError, match="gap_junction connection has no delay"):
    +    with pytest.raises(nest.NESTError, match="gap_junction connection has no delay"):
             nest.Connect(pytest.neuron_gap, pytest.neuron_gap, conn_spec=conn_spec, syn_spec=syn_spec)
     
     
    @@ -82,7 +82,7 @@ def test_neuron_nogap_nogap_connect_fails():
         """
         conn_spec = {"rule": "one_to_one", "make_symmetric": True}
         syn_spec = {"synapse_model": "gap_junction"}
    -    with pytest.raises(nest.kernel.NESTError, match="The source node does not support gap junction output."):
    +    with pytest.raises(nest.NESTError, match="The source node does not support gap junction output."):
             nest.Connect(pytest.neuron_no_gap, pytest.neuron_no_gap, conn_spec=conn_spec, syn_spec=syn_spec)
     
     
    @@ -93,9 +93,7 @@ def test_neuron_nogap_gap_connect_fails():
         """
         conn_spec = {"rule": "one_to_one", "make_symmetric": True}
         syn_spec = {"synapse_model": "gap_junction"}
    -    with pytest.raises(
    -        nest.kernel.NESTError, match="The target node or synapse model does not support gap junction input."
    -    ):
    +    with pytest.raises(nest.NESTError, match="The target node or synapse model does not support gap junction input."):
             nest.Connect(pytest.neuron_no_gap, pytest.neuron_gap, conn_spec=conn_spec, syn_spec=syn_spec)
     
     
    @@ -107,7 +105,7 @@ def test_neuron_gap_connect_not_symmetric_fails():
         conn_spec = {"rule": "one_to_one", "make_symmetric": False}
         syn_spec = {"synapse_model": "gap_junction", "weight": 2.0}
         with pytest.raises(
    -        nest.kernel.NESTError,
    +        nest.NESTError,
             match="Connections with this synapse model can only be created as "
             + 'one-to-one connections with "make_symmetric" set to true *',
         ):
    diff --git a/testsuite/pytests/sli2py_connect/test_rate_connections.py b/testsuite/pytests/sli2py_connect/test_rate_connections.py
    index 54f3edf895..bd3f8e2a04 100644
    --- a/testsuite/pytests/sli2py_connect/test_rate_connections.py
    +++ b/testsuite/pytests/sli2py_connect/test_rate_connections.py
    @@ -94,7 +94,7 @@ def test_illegal_rate_connections(synapse_model, supported_nrn_model, unsupporte
     
         supported_nrn = nest.Create(supported_nrn_model)
         unsupported_nrn = nest.Create(unsupported_nrn_model)
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(
                 supported_nrn, unsupported_nrn, conn_spec={"rule": "one_to_one"}, syn_spec={"synapse_model": synapse_model}
             )
    @@ -117,7 +117,7 @@ def test_rate_connection_instantaneous_set_delay_disallowed(supported_nrn_model)
         """
     
         supported_nrn = nest.Create(supported_nrn_model)
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.Connect(
                 supported_nrn,
                 supported_nrn,
    @@ -160,7 +160,7 @@ def test_illegal_diffusion_connection_connections(unsupported_nrn_model):
     
         supported_nrn = nest.Create("siegert_neuron")
         unsupported_nrn = nest.Create(unsupported_nrn_model)
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(
                 supported_nrn,
                 unsupported_nrn,
    @@ -176,7 +176,7 @@ def test_diffusion_connection_set_weight_and_delay_disallowed(syn_param):
         """
     
         supported_nrn = nest.Create("siegert_neuron")
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.Connect(
                 supported_nrn,
                 supported_nrn,
    diff --git a/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py b/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    index 1a9bacb15a..061903384a 100644
    --- a/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    +++ b/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    @@ -43,7 +43,7 @@ def test_multisynapse_model_rport_zero(multisyn_model):
         """
     
         nrn = nest.Create(multisyn_model)
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             nest.Connect(nrn, nrn)
     
     
    diff --git a/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py b/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    index 3b15223925..79bc105402 100644
    --- a/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    +++ b/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    @@ -89,10 +89,8 @@ def test_spike_multiplicity_parrot_neuron():
         nest.ResetKernel()
         multiplicities = [1, 3, 2]
         spikes = [1.0, 2.0, 3.0]
    -    sg = nest.Create(
    -        "spike_generator",
    -        {"spike_times": spikes, "spike_multiplicities": multiplicities},
    -    )
    +    sg_params = {"spike_times": spikes, "spike_multiplicities": multiplicities}
    +    sg = nest.Create("spike_generator", params=sg_params)
         pn = nest.Create("parrot_neuron")
         sr = nest.Create("spike_recorder")
     
    @@ -133,9 +131,9 @@ def test_spike_multiplicity(model):
     
         # Two spike generators send one spike with default multiplicity of 1
         # A third spike generator sends one spike with multiplicity of 2
    -    sg1 = nest.Create("spike_generator", {"spike_times": [5.0]})
    -    sg2 = nest.Create("spike_generator", {"spike_times": [5.0]})
    -    sg3 = nest.Create("spike_generator", {"spike_times": [5.0], "spike_multiplicities": [2]})
    +    sg1 = nest.Create("spike_generator", params={"spike_times": [5.0]})
    +    sg2 = nest.Create("spike_generator", params={"spike_times": [5.0]})
    +    sg3 = nest.Create("spike_generator", params={"spike_times": [5.0], "spike_multiplicities": [2]})
     
         syn_spec = {
             "synapse_model": "static_synapse",
    diff --git a/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py b/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    index 56dea8c501..31dfb31a09 100644
    --- a/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    +++ b/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    @@ -43,8 +43,8 @@ def run_sim(interval, steppings):
     
         nest.ResetKernel()
     
    -    pg1 = nest.Create("poisson_generator_ps", {"rate": 1000.0})
    -    pg2 = nest.Create("poisson_generator_ps", {"rate": 1000.0})
    +    pg1 = nest.Create("poisson_generator_ps", params={"rate": 1000.0})
    +    pg2 = nest.Create("poisson_generator_ps", params={"rate": 1000.0})
         sr1 = nest.Create("spike_recorder")
         sr2 = nest.Create("spike_recorder")
         nest.Connect(pg1, sr1)
    diff --git a/testsuite/pytests/sli2py_other/test_multithreading.py b/testsuite/pytests/sli2py_other/test_multithreading.py
    index 74eff82c0b..2015ac1d30 100644
    --- a/testsuite/pytests/sli2py_other/test_multithreading.py
    +++ b/testsuite/pytests/sli2py_other/test_multithreading.py
    @@ -55,7 +55,7 @@ def test_transmitted_spikes_btw_threads():
         num_threads = 4
         nest.local_num_threads = num_threads
     
    -    sg = nest.Create("spike_generator", {"spike_times": [1.0]})
    +    sg = nest.Create("spike_generator", params={"spike_times": [1.0]})
         pA = nest.Create("parrot_neuron", num_threads)
         pB = nest.Create("parrot_neuron", num_threads)
         sr = nest.Create("spike_recorder")
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_offset.py b/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    index 22b16e70de..8bc9093076 100644
    --- a/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    +++ b/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    @@ -102,7 +102,7 @@ def test_offset_cannot_be_changed_after_connect():
         mm = nest.Create("multimeter")
         nest.Connect(mm, nrn)
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             mm.offset = 5.0
     
     
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py b/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    index 313b30afcc..7a5ddf7ca8 100644
    --- a/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    +++ b/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    @@ -92,7 +92,7 @@ def build_net(model):
     
         nrn = nest.Create(model)
         pg = nest.Create("poisson_generator", params={"rate": 1e4})
    -    mm = nest.Create("multimeter", {"interval": 0.1, "record_from": nrn.recordables})
    +    mm = nest.Create("multimeter", params={"interval": 0.1, "record_from": nrn.recordables})
     
         receptor_type = 0
         if model in extra_params.keys():
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1242.py b/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    index 9074908a56..9c87980b77 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    @@ -40,5 +40,5 @@ def test_volume_transmitter_illegal_connection():
         sg = nest.Create("spike_generator")
         vt = nest.Create("volume_transmitter")
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(sg, vt)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1305.py b/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    index c5e894dfeb..473c395078 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    @@ -50,5 +50,5 @@ def test_resolution_rounding_invalid():
     
         target_resolution = 0.1002
     
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             nest.set(resolution=target_resolution, tics_per_ms=1000.0)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2282.py b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    index ce03fa9c2d..4e19338e71 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    @@ -48,7 +48,7 @@ def simulator(num_threads):
     
         nrns = nest.Create("iaf_psc_alpha", 3)
         noise = nest.Create("noise_generator", 3, {"mean": 1000.0, "std": 1.0, "dt": 0.1})
    -    mm = nest.Create("multimeter", {"record_from": ["I"], "interval": 0.1})
    +    mm = nest.Create("multimeter", params={"record_from": ["I"], "interval": 0.1})
     
         nest.Connect(noise, nrns, "one_to_one", {"delay": 0.1})
         nest.Connect(mm, noise)
    @@ -74,5 +74,5 @@ def test_allowed_multimeter_record_noise_generator_singlethreaded():
     def test_prohibited_multimeter_record_noise_generator_multithreaded():
         """Test that an error is thrown in multi-threaded mode."""
     
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             simulator(num_threads=2)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py b/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py
    index c14dcaa713..f938062486 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py
    @@ -55,7 +55,7 @@ def test_nc_access_fail_without_node_creation(node_id):
         ``node_id=0``.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.UnknownNode):
    +    with pytest.raises(nest.NESTErrors.UnknownNode):
             nest.NodeCollection([node_id])
     
     
    @@ -69,5 +69,5 @@ def test_connection_fail_without_node_creation(node_id):
         ``node_id=0``.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.UnknownNode):
    +    with pytest.raises(nest.NESTErrors.UnknownNode):
             nest.Connect([node_id], [node_id])
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_264.py b/testsuite/pytests/sli2py_regressions/test_issue_264.py
    index d4a6a4da90..1d11f2109e 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_264.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_264.py
    @@ -49,7 +49,7 @@ def test_incommensurate_simulation_time():
         time is not a multiple of the resolution.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadParameter):
    +    with pytest.raises(nest.NESTErrors.BadParameter):
             nest.Simulate(1.5)
     
     
    @@ -63,7 +63,7 @@ def test_incommensurate_resolution_on_set_defaults(device, item):
         start/stop/origin for devices that are not multiples of the resolution.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults(device, {item: 1.5})
     
     
    @@ -77,6 +77,6 @@ def test_incommensurate_resolution_on_device_set(device, item):
         start/stop/origin for devices that are not multiples of the resolution.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             d = nest.Create(device)
             d.set({item: 1.5})
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_351.py b/testsuite/pytests/sli2py_regressions/test_issue_351.py
    index da4c1c3402..04f35a5a5d 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_351.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_351.py
    @@ -69,5 +69,5 @@ def test_error_raised_for_illegal_connections_to_recording_device(model, conn_sp
         nrn = nest.Create("iaf_psc_alpha", 1)
         rec = nest.Create(model, 2)
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(nrn, rec, conn_spec=conn_spec)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_368.py b/testsuite/pytests/sli2py_regressions/test_issue_368.py
    index df68aa42d1..26553105ef 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_368.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_368.py
    @@ -61,7 +61,7 @@ def test_linear_summation_of_input_ps_models(model):
         w1 = 5.0  # sufficiently small to avoid psc_delta spikes
         w2 = -10.0
     
    -    sg = nest.Create("spike_generator", {"precise_times": True, "spike_times": [t_spike1]})
    +    sg = nest.Create("spike_generator", params={"precise_times": True, "spike_times": [t_spike1]})
         n1 = nest.Create(model)
         n2 = nest.Create(model)
         n3 = nest.Create(model)
    @@ -115,7 +115,7 @@ def test_linear_summation_of_input_ps_models_with_two_time_constants(model):
         t_spike1 = 2.375  # 2.5 - 0.125 offset
         w1 = 1000.0
     
    -    sg = nest.Create("spike_generator", {"precise_times": True, "spike_times": [t_spike1]})
    +    sg = nest.Create("spike_generator", params={"precise_times": True, "spike_times": [t_spike1]})
         n1 = nest.Create(model)
         n2 = nest.Create(model)
         n3 = nest.Create(model)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_410.py b/testsuite/pytests/sli2py_regressions/test_issue_410.py
    index c039a1b05b..4e99db0a5c 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_410.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_410.py
    @@ -41,10 +41,10 @@ def simulator(num_threads):
     
         nest.local_num_threads = num_threads
     
    -    stim1 = nest.Create("dc_generator", {"amplitude": 1500.0})
    -    stim2 = nest.Create("dc_generator", {"amplitude": 1000.0})
    -    nrn1 = nest.Create("iaf_psc_alpha", {"C_m": 100.0, "tau_m": 10.0})
    -    nrn2 = nest.Create("iaf_psc_alpha", {"C_m": 100.0, "tau_m": 10.0, "tau_minus": 10.0})
    +    stim1 = nest.Create("dc_generator", params={"amplitude": 1500.0})
    +    stim2 = nest.Create("dc_generator", params={"amplitude": 1000.0})
    +    nrn1 = nest.Create("iaf_psc_alpha", params={"C_m": 100.0, "tau_m": 10.0})
    +    nrn2 = nest.Create("iaf_psc_alpha", params={"C_m": 100.0, "tau_m": 10.0, "tau_minus": 10.0})
         dopa = nest.Create("iaf_cond_alpha", 100, {"V_reset": -70.0, "C_m": 80.0, "V_th": -60.0})
         vt = nest.Create("volume_transmitter")
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_545.py b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    index 0fa7aea74b..b0237b83c5 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_545.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    @@ -33,14 +33,14 @@ def test_setters_raise_error_on_bad_properties():
         nest.local_num_threads = 4
     
         # test defaults
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults("iaf_psc_alpha", {"tau_m": -10})
     
         # test neuron
         n = nest.Create("iaf_psc_alpha")
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             n.set({"tau_m": -10})
     
         # test synapse
    -    with pytest.raises(nest.kernel.NESTErrors.BadDelay):
    +    with pytest.raises(nest.NESTErrors.BadDelay):
             nest.Connect(n, n, syn_spec={"delay": -10})
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_926.py b/testsuite/pytests/sli2py_regressions/test_ticket_926.py
    index f49e39c168..a37e6b9509 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_926.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_926.py
    @@ -29,7 +29,7 @@
     
     def test_simulation_completes():
         nest.ResetKernel()
    -    spike_generator = nest.Create("spike_generator", {"spike_times": [5.0]})
    +    spike_generator = nest.Create("spike_generator", params={"spike_times": [5.0]})
     
         parrot_neuron = nest.Create("parrot_neuron")
         iaf_psc_neuron = nest.Create("iaf_psc_alpha")
    @@ -38,6 +38,6 @@ def test_simulation_completes():
     
         # original SLI test uses passorfailbutnocrash_or_die; no clear way to check for a segfault in Python bindings,
         # therefore the assertion here is that the simulation completes with the expected error but no 'crash'
    -    with pytest.raises(nest.kernel.NESTError, match="No volume transmitter"):
    +    with pytest.raises(nest.NESTError, match="No volume transmitter"):
             nest.Connect(parrot_neuron, iaf_psc_neuron, syn_spec="stdp_dopamine_synapse")
             nest.Simulate(10.0)
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_941.py b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    index 7c8d33cd60..7c77d7f9e1 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    @@ -52,7 +52,7 @@ def test_different_connections():
         nest.ResetKernel()
         nest.set_verbosity("M_ERROR")
     
    -    spike_generator = nest.Create("spike_generator", {"spike_times": [1.0]})
    +    spike_generator = nest.Create("spike_generator", params={"spike_times": [1.0]})
         spike_recorder = nest.Create("spike_recorder")
     
         pn1 = nest.Create("parrot_neuron")
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_949.py b/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    index 5636271961..c31f64ff1f 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    @@ -33,5 +33,5 @@ def test_delay_less_than_resolution_throws():
         nest.resolution = 0.3
     
         population = nest.Create("iaf_psc_alpha")
    -    with pytest.raises(nest.kernel.NESTError, match="Delay must be greater than or equal to resolution"):
    +    with pytest.raises(nest.NESTError, match="Delay must be greater than or equal to resolution"):
             nest.Connect(population, population, syn_spec={"delay": 0.1})
    diff --git a/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    index 14da9eb4c2..363f7fede8 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    @@ -37,35 +37,33 @@ def prepare_kernel():
     def test_rate_times_and_values_match(prepare_kernel):
         inh_pg = nest.Create("inhomogeneous_poisson_generator")
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty, match="Rate times and values must be reset together"):
    +    with pytest.raises(nest.NESTErrors.BadProperty, match="Rate times and values must be reset together"):
             inh_pg.set(rate_values=[10.0])
     
     
     def test_rate_times_len_and_values_match(prepare_kernel):
         inh_pg = nest.Create("inhomogeneous_poisson_generator")
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty, match="Rate times and values have to be the same size"):
    +    with pytest.raises(nest.NESTErrors.BadProperty, match="Rate times and values have to be the same size"):
             inh_pg.set(rate_times=[1.0, 2.0], rate_values=[10.0])
     
     
     def test_rate_times_strictly_increasing(prepare_kernel):
         inh_pg = nest.Create("inhomogeneous_poisson_generator")
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty, match="Rate times must be strictly increasing"):
    +    with pytest.raises(nest.NESTErrors.BadProperty, match="Rate times must be strictly increasing"):
             inh_pg.set(rate_times=[1.0, 5.0, 3.0], rate_values=[10.0, 20.0, 5.0])
     
     
     def test_offgrid_time_point(prepare_kernel):
         inh_pg = nest.Create("inhomogeneous_poisson_generator")
     
    -    with pytest.raises(
    -        nest.kernel.NESTErrors.BadProperty, match="Time point 1.23 is not representable in current resolution"
    -    ):
    +    with pytest.raises(nest.NESTErrors.BadProperty, match="Time point 1.23 is not representable in current resolution"):
             inh_pg.set(rate_times=[1.23], rate_values=[10.0])
     
     
     def test_allow_offgrid_time_point(prepare_kernel):
    -    inh_pg = nest.Create("inhomogeneous_poisson_generator", {"allow_offgrid_times": True})
    +    inh_pg = nest.Create("inhomogeneous_poisson_generator", params={"allow_offgrid_times": True})
         inh_pg.set(rate_times=[1.23], rate_values=[10.0])
         defaults = inh_pg.get()
     
    @@ -78,23 +76,21 @@ def test_no_allow_offgrid_times_after_rate_set(prepare_kernel):
         inh_pg.set(rate_times=[1.2], rate_values=[10.0])
     
         with pytest.raises(
    -        nest.kernel.NESTErrors.BadProperty,
    +        nest.NESTErrors.BadProperty,
             match="Option can only be set together with rate times or if no rate times have been set",
         ):
             inh_pg.set(allow_offgrid_times=True)
     
     
     def test_allow_offgrid_times_modified_after_rate_set(prepare_kernel):
    -    inh_pg = nest.Create("inhomogeneous_poisson_generator", {"allow_offgrid_times": True})
    +    inh_pg = nest.Create("inhomogeneous_poisson_generator", params={"allow_offgrid_times": True})
         inh_pg.set(rate_times=[1.23], rate_values=[10.0])
     
    -    with pytest.raises(
    -        nest.kernel.NESTErrors.BadProperty, match="Time point 1.25 is not representable in current resolution"
    -    ):
    +    with pytest.raises(nest.NESTErrors.BadProperty, match="Time point 1.25 is not representable in current resolution"):
             inh_pg.set(allow_offgrid_times=False, rate_times=[1.25], rate_values=[10.0])
     
     
     def test_time_points_in_future(prepare_kernel):
         inh_pg = nest.Create("inhomogeneous_poisson_generator")
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty, match="Time points must lie strictly in the future."):
    +    with pytest.raises(nest.NESTErrors.BadProperty, match="Time points must lie strictly in the future."):
             inh_pg.set(rate_times=[0.0], rate_values=[30.0])
    diff --git a/testsuite/pytests/sli2py_stimulating/test_noise_generator.py b/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    index 39e4e748b3..b10298662e 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    @@ -37,18 +37,17 @@ def prepare_kernel():
     def test_noise_generator_set_parameters(prepare_kernel):
         params = {"mean": 10.5, "std": 0.23, "dt": 0.5}
     
    -    ng1 = nest.Create("noise_generator")
    -    ng1.set(params)
    -
    -    nest.SetDefaults("noise_generator", params)
    +    ng1 = nest.Create("noise_generator", params=params)
     
    +    nest.SetDefaults("noise_generator", params=params)
         ng2 = nest.Create("noise_generator")
    +
         assert ng1.get(params) == ng2.get(params)
     
     
     def test_noise_generator_incorrect_noise_dt(prepare_kernel):
    -    with pytest.raises(nest.kernel.NESTError, match="StepMultipleRequired"):
    -        nest.Create("noise_generator", {"dt": 0.25})
    +    with pytest.raises(nest.NESTError, match="StepMultipleRequired"):
    +        nest.Create("noise_generator", params={"dt": 0.25})
     
     
     def test_noise_generator_(prepare_kernel):
    diff --git a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    index 120d081639..c1a3fdcb6c 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    @@ -63,7 +63,7 @@ def test_set_illegal_values(params):
         Test that an error is raised if `sdev` or `activity` is set to negative value.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults("pulsepacket_generator", params)
     
     
    diff --git a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    index 46ac98e3ca..20945c471c 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    @@ -88,7 +88,7 @@ def test_set_individual_spike_trains_on_instance():
     
         sspg = nest.Create("sinusoidal_poisson_generator")
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             sspg.individual_spike_trains = False
     
     
    @@ -182,7 +182,7 @@ def test_sinusoidal_poisson_generator_with_multimeter(num_threads, individual_sp
     
         parrots = nest.Create("parrot_neuron", total_num_nrns)
         sspg = nest.Create("sinusoidal_poisson_generator")
    -    mm = nest.Create("multimeter", {"record_from": ["rate"]})
    +    mm = nest.Create("multimeter", params={"record_from": ["rate"]})
     
         nest.Connect(sspg, parrots)
         nest.Connect(mm, sspg)
    @@ -218,7 +218,7 @@ def test_sinusoidal_poisson_generator_rate_profile():
     
         parrots = nest.Create("parrot_neuron")
         sspg = nest.Create("sinusoidal_poisson_generator")
    -    mm = nest.Create("multimeter", {"record_from": ["rate"]})
    +    mm = nest.Create("multimeter", params={"record_from": ["rate"]})
     
         nest.Connect(sspg, parrots)
         nest.Connect(mm, sspg)
    diff --git a/testsuite/pytests/sli2py_stimulating/test_spike_generator.py b/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    index 8bf90905d9..0353540535 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    @@ -41,7 +41,7 @@ def test_check_spike_time_zero_error(prepare_kernel):
         """
         sg = nest.Create("spike_generator")
     
    -    with pytest.raises(nest.kernel.NESTError, match="spike time cannot be set to 0"):
    +    with pytest.raises(nest.NESTError, match="spike time cannot be set to 0"):
             sg.set({"spike_times": [0.0]})
     
     
    @@ -51,7 +51,7 @@ def test_spike_generator_precise_time_false(prepare_kernel):
         """
         sg = nest.Create("spike_generator")
         sg_params = {"precise_times": False, "spike_times": [4.33], "origin": 0.0, "start": 0.0, "stop": 0.0}
    -    with pytest.raises(nest.kernel.NESTError, match="Time point 4.33 is not representable in current resolution"):
    +    with pytest.raises(nest.NESTError, match="Time point 4.33 is not representable in current resolution"):
             sg.set(sg_params)
     
     
    @@ -80,8 +80,8 @@ def test_spike_generator(prepare_kernel, spike_times, allow_offgrid_times, expec
             "stop": 6.0,
         }
     
    -    sg = nest.Create("spike_generator", sg_params)
    -    sr = nest.Create("spike_recorder", {"time_in_steps": True})
    +    sg = nest.Create("spike_generator", params=sg_params)
    +    sr = nest.Create("spike_recorder", params={"time_in_steps": True})
         nest.Connect(sg, sr, syn_spec={"delay": 1.0, "weight": 1.0})
     
         nest.Simulate(10.0)
    @@ -96,7 +96,7 @@ def test_spike_generator_spike_not_res_multiple(prepare_kernel):
         """
         sg = nest.Create("spike_generator")
         sg_params = {"spike_times": [1.0, 1.05, 3.0001], "origin": 0.0, "start": 0.0, "stop": 6.0}
    -    with pytest.raises(nest.kernel.NESTError, match="Time point 1.05 is not representable in current resolution"):
    +    with pytest.raises(nest.NESTError, match="Time point 1.05 is not representable in current resolution"):
             sg.set(sg_params)
     
     
    @@ -112,8 +112,8 @@ def test_spike_generator_precise_spikes(prepare_kernel):
             "stop": 6.0,
         }
     
    -    sg = nest.Create("spike_generator", sg_params)
    -    sr = nest.Create("spike_recorder", {"time_in_steps": True})
    +    sg = nest.Create("spike_generator", params=sg_params)
    +    sr = nest.Create("spike_recorder", params={"time_in_steps": True})
         nest.Connect(sg, sr, syn_spec={"delay": 1.0, "weight": 1.0})
     
         nest.Simulate(10.0)
    @@ -154,9 +154,8 @@ def test_spike_generator_precise_time_future_spike(prepare_kernel):
     
         In this test, the spike occurs at step 101, offset -0.0999 is in the future, and spike is shifted to the future.
         """
    -    sg_params = {"precise_times": True, "origin": 0.0, "start": 0.0}
    -    sg = nest.Create("spike_generator", sg_params)
    -    sr = nest.Create("spike_recorder", {"time_in_steps": True})
    +    sg = nest.Create("spike_generator", params={"precise_times": True, "origin": 0.0, "start": 0.0})
    +    sr = nest.Create("spike_recorder", params={"time_in_steps": True})
         nest.Connect(sg, sr)
     
         nest.Simulate(10.0)
    @@ -181,9 +180,8 @@ def test_spike_generator_with_shift_now_spikes(prepare_kernel):
         In this test, first the spike occurs at step 101 and shifted into the future.
         A second spike occurs at step 110 is not shifted, since it is in the future anyways.
         """
    -    sg_params = {"shift_now_spikes": True, "origin": 0.0, "start": 0.0}
    -    sg = nest.Create("spike_generator", sg_params)
    -    sr = nest.Create("spike_recorder", {"time_in_steps": True})
    +    sg = nest.Create("spike_generator", params={"shift_now_spikes": True, "origin": 0.0, "start": 0.0})
    +    sr = nest.Create("spike_recorder", params={"time_in_steps": True})
         nest.Connect(sg, sr, syn_spec={"weight": 1.0, "delay": 1.0})
     
         nest.Simulate(10.0)
    @@ -206,11 +204,11 @@ def test_spike_generator_precise_times_and_allow_offgrid_times(prepare_kernel):
         Ensure exclusivity between options ``precise_times`` and ``allow_offgrid_times``.
         """
         with pytest.raises(
    -        nest.kernel.NESTError,
    +        nest.NESTError,
             match="Option precise_times cannot be set to true when either allow_offgrid_times or "
             "shift_now_spikes is set to true.",
         ):
    -        sg = nest.Create("spike_generator", {"precise_times": True, "allow_offgrid_times": True})
    +        sg = nest.Create("spike_generator", params={"precise_times": True, "allow_offgrid_times": True})
     
     
     def test_spike_generator_precise_times_and_shift_now_spikes(prepare_kernel):
    @@ -218,11 +216,11 @@ def test_spike_generator_precise_times_and_shift_now_spikes(prepare_kernel):
         Ensure exclusivity between options ``precise_times`` and ``shift_now_spikes``.
         """
         with pytest.raises(
    -        nest.kernel.NESTError,
    +        nest.NESTError,
             match="Option precise_times cannot be set to true when either allow_offgrid_times or "
             "shift_now_spikes is set to true.",
         ):
    -        sg = nest.Create("spike_generator", {"precise_times": True, "shift_now_spikes": True})
    +        sg = nest.Create("spike_generator", params={"precise_times": True, "shift_now_spikes": True})
     
     
     @pytest.mark.parametrize(
    @@ -277,7 +275,7 @@ def test_spike_generator_precise_times_different_resolution(h, expected_spike_ti
             "start": 5.0,
             "stop": 6.0,
         }
    -    sg = nest.Create("spike_generator", sg_params)
    +    sg = nest.Create("spike_generator", params=sg_params)
         sr = nest.Create("spike_recorder")
         nest.Connect(sg, sr, syn_spec={"delay": 1.0, "weight": 1.0})
     
    diff --git a/testsuite/pytests/sli2py_stimulating/test_step_current_generator.py b/testsuite/pytests/sli2py_stimulating/test_step_current_generator.py
    index 01fa64cf71..7b1b91a5d0 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_step_current_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_step_current_generator.py
    @@ -65,7 +65,7 @@ def test_set_amplitude_times_or_values_only_fails(params):
         Ensure failure if setting only one of ``amplitude_times`` or ``amplitude_values``.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults("step_current_generator", params)
     
     
    @@ -76,7 +76,7 @@ def test_set_different_sized_amplitude_times_and_values_fails():
     
         params = {"amplitude_times": [1.0, 2.0], "amplitude_values": [1.0, 2.0, 3.0]}
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults("step_current_generator", params)
     
     
    @@ -87,7 +87,7 @@ def test_fail_if_amplitude_times_not_strictly_increases():
     
         params = {"amplitude_times": [1.0, 2.0, 2.0], "amplitude_values": [1.0, 2.0, 3.0]}
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults("step_current_generator", params)
     
     
    diff --git a/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    index 8abe46d99d..81168d3e99 100644
    --- a/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    @@ -62,5 +62,5 @@ def test_delay_compatible_with_resolution(prepare_kernel, expected_spike_times,
     
     
     def test_delay_shorter_than_resolution(prepare_kernel):
    -    with pytest.raises(nest.kernel.NESTErrors.BadDelay):
    +    with pytest.raises(nest.NESTErrors.BadDelay):
             actual_spike_times = run_simulation(1.0, 0.7)
    diff --git a/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py b/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    index 14b6a09abe..a54047ddd1 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    @@ -64,16 +64,12 @@ def neuron(reference_params):
     
     @pytest.fixture()
     def recording_devices(neuron):
    -    dc = nest.Create("dc_generator", {"amplitude": 100.0})
    -
    -    sg = nest.Create("spike_generator", {"precise_times": False, "spike_times": [0.1, 1.2]})
    -
    -    sr = nest.Create("spike_recorder", {"time_in_steps": True})
    -
    -    vm = nest.Create("voltmeter", {"time_in_steps": True, "interval": nest.resolution})
    -
    +    dc = nest.Create("dc_generator", params={"amplitude": 100.0})
    +    sg = nest.Create("spike_generator", params={"precise_times": False, "spike_times": [0.1, 1.2]})
    +    sr = nest.Create("spike_recorder", params={"time_in_steps": True})
    +    vm = nest.Create("voltmeter", params={"time_in_steps": True, "interval": nest.resolution})
         mm = nest.Create(
    -        "multimeter", {"time_in_steps": True, "interval": nest.resolution, "record_from": ["g_ex", "g_in"]}
    +        "multimeter", params={"time_in_steps": True, "interval": nest.resolution, "record_from": ["g_ex", "g_in"]}
         )
     
         nest.Connect(sg, neuron)
    diff --git a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    index 3960a8552c..4e8bead1ac 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    @@ -77,9 +77,9 @@ def prepare_neuron(syn):
         nest.ResetKernel()
         nest.local_num_threads = 4
     
    -    sg = nest.Create("spike_generator", {"spike_times": [5.0]})
    +    sg = nest.Create("spike_generator", params={"spike_times": [5.0]})
         pn = nest.Create("parrot_neuron")
    -    neuron = nest.Create("iaf_psc_alpha", {"V_th": 100000.0})
    +    neuron = nest.Create("iaf_psc_alpha", params={"V_th": 100000.0})
     
         nest.Connect(sg, pn)
         nest.Connect(pn, neuron, syn_spec={"synapse_model": syn})
    @@ -92,7 +92,7 @@ def prepare_neurons(syn):
         nest.ResetKernel()
         nest.local_num_threads = 4
     
    -    sg = nest.Create("spike_generator", {"spike_times": [1.0]})
    +    sg = nest.Create("spike_generator", params={"spike_times": [1.0]})
         pn = nest.Create("parrot_neuron")
         nest.Connect(sg, pn)
     
    @@ -109,7 +109,7 @@ def prepare_frozen_neuron(syn, first_node_to_connect=1, freeze_before_connect=Tr
         nest.ResetKernel()
         nest.local_num_threads = 4
     
    -    sg = nest.Create("spike_generator", {"spike_times": [1.0]})
    +    sg = nest.Create("spike_generator", params={"spike_times": [1.0]})
         pn = nest.Create("parrot_neuron")
     
         nodes = nest.Create("iaf_psc_alpha", 4, {"V_th": 100000.0})
    diff --git a/testsuite/pytests/sli2py_synapses/test_set_delay_extrema.py b/testsuite/pytests/sli2py_synapses/test_set_delay_extrema.py
    index 54a78476f6..566d18a60c 100644
    --- a/testsuite/pytests/sli2py_synapses/test_set_delay_extrema.py
    +++ b/testsuite/pytests/sli2py_synapses/test_set_delay_extrema.py
    @@ -34,7 +34,7 @@ def prepare_network():
         h = 0.1
         nest.set(resolution=h, min_delay=h, max_delay=2.0)
     
    -    n1 = nest.Create("iaf_psc_alpha", {"I_e": 1450.0})
    +    n1 = nest.Create("iaf_psc_alpha", params={"I_e": 1450.0})
         n2 = nest.Create("iaf_psc_alpha")
     
         nest.Connect(n1, n2, syn_spec={"weight": 100.0, "delay": 0.5})  # small delay
    diff --git a/testsuite/pytests/test_bernoulli_synapse.py b/testsuite/pytests/test_bernoulli_synapse.py
    index ab1c8f60cc..a8e71b89fa 100644
    --- a/testsuite/pytests/test_bernoulli_synapse.py
    +++ b/testsuite/pytests/test_bernoulli_synapse.py
    @@ -54,7 +54,7 @@ def test_bernoulli_synapse_statistics(self, seed: int):
             margin = 3 * (N_spikes * p * (1 - p)) ** 0.5
     
             # build
    -        sg = nest.Create("spike_generator", {"spike_times": np.arange(1, N_spikes).astype(float)})
    +        sg = nest.Create("spike_generator", params={"spike_times": np.arange(1, N_spikes).astype(float)})
             pre = nest.Create("parrot_neuron")
             post = nest.Create("parrot_neuron")
             sr = nest.Create("spike_recorder")
    @@ -88,8 +88,8 @@ def test_p_transmit_values(self):
             pre = nest.Create("parrot_neuron")
             post = nest.Create("parrot_neuron")
     
    -        with pytest.raises(nest.kernel.NESTError):
    +        with pytest.raises(nest.NESTError):
                 nest.Connect(pre, post, syn_spec={"synapse_model": "bernoulli_synapse", "p_transmit": -0.1})
     
    -        with pytest.raises(nest.kernel.NESTError):
    +        with pytest.raises(nest.NESTError):
                 nest.Connect(pre, post, syn_spec={"synapse_model": "bernoulli_synapse", "p_transmit": 1.1})
    diff --git a/testsuite/pytests/test_binary.py b/testsuite/pytests/test_binary.py
    index 332bd01de4..876851400d 100644
    --- a/testsuite/pytests/test_binary.py
    +++ b/testsuite/pytests/test_binary.py
    @@ -51,7 +51,7 @@ def test_binary(self, neuron_model):
             sg = nest.Create("spike_generator")
             sg.spike_times = [10.0, 10.0, 15.0]
             nest.Connect(sg, nrn)
    -        multi = nest.Create("multimeter", {"record_from": ["h"]})
    +        multi = nest.Create("multimeter", params={"record_from": ["h"]})
             nest.Connect(multi, nrn)
     
             nest.Simulate(20.0)
    @@ -102,11 +102,11 @@ def test_connecting_binary(self):
             sr = nest.Create("spike_recorder")
     
             # check if connecting a binary to a spiking neuron throws exception
    -        with pytest.raises(nest.kernel.NESTError):
    +        with pytest.raises(nest.NESTError):
                 nest.Connect(binary, spiking)
     
             # check if connecting a spiking neuron to a binary throws exception
    -        with pytest.raises(nest.kernel.NESTError):
    +        with pytest.raises(nest.NESTError):
                 nest.Connect(spiking, binary)
     
             # check if connecting a binary or a spiking neuron to general device works
    @@ -125,5 +125,5 @@ def test_keep_source_table(self):
     
             nest.Connect(ginzburg, mcculloch)
     
    -        with pytest.raises(nest.kernel.NESTError):
    +        with pytest.raises(nest.NESTError):
                 nest.Simulate(100.0)
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index 0685c68fc8..4ceb474150 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -56,7 +56,7 @@ def create_1dend_1comp(dt=0.1):
         n_neat.V_th = 100.0
         n_neat.compartments = [{"parent_idx": -1, "params": SP}, {"parent_idx": 0, "params": DP[0]}]
     
    -    m_neat = nest.Create("multimeter", 1, {"record_from": ["v_comp0", "v_comp1"], "interval": 0.1})
    +    m_neat = nest.Create("multimeter", params={"record_from": ["v_comp0", "v_comp1"], "interval": 0.1})
         nest.Connect(m_neat, n_neat)
     
         # create equivalent matrices for inversion test
    @@ -104,7 +104,7 @@ def create_2dend_1comp(dt=0.1):
             {"parent_idx": 0, "params": DP[1]},
         ]
     
    -    m_neat = nest.Create("multimeter", 1, {"record_from": ["v_comp0", "v_comp1", "v_comp2"], "interval": 0.1})
    +    m_neat = nest.Create("multimeter", params={"record_from": ["v_comp0", "v_comp1", "v_comp2"], "interval": 0.1})
         nest.Connect(m_neat, n_neat)
     
         # create equivalent matrices for inversion test
    @@ -174,7 +174,7 @@ def create_1dend_2comp(dt=0.1):
             {"parent_idx": 1, "params": DP[1]},
         ]
     
    -    m_neat = nest.Create("multimeter", 1, {"record_from": ["v_comp0", "v_comp1", "v_comp2"], "interval": 0.1})
    +    m_neat = nest.Create("multimeter", params={"record_from": ["v_comp0", "v_comp1", "v_comp2"], "interval": 0.1})
         nest.Connect(m_neat, n_neat)
     
         # create equivalent matrices for inversion test
    @@ -244,7 +244,7 @@ def create_tdend_4comp(dt=0.1):
             {"parent_idx": 2, "params": DP[3]},
         ]
     
    -    m_neat = nest.Create("multimeter", 1, {"record_from": ["v_comp%d" % ii for ii in range(5)], "interval": 0.1})
    +    m_neat = nest.Create("multimeter", params={"record_from": ["v_comp%d" % ii for ii in range(5)], "interval": 0.1})
         nest.Connect(m_neat, n_neat)
     
         # create equivalent matrices for inversion test
    @@ -350,7 +350,7 @@ def create_2tdend_4comp(dt=0.1):
             {"parent_idx": 6, "params": DP[7]},
         ]
     
    -    m_neat = nest.Create("multimeter", 1, {"record_from": ["v_comp%d" % ii for ii in range(9)], "interval": 0.1})
    +    m_neat = nest.Create("multimeter", params={"record_from": ["v_comp%d" % ii for ii in range(9)], "interval": 0.1})
         nest.Connect(m_neat, n_neat)
     
         # create equivalent matrices for inversion test
    @@ -500,11 +500,8 @@ def test_inversion(self, dt=0.1, model_name="1dend_1comp"):
     
             for ii, i_amp in enumerate(i_in):
                 # add current
    -            nest.Connect(
    -                nest.Create("dc_generator", {"amplitude": i_amp}),
    -                n_neat,
    -                syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "delay": dt, "receptor_type": ii},
    -            )
    +            syn_spec = {"synapse_model": "static_synapse", "weight": 1.0, "delay": dt, "receptor_type": ii}
    +            nest.Connect(nest.Create("dc_generator", params={"amplitude": i_amp}), n_neat, syn_spec=syn_spec)
     
                 bb[ii] += i_amp
     
    @@ -541,11 +538,8 @@ def test_no_inp_inversion(self, dt=0.1, model_name="2tdend_4comp"):
     
             for ii, i_amp in enumerate(i_in):
                 # add current
    -            nest.Connect(
    -                nest.Create("dc_generator", {"amplitude": i_amp}),
    -                n_neat,
    -                syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "delay": dt, "receptor_type": ii},
    -            )
    +            syn_spec = {"synapse_model": "static_synapse", "weight": 1.0, "delay": dt, "receptor_type": ii}
    +            nest.Connect(nest.Create("dc_generator", params={"amplitude": i_amp}), n_neat, syn_spec=syn_spec)
     
                 bb[ii] += i_amp
     
    @@ -572,11 +566,8 @@ def test_attenuation(self, model_name="1dend_1comp", dt=0.1, i_amp=1.0, t_max=20
             for ii in range(n_comp):
                 (n_neat, m_neat), _, gg = eval("create_%s(dt=dt)" % model_name)
                 # add current
    -            nest.Connect(
    -                nest.Create("dc_generator", params={"amplitude": i_amp}),
    -                n_neat,
    -                syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "delay": t_max / 2.0, "receptor_type": ii},
    -            )
    +            syn_spec = {"synapse_model": "static_synapse", "weight": 1.0, "delay": t_max / 2.0, "receptor_type": ii}
    +            nest.Connect(nest.Create("dc_generator", params={"amplitude": i_amp}), n_neat, syn_spec=syn_spec)
     
                 # run the NEST model
                 nest.Simulate(t_max)
    @@ -611,11 +602,8 @@ def test_equilibrium(self, dt=0.1, t_max=200.0, model_name="2tdend_4comp"):
             el = np.array([SP["e_L"]] + [DP[ii]["e_L"] for ii in range(n_comp - 1)])
     
             # add current
    -        nest.Connect(
    -            nest.Create("dc_generator", params={"amplitude": 0.0}),
    -            n_neat,
    -            syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "delay": 0.1, "receptor_type": 0},
    -        )
    +        syn_spec = {"synapse_model": "static_synapse", "weight": 1.0, "delay": 0.1, "receptor_type": 0}
    +        nest.Connect(nest.Create("dc_generator", params={"amplitude": 0.0}), n_neat, syn_spec=syn_spec)
     
             # run the NEST model
             nest.Simulate(t_max)
    @@ -658,12 +646,9 @@ def test_conductance_input(self, model_name="1dend_1comp", dt=0.01, t_max=300.0)
             for ii, sw in enumerate(syn_weights):
                 syn_idx = ii
                 # connect spike generator to AMPA synapse
    -            sg = nest.Create("spike_generator", 1, {"spike_times": np.arange(0.1, t_max, dt)})
    -            nest.Connect(
    -                sg,
    -                n_neat,
    -                syn_spec={"synapse_model": "static_synapse", "weight": sw * dt, "delay": 0.1, "receptor_type": syn_idx},
    -            )
    +            sg = nest.Create("spike_generator", params={"spike_times": np.arange(0.1, t_max, dt)})
    +            syn_spec = {"synapse_model": "static_synapse", "weight": sw * dt, "delay": 0.1, "receptor_type": syn_idx}
    +            nest.Connect(sg, n_neat, syn_spec=syn_spec)
     
             # run the NEST model
             nest.Simulate(t_max)
    @@ -697,26 +682,23 @@ def test_spike_transmission(self, dt=0.01):
     
             n_neat_0 = nest.Create("cm_default", params={"compartments": {"parent_idx": -1, "params": soma_params}})
     
    -        n_neat_1 = nest.Create(
    -            "cm_default",
    -            params={
    -                "compartments": {"parent_idx": -1, "params": soma_params},
    -                "receptors": {"comp_idx": 0, "receptor_type": "AMPA"},
    -            },
    -        )
    +        neuron_params = {
    +            "compartments": {"parent_idx": -1, "params": soma_params},
    +            "receptors": {"comp_idx": 0, "receptor_type": "AMPA"},
    +        }
    +        n_neat_1 = nest.Create("cm_default", params=neuron_params)
             syn_idx = 0
     
    -        nest.Connect(
    -            n_neat_0, n_neat_1, syn_spec={"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": syn_idx}
    -        )
    +        syn_spec = {"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": syn_idx}
    +        nest.Connect(n_neat_0, n_neat_1, syn_spec=syn_spec)
     
    -        dc = nest.Create("dc_generator", {"amplitude": 2.0})
    +        dc = nest.Create("dc_generator", params={"amplitude": 2.0})
             nest.Connect(dc, n_neat_0, syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "receptor_type": 0})
     
    -        m_neat_0 = nest.Create("multimeter", 1, {"record_from": ["v_comp0"], "interval": dt})
    +        m_neat_0 = nest.Create("multimeter", params={"record_from": ["v_comp0"], "interval": dt})
             nest.Connect(m_neat_0, n_neat_0)
     
    -        m_neat_1 = nest.Create("multimeter", 1, {"record_from": ["v_comp0"], "interval": dt})
    +        m_neat_1 = nest.Create("multimeter", params={"record_from": ["v_comp0"], "interval": dt})
             nest.Connect(m_neat_1, n_neat_1)
     
             nest.Simulate(100.0)
    @@ -728,8 +710,8 @@ def test_spike_transmission(self, dt=0.01):
             self.assertTrue(np.any(events_neat_1["v_comp0"] != soma_params["e_L"]))
     
         def test_set_combinations(self, dt=0.1):
    -        sg_11 = nest.Create("spike_generator", 1, {"spike_times": [10.0]})
    -        sg_12 = nest.Create("spike_generator", 1, {"spike_times": [15.0]})
    +        sg_11 = nest.Create("spike_generator", params={"spike_times": [10.0]})
    +        sg_12 = nest.Create("spike_generator", params={"spike_times": [15.0]})
     
             # set status with individual calls for each receptor and compartment
             n_neat_0 = nest.Create("cm_default")
    @@ -751,10 +733,10 @@ def test_set_combinations(self, dt=0.1):
             nest.Connect(sg_11, n_neat_1, syn_spec={"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": 0})
             nest.Connect(sg_12, n_neat_1, syn_spec={"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": 1})
     
    -        m_neat_0 = nest.Create("multimeter", 1, {"record_from": ["v_comp0"], "interval": dt})
    +        m_neat_0 = nest.Create("multimeter", params={"record_from": ["v_comp0"], "interval": dt})
             nest.Connect(m_neat_0, n_neat_0)
     
    -        m_neat_1 = nest.Create("multimeter", 1, {"record_from": ["v_comp0"], "interval": dt})
    +        m_neat_1 = nest.Create("multimeter", params={"record_from": ["v_comp0"], "interval": dt})
             nest.Connect(m_neat_1, n_neat_1)
     
             nest.Simulate(100.0)
    @@ -806,7 +788,7 @@ def test_error_handling(self):
             n_neat = nest.Create("cm_default")
     
             with self.assertRaisesRegex(
    -            nest.NESTError, "in llapi_set_nc_status: " "Compartment 0 , the root, " "has already been instantiated."
    +            nest.NESTError, "in llapi_set_nc_status: Compartment 0 , the root, has already been instantiated."
             ):
                 n_neat.compartments = [{"parent_idx": -1, "params": SP}, {"parent_idx": -1, "params": SP}]
     
    @@ -815,7 +797,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            "in llapi_set_nc_status: " "Compartment 15 does not exist in tree, " "but was specified as a parent.",
    +            "in llapi_set_nc_status: Compartment 15 does not exist in tree, but was specified as a parent.",
             ):
                 n_neat.compartments = [{"parent_idx": -1, "params": SP}, {"parent_idx": 15, "params": SP}]
     
    @@ -823,9 +805,7 @@ def test_error_handling(self):
             n_neat = nest.Create("cm_default")
             n_neat.compartments = {"parent_idx": -1, "params": SP}
     
    -        with self.assertRaisesRegex(
    -            nest.NESTError, "in llapi_set_nc_status: " "Compartment 12 does not exist in tree."
    -        ):
    +        with self.assertRaisesRegex(nest.NESTError, "in llapi_set_nc_status: Compartment 12 does not exist in tree."):
                 n_neat.receptors = {"comp_idx": 12, "receptor_type": "GABA"}
     
             # test simulate without adding compartments
    @@ -860,7 +840,7 @@ def test_error_handling(self):
                 {"comp_idx": 0, "receptor_type": "GABA"},
                 {"comp_idx": 0, "receptor_type": "GABA"},
             ]
    -        sg = nest.Create("spike_generator", 1, {"spike_times": [10.0]})
    +        sg = nest.Create("spike_generator", params={"spike_times": [10.0]})
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    @@ -873,12 +853,11 @@ def test_error_handling(self):
             # test connection with unknown recordable
             n_neat = nest.Create("cm_default")
             n_neat.compartments = {"parent_idx": -1, "params": SP}
    -        mm = nest.Create("multimeter", 1, {"record_from": ["v_comp1"], "interval": 1.0})
    +        mm = nest.Create("multimeter", params={"record_from": ["v_comp1"], "interval": 1.0})
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            "in llapi_connect: "
    -            "Creation of connection is not possible because:\n"
    +            "in llapi_connect: Creation of connection is not possible because:\n"
                 "Cannot connect with unknown recordable v_comp1",
             ):
                 nest.Connect(mm, n_neat)
    @@ -914,13 +893,13 @@ def test_continuerun(self, dt=0.1):
                 },
             )
     
    -        sg_1 = nest.Create("spike_generator", 1, {"spike_times": [10.0]})
    -        sg_2 = nest.Create("spike_generator", 1, {"spike_times": [15.0]})
    +        sg_1 = nest.Create("spike_generator", params={"spike_times": [10.0]})
    +        sg_2 = nest.Create("spike_generator", params={"spike_times": [15.0]})
     
             nest.Connect(sg_1, n_neat, syn_spec={"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": 0})
             nest.Connect(sg_2, n_neat, syn_spec={"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": 1})
     
    -        m_neat = nest.Create("multimeter", 1, {"record_from": recordables, "interval": 1.0})
    +        m_neat = nest.Create("multimeter", params={"record_from": recordables, "interval": 1.0})
             nest.Connect(m_neat, n_neat)
     
             nest.Simulate(100.0)
    @@ -939,13 +918,13 @@ def test_continuerun(self, dt=0.1):
                 },
             )
     
    -        sg_1 = nest.Create("spike_generator", 1, {"spike_times": [10.0]})
    -        sg_2 = nest.Create("spike_generator", 1, {"spike_times": [15.0]})
    +        sg_1 = nest.Create("spike_generator", params={"spike_times": [10.0]})
    +        sg_2 = nest.Create("spike_generator", params={"spike_times": [15.0]})
     
             nest.Connect(sg_1, n_neat, syn_spec={"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": 0})
             nest.Connect(sg_2, n_neat, syn_spec={"synapse_model": "static_synapse", "weight": 0.1, "receptor_type": 1})
     
    -        m_neat = nest.Create("multimeter", 1, {"record_from": recordables, "interval": 1.0})
    +        m_neat = nest.Create("multimeter", params={"record_from": recordables, "interval": 1.0})
             nest.Connect(m_neat, n_neat)
     
             nest.Simulate(12.0)
    diff --git a/testsuite/pytests/test_connect_node_collection.py b/testsuite/pytests/test_connect_node_collection.py
    index da323fef9c..768108392a 100644
    --- a/testsuite/pytests/test_connect_node_collection.py
    +++ b/testsuite/pytests/test_connect_node_collection.py
    @@ -61,11 +61,11 @@ def test_connect_empty_node_collection_raises(empty_nc):
     
         nc = nest.Create("iaf_psc_alpha", 5)
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(nc, empty_nc)
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(empty_nc, nc)
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(empty_nc, empty_nc)
    diff --git a/testsuite/pytests/test_get_set.py b/testsuite/pytests/test_get_set.py
    index 2583129816..8338ba013c 100644
    --- a/testsuite/pytests/test_get_set.py
    +++ b/testsuite/pytests/test_get_set.py
    @@ -157,9 +157,9 @@ def test_SetStatus_and_GetStatus(self):
     
             nc = nest.Create("iaf_psc_exp", 5)  # noqa: F841
     
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.SetStatus(n, {"V_m": -40.0})
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.GetStatus(n)
     
             nest.ResetKernel()
    diff --git a/testsuite/pytests/test_gif_exp.py b/testsuite/pytests/test_gif_exp.py
    index 7572f70563..4f2935dcd0 100644
    --- a/testsuite/pytests/test_gif_exp.py
    +++ b/testsuite/pytests/test_gif_exp.py
    @@ -76,13 +76,13 @@ def run_simulation(self, model, params=None):
         def test_gif_exp_wrong_params(self, model):
             """Test for wrong parameters (negative lambda)"""
             params = {"lambda_0": -10.0}
    -        with pytest.raises(nest.kernel.NESTError):
    +        with pytest.raises(nest.NESTError):
                 self.run_simulation(model, params)
     
         def test_gif_exp_wrong_params2(self, model):
             """Test for wrong parameters (unequal size of arrays)"""
             params = {"tau_sfa": 120.0, "q_sfa": [10.0, 25.0]}
    -        with pytest.raises(nest.kernel.NESTError):
    +        with pytest.raises(nest.NESTError):
                 self.run_simulation(model, params)
     
         def test_gif_exp_default_params(self, model):
    diff --git a/testsuite/pytests/test_multimeter.py b/testsuite/pytests/test_multimeter.py
    index 5308084937..d6b129f8d8 100644
    --- a/testsuite/pytests/test_multimeter.py
    +++ b/testsuite/pytests/test_multimeter.py
    @@ -45,7 +45,7 @@ def test_connect_multimeter_twice():
         mm = nest.Create("multimeter")
         nest.Connect(mm, nrn)
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(mm, nrn)
     
     
    @@ -59,8 +59,8 @@ def test_receptors_with_multiple_multimeters(model):
         """
     
         nrn = nest.Create(model)
    -    mm1 = nest.Create("multimeter", {"record_from": nrn.recordables})
    -    mm2 = nest.Create("multimeter", {"record_from": nrn.recordables})
    +    mm1 = nest.Create("multimeter", params={"record_from": nrn.recordables})
    +    mm2 = nest.Create("multimeter", params={"record_from": nrn.recordables})
         nest.Connect(mm1, nrn)
         nest.Connect(mm2, nrn)
     
    @@ -93,7 +93,7 @@ def test_recordables_are_recorded(model):
     
         nrn = nest.Create(model)
         recordables = nrn.recordables
    -    mm = nest.Create("multimeter", {"interval": recording_interval, "record_from": recordables})
    +    mm = nest.Create("multimeter", params={"interval": recording_interval, "record_from": recordables})
         nest.Connect(mm, nrn)
         nest.Simulate(simtime)
     
    @@ -119,8 +119,8 @@ def test_identical_recording_from_multiple_multimeters(model):
             nrn.compartments = {"parent_idx": -1}
     
         recordables = nrn.recordables
    -    mm1 = nest.Create("multimeter", {"record_from": recordables})
    -    mm2 = nest.Create("multimeter", {"record_from": recordables})
    +    mm1 = nest.Create("multimeter", params={"record_from": recordables})
    +    mm2 = nest.Create("multimeter", params={"record_from": recordables})
     
         nest.Connect(mm1, nrn)
         nest.Connect(mm2, nrn)
    diff --git a/testsuite/pytests/test_node_collection_indexing_slicing.py b/testsuite/pytests/test_node_collection_indexing_slicing.py
    index 03479bf2f2..c552c8c1c6 100644
    --- a/testsuite/pytests/test_node_collection_indexing_slicing.py
    +++ b/testsuite/pytests/test_node_collection_indexing_slicing.py
    @@ -228,13 +228,13 @@ def test_node_collection_slice_unsorted_raises():
     
         nc = nest.Create("iaf_psc_alpha", 10)
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nc[[6, 5, 4]]
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nc[[5, 4, 6]]
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nc[[5, 4, 6]]
     
     
    @@ -264,13 +264,13 @@ def test_node_collection_with_nonunique_nodes_raises():
     
         nc = nest.Create("iaf_psc_alpha", 10)
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nc[1:3] + nc[2:5]
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.NodeCollection([2, 2])
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.NodeCollection([2]) + nest.NodeCollection([1, 2])
     
     
    diff --git a/testsuite/pytests/test_node_collection_operations.py b/testsuite/pytests/test_node_collection_operations.py
    index d8269c13e0..75b5b38c0f 100644
    --- a/testsuite/pytests/test_node_collection_operations.py
    +++ b/testsuite/pytests/test_node_collection_operations.py
    @@ -117,7 +117,7 @@ def test_node_collection_add_overlapping_raises():
         nc_b = nest.Create("iaf_psc_exp", 7)
         nc_c = nest.NodeCollection([6, 8, 10, 12, 14])
     
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             nc_a + nc_b + nc_c
     
     
    @@ -267,5 +267,5 @@ def test_composite_node_collection_add_sliced_raises():
     
         nc = nest.Create("iaf_psc_delta")
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             sliced_comp_nc + nc
    diff --git a/testsuite/pytests/test_node_collection_to_from_object.py b/testsuite/pytests/test_node_collection_to_from_object.py
    index 354b72bf7c..fbd32ac182 100644
    --- a/testsuite/pytests/test_node_collection_to_from_object.py
    +++ b/testsuite/pytests/test_node_collection_to_from_object.py
    @@ -48,7 +48,7 @@ def test_node_collection_from_list_no_created_nodes_raises():
         """Ensure exception if creating ``NodeCollection`` from ``list`` without creating nodes first."""
     
         node_ids_in = [5, 10, 15, 20]
    -    with pytest.raises(nest.kernel.NESTErrors.UnknownNode):
    +    with pytest.raises(nest.NESTErrors.UnknownNode):
             nc = nest.NodeCollection(node_ids_in)
     
     
    @@ -105,8 +105,8 @@ def test_node_collection_from_unsorted_list_raises():
     
         nest.Create("iaf_psc_alpha", 10)
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.NodeCollection([5, 4, 6])
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.NodeCollection([5, 6, 4])
    diff --git a/testsuite/pytests/test_spatial/test_create_spatial.py b/testsuite/pytests/test_spatial/test_create_spatial.py
    index d57e7d7faf..82526ba1c7 100644
    --- a/testsuite/pytests/test_spatial/test_create_spatial.py
    +++ b/testsuite/pytests/test_spatial/test_create_spatial.py
    @@ -87,7 +87,7 @@ def test_Create_free_layer_with_wrong_extent(self):
             """Test Create free layer with too small extent."""
             pos = ((1.0, 1.0), (2.0, 2.0), (3.0, 3.0))
             extent = (1.5, 3.0)
    -        with self.assertRaises(nest.kernel.NESTError):
    +        with self.assertRaises(nest.NESTError):
                 nest.Create("iaf_psc_alpha", positions=nest.spatial.free(pos, extent=extent))
     
         def test_Create_free_layer_from_LognormalParameter(self):
    diff --git a/testsuite/pytests/test_spatial/test_layer_get_set.py b/testsuite/pytests/test_spatial/test_layer_get_set.py
    index 557270a14d..4b817b1c5a 100644
    --- a/testsuite/pytests/test_spatial/test_layer_get_set.py
    +++ b/testsuite/pytests/test_spatial/test_layer_get_set.py
    @@ -106,7 +106,7 @@ def test_LayerSet(self):
                 "iaf_psc_alpha", positions=nest.spatial.grid(shape=[3, 3], extent=[2.0, 2.0], edge_wrap=True)
             )
     
    -        with self.assertRaises(nest.kernel.NESTErrors.DictError):
    +        with self.assertRaises(nest.NESTErrors.DictError):
                 layer.set({"center": [1.0, 1.0]})
     
             layer.set(V_m=-50.0)
    diff --git a/testsuite/pytests/test_spatial/test_oversize_mask.py b/testsuite/pytests/test_spatial/test_oversize_mask.py
    index 875a5334c5..b4740d02ae 100644
    --- a/testsuite/pytests/test_spatial/test_oversize_mask.py
    +++ b/testsuite/pytests/test_spatial/test_oversize_mask.py
    @@ -79,7 +79,7 @@ def test_grid_layer_grid_mask_incorrect(grid_layer, mask):
         and the third too wide and tall.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.Connect(
                 grid_layer,
                 grid_layer,
    @@ -113,7 +113,7 @@ def test_free_layer_circular_mask_incorrect(free_layer, mask):
         The circular mask in the parametrization is too wide.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.Connect(
                 free_layer,
                 free_layer,
    @@ -151,7 +151,7 @@ def test_free_layer_doughnut_mask_incorrect(free_layer, mask):
         The doughnut mask in the parametrization is too wide.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.Connect(
                 free_layer,
                 free_layer,
    @@ -189,7 +189,7 @@ def test_free_layer_rectangular_mask_incorrect(free_layer, mask):
         The rectangular mask in the parametrization is too wide.
         """
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.Connect(
                 free_layer,
                 free_layer,
    diff --git a/testsuite/pytests/test_spatial/test_parameter_apply.py b/testsuite/pytests/test_spatial/test_parameter_apply.py
    index 897c683155..167d7f62ef 100644
    --- a/testsuite/pytests/test_spatial/test_parameter_apply.py
    +++ b/testsuite/pytests/test_spatial/test_parameter_apply.py
    @@ -46,7 +46,7 @@ def test_parameter_apply_given_node_collection():
         assert param.apply(nc[::2]) == tuple(ref_positions[::2, 0])
     
         # raises for non-existing dimension
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             nest.spatial.pos.z.apply(nc)
     
     
    @@ -104,7 +104,7 @@ def test_parameter_apply_erroneous_position_specification():
         param = nest.spatial.distance
     
         # Too many dimensions
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             param.apply(source, [[1.0, 2.0, 3.0]])
     
         # Not a list of lists
    diff --git a/testsuite/pytests/test_tsodyks_synapse.py b/testsuite/pytests/test_tsodyks_synapse.py
    index bff1e45789..2ba131e0b2 100644
    --- a/testsuite/pytests/test_tsodyks_synapse.py
    +++ b/testsuite/pytests/test_tsodyks_synapse.py
    @@ -57,7 +57,7 @@ def test_tsodyks_depressing(self, synapse_model):
             nest.ResetKernel()
             nest.resolution = h
     
    -        sg = nest.Create("spike_generator", {"spike_times": input_train})
    +        sg = nest.Create("spike_generator", params={"spike_times": input_train})
             pn = nest.Create("parrot_neuron")
     
             neuron = nest.Create(
    @@ -185,7 +185,7 @@ def test_tsodyks_facilitating(self, synapse_model):
             # limits must be set BEFORE connecting any elements
             nest.SetKernelStatus({"resolution": h})
     
    -        sg = nest.Create("spike_generator", {"spike_times": input_train})
    +        sg = nest.Create("spike_generator", params={"spike_times": input_train})
             pn = nest.Create("parrot_neuron")
     
             neuron = nest.Create("iaf_psc_exp_htum")
    diff --git a/testsuite/pytests/test_visualization.py b/testsuite/pytests/test_visualization.py
    index acd214501c..0da2cf2e99 100644
    --- a/testsuite/pytests/test_visualization.py
    +++ b/testsuite/pytests/test_visualization.py
    @@ -103,7 +103,7 @@ def test_voltage_trace_from_device(self):
     
             nest.ResetKernel()
             nodes = nest.Create("iaf_psc_alpha", 2)
    -        pg = nest.Create("poisson_generator", 1, {"rate": 1000.0})
    +        pg = nest.Create("poisson_generator", params={"rate": 1000.0})
             device = nest.Create("voltmeter")
             nest.Connect(pg, nodes)
             nest.Connect(device, nodes)
    @@ -130,7 +130,7 @@ def test_voltage_trace_from_device(self):
     
         def spike_recorder_data_setup(self, to_file=False):
             nest.ResetKernel()
    -        pg = nest.Create("poisson_generator", {"rate": 1000.0})
    +        pg = nest.Create("poisson_generator", params={"rate": 1000.0})
             sr = nest.Create("spike_recorder")
             if to_file:
                 parrot = nest.Create("parrot_neuron")
    
    From ede368950133b5652e5b6cbf79dbccf5cf8da970 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Wed, 13 Sep 2023 15:52:32 +0200
    Subject: [PATCH 150/375] Running `isort --profile="black" --thirdparty="nest"
     .` and `black`
    
    ---
     bin/nest-server-mpi                           | 24 +++++++++----------
     build_support/check_copyright_headers.py      |  2 +-
     build_support/check_unused_names.py           |  2 +-
     build_support/generate_modelsmodule.py        |  3 +--
     doc/htmldoc/_ext/HoverXTooltip.py             |  3 ++-
     doc/htmldoc/_ext/VersionSyncRole.py           |  1 +
     doc/htmldoc/_ext/add_button_notebook.py       |  3 ++-
     doc/htmldoc/_ext/extract_api_functions.py     |  5 ++--
     doc/htmldoc/_ext/extractor_userdocs.py        | 13 +++++-----
     doc/htmldoc/_ext/list_examples.py             |  9 ++++---
     doc/htmldoc/clean_source_dirs.py              |  2 +-
     doc/htmldoc/conf.py                           | 10 ++++----
     doc/htmldoc/networks/scripts/connections.py   |  2 +-
     doc/htmldoc/resolve_includes.py               |  2 +-
     examples/BrodyHopfield.py                     |  2 +-
     examples/CampbellSiegert.py                   |  8 +++----
     examples/Potjans_2014/helpers.py              |  5 ++--
     examples/Potjans_2014/network.py              |  7 +++---
     examples/Potjans_2014/run_microcircuit.py     | 11 +++++----
     examples/aeif_cond_beta_multisynapse.py       |  2 +-
     examples/balancedneuron.py                    |  5 ++--
     examples/brette_gerstner_fig_2c.py            |  2 +-
     examples/brette_gerstner_fig_3d.py            |  2 +-
     examples/brunel_alpha_evolution_strategies.py |  4 ++--
     examples/brunel_alpha_nest.py                 |  7 +++---
     examples/brunel_delta_nest.py                 |  3 ++-
     examples/brunel_exp_multisynapse_nest.py      |  3 ++-
     examples/clopath_synapse_small_network.py     |  5 ++--
     examples/clopath_synapse_spike_pairing.py     |  2 +-
     .../receptors_and_current.py                  |  2 +-
     examples/compartmental_model/two_comps.py     |  2 +-
     examples/csa_example.py                       |  5 ++--
     examples/csa_spatial_example.py               |  2 +-
     examples/evaluate_quantal_stp_synapse.py      |  2 +-
     examples/evaluate_tsodyks2_synapse.py         |  2 +-
     examples/gap_junctions_inhibitory_network.py  |  2 +-
     examples/gap_junctions_two_neurons.py         |  2 +-
     examples/gif_cond_exp_multisynapse.py         |  3 +--
     examples/gif_pop_psc_exp.py                   |  4 ++--
     examples/gif_population.py                    |  2 +-
     examples/glif_cond_neuron.py                  |  4 ++--
     examples/glif_psc_neuron.py                   |  4 ++--
     examples/hh_phaseplane.py                     |  1 -
     examples/hh_psc_alpha.py                      |  2 +-
     examples/hpc_benchmark.py                     |  4 ++--
     examples/if_curve.py                          |  5 ++--
     examples/intrinsic_currents_spiking.py        |  2 +-
     examples/intrinsic_currents_subthreshold.py   |  2 +-
     examples/lin_rate_ipn_network.py              |  2 +-
     examples/mc_neuron.py                         |  2 +-
     examples/multimeter_file.py                   |  2 +-
     .../receiver_script.py                        |  3 ++-
     examples/one_neuron.py                        |  2 +-
     examples/one_neuron_with_noise.py             |  2 +-
     examples/plot_weight_matrices.py              |  4 ++--
     examples/pong/generate_gif.py                 | 11 ++++-----
     examples/pong/networks.py                     |  5 ++--
     examples/pong/run_simulations.py              |  5 ++--
     examples/precise_spiking.py                   |  3 +--
     examples/pulsepacket.py                       |  4 ++--
     examples/rate_neuron_dm.py                    |  2 +-
     examples/repeated_stimulation.py              |  2 +-
     examples/sensitivity_to_perturbation.py       |  3 +--
     examples/sinusoidal_gamma_generator.py        |  2 +-
     examples/sinusoidal_poisson_generator.py      |  2 +-
     examples/sonata_example/sonata_network.py     |  5 ++--
     examples/spatial/conncomp.py                  |  2 +-
     examples/spatial/conncon_sources.py           |  2 +-
     examples/spatial/conncon_targets.py           |  2 +-
     examples/spatial/connex.py                    |  2 +-
     examples/spatial/connex_ew.py                 |  2 +-
     examples/spatial/ctx_2n.py                    |  2 +-
     examples/spatial/gaussex.py                   |  2 +-
     examples/spatial/grid_iaf.py                  |  2 +-
     examples/spatial/grid_iaf_irr.py              |  2 +-
     examples/spatial/grid_iaf_oc.py               |  2 +-
     examples/spatial/test_3d.py                   |  2 +-
     examples/spatial/test_3d_exp.py               |  2 +-
     examples/spatial/test_3d_gauss.py             |  2 +-
     examples/store_restore_network.py             | 13 +++++-----
     examples/structural_plasticity.py             |  6 ++---
     examples/sudoku/helpers_sudoku.py             |  2 +-
     examples/sudoku/plot_progress.py              |  7 +++---
     examples/sudoku/sudoku_net.py                 |  4 ++--
     examples/sudoku/sudoku_solver.py              |  9 +++----
     examples/synapsecollection.py                 |  2 +-
     examples/testiaf.py                           |  2 +-
     examples/tsodyks_depressing.py                |  2 +-
     examples/tsodyks_facilitating.py              |  2 +-
     examples/twoneurons.py                        |  2 +-
     examples/urbanczik_synapse_example.py         |  2 +-
     examples/vinit_example.py                     |  2 +-
     pynest/nest/__init__.py                       | 11 +++++----
     pynest/nest/lib/hl_api_connection_helpers.py  |  5 ++--
     pynest/nest/lib/hl_api_connections.py         |  5 ++--
     pynest/nest/lib/hl_api_helper.py              |  3 ++-
     pynest/nest/lib/hl_api_info.py                |  5 ++--
     pynest/nest/lib/hl_api_models.py              |  2 +-
     pynest/nest/lib/hl_api_nodes.py               |  7 +++---
     pynest/nest/lib/hl_api_parallel_computing.py  |  2 +-
     pynest/nest/lib/hl_api_simulation.py          |  3 +--
     pynest/nest/lib/hl_api_sonata.py              |  1 -
     pynest/nest/lib/hl_api_spatial.py             |  1 -
     pynest/nest/lib/hl_api_types.py               |  2 +-
     pynest/nest/ll_api.py                         |  4 +---
     pynest/nest/ll_api_kernel_attributes.py       |  2 +-
     pynest/nest/logic/hl_api_logic.py             |  2 +-
     pynest/nest/math/hl_api_math.py               |  1 -
     pynest/nest/raster_plot.py                    |  2 +-
     pynest/nest/server/hl_api_server.py           | 20 ++++++----------
     pynest/nest/spatial/__init__.py               |  3 ++-
     pynest/nest/spatial/hl_api_spatial.py         |  4 ++--
     pynest/nest/visualization.py                  |  2 +-
     pynest/nestkernel_api.pxd                     |  7 +++---
     pynest/nestkernel_api.pyx                     | 19 +++++++--------
     testsuite/pytests/conftest.py                 |  3 +--
     testsuite/pytests/connect_test_base.py        |  5 ++--
     .../pytests/mpi/2/test_connect_arrays_mpi.py  |  1 +
     testsuite/pytests/mpi/2/test_issue_576.py     |  3 ++-
     .../mpi/4/test_consistent_local_vps.py        |  2 +-
     .../mpi/4/test_set_resolution_nthreads.py     |  1 -
     .../sli2py_connect/test_delay_check.py        |  2 +-
     ...test_getconnections_multiple_syn_models.py |  3 +--
     .../iaf_psc_alpha/test_iaf_psc_alpha.py       |  3 +--
     .../iaf_psc_alpha/test_iaf_psc_alpha_1to2.py  |  2 +-
     .../iaf_psc_alpha/test_iaf_psc_alpha_dc.py    |  4 ++--
     .../sli2py_neurons/test_add_freeze_thaw.py    |  3 +--
     .../sli2py_neurons/test_amat2_psc_exp.py      |  3 +--
     .../sli2py_neurons/test_mat2_psc_exp.py       |  3 +--
     .../sli2py_neurons/test_model_node_init.py    |  2 +-
     .../test_multisynapse_models.py               |  3 +--
     .../test_neurons_handle_multiplicity.py       |  3 +--
     .../pytests/sli2py_neurons/test_set_vm.py     |  3 ++-
     .../sli2py_other/test_corr_matrix_det.py      |  2 +-
     .../test_multiple_random_source_stepping.py   |  3 +--
     .../sli2py_other/test_multithreading.py       |  2 +-
     .../pytests/sli2py_other/test_set_tics.py     |  3 +--
     .../pytests/sli2py_recording/test_corr_det.py |  2 +-
     .../test_multimeter_offset.py                 |  3 +--
     .../test_multimeter_stepping.py               |  3 +--
     .../sli2py_regressions/test_issue_105.py      |  3 +--
     .../sli2py_regressions/test_issue_1140.py     |  3 +--
     .../sli2py_regressions/test_issue_1242.py     |  3 +--
     .../sli2py_regressions/test_issue_1305.py     |  3 +--
     .../sli2py_regressions/test_issue_1366.py     |  3 +--
     .../sli2py_regressions/test_issue_1640.py     |  3 +--
     .../sli2py_regressions/test_issue_2282.py     |  3 +--
     .../sli2py_regressions/test_issue_2629.py     |  3 +--
     .../test_issue_2636_2795.py                   |  3 +--
     .../sli2py_regressions/test_issue_2637.py     |  3 +--
     .../sli2py_regressions/test_issue_264.py      |  3 +--
     .../sli2py_regressions/test_issue_351.py      |  3 +--
     .../sli2py_regressions/test_issue_368.py      |  3 +--
     .../sli2py_regressions/test_issue_410.py      |  3 +--
     .../sli2py_regressions/test_issue_521.py      |  3 +--
     .../sli2py_regressions/test_issue_77.py       |  3 +--
     .../sli2py_regressions/test_ticket_459.py     |  3 +--
     .../sli2py_regressions/test_ticket_754.py     |  3 +--
     .../sli2py_stimulating/test_ac_generator.py   |  5 ++--
     .../test_noise_generator.py                   |  2 +-
     .../test_pulsepacket_generator.py             |  3 +--
     .../test_sinusoidal_poisson_generator.py      |  3 +--
     .../test_spike_generator.py                   |  2 +-
     .../test_spike_poisson_ps.py                  |  3 +--
     .../test_cont_delay_synapse.py                |  2 +-
     .../sli2py_synapses/test_hh_cond_exp_traub.py |  2 +-
     testsuite/pytests/test_aeif_lsodar.py         |  6 ++---
     testsuite/pytests/test_changing_tic_base.py   |  1 +
     testsuite/pytests/test_clopath_synapse.py     |  1 +
     testsuite/pytests/test_compartmental_model.py |  4 ++--
     testsuite/pytests/test_connect_all_to_all.py  |  6 ++---
     .../test_connect_array_fixed_indegree.py      |  1 +
     .../test_connect_array_fixed_outdegree.py     |  2 +-
     testsuite/pytests/test_connect_arrays.py      |  2 +-
     testsuite/pytests/test_connect_conngen.py     |  1 +
     .../pytests/test_connect_fixed_indegree.py    |  6 ++---
     .../pytests/test_connect_fixed_outdegree.py   |  6 ++---
     .../test_connect_fixed_total_number.py        |  6 ++---
     .../pytests/test_connect_node_collection.py   |  3 +--
     testsuite/pytests/test_connect_one_to_one.py  |  4 ++--
     .../test_connect_pairwise_bernoulli.py        |  6 ++---
     ...st_connect_symmetric_pairwise_bernoulli.py |  6 ++---
     .../test_correlospinmatrix_detector.py        |  2 +-
     .../test_current_recording_generators.py      |  3 ++-
     testsuite/pytests/test_erfc_neuron.py         |  1 +
     testsuite/pytests/test_errors.py              |  1 +
     testsuite/pytests/test_events.py              |  1 +
     testsuite/pytests/test_facetshw_stdp.py       |  3 ++-
     testsuite/pytests/test_get_connections.py     |  3 +--
     testsuite/pytests/test_getconnections.py      |  1 +
     testsuite/pytests/test_getnodes.py            |  1 +
     testsuite/pytests/test_glif_cond.py           |  1 +
     testsuite/pytests/test_glif_psc.py            |  1 +
     testsuite/pytests/test_helper_functions.py    |  1 +
     testsuite/pytests/test_iaf_ps_psp_accuracy.py |  5 ++--
     .../test_iaf_ps_psp_poisson_accuracy.py       |  5 ++--
     testsuite/pytests/test_iaf_singularity.py     |  2 +-
     testsuite/pytests/test_json.py                |  1 +
     testsuite/pytests/test_labeled_synapses.py    |  1 +
     testsuite/pytests/test_mc_neuron.py           |  1 +
     testsuite/pytests/test_mip_corrdet.py         |  2 +-
     testsuite/pytests/test_multimeter.py          |  3 +--
     testsuite/pytests/test_multiple_synapses.py   |  1 +
     testsuite/pytests/test_nodeParametrization.py |  5 ++--
     .../test_node_collection_indexing_slicing.py  |  3 +--
     .../test_node_collection_operations.py        |  3 +--
     .../test_node_collection_to_from_object.py    |  3 +--
     testsuite/pytests/test_onetooneconnect.py     |  1 +
     testsuite/pytests/test_parameter_operators.py |  3 ++-
     testsuite/pytests/test_parrot_neuron.py       |  5 ++--
     testsuite/pytests/test_parrot_neuron_ps.py    |  5 ++--
     .../test_poisson_generator_campbell_alpha.py  |  2 +-
     .../pytests/test_poisson_generator_ps.py      |  2 +-
     .../test_poisson_generator_rate_change.py     |  5 ++--
     .../pytests/test_poisson_ps_intervals.py      |  3 +--
     .../pytests/test_poisson_ps_min_interval.py   |  3 +--
     testsuite/pytests/test_pp_psc_delta.py        |  1 +
     testsuite/pytests/test_pp_psc_delta_stdp.py   |  1 +
     testsuite/pytests/test_quantal_stp_synapse.py |  3 ++-
     testsuite/pytests/test_random123.py           |  2 +-
     testsuite/pytests/test_random_parameter.py    |  1 +
     testsuite/pytests/test_rate_copy_model.py     |  3 ++-
     .../test_rate_instantaneous_and_delayed.py    |  3 ++-
     testsuite/pytests/test_rate_neuron.py         |  3 ++-
     .../pytests/test_rate_neuron_communication.py |  3 ++-
     .../pytests/test_recording_backend_ascii.py   |  1 +
     .../pytests/test_recording_backend_memory.py  |  1 +
     testsuite/pytests/test_recording_backends.py  |  1 +
     testsuite/pytests/test_refractory.py          |  3 +--
     .../pytests/test_regression_issue-1034.py     |  3 ++-
     .../pytests/test_regression_issue-1409.py     |  3 ++-
     .../pytests/test_regression_issue-2069.py     |  3 ++-
     .../pytests/test_regression_issue-2125.py     |  3 ++-
     .../pytests/test_regression_issue-2480.py     |  3 ++-
     testsuite/pytests/test_siegert_neuron.py      |  3 ++-
     testsuite/pytests/test_sonata.py              |  3 +--
     .../pytests/test_sp/test_conn_builder.py      |  3 ++-
     testsuite/pytests/test_sp/test_disconnect.py  |  3 ++-
     .../test_sp/test_disconnect_multiple.py       |  3 ++-
     .../test_sp/test_enable_multithread.py        |  2 +-
     .../pytests/test_sp/test_growth_curves.py     |  7 +++---
     .../test_sp/test_sp_autapses_multapses.py     |  4 ++--
     testsuite/pytests/test_sp/test_sp_manager.py  |  3 ++-
     .../pytests/test_sp/test_synaptic_elements.py |  3 ++-
     .../test_sp/test_update_synaptic_elements.py  |  3 ++-
     .../test_SynapseCollection_distance.py        |  5 ++--
     testsuite/pytests/test_spatial/test_basics.py |  1 +
     .../test_spatial/test_connect_layers.py       |  2 +-
     .../test_spatial/test_connect_sliced.py       |  1 +
     .../test_connection_with_elliptical_mask.py   |  1 +
     .../test_spatial/test_create_spatial.py       |  1 +
     .../pytests/test_spatial/test_distance.py     |  3 +--
     .../pytests/test_spatial/test_dumping.py      |  3 ++-
     .../test_spatial/test_layerNodeCollection.py  |  1 +
     .../test_spatial/test_layer_get_set.py        |  1 +
     .../test_spatial/test_parameter_apply.py      |  3 +--
     .../pytests/test_spatial/test_plotting.py     |  2 +-
     .../test_spatial/test_rotated_rect_mask.py    |  1 +
     ..._selection_function_and_elliptical_mask.py |  1 +
     .../test_spatial_distributions.py             |  9 ++++---
     .../pytests/test_spatial/test_weight_delay.py |  3 +--
     .../pytests/test_spike_train_injector.py      |  3 ++-
     testsuite/pytests/test_spike_transmission.py  |  1 -
     testsuite/pytests/test_split_simulation.py    |  1 +
     testsuite/pytests/test_status.py              |  1 +
     testsuite/pytests/test_stdp_nn_synapses.py    |  4 ++--
     testsuite/pytests/test_stdp_pl_synapse_hom.py |  5 ++--
     testsuite/pytests/test_stdp_synapse.py        |  3 ++-
     .../pytests/test_stdp_triplet_synapse.py      |  3 ++-
     testsuite/pytests/test_step_rate_generator.py |  3 ++-
     testsuite/pytests/test_synapsecollection.py   |  1 +
     testsuite/pytests/test_threads.py             |  1 +
     testsuite/pytests/test_tsodyks2_synapse.py    |  5 ++--
     testsuite/pytests/test_urbanczik_synapse.py   |  1 +
     testsuite/pytests/test_visualization.py       |  3 ++-
     .../pytests/test_vogels_sprekeler_synapse.py  |  3 ++-
     testsuite/pytests/test_weight_recorder.py     |  3 +--
     testsuite/pytests/test_weights_as_lists.py    |  1 +
     testsuite/pytests/utilities/testsimulation.py |  3 +--
     testsuite/pytests/utilities/testutil.py       |  3 ++-
     testsuite/regressiontests/issue-1703.py       |  4 ++--
     testsuite/regressiontests/issue-779-1016.py   |  4 ++--
     testsuite/summarize_tests.py                  |  2 +-
     283 files changed, 464 insertions(+), 453 deletions(-)
    
    diff --git a/bin/nest-server-mpi b/bin/nest-server-mpi
    index 2eb46c406d..900d15e20b 100755
    --- a/bin/nest-server-mpi
    +++ b/bin/nest-server-mpi
    @@ -16,17 +16,16 @@ Options:
     from docopt import docopt
     from mpi4py import MPI
     
    -if __name__ == '__main__':
    +if __name__ == "__main__":
         opt = docopt(__doc__)
     
    -import time
    +import os
     import sys
    +import time
     
     import nest
     import nest.server
     
    -import os
    -
     HOST = os.getenv("NEST_SERVER_HOST", "127.0.0.1")
     PORT = os.getenv("NEST_SERVER_PORT", "52425")
     
    @@ -35,34 +34,33 @@ rank = comm.Get_rank()
     
     
     def log(call_name, msg):
    -    msg = f'==> WORKER {rank}/{time.time():.7f} ({call_name}): {msg}'
    +    msg = f"==> WORKER {rank}/{time.time():.7f} ({call_name}): {msg}"
         print(msg, flush=True)
     
     
     if rank == 0:
         print("==> Starting NEST Server Master on rank 0", flush=True)
         nest.server.set_mpi_comm(comm)
    -    nest.server.run_mpi_app(host=opt.get('--host', HOST), port=opt.get('--port', PORT))
    +    nest.server.run_mpi_app(host=opt.get("--host", HOST), port=opt.get("--port", PORT))
     
     else:
         print(f"==> Starting NEST Server Worker on rank {rank}", flush=True)
         nest.server.set_mpi_comm(comm)
         while True:
    -
    -        log('spinwait', 'waiting for call bcast')
    +        log("spinwait", "waiting for call bcast")
             call_name = comm.bcast(None, root=0)
     
    -        log(call_name, 'received call bcast, waiting for data bcast')
    +        log(call_name, "received call bcast, waiting for data bcast")
             data = comm.bcast(None, root=0)
     
    -        log(call_name, f'received data bcast, data={data}')
    +        log(call_name, f"received data bcast, data={data}")
             args, kwargs = data
     
    -        if call_name == 'exec':
    +        if call_name == "exec":
                 response = nest.server.do_exec(args, kwargs)
             else:
                 call, args, kwargs = nest.server.nestify(call_name, args, kwargs)
    -            log(call_name, f'local call, args={args}, kwargs={kwargs}')
    +            log(call_name, f"local call, args={args}, kwargs={kwargs}")
     
                 # The following exception handler is useful if an error
                 # occurs simulataneously on all processes. If only a
    @@ -74,5 +72,5 @@ else:
                 except Exception:
                     continue
     
    -        log(call_name, f'sending reponse gather, data={response}')
    +        log(call_name, f"sending reponse gather, data={response}")
             comm.gather(nest.serializable(response), root=0)
    diff --git a/build_support/check_copyright_headers.py b/build_support/check_copyright_headers.py
    index 0d23d5e4c9..b54eaec464 100644
    --- a/build_support/check_copyright_headers.py
    +++ b/build_support/check_copyright_headers.py
    @@ -40,8 +40,8 @@
     
     
     import os
    -import sys
     import re
    +import sys
     
     
     def eprint(*args, **kwargs):
    diff --git a/build_support/check_unused_names.py b/build_support/check_unused_names.py
    index 169156bc65..2dc2675498 100644
    --- a/build_support/check_unused_names.py
    +++ b/build_support/check_unused_names.py
    @@ -40,8 +40,8 @@
     """
     
     import os
    -import sys
     import re
    +import sys
     from subprocess import check_output
     
     
    diff --git a/build_support/generate_modelsmodule.py b/build_support/generate_modelsmodule.py
    index 09d1c8581a..7540499a29 100644
    --- a/build_support/generate_modelsmodule.py
    +++ b/build_support/generate_modelsmodule.py
    @@ -26,10 +26,9 @@
     compiled by CMake.
     """
     
    +import argparse
     import os
     import sys
    -import argparse
    -
     from pathlib import Path
     from textwrap import dedent
     
    diff --git a/doc/htmldoc/_ext/HoverXTooltip.py b/doc/htmldoc/_ext/HoverXTooltip.py
    index 2464c6df77..474baf05a9 100644
    --- a/doc/htmldoc/_ext/HoverXTooltip.py
    +++ b/doc/htmldoc/_ext/HoverXTooltip.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import re
     import os
    +import re
     import sys
    +
     from docutils import nodes
     from docutils.parsers.rst import Directive, directives
     
    diff --git a/doc/htmldoc/_ext/VersionSyncRole.py b/doc/htmldoc/_ext/VersionSyncRole.py
    index c30fdb9c06..0f52dc51ce 100644
    --- a/doc/htmldoc/_ext/VersionSyncRole.py
    +++ b/doc/htmldoc/_ext/VersionSyncRole.py
    @@ -21,6 +21,7 @@
     
     import json
     from pathlib import Path
    +
     from docutils import nodes
     
     
    diff --git a/doc/htmldoc/_ext/add_button_notebook.py b/doc/htmldoc/_ext/add_button_notebook.py
    index 5813723532..7375f0a2db 100644
    --- a/doc/htmldoc/_ext/add_button_notebook.py
    +++ b/doc/htmldoc/_ext/add_button_notebook.py
    @@ -22,9 +22,10 @@
     import glob
     import os
     import sys
    -from sphinx.application import Sphinx
     from pathlib import Path
     
    +from sphinx.application import Sphinx
    +
     
     def add_button_to_examples(app, env, docnames):
         """Find all examples and include a link to launch notebook.
    diff --git a/doc/htmldoc/_ext/extract_api_functions.py b/doc/htmldoc/_ext/extract_api_functions.py
    index 04bd8f2e60..2a39cb43cf 100644
    --- a/doc/htmldoc/_ext/extract_api_functions.py
    +++ b/doc/htmldoc/_ext/extract_api_functions.py
    @@ -18,12 +18,11 @@
     #
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -import os
     import ast
    +import glob
     import json
    +import os
     import re
    -import glob
    -
     
     """
     Generate a JSON dictionary that stores the module name as key and corresponding
    diff --git a/doc/htmldoc/_ext/extractor_userdocs.py b/doc/htmldoc/_ext/extractor_userdocs.py
    index 39146b1059..160982a645 100644
    --- a/doc/htmldoc/_ext/extractor_userdocs.py
    +++ b/doc/htmldoc/_ext/extractor_userdocs.py
    @@ -19,18 +19,17 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import re
    -from tqdm import tqdm
    -from pprint import pformat
    -from math import comb
    -
    -import os
     import glob
     import json
    -from itertools import chain, combinations
     import logging
    +import os
    +import re
     from collections import Counter
    +from itertools import chain, combinations
    +from math import comb
    +from pprint import pformat
     
    +from tqdm import tqdm
     
     logging.basicConfig(level=logging.WARNING)
     log = logging.getLogger(__name__)
    diff --git a/doc/htmldoc/_ext/list_examples.py b/doc/htmldoc/_ext/list_examples.py
    index 95dcec0840..0775fc5735 100644
    --- a/doc/htmldoc/_ext/list_examples.py
    +++ b/doc/htmldoc/_ext/list_examples.py
    @@ -19,15 +19,14 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    +import glob
    +import logging
    +import os
    +
     from docutils import nodes
     from docutils.parsers.rst import Directive, Parser
    -
     from sphinx.application import Sphinx
     from sphinx.util.docutils import SphinxDirective
    -import os
    -import glob
    -
    -import logging
     
     logging.basicConfig(level=logging.WARNING)
     log = logging.getLogger(__name__)
    diff --git a/doc/htmldoc/clean_source_dirs.py b/doc/htmldoc/clean_source_dirs.py
    index 1e4885385e..7a499e3d7d 100644
    --- a/doc/htmldoc/clean_source_dirs.py
    +++ b/doc/htmldoc/clean_source_dirs.py
    @@ -19,8 +19,8 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     import os
    -import shutil
     import pathlib
    +import shutil
     from glob import glob
     
     for dir_ in ("auto_examples", "models"):
    diff --git a/doc/htmldoc/conf.py b/doc/htmldoc/conf.py
    index b848becd7b..4a86465583 100644
    --- a/doc/htmldoc/conf.py
    +++ b/doc/htmldoc/conf.py
    @@ -20,22 +20,20 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     
    -import sys
    -import os
     import json
    +import os
     import subprocess
    -
    -from urllib.request import urlretrieve
    -
    +import sys
     from pathlib import Path
     from shutil import copyfile
    +from urllib.request import urlretrieve
     
     # Add the extension modules to the path
     extension_module_dir = os.path.abspath("./_ext")
     sys.path.append(extension_module_dir)
     
    -from extractor_userdocs import ExtractUserDocs, relative_glob  # noqa
     from extract_api_functions import ExtractPyNESTAPIS  # noqa
    +from extractor_userdocs import ExtractUserDocs, relative_glob  # noqa
     
     repo_root_dir = os.path.abspath("../..")
     pynest_dir = os.path.join(repo_root_dir, "pynest")
    diff --git a/doc/htmldoc/networks/scripts/connections.py b/doc/htmldoc/networks/scripts/connections.py
    index b420a30cb1..ae96d82c27 100644
    --- a/doc/htmldoc/networks/scripts/connections.py
    +++ b/doc/htmldoc/networks/scripts/connections.py
    @@ -21,8 +21,8 @@
     
     # create connectivity figures for spatial manual
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     # seed NumPy RNG to ensure identical results for runs with random placement
    diff --git a/doc/htmldoc/resolve_includes.py b/doc/htmldoc/resolve_includes.py
    index 1133262e6a..20badc28b3 100644
    --- a/doc/htmldoc/resolve_includes.py
    +++ b/doc/htmldoc/resolve_includes.py
    @@ -32,10 +32,10 @@
     
     """
     
    +import glob
     import os
     import re
     import sys
    -import glob
     from fileinput import FileInput
     
     pattern = re.compile("^.. include:: (.*)")
    diff --git a/examples/BrodyHopfield.py b/examples/BrodyHopfield.py
    index c48de4c7cc..66c1357a91 100755
    --- a/examples/BrodyHopfield.py
    +++ b/examples/BrodyHopfield.py
    @@ -45,9 +45,9 @@
     #################################################################################
     # First, we import all necessary modules for simulation, analysis, and plotting.
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.raster_plot
    -import matplotlib.pyplot as plt
     
     ###############################################################################
     # Second, the simulation parameters are assigned to variables.
    diff --git a/examples/CampbellSiegert.py b/examples/CampbellSiegert.py
    index 1eed125df9..fd34edcf6d 100755
    --- a/examples/CampbellSiegert.py
    +++ b/examples/CampbellSiegert.py
    @@ -51,12 +51,10 @@
     # First, we import all necessary modules for simulation and analysis. Scipy
     # should be imported before nest.
     
    -from scipy.special import erf
    -from scipy.optimize import fmin
    -
    -import numpy as np
    -
     import nest
    +import numpy as np
    +from scipy.optimize import fmin
    +from scipy.special import erf
     
     ###############################################################################
     # We first set the parameters of neurons, noise and the simulation. First
    diff --git a/examples/Potjans_2014/helpers.py b/examples/Potjans_2014/helpers.py
    index 4e835a37c2..92a53b624b 100644
    --- a/examples/Potjans_2014/helpers.py
    +++ b/examples/Potjans_2014/helpers.py
    @@ -27,10 +27,11 @@
     
     """
     
    -from matplotlib.patches import Polygon
    -import matplotlib.pyplot as plt
     import os
    +
    +import matplotlib.pyplot as plt
     import numpy as np
    +from matplotlib.patches import Polygon
     
     if "DISPLAY" not in os.environ:
         import matplotlib
    diff --git a/examples/Potjans_2014/network.py b/examples/Potjans_2014/network.py
    index 5c6c9a47ff..a2c59b9778 100644
    --- a/examples/Potjans_2014/network.py
    +++ b/examples/Potjans_2014/network.py
    @@ -28,11 +28,12 @@
     """
     
     import os
    -import numpy as np
    -import nest
    -import helpers
     import warnings
     
    +import helpers
    +import nest
    +import numpy as np
    +
     
     class Network:
         """Provides functions to setup NEST, to create and connect all nodes of
    diff --git a/examples/Potjans_2014/run_microcircuit.py b/examples/Potjans_2014/run_microcircuit.py
    index 1c43af95c6..a6c75cad3a 100644
    --- a/examples/Potjans_2014/run_microcircuit.py
    +++ b/examples/Potjans_2014/run_microcircuit.py
    @@ -30,13 +30,14 @@
     ###############################################################################
     # Import the necessary modules and start the time measurements.
     
    -from stimulus_params import stim_dict
    -from network_params import net_dict
    -from sim_params import sim_dict
    -import network
    +import time
    +
     import nest
    +import network
     import numpy as np
    -import time
    +from network_params import net_dict
    +from sim_params import sim_dict
    +from stimulus_params import stim_dict
     
     time_start = time.time()
     
    diff --git a/examples/aeif_cond_beta_multisynapse.py b/examples/aeif_cond_beta_multisynapse.py
    index eb7293553b..e398d92db0 100644
    --- a/examples/aeif_cond_beta_multisynapse.py
    +++ b/examples/aeif_cond_beta_multisynapse.py
    @@ -25,9 +25,9 @@
     
     """
     
    +import matplotlib.pyplot as plt
     import nest
     import numpy as np
    -import matplotlib.pyplot as plt
     
     neuron = nest.Create(
         "aeif_cond_beta_multisynapse",
    diff --git a/examples/balancedneuron.py b/examples/balancedneuron.py
    index c61c005fc2..5534501065 100644
    --- a/examples/balancedneuron.py
    +++ b/examples/balancedneuron.py
    @@ -46,11 +46,10 @@
     # First, we import all necessary modules for simulation, analysis and
     # plotting. Scipy should be imported before nest.
     
    -from scipy.optimize import bisect
    -
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
    +from scipy.optimize import bisect
     
     ###############################################################################
     # Additionally, we set the verbosity using ``set_verbosity`` to
    diff --git a/examples/brette_gerstner_fig_2c.py b/examples/brette_gerstner_fig_2c.py
    index 89f0c88dec..085ae7f77c 100755
    --- a/examples/brette_gerstner_fig_2c.py
    +++ b/examples/brette_gerstner_fig_2c.py
    @@ -38,9 +38,9 @@
     """
     
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
     
     nest.ResetKernel()
     
    diff --git a/examples/brette_gerstner_fig_3d.py b/examples/brette_gerstner_fig_3d.py
    index 9c991c43b8..b2002e04d7 100755
    --- a/examples/brette_gerstner_fig_3d.py
    +++ b/examples/brette_gerstner_fig_3d.py
    @@ -38,9 +38,9 @@
     
     """
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
     
     nest.ResetKernel()
     
    diff --git a/examples/brunel_alpha_evolution_strategies.py b/examples/brunel_alpha_evolution_strategies.py
    index 13254d0b35..d0a5839d54 100644
    --- a/examples/brunel_alpha_evolution_strategies.py
    +++ b/examples/brunel_alpha_evolution_strategies.py
    @@ -77,10 +77,10 @@
     """
     
     import matplotlib.pyplot as plt
    -from matplotlib.patches import Ellipse
    +import nest
     import numpy as np
     import scipy.special as sp
    -import nest
    +from matplotlib.patches import Ellipse
     
     ###############################################################################
     # Analysis
    diff --git a/examples/brunel_alpha_nest.py b/examples/brunel_alpha_nest.py
    index 05f9cdd53a..cae0a6ca1e 100755
    --- a/examples/brunel_alpha_nest.py
    +++ b/examples/brunel_alpha_nest.py
    @@ -49,13 +49,12 @@
     # should be imported before nest.
     
     import time
    -import numpy as np
    -import scipy.special as sp
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.raster_plot
    -import matplotlib.pyplot as plt
    -
    +import numpy as np
    +import scipy.special as sp
     
     ###############################################################################
     # Definition of functions used in this example. First, define the `Lambert W`
    diff --git a/examples/brunel_delta_nest.py b/examples/brunel_delta_nest.py
    index 7c8c411211..6d8d27bd69 100755
    --- a/examples/brunel_delta_nest.py
    +++ b/examples/brunel_delta_nest.py
    @@ -45,9 +45,10 @@
     # Import all necessary modules for simulation, analysis and plotting.
     
     import time
    +
    +import matplotlib.pyplot as plt
     import nest
     import nest.raster_plot
    -import matplotlib.pyplot as plt
     
     nest.ResetKernel()
     
    diff --git a/examples/brunel_exp_multisynapse_nest.py b/examples/brunel_exp_multisynapse_nest.py
    index 87b443bb73..bcd5eec8ca 100644
    --- a/examples/brunel_exp_multisynapse_nest.py
    +++ b/examples/brunel_exp_multisynapse_nest.py
    @@ -57,9 +57,10 @@
     # Import all necessary modules for simulation, analysis and plotting.
     
     import time
    +
    +import matplotlib.pyplot as plt
     import nest
     import nest.raster_plot
    -import matplotlib.pyplot as plt
     
     nest.ResetKernel()
     
    diff --git a/examples/clopath_synapse_small_network.py b/examples/clopath_synapse_small_network.py
    index c1be8925ea..eda5541efd 100644
    --- a/examples/clopath_synapse_small_network.py
    +++ b/examples/clopath_synapse_small_network.py
    @@ -41,10 +41,11 @@
            Nature Neuroscience 13:3, 344--352
     """
     
    +import random
    +
    +import matplotlib.pyplot as plt
     import nest
     import numpy as np
    -import matplotlib.pyplot as plt
    -import random
     
     ##############################################################################
     # Set the parameters
    diff --git a/examples/clopath_synapse_spike_pairing.py b/examples/clopath_synapse_spike_pairing.py
    index ee762b8a45..33b11c3586 100644
    --- a/examples/clopath_synapse_spike_pairing.py
    +++ b/examples/clopath_synapse_spike_pairing.py
    @@ -38,9 +38,9 @@
            Nature Neuroscience 13:3, 344--352
     """
     
    -import numpy as np
     import matplotlib.pyplot as plt
     import nest
    +import numpy as np
     
     ##############################################################################
     # First we specify the neuron parameters. To enable voltage dependent
    diff --git a/examples/compartmental_model/receptors_and_current.py b/examples/compartmental_model/receptors_and_current.py
    index 38d5fc6211..b61e0a1b8d 100644
    --- a/examples/compartmental_model/receptors_and_current.py
    +++ b/examples/compartmental_model/receptors_and_current.py
    @@ -29,8 +29,8 @@
     :Authors: WAM Wybo
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     nest.ResetKernel()
     
    diff --git a/examples/compartmental_model/two_comps.py b/examples/compartmental_model/two_comps.py
    index 0cb1c75ac5..d6f7218b6f 100644
    --- a/examples/compartmental_model/two_comps.py
    +++ b/examples/compartmental_model/two_comps.py
    @@ -31,8 +31,8 @@
     :Authors: WAM Wybo
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     nest.ResetKernel()
     
    diff --git a/examples/csa_example.py b/examples/csa_example.py
    index a3f81cd57e..3a87ff82c6 100644
    --- a/examples/csa_example.py
    +++ b/examples/csa_example.py
    @@ -47,10 +47,9 @@
     ###############################################################################
     # First, we import all necessary modules for simulation and plotting.
     
    -import nest
    -from nest import voltage_trace
    -from nest import visualization
     import matplotlib.pyplot as plt
    +import nest
    +from nest import visualization, voltage_trace
     
     ###############################################################################
     # Next, we check for the availability of the CSA Python module. If it does
    diff --git a/examples/csa_spatial_example.py b/examples/csa_spatial_example.py
    index e871716567..64a0e1945c 100644
    --- a/examples/csa_spatial_example.py
    +++ b/examples/csa_spatial_example.py
    @@ -48,8 +48,8 @@
     ###############################################################################
     # First, we import all necessary modules.
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     ###############################################################################
     # Next, we check for the availability of the CSA Python module. If it does
    diff --git a/examples/evaluate_quantal_stp_synapse.py b/examples/evaluate_quantal_stp_synapse.py
    index d8331e6d32..0d02d59acf 100644
    --- a/examples/evaluate_quantal_stp_synapse.py
    +++ b/examples/evaluate_quantal_stp_synapse.py
    @@ -70,8 +70,8 @@
     
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     ################################################################################
     # On average, the ``quantal_stp_synapse`` converges to the ``tsodyks2_synapse``,
    diff --git a/examples/evaluate_tsodyks2_synapse.py b/examples/evaluate_tsodyks2_synapse.py
    index 02830107a2..d458fc1772 100644
    --- a/examples/evaluate_tsodyks2_synapse.py
    +++ b/examples/evaluate_tsodyks2_synapse.py
    @@ -70,9 +70,9 @@
            http://dx.doi.org/10.1016/S0893-6080(01)00144-7
     """
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
     
     nest.ResetKernel()
     
    diff --git a/examples/gap_junctions_inhibitory_network.py b/examples/gap_junctions_inhibitory_network.py
    index 346ea3e609..18a0d0d9a0 100644
    --- a/examples/gap_junctions_inhibitory_network.py
    +++ b/examples/gap_junctions_inhibitory_network.py
    @@ -45,8 +45,8 @@
            Neuroinform. http://dx.doi.org/10.3389/neuro.11.012.2008
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy
     
     n_neuron = 500
    diff --git a/examples/gap_junctions_two_neurons.py b/examples/gap_junctions_two_neurons.py
    index 68d7ca902c..8a4fab0621 100644
    --- a/examples/gap_junctions_two_neurons.py
    +++ b/examples/gap_junctions_two_neurons.py
    @@ -30,8 +30,8 @@
     
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy
     
     nest.ResetKernel()
    diff --git a/examples/gif_cond_exp_multisynapse.py b/examples/gif_cond_exp_multisynapse.py
    index ebbf83bd6b..0cadf7408d 100644
    --- a/examples/gif_cond_exp_multisynapse.py
    +++ b/examples/gif_cond_exp_multisynapse.py
    @@ -25,9 +25,8 @@
     
     """
     
    -import numpy as np
    -
     import nest
    +import numpy as np
     
     neuron = nest.Create("gif_cond_exp_multisynapse", params={"E_rev": [0.0, -85.0], "tau_syn": [4.0, 8.0]})
     
    diff --git a/examples/gif_pop_psc_exp.py b/examples/gif_pop_psc_exp.py
    index a447d20143..8c6f101d07 100644
    --- a/examples/gif_pop_psc_exp.py
    +++ b/examples/gif_pop_psc_exp.py
    @@ -45,11 +45,11 @@
     """
     
     
    -# Loading the necessary modules:
    -import numpy as np
     import matplotlib.pyplot as plt
     import nest
     
    +# Loading the necessary modules:
    +import numpy as np
     
     ###############################################################################
     # We first set the parameters of the microscopic model:
    diff --git a/examples/gif_population.py b/examples/gif_population.py
    index 3da1833e54..9f73dbccdb 100644
    --- a/examples/gif_population.py
    +++ b/examples/gif_population.py
    @@ -50,9 +50,9 @@
     ###############################################################################
     # Import all necessary modules for simulation and plotting.
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.raster_plot
    -import matplotlib.pyplot as plt
     
     nest.ResetKernel()
     
    diff --git a/examples/glif_cond_neuron.py b/examples/glif_cond_neuron.py
    index 682dd1a6ff..008a61f70e 100644
    --- a/examples/glif_cond_neuron.py
    +++ b/examples/glif_cond_neuron.py
    @@ -38,9 +38,9 @@
     # First, we import all necessary modules to simulate, analyze and plot this
     # example.
     
    -import nest
    -import matplotlib.pyplot as plt
     import matplotlib.gridspec as gridspec
    +import matplotlib.pyplot as plt
    +import nest
     
     ##############################################################################
     # We initialize NEST and set the simulation resolution.
    diff --git a/examples/glif_psc_neuron.py b/examples/glif_psc_neuron.py
    index b1278c736d..1893a167e7 100644
    --- a/examples/glif_psc_neuron.py
    +++ b/examples/glif_psc_neuron.py
    @@ -37,9 +37,9 @@
     # First, we import all necessary modules to simulate, analyze and plot this
     # example.
     
    -import nest
    -import matplotlib.pyplot as plt
     import matplotlib.gridspec as gridspec
    +import matplotlib.pyplot as plt
    +import nest
     
     ##############################################################################
     # We initialize NEST and set the simulation resolution.
    diff --git a/examples/hh_phaseplane.py b/examples/hh_phaseplane.py
    index 1a109a522a..cd0d2051d9 100644
    --- a/examples/hh_phaseplane.py
    +++ b/examples/hh_phaseplane.py
    @@ -42,7 +42,6 @@
     import numpy as np
     from matplotlib import pyplot as plt
     
    -
     amplitude = 100.0  # Set externally applied current amplitude in pA
     dt = 0.1  # simulation step length [ms]
     
    diff --git a/examples/hh_psc_alpha.py b/examples/hh_psc_alpha.py
    index 7537f127cf..e1f272a8d5 100644
    --- a/examples/hh_psc_alpha.py
    +++ b/examples/hh_psc_alpha.py
    @@ -31,9 +31,9 @@
     does not yet check correctness of synaptic response.
     """
     
    +import matplotlib.pyplot as plt
     import nest
     import numpy as np
    -import matplotlib.pyplot as plt
     
     nest.set_verbosity("M_WARNING")
     nest.ResetKernel()
    diff --git a/examples/hpc_benchmark.py b/examples/hpc_benchmark.py
    index b53073a10d..32acf595a3 100644
    --- a/examples/hpc_benchmark.py
    +++ b/examples/hpc_benchmark.py
    @@ -90,14 +90,14 @@
     
     """
     
    -import numpy as np
     import os
     import sys
     import time
    -import scipy.special as sp
     
     import nest
     import nest.raster_plot
    +import numpy as np
    +import scipy.special as sp
     
     M_INFO = 10
     M_ERROR = 30
    diff --git a/examples/if_curve.py b/examples/if_curve.py
    index d9ffba43c0..fb0b9d1d27 100644
    --- a/examples/if_curve.py
    +++ b/examples/if_curve.py
    @@ -38,10 +38,11 @@
     
     """
     
    -import numpy
    -import nest
     import shelve
     
    +import nest
    +import numpy
    +
     ###############################################################################
     # Here we define which model and the neuron parameters to use for measuring
     # the transfer function.
    diff --git a/examples/intrinsic_currents_spiking.py b/examples/intrinsic_currents_spiking.py
    index ae65c81bda..8ca84fe822 100644
    --- a/examples/intrinsic_currents_spiking.py
    +++ b/examples/intrinsic_currents_spiking.py
    @@ -51,8 +51,8 @@
     ###############################################################################
     # We imported all necessary modules for simulation, analysis and plotting.
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     ###############################################################################
     # Additionally, we set the verbosity using ``set_verbosity`` to suppress info
    diff --git a/examples/intrinsic_currents_subthreshold.py b/examples/intrinsic_currents_subthreshold.py
    index d9891597d8..a4d2e061f8 100644
    --- a/examples/intrinsic_currents_subthreshold.py
    +++ b/examples/intrinsic_currents_subthreshold.py
    @@ -50,8 +50,8 @@
     ###############################################################################
     # We imported all necessary modules for simulation, analysis and plotting.
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     ###############################################################################
     # Additionally, we set the verbosity using ``set_verbosity`` to suppress info
    diff --git a/examples/lin_rate_ipn_network.py b/examples/lin_rate_ipn_network.py
    index 13d110c5d6..a8b8140b54 100644
    --- a/examples/lin_rate_ipn_network.py
    +++ b/examples/lin_rate_ipn_network.py
    @@ -31,9 +31,9 @@
     
     """
     
    +import matplotlib.pyplot as plt
     import nest
     import numpy
    -import matplotlib.pyplot as plt
     
     ###############################################################################
     # Assigning the simulation parameters to variables.
    diff --git a/examples/mc_neuron.py b/examples/mc_neuron.py
    index 2e07fcbac4..20d92f2770 100644
    --- a/examples/mc_neuron.py
    +++ b/examples/mc_neuron.py
    @@ -41,8 +41,8 @@
     # example.
     
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     nest.ResetKernel()
     
    diff --git a/examples/multimeter_file.py b/examples/multimeter_file.py
    index dde1d7537f..4b288c87ad 100644
    --- a/examples/multimeter_file.py
    +++ b/examples/multimeter_file.py
    @@ -32,9 +32,9 @@
     # First, we import the necessary modules to simulate and plot this example.
     # The simulation kernel is put back to its initial state using ``ResetKernel``.
     
    +import matplotlib.pyplot as plt
     import nest
     import numpy
    -import matplotlib.pyplot as plt
     
     nest.ResetKernel()
     
    diff --git a/examples/music_cont_out_proxy_example/receiver_script.py b/examples/music_cont_out_proxy_example/receiver_script.py
    index cbea426a97..10b399732a 100755
    --- a/examples/music_cont_out_proxy_example/receiver_script.py
    +++ b/examples/music_cont_out_proxy_example/receiver_script.py
    @@ -26,9 +26,10 @@
     """
     
     import sys
    +from itertools import dropwhile, takewhile
    +
     import music
     import numpy
    -from itertools import takewhile, dropwhile
     
     setup = music.Setup()
     stoptime = setup.config("stoptime")
    diff --git a/examples/one_neuron.py b/examples/one_neuron.py
    index dbbbb66680..956ea96bb6 100755
    --- a/examples/one_neuron.py
    +++ b/examples/one_neuron.py
    @@ -43,9 +43,9 @@
     # including connections between nodes, status of neurons, devices and
     # intrinsic time clocks, is kept and influences the next simulations.
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
     
     nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
    diff --git a/examples/one_neuron_with_noise.py b/examples/one_neuron_with_noise.py
    index bbe43e9666..231ee1f08f 100755
    --- a/examples/one_neuron_with_noise.py
    +++ b/examples/one_neuron_with_noise.py
    @@ -37,9 +37,9 @@
     # several times in a Python shell without interference from previous NEST
     # simulations.
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
     
     nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
    diff --git a/examples/plot_weight_matrices.py b/examples/plot_weight_matrices.py
    index ae7d200082..efa77ce0c6 100644
    --- a/examples/plot_weight_matrices.py
    +++ b/examples/plot_weight_matrices.py
    @@ -35,10 +35,10 @@
     # First, we import all necessary modules to extract, handle and plot
     # the connectivity matrices
     
    -import numpy as np
    +import matplotlib.gridspec as gridspec
     import matplotlib.pyplot as plt
     import nest
    -import matplotlib.gridspec as gridspec
    +import numpy as np
     from mpl_toolkits.axes_grid1 import make_axes_locatable
     
     ###############################################################################
    diff --git a/examples/pong/generate_gif.py b/examples/pong/generate_gif.py
    index fb16f385a1..a90fb3f728 100644
    --- a/examples/pong/generate_gif.py
    +++ b/examples/pong/generate_gif.py
    @@ -28,17 +28,16 @@
     :Authors: J Gille, T Wunderlich, Electronic Vision(s)
     """
     
    -from copy import copy
     import gzip
     import os
    -import sys
    -
    -import numpy as np
     import pickle
    -import matplotlib.pyplot as plt
    -import imageio.v2 as imageio
    +import sys
    +from copy import copy
     from glob import glob
     
    +import imageio.v2 as imageio
    +import matplotlib.pyplot as plt
    +import numpy as np
     from pong import GameOfPong as Pong
     
     px = 1 / plt.rcParams["figure.dpi"]
    diff --git a/examples/pong/networks.py b/examples/pong/networks.py
    index 349ed0305e..82d49dcc40 100644
    --- a/examples/pong/networks.py
    +++ b/examples/pong/networks.py
    @@ -52,13 +52,12 @@
     :Authors: J Gille, T Wunderlich, Electronic Vision(s)
     """
     
    +import logging
     from abc import ABC, abstractmethod
     from copy import copy
    -import logging
    -
    -import numpy as np
     
     import nest
    +import numpy as np
     
     # Simulation time per iteration in milliseconds.
     POLL_TIME = 200
    diff --git a/examples/pong/run_simulations.py b/examples/pong/run_simulations.py
    index 045be142f1..aa12575ae7 100644
    --- a/examples/pong/run_simulations.py
    +++ b/examples/pong/run_simulations.py
    @@ -59,14 +59,13 @@
     import datetime
     import gzip
     import logging
    -import nest
     import os
    +import pickle
     import sys
     import time
     
    +import nest
     import numpy as np
    -import pickle
    -
     import pong
     from networks import POLL_TIME, PongNetDopa, PongNetRSTDP
     
    diff --git a/examples/precise_spiking.py b/examples/precise_spiking.py
    index 77730ed741..609198717b 100644
    --- a/examples/precise_spiking.py
    +++ b/examples/precise_spiking.py
    @@ -58,9 +58,8 @@
     # plotting.
     
     
    -import nest
     import matplotlib.pyplot as plt
    -
    +import nest
     
     ###############################################################################
     # Second, we assign the simulation parameters to variables.
    diff --git a/examples/pulsepacket.py b/examples/pulsepacket.py
    index d3b9ed2dce..5ad70f5606 100755
    --- a/examples/pulsepacket.py
    +++ b/examples/pulsepacket.py
    @@ -46,10 +46,10 @@
     # First, we import all necessary modules for simulation, analysis and
     # plotting.
     
    -import scipy.special as sp
    +import matplotlib.pyplot as plt
     import nest
     import numpy
    -import matplotlib.pyplot as plt
    +import scipy.special as sp
     
     # Properties of pulse packet:
     
    diff --git a/examples/rate_neuron_dm.py b/examples/rate_neuron_dm.py
    index a31228132f..7fecf3b865 100644
    --- a/examples/rate_neuron_dm.py
    +++ b/examples/rate_neuron_dm.py
    @@ -35,8 +35,8 @@
     decision will be made.
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy
     
     ##########################################################################
    diff --git a/examples/repeated_stimulation.py b/examples/repeated_stimulation.py
    index 7460fe12c1..cd2fe44513 100644
    --- a/examples/repeated_stimulation.py
    +++ b/examples/repeated_stimulation.py
    @@ -44,9 +44,9 @@
     # First, the modules needed for simulation and analysis are imported.
     
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.raster_plot
    -import matplotlib.pyplot as plt
     
     ###############################################################################
     # Second, we set the parameters so the ``poisson_generator`` generates 1000
    diff --git a/examples/sensitivity_to_perturbation.py b/examples/sensitivity_to_perturbation.py
    index f0b396247c..58b237f9c2 100644
    --- a/examples/sensitivity_to_perturbation.py
    +++ b/examples/sensitivity_to_perturbation.py
    @@ -45,10 +45,9 @@
     # Importing all necessary modules for simulation, analysis and plotting.
     
     
    -import numpy
     import matplotlib.pyplot as plt
     import nest
    -
    +import numpy
     
     ###############################################################################
     # Here we define all parameters necessary for building and simulating the
    diff --git a/examples/sinusoidal_gamma_generator.py b/examples/sinusoidal_gamma_generator.py
    index 59e568d21d..f6dced81c1 100644
    --- a/examples/sinusoidal_gamma_generator.py
    +++ b/examples/sinusoidal_gamma_generator.py
    @@ -43,8 +43,8 @@
     # plot this example.
     
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     nest.ResetKernel()  # in case we run the script multiple times from iPython
    diff --git a/examples/sinusoidal_poisson_generator.py b/examples/sinusoidal_poisson_generator.py
    index 5607f9dbca..f33cf5d7f9 100644
    --- a/examples/sinusoidal_poisson_generator.py
    +++ b/examples/sinusoidal_poisson_generator.py
    @@ -40,8 +40,8 @@
     # We import the modules required to simulate, analyze and plot this example.
     
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     nest.ResetKernel()  # in case we run the script multiple times from iPython
    diff --git a/examples/sonata_example/sonata_network.py b/examples/sonata_example/sonata_network.py
    index 9f0500817c..f01b7be2c7 100644
    --- a/examples/sonata_example/sonata_network.py
    +++ b/examples/sonata_example/sonata_network.py
    @@ -45,10 +45,11 @@
     ###############################################################################
     # Import all necessary packages for simulation, analysis and plotting.
     
    -import nest
    -import matplotlib.pyplot as plt
     from pathlib import Path
     
    +import matplotlib.pyplot as plt
    +import nest
    +
     nest.set_verbosity("M_ERROR")
     nest.ResetKernel()
     
    diff --git a/examples/spatial/conncomp.py b/examples/spatial/conncomp.py
    index 2566805a72..201bcf9098 100644
    --- a/examples/spatial/conncomp.py
    +++ b/examples/spatial/conncomp.py
    @@ -31,8 +31,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     nest.ResetKernel()
    diff --git a/examples/spatial/conncon_sources.py b/examples/spatial/conncon_sources.py
    index 15d611b7e5..ab8a32ca0f 100644
    --- a/examples/spatial/conncon_sources.py
    +++ b/examples/spatial/conncon_sources.py
    @@ -32,8 +32,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     nest.ResetKernel()
    diff --git a/examples/spatial/conncon_targets.py b/examples/spatial/conncon_targets.py
    index ed85775189..7718df9c39 100644
    --- a/examples/spatial/conncon_targets.py
    +++ b/examples/spatial/conncon_targets.py
    @@ -31,8 +31,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     nest.ResetKernel()
    diff --git a/examples/spatial/connex.py b/examples/spatial/connex.py
    index c85bcaa248..88baa6bc89 100644
    --- a/examples/spatial/connex.py
    +++ b/examples/spatial/connex.py
    @@ -31,8 +31,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     nest.ResetKernel()
    diff --git a/examples/spatial/connex_ew.py b/examples/spatial/connex_ew.py
    index c2fe05c8b0..842b67fc5a 100644
    --- a/examples/spatial/connex_ew.py
    +++ b/examples/spatial/connex_ew.py
    @@ -32,8 +32,8 @@
     """
     
     import matplotlib.pyplot as plt
    -import numpy as np
     import nest
    +import numpy as np
     
     nest.ResetKernel()
     
    diff --git a/examples/spatial/ctx_2n.py b/examples/spatial/ctx_2n.py
    index 3e5827f419..aaf1557a10 100644
    --- a/examples/spatial/ctx_2n.py
    +++ b/examples/spatial/ctx_2n.py
    @@ -29,8 +29,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     nest.ResetKernel()
    diff --git a/examples/spatial/gaussex.py b/examples/spatial/gaussex.py
    index 77ac7cc77b..230d2e7de5 100644
    --- a/examples/spatial/gaussex.py
    +++ b/examples/spatial/gaussex.py
    @@ -29,8 +29,8 @@
     """
     
     import matplotlib.pyplot as plt
    -import numpy as np
     import nest
    +import numpy as np
     
     nest.ResetKernel()
     
    diff --git a/examples/spatial/grid_iaf.py b/examples/spatial/grid_iaf.py
    index 6dd59ce9d5..9a6f06742e 100644
    --- a/examples/spatial/grid_iaf.py
    +++ b/examples/spatial/grid_iaf.py
    @@ -29,8 +29,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     nest.ResetKernel()
     
    diff --git a/examples/spatial/grid_iaf_irr.py b/examples/spatial/grid_iaf_irr.py
    index b363194754..4f454e4cbe 100644
    --- a/examples/spatial/grid_iaf_irr.py
    +++ b/examples/spatial/grid_iaf_irr.py
    @@ -29,8 +29,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     nest.ResetKernel()
     
    diff --git a/examples/spatial/grid_iaf_oc.py b/examples/spatial/grid_iaf_oc.py
    index 26649ef66c..6e2ddd4cf5 100644
    --- a/examples/spatial/grid_iaf_oc.py
    +++ b/examples/spatial/grid_iaf_oc.py
    @@ -29,8 +29,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     for ctr in [(0.0, 0.0), (-2.0, 2.0), (0.5, 1.0)]:
    diff --git a/examples/spatial/test_3d.py b/examples/spatial/test_3d.py
    index ff6f253b08..62054b81eb 100644
    --- a/examples/spatial/test_3d.py
    +++ b/examples/spatial/test_3d.py
    @@ -26,8 +26,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     nest.ResetKernel()
     
    diff --git a/examples/spatial/test_3d_exp.py b/examples/spatial/test_3d_exp.py
    index b7d25c63aa..3bc9093bd8 100644
    --- a/examples/spatial/test_3d_exp.py
    +++ b/examples/spatial/test_3d_exp.py
    @@ -26,8 +26,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     nest.ResetKernel()
     
    diff --git a/examples/spatial/test_3d_gauss.py b/examples/spatial/test_3d_gauss.py
    index ae31bad926..2de4ad3748 100644
    --- a/examples/spatial/test_3d_gauss.py
    +++ b/examples/spatial/test_3d_gauss.py
    @@ -26,8 +26,8 @@
     Hans Ekkehard Plesser, UMB
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     nest.ResetKernel()
     
    diff --git a/examples/store_restore_network.py b/examples/store_restore_network.py
    index 8242ebd3e1..89383466e6 100644
    --- a/examples/store_restore_network.py
    +++ b/examples/store_restore_network.py
    @@ -47,17 +47,18 @@
     ###############################################################################
     # Import necessary modules.
     
    -import nest
     import pickle
    -
    -###############################################################################
    -# These modules are only needed for illustrative plotting.
    +import textwrap
     
     import matplotlib.pyplot as plt
    -from matplotlib import gridspec
    +import nest
     import numpy as np
     import pandas as pd
    -import textwrap
    +from matplotlib import gridspec
    +
    +###############################################################################
    +# These modules are only needed for illustrative plotting.
    +
     
     ###############################################################################
     # Implement network as class.
    diff --git a/examples/structural_plasticity.py b/examples/structural_plasticity.py
    index e14e0ad1ad..7f1a672f8c 100644
    --- a/examples/structural_plasticity.py
    +++ b/examples/structural_plasticity.py
    @@ -48,11 +48,11 @@
     ####################################################################################
     # First, we import all necessary modules.
     
    -import nest
    -import numpy
    -import matplotlib.pyplot as plt
     import sys
     
    +import matplotlib.pyplot as plt
    +import nest
    +import numpy
     
     ####################################################################################
     # We define general simulation parameters
    diff --git a/examples/sudoku/helpers_sudoku.py b/examples/sudoku/helpers_sudoku.py
    index 4eb767d7ff..3054a2fa24 100644
    --- a/examples/sudoku/helpers_sudoku.py
    +++ b/examples/sudoku/helpers_sudoku.py
    @@ -24,8 +24,8 @@
     
     :Authors: J Gille, S Furber, A Rowley
     """
    -import numpy as np
     import matplotlib.patches as patch
    +import numpy as np
     
     
     def get_puzzle(puzzle_index):
    diff --git a/examples/sudoku/plot_progress.py b/examples/sudoku/plot_progress.py
    index bbdfdbdce9..19100b2ae8 100644
    --- a/examples/sudoku/plot_progress.py
    +++ b/examples/sudoku/plot_progress.py
    @@ -40,12 +40,13 @@
     """
     import os
     import pickle
    -import imageio
    -from glob import glob
    -import numpy as np
     import sys
    +from glob import glob
    +
     import helpers_sudoku
    +import imageio
     import matplotlib.pyplot as plt
    +import numpy as np
     
     
     def get_progress(puzzle, solution):
    diff --git a/examples/sudoku/sudoku_net.py b/examples/sudoku/sudoku_net.py
    index af133cc242..b709010fae 100644
    --- a/examples/sudoku/sudoku_net.py
    +++ b/examples/sudoku/sudoku_net.py
    @@ -47,10 +47,10 @@
     
     :Authors: J Gille, S Furber, A Rowley
     """
    -import nest
    -import numpy as np
     import logging
     
    +import nest
    +import numpy as np
     
     inter_neuron_weight = -0.2  # inhibitory weight for synapses between neurons
     weight_stim = 1.3  # weight from stimulation sources to neurons
    diff --git a/examples/sudoku/sudoku_solver.py b/examples/sudoku/sudoku_solver.py
    index d1f8bdd2ed..d13f3f3667 100644
    --- a/examples/sudoku/sudoku_solver.py
    +++ b/examples/sudoku/sudoku_solver.py
    @@ -56,13 +56,14 @@
     
     :Authors: J Gille, S Furber, A Rowley
     """
    -import nest
    -import sudoku_net
    -import numpy as np
     import logging
     import pickle
    -from helpers_sudoku import get_puzzle, validate_solution, plot_field
    +
     import matplotlib.pyplot as plt
    +import nest
    +import numpy as np
    +import sudoku_net
    +from helpers_sudoku import get_puzzle, plot_field, validate_solution
     
     nest.local_num_threads = 8
     nest.set_verbosity("M_WARNING")
    diff --git a/examples/synapsecollection.py b/examples/synapsecollection.py
    index fe5f810775..23cd171a33 100644
    --- a/examples/synapsecollection.py
    +++ b/examples/synapsecollection.py
    @@ -29,8 +29,8 @@
     source and targets.
     """
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     import numpy as np
     
     
    diff --git a/examples/testiaf.py b/examples/testiaf.py
    index e8c6b41140..1eba09337f 100755
    --- a/examples/testiaf.py
    +++ b/examples/testiaf.py
    @@ -36,8 +36,8 @@
     ###############################################################################
     # First, we import all necessary modules for simulation and plotting
     
    -import nest
     import matplotlib.pyplot as plt
    +import nest
     
     ###############################################################################
     # Second the function ``build_network`` is defined to build the network and
    diff --git a/examples/tsodyks_depressing.py b/examples/tsodyks_depressing.py
    index e58d93199a..072951aed2 100644
    --- a/examples/tsodyks_depressing.py
    +++ b/examples/tsodyks_depressing.py
    @@ -49,9 +49,9 @@
     ###############################################################################
     # First, we import all necessary modules for simulation and plotting.
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
     from numpy import exp
     
     ###############################################################################
    diff --git a/examples/tsodyks_facilitating.py b/examples/tsodyks_facilitating.py
    index 50348fdb12..83126ef596 100644
    --- a/examples/tsodyks_facilitating.py
    +++ b/examples/tsodyks_facilitating.py
    @@ -48,9 +48,9 @@
     ###############################################################################
     # First, we import all necessary modules for simulation and plotting.
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
     from numpy import exp
     
     ###############################################################################
    diff --git a/examples/twoneurons.py b/examples/twoneurons.py
    index e183440206..df186423bb 100644
    --- a/examples/twoneurons.py
    +++ b/examples/twoneurons.py
    @@ -39,9 +39,9 @@
     # Additionally, we set the verbosity to suppress info messages and reset
     # the kernel.
     
    +import matplotlib.pyplot as plt
     import nest
     import nest.voltage_trace
    -import matplotlib.pyplot as plt
     
     nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
    diff --git a/examples/urbanczik_synapse_example.py b/examples/urbanczik_synapse_example.py
    index 6593448a52..99f63c8a43 100644
    --- a/examples/urbanczik_synapse_example.py
    +++ b/examples/urbanczik_synapse_example.py
    @@ -39,9 +39,9 @@
     .. [1] R. Urbanczik, W. Senn (2014): Learning by the Dendritic Prediction of
            Somatic Spiking. Neuron, 81, 521-528.
     """
    +import nest
     import numpy as np
     from matplotlib import pyplot as plt
    -import nest
     
     
     def g_inh(amplitude, t_start, t_end):
    diff --git a/examples/vinit_example.py b/examples/vinit_example.py
    index 783e94ea43..6383a99ed8 100755
    --- a/examples/vinit_example.py
    +++ b/examples/vinit_example.py
    @@ -37,9 +37,9 @@
     ###############################################################################
     # First, the necessary modules for simulation and plotting are imported.
     
    +import matplotlib.pyplot as plt
     import nest
     import numpy
    -import matplotlib.pyplot as plt
     
     ###############################################################################
     # A loop runs over a range of initial membrane voltages.
    diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py
    index 770b0bd73d..9bb1b9a59f 100644
    --- a/pynest/nest/__init__.py
    +++ b/pynest/nest/__init__.py
    @@ -56,11 +56,12 @@
     # instance later on. Use `.copy()` to prevent pollution with other variables
     _original_module_attrs = globals().copy()
     
    -from .ll_api import KernelAttribute  # noqa
    +import builtins  # noqa
    +import importlib  # noqa
     import sys  # noqa
     import types  # noqa
    -import importlib  # noqa
    -import builtins  # noqa
    +
    +from .ll_api import KernelAttribute  # noqa
     
     try:
         import versionchecker  # noqa: F401
    @@ -76,10 +77,10 @@ class NestModule(types.ModuleType):
         """
     
         from . import ll_api  # noqa
    -    from . import random  # noqa
    +    from . import logic  # noqa
         from . import math  # noqa
    +    from . import random  # noqa
         from . import spatial_distributions  # noqa
    -    from . import logic  # noqa
         from .ll_api import set_communicator
     
         def __init__(self, name):
    diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py
    index a77dda951c..6c119d7c72 100644
    --- a/pynest/nest/lib/hl_api_connection_helpers.py
    +++ b/pynest/nest/lib/hl_api_connection_helpers.py
    @@ -25,12 +25,13 @@
     """
     
     import copy
    +
     import numpy as np
     
    -from ..ll_api import *
     from .. import nestkernel_api as nestkernel
    +from ..ll_api import *
    +from .hl_api_exceptions import NESTError, NESTErrors
     from .hl_api_types import CollocatedSynapses, Mask, NodeCollection, Parameter
    -from .hl_api_exceptions import NESTErrors, NESTError
     
     __all__ = [
         "_connect_layers_needed",
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index f83ec8d57c..ff89497182 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -26,18 +26,17 @@
     import numpy
     
     from .. import nestkernel_api as nestkernel
    -
     from .hl_api_connection_helpers import (
    -    _process_input_nodes,
         _connect_layers_needed,
         _connect_spatial,
         _process_conn_spec,
    +    _process_input_nodes,
         _process_spatial_projections,
         _process_syn_spec,
     )
     from .hl_api_nodes import Create
     from .hl_api_parallel_computing import NumProcesses
    -from .hl_api_types import NodeCollection, SynapseCollection, Mask, Parameter
    +from .hl_api_types import Mask, NodeCollection, Parameter, SynapseCollection
     
     __all__ = [
         "Connect",
    diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py
    index c80e440b9d..d2fa247313 100644
    --- a/pynest/nest/lib/hl_api_helper.py
    +++ b/pynest/nest/lib/hl_api_helper.py
    @@ -32,9 +32,10 @@
     import warnings
     from string import Template
     
    -from .. import nestkernel_api as nestkernel
     import nest
     
    +from .. import nestkernel_api as nestkernel
    +
     __all__ = [
         "broadcast",
         "deprecated",
    diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py
    index f4b20c5d25..0bf66ff47d 100644
    --- a/pynest/nest/lib/hl_api_info.py
    +++ b/pynest/nest/lib/hl_api_info.py
    @@ -27,10 +27,11 @@
     import textwrap
     import webbrowser
     
    +import nest
    +
    +from .. import nestkernel_api as nestkernel
     from .hl_api_helper import broadcast, is_iterable, load_help, show_help_with_pager
     from .hl_api_types import to_json
    -from .. import nestkernel_api as nestkernel
    -import nest
     
     __all__ = [
         "authors",
    diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py
    index 80572baeb8..ce3be14357 100644
    --- a/pynest/nest/lib/hl_api_models.py
    +++ b/pynest/nest/lib/hl_api_models.py
    @@ -23,8 +23,8 @@
     Functions for model handling
     """
     
    -from ..ll_api import *
     from .. import nestkernel_api as nestkernel
    +from ..ll_api import *
     from .hl_api_helper import deprecated, is_iterable, model_deprecation_warning
     from .hl_api_types import to_json
     
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index 7a0ec461b2..674d4aaffc 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -26,12 +26,13 @@
     import warnings
     
     import nest
    -from ..ll_api import *
    +
     from .. import nestkernel_api as nestkernel
    +from ..ll_api import *
    +from .hl_api_exceptions import NESTErrors
     from .hl_api_helper import is_iterable, model_deprecation_warning
    +from .hl_api_parallel_computing import NumProcesses, Rank
     from .hl_api_types import NodeCollection, Parameter
    -from .hl_api_exceptions import NESTErrors
    -from .hl_api_parallel_computing import Rank, NumProcesses
     
     __all__ = [
         "Create",
    diff --git a/pynest/nest/lib/hl_api_parallel_computing.py b/pynest/nest/lib/hl_api_parallel_computing.py
    index 2930fc1b91..a89546282c 100644
    --- a/pynest/nest/lib/hl_api_parallel_computing.py
    +++ b/pynest/nest/lib/hl_api_parallel_computing.py
    @@ -23,8 +23,8 @@
     Functions for parallel computing
     """
     
    -from ..ll_api import *
     from .. import nestkernel_api as nestkernel
    +from ..ll_api import *
     
     __all__ = [
         "NumProcesses",
    diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py
    index 42cab114b7..b50bc6e798 100644
    --- a/pynest/nest/lib/hl_api_simulation.py
    +++ b/pynest/nest/lib/hl_api_simulation.py
    @@ -23,11 +23,10 @@
     Functions for simulation control
     """
     
    -from contextlib import contextmanager
     import warnings
    +from contextlib import contextmanager
     
     from .. import nestkernel_api as nestkernel
    -
     from ..ll_api import *
     from .hl_api_helper import is_iterable
     from .hl_api_parallel_computing import Rank
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index 99e60f23bc..f3757710a2 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -32,7 +32,6 @@
     import numpy as np
     
     from .. import nestkernel_api as nestkernel
    -
     from .hl_api_models import GetDefaults
     from .hl_api_nodes import Create
     from .hl_api_simulation import GetKernelStatus, SetKernelStatus, Simulate
    diff --git a/pynest/nest/lib/hl_api_spatial.py b/pynest/nest/lib/hl_api_spatial.py
    index cb17f4f663..4cc224a006 100644
    --- a/pynest/nest/lib/hl_api_spatial.py
    +++ b/pynest/nest/lib/hl_api_spatial.py
    @@ -28,7 +28,6 @@
     import numpy as np
     
     from .. import nestkernel_api as nestkernel
    -from .hl_api_helper import is_iterable
     from .hl_api_connections import GetConnections
     from .hl_api_helper import is_iterable, stringify_path
     from .hl_api_parallel_computing import NumProcesses, Rank
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index ac33876a47..d3d93438d4 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -29,8 +29,8 @@
     
     import numpy
     
    -from ..ll_api import *
     from .. import nestkernel_api as nestkernel
    +from ..ll_api import *
     from .hl_api_helper import (
         get_parameters,
         get_parameters_hierarchical_addressing,
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index 9114b29379..6418838087 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -29,9 +29,8 @@
     import functools
     import inspect
     import keyword
    -
    -import sys
     import os
    +import sys
     
     # This is a workaround for readline import errors encountered with Anaconda
     # Python running on Ubuntu, when invoked from the terminal
    @@ -52,7 +51,6 @@
     sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL)
     
     from . import nestkernel_api as nestkernel  # noqa
    -
     from .lib.hl_api_exceptions import NESTError, NESTErrors
     
     __all__ = [
    diff --git a/pynest/nest/ll_api_kernel_attributes.py b/pynest/nest/ll_api_kernel_attributes.py
    index a595af1786..dc68f44d3a 100644
    --- a/pynest/nest/ll_api_kernel_attributes.py
    +++ b/pynest/nest/ll_api_kernel_attributes.py
    @@ -19,7 +19,7 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -from .ll_api import sr, stack_checker, sps, spp
    +from .ll_api import spp, sps, sr, stack_checker
     
     
     class KernelAttribute:
    diff --git a/pynest/nest/logic/hl_api_logic.py b/pynest/nest/logic/hl_api_logic.py
    index 1b7b9329b1..210816b0cc 100644
    --- a/pynest/nest/logic/hl_api_logic.py
    +++ b/pynest/nest/logic/hl_api_logic.py
    @@ -19,8 +19,8 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -from ..lib.hl_api_types import CreateParameter
     from .. import nestkernel_api as nestkernel
    +from ..lib.hl_api_types import CreateParameter
     
     __all__ = [
         "conditional",
    diff --git a/pynest/nest/math/hl_api_math.py b/pynest/nest/math/hl_api_math.py
    index 7bf82a2cab..bf32251597 100644
    --- a/pynest/nest/math/hl_api_math.py
    +++ b/pynest/nest/math/hl_api_math.py
    @@ -21,7 +21,6 @@
     
     from .. import nestkernel_api as nestkernel
     
    -
     __all__ = [
         "exp",
         "sin",
    diff --git a/pynest/nest/raster_plot.py b/pynest/nest/raster_plot.py
    index 6d00bfcfd0..adf64a2ce0 100644
    --- a/pynest/nest/raster_plot.py
    +++ b/pynest/nest/raster_plot.py
    @@ -302,7 +302,7 @@ def _histogram(a, bins=10, bin_range=None, normed=False):
         ------
         ValueError
         """
    -    from numpy import asarray, iterable, linspace, sort, concatenate
    +    from numpy import asarray, concatenate, iterable, linspace, sort
     
         a = asarray(a).ravel()
     
    diff --git a/pynest/nest/server/hl_api_server.py b/pynest/nest/server/hl_api_server.py
    index d167ef4d91..672c5c04a1 100644
    --- a/pynest/nest/server/hl_api_server.py
    +++ b/pynest/nest/server/hl_api_server.py
    @@ -23,24 +23,18 @@
     import importlib
     import inspect
     import io
    +import os
     import sys
    -
    -from flask import Flask, request, jsonify
    -from flask_cors import CORS, cross_origin
    -
    -from werkzeug.exceptions import abort
    -from werkzeug.wrappers import Response
    -
    -import nest
    -
    -import RestrictedPython
     import time
    -
     import traceback
    -
     from copy import deepcopy
     
    -import os
    +import nest
    +import RestrictedPython
    +from flask import Flask, jsonify, request
    +from flask_cors import CORS, cross_origin
    +from werkzeug.exceptions import abort
    +from werkzeug.wrappers import Response
     
     MODULES = os.environ.get("NEST_SERVER_MODULES", "nest").split(",")
     RESTRICTION_OFF = bool(os.environ.get("NEST_SERVER_RESTRICTION_OFF", False))
    diff --git a/pynest/nest/spatial/__init__.py b/pynest/nest/spatial/__init__.py
    index d2c464ff0b..94e1fa6e5f 100644
    --- a/pynest/nest/spatial/__init__.py
    +++ b/pynest/nest/spatial/__init__.py
    @@ -20,8 +20,9 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import functools as _functools
    -from .hl_api_spatial import *  # noqa: F401,F403
    +
     from .hl_api_spatial import DistanceParameter as _DistanceParameter
    +from .hl_api_spatial import *  # noqa: F401,F403
     
     
     @_functools.lru_cache(maxsize=None)
    diff --git a/pynest/nest/spatial/hl_api_spatial.py b/pynest/nest/spatial/hl_api_spatial.py
    index 21af619bc7..34c31254c0 100644
    --- a/pynest/nest/spatial/hl_api_spatial.py
    +++ b/pynest/nest/spatial/hl_api_spatial.py
    @@ -20,9 +20,9 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import numpy as np
    -from ..lib.hl_api_types import CreateParameter, Parameter
    -from .. import nestkernel_api as nestkernel
     
    +from .. import nestkernel_api as nestkernel
    +from ..lib.hl_api_types import CreateParameter, Parameter
     
     __all__ = [
         "grid",
    diff --git a/pynest/nest/visualization.py b/pynest/nest/visualization.py
    index 9f07a9b96b..58cb6a442f 100644
    --- a/pynest/nest/visualization.py
    +++ b/pynest/nest/visualization.py
    @@ -23,8 +23,8 @@
     Functions to visualize a network built in NEST.
     """
     
    -import pydot
     import nest
    +import pydot
     
     __all__ = [
         "plot_network",
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index b9dc6bb676..1c165758c9 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -20,12 +20,11 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     from libcpp cimport bool as cbool
    -
    -from libcpp.string cimport string
    -from libcpp.vector cimport vector
     from libcpp.deque cimport deque
    -from libcpp.utility cimport pair
     from libcpp.memory cimport shared_ptr
    +from libcpp.string cimport string
    +from libcpp.utility cimport pair
    +from libcpp.vector cimport vector
     
     
     cdef extern from "dictionary.h" namespace "boost":
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 50d047e831..91f2a29948 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -24,28 +24,25 @@
     
     # import cython
     
    -from libc.stdlib cimport malloc, free
    -# from libc.string cimport memcpy
    -
    +from cython.operator cimport dereference as deref
    +from cython.operator cimport preincrement as inc
    +from libc.stdlib cimport free, malloc
    +from libcpp.deque cimport deque
     from libcpp.string cimport string
     from libcpp.vector cimport vector
    -from libcpp.deque cimport deque
     
    -from cython.operator cimport dereference as deref
    -from cython.operator cimport preincrement as inc
    +# from libc.string cimport memcpy
     
     import nest
    +import numpy
     from nest.lib.hl_api_exceptions import NESTErrors
     
    -import numpy
     # cimport numpy
     
     #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
     
    -
    -
    -from libc.stdlib cimport malloc, free
    -from libc.stdint cimport uint64_t, int64_t
    +from libc.stdint cimport int64_t, uint64_t
    +from libc.stdlib cimport free, malloc
     
     
     def init(args):
    diff --git a/testsuite/pytests/conftest.py b/testsuite/pytests/conftest.py
    index af8a92aaf9..0721dca434 100644
    --- a/testsuite/pytests/conftest.py
    +++ b/testsuite/pytests/conftest.py
    @@ -35,9 +35,8 @@ def test_gsl():
     import pathlib
     import sys
     
    -import pytest
    -
     import nest
    +import pytest
     
     # Make all modules in the `utilities` folder available to import in any test
     sys.path.append(str(pathlib.Path(__file__).parent / "utilities"))
    diff --git a/testsuite/pytests/connect_test_base.py b/testsuite/pytests/connect_test_base.py
    index 350222b8f9..2ae8c09845 100644
    --- a/testsuite/pytests/connect_test_base.py
    +++ b/testsuite/pytests/connect_test_base.py
    @@ -19,10 +19,11 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    +import unittest
    +
    +import nest
     import numpy as np
     import scipy.stats
    -import nest
    -import unittest
     
     try:
         from mpi4py import MPI
    diff --git a/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py b/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    index 45855afc4f..d5ba57fbf0 100644
    --- a/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    +++ b/testsuite/pytests/mpi/2/test_connect_arrays_mpi.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/mpi/2/test_issue_576.py b/testsuite/pytests/mpi/2/test_issue_576.py
    index 796d3c93d4..7aa3bb0408 100644
    --- a/testsuite/pytests/mpi/2/test_issue_576.py
    +++ b/testsuite/pytests/mpi/2/test_issue_576.py
    @@ -20,9 +20,10 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     
    -import nest
     import unittest
     
    +import nest
    +
     HAVE_GSL = nest.build_info["have_gsl"]
     
     
    diff --git a/testsuite/pytests/mpi/4/test_consistent_local_vps.py b/testsuite/pytests/mpi/4/test_consistent_local_vps.py
    index 62ce5ac55f..c27ff277ad 100644
    --- a/testsuite/pytests/mpi/4/test_consistent_local_vps.py
    +++ b/testsuite/pytests/mpi/4/test_consistent_local_vps.py
    @@ -20,8 +20,8 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    -import nest
     
    +import nest
     
     HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
     
    diff --git a/testsuite/pytests/mpi/4/test_set_resolution_nthreads.py b/testsuite/pytests/mpi/4/test_set_resolution_nthreads.py
    index ca44365daf..ee0ba9c458 100644
    --- a/testsuite/pytests/mpi/4/test_set_resolution_nthreads.py
    +++ b/testsuite/pytests/mpi/4/test_set_resolution_nthreads.py
    @@ -22,7 +22,6 @@
     import nest
     import pytest
     
    -
     pytestmark = pytest.mark.skipif_missing_threads
     
     
    diff --git a/testsuite/pytests/sli2py_connect/test_delay_check.py b/testsuite/pytests/sli2py_connect/test_delay_check.py
    index 43a040e860..d170f006f0 100644
    --- a/testsuite/pytests/sli2py_connect/test_delay_check.py
    +++ b/testsuite/pytests/sli2py_connect/test_delay_check.py
    @@ -27,8 +27,8 @@
     
     """
     
    -import pytest
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_connect/test_getconnections_multiple_syn_models.py b/testsuite/pytests/sli2py_connect/test_getconnections_multiple_syn_models.py
    index c15cbfca01..038dcedfcd 100644
    --- a/testsuite/pytests/sli2py_connect/test_getconnections_multiple_syn_models.py
    +++ b/testsuite/pytests/sli2py_connect/test_getconnections_multiple_syn_models.py
    @@ -27,12 +27,11 @@
     and some also have both.
     """
     
    +import nest
     import numpy.testing as nptest
     import pandas as pd
     import pytest
     
    -import nest
    -
     
     def build_net(num_threads=1):
         """
    diff --git a/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha.py b/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha.py
    index 7cb833f065..8ef1815eb0 100644
    --- a/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha.py
    +++ b/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha.py
    @@ -22,14 +22,13 @@
     import dataclasses
     import math
     
    +import nest
     import numpy as np
     import pytest
    -import nest
     import testsimulation
     import testutil
     from scipy.special import lambertw
     
    -
     # Notes:
     # * copy docs
     # * add docs & examples
    diff --git a/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha_1to2.py b/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha_1to2.py
    index 3e4b7045c0..ce7fcc9d8d 100644
    --- a/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha_1to2.py
    +++ b/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha_1to2.py
    @@ -21,9 +21,9 @@
     
     import dataclasses
     
    +import nest
     import numpy as np
     import pytest
    -import nest
     import testsimulation
     import testutil
     
    diff --git a/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha_dc.py b/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha_dc.py
    index 23838405b1..666f339da9 100644
    --- a/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha_dc.py
    +++ b/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha_dc.py
    @@ -21,11 +21,11 @@
     
     import dataclasses
     
    +import nest
     import numpy as np
     import pytest
    -import nest
    -import testutil
     import testsimulation
    +import testutil
     
     
     @dataclasses.dataclass
    diff --git a/testsuite/pytests/sli2py_neurons/test_add_freeze_thaw.py b/testsuite/pytests/sli2py_neurons/test_add_freeze_thaw.py
    index d81873da36..ee60d9a650 100644
    --- a/testsuite/pytests/sli2py_neurons/test_add_freeze_thaw.py
    +++ b/testsuite/pytests/sli2py_neurons/test_add_freeze_thaw.py
    @@ -23,11 +23,10 @@
     Test that per-thread nodes vectors are updated.
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     
     @pytest.mark.skipif_missing_threads
     def test_add_freeze_thaw():
    diff --git a/testsuite/pytests/sli2py_neurons/test_amat2_psc_exp.py b/testsuite/pytests/sli2py_neurons/test_amat2_psc_exp.py
    index e33e89c4cb..ddcf49929d 100644
    --- a/testsuite/pytests/sli2py_neurons/test_amat2_psc_exp.py
    +++ b/testsuite/pytests/sli2py_neurons/test_amat2_psc_exp.py
    @@ -35,14 +35,13 @@
     
     from collections import namedtuple
     
    +import nest
     import numpy as np
     import numpy.testing as nptest
     import pandas as pd
     import pandas.testing as pdtest
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(scope="module")
     def simulation():
    diff --git a/testsuite/pytests/sli2py_neurons/test_mat2_psc_exp.py b/testsuite/pytests/sli2py_neurons/test_mat2_psc_exp.py
    index 919b9c79fd..4057da7a7d 100644
    --- a/testsuite/pytests/sli2py_neurons/test_mat2_psc_exp.py
    +++ b/testsuite/pytests/sli2py_neurons/test_mat2_psc_exp.py
    @@ -28,14 +28,13 @@
     
     from collections import namedtuple
     
    +import nest
     import numpy as np
     import numpy.testing as nptest
     import pandas as pd
     import pandas.testing as pdtest
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(scope="module")
     def simulation():
    diff --git a/testsuite/pytests/sli2py_neurons/test_model_node_init.py b/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    index 22b7ca5b9c..3179a2b3cf 100644
    --- a/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    +++ b/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    @@ -29,8 +29,8 @@
        and comparing traces.
     """
     
    -import pytest
     import nest
    +import pytest
     
     
     def _get_network_state(nc):
    diff --git a/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py b/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    index 061903384a..14a8452b36 100644
    --- a/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    +++ b/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    @@ -23,9 +23,8 @@
     Test properties of multisynapse models.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py b/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    index 79bc105402..212ee0d1ae 100644
    --- a/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    +++ b/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    @@ -26,12 +26,11 @@
     the spikes have arrived must be identical in both cases.
     """
     
    +import nest
     import numpy as np
     import numpy.testing as nptest
     import pytest
     
    -import nest
    -
     # The following models will not be tested:
     skip_list = [
         "ginzburg_neuron",  # binary neuron
    diff --git a/testsuite/pytests/sli2py_neurons/test_set_vm.py b/testsuite/pytests/sli2py_neurons/test_set_vm.py
    index 9b87d6cbb7..260a15a978 100644
    --- a/testsuite/pytests/sli2py_neurons/test_set_vm.py
    +++ b/testsuite/pytests/sli2py_neurons/test_set_vm.py
    @@ -35,9 +35,10 @@
     cases it may lead to the exclusion of a model that should be tested.
     """
     
    +import random
    +
     import nest
     import pytest
    -import random
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py b/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    index cd5aa7ff40..e8639efe60 100644
    --- a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    +++ b/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    @@ -28,9 +28,9 @@
       The test does not test weighted correlations.
     """
     
    -import pytest
     import nest
     import numpy as np
    +import pytest
     
     
     @pytest.fixture()
    diff --git a/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py b/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    index 31dfb31a09..0aa263954c 100644
    --- a/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    +++ b/testsuite/pytests/sli2py_other/test_multiple_random_source_stepping.py
    @@ -33,9 +33,8 @@
         only.
     """
     
    -import numpy.testing as nptest
    -
     import nest
    +import numpy.testing as nptest
     
     
     def run_sim(interval, steppings):
    diff --git a/testsuite/pytests/sli2py_other/test_multithreading.py b/testsuite/pytests/sli2py_other/test_multithreading.py
    index 2015ac1d30..7f6ddabdb6 100644
    --- a/testsuite/pytests/sli2py_other/test_multithreading.py
    +++ b/testsuite/pytests/sli2py_other/test_multithreading.py
    @@ -28,10 +28,10 @@
       * Does default node distribution (modulo) work as expected?
       * Are spikes transmitted between threads as expected?
     """
    -import pytest
     import nest
     import numpy as np
     import numpy.testing as nptest
    +import pytest
     
     pytestmark = pytest.mark.skipif_missing_threads
     
    diff --git a/testsuite/pytests/sli2py_other/test_set_tics.py b/testsuite/pytests/sli2py_other/test_set_tics.py
    index 607968f548..e3161e40a2 100644
    --- a/testsuite/pytests/sli2py_other/test_set_tics.py
    +++ b/testsuite/pytests/sli2py_other/test_set_tics.py
    @@ -38,11 +38,10 @@
     parameters and whether the corresponding conversions are correct.
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def prepare():
    diff --git a/testsuite/pytests/sli2py_recording/test_corr_det.py b/testsuite/pytests/sli2py_recording/test_corr_det.py
    index 7c9126daf6..d9c941d722 100644
    --- a/testsuite/pytests/sli2py_recording/test_corr_det.py
    +++ b/testsuite/pytests/sli2py_recording/test_corr_det.py
    @@ -29,8 +29,8 @@
     
     """
     import nest
    -import pytest
     import numpy as np
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_offset.py b/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    index 8bc9093076..e0fc1c559f 100644
    --- a/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    +++ b/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    @@ -23,12 +23,11 @@
     This set of tests verify the behavior of the offset attribute of multimeter.
     """
     
    +import nest
     import numpy as np
     import numpy.testing as nptest
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset_kernel():
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py b/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    index 7a5ddf7ca8..8796d6108b 100644
    --- a/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    +++ b/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    @@ -23,12 +23,11 @@
     Test multimeter recording in stepwise simulation.
     """
     
    +import nest
     import pandas as pd
     import pandas.testing as pdtest
     import pytest
     
    -import nest
    -
     # The following models will not be tested:
     skip_models = [
         "erfc_neuron",  # binary neuron
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_105.py b/testsuite/pytests/sli2py_regressions/test_issue_105.py
    index 2c6aa62f15..bde128b276 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_105.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_105.py
    @@ -23,9 +23,8 @@
     Regression test for Issue #105 (GitHub).
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1140.py b/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    index 809b818b82..e7aa9722fa 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    @@ -26,11 +26,10 @@
     arrays for `rate_times` and `rate_values`.
     """
     
    +import nest
     import numpy.testing as nptest
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset():
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1242.py b/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    index 9c87980b77..fecaa36e09 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1242.py
    @@ -23,9 +23,8 @@
     Regression test for Issue #1242 (GitHub).
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     def test_volume_transmitter_illegal_connection():
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1305.py b/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    index 473c395078..eb74cdff1d 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    @@ -26,9 +26,8 @@
     rounding errors correctly.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1366.py b/testsuite/pytests/sli2py_regressions/test_issue_1366.py
    index 86e1f12922..fc2b85ff3c 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1366.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1366.py
    @@ -26,9 +26,8 @@
     to 1 when we have more than 1 virtual process and more than 1 node per process.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.mark.skipif_missing_threads
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1640.py b/testsuite/pytests/sli2py_regressions/test_issue_1640.py
    index 486c746329..cd3ee64814 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1640.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1640.py
    @@ -23,11 +23,10 @@
     Regression test for Issue #1640 (GitHub).
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     
     @pytest.mark.skipif_missing_threads
     @pytest.mark.parametrize("num_threads", [2, 3, 4])
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2282.py b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    index 4e19338e71..87d477cea5 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    @@ -26,11 +26,10 @@
     `noise_generator` if NEST runs with multiple threads.
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     pytestmark = pytest.mark.skipif_missing_threads
     
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2629.py b/testsuite/pytests/sli2py_regressions/test_issue_2629.py
    index 270c6b66be..dfc14e6b2d 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2629.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2629.py
    @@ -39,9 +39,8 @@
     is possible to pass a ``pathlib.Path`` object as filename.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(scope="module")
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py b/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py
    index f938062486..8479ce04d1 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2636_2795.py
    @@ -40,9 +40,8 @@
     The consistency check now addresses the edge case of ``node_id=0``.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.mark.parametrize("node_id", [0, 1])
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2637.py b/testsuite/pytests/sli2py_regressions/test_issue_2637.py
    index e84674acb6..44a813f6ea 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2637.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2637.py
    @@ -26,11 +26,10 @@
     a Python ``list`` of NumPy integers.
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     
     @pytest.mark.parametrize("dtype", [int, np.int32, np.int64])
     def test_nc_slice_list_of_numpy_ints(dtype):
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_264.py b/testsuite/pytests/sli2py_regressions/test_issue_264.py
    index 1d11f2109e..4e64a0cff2 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_264.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_264.py
    @@ -30,9 +30,8 @@
         handles the unusual case where NEST is compiled with a different value.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_351.py b/testsuite/pytests/sli2py_regressions/test_issue_351.py
    index 04f35a5a5d..11abf08396 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_351.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_351.py
    @@ -25,9 +25,8 @@
     This test ensures `Connect` raises exception if connecting to recording device with probabilistic connection rule.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_368.py b/testsuite/pytests/sli2py_regressions/test_issue_368.py
    index 26553105ef..86bfd6a1aa 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_368.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_368.py
    @@ -26,9 +26,8 @@
     arriving at exactly the same times correctly.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_410.py b/testsuite/pytests/sli2py_regressions/test_issue_410.py
    index 4e99db0a5c..d1f6f75c33 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_410.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_410.py
    @@ -23,9 +23,8 @@
     Regression test for Issue #410 (GitHub).
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     pytestmark = [pytest.mark.skipif_missing_gsl, pytest.mark.skipif_missing_threads]
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_521.py b/testsuite/pytests/sli2py_regressions/test_issue_521.py
    index 36ab733a26..0da8cf98cc 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_521.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_521.py
    @@ -23,9 +23,8 @@
     Regression test for Issue #521 (GitHub).
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.mark.skipif_missing_threads
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_77.py b/testsuite/pytests/sli2py_regressions/test_issue_77.py
    index fb93153584..6f796bc90d 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_77.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_77.py
    @@ -23,9 +23,8 @@
     Regression test for Issue #77 (GitHub).
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     # The following models will not be tested:
     skip_models = [
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_459.py b/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    index 103a0497e3..ae75759f3d 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    @@ -23,9 +23,8 @@
     Test that changing E_L in any neuron with this parameter leaves all other parameters unchanged.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_754.py b/testsuite/pytests/sli2py_regressions/test_ticket_754.py
    index f92a1fb0a8..6c33c3a3a3 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_754.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_754.py
    @@ -23,9 +23,8 @@
     Test that rng_seed and rng_type is handled correctly also in connection with changing VP numbers.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/sli2py_stimulating/test_ac_generator.py b/testsuite/pytests/sli2py_stimulating/test_ac_generator.py
    index f389af9c27..9d0d7be3ec 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_ac_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_ac_generator.py
    @@ -25,10 +25,11 @@
     corresponding to the current expected from the ac_generator.
     """
     
    -import nest
    -import pytest
     import math
    +
    +import nest
     import numpy as np
    +import pytest
     
     
     def test_ac_generaor():
    diff --git a/testsuite/pytests/sli2py_stimulating/test_noise_generator.py b/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    index b10298662e..9e30d0c6fc 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    @@ -24,8 +24,8 @@
     """
     
     import nest
    -import pytest
     import numpy as np
    +import pytest
     
     
     @pytest.fixture
    diff --git a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    index c1a3fdcb6c..a970d646e7 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    @@ -23,13 +23,12 @@
     Test parameter setting and correct number of spikes emitted by `pulsepacket_generator`.
     """
     
    +import nest
     import numpy as np
     import pandas as pd
     import pandas.testing as pdtest
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset():
    diff --git a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    index 20945c471c..c0175d249d 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    @@ -23,12 +23,11 @@
     Test basic properties of `sinusoidal_poisson_generator`.
     """
     
    +import nest
     import numpy as np
     import numpy.testing as nptest
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset():
    diff --git a/testsuite/pytests/sli2py_stimulating/test_spike_generator.py b/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    index 0353540535..1cea0598b5 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    @@ -24,8 +24,8 @@
     """
     
     import nest
    -import pytest
     import numpy.testing as nptest
    +import pytest
     
     
     @pytest.fixture
    diff --git a/testsuite/pytests/sli2py_stimulating/test_spike_poisson_ps.py b/testsuite/pytests/sli2py_stimulating/test_spike_poisson_ps.py
    index 4473db2d22..e3a58b9868 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_spike_poisson_ps.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_spike_poisson_ps.py
    @@ -28,12 +28,11 @@
     the spike times indeed are independent of the resolution.
     """
     
    +import nest
     import numpy as np
     import numpy.testing as nptest
     import pytest
     
    -import nest
    -
     
     def simulator(resolution):
         """
    diff --git a/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    index 81168d3e99..4ac820d1ce 100644
    --- a/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    @@ -20,8 +20,8 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import nest
    -import pytest
     import numpy as np
    +import pytest
     
     
     @pytest.fixture
    diff --git a/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py b/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    index a54047ddd1..629cc9b8d6 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    @@ -21,9 +21,9 @@
     
     
     import nest
    -import pytest
     import numpy as np
     import numpy.testing as nptest
    +import pytest
     
     pytestmark = pytest.mark.skipif_missing_gsl
     
    diff --git a/testsuite/pytests/test_aeif_lsodar.py b/testsuite/pytests/test_aeif_lsodar.py
    index 5a3795c5a4..7851df1d10 100644
    --- a/testsuite/pytests/test_aeif_lsodar.py
    +++ b/testsuite/pytests/test_aeif_lsodar.py
    @@ -21,13 +21,11 @@
     
     import os
     import unittest
    -
    -import numpy as np
    -from scipy.interpolate import interp1d
    -
     from collections import defaultdict
     
     import nest
    +import numpy as np
    +from scipy.interpolate import interp1d
     
     """
     Comparing the new implementations the aeif models to the reference solution
    diff --git a/testsuite/pytests/test_changing_tic_base.py b/testsuite/pytests/test_changing_tic_base.py
    index 941c19f94b..ac6e71eb4c 100644
    --- a/testsuite/pytests/test_changing_tic_base.py
    +++ b/testsuite/pytests/test_changing_tic_base.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py
    index 5d8f13ad7e..0eb7a02b07 100644
    --- a/testsuite/pytests/test_clopath_synapse.py
    +++ b/testsuite/pytests/test_clopath_synapse.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index 4ceb474150..2de0a5fdd6 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -23,10 +23,10 @@
     Tests for the compartmental model
     """
     
    -import nest
     import unittest
    -import numpy as np
     
    +import nest
    +import numpy as np
     
     SP = {"C_m": 1.00, "g_C": 0.00, "g_L": 0.100, "e_L": -70.0}
     DP = [
    diff --git a/testsuite/pytests/test_connect_all_to_all.py b/testsuite/pytests/test_connect_all_to_all.py
    index a7e6873111..ab164c4906 100644
    --- a/testsuite/pytests/test_connect_all_to_all.py
    +++ b/testsuite/pytests/test_connect_all_to_all.py
    @@ -21,11 +21,11 @@
     
     
     import unittest
    -import numpy as np
    -import scipy.stats
    +
     import connect_test_base
     import nest
    -
    +import numpy as np
    +import scipy.stats
     
     HAVE_THREADS = nest.build_info["have_threads"]
     
    diff --git a/testsuite/pytests/test_connect_array_fixed_indegree.py b/testsuite/pytests/test_connect_array_fixed_indegree.py
    index 11ff3dfb51..2b7942c419 100644
    --- a/testsuite/pytests/test_connect_array_fixed_indegree.py
    +++ b/testsuite/pytests/test_connect_array_fixed_indegree.py
    @@ -25,6 +25,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_connect_array_fixed_outdegree.py b/testsuite/pytests/test_connect_array_fixed_outdegree.py
    index 7e1a94f5a0..bbaccc576d 100644
    --- a/testsuite/pytests/test_connect_array_fixed_outdegree.py
    +++ b/testsuite/pytests/test_connect_array_fixed_outdegree.py
    @@ -25,8 +25,8 @@
     """
     
     import unittest
    -import nest
     
    +import nest
     
     HAVE_THREADS = nest.build_info["have_threads"]
     
    diff --git a/testsuite/pytests/test_connect_arrays.py b/testsuite/pytests/test_connect_arrays.py
    index 4456e46819..4fa70eda4e 100644
    --- a/testsuite/pytests/test_connect_arrays.py
    +++ b/testsuite/pytests/test_connect_arrays.py
    @@ -20,9 +20,9 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    -import numpy as np
     
     import nest
    +import numpy as np
     
     nest.set_verbosity(nest.verbosity.M_WARNING)
     
    diff --git a/testsuite/pytests/test_connect_conngen.py b/testsuite/pytests/test_connect_conngen.py
    index 1cd71cdd5e..22913f9c59 100644
    --- a/testsuite/pytests/test_connect_conngen.py
    +++ b/testsuite/pytests/test_connect_conngen.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     try:
    diff --git a/testsuite/pytests/test_connect_fixed_indegree.py b/testsuite/pytests/test_connect_fixed_indegree.py
    index e70bdb915c..2a1615a2c8 100644
    --- a/testsuite/pytests/test_connect_fixed_indegree.py
    +++ b/testsuite/pytests/test_connect_fixed_indegree.py
    @@ -20,12 +20,12 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     
    -import numpy as np
     import unittest
    -import scipy.stats
    +
     import connect_test_base
     import nest
    -
    +import numpy as np
    +import scipy.stats
     
     HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
     
    diff --git a/testsuite/pytests/test_connect_fixed_outdegree.py b/testsuite/pytests/test_connect_fixed_outdegree.py
    index 9648cb0769..9547ec8438 100644
    --- a/testsuite/pytests/test_connect_fixed_outdegree.py
    +++ b/testsuite/pytests/test_connect_fixed_outdegree.py
    @@ -19,12 +19,12 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import numpy as np
     import unittest
    -import scipy.stats
    +
     import connect_test_base
     import nest
    -
    +import numpy as np
    +import scipy.stats
     
     HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
     
    diff --git a/testsuite/pytests/test_connect_fixed_total_number.py b/testsuite/pytests/test_connect_fixed_total_number.py
    index faf4ef73b0..006b8e097e 100644
    --- a/testsuite/pytests/test_connect_fixed_total_number.py
    +++ b/testsuite/pytests/test_connect_fixed_total_number.py
    @@ -19,12 +19,12 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import numpy as np
     import unittest
    -import scipy.stats
    +
     import connect_test_base
     import nest
    -
    +import numpy as np
    +import scipy.stats
     
     HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
     
    diff --git a/testsuite/pytests/test_connect_node_collection.py b/testsuite/pytests/test_connect_node_collection.py
    index 768108392a..4b78a7b516 100644
    --- a/testsuite/pytests/test_connect_node_collection.py
    +++ b/testsuite/pytests/test_connect_node_collection.py
    @@ -23,9 +23,8 @@
     Test basic connection with ``NodeCollection``.
     """
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/test_connect_one_to_one.py b/testsuite/pytests/test_connect_one_to_one.py
    index 7c1726fc86..7bcce2f8f4 100644
    --- a/testsuite/pytests/test_connect_one_to_one.py
    +++ b/testsuite/pytests/test_connect_one_to_one.py
    @@ -19,11 +19,11 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import numpy as np
     import unittest
    +
     import connect_test_base
     import nest
    -
    +import numpy as np
     
     HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
     
    diff --git a/testsuite/pytests/test_connect_pairwise_bernoulli.py b/testsuite/pytests/test_connect_pairwise_bernoulli.py
    index 21ed8a570b..cb8e2a110e 100644
    --- a/testsuite/pytests/test_connect_pairwise_bernoulli.py
    +++ b/testsuite/pytests/test_connect_pairwise_bernoulli.py
    @@ -20,12 +20,12 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     
    -import numpy as np
     import unittest
    -import scipy.stats
    +
     import connect_test_base
     import nest
    -
    +import numpy as np
    +import scipy.stats
     
     HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
     
    diff --git a/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py b/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py
    index 3049eb6aba..f55134a270 100644
    --- a/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py
    +++ b/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py
    @@ -21,12 +21,12 @@
     
     
     import collections
    -import numpy as np
     import unittest
    -import scipy.stats
    +
     import connect_test_base
     import nest
    -
    +import numpy as np
    +import scipy.stats
     
     HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
     
    diff --git a/testsuite/pytests/test_correlospinmatrix_detector.py b/testsuite/pytests/test_correlospinmatrix_detector.py
    index 21bd14eb22..289f7529c7 100644
    --- a/testsuite/pytests/test_correlospinmatrix_detector.py
    +++ b/testsuite/pytests/test_correlospinmatrix_detector.py
    @@ -21,8 +21,8 @@
     
     
     import nest
    -import pytest
     import numpy as np
    +import pytest
     
     
     def test_correlospinmatrix_detector():
    diff --git a/testsuite/pytests/test_current_recording_generators.py b/testsuite/pytests/test_current_recording_generators.py
    index 13c2297c11..a0a4838724 100644
    --- a/testsuite/pytests/test_current_recording_generators.py
    +++ b/testsuite/pytests/test_current_recording_generators.py
    @@ -23,9 +23,10 @@
     Test if currents from generators are being recorded properly
     """
     
    -import numpy
     import unittest
    +
     import nest
    +import numpy
     
     
     class CurrentRecordingGeneratorTestCase(unittest.TestCase):
    diff --git a/testsuite/pytests/test_erfc_neuron.py b/testsuite/pytests/test_erfc_neuron.py
    index 84b618b93a..395c372f0d 100644
    --- a/testsuite/pytests/test_erfc_neuron.py
    +++ b/testsuite/pytests/test_erfc_neuron.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     import numpy as np
     from scipy.special import erfc
    diff --git a/testsuite/pytests/test_errors.py b/testsuite/pytests/test_errors.py
    index fffdb6badc..32e5fe2c52 100644
    --- a/testsuite/pytests/test_errors.py
    +++ b/testsuite/pytests/test_errors.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_events.py b/testsuite/pytests/test_events.py
    index a14292fbc4..c3ddb682f7 100644
    --- a/testsuite/pytests/test_events.py
    +++ b/testsuite/pytests/test_events.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_facetshw_stdp.py b/testsuite/pytests/test_facetshw_stdp.py
    index a7653a4519..d64927b302 100644
    --- a/testsuite/pytests/test_facetshw_stdp.py
    +++ b/testsuite/pytests/test_facetshw_stdp.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    +import unittest
    +
     import nest
     import numpy as np
    -import unittest
     
     
     class FacetsTestCase(unittest.TestCase):
    diff --git a/testsuite/pytests/test_get_connections.py b/testsuite/pytests/test_get_connections.py
    index 0e9c35641b..f08d1d40f5 100644
    --- a/testsuite/pytests/test_get_connections.py
    +++ b/testsuite/pytests/test_get_connections.py
    @@ -27,12 +27,11 @@
     elsewhere.
     """
     
    +import nest
     import pandas as pd
     import pandas.testing as pdtest
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset():
    diff --git a/testsuite/pytests/test_getconnections.py b/testsuite/pytests/test_getconnections.py
    index eda534880a..26126bcb7d 100644
    --- a/testsuite/pytests/test_getconnections.py
    +++ b/testsuite/pytests/test_getconnections.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     nest.set_verbosity(nest.verbosity.M_ERROR)
    diff --git a/testsuite/pytests/test_getnodes.py b/testsuite/pytests/test_getnodes.py
    index 52ac5e0396..c619b39249 100644
    --- a/testsuite/pytests/test_getnodes.py
    +++ b/testsuite/pytests/test_getnodes.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_glif_cond.py b/testsuite/pytests/test_glif_cond.py
    index b17d01377f..0874b677e7 100644
    --- a/testsuite/pytests/test_glif_cond.py
    +++ b/testsuite/pytests/test_glif_cond.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     
     try:
    diff --git a/testsuite/pytests/test_glif_psc.py b/testsuite/pytests/test_glif_psc.py
    index 3aa6b36e63..9b6ada4acd 100644
    --- a/testsuite/pytests/test_glif_psc.py
    +++ b/testsuite/pytests/test_glif_psc.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     
     try:
    diff --git a/testsuite/pytests/test_helper_functions.py b/testsuite/pytests/test_helper_functions.py
    index 39067e94ad..371fec21d2 100644
    --- a/testsuite/pytests/test_helper_functions.py
    +++ b/testsuite/pytests/test_helper_functions.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_iaf_ps_psp_accuracy.py b/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    index b7ef4c53d4..d67679533b 100644
    --- a/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    +++ b/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    @@ -63,11 +63,12 @@
     SeeAlso: testsuite::test_iaf_psp, testsuite::test_iaf_ps_dc_accuracy
     """
     
    -import nest
    -import pytest
     import math
     from math import exp
     
    +import nest
    +import pytest
    +
     # Global parameters
     T1 = 3.0
     T2 = 6.0
    diff --git a/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py b/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    index c9aaeeee28..8dcc3f03f3 100644
    --- a/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    +++ b/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    @@ -47,11 +47,12 @@
     """
     
     
    -import nest
    -import pytest
     import math
     from math import exp
     
    +import nest
    +import pytest
    +
     DEBUG = False
     
     # Global parameters
    diff --git a/testsuite/pytests/test_iaf_singularity.py b/testsuite/pytests/test_iaf_singularity.py
    index 64a39052e6..842b37acb3 100644
    --- a/testsuite/pytests/test_iaf_singularity.py
    +++ b/testsuite/pytests/test_iaf_singularity.py
    @@ -24,9 +24,9 @@
     """
     
     import nest
    -import pytest
     import numpy as np
     import pandas as pd
    +import pytest
     
     
     class TestIAFSingularity:
    diff --git a/testsuite/pytests/test_json.py b/testsuite/pytests/test_json.py
    index 55ccb9e278..ffdf842557 100644
    --- a/testsuite/pytests/test_json.py
    +++ b/testsuite/pytests/test_json.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_labeled_synapses.py b/testsuite/pytests/test_labeled_synapses.py
    index 46f276441a..1658b4710a 100644
    --- a/testsuite/pytests/test_labeled_synapses.py
    +++ b/testsuite/pytests/test_labeled_synapses.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     HAVE_GSL = nest.build_info["have_gsl"]
    diff --git a/testsuite/pytests/test_mc_neuron.py b/testsuite/pytests/test_mc_neuron.py
    index 3e91a618bb..ec29301af4 100644
    --- a/testsuite/pytests/test_mc_neuron.py
    +++ b/testsuite/pytests/test_mc_neuron.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_mip_corrdet.py b/testsuite/pytests/test_mip_corrdet.py
    index c61efd58e5..1767a78596 100644
    --- a/testsuite/pytests/test_mip_corrdet.py
    +++ b/testsuite/pytests/test_mip_corrdet.py
    @@ -26,8 +26,8 @@
     
     
     import nest
    -import pytest
     import numpy.testing as nptest
    +import pytest
     
     
     def test_correlation_detector_mip():
    diff --git a/testsuite/pytests/test_multimeter.py b/testsuite/pytests/test_multimeter.py
    index d6b129f8d8..2aa0022c93 100644
    --- a/testsuite/pytests/test_multimeter.py
    +++ b/testsuite/pytests/test_multimeter.py
    @@ -19,11 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    +import nest
     import numpy.testing as nptest
     import pytest
     
    -import nest
    -
     # Obtain all models with non-empty recordables list
     all_models_with_rec = [model for model in nest.node_models if nest.GetDefaults(model).get("recordables")]
     
    diff --git a/testsuite/pytests/test_multiple_synapses.py b/testsuite/pytests/test_multiple_synapses.py
    index 005d5724ce..399b408456 100644
    --- a/testsuite/pytests/test_multiple_synapses.py
    +++ b/testsuite/pytests/test_multiple_synapses.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_nodeParametrization.py b/testsuite/pytests/test_nodeParametrization.py
    index 50ed8c144d..cbbd8174f7 100644
    --- a/testsuite/pytests/test_nodeParametrization.py
    +++ b/testsuite/pytests/test_nodeParametrization.py
    @@ -23,11 +23,12 @@
     Node Parametrization tests
     """
     
    -import nest
    -import numpy as np
     import unittest
     import warnings
     
    +import nest
    +import numpy as np
    +
     
     class TestNodeParametrization(unittest.TestCase):
         def setUp(self):
    diff --git a/testsuite/pytests/test_node_collection_indexing_slicing.py b/testsuite/pytests/test_node_collection_indexing_slicing.py
    index c552c8c1c6..2c3b54f3b0 100644
    --- a/testsuite/pytests/test_node_collection_indexing_slicing.py
    +++ b/testsuite/pytests/test_node_collection_indexing_slicing.py
    @@ -24,11 +24,10 @@
     """
     
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset():
    diff --git a/testsuite/pytests/test_node_collection_operations.py b/testsuite/pytests/test_node_collection_operations.py
    index 75b5b38c0f..f1c3725a1e 100644
    --- a/testsuite/pytests/test_node_collection_operations.py
    +++ b/testsuite/pytests/test_node_collection_operations.py
    @@ -23,11 +23,10 @@
     Test basic operations with ``NodeCollection``.
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset():
    diff --git a/testsuite/pytests/test_node_collection_to_from_object.py b/testsuite/pytests/test_node_collection_to_from_object.py
    index fbd32ac182..4a939c94b7 100644
    --- a/testsuite/pytests/test_node_collection_to_from_object.py
    +++ b/testsuite/pytests/test_node_collection_to_from_object.py
    @@ -24,12 +24,11 @@
     """
     
     
    +import nest
     import numpy as np
     import numpy.testing as nptest
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset():
    diff --git a/testsuite/pytests/test_onetooneconnect.py b/testsuite/pytests/test_onetooneconnect.py
    index 3e0716bd7b..f4a3c2f228 100644
    --- a/testsuite/pytests/test_onetooneconnect.py
    +++ b/testsuite/pytests/test_onetooneconnect.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_parameter_operators.py b/testsuite/pytests/test_parameter_operators.py
    index 9865413121..3783e70af3 100644
    --- a/testsuite/pytests/test_parameter_operators.py
    +++ b/testsuite/pytests/test_parameter_operators.py
    @@ -32,9 +32,10 @@
        we can use constant parameters for simplicity.
     """
     
    +import operator as ops
    +
     import nest
     import pytest
    -import operator as ops
     
     
     def _const_param(val):
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index a5817b4603..711dd16a44 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -22,9 +22,10 @@
     # This script tests the parrot_neuron in NEST.
     # See test_parrot_neuron_ps.py for an equivalent test of the precise parrot.
     
    -import nest
    -import unittest
     import math
    +import unittest
    +
    +import nest
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index 05ca2ad526..50386e07c1 100644
    --- a/testsuite/pytests/test_parrot_neuron_ps.py
    +++ b/testsuite/pytests/test_parrot_neuron_ps.py
    @@ -22,9 +22,10 @@
     # This script tests the parrot_neuron_ps in NEST.
     # It is very similar to test_parrot_neuron.py, but uses precise spike times.
     
    -import nest
    -import unittest
     import math
    +import unittest
    +
    +import nest
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_poisson_generator_campbell_alpha.py b/testsuite/pytests/test_poisson_generator_campbell_alpha.py
    index 4bc0cc02ba..1c3e427b09 100644
    --- a/testsuite/pytests/test_poisson_generator_campbell_alpha.py
    +++ b/testsuite/pytests/test_poisson_generator_campbell_alpha.py
    @@ -31,8 +31,8 @@
     
     
     import nest
    -import pytest
     import numpy as np
    +import pytest
     
     
     def test_poisson_generator_alpha():
    diff --git a/testsuite/pytests/test_poisson_generator_ps.py b/testsuite/pytests/test_poisson_generator_ps.py
    index bab255818b..4ebb36776c 100644
    --- a/testsuite/pytests/test_poisson_generator_ps.py
    +++ b/testsuite/pytests/test_poisson_generator_ps.py
    @@ -33,8 +33,8 @@
     
     
     import nest
    -import pytest
     import numpy as np
    +import pytest
     
     
     def test_poisson_generator_ps():
    diff --git a/testsuite/pytests/test_poisson_generator_rate_change.py b/testsuite/pytests/test_poisson_generator_rate_change.py
    index d817d8db93..ff0d8d26a7 100644
    --- a/testsuite/pytests/test_poisson_generator_rate_change.py
    +++ b/testsuite/pytests/test_poisson_generator_rate_change.py
    @@ -20,10 +20,11 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     
    -import nest
     import unittest
    -import scipy.stats
    +
    +import nest
     import numpy as np
    +import scipy.stats
     
     
     class TestPgRateChange(unittest.TestCase):
    diff --git a/testsuite/pytests/test_poisson_ps_intervals.py b/testsuite/pytests/test_poisson_ps_intervals.py
    index 163ebb98f5..314e259470 100644
    --- a/testsuite/pytests/test_poisson_ps_intervals.py
    +++ b/testsuite/pytests/test_poisson_ps_intervals.py
    @@ -21,9 +21,8 @@
     
     
     import nest
    -import pytest
     import numpy as np
    -
    +import pytest
     
     """
     Name: testsuite::test_poisson_ps_intervals - checks coefficient of variation
    diff --git a/testsuite/pytests/test_poisson_ps_min_interval.py b/testsuite/pytests/test_poisson_ps_min_interval.py
    index 08f2087a94..3bb61e8a65 100644
    --- a/testsuite/pytests/test_poisson_ps_min_interval.py
    +++ b/testsuite/pytests/test_poisson_ps_min_interval.py
    @@ -21,9 +21,8 @@
     
     
     import nest
    -import pytest
     import numpy as np
    -
    +import pytest
     
     """
     Name: testsuite::test_poisson_ps_min_interval - checks that intervals are independent of tic size
    diff --git a/testsuite/pytests/test_pp_psc_delta.py b/testsuite/pytests/test_pp_psc_delta.py
    index d39c1904af..988e671ac8 100644
    --- a/testsuite/pytests/test_pp_psc_delta.py
    +++ b/testsuite/pytests/test_pp_psc_delta.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_pp_psc_delta_stdp.py b/testsuite/pytests/test_pp_psc_delta_stdp.py
    index 7b4c968702..17a505d193 100644
    --- a/testsuite/pytests/test_pp_psc_delta_stdp.py
    +++ b/testsuite/pytests/test_pp_psc_delta_stdp.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_quantal_stp_synapse.py b/testsuite/pytests/test_quantal_stp_synapse.py
    index b5af9a99d9..0918307620 100644
    --- a/testsuite/pytests/test_quantal_stp_synapse.py
    +++ b/testsuite/pytests/test_quantal_stp_synapse.py
    @@ -21,9 +21,10 @@
     
     # This script compares the two variants of the Tsodyks/Markram synapse in NEST.
     
    +import unittest
    +
     import nest
     import numpy
    -import unittest
     
     
     class QuantalSTPSynapseTestCase(unittest.TestCase):
    diff --git a/testsuite/pytests/test_random123.py b/testsuite/pytests/test_random123.py
    index 02c207687a..1df029cb6c 100644
    --- a/testsuite/pytests/test_random123.py
    +++ b/testsuite/pytests/test_random123.py
    @@ -28,8 +28,8 @@
     """
     
     import unittest
    -import nest
     
    +import nest
     
     try:
         import scipy.stats
    diff --git a/testsuite/pytests/test_random_parameter.py b/testsuite/pytests/test_random_parameter.py
    index 0eaa95311e..f97a9f5e8b 100644
    --- a/testsuite/pytests/test_random_parameter.py
    +++ b/testsuite/pytests/test_random_parameter.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_rate_copy_model.py b/testsuite/pytests/test_rate_copy_model.py
    index 79ce72779e..f4d4c9a593 100644
    --- a/testsuite/pytests/test_rate_copy_model.py
    +++ b/testsuite/pytests/test_rate_copy_model.py
    @@ -19,8 +19,9 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
    +
    +import nest
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_rate_instantaneous_and_delayed.py b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    index d94e15af20..84c50b64a7 100644
    --- a/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    +++ b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    @@ -19,8 +19,9 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
    +
    +import nest
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_rate_neuron.py b/testsuite/pytests/test_rate_neuron.py
    index 516e68541d..e8b4f47734 100644
    --- a/testsuite/pytests/test_rate_neuron.py
    +++ b/testsuite/pytests/test_rate_neuron.py
    @@ -25,8 +25,9 @@
     # standard deviation of the output noise, which already determines the variance
     # of the rate.
     
    -import nest
     import unittest
    +
    +import nest
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_rate_neuron_communication.py b/testsuite/pytests/test_rate_neuron_communication.py
    index 10895bd614..e9e8f79451 100644
    --- a/testsuite/pytests/test_rate_neuron_communication.py
    +++ b/testsuite/pytests/test_rate_neuron_communication.py
    @@ -22,8 +22,9 @@
     # This test checks interactions between rate neurons, i.e.
     # the delay, weight and nonlinearities of rate neurons.
     
    -import nest
     import unittest
    +
    +import nest
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_recording_backend_ascii.py b/testsuite/pytests/test_recording_backend_ascii.py
    index c4560792b9..4ba1815994 100644
    --- a/testsuite/pytests/test_recording_backend_ascii.py
    +++ b/testsuite/pytests/test_recording_backend_ascii.py
    @@ -21,6 +21,7 @@
     
     import os
     import unittest
    +
     import nest
     
     HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    diff --git a/testsuite/pytests/test_recording_backend_memory.py b/testsuite/pytests/test_recording_backend_memory.py
    index 6d95e0d220..7f1b105b16 100644
    --- a/testsuite/pytests/test_recording_backend_memory.py
    +++ b/testsuite/pytests/test_recording_backend_memory.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_recording_backends.py b/testsuite/pytests/test_recording_backends.py
    index 483be7852f..8afeedaafb 100644
    --- a/testsuite/pytests/test_recording_backends.py
    +++ b/testsuite/pytests/test_recording_backends.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     
     HAVE_SIONLIB = nest.build_info["have_sionlib"]
    diff --git a/testsuite/pytests/test_refractory.py b/testsuite/pytests/test_refractory.py
    index bd59f6becb..792a1939bd 100644
    --- a/testsuite/pytests/test_refractory.py
    +++ b/testsuite/pytests/test_refractory.py
    @@ -21,9 +21,8 @@
     
     import unittest
     
    -import numpy as np
    -
     import nest
    +import numpy as np
     
     """
     Assert that all neuronal models that have a refractory period implement it
    diff --git a/testsuite/pytests/test_regression_issue-1034.py b/testsuite/pytests/test_regression_issue-1034.py
    index 5f1a933374..e1ee0a4c67 100644
    --- a/testsuite/pytests/test_regression_issue-1034.py
    +++ b/testsuite/pytests/test_regression_issue-1034.py
    @@ -19,11 +19,12 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    +import unittest
    +
     import nest
     import numpy as np
     import scipy as sp
     import scipy.stats
    -import unittest
     
     
     class PostTraceTester:
    diff --git a/testsuite/pytests/test_regression_issue-1409.py b/testsuite/pytests/test_regression_issue-1409.py
    index 1157ce50ff..18ee2d230e 100644
    --- a/testsuite/pytests/test_regression_issue-1409.py
    +++ b/testsuite/pytests/test_regression_issue-1409.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    +import unittest
    +
     import nest
     import numpy as np
    -import unittest
     
     HAVE_THREADS = nest.build_info["have_threads"]
     
    diff --git a/testsuite/pytests/test_regression_issue-2069.py b/testsuite/pytests/test_regression_issue-2069.py
    index 292cb80913..df9aa88f8f 100644
    --- a/testsuite/pytests/test_regression_issue-2069.py
    +++ b/testsuite/pytests/test_regression_issue-2069.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
    +
     
     class SynSpecCopyTestCase(unittest.TestCase):
         def test_syn_spec_copied(self):
    diff --git a/testsuite/pytests/test_regression_issue-2125.py b/testsuite/pytests/test_regression_issue-2125.py
    index 9dc4d2ff97..2fc326d2b6 100644
    --- a/testsuite/pytests/test_regression_issue-2125.py
    +++ b/testsuite/pytests/test_regression_issue-2125.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
    +
     HAVE_THREADS = nest.build_info["have_threads"]
     
     
    diff --git a/testsuite/pytests/test_regression_issue-2480.py b/testsuite/pytests/test_regression_issue-2480.py
    index a16ef7be55..42d2c29341 100644
    --- a/testsuite/pytests/test_regression_issue-2480.py
    +++ b/testsuite/pytests/test_regression_issue-2480.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    +import warnings
    +
     import nest
     import pytest
    -import warnings
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/test_siegert_neuron.py b/testsuite/pytests/test_siegert_neuron.py
    index 012510ec0a..1cafbb0e1d 100644
    --- a/testsuite/pytests/test_siegert_neuron.py
    +++ b/testsuite/pytests/test_siegert_neuron.py
    @@ -21,8 +21,9 @@
     
     # This script tests the siegert_neuron in NEST.
     
    -import nest
     import unittest
    +
    +import nest
     import numpy as np
     
     HAVE_GSL = nest.build_info["have_gsl"]
    diff --git a/testsuite/pytests/test_sonata.py b/testsuite/pytests/test_sonata.py
    index 27d037439a..7497c64a74 100644
    --- a/testsuite/pytests/test_sonata.py
    +++ b/testsuite/pytests/test_sonata.py
    @@ -21,9 +21,8 @@
     
     from pathlib import Path
     
    -import pytest
    -
     import nest
    +import pytest
     
     # Skip all tests in this module if no HDF5 or OpenMP threads
     pytestmark = [pytest.mark.skipif_missing_hdf5, pytest.mark.skipif_missing_threads]
    diff --git a/testsuite/pytests/test_sp/test_conn_builder.py b/testsuite/pytests/test_sp/test_conn_builder.py
    index 5395d2692c..1900bab9fb 100644
    --- a/testsuite/pytests/test_sp/test_conn_builder.py
    +++ b/testsuite/pytests/test_sp/test_conn_builder.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
    +
     __author__ = "naveau"
     
     
    diff --git a/testsuite/pytests/test_sp/test_disconnect.py b/testsuite/pytests/test_sp/test_disconnect.py
    index a5692ea5ba..fe592d93d6 100644
    --- a/testsuite/pytests/test_sp/test_disconnect.py
    +++ b/testsuite/pytests/test_sp/test_disconnect.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
    +
     try:
         from mpi4py import MPI
     
    diff --git a/testsuite/pytests/test_sp/test_disconnect_multiple.py b/testsuite/pytests/test_sp/test_disconnect_multiple.py
    index 3e44fca40d..8e42c42aad 100644
    --- a/testsuite/pytests/test_sp/test_disconnect_multiple.py
    +++ b/testsuite/pytests/test_sp/test_disconnect_multiple.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
    +
     __author__ = "naveau"
     
     
    diff --git a/testsuite/pytests/test_sp/test_enable_multithread.py b/testsuite/pytests/test_sp/test_enable_multithread.py
    index e433177506..3a2d32313a 100644
    --- a/testsuite/pytests/test_sp/test_enable_multithread.py
    +++ b/testsuite/pytests/test_sp/test_enable_multithread.py
    @@ -19,9 +19,9 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
     
     __author__ = "sdiaz"
     
    diff --git a/testsuite/pytests/test_sp/test_growth_curves.py b/testsuite/pytests/test_sp/test_growth_curves.py
    index 50fec78780..4828f3a1ce 100644
    --- a/testsuite/pytests/test_sp/test_growth_curves.py
    +++ b/testsuite/pytests/test_sp/test_growth_curves.py
    @@ -19,12 +19,13 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -from scipy.integrate import quad
     import math
    -import numpy
    -from numpy import testing
     import unittest
    +
     import nest
    +import numpy
    +from numpy import testing
    +from scipy.integrate import quad
     
     HAVE_THREADS = nest.build_info["have_threads"]
     
    diff --git a/testsuite/pytests/test_sp/test_sp_autapses_multapses.py b/testsuite/pytests/test_sp/test_sp_autapses_multapses.py
    index d7ea4185f5..1d181fffc0 100644
    --- a/testsuite/pytests/test_sp/test_sp_autapses_multapses.py
    +++ b/testsuite/pytests/test_sp/test_sp_autapses_multapses.py
    @@ -19,11 +19,11 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
    -
     from pprint import pprint
     
    +import nest
    +
     
     class TestStructuralPlasticityAutapses(unittest.TestCase):
         def test_autapses(self):
    diff --git a/testsuite/pytests/test_sp/test_sp_manager.py b/testsuite/pytests/test_sp/test_sp_manager.py
    index 42f054394f..0043c7817a 100644
    --- a/testsuite/pytests/test_sp/test_sp_manager.py
    +++ b/testsuite/pytests/test_sp/test_sp_manager.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
    +
     __author__ = "naveau"
     
     
    diff --git a/testsuite/pytests/test_sp/test_synaptic_elements.py b/testsuite/pytests/test_sp/test_synaptic_elements.py
    index 15286b710a..bc38fca933 100644
    --- a/testsuite/pytests/test_sp/test_synaptic_elements.py
    +++ b/testsuite/pytests/test_sp/test_synaptic_elements.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
    +
     
     class TestSynapticElements(unittest.TestCase):
         def setUp(self):
    diff --git a/testsuite/pytests/test_sp/test_update_synaptic_elements.py b/testsuite/pytests/test_sp/test_update_synaptic_elements.py
    index 3597e25346..7957435f95 100644
    --- a/testsuite/pytests/test_sp/test_update_synaptic_elements.py
    +++ b/testsuite/pytests/test_sp/test_update_synaptic_elements.py
    @@ -19,9 +19,10 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
     
    +import nest
    +
     
     class TestUpdateSynapticElements(unittest.TestCase):
         def setUp(self):
    diff --git a/testsuite/pytests/test_spatial/test_SynapseCollection_distance.py b/testsuite/pytests/test_spatial/test_SynapseCollection_distance.py
    index c83f78b9ac..854c425d48 100644
    --- a/testsuite/pytests/test_spatial/test_SynapseCollection_distance.py
    +++ b/testsuite/pytests/test_spatial/test_SynapseCollection_distance.py
    @@ -23,10 +23,11 @@
     Tests distance between sources and targets of SynapseCollection
     """
     
    -import pytest
     import math
    -import numpy as np
    +
     import nest
    +import numpy as np
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/test_spatial/test_basics.py b/testsuite/pytests/test_spatial/test_basics.py
    index 6c00331cbe..b9af3a2db9 100644
    --- a/testsuite/pytests/test_spatial/test_basics.py
    +++ b/testsuite/pytests/test_spatial/test_basics.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     try:
    diff --git a/testsuite/pytests/test_spatial/test_connect_layers.py b/testsuite/pytests/test_spatial/test_connect_layers.py
    index 1c0abc67b9..a346c70ccb 100644
    --- a/testsuite/pytests/test_spatial/test_connect_layers.py
    +++ b/testsuite/pytests/test_spatial/test_connect_layers.py
    @@ -23,10 +23,10 @@
     """
     
     import unittest
    +
     import nest
     import numpy as np
     
    -
     try:
         import scipy.stats
     
    diff --git a/testsuite/pytests/test_spatial/test_connect_sliced.py b/testsuite/pytests/test_spatial/test_connect_sliced.py
    index 534bdc6015..ebd9877f7c 100644
    --- a/testsuite/pytests/test_spatial/test_connect_sliced.py
    +++ b/testsuite/pytests/test_spatial/test_connect_sliced.py
    @@ -23,6 +23,7 @@
     """
     
     import unittest
    +
     import nest
     import numpy as np
     import numpy.testing as np_testing
    diff --git a/testsuite/pytests/test_spatial/test_connection_with_elliptical_mask.py b/testsuite/pytests/test_spatial/test_connection_with_elliptical_mask.py
    index d1c4d11bba..478fc78fe4 100644
    --- a/testsuite/pytests/test_spatial/test_connection_with_elliptical_mask.py
    +++ b/testsuite/pytests/test_spatial/test_connection_with_elliptical_mask.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_spatial/test_create_spatial.py b/testsuite/pytests/test_spatial/test_create_spatial.py
    index 82526ba1c7..453271a2d6 100644
    --- a/testsuite/pytests/test_spatial/test_create_spatial.py
    +++ b/testsuite/pytests/test_spatial/test_create_spatial.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_spatial/test_distance.py b/testsuite/pytests/test_spatial/test_distance.py
    index 628496c59a..10024b891a 100644
    --- a/testsuite/pytests/test_spatial/test_distance.py
    +++ b/testsuite/pytests/test_spatial/test_distance.py
    @@ -25,9 +25,8 @@
     
     from math import sqrt
     
    -import pytest
    -
     import nest
    +import pytest
     
     
     @pytest.fixture(autouse=True)
    diff --git a/testsuite/pytests/test_spatial/test_dumping.py b/testsuite/pytests/test_spatial/test_dumping.py
    index 7b836ec022..20b7a797a3 100644
    --- a/testsuite/pytests/test_spatial/test_dumping.py
    +++ b/testsuite/pytests/test_spatial/test_dumping.py
    @@ -23,9 +23,10 @@
     Tests for hl_api_spatial dumping functions.
     """
     
    +import os
     import unittest
    +
     import nest
    -import os
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_spatial/test_layerNodeCollection.py b/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    index 493b3c82ba..691eefb823 100644
    --- a/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    +++ b/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_spatial/test_layer_get_set.py b/testsuite/pytests/test_spatial/test_layer_get_set.py
    index 4b817b1c5a..5f21e95e2d 100644
    --- a/testsuite/pytests/test_spatial/test_layer_get_set.py
    +++ b/testsuite/pytests/test_spatial/test_layer_get_set.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_spatial/test_parameter_apply.py b/testsuite/pytests/test_spatial/test_parameter_apply.py
    index 167d7f62ef..ab81545101 100644
    --- a/testsuite/pytests/test_spatial/test_parameter_apply.py
    +++ b/testsuite/pytests/test_spatial/test_parameter_apply.py
    @@ -23,11 +23,10 @@
     Test ``Parameter`` ``apply`` method for spatial ``NodeCollection``.
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     
     @pytest.fixture(autouse=True)
     def reset():
    diff --git a/testsuite/pytests/test_spatial/test_plotting.py b/testsuite/pytests/test_spatial/test_plotting.py
    index 5f4f74ca1a..ec88193180 100644
    --- a/testsuite/pytests/test_spatial/test_plotting.py
    +++ b/testsuite/pytests/test_spatial/test_plotting.py
    @@ -23,9 +23,9 @@
     Tests for basic spatial plotting functions.
     """
     
    -import pytest
     import nest
     import numpy as np
    +import pytest
     
     try:
         import matplotlib
    diff --git a/testsuite/pytests/test_spatial/test_rotated_rect_mask.py b/testsuite/pytests/test_spatial/test_rotated_rect_mask.py
    index b48dd910ce..dd4a6a8c10 100644
    --- a/testsuite/pytests/test_spatial/test_rotated_rect_mask.py
    +++ b/testsuite/pytests/test_spatial/test_rotated_rect_mask.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_spatial/test_selection_function_and_elliptical_mask.py b/testsuite/pytests/test_spatial/test_selection_function_and_elliptical_mask.py
    index ef6675ca61..6df130f8fe 100644
    --- a/testsuite/pytests/test_spatial/test_selection_function_and_elliptical_mask.py
    +++ b/testsuite/pytests/test_spatial/test_selection_function_and_elliptical_mask.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_spatial/test_spatial_distributions.py b/testsuite/pytests/test_spatial/test_spatial_distributions.py
    index 89ff1c2955..b1b86adb99 100644
    --- a/testsuite/pytests/test_spatial/test_spatial_distributions.py
    +++ b/testsuite/pytests/test_spatial/test_spatial_distributions.py
    @@ -32,15 +32,14 @@
     """
     
     import math
    +import unittest
    +
    +import nest
     import numpy as np
     import numpy.random as rnd
     import scipy.integrate
    -import scipy.stats
     import scipy.special
    -import unittest
    -
    -import nest
    -
    +import scipy.stats
     
     try:
         # for debugging
    diff --git a/testsuite/pytests/test_spatial/test_weight_delay.py b/testsuite/pytests/test_spatial/test_weight_delay.py
    index 70922da4db..3cd0a76180 100644
    --- a/testsuite/pytests/test_spatial/test_weight_delay.py
    +++ b/testsuite/pytests/test_spatial/test_weight_delay.py
    @@ -29,11 +29,10 @@
     weights are 1.0, 0.98, 0.96, 0.94, 0.92, 0.90, 0.88, 0.86, 0.84, 0.82.
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
     
     def build_network(layer_type):
         """Build spatial network with specified layer type."""
    diff --git a/testsuite/pytests/test_spike_train_injector.py b/testsuite/pytests/test_spike_train_injector.py
    index 2f3a28bcf7..07e000b0d6 100644
    --- a/testsuite/pytests/test_spike_train_injector.py
    +++ b/testsuite/pytests/test_spike_train_injector.py
    @@ -27,9 +27,10 @@
     simulation.
     """
     
    +import math
    +
     import nest
     import pytest
    -import math
     
     
     @pytest.fixture
    diff --git a/testsuite/pytests/test_spike_transmission.py b/testsuite/pytests/test_spike_transmission.py
    index 590283da1b..58b95e7f1a 100644
    --- a/testsuite/pytests/test_spike_transmission.py
    +++ b/testsuite/pytests/test_spike_transmission.py
    @@ -26,7 +26,6 @@
     import nest
     import pytest
     
    -
     # This is a hack until I find out how to use the have_threads fixture to
     # implement this switch. Then, one should also see if we can parametrize
     # the entire class instead of parametrizing each test in the class in the
    diff --git a/testsuite/pytests/test_split_simulation.py b/testsuite/pytests/test_split_simulation.py
    index ee85225d39..8ac045357f 100644
    --- a/testsuite/pytests/test_split_simulation.py
    +++ b/testsuite/pytests/test_split_simulation.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_status.py b/testsuite/pytests/test_status.py
    index 47e01224fe..0fc6f4b348 100644
    --- a/testsuite/pytests/test_status.py
    +++ b/testsuite/pytests/test_status.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_stdp_nn_synapses.py b/testsuite/pytests/test_stdp_nn_synapses.py
    index 5b9ea9d7eb..732578c494 100644
    --- a/testsuite/pytests/test_stdp_nn_synapses.py
    +++ b/testsuite/pytests/test_stdp_nn_synapses.py
    @@ -22,12 +22,12 @@
     # This script tests the stdp_nn_symm_synapse, stdp_nn_pre_centered_synapse,
     # and stdp_nn_restr_synapse in NEST.
     
    +from math import exp
    +
     import nest
     import numpy as np
     import pytest
     
    -from math import exp
    -
     
     class TestSTDPNNSynapses:
         """
    diff --git a/testsuite/pytests/test_stdp_pl_synapse_hom.py b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    index b551056216..a9dcb6507d 100644
    --- a/testsuite/pytests/test_stdp_pl_synapse_hom.py
    +++ b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    @@ -19,10 +19,11 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
    -import pytest
     from math import exp
    +
    +import nest
     import numpy as np
    +import pytest
     
     DEBUG_PLOTS = False
     
    diff --git a/testsuite/pytests/test_stdp_synapse.py b/testsuite/pytests/test_stdp_synapse.py
    index a7a9194711..ff1450e9b9 100644
    --- a/testsuite/pytests/test_stdp_synapse.py
    +++ b/testsuite/pytests/test_stdp_synapse.py
    @@ -19,8 +19,9 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     from math import exp
    +
    +import nest
     import numpy as np
     import pytest
     
    diff --git a/testsuite/pytests/test_stdp_triplet_synapse.py b/testsuite/pytests/test_stdp_triplet_synapse.py
    index e1902cddd0..afed1bb3b5 100644
    --- a/testsuite/pytests/test_stdp_triplet_synapse.py
    +++ b/testsuite/pytests/test_stdp_triplet_synapse.py
    @@ -21,9 +21,10 @@
     
     # This script tests the stdp_triplet_synapse in NEST.
     
    -import nest
     import unittest
     from math import exp
    +
    +import nest
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_step_rate_generator.py b/testsuite/pytests/test_step_rate_generator.py
    index 80eecca550..1e163279a2 100644
    --- a/testsuite/pytests/test_step_rate_generator.py
    +++ b/testsuite/pytests/test_step_rate_generator.py
    @@ -19,8 +19,9 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import nest
     import unittest
    +
    +import nest
     import numpy as np
     
     
    diff --git a/testsuite/pytests/test_synapsecollection.py b/testsuite/pytests/test_synapsecollection.py
    index 503a7c73f5..fda1fc8e0d 100644
    --- a/testsuite/pytests/test_synapsecollection.py
    +++ b/testsuite/pytests/test_synapsecollection.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     try:
    diff --git a/testsuite/pytests/test_threads.py b/testsuite/pytests/test_threads.py
    index 0af53f9e4f..36bb965627 100644
    --- a/testsuite/pytests/test_threads.py
    +++ b/testsuite/pytests/test_threads.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/test_tsodyks2_synapse.py b/testsuite/pytests/test_tsodyks2_synapse.py
    index c99ec65b7c..29a3c73808 100644
    --- a/testsuite/pytests/test_tsodyks2_synapse.py
    +++ b/testsuite/pytests/test_tsodyks2_synapse.py
    @@ -19,10 +19,11 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -import numpy as np
    -import nest
     import unittest
     
    +import nest
    +import numpy as np
    +
     
     class Tsodyks2SynapseTest(unittest.TestCase):
         """
    diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py
    index e0df60c45d..053a4ec92a 100644
    --- a/testsuite/pytests/test_urbanczik_synapse.py
    +++ b/testsuite/pytests/test_urbanczik_synapse.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     import numpy as np
     
    diff --git a/testsuite/pytests/test_visualization.py b/testsuite/pytests/test_visualization.py
    index 0da2cf2e99..1896264060 100644
    --- a/testsuite/pytests/test_visualization.py
    +++ b/testsuite/pytests/test_visualization.py
    @@ -23,9 +23,10 @@
     Tests for visualization functions.
     """
     
    +import os
    +
     import nest
     import numpy as np
    -import os
     import pytest
     
     try:
    diff --git a/testsuite/pytests/test_vogels_sprekeler_synapse.py b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    index 09ea9ac60e..fefc46c484 100644
    --- a/testsuite/pytests/test_vogels_sprekeler_synapse.py
    +++ b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    @@ -21,10 +21,11 @@
     
     # This script tests the vogels_sprekeler_synapse in NEST.
     
    -import nest
     import unittest
     from math import exp
     
    +import nest
    +
     
     class VogelsSprekelerConnectionTestCase(unittest.TestCase):
         """Check vogels_sprekeler_synapse model properties."""
    diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py
    index a296abdc4c..e962b4f435 100644
    --- a/testsuite/pytests/test_weight_recorder.py
    +++ b/testsuite/pytests/test_weight_recorder.py
    @@ -25,9 +25,8 @@
     
     import unittest
     
    -import numpy as np
    -
     import nest
    +import numpy as np
     
     HAVE_GSL = nest.build_info["have_gsl"]
     HAVE_THREADS = nest.build_info["have_threads"]
    diff --git a/testsuite/pytests/test_weights_as_lists.py b/testsuite/pytests/test_weights_as_lists.py
    index c123e23111..b6042765f1 100644
    --- a/testsuite/pytests/test_weights_as_lists.py
    +++ b/testsuite/pytests/test_weights_as_lists.py
    @@ -24,6 +24,7 @@
     """
     
     import unittest
    +
     import nest
     
     
    diff --git a/testsuite/pytests/utilities/testsimulation.py b/testsuite/pytests/utilities/testsimulation.py
    index 0339835bf6..53db86a37b 100644
    --- a/testsuite/pytests/utilities/testsimulation.py
    +++ b/testsuite/pytests/utilities/testsimulation.py
    @@ -21,9 +21,8 @@
     
     import dataclasses
     
    -import numpy as np
    -
     import nest
    +import numpy as np
     import testutil
     
     
    diff --git a/testsuite/pytests/utilities/testutil.py b/testsuite/pytests/utilities/testutil.py
    index 58dc2c56f5..9169c50c93 100644
    --- a/testsuite/pytests/utilities/testutil.py
    +++ b/testsuite/pytests/utilities/testutil.py
    @@ -20,9 +20,10 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import dataclasses
    +import sys
    +
     import numpy as np
     import pytest
    -import sys
     
     
     def parameter_fixture(name, default_factory=lambda: None):
    diff --git a/testsuite/regressiontests/issue-1703.py b/testsuite/regressiontests/issue-1703.py
    index 187d894f7d..099f3205bc 100644
    --- a/testsuite/regressiontests/issue-1703.py
    +++ b/testsuite/regressiontests/issue-1703.py
    @@ -27,9 +27,9 @@
     """
     
     import os
    -import sys
    -import subprocess
     import shlex
    +import subprocess
    +import sys
     
     EXIT_CODE_SUCCESS = 0
     EXIT_CODE_ERROR = 1
    diff --git a/testsuite/regressiontests/issue-779-1016.py b/testsuite/regressiontests/issue-779-1016.py
    index 42fd66ce05..e182bc8cdd 100644
    --- a/testsuite/regressiontests/issue-779-1016.py
    +++ b/testsuite/regressiontests/issue-779-1016.py
    @@ -26,9 +26,9 @@
     This is a regression test for GitHub issues 779 and 1016.
     """
     
    -from subprocess import check_output, STDOUT
    -from tempfile import mktemp
     import sys
    +from subprocess import STDOUT, check_output
    +from tempfile import mktemp
     
     EXIT_SUCCESS = 0
     EXIT_FAILURE = 126
    diff --git a/testsuite/summarize_tests.py b/testsuite/summarize_tests.py
    index 1497601fc4..de26ecfedd 100644
    --- a/testsuite/summarize_tests.py
    +++ b/testsuite/summarize_tests.py
    @@ -27,11 +27,11 @@
     #
     # <No of tests run> <No of skipped tests> <No of failed tests> <No of errored tests> <List of unsuccessful tests>
     
    -import junitparser as jp
     import glob
     import os
     import sys
     
    +import junitparser as jp
     
     assert int(jp.version.split(".")[0]) >= 2, "junitparser version must be >= 2"
     
    
    From 313079a9d7cd99d95f9108d01f258ad064aa0f88 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Wed, 13 Sep 2023 16:00:08 +0200
    Subject: [PATCH 151/375] Replace auto-based template by regular one to make
     clang compile the code
    
    ---
     nestkernel/event_delivery_manager.cpp | 2 +-
     nestkernel/kernel_manager.h           | 2 +-
     nestkernel/nest_names.h               | 4 ++--
     nestkernel/node_collection.h          | 7 +++++--
     nestkernel/node_collection_impl.h     | 6 ++++--
     5 files changed, 13 insertions(+), 8 deletions(-)
    
    diff --git a/nestkernel/event_delivery_manager.cpp b/nestkernel/event_delivery_manager.cpp
    index 269d4ba550..92bc4772ca 100644
    --- a/nestkernel/event_delivery_manager.cpp
    +++ b/nestkernel/event_delivery_manager.cpp
    @@ -191,7 +191,7 @@ EventDeliveryManager::get_status( dictionary& dict )
       dictionary log_events;
       dict[ names::spike_buffer_resize_log ] = log_events;
       send_recv_buffer_resize_log_.to_dict( log_events );
    -  
    +
     #ifdef TIMER_DETAILED
       dict[ names::time_collocate_spike_data ] = sw_collocate_spike_data_.elapsed();
       dict[ names::time_communicate_spike_data ] = sw_communicate_spike_data_.elapsed();
    diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h
    index 941c361454..4762bfad59 100644
    --- a/nestkernel/kernel_manager.h
    +++ b/nestkernel/kernel_manager.h
    @@ -264,7 +264,7 @@ class KernelManager
       unsigned long get_fingerprint() const;
     
       DictionaryAccessFlagManager& get_dict_access_flag_manager();
    -  
    +
       /**
        * Write data to file per rank and thread. For use with FULL_LOGGING.
        *
    diff --git a/nestkernel/nest_names.h b/nestkernel/nest_names.h
    index d8ab68020c..ec58820faf 100644
    --- a/nestkernel/nest_names.h
    +++ b/nestkernel/nest_names.h
    @@ -96,7 +96,7 @@ const std::string beta_Ca( "beta_Ca" );
     const std::string biological_time( "biological_time" );
     const std::string box( "box" );
     const std::string spike_buffer_grow_extra( "spike_buffer_grow_extra" );
    -const std::string spike_buffer_resize_log( "spike_buffer_resize_log" );  
    +const std::string spike_buffer_resize_log( "spike_buffer_resize_log" );
     const std::string spike_buffer_shrink_limit( "spike_buffer_shrink_limit" );
     const std::string spike_buffer_shrink_spare( "spike_buffer_shrink_spare" );
     const std::string buffer_size( "buffer_size" );
    @@ -330,7 +330,7 @@ const std::string n_receptors( "n_receptors" );
     const std::string n_synapses( "n_synapses" );
     const std::string network_size( "network_size" );
     const std::string neuron( "neuron" );
    -const std::string new_buffer_size( "new_buffer_size" );  
    +const std::string new_buffer_size( "new_buffer_size" );
     const std::string next_readout_time( "next_readout_time" );
     const std::string node_models( "node_models" );
     const std::string no_synapses( "no_synapses" );
    diff --git a/nestkernel/node_collection.h b/nestkernel/node_collection.h
    index 8b356b5085..3c313b6da6 100644
    --- a/nestkernel/node_collection.h
    +++ b/nestkernel/node_collection.h
    @@ -237,7 +237,8 @@ class NodeCollection
        * @param node_ids Array of node IDs from which to create the NodeCollection
        * @return a NodeCollection pointer to the created NodeCollection
        */
    -  static NodeCollectionPTR create( const std::vector< auto >& node_ids );
    +  template < typename T >
    +  static NodeCollectionPTR create( const std::vector< T >& node_ids );
     
       /**
        * Check to see if the fingerprint of the NodeCollection matches that of the
    @@ -407,7 +408,9 @@ class NodeCollection
     private:
       unsigned long fingerprint_; //!< Unique identity of the kernel that created the NodeCollection
       static NodeCollectionPTR create_();
    -  static NodeCollectionPTR create_( const std::vector< auto >& );
    +
    +  template < typename T >
    +  static NodeCollectionPTR create_( const std::vector< T >& );
     };
     
     /**
    diff --git a/nestkernel/node_collection_impl.h b/nestkernel/node_collection_impl.h
    index 370665745c..e6a232119e 100644
    --- a/nestkernel/node_collection_impl.h
    +++ b/nestkernel/node_collection_impl.h
    @@ -28,8 +28,9 @@
     namespace nest
     {
     
    +template < typename T >
     NodeCollectionPTR
    -NodeCollection::create( const std::vector< auto >& node_ids_vector )
    +NodeCollection::create( const std::vector< T >& node_ids_vector )
     {
       if ( node_ids_vector.empty() )
       {
    @@ -42,8 +43,9 @@ NodeCollection::create( const std::vector< auto >& node_ids_vector )
       return NodeCollection::create_( node_ids_vector );
     }
     
    +template < typename T >
     NodeCollectionPTR
    -NodeCollection::create_( const std::vector< auto >& node_ids )
    +NodeCollection::create_( const std::vector< T >& node_ids )
     {
       size_t current_first = node_ids[ 0 ];
       size_t current_last = current_first;
    
    From 17186f5dc70617dbb5081b0a7b16be68c7172f4d Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 13 Sep 2023 17:29:59 +0200
    Subject: [PATCH 152/375] Modern exception handling
    
    ---
     nestkernel/exceptions.cpp | 431 ++++----------------------------------
     1 file changed, 45 insertions(+), 386 deletions(-)
    
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index f00f9b1646..22e6a36afd 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -28,116 +28,104 @@
     // Generated includes:
     #include "config.h"
     
    -
    -// Include MPI for MPI error string
    -#ifdef HAVE_MPI
    -#include <mpi.h>
    -#endif
    +// Includes from thirdparty:
    +#include "compose.hpp"
     
     std::string
     nest::UnknownModelName::compose_msg_( const std::string& model_name ) const
     {
    -  std::ostringstream msg;
    -  msg << model_name << " is not a known model name.";
    +  std::string msg = String::compose( "%1 is not a known model name.", model_name );
     #ifndef HAVE_GSL
    -  msg << " A frequent cause for this error is that NEST was compiled"
    -         " without the GNU Scientific Library, which is required for"
    -         " the conductance-based neuron models.";
    +  msg += "\nA frequent cause for this error is that NEST was compiled ";
    +  msg += "without the GNU Scientific Library, which is required for ";
    +  msg += "the conductance-based neuron models.";
     #endif
    -  return msg.str();
    +  return msg;
     }
     
     std::string
     nest::UnknownComponent::compose_msg_( const std::string& component_name ) const
     {
    -  std::ostringstream msg;
    -  msg << component_name << " is not a known component.";
    +  std::string msg = String::compose( "%1 is not a known component.", component_name );
     #ifndef HAVE_GSL
    -  msg << " A frequent cause for this error is that NEST was compiled"
    -         " without the GNU Scientific Library, which is required for"
    -         " the conductance-based neuron models.";
    +  msg += "\nA frequent cause for this error is that NEST was compiled ";
    +  msg += "without the GNU Scientific Library, which is required for ";
    +  msg += "the conductance-based neuron models.";
     #endif
    -  return msg.str();
    +  return msg;
     }
     
     std::string
     nest::NewModelNameExists::compose_msg_( const std::string& model_name ) const
     {
    -  std::string msg = "Model " + model_name + " is the name of an existing model and cannot be re-used.";
    +  std::string msg = String::compose( "Model %1 is the name of an existing model and cannot be re-used.", model_name );
       return msg;
     }
     
     std::string
     nest::ModelInUse::compose_msg_( const std::string& model_name ) const
     {
    -  std::string msg = "Model " + model_name + " is in use and cannot be unloaded/uninstalled.";
    +  std::string msg = String::compose( "Model %1 is in use and cannot be unloaded/uninstalled.", model_name );
       return msg;
     }
     
     std::string
     nest::UnknownSynapseType::compose_msg_( const int id ) const
     {
    -  std::ostringstream msg;
    -  msg << "Synapse with id " << id << " does not exist.";
    -  return msg.str();
    +  std::string msg = String::compose( "Synapse with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
     nest::UnknownSynapseType::compose_msg_( const std::string& name ) const
     {
    -  std::ostringstream msg;
    -  msg << "Synapse with name " << name << " does not exist.";
    -  return msg.str();
    +  std::string msg = String::compose( "Synapse with name %1 does not exist.", name );
    +  return msg;
     }
     
     std::string
     nest::UnknownNode::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "Node with id " << id << " doesn't exist.";
    -  return out.str();
    +  std::string msg = String::compose( "Node with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
     nest::NoThreadSiblingsAvailable::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "Node with id " << id << " does not have thread siblings.";
    -  return out.str();
    +  std::string msg = String::compose( "Node with id %1 does not have thread siblings.", id );
    +  return msg;
     }
     
     std::string
     nest::LocalNodeExpected::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "Node with id " << id << " is not a local node.";
    -  return out.str();
    +  std::string msg = String::compose( "Node with id %1 is not a local node.", id );
    +  return msg;
     }
     
     std::string
     nest::NodeWithProxiesExpected::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "A node with proxies (usually a neuron) is expected, but the node with id " << id
    -      << " is a node without proxies (usually a device).";
    -  return out.str();
    +  std::string msg = String::compose(
    +    "A node with proxies (usually a neuron) is expected, "
    +    "but the node with id %1 is a node without proxies (usually a device).",
    +    id );
    +  return msg;
     }
     
     std::string
     nest::UnknownCompartment::compose_msg_( const long compartment_idx, const std::string info ) const
     {
    -  std::ostringstream msg;
    -  msg << "Compartment " << compartment_idx << " " << info << ".";
    -  return msg.str();
    +  std::string msg = String::compose( "Compartment %1 %2.", compartment_idx, info );
    +  return msg;
     }
     
    -
     std::string
     nest::UnknownReceptorType::compose_msg_( const long receptor_type, const std::string name ) const
     {
    -  std::ostringstream msg;
    -  msg << "Receptor type " << receptor_type << " is not available in " << name << ".";
    -  return msg.str();
    +  std::string msg = String::compose( "Receptor type %1 is not available in %2.", receptor_type, name );
    +  return msg;
     }
     
     std::string
    @@ -145,360 +133,31 @@ nest::IncompatibleReceptorType::compose_msg( const long receptor_type,
       const std::string name,
       const std::string event_type )
     {
    -  std::ostringstream msg;
    -  msg << "Receptor type " << receptor_type << " in " << name << " does not accept " << event_type << ".";
    -  return msg.str();
    +  std::string msg = String::compose( "Receptor type %1 in %2 does not accept %3.", receptor_type, name, event_type );
    +  return msg;
     }
     
     std::string
     nest::UnknownPort::compose_msg_( const int id ) const
     {
    -  std::ostringstream out;
    -  out << "Port with id " << id << " does not exist.";
    -  return out.str();
    +  std::string msg = String::compose( "Port with id %1 does not exist.", id );
    +  return msg;
     }
     
     std::string
     nest::UnknownPort::compose_msg_( const int id, const std::string msg ) const
     {
    -  std::ostringstream out;
    -  out << "Port with id " << id << " does not exist. " << msg;
    -  return out.str();
    -}
    -
    -const char*
    -nest::InexistentConnection::what() const noexcept
    -{
    -  if ( msg_.empty() )
    -  {
    -    return "Deletion of connection is not possible.";
    -  }
    -  else
    -  {
    -    return ( "Deletion of connection is not possible because:\n" + msg_ ).c_str();
    -  }
    -}
    -
    -const char*
    -nest::UnknownThread::what() const noexcept
    -{
    -  std::ostringstream out;
    -  out << "Thread with id " << id_ << " is outside of range.";
    -  return out.str().c_str();
    -}
    -
    -const char*
    -nest::BadDelay::what() const noexcept
    -{
    -  std::ostringstream out;
    -  out << "Delay value " << delay_ << " is invalid: " << message_;
    -  return out.str().c_str();
    -}
    -
    -const char*
    -nest::UnexpectedEvent::what() const noexcept
    -{
    -  if ( msg_.empty() )
    -  {
    -    return std::string(
    -      "Target node cannot handle input event.\n"
    -      "    A common cause for this is an attempt to connect recording devices incorrectly.\n"
    -      "    Note that recorders such as spike recorders must be connected as\n\n"
    -      "        nest.Connect(neurons, spike_det)\n\n"
    -      "    while meters such as voltmeters must be connected as\n\n"
    -      "        nest.Connect(meter, neurons) " )
    -      .c_str();
    -  }
    -  else
    -  {
    -    return ( "UnexpectedEvent: " + msg_ ).c_str();
    -  }
    +  std::string msg_out;
    +  msg_out = String::compose( "Port with id %1 does not exist. ", id );
    +  msg_out += msg;
    +  return msg_out;
     }
     
     std::string
     nest::UnsupportedEvent::compose_msg_() const
     {
    -  return "The current synapse type does not support the event type of the sender.\n"
    -         "    A common cause for this is a plastic synapse between a device and a neuron.";
    -}
    -
    -const char*
    -nest::BadProperty::what() const noexcept
    -{
    -  return msg_.c_str();
    -}
    -
    -const char*
    -nest::BadParameter::what() const noexcept
    -{
    -  return msg_.c_str();
    -}
    -
    -const char*
    -nest::DimensionMismatch::what() const noexcept
    -{
    -  std::ostringstream out;
    -
    -  if ( not msg_.empty() )
    -  {
    -    out << msg_;
    -  }
    -  else if ( expected_ == -1 )
    -  {
    -    out << "Dimensions of two or more variables do not match.";
    -  }
    -  else
    -  {
    -    out << "Expected dimension size: " << expected_ << "\nProvided dimension size: " << provided_;
    -  }
    -
    -  return out.str().c_str();
    -}
    -
    -const char*
    -nest::InvalidDefaultResolution::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The default resolution of " << Time::get_resolution() << " is not consistent with the value " << val_
    -      << " of property '" << prop_ << "' in model " << model_ << ".\n"
    -      << "This is an internal NEST error, please report it at "
    -         "https://github.com/nest/nest-simulator/issues";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::InvalidTimeInModel::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The time property " << prop_ << " = " << val_ << " of model " << model_
    -      << " is not compatible with the resolution " << Time::get_resolution() << ".\n"
    -      << "Please set a compatible value with SetDefaults!";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::StepMultipleRequired::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The time property " << prop_ << " = " << val_ << " of model " << model_
    -      << " must be a multiple of the resolution " << Time::get_resolution() << ".";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::TimeMultipleRequired::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "In model " << model_ << ", the time property " << prop_a_ << " = " << val_a_
    -      << " must be multiple of time property " << prop_b_ << " = " << val_b_ << '.';
    -  return msg.str().c_str();
    -}
    -
    -#ifdef HAVE_MUSIC
    -
    -const char*
    -nest::MUSICPortUnconnected::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Cannot use instance of model " << model_ << " because the MUSIC port " << portname_ << " is unconnected.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICPortHasNoWidth::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Cannot use instance of model " << model_ << " because the MUSIC port " << portname_
    -      << " has no width specified in configuration file.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICPortAlreadyPublished::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The instance of model " << model_ << " cannot change the MUSIC port / establish connections " << portname_
    -      << " since it is already published.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICSimulationHasRun::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The instance of model " << model_ << " won't work, since the simulation has already been running";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICChannelUnknown::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The port " << portname_ << " cannot be mapped in " << model_ << " because the channel " << channel_
    -      << " does not exists.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICPortUnknown::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The port " << portname_ << " does not exist.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MUSICChannelAlreadyMapped::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The channel " << channel_ << " of port " << portname_ << " has already be mapped to another proxy in "
    -      << model_;
    -  return msg.str().c_str();
    -}
    -
    -#endif
    -
    -#ifdef HAVE_MPI
    -
    -const char*
    -nest::MPIPortsFileUnknown::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The node with ID " << node_id_ << " requires a label,"
    -      << " which specifies the folder with files containing the MPI ports";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MPIPortsFileMissing::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The node with ID " << node_id_ << " expects a file with the MPI address at location " << path_
    -      << ". The file does not seem to exist.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::MPIErrorCode::what() const noexcept
    -{
    -
    -  char errmsg[ 256 ];
    -  int len;
    -
    -  MPI_Error_string( error_code_, errmsg, &len );
    -  std::string error;
    -  error.assign( errmsg, len );
    -
    -  std::ostringstream msg;
    -  msg << "MPI Error: " << error;
    -  return msg.str().c_str();
    -}
    -
    -#endif
    -
    -const char*
    -nest::GSLSolverFailure::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "In model " << model_ << ", the GSL solver "
    -      << "returned with exit status " << status_ << ".\n"
    -      << "Please make sure you have installed a recent "
    -      << "GSL version (> gsl-1.10).";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::NumericalInstability::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "NEST detected a numerical instability while "
    -      << "updating " << model_ << ".";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::NamingConflict::what() const noexcept
    -{
    -  return msg_.c_str();
    -}
    -
    -const char*
    -nest::RangeCheck::what() const noexcept
    -{
    -  if ( size_ > 0 )
    -  {
    -    std::ostringstream out;
    -    out << "Array with length " << size_ << " expected.";
    -    return out.str().c_str();
    -  }
    -  else
    -  {
    -    // TODO-PYNEST-NG: Fix usage, the comment below has been there already
    -    // Empty message. Added due to incorrect use of RangeCheck in nest.cpp
    -    return "";
    -  }
    -}
    -
    -const char*
    -nest::IOError::what() const noexcept
    -{
    -  return "";
    -}
    -
    -const char*
    -nest::KeyError::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Key '" << key_ << "' not found in map."
    -      << "Error encountered with map type: '" << map_type_ << "'"
    -      << " when applying operation: '" << map_op_ << "'";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::InternalError::what() const noexcept
    -{
    -  return msg_.c_str();
    -}
    -
    -const char*
    -nest::UnmatchedSteps::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Steps for backend device don't match NEST steps: "
    -      << "steps expected: " << total_steps_ << " "
    -      << "steps executed: " << current_step_ << ".";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::BackendPrepared::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Backend " << backend_ << " may not be prepare()'d multiple times.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::BackendNotPrepared::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Backend " << backend_ << " may not be cleanup()'d without preparation (multiple cleanups?).";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::BackendAlreadyRegistered::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "Backend " << backend_ << " has already been registered.";
    -  return msg.str().c_str();
    -}
    -
    -const char*
    -nest::UndefinedName::what() const noexcept
    -{
    -  std::ostringstream msg;
    -  msg << "The name " << name_ << " is not defined.";
    -  return msg.str().c_str();
    +  std::string msg;
    +  msg = "The current synapse type does not support the event type of the sender.\n";
    +  msg += "    A common cause for this is a plastic synapse between a device and a neuron.";
    +  return msg;
     }
    
    From a15dabf6557fb4d8fddc4ce8312f2760dfd19546 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 13 Sep 2023 17:34:52 +0200
    Subject: [PATCH 153/375] Modern exception handling
    
    ---
     nestkernel/exceptions.h | 653 ++++++++++++++++++++++++----------------
     1 file changed, 387 insertions(+), 266 deletions(-)
    
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index b827aaa388..5b1cc45cbf 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -25,9 +25,15 @@
     
     #include <exception>
     
    +// C++ includes:
    +#include <sstream>
    +
     // Includes from nestkernel:
     #include "nest_time.h"
     
    +// Includes from thirdparty:
    +#include "compose.hpp"
    +
     namespace nest
     {
     
    @@ -88,7 +94,6 @@ class NotImplemented : public KernelException
      * Exception to be thrown if a given type does not match the expected type.
      * @ingroup KernelExceptions
      */
    -
     class TypeMismatch : public KernelException
     {
     
    @@ -138,7 +143,7 @@ class UnaccessedDictionaryEntry : public KernelException
     {
     public:
       UnaccessedDictionaryEntry( const std::string& what, const std::string& where, const std::string& missed )
    -    : KernelException( "unaccessed elements in " + what + ", in function " + where + ": " + missed )
    +    : KernelException( "Unaccessed elements in " + what + ", in function " + where + ": " + missed )
       {
       }
     };
    @@ -163,7 +168,6 @@ class UnknownModelName : public KernelException
     /**
      * Exception to be thrown if a component with the the specified name
      * does not exist.
    - *
      * @see UnknownModelName
      * @ingroup KernelExceptions
      */
    @@ -181,7 +185,6 @@ class UnknownComponent : public KernelException
     /**
      * Exception to be thrown if a name requested for a user-defined
      * model exist already.
    - *
      * @ingroup KernelExceptions
      */
     class NewModelNameExists : public KernelException
    @@ -198,8 +201,7 @@ class NewModelNameExists : public KernelException
     /**
      * Exception to be thrown if a (neuron/synapse) model with the the specified ID
      * is used within the network and the providing module hence cannot be
    - * uninstalled.
    - * This exception can occur if the user tries to uninstall a
    + * uninstalled. This exception can occur if the user tries to uninstall a
      * module.
      * @ingroup KernelExceptions
      */
    @@ -237,14 +239,13 @@ class UnknownSynapseType : public KernelException
     };
     
     /**
    - * Exception to be thrown if the specified Node does not exist.
    - *
    + * Exception to be thrown if the specified
    + * Node does not exist.
      * This exception is thrown, if
      * -# an address did not point to an existing node.
      * -# a node id did not point to an existing node.
      * @ingroup KernelExceptions
      */
    -
     class UnknownNode : public KernelException
     {
       std::string compose_msg_( const int id ) const;
    @@ -262,14 +263,13 @@ class UnknownNode : public KernelException
     };
     
     /**
    - * Exception to be thrown if the specified Node does not exist.
    - *
    + * Exception to be thrown if the specified
    + * Node does not exist.
      * This exception is thrown, if
      * -# an address did not point to an existing node.
      * -# a node id did not point to an existing node.
      * @ingroup KernelExceptions
      */
    -
     class NoThreadSiblingsAvailable : public KernelException
     {
       std::string compose_msg_( const int id ) const;
    @@ -308,8 +308,9 @@ class NodeWithProxiesExpected : public KernelException
       }
     };
     
    -/**
    - * Exception to be thrown if the parent compartment does not exist
    +/*
    + * Exception to be thrown if the parent
    + * compartment does not exist
      */
     class UnknownCompartment : public KernelException
     {
    @@ -326,7 +327,6 @@ class UnknownCompartment : public KernelException
      * Exception to be thrown if the specified
      * receptor type does not exist in the node.
      */
    -
     class UnknownReceptorType : public KernelException
     {
       std::string compose_msg_( const long receptor_type, const std::string name ) const;
    @@ -342,7 +342,6 @@ class UnknownReceptorType : public KernelException
      * Exception to be thrown if the specified
      * receptor type does not accept the event type.
      */
    -
     class IncompatibleReceptorType : public KernelException
     {
       std::string compose_msg( const long receptor_type, const std::string name, const std::string event );
    @@ -379,7 +378,6 @@ class UnknownPort : public KernelException
     
     /**
      * To be thrown if a connection is not possible.
    - *
      * This exception is e.g. thrown if a connection was attempted with
      * an unsupported Event type.
      * @ingroup KernelExceptions
    @@ -399,31 +397,36 @@ class IllegalConnection : public KernelException
     };
     
     /**
    - * To be thrown if a connection does not exists but something is to be done with it.
    - *
    + * To be thrown if a connection does not exists but something is to be done with
    + * it.
      * This exception is e.g. thrown if a deletion was attempted with
      * an inexistent connection.
      * @ingroup KernelExceptions
      */
     class InexistentConnection : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       InexistentConnection()
    -    : KernelException( "The connection does not exist" )
    -    , msg_()
    +    : KernelException( "InexistentConnection" )
       {
    +    msg_ = "Deletion of connection is not possible because it does not exist.";
       }
     
    -  InexistentConnection( std::string msg )
    -    : KernelException( "The connection does not exist" )
    -    , msg_( msg )
    +  InexistentConnection( const std::string& msg )
    +    : KernelException( "InexistentConnection" )
       {
    +    msg_ = "Deletion of connection is not possible because:\n";
    +    msg_ += msg;
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  std::string msg_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -432,16 +435,21 @@ class InexistentConnection : public KernelException
      */
     class UnknownThread : public KernelException
     {
    -  int id_;
    +private:
    +  std::string msg_;
     
     public:
       UnknownThread( int id )
         : KernelException( "UnknownThread" )
    -    , id_( id )
       {
    +    msg_ = String::compose( "Thread with id %1 is outside of range.", id );
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -451,45 +459,57 @@ class UnknownThread : public KernelException
      */
     class BadDelay : public KernelException
     {
    -  double delay_;
    -  std::string message_;
    +private:
    +  std::string msg_;
     
     public:
    -  BadDelay( double delay, std::string message )
    +  BadDelay( double delay, const std::string& msg )
         : KernelException( "BadDelay" )
    -    , delay_( delay )
    -    , message_( message )
       {
    +    msg_ = String::compose( "Delay value %1 is invalid: %2", delay, msg );
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
      * Exception to be thrown by the event handler
      * of a node if it receives an event it cannot handle.
    - *
      * This case should be prevented by connect_sender().
      * @ingroup KernelExceptions
      */
     class UnexpectedEvent : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       UnexpectedEvent()
         : KernelException( "UnexpectedEvent" )
       {
    +    msg_ = "Target node cannot handle input event.\n";
    +    msg_ += "    A common cause for this is an attempt to connect recording devices incorrectly.\n";
    +    msg_ += "    Note that recorders such as spike recorders must be connected as\n\n";
    +    msg_ += "        nest.Connect(neurons, spike_det)\n\n";
    +    msg_ += "    while meters such as voltmeters must be connected as\n\n";
    +    msg_ += "        nest.Connect(meter, neurons) ";
       }
     
    -  UnexpectedEvent( std::string msg )
    +  UnexpectedEvent( const std::string& msg )
         : KernelException( "UnexpectedEvent" )
    -    , msg_( msg )
       {
    +    msg_ = msg;
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  std::string msg_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     
    @@ -511,13 +531,14 @@ class UnsupportedEvent : public KernelException
     };
     
     /**
    - * Exception to be thrown if a status parameter is incomplete or inconsistent.
    - *
    + * Exception to be thrown if a status parameter
    + * is incomplete or inconsistent.
      * Thrown by Node::set_/get_property methods.
      * @ingroup KernelExceptions
      */
     class BadProperty : public KernelException
     {
    +private:
       std::string msg_;
     
     public:
    @@ -533,17 +554,22 @@ class BadProperty : public KernelException
       {
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    - * Exception to be thrown if a parameter cannot be set.
    - *
    + * Exception to be thrown if a parameter
    + * cannot be set.
      * Thrown by Node::set_/get_property methods.
      * @ingroup KernelExceptions
      */
     class BadParameter : public KernelException
     {
    +private:
       std::string msg_;
     
     public:
    @@ -559,7 +585,11 @@ class BadParameter : public KernelException
       {
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -592,43 +622,40 @@ class BadParameterValue : public KernelException
     };
     
     /**
    - * Exception to be thrown if the dimensions of two or more objects do not agree.
    - *
    + * Exception to be thrown if the dimensions
    + * of two or more objects do not agree.
      * Thrown by Node::set_/get_property methods.
      * @ingroup KernelExceptions
      */
     class DimensionMismatch : public KernelException
     {
    -  int expected_;
    -  int provided_;
    +private:
       std::string msg_;
     
     public:
       DimensionMismatch()
         : KernelException( "DimensionMismatch" )
    -    , expected_( -1 )
    -    , provided_( -1 )
    -    , msg_( "" )
       {
    +    msg_ = "Dimensions of two or more variables do not match.";
       }
     
       DimensionMismatch( int expected, int provided )
         : KernelException( "DimensionMismatch" )
    -    , expected_( expected )
    -    , provided_( provided )
    -    , msg_( "" )
       {
    +    msg_ = String::compose( "Expected dimension size: %1 Provided dimension size: %2.", expected, provided );
       }
     
       DimensionMismatch( const std::string& msg )
         : KernelException( "DimensionMismatch" )
    -    , expected_( -1 )
    -    , provided_( -1 )
    -    , msg_( msg )
       {
    +    msg_ = msg;
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -646,15 +673,17 @@ class DistributionError : public KernelException
     };
     
     /**
    - * Exception to be thrown on prototype construction if Time objects incompatible.
    - *
    - * This exception is to be thrown by the default constructor of
    + * Exception to be thrown on prototype construction if Time objects
    + * incompatible. This exception is to be thrown by the default constructor of
      * nodes which require that Time objects have properties wrt resolution.
      * @ingroup KernelExceptions
      * @see InvalidTimeInModel
      */
     class InvalidDefaultResolution : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -665,23 +694,24 @@ class InvalidDefaultResolution : public KernelException
        */
       InvalidDefaultResolution( const std::string& model, const std::string& property, const Time& value )
         : KernelException( "InvalidDefaultResolution" )
    -    , model_( model )
    -    , prop_( property )
    -    , val_( value )
       {
    -  }
    +    std::ostringstream oss;
    +    oss << "The default resolution of " << Time::get_resolution() << " is not consistent with the value " << value
    +        << " of property '" << property << "' in model " << model << ".\n"
    +        << "This is an internal NEST error, please report it at https://github.com/nest/nest-simulator/issues";
     
    -  const char* what() const noexcept override;
    +    msg_ = oss.str();
    +  }
     
    -private:
    -  const std::string model_;
    -  const std::string prop_;
    -  const Time val_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
      * Exception to be thrown on instance construction if Time objects incompatible.
    - *
      * This exception is to be thrown by the copy constructor of nodes which
      * require that Time objects have properties wrt resolution.
      * @ingroup KernelExceptions
    @@ -689,6 +719,9 @@ class InvalidDefaultResolution : public KernelException
      */
     class InvalidTimeInModel : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -699,18 +732,20 @@ class InvalidTimeInModel : public KernelException
        */
       InvalidTimeInModel( const std::string& model, const std::string& property, const Time& value )
         : KernelException( "InvalidTimeInModel" )
    -    , model_( model )
    -    , prop_( property )
    -    , val_( value )
       {
    -  }
    +    std::ostringstream oss;
    +    oss << "The time property " << property << " = " << value << " of model " << model
    +        << " is not compatible with the resolution " << Time::get_resolution() << ".\n"
    +        << "Please set a compatible value with SetDefaults!";
     
    -  const char* what() const noexcept override;
    +    msg_ = oss.str();
    +  }
     
    -private:
    -  const std::string model_;
    -  const std::string prop_;
    -  const Time val_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -720,6 +755,9 @@ class InvalidTimeInModel : public KernelException
      */
     class StepMultipleRequired : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -730,18 +768,19 @@ class StepMultipleRequired : public KernelException
        */
       StepMultipleRequired( const std::string& model, const std::string& property, const Time& value )
         : KernelException( "StepMultipleRequired" )
    -    , model_( model )
    -    , prop_( property )
    -    , val_( value )
       {
    -  }
    +    std::ostringstream oss;
    +    oss << "The time property " << property << " = " << value << " of model " << model
    +        << " must be a multiple of the resolution " << Time::get_resolution() << ".";
     
    -  const char* what() const noexcept override;
    +    msg_ = oss.str();
    +  }
     
    -private:
    -  const std::string model_;
    -  const std::string prop_;
    -  const Time val_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -751,6 +790,9 @@ class StepMultipleRequired : public KernelException
      */
     class TimeMultipleRequired : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -767,22 +809,19 @@ class TimeMultipleRequired : public KernelException
         const std::string& name_b,
         const Time& value_b )
         : KernelException( "StepMultipleRequired" )
    -    , model_( model )
    -    , prop_a_( name_a )
    -    , val_a_( value_a )
    -    , prop_b_( name_b )
    -    , val_b_( value_b )
       {
    -  }
    +    std::ostringstream oss;
    +    oss << "In model " << model << ", the time property " << name_a << " = " << value_a
    +        << " must be multiple of time property " << name_b << " = " << value_b << '.';
     
    -  const char* what() const noexcept override;
    +    msg_ = oss.str();
    +  }
     
    -private:
    -  const std::string model_;
    -  const std::string prop_a_;
    -  const Time val_a_;
    -  const std::string prop_b_;
    -  const Time val_b_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -791,6 +830,9 @@ class TimeMultipleRequired : public KernelException
      */
     class GSLSolverFailure : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -800,16 +842,19 @@ class GSLSolverFailure : public KernelException
        */
       GSLSolverFailure( const std::string& model, const int status )
         : KernelException( "GSLSolverFailure" )
    -    , model_( model )
    -    , status_( status )
       {
    +    msg_ = String::compose(
    +      "In model %1 the GSL solver returned with exit status %2.\n"
    +      "Please make sure you have installed a recent GSL version (> gsl-1.10).",
    +      model,
    +      status );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    -  const int status_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -818,6 +863,9 @@ class GSLSolverFailure : public KernelException
      */
     class NumericalInstability : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -826,14 +874,15 @@ class NumericalInstability : public KernelException
        */
       NumericalInstability( const std::string& model )
         : KernelException( "NumericalInstability" )
    -    , model_( model )
       {
    +    msg_ = String::compose( "NEST detected a numerical instability while updating %1.", model );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -844,6 +893,9 @@ class NumericalInstability : public KernelException
      */
     class NamingConflict : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       NamingConflict( const std::string& msg )
         : KernelException( "NamingConflict" )
    @@ -851,10 +903,11 @@ class NamingConflict : public KernelException
       {
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  std::string msg_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -863,17 +916,30 @@ class NamingConflict : public KernelException
      */
     class RangeCheck : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       RangeCheck( int size = 0 )
         : KernelException( "RangeCheck" )
    -    , size_( size )
       {
    +    if ( size > 0 )
    +    {
    +      msg_ = String::compose( "Array with length %1 expected.", size );
    +    }
    +    else
    +    {
    +      // TODO-PYNEST-NG: Fix usage, the comment below has been there already
    +      // Empty message. Added due to incorrect use of RangeCheck in nest.cpp
    +      msg_ = "";
    +    }
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  int size_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -882,13 +948,21 @@ class RangeCheck : public KernelException
      */
     class IOError : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       IOError()
         : KernelException( "IOError" )
       {
    +    msg_ = "";
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -898,20 +972,25 @@ class IOError : public KernelException
      */
     class KeyError : public KernelException
     {
    -  const std::string key_;
    -  const std::string map_type_;
    -  const std::string map_op_;
    +private:
    +  std::string msg_;
     
     public:
       KeyError( const std::string& key, const std::string& map_type, const std::string& map_op )
         : KernelException( "KeyError" )
    -    , key_( key )
    -    , map_type_( map_type )
    -    , map_op_( map_op )
       {
    +    msg_ = String::compose(
    +      "Key '%1' not found in map. Error encountered with map type: '%2' when applying operation: '%3'.",
    +      key,
    +      map_type,
    +      map_op );
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -920,6 +999,7 @@ class KeyError : public KernelException
      */
     class InternalError : public KernelException
     {
    +private:
       std::string msg_;
     
     public:
    @@ -929,15 +1009,19 @@ class InternalError : public KernelException
         , msg_( "InternalError" )
       {
       }
    +
       InternalError( std::string msg )
         : KernelException( msg )
       {
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
    -
     #ifdef HAVE_MUSIC
     /**
      * Exception to be thrown if a music_event_out_proxy is generated, but the music
    @@ -946,6 +1030,9 @@ class InternalError : public KernelException
      */
     class MUSICPortUnconnected : public KernelException
     {
    +private:
    +  std::string msg;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -955,16 +1042,19 @@ class MUSICPortUnconnected : public KernelException
        */
       MUSICPortUnconnected( const std::string& model, const std::string& portname )
         : KernelException( "MUSICPortUnconnected" )
    -    , model_( model )
    -    , portname_( portname )
       {
    +    msg_ = String::compose(
    +      "Cannot use instance of model %1 because the MUSIC "
    +      "port %2 is unconnected.",
    +      model,
    +      portname );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -974,28 +1064,33 @@ class MUSICPortUnconnected : public KernelException
      */
     class MUSICPortHasNoWidth : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
        *             names of copied models are reported correctly.
        * @param model     name of model causing problem
    -   * @param portname  name of music port
    +   * @param portname  name of MUSIC port
        */
       MUSICPortHasNoWidth( const std::string& model, const std::string& portname )
         : KernelException( "MUSICPortHasNoWidth" )
    -    , model_( model )
    -    , portname_( portname )
       {
    +    msg_ = String::compose(
    +      "Cannot use instance of model %1 because the MUSIC "
    +      "port %2 has no width specified in configuration file.",
    +      model,
    +      portname );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
    -
     /**
      * Exception to be thrown if the user tries to change the name of an already
      * published port.
    @@ -1003,24 +1098,31 @@ class MUSICPortHasNoWidth : public KernelException
      */
     class MUSICPortAlreadyPublished : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
        *             names of copied models are reported correctly.
        * @param model     name of model causing problem
    +   * @param portname  name of MUSIC port
        */
       MUSICPortAlreadyPublished( const std::string& model, const std::string& portname )
         : KernelException( "MUSICPortAlreadyPublished" )
    -    , model_( model )
    -    , portname_( portname )
       {
    +    msg_ = String::compose(
    +      "The instance of model %1 cannot change the MUSIC "
    +      "port / establish connections %2 since it is already published.",
    +      model,
    +      portname );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    -  const std::string portname_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -1030,6 +1132,9 @@ class MUSICPortAlreadyPublished : public KernelException
      */
     class MUSICSimulationHasRun : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -1038,17 +1143,20 @@ class MUSICSimulationHasRun : public KernelException
        */
       MUSICSimulationHasRun( const std::string& model )
         : KernelException( "MUSICSimulationHasRun" )
    -    , model_( model )
       {
    +    msg_ = String::compose(
    +      "The instance of model %1 won't work, since the simulation "
    +      "has already been running",
    +      model );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string model_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
    -
     /**
      * Exception to be thrown if the user tries to map a channel that exceeds the
      * width of the MUSIC port.
    @@ -1056,26 +1164,33 @@ class MUSICSimulationHasRun : public KernelException
      */
     class MUSICChannelUnknown : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
        *             names of copied models are reported correctly.
        * @param model     name of model causing problem
    +   * @param portname  name of MUSIC port
    +   * @param channel   channel number
        */
       MUSICChannelUnknown( const std::string& model, const std::string& portname, int channel )
         : KernelException( "MUSICChannelUnknown" )
    -    , portname_( portname )
    -    , channel_( channel )
    -    , model_( model )
       {
    +    msg_ = String::compose(
    +      "The port %1 cannot be mapped in %2 because the channel %3 "
    +      "does not exist.",
    +      portname,
    +      model,
    +      channel );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string portname_;
    -  const int channel_;
    -  const std::string model_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -1085,17 +1200,24 @@ class MUSICChannelUnknown : public KernelException
      */
     class MUSICPortUnknown : public KernelException
     {
    +private:
    +  std::string msg_;
    +
    +  /**
    +   * @param portname  name of MUSIC port
    +   */
     public:
       MUSICPortUnknown( const std::string& portname )
         : KernelException( "MUSICPortUnknown" )
    -    , portname_( portname )
       {
    +    msg_ = String::compose( "The port %1 does not exist.", portname );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string portname_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     /**
    @@ -1110,6 +1232,8 @@ class MUSICChannelAlreadyMapped : public KernelException
        * @note model should be passed from get_name() to ensure that
        *             names of copied models are reported correctly.
        * @param model     name of model causing problem
    +   * @param portname  name of MUSIC port
    +   * @param channel   channel number
        */
       MUSICChannelAlreadyMapped( const std::string& model, const std::string& portname, int channel )
         : KernelException( "MUSICChannelAlreadyMapped" )
    @@ -1117,135 +1241,128 @@ class MUSICChannelAlreadyMapped : public KernelException
         , channel_( channel )
         , model_( model )
       {
    +    msg_ = String::compose(
    +      "The channel %1 of port %2 has already be mapped "
    +      "to another proxy in %3.",
    +      channel,
    +      portname,
    +      model );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string portname_;
    -  const int channel_;
    -  const std::string model_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
    -
    -#endif
    +#endif // HAVE_MUSIC
     
     #ifdef HAVE_MPI
     class MPIPortsFileUnknown : public KernelException
     {
    -public:
    -  explicit MPIPortsFileUnknown( const size_t node_id )
    -    : node_id_( node_id )
    -  {
    -  }
    -
    -  const char* what() const noexcept override;
    -
     private:
    -  const size_t node_id_;
    -};
    +  std::string msg_;
     
    -class MPIPortsFileMissing : public KernelException
    -{
     public:
    -  explicit MPIPortsFileMissing( const size_t node_id, const std::string path )
    -    : node_id_( node_id )
    -    , path_( path )
    +  explicit MPIPortsFileUnknown( const size_t node_id )
       {
    +    msg_ = String::compose(
    +      "The node with ID %1 requires a label, which specifies the "
    +      "folder with files containing the MPI ports.",
    +      node_id );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const size_t node_id_;
    -  const std::string path_;
    -};
    -
    -class MPIErrorCode : public KernelException
    -{
    -public:
    -  explicit MPIErrorCode( const int error_code )
    -    : error_code_( error_code )
    +  const char*
    +  what() const noexcept override
       {
    -  }
    -
    -  const char* what() const noexcept override;
    -
    -private:
    -  int error_code_;
    +    return msg_.data();
    +  };
     };
    -#endif
    +#endif // HAVE_MPI
     
     class UnmatchedSteps : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       UnmatchedSteps( int steps_left, int total_steps )
    -    : current_step_( total_steps - steps_left )
    -    , total_steps_( total_steps )
    +    : KernelException( "UnmatchedSteps" )
       {
    +    msg_ = String::compose(
    +      "Steps for backend device don't match NEST steps: "
    +      "steps expected: %1 steps executed: %2.",
    +      total_steps,
    +      total_steps - steps_left );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const int current_step_;
    -  const int total_steps_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     class BackendPrepared : public KernelException
     {
    +private:
    +  const std::string backend_;
    +  std::string msg_;
    +
     public:
       BackendPrepared( const std::string& backend )
    -    : backend_( backend )
    +    : KernelException( "BackendPrepared" )
    +    , backend_( backend )
       {
    +    msg_ = String::compose( "Backend %1 may not be prepare()'d multiple times.", backend_ );
       }
     
       BackendPrepared( std::string&& backend )
    -    : backend_( std::move( backend ) )
    +    : KernelException( "BackendPrepared" )
    +    , backend_( std::move( backend ) )
       {
    +    msg_ = String::compose( "Backend %1 may not be prepare()'d multiple times.", backend_ );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string backend_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     class BackendNotPrepared : public KernelException
     {
    -public:
    -  BackendNotPrepared( const std::string& backend )
    -    : backend_( backend )
    -  {
    -  }
    -
    -  BackendNotPrepared( std::string&& backend )
    -    : backend_( std::move( backend ) )
    -  {
    -  }
    -
    -  const char* what() const noexcept override;
    -
     private:
       const std::string backend_;
    -};
    +  std::string msg_;
     
    -class BackendAlreadyRegistered : public KernelException
    -{
     public:
    -  BackendAlreadyRegistered( const std::string& backend )
    -    : backend_( backend )
    +  BackendNotPrepared( const std::string& backend )
    +    : KernelException( "BackendNotPrepared" )
    +    , backend_( backend )
       {
    +    msg_ = String::compose(
    +      "Backend %1 may not be cleanup()'d "
    +      "without preparation (multiple cleanups?).",
    +      backend_ );
       }
     
    -  BackendAlreadyRegistered( std::string&& backend )
    -    : backend_( std::move( backend ) )
    +  BackendNotPrepared( std::string&& backend )
    +    : KernelException( "BackendNotPrepared" )
    +    , backend_( std::move( backend ) )
       {
    +    msg_ = String::compose(
    +      "Backend %1 may not be cleanup()'d "
    +      "without preparation (multiple cleanups?).",
    +      backend_ );
       }
     
    -  const char* what() const noexcept override;
    -
    -private:
    -  const std::string backend_;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     class LayerExpected : public KernelException
    @@ -1268,18 +1385,22 @@ class LayerNodeExpected : public KernelException
     
     class UndefinedName : public KernelException
     {
    -  const std::string name_;
    +private:
    +  std::string msg_;
     
     public:
       UndefinedName( std::string name )
         : KernelException( "UndefinedName" )
    -    , name_( name )
       {
    +    msg_ = String::compose( "The name %1 is not defined.", name );
       }
     
    -  const char* what() const noexcept override;
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
     };
     
     } // namespace nest
    -
    -#endif
    +#endif // EXCEPTIONS_H
    
    From 3806e6b3accb30c378e97dce1804313095b8b036 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 13 Sep 2023 21:49:25 +0200
    Subject: [PATCH 154/375] Add BackendAlreadyRegistered exception
    
    ---
     nestkernel/exceptions.h | 29 +++++++++++++++++++++++++++++
     1 file changed, 29 insertions(+)
    
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 5b1cc45cbf..ae35eafdaa 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -1331,6 +1331,35 @@ class BackendPrepared : public KernelException
       };
     };
     
    +class BackendAlreadyRegistered : public KernelException
    +{
    +private:
    +  const std::string backend_;
    +  std::string msg_;
    +
    +public:
    +  BackendAlreadyRegistered( const std::string& backend )
    +    : KernelException( "BackendPrepared" )
    +    , backend_( backend )
    +  {
    +    msg_ = String::compose( "Backend %1 has already been registered.", backend_ );
    +  }
    +
    +  BackendAlreadyRegistered( std::string&& backend )
    +    : KernelException( "BackendPrepared" )
    +    , backend_( std::move( backend ) )
    +  {
    +    msg_ = String::compose( "Backend %1 has already been registered.", backend_ );
    +  }
    +
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +};
    +
    +
     class BackendNotPrepared : public KernelException
     {
     private:
    
    From 22cb917259792db84677290f5cb4bc43e868dc4c Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Wed, 13 Sep 2023 23:11:14 +0200
    Subject: [PATCH 155/375] Remove/replace check_stack and sli_func in new files
     from master
    
    ---
     examples/nest/music/conttest.py               |  2 +-
     .../music/minimalmusicsetup_receivenest.py    |  2 +-
     .../nest/music/minimalmusicsetup_sendnest.py  |  2 +-
     examples/nest/music/msgtest.py                |  2 +-
     nestkernel/kernel_manager.cpp                 |  4 +-
     nestkernel/mpi_manager.cpp                    |  1 +
     nestkernel/nest.cpp                           | 12 ----
     nestkernel/nest.h                             |  3 -
     nestkernel/nest_names.h                       |  1 +
     pynest/nest/lib/hl_api_helper.py              | 12 ++--
     pynest/nest/lib/hl_api_info.py                | 56 +------------------
     pynest/nest/lib/hl_api_parallel_computing.py  |  8 +--
     pynest/nestkernel_api.pxd                     |  2 -
     pynest/nestkernel_api.pyx                     |  8 ---
     testsuite/README.md                           |  2 +-
     .../mpi/4/test_consistent_local_vps.py        |  4 +-
     .../pytests/test_connect_fixed_indegree.py    |  5 +-
     .../pytests/test_connect_fixed_outdegree.py   |  5 +-
     .../test_connect_fixed_total_number.py        |  5 +-
     testsuite/pytests/test_connect_one_to_one.py  |  5 +-
     .../test_connect_pairwise_bernoulli.py        |  5 +-
     ...st_connect_symmetric_pairwise_bernoulli.py |  5 +-
     .../pytests/test_recording_backend_ascii.py   |  4 +-
     .../pytests/test_recording_backend_memory.py  |  4 +-
     testsuite/pytests/test_spike_transmission.py  |  3 +-
     testsuite/pytests/test_stdp_pl_synapse_hom.py |  1 -
     testsuite/regressiontests/issue-1703.py       |  2 +-
     27 files changed, 38 insertions(+), 127 deletions(-)
    
    diff --git a/examples/nest/music/conttest.py b/examples/nest/music/conttest.py
    index c2ceada447..8f4e36f529 100755
    --- a/examples/nest/music/conttest.py
    +++ b/examples/nest/music/conttest.py
    @@ -22,7 +22,7 @@
     
     import nest
     
    -if not nest.ll_api.sli_func("statusdict/have_music ::"):
    +if not nest.build_info["have_music"]:
         import sys
     
         print("NEST was not compiled with support for MUSIC, not running.")
    diff --git a/examples/nest/music/minimalmusicsetup_receivenest.py b/examples/nest/music/minimalmusicsetup_receivenest.py
    index 2fda922da3..93721d0771 100755
    --- a/examples/nest/music/minimalmusicsetup_receivenest.py
    +++ b/examples/nest/music/minimalmusicsetup_receivenest.py
    @@ -22,7 +22,7 @@
     
     import nest
     
    -if not nest.ll_api.sli_func("statusdict/have_music ::"):
    +if not nest.build_info["have_music"]:
         import sys
     
         print("NEST was not compiled with support for MUSIC, not running.")
    diff --git a/examples/nest/music/minimalmusicsetup_sendnest.py b/examples/nest/music/minimalmusicsetup_sendnest.py
    index 3985e9cb34..ce2450ba89 100755
    --- a/examples/nest/music/minimalmusicsetup_sendnest.py
    +++ b/examples/nest/music/minimalmusicsetup_sendnest.py
    @@ -22,7 +22,7 @@
     
     import nest
     
    -if not nest.ll_api.sli_func("statusdict/have_music ::"):
    +if not nest.build_info["have_music"]:
         import sys
     
         print("NEST was not compiled with support for MUSIC, not running.")
    diff --git a/examples/nest/music/msgtest.py b/examples/nest/music/msgtest.py
    index 27634ae44d..0e7c2b58de 100755
    --- a/examples/nest/music/msgtest.py
    +++ b/examples/nest/music/msgtest.py
    @@ -22,7 +22,7 @@
     
     import nest
     
    -if not nest.ll_api.sli_func("statusdict/have_music ::"):
    +if not nest.build_info["have_music"]:
         import sys
     
         print("NEST was not compiled with support for MUSIC, not running.")
    diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp
    index ec3e4fe867..1faadc410a 100644
    --- a/nestkernel/kernel_manager.cpp
    +++ b/nestkernel/kernel_manager.cpp
    @@ -49,8 +49,8 @@ nest::KernelManager::get_build_info_()
       build_info[ "version" ] = std::string( NEST_VERSION );
       build_info[ "exitcode" ] = EXIT_SUCCESS;
       build_info[ "built" ] = std::string( String::compose( "%1 %2", __DATE__, __TIME__ ) );
    -  build_info[ "data_dir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DATADIR );
    -  build_info[ "doc_dir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DOCDIR );
    +  build_info[ "datadir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DATADIR );
    +  build_info[ "docdir" ] = std::string( NEST_INSTALL_PREFIX "/" NEST_INSTALL_DOCDIR );
       build_info[ "prefix" ] = std::string( NEST_INSTALL_PREFIX );
       build_info[ "host" ] = std::string( NEST_HOST );
       build_info[ "hostos" ] = std::string( NEST_HOSTOS );
    diff --git a/nestkernel/mpi_manager.cpp b/nestkernel/mpi_manager.cpp
    index 9ec39f92be..9835ea38f5 100644
    --- a/nestkernel/mpi_manager.cpp
    +++ b/nestkernel/mpi_manager.cpp
    @@ -243,6 +243,7 @@ void
     nest::MPIManager::get_status( dictionary& dict )
     {
       dict[ names::num_processes ] = num_processes_;
    +  dict[ names::mpi_rank ] = rank_;
       dict[ names::adaptive_target_buffers ] = adaptive_target_buffers_;
       dict[ names::buffer_size_target_data ] = buffer_size_target_data_;
       dict[ names::buffer_size_spike_data ] = buffer_size_spike_data_;
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index cfb179d06b..d7430e7aee 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -322,18 +322,6 @@ register_logger_client( const deliver_logging_event_ptr client_callback )
       kernel().logging_manager.register_logging_client( client_callback );
     }
     
    -int
    -get_rank()
    -{
    -  return kernel().mpi_manager.get_rank();
    -}
    -
    -int
    -get_num_mpi_processes()
    -{
    -  return kernel().mpi_manager.get_num_processes();
    -}
    -
     std::string
     print_nodes_to_string()
     {
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 1ed0bf9e7c..bd1d24fc75 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -66,9 +66,6 @@ void disable_structural_plasticity();
     
     void register_logger_client( const deliver_logging_event_ptr client_callback );
     
    -int get_rank();
    -int get_num_mpi_processes();
    -
     std::string print_nodes_to_string();
     
     std::string pprint_to_string( NodeCollectionPTR nc );
    diff --git a/nestkernel/nest_names.h b/nestkernel/nest_names.h
    index ec58820faf..f0d4009754 100644
    --- a/nestkernel/nest_names.h
    +++ b/nestkernel/nest_names.h
    @@ -308,6 +308,7 @@ const std::string min_delay( "min_delay" );
     const std::string min_update_time( "min_update_time" );
     const std::string minor_axis( "minor_axis" );
     const std::string mpi_address( "mpi_address" );
    +const std::string mpi_rank( "mpi_rank" );
     const std::string model( "model" );
     const std::string model_id( "model_id" );
     const std::string ms_per_tic( "ms_per_tic" );
    diff --git a/pynest/nest/lib/hl_api_helper.py b/pynest/nest/lib/hl_api_helper.py
    index d2fa247313..3034b5c8ba 100644
    --- a/pynest/nest/lib/hl_api_helper.py
    +++ b/pynest/nest/lib/hl_api_helper.py
    @@ -284,7 +284,7 @@ def get_help_fname(obj):
             File name of the help text for obj
         """
     
    -    docdir = sli_func("statusdict/prgdocdir ::")
    +    docdir = nestkernel.ll_api_get_kernel_status()["docdir"]
         help_fname = os.path.join(docdir, "html", "models", f"{obj}.rst")
     
         if os.path.isfile(help_fname):
    @@ -513,8 +513,7 @@ def __init__(self, no_dep_funcs):
     
             self._no_dep_funcs = no_dep_funcs if not isinstance(no_dep_funcs, str) else (no_dep_funcs,)
             self._deprecation_status = {}
    -        sr("verbosity")  # Use sli-version as we cannon import from info because of cirular inclusion problem
    -        self._verbosity_level = spp()
    +        self._verbosity_level = nestkernel.get_verbosity()
     
         def __enter__(self):
             for func_name in self._no_dep_funcs:
    @@ -522,13 +521,12 @@ def __enter__(self):
                 _deprecation_warning[func_name]["deprecation_issued"] = True
     
                 # Suppress only if verbosity level is deprecated or lower
    -            if self._verbosity_level <= sli_func("M_DEPRECATED"):
    -                # Use sli-version as we cannon import from info because of cirular inclusion problem
    -                sr("{} setverbosity".format(sli_func("M_WARNING")))
    +            if self._verbosity_level <= nestkernel.severity_t.M_DEPRECATED:
    +                nestkernel.set_verbosity(nestkernel.severity_t.M_WARNING)
     
         def __exit__(self, *args):
             # Reset the verbosity level and deprecation warning status
    -        # sr("{} setverbosity".format((self._verbosity_level)))
    +        nestkernel.set_verbosity(self._verbosity_level)
     
             for func_name, deprec_dict in self._deprecation_status.items():
                 _deprecation_warning[func_name]["deprecation_issued"] = deprec_dict["deprecation_issued"]
    diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py
    index 0bf66ff47d..179f85768d 100644
    --- a/pynest/nest/lib/hl_api_info.py
    +++ b/pynest/nest/lib/hl_api_info.py
    @@ -34,32 +34,16 @@
     from .hl_api_types import to_json
     
     __all__ = [
    -    "authors",
    -    "get_argv",
         "get_verbosity",
         "help",
         "helpdesk",
    -    "message",
         "set_verbosity",
    -    "sysinfo",
         "verbosity",
     ]
     
     verbosity = nestkernel.severity_t
     
     
    -def sysinfo():
    -    """Print information on the platform on which NEST was compiled."""
    -
    -    sr("sysinfo")
    -
    -
    -def authors():
    -    """Print the authors of NEST."""
    -
    -    sr("authors")
    -
    -
     def helpdesk():
         """Open the NEST documentation index in a browser.
     
    @@ -72,7 +56,7 @@ def helpdesk():
     
         """
     
    -    docdir = sli_func("statusdict/prgdocdir ::")
    +    docdir = nestkernel.ll_api_get_kernel_status()["docdir"]
         help_fname = os.path.join(docdir, "html", "index.html")
     
         if not os.path.isfile(help_fname):
    @@ -125,44 +109,6 @@ def help(obj=None, return_text=False):
             print(nest.__doc__)
     
     
    -def get_argv():
    -    """Return argv as seen by NEST.
    -
    -    This is similar to Python :code:`sys.argv` but might have changed after
    -    MPI initialization.
    -
    -    Returns
    -    -------
    -    tuple
    -        Argv, as seen by NEST
    -
    -    """
    -
    -    sr("statusdict")
    -    statusdict = spp()
    -    return statusdict["argv"]
    -
    -
    -def message(level, sender, text):
    -    """Print a message using message system of NEST.
    -
    -    Parameters
    -    ----------
    -    level :
    -        Level
    -    sender :
    -        Message sender
    -    text : str
    -        Text to be sent in the message
    -
    -    """
    -
    -    sps(level)
    -    sps(sender)
    -    sps(text)
    -    sr("message")
    -
    -
     def get_verbosity():
         """Return verbosity level of NEST's messages.
     
    diff --git a/pynest/nest/lib/hl_api_parallel_computing.py b/pynest/nest/lib/hl_api_parallel_computing.py
    index a89546282c..44d489043a 100644
    --- a/pynest/nest/lib/hl_api_parallel_computing.py
    +++ b/pynest/nest/lib/hl_api_parallel_computing.py
    @@ -55,7 +55,7 @@ def Rank():
         may complete but generate nonsensical results.
         """
     
    -    return nestkernel.llapi_get_rank()
    +    return nestkernel.llapi_get_kernel_status()["mpi_rank"]
     
     
     def NumProcesses():
    @@ -67,7 +67,7 @@ def NumProcesses():
             Number of overall MPI processes
         """
     
    -    return nestkernel.llapi_get_num_mpi_processes()
    +    return nestkernel.llapi_get_kernel_status()["num_processes"]
     
     
     def SetAcceptableLatency(port_name, latency):
    @@ -121,7 +121,5 @@ def GetLocalVPs():
         # VPManager::get_vp(). mpitest_get_local_vps ensures this is in
         # sync with the kernel.
     
    -    # PYNEST-NG
    -    # n_vp = sli_func("GetKernelStatus /total_num_virtual_procs get")
    -    n_vp = 1
    +    n_vp = nestkernel.llapi_get_kernel_status()["total_num_virtual_procs"]
         return range(Rank(), n_vp, NumProcesses())
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 1c165758c9..747b4869c6 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -136,8 +136,6 @@ cdef extern from "nest.h" namespace "nest":
                      const dictionary& connectivity,
                      const dictionary& synapse_params) except +
         void disconnect( const deque[ConnectionID]& conns ) except +
    -    int get_rank() except +
    -    int get_num_mpi_processes() except +
         string print_nodes_to_string()
         string pprint_to_string( NodeCollectionPTR nc ) except +
         size_t nc_size( NodeCollectionPTR nc ) except +
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 91f2a29948..f4cffb88f9 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -505,14 +505,6 @@ def llapi_slice(NodeCollectionObject nc, long start, long stop, long step):
         obj._set_nc(nc_ptr)
         return nest.NodeCollection(obj)
     
    -@catch_cpp_error
    -def llapi_get_rank():
    -    return get_rank()
    -
    -@catch_cpp_error
    -def llapi_get_num_mpi_processes():
    -    return get_num_mpi_processes()
    -
     def llapi_print_nodes():
         return string_to_pystr(print_nodes_to_string())
     
    diff --git a/testsuite/README.md b/testsuite/README.md
    index 130e824a99..1ad6d3a29d 100644
    --- a/testsuite/README.md
    +++ b/testsuite/README.md
    @@ -33,7 +33,7 @@ When writing tests, please adhere to the following guidelines:
     
       For tests using PyNEST, define
       
    -      HAVE_GSL = nest.sli_func("statusdict/have_gsl ::")
    +      HAVE_GSL = nest.build_info["have_gsl"]
     
       and then apply the following decorator to all pertaining test classes
     
    diff --git a/testsuite/pytests/mpi/4/test_consistent_local_vps.py b/testsuite/pytests/mpi/4/test_consistent_local_vps.py
    index c27ff277ad..c50e23f1a6 100644
    --- a/testsuite/pytests/mpi/4/test_consistent_local_vps.py
    +++ b/testsuite/pytests/mpi/4/test_consistent_local_vps.py
    @@ -23,10 +23,10 @@
     
     import nest
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     def test_consistent_local_vps():
         """
         Test local_vps field of kernel status.
    diff --git a/testsuite/pytests/test_connect_fixed_indegree.py b/testsuite/pytests/test_connect_fixed_indegree.py
    index 2a1615a2c8..b1ba10145e 100644
    --- a/testsuite/pytests/test_connect_fixed_indegree.py
    +++ b/testsuite/pytests/test_connect_fixed_indegree.py
    @@ -27,11 +27,10 @@
     import numpy as np
     import scipy.stats
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    -@nest.ll_api.check_stack
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestFixedInDegree(connect_test_base.ConnectTestBase):
         # specify connection pattern and specific params
         rule = "fixed_indegree"
    diff --git a/testsuite/pytests/test_connect_fixed_outdegree.py b/testsuite/pytests/test_connect_fixed_outdegree.py
    index 9547ec8438..1cb661b21b 100644
    --- a/testsuite/pytests/test_connect_fixed_outdegree.py
    +++ b/testsuite/pytests/test_connect_fixed_outdegree.py
    @@ -26,11 +26,10 @@
     import numpy as np
     import scipy.stats
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    -@nest.ll_api.check_stack
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestFixedOutDegree(connect_test_base.ConnectTestBase):
         # specify connection pattern and specific params
         rule = "fixed_outdegree"
    diff --git a/testsuite/pytests/test_connect_fixed_total_number.py b/testsuite/pytests/test_connect_fixed_total_number.py
    index 006b8e097e..6b297b9d6b 100644
    --- a/testsuite/pytests/test_connect_fixed_total_number.py
    +++ b/testsuite/pytests/test_connect_fixed_total_number.py
    @@ -26,11 +26,10 @@
     import numpy as np
     import scipy.stats
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    -@nest.ll_api.check_stack
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestFixedTotalNumber(connect_test_base.ConnectTestBase):
         # specify connection pattern and specific params
         rule = "fixed_total_number"
    diff --git a/testsuite/pytests/test_connect_one_to_one.py b/testsuite/pytests/test_connect_one_to_one.py
    index 7bcce2f8f4..15ac86e026 100644
    --- a/testsuite/pytests/test_connect_one_to_one.py
    +++ b/testsuite/pytests/test_connect_one_to_one.py
    @@ -25,11 +25,10 @@
     import nest
     import numpy as np
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    -@nest.ll_api.check_stack
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestOneToOne(connect_test_base.ConnectTestBase):
         # specify connection pattern
         rule = "one_to_one"
    diff --git a/testsuite/pytests/test_connect_pairwise_bernoulli.py b/testsuite/pytests/test_connect_pairwise_bernoulli.py
    index cb8e2a110e..255703f016 100644
    --- a/testsuite/pytests/test_connect_pairwise_bernoulli.py
    +++ b/testsuite/pytests/test_connect_pairwise_bernoulli.py
    @@ -27,11 +27,10 @@
     import numpy as np
     import scipy.stats
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    -@nest.ll_api.check_stack
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestPairwiseBernoulli(connect_test_base.ConnectTestBase):
         # specify connection pattern and specific params
         rule = "pairwise_bernoulli"
    diff --git a/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py b/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py
    index f55134a270..3290127a65 100644
    --- a/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py
    +++ b/testsuite/pytests/test_connect_symmetric_pairwise_bernoulli.py
    @@ -28,11 +28,10 @@
     import numpy as np
     import scipy.stats
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    -@nest.ll_api.check_stack
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestSymmetricPairwiseBernoulli(connect_test_base.ConnectTestBase):
         # sizes of source-, target-population and connection probability for
         # statistical test
    diff --git a/testsuite/pytests/test_recording_backend_ascii.py b/testsuite/pytests/test_recording_backend_ascii.py
    index 4ba1815994..129f5f1c2d 100644
    --- a/testsuite/pytests/test_recording_backend_ascii.py
    +++ b/testsuite/pytests/test_recording_backend_ascii.py
    @@ -24,10 +24,10 @@
     
     import nest
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestRecordingBackendASCII(unittest.TestCase):
         def testAAAOverwriteFiles(self):
             nest.ResetKernel()
    diff --git a/testsuite/pytests/test_recording_backend_memory.py b/testsuite/pytests/test_recording_backend_memory.py
    index 7f1b105b16..459b45afc8 100644
    --- a/testsuite/pytests/test_recording_backend_memory.py
    +++ b/testsuite/pytests/test_recording_backend_memory.py
    @@ -24,10 +24,10 @@
     import nest
     import numpy as np
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_THREADS = nest.build_info["have_threads"]
     
     
    -@unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    +@unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
     class TestRecordingBackendMemory(unittest.TestCase):
         def testEventsDict(self):
             """Test if the event dict is there from the start."""
    diff --git a/testsuite/pytests/test_spike_transmission.py b/testsuite/pytests/test_spike_transmission.py
    index 58b95e7f1a..215e482138 100644
    --- a/testsuite/pytests/test_spike_transmission.py
    +++ b/testsuite/pytests/test_spike_transmission.py
    @@ -30,13 +30,12 @@
     # implement this switch. Then, one should also see if we can parametrize
     # the entire class instead of parametrizing each test in the class in the
     # same way.
    -if nest.ll_api.sli_func("is_threaded"):
    +if nest.build_info["have_threads"]:
         THREAD_NUMBERS = [1, 2, 3, 4]
     else:
         THREAD_NUMBERS = [1]
     
     
    -@nest.ll_api.check_stack
     class TestSpikeTransmission:
         """
         Test that spikes are transmitted correctly for different numbers of spikes.
    diff --git a/testsuite/pytests/test_stdp_pl_synapse_hom.py b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    index a9dcb6507d..865b227e64 100644
    --- a/testsuite/pytests/test_stdp_pl_synapse_hom.py
    +++ b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    @@ -37,7 +37,6 @@
             DEBUG_PLOTS = False
     
     
    -@nest.ll_api.check_stack
     class TestSTDPPlSynapse:
         """
         Compare the STDP power-law synaptic plasticity model against a self-contained Python reference.
    diff --git a/testsuite/regressiontests/issue-1703.py b/testsuite/regressiontests/issue-1703.py
    index 099f3205bc..264a1bb2e5 100644
    --- a/testsuite/regressiontests/issue-1703.py
    +++ b/testsuite/regressiontests/issue-1703.py
    @@ -54,7 +54,7 @@
     my_env = os.environ.copy()
     exit_code = subprocess.call(cmd, env=my_env)
     
    -if nest.ll_api.sli_func("statusdict/have_music ::"):
    +if nest.build_info["have_music"]:
         # Expect error, not segfault
         if exit_code == EXIT_CODE_ERROR:
             sys.exit(EXIT_SUCCESS)
    
    From a4e5728eaceeafe10bdf528a62df212bc5b53af3 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 14 Sep 2023 09:50:09 +0200
    Subject: [PATCH 156/375] nest-ng-ify update values
    
    ---
     nestkernel/recording_backend_mpi.cpp   | 2 +-
     nestkernel/stimulation_backend_mpi.cpp | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/recording_backend_mpi.cpp b/nestkernel/recording_backend_mpi.cpp
    index 93b44b6606..1045538674 100644
    --- a/nestkernel/recording_backend_mpi.cpp
    +++ b/nestkernel/recording_backend_mpi.cpp
    @@ -86,7 +86,7 @@ nest::RecordingBackendMPI::enroll( const RecordingDevice& device, const dictiona
         devices_[ tid ].insert( std::make_pair( node_id, tuple ) );
         enrolled_ = true;
     
    -    updateValue< std::string >( params, names::mpi_address, mpi_address_ );
    +    params.update_value( names::mpi_address, mpi_address_ );
       }
       else
       {
    diff --git a/nestkernel/stimulation_backend_mpi.cpp b/nestkernel/stimulation_backend_mpi.cpp
    index c0133a61ef..03d104c067 100644
    --- a/nestkernel/stimulation_backend_mpi.cpp
    +++ b/nestkernel/stimulation_backend_mpi.cpp
    @@ -81,7 +81,7 @@ nest::StimulationBackendMPI::enroll( nest::StimulationDevice& device, const dict
       enrolled_ = true;
     
       // Try to read the mpi_address from the device status
    -  updateValue< std::string >( params, names::mpi_address, mpi_address_ );
    +  params.update_value( names::mpi_address, mpi_address_ );
     }
     
     
    
    From c9d7bb8c5b919197574569649028d5a37da077cb Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 14 Sep 2023 09:50:23 +0200
    Subject: [PATCH 157/375] Add missing MPI exceptions
    
    ---
     nestkernel/exceptions.h | 50 +++++++++++++++++++++++++++++++++++++++++
     1 file changed, 50 insertions(+)
    
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index ae35eafdaa..3fbe2d0668 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -34,6 +34,11 @@
     // Includes from thirdparty:
     #include "compose.hpp"
     
    +// Include MPI for MPI error string
    +#ifdef HAVE_MPI
    +#include <mpi.h>
    +#endif
    +
     namespace nest
     {
     
    @@ -1278,6 +1283,51 @@ class MPIPortsFileUnknown : public KernelException
         return msg_.data();
       };
     };
    +
    +class MPIPortsFileMissing : public KernelException
    +{
    +private:
    +  std::string msg_;
    +
    +public:
    +  explicit MPIPortsFileMissing( const size_t node_id, const std::string path )
    +  {
    +    msg_ = String::compose(
    +      "The node with ID %1 expects a file with the MPI address at location %2. "
    +      "The file does not seem to exist.",
    +      node_id,
    +      path );
    +  }
    +
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +};
    +
    +class MPIErrorCode : public KernelException
    +{
    +private:
    +  std::string msg_;
    +  std::string error_;
    +  char errmsg_[ 256 ];
    +  int len_;
    +
    +public:
    +  explicit MPIErrorCode( const int error_code )
    +  {
    +    MPI_Error_string( error_code, errmsg_, &len_ );
    +    error_.assign( errmsg_, len_ );
    +    msg_ = String::compose( "MPI Error: %1", error_ );
    +  }
    +
    +  const char*
    +  what() const noexcept override
    +  {
    +    return msg_.data();
    +  };
    +};
     #endif // HAVE_MPI
     
     class UnmatchedSteps : public KernelException
    
    From 92afa6b067aa58d31fce381580ba6d1bdc7a2253 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 14 Sep 2023 11:49:19 +0200
    Subject: [PATCH 158/375] Port the modelsmodule generation framework to
     new-pynest
    
    ---
     build_support/generate_modelsmodule.py |  23 +---
     models/CMakeLists.txt                  |   4 +-
     models/modelsmodule.h                  |  31 +----
     nestkernel/CMakeLists.txt              |  57 +--------
     nestkernel/nest.cpp                    | 169 +------------------------
     5 files changed, 10 insertions(+), 274 deletions(-)
    
    diff --git a/build_support/generate_modelsmodule.py b/build_support/generate_modelsmodule.py
    index 7540499a29..c85d79b9c1 100644
    --- a/build_support/generate_modelsmodule.py
    +++ b/build_support/generate_modelsmodule.py
    @@ -254,6 +254,8 @@ def generate_modelsmodule():
                 #include "config.h"
     
                 // Includes from nestkernel
    +            #include "nest_impl.h"
    +            #include "nest.h"
                 #include "common_synapse_properties.h"
                 #include "connector_model_impl.h"
                 #include "genericmodel.h"
    @@ -274,26 +276,7 @@ def generate_modelsmodule():
                     file.write(end_guard(guards))
     
             file.write(
    -            dedent(
    -                """
    -            nest::ModelsModule::ModelsModule()
    -            {
    -            }
    -
    -            nest::ModelsModule::~ModelsModule()
    -            {
    -            }
    -
    -            const std::string
    -            nest::ModelsModule::name() const
    -            {
    -              return std::string( "NEST standard models module" );
    -            }
    -
    -            void
    -            nest::ModelsModule::init( SLIInterpreter* )
    -            {"""
    -            )
    +            dedent("\nvoid\nnest::register_stuff()\n{\n")
             )
     
             conn_reg = '  register_connection_model< {model} >( "{model}" );\n'
    diff --git a/models/CMakeLists.txt b/models/CMakeLists.txt
    index 9f84b7cf22..1f80b44f52 100644
    --- a/models/CMakeLists.txt
    +++ b/models/CMakeLists.txt
    @@ -17,10 +17,8 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -# TODO: PYNEST-NG
    -#modelsmodule.h ${PROJECT_BINARY_DIR}/models/modelsmodule.cpp
    -
     set(models_sources
    +    modelsmodule.h ${PROJECT_BINARY_DIR}/models/modelsmodule.cpp
         binary_neuron.h
         cm_compartmentcurrents.h cm_compartmentcurrents.cpp
         cm_tree.h cm_tree.cpp
    diff --git a/models/modelsmodule.h b/models/modelsmodule.h
    index 3bcf904fb0..ffaf91ee82 100644
    --- a/models/modelsmodule.h
    +++ b/models/modelsmodule.h
    @@ -23,38 +23,9 @@
     #ifndef MODELSMODULE_H
     #define MODELSMODULE_H
     
    -// C++ includes:
    -#include <string>
    -
    -// Includes from nestkernel:
    -#include "nest_impl.h"
    -
    -
     namespace nest
     {
    -/**
    - * Module supplying all models that are included in the NEST release.
    - *
    - * First Version: June 2006
    - *
    - * @todo Should this be a dynamic module?
    - */
    -class ModelsModule : public SLIModule
    -{
    -public:
    -  ModelsModule();
    -  ~ModelsModule() override;
    -
    -  /**
    -   * Initialize module by registering models with the network.
    -   * @param SLIInterpreter* SLI interpreter
    -   */
    -  void init( SLIInterpreter* ) override;
    -
    -  const std::string name() const override;
    -};
    -
    -
    +  void register_stuff();
     } // namespace
     
     #endif
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index 28031db219..ae6b9d9cb5 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -113,61 +113,6 @@ set ( nestkernel_sources
           position.h
           spatial.h spatial.cpp
           stimulation_backend.h
    -  ../models/iaf_psc_alpha.h ../models/iaf_psc_alpha.cpp
    -  ../models/iaf_psc_delta.h ../models/iaf_psc_delta.cpp
    -  ../models/iaf_psc_exp.h ../models/iaf_psc_exp.cpp
    -  ../models/iaf_psc_exp_multisynapse.h ../models/iaf_psc_exp_multisynapse.cpp
    -  ../models/parrot_neuron.h ../models/parrot_neuron.cpp
    -  ../models/weight_recorder.h ../models/weight_recorder.cpp
    -  ../models/stdp_pl_synapse_hom.h ../models/stdp_pl_synapse_hom.cpp
    -  ../models/stdp_dopamine_synapse.h ../models/stdp_dopamine_synapse.cpp
    -  ../models/stdp_synapse_hom.h ../models/stdp_synapse_hom.cpp
    -  ../models/volume_transmitter.h ../models/volume_transmitter.cpp
    -  ../models/tsodyks_synapse_hom.h ../models/tsodyks_synapse_hom.cpp
    -  ../models/ac_generator.h ../models/ac_generator.cpp
    -  ../models/dc_generator.h ../models/dc_generator.cpp
    -  ../models/spike_generator.h ../models/spike_generator.cpp
    -  ../models/spike_recorder.h ../models/spike_recorder.cpp
    -  ../models/spike_train_injector.h ../models/spike_train_injector.cpp
    -  ../models/poisson_generator.h ../models/poisson_generator.cpp
    -  ../models/poisson_generator_ps.h ../models/poisson_generator_ps.cpp
    -  ../models/multimeter.h ../models/multimeter.cpp
    -  ../models/noise_generator.h ../models/noise_generator.cpp
    -  ../models/aeif_cond_alpha.h ../models/aeif_cond_alpha.cpp
    -  ../models/aeif_cond_alpha_multisynapse.h ../models/aeif_cond_alpha_multisynapse.cpp
    -  ../models/aeif_cond_beta_multisynapse.h ../models/aeif_cond_beta_multisynapse.cpp
    -  ../models/aeif_psc_delta_clopath.h ../models/aeif_psc_delta_clopath.cpp
    -  ../models/cm_default.h ../models/cm_default.cpp
    -  ../models/cm_tree.h ../models/cm_tree.cpp
    -  ../models/cm_compartmentcurrents.h ../models/cm_compartmentcurrents.cpp
    -  ../models/erfc_neuron.h ../models/erfc_neuron.cpp
    -  ../models/glif_cond.h ../models/glif_cond.cpp
    -  ../models/glif_psc.h ../models/glif_psc.cpp
    -  ../models/hh_psc_alpha_gap.h ../models/hh_psc_alpha_gap.cpp
    -  ../models/ht_neuron.h ../models/ht_neuron.cpp
    -  ../models/iaf_cond_alpha_mc.h ../models/iaf_cond_alpha_mc.cpp
    -  ../models/pp_psc_delta.h ../models/pp_psc_delta.cpp
    -  ../models/lin_rate.h ../models/lin_rate.cpp
    -  ../models/tanh_rate.h ../models/tanh_rate.cpp
    -  ../models/threshold_lin_rate.h ../models/threshold_lin_rate.cpp
    -  ../models/iaf_cond_alpha.h ../models/iaf_cond_alpha.cpp
    -  ../models/parrot_neuron_ps.h ../models/parrot_neuron_ps.cpp
    -  ../models/step_rate_generator.h ../models/step_rate_generator.cpp
    -  ../models/step_current_generator.h ../models/step_current_generator.cpp
    -  ../models/hh_psc_alpha_clopath.h ../models/hh_psc_alpha_clopath.cpp
    -  ../models/iaf_cond_exp.h ../models/iaf_cond_exp.cpp
    -  ../models/aeif_cond_exp.h ../models/aeif_cond_exp.cpp
    -  ../models/aeif_psc_alpha.h ../models/aeif_psc_alpha.cpp
    -  ../models/aeif_psc_delta.h ../models/aeif_psc_delta.cpp
    -  ../models/aeif_psc_exp.h ../models/aeif_psc_exp.cpp
    -  ../models/spin_detector.h ../models/spin_detector.cpp
    -  ../models/pp_cond_exp_mc_urbanczik.h ../models/pp_cond_exp_mc_urbanczik.cpp
    -  ../models/siegert_neuron.h ../models/siegert_neuron.cpp
    -  ../models/sigmoid_rate_gg_1998.h ../models/sigmoid_rate_gg_1998.cpp
    -  ../models/gap_junction.h
    -  ../models/rate_connection_instantaneous.h
    -  ../models/rate_connection_delayed.h
    -  ../models/diffusion_connection.h
     )
     
     
    @@ -198,7 +143,7 @@ endif()
     set_target_properties(nestkernel PROPERTIES POSITION_INDEPENDENT_CODE ON)
     
     target_link_libraries( nestkernel
    -  nestutil ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES} ${HDF5_LIBRARIES}
    +  nestutil models ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES} ${HDF5_LIBRARIES}
     )
     
     target_include_directories( nestkernel PRIVATE
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index d7430e7aee..52f79cf441 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -37,89 +37,6 @@
     
     #include "connector_model_impl.h"
     
    -#include "ac_generator.h"
    -#include "aeif_cond_alpha.h"
    -#include "aeif_cond_alpha_multisynapse.h"
    -#include "aeif_cond_beta_multisynapse.h"
    -#include "aeif_psc_delta_clopath.h"
    -#include "cm_default.h"
    -#include "dc_generator.h"
    -#include "erfc_neuron.h"
    -#include "glif_cond.h"
    -#include "glif_psc.h"
    -#include "hh_psc_alpha_gap.h"
    -#include "ht_neuron.h"
    -#include "iaf_cond_alpha.h"
    -#include "iaf_cond_alpha_mc.h"
    -#include "lin_rate.h"
    -#include "multimeter.h"
    -#include "noise_generator.h"
    -#include "poisson_generator.h"
    -#include "poisson_generator_ps.h"
    -#include "pp_psc_delta.h"
    -#include "spike_generator.h"
    -#include "spike_recorder.h"
    -#include "spike_train_injector.h"
    -#include "tanh_rate.h"
    -
    -#include "aeif_cond_exp.h"
    -#include "hh_psc_alpha_clopath.h"
    -#include "iaf_cond_exp.h"
    -#include "parrot_neuron_ps.h"
    -#include "siegert_neuron.h"
    -#include "sigmoid_rate_gg_1998.h"
    -#include "step_current_generator.h"
    -#include "step_rate_generator.h"
    -
    -#include "aeif_psc_alpha.h"
    -#include "aeif_psc_delta.h"
    -#include "aeif_psc_exp.h"
    -#include "threshold_lin_rate.h"
    -
    -#include "iaf_psc_alpha.h"
    -#include "iaf_psc_delta.h"
    -#include "iaf_psc_exp.h"
    -#include "iaf_psc_exp_multisynapse.h"
    -
    -#include "pp_cond_exp_mc_urbanczik.h"
    -#include "spin_detector.h"
    -
    -#include "parrot_neuron.h"
    -
    -#include "bernoulli_synapse.h"
    -#include "clopath_synapse.h"
    -#include "common_synapse_properties.h"
    -#include "cont_delay_synapse.h"
    -#include "cont_delay_synapse_impl.h"
    -#include "diffusion_connection.h"
    -#include "gap_junction.h"
    -#include "ht_synapse.h"
    -#include "jonke_synapse.h"
    -#include "quantal_stp_synapse.h"
    -#include "quantal_stp_synapse_impl.h"
    -#include "rate_connection_delayed.h"
    -#include "rate_connection_instantaneous.h"
    -#include "static_synapse.h"
    -#include "static_synapse_hom_w.h"
    -#include "stdp_dopamine_synapse.h"
    -#include "stdp_facetshw_synapse_hom.h"
    -#include "stdp_facetshw_synapse_hom_impl.h"
    -#include "stdp_nn_pre_centered_synapse.h"
    -#include "stdp_nn_restr_synapse.h"
    -#include "stdp_nn_symm_synapse.h"
    -#include "stdp_pl_synapse_hom.h"
    -#include "stdp_synapse.h"
    -#include "stdp_synapse_hom.h"
    -#include "stdp_triplet_synapse.h"
    -#include "tsodyks2_synapse.h"
    -#include "tsodyks_synapse.h"
    -#include "tsodyks_synapse_hom.h"
    -#include "urbanczik_synapse.h"
    -#include "vogels_sprekeler_synapse.h"
    -
    -#include "volume_transmitter.h"
    -#include "weight_recorder.h"
    -
     #include "conn_builder_conngen.h"
     
     #include "grid_mask.h"
    @@ -134,6 +51,8 @@
     #include "config.h"
     #include "dictionary.h"
     
    +#include "modelsmodule.h"
    +
     namespace nest
     {
     
    @@ -148,88 +67,6 @@ init_nest( int* argc, char** argv[] )
       kernel().initialize();
     
     
    -  kernel().model_manager.register_node_model< ac_generator >( "ac_generator" );
    -  kernel().model_manager.register_node_model< dc_generator >( "dc_generator" );
    -  kernel().model_manager.register_node_model< spike_generator >( "spike_generator" );
    -  kernel().model_manager.register_node_model< spike_train_injector >( "spike_train_injector" );
    -  kernel().model_manager.register_node_model< spike_recorder >( "spike_recorder" );
    -  kernel().model_manager.register_node_model< poisson_generator >( "poisson_generator" );
    -  kernel().model_manager.register_node_model< poisson_generator_ps >( "poisson_generator_ps" );
    -  kernel().model_manager.register_node_model< voltmeter >( "voltmeter" );
    -  kernel().model_manager.register_node_model< multimeter >( "multimeter" );
    -  kernel().model_manager.register_node_model< noise_generator >( "noise_generator" );
    -  kernel().model_manager.register_node_model< aeif_cond_alpha >( "aeif_cond_alpha" );
    -  kernel().model_manager.register_node_model< aeif_cond_alpha_multisynapse >( "aeif_cond_alpha_multisynapse" );
    -  kernel().model_manager.register_node_model< aeif_cond_beta_multisynapse >( "aeif_cond_beta_multisynapse" );
    -  kernel().model_manager.register_node_model< aeif_psc_delta_clopath >( "aeif_psc_delta_clopath" );
    -  kernel().model_manager.register_node_model< cm_default >( "cm_default" );
    -  kernel().model_manager.register_node_model< erfc_neuron >( "erfc_neuron" );
    -  kernel().model_manager.register_node_model< glif_cond >( "glif_cond" );
    -  kernel().model_manager.register_node_model< glif_psc >( "glif_psc" );
    -  kernel().model_manager.register_node_model< hh_psc_alpha_gap >( "hh_psc_alpha_gap" );
    -  kernel().model_manager.register_node_model< ht_neuron >( "ht_neuron" );
    -  kernel().model_manager.register_node_model< iaf_cond_alpha_mc >( "iaf_cond_alpha_mc" );
    -  kernel().model_manager.register_node_model< pp_psc_delta >( "pp_psc_delta" );
    -  kernel().model_manager.register_node_model< lin_rate_ipn >( "lin_rate_ipn" );
    -  kernel().model_manager.register_node_model< iaf_cond_alpha >( "iaf_cond_alpha" );
    -  kernel().model_manager.register_node_model< rate_transformer_sigmoid_gg_1998 >( "rate_transformer_sigmoid_gg_1998" );
    -
    -  kernel().model_manager.register_node_model< tanh_rate_ipn >( "tanh_rate_ipn" );
    -  kernel().model_manager.register_node_model< lin_rate_opn >( "lin_rate_opn" );
    -  kernel().model_manager.register_node_model< parrot_neuron_ps >( "parrot_neuron_ps" );
    -  kernel().model_manager.register_node_model< step_rate_generator >( "step_rate_generator" );
    -  kernel().model_manager.register_node_model< step_current_generator >( "step_current_generator" );
    -  kernel().model_manager.register_node_model< hh_psc_alpha_clopath >( "hh_psc_alpha_clopath" );
    -  kernel().model_manager.register_node_model< iaf_cond_exp >( "iaf_cond_exp" );
    -  kernel().model_manager.register_node_model< aeif_cond_exp >( "aeif_cond_exp" );
    -  kernel().model_manager.register_node_model< siegert_neuron >( "siegert_neuron" );
    -
    -  kernel().model_manager.register_node_model< aeif_psc_alpha >( "aeif_psc_alpha" );
    -  kernel().model_manager.register_node_model< aeif_psc_delta >( "aeif_psc_delta" );
    -  kernel().model_manager.register_node_model< aeif_psc_exp >( "aeif_psc_exp" );
    -  kernel().model_manager.register_node_model< threshold_lin_rate_ipn >( "threshold_lin_rate_ipn" );
    -
    -  kernel().model_manager.register_node_model< iaf_psc_alpha >( "iaf_psc_alpha" );
    -  kernel().model_manager.register_node_model< iaf_psc_delta >( "iaf_psc_delta" );
    -  kernel().model_manager.register_node_model< iaf_psc_exp >( "iaf_psc_exp" );
    -  kernel().model_manager.register_node_model< iaf_psc_exp_multisynapse >( "iaf_psc_exp_multisynapse" );
    -  kernel().model_manager.register_node_model< parrot_neuron >( "parrot_neuron" );
    -
    -  kernel().model_manager.register_node_model< spin_detector >( "spin_detector" );
    -  kernel().model_manager.register_node_model< pp_cond_exp_mc_urbanczik >( "pp_cond_exp_mc_urbanczik" );
    -
    -  kernel().model_manager.register_node_model< weight_recorder >( "weight_recorder" );
    -  kernel().model_manager.register_node_model< volume_transmitter >( "volume_transmitter" );
    -
    -  kernel().model_manager.register_connection_model< bernoulli_synapse >( "bernoulli_synapse" );
    -  kernel().model_manager.register_connection_model< clopath_synapse >( "clopath_synapse" );
    -  kernel().model_manager.register_connection_model< cont_delay_synapse >( "cont_delay_synapse" );
    -  kernel().model_manager.register_connection_model< ht_synapse >( "ht_synapse" );
    -  kernel().model_manager.register_connection_model< jonke_synapse >( "jonke_synapse" );
    -  kernel().model_manager.register_connection_model< quantal_stp_synapse >( "quantal_stp_synapse" );
    -  kernel().model_manager.register_connection_model< static_synapse >( "static_synapse" );
    -  kernel().model_manager.register_connection_model< static_synapse_hom_w >( "static_synapse_hom_w" );
    -  kernel().model_manager.register_connection_model< stdp_synapse >( "stdp_synapse" );
    -  kernel().model_manager.register_connection_model< stdp_synapse_hom >( "stdp_synapse_hom" );
    -  kernel().model_manager.register_connection_model< stdp_dopamine_synapse >( "stdp_dopamine_synapse" );
    -  kernel().model_manager.register_connection_model< stdp_facetshw_synapse_hom >( "stdp_facetshw_synapse_hom" );
    -  kernel().model_manager.register_connection_model< stdp_nn_restr_synapse >( "stdp_nn_restr_synapse" );
    -  kernel().model_manager.register_connection_model< stdp_nn_symm_synapse >( "stdp_nn_symm_synapse" );
    -  kernel().model_manager.register_connection_model< stdp_nn_pre_centered_synapse >( "stdp_nn_pre_centered_synapse" );
    -  kernel().model_manager.register_connection_model< stdp_pl_synapse_hom >( "stdp_pl_synapse_hom" );
    -  kernel().model_manager.register_connection_model< stdp_triplet_synapse >( "stdp_triplet_synapse" );
    -  kernel().model_manager.register_connection_model< tsodyks_synapse >( "tsodyks_synapse" );
    -  kernel().model_manager.register_connection_model< tsodyks_synapse_hom >( "tsodyks_synapse_hom" );
    -  kernel().model_manager.register_connection_model< tsodyks2_synapse >( "tsodyks2_synapse" );
    -  kernel().model_manager.register_connection_model< urbanczik_synapse >( "urbanczik_synapse" );
    -  kernel().model_manager.register_connection_model< vogels_sprekeler_synapse >( "vogels_sprekeler_synapse" );
    -
    -  // register secondary connection models
    -  kernel().model_manager.register_connection_model< gap_junction >( "gap_junction" );
    -  kernel().model_manager.register_connection_model< rate_connection_instantaneous >( "rate_connection_instantaneous" );
    -  kernel().model_manager.register_connection_model< rate_connection_delayed >( "rate_connection_delayed" );
    -  kernel().model_manager.register_connection_model< diffusion_connection >( "diffusion_connection" );
    -
       // Add connection rules
       kernel().connection_manager.register_conn_builder< OneToOneBuilder >( "one_to_one" );
       kernel().connection_manager.register_conn_builder< AllToAllBuilder >( "all_to_all" );
    @@ -267,6 +104,8 @@ init_nest( int* argc, char** argv[] )
       kernel().sp_manager.register_growth_curve< GrowthCurveSigmoid >( "sigmoid" );
       kernel().sp_manager.register_growth_curve< GrowthCurveGaussian >( "gaussian" );
       kernel().sp_manager.register_growth_curve< GrowthCurveLinear >( "linear" );
    +
    +  register_stuff();
     }
     
     void
    
    From 9d5e190ed0fe00bdbc36f331ea2dfe411718a972 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 14 Sep 2023 11:56:28 +0200
    Subject: [PATCH 159/375] Fix up verbosity setting
    
    ---
     doc/htmldoc/model_details/IAF_Integration_Singularity.ipynb | 2 +-
     doc/htmldoc/model_details/post_trace_computation.ipynb      | 2 +-
     examples/CampbellSiegert.py                                 | 2 +-
     examples/hh_phaseplane.py                                   | 2 +-
     examples/hh_psc_alpha.py                                    | 2 +-
     examples/if_curve.py                                        | 2 +-
     examples/nest/music/minimalmusicsetup_receivenest.py        | 2 +-
     examples/nest/music/minimalmusicsetup_sendnest.py           | 2 +-
     examples/sonata_example/sonata_network.py                   | 2 +-
     examples/spatial/conncomp.py                                | 2 +-
     examples/spatial/conncon_sources.py                         | 2 +-
     examples/store_restore_network.py                           | 2 +-
     examples/structural_plasticity.py                           | 2 +-
     examples/sudoku/sudoku_solver.py                            | 2 +-
     testsuite/pytests/sli2py_regressions/test_issue_463.py      | 2 +-
     testsuite/pytests/sli2py_regressions/test_ticket_941.py     | 2 +-
     testsuite/pytests/sli2py_regressions/test_ticket_949.py     | 2 +-
     testsuite/pytests/sli2py_regressions/test_ticket_959.py     | 2 +-
     testsuite/pytests/sli2py_synapses/test_hpc_synapse.py       | 2 +-
     testsuite/pytests/test_parrot_neuron_ps.py                  | 4 ++--
     testsuite/pytests/test_stdp_pl_synapse_hom.py               | 2 +-
     testsuite/pytests/test_vogels_sprekeler_synapse.py          | 2 +-
     22 files changed, 23 insertions(+), 23 deletions(-)
    
    diff --git a/doc/htmldoc/model_details/IAF_Integration_Singularity.ipynb b/doc/htmldoc/model_details/IAF_Integration_Singularity.ipynb
    index 45eeb99fce..8b2452b185 100644
    --- a/doc/htmldoc/model_details/IAF_Integration_Singularity.ipynb
    +++ b/doc/htmldoc/model_details/IAF_Integration_Singularity.ipynb
    @@ -658,7 +658,7 @@
         "import matplotlib.pyplot as plt\n",
         "import nest\n",
         "\n",
    -    "nest.set_verbosity(\"M_ERROR\")"
    +    "nest.set_verbosity(nest.verbosity.M_ERROR)"
        ]
       },
       {
    diff --git a/doc/htmldoc/model_details/post_trace_computation.ipynb b/doc/htmldoc/model_details/post_trace_computation.ipynb
    index 68710aaecc..051ce6ae30 100644
    --- a/doc/htmldoc/model_details/post_trace_computation.ipynb
    +++ b/doc/htmldoc/model_details/post_trace_computation.ipynb
    @@ -72,7 +72,7 @@
         "        print(\"Pre spike times: [\" + \", \".join([str(t) for t in pre_spike_times]) + \"]\")\n",
         "        print(\"Post spike times: [\" + \", \".join([str(t) for t in post_spike_times]) + \"]\")\n",
         "\n",
    -    "    nest.set_verbosity(\"M_WARNING\")\n",
    +    "    nest.set_verbosity(nest.verbosity.M_WARNING)\n",
         "\n",
         "    nest.ResetKernel()\n",
         "    nest.resolution = resolution\n",
    diff --git a/examples/CampbellSiegert.py b/examples/CampbellSiegert.py
    index fd34edcf6d..e5a59e0db5 100755
    --- a/examples/CampbellSiegert.py
    +++ b/examples/CampbellSiegert.py
    @@ -164,7 +164,7 @@ def psp(x):
     
     nest.ResetKernel()
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     neurondict = {
         "V_th": V_th,
         "tau_m": tau_m,
    diff --git a/examples/hh_phaseplane.py b/examples/hh_phaseplane.py
    index cd0d2051d9..7a0d0e9caa 100644
    --- a/examples/hh_phaseplane.py
    +++ b/examples/hh_phaseplane.py
    @@ -59,7 +59,7 @@
     num_n_steps = len(n_vec)
     
     nest.ResetKernel()
    -nest.set_verbosity("M_ERROR")
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     nest.resolution = dt
     
     neuron = nest.Create("hh_psc_alpha")
    diff --git a/examples/hh_psc_alpha.py b/examples/hh_psc_alpha.py
    index e1f272a8d5..0a0fd39308 100644
    --- a/examples/hh_psc_alpha.py
    +++ b/examples/hh_psc_alpha.py
    @@ -35,7 +35,7 @@
     import nest
     import numpy as np
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     nest.ResetKernel()
     
     simtime = 1000
    diff --git a/examples/if_curve.py b/examples/if_curve.py
    index fb0b9d1d27..ffed0e977e 100644
    --- a/examples/if_curve.py
    +++ b/examples/if_curve.py
    @@ -125,7 +125,7 @@ def compute_transfer(self, i_mean=(400.0, 900.0, 50.0), i_std=(0.0, 600.0, 50.0)
             self.i_range = numpy.arange(*i_mean)
             self.std_range = numpy.arange(*i_std)
             self.rate = numpy.zeros((self.i_range.size, self.std_range.size))
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             for n, i in enumerate(self.i_range):
                 print("I  =  {0}".format(i))
                 for m, std in enumerate(self.std_range):
    diff --git a/examples/nest/music/minimalmusicsetup_receivenest.py b/examples/nest/music/minimalmusicsetup_receivenest.py
    index 93721d0771..45e2f057d1 100755
    --- a/examples/nest/music/minimalmusicsetup_receivenest.py
    +++ b/examples/nest/music/minimalmusicsetup_receivenest.py
    @@ -28,7 +28,7 @@
         print("NEST was not compiled with support for MUSIC, not running.")
         sys.exit(1)
     
    -nest.set_verbosity("M_ERROR")
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     
     meip = nest.Create("music_event_in_proxy")
     n = nest.Create("iaf_psc_alpha")
    diff --git a/examples/nest/music/minimalmusicsetup_sendnest.py b/examples/nest/music/minimalmusicsetup_sendnest.py
    index ce2450ba89..fde3602975 100755
    --- a/examples/nest/music/minimalmusicsetup_sendnest.py
    +++ b/examples/nest/music/minimalmusicsetup_sendnest.py
    @@ -28,7 +28,7 @@
         print("NEST was not compiled with support for MUSIC, not running.")
         sys.exit(1)
     
    -nest.set_verbosity("M_ERROR")
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     
     sg = nest.Create("spike_generator")
     n = nest.Create("iaf_psc_alpha")
    diff --git a/examples/sonata_example/sonata_network.py b/examples/sonata_example/sonata_network.py
    index f01b7be2c7..cc91224f16 100644
    --- a/examples/sonata_example/sonata_network.py
    +++ b/examples/sonata_example/sonata_network.py
    @@ -50,7 +50,7 @@
     import matplotlib.pyplot as plt
     import nest
     
    -nest.set_verbosity("M_ERROR")
    +nest.set_verbosity(nest.verbosity.M_ERROR)
     nest.ResetKernel()
     
     ###############################################################################
    diff --git a/examples/spatial/conncomp.py b/examples/spatial/conncomp.py
    index 201bcf9098..aa5e682733 100644
    --- a/examples/spatial/conncomp.py
    +++ b/examples/spatial/conncomp.py
    @@ -36,7 +36,7 @@
     import numpy as np
     
     nest.ResetKernel()
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     nest.CopyModel("iaf_psc_alpha", "pyr")
     nest.CopyModel("iaf_psc_alpha", "in")
    diff --git a/examples/spatial/conncon_sources.py b/examples/spatial/conncon_sources.py
    index ab8a32ca0f..71e2652e7f 100644
    --- a/examples/spatial/conncon_sources.py
    +++ b/examples/spatial/conncon_sources.py
    @@ -37,7 +37,7 @@
     import numpy as np
     
     nest.ResetKernel()
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     pos = nest.spatial.grid(shape=[30, 30], extent=[3.0, 3.0], edge_wrap=True)
     
    diff --git a/examples/store_restore_network.py b/examples/store_restore_network.py
    index 89383466e6..43770b3a9f 100644
    --- a/examples/store_restore_network.py
    +++ b/examples/store_restore_network.py
    @@ -313,7 +313,7 @@ def add_to_plot(self, net, n_max=100, t_min=0, t_max=1000, lbl=""):
     
         ###############################################################################
         # Ensure clean slate and make NEST less chatty
    -    nest.set_verbosity("M_WARNING")
    +    nest.set_verbosity(nest.verbosity.M_WARNING)
         nest.ResetKernel()
     
         ###############################################################################
    diff --git a/examples/structural_plasticity.py b/examples/structural_plasticity.py
    index 7f1a672f8c..50df7d5ba8 100644
    --- a/examples/structural_plasticity.py
    +++ b/examples/structural_plasticity.py
    @@ -152,7 +152,7 @@ def __init__(self):
     
         def prepare_simulation(self):
             nest.ResetKernel()
    -        nest.set_verbosity("M_ERROR")
    +        nest.set_verbosity(nest.verbosity.M_ERROR)
     
             ####################################################################################
             # We set global kernel parameters. Here we define the resolution
    diff --git a/examples/sudoku/sudoku_solver.py b/examples/sudoku/sudoku_solver.py
    index d13f3f3667..81c78cdb4f 100644
    --- a/examples/sudoku/sudoku_solver.py
    +++ b/examples/sudoku/sudoku_solver.py
    @@ -66,7 +66,7 @@
     from helpers_sudoku import get_puzzle, plot_field, validate_solution
     
     nest.local_num_threads = 8
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     logging.basicConfig(level=logging.INFO)
     
     puzzle_index = 4
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_463.py b/testsuite/pytests/sli2py_regressions/test_issue_463.py
    index 8ee2c39e16..116b795e69 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_463.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_463.py
    @@ -35,7 +35,7 @@ def test_simulation_completes():
         """
         nest.ResetKernel()
         nest.local_num_threads = 4
    -    nest.set_verbosity("M_ERROR")
    +    nest.set_verbosity(nest.verbosity.M_ERROR)
     
         population_size = 10
         population_type = "iaf_psc_alpha"
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_941.py b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    index 7c77d7f9e1..0b7db4dc38 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    @@ -50,7 +50,7 @@ def test_different_connections():
         via helper method.
         """
         nest.ResetKernel()
    -    nest.set_verbosity("M_ERROR")
    +    nest.set_verbosity(nest.verbosity.M_ERROR)
     
         spike_generator = nest.Create("spike_generator", params={"spike_times": [1.0]})
         spike_recorder = nest.Create("spike_recorder")
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_949.py b/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    index c31f64ff1f..2cc323c7d4 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_949.py
    @@ -29,7 +29,7 @@
     
     def test_delay_less_than_resolution_throws():
         nest.ResetKernel()
    -    nest.set_verbosity("M_ERROR")
    +    nest.set_verbosity(nest.verbosity.M_ERROR)
         nest.resolution = 0.3
     
         population = nest.Create("iaf_psc_alpha")
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_959.py b/testsuite/pytests/sli2py_regressions/test_ticket_959.py
    index 17ba1dea1c..1d8a422d28 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_959.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_959.py
    @@ -30,7 +30,7 @@
     
     def record_spikes(sim_time, repeats):
         nest.ResetKernel()
    -    nest.set_verbosity("M_ERROR")
    +    nest.set_verbosity(nest.verbosity.M_ERROR)
     
         neuron_params = {"tau_sfa": 34.0, "q_sfa": 0.0}
     
    diff --git a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    index 4e8bead1ac..e5a4393bdb 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    @@ -46,7 +46,7 @@
     @pytest.fixture(autouse=True)
     def prepare():
         nest.ResetKernel()
    -    nest.set_verbosity("M_ERROR")
    +    nest.set_verbosity(nest.verbosity.M_ERROR)
     
     
     def has_hpc_suffix(syn_model):
    diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index 50386e07c1..77c3c46f2f 100644
    --- a/testsuite/pytests/test_parrot_neuron_ps.py
    +++ b/testsuite/pytests/test_parrot_neuron_ps.py
    @@ -42,7 +42,7 @@ class ParrotNeuronPSTestCase(unittest.TestCase):
         """Check parrot_neuron spike repetition properties"""
     
         def setUp(self):
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # set up source spike generator, as well as parrot neurons
    @@ -137,7 +137,7 @@ def test_ParrotNeuronIncomingMultiplicity(self):
             # spikes than time steps
             assert spikes_expected - 3 * spikes_std > 10.0 * t_sim / resolution, "Internal inconsistency: too few spikes."
     
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.resolution = resolution
             nest.rng_seed = 123
    diff --git a/testsuite/pytests/test_stdp_pl_synapse_hom.py b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    index 865b227e64..5a451530e8 100644
    --- a/testsuite/pytests/test_stdp_pl_synapse_hom.py
    +++ b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    @@ -130,7 +130,7 @@ def do_the_nest_simulation(self):
             This function is where calls to NEST reside. Returns the generated pre- and post spike sequences and the
             resulting weight established by STDP.
             """
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
             nest.SetKernelStatus(
                 {
    diff --git a/testsuite/pytests/test_vogels_sprekeler_synapse.py b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    index fefc46c484..997d428865 100644
    --- a/testsuite/pytests/test_vogels_sprekeler_synapse.py
    +++ b/testsuite/pytests/test_vogels_sprekeler_synapse.py
    @@ -32,7 +32,7 @@ class VogelsSprekelerConnectionTestCase(unittest.TestCase):
     
         def setUp(self):
             """Set up the test."""
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # settings
    
    From 558b46abbbbe26cff6fa61bf4a69c9021c2115ca Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 14 Sep 2023 14:32:00 +0200
    Subject: [PATCH 160/375] Fix invocation of update_value
    
    ---
     nestkernel/recording_backend_mpi.cpp   | 2 +-
     nestkernel/stimulation_backend_mpi.cpp | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/recording_backend_mpi.cpp b/nestkernel/recording_backend_mpi.cpp
    index 93b44b6606..1045538674 100644
    --- a/nestkernel/recording_backend_mpi.cpp
    +++ b/nestkernel/recording_backend_mpi.cpp
    @@ -86,7 +86,7 @@ nest::RecordingBackendMPI::enroll( const RecordingDevice& device, const dictiona
         devices_[ tid ].insert( std::make_pair( node_id, tuple ) );
         enrolled_ = true;
     
    -    updateValue< std::string >( params, names::mpi_address, mpi_address_ );
    +    params.update_value( names::mpi_address, mpi_address_ );
       }
       else
       {
    diff --git a/nestkernel/stimulation_backend_mpi.cpp b/nestkernel/stimulation_backend_mpi.cpp
    index c0133a61ef..03d104c067 100644
    --- a/nestkernel/stimulation_backend_mpi.cpp
    +++ b/nestkernel/stimulation_backend_mpi.cpp
    @@ -81,7 +81,7 @@ nest::StimulationBackendMPI::enroll( nest::StimulationDevice& device, const dict
       enrolled_ = true;
     
       // Try to read the mpi_address from the device status
    -  updateValue< std::string >( params, names::mpi_address, mpi_address_ );
    +  params.update_value( names::mpi_address, mpi_address_ );
     }
     
     
    
    From b499904bc0ba538173e0f895a2b0e27d78840287 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 14 Sep 2023 14:42:59 +0200
    Subject: [PATCH 161/375] Fix setting of tics_per_ms in tests (using int insead
     of float)
    
    ---
     nestkernel/simulation_manager.cpp                       | 2 +-
     testsuite/pytests/sli2py_regressions/test_issue_1305.py | 4 ++--
     testsuite/pytests/sli2py_regressions/test_issue_264.py  | 2 +-
     testsuite/pytests/sli2py_regressions/test_issue_368.py  | 4 ++--
     testsuite/pytests/test_changing_tic_base.py             | 4 ++--
     testsuite/pytests/test_spike_train_injector.py          | 2 +-
     testsuite/pytests/test_stdp_multiplicity.py             | 2 +-
     7 files changed, 10 insertions(+), 10 deletions(-)
    
    diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp
    index 8fe07ed124..ec6b99f2c9 100644
    --- a/nestkernel/simulation_manager.cpp
    +++ b/nestkernel/simulation_manager.cpp
    @@ -168,7 +168,7 @@ nest::SimulationManager::set_status( const dictionary& d )
       // tics_per_ms and resolution must come after local_num_thread /
       // total_num_threads because they might reset the network and the time
       // representation
    -  double tics_per_ms = 0.0;
    +  long tics_per_ms = 0;  //TODO: PYNEST-NG: Was double, but why???
       bool tics_per_ms_updated = d.update_value( names::tics_per_ms, tics_per_ms );
       double resd = 0.0;
       bool res_updated = d.update_value( names::resolution, resd );
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1305.py b/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    index eb74cdff1d..dd72da00e0 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1305.py
    @@ -39,7 +39,7 @@ def test_resolution_rounding_valid():
         """Test setting valid resolution."""
     
         target_resolution = 0.102
    -    nest.set(resolution=target_resolution, tics_per_ms=1000.0)
    +    nest.set(resolution=target_resolution, tics_per_ms=1000)
     
         assert nest.resolution == pytest.approx(target_resolution)
     
    @@ -50,4 +50,4 @@ def test_resolution_rounding_invalid():
         target_resolution = 0.1002
     
         with pytest.raises(nest.NESTError):
    -        nest.set(resolution=target_resolution, tics_per_ms=1000.0)
    +        nest.set(resolution=target_resolution, tics_per_ms=1000)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_264.py b/testsuite/pytests/sli2py_regressions/test_issue_264.py
    index 4e64a0cff2..f404feea94 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_264.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_264.py
    @@ -37,7 +37,7 @@
     @pytest.fixture(autouse=True)
     def set_resolution():
         nest.ResetKernel()
    -    nest.set(resolution=1.0, tics_per_ms=1000.0)
    +    nest.set(resolution=1.0, tics_per_ms=1000)
     
     
     def test_incommensurate_simulation_time():
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_368.py b/testsuite/pytests/sli2py_regressions/test_issue_368.py
    index 86bfd6a1aa..041de2fefc 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_368.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_368.py
    @@ -51,7 +51,7 @@ def test_linear_summation_of_input_ps_models(model):
         * Both n3 and n4 must have same V_m after simulation
         """
     
    -    nest.set(resolution=0.25, tics_per_ms=1024.0)
    +    nest.set(resolution=0.25, tics_per_ms=1024)
     
         if model == "iaf_psc_exp_ps":
             nest.SetDefaults("iaf_psc_exp_ps", {"tau_syn_ex": 2.0, "tau_syn_in": 2.0})
    @@ -107,7 +107,7 @@ def test_linear_summation_of_input_ps_models_with_two_time_constants(model):
             ( V_1 - V_0 ) + ( V_2 - V_0 ) = V_3 - V_0
         """
     
    -    nest.set(resolution=0.25, tics_per_ms=1024.0)
    +    nest.set(resolution=0.25, tics_per_ms=1024)
     
         nest.SetDefaults(model, {"tau_syn_ex": 5.0, "tau_syn_in": 1.0})
     
    diff --git a/testsuite/pytests/test_changing_tic_base.py b/testsuite/pytests/test_changing_tic_base.py
    index ac6e71eb4c..d60cbdb570 100644
    --- a/testsuite/pytests/test_changing_tic_base.py
    +++ b/testsuite/pytests/test_changing_tic_base.py
    @@ -65,7 +65,7 @@ def test_models(self):
                     pass
     
             # Change the tic-base.
    -        nest.set(resolution=0.5, tics_per_ms=1500.0)
    +        nest.set(resolution=0.5, tics_per_ms=1500)
     
             # At this point, Time objects in models should have been updated to
             # account for the new tic-base. Values in model defaults should therefore
    @@ -109,7 +109,7 @@ def _assert_ticbase_change_raises_and_reset(self, after_call):
             """Assert that changing tic-base raises a NESTError, and reset the kernel"""
             with self.assertRaises(nest.NESTError, msg=f'after calling "{after_call}"'):
                 # For co-dependent properties, we use `set()` instead of kernel attributes
    -            nest.set(resolution=0.5, tics_per_ms=1500.0)
    +            nest.set(resolution=0.5, tics_per_ms=1500)
             nest.ResetKernel()
     
         def test_prohibit_change_tic_base(self):
    diff --git a/testsuite/pytests/test_spike_train_injector.py b/testsuite/pytests/test_spike_train_injector.py
    index 07e000b0d6..b03ca43b15 100644
    --- a/testsuite/pytests/test_spike_train_injector.py
    +++ b/testsuite/pytests/test_spike_train_injector.py
    @@ -55,7 +55,7 @@ def test_set_spike_times(reset_kernel, in_spike_times, expected_spike_times, pre
         (step size) of 0.1 ms and default tic length of 0.001 ms.
         """
     
    -    nest.set(resolution=0.1, tics_per_ms=1000.0)
    +    nest.set(resolution=0.1, tics_per_ms=1000)
     
         inj_nrn = nest.Create(
             "spike_train_injector",
    diff --git a/testsuite/pytests/test_stdp_multiplicity.py b/testsuite/pytests/test_stdp_multiplicity.py
    index 79a385b459..263192244d 100644
    --- a/testsuite/pytests/test_stdp_multiplicity.py
    +++ b/testsuite/pytests/test_stdp_multiplicity.py
    @@ -112,7 +112,7 @@ def run_protocol(self, pre_post_shift):
     
             multiplicity = 2**3
             resolution = 2.0**-4
    -        tics_per_ms = 1.0 / resolution * multiplicity * 4
    +        tics_per_ms = int(1.0 / resolution * multiplicity * 4)
             deltas = [resolution / multiplicity / 2**m for m in range(2, 10)]
     
             delay = 1.0
    
    From b81b59ae0bf8501e0758608fa0de613e598e56e8 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 14 Sep 2023 15:51:23 +0200
    Subject: [PATCH 162/375] Properly demand the C++ standard to be used
    
    ---
     CMakeLists.txt | 5 ++++-
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index ce789b8a52..c4558776a6 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -23,6 +23,10 @@ cmake_minimum_required( VERSION 3.19 )
     list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
     
     project( nest CXX C )
    +
    +set( CMAKE_CXX_STANDARD 20 )
    +set( CMAKE_CXX_STANDARD_REQUIRED True )
    +
     set( NEST_USER_EMAIL "users@nest-simulator.org" )
     
     include( ColorMessages )
    @@ -76,7 +80,6 @@ option( static-libraries "Build static executable and libraries [default=OFF]" O
     set( with-optimize ON CACHE STRING "Enable user defined optimizations [default=ON (uses '-O2')]. When OFF, no '-O' flag is passed to the compiler. Explicit compiler flags can be given; separate multiple flags by ';'." )
     set( with-warning ON CACHE STRING "Enable user defined warnings [default=ON (uses '-Wall')]. Separate  multiple flags by ';'." )
     set( with-debug OFF CACHE STRING "Enable user defined debug flags [default=OFF]. When ON, '-g' is used. Separate  multiple flags by ';'." )
    -set( with-cpp-std "c++20" CACHE STRING "C++ standard to use for compilation [default='c++20']." )
     set( with-intel-compiler-flags OFF CACHE STRING "User defined flags for the Intel compiler [default='-fp-model strict']. Separate multiple flags by ';'." )
     set( with-libraries OFF CACHE STRING "Link additional libraries [default=OFF]. Give full path. Separate multiple libraries by ';'." )
     set( with-includes OFF CACHE STRING "Add additional include paths [default=OFF]. Give full path without '-I'. Separate multiple include paths by ';'." )
    
    From bb7bee7e27b6ff48d735012e05b2732613099dbf Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 19 Sep 2023 15:11:55 +0200
    Subject: [PATCH 163/375] Remove unused CMake function
    
    ---
     CMakeLists.txt             | 1 -
     cmake/ProcessOptions.cmake | 4 ----
     2 files changed, 5 deletions(-)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index c4558776a6..a536e44ab4 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -133,7 +133,6 @@ get_target_triple( NEST_TARGET_TRIPLE NEST_TARGET_ARCH NEST_TARGET_VENDOR NEST_T
     nest_process_with_python()
     include( GNUInstallDirs )
     nest_post_process_with_python()
    -nest_process_with_std()
     nest_process_with_intel_compiler_flags()
     nest_process_with_warning()
     nest_process_with_libraries()
    diff --git a/cmake/ProcessOptions.cmake b/cmake/ProcessOptions.cmake
    index 52674ec853..6ac7841a02 100644
    --- a/cmake/ProcessOptions.cmake
    +++ b/cmake/ProcessOptions.cmake
    @@ -45,10 +45,6 @@ function( NEST_PROCESS_WITH_DEBUG )
       endif ()
     endfunction()
     
    -function( NEST_PROCESS_WITH_STD )
    -  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=${with-cpp-std}" PARENT_SCOPE )
    -endfunction()
    -
     function( NEST_PROCESS_WITH_INTEL_COMPILER_FLAGS )
       if ( NOT with-intel-compiler-flags )
         set( with-intel-compiler-flags "-fp-model strict" )
    
    From e11a5fce8a0d1e2fad8d104646bfe55d2af709dc Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 19 Sep 2023 15:12:35 +0200
    Subject: [PATCH 164/375] Require compilation with OpenMP. Seems to be needed
     with newer GCCs
    
    ---
     CMakeLists.txt | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index a536e44ab4..baacdd62f8 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -26,6 +26,7 @@ project( nest CXX C )
     
     set( CMAKE_CXX_STANDARD 20 )
     set( CMAKE_CXX_STANDARD_REQUIRED True )
    +find_package(OpenMP REQUIRED)
     
     set( NEST_USER_EMAIL "users@nest-simulator.org" )
     
    
    From 16ac0c44a1b0037e8082f79aa5315ee511c4b635 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 19 Sep 2023 15:14:19 +0200
    Subject: [PATCH 165/375] Add a simple code generator to make NEST exception
     names available to PyNEST
    
    ---
     pynest/CMakeLists.txt               | 10 +++
     pynest/generate_exception_header.py | 97 +++++++++++++++++++++++++++++
     2 files changed, 107 insertions(+)
     create mode 100644 pynest/generate_exception_header.py
    
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 57bcd92708..5500d8e0f9 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -19,6 +19,16 @@
     
     if ( HAVE_PYTHON )
     
    +  # We use python3 here directly, as some of the CI jobs don't seem to have PYTHON
    +  # or Python_EXECUTABLE set properly.
    +  execute_process(
    +    COMMAND "python3" "${PROJECT_SOURCE_DIR}/pynest/generate_exception_header.py"
    +    "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}"
    +    WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
    +    # Uncomment for debugging: ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE COMMAND_ECHO STDOUT
    +    COMMAND_ERROR_IS_FATAL ANY
    +  )
    +
       if ( CYTHON_FOUND )
         include( UseCython )
         set_source_files_properties( nestkernel_api.pyx PROPERTIES CYTHON_IS_CXX TRUE )
    diff --git a/pynest/generate_exception_header.py b/pynest/generate_exception_header.py
    new file mode 100644
    index 0000000000..207f2ae982
    --- /dev/null
    +++ b/pynest/generate_exception_header.py
    @@ -0,0 +1,97 @@
    +# -*- coding: utf-8 -*-
    +#
    +# generate_exception_header.py
    +#
    +# This file is part of NEST.
    +#
    +# Copyright (C) 2004 The NEST Initiative
    +#
    +# NEST is free software: you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation, either version 2 of the License, or
    +# (at your option) any later version.
    +#
    +# NEST is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    +
    +"""Script to generate a list of all exceptions used in NEST.
    +
    +This script is called during the run of CMake and generates a C++
    +header file with a single variable, nest_exceptions, that lists all
    +exceptions used in NEST by their name. This file is used by the
    +wrapper to map all of NEST's exceptions into Python exceptions and
    +avoid a redundant specification therein.
    +
    +"""
    +
    +import argparse
    +from pathlib import Path
    +
    +
    +def parse_commandline():
    +    """Parse the commandline arguments and put them into variables.
    +
    +    There are two arguments to this script that can be given either as
    +    positional arguments or by their name.
    +
    +    1. srcdir: the path to the top-level NEST source directory
    +    2. blddir: the path to the NEST build directory (-DCMAKE_INSTALL_PREFIX)
    +
    +    This function does not return anything, but instead it checks the
    +    commandline arguments and makes them available as global variables
    +    of the script as given.
    +    """
    +
    +    global srcdir, blddir
    +
    +    description = "Generate a header listing all NEST exceptions."
    +    parser = argparse.ArgumentParser(description=description)
    +    parser.add_argument("srcdir", type=str, help="the source directory of NEST")
    +    parser.add_argument("blddir", type=str, help="the build directory of NEST")
    +    args = parser.parse_args()
    +
    +    srcdir = args.srcdir
    +    blddir = args.blddir
    +
    +
    +def generate_exception_header():
    +    """Write the exception list out to file.
    +
    +    This is a very straightforward function that prints the copyright
    +    header followed by a std::vector<std::string> with the names of
    +    all NEST exceptions to `blddir/pynest/nest_exception_list.h`.
    +    `blddir` is handed as a commandline argument to the script.
    +
    +    """
    +
    +    fname = Path(srcdir) / "doc" / "copyright_header.cpp"
    +    with open(fname, "r") as file:
    +        copyright_header = file.read()
    +
    +    exceptions = []
    +    fname = Path(srcdir) / "nestkernel" / "exceptions.h"
    +    with open(fname, "r") as file:
    +        for line in file:
    +            print(line)
    +            if line.strip().endswith(": public KernelException"):
    +                exceptions.append(line.split()[1])
    +
    +    fname = "nest_exception_list.h"
    +    pynestdir = Path(blddir) / "pynest"
    +    pynestdir.mkdir(parents=True, exist_ok=True)
    +    with open(pynestdir / fname, "w") as file:
    +        file.write(copyright_header.replace("{{file_name}}", fname))
    +        file.write("\nstd::vector< std::string > nest_exceptions = {\n")
    +        for exception in exceptions:
    +            file.write(f'  "{exception}",\n')
    +        file.write("};")
    +
    +
    +if __name__ == "__main__":
    +    parse_commandline()
    +    generate_exception_header()
    
    From e2a3c3279400438e1ad6c7695cd7db3d6b436717 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 15:39:40 +0200
    Subject: [PATCH 166/375] Remove hl_api_exceptions.py (NESTErrors exception
     classes)
    
    ---
     pynest/nest/lib/hl_api_exceptions.py | 220 ---------------------------
     1 file changed, 220 deletions(-)
     delete mode 100644 pynest/nest/lib/hl_api_exceptions.py
    
    diff --git a/pynest/nest/lib/hl_api_exceptions.py b/pynest/nest/lib/hl_api_exceptions.py
    deleted file mode 100644
    index 0dbfefa1d1..0000000000
    --- a/pynest/nest/lib/hl_api_exceptions.py
    +++ /dev/null
    @@ -1,220 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# hl_api_exceptions.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -
    -class NESTMappedException(type):
    -    """Metaclass for exception namespace that dynamically creates exception classes.
    -
    -    If a class (self) of this (meta)-type has an unknown attribute requested, __getattr__ defined
    -    below gets called, creating a class with that name (the error name) and with an __init__ taking
    -    commandname and errormessage (as created in the source) which is a closure on the parent and
    -    errorname as well, with a parent of default type (self.default_parent) or
    -    self.parents[errorname] if defined."""
    -
    -    def __getattr__(cls, errorname):
    -        """Creates a class of type "errorname" which is a child of cls.default_parent or
    -        cls.parents[errorname] if one is defined.
    -
    -        This __getattr__ function also stores the class permanently as an attribute of cls for
    -        re-use where cls is actually the class that triggered the getattr (the class that
    -        NESTMappedException is a metaclass of)."""
    -
    -        # Dynamic class construction, first check if we know its parent
    -        if errorname in cls.parents:
    -            parent = getattr(cls, cls.parents[errorname])
    -        else:  # otherwise, get the default (SLIException)
    -            parent = cls.default_parent
    -
    -        # and now dynamically construct the new class
    -        # not NESTMappedException, since that would mean the metaclass would let the new class inherit
    -        # this __getattr__, allowing unintended dynamic construction of attributes
    -        newclass = type(
    -            cls.__name__ + "." + errorname,
    -            (parent,),
    -            {
    -                "__init__": cls.init(parent, errorname),
    -                "__doc__": """Dynamically created exception {} from {}.
    -
    -                Created for the namespace: {}.
    -                Parent exception: {}.
    -                """.format(
    -                    errorname, cls.source, cls.__name__, parent.__name__
    -                ),
    -            },
    -        )
    -
    -        # Cache for reuse: __getattr__ should now not get called if requested again
    -        setattr(cls, errorname, newclass)
    -
    -        # And now we return the exception
    -        return newclass
    -
    -
    -class NESTErrors(metaclass=NESTMappedException):
    -    """Namespace for NEST exceptions, including dynamically created classes from SLI.
    -
    -    Dynamic exception creation is through __getattr__ defined in the metaclass NESTMappedException.
    -    """
    -
    -    class NESTError(Exception):
    -        """Base exception class for all NEST exceptions."""
    -
    -        def __init__(self, message):
    -            """Initializer for NESTError base class.
    -
    -            Parameters:
    -            -----------
    -            message: str
    -                full error message to report.
    -            """
    -
    -            Exception.__init__(self, message)
    -            self.message = message
    -
    -    class SLIException(NESTError):
    -        """Base class for all exceptions coming from sli."""
    -
    -        def __init__(self, commandname, errormessage, errorname="SLIException"):
    -            """Initialize function.
    -
    -            Parameters:
    -            -----------
    -            errorname: error name from SLI.
    -            commandname: command name from SLI.
    -            errormessage: message from SLI.
    -            """
    -            message = "{} in PyNEST function {}: {}".format(errorname, commandname, errormessage)
    -            NESTErrors.NESTError.__init__(self, message)
    -
    -            self.errorname = errorname
    -            self.commandname = commandname
    -            self.errormessage = errormessage
    -
    -    class PyNESTError(NESTError):
    -        """Exceptions produced from Python/Cython code."""
    -
    -        pass
    -
    -    @staticmethod
    -    def init(parent, errorname):
    -        """Static class method to construct init's for SLIException children.
    -
    -        Construct our new init with closure on errorname (as a default value) and parent.
    -        The default value allows the __init__ to be chained and set by the leaf child.
    -        This also moves the paramerization of __init__ away from the class construction logic
    -        and next to the SLIException init.
    -
    -        Parameters:
    -        ----------
    -        parent: the ancestor of the class needed to properly walk up the MRO (not possible with super() or
    -            super(type,...) because of the dynamic creation of the function
    -             (used as a closure on the constructed __init__).
    -        errorname: the class name for information purposes
    -          internally (used as a closure on the constructed __init__).
    -        """
    -
    -        def __init__(self, commandname, errormessage, errorname=errorname, *args, **kwargs):
    -            # recursively init the parent class: all of this is only needed to properly set errorname
    -            parent.__init__(self, commandname, errormessage, *args, errorname=errorname, **kwargs)
    -
    -        docstring = """Initialization function.
    -
    -            Parameters:
    -            -----------
    -            commandname: sli command name.
    -            errormessage: sli error message.
    -            errorname: set by default ("{}") or passed in by child (shouldn't be explicitly set
    -                        when creating an instance)
    -            *args, **kwargs: passed through to base class.
    -
    -            self will be a descendant of {}.
    -            """.format(
    -            errorname, parent.__name__
    -        )
    -
    -        try:
    -            __init__.__doc__ = docstring
    -        except AttributeError:
    -            __init__.__func__.__doc__ = docstring
    -
    -        return __init__
    -
    -    # source: the dynamically created exceptions come from SLI
    -    # default_parent: the dynamically created exceptions are descended from SLIExcepton
    -    # parents: unless they happen to be mapped in this list to another exception descended from SLIException
    -    #          these should be updated when new exceptions in sli are created that aren't directly descended
    -    #          from SLIException (but nothing bad will happen, it's just that otherwise they'll be directly
    -    #          descended from SLIException instead of an intermediate exception; they'll still be constructed
    -    #          and useable)
    -    source = "SLI"
    -    default_parent = SLIException
    -    parents = {
    -        "TypeMismatch": "InterpreterError",
    -        "SystemSignal": "InterpreterError",
    -        "RangeCheck": "InterpreterError",
    -        "ArgumentType": "InterpreterError",
    -        "BadParameterValue": "SLIException",
    -        "DictError": "InterpreterError",
    -        "UndefinedName": "DictError",
    -        "EntryTypeMismatch": "DictError",
    -        "StackUnderflow": "InterpreterError",
    -        "IOError": "SLIException",
    -        "UnaccessedDictionaryEntry": "DictError",
    -        "UnknownModelName": "KernelException",
    -        "NewModelNameExists": "KernelException",
    -        "ModelInUse": "KernelException",
    -        "UnknownSynapseType": "KernelException",
    -        "UnknownNode": "KernelException",
    -        "NoThreadSiblingsAvailable": "KernelException",
    -        "LocalNodeExpected": "KernelException",
    -        "NodeWithProxiesExpected": "KernelException",
    -        "UnknownReceptorType": "KernelException",
    -        "IncompatibleReceptorType": "KernelException",
    -        "UnknownPort": "KernelException",
    -        "IllegalConnection": "KernelException",
    -        "InexistentConnection": "KernelException",
    -        "UnknownThread": "KernelException",
    -        "BadDelay": "KernelException",
    -        "UnexpectedEvent": "KernelException",
    -        "UnsupportedEvent": "KernelException",
    -        "BadProperty": "KernelException",
    -        "BadParameter": "KernelException",
    -        "DimensionMismatch": "KernelException",
    -        "DistributionError": "KernelException",
    -        "InvalidDefaultResolution": "KernelException",
    -        "InvalidTimeInModel": "KernelException",
    -        "StepMultipleRequired": "KernelException",
    -        "TimeMultipleRequired": "KernelException",
    -        "GSLSolverFailure": "KernelException",
    -        "NumericalInstability": "KernelException",
    -        "KeyError": "KernelException",
    -        "MUSICPortUnconnected": "KernelException",
    -        "MUSICPortHasNoWidth": "KernelException",
    -        "MUSICPortAlreadyPublished": "KernelException",
    -        "MUSICSimulationHasRun": "KernelException",
    -        "MUSICChannelUnknown": "KernelException",
    -        "MUSICPortUnknown": "KernelException",
    -        "MUSICChannelAlreadyMapped": "KernelException",
    -    }
    -
    -
    -# So we don't break any code that currently catches a nest.NESTError
    -NESTError = NESTErrors.NESTError
    
    From 9abef4db59c90a4b9d46c14538095036f340fa4b Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 16:49:57 +0200
    Subject: [PATCH 167/375] Link flags for macos
    
    ---
     pynest/CMakeLists.txt | 42 ++++++++++++++++++++++++------------------
     1 file changed, 24 insertions(+), 18 deletions(-)
    
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 57bcd92708..c71e2da79b 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -29,30 +29,36 @@ if ( HAVE_PYTHON )
     
       # TODO PYNEST NG: Add models, once the refacoring of the module system is done.
       target_link_libraries( nestkernel_api
    -      nestutil nestkernel
    -      ${EXTERNAL_MODULE_LIBRARIES}
    -      )
    +    nestutil nestkernel
    +    ${EXTERNAL_MODULE_LIBRARIES}
    +  )
    +
    +  if ( APPLE )
    +    set_target_properties( nestkernel_api PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" )
    +  else ()
    +    set_target_properties( nestkernel_api PROPERTIES LINK_FLAGS "-Wl,--no-as-needed" )
    +    target_link_libraries( nestkernel_api ${Python_LIBRARIES} )
    +  endif ()
     
       target_include_directories( nestkernel_api PRIVATE
    -      ${PROJECT_BINARY_DIR}/libnestutil
    -      ${PROJECT_SOURCE_DIR}/libnestutil
    -      ${PROJECT_SOURCE_DIR}/pynest
    -      ${PROJECT_SOURCE_DIR}/nestkernel
    -      ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    -      ${PROJECT_SOURCE_DIR}/thirdparty
    -      ${PROJECT_SOURCE_DIR}/models
    -      ${Python_INCLUDE_DIRS}
    -      )
    +    ${PROJECT_BINARY_DIR}/libnestutil
    +    ${PROJECT_SOURCE_DIR}/libnestutil
    +    ${PROJECT_SOURCE_DIR}/pynest
    +    ${PROJECT_SOURCE_DIR}/nestkernel
    +    ${PROJECT_SOURCE_DIR}/nestkernel/spatial
    +    ${PROJECT_SOURCE_DIR}/thirdparty
    +    ${PROJECT_SOURCE_DIR}/models
    +    ${Python_INCLUDE_DIRS}
    +  )
     
       target_compile_definitions( nestkernel_api PRIVATE
    -      -D_IS_PYNEST
    -      )
    +    -D_IS_PYNEST
    +  )
     
    -  install(DIRECTORY  nest/ ${PROJECT_BINARY_DIR}/pynest/nest/
    -      DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest
    -      PATTERN "versionchecker.py.in" EXCLUDE
    +  install( DIRECTORY nest/ ${PROJECT_BINARY_DIR}/pynest/nest/
    +    DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest
    +    PATTERN "versionchecker.py.in" EXCLUDE
       )
     
       install( TARGETS nestkernel_api DESTINATION ${PYEXECDIR}/nest/ )
    -
     endif ()
    
    From c9bac4a8c304aea4f835c0186a6a536a9887f659 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 16:50:47 +0200
    Subject: [PATCH 168/375] Empty modelset
    
    ---
     modelsets/empty | 0
     1 file changed, 0 insertions(+), 0 deletions(-)
     create mode 100644 modelsets/empty
    
    diff --git a/modelsets/empty b/modelsets/empty
    new file mode 100644
    index 0000000000..e69de29bb2
    
    From b884736f02de164fdd138e3a574bf01165f73765 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 16:51:38 +0200
    Subject: [PATCH 169/375] Add exception_name member function
    
    ---
     nestkernel/exceptions.h | 342 +++++++++++++++++++++++++++++++++++++++-
     1 file changed, 341 insertions(+), 1 deletion(-)
    
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 3fbe2d0668..687bae3106 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -80,6 +80,12 @@ class KernelException : public std::runtime_error
         : std::runtime_error( msg )
       {
       }
    +
    +  virtual std::string
    +  exception_name()
    +  {
    +    return "KernelException";
    +  }
     };
     
     /**
    @@ -93,6 +99,12 @@ class NotImplemented : public KernelException
         : KernelException( msg )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "NotImplemented";
    +  }
     };
     
     /**
    @@ -117,6 +129,12 @@ class TypeMismatch : public KernelException
         : KernelException( "Expected datatype: " + expected + ", provided datatype: " + provided )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "TypeMismatch";
    +  }
     };
     
     /**
    @@ -134,6 +152,12 @@ class WrappedThreadException : public KernelException
         : KernelException( e.what() )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "WrappedThreadException";
    +  }
     };
     
     /**
    @@ -151,6 +175,12 @@ class UnaccessedDictionaryEntry : public KernelException
         : KernelException( "Unaccessed elements in " + what + ", in function " + where + ": " + missed )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnaccessedDictionaryEntry";
    +  }
     };
     
     /**
    @@ -168,6 +198,12 @@ class UnknownModelName : public KernelException
         : KernelException( compose_msg_( model_name ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnknownModelName";
    +  }
     };
     
     /**
    @@ -185,6 +221,12 @@ class UnknownComponent : public KernelException
         : KernelException( compose_msg_( component_name ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnknownComponent";
    +  }
     };
     
     /**
    @@ -201,6 +243,12 @@ class NewModelNameExists : public KernelException
         : KernelException( compose_msg_( model_name ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "NewModelNameExists";
    +  }
     };
     
     /**
    @@ -219,6 +267,12 @@ class ModelInUse : public KernelException
         : KernelException( compose_msg_( model_name ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "ModelInUse";
    +  }
     };
     
     /**
    @@ -241,6 +295,12 @@ class UnknownSynapseType : public KernelException
         : KernelException( compose_msg_( name ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnknownSynapseType";
    +  }
     };
     
     /**
    @@ -265,6 +325,12 @@ class UnknownNode : public KernelException
         : KernelException( compose_msg_( id ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnknownNode";
    +  }
     };
     
     /**
    @@ -289,6 +355,12 @@ class NoThreadSiblingsAvailable : public KernelException
         : KernelException( compose_msg_( id ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "NoThreadSiblingsAvailable";
    +  }
     };
     
     class LocalNodeExpected : public KernelException
    @@ -300,6 +372,12 @@ class LocalNodeExpected : public KernelException
         : KernelException( compose_msg_( id ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "LocalNodeExpected";
    +  }
     };
     
     class NodeWithProxiesExpected : public KernelException
    @@ -311,6 +389,12 @@ class NodeWithProxiesExpected : public KernelException
         : KernelException( compose_msg_( id ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "NodeWithProxiesExpected";
    +  }
     };
     
     /*
    @@ -326,6 +410,12 @@ class UnknownCompartment : public KernelException
         : KernelException( compose_msg_( compartment_idx, info ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnknownCompartment";
    +  }
     };
     
     /**
    @@ -341,6 +431,12 @@ class UnknownReceptorType : public KernelException
         : KernelException( compose_msg_( receptor_type, name ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnknownReceptorType";
    +  }
     };
     
     /**
    @@ -356,6 +452,12 @@ class IncompatibleReceptorType : public KernelException
         : KernelException( compose_msg( receptor_type, name, event_type ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "IncompatibleReceptorType";
    +  }
     };
     
     /**
    @@ -379,6 +481,12 @@ class UnknownPort : public KernelException
         : KernelException( compose_msg_( id, msg ) )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnknownPort";
    +  }
     };
     
     /**
    @@ -399,6 +507,12 @@ class IllegalConnection : public KernelException
         : KernelException( "Creation of connection is not possible because:\n" + msg )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "IllegalConnection";
    +  }
     };
     
     /**
    @@ -432,6 +546,12 @@ class InexistentConnection : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "InexistentConnection";
    +  }
     };
     
     /**
    @@ -455,6 +575,12 @@ class UnknownThread : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnknownThread";
    +  }
     };
     
     /**
    @@ -479,6 +605,12 @@ class BadDelay : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "BadDelay";
    +  }
     };
     
     /**
    @@ -515,6 +647,12 @@ class UnexpectedEvent : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnexpectedEvent";
    +  }
     };
     
     
    @@ -533,6 +671,12 @@ class UnsupportedEvent : public KernelException
         : KernelException( compose_msg_() )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnsupportedEvent";
    +  }
     };
     
     /**
    @@ -564,6 +708,12 @@ class BadProperty : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "BadProperty";
    +  }
     };
     
     /**
    @@ -595,6 +745,12 @@ class BadParameter : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "BadParameter";
    +  }
     };
     
     /**
    @@ -623,7 +779,11 @@ class BadParameterValue : public KernelException
       {
       }
     
    -  std::string message() const;
    +  std::string
    +  exception_name() override
    +  {
    +    return "BadParameterValue";
    +  }
     };
     
     /**
    @@ -661,6 +821,12 @@ class DimensionMismatch : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "DimensionMismatch";
    +  }
     };
     
     /**
    @@ -675,6 +841,12 @@ class DistributionError : public KernelException
         : KernelException( "DistributionError" )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "DistributionError";
    +  }
     };
     
     /**
    @@ -713,6 +885,12 @@ class InvalidDefaultResolution : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "InvalidDefaultResolution";
    +  }
     };
     
     /**
    @@ -751,6 +929,12 @@ class InvalidTimeInModel : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "InvalidTimeInModel";
    +  }
     };
     
     /**
    @@ -786,6 +970,12 @@ class StepMultipleRequired : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "StepMultipleRequired";
    +  }
     };
     
     /**
    @@ -827,6 +1017,12 @@ class TimeMultipleRequired : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "TimeMultipleRequired";
    +  }
     };
     
     /**
    @@ -860,6 +1056,12 @@ class GSLSolverFailure : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "GSLSolverFailure";
    +  }
     };
     
     /**
    @@ -888,6 +1090,12 @@ class NumericalInstability : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "NumericalInstability";
    +  }
     };
     
     /**
    @@ -913,6 +1121,12 @@ class NamingConflict : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "NamingConflict";
    +  }
     };
     
     /**
    @@ -945,6 +1159,12 @@ class RangeCheck : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "RangeCheck";
    +  }
     };
     
     /**
    @@ -968,6 +1188,12 @@ class IOError : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "IOError";
    +  }
     };
     
     /**
    @@ -996,6 +1222,12 @@ class KeyError : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "KeyError";
    +  }
     };
     
     /**
    @@ -1025,6 +1257,12 @@ class InternalError : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "InternalError";
    +  }
     };
     
     #ifdef HAVE_MUSIC
    @@ -1060,6 +1298,12 @@ class MUSICPortUnconnected : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MUSICPortUnconnected";
    +  }
     };
     
     /**
    @@ -1094,6 +1338,12 @@ class MUSICPortHasNoWidth : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MUSICPortHasNoWidth";
    +  }
     };
     
     /**
    @@ -1128,6 +1378,12 @@ class MUSICPortAlreadyPublished : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MUSICPortAlreadyPublished";
    +  }
     };
     
     /**
    @@ -1160,6 +1416,12 @@ class MUSICSimulationHasRun : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MUSICSimulationHasRun";
    +  }
     };
     
     /**
    @@ -1196,6 +1458,12 @@ class MUSICChannelUnknown : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MUSICChannelUnknown";
    +  }
     };
     
     /**
    @@ -1223,6 +1491,12 @@ class MUSICPortUnknown : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MUSICPortUnknown";
    +  }
     };
     
     /**
    @@ -1259,6 +1533,12 @@ class MUSICChannelAlreadyMapped : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MUSICChannelAlreadyMapped";
    +  }
     };
     #endif // HAVE_MUSIC
     
    @@ -1282,6 +1562,12 @@ class MPIPortsFileUnknown : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MPIPortsUnknown";
    +  }
     };
     
     class MPIPortsFileMissing : public KernelException
    @@ -1304,6 +1590,12 @@ class MPIPortsFileMissing : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MPIPortsFileMissing";
    +  }
     };
     
     class MPIErrorCode : public KernelException
    @@ -1327,6 +1619,12 @@ class MPIErrorCode : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "MPIErrorCode";
    +  }
     };
     #endif // HAVE_MPI
     
    @@ -1351,6 +1649,12 @@ class UnmatchedSteps : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UnmatchedSteps";
    +  }
     };
     
     class BackendPrepared : public KernelException
    @@ -1379,6 +1683,12 @@ class BackendPrepared : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "BackendPrepared";
    +  }
     };
     
     class BackendAlreadyRegistered : public KernelException
    @@ -1407,6 +1717,12 @@ class BackendAlreadyRegistered : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "BackendAlreadyRegistered";
    +  }
     };
     
     
    @@ -1442,6 +1758,12 @@ class BackendNotPrepared : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "BackendNotPrepared";
    +  }
     };
     
     class LayerExpected : public KernelException
    @@ -1451,6 +1773,12 @@ class LayerExpected : public KernelException
         : KernelException( "LayerExpected" )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "LayerExpected";
    +  }
     };
     
     class LayerNodeExpected : public KernelException
    @@ -1460,6 +1788,12 @@ class LayerNodeExpected : public KernelException
         : KernelException( "LayerNodeExpected" )
       {
       }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "LayerNodeExpected";
    +  }
     };
     
     class UndefinedName : public KernelException
    @@ -1479,6 +1813,12 @@ class UndefinedName : public KernelException
       {
         return msg_.data();
       };
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "UndefinedName";
    +  }
     };
     
     } // namespace nest
    
    From 3cee21df9a85939245137a96dd5ba0eef0bd1e2b Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 16:53:00 +0200
    Subject: [PATCH 170/375] Replace custom NESTError's with standard Python
     exceptions
    
    ---
     pynest/nest/lib/hl_api_connection_helpers.py | 62 +++++++---------
     pynest/nest/lib/hl_api_connections.py        |  4 --
     pynest/nest/lib/hl_api_sonata.py             | 75 ++++++++------------
     pynest/nest/raster_plot.py                   | 22 +++---
     pynest/nest/visualization.py                 | 14 ++--
     pynest/nest/voltage_trace.py                 | 45 +++++-------
     6 files changed, 93 insertions(+), 129 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py
    index 6c119d7c72..54670fb0d3 100644
    --- a/pynest/nest/lib/hl_api_connection_helpers.py
    +++ b/pynest/nest/lib/hl_api_connection_helpers.py
    @@ -20,8 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     """
    -These are helper functions to ease the definition of the
    -Connect function.
    +These are helper functions to ease the definition of the ``Connect`` function.
     """
     
     import copy
    @@ -30,7 +29,6 @@
     
     from .. import nestkernel_api as nestkernel
     from ..ll_api import *
    -from .hl_api_exceptions import NESTError, NESTErrors
     from .hl_api_types import CollocatedSynapses, Mask, NodeCollection, Parameter
     
     __all__ = [
    @@ -75,7 +73,7 @@ def _process_syn_spec(syn_spec, conn_spec, prelength, postlength, use_connect_ar
         rule = conn_spec["rule"]
         if isinstance(syn_spec, dict):
             if "synapse_model" in syn_spec and not isinstance(syn_spec["synapse_model"], str):
    -            raise NESTErrors.NESTError("'synapse_model' must be a string")
    +            raise TypeError("'synapse_model' must be specified by a 'str'.")
             for key, value in syn_spec.items():
                 # if value is a list, it is converted to a numpy array
                 if isinstance(value, (list, tuple)):
    @@ -86,63 +84,57 @@ def _process_syn_spec(syn_spec, conn_spec, prelength, postlength, use_connect_ar
                         if rule == "one_to_one":
                             if value.shape[0] != prelength:
                                 if use_connect_arrays:
    -                                raise nestkernel.NESTError(
    -                                    "'{}' has to be an array of dimension {}.".format(key, prelength)
    -                                )
    +                                raise ValueError(f"'{key}' has to be an array of dimension {prelength}.")
                                 else:
    -                                raise NESTErrors.NESTError(
    -                                    "'{}' has to be an array of dimension {}, a scalar or a dictionary.".format(
    -                                        key, prelength
    -                                    )
    +                                raise ValueError(
    +                                    f"'{key}' has to be an array of dimension {prelength}, a scalar or a dictionary."
                                     )
                             else:
                                 syn_spec[key] = value
                         elif rule == "fixed_total_number":
                             if "N" in conn_spec and value.shape[0] != conn_spec["N"]:
    -                            raise nestkernel.NESTError(
    -                                "'{}' has to be an array of dimension {}, a scalar or a dictionary".format(
    -                                    key, conn_spec["N"]
    -                                )
    +                            raise ValueError(
    +                                f"'{key}' has to be an array of dimension {conn_spec['N']}, a scalar or a dictionary"
                                 )
                             else:
                                 syn_spec[key] = value
                         else:
    -                        raise NESTErrors.NESTError(
    -                            "'{}' has the wrong type. One-dimensional parameter arrays can only be used in "
    -                            "conjunction with rule 'one_to_one' or 'fixed_total_number'.".format(key)
    +                        raise TypeError(
    +                            f"'{key}' has the wrong type. One-dimensional parameter arrays can only be used in "
    +                            "conjunction with rule 'one_to_one' or 'fixed_total_number'."
                             )
     
                     elif len(value.shape) == 2:
                         if rule == "all_to_all":
                             if value.shape[0] != postlength or value.shape[1] != prelength:
    -                            raise NESTErrors.NESTError(
    -                                "'{}' has to be an array of dimension {}x{} (n_target x n_sources), a scalar "
    -                                "or a dictionary.".format(key, postlength, prelength)
    +                            raise ValueError(
    +                                f"'{key}' has to be an array of dimension {postlength}x{prelength} "
    +                                "(n_target x n_sources), a scalar or a dictionary."
                                 )
                             else:
                                 syn_spec[key] = value.flatten()
                         elif rule == "fixed_indegree":
                             indegree = conn_spec["indegree"]
                             if value.shape[0] != postlength or value.shape[1] != indegree:
    -                            raise nestkernel.NESTError(
    -                                "'{}' has to be an array of dimension {}x{} (n_target x indegree), a scalar "
    -                                "or a dictionary.".format(key, postlength, indegree)
    +                            raise ValueError(
    +                                f"'{key}' has to be an array of dimension {postlength}x{indegree} "
    +                                "(n_target x indegree), a scalar or a dictionary."
                                 )
                             else:
                                 syn_spec[key] = value.flatten()
                         elif rule == "fixed_outdegree":
                             outdegree = conn_spec["outdegree"]
                             if value.shape[0] != prelength or value.shape[1] != outdegree:
    -                            raise nestkernel.NESTError(
    -                                "'{}' has to be an array of dimension {}x{} (n_sources x outdegree), a scalar "
    -                                "or a dictionary.".format(key, prelength, outdegree)
    +                            raise ValueError(
    +                                f"'{key}' has to be an array of dimension {prelength}x{outdegree} "
    +                                "(n_sources x outdegree), a scalar or a dictionary."
                                 )
                             else:
                                 syn_spec[key] = value.flatten()
                         else:
    -                        raise NESTErrors.NESTError(
    -                            "'{}' has the wrong type. Two-dimensional parameter arrays can only be used in "
    -                            "conjunction with rules 'all_to_all', 'fixed_indegree' or fixed_outdegree'.".format(key)
    +                        raise TypeError(
    +                            f"'{key}' has the wrong type. Two-dimensional parameter arrays can only be used in "
    +                            "conjunction with rules 'all_to_all', 'fixed_indegree' or fixed_outdegree'."
                             )
     
             # check that "synapse_model" is there for use_connect_arrays
    @@ -213,7 +205,7 @@ def _process_spatial_projections(conn_spec, syn_spec):
                 if "use_on_source" in projections:
                     projections.pop("use_on_source")
         else:
    -        raise nestkernel.NESTError(
    +        raise ValueError(
                 "When using kernel or mask, the only possible connection rules are "
                 "'pairwise_bernoulli', 'fixed_indegree', or 'fixed_outdegree'"
             )
    @@ -298,9 +290,7 @@ def _process_input_nodes(pre, post, conn_spec):
     
         if not pre_is_nc or not post_is_nc:
             if len(pre) != len(post):
    -            raise NESTErrors.ArgumentType(
    -                "Connect", "If `pre` or `post` contain non-unique IDs, then they must have the same length."
    -            )
    +            raise ValueError("If 'pre' or 'post' contain non-unique IDs, then they must have the same length.")
     
             # convert to arrays
             pre = np.asarray(pre)
    @@ -308,10 +298,10 @@ def _process_input_nodes(pre, post, conn_spec):
     
             # check array type
             if not issubclass(pre.dtype.type, (int, np.integer)):
    -            raise NESTErrors.ArgumentType("Connect", " `pre` IDs should be integers.")
    +            raise TypeError("'pre' node IDs must be integers.")
     
             if not issubclass(post.dtype.type, (int, np.integer)):
    -            raise NESTErrors.ArgumentType("Connect", " `post` IDs should be integers.")
    +            raise TypeError("'post' node IDs must be integers.")
     
             # check dimension
             if not (pre.ndim == 1 and post.ndim == 1):
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index ff89497182..4782eca57a 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -129,10 +129,6 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, return_synapsecollection=F
         return_synapsecollection: bool
             Specifies whether or not we should return a :py:class:`.SynapseCollection` of pre and post connections
     
    -    Raises
    -    ------
    -    nestkernel.NESTError
    -
         Notes
         -----
         It is possible to connect NumPy arrays of node IDs one-to-one by passing the arrays as `pre` and `post`,
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index f3757710a2..95fee0e992 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -106,14 +106,11 @@ class SonataNetwork:
     
         def __init__(self, config, sim_config=None):
             if not have_hdf5:
    -            msg = "SonataNetwork unavailable because NEST was compiled without HDF5 support"
    -            raise nestkernel.NESTError(msg)
    +            raise ModuleNotFoundError("'SonataNetwork' unavailable because NEST was compiled without 'HDF5' support")
             if not have_h5py:
    -            msg = "SonataNetwork unavailable because h5py is not installed or could not be imported"
    -            raise nestkernel.NESTError(msg)
    +            raise ModuleNotFoundError("'SonataNetwork' unavailable because 'h5py' could not be loaded.")
             if not have_pandas:
    -            msg = "SonataNetwork unavailable because pandas is not installed or could not be imported"
    -            raise nestkernel.NESTError(msg)
    +            raise ModuleNotFoundError("'SonataNetwork' unavailable because 'pandas' could not be loaded.")
     
             self._node_collections = {}
             self._edges_maps = []
    @@ -127,12 +124,10 @@ def __init__(self, config, sim_config=None):
                 self._conf.update(self._parse_config(sim_config))
     
             if self._conf["target_simulator"] != "NEST":
    -            msg = "'target_simulator' in configuration file must be 'NEST'."
    -            raise ValueError(msg)
    +            raise ValueError("'target_simulator' in configuration file must be 'NEST'.")
     
             if "dt" not in self._conf["run"]:
    -            msg = "Time resolution 'dt' must be specified in configuration file"
    -            raise ValueError(msg)
    +            raise ValueError("Time resolution 'dt' must be specified in configuration file.")
     
             SetKernelStatus({"resolution": self._conf["run"]["dt"]})
     
    @@ -155,8 +150,7 @@ def _parse_config(self, config):
             """
     
             if not isinstance(config, (str, PurePath, Path)):
    -            msg = "Path to JSON configuration file must be passed as str, pathlib.PurePath or pathlib.Path"
    -            raise TypeError(msg)
    +            raise TypeError("Path to JSON configuration file must be passed as 'str' or 'pathlib.Path'.")
     
             # Get absolute path
             conf_path = Path(config).resolve(strict=True)
    @@ -220,8 +214,9 @@ def Create(self):
                 is_one_model_type = (model_types_arr[0] == model_types_arr).all()
     
                 if not is_one_model_type:
    -                msg = f"Only one model type per node types CSV file is supported. {csv_fn} contains more than one."
    -                raise ValueError(msg)
    +                raise ValueError(
    +                    f"Only one model type per node types CSV file is supported. {csv_fn} contains more than one."
    +                )
     
                 model_type = model_types_arr[0]
     
    @@ -230,8 +225,7 @@ def Create(self):
                 elif model_type == "virtual":
                     self._create_spike_train_injectors(nodes_conf)
                 else:
    -                msg = f"Model type '{model_type}' in {csv_fn} is not supported by NEST."
    -                raise ValueError(msg)
    +                raise ValueError(f"Model type '{model_type}' in {csv_fn} is not supported by NEST.")
     
             self._are_nodes_created = True
     
    @@ -321,27 +315,25 @@ def _create_spike_train_injectors(self, nodes_conf):
                             break  # Break once we found the matching population
     
                     if input_file is None:
    -                    msg = f"Could not find an input file for population {pop_name} in config file."
    -                    raise ValueError(msg)
    +                    raise ValueError(f"Could not find an input file for population {pop_name} in config file.")
     
                     with h5py.File(input_file, "r") as input_h5f:
                         # Deduce the HDF5 file structure
                         all_groups = all([isinstance(g, h5py.Group) for g in input_h5f["spikes"].values()])
                         any_groups = any([isinstance(g, h5py.Group) for g in input_h5f["spikes"].values()])
                         if (all_groups or any_groups) and not (all_groups and any_groups):
    -                        msg = (
    -                            "Unsupported HDF5 structure; groups and "
    -                            "datasets cannot be on the same hierarchical "
    -                            f"level in input spikes file {input_file}"
    +                        raise ValueError(
    +                            "Unsupported HDF5 structure; groups and datasets cannot be on the same hierarchical "
    +                            f"level in input spikes file {input_file}."
                             )
    -                        raise ValueError(msg)
     
                         if all_groups:
                             if pop_name in input_h5f["spikes"].keys():
                                 spikes_grp = input_h5f["spikes"][pop_name]
                             else:
    -                            msg = f"Did not find a matching HDF5 group name for population {pop_name} in {input_file}"
    -                            raise ValueError(msg)
    +                            raise ValueError(
    +                                f"Did not find a matching HDF5 group name for population {pop_name} in {input_file}."
    +                            )
                         else:
                             spikes_grp = input_h5f["spikes"]
     
    @@ -350,8 +342,7 @@ def _create_spike_train_injectors(self, nodes_conf):
                         elif "node_ids" in spikes_grp:
                             node_ids = spikes_grp["node_ids"][:]
                         else:
    -                        msg = f"No dataset called 'gids' or 'node_ids' in {input_file}"
    -                        raise ValueError(msg)
    +                        raise ValueError(f"No dataset called 'gids' or 'node_ids' in {input_file}.")
     
                         timestamps = spikes_grp["timestamps"][:]
     
    @@ -390,15 +381,12 @@ def _create_node_type_parameter_map(self, nodes_df, csv_fn):
             """
     
             if "model_template" not in nodes_df.columns:
    -            msg = f"Missing the required 'model_template' header specifying NEST neuron models in {csv_fn}."
    -            raise ValueError(msg)
    +            raise ValueError(f"Missing the required 'model_template' header specifying NEST neuron models in {csv_fn}.")
     
             if "dynamics_params" not in nodes_df.columns:
    -            msg = (
    -                "Missing the required 'dynamics_params' header specifying "
    -                f".json files with model parameters in {csv_fn}"
    +            raise ValueError(
    +                f"Missing the required 'dynamics_params' header specifying .json files with model parameters in {csv_fn}."
                 )
    -            raise ValueError(msg)
     
             nodes_df["model_template"] = nodes_df["model_template"].str.replace("nest:", "")
     
    @@ -430,8 +418,7 @@ def Connect(self, hdf5_hyperslab_size=None):
             """
     
             if not self._are_nodes_created:
    -            msg = "The SONATA network nodes must be created before any connections can be made"
    -            raise nestkernel.NESTError(msg)
    +            raise RuntimeError("The SONATA network nodes must be created before any connections can be made.")
     
             if hdf5_hyperslab_size is None:
                 hdf5_hyperslab_size = self._hyperslab_size_default
    @@ -448,9 +435,10 @@ def Connect(self, hdf5_hyperslab_size=None):
                 except BlockingIOError as err:
                     raise BlockingIOError(f"{err.strerror} for {os.path.realpath(d['edges_file'])}") from None
     
    -        sps(graph_specs)
    -        sps(hdf5_hyperslab_size)
    -        sr("ConnectSonata")
    +        # TODO: PYNEST-NG
    +        # sps(graph_specs)
    +        # sps(hdf5_hyperslab_size)
    +        # sr("ConnectSonata")
     
             self._is_network_built = True
     
    @@ -519,8 +507,9 @@ def _create_edges_maps(self):
                 edges_df = pd.read_csv(edges_csv_fn, sep=r"\s+")
     
                 if "model_template" not in edges_df.columns:
    -                msg = f"Missing the required 'model_template' header specifying NEST synapse models in {edges_csv_fn}."
    -                raise ValueError(msg)
    +                raise ValueError(
    +                    f"Missing the required 'model_template' header specifying NEST synapse models in {edges_csv_fn}."
    +                )
     
                 # Rename column labels to names used by NEST. Note that rename
                 # don't throw an error for extra labels (we want this behavior)
    @@ -644,16 +633,14 @@ def Simulate(self):
     
             # Verify that network is built
             if not self._is_network_built:
    -            msg = "The SONATA network must be built before a simulation can be done"
    -            raise nestkernel.NESTError(msg)
    +            raise RuntimeError("The SONATA network must be built before a simulation can be done.")
     
             if "tstop" in self._conf["run"]:
                 T_sim = self._conf["run"]["tstop"]
             elif "duration" in self._conf["run"]:
                 T_sim = self._conf["run"]["duration"]
             else:
    -            msg = "Simulation time 'tstop' or 'duration' must be specified in configuration file"
    -            raise ValueError(msg)
    +            raise ValueError("Simulation time 'tstop' or 'duration' must be specified in configuration file.")
     
             Simulate(T_sim)
     
    diff --git a/pynest/nest/raster_plot.py b/pynest/nest/raster_plot.py
    index adf64a2ce0..d5cf00454e 100644
    --- a/pynest/nest/raster_plot.py
    +++ b/pynest/nest/raster_plot.py
    @@ -19,7 +19,7 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -""" Functions for raster plotting."""
    +"""Functions for raster plotting."""
     
     import nest
     import numpy
    @@ -53,6 +53,7 @@ def extract_events(data, time=None, sel=None):
         numpy.array
             List of events as (node_id, t) tuples
         """
    +
         val = []
     
         if time:
    @@ -89,8 +90,10 @@ def from_data(data, sel=None, **kwargs):
         kwargs:
             Parameters passed to _make_plot
         """
    +
         if len(data) == 0:
    -        raise nest.NESTError("No data to plot.")
    +        raise ValueError("No data to plot.")
    +
         ts = data[:, 1]
         d = extract_events(data, sel=sel)
         ts1 = d[:, 1]
    @@ -113,6 +116,7 @@ def from_file(fname, **kwargs):
         kwargs:
             Parameters passed to _make_plot
         """
    +
         if isinstance(fname, str):
             fname = [fname]
     
    @@ -129,6 +133,7 @@ def from_file(fname, **kwargs):
     
     def from_file_pandas(fname, **kwargs):
         """Use pandas."""
    +
         data = None
         for f in fname:
             dataFrame = pandas.read_table(f, header=2, skipinitialspace=True)
    @@ -144,6 +149,7 @@ def from_file_pandas(fname, **kwargs):
     
     def from_file_numpy(fname, **kwargs):
         """Use numpy."""
    +
         data = None
         for f in fname:
             newdata = numpy.loadtxt(f, skiprows=3)
    @@ -166,21 +172,17 @@ def from_device(detec, **kwargs):
             Description
         kwargs:
             Parameters passed to _make_plot
    -
    -    Raises
    -    ------
    -    nest.NESTError
         """
     
         type_id = nest.GetDefaults(detec.get("model"), "type_id")
         if not type_id == "spike_recorder":
    -        raise nest.NESTError("Please provide a spike_recorder.")
    +        raise TypeError("Please provide a 'spike_recorder'.")
     
         if detec.get("record_to") == "memory":
             ts, node_ids = _from_memory(detec)
     
             if not len(ts):
    -            raise nest.NESTError("No events recorded!")
    +            raise ValueError("No events recorded by 'spike_recorder'.")
     
             if "title" not in kwargs:
                 kwargs["title"] = "Raster plot from device '%i'" % detec.get("global_id")
    @@ -197,7 +199,7 @@ def from_device(detec, **kwargs):
             return from_file(fname, **kwargs)
     
         else:
    -        raise nest.NESTError("No data to plot. Make sure that record_to is set to either 'ascii' or 'memory'.")
    +        raise ValueError("No data to plot. Make sure that 'record_to' is set to either 'ascii' or 'memory'.")
     
     
     def _from_memory(detec):
    @@ -232,6 +234,7 @@ def _make_plot(ts, ts1, node_ids, neurons, hist=True, hist_binwidth=5.0, graysca
         xlabel : str, optional
             Label for x-axis
         """
    +
         import matplotlib.pyplot as plt
     
         plt.figure()
    @@ -302,6 +305,7 @@ def _histogram(a, bins=10, bin_range=None, normed=False):
         ------
         ValueError
         """
    +
         from numpy import asarray, concatenate, iterable, linspace, sort
     
         a = asarray(a).ravel()
    diff --git a/pynest/nest/visualization.py b/pynest/nest/visualization.py
    index 58cb6a442f..47b1c4c671 100644
    --- a/pynest/nest/visualization.py
    +++ b/pynest/nest/visualization.py
    @@ -51,17 +51,13 @@ def plot_network(nodes, filename, ext_conns=False, plot_modelnames=False):
             these are drawn to a node named 'ext'.
         plot_modelnames : bool, optional
             Description
    -
    -    Raises
    -    ------
    -    nest.NESTError
         """
     
    -    if len(nodes) == 0:
    -        nest.NESTError("nodes must at least contain one node")
    -
         if not isinstance(nodes, nest.NodeCollection):
    -        raise nest.NESTError("nodes must be a NodeCollection")
    +        raise TypeError("nodes must be a 'NodeCollection'.")
    +
    +    if len(nodes) == 0:
    +        raise ValueError("nodes must at least contain one node.")
     
         if ext_conns:
             raise NotImplementedError("ext_conns")
    @@ -80,4 +76,4 @@ def plot_network(nodes, filename, ext_conns=False, plot_modelnames=False):
         elif filetype == "png":
             graph.write_png(filename)
         else:
    -        raise nest.NESTError("Filename must end in '.png' or '.pdf'.")
    +        raise ValueError("Filename must end in '.png' or '.pdf'.")
    diff --git a/pynest/nest/voltage_trace.py b/pynest/nest/voltage_trace.py
    index dd6d93bc30..322e8955e2 100644
    --- a/pynest/nest/voltage_trace.py
    +++ b/pynest/nest/voltage_trace.py
    @@ -33,7 +33,8 @@
     
     
     def from_file(fname, title=None, grayscale=False):
    -    """Plot voltage trace from file.
    +    """
    +    Plot voltage trace from file.
     
         Parameters
         ----------
    @@ -43,11 +44,8 @@ def from_file(fname, title=None, grayscale=False):
             Plot title
         grayscale : bool, optional
             Plot in grayscale
    -
    -    Raises
    -    ------
    -    ValueError
         """
    +
         import matplotlib.pyplot as plt
     
         if isinstance(fname, (list, tuple)):
    @@ -126,8 +124,11 @@ def from_file(fname, title=None, grayscale=False):
     
     
     def from_device(detec, neurons=None, title=None, grayscale=False, timeunit="ms"):
    -    """Plot the membrane potential of a set of neurons recorded by
    -    the given voltmeter or multimeter.
    +    """
    +    Plot voltage trace from device.
    +
    +    Plots the membrane potential of a set of neurons recorded by the given
    +    ``voltmeter`` or ``multimeter``.
     
         Parameters
         ----------
    @@ -141,34 +142,21 @@ def from_device(detec, neurons=None, title=None, grayscale=False, timeunit="ms")
             Plot in grayscale
         timeunit : str, optional
             Unit of time
    -
    -    Raises
    -    ------
    -    nest.NESTError
    -        Description
         """
    +
         import matplotlib.pyplot as plt
     
         if len(detec) > 1:
    -        raise nest.NESTError("Please provide a single voltmeter.")
    +        raise ValueError("Please provide a single 'voltmeter' or 'multimeter'.")
     
         type_id = nest.GetDefaults(detec.get("model"), "type_id")
         if type_id not in ("voltmeter", "multimeter"):
    -        raise nest.NESTError(
    -            "Please provide a voltmeter or a \
    -            multimeter measuring V_m."
    -        )
    +        raise TypeError("Please provide a 'voltmeter' or a 'multimeter' measuring V_m.")
         elif type_id == "multimeter":
             if "V_m" not in detec.get("record_from"):
    -            raise nest.NESTError(
    -                "Please provide a multimeter \
    -                measuring V_m."
    -            )
    +            raise ValueError("Please provide a 'multimeter' measuring 'V_m'.")
             elif not detec.get("record_to") == "memory" and len(detec.get("record_from")) > 1:
    -            raise nest.NESTError(
    -                "Please provide a multimeter \
    -                measuring only V_m or record to memory!"
    -            )
    +            raise ValueError("Please provide a 'multimeter' measuring only 'V_m' or record to memory.")
     
         if detec.get("record_to") == "memory":
             timefactor = 1.0
    @@ -181,7 +169,7 @@ def from_device(detec, neurons=None, title=None, grayscale=False, timeunit="ms")
             times, voltages = _from_memory(detec)
     
             if not len(times):
    -            raise nest.NESTError("No events recorded!")
    +            raise ValueError("No events recorded.")
     
             if neurons is None:
                 neurons = voltages.keys()
    @@ -220,15 +208,18 @@ def from_device(detec, neurons=None, title=None, grayscale=False, timeunit="ms")
             fname = detec.get("filenames")
             return from_file(fname, title, grayscale)
         else:
    -        raise nest.NESTError("Provided devices neither record to ascii file, nor to memory.")
    +        raise ValueError("Provided device neither records to ascii file nor to memory.")
     
     
     def _from_memory(detec):
         """Get voltage traces from memory.
    +
    +    Parameters
         ----------
         detec : list
             Global id of voltmeter or multimeter
         """
    +
         import array
     
         ev = detec.get("events")
    
    From b8e7e75544329866f11c9f9f622fd6c6f85081e0 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 16:55:34 +0200
    Subject: [PATCH 171/375] Replace NESTError with standard Python exception
    
    ---
     pynest/nest/lib/hl_api_nodes.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index 674d4aaffc..9357aada8f 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -29,7 +29,6 @@
     
     from .. import nestkernel_api as nestkernel
     from ..ll_api import *
    -from .hl_api_exceptions import NESTErrors
     from .hl_api_helper import is_iterable, model_deprecation_warning
     from .hl_api_parallel_computing import NumProcesses, Rank
     from .hl_api_types import NodeCollection, Parameter
    @@ -128,7 +127,7 @@ def Create(model, n=1, params=None, positions=None):
             else:
                 # If positions is not a free object, it must be a grid object.
                 if n > 1:
    -                raise NESTErrors.NESTError("Cannot specify number of nodes with grid positions")
    +                raise ValueError("Cannot specify number of nodes with grid positions")
                 layer_specs["shape"] = positions.shape
                 if positions.center is not None:
                     layer_specs["center"] = [float(v) for v in positions.center]
    
    From 7f62e3810fac3d7bd5cb697192c8296673d56e51 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 17:03:40 +0200
    Subject: [PATCH 172/375] Add cython handler for c++ exceptions
    
    ---
     pynest/nest/__init__.py        |   3 +-
     pynest/nest/ll_api.py          |   9 +-
     pynest/nestkernel_api.pxd      | 153 +++++++++++++++++--------------
     pynest/nestkernel_api.pyx      | 159 +++++++++++++++++----------------
     pynest/nestkernel_exceptions.h |  72 +++++++++++++++
     5 files changed, 245 insertions(+), 151 deletions(-)
     create mode 100644 pynest/nestkernel_exceptions.h
    
    diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py
    index 9bb1b9a59f..012208a857 100644
    --- a/pynest/nest/__init__.py
    +++ b/pynest/nest/__init__.py
    @@ -83,6 +83,8 @@ class NestModule(types.ModuleType):
         from . import spatial_distributions  # noqa
         from .ll_api import set_communicator
     
    +    NESTError = ll_api.nestkernel.NESTError
    +
         def __init__(self, name):
             super().__init__(name)
             # Copy over the original module attributes to preserve all interpreter-given
    @@ -91,7 +93,6 @@ def __init__(self, name):
     
             # Import public APIs of submodules into the `nest.` namespace
             _rel_import_star(self, ".lib.hl_api_connections")  # noqa: F821
    -        _rel_import_star(self, ".lib.hl_api_exceptions")  # noqa: F821
             _rel_import_star(self, ".lib.hl_api_info")  # noqa: F821
             _rel_import_star(self, ".lib.hl_api_models")  # noqa: F821
             _rel_import_star(self, ".lib.hl_api_nodes")  # noqa: F821
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index 6418838087..c26625c106 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -51,7 +51,6 @@
     sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL)
     
     from . import nestkernel_api as nestkernel  # noqa
    -from .lib.hl_api_exceptions import NESTError, NESTErrors
     
     __all__ = [
         "set_communicator",
    @@ -72,11 +71,11 @@ def set_communicator(comm):
     
         Raises
         ------
    -    nestkernel.NESTError
    +    ModuleNotFoundError
         """
     
         if "mpi4py" not in sys.modules:
    -        raise NESTError("set_communicator: " "mpi4py not loaded.")
    +        raise ModuleNotFoundError("No module named 'mpi4py'.")
     
         # TODO-PYNEST-NG: set_communicator
         # engine.set_communicator(comm)
    @@ -141,13 +140,13 @@ def init(argv):
     
         Raises
         ------
    -    nestkernel.NESTError.PyNESTError
    +    RuntimeError
         """
     
         global initialized
     
         if initialized:
    -        raise NESTErrors.PyNESTError("NEST already initialized.")
    +        raise RuntimeError("NEST is already initialized.")
     
         # Some commandline arguments of NEST and Python have the same
         # name, but different meaning. To avoid unintended behavior, we
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 747b4869c6..17c65c1313 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -27,12 +27,23 @@ from libcpp.utility cimport pair
     from libcpp.vector cimport vector
     
     
    +cdef extern from "Python.h" nogil:
    +    ctypedef struct PyObject
    +
    +
    +cdef extern from "nestkernel_exceptions.h":
    +    cdef PyObject* nest_error_module
    +    cdef void create_exceptions()
    +    cdef void custom_exception_handler()
    +
    +
     cdef extern from "dictionary.h" namespace "boost":
         cppclass any:
             any()
             any& operator=[T](T&)
         T any_cast[T](any& operand)
     
    +
     cdef extern from "dictionary.h":
         cppclass dictionary:
             dictionary()
    @@ -49,6 +60,7 @@ cdef extern from "dictionary.h":
         string debug_dict_types(const dictionary&)
         cbool is_type[T](const any&)
     
    +
     cdef extern from "logging.h" namespace "nest":
         cpdef enum severity_t:
             M_ALL,
    @@ -62,15 +74,18 @@ cdef extern from "logging.h" namespace "nest":
             M_FATAL,
             M_QUIET
     
    +
     cdef extern from "connection_id.h" namespace "nest":
         cppclass ConnectionID:
             ConnectionID()
     
    +
     cdef extern from "node_collection.h" namespace "nest":
         cppclass NodeCollectionPTR:
             NodeCollectionPTR()
     
    -    NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) except +
    +    NodeCollectionPTR operator+(NodeCollectionPTR, NodeCollectionPTR) except +custom_exception_handler
    +
     
     cdef extern from "node_collection.h":
         cppclass NodeCollectionDatum:
    @@ -79,33 +94,35 @@ cdef extern from "node_collection.h":
         cppclass NodeCollectionIteratorDatum:
             NodeCollectionIteratorDatum(const NodeCollectionIteratorDatum&)
     
    +
     cdef extern from "parameter.h" namespace "nest":
         cppclass ParameterPTR:
             ParameterPTR()
         cppclass Parameter:
             Parameter()
    -    ParameterPTR multiply_parameter(const ParameterPTR first, const ParameterPTR second) except +
    -    ParameterPTR divide_parameter(const ParameterPTR first, const ParameterPTR second) except +
    -    ParameterPTR add_parameter(const ParameterPTR first, const ParameterPTR second) except +
    -    ParameterPTR subtract_parameter(const ParameterPTR first, const ParameterPTR second) except +
    -    ParameterPTR compare_parameter(const ParameterPTR first, const ParameterPTR second, const dictionary& d) except +
    -    ParameterPTR conditional_parameter(const ParameterPTR condition, const ParameterPTR if_true, const ParameterPTR if_false) except +
    -    ParameterPTR min_parameter(const ParameterPTR parameter, const double other) except +
    -    ParameterPTR max_parameter(const ParameterPTR parameter, const double other) except +
    -    ParameterPTR redraw_parameter(const ParameterPTR parameter, const double min, const double max) except +
    -    ParameterPTR exp_parameter(const ParameterPTR parameter) except +
    -    ParameterPTR sin_parameter(const ParameterPTR parameter) except +
    -    ParameterPTR cos_parameter(const ParameterPTR parameter) except +
    -    ParameterPTR pow_parameter(const ParameterPTR parameter, const double exponent) except +
    -
    -    ParameterPTR dimension_parameter(const ParameterPTR x, const ParameterPTR y) except +
    -    ParameterPTR dimension_parameter(const ParameterPTR x, const ParameterPTR y, const ParameterPTR z) except +
    +    ParameterPTR multiply_parameter(const ParameterPTR first, const ParameterPTR second) except +custom_exception_handler
    +    ParameterPTR divide_parameter(const ParameterPTR first, const ParameterPTR second) except +custom_exception_handler
    +    ParameterPTR add_parameter(const ParameterPTR first, const ParameterPTR second) except +custom_exception_handler
    +    ParameterPTR subtract_parameter(const ParameterPTR first, const ParameterPTR second) except +custom_exception_handler
    +    ParameterPTR compare_parameter(const ParameterPTR first, const ParameterPTR second, const dictionary& d) except +custom_exception_handler
    +    ParameterPTR conditional_parameter(const ParameterPTR condition, const ParameterPTR if_true, const ParameterPTR if_false) except +custom_exception_handler
    +    ParameterPTR min_parameter(const ParameterPTR parameter, const double other) except +custom_exception_handler
    +    ParameterPTR max_parameter(const ParameterPTR parameter, const double other) except +custom_exception_handler
    +    ParameterPTR redraw_parameter(const ParameterPTR parameter, const double min, const double max) except +custom_exception_handler
    +    ParameterPTR exp_parameter(const ParameterPTR parameter) except +custom_exception_handler
    +    ParameterPTR sin_parameter(const ParameterPTR parameter) except +custom_exception_handler
    +    ParameterPTR cos_parameter(const ParameterPTR parameter) except +custom_exception_handler
    +    ParameterPTR pow_parameter(const ParameterPTR parameter, const double exponent) except +custom_exception_handler
    +
    +    ParameterPTR dimension_parameter(const ParameterPTR x, const ParameterPTR y) except +custom_exception_handler
    +    ParameterPTR dimension_parameter(const ParameterPTR x, const ParameterPTR y, const ParameterPTR z) except +custom_exception_handler
     
     
     cdef extern from "mask.h" namespace "nest":
         cppclass MaskPTR:
             MaskPTR()
     
    +
     cdef extern from "nest.h" namespace "nest":
         void init_nest( int* argc, char** argv[] )
         void reset_kernel()
    @@ -113,74 +130,74 @@ cdef extern from "nest.h" namespace "nest":
         severity_t get_verbosity()
         void set_verbosity( severity_t )
     
    -    void enable_structural_plasticity() except +
    -    void disable_structural_plasticity() except +
    +    void enable_structural_plasticity() except +custom_exception_handler
    +    void disable_structural_plasticity() except +custom_exception_handler
     
    -    NodeCollectionPTR create( const string model_name, const long n ) except +
    -    NodeCollectionPTR create_spatial( const dictionary& ) except +
    +    NodeCollectionPTR create( const string model_name, const long n ) except +custom_exception_handler
    +    NodeCollectionPTR create_spatial( const dictionary& ) except +custom_exception_handler
     
    -    NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except +
    +    NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except +custom_exception_handler
     
    -    cbool equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ) except +
    -    cbool contains( const NodeCollectionPTR nc, const size_t node_id ) except +
    -    long find( const NodeCollectionPTR nc, size_t node_id ) except +
    -    dictionary get_metadata( const NodeCollectionPTR nc ) except +
    +    cbool equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ) except +custom_exception_handler
    +    cbool contains( const NodeCollectionPTR nc, const size_t node_id ) except +custom_exception_handler
    +    long find( const NodeCollectionPTR nc, size_t node_id ) except +custom_exception_handler
    +    dictionary get_metadata( const NodeCollectionPTR nc ) except +custom_exception_handler
     
    -    NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) except +
    +    NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step ) except +custom_exception_handler
         void connect(NodeCollectionPTR sources,
                      NodeCollectionPTR targets,
                      const dictionary& connectivity,
    -                 const vector[dictionary]& synapse_params ) except +
    +                 const vector[dictionary]& synapse_params ) except +custom_exception_handler
         void disconnect(NodeCollectionPTR sources,
                      NodeCollectionPTR targets,
                      const dictionary& connectivity,
    -                 const dictionary& synapse_params) except +
    -    void disconnect( const deque[ConnectionID]& conns ) except +
    +                 const dictionary& synapse_params) except +custom_exception_handler
    +    void disconnect( const deque[ConnectionID]& conns ) except +custom_exception_handler
         string print_nodes_to_string()
    -    string pprint_to_string( NodeCollectionPTR nc ) except +
    -    size_t nc_size( NodeCollectionPTR nc ) except +
    -    dictionary get_kernel_status() except +
    -    dictionary get_model_defaults( const string& ) except +
    -    void set_model_defaults( const string&, const dictionary& ) except +
    -    NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) except +
    -    deque[ConnectionID] get_connections( const dictionary& dict ) except +
    -    void set_kernel_status( const dictionary& ) except +
    -    dictionary get_nc_status( NodeCollectionPTR nc ) except +
    -    void set_nc_status( NodeCollectionPTR nc, vector[dictionary]& params ) except +
    -    vector[dictionary] get_connection_status(const deque[ConnectionID]&) except +
    -    void set_connection_status(const deque[ConnectionID]&, const dictionary&) except +
    -    void set_connection_status(const deque[ConnectionID]&, const vector[dictionary]&) except +
    -    void simulate( const double& t ) except +
    -    void prepare() except +
    -    void run( const double& t ) except +
    -    void cleanup() except +
    -    void copy_model( const string&, const string&, const dictionary& ) except +
    -    ParameterPTR create_parameter( const dictionary& param_dict ) except +
    -    double get_value( const ParameterPTR param ) except +
    -    cbool is_spatial( const ParameterPTR param ) except +
    -    NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except +
    -    NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except +
    -    void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except +
    -    vector[double] apply( const ParameterPTR param, const NodeCollectionPTR nc ) except +
    -    vector[double] apply( const ParameterPTR param, const dictionary& positions ) except +
    +    string pprint_to_string( NodeCollectionPTR nc ) except +custom_exception_handler
    +    size_t nc_size( NodeCollectionPTR nc ) except +custom_exception_handler
    +    dictionary get_kernel_status() except +custom_exception_handler
    +    dictionary get_model_defaults( const string& ) except +custom_exception_handler
    +    void set_model_defaults( const string&, const dictionary& ) except +custom_exception_handler
    +    NodeCollectionPTR get_nodes( const dictionary& params, const cbool local_only ) except +custom_exception_handler
    +    deque[ConnectionID] get_connections( const dictionary& dict ) except +custom_exception_handler
    +    void set_kernel_status( const dictionary& ) except +custom_exception_handler
    +    dictionary get_nc_status( NodeCollectionPTR nc ) except +custom_exception_handler
    +    void set_nc_status( NodeCollectionPTR nc, vector[dictionary]& params ) except +custom_exception_handler
    +    vector[dictionary] get_connection_status(const deque[ConnectionID]&) except +custom_exception_handler
    +    void set_connection_status(const deque[ConnectionID]&, const dictionary&) except +custom_exception_handler
    +    void set_connection_status(const deque[ConnectionID]&, const vector[dictionary]&) except +custom_exception_handler
    +    void simulate( const double& t ) except +custom_exception_handler
    +    void prepare() except +custom_exception_handler
    +    void run( const double& t ) except +custom_exception_handler
    +    void cleanup() except +custom_exception_handler
    +    void copy_model( const string&, const string&, const dictionary& ) except +custom_exception_handler
    +    ParameterPTR create_parameter( const dictionary& param_dict ) except +custom_exception_handler
    +    double get_value( const ParameterPTR param ) except +custom_exception_handler
    +    cbool is_spatial( const ParameterPTR param ) except +custom_exception_handler
    +    NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except +custom_exception_handler
    +    NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except +custom_exception_handler
    +    void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except +custom_exception_handler
    +    vector[double] apply( const ParameterPTR param, const NodeCollectionPTR nc ) except +custom_exception_handler
    +    vector[double] apply( const ParameterPTR param, const dictionary& positions ) except +custom_exception_handler
     
     
     # PYNEST-NG: Move these global functions to nest.h?
     cdef extern from "spatial.h" namespace "nest":
    -    vector[vector[double]] get_position( NodeCollectionPTR layer_nc ) except +
    -    vector[double] distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) except +
    -    vector[double] distance( NodeCollectionPTR layer_nc, const vector[vector[double]]& point ) except +
    -    vector[double] distance( const vector[ConnectionID]& conns ) except +
    -    vector[vector[double]] displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) except +
    -    vector[vector[double]] displacement( NodeCollectionPTR layer_nc, const vector[vector[double]]& point ) except +
    -
    -    void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ) except +
    -    MaskPTR create_mask( const dictionary& mask_dict ) except +
    -    NodeCollectionPTR select_nodes_by_mask( const NodeCollectionPTR layer_nc, const vector[double]& anchor, const MaskPTR mask ) except +
    -    cbool inside(const vector[double]& point, const MaskPTR mask ) except +
    +    vector[vector[double]] get_position( NodeCollectionPTR layer_nc ) except +custom_exception_handler
    +    vector[double] distance( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) except +custom_exception_handler
    +    vector[double] distance( NodeCollectionPTR layer_nc, const vector[vector[double]]& point ) except +custom_exception_handler
    +    vector[double] distance( const vector[ConnectionID]& conns ) except +custom_exception_handler
    +    vector[vector[double]] displacement( NodeCollectionPTR layer_to_nc, NodeCollectionPTR layer_from_nc ) except +custom_exception_handler
    +    vector[vector[double]] displacement( NodeCollectionPTR layer_nc, const vector[vector[double]]& point ) except +custom_exception_handler
    +
    +    void connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const dictionary& dict ) except +custom_exception_handler
    +    MaskPTR create_mask( const dictionary& mask_dict ) except +custom_exception_handler
    +    NodeCollectionPTR select_nodes_by_mask( const NodeCollectionPTR layer_nc, const vector[double]& anchor, const MaskPTR mask ) except +custom_exception_handler
    +    cbool inside(const vector[double]& point, const MaskPTR mask ) except +custom_exception_handler
     
         void dump_layer_nodes(const NodeCollectionPTR layer_nc, const string& filename)
         void dump_layer_connections(const NodeCollectionPTR source_layer,
                                     const NodeCollectionPTR target_layer,
                                     const string& synapse_model,
    -                                const string& filename) except +
    +                                const string& filename) except +custom_exception_handler
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index f4cffb88f9..4c008c94e9 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -35,8 +35,6 @@ from libcpp.vector cimport vector
     
     import nest
     import numpy
    -from nest.lib.hl_api_exceptions import NESTErrors
    -
     # cimport numpy
     
     #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
    @@ -44,8 +42,10 @@ from nest.lib.hl_api_exceptions import NESTErrors
     from libc.stdint cimport int64_t, uint64_t
     from libc.stdlib cimport free, malloc
     
    +NESTError = None
     
     def init(args):
    +    global NESTError
         cdef int argc = len(args)
     
         cdef char** c_argv = <char**>malloc(sizeof(char*) * argc)
    @@ -53,10 +53,11 @@ def init(args):
             for idx, s in enumerate([pystr_to_string(x) for x in args]):
                 c_argv[idx] = s
             init_nest(&argc, &c_argv)
    +        create_exceptions()  # requires fully initialized NEST kernel
    +        NESTError = <object> nest_error_module
         finally:
             free(c_argv)
     
    -    
     #
     #    cdef vector[char*] argv = pylist_to_stringvec(pyargs)
     ##    cdef const char* argv = argv_sv[0].c_str()
    @@ -114,6 +115,7 @@ cdef object any_vector_to_list(vector[any] cvec):
             inc(it)
         return tmp
     
    +
     cdef object dict_vector_to_list(vector[dictionary] cvec):
         cdef tmp = []
         cdef vector[dictionary].iterator it = cvec.begin()
    @@ -122,6 +124,7 @@ cdef object dict_vector_to_list(vector[dictionary] cvec):
             inc(it)
         return tmp
     
    +
     cdef object any_to_pyobj(any operand):
         if is_type[int](operand):
             return any_cast[int](operand)
    @@ -166,6 +169,7 @@ cdef object any_to_pyobj(any operand):
             obj._set_nc(any_cast[NodeCollectionPTR](operand))
             return nest.NodeCollection(obj)
     
    +
     cdef object dictionary_to_pydict(dictionary cdict):
         cdef tmp = {}
     
    @@ -179,12 +183,14 @@ cdef object dictionary_to_pydict(dictionary cdict):
             inc(it)
         return tmp
     
    +
     cdef is_list_tuple_ndarray_of_float(v):
         list_of_float = type(v) is list and type(v[0]) is float
         tuple_of_float = type(v) is tuple and type(v[0]) is float
         ndarray_of_float = isinstance(v, numpy.ndarray) and numpy.issubdtype(v.dtype, numpy.floating)
         return list_of_float or tuple_of_float or ndarray_of_float
     
    +
     cdef is_list_tuple_ndarray_of_int(v):
         list_of_float = type(v) is list and type(v[0]) is int
         tuple_of_float = type(v) is tuple and type(v[0]) is int
    @@ -232,6 +238,7 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
                 raise AttributeError(f'when converting Python dictionary: value of key ({key}) is not a known type, got {type(value)}')
         return cdict
     
    +
     cdef object vec_of_dict_to_list(vector[dictionary] cvec):
         cdef tmp = []
         cdef vector[dictionary].iterator it = cvec.begin()
    @@ -240,6 +247,7 @@ cdef object vec_of_dict_to_list(vector[dictionary] cvec):
             inc(it)
         return tmp
     
    +
     cdef vector[dictionary] list_of_dict_to_vec(object pylist):
         cdef vector[dictionary] vec
         # PYNEST-NG: reserve the correct size and use index-based
    @@ -248,59 +256,59 @@ cdef vector[dictionary] list_of_dict_to_vec(object pylist):
             vec.push_back(pydict_to_dictionary(pydict))
         return vec
     
    +
     cdef vector[vector[double]] list_of_list_to_doublevec(object pylist):
         cdef vector[vector[double]] vec
         for val in pylist:
             vec.push_back(val)
         return vec
     
    +
     cdef vector[long] pylist_to_intvec(object pylist):
         cdef vector[long] vec
         for val in pylist:
             vec.push_back(val)
         return vec
     
    +
     cdef vector[double] pylist_or_ndarray_to_doublevec(object pylist):
         cdef vector[double] vec
         vec = pylist
         return vec
     
    +
     cdef vector[string] pylist_to_stringvec(object pylist):
         cdef vector[string] vec
         for val in pylist:
             vec.push_back(<string>pystr_to_string(val))
         return vec
     
    +
     cdef vector[dictionary] pylist_to_dictvec(object pylist):
         cdef vector[dictionary] vec
         for val in pylist:
             vec.push_back(pydict_to_dictionary(val))
         return vec
     
    +
     cdef object string_to_pystr(string s):
         return s.decode('utf-8')
     
    +
     cdef string pystr_to_string(object s):
         return s.encode('utf-8')
     
    -def catch_cpp_error(func):
    -    def wrapper_catch_cpp_error(*args, **kwargs):
    -        try:
    -            return func(*args, **kwargs)
    -        except RuntimeError as e:
    -            raise NESTErrors.NESTError(f'in {func.__name__}: {e}') from None
    -    return wrapper_catch_cpp_error
     
     def llapi_init_nest(argv):
         cdef int argc = len(argv)
         if argc <= 0:
    -        raise NESTErrors.PyNESTError("argv can't be empty")
    +        raise NotImplementedError
     
     
         # Create c-style argv arguments from sys.argv
         cdef char** argv_chars = <char**> malloc((argc+1) * sizeof(char*))
         if argv_chars is NULL:
    -        raise NESTErrors.PyNESTError("couldn't allocate argv_char")
    +        raise NotImplementedError
         try:
             # argv must be null terminated. openmpi depends on this
             argv_chars[argc] = NULL
    @@ -330,26 +338,27 @@ def llapi_init_nest(argv):
     
         return True
     
    +
     def llapi_reset_kernel():
         reset_kernel()
     
    -@catch_cpp_error
    +
     def llapi_get_verbosity():
         return severity_t(get_verbosity())
     
    -@catch_cpp_error
    +
     def llapi_set_verbosity(severity_t s):
         set_verbosity(s)
     
    -@catch_cpp_error
    +
     def llapi_enable_structural_plasticity():
         enable_structural_plasticity()
     
    -@catch_cpp_error
    +
     def llapi_disable_structural_plasticity():
         disable_structural_plasticity()
     
    -@catch_cpp_error
    +
     def llapi_create(model, long n):
         cdef NodeCollectionPTR gids
         gids = create(pystr_to_string(model), n)
    @@ -357,7 +366,7 @@ def llapi_create(model, long n):
         obj._set_nc(gids)
         return nest.NodeCollection(obj)
     
    -@catch_cpp_error
    +
     def llapi_create_spatial(object layer_params):
         cdef NodeCollectionPTR gids
         gids = create_spatial(pydict_to_dictionary(layer_params))
    @@ -365,7 +374,7 @@ def llapi_create_spatial(object layer_params):
         obj._set_nc(gids)
         return nest.NodeCollection(obj)
     
    -@catch_cpp_error
    +
     def llapi_get_position(NodeCollectionObject layer):
         cdef vector[vector[double]] result = get_position(layer.thisptr)
         if nc_size(layer.thisptr) == 1:
    @@ -373,7 +382,7 @@ def llapi_get_position(NodeCollectionObject layer):
         else:
             return result
     
    -@catch_cpp_error
    +
     def llapi_spatial_distance(object from_arg, to_arg):
         cdef vector[vector[double]] from_vec
         if isinstance(from_arg, nest.NodeCollection):
    @@ -384,7 +393,7 @@ def llapi_spatial_distance(object from_arg, to_arg):
         else:
             raise TypeError("from_arg must be either a NodeCollection or a list/tuple of positions")
     
    -@catch_cpp_error
    +
     def llapi_displacement(object from_arg, to_arg):
         cdef vector[vector[double]] from_vec
         if isinstance(from_arg, nest.NodeCollection):
    @@ -395,7 +404,7 @@ def llapi_displacement(object from_arg, to_arg):
         else:
             raise TypeError("from_arg must be either a NodeCollection or a list/tuple of positions")
     
    -@catch_cpp_error
    +
     def llapi_distance(object conn):  # PYNEST-NG: should there be a SynapseCollectionObject?
         cdef vector[ConnectionID] conn_vec
         for c in conn:
    @@ -410,7 +419,6 @@ def llapi_distance(object conn):  # PYNEST-NG: should there be a SynapseCollecti
     # and (aka intersect_mask)
     # sub (aka minus_mask)
     
    -@catch_cpp_error
     def llapi_make_nodecollection(object node_ids):
         cdef NodeCollectionPTR gids
         # node_ids list is automatically converted to an std::vector
    @@ -419,7 +427,7 @@ def llapi_make_nodecollection(object node_ids):
         obj._set_nc(gids)
         return nest.NodeCollection(obj)
     
    -@catch_cpp_error
    +
     def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params):
         conn_params = conn_params if conn_params is not None else {}
         synapse_params = synapse_params if synapse_params is not None else {}
    @@ -440,7 +448,7 @@ def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object co
                 pydict_to_dictionary(conn_params),
                 syn_param_vec)
     
    -@catch_cpp_error
    +
     def llapi_disconnect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params):
         conn_params = conn_params if conn_params is not None else {}
         synapse_params = synapse_params if synapse_params is not None else {}
    @@ -455,7 +463,7 @@ def llapi_disconnect(NodeCollectionObject pre, NodeCollectionObject post, object
                 pydict_to_dictionary(conn_params),
                 pydict_to_dictionary(synapse_params))
     
    -@catch_cpp_error
    +
     def llapi_disconnect_syncoll(object conns):
         cdef deque[ConnectionID] conn_deque
         cdef ConnectionObject conn_object
    @@ -464,12 +472,12 @@ def llapi_disconnect_syncoll(object conns):
     
         disconnect(conn_deque)
     
    -@catch_cpp_error
    +
     def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, object projections):
         print("### 9", projections)
         connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections))
     
    -@catch_cpp_error
    +
     def llapi_create_mask(object specs):
         cdef dictionary specs_dictionary = pydict_to_dictionary(specs)
         cdef MaskPTR mask
    @@ -478,26 +486,26 @@ def llapi_create_mask(object specs):
         obj._set_mask(mask)
         return nest.Mask(obj)
     
    -@catch_cpp_error
    +
     def llapi_select_nodes_by_mask(NodeCollectionObject layer, vector[double] anchor, MaskObject mask_datum):
         nodes = select_nodes_by_mask(layer.thisptr, anchor, mask_datum.thisptr)
         obj = NodeCollectionObject()
         obj._set_nc(nodes)
         return nest.NodeCollection(obj)
     
    -@catch_cpp_error
    +
     def llapi_inside_mask(vector[double] point, MaskObject mask):
         return inside(point, mask.thisptr)
     
    -@catch_cpp_error
    +
     def llapi_dump_layer_nodes(NodeCollectionObject layer, object filename):
         dump_layer_nodes(layer.thisptr, pystr_to_string(filename))
     
    -@catch_cpp_error
    +
     def llapi_dump_layer_connections(NodeCollectionObject source_layer, NodeCollectionObject target_layer, synapse_model, filename):
         dump_layer_connections(source_layer.thisptr, target_layer.thisptr, pystr_to_string(synapse_model), pystr_to_string(filename))
     
    -@catch_cpp_error
    +
     def llapi_slice(NodeCollectionObject nc, long start, long stop, long step):
         cdef NodeCollectionPTR nc_ptr
         nc_ptr = slice_nc(nc.thisptr, start, stop, step)
    @@ -505,31 +513,32 @@ def llapi_slice(NodeCollectionObject nc, long start, long stop, long step):
         obj._set_nc(nc_ptr)
         return nest.NodeCollection(obj)
     
    +
     def llapi_print_nodes():
         return string_to_pystr(print_nodes_to_string())
     
    -@catch_cpp_error
    +
     def llapi_nc_size(NodeCollectionObject nc):
         return nc_size(nc.thisptr)
     
    -@catch_cpp_error
    +
     def llapi_to_string(NodeCollectionObject nc):
         return string_to_pystr(pprint_to_string(nc.thisptr))
     
    -@catch_cpp_error
    +
     def llapi_get_kernel_status():
         cdef dictionary cdict = get_kernel_status()
         return dictionary_to_pydict(cdict)
     
    -@catch_cpp_error
    +
     def llapi_get_defaults(object model_name):
         return dictionary_to_pydict(get_model_defaults(pystr_to_string(model_name)))
     
    -@catch_cpp_error
    +
     def llapi_set_defaults(object model_name, object params):
         set_model_defaults(pystr_to_string(model_name), pydict_to_dictionary(params))
     
    -@catch_cpp_error
    +
     def llapi_get_nodes(object params, cbool local_only):
         cdef dictionary params_dict = pydict_to_dictionary(params)
         cdef NodeCollectionPTR nc_ptr = get_nodes(params_dict, local_only)
    @@ -537,33 +546,33 @@ def llapi_get_nodes(object params, cbool local_only):
         obj._set_nc(nc_ptr)
         return nest.NodeCollection(obj)
     
    -@catch_cpp_error
    +
     def llapi_set_kernel_status(object params):
         cdef dictionary params_dict = pydict_to_dictionary(params)
         set_kernel_status(params_dict)
     
    -@catch_cpp_error
    +
     def llapi_simulate(float t):
         simulate(t)
     
    -@catch_cpp_error
    +
     def llapi_prepare():
         prepare()
     
    -@catch_cpp_error
    +
     def llapi_run(float t):
         run(t)
     
    -@catch_cpp_error
    +
     def llapi_cleanup():
         cleanup()
     
    -@catch_cpp_error
    +
     def llapi_copy_model(oldmodname, newmodname, object params):
         cdef dictionary params_dict = pydict_to_dictionary(params)
         copy_model(pystr_to_string(oldmodname), pystr_to_string(newmodname), params_dict)
     
    -@catch_cpp_error
    +
     def llapi_get_nc_status(NodeCollectionObject nc, object key=None):
         cdef dictionary statuses = get_nc_status(nc.thisptr)
         if key is None:
    @@ -576,12 +585,12 @@ def llapi_get_nc_status(NodeCollectionObject nc, object key=None):
         else:
             raise TypeError(f'key must be a string, got {type(key)}')
     
    -@catch_cpp_error
    +
     def llapi_set_nc_status(NodeCollectionObject nc, object params_list):
         cdef vector[dictionary] params = list_of_dict_to_vec(params_list)
         set_nc_status(nc.thisptr, params)
     
    -@catch_cpp_error
    +
     def llapi_join_nc(NodeCollectionObject lhs, NodeCollectionObject rhs):
         cdef NodeCollectionPTR result
         # Using operator+() directly
    @@ -590,23 +599,23 @@ def llapi_join_nc(NodeCollectionObject lhs, NodeCollectionObject rhs):
         obj._set_nc(result)
         return nest.NodeCollection(obj)
     
    -@catch_cpp_error
    +
     def llapi_eq_nc(NodeCollectionObject lhs, NodeCollectionObject rhs):
         return equal(lhs.thisptr, rhs.thisptr)
     
    -@catch_cpp_error
    +
     def llapi_nc_contains(NodeCollectionObject nc, long node_id):
         return contains(nc.thisptr, node_id)
     
    -@catch_cpp_error
    +
     def llapi_nc_find(NodeCollectionObject nc, long node_id):
         return find(nc.thisptr, node_id)
     
    -@catch_cpp_error
    +
     def llapi_get_nc_metadata(NodeCollectionObject nc):
         return dictionary_to_pydict(get_metadata(nc.thisptr))
     
    -@catch_cpp_error
    +
     def llapi_take_array_index(NodeCollectionObject node_collection, object array):
         if not isinstance(array, numpy.ndarray):
             raise TypeError('array must be a 1-dimensional NumPy array of ints or bools, got {}'.format(type(array)))
    @@ -622,13 +631,13 @@ def llapi_take_array_index(NodeCollectionObject node_collection, object array):
     
         cdef NodeCollectionPTR new_nc_ptr
     
    -    if array.dtype == numpy.bool:
    +    if array.dtype == bool:
             # Boolean C-type arrays are not supported in NumPy, so we use an 8-bit integer array
             array_bool_mv = numpy.ascontiguousarray(array, dtype=numpy.uint8)
             array_bool_ptr = &array_bool_mv[0]
             new_nc_ptr = node_collection_array_index(node_collection.thisptr, array_bool_ptr, len(array))
         elif numpy.issubdtype(array.dtype, numpy.integer):
    -        array_long_mv = numpy.ascontiguousarray(array, dtype=numpy.long)
    +        array_long_mv = numpy.ascontiguousarray(array, dtype=int)
             array_long_ptr = &array_long_mv[0]
             new_nc_ptr = node_collection_array_index(node_collection.thisptr, array_long_ptr, len(array))
         else:
    @@ -637,7 +646,7 @@ def llapi_take_array_index(NodeCollectionObject node_collection, object array):
         obj._set_nc(new_nc_ptr)
         return nest.NodeCollection(obj)
     
    -@catch_cpp_error
    +
     def llapi_create_parameter(object specs):
         cdef dictionary specs_dictionary = pydict_to_dictionary(specs)
         cdef ParameterPTR parameter
    @@ -646,16 +655,15 @@ def llapi_create_parameter(object specs):
         obj._set_parameter(parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_get_param_value(ParameterObject parameter):
         return get_value(parameter.thisptr)
     
    -@catch_cpp_error
    +
     def llapi_param_is_spatial(ParameterObject parameter):
         return is_spatial(parameter.thisptr)
     
     
    -@catch_cpp_error
     def llapi_apply_parameter(ParameterObject parameter, object pos_or_nc):
         if type(pos_or_nc) is nest.NodeCollection:
             return tuple(apply(parameter.thisptr, (<NodeCollectionObject>(pos_or_nc._datum)).thisptr))
    @@ -663,7 +671,6 @@ def llapi_apply_parameter(ParameterObject parameter, object pos_or_nc):
             return tuple(apply(parameter.thisptr, pydict_to_dictionary(pos_or_nc)))
     
     
    -@catch_cpp_error
     def llapi_multiply_parameter(ParameterObject first, ParameterObject second):
         cdef ParameterPTR new_parameter
         new_parameter = multiply_parameter(first.thisptr, second.thisptr)
    @@ -671,7 +678,7 @@ def llapi_multiply_parameter(ParameterObject first, ParameterObject second):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_divide_parameter(ParameterObject first, ParameterObject second):
         cdef ParameterPTR new_parameter
         new_parameter = divide_parameter(first.thisptr, second.thisptr)
    @@ -679,7 +686,7 @@ def llapi_divide_parameter(ParameterObject first, ParameterObject second):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_add_parameter(ParameterObject first, ParameterObject second):
         cdef ParameterPTR new_parameter
         new_parameter = add_parameter(first.thisptr, second.thisptr)
    @@ -687,7 +694,7 @@ def llapi_add_parameter(ParameterObject first, ParameterObject second):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_subtract_parameter(ParameterObject first, ParameterObject second):
         cdef ParameterPTR new_parameter
         new_parameter = subtract_parameter(first.thisptr, second.thisptr)
    @@ -695,7 +702,7 @@ def llapi_subtract_parameter(ParameterObject first, ParameterObject second):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_compare_parameter(ParameterObject first, ParameterObject second, object pydict):
         cdef ParameterPTR new_parameter
         cdef dictionary cdict = pydict_to_dictionary(pydict)
    @@ -704,7 +711,7 @@ def llapi_compare_parameter(ParameterObject first, ParameterObject second, objec
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_conditional_parameter(ParameterObject condition, ParameterObject if_true, ParameterObject if_false):
         cdef ParameterPTR new_parameter
         new_parameter = conditional_parameter(condition.thisptr, if_true.thisptr, if_false.thisptr)
    @@ -712,7 +719,7 @@ def llapi_conditional_parameter(ParameterObject condition, ParameterObject if_tr
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_min_parameter(ParameterObject parameter, double other_value):
         cdef ParameterPTR new_parameter
         new_parameter = min_parameter(parameter.thisptr, other_value)
    @@ -720,7 +727,7 @@ def llapi_min_parameter(ParameterObject parameter, double other_value):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_max_parameter(ParameterObject parameter, double other_value):
         cdef ParameterPTR new_parameter
         new_parameter = max_parameter(parameter.thisptr, other_value)
    @@ -728,7 +735,7 @@ def llapi_max_parameter(ParameterObject parameter, double other_value):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_redraw_parameter(ParameterObject parameter, double min_value, double max_value):
         cdef ParameterPTR new_parameter
         new_parameter = redraw_parameter(parameter.thisptr, min_value, max_value)
    @@ -736,7 +743,7 @@ def llapi_redraw_parameter(ParameterObject parameter, double min_value, double m
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_exp_parameter(ParameterObject parameter):
         cdef ParameterPTR new_parameter
         new_parameter = exp_parameter(parameter.thisptr)
    @@ -744,7 +751,7 @@ def llapi_exp_parameter(ParameterObject parameter):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_sin_parameter(ParameterObject parameter):
         cdef ParameterPTR new_parameter
         new_parameter = sin_parameter(parameter.thisptr)
    @@ -752,7 +759,7 @@ def llapi_sin_parameter(ParameterObject parameter):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_cos_parameter(ParameterObject parameter):
         cdef ParameterPTR new_parameter
         new_parameter = cos_parameter(parameter.thisptr)
    @@ -760,7 +767,7 @@ def llapi_cos_parameter(ParameterObject parameter):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_pow_parameter(ParameterObject parameter, double exponent):
         cdef ParameterPTR new_parameter
         new_parameter = pow_parameter(parameter.thisptr, exponent)
    @@ -768,7 +775,7 @@ def llapi_pow_parameter(ParameterObject parameter, double exponent):
         obj._set_parameter(new_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_dimension_parameter(object list_of_pos_params):
         cdef ParameterPTR dim_parameter
         cdef ParameterObject x, y, z
    @@ -782,7 +789,7 @@ def llapi_dimension_parameter(object list_of_pos_params):
         obj._set_parameter(dim_parameter)
         return nest.Parameter(obj)
     
    -@catch_cpp_error
    +
     def llapi_get_connections(object params):
         cdef dictionary params_dictionary = pydict_to_dictionary(params)
         cdef deque[ConnectionID] connections
    @@ -799,7 +806,7 @@ def llapi_get_connections(object params):
     
         return nest.SynapseCollection(connections_list)
     
    -@catch_cpp_error
    +
     def llapi_get_connection_status(object conns):
         cdef vector[dictionary] connection_statuses
         # Convert the list of connections to a deque
    @@ -813,7 +820,6 @@ def llapi_get_connection_status(object conns):
         return vec_of_dict_to_list(connection_statuses)
     
     
    -@catch_cpp_error
     def llapi_set_connection_status(object conns, object params):
         # Convert the list of connections to a deque
         cdef deque[ConnectionID] conn_deque
    @@ -832,7 +838,6 @@ def llapi_set_connection_status(object conns, object params):
             raise TypeError('params must be a dict or a list of dicts')
     
     
    -@catch_cpp_error
     def ll_api_connect_arrays(sources, targets, weights, delays, synapse_model, syn_param_keys, syn_param_values):
         """Calls connect_arrays function, bypassing SLI to expose pointers to the NumPy arrays"""
     
    diff --git a/pynest/nestkernel_exceptions.h b/pynest/nestkernel_exceptions.h
    new file mode 100644
    index 0000000000..0dc616a5dd
    --- /dev/null
    +++ b/pynest/nestkernel_exceptions.h
    @@ -0,0 +1,72 @@
    +/*
    + *  nestkernel_exceptions.h
    + *
    + *  This file is part of NEST.
    + *
    + *  Copyright (C) 2004 The NEST Initiative
    + *
    + *  NEST is free software: you can redistribute it and/or modify
    + *  it under the terms of the GNU General Public License as published by
    + *  the Free Software Foundation, either version 2 of the License, or
    + *  (at your option) any later version.
    + *
    + *  NEST is distributed in the hope that it will be useful,
    + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    + *  GNU General Public License for more details.
    + *
    + *  You should have received a copy of the GNU General Public License
    + *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    + *
    + */
    +
    +#include <Python.h>
    +#include <ios>
    +#include <stdexcept>
    +
    +#include "exceptions.h"
    +//#include "exception_names.h // TODO: PyNEST-NG
    +
    +static struct PyModuleDef
    +  nest_module = { PyModuleDef_HEAD_INIT, "NESTError", nullptr, -1, nullptr, nullptr, nullptr, nullptr, nullptr };
    +PyObject* nest_error_module = PyModule_Create( &nest_module );
    +
    +std::map< std::string, PyObject* > nest_exceptions;
    +
    +void
    +create_exceptions()
    +{
    +
    +  std::vector< std::string > exception_names = { "UnknownModelName" };
    +  for ( auto name : exception_names )
    +  {
    +    PyObject* exception = PyErr_NewException( ( "NESTError." + name ).c_str(), nullptr, nullptr );
    +    nest_exceptions[ name ] = exception;
    +    Py_INCREF( exception );
    +    PyModule_AddObject( nest_error_module, name.c_str(), exception );
    +  }
    +}
    +
    +void
    +custom_exception_handler()
    +{
    +  try
    +  {
    +    if ( PyErr_Occurred() )
    +    {
    +      ; // let the latest Python exn pass through and ignore the current one
    +    }
    +    else
    +    {
    +      throw;
    +    }
    +  }
    +  catch ( nest::KernelException& exn )
    +  {
    +    PyErr_SetString( nest_exceptions[ exn.exception_name() ], exn.what() );
    +  }
    +  catch ( ... )
    +  {
    +    PyErr_SetString( PyExc_RuntimeError, "Unexpected C++ exception" );
    +  }
    +}
    
    From ecb9e3f9bc84436e5ba29625e1673b43f28c5a9a Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 19 Sep 2023 17:09:52 +0200
    Subject: [PATCH 173/375] Running isort
    
    ---
     examples/astrocyte_single.py                    | 1 -
     examples/astrocyte_tripartite.py                | 1 -
     examples/glif_psc_double_alpha_neuron.py        | 4 ++--
     testsuite/pytests/test_astrocyte.py             | 4 ++--
     testsuite/pytests/test_glif_psc_double_alpha.py | 1 +
     testsuite/pytests/test_sic_connection.py        | 4 +---
     6 files changed, 6 insertions(+), 9 deletions(-)
    
    diff --git a/examples/astrocyte_single.py b/examples/astrocyte_single.py
    index a74eef36e6..2cc8de3d9d 100644
    --- a/examples/astrocyte_single.py
    +++ b/examples/astrocyte_single.py
    @@ -60,7 +60,6 @@
     # Import all necessary modules for simulation and plotting.
     
     import matplotlib.pyplot as plt
    -
     import nest
     
     ###############################################################################
    diff --git a/examples/astrocyte_tripartite.py b/examples/astrocyte_tripartite.py
    index a522b0d6a8..bbdb5cfe9c 100644
    --- a/examples/astrocyte_tripartite.py
    +++ b/examples/astrocyte_tripartite.py
    @@ -73,7 +73,6 @@
     # Import all necessary modules for simulation and plotting.
     
     import matplotlib.pyplot as plt
    -
     import nest
     
     ###############################################################################
    diff --git a/examples/glif_psc_double_alpha_neuron.py b/examples/glif_psc_double_alpha_neuron.py
    index 44787f01e2..8939dc6a8c 100644
    --- a/examples/glif_psc_double_alpha_neuron.py
    +++ b/examples/glif_psc_double_alpha_neuron.py
    @@ -41,9 +41,9 @@
     # First, we import all necessary modules to simulate, analyze and plot this
     # example.
     
    -import nest
    -import matplotlib.pyplot as plt
     import matplotlib.gridspec as gridspec
    +import matplotlib.pyplot as plt
    +import nest
     
     ##############################################################################
     # We initialize NEST and set the simulation resolution.
    diff --git a/testsuite/pytests/test_astrocyte.py b/testsuite/pytests/test_astrocyte.py
    index a2bd3c0c56..3b0cacc44b 100644
    --- a/testsuite/pytests/test_astrocyte.py
    +++ b/testsuite/pytests/test_astrocyte.py
    @@ -33,10 +33,10 @@
     """
     
     import os
    -import numpy as np
    -import pytest
     
     import nest
    +import numpy as np
    +import pytest
     
     pytestmark = pytest.mark.skipif_missing_gsl
     path = os.path.abspath(os.path.dirname(__file__))
    diff --git a/testsuite/pytests/test_glif_psc_double_alpha.py b/testsuite/pytests/test_glif_psc_double_alpha.py
    index 3f4253e8dc..326155d8ac 100644
    --- a/testsuite/pytests/test_glif_psc_double_alpha.py
    +++ b/testsuite/pytests/test_glif_psc_double_alpha.py
    @@ -20,6 +20,7 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     import unittest
    +
     import nest
     
     try:
    diff --git a/testsuite/pytests/test_sic_connection.py b/testsuite/pytests/test_sic_connection.py
    index 0d470d0e83..1e6d69b7dc 100644
    --- a/testsuite/pytests/test_sic_connection.py
    +++ b/testsuite/pytests/test_sic_connection.py
    @@ -23,12 +23,10 @@
     Test functionality of the SIC connection
     """
     
    +import nest
     import numpy as np
     import pytest
     
    -import nest
    -
    -
     pytestmark = pytest.mark.skipif_missing_gsl
     
     
    
    From f807bf473fb6c88f26804d2cd72aed9e2e047d2a Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 17:12:56 +0200
    Subject: [PATCH 174/375] Run isort
    
    ---
     pynest/nestkernel_api.pyx | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 4c008c94e9..5d252c4ff3 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -35,6 +35,7 @@ from libcpp.vector cimport vector
     
     import nest
     import numpy
    +
     # cimport numpy
     
     #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
    
    From a5540dc7b20cb697a961b675dfec146c58c09e54 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 17:14:03 +0200
    Subject: [PATCH 175/375] Run black
    
    ---
     build_support/generate_modelsmodule.py | 4 +---
     1 file changed, 1 insertion(+), 3 deletions(-)
    
    diff --git a/build_support/generate_modelsmodule.py b/build_support/generate_modelsmodule.py
    index c85d79b9c1..0fd4287d76 100644
    --- a/build_support/generate_modelsmodule.py
    +++ b/build_support/generate_modelsmodule.py
    @@ -275,9 +275,7 @@ def generate_modelsmodule():
                         file.write(f'#include "{fname}"\n')
                     file.write(end_guard(guards))
     
    -        file.write(
    -            dedent("\nvoid\nnest::register_stuff()\n{\n")
    -        )
    +        file.write(dedent("\nvoid\nnest::register_stuff()\n{\n"))
     
             conn_reg = '  register_connection_model< {model} >( "{model}" );\n'
             node_reg = '  kernel().model_manager.register_node_model< {model} >( "{model}" );\n'
    
    From dfedf89b9c0734be0e03ea6c855e4a160e51d24b Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 18:53:57 +0200
    Subject: [PATCH 176/375] Fix setting of OpenMP variables
    
    ---
     CMakeLists.txt             |  1 -
     cmake/ProcessOptions.cmake | 13 ++++++++-----
     nestkernel/CMakeLists.txt  | 34 +++++++++++++++++-----------------
     pynest/CMakeLists.txt      |  1 +
     4 files changed, 26 insertions(+), 23 deletions(-)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index baacdd62f8..a536e44ab4 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -26,7 +26,6 @@ project( nest CXX C )
     
     set( CMAKE_CXX_STANDARD 20 )
     set( CMAKE_CXX_STANDARD_REQUIRED True )
    -find_package(OpenMP REQUIRED)
     
     set( NEST_USER_EMAIL "users@nest-simulator.org" )
     
    diff --git a/cmake/ProcessOptions.cmake b/cmake/ProcessOptions.cmake
    index 6ac7841a02..f0bf96da25 100644
    --- a/cmake/ProcessOptions.cmake
    +++ b/cmake/ProcessOptions.cmake
    @@ -424,18 +424,21 @@ function( NEST_PROCESS_WITH_OPENMP )
           set( OPENMP_FOUND ON )
           set( OpenMP_C_FLAGS "${with-openmp}" )
           set( OpenMP_CXX_FLAGS "${with-openmp}" )
    -    else ()
    -      find_package( OpenMP )
    -    endif ()
    -    if ( OPENMP_FOUND )
    +
           # export found variables to parent scope
           set( OPENMP_FOUND "${OPENMP_FOUND}" PARENT_SCOPE )
           set( OpenMP_C_FLAGS "${OpenMP_C_FLAGS}" PARENT_SCOPE )
           set( OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS}" PARENT_SCOPE )
    +      set( OpenMP_CXX_LINK_FLAGS "${OpenMP_CXX_LINK_FLAGS}" PARENT_SCOPE )
           # set flags
           set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" PARENT_SCOPE )
           set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" PARENT_SCOPE )
    -    else()
    +      set( CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} ${OpenMP_CXX_LINK_FLAGS}" PARENT_SCOPE )
    +    else ()
    +      find_package( OpenMP REQUIRED )
    +      set( AUTO_OPENMP_FOUND ON )
    +    endif ()
    +    if ( NOT OPENMP_FOUND )
           printError( "CMake can not find OpenMP." )
         endif ()
       endif ()
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index ae6b9d9cb5..93cc8d559f 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -116,36 +116,40 @@ set ( nestkernel_sources
     )
     
     
    -if(HAVE_SIONLIB)
    -  set(nestkernel_sources
    +if ( HAVE_SIONLIB )
    +  set( nestkernel_sources
         ${nestkernel_sources}
         recording_backend_sionlib.h recording_backend_sionlib.cpp
       )
    -endif()
    +endif ()
     
    -if(HAVE_MPI)
    +if ( HAVE_MPI )
       set(nestkernel_sources
         ${nestkernel_sources}
         recording_backend_mpi.h recording_backend_mpi.cpp
         stimulation_backend_mpi.h stimulation_backend_mpi.cpp
       )
    -endif()
    +endif ()
     
     # Prevent problems with Conda path substitution (see #2348)
    -set_source_files_properties(dynamicloader.cpp PROPERTIES COMPILE_OPTIONS "-O0")
    +set_source_files_properties( dynamicloader.cpp PROPERTIES COMPILE_OPTIONS "-O0" )
     
    -add_library(nestkernel STATIC ${nestkernel_sources})
    +add_library( nestkernel STATIC ${nestkernel_sources} )
     
    -if(APPLE)
    -  set_target_properties(nestkernel PROPERTIES LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup")
    -endif()
    +if ( APPLE )
    +  set_target_properties( nestkernel PROPERTIES LINK_FLAGS "-Wl,-undefined -Wl,dynamic_lookup" )
    +endif ()
     
    -set_target_properties(nestkernel PROPERTIES POSITION_INDEPENDENT_CODE ON)
    +set_target_properties( nestkernel PROPERTIES POSITION_INDEPENDENT_CODE ON )
     
     target_link_libraries( nestkernel
       nestutil models ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES} ${HDF5_LIBRARIES}
     )
     
    +if ( AUTO_OPENMP_FOUND )
    +  target_link_libraries( nestkernel PUBLIC OpenMP::OpenMP_CXX )
    +endif ()
    +
     target_include_directories( nestkernel PRIVATE
       ${PROJECT_SOURCE_DIR}/thirdparty
       ${PROJECT_SOURCE_DIR}/libnestutil
    @@ -155,11 +159,7 @@ target_include_directories( nestkernel PRIVATE
       ${PROJECT_SOURCE_DIR}/nestkernel/spatial
     )
     
    -FILTER_HEADERS("${nestkernel_sources}" install_headers)
    -install(FILES ${install_headers}
    +FILTER_HEADERS( "${nestkernel_sources}" install_headers )
    +install( FILES ${install_headers}
       DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/nest
     )
    -
    -
    -
    -
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 25612c72fa..a172283bf4 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -52,6 +52,7 @@ if ( HAVE_PYTHON )
     
       target_include_directories( nestkernel_api PRIVATE
         ${PROJECT_BINARY_DIR}/libnestutil
    +    ${PROJECT_BINARY_DIR}/pynest
         ${PROJECT_SOURCE_DIR}/libnestutil
         ${PROJECT_SOURCE_DIR}/pynest
         ${PROJECT_SOURCE_DIR}/nestkernel
    
    From 772b86217d46b27c8c13e06d96a65adba63d8557 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 18:54:42 +0200
    Subject: [PATCH 177/375] Exception handling
    
    ---
     pynest/generate_exception_header.py |  3 +--
     pynest/nestkernel_api.pyx           |  6 +++---
     pynest/nestkernel_exceptions.h      | 22 ++++++++++++++--------
     3 files changed, 18 insertions(+), 13 deletions(-)
    
    diff --git a/pynest/generate_exception_header.py b/pynest/generate_exception_header.py
    index 207f2ae982..5adae000c5 100644
    --- a/pynest/generate_exception_header.py
    +++ b/pynest/generate_exception_header.py
    @@ -77,11 +77,10 @@ def generate_exception_header():
         fname = Path(srcdir) / "nestkernel" / "exceptions.h"
         with open(fname, "r") as file:
             for line in file:
    -            print(line)
                 if line.strip().endswith(": public KernelException"):
                     exceptions.append(line.split()[1])
     
    -    fname = "nest_exception_list.h"
    +    fname = "nest_exception_names.h"
         pynestdir = Path(blddir) / "pynest"
         pynestdir.mkdir(parents=True, exist_ok=True)
         with open(pynestdir / fname, "w") as file:
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 5d252c4ff3..a8a6bd58d2 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -43,10 +43,10 @@ import numpy
     from libc.stdint cimport int64_t, uint64_t
     from libc.stdlib cimport free, malloc
     
    -NESTError = None
    +NESTErrors = None
     
     def init(args):
    -    global NESTError
    +    global NESTErrors
         cdef int argc = len(args)
     
         cdef char** c_argv = <char**>malloc(sizeof(char*) * argc)
    @@ -55,7 +55,7 @@ def init(args):
                 c_argv[idx] = s
             init_nest(&argc, &c_argv)
             create_exceptions()  # requires fully initialized NEST kernel
    -        NESTError = <object> nest_error_module
    +        NESTErrors = <object> nest_error_module
         finally:
             free(c_argv)
     
    diff --git a/pynest/nestkernel_exceptions.h b/pynest/nestkernel_exceptions.h
    index 0dc616a5dd..fcd06548df 100644
    --- a/pynest/nestkernel_exceptions.h
    +++ b/pynest/nestkernel_exceptions.h
    @@ -25,23 +25,29 @@
     #include <stdexcept>
     
     #include "exceptions.h"
    -//#include "exception_names.h // TODO: PyNEST-NG
    +#include "nest_exception_names.h"
     
     static struct PyModuleDef
    -  nest_module = { PyModuleDef_HEAD_INIT, "NESTError", nullptr, -1, nullptr, nullptr, nullptr, nullptr, nullptr };
    +  nest_module = { PyModuleDef_HEAD_INIT, "NESTErrors", nullptr, -1, nullptr, nullptr, nullptr, nullptr, nullptr };
     PyObject* nest_error_module = PyModule_Create( &nest_module );
     
    -std::map< std::string, PyObject* > nest_exceptions;
    +std::map< std::string, PyObject* > nest_exceptions_map;
     
     void
     create_exceptions()
     {
    +  std::string kernel_exn_name = "KernelException";
    +  PyObject* base_class = nullptr; // will be nullptr for KernelException
    +  nest_exceptions.insert( nest_exceptions.begin(), kernel_exn_name );
     
    -  std::vector< std::string > exception_names = { "UnknownModelName" };
    -  for ( auto name : exception_names )
    +  for ( auto name : nest_exceptions )
       {
    -    PyObject* exception = PyErr_NewException( ( "NESTError." + name ).c_str(), nullptr, nullptr );
    -    nest_exceptions[ name ] = exception;
    +    if ( name != kernel_exn_name )
    +    {
    +      base_class = nest_exceptions_map[ kernel_exn_name ];
    +    }
    +    PyObject* exception = PyErr_NewException( ( "NESTErrors." + name ).c_str(), base_class, nullptr );
    +    nest_exceptions_map[ name ] = exception;
         Py_INCREF( exception );
         PyModule_AddObject( nest_error_module, name.c_str(), exception );
       }
    @@ -63,7 +69,7 @@ custom_exception_handler()
       }
       catch ( nest::KernelException& exn )
       {
    -    PyErr_SetString( nest_exceptions[ exn.exception_name() ], exn.what() );
    +    PyErr_SetString( nest_exceptions_map[ exn.exception_name() ], exn.what() );
       }
       catch ( ... )
       {
    
    From 24b9c8475b408616259a016dbe4d3b48e0ee17ca Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 18:55:08 +0200
    Subject: [PATCH 178/375] Set NESTError and NESTErrors
    
    ---
     pynest/nest/__init__.py | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py
    index 012208a857..04fb6088ff 100644
    --- a/pynest/nest/__init__.py
    +++ b/pynest/nest/__init__.py
    @@ -83,7 +83,8 @@ class NestModule(types.ModuleType):
         from . import spatial_distributions  # noqa
         from .ll_api import set_communicator
     
    -    NESTError = ll_api.nestkernel.NESTError
    +    NESTErrors = ll_api.nestkernel.NESTErrors
    +    NESTError = ll_api.nestkernel.NESTErrors.KernelException
     
         def __init__(self, name):
             super().__init__(name)
    
    From 54a7ee291540cf9ca43cef408a835fe43d85c9db Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 18:55:20 +0200
    Subject: [PATCH 179/375] Fix f string
    
    ---
     pynest/nest/lib/hl_api_connection_helpers.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py
    index 54670fb0d3..0247d7e4a7 100644
    --- a/pynest/nest/lib/hl_api_connection_helpers.py
    +++ b/pynest/nest/lib/hl_api_connection_helpers.py
    @@ -166,7 +166,7 @@ def _process_spatial_projections(conn_spec, syn_spec):
         allowed_syn_spec_keys = ["weight", "delay", "synapse_model", "synapse_label", "receptor_type"]
         for key in conn_spec.keys():
             if key not in allowed_conn_spec_keys:
    -            raise ValueError("'{}' is not allowed in conn_spec when connecting with mask or kernel".format(key))
    +            raise ValueError(f"'{key}' is not allowed in conn_spec when connecting with mask or kernel")
     
         projections = {}
         projections.update(conn_spec)
    
    From d05b428653156dda1b3928a6c3c29d4be78a63bf Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 19 Sep 2023 18:55:32 +0200
    Subject: [PATCH 180/375] Remove sli_func
    
    ---
     pynest/nest/logic/hl_api_logic.py | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/pynest/nest/logic/hl_api_logic.py b/pynest/nest/logic/hl_api_logic.py
    index e1c3a1e363..210816b0cc 100644
    --- a/pynest/nest/logic/hl_api_logic.py
    +++ b/pynest/nest/logic/hl_api_logic.py
    @@ -21,7 +21,6 @@
     
     from .. import nestkernel_api as nestkernel
     from ..lib.hl_api_types import CreateParameter
    -from ..ll_api import sli_func
     
     __all__ = [
         "conditional",
    
    From 7ff37fbae5176cc3d53ac32f7d5d5f426d17240b Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 19 Sep 2023 23:18:14 +0200
    Subject: [PATCH 181/375] Remove dependencies on readline and ncurses
    
    ---
     CMakeLists.txt                             |  4 --
     cmake/ConfigureSummary.cmake               |  9 ---
     cmake/FindReadline.cmake                   | 72 ----------------------
     cmake/Platform/Fugaku_FCC.cmake            |  2 -
     cmake/Platform/JURON_Base.cmake            | 28 ++++-----
     cmake/ProcessOptions.cmake                 | 28 ---------
     doc/htmldoc/_ext/versions.json             | 22 +++----
     doc/htmldoc/installation/cmake_options.rst |  2 -
     doc/htmldoc/installation/hpc_install.rst   |  1 -
     doc/htmldoc/installation/noenv_install.rst |  4 --
     environment.yml                            |  1 -
     libnestutil/config.h.in                    |  3 -
     pynest/nest/ll_api.py                      |  6 --
     13 files changed, 20 insertions(+), 162 deletions(-)
     delete mode 100644 cmake/FindReadline.cmake
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index a536e44ab4..eac90146bc 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -62,7 +62,6 @@ set( with-music OFF CACHE STRING "Build with MUSIC [default=OFF]. Optionally giv
     set( with-sionlib OFF CACHE STRING "Build with SIONlib [default=OFF]. Optionally give the directory where sionlib is installed." )
     set( with-boost ON CACHE STRING "Build with Boost [default=ON]. To set a specific Boost installation, give the install path." )
     set( with-hdf5 OFF CACHE STRING "Find a HDF5 library. To set a specific HDF5 installation, set install path. [default=ON]" )
    -set( with-readline ON CACHE STRING "Build with GNU Readline library [default=ON]. To set a specific library, give the install path." )
     set( with-ltdl ON CACHE STRING "Build with ltdl library [default=ON]. To set a specific ltdl, give the  install path. NEST uses ltdl for dynamic loading of external user modules." )
     set( with-gsl ON CACHE STRING "Build with the GSL library [default=ON]. To set a specific library, give the install path." )
     
    @@ -143,7 +142,6 @@ nest_process_external_modules()
     nest_process_tics_per_ms()
     nest_process_tics_per_step()
     nest_process_with_libltdl()
    -nest_process_with_readline()
     nest_process_with_gsl()
     nest_process_with_openmp()
     nest_process_with_mpi()
    @@ -278,7 +276,6 @@ endforeach ()
     set( MODULE_LINK_LIBS
       "${OpenMP_CXX_FLAGS}"
       "${LTDL_LIBRARIES}"
    -  "${READLINE_LIBRARIES}"
       "${GSL_LIBRARIES}"
       "${LIBNEUROSIM_LIBRARIES}"
       "${MUSIC_LIBRARIES}"
    @@ -301,7 +298,6 @@ set( ALL_LIBS
     set( ALL_INCLUDES_tmp
       "${CMAKE_INSTALL_FULL_INCLUDEDIR}/nest"
       "${LTDL_INCLUDE_DIRS}"
    -  "${READLINE_INCLUDE_DIRS}"
       "${GSL_INCLUDE_DIRS}"
       "${LIBNEUROSIM_INCLUDE_DIRS}"
       "${MUSIC_INCLUDE_DIRS}"
    diff --git a/cmake/ConfigureSummary.cmake b/cmake/ConfigureSummary.cmake
    index 4be929e9d8..0fb6076b7c 100644
    --- a/cmake/ConfigureSummary.cmake
    +++ b/cmake/ConfigureSummary.cmake
    @@ -108,15 +108,6 @@ function( NEST_PRINT_CONFIG_SUMMARY )
         message( "Use GSL             : No" )
       endif ()
     
    -  message( "" )
    -  if ( HAVE_READLINE )
    -    message( "Use Readline        : Yes (GNU Readline ${READLINE_VERSION})" )
    -    message( "    Includes        : ${READLINE_INCLUDE_DIRS}" )
    -    message( "    Libraries       : ${READLINE_LIBRARIES}" )
    -  else ()
    -    message( "Use Readline        : No" )
    -  endif ()
    -
       message( "" )
       if ( HAVE_LIBLTDL )
         message( "Use libltdl         : Yes (LTDL ${LTDL_VERSION})" )
    diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake
    deleted file mode 100644
    index b3106c172d..0000000000
    --- a/cmake/FindReadline.cmake
    +++ /dev/null
    @@ -1,72 +0,0 @@
    -# FindReadline.cmake
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -# - Find GNU Readline header and library
    -#
    -# This module defines
    -#  READLINE_FOUND, if false, do not try to use GNU Readline.
    -#  READLINE_INCLUDE_DIRS, where to find readline/readline.h.
    -#  READLINE_LIBRARIES, the libraries to link against to use GNU Readline.
    -#  READLINE_VERSION, the library version
    -#
    -# As a hint allows READLINE_ROOT_DIR
    -
    -
    -find_path( READLINE_INCLUDE_DIR
    -    NAMES readline/readline.h
    -    HINTS ${READLINE_ROOT_DIR}/include
    -    NO_SYSTEM_ENVIRONMENT_PATH  # anaconda python tries to be first in path and hides a useful readline
    -    )
    -find_library( READLINE_LIBRARY
    -    NAMES readline
    -    HINTS ${READLINE_ROOT_DIR}/lib
    -    NO_SYSTEM_ENVIRONMENT_PATH  # anaconda python tries to be first in path and hides a useful readline
    -    )
    -find_library( NCURSES_LIBRARY       # readline depends on libncurses, or similar
    -    NAMES ncurses ncursesw curses termcap
    -    HINTS ${READLINE_ROOT_DIR}/lib
    -    )
    -
    -if ( EXISTS "${READLINE_INCLUDE_DIR}/readline/readline.h" )
    -  file( STRINGS "${READLINE_INCLUDE_DIR}/readline/readline.h" readline_h_content
    -                REGEX "#define RL_READLINE_VERSION" )
    -  string( REGEX REPLACE ".*0x([0-9][0-9])([0-9][0-9]).*" "\\1.\\2"
    -                        READLINE_VERSION ${readline_h_content} )
    -  string( REGEX REPLACE "^0" "" READLINE_VERSION ${READLINE_VERSION} )
    -  string( REPLACE ".0" "." READLINE_VERSION ${READLINE_VERSION} )
    -endif ()
    -
    -include( FindPackageHandleStandardArgs )
    -find_package_handle_standard_args( Readline
    -  FOUND_VAR
    -    READLINE_FOUND
    -  REQUIRED_VARS
    -    READLINE_LIBRARY
    -    NCURSES_LIBRARY
    -    READLINE_INCLUDE_DIR
    -  VERSION_VAR
    -    READLINE_VERSION
    -    )
    -
    -if ( READLINE_FOUND )
    -  set( READLINE_LIBRARIES "${READLINE_LIBRARY}" "${NCURSES_LIBRARY}" )
    -  set( READLINE_INCLUDE_DIRS "${READLINE_INCLUDE_DIR}" )
    -endif ()
    -
    -mark_as_advanced( READLINE_ROOT_DIR READLINE_INCLUDE_DIR READLINE_LIBRARY NCURSES_LIBRARY )
    diff --git a/cmake/Platform/Fugaku_FCC.cmake b/cmake/Platform/Fugaku_FCC.cmake
    index 3d3f9b84ca..c3f3ba6c69 100644
    --- a/cmake/Platform/Fugaku_FCC.cmake
    +++ b/cmake/Platform/Fugaku_FCC.cmake
    @@ -26,8 +26,6 @@ set( TRIPLET_VENDOR fujitsu )
     # Set Fugaku for main CMakeList.txt
     #
     set( Fugaku ON CACHE BOOL "Enable Fugaku." FORCE )
    -# no readline support on Fugaku
    -set( with-readline OFF CACHE BOOL "Find a readline library [default=ON]. To set a specific readline, set install path." FORCE )
     set( with-ltdl OFF CACHE BOOL "Find a ltdl library [default=ON]. To set a specific ltdl, set install path." FORCE )
     # we obviously want to do mpi on Fugaku
     set( with-mpi ON CACHE BOOL "Request compilation with MPI; optionally give directory with MPI installation." FORCE )
    diff --git a/cmake/Platform/JURON_Base.cmake b/cmake/Platform/JURON_Base.cmake
    index da13a8dbee..a5a590bee2 100644
    --- a/cmake/Platform/JURON_Base.cmake
    +++ b/cmake/Platform/JURON_Base.cmake
    @@ -2,23 +2,23 @@
     # Copyright 2000-2016 Kitware, Inc.
     # Copyright 2000-2011 Insight Software Consortium
     # All rights reserved.
    -# 
    +#
     # Redistribution and use in source and binary forms, with or without
     # modification, are permitted provided that the following conditions
     # are met:
    -# 
    +#
     # * Redistributions of source code must retain the above copyright
     #   notice, this list of conditions and the following disclaimer.
    -# 
    +#
     # * Redistributions in binary form must reproduce the above copyright
     #   notice, this list of conditions and the following disclaimer in the
     #   documentation and/or other materials provided with the distribution.
    -# 
    +#
     # * Neither the names of Kitware, Inc., the Insight Software Consortium,
     #   nor the names of their contributors may be used to endorse or promote
     #   products derived from this software without specific prior written
     #   permission.
    -# 
    +#
     # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    @@ -30,30 +30,30 @@
     # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    -# 
    +#
     # ------------------------------------------------------------------------------
    -# 
    +#
     # The above copyright and license notice applies to distributions of
     # CMake in source and binary form.  Some source files contain additional
     # notices of original copyright by their contributors; see each source
     # for details.  Third-party software packages supplied with CMake under
     # compatible licenses provide their own copyright notices documented in
     # corresponding subdirectories.
    -# 
    +#
     # ------------------------------------------------------------------------------
    -# 
    +#
     # CMake was initially developed by Kitware with the following sponsorship:
    -# 
    +#
     #  * National Library of Medicine at the National Institutes of Health
     #    as part of the Insight Segmentation and Registration Toolkit (ITK).
    -# 
    +#
     #  * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
     #    Visualization Initiative.
    -# 
    +#
     #  * National Alliance for Medical Image Computing (NAMIC) is funded by the
     #    National Institutes of Health through the NIH Roadmap for Medical Research,
     #    Grant U54 EB005149.
    -# 
    +#
     #  * Kitware, Inc.
     
     #
    @@ -62,8 +62,6 @@
     
     # Set enable-juron for main CMakeList.txt
     set( enable-juron "JURON" CACHE STRING "Configure for JURON." FORCE )
    -# no readline support on JURON
    -#set( with-readline OFF CACHE BOOL "Find a readline library [default=ON]. To set a specific readline, set install path." FORCE )
     
     #
     # Indicate that this is a unix-like system
    diff --git a/cmake/ProcessOptions.cmake b/cmake/ProcessOptions.cmake
    index f0bf96da25..ac31a022ad 100644
    --- a/cmake/ProcessOptions.cmake
    +++ b/cmake/ProcessOptions.cmake
    @@ -139,10 +139,6 @@ function( NEST_PROCESS_STATIC_LIBRARIES )
       # build static or shared libraries
       if ( static-libraries )
     
    -    if ( with-readline )
    -      printError( "-Dstatic-libraries=ON requires -Dwith-readline=OFF" )
    -    endif ()
    -
         set( BUILD_SHARED_LIBS OFF PARENT_SCOPE )
         # set RPATH stuff
         set( CMAKE_SKIP_RPATH TRUE PARENT_SCOPE )
    @@ -294,30 +290,6 @@ function( NEST_PROCESS_WITH_LIBLTDL )
       endif ()
     endfunction()
     
    -function( NEST_PROCESS_WITH_READLINE )
    -  # Find readline
    -  set( HAVE_READLINE OFF PARENT_SCOPE )
    -  if ( with-readline )
    -    if ( NOT ${with-readline} STREQUAL "ON" )
    -      # a path is set
    -      set( READLINE_ROOT_DIR "${with-readline}" )
    -    endif ()
    -
    -    find_package( Readline )
    -    if ( READLINE_FOUND )
    -      set( HAVE_READLINE ON PARENT_SCOPE )
    -      # export found variables to parent scope
    -      set( READLINE_FOUND "${READLINE_FOUND}" PARENT_SCOPE )
    -      set( READLINE_LIBRARIES "${READLINE_LIBRARIES}" PARENT_SCOPE )
    -      set( READLINE_INCLUDE_DIRS "${READLINE_INCLUDE_DIRS}" PARENT_SCOPE )
    -      set( READLINE_VERSION "${READLINE_VERSION}" PARENT_SCOPE )
    -
    -      include_directories( ${READLINE_INCLUDE_DIRS} )
    -      # is linked in sli/CMakeLists.txt
    -    endif ()
    -  endif ()
    -endfunction()
    -
     function( NEST_PROCESS_WITH_GSL )
       # Find GSL
       set( HAVE_GSL OFF PARENT_SCOPE )
    diff --git a/doc/htmldoc/_ext/versions.json b/doc/htmldoc/_ext/versions.json
    index b233087279..6ed1142aa5 100644
    --- a/doc/htmldoc/_ext/versions.json
    +++ b/doc/htmldoc/_ext/versions.json
    @@ -1,9 +1,9 @@
     {
    -	"python": 
    +	"python":
     	{
     		"min": 3.8
     	},
    -	"pip": 
    +	"pip":
     	{
     		"min": "20.3.3"
     	},
    @@ -12,11 +12,11 @@
     		"min": 3.12,
     		"max": 3.16
     	},
    -	"cython": 
    +	"cython":
     	{
     		"min": "0.28.3"
     	},
    -	"openmpi": 
    +	"openmpi":
     	{
     		"min": "4.0.3"
     	},
    @@ -26,19 +26,15 @@
     	"gsl": {
     		"min": 1.11
     	},
    -	"libtool": 
    +	"libtool":
     	{
     		"min": "2.4.6"
     	},
    -	"readline": 
    -	{
    -		"min": 8.0
    -	},
     	"numpy":
     	{
     		"min": "1.19.4"
     	},
    -	"scipy": 
    +	"scipy":
     	{
     		"min": "1.5.4"
     	},
    @@ -46,12 +42,8 @@
     	{
     		"min": 3.0
     	},
    -	"ipython": 
    +	"ipython":
     	{
     		"min": "5.8.0"
     	},
    -	"libncurses": 
    -	{
    -		"min": 6.2
    -	}
     }
    diff --git a/doc/htmldoc/installation/cmake_options.rst b/doc/htmldoc/installation/cmake_options.rst
    index 59123e9e61..be0d799c0f 100644
    --- a/doc/htmldoc/installation/cmake_options.rst
    +++ b/doc/htmldoc/installation/cmake_options.rst
    @@ -123,8 +123,6 @@ External libraries
     +-------------------------------------------------------+------------------------------------------------------------------------------------------------+
     | ``-Dwith-boost=[OFF|ON|</path/to/boost>]``            | Build with Boost [default=ON]. To set a specific Boost installation, give the install path.    |
     +-------------------------------------------------------+------------------------------------------------------------------------------------------------+
    -| ``-Dwith-readline=[OFF|ON|</path/to/readline>]``      | Build with GNU Readline library [default=ON]. To set a specific library, give the install path.|
    -+-------------------------------------------------------+------------------------------------------------------------------------------------------------+
     | ``-Dwith-ltdl=[OFF|ON|</path/to/ltdl>]``              | Build with ltdl library [default=ON]. To set a specific ltdl, give the  install path. NEST uses|
     |                                                       | ltdl for dynamic loading of external user modules.                                             |
     +-------------------------------------------------------+------------------------------------------------------------------------------------------------+
    diff --git a/doc/htmldoc/installation/hpc_install.rst b/doc/htmldoc/installation/hpc_install.rst
    index 49fbe20ee6..f27d04b241 100644
    --- a/doc/htmldoc/installation/hpc_install.rst
    +++ b/doc/htmldoc/installation/hpc_install.rst
    @@ -17,7 +17,6 @@ To configure NEST for compilation without external packages, use the following
         cmake -DCMAKE_INSTALL_PREFIX:PATH=<nest_install_dir> \
               -Dwith-python=OFF \
               -Dwith-gsl=OFF \
    -          -Dwith-readline=OFF \
               -Dwith-ltdl=OFF \
               -Dwith-openmp=OFF \
               </path/to/nest/source>
    diff --git a/doc/htmldoc/installation/noenv_install.rst b/doc/htmldoc/installation/noenv_install.rst
    index 941150c515..2b6088f6c0 100644
    --- a/doc/htmldoc/installation/noenv_install.rst
    +++ b/doc/htmldoc/installation/noenv_install.rst
    @@ -24,7 +24,6 @@ further adjust settings for your system.
         libgsl-dev \
         libboost-dev \
         cython3 \
    -    libreadline-dev \
         python3-all-dev \
         python3-numpy \
         python3-scipy \
    @@ -95,6 +94,3 @@ sourcing the script:
     .. code-block:: sh
     
        source <nest_install_dir>/bin/nest_vars.sh
    -
    -
    -
    diff --git a/environment.yml b/environment.yml
    index 7ac6b3e6cd..2866e786bd 100644
    --- a/environment.yml
    +++ b/environment.yml
    @@ -42,7 +42,6 @@ dependencies:
       - boost >= 1.69
       - gsl >= 1.11
       - libtool
    -  - readline
       - hdf5
     
       # Testing NEST ------------
    diff --git a/libnestutil/config.h.in b/libnestutil/config.h.in
    index 08b4251560..195b3048f6 100644
    --- a/libnestutil/config.h.in
    +++ b/libnestutil/config.h.in
    @@ -135,9 +135,6 @@
     /* define for ostream */
     #cmakedefine HAVE_OSTREAM 1
     
    -/* Use GNU libreadline */
    -#cmakedefine HAVE_READLINE 1
    -
     /* define if the compiler ignores symbolic signal names in signal.h */
     #cmakedefine HAVE_SIGUSR_IGNORED 1
     
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index c26625c106..08e7d71847 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -32,12 +32,6 @@
     import os
     import sys
     
    -# This is a workaround for readline import errors encountered with Anaconda
    -# Python running on Ubuntu, when invoked from the terminal
    -# "python -c 'import nest'"
    -if "linux" in sys.platform and "Anaconda" in sys.version:
    -    import readline  # noqa: F401
    -
     # This is a workaround to avoid segmentation faults when importing
     # scipy *after* nest. See https://github.com/numpy/numpy/issues/2521
     try:
    
    From 2eac8a7dd1f8e17724d360baa4a149742359f8dd Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 00:10:17 +0200
    Subject: [PATCH 182/375] Add connect_sonata
    
    ---
     pynest/nestkernel_api.pxd | 2 +-
     pynest/nestkernel_api.pyx | 4 ++++
     2 files changed, 5 insertions(+), 1 deletion(-)
    
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index c5ccab5498..0ae0c9240b 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -148,7 +148,7 @@ cdef extern from "nest.h" namespace "nest":
                      NodeCollectionPTR targets,
                      const dictionary& connectivity,
                      const vector[dictionary]& synapse_params ) except +custom_exception_handler
    -    void connect_sonata( const dictionary& graph_specs, const long chunk_size ) except +custom_exception_handler
    +    void connect_sonata( const dictionary& graph_specs, const long hyperslab_size ) except +custom_exception_handler
         void disconnect(NodeCollectionPTR sources,
                      NodeCollectionPTR targets,
                      const dictionary& connectivity,
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 94cbaa62a9..4853da32f9 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -478,6 +478,10 @@ def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, ob
         connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections))
     
     
    +def llapi_connect_sonata(object graph_specs, long chunk_size):
    +    connect_sonata(pydict_to_dictionary(graph_specs), chunk_size)
    +
    +
     def llapi_create_mask(object specs):
         cdef dictionary specs_dictionary = pydict_to_dictionary(specs)
         cdef MaskPTR mask
    
    From ab9b5ab8ff9487599b58a680b290713540a9ffbd Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 14:02:58 +0200
    Subject: [PATCH 183/375] WIP [skip ci]
    
    ---
     cmake/ConfigureSummary.cmake     |  9 ---------
     pynest/CMakeLists.txt            | 10 +---------
     pynest/nest/lib/hl_api_sonata.py |  6 ++----
     pynest/nestkernel_api.pyx        |  5 +++--
     4 files changed, 6 insertions(+), 24 deletions(-)
    
    diff --git a/cmake/ConfigureSummary.cmake b/cmake/ConfigureSummary.cmake
    index 0d7f95c838..2b1fb9b305 100644
    --- a/cmake/ConfigureSummary.cmake
    +++ b/cmake/ConfigureSummary.cmake
    @@ -236,15 +236,6 @@ function(NEST_PRINT_CONFIG_SUMMARY)
         message("Use SIONlib         : No")
       endif()
     
    -  if(HAVE_HDF5)
    -    message("Use SONATA          : Yes (HDF5 ${HDF5_VERSION})")
    -    message("    Includes        : ${HDF5_INCLUDE_DIR}")
    -    message("    Libraries       : ${HDF5_LIBRARIES}")
    -    message("")
    -  else()
    -    message("Use SONATA          : No")
    -  endif()
    -
       if(with-libraries)
         message("")
         message("Additional libraries:")
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 6713cf5d5e..a172283bf4 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -17,14 +17,7 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -if(HAVE_PYTHON)
    -  if(CYTHON_FOUND)
    -    include(UseCython)
    -    set_source_files_properties(nestkernel_api.pyx PROPERTIES CYTHON_IS_CXX TRUE)
    -    cython_add_module(nestkernel_api nestkernel_api.pyx)
    -  else()
    -    message(FATAL_ERROR "Building PyNEST requires Cython.")
    -  endif()
    +if ( HAVE_PYTHON )
     
       # We use python3 here directly, as some of the CI jobs don't seem to have PYTHON
       # or Python_EXECUTABLE set properly.
    @@ -77,7 +70,6 @@ if(HAVE_PYTHON)
         DESTINATION ${CMAKE_INSTALL_PREFIX}/${PYEXECDIR}/nest
         PATTERN "versionchecker.py.in" EXCLUDE
       )
    -endif()
     
       install( TARGETS nestkernel_api DESTINATION ${PYEXECDIR}/nest/ )
     endif ()
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index a4a8d28215..76a09f3a2f 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -36,8 +36,6 @@
     from .hl_api_nodes import Create
     from .hl_api_simulation import GetKernelStatus, SetKernelStatus, Simulate
     from .hl_api_types import NodeCollection
    -from .hl_api_exceptions import NESTError
    -
     
     try:
         import pandas as pd
    @@ -437,7 +435,7 @@ def Connect(self, hdf5_hyperslab_size=None):
                 except BlockingIOError as err:
                     raise BlockingIOError(f"{err.strerror} for {os.path.realpath(d['edges_file'])}") from None
     
    -        nestkernel.llapi_connect_sonata(graph_specs, chunk_size)
    +        nestkernel.llapi_connect_sonata(graph_specs, hdf5_hyperslab_size)
     
             self._is_network_built = True
     
    @@ -615,7 +613,7 @@ def BuildNetwork(self, hdf5_hyperslab_size=None):
             """
     
             if hdf5_hyperslab_size is not None:
    -            # Chunk size is verfified in Connect, but we also verify here
    +            # hyperslab size is verfified in Connect, but we also verify here
                 # to save computational resources in case of wrong input
                 self._verify_hyperslab_size(hdf5_hyperslab_size)
     
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 4853da32f9..10fbe933fb 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -478,8 +478,9 @@ def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, ob
         connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections))
     
     
    -def llapi_connect_sonata(object graph_specs, long chunk_size):
    -    connect_sonata(pydict_to_dictionary(graph_specs), chunk_size)
    +def llapi_connect_sonata(object graph_specs, long hyperslab_size):
    +    dd = pydict_to_dictionary(graph_specs)
    +    #connect_sonata(pydict_to_dictionary(graph_specs), hyperslab_size)
     
     
     def llapi_create_mask(object specs):
    
    From 9ef7b58476fb7c76c60e80cbe187706c4aba3750 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Wed, 20 Sep 2023 14:04:42 +0200
    Subject: [PATCH 184/375] Simplify and generalize OpenMP detection and usage
    
    ---
     CMakeLists.txt               |  2 +-
     cmake/ConfigureSummary.cmake |  6 ++++--
     cmake/FindSIONlib.cmake      |  4 ++--
     cmake/ProcessOptions.cmake   | 41 ++++++++++--------------------------
     nestkernel/CMakeLists.txt    |  4 ----
     5 files changed, 18 insertions(+), 39 deletions(-)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index eac90146bc..9cd695eb89 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -54,7 +54,7 @@ option( cythonize-pynest "Use Cython to cythonize pynestkernel.pyx [default=ON].
     
     # select parallelization scheme
     set( with-mpi OFF CACHE STRING "Build with MPI parallelization [default=OFF]." )
    -set( with-openmp ON CACHE BOOL "Build with OpenMP multi-threading [default=ON]. Optionally set OMP compiler flags." )
    +set( with-openmp ON CACHE BOOL "Build with OpenMP multi-threading [default=ON]." )
     
     # external libraries
     set( with-libneurosim OFF CACHE STRING "Build with libneurosim [default=OFF]. Optionally give the directory where libneurosim is installed." )
    diff --git a/cmake/ConfigureSummary.cmake b/cmake/ConfigureSummary.cmake
    index 0fb6076b7c..6053fb636a 100644
    --- a/cmake/ConfigureSummary.cmake
    +++ b/cmake/ConfigureSummary.cmake
    @@ -93,8 +93,10 @@ function( NEST_PRINT_CONFIG_SUMMARY )
       endif ()
     
       message( "" )
    -  if ( OPENMP_FOUND )
    -    message( "Use threading       : Yes (OpenMP: ${OpenMP_CXX_FLAGS})" )
    +  if ( OpenMP_FOUND )
    +    message( "Use threading       : Yes (OpenMP ${OpenMP_VERSION})" )
    +    message( "    Compile flags   : ${OpenMP_CXX_FLAGS}" )
    +    message( "    Link flags      : ${OpenMP_CXX_LIBRARIES} ${OpenMP_CXX_LIBRARY}" )
       else ()
         message( "Use threading       : No" )
       endif ()
    diff --git a/cmake/FindSIONlib.cmake b/cmake/FindSIONlib.cmake
    index 6bc0fa3415..23dbdf35a0 100644
    --- a/cmake/FindSIONlib.cmake
    +++ b/cmake/FindSIONlib.cmake
    @@ -57,9 +57,9 @@ if ( NOT SIONLIB_CONFIG STREQUAL "SIONLIB_CONFIG-NOTFOUND" )
       # get arguments for sionconfig --cflags and --libs
       set( CONF_FLAGS "--cxx" ) # we use cxx
       # find parallelization
    -  if ( OPENMP_FOUND AND MPI_CXX_FOUND )
    +  if ( OpenMP_FOUND AND MPI_CXX_FOUND )
         set( CONF_FLAGS ${CONF_FLAGS} "--ompi" )
    -  elseif ( OPENMP_FOUND )
    +  elseif ( OpenMP_FOUND )
         set( CONF_FLAGS ${CONF_FLAGS} "--omp" )
       elseif ( MPI_CXX_FOUND )
         set( CONF_FLAGS ${CONF_FLAGS} "--mpi" )
    diff --git a/cmake/ProcessOptions.cmake b/cmake/ProcessOptions.cmake
    index ac31a022ad..311941e25d 100644
    --- a/cmake/ProcessOptions.cmake
    +++ b/cmake/ProcessOptions.cmake
    @@ -390,37 +390,18 @@ endfunction()
     function( NEST_PROCESS_WITH_OPENMP )
       # Find OPENMP
       if ( with-openmp )
    -    if ( NOT "${with-openmp}" STREQUAL "ON" )
    -      printInfo( "Set OpenMP argument: ${with-openmp}")
    -      # set variables in this scope
    -      set( OPENMP_FOUND ON )
    -      set( OpenMP_C_FLAGS "${with-openmp}" )
    -      set( OpenMP_CXX_FLAGS "${with-openmp}" )
    -
    -      # export found variables to parent scope
    -      set( OPENMP_FOUND "${OPENMP_FOUND}" PARENT_SCOPE )
    -      set( OpenMP_C_FLAGS "${OpenMP_C_FLAGS}" PARENT_SCOPE )
    -      set( OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS}" PARENT_SCOPE )
    -      set( OpenMP_CXX_LINK_FLAGS "${OpenMP_CXX_LINK_FLAGS}" PARENT_SCOPE )
    -      # set flags
    -      set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" PARENT_SCOPE )
    -      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" PARENT_SCOPE )
    -      set( CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} ${OpenMP_CXX_LINK_FLAGS}" PARENT_SCOPE )
    -    else ()
    -      find_package( OpenMP REQUIRED )
    -      set( AUTO_OPENMP_FOUND ON )
    -    endif ()
    -    if ( NOT OPENMP_FOUND )
    -      printError( "CMake can not find OpenMP." )
    -    endif ()
    +    find_package( OpenMP REQUIRED )
    +    set( OpenMP_FOUND ON PARENT_SCOPE )
    +    set( OpenMP_VERSION ${OpenMP_CXX_VERSION} PARENT_SCOPE )
    +    set( OpenMP_CXX_FLAGS ${OpenMP_CXX_FLAGS} PARENT_SCOPE )
    +    set( OpenMP_CXX_LIBRARIES ${OpenMP_CXX_LIBRARIES} PARENT_SCOPE )
    +    set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" PARENT_SCOPE )
    +    foreach ( lib ${OpenMP_CXX_LIBRARIES} )
    +      link_libraries( "${lib}" )
    +    endforeach ()
    +  else ()
    +    set( OpenMP_FOUND OFF PARENT_SCOPE )
       endif ()
    -
    -  # Provide a dummy OpenMP::OpenMP_CXX if no OpenMP or if flags explicitly
    -  # given. Needed to avoid problems where OpenMP::OpenMP_CXX is used.
    -  if ( NOT TARGET OpenMP::OpenMP_CXX )
    -    add_library(OpenMP::OpenMP_CXX INTERFACE IMPORTED)
    -  endif()
    -
     endfunction()
     
     function( NEST_PROCESS_WITH_MPI )
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index 93cc8d559f..9e00cddf09 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -146,10 +146,6 @@ target_link_libraries( nestkernel
       nestutil models ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES} ${HDF5_LIBRARIES}
     )
     
    -if ( AUTO_OPENMP_FOUND )
    -  target_link_libraries( nestkernel PUBLIC OpenMP::OpenMP_CXX )
    -endif ()
    -
     target_include_directories( nestkernel PRIVATE
       ${PROJECT_SOURCE_DIR}/thirdparty
       ${PROJECT_SOURCE_DIR}/libnestutil
    
    From 5173fad4babeddbc20a456485c4f891a73ad43c6 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 17:05:57 +0200
    Subject: [PATCH 185/375] Cast edge_type_id key to str for compliance with
     kernel dict
    
    ---
     pynest/nest/lib/hl_api_sonata.py | 4 +++-
     pynest/nestkernel_api.pyx        | 3 +--
     2 files changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index 76a09f3a2f..f3e20bf420 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -515,6 +515,9 @@ def _create_edges_maps(self):
                     inplace=True,
                 )
     
    +            # Cast edge type ids from int to str, needed for kernel dictionary
    +            edges_df["edge_type_id"] = edges_df["edge_type_id"].astype("string")
    +
                 edges_df_cols = set(edges_df.columns)
     
                 # If 'dynamics_params' is specified, additional synapse
    @@ -558,7 +561,6 @@ def _create_edges_maps(self):
                     # must iterate each row in the CSV table. For each row,
                     # we extract the syn_spec associated with the specified model
     
    -                # TODO: new dictionary class requires cast edge_type_id key to str
                     syn_specs = {}
                     idx_map = {k: i for i, k in enumerate(list(edges_df), start=1)}
     
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 10fbe933fb..2a108a5754 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -479,8 +479,7 @@ def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, ob
     
     
     def llapi_connect_sonata(object graph_specs, long hyperslab_size):
    -    dd = pydict_to_dictionary(graph_specs)
    -    #connect_sonata(pydict_to_dictionary(graph_specs), hyperslab_size)
    +    connect_sonata(pydict_to_dictionary(graph_specs), hyperslab_size)
     
     
     def llapi_create_mask(object specs):
    
    From 1b3e1d0fa2a666dde0fe2c45af90283881258c80 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 17:06:16 +0200
    Subject: [PATCH 186/375] Update paths
    
    ---
     testsuite/pytests/test_sonata.py | 7 ++++---
     1 file changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/testsuite/pytests/test_sonata.py b/testsuite/pytests/test_sonata.py
    index 7497c64a74..fd4e876982 100644
    --- a/testsuite/pytests/test_sonata.py
    +++ b/testsuite/pytests/test_sonata.py
    @@ -22,6 +22,7 @@
     from pathlib import Path
     
     import nest
    +import numpy as np
     import pytest
     
     # Skip all tests in this module if no HDF5 or OpenMP threads
    @@ -32,7 +33,7 @@
     #   while the data is in $INSTALLDIR/share/doc/nest/examples/pynest/sonata_example.
     # - When running from the source dir, this file is in $SOURCEDIR/testsuite/pytests,
     #   while the data is in $SOURCEDIR/pynest/examples/sonata_example.
    -for relpath in ["../../../doc/nest/examples/pynest", "../../pynest/examples"]:
    +for relpath in ["../../../doc/nest/examples/pynest", "../../examples"]:
         sonata_path = Path(__file__).parent / relpath / "sonata_example" / "300_pointneurons"
         config = sonata_path / "circuit_config.json"
         sim_config = sonata_path / "simulation_config.json"
    @@ -45,7 +46,7 @@
     
     EXPECTED_NUM_NODES = 400  # 300 'internal' + 100 'external'
     EXPECTED_NUM_CONNECTIONS = 48432
    -EXPECTED_NUM_SPIKES = 18828
    +EXPECTED_NUM_SPIKES = 18788  # PYNEST-NG: SLI-NEST expected 18828 spikes, PYNEST-NG gives different number of spikes
     
     # Meaning of hyperslab sizes for 300_pointneurons model:
     # 2**10=1024 : Edge HDF5 files will be read in hyperslabs (chunks)
    @@ -76,5 +77,5 @@ def test_SonataNetwork(num_threads, hyperslab_size):
         nest.Connect(node_collections["internal"], srec)
         sonata_net.Simulate()
         spike_data = srec.events
    -    post_times = spike_data["times"]
    +    post_times = np.array(spike_data["times"])
         assert post_times.size == EXPECTED_NUM_SPIKES
    
    From 70daa872729da5e537b5c2bb415ebd357fdef2ed Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 18:35:52 +0200
    Subject: [PATCH 187/375] Turn dict access checks on again and add notes
    
    ---
     libnestutil/dictionary_access_flag_manager.cpp | 5 +----
     libnestutil/dictionary_access_flag_manager.h   | 6 ++----
     2 files changed, 3 insertions(+), 8 deletions(-)
    
    diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp
    index 5c86f27011..5a6a0211a9 100644
    --- a/libnestutil/dictionary_access_flag_manager.cpp
    +++ b/libnestutil/dictionary_access_flag_manager.cpp
    @@ -35,7 +35,6 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
       const std::string where,
       const std::string what ) const
     {
    -  /*
       // Vector of elements in the dictionary that are not accessed
       std::vector< dictionary::value_type > not_accessed_kv_pairs;
     
    @@ -54,12 +53,10 @@ DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
     
         throw nest::UnaccessedDictionaryEntry( what, where, missed );
       }
    -  */
     }
     
     bool
     DictionaryAccessFlagManager::accessed( const dictionary& dict, const key_type_& key ) const
     {
    -  // return access_flags_.at( &dict ).count( key ) > 0;
    -  return true;
    +  return access_flags_.at( &dict ).count( key ) > 0;
     }
    diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h
    index c5e91fe505..f5a40c8660 100644
    --- a/libnestutil/dictionary_access_flag_manager.h
    +++ b/libnestutil/dictionary_access_flag_manager.h
    @@ -73,23 +73,21 @@ class DictionaryAccessFlagManager
     inline void
     DictionaryAccessFlagManager::init_access_flags( const dictionary& dict )
     {
    -  /*
    +  // TODO PYNEST-NG: Possible performance bottleneck
     #pragma omp critical( init_access_flags )
       {
         access_flags_[ &dict ] = {};
       }
    -  */
     }
     
     inline void
     DictionaryAccessFlagManager::register_access( const dictionary& dict, const key_type_& key )
     {
    -  /*
    +  // TODO PYNEST-NG: Possible performance bottleneck
     #pragma omp critical( register_access )
       {
         access_flags_[ &dict ].insert( key );
       }
    -  */
     }
     
     #endif // DICTIONARY_ACCESS_FLAG_MANAGER_H
    
    From 81225f483fa85a8383ae9f0680de70c7bb7016dc Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 18:36:37 +0200
    Subject: [PATCH 188/375] Revert CMakeLists to upstream
    
    ---
     CMakeLists.txt | 259 ++++++++++++++++++++++++-------------------------
     1 file changed, 125 insertions(+), 134 deletions(-)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index f28cf2aa1b..9cd695eb89 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -20,7 +20,7 @@
     cmake_minimum_required( VERSION 3.19 )
     
     # add cmake modules: for all `include(...)` first look here
    -list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
    +list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
     
     project( nest CXX C )
     
    @@ -29,7 +29,7 @@ set( CMAKE_CXX_STANDARD_REQUIRED True )
     
     set( NEST_USER_EMAIL "users@nest-simulator.org" )
     
    -include(ColorMessages)
    +include( ColorMessages )
     
     # check if the given CMAKE_INSTALL_PREFIX is not empty
     if("${CMAKE_INSTALL_PREFIX}" STREQUAL "")
    @@ -37,20 +37,20 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "")
     endif()
     
     # handle relative installation prefixes
    -if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
    -  # convert relative path to absolute path
    -  get_filename_component(absPath ${CMAKE_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
    -  set(CMAKE_INSTALL_PREFIX ${absPath})
    -  printInfo("Relative CMAKE_INSTALL_PREFIX has been converted to absolute path ${CMAKE_INSTALL_PREFIX}")
    +if( NOT IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
    +    # convert relative path to absolute path
    +    get_filename_component(absPath ${CMAKE_INSTALL_PREFIX} ABSOLUTE BASE_DIR ${CMAKE_BINARY_DIR})
    +    set(CMAKE_INSTALL_PREFIX ${absPath})
    +    printInfo("Relative CMAKE_INSTALL_PREFIX has been converted to absolute path ${CMAKE_INSTALL_PREFIX}")
     endif()
     
    -# ###############################################################################
    -# #################         All User Defined options           ##################
    -# ###############################################################################
    +################################################################################
    +##################         All User Defined options           ##################
    +################################################################################
     
     # use Python to build PyNEST
    -set(with-python ON CACHE STRING "Build PyNEST [default=ON].")
    -option(cythonize-pynest "Use Cython to cythonize pynestkernel.pyx [default=ON]. If OFF, PyNEST has to be build from a pre-cythonized pynestkernel.pyx." ON)
    +set( with-python ON CACHE STRING "Build PyNEST [default=ON]." )
    +option( cythonize-pynest "Use Cython to cythonize pynestkernel.pyx [default=ON]. If OFF, PyNEST has to be build from a pre-cythonized pynestkernel.pyx." ON )
     
     # select parallelization scheme
     set( with-mpi OFF CACHE STRING "Build with MPI parallelization [default=OFF]." )
    @@ -85,8 +85,8 @@ set( with-includes OFF CACHE STRING "Add additional include paths [default=OFF].
     set( with-defines OFF CACHE STRING "Additional defines, e.g. '-DXYZ=1' [default=OFF]. Separate multiple defines by ';'." )
     
     # documentation build configuration
    -set(with-userdoc OFF CACHE STRING "Build user documentation [default=OFF]")
    -set(with-devdoc OFF CACHE STRING "Build developer documentation [default=OFF]")
    +set( with-userdoc OFF CACHE STRING "Build user documentation [default=OFF]")
    +set( with-devdoc OFF CACHE STRING "Build developer documentation [default=OFF]")
     
     set( with-full-logging OFF CACHE STRING "Write debug output to 'dump_<num_ranks>_<rank>.log' file [default=OFF]")
     
    @@ -98,38 +98,39 @@ set( with-full-logging OFF CACHE STRING "Write debug output to 'dump_<num_ranks>
     # GNUInstallDirs (included after calling nest_process_with_python()), but the
     # CMAKE_INSTALL_DATADIR is usually just CMAKE_INSTALL_DATAROOTDIR
     # and we want it to be CMAKE_INSTALL_DATAROOTDIR/PROJECT_NAME
    -set(CMAKE_INSTALL_DATADIR "share/${PROJECT_NAME}" CACHE STRING "Relative directory, where NEST installs its data (share/nest)")
    +set( CMAKE_INSTALL_DATADIR "share/${PROJECT_NAME}" CACHE STRING "Relative directory, where NEST installs its data (share/nest)" )
     
    -# ###############################################################################
    -# #################           Find utility programs            ##################
    -# ###############################################################################
    -find_program(SED NAMES sed gsed)
    +################################################################################
    +##################           Find utility programs            ##################
    +################################################################################
     
    -# ###############################################################################
    -# #################                Load includes               ##################
    -# ###############################################################################
    +find_program( SED NAMES sed gsed )
    +
    +################################################################################
    +##################                Load includes               ##################
    +################################################################################
     
     # This include checks the symbols, etc.
    -include(CheckIncludesSymbols)
    +include( CheckIncludesSymbols )
     
     # These includes publish function names.
    -include(ProcessOptions)
    -include(WriteStaticModules_h)
    -include(CheckExtraCompilerFeatures)
    -include(ConfigureSummary)
    -include(GetTriple)
    +include( ProcessOptions )
    +include( WriteStaticModules_h )
    +include( CheckExtraCompilerFeatures )
    +include( ConfigureSummary )
    +include( GetTriple )
     
     # get triples arch-vendor-os
    -get_host_triple(NEST_HOST_TRIPLE NEST_HOST_ARCH NEST_HOST_VENDOR NEST_HOST_OS)
    -get_target_triple(NEST_TARGET_TRIPLE NEST_TARGET_ARCH NEST_TARGET_VENDOR NEST_TARGET_OS)
    +get_host_triple( NEST_HOST_TRIPLE NEST_HOST_ARCH NEST_HOST_VENDOR NEST_HOST_OS )
    +get_target_triple( NEST_TARGET_TRIPLE NEST_TARGET_ARCH NEST_TARGET_VENDOR NEST_TARGET_OS )
     
     # Process the command line arguments
     # IMPORTANT: Do not change the order of nest_process_with_python() and include( GNUInstallDirs )!
    -# If NEST is built with Python, nest_process_with_python() defaults CMAKE_INSTALL_PREFIX
    -# to the active virtual Python environment. This effects the inclusion
    -# of GNUInstallDirs defining CMAKE_INSTALL_<dir> and CMAKE_INSTALL_FULL_<dir>.
    +#            If NEST is built with Python, nest_process_with_python() defaults CMAKE_INSTALL_PREFIX
    +#            to the active virtual Python environment. This effects the inclusion
    +#            of GNUInstallDirs defining CMAKE_INSTALL_<dir> and CMAKE_INSTALL_FULL_<dir>.
     nest_process_with_python()
    -include(GNUInstallDirs)
    +include( GNUInstallDirs )
     nest_post_process_with_python()
     nest_process_with_intel_compiler_flags()
     nest_process_with_warning()
    @@ -166,8 +167,8 @@ nest_process_with_optimize()
     nest_process_with_debug()
     
     nest_get_color_flags()
    -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NEST_C_COLOR_FLAGS}")
    -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NEST_CXX_COLOR_FLAGS}")
    +set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NEST_C_COLOR_FLAGS}" )
    +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NEST_CXX_COLOR_FLAGS}" )
     
     # TODO PYNEST-NG
     # nest_write_static_module_header( "${PROJECT_BINARY_DIR}/nest/static_modules.h" )
    @@ -191,17 +192,17 @@ get_version_info()
     printInfo("Done configuring NEST version: ${NEST_VERSION}")
     
     enable_testing()
    -set(TEST_OPTS "")
    +set( TEST_OPTS "" )
     
    -if(HAVE_PYTHON)
    -  set(TEST_OPTS "${TEST_OPTS};--with-python=${PYTHON}")
    -endif()
    +if ( HAVE_PYTHON )
    +  set( TEST_OPTS "${TEST_OPTS};--with-python=${PYTHON}" )
    +endif ()
     
    -if(HAVE_MUSIC)
    -  set(TEST_OPTS "${TEST_OPTS};--with-music=${MUSIC_EXECUTABLE}")
    -endif()
    +if ( HAVE_MUSIC )
    +  set( TEST_OPTS "${TEST_OPTS};--with-music=${MUSIC_EXECUTABLE}" )
    +endif ()
     
    -add_custom_target(installcheck
    +add_custom_target( installcheck
       COMMAND ${CMAKE_COMMAND} -E env
         ${CMAKE_INSTALL_FULL_DATADIR}/testsuite/do_tests.sh
     	--prefix=${CMAKE_INSTALL_PREFIX}
    @@ -212,66 +213,64 @@ add_custom_target(installcheck
     
     # N.B. to ensure "make install" is always run before "make installcheck", we
     # would ideally like to add:
    -# add_dependencies( installcheck install )
    +#   add_dependencies( installcheck install )
     # However, an issue in CMake at time of writing (May 2020, see
     # https://gitlab.kitware.com/cmake/cmake/-/issues/8438) precludes us from doing
     # so.
     
    -# ###############################################################################
    -# #################        Define Subdirectories here          ##################
    -# ###############################################################################
    -add_subdirectory(doc)
    -add_subdirectory(bin)
    -add_subdirectory(examples)
    -add_subdirectory(build_support)
    -add_subdirectory(libnestutil)
    -add_subdirectory(models)
    -add_subdirectory(nestkernel)
    -add_subdirectory(thirdparty)
    -add_subdirectory(testsuite)
    -
    -if(HAVE_PYTHON)
    -  add_subdirectory(pynest)
    -endif()
    +################################################################################
    +##################        Define Subdirectories here          ##################
    +################################################################################
    +
    +add_subdirectory( doc )
    +add_subdirectory( bin )
    +add_subdirectory( examples )
    +add_subdirectory( build_support )
    +add_subdirectory( libnestutil )
    +add_subdirectory( models )
    +add_subdirectory( nestkernel )
    +add_subdirectory( thirdparty )
    +add_subdirectory( testsuite )
    +if ( HAVE_PYTHON )
    +  add_subdirectory( pynest )
    +endif ()
     
    -# ###############################################################################
    -# #################           Summary of flags                 ##################
    -# ###############################################################################
    +################################################################################
    +##################           Summary of flags                 ##################
    +################################################################################
     
     # used in nest-config
     
     # all compiler flags
    -if(NOT CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" STREQUAL "None")
    -  set(ALL_CFLAGS "${CMAKE_C_FLAGS}")
    -  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS}")
    -elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
    -  set(ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_DEBUG}")
    -  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
    -elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release")
    -  set(ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_RELEASE}")
    -  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
    -elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
    -  set(ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
    -  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
    -elseif(${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel")
    -  set(ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_MINSIZEREL}")
    -  set(ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}")
    -else()
    -  printError("Unknown build type: '${CMAKE_BUILD_TYPE}'")
    -endif()
    -
    -if(with-defines)
    -  foreach(def ${with-defines})
    -    set(ALL_CFLAGS "${def} ${ALL_CFLAGS}")
    -    set(ALL_CXXFLAGS "${def} ${ALL_CXXFLAGS}")
    -  endforeach()
    -endif()
    -
    +if ( NOT CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" STREQUAL "None" )
    +  set( ALL_CFLAGS "${CMAKE_C_FLAGS}" )
    +  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS}" )
    +elseif ( ${CMAKE_BUILD_TYPE} STREQUAL "Debug" )
    +  set( ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_DEBUG}" )
    +  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}" )
    +elseif ( ${CMAKE_BUILD_TYPE} STREQUAL "Release" )
    +  set( ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_RELEASE}" )
    +  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}" )
    +elseif ( ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo" )
    +  set( ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_RELWITHDEBINFO}" )
    +  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
    +elseif ( ${CMAKE_BUILD_TYPE} STREQUAL "MinSizeRel" )
    +  set( ALL_CFLAGS "${CMAKE_C_FLAGS}   ${CMAKE_C_FLAGS_MINSIZEREL}" )
    +  set( ALL_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}" )
    +else ()
    +  printError( "Unknown build type: '${CMAKE_BUILD_TYPE}'" )
    +endif ()
    +if ( with-defines )
    +  foreach ( def ${with-defines} )
    +    set( ALL_CFLAGS "${def} ${ALL_CFLAGS}" )
    +    set( ALL_CXXFLAGS "${def} ${ALL_CXXFLAGS}" )
    +  endforeach ()
    +endif ()
     # add sionlib defines
    -foreach(def ${SIONLIB_DEFINES})
    -  set(ALL_CFLAGS "${ALL_CFLAGS} ${def}")
    -  set(ALL_CXXFLAGS "${ALL_CXXFLAGS} ${def}")
    -endforeach()
    +foreach ( def ${SIONLIB_DEFINES} )
    +    set( ALL_CFLAGS "${ALL_CFLAGS} ${def}" )
    +    set( ALL_CXXFLAGS "${ALL_CXXFLAGS} ${def}" )
    +endforeach ()
     
     # libraries required to link extension modules
     set( MODULE_LINK_LIBS
    @@ -282,78 +281,70 @@ set( MODULE_LINK_LIBS
       "${MUSIC_LIBRARIES}"
       "${MPI_CXX_LIBRARIES}"
       "${SIONLIB_LIBRARIES}"
    -  "${BOOST_LIBRARIES}"
    -  "${HDF5_LIBRARIES}")
    +  "${BOOST_LIBRARIES}" )
     
    -if(with-libraries)
    -  set(MODULE_LINK_LIBS "${MODULE_LINK_LIBS};${with-libraries}")
    -endif()
    -
    -string(REPLACE ";" " " MODULE_LINK_LIBS "${MODULE_LINK_LIBS}")
    +if ( with-libraries )
    +  set( MODULE_LINK_LIBS "${MODULE_LINK_LIBS};${with-libraries}" )
    +endif ()
    +string( REPLACE ";" " " MODULE_LINK_LIBS "${MODULE_LINK_LIBS}" )
     
     # libraries requied to link NEST
    -set(ALL_LIBS
    +set( ALL_LIBS
       "-lnest"
    -  ${MODULE_LINK_LIBS})
    +  ${MODULE_LINK_LIBS} )
    +
     
     # all includes
    -set(ALL_INCLUDES_tmp
    +set( ALL_INCLUDES_tmp
       "${CMAKE_INSTALL_FULL_INCLUDEDIR}/nest"
       "${LTDL_INCLUDE_DIRS}"
       "${GSL_INCLUDE_DIRS}"
       "${LIBNEUROSIM_INCLUDE_DIRS}"
       "${MUSIC_INCLUDE_DIRS}"
       "${MPI_CXX_INCLUDE_PATH}"
    -  "${BOOST_INCLUDE_DIR}")
    -set(ALL_INCLUDES "")
    -
    -foreach(INC ${ALL_INCLUDES_tmp} ${with-includes})
    -  if(INC AND NOT INC STREQUAL "")
    -    set(ALL_INCLUDES "${ALL_INCLUDES} -I${INC}")
    -  endif()
    -endforeach()
    +  "${BOOST_INCLUDE_DIR}" )
    +set( ALL_INCLUDES "" )
    +foreach ( INC ${ALL_INCLUDES_tmp} ${with-includes} )
    +  if ( INC AND NOT INC STREQUAL "" )
    +    set( ALL_INCLUDES "${ALL_INCLUDES} -I${INC}" )
    +  endif ()
    +endforeach ()
    +set( ALL_INCLUDES "${ALL_INCLUDES} ${SIONLIB_INCLUDE}" )
     
    -set(ALL_INCLUDES "${ALL_INCLUDES} ${SIONLIB_INCLUDE}")
    +################################################################################
    +##################           File generation here             ##################
    +################################################################################
     
    -# ###############################################################################
    -# #################           File generation here             ##################
    -# ###############################################################################
     configure_file(
    -  "${PROJECT_SOURCE_DIR}/libnestutil/config.h.in"
    -  "${PROJECT_BINARY_DIR}/libnestutil/config.h" @ONLY
    +    "${PROJECT_SOURCE_DIR}/libnestutil/config.h.in"
    +    "${PROJECT_BINARY_DIR}/libnestutil/config.h" @ONLY
     )
     
     configure_file(
    -  "${PROJECT_SOURCE_DIR}/pynest/setup.py.in"
    -  "${PROJECT_BINARY_DIR}/pynest/setup.py" @ONLY
    +    "${PROJECT_SOURCE_DIR}/pynest/setup.py.in"
    +    "${PROJECT_BINARY_DIR}/pynest/setup.py" @ONLY
     )
     
     configure_file(
    -  "${PROJECT_SOURCE_DIR}/bin/nest-config.in"
    -  "${PROJECT_BINARY_DIR}/bin/nest-config" @ONLY
    +    "${PROJECT_SOURCE_DIR}/bin/nest-config.in"
    +    "${PROJECT_BINARY_DIR}/bin/nest-config" @ONLY
     )
     
     configure_file(
    -  "${PROJECT_SOURCE_DIR}/bin/nest_vars.sh.in"
    -  "${PROJECT_BINARY_DIR}/bin/nest_vars.sh" @ONLY
    +    "${PROJECT_SOURCE_DIR}/bin/nest_vars.sh.in"
    +    "${PROJECT_BINARY_DIR}/bin/nest_vars.sh" @ONLY
     )
     
     configure_file(
    -  "${PROJECT_SOURCE_DIR}/doc/fulldoc.conf.in"
    -  "${PROJECT_BINARY_DIR}/doc/fulldoc.conf" @ONLY
    +    "${PROJECT_SOURCE_DIR}/doc/fulldoc.conf.in"
    +    "${PROJECT_BINARY_DIR}/doc/fulldoc.conf" @ONLY
     )
     
     configure_file(
    -  "${PROJECT_SOURCE_DIR}/pynest/nest/versionchecker.py.in"
    -  "${PROJECT_BINARY_DIR}/pynest/nest/versionchecker.py" @ONLY
    +    "${PROJECT_SOURCE_DIR}/pynest/nest/versionchecker.py.in"
    +    "${PROJECT_BINARY_DIR}/pynest/nest/versionchecker.py" @ONLY
     )
     
    -# ###############################################################################
    -# #################            Install Extra Files             ##################
    -# ###############################################################################
    -install(FILES LICENSE README.md
    -  DESTINATION ${CMAKE_INSTALL_DOCDIR}
    -)
     
     ################################################################################
     ##################            Install Extra Files             ##################
    
    From fb0ee232a92d304196dbf26d21c33c64d3adcfe8 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 18:37:09 +0200
    Subject: [PATCH 189/375] Rename chunk_size -> hyperslab_size
    
    ---
     nestkernel/nest.cpp | 4 ++--
     nestkernel/nest.h   | 2 +-
     2 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index fe97799642..40fc497e2e 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -509,9 +509,9 @@ connect_arrays( long* sources,
     }
     
     void
    -connect_sonata( const dictionary& graph_specs, const long chunk_size )
    +connect_sonata( const dictionary& graph_specs, const long hyperslab_size )
     {
    -  kernel().connection_manager.connect_sonata( graph_specs, chunk_size );
    +  kernel().connection_manager.connect_sonata( graph_specs, hyperslab_size );
     }
     
     std::deque< ConnectionID >
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 9ffa39e448..2571ccc6b5 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -156,7 +156,7 @@ void connect_arrays( long* sources,
       std::string syn_model );
     
     
    -void connect_sonata( const dictionary& graph_specs, const long chunk_size );
    +void connect_sonata( const dictionary& graph_specs, const long hyperslab_size );
     
     std::deque< ConnectionID > get_connections( const dictionary& dict );
     
    
    From f6ed3db4b7514f150ae13e7e703573296cac2184 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 18:37:33 +0200
    Subject: [PATCH 190/375] Cleanup dev artifacts
    
    ---
     nestkernel/sonata_connector.cpp  | 14 --------------
     pynest/nest/lib/hl_api_sonata.py |  2 +-
     2 files changed, 1 insertion(+), 15 deletions(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index c1efeef870..d6c0fe3aa6 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -28,7 +28,6 @@
     // C++ includes:
     #include <boost/any.hpp> // TODO: probably not needed if boost::any_cast goes away
     #include <cstdlib>       // for div()
    -#include <iostream>      // for debugging
     #include <string>
     #include <vector>
     
    @@ -413,10 +412,6 @@ SonataConnector::connect_chunk_( const hsize_t hyperslab_size, const hsize_t off
       std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() );
     
       // Retrieve the correct NodeCollections
    -  // const auto nest_nodes = graph_specs_[ "nodes" ];
    -  // const auto src_nc = nest_nodes[ source_attribute_value_ ];
    -  // const auto tgt_nc = nest_nodes[ target_attribute_value_ ];
    -
       const auto nest_nodes = boost::any_cast< dictionary >( graph_specs_.at( "nodes" ) );
       const auto src_nc = boost::any_cast< NodeCollectionPTR >( nest_nodes.at( source_attribute_value_ ) );
       const auto tgt_nc = boost::any_cast< NodeCollectionPTR >( nest_nodes.at( target_attribute_value_ ) );
    @@ -592,15 +587,9 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, size_t synapse_model_
       // Now create dictionary with dummy values that we will use to pass settings to the synapses created. We
       // create it here once to avoid re-creating the object over and over again.
       // TODO: See if nullptr can be changed to dictionary
    -  // edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads(), nullptr );
    -
    -  // std::to_string()
       edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads() );
    -  // edge_type_id_2_param_dicts_.at( type_id ).resize( kernel().vp_manager.get_num_threads() );
    -
       edge_type_id_2_syn_spec_[ type_id ] = synapse_params;
     
    -  // const auto nest_nodes = boost::any_cast< dictionary >( graph_specs_.at( "nodes" ) );
     
       // TODO: Once NEST is SLIless, the below loop over threads should be parallelizable. In order to parallelize, the
       // change would be to replace the for loop with #pragma omp parallel and get the thread id (tid) inside the parallel
    @@ -609,8 +598,6 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, size_t synapse_model_
       // Note that this also applies to the equivalent loop in conn_builder.cpp
       for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
       {
    -    // edge_type_id_2_param_dicts_[ type_id ][ tid ].emplace_back();
    -
         for ( auto param : synapse_params )
         {
           if ( param.second->provides_long() )
    @@ -619,7 +606,6 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, size_t synapse_model_
           }
           else
           {
    -        std::cerr << param.first << " provides double\n";
             edge_type_id_2_param_dicts_.at( type_id ).at( tid )[ param.first ] = 0.0;
           }
         }
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index f3e20bf420..1dda9bc07a 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -129,7 +129,7 @@ def __init__(self, config, sim_config=None):
             if "dt" not in self._conf["run"]:
                 raise ValueError("Time resolution 'dt' must be specified in configuration file.")
     
    -        # SetKernelStatus({"resolution": self._conf["run"]["dt"]})
    +        SetKernelStatus({"resolution": self._conf["run"]["dt"]})
     
         def _parse_config(self, config):
             """Parse JSON configuration file.
    
    From f047986f6d72d44700372a420dab6092f5b81b50 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 19:11:44 +0200
    Subject: [PATCH 191/375] Set correct number of expected spikes
    
    ---
     testsuite/pytests/test_sonata.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/test_sonata.py b/testsuite/pytests/test_sonata.py
    index fd4e876982..2b5ddd5155 100644
    --- a/testsuite/pytests/test_sonata.py
    +++ b/testsuite/pytests/test_sonata.py
    @@ -46,7 +46,7 @@
     
     EXPECTED_NUM_NODES = 400  # 300 'internal' + 100 'external'
     EXPECTED_NUM_CONNECTIONS = 48432
    -EXPECTED_NUM_SPIKES = 18788  # PYNEST-NG: SLI-NEST expected 18828 spikes, PYNEST-NG gives different number of spikes
    +EXPECTED_NUM_SPIKES = 18828
     
     # Meaning of hyperslab sizes for 300_pointneurons model:
     # 2**10=1024 : Edge HDF5 files will be read in hyperslabs (chunks)
    
    From 4bd6063d98f945cf981467e2f17a552676e61221 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 19:12:16 +0200
    Subject: [PATCH 192/375] Parallelize loop over thread ids
    
    ---
     nestkernel/sonata_connector.cpp | 12 ++++--------
     1 file changed, 4 insertions(+), 8 deletions(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index d6c0fe3aa6..2192a8403a 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -590,14 +590,10 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, size_t synapse_model_
       edge_type_id_2_param_dicts_[ type_id ].resize( kernel().vp_manager.get_num_threads() );
       edge_type_id_2_syn_spec_[ type_id ] = synapse_params;
     
    -
    -  // TODO: Once NEST is SLIless, the below loop over threads should be parallelizable. In order to parallelize, the
    -  // change would be to replace the for loop with #pragma omp parallel and get the thread id (tid) inside the parallel
    -  // region. Currently, creation of NumericDatum objects is not thread-safe because sli::pool memory is a static
    -  // member variable; thus is also the new operator a static member function.
    -  // Note that this also applies to the equivalent loop in conn_builder.cpp
    -  for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
    +#pragma omp parallel
       {
    +    const auto tid = kernel().vp_manager.get_thread_id();
    +
         for ( auto param : synapse_params )
         {
           if ( param.second->provides_long() )
    @@ -609,7 +605,7 @@ SonataConnector::set_synapse_params_( dictionary syn_dict, size_t synapse_model_
             edge_type_id_2_param_dicts_.at( type_id ).at( tid )[ param.first ] = 0.0;
           }
         }
    -  }
    +  } // end parallel region
     }
     
     void
    
    From 6f518a2783976fd89af3f126cd3fc987d5bdb955 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 20 Sep 2023 19:19:31 +0200
    Subject: [PATCH 193/375] Run isort
    
    ---
     pynest/nest/lib/hl_api_nodes.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index a3f37a7254..a74da6a8e6 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -24,10 +24,9 @@
     """
     
     import warnings
    -import nest
    -import numpy as np
     
     import nest
    +import numpy as np
     
     from .. import nestkernel_api as nestkernel
     from ..ll_api import *
    
    From eeab2b7ed54527ab7da282554d767efdbf326aec Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 21 Sep 2023 00:00:26 +0200
    Subject: [PATCH 194/375] Fix anchor int or double cast
    
    ---
     nestkernel/spatial.cpp | 7 ++-----
     1 file changed, 2 insertions(+), 5 deletions(-)
    
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index e21ae9c0b8..a3274bf275 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -365,7 +365,6 @@ create_mask( const dictionary& mask_dict )
       //   // mask type, and optionally the key 'anchor'. To find the unknown
       //   // mask type key, we must loop through all keys. The value for the
       //   // anchor key will be stored in the anchor_token variable.
    -  std::vector< long > anchor;
       bool has_anchor = false;
       MaskPTR mask;
     
    @@ -373,7 +372,6 @@ create_mask( const dictionary& mask_dict )
       {
         if ( kv.first == names::anchor )
         {
    -      anchor = mask_dict.get< std::vector< long > >( kv.first );
           has_anchor = true;
         }
         else
    @@ -389,6 +387,7 @@ create_mask( const dictionary& mask_dict )
         // For grid layers only, it is also possible to provide an array of longs.
         try
         {
    +      std::vector< long > anchor = mask_dict.get< std::vector< long > >( names::anchor );
           switch ( anchor.size() )
           {
           case 2:
    @@ -422,7 +421,7 @@ create_mask( const dictionary& mask_dict )
           std::vector< double > double_anchor = mask_dict.get< std::vector< double > >( names::anchor );
           std::shared_ptr< AbstractMask > amask;
     
    -      switch ( anchor.size() )
    +      switch ( double_anchor.size() )
           {
           case 2:
             amask = std::shared_ptr< AbstractMask >(
    @@ -533,10 +532,8 @@ connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const
     
       // Set flag before calling source->connect() in case exception is thrown after some connections have been created.
       kernel().connection_manager.set_connections_have_changed();
    -  std::cout << "### 10" << std::endl;
     
       source->connect( source_nc, target, target_nc, connector );
    -  std::cout << "### 11" << std::endl;
     }
     
     void
    
    From c467835c736df16855ecc0eb151ba1b4b94f6b78 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 21 Sep 2023 00:00:43 +0200
    Subject: [PATCH 195/375] remove redundant include
    
    ---
     nestkernel/sonata_connector.h | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/nestkernel/sonata_connector.h b/nestkernel/sonata_connector.h
    index d7d140fdd2..9465a7d49d 100644
    --- a/nestkernel/sonata_connector.h
    +++ b/nestkernel/sonata_connector.h
    @@ -38,7 +38,6 @@
     // Includes from nestkernel:
     #include "conn_parameter.h"
     #include "kernel_manager.h"
    -//#include "nest_datums.h"
     
     #include "H5Cpp.h"
     
    
    From 83d5da978dab115992991abe65e48fbdc383b8a7 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:19:29 +0200
    Subject: [PATCH 196/375] Reinstate error checking wrapper that got replaced
     during earlier merge
    
    ---
     nestkernel/device.cpp | 23 ++++-------------------
     1 file changed, 4 insertions(+), 19 deletions(-)
    
    diff --git a/nestkernel/device.cpp b/nestkernel/device.cpp
    index 058c247fe5..5d2069c222 100644
    --- a/nestkernel/device.cpp
    +++ b/nestkernel/device.cpp
    @@ -96,8 +96,7 @@ nest::Device::Parameters_::update_( const dictionary& d, const std::string& name
         const Time t = Time::ms( val );
         if ( t.is_finite() and not t.is_grid_time() )
         {
    -      throw BadProperty( name +  " must be a multiple "
    -                                 "of the simulation resolution." );
    +      throw BadProperty( name + " must be a multiple of the simulation resolution." );
         }
         value = t;
       }
    @@ -106,23 +105,9 @@ nest::Device::Parameters_::update_( const dictionary& d, const std::string& name
     void
     nest::Device::Parameters_::set( const dictionary& d )
     {
    -  double origin;
    -  if ( d.update_value( names::origin, origin ) )
    -  {
    -    origin_ = Time::ms( origin );
    -  }
    -
    -  double start;
    -  if ( d.update_value( names::start, start ) )
    -  {
    -    start_ = Time::ms( start );
    -  }
    -
    -  double stop;
    -  if ( d.update_value( names::stop, stop ) )
    -  {
    -    stop_ = Time::ms( stop );
    -  }
    +  update_( d, names::origin, origin_ );
    +  update_( d, names::start, start_ );
    +  update_( d, names::stop, stop_ );
     
       if ( stop_ < start_ )
       {
    
    From 48e8b9cc2cb22f13d5875b2b7080a52afb489320 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:19:57 +0200
    Subject: [PATCH 197/375] Remove debug output
    
    ---
     nestkernel/spatial.cpp    | 3 ---
     pynest/nestkernel_api.pyx | 2 --
     2 files changed, 5 deletions(-)
    
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index e21ae9c0b8..761d1ac670 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -533,10 +533,7 @@ connect_layers( NodeCollectionPTR source_nc, NodeCollectionPTR target_nc, const
     
       // Set flag before calling source->connect() in case exception is thrown after some connections have been created.
       kernel().connection_manager.set_connections_have_changed();
    -  std::cout << "### 10" << std::endl;
    -
       source->connect( source_nc, target, target_nc, connector );
    -  std::cout << "### 11" << std::endl;
     }
     
     void
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index a8a6bd58d2..c93f5d374b 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -219,7 +219,6 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
             elif type(value) is list and isinstance(value[0], (list, tuple)):
                 cdict[pystr_to_string(key)] = list_of_list_to_doublevec(value)
             elif type(value) is list and isinstance(value[0], numpy.ndarray):
    -            print("list of np arrays")
                 cdict[pystr_to_string(key)] = list_of_list_to_doublevec(value)
             elif type(value) is list and type(value[0]) is str:
                 cdict[pystr_to_string(key)] = pylist_to_stringvec(value)
    @@ -475,7 +474,6 @@ def llapi_disconnect_syncoll(object conns):
     
     
     def llapi_connect_layers(NodeCollectionObject pre, NodeCollectionObject post, object projections):
    -    print("### 9", projections)
         connect_layers(pre.thisptr, post.thisptr, pydict_to_dictionary(projections))
     
     
    
    From 1545a4629176a17e36511c01c480307d9bf85b19 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:20:34 +0200
    Subject: [PATCH 198/375] Add additional conversion and fix naming
    
    ---
     pynest/nestkernel_api.pyx | 12 ++++++++----
     1 file changed, 8 insertions(+), 4 deletions(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index c93f5d374b..f5ddf3b71d 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -155,6 +155,10 @@ cdef object any_to_pyobj(any operand):
             return any_cast[vector[double]](operand)
         if is_type[vector[vector[double]]](operand):
             return any_cast[vector[vector[double]]](operand)
    +    if is_type[vector[vector[vector[double]]]](operand):
    +        return any_cast[vector[vector[vector[double]]]](operand)
    +    if is_type[vector[vector[vector[long]]]](operand):
    +        return any_cast[vector[vector[vector[long]]]](operand)
         if is_type[vector[string]](operand):
             # PYNEST-NG: Do we want to have this or are bytestrings fine?
             # return any_cast[vector[string]](operand)
    @@ -193,10 +197,10 @@ cdef is_list_tuple_ndarray_of_float(v):
     
     
     cdef is_list_tuple_ndarray_of_int(v):
    -    list_of_float = type(v) is list and type(v[0]) is int
    -    tuple_of_float = type(v) is tuple and type(v[0]) is int
    -    ndarray_of_float = isinstance(v, numpy.ndarray) and numpy.issubdtype(v.dtype, numpy.integer)
    -    return list_of_float or tuple_of_float or ndarray_of_float
    +    list_of_int = type(v) is list and type(v[0]) is int
    +    tuple_of_int = type(v) is tuple and type(v[0]) is int
    +    ndarray_of_int = isinstance(v, numpy.ndarray) and numpy.issubdtype(v.dtype, numpy.integer)
    +    return list_of_int or tuple_of_int or ndarray_of_int
     
     
     cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except *" makes cython propagate the error if it is raised.
    
    From a9b27dca30d77c572c462b9238bede21cccc04bd Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:25:24 +0200
    Subject: [PATCH 199/375] Replace Get/SetStatus by get()/set() or direct
     attribute access
    
    ---
     .../sli2py_connect/test_delay_check.py        |  4 +-
     .../pytests/sli2py_neurons/test_set_vm.py     |  6 +--
     .../sli2py_regressions/test_ticket_459.py     |  4 +-
     .../test_cont_delay_synapse.py                |  2 +-
     .../test_hh_cond_beta_gap_traub.py            |  5 ---
     .../pytests/test_connect_after_simulate.py    |  4 +-
     testsuite/pytests/test_get_set.py             | 37 -------------------
     .../pytests/test_glif_psc_double_alpha.py     | 10 ++---
     .../pytests/test_spike_train_injector.py      |  2 +-
     testsuite/pytests/test_status.py              |  6 +--
     testsuite/pytests/test_stdp_pl_synapse_hom.py |  6 +--
     testsuite/pytests/test_weight_recorder.py     | 30 ++++++++-------
     12 files changed, 37 insertions(+), 79 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_connect/test_delay_check.py b/testsuite/pytests/sli2py_connect/test_delay_check.py
    index d170f006f0..c19a9e66e1 100644
    --- a/testsuite/pytests/sli2py_connect/test_delay_check.py
    +++ b/testsuite/pytests/sli2py_connect/test_delay_check.py
    @@ -74,10 +74,10 @@ def test_connect():
         assert nest.min_delay == 2.0 and nest.max_delay == 6.0
     
     
    -def test_setstatus_min_delay():
    +def test_set_min_delay():
         """
         Test that min_delay is changed after setting the status of the synapse.
         """
         conn = nest.GetConnections(source=pytest.n1, target=pytest.n2, synapse_model="static_synapse")
    -    nest.SetStatus(conn, {"delay": 0.1})
    +    conn.set({"delay": 0.1})
         assert nest.min_delay == 0.1 and nest.max_delay == 2.0
    diff --git a/testsuite/pytests/sli2py_neurons/test_set_vm.py b/testsuite/pytests/sli2py_neurons/test_set_vm.py
    index 260a15a978..35b84106a0 100644
    --- a/testsuite/pytests/sli2py_neurons/test_set_vm.py
    +++ b/testsuite/pytests/sli2py_neurons/test_set_vm.py
    @@ -22,7 +22,7 @@
     
     """
     This test goes through all registered node models for which V_m can be
    -set, and attempts to set V_m via SetModelStatus and SetStatus. It then
    +set, and attempts to set V_m via SetModelStatus and node.set(). It then
     compares results. If both ways of setting V_m give different results,
     something is wtong with state initialization.
     
    @@ -51,7 +51,7 @@ def get_models():
         return [model for model in all_models if "V_m" in nest.GetDefaults(model)]
     
     
    -def create_set_status(model, new_vm_value):
    +def create_set(model, new_vm_value):
         n = nest.Create(model)
         n.set(V_m=new_vm_value)
         return n
    @@ -68,6 +68,6 @@ def test_set_vm(model):
         new_vm_value = random.uniform(0, 1)
     
         set_defaults_create_instance = set_defaults_create(model, new_vm_value)
    -    create_set_status_instance = create_set_status(model, new_vm_value)
    +    create_set_status_instance = create_set(model, new_vm_value)
     
         assert set_defaults_create_instance.V_m == create_set_status_instance.V_m
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_459.py b/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    index ae75759f3d..9eb80a3fd4 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    @@ -41,7 +41,7 @@ def reset():
     @pytest.mark.parametrize("model", models_with_EL)
     def test_clean_EL_change(model):
         nrn = nest.Create(model)
    -    orig_params = nest.GetStatus(nrn)[0]
    +    orig_params = nrn.get()
     
         EL_orig = orig_params["E_L"]
         EL_new = EL_orig + 0.7
    @@ -51,7 +51,7 @@ def test_clean_EL_change(model):
         assert nrn.get("E_L") == EL_new
     
         # Confirm all other parameters are equal to original values.
    -    new_params = nest.GetStatus(nrn)[0]
    +    new_params = nrn.get()
         del orig_params["E_L"]
         del new_params["E_L"]
         assert new_params == orig_params
    diff --git a/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    index 4ac820d1ce..aa50930af5 100644
    --- a/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    @@ -40,7 +40,7 @@ def run_simulation(resolution, delay, explicit=False):
         if explicit:
             nest.Connect(sg, n, syn_spec={"synapse_model": "cont_delay_synapse", "weight": 100.0, "delay": delay})
             for conn in nest.GetConnections(source=sg):
    -            nest.SetStatus(conn, params={"delay": delay})
    +            conn.set({"delay": delay})
         else:
             nest.SetDefaults("cont_delay_synapse", {"weight": 100.0, "delay": delay})
             nest.Connect(sg, n, syn_spec={"synapse_model": "cont_delay_synapse"})
    diff --git a/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py b/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py
    index 9f0911da1f..4ca7c85484 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py
    @@ -32,11 +32,6 @@
     is safe to simulate with a resolution (computation step size) of 0.1
     ms because by default nest is built with a timebase enabling exact
     representation of 0.1 ms.
    -
    -The expected output is documented at the end of
    -the script. The textual output of the voltmeter documented in this file
    -can be regenerated by setting adding /to_screen true to the SetStatus
    -call of vm below.
     """
     
     import nest
    diff --git a/testsuite/pytests/test_connect_after_simulate.py b/testsuite/pytests/test_connect_after_simulate.py
    index 99a9685373..6a40350bb9 100644
    --- a/testsuite/pytests/test_connect_after_simulate.py
    +++ b/testsuite/pytests/test_connect_after_simulate.py
    @@ -80,7 +80,7 @@ def test_connect_after_simulate(use_compressed_spikes):
         assert len(connections) == 1
         assert connections[0].get("port") == 0
         # One spike, one connection to parrot -> 1 event
    -    assert nest.GetStatus(recorder)[0]["n_events"] == 1
    +    assert recorder.n_events == 1
     
         nest.Connect(neuron, parrot)
     
    @@ -106,4 +106,4 @@ def test_connect_after_simulate(use_compressed_spikes):
             nest.GetConnections(target=parrot)[0].get("port") == 101
         # One spike from before, additionally 1 more spike,
         # now 2 connections to parrot -> 3 events in total
    -    assert nest.GetStatus(recorder)[0]["n_events"] == 3
    +    assert recorder.n_events == 3
    diff --git a/testsuite/pytests/test_get_set.py b/testsuite/pytests/test_get_set.py
    index 8338ba013c..74881236fb 100644
    --- a/testsuite/pytests/test_get_set.py
    +++ b/testsuite/pytests/test_get_set.py
    @@ -130,43 +130,6 @@ def test_get(self):
             }
             self.assertEqual(g, g_reference)
     
    -    def test_SetStatus_and_GetStatus(self):
    -        """
    -        Test that SetStatus and GetStatus works as expected with
    -        NodeCollection
    -
    -        NOTE: This test was moved from test_NodeCollection.py and may overlap
    -        with test already present in this test suite. If that is the case,
    -        consider to just drop this test.
    -        """
    -
    -        num_nodes = 10
    -        n = nest.Create("iaf_psc_alpha", num_nodes)
    -        nest.SetStatus(n, {"V_m": 3.5})
    -        self.assertEqual(nest.GetStatus(n, "V_m")[0], 3.5)
    -
    -        V_m = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
    -        nest.SetStatus(n, "V_m", V_m)
    -        for i in range(num_nodes):
    -            self.assertEqual(nest.GetStatus(n, "V_m")[i], V_m[i])
    -
    -        with self.assertRaises(TypeError):
    -            nest.SetStatus(n, [{"V_m": 34.0}, {"V_m": -5.0}])
    -
    -        nest.ResetKernel()
    -
    -        nc = nest.Create("iaf_psc_exp", 5)  # noqa: F841
    -
    -        with self.assertRaises(nest.NESTError):
    -            nest.SetStatus(n, {"V_m": -40.0})
    -        with self.assertRaises(nest.NESTError):
    -            nest.GetStatus(n)
    -
    -        nest.ResetKernel()
    -        n = nest.Create("iaf_psc_alpha", 3)
    -        nest.SetStatus(n, [{"V_m": 10.0}, {"V_m": -10.0}, {"V_m": -20.0}])
    -        self.assertEqual(nest.GetStatus(n, "V_m"), (10.0, -10.0, -20.0))
    -
         def test_set_on_empty_node_collection(self):
             """
             Checks that setting on empty NC does not raise an error.
    diff --git a/testsuite/pytests/test_glif_psc_double_alpha.py b/testsuite/pytests/test_glif_psc_double_alpha.py
    index 326155d8ac..b0576c7757 100644
    --- a/testsuite/pytests/test_glif_psc_double_alpha.py
    +++ b/testsuite/pytests/test_glif_psc_double_alpha.py
    @@ -93,9 +93,9 @@ def simulate_w_stim(self, model_params):
     
             nest.Simulate(1000.0)
     
    -        times = nest.GetStatus(mm, "events")[0]["times"]
    -        V_m = nest.GetStatus(mm, "events")[0]["V_m"]
    -        spikes = nest.GetStatus(sr, "events")[0]["times"]
    +        times = mm.events["times"]
    +        V_m = mm.events["V_m"]
    +        spikes = sr.events["times"]
     
             return times, V_m, spikes
     
    @@ -279,8 +279,8 @@ def test_double_alpha_synapse(self):
     
             # Do simulation.
             nest.Simulate(500.0)
    -        times = nest.GetStatus(multimeter, "events")[0]["times"]
    -        I_syn = nest.GetStatus(multimeter, "events")[0]["I_syn"]
    +        times = multimeter.events["times"]
    +        I_syn = multimeter.events["I_syn"]
     
             # Check the results.
             # the peak timing should be 13 ms (index 129), 213 ms (index 2129),
    diff --git a/testsuite/pytests/test_spike_train_injector.py b/testsuite/pytests/test_spike_train_injector.py
    index b03ca43b15..55fba3e095 100644
    --- a/testsuite/pytests/test_spike_train_injector.py
    +++ b/testsuite/pytests/test_spike_train_injector.py
    @@ -66,7 +66,7 @@ def test_set_spike_times(reset_kernel, in_spike_times, expected_spike_times, pre
             },
         )
     
    -    out_spike_times = nest.GetStatus(inj_nrn, "spike_times")[0]
    +    out_spike_times = inj_nrn.spike_times
         assert out_spike_times == pytest.approx(expected_spike_times)
     
     
    diff --git a/testsuite/pytests/test_status.py b/testsuite/pytests/test_status.py
    index 0fc6f4b348..ec28eac556 100644
    --- a/testsuite/pytests/test_status.py
    +++ b/testsuite/pytests/test_status.py
    @@ -19,17 +19,13 @@
     # You should have received a copy of the GNU General Public License
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
    -"""
    -Test if Set/GetStatus work properly
    -"""
    -
     import unittest
     
     import nest
     
     
     class StatusTestCase(unittest.TestCase):
    -    """Tests of Get/SetStatus, Get/SetDefaults, and Get/SetKernelStatus via get/set"""
    +    """Tests of Get/SetDefaults, and Get/SetKernelStatus via get/set"""
     
         def test_kernel_attributes(self):
             """Test nest attribute access of kernel attributes"""
    diff --git a/testsuite/pytests/test_stdp_pl_synapse_hom.py b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    index 5a451530e8..0b71031b44 100644
    --- a/testsuite/pytests/test_stdp_pl_synapse_hom.py
    +++ b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    @@ -198,12 +198,12 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        all_spikes = nest.GetStatus(spike_recorder, keys="events")[0]
    +        all_spikes = spike_recorder.events
             pre_spikes = all_spikes["times"][all_spikes["senders"] == presynaptic_neuron.tolist()[0]]
             post_spikes = all_spikes["times"][all_spikes["senders"] == postsynaptic_neuron.tolist()[0]]
     
    -        t_hist = nest.GetStatus(wr, "events")[0]["times"]
    -        weight = nest.GetStatus(wr, "events")[0]["weights"]
    +        t_hist = wr.events["times"]
    +        weight = wr.events["weights"]
     
             return pre_spikes, post_spikes, t_hist, weight
     
    diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py
    index e962b4f435..6521b18047 100644
    --- a/testsuite/pytests/test_weight_recorder.py
    +++ b/testsuite/pytests/test_weight_recorder.py
    @@ -217,23 +217,27 @@ def test_senders_and_targets(self):
             pre = nest.Create("parrot_neuron", 5)
             post = nest.Create("parrot_neuron", 5)
     
    -        # Senders and targets lists empty
    -        self.assertFalse(nest.GetStatus(wr, "senders")[0])
    -        self.assertFalse(nest.GetStatus(wr, "targets")[0])
    +        # Senders and targets lists empty initially
    +        assert wr.senders.tolist() == []
    +        assert wr.targets.tolist() == []
     
    -        nest.SetStatus(wr, {"senders": pre[1:3], "targets": post[3:]})
    +        wr.senders = pre[1:3]
    +        wr.targets = post[3:]
     
    -        gss = nest.GetStatus(wr, "senders")[0]
    -        gst = nest.GetStatus(wr, "targets")[0]
    +        gss = wr.senders
    +        gst = wr.targets
     
    -        self.assertEqual(gss.tolist(), [3, 4])
    -        self.assertEqual(gst.tolist(), [10, 11])
    +        assert gss.tolist() == [3, 4]
    +        assert gst.tolist() == [10, 11]
     
    -        nest.SetStatus(wr, {"senders": [2, 6], "targets": [8, 9]})
    -        gss = nest.GetStatus(wr, "senders")[0]
    -        gst = nest.GetStatus(wr, "targets")[0]
    -        self.assertEqual(gss.tolist(), [2, 6])
    -        self.assertEqual(gst.tolist(), [8, 9])
    +        wr.senders = nest.NodeCollection([2, 6])
    +        wr.targets = nest.NodeCollection([8, 9])
    +
    +        gss = wr.senders
    +        gst = wr.targets
    +
    +        assert gss.tolist() == [2, 6]
    +        assert gst.tolist() == [8, 9]
     
         def testMultapses(self):
             """Weight Recorder Multapses"""
    
    From b8a00576a05b1aea6e24c8a0ea67fe985714a5eb Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:26:15 +0200
    Subject: [PATCH 200/375] Fix function call to renamed function
    
    ---
     pynest/nest/lib/hl_api_types.py | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index d3d93438d4..6dc3fd719c 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -1219,11 +1219,11 @@ def serialize_data(data):
             return data.tolist()
         elif isinstance(data, SynapseCollection):
             # Get full information from SynapseCollection
    -        return serializable(data.get())
    +        return serialize_data(data.get())
         if isinstance(data, (list, tuple)):
    -        return [serializable(d) for d in data]
    +        return [serialize_data(d) for d in data]
         if isinstance(data, dict):
    -        return dict([(key, serializable(value)) for key, value in data.items()])
    +        return dict([(key, serialize_data(value)) for key, value in data.items()])
         return data
     
     
    
    From a6fbdd8be9f1c27a2ccadddbebe7efb2178c5e9d Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:26:34 +0200
    Subject: [PATCH 201/375] Add some more todos
    
    ---
     .../pytests/sli2py_connect/test_rate_connections.py  | 12 ++++++++++++
     testsuite/pytests/test_multimeter.py                 |  3 +++
     2 files changed, 15 insertions(+)
    
    diff --git a/testsuite/pytests/sli2py_connect/test_rate_connections.py b/testsuite/pytests/sli2py_connect/test_rate_connections.py
    index bd3f8e2a04..254024fa8d 100644
    --- a/testsuite/pytests/sli2py_connect/test_rate_connections.py
    +++ b/testsuite/pytests/sli2py_connect/test_rate_connections.py
    @@ -117,6 +117,10 @@ def test_rate_connection_instantaneous_set_delay_disallowed(supported_nrn_model)
         """
     
         supported_nrn = nest.Create(supported_nrn_model)
    +
    +    # TODO: PyNEST-NG: This currently raises WrappedThreadException, so either
    +    # make sure the correct exception is actually thrown, or catch NESTError and
    +    # match by regex on "Each multimeter can only be connected once to a given node"
         with pytest.raises(nest.NESTErrors.BadProperty):
             nest.Connect(
                 supported_nrn,
    @@ -160,6 +164,10 @@ def test_illegal_diffusion_connection_connections(unsupported_nrn_model):
     
         supported_nrn = nest.Create("siegert_neuron")
         unsupported_nrn = nest.Create(unsupported_nrn_model)
    +
    +    # TODO: PyNEST-NG: This currently raises WrappedThreadException, so either
    +    # make sure the correct exception is actually thrown, or catch NESTError and
    +    # match by regex on "Each multimeter can only be connected once to a given node"
         with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(
                 supported_nrn,
    @@ -176,6 +184,10 @@ def test_diffusion_connection_set_weight_and_delay_disallowed(syn_param):
         """
     
         supported_nrn = nest.Create("siegert_neuron")
    +
    +    # TODO: PyNEST-NG: This currently raises WrappedThreadException, so either
    +    # make sure the correct exception is actually thrown, or catch NESTError and
    +    # match by regex on "Each multimeter can only be connected once to a given node"
         with pytest.raises(nest.NESTErrors.BadProperty):
             nest.Connect(
                 supported_nrn,
    diff --git a/testsuite/pytests/test_multimeter.py b/testsuite/pytests/test_multimeter.py
    index 2aa0022c93..5a082a8f6a 100644
    --- a/testsuite/pytests/test_multimeter.py
    +++ b/testsuite/pytests/test_multimeter.py
    @@ -44,6 +44,9 @@ def test_connect_multimeter_twice():
         mm = nest.Create("multimeter")
         nest.Connect(mm, nrn)
     
    +    # TODO: PyNEST-NG: This currently raises WrappedThreadException, so either
    +    # make sure the correct exception is actually thrown, or catch NESTError and
    +    # match by regex on "Each multimeter can only be connected once to a given node"
         with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(mm, nrn)
     
    
    From 7d81cee6e30c9795c6a674f1089f40bc15d60db1 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:28:41 +0200
    Subject: [PATCH 202/375] Fix types of attributes
    
    ---
     .../iaf_psc_alpha/test_iaf_psc_alpha.py              | 12 ++++++------
     .../test_sinusoidal_poisson_generator.py             |  4 ++--
     testsuite/pytests/test_iaf_ps_psp_accuracy.py        |  2 +-
     .../pytests/test_iaf_ps_psp_poisson_accuracy.py      |  2 +-
     testsuite/pytests/test_mip_corrdet.py                |  4 ++--
     testsuite/pytests/test_multimeter.py                 |  4 ++--
     .../pytests/test_sp/test_sp_autapses_multapses.py    |  4 ++--
     .../test_spike_transmission_after_disconnect.py      |  4 ++--
     8 files changed, 18 insertions(+), 18 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha.py b/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha.py
    index 8ef1815eb0..6fd87b39c3 100644
    --- a/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha.py
    +++ b/testsuite/pytests/sli2py_neurons/iaf_psc_alpha/test_iaf_psc_alpha.py
    @@ -80,7 +80,7 @@ def setup(self):
     class TestIAFPSCAlpha:
         def test_iaf_psc_alpha(self, simulation):
             dc = simulation.dc_generator = nest.Create("dc_generator")
    -        dc.amplitude = 1000
    +        dc.amplitude = 1000.0
     
             simulation.setup()
     
    @@ -99,7 +99,7 @@ def test_iaf_psc_alpha(self, simulation):
         def test_iaf_psc_alpha_fudge(self, simulation):
             simulation.setup()
     
    -        tau_m = 20
    +        tau_m = 20.0
             tau_syn = 0.5
             C_m = 250.0
             a = tau_m / tau_syn
    @@ -129,7 +129,7 @@ def test_iaf_psc_alpha_fudge(self, simulation):
         def test_iaf_psc_alpha_i0(self, simulation):
             simulation.setup()
     
    -        simulation.neuron.I_e = 1000
    +        simulation.neuron.I_e = 1000.0
     
             results = simulation.simulate()
     
    @@ -141,7 +141,7 @@ def test_iaf_psc_alpha_i0(self, simulation):
         def test_iaf_psc_alpha_i0_refractory(self, simulation):
             simulation.setup()
     
    -        simulation.neuron.I_e = 1450
    +        simulation.neuron.I_e = 1450.0
     
             results = simulation.simulate()
     
    @@ -194,7 +194,7 @@ def test_iaf_psc_alpha_mindelay_simblocks(self, simulation, min_delay, delay):
     
     def test_kernel_precision():
         nest.ResetKernel()
    -    nest.set(tics_per_ms=2**14, resolution=2**0)
    +    nest.set(tics_per_ms=2**14, resolution=float(2**0))
         assert math.frexp(nest.ms_per_tic) == (0.5, -13)
     
     
    @@ -221,7 +221,7 @@ def setup(self):
             "iaf_psc_exp_ps_lossless",
         ],
     )
    -@pytest.mark.parametrize("resolution", [2**i for i in range(0, -14, -1)])
    +@pytest.mark.parametrize("resolution", [float(2**i) for i in range(0, -14, -1)])
     class TestIAFPSDCAccuracy:
         @pytest.mark.parametrize(
             "params",
    diff --git a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    index c0175d249d..2ffca64449 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    @@ -110,7 +110,7 @@ def test_sinusoidal_poisson_generator_with_spike_recorder(num_threads, individua
         nest.SetDefaults(
             "sinusoidal_poisson_generator",
             {
    -            "rate": 100,
    +            "rate": 100.0,
                 "amplitude": 50.0,
                 "frequency": 10.0,
                 "individual_spike_trains": individual_spike_trains,
    @@ -169,7 +169,7 @@ def test_sinusoidal_poisson_generator_with_multimeter(num_threads, individual_sp
         nest.SetDefaults(
             "sinusoidal_poisson_generator",
             {
    -            "rate": 100,
    +            "rate": 100.0,
                 "amplitude": 50.0,
                 "frequency": 10.0,
                 "individual_spike_trains": individual_spike_trains,
    diff --git a/testsuite/pytests/test_iaf_ps_psp_accuracy.py b/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    index d67679533b..7207290716 100644
    --- a/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    +++ b/testsuite/pytests/test_iaf_ps_psp_accuracy.py
    @@ -102,7 +102,7 @@ def alpha_fn(t):
     @pytest.mark.parametrize("h", range(-12, 1, 2))
     def test_single_spike_different_stepsizes(h):
         nest.ResetKernel()
    -    res = 2**h
    +    res = float(2**h)
         nest.set(tics_per_ms=2**14, resolution=res)
     
         sg = nest.Create("spike_generator")
    diff --git a/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py b/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    index 8dcc3f03f3..d44b9ca3fb 100644
    --- a/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    +++ b/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    @@ -96,7 +96,7 @@ def spiketrain_response(spiketrain):
     def test_poisson_spikes_different_stepsizes(h):
         nest.ResetKernel()
     
    -    nest.set(tics_per_ms=2**10, resolution=2**h)
    +    nest.set(tics_per_ms=2**10, resolution=float(2**h))
     
         pg = nest.Create("poisson_generator_ps", params={"rate": 16000.0})
     
    diff --git a/testsuite/pytests/test_mip_corrdet.py b/testsuite/pytests/test_mip_corrdet.py
    index 1767a78596..5e7a5b7d06 100644
    --- a/testsuite/pytests/test_mip_corrdet.py
    +++ b/testsuite/pytests/test_mip_corrdet.py
    @@ -61,9 +61,9 @@ def test_correlation_detector_mip():
         nest.set(rng_seed=12345)
     
         mg = nest.Create("mip_generator")
    -    mg.set(rate=100, p_copy=0.5)
    +    mg.set(rate=100.0, p_copy=0.5)
         cd = nest.Create("correlation_detector")
    -    cd.set(tau_max=100, delta_tau=10)
    +    cd.set(tau_max=100.0, delta_tau=10.0)
     
         pn1 = nest.Create("parrot_neuron")
         pn2 = nest.Create("parrot_neuron")
    diff --git a/testsuite/pytests/test_multimeter.py b/testsuite/pytests/test_multimeter.py
    index 5a082a8f6a..33e9fda16a 100644
    --- a/testsuite/pytests/test_multimeter.py
    +++ b/testsuite/pytests/test_multimeter.py
    @@ -89,9 +89,9 @@ def test_recordables_are_recorded(model):
     
         nest.resolution = 2**-3  # Set to power of two to avoid rounding issues
     
    -    recording_interval = 2
    +    recording_interval = 2.0
         simtime = 10
    -    num_data_expected = simtime / recording_interval - 1
    +    num_data_expected = int(simtime / recording_interval - 1)
     
         nrn = nest.Create(model)
         recordables = nrn.recordables
    diff --git a/testsuite/pytests/test_sp/test_sp_autapses_multapses.py b/testsuite/pytests/test_sp/test_sp_autapses_multapses.py
    index 1d181fffc0..a38894bcab 100644
    --- a/testsuite/pytests/test_sp/test_sp_autapses_multapses.py
    +++ b/testsuite/pytests/test_sp/test_sp_autapses_multapses.py
    @@ -31,7 +31,7 @@ def test_autapses(self):
     
             nest.ResetKernel()
             nest.CopyModel("static_synapse", "synapse_ex")
    -        nest.SetDefaults("synapse_ex", {"weight": 1, "delay": 1.0})
    +        nest.SetDefaults("synapse_ex", {"weight": 1.0, "delay": 1.0})
             nest.structural_plasticity_synapses = {
                 "synapse_ex": {
                     "synapse_model": "synapse_ex",
    @@ -49,7 +49,7 @@ def test_multapses(self):
     
             nest.ResetKernel()
             nest.CopyModel("static_synapse", "synapse_ex")
    -        nest.SetDefaults("synapse_ex", {"weight": 1, "delay": 1.0})
    +        nest.SetDefaults("synapse_ex", {"weight": 1.0, "delay": 1.0})
             nest.structural_plasticity_synapses = {
                 "synapse_ex": {
                     "synapse_model": "synapse_ex",
    diff --git a/testsuite/pytests/test_spike_transmission_after_disconnect.py b/testsuite/pytests/test_spike_transmission_after_disconnect.py
    index 5887a4bdd1..3b2178a4bc 100644
    --- a/testsuite/pytests/test_spike_transmission_after_disconnect.py
    +++ b/testsuite/pytests/test_spike_transmission_after_disconnect.py
    @@ -35,10 +35,10 @@ def test_spike_transmission_after_disconnect():
         c[::3].disconnect()
     
         # Add spike generator to drive
    -    g = nest.Create("spike_generator", params={"spike_times": [1]})
    +    g = nest.Create("spike_generator", params={"spike_times": [1.0]})
         nest.Connect(g, n)
     
         # Simulate long enough for spikes to be delivered, but not too long
         # since we otherwise will be buried by exponential growth in number
         # of spikes.
    -    nest.Simulate(3)
    +    nest.Simulate(3.0)
    
    From 910a9d023aea861a00df9a3d831f873b43bed08f Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:30:45 +0200
    Subject: [PATCH 203/375] Fix parameter settings in calls to create
    
    ---
     .../sli2py_recording/test_compare_delta.py    |  5 +--
     .../test_multimeter_offset.py                 | 37 ++++++++-----------
     .../sli2py_regressions/test_issue_1140.py     |  2 +-
     .../test_pulsepacket_generator.py             |  2 +-
     testsuite/pytests/test_astrocyte.py           | 11 +++---
     testsuite/pytests/test_compartmental_model.py |  3 ++
     testsuite/pytests/test_sic_connection.py      |  2 +-
     7 files changed, 29 insertions(+), 33 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_recording/test_compare_delta.py b/testsuite/pytests/sli2py_recording/test_compare_delta.py
    index 7af5f8f5ec..b4f05a395b 100644
    --- a/testsuite/pytests/sli2py_recording/test_compare_delta.py
    +++ b/testsuite/pytests/sli2py_recording/test_compare_delta.py
    @@ -49,9 +49,8 @@ def test_simulation_completes():
         population_plain = nest.Create("iaf_psc_delta", params=neuron_params)
         population_canon = nest.Create("iaf_psc_delta_ps", params=neuron_params)
     
    -    spike_generator = nest.Create(
    -        "spike_generator", {"spike_times": [1.0, 2.0, 3.0, 4.0, 5.0, 10.5, 12.0], "precise_times": False}
    -    )
    +    sg_params = {"spike_times": [1.0, 2.0, 3.0, 4.0, 5.0, 10.5, 12.0], "precise_times": False}
    +    spike_generator = nest.Create("spike_generator", params=sg_params)
         spike_recorder = nest.Create("spike_recorder")
         nest.SetDefaults("static_synapse", {"delay": 0.1, "weight": 2.5})
     
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_offset.py b/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    index e0fc1c559f..0615e906d0 100644
    --- a/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    +++ b/testsuite/pytests/sli2py_recording/test_multimeter_offset.py
    @@ -41,14 +41,12 @@ def test_recorded_times_relative_to_offset():
     
         nest.resolution = 2**-3  # Set to power of two to avoid rounding issues.
         nrn = nest.Create("iaf_psc_alpha")
    -    mm = nest.Create(
    -        "multimeter",
    -        params={
    -            "interval": 3.0,  # different from default
    -            "offset": 5.0,  # different from default
    -            "record_from": ["V_m"],
    -        },
    -    )
    +    mm_params = {
    +        "interval": 3.0,  # different from default
    +        "offset": 5.0,  # different from default
    +        "record_from": ["V_m"],
    +    }
    +    mm = nest.Create("multimeter", params=mm_params)
     
         nest.Connect(mm, nrn)
         nest.Simulate(15.0)
    @@ -68,17 +66,15 @@ def test_correct_data_logger_initialization():
     
         # Create and connect one multimeter and simulate
         nrn = nest.Create("iaf_psc_alpha")
    -    mm1 = nest.Create(
    -        "multimeter", params={"start": 20.0, "stop": 30.0, "interval": 3.0, "offset": 5.0, "record_from": ["V_m"]}
    -    )
    +    mm1_params = {"start": 20.0, "stop": 30.0, "interval": 3.0, "offset": 5.0, "record_from": ["V_m"]}
    +    mm1 = nest.Create("multimeter", params=mm1_params)
     
         nest.Connect(mm1, nrn)
         nest.Simulate(10.0)
     
         # Create and connect a second multimeter then simulate further
    -    mm2 = nest.Create(
    -        "multimeter", params={"start": 20.0, "stop": 30.0, "interval": 3.0, "offset": 5.0, "record_from": ["V_m"]}
    -    )
    +    mm2_params = {"start": 20.0, "stop": 30.0, "interval": 3.0, "offset": 5.0, "record_from": ["V_m"]}
    +    mm2 = nest.Create("multimeter", params=mm2_params)
     
         nest.Connect(mm2, nrn)
         nest.Simulate(20.0)
    @@ -121,9 +117,8 @@ def test_offset_wrt_origin_start_stop():
     
         # Create and connect one multimeter and simulate
         nrn = nest.Create("iaf_psc_exp")
    -    mm = nest.Create(
    -        "multimeter", params={"start": 3.0, "stop": 15.0, "interval": 3.0, "offset": 5.0, "record_from": ["V_m"]}
    -    )
    +    mm_params = {"start": 3.0, "stop": 15.0, "interval": 3.0, "offset": 5.0, "record_from": ["V_m"]}
    +    mm = nest.Create("multimeter", params=mm_params)
     
         nest.Connect(mm, nrn)
         nest.Simulate(20.0)
    @@ -159,14 +154,14 @@ def test_creation_after_initial_simulation():
     
         # Create and connect one multimeter and simulate
         nrn = nest.Create("iaf_psc_exp")
    -    mm1 = nest.Create("multimeter", mm_params)
    +    mm1 = nest.Create("multimeter", params=mm_params)
     
         nest.Connect(mm1, nrn, conn_spec, syn_spec)
     
         nest.Simulate(10.0)
     
         # Create and connect a second multimeter then simulate further
    -    mm2 = nest.Create("multimeter", mm_params)
    +    mm2 = nest.Create("multimeter", params=mm_params)
     
         nest.Connect(mm2, nrn, conn_spec, syn_spec)
         nest.Simulate(20.0)
    @@ -204,7 +199,7 @@ def test_offset_after_initial_simulation():
         conn_spec = {"rule": "all_to_all"}
         syn_spec = {"delay": 0.1}
     
    -    mm = nest.Create("multimeter", mm_params)
    +    mm = nest.Create("multimeter", params=mm_params)
     
         nest.Connect(mm, nrn, conn_spec, syn_spec)
         nest.Simulate(sim_time)
    @@ -239,7 +234,7 @@ def test_initial_simulation_longer_than_offset():
         conn_spec = {"rule": "all_to_all"}
         syn_spec = {"delay": 0.1}
     
    -    mm = nest.Create("multimeter", mm_params)
    +    mm = nest.Create("multimeter", params=mm_params)
     
         nest.Connect(mm, nrn, conn_spec, syn_spec)
         nest.Simulate(sim_time)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1140.py b/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    index e7aa9722fa..3fe0b85aeb 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    @@ -59,7 +59,7 @@ def test_inhomogeneous_poisson_generator_params_set_implicitly():
         """
     
         params = {"rate_times": [10.0, 110.0, 210.0], "rate_values": [400.0, 1000.0, 200.0]}
    -    ipg = nest.Create("inhomogeneous_poisson_generator", params)
    +    ipg = nest.Create("inhomogeneous_poisson_generator", params=params)
     
         for key in params:
             actual = ipg.get(key)
    diff --git a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    index a970d646e7..bc1c7c6e3c 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    @@ -110,7 +110,7 @@ def test_number_of_spikes():
             "activity": nspk,
             "sdev": stddev,
         }
    -    ppg = nest.Create("pulsepacket_generator", params)
    +    ppg = nest.Create("pulsepacket_generator", params=params)
         sr = nest.Create("spike_recorder")
     
         nest.Connect(ppg, sr)
    diff --git a/testsuite/pytests/test_astrocyte.py b/testsuite/pytests/test_astrocyte.py
    index 3b0cacc44b..536714e37a 100644
    --- a/testsuite/pytests/test_astrocyte.py
    +++ b/testsuite/pytests/test_astrocyte.py
    @@ -59,15 +59,14 @@ def test_closeness_nest_odeint():
         # create astrocyte and devices
         # initial values of the state variables as in the reference solution
         astrocyte = nest.Create("astrocyte_lr_1994", params={"IP3": 1.0, "Ca": 1.0, "h_IP3R": 1.0})
    -    mm = nest.Create(
    -        "multimeter",
    -        {"interval": nest.resolution, "record_from": ["IP3", "Ca", "h_IP3R"]},
    -    )
    -    spk_ge = nest.Create("spike_generator", {"spike_times": spike_times, "spike_weights": spike_weights})
    +    mm_params = {"interval": nest.resolution, "record_from": ["IP3", "Ca", "h_IP3R"]}
    +    mm = nest.Create("multimeter", params=mm_params)
    +    sg_params = {"spike_times": spike_times, "spike_weights": spike_weights}
    +    sg = nest.Create("spike_generator", params=sg_params)
     
         # connect astrocyte to devices
         nest.Connect(mm, astrocyte)
    -    nest.Connect(spk_ge, astrocyte, syn_spec={"delay": nest.resolution})
    +    nest.Connect(sg, astrocyte, syn_spec={"delay": nest.resolution})
     
         # simulate
         nest.Simulate(simtime)
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index 2de0a5fdd6..4dca9f09da 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -710,6 +710,9 @@ def test_spike_transmission(self, dt=0.01):
             self.assertTrue(np.any(events_neat_1["v_comp0"] != soma_params["e_L"]))
     
         def test_set_combinations(self, dt=0.1):
    +        sg_01 = nest.Create("spike_generator", params={"spike_times": [10.0]})
    +        sg_02 = nest.Create("spike_generator", params={"spike_times": [15.0]})
    +
             sg_11 = nest.Create("spike_generator", params={"spike_times": [10.0]})
             sg_12 = nest.Create("spike_generator", params={"spike_times": [15.0]})
     
    diff --git a/testsuite/pytests/test_sic_connection.py b/testsuite/pytests/test_sic_connection.py
    index 1e6d69b7dc..a52be31f09 100644
    --- a/testsuite/pytests/test_sic_connection.py
    +++ b/testsuite/pytests/test_sic_connection.py
    @@ -63,7 +63,7 @@ def test_SynapseFunctionWithAeifModel():
         resol = nest.resolution
     
         # Create neurons and devices
    -    astrocyte = nest.Create("astrocyte_lr_1994", {"Ca": 0.2})  # a calcium value which produces SIC
    +    astrocyte = nest.Create("astrocyte_lr_1994", params{"Ca": 0.2})  # a calcium value which produces SIC
         neuron = nest.Create("aeif_cond_alpha_astro")
     
         mm_neuron = nest.Create("multimeter", params={"record_from": ["I_SIC"], "interval": resol})
    
    From a02b75cb87771421499aa6ec03b2ffc04e7f5a76 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:32:07 +0200
    Subject: [PATCH 204/375] Fix exceptions to be checked for
    
    ---
     .../sli2py_regressions/test_issue_545.py      |  6 ++---
     testsuite/pytests/test_compartmental_model.py | 23 ++++++-------------
     testsuite/pytests/test_connect_arrays.py      |  2 +-
     testsuite/pytests/test_errors.py              |  2 +-
     testsuite/pytests/test_nodeParametrization.py |  8 +++----
     testsuite/pytests/test_sic_connection.py      |  2 +-
     testsuite/pytests/test_sp/test_disconnect.py  |  2 +-
     .../test_spatial/test_connect_layers.py       |  2 +-
     testsuite/pytests/test_status.py              |  2 +-
     9 files changed, 20 insertions(+), 29 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_545.py b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    index b0237b83c5..a5d5bc0353 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_545.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    @@ -33,14 +33,14 @@ def test_setters_raise_error_on_bad_properties():
         nest.local_num_threads = 4
     
         # test defaults
    -    with pytest.raises(nest.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.TypeMismatch):
             nest.SetDefaults("iaf_psc_alpha", {"tau_m": -10})
     
         # test neuron
         n = nest.Create("iaf_psc_alpha")
    -    with pytest.raises(nest.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.TypeMismatch):
             n.set({"tau_m": -10})
     
         # test synapse
    -    with pytest.raises(nest.NESTErrors.BadDelay):
    +    with pytest.raises(nest.NESTErrors.TypeMismatch):
             nest.Connect(n, n, syn_spec={"delay": -10})
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index 4dca9f09da..ae031dc3b1 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -790,9 +790,7 @@ def test_error_handling(self):
             # test double root
             n_neat = nest.Create("cm_default")
     
    -        with self.assertRaisesRegex(
    -            nest.NESTError, "in llapi_set_nc_status: Compartment 0 , the root, has already been instantiated."
    -        ):
    +        with self.assertRaisesRegex(nest.NESTError, "Compartment 0 , the root, has already been instantiated."):
                 n_neat.compartments = [{"parent_idx": -1, "params": SP}, {"parent_idx": -1, "params": SP}]
     
             # test undefined parent compartment
    @@ -800,7 +798,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            "in llapi_set_nc_status: Compartment 15 does not exist in tree, but was specified as a parent.",
    +            "Compartment 15 does not exist in tree, but was specified as a parent.",
             ):
                 n_neat.compartments = [{"parent_idx": -1, "params": SP}, {"parent_idx": 15, "params": SP}]
     
    @@ -808,7 +806,7 @@ def test_error_handling(self):
             n_neat = nest.Create("cm_default")
             n_neat.compartments = {"parent_idx": -1, "params": SP}
     
    -        with self.assertRaisesRegex(nest.NESTError, "in llapi_set_nc_status: Compartment 12 does not exist in tree."):
    +        with self.assertRaisesRegex(nest.NESTError, "Compartment 12 does not exist in tree."):
                 n_neat.receptors = {"comp_idx": 12, "receptor_type": "GABA"}
     
             # test simulate without adding compartments
    @@ -816,9 +814,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            "in llapi_simulate: "
    -            "Compartment 0 does not exist in tree, "
    -            "meaning that no compartments have been added.",
    +            "Compartment 0 does not exist in tree, meaning that no compartments have been added.",
             ):
                 nest.Simulate(10.0)
     
    @@ -829,9 +825,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            r"in llapi_connect: "
    -            r"Port with id 3 does not exist. Valid current "
    -            r"receptor ports for cm_default are in \[0, 2\[",
    +            r"Port with id 3 does not exist. Valid current " r"receptor ports for cm_default are in \[0, 2\[",
             ):
                 nest.Connect(dc, n_neat, syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "receptor_type": 3})
     
    @@ -847,9 +841,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            r"in llapi_connect: "
    -            r"Port with id 3 does not exist. Valid spike "
    -            r"receptor ports for cm_default are in \[0, 3\[",
    +            r"Port with id 3 does not exist. Valid spike " r"receptor ports for cm_default are in \[0, 3\[",
             ):
                 nest.Connect(sg, n_neat, syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "receptor_type": 3})
     
    @@ -860,8 +852,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            "in llapi_connect: Creation of connection is not possible because:\n"
    -            "Cannot connect with unknown recordable v_comp1",
    +            "Creation of connection is not possible because:\n" "Cannot connect with unknown recordable v_comp1",
             ):
                 nest.Connect(mm, n_neat)
     
    diff --git a/testsuite/pytests/test_connect_arrays.py b/testsuite/pytests/test_connect_arrays.py
    index 4fa70eda4e..26266cb4a8 100644
    --- a/testsuite/pytests/test_connect_arrays.py
    +++ b/testsuite/pytests/test_connect_arrays.py
    @@ -313,7 +313,7 @@ def test_connect_arrays_wrong_dtype(self):
             delays = np.ones(n)
             syn_model = "static_synapse"
     
    -        with self.assertRaises(nest.NESTErrors.ArgumentType):
    +        with self.assertRaises(TypeError):
                 nest.Connect(
                     sources,
                     targets,
    diff --git a/testsuite/pytests/test_errors.py b/testsuite/pytests/test_errors.py
    index 32e5fe2c52..9d1acd6cbb 100644
    --- a/testsuite/pytests/test_errors.py
    +++ b/testsuite/pytests/test_errors.py
    @@ -84,7 +84,7 @@ def test_UnknownNode(self):
             nc = nest.Create("iaf_psc_alpha", 10)  # noqa: F841
             nest.ResetKernel()
     
    -        msg = "99 doesn't exist"
    +        msg = "Node with id 99 does not exist."
             self.assertRaisesRegex(nest.NESTError, msg, nest.NodeCollection, [99])
     
         def test_UnknownModel(self):
    diff --git a/testsuite/pytests/test_nodeParametrization.py b/testsuite/pytests/test_nodeParametrization.py
    index cbbd8174f7..5529a90a68 100644
    --- a/testsuite/pytests/test_nodeParametrization.py
    +++ b/testsuite/pytests/test_nodeParametrization.py
    @@ -254,7 +254,7 @@ def test_node_pos_parameter_wrong_dimension(self):
             with self.assertRaises(nest.NESTError):
                 layer.set({"V_m": nest.spatial.pos.n(-1)})
     
    -        with self.assertRaises(nest.NESTError):
    +        with self.assertRaises(ValueError):
                 layer.set({"V_m": nest.spatial.pos.z})
     
         def test_conn_distance_parameter(self):
    @@ -307,7 +307,7 @@ def test_conn_distance_parameter_wrong_dimension(self):
             positions = [[x, x] for x in np.linspace(0, 0.5, 5)]
             layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.free(positions))
     
    -        with self.assertRaises(nest.NESTError):
    +        with self.assertRaises(ValueError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.distance.z})
     
             with self.assertRaises(nest.NESTError):
    @@ -346,13 +346,13 @@ def test_src_tgt_position_parameter_wrong_args(self):
             positions = [[x, x] for x in np.linspace(0.1, 1.0, 5)]
             layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.free(positions))
     
    -        with self.assertRaises(nest.NESTError):
    +        with self.assertRaises(ValueError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.source_pos.z})
     
             with self.assertRaises(nest.NESTError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.source_pos.n(-1)})
     
    -        with self.assertRaises(nest.NESTError):
    +        with self.assertRaises(ValueError):
                 nest.Connect(layer, layer, syn_spec={"weight": nest.spatial.target_pos.z})
     
             with self.assertRaises(nest.NESTError):
    diff --git a/testsuite/pytests/test_sic_connection.py b/testsuite/pytests/test_sic_connection.py
    index a52be31f09..d7141618bb 100644
    --- a/testsuite/pytests/test_sic_connection.py
    +++ b/testsuite/pytests/test_sic_connection.py
    @@ -52,7 +52,7 @@ def test_ConnectNeuronsWithSICConnection(source_model, target_model):
             nest.Connect(source, target, syn_spec={"synapse_model": "sic_connection"})
         else:
             # Connection should fail
    -        with pytest.raises(nest.kernel.NESTError):
    +        with pytest.raises(nest.NESTError):
                 nest.Connect(source, target, syn_spec={"synapse_model": "sic_connection"})
     
     
    diff --git a/testsuite/pytests/test_sp/test_disconnect.py b/testsuite/pytests/test_sp/test_disconnect.py
    index b9ecae27d0..bdf1d658c3 100644
    --- a/testsuite/pytests/test_sp/test_disconnect.py
    +++ b/testsuite/pytests/test_sp/test_disconnect.py
    @@ -100,7 +100,7 @@ def test_synapse_deletion_one_to_one_no_sp(self):
                         conns1 = list(filter(None, conns1))
                     assert len(conns1) == 0
     
    -                with self.assertRaises(nest.NESTErrors.NESTError):
    +                with self.assertRaises(nest.NESTError):
                         nest.Disconnect(neurons[0], neurons[1], syn_spec=syn_dict)
     
         def test_disconnect_synapsecollection(self):
    diff --git a/testsuite/pytests/test_spatial/test_connect_layers.py b/testsuite/pytests/test_spatial/test_connect_layers.py
    index a346c70ccb..ca31aeecb6 100644
    --- a/testsuite/pytests/test_spatial/test_connect_layers.py
    +++ b/testsuite/pytests/test_spatial/test_connect_layers.py
    @@ -292,7 +292,7 @@ def test_connect_kernel_mask_wrong_rule(self):
                 "mask": {"rectangular": {"lower_left": [-5.0, -5.0], "upper_right": [0.1, 0.1]}},
             }
             for conn_spec in [conn_spec_kernel, conn_spec_mask]:
    -            with self.assertRaises(nest.NESTError):
    +            with self.assertRaises(ValueError):
                     nest.Connect(self.layer, self.layer, conn_spec)
     
         def test_connect_oversized_mask(self):
    diff --git a/testsuite/pytests/test_status.py b/testsuite/pytests/test_status.py
    index ec28eac556..33c0bdc591 100644
    --- a/testsuite/pytests/test_status.py
    +++ b/testsuite/pytests/test_status.py
    @@ -109,7 +109,7 @@ def test_SetDefaults(self):
                     self.assertEqual(nest.GetDefaults(model, "V_m"), v_m)
     
                     self.assertRaisesRegex(
    -                    nest.NESTError, "unaccessed", nest.SetDefaults, model, "nonexistent_status_key", 0
    +                    nest.NESTError, "Unaccessed", nest.SetDefaults, model, "nonexistent_status_key", 0
                     )
     
     
    
    From 1b118b23b94791b36469758eabf7e550dc608be8 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:32:47 +0200
    Subject: [PATCH 205/375] Fix comparison between list and single value
    
    ---
     testsuite/pytests/test_spike_transmission.py | 13 ++++++++-----
     1 file changed, 8 insertions(+), 5 deletions(-)
    
    diff --git a/testsuite/pytests/test_spike_transmission.py b/testsuite/pytests/test_spike_transmission.py
    index 215e482138..852bbafeef 100644
    --- a/testsuite/pytests/test_spike_transmission.py
    +++ b/testsuite/pytests/test_spike_transmission.py
    @@ -91,8 +91,9 @@ def test_one_to_one(self, compressed_spikes, num_neurons, num_threads):
             post_pop, spike_data = self._simulate_network(
                 num_neurons, num_neurons, "one_to_one", num_threads, compressed_spikes
             )
    +
             assert sorted(spike_data["senders"]) == sorted(post_pop.tolist())
    -        assert all(spike_data["times"] == self.t_arrival)
    +        assert all(t == self.t_arrival for t in spike_data["times"])  # PYNEST-NG
     
         @pytest.mark.parametrize("compressed_spikes", [False, True])
         @pytest.mark.parametrize("num_neurons", [4, 5])
    @@ -107,8 +108,9 @@ def test_one_to_all(self, compressed_spikes, num_neurons, num_threads):
             """
     
             post_pop, spike_data = self._simulate_network(1, num_neurons, "all_to_all", num_threads, compressed_spikes)
    +
             assert sorted(spike_data["senders"]) == sorted(post_pop.tolist())
    -        assert all(spike_data["times"] == self.t_arrival)
    +        assert all(t == self.t_arrival for t in spike_data["times"])  # PYNEST-NG
     
         @pytest.mark.parametrize("compressed_spikes", [False, True])
         @pytest.mark.parametrize("num_neurons", [4, 5])
    @@ -124,8 +126,9 @@ def test_all_to_one(self, compressed_spikes, num_neurons, num_threads):
     
             post_pop, spike_data = self._simulate_network(num_neurons, 1, "all_to_all", num_threads, compressed_spikes)
             # post_pop is one neuron, which receives a spike from each pre neuron
    -        assert all(spike_data["senders"] == num_neurons * post_pop.tolist())
    -        assert all(spike_data["times"] == self.t_arrival)
    +
    +        assert spike_data["senders"] == num_neurons * post_pop.tolist()
    +        assert all(t == self.t_arrival for t in spike_data["times"])  # PYNEST-NG
     
         @pytest.mark.parametrize("compressed_spikes", [False, True])
         @pytest.mark.parametrize("num_neurons", [4, 5])
    @@ -143,4 +146,4 @@ def test_all_to_all(self, compressed_spikes, num_neurons, num_threads):
                 num_neurons, num_neurons, "all_to_all", num_threads, compressed_spikes
             )
             assert sorted(spike_data["senders"]) == sorted(num_neurons * post_pop.tolist())
    -        assert all(spike_data["times"] == self.t_arrival)
    +        assert all(t == self.t_arrival for t in spike_data["times"])
    
    From 0ca2c9798d460d624e4311718c58699eba5a4224 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:34:19 +0200
    Subject: [PATCH 206/375] Fix single vs. multiple return values
    
    ---
     .../sli2py_stimulating/test_inhomogeneous_poisson_generator.py | 3 +--
     testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py    | 2 +-
     2 files changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    index 363f7fede8..b7563b2f52 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_inhomogeneous_poisson_generator.py
    @@ -65,10 +65,9 @@ def test_offgrid_time_point(prepare_kernel):
     def test_allow_offgrid_time_point(prepare_kernel):
         inh_pg = nest.Create("inhomogeneous_poisson_generator", params={"allow_offgrid_times": True})
         inh_pg.set(rate_times=[1.23], rate_values=[10.0])
    -    defaults = inh_pg.get()
     
         # assert that the rate time is rounded up to the next step
    -    assert defaults["rate_times"] == 1.3
    +    assert inh_pg.rate_times == [1.3]
     
     
     def test_no_allow_offgrid_times_after_rate_set(prepare_kernel):
    diff --git a/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py b/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    index 629cc9b8d6..82b96842bc 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    @@ -195,4 +195,4 @@ def test_recoding_device_status(recording_devices, reference_data_vm, reference_
         nptest.assert_allclose(actual_mm_data, reference_data_mm, rtol=1e-5)
     
         sr_events_times = sr.get("events")["times"]
    -    assert sr_events_times == [2]
    +    assert sr_events_times == 2
    
    From 3c95182bd9a7362d1c4a0bcf33387da0fd10b888 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:34:42 +0200
    Subject: [PATCH 207/375] Fix nonexisting function
    
    ---
     .../pytests/sli2py_stimulating/test_pulsepacket_generator.py    | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    index bc1c7c6e3c..50417efe72 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    @@ -124,4 +124,4 @@ def test_number_of_spikes():
         assert np.max(actual_spikes) <= tstop
     
         # Check number of spikes
    -    assert actual_spikes.size == npsktot
    +    assert len(actual_spikes) == npsktot
    
    From 2ae2eb180e0ae2da4c13f27a16c44da9ab17d5d4 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Thu, 21 Sep 2023 00:35:15 +0200
    Subject: [PATCH 208/375] Fix tuple vs. list vs. nparray
    
    ---
     .../pytests/sli2py_synapses/test_common_props_setting.py      | 4 ++--
     testsuite/pytests/test_aeif_cond_alpha_multisynapse.py        | 4 ++--
     testsuite/pytests/test_multimeter.py                          | 2 +-
     3 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_synapses/test_common_props_setting.py b/testsuite/pytests/sli2py_synapses/test_common_props_setting.py
    index 60fcbef9f7..3a5eebb292 100644
    --- a/testsuite/pytests/sli2py_synapses/test_common_props_setting.py
    +++ b/testsuite/pytests/sli2py_synapses/test_common_props_setting.py
    @@ -54,7 +54,7 @@ def test_setting_common_props_on_original(self, synapse):
             nest.SetDefaults(synapse, expected_values)
     
             actual_values = nest.GetDefaults(synapse, keys=expected_values.keys())
    -        assert actual_values == tuple(expected_values.values())
    +        assert actual_values == list(expected_values.values())
     
         def test_setting_common_props_on_copy(self, synapse):
             copied_syn = f"{synapse}_copy"
    @@ -62,7 +62,7 @@ def test_setting_common_props_on_copy(self, synapse):
             nest.CopyModel(synapse, copied_syn, expected_values)
     
             actual_values = nest.GetDefaults(copied_syn, keys=expected_values.keys())
    -        assert actual_values == tuple(expected_values.values())
    +        assert actual_values == list(expected_values.values())
     
         def test_setting_non_common_props_on_instance(self, synapse):
             neuron = nest.Create("iaf_psc_alpha")
    diff --git a/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py b/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    index 9f7728b433..16ce9af2a9 100644
    --- a/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    +++ b/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    @@ -117,7 +117,7 @@ def test_single_multi_synapse_equivalence(self, have_plotting):
     
             summed_V_m = np.zeros_like(multisynapse_neuron_vm.get("events")["V_m"], dtype=float)
             for i in range(4):
    -            summed_V_m += singlesynapse_neuron_vm[i].get("events")["V_m"] - V_m_steadystate
    +            summed_V_m += singlesynapse_neuron_vm[i].events["V_m"][0] - V_m_steadystate
     
             summed_V_m += V_m_steadystate
     
    @@ -245,7 +245,7 @@ def alpha_function(t, W=1.0, tau=1.0, t0=0.0):
                 tau = tau_syn[i]
                 sim_g = sim_gs[i]
     
    -            theo_g = alpha_function(t, W, tau, t0)
    +            theo_g = alpha_function(np.array(t), W, tau, t0)
     
                 if have_plotting:
                     # plot timeseries as a sanity check
    diff --git a/testsuite/pytests/test_multimeter.py b/testsuite/pytests/test_multimeter.py
    index 33e9fda16a..2ff92f9452 100644
    --- a/testsuite/pytests/test_multimeter.py
    +++ b/testsuite/pytests/test_multimeter.py
    @@ -101,7 +101,7 @@ def test_recordables_are_recorded(model):
     
         result = mm.events
     
    -    for r in recordables + ("times", "senders"):
    +    for r in recordables + ["times", "senders"]:
             assert r in result
             assert len(result[r]) == num_data_expected
     
    
    From c91de25cad5713404496e3bb3b96fd25f54814e0 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 00:26:37 +0200
    Subject: [PATCH 209/375] Fix formatting
    
    ---
     models/rate_connection_instantaneous.h | 8 ++------
     nestkernel/spatial.cpp                 | 1 +
     2 files changed, 3 insertions(+), 6 deletions(-)
    
    diff --git a/models/rate_connection_instantaneous.h b/models/rate_connection_instantaneous.h
    index 144e225f02..9852adef53 100644
    --- a/models/rate_connection_instantaneous.h
    +++ b/models/rate_connection_instantaneous.h
    @@ -148,9 +148,7 @@ class rate_connection_instantaneous : public Connection< targetidentifierT >
       void
       set_delay( double )
       {
    -    throw BadProperty(
    -      "rate_connection_instantaneous has no delay. Please use "
    -      "rate_connection_delayed." );
    +    throw BadProperty( "rate_connection_instantaneous has no delay. Please use rate_connection_delayed." );
       }
     
     private:
    @@ -176,9 +174,7 @@ rate_connection_instantaneous< targetidentifierT >::set_status( const dictionary
       // If the delay is set, we throw a BadProperty
       if ( d.known( names::delay ) )
       {
    -    throw BadProperty(
    -      "rate_connection_instantaneous has no delay. Please use "
    -      "rate_connection_delayed." );
    +    throw BadProperty( "rate_connection_instantaneous has no delay. Please use rate_connection_delayed." );
       }
     
       ConnectionBase::set_status( d, cm );
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index 80779f5d10..cd51709b8d 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -388,6 +388,7 @@ create_mask( const dictionary& mask_dict )
         try
         {
           std::vector< long > anchor = mask_dict.get< std::vector< long > >( names::anchor );
    +
           switch ( anchor.size() )
           {
           case 2:
    
    From 8d4f1e151d86a6dd335fd266d5b3553b292a042e Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 00:29:23 +0200
    Subject: [PATCH 210/375] Modernize exception handling in OpenMP parallel
     regions
    
    ---
     nestkernel/conn_builder.cpp          | 116 ++++++++++++---------------
     nestkernel/conn_builder.h            |   3 +-
     nestkernel/connection_creator_impl.h |  33 ++++----
     nestkernel/connection_manager.cpp    |  17 ++--
     nestkernel/model_manager.cpp         |  18 ++---
     nestkernel/node_manager.cpp          |  90 ++++++++++-----------
     nestkernel/node_manager.h            |   2 +-
     nestkernel/simulation_manager.cpp    |  14 ++--
     nestkernel/sonata_connector.cpp      |  15 ++--
     9 files changed, 145 insertions(+), 163 deletions(-)
    
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index a33646d1b7..3e870ac2b3 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -238,11 +238,11 @@ nest::ConnBuilder::connect()
         }
       }
       // check if any exceptions have been raised
    -  for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( tid ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( tid ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     }
    @@ -260,11 +260,11 @@ nest::ConnBuilder::disconnect()
       }
     
       // check if any exceptions have been raised
    -  for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( tid ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( tid ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     }
    @@ -632,11 +632,10 @@ nest::OneToOneBuilder::connect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -680,11 +679,10 @@ nest::OneToOneBuilder::disconnect_()
             single_disconnect_( snode_id, *target, target_thread );
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -727,11 +725,10 @@ nest::OneToOneBuilder::sp_connect_()
             single_connect_( snode_id, *target, target_thread, rng );
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -767,11 +764,10 @@ nest::OneToOneBuilder::sp_disconnect_()
             single_disconnect_( snode_id, *target, target_thread );
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -823,11 +819,10 @@ nest::AllToAllBuilder::connect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -902,11 +897,10 @@ nest::AllToAllBuilder::sp_connect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -952,11 +946,10 @@ nest::AllToAllBuilder::disconnect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -992,11 +985,10 @@ nest::AllToAllBuilder::sp_disconnect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -1108,11 +1100,10 @@ nest::FixedInDegreeBuilder::connect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -1284,11 +1275,10 @@ nest::FixedOutDegreeBuilder::connect_()
               single_connect_( snode_id, *target, tid, rng );
             }
           }
    -      catch ( std::exception& err )
    +      catch ( ... )
           {
    -        // We must create a new exception here, err's lifetime ends at
    -        // the end of the catch block.
    -        exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +        // Capture the current exception object and create an std::exception_ptr
    +        exceptions_raised_.at( tid ) = std::current_exception();
           }
         }
       }
    @@ -1454,11 +1444,10 @@ nest::FixedTotalNumberBuilder::connect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -1537,11 +1526,10 @@ nest::BernoulliBuilder::connect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       } // of omp parallel
     }
    @@ -1696,11 +1684,10 @@ nest::SymmetricBernoulliBuilder::connect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    @@ -1736,11 +1723,11 @@ nest::SPBuilder::sp_connect( const std::vector< size_t >& sources, const std::ve
       connect_( sources, targets );
     
       // check if any exceptions have been raised
    -  for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( tid ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( tid ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     }
    @@ -1800,11 +1787,10 @@ nest::SPBuilder::connect_( const std::vector< size_t >& sources, const std::vect
             single_connect_( *snode_id_it, *target, tid, rng );
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       }
     }
    diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h
    index 380b299689..082f94af7a 100644
    --- a/nestkernel/conn_builder.h
    +++ b/nestkernel/conn_builder.h
    @@ -33,6 +33,7 @@
     // C++ includes:
     #include <map>
     #include <set>
    +#include <stdexcept>
     #include <vector>
     
     // Includes from nestkernel:
    @@ -203,7 +204,7 @@ class ConnBuilder
       bool creates_symmetric_connections_;
     
       //! buffer for exceptions raised in threads
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_;
    +  std::vector< std::exception_ptr > exceptions_raised_;
     
       // Name of the pre synaptic and postsynaptic elements for this connection builder
       std::string pre_synaptic_element_name_;
    diff --git a/nestkernel/connection_creator_impl.h b/nestkernel/connection_creator_impl.h
    index 233b2171ec..aa11b200ff 100644
    --- a/nestkernel/connection_creator_impl.h
    +++ b/nestkernel/connection_creator_impl.h
    @@ -198,7 +198,7 @@ ConnectionCreator::pairwise_bernoulli_on_source_( Layer< D >& source,
         pool.define( source.get_global_positions_vector( source_nc ) );
       }
     
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() );
    +  std::vector< std::exception_ptr > exceptions_raised_( kernel().vp_manager.get_num_threads() );
     
     // sharing specs on next line commented out because gcc 4.2 cannot handle them
     #pragma omp parallel // default(none) shared(source, target, masked_layer,
    @@ -230,20 +230,19 @@ ConnectionCreator::pairwise_bernoulli_on_source_( Layer< D >& source,
             }
           } // for target_begin
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( thread_id ) =
    -        std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       } // omp parallel
    +
       // check if any exceptions have been raised
    -  for ( size_t thr = 0; thr < kernel().vp_manager.get_num_threads(); ++thr )
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( thr ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( thr ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     }
    @@ -277,7 +276,7 @@ ConnectionCreator::pairwise_bernoulli_on_target_( Layer< D >& source,
         pool.define( source.get_global_positions_vector( source_nc ) );
       }
     
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() );
    +  std::vector< std::exception_ptr > exceptions_raised_( kernel().vp_manager.get_num_threads() );
     
       // We only need to check the first in the NodeCollection
       Node* const first_in_tgt = kernel().node_manager.get_node_or_proxy( target_nc->operator[]( 0 ) );
    @@ -319,19 +318,19 @@ ConnectionCreator::pairwise_bernoulli_on_target_( Layer< D >& source,
     
           } // end for
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at the end of the catch block.
    -      exceptions_raised_.at( thread_id ) =
    -        std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       } // omp parallel
    +
       // check if any exceptions have been raised
    -  for ( size_t thr = 0; thr < kernel().vp_manager.get_num_threads(); ++thr )
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( thr ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( thr ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     }
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 549bcfd842..4d842fc320 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -624,7 +624,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
       set_connections_have_changed();
     
       // Vector for storing exceptions raised by threads.
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised( kernel().vp_manager.get_num_threads() );
    +  std::vector< std::exception_ptr > exceptions_raised( kernel().vp_manager.get_num_threads() );
     
     #pragma omp parallel
       {
    @@ -707,18 +707,19 @@ nest::ConnectionManager::connect_arrays( long* sources,
             increment_wd( w, d );
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at the end of the catch block.
    -      exceptions_raised.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised.at( tid ) = std::current_exception();
         }
    -  }
    +  } // omp parallel
    +
       // check if any exceptions have been raised
    -  for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
    +  for ( auto eptr : exceptions_raised )
       {
    -    if ( exceptions_raised.at( tid ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised.at( tid ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     
    diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp
    index 16dff44485..925b50ad9e 100644
    --- a/nestkernel/model_manager.cpp
    +++ b/nestkernel/model_manager.cpp
    @@ -328,7 +328,7 @@ ModelManager::set_synapse_defaults_( size_t model_id, const dictionary& params )
     
       assert_valid_syn_id( model_id );
     
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() );
    +  std::vector< std::exception_ptr > exceptions_raised_( kernel().vp_manager.get_num_threads() );
     
     // We have to run this in parallel to set the status on nodes that exist on each
     // thread, such as volume_transmitter.
    @@ -340,19 +340,19 @@ ModelManager::set_synapse_defaults_( size_t model_id, const dictionary& params )
         {
           connection_models_[ tid ][ model_id ]->set_status( params );
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
    -  }
    +  } // omp parallel
     
    -  for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
    +  // check if any exceptions have been raised
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( tid ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( tid ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index 65d6f7c293..af9b342054 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -135,8 +135,7 @@ NodeManager::add_node( size_t model_id, long n )
       kernel().modelrange_manager.add_range( model_id, min_node_id, max_node_id );
     
       // clear any exceptions from previous call
    -  std::vector< std::shared_ptr< WrappedThreadException > >( kernel().vp_manager.get_num_threads() )
    -    .swap( exceptions_raised_ );
    +  std::vector< std::exception_ptr >( kernel().vp_manager.get_num_threads() ).swap( exceptions_raised_ );
     
       auto nc_ptr = NodeCollectionPTR( new NodeCollectionPrimitive( min_node_id, max_node_id, model_id ) );
       append_node_collection_( nc_ptr );
    @@ -155,11 +154,11 @@ NodeManager::add_node( size_t model_id, long n )
       }
     
       // check if any exceptions have been raised
    -  for ( size_t t = 0; t < kernel().vp_manager.get_num_threads(); ++t )
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( t ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( t ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     
    @@ -197,38 +196,37 @@ NodeManager::add_neurons_( Model& model, size_t min_node_id, size_t max_node_id
     
     #pragma omp parallel
       {
    -    const size_t t = kernel().vp_manager.get_thread_id();
    +    const size_t tid = kernel().vp_manager.get_thread_id();
     
         try
         {
    -      model.reserve_additional( t, max_new_per_thread );
    +      model.reserve_additional( tid, max_new_per_thread );
           // Need to find smallest node ID with:
           //   - node ID local to this vp
           //   - node_id >= min_node_id
    -      const size_t vp = kernel().vp_manager.thread_to_vp( t );
    +      const size_t vp = kernel().vp_manager.thread_to_vp( tid );
           const size_t min_node_id_vp = kernel().vp_manager.node_id_to_vp( min_node_id );
     
           size_t node_id = min_node_id + ( num_vps + vp - min_node_id_vp ) % num_vps;
     
           while ( node_id <= max_node_id )
           {
    -        Node* node = model.create( t );
    +        Node* node = model.create( tid );
             node->set_node_id_( node_id );
             node->set_model_id( model.get_model_id() );
    -        node->set_thread( t );
    +        node->set_thread( tid );
             node->set_vp( vp );
             node->set_initialized();
     
    -        local_nodes_[ t ].add_local_node( *node );
    +        local_nodes_[ tid ].add_local_node( *node );
             node_id += num_vps;
           }
    -      local_nodes_[ t ].set_max_node_id( max_node_id );
    +      local_nodes_[ tid ].set_max_node_id( max_node_id );
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( t ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       } // omp parallel
     }
    @@ -240,33 +238,32 @@ NodeManager::add_devices_( Model& model, size_t min_node_id, size_t max_node_id
     
     #pragma omp parallel
       {
    -    const size_t t = kernel().vp_manager.get_thread_id();
    +    const size_t tid = kernel().vp_manager.get_thread_id();
         try
         {
    -      model.reserve_additional( t, n_per_thread );
    +      model.reserve_additional( tid, n_per_thread );
     
           for ( size_t node_id = min_node_id; node_id <= max_node_id; ++node_id )
           {
             // keep track of number of thread local devices
    -        ++num_thread_local_devices_[ t ];
    +        ++num_thread_local_devices_[ tid ];
     
    -        Node* node = model.create( t );
    +        Node* node = model.create( tid );
             node->set_node_id_( node_id );
             node->set_model_id( model.get_model_id() );
    -        node->set_thread( t );
    -        node->set_vp( kernel().vp_manager.thread_to_vp( t ) );
    -        node->set_local_device_id( num_thread_local_devices_[ t ] - 1 );
    +        node->set_thread( tid );
    +        node->set_vp( kernel().vp_manager.thread_to_vp( tid ) );
    +        node->set_local_device_id( num_thread_local_devices_[ tid ] - 1 );
             node->set_initialized();
     
    -        local_nodes_[ t ].add_local_node( *node );
    +        local_nodes_[ tid ].add_local_node( *node );
           }
    -      local_nodes_[ t ].set_max_node_id( max_node_id );
    +      local_nodes_[ tid ].set_max_node_id( max_node_id );
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( t ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       } // omp parallel
     }
    @@ -276,34 +273,33 @@ NodeManager::add_music_nodes_( Model& model, size_t min_node_id, size_t max_node
     {
     #pragma omp parallel
       {
    -    const size_t t = kernel().vp_manager.get_thread_id();
    +    const size_t tid = kernel().vp_manager.get_thread_id();
         try
         {
    -      if ( t == 0 )
    +      if ( tid == 0 )
           {
             for ( size_t node_id = min_node_id; node_id <= max_node_id; ++node_id )
             {
               // keep track of number of thread local devices
    -          ++num_thread_local_devices_[ t ];
    +          ++num_thread_local_devices_[ tid ];
     
               Node* node = model.create( 0 );
               node->set_node_id_( node_id );
               node->set_model_id( model.get_model_id() );
               node->set_thread( 0 );
               node->set_vp( kernel().vp_manager.thread_to_vp( 0 ) );
    -          node->set_local_device_id( num_thread_local_devices_[ t ] - 1 );
    +          node->set_local_device_id( num_thread_local_devices_[ tid ] - 1 );
               node->set_initialized();
     
               local_nodes_[ 0 ].add_local_node( *node );
             }
           }
    -      local_nodes_.at( t ).set_max_node_id( max_node_id );
    +      local_nodes_.at( tid ).set_max_node_id( max_node_id );
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( t ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       } // omp parallel
     }
    @@ -643,17 +639,17 @@ NodeManager::prepare_nodes()
       size_t num_active_nodes = 0;     // counts nodes that will be updated
       size_t num_active_wfr_nodes = 0; // counts nodes that use waveform relaxation
     
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised( kernel().vp_manager.get_num_threads() );
    +  std::vector< std::exception_ptr > exceptions_raised( kernel().vp_manager.get_num_threads() );
     
     #pragma omp parallel reduction( + : num_active_nodes, num_active_wfr_nodes )
       {
    -    size_t t = kernel().vp_manager.get_thread_id();
    +    size_t tid = kernel().vp_manager.get_thread_id();
     
         // We prepare nodes in a parallel region. Therefore, we need to catch
         // exceptions here and then handle them after the parallel region.
         try
         {
    -      for ( SparseNodeArray::const_iterator it = local_nodes_[ t ].begin(); it != local_nodes_[ t ].end(); ++it )
    +      for ( SparseNodeArray::const_iterator it = local_nodes_[ tid ].begin(); it != local_nodes_[ tid ].end(); ++it )
           {
             prepare_node_( ( it )->get_node() );
             if ( not( it->get_node() )->is_frozen() )
    @@ -666,19 +662,19 @@ NodeManager::prepare_nodes()
             }
           }
         }
    -    catch ( std::exception& e )
    +    catch ( ... )
         {
    -      // so throw the exception after parallel region
    -      exceptions_raised.at( t ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( e ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised.at( tid ) = std::current_exception();
         }
       } // omp parallel
     
       // check if any exceptions have been raised
    -  for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
    +  for ( auto eptr : exceptions_raised )
       {
    -    if ( exceptions_raised.at( tid ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised.at( tid ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     
    diff --git a/nestkernel/node_manager.h b/nestkernel/node_manager.h
    index 49fefb4933..43907ed19d 100644
    --- a/nestkernel/node_manager.h
    +++ b/nestkernel/node_manager.h
    @@ -353,7 +353,7 @@ class NodeManager : public ManagerInterface
                                 //!< since startup or last call to simulate
     
       //! Store exceptions raised in thread-parallel sections for later handling
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_;
    +  std::vector< std::exception_ptr > exceptions_raised_;
     
       // private stop watch for benchmarking purposes
       Stopwatch sw_construction_create_;
    diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp
    index 81b7c3cd38..ea8d355953 100644
    --- a/nestkernel/simulation_manager.cpp
    +++ b/nestkernel/simulation_manager.cpp
    @@ -793,7 +793,7 @@ nest::SimulationManager::update_()
       double start_current_update = sw_simulate_.elapsed();
       bool update_time_limit_exceeded = false;
     
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised( kernel().vp_manager.get_num_threads() );
    +  std::vector< std::exception_ptr > exceptions_raised( kernel().vp_manager.get_num_threads() );
     
     // parallel section begins
     #pragma omp parallel
    @@ -1089,10 +1089,10 @@ nest::SimulationManager::update_()
             node->update_synaptic_elements( Time( Time::step( clock_.get_steps() + to_step_ ) ).get_ms() );
           }
         }
    -    catch ( std::exception& e )
    +    catch ( ... )
         {
    -      // so throw the exception after parallel region
    -      exceptions_raised.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( e ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised.at( tid ) = std::current_exception();
         }
       } // of omp parallel
     
    @@ -1103,13 +1103,13 @@ nest::SimulationManager::update_()
       }
     
       // check if any exceptions have been raised
    -  for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
    +  for ( auto eptr : exceptions_raised )
       {
    -    if ( exceptions_raised.at( tid ).get() )
    +    if ( eptr )
         {
           simulating_ = false; // must mark this here, see #311
           inconsistent_state_ = true;
    -      throw WrappedThreadException( *( exceptions_raised.at( tid ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     }
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index 2192a8403a..417467f059 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -409,7 +409,7 @@ SonataConnector::connect_chunk_( const hsize_t hyperslab_size, const hsize_t off
         read_subset_( delay_dset_, delay_data_subset, H5::PredType::NATIVE_DOUBLE, hyperslab_size, offset );
       }
     
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() );
    +  std::vector< std::exception_ptr > exceptions_raised_( kernel().vp_manager.get_num_threads() );
     
       // Retrieve the correct NodeCollections
       const auto nest_nodes = boost::any_cast< dictionary >( graph_specs_.at( "nodes" ) );
    @@ -464,20 +464,20 @@ SonataConnector::connect_chunk_( const hsize_t hyperslab_size, const hsize_t off
           } // end for
         }   // end try
     
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // Capture the current exception object and create an std::exception_ptr
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
     
       } // end parallel region
     
       // Check if any exceptions have been raised
    -  for ( size_t thr = 0; thr < kernel().vp_manager.get_num_threads(); ++thr )
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( thr ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( thr ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     
    @@ -666,7 +666,6 @@ SonataConnector::reset_params_()
       edge_type_id_2_syn_spec_.clear();
       edge_type_id_2_param_dicts_.clear();
     }
    -//*/
     
     } // end namespace nest
     
    
    From 20d793c1065f4e0c00d579b1a4110c6d97df1ade Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 00:31:08 +0200
    Subject: [PATCH 211/375] Reorganize
    
    ---
     nestkernel/exceptions.h | 49 +++++++++++++++++++++++------------------
     1 file changed, 27 insertions(+), 22 deletions(-)
    
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 687bae3106..2cc23ac513 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -65,6 +65,9 @@ class Event;
     
     /**
      * Base class for all Kernel exceptions.
    + *
    + * std::runtime_error will handle the error string, so there is no need
    + * to override what()
      * @ingroup Exceptions
      * @ingroup KernelExceptions
      */
    @@ -88,6 +91,30 @@ class KernelException : public std::runtime_error
       }
     };
     
    +
    +/**
    + * Class for packaging exceptions thrown in threads.
    + *
    + * This class is used to wrap exceptions thrown in threads.
    + * It essentially packages the message of the wrapped exception,
    + * avoiding the need of a clone() operation for each exception type.
    + * @ingroup KernelExceptions
    + */
    +class WrappedThreadException : public KernelException
    +{
    +public:
    +  explicit WrappedThreadException( const std::exception& e )
    +    : KernelException( e.what() )
    +  {
    +  }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "WrappedThreadException";
    +  }
    +};
    +
     /**
      * Exception to be thrown if a feature is unavailable.
      * @ingroup KernelExceptions
    @@ -137,28 +164,6 @@ class TypeMismatch : public KernelException
       }
     };
     
    -/**
    - * Class for packaging exceptions thrown in threads.
    - *
    - * This class is used to wrap exceptions thrown in threads.
    - * It essentially packages the message of the wrapped exception,
    - * avoiding the need of a clone() operation for each exception type.
    - * @ingroup KernelExceptions
    - */
    -class WrappedThreadException : public KernelException
    -{
    -public:
    -  explicit WrappedThreadException( const std::exception& e )
    -    : KernelException( e.what() )
    -  {
    -  }
    -
    -  std::string
    -  exception_name() override
    -  {
    -    return "WrappedThreadException";
    -  }
    -};
     
     /**
      * @brief Not all elements in a dictionary have been accessed.
    
    From 069703298fa5b8701a3eedef151f72e1a9c95e4c Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 00:31:43 +0200
    Subject: [PATCH 212/375] Additional C++ exception handler
    
    ---
     pynest/nestkernel_exceptions.h | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/pynest/nestkernel_exceptions.h b/pynest/nestkernel_exceptions.h
    index fcd06548df..1de27fdb8e 100644
    --- a/pynest/nestkernel_exceptions.h
    +++ b/pynest/nestkernel_exceptions.h
    @@ -21,6 +21,7 @@
      */
     
     #include <Python.h>
    +#include <exception>
     #include <ios>
     #include <stdexcept>
     
    @@ -71,6 +72,10 @@ custom_exception_handler()
       {
         PyErr_SetString( nest_exceptions_map[ exn.exception_name() ], exn.what() );
       }
    +  catch ( std::exception& exc )
    +  {
    +    PyErr_SetString( PyExc_RuntimeError, ( std::string( "C++ exception: " ) + exc.what() ).c_str() );
    +  }
       catch ( ... )
       {
         PyErr_SetString( PyExc_RuntimeError, "Unexpected C++ exception" );
    
    From decb75d091506821d6d7b65f1fb51c3188225231 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 00:32:11 +0200
    Subject: [PATCH 213/375] Update tests for PyNEST-NG
    
    ---
     .../pytests/sli2py_regressions/test_issue_2282.py |  2 +-
     .../pytests/sli2py_regressions/test_issue_545.py  | 15 ++++++++++++---
     testsuite/pytests/test_parrot_neuron.py           | 13 ++++++++++---
     testsuite/pytests/test_poisson_generator_ps.py    |  4 ++--
     testsuite/pytests/test_sonata.py                  |  2 +-
     5 files changed, 26 insertions(+), 10 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2282.py b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    index 87d477cea5..838db5e136 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    @@ -54,7 +54,7 @@ def simulator(num_threads):
     
         nest.Simulate(2.0)
     
    -    recording = mm.events.get("I")
    +    recording = np.array(mm.events.get("I"))
     
         return recording
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_545.py b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    index a5d5bc0353..173b871b5f 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_545.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    @@ -26,21 +26,30 @@
     import nest
     import pytest
     
    +pytestmark = pytest.mark.skipif_missing_threads
     
    -@pytest.mark.skipif_missing_threads
    -def test_setters_raise_error_on_bad_properties():
    +
    +@pytest.fixture(autouse=True)
    +def set_kernel():
         nest.ResetKernel()
         nest.local_num_threads = 4
     
    +
    +def test_set_bad_property_on_default_raises():
         # test defaults
         with pytest.raises(nest.NESTErrors.TypeMismatch):
             nest.SetDefaults("iaf_psc_alpha", {"tau_m": -10})
     
    +
    +def test_set_bad_property_on_neuron_raises():
         # test neuron
         n = nest.Create("iaf_psc_alpha")
         with pytest.raises(nest.NESTErrors.TypeMismatch):
             n.set({"tau_m": -10})
     
    +
    +def test_set_bad_property_on_synapse_raises():
         # test synapse
    -    with pytest.raises(nest.NESTErrors.TypeMismatch):
    +    n = nest.Create("iaf_psc_alpha")
    +    with pytest.raises(nest.NESTErrors.BadDelay):
             nest.Connect(n, n, syn_spec={"delay": -10})
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index 5027713bcb..bca1ad8ca9 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -26,6 +26,7 @@
     import unittest
     
     import nest
    +import numpy as np
     
     
     class ParrotNeuronTestCase(unittest.TestCase):
    @@ -55,7 +56,9 @@ def test_ParrotNeuronRepeatSpike(self):
     
             # get spike from parrot neuron
             events = self.spikes.events
    -        post_time = events["times"][events["senders"] == self.parrot.global_id]
    +        times = np.array(events["times"])
    +        senders = np.array(events["senders"])
    +        post_time = times[senders == self.parrot.global_id]
     
             # assert spike was repeated at correct time
             assert post_time, "Parrot neuron failed to repeat spike."
    @@ -70,7 +73,9 @@ def test_ParrotNeuronIgnoreSpike(self):
     
             # get spike from parrot neuron, assert it was ignored
             events = self.spikes.events
    -        post_time = events["times"][events["senders"] == self.parrot.global_id]
    +        times = np.array(events["times"])
    +        senders = np.array(events["senders"])
    +        post_time = times[senders == self.parrot.global_id]
             assert len(post_time) == 0, "Parrot neuron failed to ignore spike arriving on port 1"
     
         def test_ParrotNeuronOutgoingMultiplicity(self):
    @@ -88,7 +93,9 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
     
             # get spikes from parrot neuron, assert two were transmitted
             events = self.spikes.events
    -        post_times = events["times"][events["senders"] == self.parrot.global_id]
    +        times = np.array(events["times"])
    +        senders = np.array(events["senders"])
    +        post_times = times[senders == self.parrot.global_id]
             assert (
                 len(post_times) == 2 and post_times[0] == post_times[1]
             ), "Parrot neuron failed to correctly repeat multiple spikes."
    diff --git a/testsuite/pytests/test_poisson_generator_ps.py b/testsuite/pytests/test_poisson_generator_ps.py
    index 4ebb36776c..85265a84a8 100644
    --- a/testsuite/pytests/test_poisson_generator_ps.py
    +++ b/testsuite/pytests/test_poisson_generator_ps.py
    @@ -56,8 +56,8 @@ def test_poisson_generator_ps():
     
         nest.Simulate(1000.0)
     
    -    times1 = sr1.events["times"]
    -    times2 = sr2.events["times"]
    +    times1 = np.array(sr1.events["times"])
    +    times2 = np.array(sr2.events["times"])
         assert not np.array_equal(times1, times2)
     
         # check there are no spikes between stop and start time
    diff --git a/testsuite/pytests/test_sonata.py b/testsuite/pytests/test_sonata.py
    index 2b5ddd5155..11c1efeeff 100644
    --- a/testsuite/pytests/test_sonata.py
    +++ b/testsuite/pytests/test_sonata.py
    @@ -33,7 +33,7 @@
     #   while the data is in $INSTALLDIR/share/doc/nest/examples/pynest/sonata_example.
     # - When running from the source dir, this file is in $SOURCEDIR/testsuite/pytests,
     #   while the data is in $SOURCEDIR/pynest/examples/sonata_example.
    -for relpath in ["../../../doc/nest/examples/pynest", "../../examples"]:
    +for relpath in ["../../../doc/nest/examples", "../../examples"]:
         sonata_path = Path(__file__).parent / relpath / "sonata_example" / "300_pointneurons"
         config = sonata_path / "circuit_config.json"
         sim_config = sonata_path / "simulation_config.json"
    
    From fc9090986c5be5947e7d2f58bb2c2397e0530db0 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 00:46:34 +0200
    Subject: [PATCH 214/375] Rename thread_id -> tid for consistency across
     codebase
    
    ---
     nestkernel/connection_creator_impl.h | 17 ++++++++---------
     1 file changed, 8 insertions(+), 9 deletions(-)
    
    diff --git a/nestkernel/connection_creator_impl.h b/nestkernel/connection_creator_impl.h
    index aa11b200ff..f62d742eb5 100644
    --- a/nestkernel/connection_creator_impl.h
    +++ b/nestkernel/connection_creator_impl.h
    @@ -204,7 +204,7 @@ ConnectionCreator::pairwise_bernoulli_on_source_( Layer< D >& source,
     #pragma omp parallel // default(none) shared(source, target, masked_layer,
                          // target_begin, target_end)
       {
    -    const int thread_id = kernel().vp_manager.get_thread_id();
    +    const int tid = kernel().vp_manager.get_thread_id();
         try
         {
           NodeCollection::const_iterator target_begin = target_nc->begin();
    @@ -212,7 +212,7 @@ ConnectionCreator::pairwise_bernoulli_on_source_( Layer< D >& source,
     
           for ( NodeCollection::const_iterator tgt_it = target_begin; tgt_it < target_end; ++tgt_it )
           {
    -        Node* const tgt = kernel().node_manager.get_node_or_proxy( ( *tgt_it ).node_id, thread_id );
    +        Node* const tgt = kernel().node_manager.get_node_or_proxy( ( *tgt_it ).node_id, tid );
     
             if ( not tgt->is_proxy() )
             {
    @@ -220,12 +220,11 @@ ConnectionCreator::pairwise_bernoulli_on_source_( Layer< D >& source,
     
               if ( mask_.get() )
               {
    -            connect_to_target_(
    -              pool.masked_begin( target_pos ), pool.masked_end(), tgt, target_pos, thread_id, source );
    +            connect_to_target_( pool.masked_begin( target_pos ), pool.masked_end(), tgt, target_pos, tid, source );
               }
               else
               {
    -            connect_to_target_( pool.begin(), pool.end(), tgt, target_pos, thread_id, source );
    +            connect_to_target_( pool.begin(), pool.end(), tgt, target_pos, tid, source );
               }
             }
           } // for target_begin
    @@ -289,7 +288,7 @@ ConnectionCreator::pairwise_bernoulli_on_target_( Layer< D >& source,
     #pragma omp parallel // default(none) shared(source, target, masked_layer,
                          // target_begin, target_end)
       {
    -    const int thread_id = kernel().vp_manager.get_thread_id();
    +    const int tid = kernel().vp_manager.get_thread_id();
         try
         {
           NodeCollection::const_iterator target_begin = target_nc->local_begin();
    @@ -297,7 +296,7 @@ ConnectionCreator::pairwise_bernoulli_on_target_( Layer< D >& source,
     
           for ( NodeCollection::const_iterator tgt_it = target_begin; tgt_it < target_end; ++tgt_it )
           {
    -        Node* const tgt = kernel().node_manager.get_node_or_proxy( ( *tgt_it ).node_id, thread_id );
    +        Node* const tgt = kernel().node_manager.get_node_or_proxy( ( *tgt_it ).node_id, tid );
     
             assert( not tgt->is_proxy() );
     
    @@ -307,13 +306,13 @@ ConnectionCreator::pairwise_bernoulli_on_target_( Layer< D >& source,
             {
               // We do the same as in the target driven case, except that we calculate displacements in the target layer.
               // We therefore send in target as last parameter.
    -          connect_to_target_( pool.masked_begin( target_pos ), pool.masked_end(), tgt, target_pos, thread_id, target );
    +          connect_to_target_( pool.masked_begin( target_pos ), pool.masked_end(), tgt, target_pos, tid, target );
             }
             else
             {
               // We do the same as in the target driven case, except that we calculate displacements in the target layer.
               // We therefore send in target as last parameter.
    -          connect_to_target_( pool.begin(), pool.end(), tgt, target_pos, thread_id, target );
    +          connect_to_target_( pool.begin(), pool.end(), tgt, target_pos, tid, target );
             }
     
           } // end for
    
    From e2c895100cfc3ce042db014995e4499aaae70765 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 10:16:13 +0200
    Subject: [PATCH 215/375] Update threaded exception handling
    
    ---
     nestkernel/recording_backend_sionlib.cpp | 32 ++++++++++--------------
     1 file changed, 13 insertions(+), 19 deletions(-)
    
    diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp
    index 936d261c97..7c8192da33 100644
    --- a/nestkernel/recording_backend_sionlib.cpp
    +++ b/nestkernel/recording_backend_sionlib.cpp
    @@ -146,6 +146,8 @@ nest::RecordingBackendSIONlib::open_files_()
         return;
       }
     
    +  std::vector< std::exception_ptr > exceptions_raised( kernel().vp_manager.get_num_threads() );
    +
     #pragma omp parallel
       {
         local_comm_ = MPI_COMM_NULL;
    @@ -162,12 +164,8 @@ nest::RecordingBackendSIONlib::open_files_()
         // avoid problems when calling sion_paropen_ompi(..)
         MPI_Comm local_comm = local_comm_;
     
    -    // we need to delay the throwing of exceptions to the end of the parallel
    -    // section
    -    WrappedThreadException* we = nullptr;
    -
         // This code is executed in a parallel region (opened above)!
    -    const size_t t = kernel().vp_manager.get_thread_id();
    +    const size_t tid = kernel().vp_manager.get_thread_id();
         const size_t task = kernel().vp_manager.thread_to_vp( t );
         if ( not task )
         {
    @@ -176,7 +174,7 @@ nest::RecordingBackendSIONlib::open_files_()
     
         // set n_rec counters to zero in every device on every thread
         device_map::value_type::iterator it;
    -    for ( it = devices_[ t ].begin(); it != devices_[ t ].end(); ++it )
    +    for ( it = devices_[ tid ].begin(); it != devices_[ tid ].end(); ++it )
         {
           it->second.info.n_rec = 0;
         }
    @@ -233,24 +231,20 @@ nest::RecordingBackendSIONlib::open_files_()
     
           filename_ = filename;
         }
    -    catch ( std::exception& e )
    +    catch ( ... )
         {
    -#pragma omp critical
    -      if ( not we )
    -      {
    -        we = new WrappedThreadException( e );
    -      }
    +      exceptions_raised.at( tid ) = std::current_exception;
         }
    +  } // parallel region
     
    -    // check if any exceptions have been raised
    -    if ( we )
    +  // check if any exceptions have been raised
    +  for ( eptr : exceptions_raised )
    +  {
    +    if ( eptr )
         {
    -      WrappedThreadException wec( *we );
    -      delete we;
    -      throw wec;
    +      std::rethrow_exception( eptr );
         }
    -  } // parallel region
    -
    +  }
       files_opened_ = true;
     }
     
    
    From a1a45f182069a8f45779c06ec43a8a52ce97271a Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 10:16:36 +0200
    Subject: [PATCH 216/375] Remove WrappedThreadException
    
    ---
     nestkernel/exceptions.h | 24 ------------------------
     1 file changed, 24 deletions(-)
    
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 2cc23ac513..0e5ef157e2 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -91,30 +91,6 @@ class KernelException : public std::runtime_error
       }
     };
     
    -
    -/**
    - * Class for packaging exceptions thrown in threads.
    - *
    - * This class is used to wrap exceptions thrown in threads.
    - * It essentially packages the message of the wrapped exception,
    - * avoiding the need of a clone() operation for each exception type.
    - * @ingroup KernelExceptions
    - */
    -class WrappedThreadException : public KernelException
    -{
    -public:
    -  explicit WrappedThreadException( const std::exception& e )
    -    : KernelException( e.what() )
    -  {
    -  }
    -
    -  std::string
    -  exception_name() override
    -  {
    -    return "WrappedThreadException";
    -  }
    -};
    -
     /**
      * Exception to be thrown if a feature is unavailable.
      * @ingroup KernelExceptions
    
    From 7d347c6fb1df29e86b957a1132f0614b801c8793 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 13:00:48 +0200
    Subject: [PATCH 217/375] Fix typo
    
    ---
     nestkernel/recording_backend_sionlib.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp
    index 7c8192da33..183b41fa30 100644
    --- a/nestkernel/recording_backend_sionlib.cpp
    +++ b/nestkernel/recording_backend_sionlib.cpp
    @@ -233,7 +233,7 @@ nest::RecordingBackendSIONlib::open_files_()
         }
         catch ( ... )
         {
    -      exceptions_raised.at( tid ) = std::current_exception;
    +      exceptions_raised.at( tid ) = std::current_exception();
         }
       } // parallel region
     
    
    From 64af5c75d50f84a3d4f18ac3c0cdbc3b5a18ae12 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 13:06:10 +0200
    Subject: [PATCH 218/375] Fix typo
    
    ---
     testsuite/pytests/test_sic_connection.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/test_sic_connection.py b/testsuite/pytests/test_sic_connection.py
    index d7141618bb..310251cf8d 100644
    --- a/testsuite/pytests/test_sic_connection.py
    +++ b/testsuite/pytests/test_sic_connection.py
    @@ -63,7 +63,7 @@ def test_SynapseFunctionWithAeifModel():
         resol = nest.resolution
     
         # Create neurons and devices
    -    astrocyte = nest.Create("astrocyte_lr_1994", params{"Ca": 0.2})  # a calcium value which produces SIC
    +    astrocyte = nest.Create("astrocyte_lr_1994", params={"Ca": 0.2})  # a calcium value which produces SIC
         neuron = nest.Create("aeif_cond_alpha_astro")
     
         mm_neuron = nest.Create("multimeter", params={"record_from": ["I_SIC"], "interval": resol})
    
    From 720475af8a9dc67b0a9f3610492b34e6555ffd3c Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 13:27:15 +0200
    Subject: [PATCH 219/375] Fix flake8 warnings
    
    ---
     pynest/nest/lib/hl_api_connection_helpers.py         | 2 +-
     pynest/nest/lib/hl_api_models.py                     | 3 ++-
     pynest/nest/lib/hl_api_nodes.py                      | 2 +-
     pynest/nest/lib/hl_api_parallel_computing.py         | 2 +-
     pynest/nest/lib/hl_api_simulation.py                 | 4 ++--
     pynest/nest/lib/hl_api_sonata.py                     | 3 ++-
     pynest/nest/lib/hl_api_types.py                      | 2 +-
     testsuite/pytests/test_spatial/test_layer_get_set.py | 2 +-
     testsuite/pytests/test_stdp_nn_synapses.py           | 1 -
     9 files changed, 11 insertions(+), 10 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py
    index 0247d7e4a7..4824ea4c4e 100644
    --- a/pynest/nest/lib/hl_api_connection_helpers.py
    +++ b/pynest/nest/lib/hl_api_connection_helpers.py
    @@ -28,7 +28,7 @@
     import numpy as np
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *
    +from ..ll_api import *  # noqa
     from .hl_api_types import CollocatedSynapses, Mask, NodeCollection, Parameter
     
     __all__ = [
    diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py
    index ce3be14357..4ee77e48a8 100644
    --- a/pynest/nest/lib/hl_api_models.py
    +++ b/pynest/nest/lib/hl_api_models.py
    @@ -24,8 +24,9 @@
     """
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *
    +from ..ll_api import *  # noqa
     from .hl_api_helper import deprecated, is_iterable, model_deprecation_warning
    +from .hl_api_simulation import GetKernelStatus
     from .hl_api_types import to_json
     
     __all__ = [
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index a74da6a8e6..ff9da97c42 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -29,7 +29,7 @@
     import numpy as np
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *
    +from ..ll_api import *  # noqa
     from .hl_api_helper import is_iterable, model_deprecation_warning
     from .hl_api_parallel_computing import NumProcesses, Rank
     from .hl_api_types import NodeCollection, Parameter
    diff --git a/pynest/nest/lib/hl_api_parallel_computing.py b/pynest/nest/lib/hl_api_parallel_computing.py
    index 44d489043a..73c02c51ff 100644
    --- a/pynest/nest/lib/hl_api_parallel_computing.py
    +++ b/pynest/nest/lib/hl_api_parallel_computing.py
    @@ -24,7 +24,7 @@
     """
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *
    +from ..ll_api import *  # noqa
     
     __all__ = [
         "NumProcesses",
    diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py
    index b50bc6e798..e9c75f1ea9 100644
    --- a/pynest/nest/lib/hl_api_simulation.py
    +++ b/pynest/nest/lib/hl_api_simulation.py
    @@ -27,7 +27,7 @@
     from contextlib import contextmanager
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *
    +from ..ll_api import *  # noqa
     from .hl_api_helper import is_iterable
     from .hl_api_parallel_computing import Rank
     
    @@ -312,7 +312,7 @@ def Install(module_name):
     
         """
     
    -    return sr("(%s) Install" % module_name)
    +    raise NotImplementedError
     
     
     def EnableStructuralPlasticity():
    diff --git a/pynest/nest/lib/hl_api_sonata.py b/pynest/nest/lib/hl_api_sonata.py
    index 1dda9bc07a..bdf491378d 100644
    --- a/pynest/nest/lib/hl_api_sonata.py
    +++ b/pynest/nest/lib/hl_api_sonata.py
    @@ -385,7 +385,8 @@ def _create_node_type_parameter_map(self, nodes_df, csv_fn):
     
             if "dynamics_params" not in nodes_df.columns:
                 raise ValueError(
    -                f"Missing the required 'dynamics_params' header specifying .json files with model parameters in {csv_fn}."
    +                "Missing the required 'dynamics_params' header specifying .json "
    +                f"files with model parameters in {csv_fn}."
                 )
     
             nodes_df["model_template"] = nodes_df["model_template"].str.replace("nest:", "")
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 6dc3fd719c..9504d98891 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -30,7 +30,7 @@
     import numpy
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *
    +from ..ll_api import *  # noqa
     from .hl_api_helper import (
         get_parameters,
         get_parameters_hierarchical_addressing,
    diff --git a/testsuite/pytests/test_spatial/test_layer_get_set.py b/testsuite/pytests/test_spatial/test_layer_get_set.py
    index 5f21e95e2d..585eb96194 100644
    --- a/testsuite/pytests/test_spatial/test_layer_get_set.py
    +++ b/testsuite/pytests/test_spatial/test_layer_get_set.py
    @@ -32,7 +32,7 @@ class GetSetTestCase(unittest.TestCase):
         def setUp(self):
             nest.ResetKernel()
     
    -    def test_LayerSet(self):
    +    def test_LayerSetOnInstance(self):
             """Test Set on layer NodeCollection."""
     
             layer_shape = [3, 3]
    diff --git a/testsuite/pytests/test_stdp_nn_synapses.py b/testsuite/pytests/test_stdp_nn_synapses.py
    index 732578c494..a3f9ba082d 100644
    --- a/testsuite/pytests/test_stdp_nn_synapses.py
    +++ b/testsuite/pytests/test_stdp_nn_synapses.py
    @@ -88,7 +88,6 @@ def do_nest_simulation_and_compare_to_reproduced_weight(self, pairing_scheme):
             np.testing.assert_almost_equal(
                 weight_reproduced_independently,
                 weight_by_nest,
    -            err_msg=f"{synapse_model} test: Resulting synaptic weight {weight_by_nest} differs from expected {weight_reproduced_independently}",
             )
     
         def do_the_nest_simulation(self):
    
    From 5d456e2e5f27ee94eef589f861140f8d5202f192 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 13:33:50 +0200
    Subject: [PATCH 220/375] Run clang-format
    
    ---
     models/modelsmodule.h | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/models/modelsmodule.h b/models/modelsmodule.h
    index ffaf91ee82..f3548f3288 100644
    --- a/models/modelsmodule.h
    +++ b/models/modelsmodule.h
    @@ -25,7 +25,7 @@
     
     namespace nest
     {
    -  void register_stuff();
    +void register_stuff();
     } // namespace
     
     #endif
    
    From 87a7185a6916668e67ed821573fbd145bbb16b70 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 13:45:29 +0200
    Subject: [PATCH 221/375] Fix copyright header check
    
    ---
     build_support/check_copyright_headers.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/build_support/check_copyright_headers.py b/build_support/check_copyright_headers.py
    index b54eaec464..15943162a4 100644
    --- a/build_support/check_copyright_headers.py
    +++ b/build_support/check_copyright_headers.py
    @@ -54,7 +54,7 @@ def eprint(*args, **kwargs):
     EXIT_NO_SOURCE = 126
     
     try:
    -    heuristic_folders = "nest nestkernel build_support models .git"
    +    heuristic_folders = "pynest nestkernel build_support models .git"
         if "NEST_SOURCE" not in os.environ:
             if all([name in os.listdir() for name in heuristic_folders.split()]):
                 os.environ["NEST_SOURCE"] = "."
    
    From 34db8faa8086ba9ef3f6f7b012cf6c5576856c6d Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 13:54:49 +0200
    Subject: [PATCH 222/375] Fix unused names check
    
    ---
     build_support/check_unused_names.py | 16 ++++------------
     1 file changed, 4 insertions(+), 12 deletions(-)
    
    diff --git a/build_support/check_unused_names.py b/build_support/check_unused_names.py
    index 2dc2675498..6b6342f959 100644
    --- a/build_support/check_unused_names.py
    +++ b/build_support/check_unused_names.py
    @@ -60,7 +60,7 @@ def eprint(*args, **kwargs):
     EXIT_NO_SOURCE = 126
     
     try:
    -    heuristic_folders = "nest nestkernel build_support models .git"
    +    heuristic_folders = "pynest nestkernel build_support models .git"
         if "NEST_SOURCE" not in os.environ:
             if all([name in os.listdir() for name in heuristic_folders.split()]):
                 os.environ["NEST_SOURCE"] = "."
    @@ -93,17 +93,9 @@ def get_names(fname, pattern):
     names_defined = set()
     for names_file in names_files:
         fname = os.path.join(source_dir, names_file)
    -
    -    names_header = get_names(fname + ".h", r"extern\s+const\s+Name\s+(\w+)\s*;")
    -    names_source = get_names(fname + ".cpp", r"const\s+Name\s+(\w+)\(.*")
    -
    -    for h, s in zip(names_header, names_source):
    -        if h != s:
    -            eprint(f"[NAME] {names_file}: inconsistent declaration: {h} != {s}")
    -            print(f"... {names_file}\\n")
    -            sys.exit(EXIT_NAME_H_CPP_MISMATCH)
    -        else:
    -            names_defined.add(h)
    +    names_header = get_names(fname + ".h", r"const\s+std::string\s+(\w+)\(.*")
    +    for h in names_header:
    +        names_defined.add(h)
     
     
     # We call to recursive grep in the shell here, because that's much
    
    From f9ab90f49391ccb4010c90423a13df96355ed172 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Fri, 22 Sep 2023 14:03:37 +0200
    Subject: [PATCH 223/375] Actually determine if parameters should be int or
     double
    
    ---
     nestkernel/connection_manager.cpp     | 12 ++++--------
     pynest/nest/lib/hl_api_connections.py |  3 +++
     2 files changed, 7 insertions(+), 8 deletions(-)
    
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 4d842fc320..a405eaa59e 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -570,8 +570,9 @@ nest::ConnectionManager::connect_arrays( long* sources,
         size_t i = 0;
         for ( auto& key : p_keys )
         {
    +      bool is_int = key == names::receptor_type or key == names::music_channel;
           // Shifting the pointer to the first value of the parameter.
    -      param_pointers[ key ] = std::make_pair( p_values + i * n, false );
    +      param_pointers[ key ] = std::make_pair( p_values + i * n, is_int );
           ++i;
         }
       }
    @@ -675,19 +676,14 @@ nest::ConnectionManager::connect_arrays( long* sources,
               const auto is_int = param_pointer_pair.second.second;
               auto* param = param_pointer + index_counter;
     
    -          // PyNEST-NG had
    -          // Receptor type must be an integer.
    -          // if ( param_pointer_pair.first == names::receptor_type )
    -
    -          // Integer parameters are stored as IntegerDatums.
               if ( is_int )
               {
                 const auto rtype_as_long = static_cast< long >( *param );
     
                 if ( *param > 1L << 31 or std::abs( *param - rtype_as_long ) > 0 ) // To avoid rounding errors
                 {
    -              const auto msg =
    -                std::string( "Expected integer value for " ) + param_pointer_pair.first + ", but got double.";
    +              const std::string msg =
    +                String::compose( "Expected integer value for %1, but got double.", param_pointer_pair.first);
                   throw BadParameter( msg );
                 }
     
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index 4782eca57a..1430c29ce6 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -236,6 +236,9 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, return_synapsecollection=F
                 for k in set(processed_syn_spec.keys()).difference(set(("weight", "delay", "synapse_model")))
             }
     
    +        # This converts the values to a 2-dim matrix of doubles regardless of what type the
    +        # parameters actually should be. This is to keep the interface generic. If needed,
    +        # values are converted back to int around ConnectionManager:679 (checks for is_int).
             if len(reduced_processed_syn_spec) > 0:
                 syn_param_keys = numpy.array(list(reduced_processed_syn_spec.keys()), dtype=numpy.string_)
                 syn_param_values = numpy.zeros([len(reduced_processed_syn_spec), len(pre)])
    
    From d1f4976587e7beb1b7a4ac121aed8bb98377706c Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 14:49:56 +0200
    Subject: [PATCH 224/375] Fix implicit string concatenation
    
    ---
     testsuite/pytests/test_compartmental_model.py | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index ae031dc3b1..0b280814e0 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -825,7 +825,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            r"Port with id 3 does not exist. Valid current " r"receptor ports for cm_default are in \[0, 2\[",
    +            r"Port with id 3 does not exist. Valid current receptor ports for cm_default are in \[0, 2\[",
             ):
                 nest.Connect(dc, n_neat, syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "receptor_type": 3})
     
    @@ -841,7 +841,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            r"Port with id 3 does not exist. Valid spike " r"receptor ports for cm_default are in \[0, 3\[",
    +            r"Port with id 3 does not exist. Valid spike receptor ports for cm_default are in \[0, 3\[",
             ):
                 nest.Connect(sg, n_neat, syn_spec={"synapse_model": "static_synapse", "weight": 1.0, "receptor_type": 3})
     
    @@ -852,7 +852,7 @@ def test_error_handling(self):
     
             with self.assertRaisesRegex(
                 nest.NESTError,
    -            "Creation of connection is not possible because:\n" "Cannot connect with unknown recordable v_comp1",
    +            "Creation of connection is not possible because:\nCannot connect with unknown recordable v_comp1",
             ):
                 nest.Connect(mm, n_neat)
     
    
    From 8707aabd9ca5d8e08116f9bfe8098c9179e7050f Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Fri, 22 Sep 2023 15:02:38 +0200
    Subject: [PATCH 225/375] Add more TODOs with ideas for improvements of
     PYNEST-NG
    
    ---
     libnestutil/dictionary.h                     |  3 +++
     libnestutil/dictionary_access_flag_manager.h | 10 ++++++++++
     nestkernel/connection_manager.cpp            |  2 +-
     3 files changed, 14 insertions(+), 1 deletion(-)
    
    diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h
    index 8615bd6379..e93247f02b 100644
    --- a/libnestutil/dictionary.h
    +++ b/libnestutil/dictionary.h
    @@ -70,6 +70,9 @@ class dictionary : public std::map< std::string, boost::any >
       //                   * Whether value is writable
       //                   * Docstring for each entry
     private:
    +  // TODO: PYNEST-NG: maybe change to unordered map, as that provides
    +  // automatic hashing of keys (currently strings) which might make
    +  // lookups more efficient
       using maptype_ = std::map< std::string, boost::any >;
       using maptype_::maptype_; // Inherit constructors
     
    diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h
    index f5a40c8660..56de810023 100644
    --- a/libnestutil/dictionary_access_flag_manager.h
    +++ b/libnestutil/dictionary_access_flag_manager.h
    @@ -29,6 +29,16 @@
     
     #include "dictionary.h"
     
    +// TODO: PYNEST-NG: Here's an idea to improve the performance and
    +// address the possible bottlenecks mentioned below: Instead of
    +// performing access checks on node instances, they could be performed
    +// on the model prototypes (or clones thereof) just once prior to
    +// actually calling instance.set_status() or
    +// kernel_manager::set_status(). This would, however, require that all
    +// inter-dependent properties in such a call would be forced to be set
    +// together. In other words all calls to set_status() must be
    +// independent of the current state of the node instance.
    +
     /**
      * @brief Access flag manager for the dictionary class
      *
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index a405eaa59e..a3a4eccd68 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -570,7 +570,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
         size_t i = 0;
         for ( auto& key : p_keys )
         {
    -      bool is_int = key == names::receptor_type or key == names::music_channel;
    +      const bool is_int = key == names::receptor_type or key == names::music_channel;
           // Shifting the pointer to the first value of the parameter.
           param_pointers[ key ] = std::make_pair( p_values + i * n, is_int );
           ++i;
    
    From 229ad1e4613ae3240b74e9323ea2889e97088d6b Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 15:19:41 +0200
    Subject: [PATCH 226/375] Remove ll_api_kernel_attributes.py, KernelAttribute
     now in ll_api.py
    
    ---
     pynest/nest/ll_api_kernel_attributes.py | 69 -------------------------
     1 file changed, 69 deletions(-)
     delete mode 100644 pynest/nest/ll_api_kernel_attributes.py
    
    diff --git a/pynest/nest/ll_api_kernel_attributes.py b/pynest/nest/ll_api_kernel_attributes.py
    deleted file mode 100644
    index dc68f44d3a..0000000000
    --- a/pynest/nest/ll_api_kernel_attributes.py
    +++ /dev/null
    @@ -1,69 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# ll_api_kernel_attributes.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -from .ll_api import spp, sps, sr, stack_checker
    -
    -
    -class KernelAttribute:
    -    """
    -    Descriptor that dispatches attribute access to the nest kernel.
    -    """
    -
    -    def __init__(self, typehint, description, readonly=False, default=None, localonly=False):
    -        self._readonly = readonly
    -        self._localonly = localonly
    -        self._default = default
    -
    -        readonly = readonly and "**read only**"
    -        localonly = localonly and "**local only**"
    -
    -        self.__doc__ = (
    -            description
    -            + ("." if default is None else f", defaults to ``{default}``.")
    -            + ("\n\n" if readonly or localonly else "")
    -            + ", ".join(c for c in (readonly, localonly) if c)
    -            + f"\n\n:type: {typehint}"
    -        )
    -
    -    def __set_name__(self, cls, name):
    -        self._name = name
    -        self._full_status = name == "kernel_status"
    -
    -    @stack_checker
    -    def __get__(self, instance, cls=None):
    -        if instance is None:
    -            return self
    -
    -        sr("GetKernelStatus")
    -        status_root = spp()
    -
    -        if self._full_status:
    -            return status_root
    -        else:
    -            return status_root[self._name]
    -
    -    @stack_checker
    -    def __set__(self, instance, value):
    -        if self._readonly:
    -            msg = f"`{self._name}` is a read only kernel attribute."
    -            raise AttributeError(msg)
    -        sps({self._name: value})
    -        sr("SetKernelStatus")
    
    From bace5cb3a01478d47d2e89541891b11f0acbe6dd Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 15:20:23 +0200
    Subject: [PATCH 227/375] Fix pylint warnings
    
    ---
     .github/workflows/nestbuildmatrix.yml        | 2 +-
     pynest/nest/lib/hl_api_connection_helpers.py | 1 -
     pynest/nest/lib/hl_api_models.py             | 1 -
     pynest/nest/lib/hl_api_nodes.py              | 1 -
     pynest/nest/lib/hl_api_parallel_computing.py | 7 +++----
     pynest/nest/lib/hl_api_simulation.py         | 2 --
     pynest/nest/lib/hl_api_types.py              | 4 +---
     pynest/nest/ll_api.py                        | 4 +---
     8 files changed, 6 insertions(+), 16 deletions(-)
    
    diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml
    index 1d22b57496..5bb9de05a2 100644
    --- a/.github/workflows/nestbuildmatrix.yml
    +++ b/.github/workflows/nestbuildmatrix.yml
    @@ -18,7 +18,7 @@ jobs:
             with:
               fetch-depth: 0
     
    -      - name: "Instal dependencies"
    +      - name: "Install dependencies"
             run: |
               python -m pip install --force-reinstall clang-format==${{ env.CLANG_REQUIRE_VERSION }}
     
    diff --git a/pynest/nest/lib/hl_api_connection_helpers.py b/pynest/nest/lib/hl_api_connection_helpers.py
    index 4824ea4c4e..cd05c37aed 100644
    --- a/pynest/nest/lib/hl_api_connection_helpers.py
    +++ b/pynest/nest/lib/hl_api_connection_helpers.py
    @@ -28,7 +28,6 @@
     import numpy as np
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *  # noqa
     from .hl_api_types import CollocatedSynapses, Mask, NodeCollection, Parameter
     
     __all__ = [
    diff --git a/pynest/nest/lib/hl_api_models.py b/pynest/nest/lib/hl_api_models.py
    index 4ee77e48a8..2f060810b1 100644
    --- a/pynest/nest/lib/hl_api_models.py
    +++ b/pynest/nest/lib/hl_api_models.py
    @@ -24,7 +24,6 @@
     """
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *  # noqa
     from .hl_api_helper import deprecated, is_iterable, model_deprecation_warning
     from .hl_api_simulation import GetKernelStatus
     from .hl_api_types import to_json
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index ff9da97c42..dd6a3e8e7f 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -29,7 +29,6 @@
     import numpy as np
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *  # noqa
     from .hl_api_helper import is_iterable, model_deprecation_warning
     from .hl_api_parallel_computing import NumProcesses, Rank
     from .hl_api_types import NodeCollection, Parameter
    diff --git a/pynest/nest/lib/hl_api_parallel_computing.py b/pynest/nest/lib/hl_api_parallel_computing.py
    index 73c02c51ff..32f4fe7f0c 100644
    --- a/pynest/nest/lib/hl_api_parallel_computing.py
    +++ b/pynest/nest/lib/hl_api_parallel_computing.py
    @@ -24,7 +24,6 @@
     """
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *  # noqa
     
     __all__ = [
         "NumProcesses",
    @@ -85,7 +84,7 @@ def SetAcceptableLatency(port_name, latency):
         # sps(kernel.SLILiteral(port_name))
         # sps(latency)
         # sr("SetAcceptableLatency")
    -    pass
    +    raise NotImplementedError
     
     
     def SetMaxBuffered(port_name, size):
    @@ -103,7 +102,7 @@ def SetMaxBuffered(port_name, size):
         # sps(kernel.SLILiteral(port_name))
         # sps(size)
         # sr("SetMaxBuffered")
    -    pass
    +    raise NotImplementedError
     
     
     def SyncProcesses():
    @@ -111,7 +110,7 @@ def SyncProcesses():
     
         # PYNEST-NG
         # sr("SyncProcesses")
    -    pass
    +    raise NotImplementedError
     
     
     def GetLocalVPs():
    diff --git a/pynest/nest/lib/hl_api_simulation.py b/pynest/nest/lib/hl_api_simulation.py
    index e9c75f1ea9..6482d18501 100644
    --- a/pynest/nest/lib/hl_api_simulation.py
    +++ b/pynest/nest/lib/hl_api_simulation.py
    @@ -27,9 +27,7 @@
     from contextlib import contextmanager
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *  # noqa
     from .hl_api_helper import is_iterable
    -from .hl_api_parallel_computing import Rank
     
     __all__ = [
         "Cleanup",
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 9504d98891..c4d9f64fd8 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -30,7 +30,6 @@
     import numpy
     
     from .. import nestkernel_api as nestkernel
    -from ..ll_api import *  # noqa
     from .hl_api_helper import (
         get_parameters,
         get_parameters_hierarchical_addressing,
    @@ -1021,7 +1020,7 @@ def __init__(self, datum):
             """Parameters must be created using the CreateParameter command."""
             if not isinstance(datum, nestkernel.ParameterObject):
                 raise TypeError(
    -                "expected low-level parameter object;" " use the CreateParameter() function to create a Parameter"
    +                "expected low-level parameter object; use the 'CreateParameter()' function to create a 'Parameter'."
                 )
             self._datum = datum
     
    @@ -1180,7 +1179,6 @@ def __iadd__(self, other):
                     f" or other {self.__class__.__name__}, got {type(other)}"
                 )
             self._node_collection.set({f"add_{self.__class__.__name__.lower()}": new_elements})
    -        return None  # Flagging elements as added by returning None
     
         def __getitem__(self, key):
             return self._elements[key]
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index 08e7d71847..d6ed4923c8 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -25,9 +25,6 @@
     
     # Since this is a low level module, we need some more trickery, thus:
     # pylint: disable=wrong-import-position
    -
    -import functools
    -import inspect
     import keyword
     import os
     import sys
    @@ -163,6 +160,7 @@ def init(argv):
     
         path = os.path.dirname(__file__)
         nestkernel.init(nest_argv)
    +    initialized = True
     
         if not quiet:
             print("NEST initialized successfully!")
    
    From 471746429a2fa126fd5a0cb0855467b42314bf8c Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 15:23:09 +0200
    Subject: [PATCH 228/375] Fix formatting
    
    ---
     nestkernel/connection_manager.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index a3a4eccd68..f8052314cd 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -683,7 +683,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
                 if ( *param > 1L << 31 or std::abs( *param - rtype_as_long ) > 0 ) // To avoid rounding errors
                 {
                   const std::string msg =
    -                String::compose( "Expected integer value for %1, but got double.", param_pointer_pair.first);
    +                String::compose( "Expected integer value for %1, but got double.", param_pointer_pair.first );
                   throw BadParameter( msg );
                 }
     
    
    From 0f350746c01b819e70aaec736eee1c64dfeecca2 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 15:35:04 +0200
    Subject: [PATCH 229/375] Attempt to fix CI macos build
    
    ---
     .github/workflows/nestbuildmatrix.yml | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml
    index 5bb9de05a2..d71682227a 100644
    --- a/.github/workflows/nestbuildmatrix.yml
    +++ b/.github/workflows/nestbuildmatrix.yml
    @@ -651,7 +651,7 @@ jobs:
     
           - name: "Install MacOS system dependencies"
             run: |
    -          brew install coreutils gsl open-mpi libomp automake autoconf libtool boost hdf5
    +          brew install llvm coreutils gsl open-mpi libomp automake autoconf libtool boost hdf5
     
           - name: "Restore pip cache"
             env:
    
    From 2751e164bf24c6c6401269a411e8c79f78c99f52 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 15:37:10 +0200
    Subject: [PATCH 230/375] Fix exception range loop
    
    ---
     nestkernel/recording_backend_sionlib.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp
    index 183b41fa30..0534682e99 100644
    --- a/nestkernel/recording_backend_sionlib.cpp
    +++ b/nestkernel/recording_backend_sionlib.cpp
    @@ -238,7 +238,7 @@ nest::RecordingBackendSIONlib::open_files_()
       } // parallel region
     
       // check if any exceptions have been raised
    -  for ( eptr : exceptions_raised )
    +  for ( auto eptr : exceptions_raised )
       {
         if ( eptr )
         {
    
    From 40a1e36d07304b2f177c68c2db5b0c3b6942d305 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 15:44:30 +0200
    Subject: [PATCH 231/375] Rename t -> tid for consistency
    
    ---
     nestkernel/recording_backend_sionlib.cpp | 44 ++++++++++++------------
     1 file changed, 22 insertions(+), 22 deletions(-)
    
    diff --git a/nestkernel/recording_backend_sionlib.cpp b/nestkernel/recording_backend_sionlib.cpp
    index 0534682e99..a198bbb17b 100644
    --- a/nestkernel/recording_backend_sionlib.cpp
    +++ b/nestkernel/recording_backend_sionlib.cpp
    @@ -70,11 +70,11 @@ nest::RecordingBackendSIONlib::finalize()
     void
     nest::RecordingBackendSIONlib::enroll( const RecordingDevice& device, const dictionary& )
     {
    -  const size_t t = device.get_thread();
    +  const size_t tid = device.get_thread();
       const size_t node_id = device.get_node_id();
     
    -  device_map::value_type::iterator device_it = devices_[ t ].find( node_id );
    -  if ( device_it == devices_[ t ].end() )
    +  device_map::value_type::iterator device_it = devices_[ tid ].find( node_id );
    +  if ( device_it == devices_[ tid ].end() )
       {
         DeviceEntry entry( device );
         DeviceInfo& info = entry.info;
    @@ -88,7 +88,7 @@ nest::RecordingBackendSIONlib::enroll( const RecordingDevice& device, const dict
         info.t_start = device.get_start().get_steps();
         info.t_stop = device.get_stop().get_steps();
     
    -    devices_[ t ].insert( std::make_pair( node_id, entry ) );
    +    devices_[ tid ].insert( std::make_pair( node_id, entry ) );
     
         ++num_enrolled_devices_;
       }
    @@ -97,13 +97,13 @@ nest::RecordingBackendSIONlib::enroll( const RecordingDevice& device, const dict
     void
     nest::RecordingBackendSIONlib::disenroll( const RecordingDevice& device )
     {
    -  const size_t t = device.get_thread();
    +  const size_t tid = device.get_thread();
       const size_t node_id = device.get_node_id();
     
    -  device_map::value_type::iterator device_it = devices_[ t ].find( node_id );
    -  if ( device_it != devices_[ t ].end() )
    +  device_map::value_type::iterator device_it = devices_[ tid ].find( node_id );
    +  if ( device_it != devices_[ tid ].end() )
       {
    -    devices_[ t ].erase( device_it );
    +    devices_[ tid ].erase( device_it );
       }
     }
     
    @@ -112,11 +112,11 @@ nest::RecordingBackendSIONlib::set_value_names( const RecordingDevice& device,
       const std::vector< std::string >& double_value_names,
       const std::vector< std::string >& long_value_names )
     {
    -  const size_t t = device.get_thread();
    +  const size_t tid = device.get_thread();
       const size_t node_id = device.get_node_id();
     
    -  device_map::value_type::iterator device_it = devices_[ t ].find( node_id );
    -  if ( device_it != devices_[ t ].end() )
    +  device_map::value_type::iterator device_it = devices_[ tid ].find( node_id );
    +  if ( device_it != devices_[ tid ].end() )
       {
         DeviceInfo& info = device_it->second.info;
     
    @@ -166,7 +166,7 @@ nest::RecordingBackendSIONlib::open_files_()
     
         // This code is executed in a parallel region (opened above)!
         const size_t tid = kernel().vp_manager.get_thread_id();
    -    const size_t task = kernel().vp_manager.thread_to_vp( t );
    +    const size_t task = kernel().vp_manager.thread_to_vp( tid );
         if ( not task )
         {
           t_start_ = kernel().simulation_manager.get_time().get_ms();
    @@ -264,8 +264,8 @@ nest::RecordingBackendSIONlib::close_files_()
     
     #pragma omp parallel
       {
    -    const size_t t = kernel().vp_manager.get_thread_id();
    -    const size_t task = kernel().vp_manager.thread_to_vp( t );
    +    const size_t tid = kernel().vp_manager.get_thread_id();
    +    const size_t task = kernel().vp_manager.thread_to_vp( tid );
     
         assert( ( files_.find( task ) != files_.end() ) and "initialize() was not called before calling cleanup()" );
     
    @@ -283,7 +283,7 @@ nest::RecordingBackendSIONlib::close_files_()
           // loop over devices and determine number of recorded data points per
           // device
           device_map::value_type::iterator it;
    -      for ( it = devices_[ t ].begin(); it != devices_[ t ].end(); ++it )
    +      for ( it = devices_[ tid ].begin(); it != devices_[ tid ].end(); ++it )
           {
             const size_t node_id = it->first;
             sion_uint64 n_rec = 0;
    @@ -337,7 +337,7 @@ nest::RecordingBackendSIONlib::close_files_()
           sion_fwrite( version_buffer, sizeof( char ), NEST_VERSION_BUFFERSIZE, file.sid );
     
           // write device info
    -      const sion_uint64 n_dev = static_cast< sion_uint64 >( devices_[ t ].size() );
    +      const sion_uint64 n_dev = static_cast< sion_uint64 >( devices_[ tid ].size() );
           sion_fwrite( &n_dev, sizeof( sion_uint64 ), 1, file.sid );
     
           sion_uint64 node_id;
    @@ -350,7 +350,7 @@ nest::RecordingBackendSIONlib::close_files_()
           sion_uint32 long_n_val;
     
           device_map::value_type::iterator it;
    -      for ( it = devices_[ t ].begin(); it != devices_[ t ].end(); ++it )
    +      for ( it = devices_[ tid ].begin(); it != devices_[ tid ].end(); ++it )
           {
             DeviceInfo& dev_info = it->second.info;
     
    @@ -420,17 +420,17 @@ nest::RecordingBackendSIONlib::write( const RecordingDevice& device,
       const std::vector< double >& double_values,
       const std::vector< long >& long_values )
     {
    -  const size_t t = device.get_thread();
    +  const size_t tid = device.get_thread();
       const sion_uint64 device_node_id = static_cast< sion_uint64 >( device.get_node_id() );
     
    -  if ( devices_[ t ].find( device_node_id ) == devices_[ t ].end() )
    +  if ( devices_[ tid ].find( device_node_id ) == devices_[ tid ].end() )
       {
         return;
       }
     
       FileEntry& file = files_[ device.get_vp() ];
       SIONBuffer& buffer = file.buffer;
    -  DeviceInfo& device_info = devices_[ t ].find( device_node_id )->second.info;
    +  DeviceInfo& device_info = devices_[ tid ].find( device_node_id )->second.info;
     
       assert( device_info.double_value_names.size() == double_values.size() );
       const sion_uint32 double_n_values = static_cast< sion_uint32 >( double_values.size() );
    @@ -667,8 +667,8 @@ nest::RecordingBackendSIONlib::post_step_hook()
         return;
       }
     
    -  const size_t t = kernel().vp_manager.get_thread_id();
    -  const size_t task = kernel().vp_manager.thread_to_vp( t );
    +  const size_t tid = kernel().vp_manager.get_thread_id();
    +  const size_t task = kernel().vp_manager.thread_to_vp( tid );
     
       FileEntry& file = files_[ task ];
       SIONBuffer& buffer = file.buffer;
    
    From 100efbb8db41c87ea61a4a530460fd8c84998ee8 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 15:45:55 +0200
    Subject: [PATCH 232/375] Revert attempt to fix CI macos build
    
    ---
     .github/workflows/nestbuildmatrix.yml | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml
    index d71682227a..5bb9de05a2 100644
    --- a/.github/workflows/nestbuildmatrix.yml
    +++ b/.github/workflows/nestbuildmatrix.yml
    @@ -651,7 +651,7 @@ jobs:
     
           - name: "Install MacOS system dependencies"
             run: |
    -          brew install llvm coreutils gsl open-mpi libomp automake autoconf libtool boost hdf5
    +          brew install coreutils gsl open-mpi libomp automake autoconf libtool boost hdf5
     
           - name: "Restore pip cache"
             env:
    
    From 7a1d194c6131e9c0c2a9958a92c5bd1c2e856a92 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 23:43:59 +0200
    Subject: [PATCH 233/375] Update test_jonke_synapse.py for pynest-ng
    
    ---
     testsuite/pytests/test_jonke_synapse.py | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/testsuite/pytests/test_jonke_synapse.py b/testsuite/pytests/test_jonke_synapse.py
    index 45208ac0c4..d55f8e8409 100644
    --- a/testsuite/pytests/test_jonke_synapse.py
    +++ b/testsuite/pytests/test_jonke_synapse.py
    @@ -151,10 +151,10 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        all_spikes = spike_recorder.events
    -        senders = all_spikes["senders"]
    -        pre_spikes = all_spikes["times"][senders == presynaptic_neuron.tolist()[0]]
    -        post_spikes = all_spikes["times"][senders == postsynaptic_neuron.tolist()[0]]
    +        all_spikes = np.array(spike_recorder.events["times"])
    +        senders = np.array(spike_recorder.events["senders"])
    +        pre_spikes = all_spikes[senders == presynaptic_neuron.tolist()[0]]
    +        post_spikes = all_spikes[senders == postsynaptic_neuron.tolist()[0]]
     
             weight = plastic_synapse_of_interest.weight
             return (pre_spikes, post_spikes, weight)
    
    From 50cec593bce2bade9d0f374f4b6c28cf58395923 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 22 Sep 2023 23:53:04 +0200
    Subject: [PATCH 234/375] Remove test case; cannot get on empty NodeCollection
     instance
    
    ---
     testsuite/pytests/test_json.py | 6 ------
     1 file changed, 6 deletions(-)
    
    diff --git a/testsuite/pytests/test_json.py b/testsuite/pytests/test_json.py
    index ffdf842557..ef3640fb23 100644
    --- a/testsuite/pytests/test_json.py
    +++ b/testsuite/pytests/test_json.py
    @@ -58,12 +58,6 @@ def test_get_JSON(self):
                 d_json = n.get(output="json")
                 self.assertIsInstance(d_json, str)
     
    -        nest.ResetKernel()
    -        n = nest.NodeCollection()
    -        d_json = n.get(output="json")
    -        self.assertIsInstance(d_json, str)
    -        self.assertEqual(d_json, "{}")
    -
     
     def suite():
         suite = unittest.makeSuite(StatusTestCase, "test")
    
    From 50d1137e749b82a9bbd28765f710580c44ba90ea Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sat, 23 Sep 2023 01:01:58 +0200
    Subject: [PATCH 235/375] Translate standard C++ errors into appropriate Python
     exceptions
    
    ---
     pynest/nestkernel_exceptions.h | 45 +++++++++++++++++++++++++++++++---
     1 file changed, 42 insertions(+), 3 deletions(-)
    
    diff --git a/pynest/nestkernel_exceptions.h b/pynest/nestkernel_exceptions.h
    index 1de27fdb8e..c3312d6e3d 100644
    --- a/pynest/nestkernel_exceptions.h
    +++ b/pynest/nestkernel_exceptions.h
    @@ -21,7 +21,6 @@
      */
     
     #include <Python.h>
    -#include <exception>
     #include <ios>
     #include <stdexcept>
     
    @@ -72,9 +71,49 @@ custom_exception_handler()
       {
         PyErr_SetString( nest_exceptions_map[ exn.exception_name() ], exn.what() );
       }
    -  catch ( std::exception& exc )
    +  catch ( const std::bad_alloc& exn )
       {
    -    PyErr_SetString( PyExc_RuntimeError, ( std::string( "C++ exception: " ) + exc.what() ).c_str() );
    +    PyErr_SetString( PyExc_MemoryError, exn.what() );
    +  }
    +  catch ( const std::bad_cast& exn )
    +  {
    +    PyErr_SetString( PyExc_TypeError, exn.what() );
    +  }
    +  catch ( const std::bad_typeid& exn )
    +  {
    +    PyErr_SetString( PyExc_TypeError, exn.what() );
    +  }
    +  catch ( const std::domain_error& exn )
    +  {
    +    PyErr_SetString( PyExc_ValueError, exn.what() );
    +  }
    +  catch ( const std::invalid_argument& exn )
    +  {
    +    PyErr_SetString( PyExc_ValueError, exn.what() );
    +  }
    +  catch ( const std::ios_base::failure& exn )
    +  {
    +    PyErr_SetString( PyExc_IOError, exn.what() );
    +  }
    +  catch ( const std::out_of_range& exn )
    +  {
    +    PyErr_SetString( PyExc_IndexError, exn.what() );
    +  }
    +  catch ( const std::overflow_error& exn )
    +  {
    +    PyErr_SetString( PyExc_OverflowError, exn.what() );
    +  }
    +  catch ( const std::range_error& exn )
    +  {
    +    PyErr_SetString( PyExc_ArithmeticError, exn.what() );
    +  }
    +  catch ( const std::underflow_error& exn )
    +  {
    +    PyErr_SetString( PyExc_ArithmeticError, exn.what() );
    +  }
    +  catch ( const std::exception& exn )
    +  {
    +    PyErr_SetString( PyExc_RuntimeError, exn.what() );
       }
       catch ( ... )
       {
    
    From 7c72a74147190485c5d75a4b29d7412a58406036 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sat, 23 Sep 2023 01:02:20 +0200
    Subject: [PATCH 236/375] Formatting
    
    ---
     nestkernel/nest.cpp | 5 +----
     1 file changed, 1 insertion(+), 4 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 40fc497e2e..33c2652d58 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -560,9 +560,7 @@ run( const double& time )
       }
       if ( not t_sim.is_grid_time() )
       {
    -    throw BadParameter(
    -      "The simulation time must be a multiple "
    -      "of the simulation resolution." );
    +    throw BadParameter( "The simulation time must be a multiple of the simulation resolution." );
       }
     
       kernel().simulation_manager.run( t_sim );
    @@ -692,7 +690,6 @@ create_parameter( const dictionary& param_dict )
       {
         throw BadProperty( "Parameter definition dictionary must contain one single key only." );
       }
    -
       const auto n = param_dict.begin()->first;
       const auto pdict = param_dict.get< dictionary >( n );
       pdict.init_access_flags();
    
    From d48c70f8bc567309f6c7d28c9a0295ad4c82bf8b Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sat, 23 Sep 2023 01:17:55 +0200
    Subject: [PATCH 237/375] Update for pynest-ng
    
    ---
     testsuite/pytests/test_parrot_neuron_ps.py | 16 ++++++++++------
     1 file changed, 10 insertions(+), 6 deletions(-)
    
    diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index 61b5e532d5..8687b18795 100644
    --- a/testsuite/pytests/test_parrot_neuron_ps.py
    +++ b/testsuite/pytests/test_parrot_neuron_ps.py
    @@ -26,6 +26,7 @@
     import unittest
     
     import nest
    +import numpy as np
     
     
     def _round_up(simtime):
    @@ -63,8 +64,9 @@ def test_ParrotNeuronRepeatSpike(self):
             nest.Simulate(_round_up(self.spike_time + 2 * self.delay))
     
             # get spike from parrot neuron
    -        events = self.spikes.events
    -        post_time = events["times"][events["senders"] == self.parrot.global_id]
    +        times = np.array(self.spikes.events["times"])
    +        senders = np.array(self.spikes.events["senders"])
    +        post_time = times[senders == self.parrot.global_id]
     
             # assert spike was repeated at correct time
             assert post_time, "Parrot neuron failed to repeat spike."
    @@ -78,8 +80,9 @@ def test_ParrotNeuronIgnoreSpike(self):
             nest.Simulate(_round_up(self.spike_time + 2.0 * self.delay))
     
             # get spike from parrot neuron, assert it was ignored
    -        events = self.spikes.events
    -        post_time = events["times"][events["senders"] == self.parrot.global_id]
    +        times = np.array(self.spikes.events["times"])
    +        senders = np.array(self.spikes.events["senders"])
    +        post_time = times[senders == self.parrot.global_id]
             assert len(post_time) == 0, "Parrot neuron failed to ignore spike arriving on port 1"
     
         def test_ParrotNeuronOutgoingMultiplicity(self):
    @@ -96,8 +99,9 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
             nest.Simulate(_round_up(self.spike_time + 2.0 * self.delay))
     
             # get spikes from parrot neuron, assert two were transmitted
    -        events = self.spikes.events
    -        post_times = events["times"][events["senders"] == self.parrot.global_id]
    +        times = np.array(self.spikes.events["times"])
    +        senders = np.array(self.spikes.events["senders"])
    +        post_times = times[senders == self.parrot.global_id]
             assert (
                 len(post_times) == 2 and post_times[0] == post_times[1]
             ), "Parrot neuron failed to correctly repeat multiple spikes."
    
    From 6482d9ab147a08771194ba505e8ec6b3c763f92d Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sat, 23 Sep 2023 01:30:49 +0200
    Subject: [PATCH 238/375] Update for pynest-ng
    
    ---
     testsuite/pytests/test_stdp_pl_synapse_hom.py | 11 ++++++-----
     1 file changed, 6 insertions(+), 5 deletions(-)
    
    diff --git a/testsuite/pytests/test_stdp_pl_synapse_hom.py b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    index 0b71031b44..3302767ec7 100644
    --- a/testsuite/pytests/test_stdp_pl_synapse_hom.py
    +++ b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    @@ -198,12 +198,13 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        all_spikes = spike_recorder.events
    -        pre_spikes = all_spikes["times"][all_spikes["senders"] == presynaptic_neuron.tolist()[0]]
    -        post_spikes = all_spikes["times"][all_spikes["senders"] == postsynaptic_neuron.tolist()[0]]
    +        all_spikes = np.array(spike_recorder.events["times"])
    +        senders = np.array(spike_recorder.events["senders"])
    +        pre_spikes = all_spikes[senders == presynaptic_neuron.tolist()[0]]
    +        post_spikes = all_spikes[senders == postsynaptic_neuron.tolist()[0]]
     
    -        t_hist = wr.events["times"]
    -        weight = wr.events["weights"]
    +        t_hist = np.array(wr.events["times"])
    +        weight = np.array(wr.events["weights"])
     
             return pre_spikes, post_spikes, t_hist, weight
     
    
    From 32a0b66ea4b0eccbbc817ead39134b7d07129850 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sat, 23 Sep 2023 01:40:59 +0200
    Subject: [PATCH 239/375] Update for pynest-ng
    
    ---
     testsuite/pytests/test_visualization.py | 27 +++++++++++++------------
     1 file changed, 14 insertions(+), 13 deletions(-)
    
    diff --git a/testsuite/pytests/test_visualization.py b/testsuite/pytests/test_visualization.py
    index 1896264060..2641b15fc7 100644
    --- a/testsuite/pytests/test_visualization.py
    +++ b/testsuite/pytests/test_visualization.py
    @@ -108,7 +108,7 @@ def test_voltage_trace_from_device(self):
             device = nest.Create("voltmeter")
             nest.Connect(pg, nodes)
             nest.Connect(device, nodes)
    -        nest.Simulate(100)
    +        nest.Simulate(100.0)
     
             # Test with data from device
             plt.close("all")
    @@ -131,6 +131,7 @@ def test_voltage_trace_from_device(self):
     
         def spike_recorder_data_setup(self, to_file=False):
             nest.ResetKernel()
    +        nest.overwrite_files = True
             pg = nest.Create("poisson_generator", params={"rate": 1000.0})
             sr = nest.Create("spike_recorder")
             if to_file:
    @@ -140,10 +141,10 @@ def spike_recorder_data_setup(self, to_file=False):
                 nest.Connect(pg, parrot)
                 nest.Connect(parrot, sr)
                 nest.Connect(parrot, sr_to_file)
    -            nest.Simulate(100)
    +            nest.Simulate(100.0)
                 return sr, sr_to_file
             else:
    -            nest.Simulate(100)
    +            nest.Simulate(100.0)
                 return sr
     
         def spike_recorder_raster_verify(self, sr_ref):
    @@ -162,34 +163,34 @@ def test_raster_plot(self):
             import nest.raster_plot
     
             sr, sr_to_file = self.spike_recorder_data_setup(to_file=True)
    -        spikes = sr.get("events")
    -        sr_ref = spikes["times"]
    +        spikes = np.array(sr.events["times"])
    +        senders = np.array(sr.events["senders"])
     
             # Test from_device
             nest.raster_plot.from_device(sr)
    -        self.spike_recorder_raster_verify(sr_ref)
    +        self.spike_recorder_raster_verify(spikes)
     
             # Test from_data
    -        data = np.zeros([len(spikes["senders"]), 2])
    -        data[:, 0] = spikes["senders"]
    -        data[:, 1] = spikes["times"]
    +        data = np.zeros([len(senders), 2])
    +        data[:, 0] = senders
    +        data[:, 1] = spikes
             nest.raster_plot.from_data(data)
    -        self.spike_recorder_raster_verify(sr_ref)
    +        self.spike_recorder_raster_verify(spikes)
     
             # Test from_file
             filename = sr_to_file.filenames[0]
             self.filenames.append(filename)
             nest.raster_plot.from_file(filename)
    -        self.spike_recorder_raster_verify(sr_ref)
    +        self.spike_recorder_raster_verify(spikes)
     
             # Test from_file_numpy
             nest.raster_plot.from_file_numpy([filename])
    -        self.spike_recorder_raster_verify(sr_ref)
    +        self.spike_recorder_raster_verify(spikes)
     
             if HAVE_PANDAS:
                 # Test from_file_pandas
                 nest.raster_plot.from_file_pandas([filename])
    -            self.spike_recorder_raster_verify(sr_ref)
    +            self.spike_recorder_raster_verify(spikes)
     
             # Test extract_events
             all_extracted = nest.raster_plot.extract_events(data)
    
    From 09b78d69760169ec813c92fd302fcbe2da506b48 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sat, 23 Sep 2023 01:46:19 +0200
    Subject: [PATCH 240/375] Update for pynest-ng
    
    ---
     .../sli2py_neurons/test_model_node_init.py        | 15 ++++++++-------
     1 file changed, 8 insertions(+), 7 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_neurons/test_model_node_init.py b/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    index 3179a2b3cf..a3c49149bd 100644
    --- a/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    +++ b/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    @@ -21,15 +21,16 @@
     
     
     """
    -   Makeshift test to see if setting model params and then creating a neuron
    -   and creating a neuron and then setting node params lead to the same
    -   results.
    +Makeshift test to see if setting model params and then creating a neuron
    +and creating a neuron and then setting node params lead to the same
    +results.
     
    -   Works by connecting device to iaf_psc_alpha, measuring voltage trace over 1s
    -   and comparing traces.
    +Works by connecting device to iaf_psc_alpha, measuring voltage trace over 1s
    +and comparing traces.
     """
     
     import nest
    +import numpy as np
     import pytest
     
     
    @@ -39,8 +40,8 @@ def _get_network_state(nc):
     
         nest.Connect(nc, neuron)
         nest.Connect(voltmeter, neuron)
    -    nest.Simulate(1000)
    -    volts = voltmeter.get("events")["V_m"]
    +    nest.Simulate(1000.0)
    +    volts = np.array(voltmeter.events["V_m"])
     
         return (volts, nc.get())
     
    
    From eb7de2ab6e248d9131ab439aca04ddb775304e35 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sat, 23 Sep 2023 02:19:48 +0200
    Subject: [PATCH 241/375] Improve docs, update for pynest-ng and fix wrong
     assert
    
    ---
     .../sli2py_other/test_corr_matrix_det.py      | 34 +++++++++++--------
     1 file changed, 19 insertions(+), 15 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py b/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    index e8639efe60..1ccd667777 100644
    --- a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    +++ b/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    @@ -21,11 +21,15 @@
     
     
     """
    -minimal test of correlomatrix detector
    -Feeds correlomatrix detector with hand-crafted spike trains with
    -known correlation. Correlomatrix detector parameters are set in model.
    -Remarks:
    -  The test does not test weighted correlations.
    +Minimal test of ``correlomatrix_detector``.
    +
    +In this test, we feed ``correlomatrix_detector`` with hand-crafted spike
    +trains with known correlation. The ``correlomatrix_detector`` parameters are
    +set on the model instance.
    +
    +.. note::
    +
    +    The test does not test weighted correlations.
     """
     
     import nest
    @@ -136,12 +140,12 @@ def prepare_correlomatrix_detector(spike_times_array):
     
     def diff_at_center():
         spikes_times = [[1.5, 2.5, 4.5], [0.5, 2.5]]
    -    covariance = [1, 0, 1, 0, 2]
    +    covariance = [1.0, 0.0, 1.0, 0.0, 2.0]
         return (spikes_times, covariance)
     
     
    -@pytest.mark.parametrize("spikes_times, covariance", [diff_at_center()])
    -def test_histogram_correlation(spikes_times, covariance):
    +@pytest.mark.parametrize("spikes_times, expected_covariance", [diff_at_center()])
    +def test_histogram_correlation(spikes_times, expected_covariance):
         nest.ResetKernel()
     
         nest.resolution = 0.1
    @@ -149,12 +153,12 @@ def test_histogram_correlation(spikes_times, covariance):
     
         detector = prepare_correlomatrix_detector(spikes_times)
     
    -    n_events = detector.get("n_events")
    +    n_events = detector.n_events
         spikes_times_size = list(map(lambda x: len(x), spikes_times))
    -    assert (n_events == spikes_times_size).all()
    +    assert n_events == spikes_times_size
     
    -    covariance = detector.get("covariance")[0][1]
    -    assert (covariance == covariance).all()
    +    actual_covariance = detector.get("covariance")[0][1]
    +    assert actual_covariance == expected_covariance
     
     
     def test_reset():
    @@ -166,11 +170,11 @@ def test_reset():
         spikes_times = [[1.0, 2.0, 6.0], [2.0, 4.0]]
         detector = prepare_correlomatrix_detector(spikes_times)
     
    -    covariance = detector.get("covariance")
    +    covariance = np.array(detector.get("covariance"))
     
         has_zero_entries = np.any(covariance == 0)
     
         if not has_zero_entries:
             detector.set(N_channels=8)
    -        assert np.all(detector.get("n_events") == 0)
    -        assert np.all(detector.get("covariance")[0][0] == 0.0)
    +        covariance = np.array(detector.get("covariance"))
    +        assert np.all(covariance[0][0] == 0.0)
    
    From 862b6d0e1e25de905bc70e69336cb299757a682d Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sat, 23 Sep 2023 02:39:52 +0200
    Subject: [PATCH 242/375] Update test for pynest-ng
    
    ---
     .../sli2py_recording/test_compare_delta.py    |  8 +++--
     .../pytests/sli2py_recording/test_corr_det.py | 30 ++++++++++---------
     2 files changed, 21 insertions(+), 17 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_recording/test_compare_delta.py b/testsuite/pytests/sli2py_recording/test_compare_delta.py
    index b4f05a395b..b3d3b17d9a 100644
    --- a/testsuite/pytests/sli2py_recording/test_compare_delta.py
    +++ b/testsuite/pytests/sli2py_recording/test_compare_delta.py
    @@ -22,6 +22,7 @@
     """
     Test that spike timings of plain and canon iaf_psc populations match empirical data given preconfigured settings.
     """
    +
     import nest
     import numpy as np
     import pytest
    @@ -60,7 +61,8 @@ def test_simulation_completes():
     
         nest.Simulate(200.0)
     
    -    spike_recs = spike_recorder.get("events", ["senders", "times"])
    +    times = np.array(spike_recorder.events["times"])
    +    senders = np.array(spike_recorder.events["senders"])
     
    -    assert np.all(np.in1d(np.array([1, 2]), spike_recs["senders"].T[:2]))
    -    assert np.all(spike_recs["times"].T[:2] == pytest.approx(4.1))
    +    assert np.all(np.in1d(np.array([1, 2]), senders.T[:2]))
    +    assert np.all(times.T[:2] == pytest.approx(4.1))
    diff --git a/testsuite/pytests/sli2py_recording/test_corr_det.py b/testsuite/pytests/sli2py_recording/test_corr_det.py
    index d9c941d722..be63895c88 100644
    --- a/testsuite/pytests/sli2py_recording/test_corr_det.py
    +++ b/testsuite/pytests/sli2py_recording/test_corr_det.py
    @@ -21,12 +21,15 @@
     
     
     """
    -Feeds correlation detector with two hand-crafted spike trains with
    -known correlation. Correlation detector parameters are set in model.
    +Minimal test of ``correlomatrix_detector``.
     
    -Remarks:
    -  The test does not test weighted correlations.
    +In this test, we feed ``correlomatrix_detector`` with two hand-crafted spike
    +trains with known correlation. The ``correlomatrix_detector`` parameters are
    +set on the model instance.
     
    +.. note::
    +
    +    The test does not test weighted correlations.
     """
     import nest
     import numpy as np
    @@ -128,19 +131,18 @@ def diff_at_edge():
         return (spikes_times, histogram)
     
     
    -@pytest.mark.parametrize("spikes_times, histogram", [diff_at_center(), diff_at_edge()])
    -def test_histogram_correlation(spikes_times, histogram):
    +@pytest.mark.parametrize("spikes_times, expected_histogram", [diff_at_center(), diff_at_edge()])
    +def test_histogram_correlation(spikes_times, expected_histogram):
         nest.resolution = 0.1
         nest.SetDefaults("correlation_detector", {"delta_tau": 1.0, "tau_max": 5.0})
     
         detector = prepare_correlation_detector(spikes_times)
     
    -    n_events = detector.get("n_events")
    +    n_events = detector.n_events
         spikes_times_size = list(map(lambda x: len(x), spikes_times))
    -    assert (n_events == spikes_times_size).all()
    +    assert n_events == spikes_times_size
     
    -    detector_histogram = detector.get("histogram")
    -    assert (detector_histogram == histogram).all()
    +    assert detector.histogram == expected_histogram
     
     
     def test_setting_invalid_n_events():
    @@ -159,11 +161,11 @@ def test_reset():
         spikes_times = [[1.0, 2.0, 6.0], [2.0, 4.0]]
         detector = prepare_correlation_detector(spikes_times)
     
    -    n_events = detector.get("n_events")
    +    # n_events = detector.get("n_events")
     
    -    has_zero_entries = np.any(n_events == 0)
    +    has_zero_entries = detector.n_events == 0
     
         if not has_zero_entries:
             detector.set(n_events=[0, 0])
    -        assert np.all(detector.get("n_events") == 0)
    -        assert np.all(detector.get("histogram") == 0)
    +        assert np.all(np.array(detector.n_events) == 0)
    +        assert np.all(np.array(detector.histogram) == 0)
    
    From e3f9626c378d9091bd27f0edea6268a98b4b3e69 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sun, 24 Sep 2023 01:23:10 +0200
    Subject: [PATCH 243/375] Note possible performance bottlenecks
    
    ---
     nestkernel/connection_manager.cpp | 6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index f8052314cd..180e69dd03 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -695,10 +695,12 @@ nest::ConnectionManager::connect_arrays( long* sources,
               }
             }
     
    -        param_dicts[ tid ].init_access_flags();
    +        param_dicts[ tid ].init_access_flags(); // PYNEST-NG: Possible performance bottleneck
    +
             connect( *s, target_node, tid, synapse_model_id, param_dicts[ tid ], delay_buffer, weight_buffer );
     
    -        param_dicts[ tid ].all_entries_accessed( "connect_arrays", "params" );
    +        param_dicts[ tid ].all_entries_accessed(
    +          "connect_arrays", "params" ); // PYNEST-NG: Possible performance bottleneck
     
             increment_wd( w, d );
           }
    
    From 140ba38b21e8fe808be8c8c95a7a64e0e78f1b00 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Sun, 24 Sep 2023 01:23:33 +0200
    Subject: [PATCH 244/375] Update for pynest-ng
    
    ---
     .../sli2py_recording/test_multimeter_freeze_thaw.py       | 8 +++++---
     .../pytests/sli2py_recording/test_spike_recorder_reset.py | 2 +-
     .../pytests/sli2py_stimulating/test_noise_generator.py    | 2 +-
     .../test_sinusoidal_poisson_generator.py                  | 4 ++--
     4 files changed, 9 insertions(+), 7 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py b/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py
    index b0526f932e..c962bb7cc6 100644
    --- a/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py
    +++ b/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py
    @@ -83,7 +83,7 @@ def test_freeze_thaw_simulation_against_only_thawed_simulation():
         mm = simulate_freeze_thaw(num_neurons=1)
         Vm_with_freeze = mm.events["V_m"]
     
    -    nrn, mm = build_net(num_neurons=1)
    +    _, mm = build_net(num_neurons=1)
         nest.Simulate(10.0)
         Vm_thawed_only = mm.events["V_m"]
     
    @@ -101,8 +101,10 @@ def test_freeze_thaw_neuron_against_only_thawed_neuron():
         """
     
         mm = simulate_freeze_thaw(num_neurons=2)
    -    Vm_with_freeze = mm.events["V_m"][mm.events["senders"] == 1]
    -    Vm_thawed_only = mm.events["V_m"][mm.events["senders"] == 2]
    +    Vm = np.array(mm.events["V_m"])
    +    senders = np.array(mm.events["senders"])
    +    Vm_with_freeze = Vm[senders == 1]
    +    Vm_thawed_only = Vm[senders == 2]
     
         n_frozen = Vm_with_freeze.size
         nptest.assert_array_equal(Vm_with_freeze, Vm_thawed_only[:n_frozen])
    diff --git a/testsuite/pytests/sli2py_recording/test_spike_recorder_reset.py b/testsuite/pytests/sli2py_recording/test_spike_recorder_reset.py
    index 37ca1d2067..13b6443f23 100644
    --- a/testsuite/pytests/sli2py_recording/test_spike_recorder_reset.py
    +++ b/testsuite/pytests/sli2py_recording/test_spike_recorder_reset.py
    @@ -54,7 +54,7 @@ def test_spike_recorder_reset():
         srec.n_events = 0
     
         assert srec.n_events == 0
    -    assert srec.events["times"].size == 0
    +    assert len(srec.events["times"]) == 0
     
         # simulate more, till 160
         nest.Simulate(55.0)  # spikes 110 .. 160 -> 6 spikes
    diff --git a/testsuite/pytests/sli2py_stimulating/test_noise_generator.py b/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    index 9e30d0c6fc..bea3c960c8 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_noise_generator.py
    @@ -46,7 +46,7 @@ def test_noise_generator_set_parameters(prepare_kernel):
     
     
     def test_noise_generator_incorrect_noise_dt(prepare_kernel):
    -    with pytest.raises(nest.NESTError, match="StepMultipleRequired"):
    +    with pytest.raises(nest.NESTErrors.StepMultipleRequired):
             nest.Create("noise_generator", params={"dt": 0.25})
     
     
    diff --git a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    index 2ffca64449..cf2d0a088a 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    @@ -224,8 +224,8 @@ def test_sinusoidal_poisson_generator_rate_profile():
     
         nest.Simulate(100.0)
     
    -    times = mm.get("events")["times"]
    -    actual_rates = mm.get("events")["rate"]
    +    times = np.array(mm.events["times"])
    +    actual_rates = np.array(mm.events["rate"])
     
         scaled_times = times * 2 * np.pi * freq / 1000
         shifted_times = scaled_times + phi
    
    From ea7f561a99cd95eeaa53f78ba2517951ac92ce83 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Mon, 25 Sep 2023 17:09:59 +0200
    Subject: [PATCH 245/375] Return numpy arrays instead of lists whenever it
     makes sense
    
    ---
     pynest/nestkernel_api.pyx | 14 +++++++-------
     1 file changed, 7 insertions(+), 7 deletions(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index d79427888a..739e3938bb 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -146,19 +146,19 @@ cdef object any_to_pyobj(any operand):
         if is_type[string](operand):
             return string_to_pystr(any_cast[string](operand))
         if is_type[vector[int]](operand):
    -        return any_cast[vector[int]](operand)
    +        return numpy.array(any_cast[vector[int]](operand))
         if is_type[vector[long]](operand):
    -        return any_cast[vector[long]](operand)
    +        return numpy.array(any_cast[vector[long]](operand))
         if is_type[vector[size_t]](operand):
    -        return any_cast[vector[size_t]](operand)
    +        return numpy.array(any_cast[vector[size_t]](operand))
         if is_type[vector[double]](operand):
    -        return any_cast[vector[double]](operand)
    +        return numpy.array(any_cast[vector[double]](operand))
         if is_type[vector[vector[double]]](operand):
    -        return any_cast[vector[vector[double]]](operand)
    +        return numpy.array(any_cast[vector[vector[double]]](operand))
         if is_type[vector[vector[vector[double]]]](operand):
    -        return any_cast[vector[vector[vector[double]]]](operand)
    +        return numpy.array(any_cast[vector[vector[vector[double]]]](operand))
         if is_type[vector[vector[vector[long]]]](operand):
    -        return any_cast[vector[vector[vector[long]]]](operand)
    +        return numpy.array(any_cast[vector[vector[vector[long]]]](operand))
         if is_type[vector[string]](operand):
             # PYNEST-NG: Do we want to have this or are bytestrings fine?
             # return any_cast[vector[string]](operand)
    
    From a526d3cc31175ec92a70b315fb5ad0dde7f62aa4 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 10:04:55 +0200
    Subject: [PATCH 246/375] Remove superfluous conversions to numpy.array and
     calls to get()
    
    ---
     .../sli2py_neurons/test_model_node_init.py    |  2 +-
     .../test_neurons_handle_multiplicity.py       | 10 ++---
     .../sli2py_other/test_corr_matrix_det.py      | 12 ++----
     .../sli2py_other/test_multithreading.py       |  2 +-
     .../sli2py_recording/test_compare_delta.py    |  4 +-
     .../pytests/sli2py_recording/test_corr_det.py | 12 +++---
     .../test_multimeter_freeze_thaw.py            |  4 +-
     .../test_threaded_spike_recorder.py           |  2 +-
     .../sli2py_regressions/test_issue_2282.py     |  2 +-
     .../test_ticket_80_175_179.py                 |  8 ++--
     .../sli2py_regressions/test_ticket_903.py     |  3 +-
     .../sli2py_regressions/test_ticket_941.py     |  2 +-
     .../sli2py_regressions/test_ticket_959.py     |  2 +-
     .../sli2py_stimulating/test_ac_generator.py   |  8 ++--
     .../test_sinusoidal_poisson_generator.py      | 21 ++++-----
     .../test_cont_delay_synapse.py                |  2 +-
     .../test_hh_cond_beta_gap_traub.py            |  2 +-
     .../sli2py_synapses/test_hh_cond_exp_traub.py |  6 +--
     .../sli2py_synapses/test_hh_psc_alpha_gap.py  |  2 +-
     .../test_aeif_cond_alpha_multisynapse.py      | 16 +++----
     testsuite/pytests/test_aeif_lsodar.py         |  2 +-
     testsuite/pytests/test_bernoulli_synapse.py   |  2 +-
     testsuite/pytests/test_clopath_synapse.py     |  4 +-
     .../test_correlospinmatrix_detector.py        |  2 +-
     testsuite/pytests/test_gif_exp.py             |  2 +-
     testsuite/pytests/test_gif_pop_psc_exp.py     |  2 +-
     .../test_iaf_ps_psp_poisson_accuracy.py       | 12 +++---
     testsuite/pytests/test_jonke_synapse.py       |  4 +-
     testsuite/pytests/test_parrot_neuron.py       | 13 +++---
     testsuite/pytests/test_parrot_neuron_ps.py    | 12 +++---
     .../pytests/test_poisson_generator_ps.py      |  4 +-
     .../test_poisson_generator_rate_change.py     |  4 +-
     testsuite/pytests/test_rate_copy_model.py     |  6 +--
     .../test_rate_instantaneous_and_delayed.py    |  8 ++--
     testsuite/pytests/test_rate_neuron.py         | 12 +++---
     .../pytests/test_rate_neuron_communication.py | 43 +++++++------------
     .../pytests/test_recording_backend_ascii.py   | 28 ++++++------
     .../pytests/test_recording_backend_memory.py  | 32 +++++++-------
     testsuite/pytests/test_refractory.py          |  2 +-
     testsuite/pytests/test_siegert_neuron.py      |  6 +--
     testsuite/pytests/test_sonata.py              |  3 +-
     .../pytests/test_spatial/test_dumping.py      |  2 +-
     testsuite/pytests/test_stdp_nn_synapses.py    |  4 +-
     testsuite/pytests/test_stdp_pl_synapse_hom.py |  8 ++--
     testsuite/pytests/test_stdp_synapse.py        |  8 ++--
     testsuite/pytests/test_step_rate_generator.py |  6 +--
     testsuite/pytests/test_tsodyks2_synapse.py    |  8 ++--
     testsuite/pytests/test_tsodyks_synapse.py     |  6 ++-
     testsuite/pytests/test_urbanczik_synapse.py   | 16 +++----
     testsuite/pytests/test_visualization.py       | 10 ++---
     50 files changed, 185 insertions(+), 208 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_neurons/test_model_node_init.py b/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    index a3c49149bd..b9083cc7e8 100644
    --- a/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    +++ b/testsuite/pytests/sli2py_neurons/test_model_node_init.py
    @@ -41,7 +41,7 @@ def _get_network_state(nc):
         nest.Connect(nc, neuron)
         nest.Connect(voltmeter, neuron)
         nest.Simulate(1000.0)
    -    volts = np.array(voltmeter.events["V_m"])
    +    volts = voltmeter.events["V_m"]
     
         return (volts, nc.get())
     
    diff --git a/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py b/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    index 082942f6e7..41e9b2db94 100644
    --- a/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    +++ b/testsuite/pytests/sli2py_neurons/test_neurons_handle_multiplicity.py
    @@ -103,7 +103,7 @@ def test_spike_multiplicity_parrot_neuron():
     
         nest.Simulate(10.0)
     
    -    spike_times = sr.get("events")["times"]
    +    spike_times = sr.events["times"]
         expected_spike_times = []
         for t, m in zip(spikes, multiplicities):
             expected_spike_times.extend([t + nest.min_delay] * m)
    @@ -152,16 +152,16 @@ def test_spike_multiplicity(model):
         nest.Connect(sg3, n2, "all_to_all", syn_spec)
     
         # Get v_m before simulation
    -    v1_0 = n1.get("V_m")
    -    v2_0 = n2.get("V_m")
    +    v1_0 = n1.V_m
    +    v2_0 = n2.V_m
     
         assert v1_0 == pytest.approx(v2_0)
     
         # Simulate
         nest.Simulate(8.0)
     
    -    v1 = n1.get("V_m")
    -    v2 = n2.get("V_m")
    +    v1 = n1.V_m
    +    v2 = n2.V_m
     
         assert v1 == pytest.approx(v2)
         assert v1_0 != v1
    diff --git a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py b/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    index 1ccd667777..823fbdfebf 100644
    --- a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    +++ b/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    @@ -104,7 +104,7 @@ def test_number_of_histogram_bins():
     
         nest.Simulate(1)
     
    -    covariance_size = len(cd.get("covariance")[0][0])
    +    covariance_size = len(cd.covariance[0][0])
         assert covariance_size == 6
     
     
    @@ -157,8 +157,7 @@ def test_histogram_correlation(spikes_times, expected_covariance):
         spikes_times_size = list(map(lambda x: len(x), spikes_times))
         assert n_events == spikes_times_size
     
    -    actual_covariance = detector.get("covariance")[0][1]
    -    assert actual_covariance == expected_covariance
    +    assert (detector.covariance[0][1] == expected_covariance).all()
     
     
     def test_reset():
    @@ -170,11 +169,8 @@ def test_reset():
         spikes_times = [[1.0, 2.0, 6.0], [2.0, 4.0]]
         detector = prepare_correlomatrix_detector(spikes_times)
     
    -    covariance = np.array(detector.get("covariance"))
    -
    -    has_zero_entries = np.any(covariance == 0)
    +    has_zero_entries = np.any(detector.covariance == 0)
     
         if not has_zero_entries:
             detector.set(N_channels=8)
    -        covariance = np.array(detector.get("covariance"))
    -        assert np.all(covariance[0][0] == 0.0)
    +        assert np.all(detector.covariance[0][0] == 0.0)
    diff --git a/testsuite/pytests/sli2py_other/test_multithreading.py b/testsuite/pytests/sli2py_other/test_multithreading.py
    index 7f6ddabdb6..b6a6eeea64 100644
    --- a/testsuite/pytests/sli2py_other/test_multithreading.py
    +++ b/testsuite/pytests/sli2py_other/test_multithreading.py
    @@ -67,7 +67,7 @@ def test_transmitted_spikes_btw_threads():
         t_sim = 1.0 + 3 * 1.0
         nest.Simulate(t_sim)
     
    -    sr_times = sr.get("events")["times"]
    +    sr_times = sr.events["times"]
     
         excepted = [3] * (num_threads**2)
     
    diff --git a/testsuite/pytests/sli2py_recording/test_compare_delta.py b/testsuite/pytests/sli2py_recording/test_compare_delta.py
    index b3d3b17d9a..dd8c1a65eb 100644
    --- a/testsuite/pytests/sli2py_recording/test_compare_delta.py
    +++ b/testsuite/pytests/sli2py_recording/test_compare_delta.py
    @@ -61,8 +61,8 @@ def test_simulation_completes():
     
         nest.Simulate(200.0)
     
    -    times = np.array(spike_recorder.events["times"])
    -    senders = np.array(spike_recorder.events["senders"])
    +    times = spike_recorder.events["times"]
    +    senders = spike_recorder.events["senders"]
     
         assert np.all(np.in1d(np.array([1, 2]), senders.T[:2]))
         assert np.all(times.T[:2] == pytest.approx(4.1))
    diff --git a/testsuite/pytests/sli2py_recording/test_corr_det.py b/testsuite/pytests/sli2py_recording/test_corr_det.py
    index be63895c88..93efa0dfde 100644
    --- a/testsuite/pytests/sli2py_recording/test_corr_det.py
    +++ b/testsuite/pytests/sli2py_recording/test_corr_det.py
    @@ -84,7 +84,7 @@ def test_setting_num_of_histogram_bins():
     
         nest.Simulate(1)
     
    -    histogram_size = len(detector.get("histogram"))
    +    histogram_size = len(detector.histogram)
     
         assert histogram_size == 11
     
    @@ -142,7 +142,7 @@ def test_histogram_correlation(spikes_times, expected_histogram):
         spikes_times_size = list(map(lambda x: len(x), spikes_times))
         assert n_events == spikes_times_size
     
    -    assert detector.histogram == expected_histogram
    +    assert (detector.histogram == expected_histogram).all()
     
     
     def test_setting_invalid_n_events():
    @@ -161,11 +161,9 @@ def test_reset():
         spikes_times = [[1.0, 2.0, 6.0], [2.0, 4.0]]
         detector = prepare_correlation_detector(spikes_times)
     
    -    # n_events = detector.get("n_events")
    -
    -    has_zero_entries = detector.n_events == 0
    +    has_zero_entries = np.any(detector.n_events == 0)
     
         if not has_zero_entries:
             detector.set(n_events=[0, 0])
    -        assert np.all(np.array(detector.n_events) == 0)
    -        assert np.all(np.array(detector.histogram) == 0)
    +        assert np.all(detector.n_events == 0)
    +        assert np.all(detector.histogram == 0)
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py b/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py
    index c962bb7cc6..53f1305b9e 100644
    --- a/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py
    +++ b/testsuite/pytests/sli2py_recording/test_multimeter_freeze_thaw.py
    @@ -101,8 +101,8 @@ def test_freeze_thaw_neuron_against_only_thawed_neuron():
         """
     
         mm = simulate_freeze_thaw(num_neurons=2)
    -    Vm = np.array(mm.events["V_m"])
    -    senders = np.array(mm.events["senders"])
    +    Vm = mm.events["V_m"]
    +    senders = mm.events["senders"]
         Vm_with_freeze = Vm[senders == 1]
         Vm_thawed_only = Vm[senders == 2]
     
    diff --git a/testsuite/pytests/sli2py_recording/test_threaded_spike_recorder.py b/testsuite/pytests/sli2py_recording/test_threaded_spike_recorder.py
    index 884c206c06..ad50a749b3 100644
    --- a/testsuite/pytests/sli2py_recording/test_threaded_spike_recorder.py
    +++ b/testsuite/pytests/sli2py_recording/test_threaded_spike_recorder.py
    @@ -48,7 +48,7 @@ def simulator(num_threads):
     
         nest.Simulate(200.0)
     
    -    df = pd.DataFrame(srec.get("events"))
    +    df = pd.DataFrame(srec.events)
     
         return df
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_2282.py b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    index 838db5e136..a9bf37eb62 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_2282.py
    @@ -54,7 +54,7 @@ def simulator(num_threads):
     
         nest.Simulate(2.0)
     
    -    recording = np.array(mm.events.get("I"))
    +    recording = mm.events["I"]
     
         return recording
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py b/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py
    index 35e0e66a55..2ed4dd228f 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py
    @@ -110,8 +110,8 @@ def reference_run():
     
         srs, vms = build_net()
         nest.Simulate(total_sim_time)
    -    srs_reference = srs.get("events", "times")
    -    vms_reference = vms.get("events", "V_m")
    +    srs_reference = srs.events["times"]
    +    vms_reference = vms.events["V_m"]
     
         return srs_reference, vms_reference
     
    @@ -141,8 +141,8 @@ def test_vm_and_sr_produce_same_output(t_block, reference_run):
             while nest.biological_time < total_sim_time:
                 nest.Run(t_block)
     
    -    srs_times = srs.get("events", "times")
    -    vms_recs = vms.get("events", "V_m")
    +    srs_times = srs.events["times"]
    +    vms_recs = vms.events["V_m"]
     
         srs_reference, vms_reference = reference_run
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_903.py b/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    index ad8eb6e49a..6775ff70d9 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    @@ -23,7 +23,6 @@
     """This test ensures that delays drawn from continuous distribution are not rounded up strictly."""
     
     import nest
    -import numpy as np
     import pytest
     import scipy.stats
     
    @@ -46,4 +45,4 @@ def test_correct_rounding_distributions():
         delays = nest.GetConnections().delay
     
         assert set(delays) == {1, 2}
    -    assert scipy.stats.binom_test(sum(np.array(delays) == 2.0), indegree) > significance
    +    assert scipy.stats.binom_test(sum(delays == 2.0), indegree) > significance
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_941.py b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    index 0b7db4dc38..3702f0eaed 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    @@ -81,7 +81,7 @@ def test_different_connections():
         assert nest.num_connections == 5
     
         nest.Simulate(10.0)
    -    spike_recs = spike_recorder.get("events", ["times"])
    +    spike_recs = spike_recorder.events["times"]
         assert np.all(
             spike_recs["times"]
             == pytest.approx(
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_959.py b/testsuite/pytests/sli2py_regressions/test_ticket_959.py
    index 1d8a422d28..fd549b7081 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_959.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_959.py
    @@ -41,7 +41,7 @@ def record_spikes(sim_time, repeats):
     
         for w in range(0, repeats):
             nest.Simulate(sim_time)
    -    events = spike_recorder.get("events")
    +    events = spike_recorder.events
         return np.vstack((events["senders"], events["times"]))
     
     
    diff --git a/testsuite/pytests/sli2py_stimulating/test_ac_generator.py b/testsuite/pytests/sli2py_stimulating/test_ac_generator.py
    index 9d0d7be3ec..f0929e334b 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_ac_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_ac_generator.py
    @@ -89,14 +89,14 @@ def test_ac_generaor():
     
         # Assert that the v_m of the neuron with the ac_generator
         # is equal to that with the step-current generator
    -    v_m_ac = vm_ac.get("events", "V_m")
    -    v_m_sc = vm_sc.get("events", "V_m")
    +    v_m_ac = vm_ac.events["V_m"]
    +    v_m_sc = vm_sc.events["V_m"]
     
         assert v_m_ac == pytest.approx(v_m_sc)
     
         # Assert that the I (current) of the neuron with the ac_generator
         # is equal to that with the step-current generator
    -    I_ac = mm_ac.get("events", "I")
    -    I_sc = mm_sc.get("events", "I")
    +    I_ac = mm_ac.events["I"]
    +    I_sc = mm_sc.events["I"]
     
         assert I_ac == pytest.approx(I_sc)
    diff --git a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    index cf2d0a088a..6648b33f10 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    @@ -40,7 +40,7 @@ def test_individual_spike_trains_true_by_default():
         """
     
         sspg = nest.Create("sinusoidal_poisson_generator")
    -    individual_spike_trains = sspg.get("individual_spike_trains")
    +    individual_spike_trains = sspg.individual_spike_trains
         assert individual_spike_trains
     
     
    @@ -51,7 +51,7 @@ def test_set_individual_spike_trains_on_set_defaults():
     
         nest.SetDefaults("sinusoidal_poisson_generator", {"individual_spike_trains": False})
         sspg = nest.Create("sinusoidal_poisson_generator")
    -    individual_spike_trains = sspg.get("individual_spike_trains")
    +    individual_spike_trains = sspg.individual_spike_trains
         assert not individual_spike_trains
     
     
    @@ -61,7 +61,7 @@ def test_set_individual_spike_trains_on_creation():
         """
     
         sspg = nest.Create("sinusoidal_poisson_generator", params={"individual_spike_trains": False})
    -    individual_spike_trains = sspg.get("individual_spike_trains")
    +    individual_spike_trains = sspg.individual_spike_trains
         assert not individual_spike_trains
     
     
    @@ -76,7 +76,7 @@ def test_set_individual_spike_trains_on_copy_model():
             params={"individual_spike_trains": False},
         )
         sspg = nest.Create("sinusoidal_poisson_generator_copy")
    -    individual_spike_trains = sspg.get("individual_spike_trains")
    +    individual_spike_trains = sspg.individual_spike_trains
         assert not individual_spike_trains
     
     
    @@ -130,7 +130,7 @@ def test_sinusoidal_poisson_generator_with_spike_recorder(num_threads, individua
         nest.Simulate(500.0)
     
         # Nested list of recorded spike times from each sender
    -    spikes_all_nrns = srecs.get("events", "times")
    +    spikes_all_nrns = srecs.events["times"]
     
         # Check that we actually obtained a spike times array for each neuron
         assert len(spikes_all_nrns) == total_num_nrns
    @@ -188,8 +188,8 @@ def test_sinusoidal_poisson_generator_with_multimeter(num_threads, individual_sp
     
         nest.Simulate(T_sim)
     
    -    times = mm.get("events")["times"]
    -    rates = mm.get("events")["rate"]
    +    times = mm.events["times"]
    +    rates = mm.events["rate"]
     
         # Check that times and rates contain ndata points
         expected_ndata = T_sim - 1
    @@ -224,11 +224,8 @@ def test_sinusoidal_poisson_generator_rate_profile():
     
         nest.Simulate(100.0)
     
    -    times = np.array(mm.events["times"])
    -    actual_rates = np.array(mm.events["rate"])
    -
    -    scaled_times = times * 2 * np.pi * freq / 1000
    +    scaled_times = mm.events["times"] * 2 * np.pi * freq / 1000
         shifted_times = scaled_times + phi
         expected_rates = np.sin(shifted_times) * ac + dc
     
    -    nptest.assert_allclose(actual_rates, expected_rates)
    +    nptest.assert_allclose(mm.events["rate"], expected_rates)
    diff --git a/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    index aa50930af5..e6d5d5d36b 100644
    --- a/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_cont_delay_synapse.py
    @@ -48,7 +48,7 @@ def run_simulation(resolution, delay, explicit=False):
         nest.Connect(n, sr)
     
         nest.Simulate(10.0)
    -    actual_spike_times = sr.get("events")["times"]
    +    actual_spike_times = sr.events["times"]
         return actual_spike_times
     
     
    diff --git a/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py b/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py
    index 4ca7c85484..55416512c7 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hh_cond_beta_gap_traub.py
    @@ -122,7 +122,7 @@ def test_hh_cond_beta_gap_traub(prepare_voltmeter, reference_data):
         vm = prepare_voltmeter
         reference_data = dict(reference_data)
     
    -    events = vm.get("events")
    +    events = vm.events
         recorded_times = events["times"]
         recorded_vm = events["V_m"]
     
    diff --git a/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py b/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    index 82b96842bc..800b82518a 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hh_cond_exp_traub.py
    @@ -183,16 +183,16 @@ def test_setting_params(neuron, reference_params):
     def test_recoding_device_status(recording_devices, reference_data_vm, reference_data_mm):
         vm, mm, sr = recording_devices
         reference_data_vm = np.array(reference_data_vm)
    -    vm_events = vm.get("events")
    +    vm_events = vm.events
         actual_vm_data = np.array(list(zip(vm_events["times"], vm_events["V_m"])))
     
         nptest.assert_allclose(actual_vm_data, reference_data_vm, rtol=1e-5)
     
         reference_data_mm = np.array(reference_data_mm)
    -    mm_events = mm.get("events")
    +    mm_events = mm.events
         actual_mm_data = np.array(list(zip(mm_events["times"], mm_events["g_ex"], mm_events["g_in"])))
     
         nptest.assert_allclose(actual_mm_data, reference_data_mm, rtol=1e-5)
     
    -    sr_events_times = sr.get("events")["times"]
    +    sr_events_times = sr.events["times"]
         assert sr_events_times == 2
    diff --git a/testsuite/pytests/sli2py_synapses/test_hh_psc_alpha_gap.py b/testsuite/pytests/sli2py_synapses/test_hh_psc_alpha_gap.py
    index e6cfec4487..9663ffc0f6 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hh_psc_alpha_gap.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hh_psc_alpha_gap.py
    @@ -123,7 +123,7 @@ def test_hh_cond_beta_gap(prepare_voltmeter, reference_data):
         vm = prepare_voltmeter
         reference_data = dict(reference_data)
     
    -    events = vm.get("events")
    +    events = vm.events
         recorded_times = events["times"]
         recorded_vm = events["V_m"]
     
    diff --git a/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py b/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    index 16ce9af2a9..0783ebc3df 100644
    --- a/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    +++ b/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    @@ -115,13 +115,13 @@ def test_single_multi_synapse_equivalence(self, have_plotting):
     
             nest.Simulate(simulation_t)
     
    -        summed_V_m = np.zeros_like(multisynapse_neuron_vm.get("events")["V_m"], dtype=float)
    +        summed_V_m = np.zeros_like(multisynapse_neuron_vm.events["V_m"], dtype=float)
             for i in range(4):
                 summed_V_m += singlesynapse_neuron_vm[i].events["V_m"][0] - V_m_steadystate
     
             summed_V_m += V_m_steadystate
     
    -        error = np.abs(summed_V_m - multisynapse_neuron_vm.get("events")["V_m"])
    +        error = np.abs(summed_V_m - multisynapse_neuron_vm.events["V_m"])
     
             if have_plotting:
                 # plot timeseries as a sanity check
    @@ -129,24 +129,24 @@ def test_single_multi_synapse_equivalence(self, have_plotting):
     
                 fig, ax = plt.subplots(nrows=6)
                 ax[0].plot(
    -                multisynapse_neuron_vm.get("events")["times"],
    -                multisynapse_neuron_vm.get("events")["V_m"],
    +                multisynapse_neuron_vm.events["times"],
    +                multisynapse_neuron_vm.events["V_m"],
                     label="V_m multisyn",
                     alpha=0.5,
                 )
    -            ax[0].plot(multisynapse_neuron_vm.get("events")["times"], summed_V_m, label="V_m summed", alpha=0.5)
    +            ax[0].plot(multisynapse_neuron_vm.events["times"], summed_V_m, label="V_m summed", alpha=0.5)
     
                 for i in range(4):
                     ax[i + 1].plot(
    -                    singlesynapse_neuron_vm[i].get("events")["times"],
    -                    singlesynapse_neuron_vm[i].get("events")["V_m"],
    +                    singlesynapse_neuron_vm[i].events["times"],
    +                    singlesynapse_neuron_vm[i].events["V_m"],
                         label="V_m single (" + str(i) + ")",
                     )
     
                 for _ax in ax:
                     _ax.legend()
     
    -            ax[-1].semilogy(multisynapse_neuron_vm.get("events")["times"], error, label="errror")
    +            ax[-1].semilogy(multisynapse_neuron_vm.events["times"], error, label="errror")
                 fig.savefig("test_aeif_cond_alpha_multisynapse.png")
     
             # compare with a large tolerance because previous PSPs affect subsequent PSPs in the multisynapse neuron
    diff --git a/testsuite/pytests/test_aeif_lsodar.py b/testsuite/pytests/test_aeif_lsodar.py
    index 7851df1d10..ef14306c23 100644
    --- a/testsuite/pytests/test_aeif_lsodar.py
    +++ b/testsuite/pytests/test_aeif_lsodar.py
    @@ -232,7 +232,7 @@ def compute_difference(self, multimeters, params, reference, recordables):
                 dmm = mm.events
                 for record in recordables:
                     reference_record = np.array(reference[record])
    -                dmm_record = np.array(dmm[record])
    +                dmm_record = dmm[record]
                     # ignore places where a divide by zero would occur
                     rds = np.abs(reference_record - dmm_record)
                     nonzero = np.where(~np.isclose(reference_record, 0.0))[0]
    diff --git a/testsuite/pytests/test_bernoulli_synapse.py b/testsuite/pytests/test_bernoulli_synapse.py
    index a8e71b89fa..f6960d246d 100644
    --- a/testsuite/pytests/test_bernoulli_synapse.py
    +++ b/testsuite/pytests/test_bernoulli_synapse.py
    @@ -73,7 +73,7 @@ def test_bernoulli_synapse_statistics(self, seed: int):
             nest.Simulate(2.0 + N_spikes)
     
             # get number of spikes transmitted
    -        N_spikes_transmitted = len(sr.get("events")["times"])
    +        N_spikes_transmitted = len(sr.events["times"])
     
             # mean value of spikes to be received with transmission probability p
             mean = N_spikes * p
    diff --git a/testsuite/pytests/test_clopath_synapse.py b/testsuite/pytests/test_clopath_synapse.py
    index 0eb7a02b07..2cc91905ae 100644
    --- a/testsuite/pytests/test_clopath_synapse.py
    +++ b/testsuite/pytests/test_clopath_synapse.py
    @@ -210,8 +210,8 @@ def test_SynapseFunctionWithAeifModel(self):
     
             # Evaluation
             data = mm.events
    -        senders = np.array(data["senders"])
    -        voltages = np.array(data["V_m"])
    +        senders = data["senders"]
    +        voltages = data["V_m"]
     
             vm1 = voltages[np.where(senders == 1)]
             vm2 = voltages[np.where(senders == 2)]
    diff --git a/testsuite/pytests/test_correlospinmatrix_detector.py b/testsuite/pytests/test_correlospinmatrix_detector.py
    index 289f7529c7..7ea4de48ee 100644
    --- a/testsuite/pytests/test_correlospinmatrix_detector.py
    +++ b/testsuite/pytests/test_correlospinmatrix_detector.py
    @@ -73,4 +73,4 @@ def test_correlospinmatrix_detector():
     
         nest.Simulate(100.0)
     
    -    np.testing.assert_equal(np.array(csd.count_covariance), expected_corr)
    +    np.testing.assert_equal(csd.count_covariance, expected_corr)
    diff --git a/testsuite/pytests/test_gif_exp.py b/testsuite/pytests/test_gif_exp.py
    index 4f2935dcd0..efd96b6fe9 100644
    --- a/testsuite/pytests/test_gif_exp.py
    +++ b/testsuite/pytests/test_gif_exp.py
    @@ -71,7 +71,7 @@ def run_simulation(self, model, params=None):
     
             nest.Simulate(150.0)
     
    -        return sr.get("events")["times"]
    +        return sr.events["times"]
     
         def test_gif_exp_wrong_params(self, model):
             """Test for wrong parameters (negative lambda)"""
    diff --git a/testsuite/pytests/test_gif_pop_psc_exp.py b/testsuite/pytests/test_gif_pop_psc_exp.py
    index 9754ce8ae6..5d5323c3e9 100644
    --- a/testsuite/pytests/test_gif_pop_psc_exp.py
    +++ b/testsuite/pytests/test_gif_pop_psc_exp.py
    @@ -77,7 +77,7 @@ def test_gif_pop_psc_exp(self):
     
             nest.Simulate(T)
     
    -        nspike = vm.get("events")["n_events"][start_step:]
    +        nspike = vm.events["n_events"][start_step:]
     
             mean_nspike = np.mean(nspike)
             mean_rate = mean_nspike / pop_size / res * 1000.0  # convert to mean rate
    diff --git a/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py b/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    index d44b9ca3fb..0c44d336e0 100644
    --- a/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    +++ b/testsuite/pytests/test_iaf_ps_psp_poisson_accuracy.py
    @@ -115,20 +115,20 @@ def test_poisson_spikes_different_stepsizes(h):
     
         nest.Simulate(T)
     
    -    spiketrain = sr.get("events", "times")
    +    spiketrain = sr.events["times"]
     
         reference_potential = spiketrain_response(spiketrain)
         if DEBUG:
    -        u = neuron.get("V_m")
    +        u = neuron.V_m
             nest.Simulate(1.0)  # to get V_m recording until time T
    -        times = mm.get("events", "times")
    -        V_m = mm.get("events", "V_m")
    +        times = mm.events["times"]
    +        V_m = mm.events["V_m"]
             import matplotlib.pyplot as plt
     
             plt.plot(times, V_m)
             plt.scatter([T], [u], s=20.0)
             plt.scatter([T], [reference_potential], s=20, marker="X")
             plt.show()
    -        neuron.set(V_m=u)  # reset to value before extra 1s simulation
    +        neuron.V_m = u  # reset to value before extra 1s simulation
     
    -    assert neuron.get("V_m") == pytest.approx(reference_potential)
    +    assert neuron.V_m == pytest.approx(reference_potential)
    diff --git a/testsuite/pytests/test_jonke_synapse.py b/testsuite/pytests/test_jonke_synapse.py
    index d55f8e8409..89f96f86a3 100644
    --- a/testsuite/pytests/test_jonke_synapse.py
    +++ b/testsuite/pytests/test_jonke_synapse.py
    @@ -151,8 +151,8 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        all_spikes = np.array(spike_recorder.events["times"])
    -        senders = np.array(spike_recorder.events["senders"])
    +        all_spikes = spike_recorder.events["times"]
    +        senders = spike_recorder.events["senders"]
             pre_spikes = all_spikes[senders == presynaptic_neuron.tolist()[0]]
             post_spikes = all_spikes[senders == postsynaptic_neuron.tolist()[0]]
     
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index bca1ad8ca9..2874c7e539 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -26,7 +26,6 @@
     import unittest
     
     import nest
    -import numpy as np
     
     
     class ParrotNeuronTestCase(unittest.TestCase):
    @@ -56,8 +55,8 @@ def test_ParrotNeuronRepeatSpike(self):
     
             # get spike from parrot neuron
             events = self.spikes.events
    -        times = np.array(events["times"])
    -        senders = np.array(events["senders"])
    +        times = events["times"]
    +        senders = events["senders"]
             post_time = times[senders == self.parrot.global_id]
     
             # assert spike was repeated at correct time
    @@ -73,8 +72,8 @@ def test_ParrotNeuronIgnoreSpike(self):
     
             # get spike from parrot neuron, assert it was ignored
             events = self.spikes.events
    -        times = np.array(events["times"])
    -        senders = np.array(events["senders"])
    +        times = events["times"]
    +        senders = events["senders"]
             post_time = times[senders == self.parrot.global_id]
             assert len(post_time) == 0, "Parrot neuron failed to ignore spike arriving on port 1"
     
    @@ -93,8 +92,8 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
     
             # get spikes from parrot neuron, assert two were transmitted
             events = self.spikes.events
    -        times = np.array(events["times"])
    -        senders = np.array(events["senders"])
    +        times = events["times"]
    +        senders = events["senders"]
             post_times = times[senders == self.parrot.global_id]
             assert (
                 len(post_times) == 2 and post_times[0] == post_times[1]
    diff --git a/testsuite/pytests/test_parrot_neuron_ps.py b/testsuite/pytests/test_parrot_neuron_ps.py
    index 8687b18795..4f5370b081 100644
    --- a/testsuite/pytests/test_parrot_neuron_ps.py
    +++ b/testsuite/pytests/test_parrot_neuron_ps.py
    @@ -64,8 +64,8 @@ def test_ParrotNeuronRepeatSpike(self):
             nest.Simulate(_round_up(self.spike_time + 2 * self.delay))
     
             # get spike from parrot neuron
    -        times = np.array(self.spikes.events["times"])
    -        senders = np.array(self.spikes.events["senders"])
    +        times = self.spikes.events["times"]
    +        senders = self.spikes.events["senders"]
             post_time = times[senders == self.parrot.global_id]
     
             # assert spike was repeated at correct time
    @@ -80,8 +80,8 @@ def test_ParrotNeuronIgnoreSpike(self):
             nest.Simulate(_round_up(self.spike_time + 2.0 * self.delay))
     
             # get spike from parrot neuron, assert it was ignored
    -        times = np.array(self.spikes.events["times"])
    -        senders = np.array(self.spikes.events["senders"])
    +        times = self.spikes.events["times"]
    +        senders = self.spikes.events["senders"]
             post_time = times[senders == self.parrot.global_id]
             assert len(post_time) == 0, "Parrot neuron failed to ignore spike arriving on port 1"
     
    @@ -99,8 +99,8 @@ def test_ParrotNeuronOutgoingMultiplicity(self):
             nest.Simulate(_round_up(self.spike_time + 2.0 * self.delay))
     
             # get spikes from parrot neuron, assert two were transmitted
    -        times = np.array(self.spikes.events["times"])
    -        senders = np.array(self.spikes.events["senders"])
    +        times = self.spikes.events["times"]
    +        senders = self.spikes.events["senders"]
             post_times = times[senders == self.parrot.global_id]
             assert (
                 len(post_times) == 2 and post_times[0] == post_times[1]
    diff --git a/testsuite/pytests/test_poisson_generator_ps.py b/testsuite/pytests/test_poisson_generator_ps.py
    index 85265a84a8..4ebb36776c 100644
    --- a/testsuite/pytests/test_poisson_generator_ps.py
    +++ b/testsuite/pytests/test_poisson_generator_ps.py
    @@ -56,8 +56,8 @@ def test_poisson_generator_ps():
     
         nest.Simulate(1000.0)
     
    -    times1 = np.array(sr1.events["times"])
    -    times2 = np.array(sr2.events["times"])
    +    times1 = sr1.events["times"]
    +    times2 = sr2.events["times"]
         assert not np.array_equal(times1, times2)
     
         # check there are no spikes between stop and start time
    diff --git a/testsuite/pytests/test_poisson_generator_rate_change.py b/testsuite/pytests/test_poisson_generator_rate_change.py
    index ff0d8d26a7..e1994fc0b1 100644
    --- a/testsuite/pytests/test_poisson_generator_rate_change.py
    +++ b/testsuite/pytests/test_poisson_generator_rate_change.py
    @@ -30,8 +30,8 @@
     class TestPgRateChange(unittest.TestCase):
         def _kstest_first_spiketimes(self, sr, start_t, expon_scale, resolution, p_value_lim):
             events = sr.events
    -        senders = np.array(events["senders"])
    -        times = np.array(events["times"])
    +        senders = events["senders"]
    +        times = events["times"]
             min_times = [np.min(times[np.where(senders == s)]) for s in np.unique(senders)]
             d, p_val = scipy.stats.kstest(min_times, "expon", args=(start_t + resolution, expon_scale))
             print("p_value =", p_val)
    diff --git a/testsuite/pytests/test_rate_copy_model.py b/testsuite/pytests/test_rate_copy_model.py
    index f4d4c9a593..dabd20ed52 100644
    --- a/testsuite/pytests/test_rate_copy_model.py
    +++ b/testsuite/pytests/test_rate_copy_model.py
    @@ -80,9 +80,9 @@ def test_rate_copy_model(self):
     
             # make sure rates are identical
             events = multimeter.events
    -        senders = np.array(events["senders"])
    -        rate_1 = np.array(events["rate"])[np.where(senders == rate_neuron_1.get("global_id"))]
    -        rate_2 = np.array(events["rate"])[np.where(senders == rate_neuron_2.get("global_id"))]
    +        senders = events["senders"]
    +        rate_1 = events["rate"][np.where(senders == rate_neuron_1.global_id)]
    +        rate_2 = events["rate"][np.where(senders == rate_neuron_2.global_id)]
             assert np.sum(np.abs(rate_2 - rate_1)) < 1e-12
     
     
    diff --git a/testsuite/pytests/test_rate_instantaneous_and_delayed.py b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    index 84c50b64a7..2d8ec9e6b6 100644
    --- a/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    +++ b/testsuite/pytests/test_rate_instantaneous_and_delayed.py
    @@ -73,11 +73,11 @@ def test_rate_instantaneous_and_delayed(self):
     
             # make sure shifted rates are identical
             events = multimeter.events
    -        senders = np.array(events["senders"])
    +        senders = events["senders"]
     
    -        rate_1 = np.array(events["rate"])[np.where(senders == rate_neuron_1.get("global_id"))]
    -        times_2 = np.array(events["times"])[np.where(senders == rate_neuron_2.get("global_id"))]
    -        rate_2 = np.array(events["rate"])[np.where(senders == rate_neuron_2.get("global_id"))]
    +        rate_1 = events["rate"][np.where(senders == rate_neuron_1.global_id)]
    +        times_2 = events["times"][np.where(senders == rate_neuron_2.global_id)]
    +        rate_2 = events["rate"][np.where(senders == rate_neuron_2.global_id)]
     
             # get shifted rate_2
             rate_2 = rate_2[times_2 > delay]
    diff --git a/testsuite/pytests/test_rate_neuron.py b/testsuite/pytests/test_rate_neuron.py
    index e8b4f47734..242e29e4df 100644
    --- a/testsuite/pytests/test_rate_neuron.py
    +++ b/testsuite/pytests/test_rate_neuron.py
    @@ -67,11 +67,11 @@ def test_RateNeuronMean(self):
     
             # get noise from rate neurons
             events = self.multimeter.events
    -        senders = np.array(events["senders"])
    +        senders = events["senders"]
             senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id)[0]
             senders_opn = np.where(senders == self.rate_neuron_opn.global_id)[0]
     
    -        rate = np.array(events["rate"])
    +        rate = events["rate"]
             mean_rate_ipn = np.mean(rate[senders_ipn])
             mean_rate_opn = np.mean(rate[senders_opn])
     
    @@ -85,11 +85,11 @@ def test_RateNeuronNoise(self):
     
             # get noise from rate neurons
             events = self.multimeter.events
    -        senders = np.array(events["senders"])
    +        senders = events["senders"]
             senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id)[0]
             senders_opn = np.where(senders == self.rate_neuron_opn.global_id)[0]
     
    -        noise = np.array(events["noise"])
    +        noise = events["noise"]
             noise_ipn = noise[senders_ipn]
             std_noise_ipn = np.std(noise_ipn)
             noise_opn = noise[senders_opn]
    @@ -105,10 +105,10 @@ def test_RateNeuronVariance(self):
     
             # get variance of the rate
             events = self.multimeter.events
    -        senders = np.array(events["senders"])
    +        senders = events["senders"]
             senders_ipn = np.where(senders == self.rate_neuron_ipn.global_id)[0]
     
    -        rate = np.array(events["rate"])[senders_ipn]
    +        rate = events["rate"][senders_ipn]
             var_rate = np.var(rate)
     
             # expected variance
    diff --git a/testsuite/pytests/test_rate_neuron_communication.py b/testsuite/pytests/test_rate_neuron_communication.py
    index e9e8f79451..58d7e2574f 100644
    --- a/testsuite/pytests/test_rate_neuron_communication.py
    +++ b/testsuite/pytests/test_rate_neuron_communication.py
    @@ -133,14 +133,11 @@ def test_RateNeuronDelay(self):
     
             # get noise from rate neuron
             events = self.multimeter.events
    -        senders = np.array(events["senders"])
    +        senders = events["senders"]
     
    -        rate_neuron_1_node_id = self.rate_neuron_1.get("global_id")
    -        times = np.array(events["times"])[np.where(senders == rate_neuron_1_node_id)]
    -        rate_1 = np.array(events["rate"])[np.where(senders == rate_neuron_1_node_id)]
    -
    -        rate_neuron_2_node_id = self.rate_neuron_2.get("global_id")
    -        rate_2 = np.array(events["rate"])[np.where(senders == rate_neuron_2_node_id)]
    +        times = events["times"][np.where(senders == self.rate_neuron_1.global_id)]
    +        rate_1 = events["rate"][np.where(senders == self.rate_neuron_1.global_id)]
    +        rate_2 = events["rate"][np.where(senders == self.rate_neuron_2.global_id)]
     
             delay_rate_1 = times[np.where(rate_1 > 0)[0][0]]
             test_delay_1 = self.delay + self.dt
    @@ -155,10 +152,9 @@ def test_RateNeuronWeight(self):
     
             # get noise from rate neuron
             events = self.multimeter.events
    -        senders = np.array(events["senders"])
    +        senders = events["senders"]
     
    -        rate_neuron_1_node_id = self.rate_neuron_1.get("global_id")
    -        rate_1 = np.array(events["rate"])[np.where(senders == rate_neuron_1_node_id)]
    +        rate_1 = events["rate"][np.where(senders == self.rate_neuron_1.global_id)]
     
             value = rate_1[-1]
             value_test = self.drive * self.weight
    @@ -178,19 +174,12 @@ def test_RateNeuronNL(self):
     
                 # get noise from rate neuron
                 events = self.multimeter.events
    -            senders = np.array(events["senders"])
    -
    -            rate_neuron_1_node_id = self.rate_neuron_1.get("global_id")
    -            rate_1 = np.array(events["rate"])[np.where(senders == rate_neuron_1_node_id)][-1]
    -
    -            rate_neuron_2_node_id = self.rate_neuron_2.get("global_id")
    -            rate_2 = np.array(events["rate"])[np.where(senders == rate_neuron_2_node_id)][-1]
    -
    -            rate_neuron_3_node_id = self.rate_neuron_3.get("global_id")
    -            rate_3 = np.array(events["rate"])[np.where(senders == rate_neuron_3_node_id)][-1]
    +            senders = events["senders"]
     
    -            rate_neuron_4_node_id = self.rate_neuron_4.get("global_id")
    -            rate_4 = np.array(events["rate"])[np.where(senders == rate_neuron_4_node_id)][-1]
    +            rate_1 = events["rate"][np.where(senders == self.rate_neuron_1.global_id)][-1]
    +            rate_2 = events["rate"][np.where(senders == self.rate_neuron_2.global_id)][-1]
    +            rate_3 = events["rate"][np.where(senders == self.rate_neuron_3.global_id)][-1]
    +            rate_4 = events["rate"][np.where(senders == self.rate_neuron_4.global_id)][-1]
     
                 rates = np.array([rate_1, rate_2, rate_3, rate_4])
     
    @@ -227,10 +216,9 @@ def test_RectifyOutput(self):
     
             # get activity from rate neuron
             events = self.multimeter.events
    -        senders = np.array(events["senders"])
    +        senders = events["senders"]
     
    -        rate_neuron_5_node_id = self.rate_neuron_5.get("global_id")
    -        rate_5 = np.array(events["rate"])[np.where(senders == rate_neuron_5_node_id)]
    +        rate_5 = events["rate"][np.where(senders == self.rate_neuron_5.global_id)]
     
             value = rate_5[-1]
             value_test = 0.0
    @@ -245,10 +233,9 @@ def test_ParrotRateNeuron(self):
     
             # get activity from rate neuron
             events = self.multimeter.events
    -        senders = np.array(events["senders"])
    +        senders = events["senders"]
     
    -        parrot_node_id = self.parrot_neuron.get("global_id")
    -        parrot_rate = np.array(events["rate"])[np.where(senders == parrot_node_id)]
    +        parrot_rate = events["rate"][np.where(senders == self.parrot_neuron.global_id)]
     
             value = parrot_rate[-1]
             g = self.parrot_neuron.g
    diff --git a/testsuite/pytests/test_recording_backend_ascii.py b/testsuite/pytests/test_recording_backend_ascii.py
    index 129f5f1c2d..5ff59e2236 100644
    --- a/testsuite/pytests/test_recording_backend_ascii.py
    +++ b/testsuite/pytests/test_recording_backend_ascii.py
    @@ -36,7 +36,7 @@ def testAAAOverwriteFiles(self):
             mm = nest.Create("multimeter", params=mm_params)
     
             try:
    -            os.remove(mm.get("filenames")[0])
    +            os.remove(mm.filenames[0])
             except FileNotFoundError:
                 pass
     
    @@ -79,7 +79,7 @@ def testDataPrefixDataPathAndFilenameExtension(self):
                 "file_extension": file_extension,
             }
             mm = nest.Create("multimeter", params=mm_params)
    -        fname = mm.get("filenames")[0]
    +        fname = mm.filenames[0]
     
             self.assertTrue(data_path in fname)
             self.assertTrue(data_prefix in fname)
    @@ -98,10 +98,10 @@ def testLabel(self):
                 "label": label,
             }
             mm = nest.Create("multimeter", params=mm_params)
    -        fname = mm.get("filenames")[0]
    +        fname = mm.filenames[0]
     
             self.assertTrue(label in fname)
    -        self.assertTrue(mm.get("model") not in fname)
    +        self.assertTrue(mm.model not in fname)
     
         def testFileContent(self):
             """Test if the file contains correct headers and expected content"""
    @@ -115,11 +115,11 @@ def testFileContent(self):
     
             nest.Simulate(15)
     
    -        fname = mm.get("filenames")[0]
    +        fname = mm.filenames[0]
             with open(fname) as f:
                 lines = f.readlines()
     
    -            self.assertEqual(len(lines), mm.get("n_events") + 3)
    +            self.assertEqual(len(lines), mm.n_events + 3)
     
                 version = nest.build_info["version"]
                 self.assertEqual(lines[0], "# NEST version: {}\n".format(version))
    @@ -142,10 +142,10 @@ def testEventCounter(self):
             nest.Connect(mm, nest.Create("iaf_psc_alpha"))
     
             nest.Simulate(15)
    -        self.assertEqual(mm.get("n_events"), 140)
    +        self.assertEqual(mm.n_events, 140)
     
             nest.Simulate(1)
    -        self.assertEqual(mm.get("n_events"), 150)
    +        self.assertEqual(mm.n_events, 150)
     
             # Now with multithreading
     
    @@ -158,10 +158,10 @@ def testEventCounter(self):
             nest.Connect(mm, nest.Create("iaf_psc_alpha", 2))
     
             nest.Simulate(15)
    -        self.assertEqual(mm.get("n_events"), 280)
    +        self.assertEqual(mm.n_events, 280)
     
             nest.Simulate(1)
    -        self.assertEqual(mm.get("n_events"), 300)
    +        self.assertEqual(mm.n_events, 300)
     
         def testResetEventCounter(self):
             """"""
    @@ -180,11 +180,11 @@ def testResetEventCounter(self):
                 mm.n_events = 10
     
             # Check that the event counter was indeed not changed
    -        self.assertEqual(mm.get("n_events"), 140)
    +        self.assertEqual(mm.n_events, 140)
     
             # Check that the events dict is cleared when setting n_events to 0
             mm.n_events = 0
    -        self.assertEqual(mm.get("n_events"), 0)
    +        self.assertEqual(mm.n_events, 0)
     
         def testTimeInSteps(self):
             """Check if time_in_steps works properly."""
    @@ -195,14 +195,14 @@ def testTimeInSteps(self):
             mm = nest.Create("multimeter", params={"record_to": "ascii"})
     
             # Check that time_in_steps is set False by default
    -        self.assertFalse(mm.get("time_in_steps"))
    +        self.assertFalse(mm.time_in_steps)
     
             mm.set({"record_from": ["V_m"], "time_in_steps": True})
             nest.Connect(mm, nest.Create("iaf_psc_alpha"))
     
             nest.Simulate(15)
     
    -        fname = mm.get("filenames")[0]
    +        fname = mm.filenames[0]
             with open(fname) as f:
                 lines = f.readlines()
                 h3_expected = "sender\ttime_step\ttime_offset\tV_m\n"
    diff --git a/testsuite/pytests/test_recording_backend_memory.py b/testsuite/pytests/test_recording_backend_memory.py
    index 459b45afc8..be01c8b247 100644
    --- a/testsuite/pytests/test_recording_backend_memory.py
    +++ b/testsuite/pytests/test_recording_backend_memory.py
    @@ -35,7 +35,7 @@ def testEventsDict(self):
             nest.ResetKernel()
     
             mm = nest.Create("multimeter", params={"record_to": "memory"})
    -        events = mm.get("events")  # noqa: F841
    +        events = mm.events  # noqa: F841
     
         def testEventCounter(self):
             """Test that n_events counts the number of events correctly."""
    @@ -47,12 +47,12 @@ def testEventCounter(self):
             nest.Connect(mm, nest.Create("iaf_psc_alpha"))
     
             nest.Simulate(15)
    -        self.assertEqual(mm.get("n_events"), 140)
    -        self.assertEqual(len(mm.get("events")["times"]), 140)
    +        self.assertEqual(mm.n_events, 140)
    +        self.assertEqual(len(mm.events["times"]), 140)
     
             nest.Simulate(1)
    -        self.assertEqual(mm.get("n_events"), 150)
    -        self.assertEqual(len(mm.get("events")["times"]), 150)
    +        self.assertEqual(mm.n_events, 150)
    +        self.assertEqual(len(mm.events["times"]), 150)
     
             # Now with multithreading
     
    @@ -64,12 +64,12 @@ def testEventCounter(self):
             nest.Connect(mm, nest.Create("iaf_psc_alpha", 2))
     
             nest.Simulate(15)
    -        self.assertEqual(mm.get("n_events"), 280)
    -        self.assertEqual(len(mm.get("events")["times"]), 280)
    +        self.assertEqual(mm.n_events, 280)
    +        self.assertEqual(len(mm.events["times"]), 280)
     
             nest.Simulate(1)
    -        self.assertEqual(mm.get("n_events"), 300)
    -        self.assertEqual(len(mm.get("events")["times"]), 300)
    +        self.assertEqual(mm.n_events, 300)
    +        self.assertEqual(len(mm.events["times"]), 300)
     
         def testResetEventCounter(self):
             """"""
    @@ -88,12 +88,12 @@ def testResetEventCounter(self):
     
             # Check that the event counter was indeed not changed and the
             # events dictionary is still intact
    -        self.assertEqual(mm.get("n_events"), 140)
    -        self.assertEqual(len(mm.get("events")["times"]), 140)
    +        self.assertEqual(mm.n_events, 140)
    +        self.assertEqual(len(mm.events["times"]), 140)
     
             # Check that the events dict is cleared when setting n_events to 0
             mm.n_events = 0
    -        self.assertEqual(len(mm.get("events")["times"]), 0)
    +        self.assertEqual(len(mm.events["times"]), 0)
     
         def testTimeInSteps(self):
             """"""
    @@ -103,17 +103,17 @@ def testTimeInSteps(self):
             mm = nest.Create("multimeter", params={"record_to": "memory"})
     
             # Check that time_in_steps is set False by default
    -        self.assertFalse(mm.get("time_in_steps"))
    +        self.assertFalse(mm.time_in_steps)
     
             # Check times are in float (i.e. ms) and offsets are not there
             # if time_in_steps == False
    -        self.assertEqual(np.array(mm.get("events")["times"]).dtype, "float64")
    -        self.assertFalse("offsets" in mm.get("events"))
    +        self.assertEqual(mm.events["times"].dtype, "float64")
    +        self.assertFalse("offsets" in mm.events)
     
             # Check times are in int (i.e.steps) and offsets are there and of
             # type float if time_in_steps == True
             mm.time_in_steps = True
    -        self.assertTrue(all(isinstance(e, int) for e in mm.get("events")["times"]))
    +        self.assertTrue(all(isinstance(e, int) for e in mm.events["times"]))
     
             # Check that time_in_steps cannot be set after Simulate has
             # been called.
    diff --git a/testsuite/pytests/test_refractory.py b/testsuite/pytests/test_refractory.py
    index 792a1939bd..3c5512a6f3 100644
    --- a/testsuite/pytests/test_refractory.py
    +++ b/testsuite/pytests/test_refractory.py
    @@ -149,7 +149,7 @@ def compute_reftime(self, model, sr, vm, neuron):
                 return spike_times[1] - spike_times[0]
             else:
                 Vr = neuron.V_reset
    -            times = np.array(vm.events["times"])
    +            times = vm.events["times"]
     
                 # Index of the 2nd spike
                 idx_max = np.argwhere(times == spike_times[1])[0][0]
    diff --git a/testsuite/pytests/test_siegert_neuron.py b/testsuite/pytests/test_siegert_neuron.py
    index 1cafbb0e1d..7f0a42ef30 100644
    --- a/testsuite/pytests/test_siegert_neuron.py
    +++ b/testsuite/pytests/test_siegert_neuron.py
    @@ -110,9 +110,9 @@ def simulate_fix_input_stats(self, mu, sigma):
     
             # get rate prediction from Siegert neuron
             events = self.multimeter.events
    -        senders = np.array(events["senders"])
    -        rate_mask = np.where(senders == self.siegert_neuron.get("global_id"))
    -        rate_prediction = np.array(events["rate"])[rate_mask][-1]
    +        senders = events["senders"]
    +        rate_mask = np.where(senders == self.siegert_neuron.global_id)
    +        rate_prediction = events["rate"][rate_mask][-1]
     
             # get rate of integrate-and-fire neuron
             n_spikes = self.spike_recorder.n_events
    diff --git a/testsuite/pytests/test_sonata.py b/testsuite/pytests/test_sonata.py
    index 11c1efeeff..653384a119 100644
    --- a/testsuite/pytests/test_sonata.py
    +++ b/testsuite/pytests/test_sonata.py
    @@ -76,6 +76,5 @@ def test_SonataNetwork(num_threads, hyperslab_size):
         srec = nest.Create("spike_recorder")
         nest.Connect(node_collections["internal"], srec)
         sonata_net.Simulate()
    -    spike_data = srec.events
    -    post_times = np.array(spike_data["times"])
    +    post_times = srec.events["times"]
         assert post_times.size == EXPECTED_NUM_SPIKES
    diff --git a/testsuite/pytests/test_spatial/test_dumping.py b/testsuite/pytests/test_spatial/test_dumping.py
    index 20b7a797a3..dee3743897 100644
    --- a/testsuite/pytests/test_spatial/test_dumping.py
    +++ b/testsuite/pytests/test_spatial/test_dumping.py
    @@ -49,7 +49,7 @@ def test_DumpNodes(self):
             nest.DumpLayerNodes(spatial_nodes, filename)
     
             npa = np.genfromtxt(filename)
    -        reference = np.array([[n.get("global_id")] + list(nest.GetPosition(n)) for n in spatial_nodes])
    +        reference = np.array([[n.global_id] + list(nest.GetPosition(n)) for n in spatial_nodes])
             self.assertTrue(np.allclose(npa, reference))
             os.remove(filename)
     
    diff --git a/testsuite/pytests/test_stdp_nn_synapses.py b/testsuite/pytests/test_stdp_nn_synapses.py
    index a3f9ba082d..5c1419304e 100644
    --- a/testsuite/pytests/test_stdp_nn_synapses.py
    +++ b/testsuite/pytests/test_stdp_nn_synapses.py
    @@ -153,8 +153,8 @@ def do_the_nest_simulation(self):
             nest.Simulate(self.simulation_duration)
     
             all_spikes = spike_recorder.events
    -        times = np.array(all_spikes["times"])
    -        senders = np.array(all_spikes["senders"])
    +        times = all_spikes["times"]
    +        senders = all_spikes["senders"]
             pre_spikes = times[senders == presynaptic_neuron.tolist()[0]]
             post_spikes = times[senders == postsynaptic_neuron.tolist()[0]]
             weight = plastic_synapse_of_interest.weight
    diff --git a/testsuite/pytests/test_stdp_pl_synapse_hom.py b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    index 3302767ec7..3210651ac2 100644
    --- a/testsuite/pytests/test_stdp_pl_synapse_hom.py
    +++ b/testsuite/pytests/test_stdp_pl_synapse_hom.py
    @@ -198,13 +198,13 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        all_spikes = np.array(spike_recorder.events["times"])
    -        senders = np.array(spike_recorder.events["senders"])
    +        all_spikes = spike_recorder.events["times"]
    +        senders = spike_recorder.events["senders"]
             pre_spikes = all_spikes[senders == presynaptic_neuron.tolist()[0]]
             post_spikes = all_spikes[senders == postsynaptic_neuron.tolist()[0]]
     
    -        t_hist = np.array(wr.events["times"])
    -        weight = np.array(wr.events["weights"])
    +        t_hist = wr.events["times"]
    +        weight = wr.events["weights"]
     
             return pre_spikes, post_spikes, t_hist, weight
     
    diff --git a/testsuite/pytests/test_stdp_synapse.py b/testsuite/pytests/test_stdp_synapse.py
    index ff1450e9b9..618f0ff4ab 100644
    --- a/testsuite/pytests/test_stdp_synapse.py
    +++ b/testsuite/pytests/test_stdp_synapse.py
    @@ -220,13 +220,13 @@ def do_the_nest_simulation(self):
             nest.Simulate(self.simulation_duration)
     
             all_spikes = spike_recorder.events
    -        times = np.array(all_spikes["times"])
    -        senders = np.array(all_spikes["senders"])
    +        times = all_spikes["times"]
    +        senders = all_spikes["senders"]
             pre_spikes = times[senders == presynaptic_neuron.tolist()[0]]
             post_spikes = times[senders == postsynaptic_neuron.tolist()[0]]
     
    -        t_hist = np.array(wr.events["times"])
    -        weight = np.array(wr.events["weights"])
    +        t_hist = wr.events["times"]
    +        weight = wr.events["weights"]
     
             return pre_spikes, post_spikes, t_hist, weight
     
    diff --git a/testsuite/pytests/test_step_rate_generator.py b/testsuite/pytests/test_step_rate_generator.py
    index 1e163279a2..f27654cf1f 100644
    --- a/testsuite/pytests/test_step_rate_generator.py
    +++ b/testsuite/pytests/test_step_rate_generator.py
    @@ -59,9 +59,9 @@ def test_step_rate_generator(self):
     
             # read data from multimeter
             data = mm.events
    -        senders = np.array(data["senders"])
    -        rates_neuron = np.array(data["rate"])[senders == neuron.get("global_id")]
    -        rates_srg = np.array(data["rate"])[np.where(senders == srg.get("global_id"))]
    +        senders = data["senders"]
    +        rates_neuron = data["rate"][senders == neuron.get("global_id")]
    +        rates_srg = data["rate"][np.where(senders == srg.get("global_id"))]
     
             # make sure that srg produces the desired rates
             assert np.array_equal(rates, rates_srg)
    diff --git a/testsuite/pytests/test_tsodyks2_synapse.py b/testsuite/pytests/test_tsodyks2_synapse.py
    index 29a3c73808..0a7694dbe5 100644
    --- a/testsuite/pytests/test_tsodyks2_synapse.py
    +++ b/testsuite/pytests/test_tsodyks2_synapse.py
    @@ -94,11 +94,11 @@ def do_the_nest_simulation(self):
     
             nest.Simulate(self.simulation_duration)
     
    -        senders = np.array(spike_recorder.events["senders"])
    -        times = np.array(spike_recorder.events["times"])
    -        pre_spikes = times[senders == presynaptic_neuron.get("global_id")]
    +        senders = spike_recorder.events["senders"]
    +        times = spike_recorder.events["times"]
    +        pre_spikes = times[senders == presynaptic_neuron.global_id]
     
    -        weights = wr.get("events", "weights")
    +        weights = wr.events["weights"]
     
             return (pre_spikes, weights)
     
    diff --git a/testsuite/pytests/test_tsodyks_synapse.py b/testsuite/pytests/test_tsodyks_synapse.py
    index 2ba131e0b2..989f44744b 100644
    --- a/testsuite/pytests/test_tsodyks_synapse.py
    +++ b/testsuite/pytests/test_tsodyks_synapse.py
    @@ -152,7 +152,8 @@ def test_tsodyks_depressing(self, synapse_model):
                 ]
             )
     
    -        times_vm_sim = np.vstack([vm.get("events")["times"], vm.get("events")["V_m"]]).T
    +        events = vm.events
    +        times_vm_sim = np.vstack([events["times"], events["V_m"]]).T
     
             # test uses large atol due to finite precision of reference timeseries
             np.testing.assert_allclose(times_vm_sim, times_vm_expected, atol=1e-5)
    @@ -276,7 +277,8 @@ def test_tsodyks_facilitating(self, synapse_model):
                 ]
             )
     
    -        times_vm_sim = np.vstack([vm.get("events")["times"], vm.get("events")["V_m"]]).T
    +        events = vm.events
    +        times_vm_sim = np.vstack([events["times"], events["V_m"]]).T
     
             # test uses large atol due to finite precision of reference timeseries
             np.testing.assert_allclose(times_vm_sim, times_vm_expected, atol=1e-5)
    diff --git a/testsuite/pytests/test_urbanczik_synapse.py b/testsuite/pytests/test_urbanczik_synapse.py
    index 053a4ec92a..e47ea80f2d 100644
    --- a/testsuite/pytests/test_urbanczik_synapse.py
    +++ b/testsuite/pytests/test_urbanczik_synapse.py
    @@ -166,8 +166,8 @@ def test_SynapseDepressionFacilitation(self):
     
             # multimeter
             rec = mm.events
    -        t = np.array(rec["times"])
    -        V_w = np.array(rec["V_m.p"])
    +        t = rec["times"]
    +        V_w = rec["V_m.p"]
     
             # compute dendritic prediction of somatic membrane potential
             g_D = nrn_params["g_sp"]
    @@ -176,15 +176,15 @@ def test_SynapseDepressionFacilitation(self):
             V_w_star = (g_L * E_L + g_D * V_w) / (g_L + g_D)
     
             # weight recorder
    -        data = wr.get()
    -        senders = data["events"]["senders"]
    -        targets = data["events"]["targets"]
    -        weights = data["events"]["weights"]
    -        times = data["events"]["times"]
    +        data = wr.events
    +        senders = data["senders"]
    +        targets = data["targets"]
    +        weights = data["weights"]
    +        times = data["times"]
     
             # spike recorder
             data = sr_soma.events
    -        spike_times_soma = np.array(data["times"])
    +        spike_times_soma = data["times"]
     
             # compute predicted rate
             phi_max = nrn_params["phi_max"]
    diff --git a/testsuite/pytests/test_visualization.py b/testsuite/pytests/test_visualization.py
    index 2641b15fc7..77f6eb7d8d 100644
    --- a/testsuite/pytests/test_visualization.py
    +++ b/testsuite/pytests/test_visualization.py
    @@ -88,11 +88,11 @@ def test_plot_network(self):
         def voltage_trace_verify(self, device):
             assert plt._pylab_helpers.Gcf.get_active() is not None, "No active figure"
             ax = plt.gca()
    -        vm = device.get("events", "V_m")
    +        vm = device.events["V_m"]
             for ref_vm, line in zip((vm[::2], vm[1::2]), ax.lines):
                 x_data, y_data = line.get_data()
                 # Check that times are correct
    -            assert list(x_data) == list(np.unique(device.get("events", "times")))
    +            assert list(x_data) == list(np.unique(device.events["times"]))
                 # Check that voltmeter data corresponds to the lines in the plot
                 assert all(np.isclose(ref_vm, y_data))
             plt.close(ax.get_figure())
    @@ -116,7 +116,7 @@ def test_voltage_trace_from_device(self):
             self.voltage_trace_verify(device)
     
             # Test with data from file
    -        vm = device.get("events")
    +        vm = device.events
             data = np.zeros([len(vm["senders"]), 3])
             data[:, 0] = vm["senders"]
             data[:, 1] = vm["times"]
    @@ -163,8 +163,8 @@ def test_raster_plot(self):
             import nest.raster_plot
     
             sr, sr_to_file = self.spike_recorder_data_setup(to_file=True)
    -        spikes = np.array(sr.events["times"])
    -        senders = np.array(sr.events["senders"])
    +        spikes = sr.events["times"]
    +        senders = sr.events["senders"]
     
             # Test from_device
             nest.raster_plot.from_device(sr)
    
    From c93bd1eb194cb393054303ce47e562751ad1e6e1 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 11:40:19 +0200
    Subject: [PATCH 247/375] Replace get for SynapseCollections by attribute
     access
    
    ---
     testsuite/pytests/connect_test_base.py        | 28 +++++++++----------
     .../sli2py_regressions/test_ticket_941.py     | 10 +++----
     testsuite/pytests/test_parrot_neuron.py       |  4 +--
     .../test_spatial/test_connect_layers.py       |  4 +--
     .../test_spatial_distributions.py             |  2 +-
     testsuite/pytests/test_weight_recorder.py     | 26 ++++++++---------
     6 files changed, 37 insertions(+), 37 deletions(-)
    
    diff --git a/testsuite/pytests/connect_test_base.py b/testsuite/pytests/connect_test_base.py
    index 2ae8c09845..ba1561ba8d 100644
    --- a/testsuite/pytests/connect_test_base.py
    +++ b/testsuite/pytests/connect_test_base.py
    @@ -103,7 +103,7 @@ def testDelaySetting(self):
             syn_params = {"delay": d0}
             self.setUpNetwork(self.conn_dict, syn_params)
             connections = nest.GetConnections(self.pop1, self.pop2)
    -        nest_delays = connections.get("delay")
    +        nest_delays = connections.delay
             # all delays need to be equal
             self.assertTrue(all_equal(nest_delays))
             # delay (rounded) needs to equal the delay that was put in
    @@ -118,7 +118,7 @@ def testRPortSetting(self):
             syn_params = {"synapse_model": "static_synapse", "receptor_type": rtype}
             nest.Connect(self.pop1, self.pop2, self.conn_dict, syn_params)
             conns = nest.GetConnections(self.pop1, self.pop2)
    -        ports = conns.get("receptor")
    +        ports = conns.receptor
             self.assertTrue(all_equal(ports))
             self.assertTrue(ports[0] == rtype)
     
    @@ -127,7 +127,7 @@ def testSynapseSetting(self):
             syn_params = {"synapse_model": "test_syn"}
             self.setUpNetwork(self.conn_dict, syn_params)
             conns = nest.GetConnections(self.pop1, self.pop2)
    -        syns = conns.get("synapse_model")
    +        syns = conns.synapse_model
             self.assertTrue(all_equal(syns))
             self.assertTrue(syns[0] == syn_params["synapse_model"])
     
    @@ -135,10 +135,10 @@ def testSynapseSetting(self):
         def testDefaultParams(self):
             self.setUpNetwork(self.conn_dict)
             conns = nest.GetConnections(self.pop1, self.pop2)
    -        self.assertTrue(all(x == self.w0 for x in conns.get("weight")))
    -        self.assertTrue(all(x == self.d0 for x in conns.get("delay")))
    -        self.assertTrue(all(x == self.r0 for x in conns.get("receptor")))
    -        self.assertTrue(all(x == self.syn0 for x in conns.get("synapse_model")))
    +        self.assertTrue(all(x == self.w0 for x in conns.weight))
    +        self.assertTrue(all(x == self.d0 for x in conns.delay))
    +        self.assertTrue(all(x == self.r0 for x in conns.receptor))
    +        self.assertTrue(all(x == self.syn0 for x in conns.synapse_model))
     
         def testAutapsesTrue(self):
             conn_params = self.conn_dict.copy()
    @@ -246,7 +246,7 @@ def testRPortAllSynapses(self):
                 self.pop2 = nest.Create("iaf_psc_exp_multisynapse", self.N2, {"tau_syn": [0.2, 0.5]})
                 nest.Connect(self.pop1, self.pop2, self.conn_dict, syn_params)
                 conns = nest.GetConnections(self.pop1, self.pop2)
    -            conn_params = conns.get("receptor")
    +            conn_params = conns.receptor
                 self.assertTrue(all_equal(conn_params))
                 self.assertTrue(conn_params[0] == syn_params["receptor_type"])
                 self.setUp()
    @@ -377,9 +377,9 @@ def get_connectivity_matrix(pop1, pop2):
         connections = nest.GetConnections(pop1, pop2)
         index_dic = {}
         for count, node in enumerate(pop1):
    -        index_dic[node.get("global_id")] = count
    +        index_dic[node.global_id] = count
         for count, node in enumerate(pop2):
    -        index_dic[node.get("global_id")] = count
    +        index_dic[node.global_id] = count
         for source, target in zip(connections.sources(), connections.targets()):
             M[index_dic[target]][index_dic[source]] += 1
         return M
    @@ -394,14 +394,14 @@ def get_weighted_connectivity_matrix(pop1, pop2, label):
     
         M = np.zeros((len(pop2), len(pop1)))
         connections = nest.GetConnections(pop1, pop2)
    -    sources = connections.get("source")
    -    targets = connections.get("target")
    +    sources = connections.source
    +    targets = connections.target
         weights = connections.get(label)
         index_dic = {}
         for count, node in enumerate(pop1):
    -        index_dic[node.get("global_id")] = count
    +        index_dic[node.global_id] = count
         for count, node in enumerate(pop2):
    -        index_dic[node.get("global_id")] = count
    +        index_dic[node.global_id] = count
         for counter, weight in enumerate(weights):
             source_id = sources[counter]
             target_id = targets[counter]
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_941.py b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    index 3702f0eaed..5c4f9a3a1d 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    @@ -38,10 +38,10 @@ def check_connection(source, n_expected, expected):
     
         assert len(conns) == n_expected
     
    -    for node in conns:
    -        assert node.get("source") == source.tolist()[0]
    -        assert node.get("target") == target_expected.tolist()[0]
    -        assert node.get("synapse_model") == syn_type_expected
    +    for conn in conns:
    +        assert conn.source == source.tolist()[0]
    +        assert conn.target == target_expected.tolist()[0]
    +        assert conn.synapse_model == syn_type_expected
     
     
     def test_different_connections():
    @@ -93,6 +93,6 @@ def test_different_connections():
             )
         )
     
    -    synapses = nest.GetConnections(source=pn1, target=pn2).get("synapse_model")
    +    synapses = nest.GetConnections(source=pn1, target=pn2).synapse_model
         expected_synapses = ["static_synapse", "static_synapse", "static_synapse_hom_w"]
         assert np.all(np.in1d(expected_synapses, synapses))
    diff --git a/testsuite/pytests/test_parrot_neuron.py b/testsuite/pytests/test_parrot_neuron.py
    index 2874c7e539..3997f7b78e 100644
    --- a/testsuite/pytests/test_parrot_neuron.py
    +++ b/testsuite/pytests/test_parrot_neuron.py
    @@ -206,13 +206,13 @@ def run_protocol(self, dt):
     
             # get STDP synapse and weight before protocol
             syn = nest.GetConnections(source=pre_parrot, synapse_model="stdp_synapse")
    -        w_pre = syn.get("weight")
    +        w_pre = syn.weight
     
             last_time = max(pre_times[-1], post_times[-1])
             nest.Simulate(last_time + 2 * delay)
     
             # get weight post protocol
    -        w_post = syn.get("weight")
    +        w_post = syn.weight
     
             return w_pre, w_post
     
    diff --git a/testsuite/pytests/test_spatial/test_connect_layers.py b/testsuite/pytests/test_spatial/test_connect_layers.py
    index ca31aeecb6..9f91b6e1b5 100644
    --- a/testsuite/pytests/test_spatial/test_connect_layers.py
    +++ b/testsuite/pytests/test_spatial/test_connect_layers.py
    @@ -317,7 +317,7 @@ def test_connect_layers_weights(self):
             syn_spec = {"weight": nest.random.uniform(min=0.5)}
             nest.Connect(self.layer, self.layer, conn_spec, syn_spec)
             conns = nest.GetConnections()
    -        conn_weights = np.array(conns.get("weight"))
    +        conn_weights = conns.weight
             self.assertTrue(len(np.unique(conn_weights)) > 1)
             self.assertTrue((conn_weights >= 0.5).all())
             self.assertTrue((conn_weights <= 1.0).all())
    @@ -331,7 +331,7 @@ def test_connect_layers_delays(self):
             syn_spec = {"delay": nest.random.uniform(min=0.5)}
             nest.Connect(self.layer, self.layer, conn_spec, syn_spec)
             conns = nest.GetConnections()
    -        conn_delays = np.array(conns.get("delay"))
    +        conn_delays = conns.delay
             self.assertTrue(len(np.unique(conn_delays)) > 1)
             self.assertTrue((conn_delays >= 0.5).all())
             self.assertTrue((conn_delays <= 1.0).all())
    diff --git a/testsuite/pytests/test_spatial/test_spatial_distributions.py b/testsuite/pytests/test_spatial/test_spatial_distributions.py
    index b1b86adb99..8cc84ec55f 100644
    --- a/testsuite/pytests/test_spatial/test_spatial_distributions.py
    +++ b/testsuite/pytests/test_spatial/test_spatial_distributions.py
    @@ -346,7 +346,7 @@ def _target_distances(self):
     
             # Target nodes
             connections = nest.GetConnections(source=self._driver)
    -        target_array = np.array(connections.target)
    +        target_array = connections.target
     
             # Convert lt node IDs to a NumPy array
             lt_array = np.array(self._lt.tolist())
    diff --git a/testsuite/pytests/test_weight_recorder.py b/testsuite/pytests/test_weight_recorder.py
    index 6521b18047..be482fec6e 100644
    --- a/testsuite/pytests/test_weight_recorder.py
    +++ b/testsuite/pytests/test_weight_recorder.py
    @@ -75,12 +75,12 @@ def testSingleThread(self):
             weights = np.array([])
             for i in range(100):
                 nest.Simulate(1)
    -            weights = np.append(weights, connections.get("weight"))
    +            weights = np.append(weights, connections.weight)
     
             wr_weights = wr.events["weights"]
     
             self.addTypeEqualityFunc(type(wr_weights), self.is_subset)
    -        self.assertEqual(wr_weights, list(weights))
    +        self.assertEqual(wr_weights, weights)
     
         @unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
         def testMultipleThreads(self):
    @@ -104,12 +104,12 @@ def testMultipleThreads(self):
             weights = np.array([])
             for i in range(100):
                 nest.Simulate(1)
    -            weights = np.append(weights, connections.get("weight"))
    +            weights = np.append(weights, connections.weight)
     
             wr_weights = wr.events["weights"]
     
             self.addTypeEqualityFunc(type(wr_weights), self.is_subset)
    -        self.assertEqual(wr_weights, list(weights))
    +        self.assertEqual(wr_weights, weights)
     
         def testDefinedSenders(self):
             """Weight Recorder Defined Subset Of Senders"""
    @@ -133,12 +133,12 @@ def testDefinedSenders(self):
             senders = np.array([])
             for i in range(100):
                 nest.Simulate(1)
    -            senders = np.append(senders, connections.get("source"))
    +            senders = np.append(senders, connections.source)
     
             wr_senders = wr.events["senders"]
     
             self.addTypeEqualityFunc(type(wr_senders), self.is_subset)
    -        self.assertEqual(wr_senders, list(senders))
    +        self.assertEqual(wr_senders, senders)
     
         def testDefinedTargets(self):
             """Weight Recorder Defined Subset Of Targets"""
    @@ -162,12 +162,12 @@ def testDefinedTargets(self):
             targets = np.array([])
             for i in range(100):
                 nest.Simulate(1)
    -            targets = np.append(targets, connections.get("target"))
    +            targets = np.append(targets, connections.target)
     
             wr_targets = wr.events["targets"]
     
             self.addTypeEqualityFunc(type(wr_targets), self.is_subset)
    -        self.assertEqual(wr_targets, list(targets))
    +        self.assertEqual(wr_targets, targets)
     
         def testDefinedTargetsAndSenders(self):
             """Weight Recorder Defined Subset Of Targets and Senders"""
    @@ -195,12 +195,12 @@ def testDefinedTargetsAndSenders(self):
             targets = np.array([])
             for i in range(1):
                 nest.Simulate(1)
    -            targets = np.append(targets, connections.get("target"))
    +            targets = np.append(targets, connections.target)
     
             wr_targets = wr.events["targets"]
     
             self.addTypeEqualityFunc(type(wr_targets), self.is_subset)
    -        self.assertEqual(wr_targets, list(targets))
    +        self.assertEqual(wr_targets, targets)
     
         def test_senders_and_targets(self):
             """
    @@ -307,9 +307,9 @@ def testRPorts(self):
             nest.Connect(sg, pre)
     
             connections = nest.GetConnections(pre, post)
    -        receptors = connections.get("receptor")
    -        sources = connections.get("source")
    -        targets = connections.get("target")
    +        receptors = connections.receptor
    +        sources = connections.source
    +        targets = connections.target
             connections = [(sources[i], targets[i], receptors[i]) for i in range(len(connections))]
     
             nest.Simulate(100)
    
    From 42f3aae530f215012a34418a825da513dd9c0732 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 11:42:02 +0200
    Subject: [PATCH 248/375] Return numpy arrays instead of tuples for dictionary
     keys if they are lists of numeric values
    
    ---
     pynest/nestkernel_api.pyx | 12 +++++++++++-
     1 file changed, 11 insertions(+), 1 deletion(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 739e3938bb..4281a7b311 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -35,6 +35,7 @@ from libcpp.vector cimport vector
     
     import nest
     import numpy
    +import numbers
     
     # cimport numpy
     
    @@ -125,6 +126,11 @@ cdef object dict_vector_to_list(vector[dictionary] cvec):
             inc(it)
         return tmp
     
    +def make_tuple_or_ndarray(operand):
    +        if len(operand) > 0 and isinstance(operand[0], numbers.Number):
    +            return numpy.array(operand)
    +        else:
    +            return tuple(operand)
     
     cdef object any_to_pyobj(any operand):
         if is_type[int](operand):
    @@ -166,7 +172,9 @@ cdef object any_to_pyobj(any operand):
         if is_type[vector[dictionary]](operand):
             return dict_vector_to_list(any_cast[vector[dictionary]](operand))
         if is_type[vector[any]](operand):
    -        return tuple(any_vector_to_list(any_cast[vector[any]](operand)))
    +        # PYNEST-NG: This will create a Python list first and then convert to
    +        # either tuple or numpy array, which will copy the data element-wise.
    +        return make_tuple_or_ndarray(any_vector_to_list(any_cast[vector[any]](operand)))
         if is_type[dictionary](operand):
             return dictionary_to_pydict(any_cast[dictionary](operand))
         if is_type[NodeCollectionPTR](operand):
    @@ -588,6 +596,8 @@ def llapi_get_nc_status(NodeCollectionObject nc, object key=None):
             if not statuses.known(pystr_to_string(key)):
                 raise KeyError(key)
             value = any_to_pyobj(statuses[pystr_to_string(key)])
    +        # PYNEST-NG: This is backwards-compatible, but makes it harder
    +        # to write scalable code. Maybe just return value as is?
             return value[0] if len(value) == 1 else value
         else:
             raise TypeError(f'key must be a string, got {type(key)}')
    
    From 965ab05ad218a47d6636f61ec85931cabf699657 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 11:42:53 +0200
    Subject: [PATCH 249/375] Replace hierarchical addressing by explicit list
     comprehension
    
    ---
     .../pytests/sli2py_regressions/test_ticket_80_175_179.py  | 8 ++++----
     .../test_sinusoidal_poisson_generator.py                  | 2 +-
     2 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py b/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py
    index 2ed4dd228f..6a7a30b8d0 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_80_175_179.py
    @@ -110,8 +110,8 @@ def reference_run():
     
         srs, vms = build_net()
         nest.Simulate(total_sim_time)
    -    srs_reference = srs.events["times"]
    -    vms_reference = vms.events["V_m"]
    +    srs_reference = [event["times"] for event in srs.events]
    +    vms_reference = [event["V_m"] for event in vms.events]
     
         return srs_reference, vms_reference
     
    @@ -141,8 +141,8 @@ def test_vm_and_sr_produce_same_output(t_block, reference_run):
             while nest.biological_time < total_sim_time:
                 nest.Run(t_block)
     
    -    srs_times = srs.events["times"]
    -    vms_recs = vms.events["V_m"]
    +    srs_times = [event["times"] for event in srs.events]
    +    vms_recs = [event["V_m"] for event in vms.events]
     
         srs_reference, vms_reference = reference_run
     
    diff --git a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    index 6648b33f10..00f73ca085 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    @@ -130,7 +130,7 @@ def test_sinusoidal_poisson_generator_with_spike_recorder(num_threads, individua
         nest.Simulate(500.0)
     
         # Nested list of recorded spike times from each sender
    -    spikes_all_nrns = srecs.events["times"]
    +    spikes_all_nrns = [event["times"] for event in srecs.events]
     
         # Check that we actually obtained a spike times array for each neuron
         assert len(spikes_all_nrns) == total_num_nrns
    
    From 5b8e0faba61cc82d5e6fe401da637683a6fc32e7 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 11:44:44 +0200
    Subject: [PATCH 250/375] Make check more generic
    
    ---
     testsuite/pytests/test_erfc_neuron.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/test_erfc_neuron.py b/testsuite/pytests/test_erfc_neuron.py
    index 395c372f0d..d2be1e6718 100644
    --- a/testsuite/pytests/test_erfc_neuron.py
    +++ b/testsuite/pytests/test_erfc_neuron.py
    @@ -36,7 +36,7 @@ def get_mean_activity(detector, T):
         detector.
         """
         states = detector.events["state"]
    -    states = [states] if isinstance(states, int) else states
    +    states = [states] if isinstance(states, (int, np.integer)) else states
         times = detector.events["times"]
         # add total duration at the end, since we need to take into account
         # the time between the last state change and end of simulation
    
    From 03880a10d56f0a48746a0500687de9288ebfb4bd Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 11:44:58 +0200
    Subject: [PATCH 251/375] Use correct exception name
    
    ---
     testsuite/pytests/test_spatial/test_layer_get_set.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/testsuite/pytests/test_spatial/test_layer_get_set.py b/testsuite/pytests/test_spatial/test_layer_get_set.py
    index 585eb96194..9f913e7a9e 100644
    --- a/testsuite/pytests/test_spatial/test_layer_get_set.py
    +++ b/testsuite/pytests/test_spatial/test_layer_get_set.py
    @@ -40,7 +40,7 @@ def test_LayerSetOnInstance(self):
                 "iaf_psc_alpha", positions=nest.spatial.grid(shape=layer_shape, extent=[2.0, 2.0], edge_wrap=True)
             )
     
    -        with self.assertRaises(nest.NESTErrors.DictError):
    +        with self.assertRaises(nest.NESTErrors.UnaccessedDictionaryEntry):
                 layer.center = [1.0, 1.0]
     
             layer.V_m = -50.0
    @@ -107,7 +107,7 @@ def test_LayerSet(self):
                 "iaf_psc_alpha", positions=nest.spatial.grid(shape=[3, 3], extent=[2.0, 2.0], edge_wrap=True)
             )
     
    -        with self.assertRaises(nest.NESTErrors.DictError):
    +        with self.assertRaises(nest.NESTErrors.UnaccessedDictionaryEntry):
                 layer.set({"center": [1.0, 1.0]})
     
             layer.set(V_m=-50.0)
    
    From 204459e20c0c081f74115ae2537a02a48cf91fc7 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 11:46:27 +0200
    Subject: [PATCH 252/375] Make test less convoluted
    
    ---
     testsuite/pytests/test_nodeParametrization.py | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/testsuite/pytests/test_nodeParametrization.py b/testsuite/pytests/test_nodeParametrization.py
    index 5529a90a68..3ffce8ac5c 100644
    --- a/testsuite/pytests/test_nodeParametrization.py
    +++ b/testsuite/pytests/test_nodeParametrization.py
    @@ -66,10 +66,10 @@ def test_create_with_spike_generator(self):
     
         def test_create_with_numpy(self):
             """Test Create with numpy array as parameter"""
    -        Vm_ref = [-80.0, -90.0, -100.0]
    -        nodes = nest.Create("iaf_psc_alpha", 3, {"V_m": np.array(Vm_ref)})
    +        Vm_ref = np.array([-80.0, -90.0, -100.0])
    +        nodes = nest.Create("iaf_psc_alpha", 3, {"V_m": Vm_ref})
     
    -        self.assertAlmostEqual(list(nodes.V_m), Vm_ref)
    +        self.assertAlmostEqual(nodes.V_m, Vm_ref)
     
         def test_create_uniform(self):
             """Test Create with random.uniform as parameter"""
    
    From a7edec292413832cee79b9d96ee1420c4703e558 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 26 Sep 2023 13:27:33 +0200
    Subject: [PATCH 253/375] Sort imports
    
    ---
     pynest/nestkernel_api.pyx | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 4281a7b311..17f37fc130 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -33,9 +33,10 @@ from libcpp.vector cimport vector
     
     # from libc.string cimport memcpy
     
    +import numbers
    +
     import nest
     import numpy
    -import numbers
     
     # cimport numpy
     
    
    From 17cfc75ab2153eb15a16d06be4763811cb5f20bd Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 26 Sep 2023 15:57:52 +0200
    Subject: [PATCH 254/375] Convert from unittest to pytest
    
    ---
     testsuite/pytests/test_create.py | 138 ++++++++++++++-----------------
     1 file changed, 64 insertions(+), 74 deletions(-)
    
    diff --git a/testsuite/pytests/test_create.py b/testsuite/pytests/test_create.py
    index 54519e21b2..7d162fd537 100644
    --- a/testsuite/pytests/test_create.py
    +++ b/testsuite/pytests/test_create.py
    @@ -20,111 +20,101 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     """
    -Creation tests
    +Basic tests of the ``Create`` function.
     """
     
    -import unittest
     import warnings
     
     import nest
    +import numpy.testing as nptest
    +import pytest
     
     
    -class CreateTestCase(unittest.TestCase):
    -    """Creation tests"""
    +@pytest.fixture(autouse=True)
    +def reset():
    +    nest.ResetKernel()
     
    -    def setUp(self):
    -        nest.ResetKernel()
     
    -    def test_ModelCreate(self):
    -        """Model Creation"""
    +@pytest.mark.parametrize("model", nest.node_models)
    +def test_create_model(model):
    +    """Test basic model creation."""
     
    -        for model in nest.node_models:
    -            node = nest.Create(model)
    -            self.assertGreater(node.get("global_id"), 0)
    +    node = nest.Create(model)
    +    assert node.global_id > 0
     
    -    def test_ModelCreateN(self):
    -        """Model Creation with N"""
     
    -        num_nodes = 10
    -        for model in nest.node_models:
    -            nodes = nest.Create(model, num_nodes)
    -            self.assertEqual(len(nodes), num_nodes)
    +@pytest.mark.parametrize("model", nest.node_models)
    +def test_create_model_n_nodes(model):
    +    """Test creation of multiple nodes with the same model."""
     
    -    def test_correct_node_collection_model_created(self):
    -        """
    -        Ensure that the correct model is created for node in ``NodeCollection``.
    +    num_nodes = 10
    +    nodes = nest.Create(model, num_nodes)
    +    assert len(nodes) == num_nodes
     
    -        NOTE: This test was moved from test_NodeCollection.py and may overlap
    -        with test already present in this test suite. If that is the case,
    -        consider to just drop this test.
    -        """
     
    -        models = nest.node_models
    -        nc = nest.NodeCollection()
    +def test_correct_node_collection_model_created():
    +    """
    +    Ensure that the correct model is created for node in ``NodeCollection``.
    +    """
     
    -        for model in models:
    -            nc += nest.Create(model)
    +    models = nest.node_models
    +    nc = nest.NodeCollection()
     
    -        self.assertTrue(len(nc) > 0)
    +    for model in models:
    +        nc += nest.Create(model)
     
    -        for i, node in enumerate(nc):
    -            self.assertEqual(node.model, models[i])
    +    assert len(nc) > 0
     
    -    def test_ModelCreateNdict(self):
    -        """Model Creation with N and dict"""
    +    for i, node in enumerate(nc):
    +        assert node.model == models[i]
     
    -        num_nodes = 10
    -        voltage = 12.0
    -        n = nest.Create("iaf_psc_alpha", num_nodes, {"V_m": voltage})
     
    -        self.assertEqual(n.V_m, (voltage,) * num_nodes)
    +def test_create_with_params_dict():
    +    """Test model creation with parameter dictionary."""
     
    -    def test_Create_accepts_empty_params_dict(self):
    -        """
    -        Create with empty parameter dictionary
    +    num_nodes = 10
    +    voltage = 12.0
    +    nodes = nest.Create("iaf_psc_alpha", num_nodes, {"V_m": voltage})
     
    -        NOTE: This test was moved from test_NodeCollection.py and may overlap
    -        with test already present in this test suite. If that is the case,
    -        consider to just drop this test.
    -        """
    -        nest.Create("iaf_psc_delta", params={})
    +    nptest.assert_equal(nodes.V_m, voltage)
     
    -    def test_erroneous_param_to_create(self):
    -        """Erroneous param to Create raises exception"""
    -        num_nodes = 3
    -        params = [
    -            (tuple(), TypeError, False),
    -            ({"V_m": [-50]}, IndexError, True),
    -            ({"V_mm": num_nodes * [-50.0]}, nest.NESTError, True),
    -        ]
     
    -        for p, err, expects_warning in params:
    -            with warnings.catch_warnings(record=True) as w:
    -                warnings.simplefilter("always")
    -                self.assertRaises(err, nest.Create, "iaf_psc_alpha", num_nodes, p)
    -                if expects_warning:
    -                    self.assertEqual(len(w), 1, "warning was not issued")
    -                    self.assertTrue(issubclass(w[0].category, UserWarning))
    +def test_create_accepts_empty_params_dict():
    +    """
    +    Test creation with empty parameter dictionary.
    +    """
     
    -    def test_ModelDicts(self):
    -        """IAF Creation with N and dicts"""
    +    nest.Create("iaf_psc_delta", params={})
     
    -        num_nodes = 10
    -        V_m = (0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)
    -        n = nest.Create("iaf_psc_alpha", num_nodes, [{"V_m": v} for v in V_m])
     
    -        self.assertEqual(n.V_m, V_m)
    +def test_create_with_params_dicts():
    +    """Test model creation with multiple parameter dictionaries."""
     
    +    num_nodes = 10
    +    V_m = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]
    +    nodes = nest.Create("iaf_psc_alpha", num_nodes, [{"V_m": v} for v in V_m])
     
    -def suite():
    -    suite = unittest.makeSuite(CreateTestCase, "test")
    -    return suite
    +    nptest.assert_equal(nodes.V_m, V_m)
     
     
    -def run():
    -    runner = unittest.TextTestRunner(verbosity=2)
    -    runner.run(suite())
    +@pytest.mark.parametrize(
    +    "params, expected_error, expects_warning",
    +    [
    +        [tuple(), TypeError, False],
    +        [{"V_m": [-50]}, IndexError, True],
    +        [{"V_mm": 3 * [-50.0]}, nest.NESTErrors.UnaccessedDictionaryEntry, True],
    +    ],
    +)
    +def test_erroneous_param_to_create_raises(params, expected_error, expects_warning):
    +    """Ensure passing an erroneous parameter dictionary to ``Create`` raises exception."""
     
    +    with warnings.catch_warnings(record=True) as w:
    +        warnings.simplefilter("always")
     
    -if __name__ == "__main__":
    -    run()
    +        with pytest.raises(expected_error):
    +            nest.Create("iaf_psc_alpha", 3, params)
    +
    +            if expects_warning:
    +                # verify that user warning was issued
    +                assert len(w) == 1
    +                assert issubclass(w[0].category, UserWarning)
    
    From a9807973e8fa08013a3e1eb16fb00111d62ea96a Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 26 Sep 2023 16:00:20 +0200
    Subject: [PATCH 255/375] Setting individual_spike_trains on model creation
     should raise exception
    
    ---
     .../test_sinusoidal_poisson_generator.py                 | 9 ++++-----
     1 file changed, 4 insertions(+), 5 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    index 00f73ca085..72355ee5dd 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_poisson_generator.py
    @@ -55,14 +55,13 @@ def test_set_individual_spike_trains_on_set_defaults():
         assert not individual_spike_trains
     
     
    -def test_set_individual_spike_trains_on_creation():
    +def test_set_individual_spike_trains_on_creation_raises():
         """
    -    Test whether `individual_spike_trains` can be set on model creation.
    +    Test that `individual_spike_trains` set on model creation raises exception.
         """
     
    -    sspg = nest.Create("sinusoidal_poisson_generator", params={"individual_spike_trains": False})
    -    individual_spike_trains = sspg.individual_spike_trains
    -    assert not individual_spike_trains
    +    with pytest.raises(nest.NESTErrors.BadProperty):
    +        nest.Create("sinusoidal_poisson_generator", params={"individual_spike_trains": False})
     
     
     def test_set_individual_spike_trains_on_copy_model():
    
    From eda9fa5e029b13a8be3baeb0c5e6f8c5fdd3e3b0 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 26 Sep 2023 17:01:05 +0200
    Subject: [PATCH 256/375] Refactor nest module setter and getter tests
    
    ---
     testsuite/pytests/test_get_set.py      | 47 --------------
     testsuite/pytests/test_nest_set_get.py | 90 ++++++++++++++++++++++++++
     2 files changed, 90 insertions(+), 47 deletions(-)
     create mode 100644 testsuite/pytests/test_nest_set_get.py
    
    diff --git a/testsuite/pytests/test_get_set.py b/testsuite/pytests/test_get_set.py
    index 74881236fb..6962e0492d 100644
    --- a/testsuite/pytests/test_get_set.py
    +++ b/testsuite/pytests/test_get_set.py
    @@ -44,53 +44,6 @@
         HAVE_PANDAS = False
     
     
    -class TestNestGetSet(unittest.TestCase):
    -    """nest module get/set tests"""
    -
    -    def setUp(self):
    -        nest.ResetKernel()
    -
    -    def test_get(self):
    -        """
    -        Test the `nest` module's `.get` function, `KernelAttribute` access and errors on
    -        unknown attribute access.
    -        """
    -
    -        # TestCase.setUp calls ResetKernel so kernel attributes should be equal to their
    -        # defaults. Test should also error if there is a problem in general with the
    -        # `.get` mechanism.
    -        kst = nest.get("keep_source_table")
    -        self.assertEqual(type(nest).keep_source_table._default, kst, "get value not equal to default after ResetKernel")
    -        self.assertEqual(kst, nest.keep_source_table, "kernel attribute value not equal to get value")
    -        # Getting the value of unknown attributes should error. The test should also error if there is
    -        # a problem with possible `__getattr__` implementations.
    -        with self.assertRaises(AttributeError, msg="no AttributeError for unknown attribute"):
    -            nest.accessAbsolutelyUnknownThingOnNestModule
    -        with self.assertRaises(KeyError, msg="no KeyError for unknown get key"):
    -            nest.get("accessAbsolutelyUnknownKernelAttribute")
    -
    -    def test_set(self):
    -        """
    -        Test the `nest` module's `.set` function, `KernelAttribute` assignment and errors
    -        on unknown attribute assignment.
    -        """
    -
    -        # Test setting one existing kernel parameter as an exemplary for all
    -        # (we just want to test the Python interface, not the setting mechanism itself)
    -        nest.set(rng_seed=12345)
    -        self.assertEqual(nest.rng_seed, 12345, "nest.set() failed")
    -        nest.rng_seed = 345678
    -        self.assertEqual(nest.rng_seed, 345678, "Setting kernel attribute failed")
    -
    -        # Setting the value of unknown attributes should error. Prevents user errors.
    -        with self.assertRaises(AttributeError, msg="arbitrary attribute assignment passed"):
    -            nest.absolutelyUnknownThingOnNestModule = 5
    -
    -        # Don't allow non-KA to be replaced on the module.
    -        with self.assertRaises(AttributeError, msg="known attribute assignment passed"):
    -            nest.get = 5
    -
    -
     class TestNodeCollectionGetSet(unittest.TestCase):
         """NodeCollection get/set tests"""
     
    diff --git a/testsuite/pytests/test_nest_set_get.py b/testsuite/pytests/test_nest_set_get.py
    new file mode 100644
    index 0000000000..84f1eb8b84
    --- /dev/null
    +++ b/testsuite/pytests/test_nest_set_get.py
    @@ -0,0 +1,90 @@
    +# -*- coding: utf-8 -*-
    +#
    +# test_nest_get_set.py
    +#
    +# This file is part of NEST.
    +#
    +# Copyright (C) 2004 The NEST Initiative
    +#
    +# NEST is free software: you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation, either version 2 of the License, or
    +# (at your option) any later version.
    +#
    +# NEST is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    +
    +"""
    +Test the ``nest`` module's setters and getters.
    +"""
    +
    +import nest
    +import pytest
    +
    +
    +@pytest.fixture(autouse=True)
    +def reset():
    +    nest.ResetKernel()
    +
    +
    +def test_nest_get():
    +    """
    +    Test the ``nest`` module's getter.
    +
    +    The test checks the ``nest`` module's ``.get`` function and ``KernelAttribute``
    +    access. The ``reset`` fixture resets the kernel so kernel attributes should
    +    be set to defaults. In general, the test should also fail if there is a
    +    problem with the ``.get`` mechanism.
    +    """
    +
    +    kst = nest.get("keep_source_table")
    +    assert kst == nest.keep_source_table
    +    assert kst == type(nest).keep_source_table._default
    +
    +
    +def test_nest_get_unknown_attr_raises():
    +    """
    +    Ensure the ``nest`` module's getter raises an exception on unknown attribute access.
    +
    +    Getting the value of unknown attributes should raise an exception. The test
    +    should also fail if there is a problem with possible ``__getattr__``
    +    implementations.
    +    """
    +
    +    with pytest.raises(AttributeError):
    +        nest.accessAbsolutelyUnknownThingOnNestModule
    +
    +    with pytest.raises(KeyError):
    +        nest.get("accessAbsolutelyUnknownKernelAttribute")
    +
    +
    +def test_nest_set():
    +    """
    +    Test the ``nest`` module's setter.
    +
    +    The test checks the ``nest`` module's ``.set`` function and ``KernelAttribute``
    +    assignment.
    +    """
    +
    +    nest.set(rng_seed=12345)
    +    assert nest.rng_seed == 12345
    +
    +    nest.set(rng_seed=345678)
    +    assert nest.rng_seed == 345678
    +
    +
    +def test_nest_set_unknown_attr_raises():
    +    """Ensure the ``nest`` module's setter raises exception on unknown attribute assignment."""
    +
    +    # Setting the value of unknown attributes should error. Prevents user errors.
    +    with pytest.raises(AttributeError):
    +        nest.accessAbsolutelyUnknownThingOnNestModule = 5
    +
    +    # Don't allow non-KernelAttributes to be replaced on the module.
    +    with pytest.raises(AttributeError):
    +        nest.get = 5
    
    From 1029186bef9a178988be5b438939c49ba97af971 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Tue, 26 Sep 2023 17:03:28 +0200
    Subject: [PATCH 257/375] Fix copyright header
    
    ---
     testsuite/pytests/test_nest_set_get.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/test_nest_set_get.py b/testsuite/pytests/test_nest_set_get.py
    index 84f1eb8b84..eba73c5180 100644
    --- a/testsuite/pytests/test_nest_set_get.py
    +++ b/testsuite/pytests/test_nest_set_get.py
    @@ -1,6 +1,6 @@
     # -*- coding: utf-8 -*-
     #
    -# test_nest_get_set.py
    +# test_nest_set_get.py
     #
     # This file is part of NEST.
     #
    
    From 69d5061c7242f96051b7c7c31f0b71d81763a7fa Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 22:55:56 +0200
    Subject: [PATCH 258/375] Protect from illegal accesses when an empty list is
     given
    
    ---
     pynest/nestkernel_api.pyx | 16 ++++++++--------
     1 file changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 4281a7b311..8660df808b 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -198,15 +198,15 @@ cdef object dictionary_to_pydict(dictionary cdict):
     
     
     cdef is_list_tuple_ndarray_of_float(v):
    -    list_of_float = type(v) is list and type(v[0]) is float
    -    tuple_of_float = type(v) is tuple and type(v[0]) is float
    +    list_of_float = type(v) is list and len(v) > 0 and type(v[0]) is float
    +    tuple_of_float = type(v) is tuple and len(v) > 0 and type(v[0]) is float
         ndarray_of_float = isinstance(v, numpy.ndarray) and numpy.issubdtype(v.dtype, numpy.floating)
         return list_of_float or tuple_of_float or ndarray_of_float
     
     
     cdef is_list_tuple_ndarray_of_int(v):
    -    list_of_int = type(v) is list and type(v[0]) is int
    -    tuple_of_int = type(v) is tuple and type(v[0]) is int
    +    list_of_int = type(v) is list and len(v) > 0 and type(v[0]) is int
    +    tuple_of_int = type(v) is tuple and len(v) > 0 and type(v[0]) is int
         ndarray_of_int = isinstance(v, numpy.ndarray) and numpy.issubdtype(v.dtype, numpy.integer)
         return list_of_int or tuple_of_int or ndarray_of_int
     
    @@ -228,13 +228,13 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
                 cdict[pystr_to_string(key)] = pylist_or_ndarray_to_doublevec(value)
             elif is_list_tuple_ndarray_of_int(value):
                 cdict[pystr_to_string(key)] = pylist_to_intvec(value)
    -        elif type(value) is list and isinstance(value[0], (list, tuple)):
    +        elif type(value) is list and len(value) > 0 and isinstance(value[0], (list, tuple)):
                 cdict[pystr_to_string(key)] = list_of_list_to_doublevec(value)
    -        elif type(value) is list and isinstance(value[0], numpy.ndarray):
    +        elif type(value) is list and len(value) > 0 and isinstance(value[0], numpy.ndarray):
                 cdict[pystr_to_string(key)] = list_of_list_to_doublevec(value)
    -        elif type(value) is list and type(value[0]) is str:
    +        elif type(value) is list and len(value) > 0 and type(value[0]) is str:
                 cdict[pystr_to_string(key)] = pylist_to_stringvec(value)
    -        elif type(value) is list and type(value[0]) is dict:
    +        elif type(value) is list and len(value) > 0 and type(value[0]) is dict:
                 cdict[pystr_to_string(key)] = pylist_to_dictvec(value)
             elif type(value) is dict:
                 cdict[pystr_to_string(key)] = pydict_to_dictionary(value)
    
    From e5fa26199d4a88020bc7538cfb9eaa4cc0e33b53 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 22:56:28 +0200
    Subject: [PATCH 259/375] Improve error reporting in case of unconvertable
     arguments
    
    ---
     pynest/nestkernel_api.pyx | 8 ++++++--
     1 file changed, 6 insertions(+), 2 deletions(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 8660df808b..9a465f9505 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -245,9 +245,13 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
             elif type(value) is ParameterObject:
                 cdict[pystr_to_string(key)] = (<ParameterObject>value).thisptr
             else:
    +            typename = type(value)
                 if type(value) is list:
    -                print("list of ", type(value[0]))
    -            raise AttributeError(f'when converting Python dictionary: value of key ({key}) is not a known type, got {type(value)}')
    +                if len(value) > 0:
    +                    typename = f"list of {type(value[0])}"
    +                else:
    +                    typename = f"empty list (for which the element type cannot be determined)"
    +            raise AttributeError(f'when converting Python dictionary: value of key ({key}) is not a known type, got {typename}')
         return cdict
     
     
    
    From 600c157a7ed9387d28ea9f9e6c36561acbc9474d Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 22:59:42 +0200
    Subject: [PATCH 260/375] Fix tests with empty lists by making them np.arrays
    
    ---
     testsuite/pytests/sli2py_neurons/test_multisynapse_models.py | 5 ++++-
     testsuite/pytests/sli2py_regressions/test_issue_1140.py      | 3 ++-
     .../pytests/sli2py_stimulating/test_pulsepacket_generator.py | 2 +-
     3 files changed, 7 insertions(+), 3 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py b/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    index 14a8452b36..cf1a0efc3b 100644
    --- a/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    +++ b/testsuite/pytests/sli2py_neurons/test_multisynapse_models.py
    @@ -24,6 +24,7 @@
     """
     
     import nest
    +import numpy as np
     import pytest
     
     
    @@ -70,7 +71,9 @@ def test_multisynapse_model_empty_param_vector(multisyn_model):
         nrn = nest.Create(multisyn_model)
         default_params = nrn.get()
     
    -    empty_params = {pname: [] for pname in ["E_rev", "tau_syn", "tau_rise", "tau_decay"] if pname in default_params}
    +    empty_params = {
    +        pname: np.array([]) for pname in ["E_rev", "tau_syn", "tau_rise", "tau_decay"] if pname in default_params
    +    }
     
         # Try to set params as empty vectors
         nrn.set(empty_params)
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_1140.py b/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    index 3fe0b85aeb..370c1a073b 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_1140.py
    @@ -27,6 +27,7 @@
     """
     
     import nest
    +import numpy as np
     import numpy.testing as nptest
     import pytest
     
    @@ -44,7 +45,7 @@ def test_inhomogeneous_poisson_generator_set_empty_params():
         and `rate_values` without causing a segfault.
         """
     
    -    params = {"rate_times": [], "rate_values": []}
    +    params = {"rate_times": np.array([]), "rate_values": np.array([])}
         ipg = nest.Create("inhomogeneous_poisson_generator")
         ipg.set(params)
     
    diff --git a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    index 50417efe72..bb9eab1b10 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_pulsepacket_generator.py
    @@ -71,7 +71,7 @@ def test_valid_to_pass_empty_pulse_times():
         Assure that a `pulsepacket_generator` with empty `pulse_times` can be simulated.
         """
     
    -    params = {"pulse_times": [], "activity": 0, "sdev": 0.0}
    +    params = {"pulse_times": np.array([]), "activity": 0, "sdev": 0.0}
         ppg = nest.Create("pulsepacket_generator")
         ppg.set(params)
         nest.Simulate(1.0)
    
    From 1b31b97bb38b40a5f5bacece9755fad9bfba5a63 Mon Sep 17 00:00:00 2001
    From: Jochen Martin Eppler <j.eppler@fz-juelich.de>
    Date: Tue, 26 Sep 2023 22:59:54 +0200
    Subject: [PATCH 261/375] Run isort
    
    ---
     pynest/nestkernel_api.pyx | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 9a465f9505..4ae9a6f67a 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -33,9 +33,10 @@ from libcpp.vector cimport vector
     
     # from libc.string cimport memcpy
     
    +import numbers
    +
     import nest
     import numpy
    -import numbers
     
     # cimport numpy
     
    
    From 64b830223a4533b10ac2f7841816de01cb9eb058 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 27 Sep 2023 00:45:48 +0200
    Subject: [PATCH 262/375] Define json encoders for numpy types
    
    ---
     pynest/nest/lib/hl_api_types.py | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index c4d9f64fd8..70bf44b3bf 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -1218,6 +1218,12 @@ def serialize_data(data):
         elif isinstance(data, SynapseCollection):
             # Get full information from SynapseCollection
             return serialize_data(data.get())
    +    elif isinstance(data, numpy.floating):
    +        return float(data)
    +    elif isinstance(data, numpy.integer):
    +        return int(data)
    +    elif isinstance(data, numpy.bool_):
    +        return bool(data)
         if isinstance(data, (list, tuple)):
             return [serialize_data(d) for d in data]
         if isinstance(data, dict):
    
    From 75dc92e912f7972bb8ac20c3a83f0f86edd7042a Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 27 Sep 2023 02:13:14 +0200
    Subject: [PATCH 263/375] Refactor and convert get_set tests from unittest to
     pytest
    
    ---
     testsuite/pytests/test_get_set.py             | 510 ------------------
     testsuite/pytests/test_node_collection_get.py | 402 ++++++++++++++
     testsuite/pytests/test_node_collection_set.py | 171 ++++++
     3 files changed, 573 insertions(+), 510 deletions(-)
     delete mode 100644 testsuite/pytests/test_get_set.py
     create mode 100644 testsuite/pytests/test_node_collection_get.py
     create mode 100644 testsuite/pytests/test_node_collection_set.py
    
    diff --git a/testsuite/pytests/test_get_set.py b/testsuite/pytests/test_get_set.py
    deleted file mode 100644
    index 6962e0492d..0000000000
    --- a/testsuite/pytests/test_get_set.py
    +++ /dev/null
    @@ -1,510 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# test_get_set.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -"""
    -NodeCollection get/set tests
    -"""
    -
    -import json
    -import unittest
    -
    -import nest
    -
    -try:
    -    import numpy as np
    -
    -    HAVE_NUMPY = True
    -except ImportError:
    -    HAVE_NUMPY = False
    -
    -try:
    -    import pandas
    -    import pandas.testing as pt
    -
    -    HAVE_PANDAS = True
    -except ImportError:
    -    HAVE_PANDAS = False
    -
    -
    -class TestNodeCollectionGetSet(unittest.TestCase):
    -    """NodeCollection get/set tests"""
    -
    -    def setUp(self):
    -        nest.ResetKernel()
    -
    -    def test_get(self):
    -        """
    -        Test that get function works as expected.
    -        """
    -
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -
    -        C_m = nodes.get("C_m")
    -        node_ids = nodes.get("global_id")
    -        E_L = nodes.get("E_L")
    -        V_m = nodes.get("V_m")
    -        t_ref = nodes.get("t_ref")
    -        g = nodes.get(["local", "thread", "vp"])
    -        local = g["local"]
    -        thread = g["thread"]
    -        vp = g["vp"]
    -
    -        self.assertEqual(C_m, (250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0))
    -        self.assertEqual(node_ids, tuple(range(1, 11)))
    -        self.assertEqual(E_L, (-70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0))
    -        self.assertEqual(V_m, (-70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0))
    -        self.assertEqual(t_ref, (2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0))
    -        self.assertTrue(local)
    -        self.assertEqual(thread, (0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
    -        self.assertEqual(vp, (0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
    -
    -        g_reference = {
    -            "local": (True, True, True, True, True, True, True, True, True, True),
    -            "thread": (0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    -            "vp": (0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
    -        }
    -        self.assertEqual(g, g_reference)
    -
    -    def test_set_on_empty_node_collection(self):
    -        """
    -        Checks that setting on empty NC does not raise an error.
    -
    -        NOTE: This test was moved from test_NodeCollection.py and may overlap
    -        with test already present in this test suite. If that is the case,
    -        consider to just drop this test.
    -        """
    -
    -        for empty_nc in [nest.NodeCollection(), nest.NodeCollection([])]:
    -            self.assertIsNone(empty_nc.set())
    -
    -    def test_get_sliced(self):
    -        """
    -        Test that get works on sliced NodeCollections
    -        """
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -
    -        V_m = nodes[2:5].get("V_m")
    -        g = nodes[5:7].get(["t_ref", "tau_m"])
    -        C_m = nodes[2:9:2].get("C_m")
    -
    -        self.assertEqual(V_m, (-70.0, -70.0, -70.0))
    -        self.assertEqual(g["t_ref"], (2.0, 2.0))
    -        self.assertEqual(C_m, (250.0, 250.0, 250.0, 250.0))
    -
    -    def test_get_composite(self):
    -        """
    -        Test that get function works on composite NodeCollections
    -        """
    -        n1 = nest.Create("iaf_psc_alpha", 2)
    -        n2 = nest.Create("iaf_psc_delta", 2)
    -        n3 = nest.Create("iaf_psc_exp")
    -        n4 = nest.Create("iaf_psc_alpha", 3)
    -
    -        n1.set(V_m=[-77.0, -88.0])
    -        n3.set({"V_m": -55.0})
    -
    -        n1.set(C_m=[251.0, 252.0])
    -        n2.set(C_m=[253.0, 254.0])
    -        n3.set({"C_m": 255.0})
    -        n4.set(C_m=[256.0, 257.0, 258.0])
    -
    -        n5 = n1 + n2 + n3 + n4
    -
    -        status_dict = n5.get()
    -
    -        # Check that we get values in correct order
    -        vm_ref = (-77.0, -88.0, -70.0, -70.0, -55, -70.0, -70.0, -70.0)
    -        self.assertEqual(status_dict["V_m"], vm_ref)
    -
    -        # Check that we get None where not applicable
    -        # tau_syn_ex is part of iaf_psc_alpha
    -        tau_ref = (2.0, 2.0, None, None, 2.0, 2.0, 2.0, 2.0)
    -        self.assertEqual(status_dict["tau_syn_ex"], tau_ref)
    -
    -        # refractory_input is part of iaf_psc_delta
    -        refrac_ref = (None, None, False, False, None, None, None, None)
    -
    -        self.assertEqual(status_dict["refractory_input"], refrac_ref)
    -
    -        # Check that calling get with string works on composite NCs, both on
    -        # parameters all the models have, and on individual parameters.
    -        Cm_ref = [x * 1.0 for x in range(251, 259)]
    -        Cm = n5.get("C_m")
    -        self.assertEqual(list(Cm), Cm_ref)
    -
    -        refrac = n5.get("refractory_input")
    -        self.assertEqual(refrac, refrac_ref)
    -
    -    @unittest.skipIf(not HAVE_NUMPY, "NumPy package is not available")
    -    def test_get_different_size(self):
    -        """
    -        Test get with different input for different sizes of NodeCollections
    -        """
    -        single_sr = nest.Create("spike_recorder", 1)
    -        multi_sr = nest.Create("spike_recorder", 10)
    -        empty_array_float = np.array([], dtype=float)
    -        empty_array_int = np.array([], dtype=np.int64)
    -
    -        # Single node, literal parameter
    -        self.assertEqual(single_sr.get("start"), 0.0)
    -
    -        # Single node, array parameter
    -        self.assertEqual(single_sr.get(["start", "time_in_steps"]), {"start": 0.0, "time_in_steps": False})
    -
    -        # Single node, hierarchical with literal parameter
    -        np.testing.assert_array_equal(single_sr.get("events", "times"), empty_array_float)
    -
    -        # Multiple nodes, hierarchical with literal parameter
    -        values = multi_sr.get("events", "times")
    -        for v in values:
    -            np.testing.assert_array_equal(v, empty_array_float)
    -
    -        # Single node, hierarchical with array parameter
    -        values = single_sr.get("events", ["senders", "times"])
    -        self.assertEqual(len(values), 2)
    -        self.assertTrue("senders" in values)
    -        self.assertTrue("times" in values)
    -        np.testing.assert_array_equal(values["senders"], empty_array_int)
    -        np.testing.assert_array_equal(values["times"], empty_array_float)
    -
    -        # Multiple nodes, hierarchical with array parameter
    -        values = multi_sr.get("events", ["senders", "times"])
    -        self.assertEqual(len(values), 2)
    -        self.assertTrue("senders" in values)
    -        self.assertTrue("times" in values)
    -        self.assertEqual(len(values["senders"]), len(multi_sr))
    -        for v in values["senders"]:
    -            np.testing.assert_array_equal(v, empty_array_int)
    -        for v in values["times"]:
    -            np.testing.assert_array_equal(v, empty_array_float)
    -
    -        # Single node, no parameter (gets all values)
    -        values = single_sr.get()
    -        num_values_single_sr = len(values.keys())
    -        self.assertEqual(values["start"], 0.0)
    -
    -        # Multiple nodes, no parameter (gets all values)
    -        values = multi_sr.get()
    -        self.assertEqual(len(values.keys()), num_values_single_sr)
    -        self.assertEqual(values["start"], tuple(0.0 for i in range(len(multi_sr))))
    -
    -    @unittest.skipIf(not HAVE_PANDAS, "Pandas package is not available")
    -    def test_get_pandas(self):
    -        """
    -        Test that get function with Pandas output works as expected.
    -        """
    -        single_sr = nest.Create("spike_recorder", 1)
    -        multi_sr = nest.Create("spike_recorder", 10)
    -        empty_array_float = np.array([], dtype=float)
    -
    -        # Single node, literal parameter
    -        pt.assert_frame_equal(
    -            single_sr.get("start", output="pandas"), pandas.DataFrame({"start": [0.0]}, index=tuple(single_sr.tolist()))
    -        )
    -
    -        # Multiple nodes, literal parameter
    -        pt.assert_frame_equal(
    -            multi_sr.get("start", output="pandas"),
    -            pandas.DataFrame({"start": [0.0 for i in range(len(multi_sr))]}, index=tuple(multi_sr.tolist())),
    -        )
    -
    -        # Single node, array parameter
    -        pt.assert_frame_equal(
    -            single_sr.get(["start", "n_events"], output="pandas"),
    -            pandas.DataFrame({"start": [0.0], "n_events": [0]}, index=tuple(single_sr.tolist())),
    -        )
    -
    -        # Multiple nodes, array parameter
    -        ref_dict = {"start": [0.0 for i in range(len(multi_sr))], "n_events": [0]}
    -        pt.assert_frame_equal(
    -            multi_sr.get(["start", "n_events"], output="pandas"),
    -            pandas.DataFrame(ref_dict, index=tuple(multi_sr.tolist())),
    -        )
    -
    -        # Single node, hierarchical with literal parameter
    -        pt.assert_frame_equal(
    -            single_sr.get("events", "times", output="pandas"),
    -            pandas.DataFrame({"times": [[]]}, index=tuple(single_sr.tolist())),
    -        )
    -
    -        # Multiple nodes, hierarchical with literal parameter
    -        ref_dict = {"times": [empty_array_float for i in range(len(multi_sr))]}
    -        pt.assert_frame_equal(
    -            multi_sr.get("events", "times", output="pandas"), pandas.DataFrame(ref_dict, index=tuple(multi_sr.tolist()))
    -        )
    -
    -        # Single node, hierarchical with array parameter
    -        ref_df = pandas.DataFrame({"times": [[]], "senders": [[]]}, index=tuple(single_sr.tolist()))
    -        ref_df = ref_df.reindex(sorted(ref_df.columns), axis=1)
    -        pt.assert_frame_equal(single_sr.get("events", ["senders", "times"], output="pandas"), ref_df)
    -
    -        # Multiple nodes, hierarchical with array parameter
    -        ref_dict = {"times": [[] for i in range(len(multi_sr))], "senders": [[] for i in range(len(multi_sr))]}
    -        ref_df = pandas.DataFrame(ref_dict, index=tuple(multi_sr.tolist()))
    -        ref_df = ref_df.reindex(sorted(ref_df.columns), axis=1)
    -        sr_df = multi_sr.get("events", ["senders", "times"], output="pandas")
    -        sr_df = sr_df.reindex(sorted(sr_df.columns), axis=1)
    -        pt.assert_frame_equal(sr_df, ref_df)
    -
    -        # Single node, no parameter (gets all values)
    -        values = single_sr.get(output="pandas")
    -        num_values_single_sr = values.shape[1]
    -        self.assertEqual(values["start"][tuple(single_sr.tolist())[0]], 0.0)
    -
    -        # Multiple nodes, no parameter (gets all values)
    -        values = multi_sr.get(output="pandas")
    -        self.assertEqual(values.shape, (len(multi_sr), num_values_single_sr))
    -        pt.assert_series_equal(
    -            values["start"], pandas.Series({key: 0.0 for key in tuple(multi_sr.tolist())}, dtype=float, name="start")
    -        )
    -
    -        # With data in events
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -        pg = nest.Create("poisson_generator", params={"rate": 70000.0})
    -        nest.Connect(pg, nodes)
    -        nest.Connect(nodes, single_sr)
    -        nest.Connect(nodes, multi_sr, "one_to_one")
    -        nest.Simulate(50)
    -
    -        ref_values = single_sr.get("events", ["senders", "times"])
    -        ref_df = pandas.DataFrame(
    -            {key: [ref_values[key]] for key in ["senders", "times"]}, index=tuple(single_sr.tolist())
    -        )
    -        sd_df = single_sr.get("events", ["senders", "times"], output="pandas")
    -        pt.assert_frame_equal(sd_df, ref_df)
    -
    -        ref_values = multi_sr.get("events", ["senders", "times"])
    -        ref_df = pandas.DataFrame(ref_values, index=tuple(multi_sr.tolist()))
    -        sd_df = multi_sr.get("events", ["senders", "times"], output="pandas")
    -        pt.assert_frame_equal(sd_df, ref_df)
    -
    -    def test_get_JSON(self):
    -        """
    -        Test that get function with json output works as expected.
    -        """
    -        single_sr = nest.Create("spike_recorder", 1)
    -        multi_sr = nest.Create("spike_recorder", 10)
    -
    -        # Single node, literal parameter
    -        self.assertEqual(json.loads(single_sr.get("start", output="json")), 0.0)
    -
    -        # Multiple nodes, literal parameter
    -        self.assertEqual(json.loads(multi_sr.get("start", output="json")), len(multi_sr) * [0.0])
    -
    -        # Single node, array parameter
    -        ref_dict = {"start": 0.0, "n_events": 0}
    -        self.assertEqual(json.loads(single_sr.get(["start", "n_events"], output="json")), ref_dict)
    -
    -        # Multiple nodes, array parameter
    -        ref_dict = {"start": len(multi_sr) * [0.0], "n_events": len(multi_sr) * [0]}
    -        self.assertEqual(json.loads(multi_sr.get(["start", "n_events"], output="json")), ref_dict)
    -
    -        # Single node, hierarchical with literal parameter
    -        self.assertEqual(json.loads(single_sr.get("events", "times", output="json")), [])
    -
    -        # Multiple nodes, hierarchical with literal parameter
    -        ref_list = len(multi_sr) * [[]]
    -        self.assertEqual(json.loads(multi_sr.get("events", "times", output="json")), ref_list)
    -
    -        # Single node, hierarchical with array parameter
    -        ref_dict = {"senders": [], "times": []}
    -        self.assertEqual(json.loads(single_sr.get("events", ["senders", "times"], output="json")), ref_dict)
    -
    -        # Multiple nodes, hierarchical with array parameter
    -        ref_dict = {"times": len(multi_sr) * [[]], "senders": len(multi_sr) * [[]]}
    -        self.assertEqual(json.loads(multi_sr.get("events", ["senders", "times"], output="json")), ref_dict)
    -
    -        # Single node, no parameter (gets all values)
    -        values = json.loads(single_sr.get(output="json"))
    -        num_values_single_sr = len(values)
    -        self.assertEqual(values["start"], 0.0)
    -
    -        # Multiple nodes, no parameter (gets all values)
    -        values = json.loads(multi_sr.get(output="json"))
    -        self.assertEqual(len(values), num_values_single_sr)
    -        self.assertEqual(values["start"], len(multi_sr) * [0.0])
    -
    -        # With data in events
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -        pg = nest.Create("poisson_generator", params={"rate": 70000.0})
    -        nest.Connect(pg, nodes)
    -        nest.Connect(nodes, single_sr)
    -        nest.Connect(nodes, multi_sr, "one_to_one")
    -        nest.Simulate(50)
    -
    -        sd_ref = single_sr.get("events", ["senders", "times"])
    -        sd_json = single_sr.get("events", ["senders", "times"], output="json")
    -        sd_dict = json.loads(sd_json)
    -        self.assertEqual(len(sd_dict.keys()), 2)
    -        self.assertEqual(sorted(sd_dict.keys()), sorted(sd_ref.keys()))
    -        for key in ["senders", "times"]:
    -            self.assertEqual(list(sd_ref[key]), list(sd_dict[key]))
    -
    -        multi_sr_ref = multi_sr.get("events", ["senders", "times"])
    -        multi_sr_json = multi_sr.get("events", ["senders", "times"], output="json")
    -        multi_sr_dict = json.loads(multi_sr_json)
    -        self.assertEqual(len(multi_sr_dict.keys()), 2)
    -        self.assertEqual(sorted(multi_sr_dict.keys()), sorted(multi_sr_ref.keys()))
    -        for key in ["senders", "times"]:
    -            multi_sr_ref_element = [list(element) for element in multi_sr_ref[key]]
    -            self.assertEqual(multi_sr_ref_element, multi_sr_dict[key])
    -
    -    def test_set(self):
    -        """
    -        Test that set function works as expected.
    -        """
    -
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -
    -        # Dict to set same value for all nodes.
    -        nodes.set({"C_m": 100.0})
    -        C_m = nodes.get("C_m")
    -        self.assertEqual(C_m, (100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0))
    -
    -        # Set same value for all nodes.
    -        nodes.set(tau_Ca=500.0)
    -        tau_Ca = nodes.get("tau_Ca")
    -        self.assertEqual(tau_Ca, (500.0, 500.0, 500.0, 500.0, 500.0, 500.0, 500.0, 500.0, 500.0, 500.0))
    -
    -        # List of dicts, where each dict corresponds to a single node.
    -        nodes.set(
    -            (
    -                {"V_m": 10.0},
    -                {"V_m": 20.0},
    -                {"V_m": 30.0},
    -                {"V_m": 40.0},
    -                {"V_m": 50.0},
    -                {"V_m": 60.0},
    -                {"V_m": 70.0},
    -                {"V_m": 80.0},
    -                {"V_m": 90.0},
    -                {"V_m": -100.0},
    -            )
    -        )
    -        V_m = nodes.get("V_m")
    -        self.assertEqual(V_m, (10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, -100.0))
    -
    -        # Set value of a parameter based on list. List must be length of nodes.
    -        nodes.set(V_reset=[-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0])
    -        V_reset = nodes.get("V_reset")
    -        self.assertEqual(V_reset, (-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0))
    -
    -        with self.assertRaises(IndexError):
    -            nodes.set(V_reset=[-85.0, -82.0, -80.0, -77.0, -75.0])
    -
    -        # Set different parameters with a dictionary.
    -        nodes.set({"t_ref": 44.0, "tau_m": 2.0, "tau_minus": 42.0})
    -        g = nodes.get(["t_ref", "tau_m", "tau_minus"])
    -        self.assertEqual(g["t_ref"], (44.0, 44.0, 44.0, 44.0, 44.0, 44.0, 44.0, 44.0, 44.0, 44.0))
    -        self.assertEqual(g["tau_m"], (2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0))
    -        self.assertEqual(g["tau_minus"], (42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0, 42.0))
    -
    -        with self.assertRaises(nest.NESTError):
    -            nodes.set({"vp": 2})
    -
    -    def test_set_composite(self):
    -        """
    -        Test that set works on composite NodeCollections
    -        """
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -
    -        nodes[2:5].set(({"V_m": -50.0}, {"V_m": -40.0}, {"V_m": -30.0}))
    -        nodes[5:7].set({"t_ref": 4.4, "tau_m": 3.0})
    -        nodes[2:9:2].set(C_m=111.0)
    -        V_m = nodes.get("V_m")
    -        g = nodes.get(["t_ref", "tau_m"])
    -        C_m = nodes.get("C_m")
    -
    -        self.assertEqual(
    -            V_m,
    -            (
    -                -70.0,
    -                -70.0,
    -                -50.0,
    -                -40.0,
    -                -30.0,
    -                -70.0,
    -                -70.0,
    -                -70.0,
    -                -70.0,
    -                -70.0,
    -            ),
    -        )
    -        self.assertEqual(
    -            g,
    -            {
    -                "t_ref": (2.0, 2.0, 2.0, 2.0, 2.0, 4.4, 4.4, 2.0, 2.0, 2.0),
    -                "tau_m": (10.0, 10.0, 10.0, 10.0, 10.0, 3.00, 3.00, 10.0, 10.0, 10.0),
    -            },
    -        )
    -        self.assertEqual(C_m, (250.0, 250.0, 111.0, 250.0, 111.0, 250.0, 111.0, 250.0, 111.0, 250.0))
    -
    -    def test_get_attribute(self):
    -        """Test get using getattr"""
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -        self.assertEqual(nodes.C_m, (250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0, 250.0))
    -        self.assertEqual(nodes.global_id, tuple(range(1, 11)))
    -        self.assertEqual(nodes.E_L, (-70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0))
    -        self.assertEqual(nodes.V_m, (-70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0))
    -        self.assertEqual(nodes.t_ref, (2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0))
    -        with self.assertRaises(KeyError):
    -            print(nodes.nonexistent_attribute)
    -
    -        self.assertIsNone(nodes.spatial)
    -        spatial_nodes = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid([2, 2]))
    -        self.assertIsNotNone(spatial_nodes.spatial)
    -        spatial_reference = {
    -            "network_size": 4,
    -            "center": [0.0, 0.0],
    -            "edge_wrap": False,
    -            "extent": [1.0, 1.0],
    -            "shape": [2, 2],
    -        }
    -        self.assertEqual(spatial_nodes.spatial, spatial_reference)
    -
    -    def test_set_attribute(self):
    -        """Test set using setattr"""
    -        nodes = nest.Create("iaf_psc_alpha", 10)
    -        nodes.C_m = 100.0
    -        self.assertEqual(nodes.get("C_m"), (100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0))
    -        v_reset_reference = (-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0)
    -        nodes.V_reset = v_reset_reference
    -        self.assertEqual(nodes.get("V_reset"), v_reset_reference)
    -
    -        with self.assertRaises(IndexError):
    -            nodes.V_reset = [-85.0, -82.0, -80.0, -77.0, -75.0]
    -
    -        with self.assertRaises(nest.NESTError):
    -            nodes.nonexistent_attribute = 1.0
    -
    -
    -def suite():
    -    suite = unittest.makeSuite(TestNodeCollectionGetSet, "test")
    -    return suite
    -
    -
    -def run():
    -    runner = unittest.TextTestRunner(verbosity=2)
    -    runner.run(suite())
    -
    -
    -if __name__ == "__main__":
    -    run()
    diff --git a/testsuite/pytests/test_node_collection_get.py b/testsuite/pytests/test_node_collection_get.py
    new file mode 100644
    index 0000000000..bbafcdc3b7
    --- /dev/null
    +++ b/testsuite/pytests/test_node_collection_get.py
    @@ -0,0 +1,402 @@
    +# -*- coding: utf-8 -*-
    +#
    +# test_node_collection_get.py
    +#
    +# This file is part of NEST.
    +#
    +# Copyright (C) 2004 The NEST Initiative
    +#
    +# NEST is free software: you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation, either version 2 of the License, or
    +# (at your option) any later version.
    +#
    +# NEST is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    +
    +"""
    +Test ``NodeCollection`` getter.
    +"""
    +
    +import json
    +
    +import nest
    +import numpy as np
    +import numpy.testing as nptest
    +import pandas as pd
    +import pandas.testing as pdtest
    +import pytest
    +
    +
    +@pytest.fixture(autouse=True)
    +def reset():
    +    nest.ResetKernel()
    +
    +
    +@pytest.mark.parametrize(
    +    "neuron_param, expected_value",
    +    [
    +        ["C_m", 250.0],
    +        ["E_L", -70.0],
    +        ["V_m", -70.0],
    +        ["t_ref", 2.0],
    +    ],
    +)
    +def test_node_collection_get_neuron_params(neuron_param, expected_value):
    +    """Test ``get`` on neuron parameters."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    nptest.assert_equal(nodes.get(neuron_param), expected_value)
    +
    +
    +def test_node_collection_get_node_ids():
    +    """Test ``get`` on node IDs."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    nptest.assert_array_equal(nodes.get("global_id"), list(range(1, 11)))
    +
    +
    +def test_node_collection_get_multiple_params():
    +    """Test ``get`` on multiple parameters."""
    +
    +    num_nodes = 10
    +    nodes = nest.Create("iaf_psc_alpha", num_nodes)
    +
    +    g = nodes.get(["local", "thread", "vp"])
    +
    +    g_reference = {
    +        "local": np.full((num_nodes), True),
    +        "thread": np.zeros(num_nodes, dtype=int),
    +        "vp": np.zeros(num_nodes, dtype=int),
    +    }
    +
    +    nptest.assert_equal(g["local"], True)
    +    nptest.assert_equal(g["thread"], 0)
    +    nptest.assert_equal(g["vp"], 0)
    +    nptest.assert_equal(g, g_reference)
    +
    +
    +@pytest.mark.parametrize(
    +    "neuron_param, expected_value",
    +    [
    +        ["C_m", 250.0],
    +        ["E_L", -70.0],
    +        ["V_m", -70.0],
    +        ["t_ref", 2.0],
    +    ],
    +)
    +def test_node_collection_get_attribute(neuron_param, expected_value):
    +    """Test the ``__getattr__`` method."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    nptest.assert_equal(getattr(nodes, neuron_param), expected_value)
    +
    +
    +def test_node_collection_get_nonexistent_attribute_raises():
    +    """Ensure that getting a non-existent attribute raises exception."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +
    +    with pytest.raises(KeyError):
    +        nodes.nonexistent_attribute
    +
    +
    +def test_node_collection_get_empty_attribute():
    +    """Ensure that getting an empty attribute does not raise exception."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +
    +    assert nodes.spatial is None
    +
    +
    +def test_node_collection_get_spatial_attributes():
    +    """Ensure that getting an empty attribute does not raise exception."""
    +
    +    spatial_node = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid([2, 2]))
    +
    +    spatial_reference = {
    +        "network_size": 4,
    +        "center": [0.0, 0.0],
    +        "edge_wrap": False,
    +        "extent": [1.0, 1.0],
    +        "shape": [2, 2],
    +    }
    +
    +    nptest.assert_equal(spatial_node.spatial, spatial_reference)
    +
    +
    +def test_sliced_node_collection_get():
    +    """Test ``get`` on sliced ``NodeCollection``."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +
    +    V_m = nodes[2:5].get("V_m")
    +    g = nodes[5:7].get(["t_ref", "tau_m"])
    +    C_m = nodes[2:9:2].get("C_m")
    +
    +    nptest.assert_array_equal(V_m, [-70.0, -70.0, -70.0])
    +    nptest.assert_array_equal(g["t_ref"], [2.0, 2.0])
    +    nptest.assert_array_equal(C_m, [250.0, 250.0, 250.0, 250.0])
    +
    +
    +def test_composite_node_collection_get():
    +    """Test ``get`` on composite ``NodeCollection``."""
    +
    +    n1 = nest.Create("iaf_psc_alpha", 2)
    +    n2 = nest.Create("iaf_psc_delta", 2)
    +    n3 = nest.Create("iaf_psc_exp")
    +    n4 = nest.Create("iaf_psc_alpha", 3)
    +
    +    n1.set(V_m=[-77.0, -88.0])
    +    n3.set({"V_m": -55.0})
    +
    +    n1.set(C_m=[251.0, 252.0])
    +    n2.set(C_m=[253.0, 254.0])
    +    n3.set({"C_m": 255.0})
    +    n4.set(C_m=[256.0, 257.0, 258.0])
    +
    +    n5 = n1 + n2 + n3 + n4
    +
    +    status_dict = n5.get()
    +
    +    # Check that we get values in correct order
    +    vm_ref = [-77.0, -88.0, -70.0, -70.0, -55, -70.0, -70.0, -70.0]
    +    nptest.assert_array_equal(status_dict["V_m"], vm_ref)
    +
    +    # Check that we get None where not applicable
    +    # tau_syn_ex is part of iaf_psc_alpha
    +    tau_ref = [2.0, 2.0, None, None, 2.0, 2.0, 2.0, 2.0]
    +    nptest.assert_array_equal(status_dict["tau_syn_ex"], tau_ref)
    +
    +    # refractory_input is part of iaf_psc_delta
    +    refrac_ref = [None, None, False, False, None, None, None, None]
    +    nptest.assert_array_equal(status_dict["refractory_input"], refrac_ref)
    +
    +    # Check that calling get with string works on composite NCs, both on
    +    # parameters all the models have, and on individual parameters.
    +    Cm_ref = [x * 1.0 for x in range(251, 259)]
    +    Cm_actual = n5.get("C_m")
    +    nptest.assert_array_equal(Cm_actual, Cm_ref)
    +
    +    refrac_actual = n5.get("refractory_input")
    +    nptest.assert_array_equal(refrac_actual, refrac_ref)
    +
    +
    +def test_different_sized_node_collections_get():
    +    """
    +    Test ``get`` with different input for different sizes of ``NodeCollection``s.
    +    """
    +
    +    single_sr = nest.Create("spike_recorder", 1)
    +    multi_sr = nest.Create("spike_recorder", 10)
    +    empty_array_float = np.array([], dtype=float)
    +    empty_array_int = np.array([], dtype=int)
    +
    +    # Single node, literal parameter
    +    assert single_sr.get("start") == 0.0
    +
    +    # Single node, array parameter
    +    assert single_sr.get(["start", "time_in_steps"]) == {"start": 0.0, "time_in_steps": False}
    +
    +    # Single node, hierarchical with literal parameter
    +    nptest.assert_array_equal(single_sr.get("events", "times"), empty_array_float)
    +
    +    # Multiple nodes, hierarchical with literal parameter
    +    for spike_times in multi_sr.get("events", "times"):
    +        nptest.assert_array_equal(spike_times, empty_array_float)
    +
    +    # Single node, hierarchical with array parameter
    +    single_events_dict = single_sr.get("events", ["senders", "times"])
    +    assert len(single_events_dict) == 2
    +    assert "senders" in single_events_dict
    +    assert "times" in single_events_dict
    +    nptest.assert_array_equal(single_events_dict["senders"], empty_array_int)
    +    nptest.assert_array_equal(single_events_dict["times"], empty_array_float)
    +
    +    # Multiple nodes, hierarchical with array parameter
    +    multi_events_dict = single_sr.get("events", ["senders", "times"])
    +    assert len(multi_events_dict) == 2
    +    assert "senders" in multi_events_dict
    +    assert "times" in multi_events_dict
    +    for sender in multi_events_dict["senders"]:
    +        nptest.assert_array_equal(sender, empty_array_int)
    +    for spike_times in multi_events_dict["times"]:
    +        nptest.assert_array_equal(spike_times, empty_array_float)
    +
    +    # Single node, no parameter (gets all values)
    +    single_full_dict = single_sr.get()
    +    assert single_full_dict["start"] == 0.0
    +
    +    # Multiple nodes, no parameter (gets all values)
    +    multi_full_dict = multi_sr.get()
    +    nptest.assert_equal(multi_full_dict["start"], 0.0)
    +
    +    # Ensure that single and multiple gets have the same number of params
    +    single_num_params = len(single_full_dict.keys())
    +    multi_num_params = len(multi_full_dict.keys())
    +    assert multi_num_params == single_num_params
    +
    +
    +def test_node_collection_get_pandas_output():
    +    """Test ``NodeCollection`` ``get`` with ``output=pandas``."""
    +
    +    single_sr = nest.Create("spike_recorder", 1)
    +    multi_sr = nest.Create("spike_recorder", 10)
    +    empty_array_float = np.array([], dtype=float)
    +
    +    # Single node, literal parameter
    +    pdtest.assert_frame_equal(
    +        single_sr.get("start", output="pandas"), pd.DataFrame({"start": [0.0]}, index=tuple(single_sr.tolist()))
    +    )
    +
    +    # Multiple nodes, literal parameter
    +    pdtest.assert_frame_equal(
    +        multi_sr.get("start", output="pandas"),
    +        pd.DataFrame({"start": [0.0 for i in range(len(multi_sr))]}, index=tuple(multi_sr.tolist())),
    +    )
    +
    +    # Single node, array parameter
    +    pdtest.assert_frame_equal(
    +        single_sr.get(["start", "n_events"], output="pandas"),
    +        pd.DataFrame({"start": [0.0], "n_events": [0]}, index=tuple(single_sr.tolist())),
    +    )
    +
    +    # Multiple nodes, array parameter
    +    ref_dict = {"start": [0.0 for i in range(len(multi_sr))], "n_events": [0]}
    +    pdtest.assert_frame_equal(
    +        multi_sr.get(["start", "n_events"], output="pandas"),
    +        pd.DataFrame(ref_dict, index=tuple(multi_sr.tolist())),
    +    )
    +
    +    # Single node, hierarchical with literal parameter
    +    pdtest.assert_frame_equal(
    +        single_sr.get("events", "times", output="pandas"),
    +        pd.DataFrame({"times": [[]]}, index=tuple(single_sr.tolist())),
    +    )
    +
    +    # Multiple nodes, hierarchical with literal parameter
    +    ref_dict = {"times": [empty_array_float for i in range(len(multi_sr))]}
    +    pdtest.assert_frame_equal(
    +        multi_sr.get("events", "times", output="pandas"), pd.DataFrame(ref_dict, index=tuple(multi_sr.tolist()))
    +    )
    +
    +    # Single node, hierarchical with array parameter
    +    ref_df = pd.DataFrame({"times": [[]], "senders": [[]]}, index=tuple(single_sr.tolist()))
    +    ref_df = ref_df.reindex(sorted(ref_df.columns), axis=1)
    +    pdtest.assert_frame_equal(single_sr.get("events", ["senders", "times"], output="pandas"), ref_df)
    +
    +    # Multiple nodes, hierarchical with array parameter
    +    ref_dict = {"times": [[] for i in range(len(multi_sr))], "senders": [[] for i in range(len(multi_sr))]}
    +    ref_df = pd.DataFrame(ref_dict, index=tuple(multi_sr.tolist()))
    +    ref_df = ref_df.reindex(sorted(ref_df.columns), axis=1)
    +    sr_df = multi_sr.get("events", ["senders", "times"], output="pandas")
    +    sr_df = sr_df.reindex(sorted(sr_df.columns), axis=1)
    +    pdtest.assert_frame_equal(sr_df, ref_df)
    +
    +    # Single node, no parameter (gets all values)
    +    values = single_sr.get(output="pandas")
    +    num_values_single_sr = values.shape[1]
    +    nptest.assert_equal(values["start"][single_sr.tolist()[0]], 0.0)
    +
    +    # Multiple nodes, no parameter (gets all values)
    +    values = multi_sr.get(output="pandas")
    +
    +    assert values.shape == (len(multi_sr), num_values_single_sr)
    +    pdtest.assert_series_equal(
    +        values["start"], pd.Series({key: 0.0 for key in tuple(multi_sr.tolist())}, dtype=float, name="start")
    +    )
    +
    +    # With data in events
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    pg = nest.Create("poisson_generator", params={"rate": 70000.0})
    +    nest.Connect(pg, nodes)
    +    nest.Connect(nodes, single_sr)
    +    nest.Connect(nodes, multi_sr, "one_to_one")
    +    nest.Simulate(50)
    +
    +    ref_values = single_sr.get("events", ["senders", "times"])
    +    ref_df = pd.DataFrame({key: [ref_values[key]] for key in ["senders", "times"]}, index=tuple(single_sr.tolist()))
    +    sd_df = single_sr.get("events", ["senders", "times"], output="pandas")
    +    pdtest.assert_frame_equal(sd_df, ref_df)
    +
    +    ref_values = multi_sr.get("events", ["senders", "times"])
    +    ref_df = pd.DataFrame(ref_values, index=tuple(multi_sr.tolist()))
    +    sd_df = multi_sr.get("events", ["senders", "times"], output="pandas")
    +    pdtest.assert_frame_equal(sd_df, ref_df)
    +
    +
    +def test_node_collection_get_json_output():
    +    """Test ``NodeCollection`` ``get`` with ``output=json``."""
    +
    +    single_sr = nest.Create("spike_recorder", 1)
    +    multi_sr = nest.Create("spike_recorder", 10)
    +
    +    # Single node, literal parameter
    +    assert json.loads(single_sr.get("start", output="json")) == 0.0
    +
    +    # Multiple nodes, literal parameter
    +    nptest.assert_equal(json.loads(multi_sr.get("start", output="json")), len(multi_sr) * [0.0])
    +
    +    # Single node, array parameter
    +    ref_dict = {"start": 0.0, "n_events": 0}
    +    assert json.loads(single_sr.get(["start", "n_events"], output="json")) == ref_dict
    +
    +    # Multiple nodes, array parameter
    +    ref_dict = {"start": len(multi_sr) * [0.0], "n_events": len(multi_sr) * [0]}
    +    assert json.loads(multi_sr.get(["start", "n_events"], output="json")) == ref_dict
    +
    +    # Single node, hierarchical with literal parameter
    +    assert json.loads(single_sr.get("events", "times", output="json")) == []
    +
    +    # Multiple nodes, hierarchical with literal parameter
    +    ref_list = len(multi_sr) * [[]]
    +    assert json.loads(multi_sr.get("events", "times", output="json")) == ref_list
    +
    +    # Single node, hierarchical with array parameter
    +    ref_dict = {"senders": [], "times": []}
    +    assert json.loads(single_sr.get("events", ["senders", "times"], output="json")) == ref_dict
    +
    +    # Multiple nodes, hierarchical with array parameter
    +    ref_dict = {"times": len(multi_sr) * [[]], "senders": len(multi_sr) * [[]]}
    +    assert json.loads(multi_sr.get("events", ["senders", "times"], output="json")) == ref_dict
    +
    +    # Single node, no parameter (gets all values)
    +    values = json.loads(single_sr.get(output="json"))
    +    num_values_single_sr = len(values)
    +    assert values["start"] == 0.0
    +
    +    # Multiple nodes, no parameter (gets all values)
    +    values = json.loads(multi_sr.get(output="json"))
    +    assert len(values) == num_values_single_sr
    +    nptest.assert_array_equal(values["start"], len(multi_sr) * [0.0])
    +
    +    # With data in events
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    pg = nest.Create("poisson_generator", params={"rate": 70000.0})
    +    nest.Connect(pg, nodes)
    +    nest.Connect(nodes, single_sr)
    +    nest.Connect(nodes, multi_sr, "one_to_one")
    +    nest.Simulate(50)
    +
    +    sd_ref = single_sr.get("events", ["senders", "times"])
    +    sd_json = single_sr.get("events", ["senders", "times"], output="json")
    +    sd_dict = json.loads(sd_json)
    +    assert len(sd_dict.keys()) == 2
    +    assert sorted(sd_dict.keys()) == sorted(sd_ref.keys())
    +    for key in ["senders", "times"]:
    +        nptest.assert_array_equal(sd_dict[key], sd_ref[key])
    +
    +    multi_sr_ref = multi_sr.get("events", ["senders", "times"])
    +    multi_sr_json = multi_sr.get("events", ["senders", "times"], output="json")
    +    multi_sr_dict = json.loads(multi_sr_json)
    +    assert len(multi_sr_dict.keys()) == 2
    +    assert sorted(multi_sr_dict.keys()) == sorted(multi_sr_ref.keys())
    +
    +    for key in ["senders", "times"]:
    +        multi_sr_ref_element = [list(element) for element in multi_sr_ref[key]]
    +        assert multi_sr_dict[key] == multi_sr_ref_element
    diff --git a/testsuite/pytests/test_node_collection_set.py b/testsuite/pytests/test_node_collection_set.py
    new file mode 100644
    index 0000000000..d6cb73c932
    --- /dev/null
    +++ b/testsuite/pytests/test_node_collection_set.py
    @@ -0,0 +1,171 @@
    +# -*- coding: utf-8 -*-
    +#
    +# test_node_collection_set.py
    +#
    +# This file is part of NEST.
    +#
    +# Copyright (C) 2004 The NEST Initiative
    +#
    +# NEST is free software: you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation, either version 2 of the License, or
    +# (at your option) any later version.
    +#
    +# NEST is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    +
    +"""
    +Test ``NodeCollection`` setter.
    +"""
    +
    +import nest
    +import numpy.testing as nptest
    +import pytest
    +
    +
    +@pytest.fixture(autouse=True)
    +def reset():
    +    nest.ResetKernel()
    +
    +
    +def test_node_collection_set_single_param():
    +    """Test ``set`` with a single parameter."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    nodes.set(tau_Ca=500.0)
    +
    +    nptest.assert_equal(nodes.tau_Ca, 500.0)
    +
    +
    +def test_node_collection_set_list_of_single_param():
    +    """Test ``set`` with list of a single parameter."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    nodes.set(V_reset=[-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0])
    +
    +    nptest.assert_array_equal(nodes.V_reset, [-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0])
    +
    +
    +def test_node_collection_set_list_of_single_param_wrong_length_raises():
    +    """Test that ``set`` with list of wrong length raises exception."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +
    +    with pytest.raises(IndexError):
    +        nodes.set(V_reset=[-85.0, -82.0, -80.0, -77.0, -75.0])
    +
    +
    +def test_node_collection_set_dict_single_param():
    +    """Test ``set`` with dictionary containing a single parameter."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    nodes.set({"C_m": 100.0})
    +
    +    nptest.assert_equal(nodes.C_m, 100.0)
    +
    +
    +def test_node_collection_set_list_of_dicts():
    +    """Test ``set`` with dictionary containing a single parameter."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    nodes.set(
    +        (
    +            {"V_m": 10.0},
    +            {"V_m": 20.0},
    +            {"V_m": 30.0},
    +            {"V_m": 40.0},
    +            {"V_m": 50.0},
    +            {"V_m": 60.0},
    +            {"V_m": 70.0},
    +            {"V_m": 80.0},
    +            {"V_m": 90.0},
    +            {"V_m": -100.0},
    +        )
    +    )
    +    nptest.assert_array_equal(nodes.V_m, [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, -100.0])
    +
    +
    +def test_node_collection_set_dict_multiple_params():
    +    """Test ``set`` with dictionary containing multiple parameters."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    nodes.set({"t_ref": 44.0, "tau_m": 2.0, "tau_minus": 42.0})
    +
    +    nptest.assert_equal(nodes.t_ref, 44.0)
    +    nptest.assert_equal(nodes.tau_m, 2.0)
    +    nptest.assert_equal(nodes.tau_minus, 42.0)
    +
    +
    +def test_node_collection_set_nonexistent_param_raises():
    +    """Test that ``set`` with dictionary containing non-existent parameter raises exception."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +
    +    with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
    +        nodes.set({"vp": 2})
    +
    +
    +@pytest.mark.parametrize("empty_nc", [nest.NodeCollection(), nest.NodeCollection([])])
    +def test_set_on_empty_node_collection(empty_nc):
    +    """Ensure that ``set`` on an empty ``NodeCollection`` does not raise an error."""
    +
    +    empty_nc.set()
    +
    +
    +def test_sliced_node_collection_set():
    +    """Test ``set`` on sliced ``NodeCollection``."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +
    +    nodes[2:5].set(({"V_m": -50.0}, {"V_m": -40.0}, {"V_m": -30.0}))
    +    nodes[5:7].set({"t_ref": 4.4, "tau_m": 3.0})
    +    nodes[2:9:2].set(C_m=111.0)
    +
    +    expected_Vm = [-70.0, -70.0, -50.0, -40.0, -30.0, -70.0, -70.0, -70.0, -70.0, -70.0]
    +    expected_Cm = [250.0, 250.0, 111.0, 250.0, 111.0, 250.0, 111.0, 250.0, 111.0, 250.0]
    +    expected_status_dict = {
    +        "t_ref": [2.0, 2.0, 2.0, 2.0, 2.0, 4.4, 4.4, 2.0, 2.0, 2.0],
    +        "tau_m": [10.0, 10.0, 10.0, 10.0, 10.0, 3.00, 3.00, 10.0, 10.0, 10.0],
    +    }
    +
    +    actual_status_dict = nodes.get(["t_ref", "tau_m"])
    +
    +    nptest.assert_array_equal(nodes.V_m, expected_Vm)
    +    nptest.assert_array_equal(nodes.C_m, expected_Cm)
    +    nptest.assert_equal(actual_status_dict, expected_status_dict)
    +
    +
    +def test_node_collection_set_attribute():
    +    """Test the ``__setattr__`` method."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +    V_reset_ref = [-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0]
    +
    +    nodes.C_m = 100.0
    +    nodes.V_reset = V_reset_ref
    +
    +    nptest.assert_equal(nodes.C_m, 100.0)
    +    nptest.assert_array_equal(nodes.V_reset, V_reset_ref)
    +
    +
    +def test_node_collection_set_attribute_list_wrong_length_raises():
    +    """Test that setting attribute to list of wrong length raises exception."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +
    +    with pytest.raises(IndexError):
    +        nodes.V_reset = [-85.0, -82.0, -80.0, -77.0, -75.0]
    +
    +
    +def test_node_collection_set_nonexistent_attribute_raises():
    +    """Test that setting non-existent attribute raises exception."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 10)
    +
    +    with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
    +        nodes.nonexistent_attribute = 1.0
    
    From 5dd483a5637f032f9d381070fa84dcdce8ee73a3 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Wed, 27 Sep 2023 02:33:04 +0200
    Subject: [PATCH 264/375] Use numpy.testing for assertion
    
    ---
     testsuite/pytests/test_spike_transmission.py | 20 +++++++++++---------
     1 file changed, 11 insertions(+), 9 deletions(-)
    
    diff --git a/testsuite/pytests/test_spike_transmission.py b/testsuite/pytests/test_spike_transmission.py
    index 852bbafeef..d738c452c4 100644
    --- a/testsuite/pytests/test_spike_transmission.py
    +++ b/testsuite/pytests/test_spike_transmission.py
    @@ -24,6 +24,7 @@
     """
     
     import nest
    +import numpy.testing as nptest
     import pytest
     
     # This is a hack until I find out how to use the have_threads fixture to
    @@ -92,8 +93,8 @@ def test_one_to_one(self, compressed_spikes, num_neurons, num_threads):
                 num_neurons, num_neurons, "one_to_one", num_threads, compressed_spikes
             )
     
    -        assert sorted(spike_data["senders"]) == sorted(post_pop.tolist())
    -        assert all(t == self.t_arrival for t in spike_data["times"])  # PYNEST-NG
    +        nptest.assert_array_equal(sorted(spike_data["senders"]), sorted(post_pop.tolist()))
    +        nptest.assert_equal(spike_data["times"], self.t_arrival)
     
         @pytest.mark.parametrize("compressed_spikes", [False, True])
         @pytest.mark.parametrize("num_neurons", [4, 5])
    @@ -109,8 +110,8 @@ def test_one_to_all(self, compressed_spikes, num_neurons, num_threads):
     
             post_pop, spike_data = self._simulate_network(1, num_neurons, "all_to_all", num_threads, compressed_spikes)
     
    -        assert sorted(spike_data["senders"]) == sorted(post_pop.tolist())
    -        assert all(t == self.t_arrival for t in spike_data["times"])  # PYNEST-NG
    +        nptest.assert_array_equal(sorted(spike_data["senders"]), sorted(post_pop.tolist()))
    +        nptest.assert_equal(spike_data["times"], self.t_arrival)
     
         @pytest.mark.parametrize("compressed_spikes", [False, True])
         @pytest.mark.parametrize("num_neurons", [4, 5])
    @@ -125,10 +126,10 @@ def test_all_to_one(self, compressed_spikes, num_neurons, num_threads):
             """
     
             post_pop, spike_data = self._simulate_network(num_neurons, 1, "all_to_all", num_threads, compressed_spikes)
    -        # post_pop is one neuron, which receives a spike from each pre neuron
     
    -        assert spike_data["senders"] == num_neurons * post_pop.tolist()
    -        assert all(t == self.t_arrival for t in spike_data["times"])  # PYNEST-NG
    +        # post_pop is one neuron, which receives a spike from each pre neuron
    +        nptest.assert_array_equal(spike_data["senders"], num_neurons * post_pop.tolist())
    +        nptest.assert_equal(spike_data["times"], self.t_arrival)
     
         @pytest.mark.parametrize("compressed_spikes", [False, True])
         @pytest.mark.parametrize("num_neurons", [4, 5])
    @@ -145,5 +146,6 @@ def test_all_to_all(self, compressed_spikes, num_neurons, num_threads):
             post_pop, spike_data = self._simulate_network(
                 num_neurons, num_neurons, "all_to_all", num_threads, compressed_spikes
             )
    -        assert sorted(spike_data["senders"]) == sorted(num_neurons * post_pop.tolist())
    -        assert all(t == self.t_arrival for t in spike_data["times"])
    +
    +        nptest.assert_array_equal(sorted(spike_data["senders"]), sorted(num_neurons * post_pop.tolist()))
    +        nptest.assert_equal(spike_data["times"], self.t_arrival)
    
    From ef75d6bee87f89f198c6449cbb61a04e6967eb7e Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 28 Sep 2023 02:25:47 +0200
    Subject: [PATCH 265/375] Update tests to work with pynest-ng
    
    ---
     .../pytests/sli2py_recording/test_corr_det.py |  14 +-
     .../test_corr_matrix_det.py                   |  10 +-
     .../sli2py_regressions/test_ticket_459.py     |   5 +-
     .../sli2py_regressions/test_ticket_903.py     |   7 +-
     .../sli2py_regressions/test_ticket_941.py     |  22 +--
     .../test_spike_generator.py                   |  15 ++
     .../sli2py_synapses/test_hpc_synapse.py       |  27 +--
     testsuite/pytests/test_spatial/test_basics.py |  19 +-
     .../test_spatial/test_connect_layers.py       |   4 +-
     .../test_spatial/test_connect_sliced.py       |   6 +-
     .../test_spatial/test_create_spatial.py       |  46 ++---
     .../test_spatial/test_layer_get_set.py        | 182 ++++++++++--------
     12 files changed, 188 insertions(+), 169 deletions(-)
     rename testsuite/pytests/{sli2py_other => sli2py_recording}/test_corr_matrix_det.py (95%)
    
    diff --git a/testsuite/pytests/sli2py_recording/test_corr_det.py b/testsuite/pytests/sli2py_recording/test_corr_det.py
    index 93efa0dfde..c4216c172d 100644
    --- a/testsuite/pytests/sli2py_recording/test_corr_det.py
    +++ b/testsuite/pytests/sli2py_recording/test_corr_det.py
    @@ -31,8 +31,10 @@
     
         The test does not test weighted correlations.
     """
    +
     import nest
     import numpy as np
    +import numpy.testing as nptest
     import pytest
     
     
    @@ -137,12 +139,10 @@ def test_histogram_correlation(spikes_times, expected_histogram):
         nest.SetDefaults("correlation_detector", {"delta_tau": 1.0, "tau_max": 5.0})
     
         detector = prepare_correlation_detector(spikes_times)
    -
    -    n_events = detector.n_events
         spikes_times_size = list(map(lambda x: len(x), spikes_times))
    -    assert n_events == spikes_times_size
     
    -    assert (detector.histogram == expected_histogram).all()
    +    nptest.assert_array_equal(detector.n_events, spikes_times_size)
    +    nptest.assert_array_equal(detector.histogram, expected_histogram)
     
     
     def test_setting_invalid_n_events():
    @@ -150,7 +150,7 @@ def test_setting_invalid_n_events():
         test to ensure [1 1] not allowed for /n_events
         """
         detector = nest.Create("correlation_detector")
    -    with pytest.raises(Exception):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             detector.set(n_events=[1, 1])
     
     
    @@ -165,5 +165,5 @@ def test_reset():
     
         if not has_zero_entries:
             detector.set(n_events=[0, 0])
    -        assert np.all(detector.n_events == 0)
    -        assert np.all(detector.histogram == 0)
    +        nptest.assert_equal(detector.n_events, 0)
    +        nptest.assert_equal(detector.histogram, 0)
    diff --git a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py b/testsuite/pytests/sli2py_recording/test_corr_matrix_det.py
    similarity index 95%
    rename from testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    rename to testsuite/pytests/sli2py_recording/test_corr_matrix_det.py
    index 823fbdfebf..50fdde577c 100644
    --- a/testsuite/pytests/sli2py_other/test_corr_matrix_det.py
    +++ b/testsuite/pytests/sli2py_recording/test_corr_matrix_det.py
    @@ -34,6 +34,7 @@
     
     import nest
     import numpy as np
    +import numpy.testing as nptest
     import pytest
     
     
    @@ -152,12 +153,11 @@ def test_histogram_correlation(spikes_times, expected_covariance):
         nest.SetDefaults("correlomatrix_detector", {"delta_tau": 0.5, "tau_max": 2.0, "N_channels": 2})
     
         detector = prepare_correlomatrix_detector(spikes_times)
    -
    -    n_events = detector.n_events
         spikes_times_size = list(map(lambda x: len(x), spikes_times))
    -    assert n_events == spikes_times_size
     
    -    assert (detector.covariance[0][1] == expected_covariance).all()
    +    nptest.assert_array_equal(detector.n_events, spikes_times_size)
    +
    +    nptest.assert_array_equal(detector.covariance[0][1], expected_covariance)
     
     
     def test_reset():
    @@ -173,4 +173,4 @@ def test_reset():
     
         if not has_zero_entries:
             detector.set(N_channels=8)
    -        assert np.all(detector.covariance[0][0] == 0.0)
    +        nptest.assert_equal(detector.covariance[0][0], 0.0)
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_459.py b/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    index 9eb80a3fd4..1f44fe5819 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_459.py
    @@ -24,6 +24,7 @@
     """
     
     import nest
    +import numpy.testing as nptest
     import pytest
     
     
    @@ -48,10 +49,10 @@ def test_clean_EL_change(model):
         nrn.E_L = EL_new
     
         # Confirm E_L has been changed.
    -    assert nrn.get("E_L") == EL_new
    +    assert nrn.E_L == EL_new
     
         # Confirm all other parameters are equal to original values.
         new_params = nrn.get()
         del orig_params["E_L"]
         del new_params["E_L"]
    -    assert new_params == orig_params
    +    nptest.assert_equal(new_params, orig_params)
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_903.py b/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    index 6775ff70d9..fda80a1975 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_903.py
    @@ -23,6 +23,7 @@
     """This test ensures that delays drawn from continuous distribution are not rounded up strictly."""
     
     import nest
    +import numpy as np
     import pytest
     import scipy.stats
     
    @@ -42,7 +43,9 @@ def test_correct_rounding_distributions():
             conn_spec={"rule": "fixed_indegree", "indegree": indegree},
         )
     
    -    delays = nest.GetConnections().delay
    +    delays = np.array(nest.GetConnections().delay)
     
         assert set(delays) == {1, 2}
    -    assert scipy.stats.binom_test(sum(delays == 2.0), indegree) > significance
    +
    +    binomtest_result = scipy.stats.binomtest(sum(delays == 2.0), indegree)
    +    assert binomtest_result.pvalue > significance
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_941.py b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    index 5c4f9a3a1d..30e568968c 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_941.py
    @@ -24,8 +24,7 @@
     with different synapse models."""
     
     import nest
    -import numpy as np
    -import pytest
    +import numpy.testing as nptest
     
     
     def check_connection(source, n_expected, expected):
    @@ -81,18 +80,11 @@ def test_different_connections():
         assert nest.num_connections == 5
     
         nest.Simulate(10.0)
    -    spike_recs = spike_recorder.events["times"]
    -    assert np.all(
    -        spike_recs["times"]
    -        == pytest.approx(
    -            [
    -                3.0,
    -                4.0,
    -                5.0,
    -            ]
    -        )
    -    )
     
    -    synapses = nest.GetConnections(source=pn1, target=pn2).synapse_model
    +    actual_spikes = spike_recorder.events["times"]
    +    expected_spikes = [3.0, 4.0, 5.0]
    +    nptest.assert_array_equal(actual_spikes, expected_spikes)
    +
    +    actual_synapses = nest.GetConnections(source=pn1, target=pn2).synapse_model
         expected_synapses = ["static_synapse", "static_synapse", "static_synapse_hom_w"]
    -    assert np.all(np.in1d(expected_synapses, synapses))
    +    assert actual_synapses == expected_synapses
    diff --git a/testsuite/pytests/sli2py_stimulating/test_spike_generator.py b/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    index 1cea0598b5..e853187026 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_spike_generator.py
    @@ -39,6 +39,7 @@ def test_check_spike_time_zero_error(prepare_kernel):
         """
         This test checks if setting spike time to 0 causes an exception.
         """
    +
         sg = nest.Create("spike_generator")
     
         with pytest.raises(nest.NESTError, match="spike time cannot be set to 0"):
    @@ -49,8 +50,10 @@ def test_spike_generator_precise_time_false(prepare_kernel):
         """
         Check if truncating spike times to grid causes an assertion with ``precise_times`` set to ``False``.
         """
    +
         sg = nest.Create("spike_generator")
         sg_params = {"precise_times": False, "spike_times": [4.33], "origin": 0.0, "start": 0.0, "stop": 0.0}
    +
         with pytest.raises(nest.NESTError, match="Time point 4.33 is not representable in current resolution"):
             sg.set(sg_params)
     
    @@ -71,6 +74,7 @@ def test_spike_generator(prepare_kernel, spike_times, allow_offgrid_times, expec
         ``tic/2`` from the step. If ``allow_offgrid_times=True``, spike times are rounded to the nearest step if
         within ``tic/2`` from the step and to the end of the time step otherwise.
         """
    +
         sg_params = {
             "precise_times": False,
             "spike_times": spike_times,
    @@ -94,8 +98,10 @@ def test_spike_generator_spike_not_res_multiple(prepare_kernel):
         """
         Check if the spike time is a multiple of the resolution with ``allow_offgrid_times=False`` (default).
         """
    +
         sg = nest.Create("spike_generator")
         sg_params = {"spike_times": [1.0, 1.05, 3.0001], "origin": 0.0, "start": 0.0, "stop": 6.0}
    +
         with pytest.raises(nest.NESTError, match="Time point 1.05 is not representable in current resolution"):
             sg.set(sg_params)
     
    @@ -104,6 +110,7 @@ def test_spike_generator_precise_spikes(prepare_kernel):
         """
         Test spike times and offsets against expectations with ``precise_times`` set to ``True``.
         """
    +
         sg_params = {
             "precise_times": True,
             "spike_times": [1.0, 1.05, 3.0001],
    @@ -134,6 +141,7 @@ def test_spike_generator_spike_time_at_simulation_end_time(prepare_kernel):
         Here, the spike time is within ``tic/2`` of step 100, rounded down to 100 thus not in the future;
         spike will not be emitted.
         """
    +
         sg = nest.Create("spike_generator")
         sr = nest.Create("spike_recorder")
         nest.Connect(sg, sr)
    @@ -154,6 +162,7 @@ def test_spike_generator_precise_time_future_spike(prepare_kernel):
     
         In this test, the spike occurs at step 101, offset -0.0999 is in the future, and spike is shifted to the future.
         """
    +
         sg = nest.Create("spike_generator", params={"precise_times": True, "origin": 0.0, "start": 0.0})
         sr = nest.Create("spike_recorder", params={"time_in_steps": True})
         nest.Connect(sg, sr)
    @@ -180,6 +189,7 @@ def test_spike_generator_with_shift_now_spikes(prepare_kernel):
         In this test, first the spike occurs at step 101 and shifted into the future.
         A second spike occurs at step 110 is not shifted, since it is in the future anyways.
         """
    +
         sg = nest.Create("spike_generator", params={"shift_now_spikes": True, "origin": 0.0, "start": 0.0})
         sr = nest.Create("spike_recorder", params={"time_in_steps": True})
         nest.Connect(sg, sr, syn_spec={"weight": 1.0, "delay": 1.0})
    @@ -203,6 +213,7 @@ def test_spike_generator_precise_times_and_allow_offgrid_times(prepare_kernel):
         """
         Ensure exclusivity between options ``precise_times`` and ``allow_offgrid_times``.
         """
    +
         with pytest.raises(
             nest.NESTError,
             match="Option precise_times cannot be set to true when either allow_offgrid_times or "
    @@ -215,6 +226,7 @@ def test_spike_generator_precise_times_and_shift_now_spikes(prepare_kernel):
         """
         Ensure exclusivity between options ``precise_times`` and ``shift_now_spikes``.
         """
    +
         with pytest.raises(
             nest.NESTError,
             match="Option precise_times cannot be set to true when either allow_offgrid_times or "
    @@ -245,8 +257,10 @@ def test_spike_generator_set_and_get(prepare_kernel, sg_params, expected_spike_t
         - ``precise_times`` set to ``True``.
         - ``shift_now_spikes`` set to ``True``.
         """
    +
         sg = nest.Create("spike_generator")
         sg.set(sg_params)
    +
         actual_spike_times = sg.get("spike_times")
         nptest.assert_almost_equal(actual_spike_times, expected_spike_times, decimal=5)
     
    @@ -265,6 +279,7 @@ def test_spike_generator_precise_times_different_resolution(h, expected_spike_ti
         """
         Test the precise times of spikes for different resolutions.
         """
    +
         nest.ResetKernel()
         nest.resolution = h
     
    diff --git a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    index e5a4393bdb..dcb3b9192e 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    @@ -38,6 +38,7 @@
     """
     
     import nest
    +import numpy.testing as nptest
     import pytest
     
     pytestmark = pytest.mark.skipif_missing_threads
    @@ -53,22 +54,10 @@ def has_hpc_suffix(syn_model):
         return syn_model.endswith("_hpc")
     
     
    -def synapse_filter(syn):
    -    try:
    -        n = nest.Create("iaf_psc_alpha")
    -        nest.Connect(n, n, syn_spec={"synapse_model": syn})
    -        nest.Simulate(10)
    -    except Exception:
    -        return False
    -    return True
    -
    -
     def get_hpc_models():
    -    all_syn_models = nest.synapse_models
    +    ignore_list = ["clopath_synapse_hpc", "stdp_dopamine_synapse_hpc", "urbanczik_synapse_hpc"]
     
    -    hpc_models = [model for model in all_syn_models if has_hpc_suffix(model)]
    -    hpc_counterpart = [model for model in hpc_models if model[: len(model) - 4] in all_syn_models]
    -    hpc_models = [model for model in all_syn_models if synapse_filter(hpc_counterpart)]
    +    hpc_models = [model for model in nest.synapse_models if has_hpc_suffix(model) and model not in ignore_list]
     
         return hpc_models
     
    @@ -137,32 +126,32 @@ def test_hpc_synapse(syn):
         net_without_hpc_suffix = prepare_neuron(synapse_without_hpc_suffix)
         net_with_hpc_suffix = prepare_neuron(syn)
     
    -    assert net_with_hpc_suffix == net_without_hpc_suffix
    +    nptest.assert_equal(net_with_hpc_suffix, net_without_hpc_suffix)
     
     
     def test_static_synapse():
         using_static_synapse = prepare_neurons("static_synapse")
         using_static_synapse_hpc = prepare_neurons("static_synapse_hpc")
     
    -    assert using_static_synapse_hpc == using_static_synapse
    +    nptest.assert_equal(using_static_synapse_hpc, using_static_synapse)
     
     
     def test_frozen_disconnected_neuron_before_connect():
         using_static_synapse = prepare_frozen_neuron("static_synapse")
         using_static_synapse_hpc = prepare_frozen_neuron("static_synapse_hpc")
     
    -    assert using_static_synapse_hpc == using_static_synapse
    +    nptest.assert_equal(using_static_synapse_hpc, using_static_synapse)
     
     
     def test_frozen_connected_neuron_before_connect():
         using_static_synapse = prepare_frozen_neuron("static_synapse", 0)
         using_static_synapse_hpc = prepare_frozen_neuron("static_synapse_hpc", 0)
     
    -    assert using_static_synapse_hpc == using_static_synapse
    +    nptest.assert_equal(using_static_synapse_hpc, using_static_synapse)
     
     
     def test_frozen_connected_neuron_after_connect():
         using_static_synapse = prepare_frozen_neuron("static_synapse", 0, True)
         using_static_synapse_hpc = prepare_frozen_neuron("static_synapse_hpc", 0, True)
     
    -    assert using_static_synapse_hpc == using_static_synapse
    +    nptest.assert_equal(using_static_synapse_hpc, using_static_synapse)
    diff --git a/testsuite/pytests/test_spatial/test_basics.py b/testsuite/pytests/test_spatial/test_basics.py
    index b9af3a2db9..7c8e928d57 100644
    --- a/testsuite/pytests/test_spatial/test_basics.py
    +++ b/testsuite/pytests/test_spatial/test_basics.py
    @@ -26,13 +26,8 @@
     import unittest
     
     import nest
    -
    -try:
    -    import numpy as np
    -
    -    HAVE_NUMPY = True
    -except ImportError:
    -    HAVE_NUMPY = False
    +import numpy as np
    +import numpy.testing as nptest
     
     
     class BasicsTestCase(unittest.TestCase):
    @@ -80,7 +75,6 @@ def test_GetPosition(self):
             nodepos_exp = nest.GetPosition(layer[:2])
             self.assertEqual(nodepos_exp, [pos[0], pos[1]])
     
    -    @unittest.skipIf(not HAVE_NUMPY, "NumPy package is not available")
         def test_Displacement(self):
             """Interface check on displacement calculations."""
             lshape = [5, 4]
    @@ -153,7 +147,6 @@ def test_Displacement(self):
             self.assertEqual(len(d), len(layer))
             self.assertTrue(all(len(dd) == 2 for dd in d))
     
    -    @unittest.skipIf(not HAVE_NUMPY, "NumPy package is not available")
         def test_Distance(self):
             """Interface check on distance calculations."""
             lshape = [5, 4]
    @@ -242,7 +235,6 @@ def test_Distance(self):
             self.assertTrue(all([isinstance(dd, float) for dd in d]))
             self.assertTrue(all([dd >= 0.0 for dd in d]))
     
    -    @unittest.skipIf(not HAVE_NUMPY, "NumPy package is not available")
         def test_FindElements(self):
             """Interface and result check for finding nearest element.
             This function is Py only, so we also need to check results."""
    @@ -276,7 +268,6 @@ def test_FindElements(self):
             self.assertEqual(n[0], [layer[4]])
             self.assertEqual(n[1], [layer[3], layer[4], layer[6], layer[7]])
     
    -    @unittest.skipIf(not HAVE_NUMPY, "NumPy package is not available")
         def test_GetCenterElement(self):
             """Interface and result check for finding center element.
             This function is Py only, so we also need to check results."""
    @@ -379,7 +370,6 @@ def test_GetSourceNodes(self):
             self.assertEqual(len(s), 1)
             self.assertEqual(s[0], nest.NodeCollection([5, 6, 8, 9]))
     
    -    @unittest.skipIf(not HAVE_NUMPY, "NumPy package is not available")
         def test_GetTargetPositions(self):
             """Test that GetTargetPosition works as expected"""
     
    @@ -446,7 +436,6 @@ def test_GetTargetPositions(self):
                 self.assertAlmostEqual(positions[indx][0], p[0][indx][0])
                 self.assertAlmostEqual(positions[indx][1], p[0][indx][1])
     
    -    @unittest.skipIf(not HAVE_NUMPY, "NumPy package is not available")
         def test_GetSourcePositions(self):
             """Test that GetSourcePosition works as expected"""
     
    @@ -519,8 +508,8 @@ def testSlicedPositions(self):
             positions = nest.spatial.free(nest.random.uniform(min=-1, max=1), num_dimensions=2)
             nodes = nest.Create("iaf_psc_alpha", 10, positions=positions)
             all_positions = sum([list(nodes[i].spatial["positions"]) for i in range(len(nodes))], start=[])
    -        self.assertEqual(all_positions, nodes.spatial["positions"])
    -        self.assertEqual(nodes[::2].spatial["positions"], nodes.spatial["positions"][::2])
    +        nptest.assert_array_equal(all_positions, nodes.spatial["positions"])
    +        nptest.assert_array_equal(nodes[::2].spatial["positions"], nodes.spatial["positions"][::2])
     
     
     def suite():
    diff --git a/testsuite/pytests/test_spatial/test_connect_layers.py b/testsuite/pytests/test_spatial/test_connect_layers.py
    index 9f91b6e1b5..53caecf3fa 100644
    --- a/testsuite/pytests/test_spatial/test_connect_layers.py
    +++ b/testsuite/pytests/test_spatial/test_connect_layers.py
    @@ -317,7 +317,7 @@ def test_connect_layers_weights(self):
             syn_spec = {"weight": nest.random.uniform(min=0.5)}
             nest.Connect(self.layer, self.layer, conn_spec, syn_spec)
             conns = nest.GetConnections()
    -        conn_weights = conns.weight
    +        conn_weights = np.array(conns.weight)
             self.assertTrue(len(np.unique(conn_weights)) > 1)
             self.assertTrue((conn_weights >= 0.5).all())
             self.assertTrue((conn_weights <= 1.0).all())
    @@ -331,7 +331,7 @@ def test_connect_layers_delays(self):
             syn_spec = {"delay": nest.random.uniform(min=0.5)}
             nest.Connect(self.layer, self.layer, conn_spec, syn_spec)
             conns = nest.GetConnections()
    -        conn_delays = conns.delay
    +        conn_delays = np.array(conns.delay)
             self.assertTrue(len(np.unique(conn_delays)) > 1)
             self.assertTrue((conn_delays >= 0.5).all())
             self.assertTrue((conn_delays <= 1.0).all())
    diff --git a/testsuite/pytests/test_spatial/test_connect_sliced.py b/testsuite/pytests/test_spatial/test_connect_sliced.py
    index ebd9877f7c..35efd2be80 100644
    --- a/testsuite/pytests/test_spatial/test_connect_sliced.py
    +++ b/testsuite/pytests/test_spatial/test_connect_sliced.py
    @@ -26,7 +26,7 @@
     
     import nest
     import numpy as np
    -import numpy.testing as np_testing
    +import numpy.testing as nptest
     
     nest.set_verbosity(nest.verbosity.M_ERROR)
     
    @@ -52,7 +52,7 @@ def _assert_histogram(self, sources_or_targets, ref):
             """Create a histogram of input data and assert it against reference values"""
             hist = np.histogram(sources_or_targets, bins=self.N, range=(1, self.N + 1))
             counts, _ = hist
    -        np_testing.assert_array_equal(counts, ref)
    +        nptest.assert_array_equal(counts, ref)
     
         def test_connect_sliced_spatial_on_target_free(self):
             """Connect sliced free spatial source population"""
    @@ -141,7 +141,7 @@ def test_sliced_spatial_inheritance(self):
                     for attr in ["edge_wrap", "extent"]:
                         spatial_attr = nodes.spatial[attr]
                         sliced_spatial_attr = nodes_sliced.spatial[attr]
    -                    self.assertEqual(spatial_attr, sliced_spatial_attr, 'with attr="{}"'.format(attr))
    +                    nptest.assert_equal(spatial_attr, sliced_spatial_attr)
     
         def test_connect_sliced_spatial_range(self):
             """Connect spatial population sliced with range"""
    diff --git a/testsuite/pytests/test_spatial/test_create_spatial.py b/testsuite/pytests/test_spatial/test_create_spatial.py
    index 453271a2d6..f1a11a68c7 100644
    --- a/testsuite/pytests/test_spatial/test_create_spatial.py
    +++ b/testsuite/pytests/test_spatial/test_create_spatial.py
    @@ -26,6 +26,8 @@
     import unittest
     
     import nest
    +import numpy as np
    +import numpy.testing as nptest
     
     
     class CreateLayer(unittest.TestCase):
    @@ -44,13 +46,13 @@ def test_Create_3D_grid(self):
             layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[3, 4, 5]))
     
             self.assertEqual(len(layer), 60)
    -        self.assertEqual(layer.spatial["shape"], (3, 4, 5))
    +        nptest.assert_array_equal(layer.spatial["shape"], [3, 4, 5])
     
         def test_Create_grid_with_extent(self):
             """Test Create simple grid with extent."""
             layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[3, 3], extent=[2.0, 2.0]))
     
    -        self.assertEqual(layer.spatial["extent"], (2.0, 2.0))
    +        nptest.assert_array_equal(layer.spatial["extent"], (2.0, 2.0))
     
         def test_Create_grid_with_nodeParams(self):
             """Test Create grid layer with node parameters."""
    @@ -60,17 +62,17 @@ def test_Create_grid_with_nodeParams(self):
                 params={"V_m": nest.random.uniform(), "C_m": 200.0},
             )
     
    -        self.assertEqual(layer.get("C_m"), (200.0,) * len(layer))
    +        nptest.assert_array_equal(layer.get("C_m"), [200.0] * len(layer))
             self.assertEqual(len(layer.get("V_m")), len(layer))
             self.assertGreaterEqual(min(layer.get("V_m")), 0.0)
     
         def test_Create_free_layer(self):
             """Test Create simple free layer."""
    -        pos = ((1.0, 1.0), (2.0, 2.0), (3.0, 3.0))
    +        pos = [(1.0, 1.0), (2.0, 2.0), (3.0, 3.0)]
             layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.free(pos))
     
             self.assertEqual(len(layer), 3)
    -        self.assertEqual(layer.spatial["positions"], pos)
    +        nptest.assert_array_equal(layer.spatial["positions"], pos)
             self.assertGreaterEqual(layer.spatial["extent"][0], 2.0)
             self.assertGreaterEqual(layer.spatial["extent"][1], 2.0)
     
    @@ -81,8 +83,8 @@ def test_Create_free_layer_with_extent(self):
             layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.free(pos, extent=extent))
     
             self.assertEqual(len(layer), 3)
    -        self.assertEqual(layer.spatial["positions"], pos)
    -        self.assertEqual(layer.spatial["extent"], extent)
    +        nptest.assert_array_equal(layer.spatial["positions"], pos)
    +        nptest.assert_array_equal(layer.spatial["extent"], extent)
     
         def test_Create_free_layer_with_wrong_extent(self):
             """Test Create free layer with too small extent."""
    @@ -99,7 +101,7 @@ def test_Create_free_layer_from_LognormalParameter(self):
     
             self.assertEqual(len(layer), 33)
             self.assertEqual(len(layer.spatial["positions"]), 33)
    -        self.assertGreaterEqual(min(min(layer.spatial["positions"])), 0)
    +        self.assertGreaterEqual(np.min(layer.spatial["positions"]), 0)
     
         def test_Create_3D_free_layer_from_LognormalParameter(self):
             """Test Create 3D free layer from lognormal parameter."""
    @@ -120,7 +122,7 @@ def test_Create_free_layer_with_nodeParams(self):
                 params={"V_m": nest.random.uniform(), "C_m": 200.0},
             )
     
    -        self.assertEqual(layer.get("C_m"), (200.0,) * len(layer))
    +        nptest.assert_array_equal(layer.get("C_m"), [200.0] * len(layer))
             self.assertEqual(len(layer.get("V_m")), 33)
             self.assertLessEqual(max(layer.get("V_m")), 1.0)
             self.assertEqual(len(layer.spatial["positions"][0]), 3)
    @@ -131,7 +133,7 @@ def test_Create_free_layer_from_uniform_Parameter(self):
     
             self.assertEqual(len(layer), 6)
             self.assertEqual(len(layer.spatial["positions"]), 6)
    -        self.assertGreaterEqual(min(min(layer.spatial["positions"])), 0)
    +        self.assertGreaterEqual(np.min(layer.spatial["positions"]), 0)
     
         def test_Create_3D_free_layer_from_uniformParameter(self):
             """Test Create 3D free layer from uniform parameter."""
    @@ -203,7 +205,7 @@ def test_Create_2D_grid_params_list(self):
             positions = nest.spatial.grid(shape=[3, 1])
             layer = nest.Create("iaf_psc_alpha", positions=positions, params=params)
     
    -        self.assertEqual(list(layer.V_m), params["V_m"])
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
     
         def test_Create_2D_grid_params_tuple(self):
             """Test Create 2D grid layer with node params as tuple."""
    @@ -212,7 +214,7 @@ def test_Create_2D_grid_params_tuple(self):
             positions = nest.spatial.grid(shape=[3, 1])
             layer = nest.Create("iaf_psc_alpha", positions=positions, params=params)
     
    -        self.assertEqual(layer.V_m, params["V_m"])
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
     
         def test_Create_2D_grid_params_parameter(self):
             """Test Create 2D grid layer with node params as Parameter."""
    @@ -234,7 +236,7 @@ def test_Create_3D_grid_params_list(self):
             positions = nest.spatial.grid(shape=[3, 1, 2])
             layer = nest.Create("iaf_psc_alpha", positions=positions, params=params)
     
    -        self.assertEqual(list(layer.V_m), params["V_m"])
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
     
         def test_Create_3D_grid_params_tuple(self):
             """Test Create 3D grid layer with node params as tuple."""
    @@ -243,7 +245,7 @@ def test_Create_3D_grid_params_tuple(self):
             positions = nest.spatial.grid(shape=[3, 1, 2])
             layer = nest.Create("iaf_psc_alpha", positions=positions, params=params)
     
    -        self.assertEqual(layer.V_m, params["V_m"])
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
     
         def test_Create_3D_grid_params_parameter(self):
             """Test Create 3D grid layer with node params as Parameter."""
    @@ -265,7 +267,7 @@ def test_Create_2D_free_params_list(self):
             positions = nest.spatial.free(nest.random.uniform(-1, 1), num_dimensions=2)
             layer = nest.Create("iaf_psc_alpha", n=5, positions=positions, params=params)
     
    -        self.assertEqual(list(layer.V_m), params["V_m"])
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
     
         def test_Create_2D_free_params_tuple(self):
             """Test Create 2D free layer with node params as tuple."""
    @@ -274,7 +276,7 @@ def test_Create_2D_free_params_tuple(self):
             positions = nest.spatial.free(nest.random.uniform(-1, 1), num_dimensions=2)
             layer = nest.Create("iaf_psc_alpha", n=5, positions=positions, params=params)
     
    -        self.assertEqual(layer.V_m, params["V_m"])
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
     
         def test_Create_2D_free_params_parameter(self):
             """Test Create 2D free layer with node params as Parameter."""
    @@ -296,7 +298,7 @@ def test_Create_3D_free_params_list(self):
             positions = nest.spatial.free(nest.random.uniform(-1, 1), num_dimensions=3)
             layer = nest.Create("iaf_psc_alpha", n=7, positions=positions, params=params)
     
    -        self.assertEqual(list(layer.V_m), params["V_m"])
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
     
         def test_Create_3D_free_params_tuple(self):
             """Test Create 3D free layer with node params as tuple."""
    @@ -305,7 +307,7 @@ def test_Create_3D_free_params_tuple(self):
             positions = nest.spatial.free(nest.random.uniform(-1, 1), num_dimensions=3)
             layer = nest.Create("iaf_psc_alpha", n=7, positions=positions, params=params)
     
    -        self.assertEqual(layer.V_m, params["V_m"])
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
     
         def test_Create_3D_free_params_parameter(self):
             """Test Create 3D free layer with node params as Parameter."""
    @@ -327,8 +329,8 @@ def test_Create_2D_grid_params_multiple(self):
             positions = nest.spatial.grid(shape=[3, 1])
             layer = nest.Create("iaf_psc_alpha", positions=positions, params=params)
     
    -        self.assertEqual(list(layer.V_m), params["V_m"])
    -        self.assertEqual(list(layer.C_m), [params["C_m"]] * len(layer))
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
    +        nptest.assert_array_equal(layer.C_m, [params["C_m"]] * len(layer))
             for tau_syn_ex in layer.tau_syn_ex:
                 self.assertGreaterEqual(tau_syn_ex, 1.5)
                 self.assertLessEqual(tau_syn_ex, 2.5)
    @@ -340,8 +342,8 @@ def test_Create_2D_free_params_multiple(self):
             positions = nest.spatial.free(nest.random.normal(0, 0.5), num_dimensions=2)
             layer = nest.Create("iaf_psc_alpha", n=5, positions=positions, params=params)
     
    -        self.assertEqual(list(layer.V_m), params["V_m"])
    -        self.assertEqual(list(layer.C_m), [params["C_m"]] * len(layer))
    +        nptest.assert_array_equal(layer.V_m, params["V_m"])
    +        nptest.assert_array_equal(layer.C_m, [params["C_m"]] * len(layer))
             for tau_syn_ex in layer.tau_syn_ex:
                 self.assertGreaterEqual(tau_syn_ex, 1.5)
                 self.assertLessEqual(tau_syn_ex, 2.5)
    diff --git a/testsuite/pytests/test_spatial/test_layer_get_set.py b/testsuite/pytests/test_spatial/test_layer_get_set.py
    index 9f913e7a9e..5cd59a9dc3 100644
    --- a/testsuite/pytests/test_spatial/test_layer_get_set.py
    +++ b/testsuite/pytests/test_spatial/test_layer_get_set.py
    @@ -20,106 +20,134 @@
     # along with NEST.  If not, see <http://www.gnu.org/licenses/>.
     
     """
    -Tests for get and set calls for layer NodeCollections.
    +Tests for ``get`` and ``set`` functions for spatial ``NodeCollection``.
     """
     
    -import unittest
    -
     import nest
    +import numpy.testing as nptest
    +import pytest
    +
    +
    +@pytest.fixture(autouse=True)
    +def reset():
    +    nest.ResetKernel()
    +
    +
    +def test_layer_set_on_instance():
    +    """Test ``set`` on spatial ``NodeCollection`` instance."""
    +
    +    layer_shape = [3, 3]
    +    layer = nest.Create(
    +        "iaf_psc_alpha",
    +        positions=nest.spatial.grid(
    +            shape=layer_shape,
    +            extent=[2.0, 2.0],
    +            edge_wrap=True,
    +        ),
    +    )
     
    +    layer.set(V_m=-50.0)
    +    expected_V_m = [-50.0] * layer_shape[0] * layer_shape[1]
    +    nptest.assert_array_equal(layer.V_m, expected_V_m)
     
    -class GetSetTestCase(unittest.TestCase):
    -    def setUp(self):
    -        nest.ResetKernel()
    -
    -    def test_LayerSetOnInstance(self):
    -        """Test Set on layer NodeCollection."""
    -
    -        layer_shape = [3, 3]
    -        layer = nest.Create(
    -            "iaf_psc_alpha", positions=nest.spatial.grid(shape=layer_shape, extent=[2.0, 2.0], edge_wrap=True)
    -        )
    -
    -        with self.assertRaises(nest.NESTErrors.UnaccessedDictionaryEntry):
    -            layer.center = [1.0, 1.0]
    -
    -        layer.V_m = -50.0
    -        self.assertEqual(layer.V_m, (-50.0,) * layer_shape[0] * layer_shape[1])
    -
    -    def test_LayerSpatial(self):
    -        """Test spatial parameter on layer NodeCollection."""
     
    -        layer = nest.Create(
    -            "iaf_psc_alpha", positions=nest.spatial.grid(shape=[3, 3], extent=[2.0, 2.0], edge_wrap=True)
    -        )
    +def test_layer_set_attribute_on_instance():
    +    """Test ``set`` on spatial ``NodeCollection`` instance."""
     
    -        center = layer.spatial["center"]
    -        shape_x = layer.spatial["shape"][0]
    -        edge_wrap = layer.spatial["edge_wrap"]
    -        extent = layer.spatial["extent"]
    -        network_size = layer.spatial["network_size"]
    -        shape_y = layer.spatial["shape"][1]
    +    layer_shape = [3, 3]
    +    layer = nest.Create(
    +        "iaf_psc_alpha",
    +        positions=nest.spatial.grid(
    +            shape=layer_shape,
    +            extent=[2.0, 2.0],
    +            edge_wrap=True,
    +        ),
    +    )
     
    -        self.assertEqual(center, [0.0, 0.0])
    -        self.assertEqual(shape_x, 3)
    -        self.assertTrue(edge_wrap)
    -        self.assertEqual(extent, (2.0, 2.0))
    -        self.assertEqual(network_size, 9)
    -        self.assertEqual(shape_y, 3)
    +    layer.V_m = -50.0
    +    expected_V_m = [-50.0] * layer_shape[0] * layer_shape[1]
    +    nptest.assert_array_equal(layer.V_m, expected_V_m)
     
    -        self.assertEqual(layer.get("V_m"), (-70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0, -70.0))
     
    -        # Test get all values
    -        all_values = layer.spatial
    -        self.assertEqual(len(all_values.keys()), 5)
    -        self.assertEqual(all_values["center"], (0.0, 0.0))
    -        self.assertEqual(all_values["shape"][0], 3)
    -        self.assertTrue(all_values["edge_wrap"])
    -        self.assertEqual(all_values["extent"], (2.0, 2.0))
    -        self.assertEqual(all_values["network_size"], 9)
    -        self.assertEqual(all_values["shape"][1], 3)
    +def test_layer_set_nonexistent_param_raises():
    +    """Test that ``set`` with non-existent parameter raises exception."""
     
    -    def test_SingleElementLayerSpatial(self):
    -        """Test spatial parameter on single element layer."""
    +    layer = nest.Create(
    +        "iaf_psc_alpha",
    +        positions=nest.spatial.grid(
    +            shape=[3, 3],
    +            extent=[2.0, 2.0],
    +            edge_wrap=True,
    +        ),
    +    )
     
    -        layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[1, 1]))
    +    with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
    +        layer.set(center=[1.0, 1.0])
     
    -        self.assertEqual(len(layer), 1)
    -        center = layer.spatial["center"]
    -        columns = layer.spatial["shape"][0]
    -        all_values = layer.spatial
    +    with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
    +        layer.center = [1.0, 1.0]
     
    -        self.assertEqual(center, (0.0, 0.0))
    -        self.assertEqual(columns, 1)
    -        self.assertEqual(all_values["center"], (0.0, 0.0))
     
    -    def test_LayerGet(self):
    -        """Test get function on layer NodeCollection"""
    +def test_layer_get_node_param():
    +    """Test ``get`` on layered ``NodeCollection`` node parameter."""
    +    layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[2, 2]))
     
    -        layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[2, 2]))
    +    nptest.assert_equal(layer.get("V_m"), -70.0)
     
    -        self.assertEqual(layer.get("V_m"), (-70.0, -70.0, -70.0, -70.0))
     
    -    def test_LayerSet(self):
    -        """Test set function on layer NodeCollection."""
    +@pytest.mark.parametrize(
    +    "spatial_param, expected_value",
    +    [
    +        ("center", [0.0, 0.0]),
    +        ("shape", [3, 3]),
    +        ("edge_wrap", True),
    +        ("extent", [2.0, 2.0]),
    +        ("network_size", 9),
    +    ],
    +)
    +def test_layer_get_spatial_params(spatial_param, expected_value):
    +    """Test getter on layered ``NodeCollection`` spatial parameters."""
     
    -        layer = nest.Create(
    -            "iaf_psc_alpha", positions=nest.spatial.grid(shape=[3, 3], extent=[2.0, 2.0], edge_wrap=True)
    -        )
    +    layer = nest.Create(
    +        "iaf_psc_alpha",
    +        positions=nest.spatial.grid(
    +            shape=[3, 3],
    +            extent=[2.0, 2.0],
    +            edge_wrap=True,
    +        ),
    +    )
    +    nptest.assert_equal(layer.spatial[spatial_param], expected_value)
     
    -        with self.assertRaises(nest.NESTErrors.UnaccessedDictionaryEntry):
    -            layer.set({"center": [1.0, 1.0]})
     
    -        layer.set(V_m=-50.0)
    +def test_layer_get_all_spatial_params_at_once():
    +    """Test getting all spatial parameters on layered ``NodeCollection`` at once."""
     
    -        self.assertEqual(layer.get("V_m"), (-50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0, -50.0))
    +    layer = nest.Create(
    +        "iaf_psc_alpha",
    +        positions=nest.spatial.grid(
    +            shape=[3, 3],
    +            extent=[2.0, 2.0],
    +            edge_wrap=True,
    +        ),
    +    )
     
    +    all_spatial_params_dict = layer.spatial
    +    expected_keys = ["center", "edge_wrap", "extent", "network_size", "shape"]
    +
    +    assert set(all_spatial_params_dict.keys()) == set(expected_keys)
    +
    +
    +def test_spatial_param_on_single_element_layer():
    +    """Test spatial parameter on single element layer."""
    +
    +    layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.grid(shape=[1, 1]))
     
    -def suite():
    -    suite = unittest.makeSuite(GetSetTestCase, "test")
    -    return suite
    +    assert len(layer) == 1
     
    +    center = layer.spatial["center"]
    +    columns = layer.spatial["shape"][0]
    +    all_spatial_params = layer.spatial
     
    -if __name__ == "__main__":
    -    runner = unittest.TextTestRunner(verbosity=2)
    -    runner.run(suite())
    +    nptest.assert_equal(center, [0.0, 0.0])
    +    assert columns == 1
    +    nptest.assert_equal(all_spatial_params["center"], [0.0, 0.0])
    
    From 5deeeeee979e4dd88f8f6f8d05ac01ed9babf8cb Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 28 Sep 2023 02:27:42 +0200
    Subject: [PATCH 266/375] Refactor and convert unittests from
     test_nodeParametrization.py to pytest
    
    ---
     testsuite/pytests/test_create.py              | 48 +++++++++-
     testsuite/pytests/test_nodeParametrization.py | 93 ++-----------------
     testsuite/pytests/test_node_collection_set.py | 80 ++++++++++++++--
     3 files changed, 125 insertions(+), 96 deletions(-)
    
    diff --git a/testsuite/pytests/test_create.py b/testsuite/pytests/test_create.py
    index 7d162fd537..04d4f08b44 100644
    --- a/testsuite/pytests/test_create.py
    +++ b/testsuite/pytests/test_create.py
    @@ -26,6 +26,7 @@
     import warnings
     
     import nest
    +import numpy as np
     import numpy.testing as nptest
     import pytest
     
    @@ -94,7 +95,52 @@ def test_create_with_params_dicts():
         V_m = [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0]
         nodes = nest.Create("iaf_psc_alpha", num_nodes, [{"V_m": v} for v in V_m])
     
    -    nptest.assert_equal(nodes.V_m, V_m)
    +    nptest.assert_array_equal(nodes.V_m, V_m)
    +
    +
    +def test_create_with_single_params_list():
    +    """Test ``Create`` with single parameter list."""
    +
    +    Vm_ref = [-11.0, -12.0, -13.0]
    +    nodes = nest.Create("iaf_psc_alpha", 3, {"V_m": Vm_ref})
    +
    +    nptest.assert_array_equal(nodes.V_m, Vm_ref)
    +
    +
    +def test_create_with_multiple_params_lists():
    +    """Test ``Create`` with multiple parameter lists."""
    +
    +    Vm_ref = [-22.0, -33.0, -44.0]
    +    Cm_ref = 124.0
    +    Vmin_ref = [-1.0, -2.0, -3.0]
    +    params = {"V_m": Vm_ref, "C_m": Cm_ref, "V_min": Vmin_ref}
    +    nodes = nest.Create("iaf_psc_alpha", 3, params)
    +
    +    nptest.assert_array_equal(nodes.V_m, Vm_ref)
    +    nptest.assert_array_equal(nodes.C_m, Cm_ref)
    +    nptest.assert_array_equal(nodes.V_min, Vmin_ref)
    +
    +
    +def test_create_with_params_numpy():
    +    """Test ``Create`` with NumPy array as parameter."""
    +
    +    Vm_ref = np.array([-80.0, -90.0, -100.0])
    +    nodes = nest.Create("iaf_psc_alpha", 3, {"V_m": Vm_ref})
    +
    +    nptest.assert_array_equal(nodes.V_m, Vm_ref)
    +
    +
    +def test_create_with_params_list_that_should_not_be_split():
    +    """Test ``Create`` with list that should not be split."""
    +
    +    spikes_ref = [10.0, 20.0, 30.0]
    +    sgens = nest.Create("spike_generator", 2, {"spike_times": spikes_ref})
    +
    +    spikes_sg1 = sgens[0].spike_times
    +    spikes_sg2 = sgens[1].spike_times
    +
    +    nptest.assert_array_equal(spikes_sg1, spikes_ref)
    +    nptest.assert_array_equal(spikes_sg2, spikes_ref)
     
     
     @pytest.mark.parametrize(
    diff --git a/testsuite/pytests/test_nodeParametrization.py b/testsuite/pytests/test_nodeParametrization.py
    index 3ffce8ac5c..05b09a9bb3 100644
    --- a/testsuite/pytests/test_nodeParametrization.py
    +++ b/testsuite/pytests/test_nodeParametrization.py
    @@ -28,49 +28,13 @@
     
     import nest
     import numpy as np
    +import numpy.testing as nptest
     
     
     class TestNodeParametrization(unittest.TestCase):
         def setUp(self):
             nest.ResetKernel()
     
    -    def test_create_with_list(self):
    -        """Test Create with list as parameter"""
    -        Vm_ref = [-11.0, -12.0, -13.0]
    -        nodes = nest.Create("iaf_psc_alpha", 3, {"V_m": Vm_ref})
    -
    -        self.assertAlmostEqual(list(nodes.V_m), Vm_ref)
    -
    -    def test_create_with_several_lists(self):
    -        """Test Create with several lists as parameters"""
    -        Vm_ref = [-22.0, -33.0, -44.0]
    -        Cm_ref = 124.0
    -        Vmin_ref = [-1.0, -2.0, -3.0]
    -
    -        params = {"V_m": Vm_ref, "C_m": Cm_ref, "V_min": Vmin_ref}
    -        nodes = nest.Create("iaf_psc_alpha", 3, params)
    -
    -        self.assertAlmostEqual(list(nodes.V_m), Vm_ref)
    -        self.assertAlmostEqual(list(nodes.C_m), [Cm_ref, Cm_ref, Cm_ref])
    -        self.assertAlmostEqual(list(nodes.V_min), Vmin_ref)
    -
    -    def test_create_with_spike_generator(self):
    -        """Test Create with list that should not be split"""
    -        spike_times = [10.0, 20.0, 30.0]
    -        sg = nest.Create("spike_generator", 2, {"spike_times": spike_times})
    -
    -        st = sg.spike_times
    -
    -        self.assertAlmostEqual(list(st[0]), spike_times)
    -        self.assertAlmostEqual(list(st[1]), spike_times)
    -
    -    def test_create_with_numpy(self):
    -        """Test Create with numpy array as parameter"""
    -        Vm_ref = np.array([-80.0, -90.0, -100.0])
    -        nodes = nest.Create("iaf_psc_alpha", 3, {"V_m": Vm_ref})
    -
    -        self.assertAlmostEqual(nodes.V_m, Vm_ref)
    -
         def test_create_uniform(self):
             """Test Create with random.uniform as parameter"""
             min_val = -75.0
    @@ -127,51 +91,6 @@ def test_create_adding(self):
                 self.assertGreaterEqual(vm, -45.0)
                 self.assertLessEqual(vm, -25.0)
     
    -    def test_set_with_dict_with_single_list(self):
    -        """Test set with dict with list"""
    -        nodes = nest.Create("iaf_psc_alpha", 3)
    -        Vm_ref = [-30.0, -40.0, -50.0]
    -        nodes.set({"V_m": Vm_ref})
    -
    -        self.assertAlmostEqual(list(nodes.get("V_m")), Vm_ref)
    -
    -    def test_set_with_dict_with_lists(self):
    -        """Test set with dict with lists"""
    -        nodes = nest.Create("iaf_psc_alpha", 3)
    -        Vm_ref = [-11.0, -12.0, -13.0]
    -        Cm_ref = 177.0
    -        tau_minus_ref = [22.0, 24.0, 26.0]
    -        nodes.set({"V_m": Vm_ref, "C_m": Cm_ref, "tau_minus": tau_minus_ref})
    -
    -        self.assertAlmostEqual(list(nodes.get("V_m")), Vm_ref)
    -        self.assertAlmostEqual(nodes.get("C_m"), (Cm_ref, Cm_ref, Cm_ref))
    -        self.assertAlmostEqual(list(nodes.get("tau_minus")), tau_minus_ref)
    -
    -    def test_set_with_dict_with_single_element_lists(self):
    -        """Test set with dict with single element lists"""
    -        node = nest.Create("iaf_psc_alpha")
    -        Vm_ref = -13.0
    -        Cm_ref = 222.0
    -        node.set({"V_m": [Vm_ref], "C_m": [Cm_ref]})
    -
    -        self.assertAlmostEqual(node.get("V_m"), Vm_ref)
    -        self.assertAlmostEqual(node.get("C_m"), Cm_ref)
    -
    -    def test_set_with_dict_with_list_with_bools(self):
    -        """Test set with dict with list with bool"""
    -        nodes = nest.Create("spike_recorder", 3)
    -        withport_ref = (True, False, True)
    -        nodes.set({"time_in_steps": [True, False, True]})
    -
    -        self.assertEqual(nodes.get("time_in_steps"), withport_ref)
    -
    -    def test_set_on_spike_generator(self):
    -        """Test set with dict with list that is not to be split"""
    -        sg = nest.Create("spike_generator")
    -        sg.set({"spike_times": [1.0, 2.0, 3.0]})
    -
    -        self.assertEqual(list(sg.get("spike_times")), [1.0, 2.0, 3.0])
    -
         def test_set_with_random(self):
             """Test set with dict with random parameter"""
             nodes = nest.Create("iaf_psc_alpha", 3)
    @@ -242,19 +161,19 @@ def test_node_pos_parameter(self):
             layer.set({"C_m": nest.spatial.pos.z})
     
             status = layer.get()
    -        self.assertAlmostEqual(status["V_m"], tuple(np.linspace(0, 0.5, 5)))
    -        self.assertAlmostEqual(status["E_L"], tuple(np.linspace(0, 0.5 * 0.5, 5)))
    -        self.assertAlmostEqual(status["C_m"], tuple([0.1 + 0.2 * x for x in np.linspace(0, 0.5, 5)]))
    +        nptest.assert_array_equal(status["V_m"], np.linspace(0, 0.5, 5))
    +        nptest.assert_array_equal(status["E_L"], np.linspace(0, 0.5 * 0.5, 5))
    +        nptest.assert_array_equal(status["C_m"], [0.1 + 0.2 * x for x in np.linspace(0, 0.5, 5)])
     
         def test_node_pos_parameter_wrong_dimension(self):
             """Test node-position parameter with wrong dimension"""
             positions = [[x, 0.5 * x] for x in np.linspace(0, 0.5, 5)]
             layer = nest.Create("iaf_psc_alpha", positions=nest.spatial.free(positions))
     
    -        with self.assertRaises(nest.NESTError):
    +        with self.assertRaises(nest.NESTErrors.BadParameterValue):
                 layer.set({"V_m": nest.spatial.pos.n(-1)})
     
    -        with self.assertRaises(ValueError):
    +        with self.assertRaises(nest.NESTErrors.KernelException):
                 layer.set({"V_m": nest.spatial.pos.z})
     
         def test_conn_distance_parameter(self):
    diff --git a/testsuite/pytests/test_node_collection_set.py b/testsuite/pytests/test_node_collection_set.py
    index d6cb73c932..5cb0895411 100644
    --- a/testsuite/pytests/test_node_collection_set.py
    +++ b/testsuite/pytests/test_node_collection_set.py
    @@ -46,9 +46,10 @@ def test_node_collection_set_list_of_single_param():
         """Test ``set`` with list of a single parameter."""
     
         nodes = nest.Create("iaf_psc_alpha", 10)
    -    nodes.set(V_reset=[-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0])
    +    Vreset_ref = [-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0]
    +    nodes.set(V_reset=Vreset_ref)
     
    -    nptest.assert_array_equal(nodes.V_reset, [-85.0, -82.0, -80.0, -77.0, -75.0, -72.0, -70.0, -67.0, -65.0, -62.0])
    +    nptest.assert_array_equal(nodes.V_reset, Vreset_ref)
     
     
     def test_node_collection_set_list_of_single_param_wrong_length_raises():
    @@ -101,6 +102,69 @@ def test_node_collection_set_dict_multiple_params():
         nptest.assert_equal(nodes.tau_minus, 42.0)
     
     
    +def test_node_collection_set_dict_with_lists():
    +    """Test ``set`` with dictionary containing multiple parameter lists."""
    +
    +    nodes = nest.Create("iaf_psc_alpha", 3)
    +    Vm_ref = [-11.0, -12.0, -13.0]
    +    Cm_ref = 177.0
    +    tau_minus_ref = [22.0, 24.0, 26.0]
    +    nodes.set({"V_m": Vm_ref, "C_m": Cm_ref, "tau_minus": tau_minus_ref})
    +
    +    nptest.assert_array_equal(nodes.V_m, Vm_ref)
    +    nptest.assert_equal(nodes.C_m, Cm_ref)
    +    nptest.assert_array_equal(nodes.tau_minus, tau_minus_ref)
    +
    +
    +def test_node_collection_set_dict_with_single_element_lists():
    +    """Test ``set`` with dictionary containing single element parameter lists."""
    +
    +    node = nest.Create("iaf_psc_alpha")
    +    Vm_ref = -13.0
    +    Cm_ref = 222.0
    +    node.set({"V_m": [Vm_ref], "C_m": [Cm_ref]})
    +
    +    assert node.V_m == Vm_ref
    +    assert node.C_m == Cm_ref
    +
    +
    +def test_node_collection_set_dict_bool_list():
    +    """Test ``set`` with dictionary containing single element parameter lists."""
    +
    +    srecs = nest.Create("spike_recorder", 3)
    +    time_in_steps_ref = [True, False, True]
    +    srecs.set({"time_in_steps": time_in_steps_ref})
    +
    +    nptest.assert_array_equal(srecs.time_in_steps, time_in_steps_ref)
    +
    +
    +def test_create_with_params_list_that_should_not_be_split():
    +    """Test ``Create`` with list that should not be split."""
    +
    +    spikes_ref = [1.0, 2.0, 30.0]
    +    sg = nest.Create("spike_generator", 2, {"spike_times": spikes_ref})
    +
    +    spikes_sg1 = sg[0].spike_times
    +    spikes_sg2 = sg[1].spike_times
    +
    +    nptest.assert_array_equal(spikes_sg1, spikes_ref)
    +    nptest.assert_array_equal(spikes_sg2, spikes_ref)
    +
    +
    +def test_set_on_spike_generator():
    +    """Test ``set`` with dict with list that should not be split"""
    +
    +    sgens = nest.Create("spike_generator", 2)
    +    spikes_ref = [1.0, 2.0, 3.0]
    +    sgens.set({"spike_times": spikes_ref})
    +
    +    spikes_sg1 = sgens[0].spike_times
    +    spikes_sg2 = sgens[1].spike_times
    +
    +    nptest.assert_array_equal(spikes_sg1, spikes_ref)
    +    nptest.assert_array_equal(spikes_sg2, spikes_ref)
    +
    +
     def test_node_collection_set_nonexistent_param_raises():
         """Test that ``set`` with dictionary containing non-existent parameter raises exception."""
     
    @@ -126,18 +190,18 @@ def test_sliced_node_collection_set():
         nodes[5:7].set({"t_ref": 4.4, "tau_m": 3.0})
         nodes[2:9:2].set(C_m=111.0)
     
    -    expected_Vm = [-70.0, -70.0, -50.0, -40.0, -30.0, -70.0, -70.0, -70.0, -70.0, -70.0]
    -    expected_Cm = [250.0, 250.0, 111.0, 250.0, 111.0, 250.0, 111.0, 250.0, 111.0, 250.0]
    -    expected_status_dict = {
    +    Vm_ref = [-70.0, -70.0, -50.0, -40.0, -30.0, -70.0, -70.0, -70.0, -70.0, -70.0]
    +    Cm_ref = [250.0, 250.0, 111.0, 250.0, 111.0, 250.0, 111.0, 250.0, 111.0, 250.0]
    +    status_dict_ref = {
             "t_ref": [2.0, 2.0, 2.0, 2.0, 2.0, 4.4, 4.4, 2.0, 2.0, 2.0],
             "tau_m": [10.0, 10.0, 10.0, 10.0, 10.0, 3.00, 3.00, 10.0, 10.0, 10.0],
         }
     
         actual_status_dict = nodes.get(["t_ref", "tau_m"])
     
    -    nptest.assert_array_equal(nodes.V_m, expected_Vm)
    -    nptest.assert_array_equal(nodes.C_m, expected_Cm)
    -    nptest.assert_equal(actual_status_dict, expected_status_dict)
    +    nptest.assert_array_equal(nodes.V_m, Vm_ref)
    +    nptest.assert_array_equal(nodes.C_m, Cm_ref)
    +    nptest.assert_equal(actual_status_dict, status_dict_ref)
     
     
     def test_node_collection_set_attribute():
    
    From 6a207098510a9f99fcdf7bf38b8ea7b1d2c92a4c Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 28 Sep 2023 02:28:08 +0200
    Subject: [PATCH 267/375] Do assertion with numpy.testing
    
    ---
     testsuite/pytests/test_spatial/test_layerNodeCollection.py | 7 +++----
     1 file changed, 3 insertions(+), 4 deletions(-)
    
    diff --git a/testsuite/pytests/test_spatial/test_layerNodeCollection.py b/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    index 691eefb823..e2760684ff 100644
    --- a/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    +++ b/testsuite/pytests/test_spatial/test_layerNodeCollection.py
    @@ -27,6 +27,7 @@
     
     import nest
     import numpy as np
    +import numpy.testing as nptest
     
     
     class TestLayerNodeCollection(unittest.TestCase):
    @@ -84,9 +85,7 @@ def test_extent_center_mask(self):
                     density = num_nodes / (2 * r) ** num_dimensions
                     expected_conns_per_node = density * n_dim_volume
                     expected_total_conns = expected_conns_per_node * num_nodes
    -                print(f"Expecting {expected_total_conns:.0f} connections")
                     nest.Connect(nodes, nodes, {"rule": "pairwise_bernoulli", "p": 1.0, "mask": mask})
    -                print(f'Num. connections: {nest.GetKernelStatus("num_connections")}')
                     rel_diff = abs(nest.GetKernelStatus("num_connections") - expected_total_conns) / expected_total_conns
                     self.assertLess(rel_diff, rel_limit)
     
    @@ -104,8 +103,8 @@ def test_extent_center_single(self):
             nodes = nest.Create("iaf_psc_alpha", positions=free_positions_extent)
     
             spatial = nodes.spatial  # Extract spatial information
    -        self.assertEqual(spatial["center"], spatial["positions"][0])  # Center will be at the position of the only node
    -        self.assertEqual(spatial["extent"], extent)
    +        nptest.assert_array_equal(spatial["center"], spatial["positions"][0])
    +        nptest.assert_array_equal(spatial["extent"], extent)
     
     
     def suite():
    
    From ef9e621f2a504884cb85d3c503f4b0dd433b9767 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 28 Sep 2023 02:28:24 +0200
    Subject: [PATCH 268/375] Register gabor parameter
    
    ---
     nestkernel/nest.cpp | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 33c2652d58..444d448242 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -91,6 +91,7 @@ init_nest( int* argc, char** argv[] )
       register_parameter< Gaussian2DParameter >( "gaussian2d" );
       register_parameter< GammaParameter >( "gamma" );
       register_parameter< ExpDistParameter >( "exp_distribution" );
    +  register_parameter< GaborParameter >( "gabor" );
     
       register_mask< BallMask< 2 > >();
       register_mask< BallMask< 3 > >();
    
    From f173eaa47f27db2ed2a972730dd08fa84e5960b6 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Thu, 28 Sep 2023 02:47:37 +0200
    Subject: [PATCH 269/375] Disable too-many-return-statements pylint check
    
    ---
     .pylintrc | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/.pylintrc b/.pylintrc
    index f346b06044..26bb22110f 100644
    --- a/.pylintrc
    +++ b/.pylintrc
    @@ -6,7 +6,7 @@
     options = unneeded-not, line-too-long, unnecessary-semicolon, trailing-whitespace, missing-final-newline, bad-indentation, multiple-statements, bare-except
     ignore = CVS .git conda env __pycache__ .pytest_cache .mypy_cache
     
    -disable = no-member, redefined-outer-name, invalid-name, consider-using-f-string, wrong-import-order, missing-function-docstring, missing-method-docstring, missing-class-docstring, attribute-defined-outside-init, no-else-return, cell-var-from-loop, import-error, pointless-string-statement, unused-import, redefined-builtin, superfluous-parens, unused-variable, too-many-locals, consider-using-from-import, consider-using-enumerate, no-name-in-module, too-many-arguments, too-many-instance-attributes, import-outside-toplevel, too-few-public-methods, cyclic-import, missing-module-docstring, unidiomatic-typecheck, dangerous-default-value, unused-argument, use-dict-literal, exec-used, no-self-use, too-many-statements, ungrouped-imports, consider-using-sys-exit, too-many-statements, redundant-u-string-prefix, protected-access, consider-using-dict-comprehension, no-else-raise, too-many-nested-blocks, use-a-generator, reimported, undefined-variable, too-many-branches, raise-missing-from, trailing-comma-tuple, unspecified-encoding, consider-using-with, f-string-without-interpolation, broad-except, unnecessary-pass, global-statement, too-many-lines, consider-merging-isinstance, redefined-argument-from-local, global-variable-undefined, use-implicit-booleaness-not-len, inconsistent-return-statements, consider-using-in, inconsistent-return-statements, keyword-arg-before-vararg, consider-using-dict-items, import-self, fixme, c-extension-no-member, too-many-public-methods, consider-iterating-dictionary, consider-using-max-builtin, super-with-arguments, expression-not-assigned, unnecessary-comprehension, no-self-argument, chained-comparison, undefined-loop-variable, empty-docstring, use-maxsplit-arg, pointless-statement, wrong-import-position, redundant-unittest-assert, eval-used, not-callable, invalid-unary-operand-type, consider-using-generator, R0801, unnecessary-dunder-call, logging-fstring-interpolation, consider-using-get, useless-object-inheritance, unrecognized-option, unknown-option-value, useless-option-value
    +disable = no-member, redefined-outer-name, invalid-name, consider-using-f-string, wrong-import-order, missing-function-docstring, missing-method-docstring, missing-class-docstring, attribute-defined-outside-init, no-else-return, cell-var-from-loop, import-error, pointless-string-statement, unused-import, redefined-builtin, superfluous-parens, unused-variable, too-many-locals, consider-using-from-import, consider-using-enumerate, no-name-in-module, too-many-arguments, too-many-instance-attributes, too-many-return-statements, import-outside-toplevel, too-few-public-methods, cyclic-import, missing-module-docstring, unidiomatic-typecheck, dangerous-default-value, unused-argument, use-dict-literal, exec-used, no-self-use, too-many-statements, ungrouped-imports, consider-using-sys-exit, too-many-statements, redundant-u-string-prefix, protected-access, consider-using-dict-comprehension, no-else-raise, too-many-nested-blocks, use-a-generator, reimported, undefined-variable, too-many-branches, raise-missing-from, trailing-comma-tuple, unspecified-encoding, consider-using-with, f-string-without-interpolation, broad-except, unnecessary-pass, global-statement, too-many-lines, consider-merging-isinstance, redefined-argument-from-local, global-variable-undefined, use-implicit-booleaness-not-len, inconsistent-return-statements, consider-using-in, inconsistent-return-statements, keyword-arg-before-vararg, consider-using-dict-items, import-self, fixme, c-extension-no-member, too-many-public-methods, consider-iterating-dictionary, consider-using-max-builtin, super-with-arguments, expression-not-assigned, unnecessary-comprehension, no-self-argument, chained-comparison, undefined-loop-variable, empty-docstring, use-maxsplit-arg, pointless-statement, wrong-import-position, redundant-unittest-assert, eval-used, not-callable, invalid-unary-operand-type, consider-using-generator, R0801, unnecessary-dunder-call, logging-fstring-interpolation, consider-using-get, useless-object-inheritance, unrecognized-option, unknown-option-value, useless-option-value
     
     const-naming-style = snake_case
     method-naming-style = PascalCase
    
    From 6990945ba35370889286eb5ab5c20899bbeee5b4 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Fri, 29 Sep 2023 23:02:40 +0200
    Subject: [PATCH 270/375] Declare sim time as double (not float) to avoid
     rounding error in Time object
    
    ---
     pynest/nestkernel_api.pyx | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 4ae9a6f67a..5d0ae91a63 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -572,7 +572,7 @@ def llapi_set_kernel_status(object params):
         set_kernel_status(params_dict)
     
     
    -def llapi_simulate(float t):
    +def llapi_simulate(double t):
         simulate(t)
     
     
    @@ -580,7 +580,7 @@ def llapi_prepare():
         prepare()
     
     
    -def llapi_run(float t):
    +def llapi_run(double t):
         run(t)
     
     
    
    From 949f42c59a22cde94d9767be37f46fbf9fa1e694 Mon Sep 17 00:00:00 2001
    From: Nicolai Haug <nicolaihaug@yahoo.com>
    Date: Mon, 2 Oct 2023 13:01:24 +0200
    Subject: [PATCH 271/375] Add pynest-ng todo
    
    ---
     nestkernel/parameter.h | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h
    index 421527b374..5ec44e033f 100644
    --- a/nestkernel/parameter.h
    +++ b/nestkernel/parameter.h
    @@ -150,7 +150,7 @@ class ConstantParameter : public Parameter
        */
       ConstantParameter( const dictionary& d )
       {
    -    value_ = d.get< double >( "value" );
    +    value_ = d.get< double >( "value" ); // PYNEST-NG: Must be able to pass value as long and double
         returns_int_only_ = value_is_integer_( value_ );
       }
     
    
    From 3465d68c740c031f4bf66c76cb011ecd248b2017 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 21 Jan 2025 09:58:26 +0100
    Subject: [PATCH 272/375] Fix CMakeLists
    
    ---
     nestkernel/CMakeLists.txt | 19 -------------------
     1 file changed, 19 deletions(-)
    
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index f1728a97ca..d3785dc86c 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -45,10 +45,7 @@ set ( nestkernel_sources
           histentry.h histentry.cpp
           model.h model.cpp
           model_manager.h model_manager_impl.h model_manager.cpp
    -      nest_types.h
           nest_names.h
    -      nest_datums.h nest_datums.cpp
    -      nest_names.cpp nest_names.h
           nest_time.h nest_time.cpp
           nest_timeconverter.h nest_timeconverter.cpp
           modelrange.h modelrange.cpp
    @@ -117,14 +114,9 @@ set ( nestkernel_sources
           position.h
           spatial.h spatial.cpp
           stimulation_backend.h
    -<<<<<<< HEAD
    -)
    -=======
           buffer_resize_log.h buffer_resize_log.cpp
           nest_extension_interface.h
           )
    ->>>>>>> master
    -
     
     if ( HAVE_SIONLIB )
       set( nestkernel_sources
    @@ -141,12 +133,7 @@ if ( HAVE_MPI )
       )
     endif ()
     
    -<<<<<<< HEAD
    -# Prevent problems with Conda path substitution (see #2348)
    -=======
    -
     # Prevent problems with Mamba path substitution (see #2348)
    ->>>>>>> master
     set_source_files_properties( dynamicloader.cpp PROPERTIES COMPILE_OPTIONS "-O0" )
     
     add_library( nestkernel STATIC ${nestkernel_sources} )
    @@ -158,14 +145,8 @@ endif ()
     set_target_properties( nestkernel PROPERTIES POSITION_INDEPENDENT_CODE ON )
     
     target_link_libraries( nestkernel
    -<<<<<<< HEAD
       nestutil models ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES} ${HDF5_LIBRARIES}
     )
    -=======
    -    nestutil sli_lib models
    -    ${LTDL_LIBRARIES} ${MPI_CXX_LIBRARIES} ${MUSIC_LIBRARIES} ${SIONLIB_LIBRARIES} ${LIBNEUROSIM_LIBRARIES} ${HDF5_LIBRARIES}
    -    )
    ->>>>>>> master
     
     target_include_directories( nestkernel PRIVATE
       ${PROJECT_SOURCE_DIR}/thirdparty
    
    From 955acd67ddfbcbf087c6ea9b1c42797928208a49 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 21 Jan 2025 16:00:13 +0100
    Subject: [PATCH 273/375] New pynest branch compiles again after merge of
     master
    
    ---
     models/astrocyte_lr_1994.cpp                  |   4 +-
     models/cm_compartmentcurrents.cpp             |   2 +-
     models/cm_compartmentcurrents.h               |   6 +-
     models/eprop_iaf_adapt_bsshslm_2020.cpp       |  81 ++--
     models/eprop_iaf_adapt_bsshslm_2020.h         |  18 +-
     models/eprop_iaf_bsshslm_2020.cpp             |  67 ++-
     models/eprop_iaf_bsshslm_2020.h               |  18 +-
     ..._learning_signal_connection_bsshslm_2020.h |  14 +-
     models/eprop_readout_bsshslm_2020.cpp         |  51 +-
     models/eprop_readout_bsshslm_2020.h           |  26 +-
     models/eprop_synapse_bsshslm_2020.cpp         |  19 +-
     models/eprop_synapse_bsshslm_2020.h           |  30 +-
     models/glif_cond.cpp                          |   1 -
     models/iaf_bw_2001.cpp                        |  98 ++--
     models/iaf_bw_2001.h                          |  28 +-
     models/iaf_bw_2001_exact.cpp                  |  88 ++--
     models/iaf_bw_2001_exact.h                    |  28 +-
     models/iaf_tum_2000.cpp                       |  87 ++--
     models/iaf_tum_2000.h                         |  18 +-
     models/ignore_and_fire.cpp                    |  19 +-
     models/ignore_and_fire.h                      |  18 +-
     models/jonke_synapse.cpp                      |  32 +-
     models/weight_optimizer.cpp                   |  57 ++-
     models/weight_optimizer.h                     |  20 +-
     models/weight_recorder.cpp                    |   1 -
     nestkernel/CMakeLists.txt                     |   2 +-
     nestkernel/conn_builder.cpp                   |  26 +-
     nestkernel/conn_builder.h                     |   4 +-
     nestkernel/conn_builder_factory.h             |   8 +-
     nestkernel/connection_manager.cpp             |  30 +-
     nestkernel/connection_manager.h               |   8 +-
     nestkernel/connection_manager_impl.h          |   4 +-
     nestkernel/connector_model.h                  |   2 +-
     nestkernel/connector_model_impl.h             |   8 +-
     nestkernel/eprop_archiving_node.cpp           |   3 -
     nestkernel/eprop_archiving_node.h             |   3 -
     nestkernel/eprop_archiving_node_impl.h        |   3 -
     nestkernel/exceptions.cpp                     |  18 +
     nestkernel/exceptions.h                       |  36 ++
     nestkernel/io_manager.cpp                     |   6 +-
     nestkernel/io_manager.h                       |   5 -
     nestkernel/layer_impl.h                       |   2 +-
     nestkernel/model_manager.cpp                  |  14 +-
     nestkernel/model_manager.h                    |   8 +-
     nestkernel/model_manager_impl.h               |   4 +-
     nestkernel/module_manager.cpp                 |  13 +-
     nestkernel/module_manager.h                   |   7 +-
     nestkernel/nest.cpp                           |  44 +-
     nestkernel/nest.h                             |   8 +-
     nestkernel/nest_extension_interface.h         |   1 -
     nestkernel/nest_names.h                       |   3 +
     nestkernel/node_collection.cpp                | 446 +++++++++---------
     nestkernel/node_collection.h                  |   9 +-
     nestkernel/node_collection_impl.h             |  97 ----
     nestkernel/node_manager.cpp                   |  10 +-
     nestkernel/simulation_manager.cpp             |  12 +-
     nestkernel/sp_manager.cpp                     |   8 +-
     nestkernel/spatial.h                          |   2 +-
     testsuite/cpptests/CMakeLists.txt             |   2 +-
     59 files changed, 779 insertions(+), 908 deletions(-)
     delete mode 100644 nestkernel/node_collection_impl.h
    
    diff --git a/models/astrocyte_lr_1994.cpp b/models/astrocyte_lr_1994.cpp
    index a62db37960..aa415e89ed 100644
    --- a/models/astrocyte_lr_1994.cpp
    +++ b/models/astrocyte_lr_1994.cpp
    @@ -275,7 +275,7 @@ void
     nest::astrocyte_lr_1994::State_::get( dictionary& d ) const
     {
       d[ names::IP3 ] = y_[ IP3 ];
    -  d[ names::Ca ] = y_[ Ca ];
    +  d[ names::Ca ] = y_[ Ca_astro ];
       d[ names::h_IP3R ] = y_[ h_IP3R ];
     }
     
    @@ -283,7 +283,7 @@ void
     nest::astrocyte_lr_1994::State_::set( const dictionary& d, const Parameters_&, Node* node )
     {
       update_value_param( d, names::IP3, y_[ IP3 ], node );
    -  update_value_param( d, names::Ca, y_[ Ca ], node );
    +  update_value_param( d, names::Ca, y_[ Ca_astro ], node );
       update_value_param( d, names::h_IP3R, y_[ h_IP3R ], node );
     
       if ( y_[ IP3 ] < 0 )
    diff --git a/models/cm_compartmentcurrents.cpp b/models/cm_compartmentcurrents.cpp
    index cd65cf02ab..12bd9b1d63 100644
    --- a/models/cm_compartmentcurrents.cpp
    +++ b/models/cm_compartmentcurrents.cpp
    @@ -705,7 +705,7 @@ nest::CompartmentCurrents::CompartmentCurrents( double v_comp )
     {
     }
     
    -nest::CompartmentCurrents::CompartmentCurrents( double v_comp, const DictionaryDatum& channel_params )
    +nest::CompartmentCurrents::CompartmentCurrents( double v_comp, const dictionary& channel_params )
       : Na_chan_( v_comp, channel_params )
       , K_chan_( v_comp, channel_params )
     {
    diff --git a/models/cm_compartmentcurrents.h b/models/cm_compartmentcurrents.h
    index 957f509f67..0d3402d87e 100644
    --- a/models/cm_compartmentcurrents.h
    +++ b/models/cm_compartmentcurrents.h
    @@ -414,7 +414,7 @@ class CompartmentCurrents
     
     public:
       CompartmentCurrents( double v_comp );
    -  CompartmentCurrents( double v_comp, const DictionaryDatum& channel_params );
    +  CompartmentCurrents( double v_comp, const dictionary& channel_params );
       ~CompartmentCurrents() {};
     
       void
    @@ -477,7 +477,7 @@ class CompartmentCurrents
       void
       add_synapse( const std::string& type, const long syn_idx, const dictionary& receptor_params )
       {
    -    receptor_params->clear_access_flags();
    +    receptor_params.init_access_flags();
     
         if ( type == "AMPA" )
         {
    @@ -504,7 +504,7 @@ class CompartmentCurrents
           assert( false );
         }
     
    -    ALL_ENTRIES_ACCESSED( *receptor_params, "receptor_params", "Unread dictionary entries: " );
    +    receptor_params.all_entries_accessed( "receptor_params", "Unread dictionary entries: " );
       };
     
       void
    diff --git a/models/eprop_iaf_adapt_bsshslm_2020.cpp b/models/eprop_iaf_adapt_bsshslm_2020.cpp
    index 58cb06b9e0..c805ac44e7 100644
    --- a/models/eprop_iaf_adapt_bsshslm_2020.cpp
    +++ b/models/eprop_iaf_adapt_bsshslm_2020.cpp
    @@ -36,9 +36,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -115,51 +112,51 @@ eprop_iaf_adapt_bsshslm_2020::Buffers_::Buffers_( const Buffers_&, eprop_iaf_ada
      * ---------------------------------------------------------------- */
     
     void
    -eprop_iaf_adapt_bsshslm_2020::Parameters_::get( DictionaryDatum& d ) const
    +eprop_iaf_adapt_bsshslm_2020::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::adapt_beta, adapt_beta_ );
    -  def< double >( d, names::adapt_tau, adapt_tau_ );
    -  def< double >( d, names::C_m, C_m_ );
    -  def< double >( d, names::c_reg, c_reg_ );
    -  def< double >( d, names::E_L, E_L_ );
    -  def< double >( d, names::f_target, f_target_ );
    -  def< double >( d, names::gamma, gamma_ );
    -  def< double >( d, names::I_e, I_e_ );
    -  def< bool >( d, names::regular_spike_arrival, regular_spike_arrival_ );
    -  def< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_ );
    -  def< double >( d, names::t_ref, t_ref_ );
    -  def< double >( d, names::tau_m, tau_m_ );
    -  def< double >( d, names::V_min, V_min_ + E_L_ );
    -  def< double >( d, names::V_th, V_th_ + E_L_ );
    +  d[ names::adapt_beta ] = adapt_beta_;
    +  d[ names::adapt_tau ] = adapt_tau_;
    +  d[ names::C_m ] = C_m_;
    +  d[ names::c_reg ] = c_reg_;
    +  d[ names::E_L ] = E_L_;
    +  d[ names::f_target ] = f_target_;
    +  d[ names::gamma ] = gamma_;
    +  d[ names::I_e ] = I_e_;
    +  d[ names::regular_spike_arrival ] = regular_spike_arrival_;
    +  d[ names::surrogate_gradient_function ] = surrogate_gradient_function_;
    +  d[ names::t_ref ] = t_ref_;
    +  d[ names::tau_m ] = tau_m_;
    +  d[ names::V_min ] = V_min_ + E_L_;
    +  d[ names::V_th ] = V_th_ + E_L_;
     }
     
     double
    -eprop_iaf_adapt_bsshslm_2020::Parameters_::set( const DictionaryDatum& d, Node* node )
    +eprop_iaf_adapt_bsshslm_2020::Parameters_::set( const dictionary& d, Node* node )
     {
       // if leak potential is changed, adjust all variables defined relative to it
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  V_th_ -= updateValueParam< double >( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    -  V_min_ -= updateValueParam< double >( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
    +  V_th_ -= update_value_param( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    +  V_min_ -= update_value_param( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
     
    -  updateValueParam< double >( d, names::adapt_beta, adapt_beta_, node );
    -  updateValueParam< double >( d, names::adapt_tau, adapt_tau_, node );
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::c_reg, c_reg_, node );
    +  update_value_param( d, names::adapt_beta, adapt_beta_, node );
    +  update_value_param( d, names::adapt_tau, adapt_tau_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::c_reg, c_reg_, node );
     
    -  if ( updateValueParam< double >( d, names::f_target, f_target_, node ) )
    +  if ( update_value_param( d, names::f_target, f_target_, node ) )
       {
         f_target_ /= 1000.0; // convert from spikes/s to spikes/ms
       }
     
    -  updateValueParam< double >( d, names::gamma, gamma_, node );
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    -  updateValueParam< bool >( d, names::regular_spike_arrival, regular_spike_arrival_, node );
    -  updateValueParam< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    -  updateValueParam< double >( d, names::tau_m, tau_m_, node );
    +  update_value_param( d, names::gamma, gamma_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::regular_spike_arrival, regular_spike_arrival_, node );
    +  update_value_param( d, names::surrogate_gradient_function, surrogate_gradient_function_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
     
       if ( adapt_beta_ < 0 )
       {
    @@ -223,22 +220,22 @@ eprop_iaf_adapt_bsshslm_2020::Parameters_::set( const DictionaryDatum& d, Node*
     }
     
     void
    -eprop_iaf_adapt_bsshslm_2020::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +eprop_iaf_adapt_bsshslm_2020::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::adaptation, adapt_ );
    -  def< double >( d, names::V_m, v_m_ + p.E_L_ );
    -  def< double >( d, names::V_th_adapt, v_th_adapt_ + p.E_L_ );
    -  def< double >( d, names::surrogate_gradient, surrogate_gradient_ );
    -  def< double >( d, names::learning_signal, learning_signal_ );
    +  d[ names::adaptation ] = adapt_;
    +  d[ names::V_m ] = v_m_ + p.E_L_;
    +  d[ names::V_th_adapt ] = v_th_adapt_ + p.E_L_;
    +  d[ names::surrogate_gradient ] = surrogate_gradient_;
    +  d[ names::learning_signal ] = learning_signal_;
     }
     
     void
    -eprop_iaf_adapt_bsshslm_2020::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +eprop_iaf_adapt_bsshslm_2020::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  v_m_ -= updateValueParam< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
    +  v_m_ -= update_value_param( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
     
       // adaptive threshold can only be set indirectly via the adaptation variable
    -  if ( updateValueParam< double >( d, names::adaptation, adapt_, node ) )
    +  if ( update_value_param( d, names::adaptation, adapt_, node ) )
       {
         // if E_L changed in this SetStatus call, p.V_th_ has been adjusted and no further action is needed
         v_th_adapt_ = p.V_th_ + p.adapt_beta_ * adapt_;
    diff --git a/models/eprop_iaf_adapt_bsshslm_2020.h b/models/eprop_iaf_adapt_bsshslm_2020.h
    index b27bc400e8..7d54e3ddad 100644
    --- a/models/eprop_iaf_adapt_bsshslm_2020.h
    +++ b/models/eprop_iaf_adapt_bsshslm_2020.h
    @@ -290,8 +290,8 @@ class eprop_iaf_adapt_bsshslm_2020 : public EpropArchivingNodeRecurrent
       size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
       double compute_gradient( std::vector< long >& presyn_isis,
         const long t_previous_update,
    @@ -369,10 +369,10 @@ class eprop_iaf_adapt_bsshslm_2020 : public EpropArchivingNodeRecurrent
         Parameters_();
     
         //! Get the parameters and their values.
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         //! Set the parameters and throw errors in case of invalid values.
    -    double set( const DictionaryDatum&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       //! Structure of state variables.
    @@ -409,10 +409,10 @@ class eprop_iaf_adapt_bsshslm_2020 : public EpropArchivingNodeRecurrent
         State_();
     
         //! Get the state variables and their values.
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         //! Set the state variables.
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       //! Structure of buffers.
    @@ -559,15 +559,15 @@ eprop_iaf_adapt_bsshslm_2020::handles_test_event( DataLoggingRequest& dlr, size_
     }
     
     inline void
    -eprop_iaf_adapt_bsshslm_2020::get_status( DictionaryDatum& d ) const
    +eprop_iaf_adapt_bsshslm_2020::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -eprop_iaf_adapt_bsshslm_2020::set_status( const DictionaryDatum& d )
    +eprop_iaf_adapt_bsshslm_2020::set_status( const dictionary& d )
     {
       // temporary copies in case of errors
       Parameters_ ptmp = P_;
    diff --git a/models/eprop_iaf_bsshslm_2020.cpp b/models/eprop_iaf_bsshslm_2020.cpp
    index 108ea1e71a..fd9a03d26a 100644
    --- a/models/eprop_iaf_bsshslm_2020.cpp
    +++ b/models/eprop_iaf_bsshslm_2020.cpp
    @@ -36,9 +36,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -109,47 +106,47 @@ eprop_iaf_bsshslm_2020::Buffers_::Buffers_( const Buffers_&, eprop_iaf_bsshslm_2
      * ---------------------------------------------------------------- */
     
     void
    -eprop_iaf_bsshslm_2020::Parameters_::get( DictionaryDatum& d ) const
    +eprop_iaf_bsshslm_2020::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::C_m, C_m_ );
    -  def< double >( d, names::c_reg, c_reg_ );
    -  def< double >( d, names::E_L, E_L_ );
    -  def< double >( d, names::f_target, f_target_ );
    -  def< double >( d, names::gamma, gamma_ );
    -  def< double >( d, names::I_e, I_e_ );
    -  def< bool >( d, names::regular_spike_arrival, regular_spike_arrival_ );
    -  def< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_ );
    -  def< double >( d, names::t_ref, t_ref_ );
    -  def< double >( d, names::tau_m, tau_m_ );
    -  def< double >( d, names::V_min, V_min_ + E_L_ );
    -  def< double >( d, names::V_th, V_th_ + E_L_ );
    +  d[ names::C_m ] = C_m_;
    +  d[ names::c_reg ] = c_reg_;
    +  d[ names::E_L ] = E_L_;
    +  d[ names::f_target ] = f_target_;
    +  d[ names::gamma ] = gamma_;
    +  d[ names::I_e ] = I_e_;
    +  d[ names::regular_spike_arrival ] = regular_spike_arrival_;
    +  d[ names::surrogate_gradient_function ] = surrogate_gradient_function_;
    +  d[ names::t_ref ] = t_ref_;
    +  d[ names::tau_m ] = tau_m_;
    +  d[ names::V_min ] = V_min_ + E_L_;
    +  d[ names::V_th ] = V_th_ + E_L_;
     }
     
     double
    -eprop_iaf_bsshslm_2020::Parameters_::set( const DictionaryDatum& d, Node* node )
    +eprop_iaf_bsshslm_2020::Parameters_::set( const dictionary& d, Node* node )
     {
       // if leak potential is changed, adjust all variables defined relative to it
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  V_th_ -= updateValueParam< double >( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    -  V_min_ -= updateValueParam< double >( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
    +  V_th_ -= update_value_param( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    +  V_min_ -= update_value_param( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
     
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::c_reg, c_reg_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::c_reg, c_reg_, node );
     
    -  if ( updateValueParam< double >( d, names::f_target, f_target_, node ) )
    +  if ( update_value_param( d, names::f_target, f_target_, node ) )
       {
         f_target_ /= 1000.0; // convert from spikes/s to spikes/ms
       }
     
    -  updateValueParam< double >( d, names::gamma, gamma_, node );
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    -  updateValueParam< bool >( d, names::regular_spike_arrival, regular_spike_arrival_, node );
    -  updateValueParam< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    -  updateValueParam< double >( d, names::tau_m, tau_m_, node );
    +  update_value_param( d, names::gamma, gamma_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::regular_spike_arrival, regular_spike_arrival_, node );
    +  update_value_param( d, names::surrogate_gradient_function, surrogate_gradient_function_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
     
       if ( C_m_ <= 0 )
       {
    @@ -203,17 +200,17 @@ eprop_iaf_bsshslm_2020::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     void
    -eprop_iaf_bsshslm_2020::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +eprop_iaf_bsshslm_2020::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::V_m, v_m_ + p.E_L_ );
    -  def< double >( d, names::surrogate_gradient, surrogate_gradient_ );
    -  def< double >( d, names::learning_signal, learning_signal_ );
    +  d[ names::V_m ] = v_m_ + p.E_L_;
    +  d[ names::surrogate_gradient ] = surrogate_gradient_;
    +  d[ names::learning_signal ] = learning_signal_;
     }
     
     void
    -eprop_iaf_bsshslm_2020::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +eprop_iaf_bsshslm_2020::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  v_m_ -= updateValueParam< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
    +  v_m_ -= update_value_param( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
     }
     
     /* ----------------------------------------------------------------
    diff --git a/models/eprop_iaf_bsshslm_2020.h b/models/eprop_iaf_bsshslm_2020.h
    index 2a7f2d96b1..b937cffbb3 100644
    --- a/models/eprop_iaf_bsshslm_2020.h
    +++ b/models/eprop_iaf_bsshslm_2020.h
    @@ -273,8 +273,8 @@ class eprop_iaf_bsshslm_2020 : public EpropArchivingNodeRecurrent
       size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
       double compute_gradient( std::vector< long >& presyn_isis,
         const long t_previous_update,
    @@ -346,10 +346,10 @@ class eprop_iaf_bsshslm_2020 : public EpropArchivingNodeRecurrent
         Parameters_();
     
         //! Get the parameters and their values.
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         //! Set the parameters and throw errors in case of invalid values.
    -    double set( const DictionaryDatum&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       //! Structure of state variables.
    @@ -380,10 +380,10 @@ class eprop_iaf_bsshslm_2020 : public EpropArchivingNodeRecurrent
         State_();
     
         //! Get the state variables and their values.
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         //! Set the state variables.
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       //! Structure of buffers.
    @@ -513,15 +513,15 @@ eprop_iaf_bsshslm_2020::handles_test_event( DataLoggingRequest& dlr, size_t rece
     }
     
     inline void
    -eprop_iaf_bsshslm_2020::get_status( DictionaryDatum& d ) const
    +eprop_iaf_bsshslm_2020::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -eprop_iaf_bsshslm_2020::set_status( const DictionaryDatum& d )
    +eprop_iaf_bsshslm_2020::set_status( const dictionary& d )
     {
       // temporary copies in case of errors
       Parameters_ ptmp = P_;
    diff --git a/models/eprop_learning_signal_connection_bsshslm_2020.h b/models/eprop_learning_signal_connection_bsshslm_2020.h
    index 98ad6687cf..650158be5c 100644
    --- a/models/eprop_learning_signal_connection_bsshslm_2020.h
    +++ b/models/eprop_learning_signal_connection_bsshslm_2020.h
    @@ -175,10 +175,10 @@ class eprop_learning_signal_connection_bsshslm_2020 : public Connection< targeti
       }
     
       //! Get the model attributes and their values.
    -  void get_status( DictionaryDatum& d ) const;
    +  void get_status( dictionary& d ) const;
     
       //! Set the values of the model attributes.
    -  void set_status( const DictionaryDatum& d, ConnectorModel& cm );
    +  void set_status( const dictionary& d, ConnectorModel& cm );
     
       //! Set the synaptic weight to the provided value.
       void
    @@ -197,20 +197,20 @@ constexpr ConnectionModelProperties eprop_learning_signal_connection_bsshslm_202
     
     template < typename targetidentifierT >
     void
    -eprop_learning_signal_connection_bsshslm_2020< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +eprop_learning_signal_connection_bsshslm_2020< targetidentifierT >::get_status( dictionary& d ) const
     {
       ConnectionBase::get_status( d );
    -  def< double >( d, names::weight, weight_ );
    -  def< long >( d, names::size_of, sizeof( *this ) );
    +  d[ names::weight ] = weight_;
    +  d[ names::size_of ] = sizeof( *this );
     }
     
     template < typename targetidentifierT >
     void
    -eprop_learning_signal_connection_bsshslm_2020< targetidentifierT >::set_status( const DictionaryDatum& d,
    +eprop_learning_signal_connection_bsshslm_2020< targetidentifierT >::set_status( const dictionary& d,
       ConnectorModel& cm )
     {
       ConnectionBase::set_status( d, cm );
    -  updateValue< double >( d, names::weight, weight_ );
    +  d.update_value( names::weight, weight_ );
     }
     
     template < typename targetidentifierT >
    diff --git a/models/eprop_readout_bsshslm_2020.cpp b/models/eprop_readout_bsshslm_2020.cpp
    index 76317bc643..440c943be7 100644
    --- a/models/eprop_readout_bsshslm_2020.cpp
    +++ b/models/eprop_readout_bsshslm_2020.cpp
    @@ -36,9 +36,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -106,32 +103,32 @@ eprop_readout_bsshslm_2020::Buffers_::Buffers_( const Buffers_&, eprop_readout_b
      * ---------------------------------------------------------------- */
     
     void
    -eprop_readout_bsshslm_2020::Parameters_::get( DictionaryDatum& d ) const
    +eprop_readout_bsshslm_2020::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::C_m, C_m_ );
    -  def< double >( d, names::E_L, E_L_ );
    -  def< double >( d, names::I_e, I_e_ );
    -  def< std::string >( d, names::loss, loss_ );
    -  def< bool >( d, names::regular_spike_arrival, regular_spike_arrival_ );
    -  def< double >( d, names::tau_m, tau_m_ );
    -  def< double >( d, names::V_min, V_min_ + E_L_ );
    +  d[ names::C_m ] = C_m_;
    +  d[ names::E_L ] = E_L_;
    +  d[ names::I_e ] = I_e_;
    +  d[ names::loss ] = loss_;
    +  d[ names::regular_spike_arrival ] = regular_spike_arrival_;
    +  d[ names::tau_m ] = tau_m_;
    +  d[ names::V_min ] = V_min_ + E_L_;
     }
     
     double
    -eprop_readout_bsshslm_2020::Parameters_::set( const DictionaryDatum& d, Node* node )
    +eprop_readout_bsshslm_2020::Parameters_::set( const dictionary& d, Node* node )
     {
       // if leak potential is changed, adjust all variables defined relative to it
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  V_min_ -= updateValueParam< double >( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
    +  V_min_ -= update_value_param( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
     
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    -  updateValueParam< std::string >( d, names::loss, loss_, node );
    -  updateValueParam< bool >( d, names::regular_spike_arrival, regular_spike_arrival_, node );
    -  updateValueParam< double >( d, names::tau_m, tau_m_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::loss, loss_, node );
    +  update_value_param( d, names::regular_spike_arrival, regular_spike_arrival_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
     
       if ( C_m_ <= 0 )
       {
    @@ -152,19 +149,19 @@ eprop_readout_bsshslm_2020::Parameters_::set( const DictionaryDatum& d, Node* no
     }
     
     void
    -eprop_readout_bsshslm_2020::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +eprop_readout_bsshslm_2020::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::V_m, v_m_ + p.E_L_ );
    -  def< double >( d, names::error_signal, error_signal_ );
    -  def< double >( d, names::readout_signal, readout_signal_ );
    -  def< double >( d, names::readout_signal_unnorm, readout_signal_unnorm_ );
    -  def< double >( d, names::target_signal, target_signal_ );
    +  d[ names::V_m ] = v_m_ + p.E_L_;
    +  d[ names::error_signal ] = error_signal_;
    +  d[ names::readout_signal ] = readout_signal_;
    +  d[ names::readout_signal_unnorm ] = readout_signal_unnorm_;
    +  d[ names::target_signal ] = target_signal_;
     }
     
     void
    -eprop_readout_bsshslm_2020::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +eprop_readout_bsshslm_2020::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  v_m_ -= updateValueParam< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
    +  v_m_ -= update_value_param( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
     }
     
     /* ----------------------------------------------------------------
    diff --git a/models/eprop_readout_bsshslm_2020.h b/models/eprop_readout_bsshslm_2020.h
    index ba25d07d36..bed5a21058 100644
    --- a/models/eprop_readout_bsshslm_2020.h
    +++ b/models/eprop_readout_bsshslm_2020.h
    @@ -233,8 +233,8 @@ class eprop_readout_bsshslm_2020 : public EpropArchivingNodeReadout
       size_t handles_test_event( DelayedRateConnectionEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
       double compute_gradient( std::vector< long >& presyn_isis,
         const long t_previous_update,
    @@ -294,10 +294,10 @@ class eprop_readout_bsshslm_2020 : public EpropArchivingNodeReadout
         Parameters_();
     
         //! Get the parameters and their values.
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         //! Set the parameters and throw errors in case of invalid values.
    -    double set( const DictionaryDatum&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       //! Structure of state variables.
    @@ -328,10 +328,10 @@ class eprop_readout_bsshslm_2020 : public EpropArchivingNodeReadout
         State_();
     
         //! Get the state variables and their values.
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         //! Set the state variables.
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       //! Structure of buffers.
    @@ -492,21 +492,21 @@ eprop_readout_bsshslm_2020::handles_test_event( DataLoggingRequest& dlr, size_t
     }
     
     inline void
    -eprop_readout_bsshslm_2020::get_status( DictionaryDatum& d ) const
    +eprop_readout_bsshslm_2020::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     
    -  DictionaryDatum receptor_dict_ = new Dictionary();
    -  ( *receptor_dict_ )[ names::readout_signal ] = READOUT_SIG;
    -  ( *receptor_dict_ )[ names::target_signal ] = TARGET_SIG;
    +  dictionary receptor_dict_;
    +  receptor_dict_[ names::readout_signal ] = READOUT_SIG;
    +  receptor_dict_[ names::target_signal ] = TARGET_SIG;
     
    -  ( *d )[ names::receptor_types ] = receptor_dict_;
    +  d[ names::receptor_types ] = receptor_dict_;
     }
     
     inline void
    -eprop_readout_bsshslm_2020::set_status( const DictionaryDatum& d )
    +eprop_readout_bsshslm_2020::set_status( const dictionary& d )
     {
       // temporary copies in case of errors
       Parameters_ ptmp = P_;
    diff --git a/models/eprop_synapse_bsshslm_2020.cpp b/models/eprop_synapse_bsshslm_2020.cpp
    index ceb1dba4d1..5f402d0ac5 100644
    --- a/models/eprop_synapse_bsshslm_2020.cpp
    +++ b/models/eprop_synapse_bsshslm_2020.cpp
    @@ -55,28 +55,27 @@ EpropSynapseBSSHSLM2020CommonProperties::~EpropSynapseBSSHSLM2020CommonPropertie
     }
     
     void
    -EpropSynapseBSSHSLM2020CommonProperties::get_status( DictionaryDatum& d ) const
    +EpropSynapseBSSHSLM2020CommonProperties::get_status( dictionary& d ) const
     {
       CommonSynapseProperties::get_status( d );
    -  def< bool >( d, names::average_gradient, average_gradient_ );
    -  def< std::string >( d, names::optimizer, optimizer_cp_->get_name() );
    -  DictionaryDatum optimizer_dict = new Dictionary;
    +  d[ names::average_gradient ] = average_gradient_;
    +  dictionary optimizer_dict;
       optimizer_cp_->get_status( optimizer_dict );
    -  ( *d )[ names::optimizer ] = optimizer_dict;
    +  d[ names::optimizer ] = optimizer_dict;
     }
     
     void
    -EpropSynapseBSSHSLM2020CommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +EpropSynapseBSSHSLM2020CommonProperties::set_status( const dictionary& d, ConnectorModel& cm )
     {
       CommonSynapseProperties::set_status( d, cm );
    -  updateValue< bool >( d, names::average_gradient, average_gradient_ );
    +  d.update_value( names::average_gradient, average_gradient_ );
     
    -  if ( d->known( names::optimizer ) )
    +  if ( d.known( names::optimizer ) )
       {
    -    DictionaryDatum optimizer_dict = getValue< DictionaryDatum >( d->lookup( names::optimizer ) );
    +    const dictionary& optimizer_dict = d.get< dictionary >( names::optimizer );
     
         std::string new_optimizer;
    -    const bool set_optimizer = updateValue< std::string >( optimizer_dict, names::type, new_optimizer );
    +    const bool set_optimizer = optimizer_dict.update_value( names::type, new_optimizer );
         if ( set_optimizer and new_optimizer != optimizer_cp_->get_name() )
         {
           if ( kernel().connection_manager.get_num_connections( cm.get_syn_id() ) > 0 )
    diff --git a/models/eprop_synapse_bsshslm_2020.h b/models/eprop_synapse_bsshslm_2020.h
    index 52223ca67b..d8d874aaab 100644
    --- a/models/eprop_synapse_bsshslm_2020.h
    +++ b/models/eprop_synapse_bsshslm_2020.h
    @@ -177,10 +177,10 @@ class EpropSynapseBSSHSLM2020CommonProperties : public CommonSynapseProperties
       ~EpropSynapseBSSHSLM2020CommonProperties();
     
       //! Get parameter dictionary.
    -  void get_status( DictionaryDatum& d ) const;
    +  void get_status( dictionary& d ) const;
     
       //! Update values in parameter dictionary.
    -  void set_status( const DictionaryDatum& d, ConnectorModel& cm );
    +  void set_status( const dictionary& d, ConnectorModel& cm );
     
       //! If True, average the gradient over the learning window.
       bool average_gradient_;
    @@ -263,10 +263,10 @@ class eprop_synapse_bsshslm_2020 : public Connection< targetidentifierT >
       using ConnectionBase::get_target;
     
       //! Get parameter dictionary.
    -  void get_status( DictionaryDatum& d ) const;
    +  void get_status( dictionary& d ) const;
     
       //! Update values in parameter dictionary.
    -  void set_status( const DictionaryDatum& d, ConnectorModel& cm );
    +  void set_status( const dictionary& d, ConnectorModel& cm );
     
       //! Send the spike event.
       bool send( Event& e, size_t thread, const EpropSynapseBSSHSLM2020CommonProperties& cp );
    @@ -556,41 +556,41 @@ eprop_synapse_bsshslm_2020< targetidentifierT >::send( Event& e,
     
     template < typename targetidentifierT >
     void
    -eprop_synapse_bsshslm_2020< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +eprop_synapse_bsshslm_2020< targetidentifierT >::get_status( dictionary& d ) const
     {
       ConnectionBase::get_status( d );
    -  def< double >( d, names::weight, weight_ );
    -  def< double >( d, names::tau_m_readout, tau_m_readout_ );
    -  def< long >( d, names::size_of, sizeof( *this ) );
    +  d[ names::weight ] = weight_;
    +  d[ names::tau_m_readout ] = tau_m_readout_;
    +  d[ names::size_of ] = sizeof( *this );
     
    -  DictionaryDatum optimizer_dict = new Dictionary();
    +  dictionary optimizer_dict;
     
       // The default_connection_ has no optimizer, therefore we need to protect it
       if ( optimizer_ )
       {
         optimizer_->get_status( optimizer_dict );
    -    ( *d )[ names::optimizer ] = optimizer_dict;
    +    d[ names::optimizer ] = optimizer_dict;
       }
     }
     
     template < typename targetidentifierT >
     void
    -eprop_synapse_bsshslm_2020< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +eprop_synapse_bsshslm_2020< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm )
     {
       ConnectionBase::set_status( d, cm );
    -  if ( d->known( names::optimizer ) )
    +  if ( d.known( names::optimizer ) )
       {
         // We must pass here if called by SetDefaults. In that case, the user will get and error
         // message because the parameters for the synapse-specific optimizer have not been accessed.
         if ( optimizer_ )
         {
    -      optimizer_->set_status( getValue< DictionaryDatum >( d->lookup( names::optimizer ) ) );
    +      optimizer_->set_status( d.get< dictionary >( names::optimizer ) );
         }
       }
     
    -  updateValue< double >( d, names::weight, weight_ );
    +  d.update_value( names::weight, weight_ );
     
    -  if ( updateValue< double >( d, names::tau_m_readout, tau_m_readout_ ) )
    +  if ( d.update_value( names::tau_m_readout, tau_m_readout_ ) )
       {
         if ( tau_m_readout_ <= 0 )
         {
    diff --git a/models/glif_cond.cpp b/models/glif_cond.cpp
    index c896a809ca..fb959bf20b 100644
    --- a/models/glif_cond.cpp
    +++ b/models/glif_cond.cpp
    @@ -35,7 +35,6 @@
     // Includes from nestkernel:
     #include "exceptions.h"
     #include "kernel_manager.h"
    -#include "name.h"
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    diff --git a/models/iaf_bw_2001.cpp b/models/iaf_bw_2001.cpp
    index e030579183..644434b7ff 100644
    --- a/models/iaf_bw_2001.cpp
    +++ b/models/iaf_bw_2001.cpp
    @@ -27,7 +27,6 @@
     
     // Includes from libnestutil:
     #include "dict_util.h"
    -#include "dictdatum.h"
     #include "numerics.h"
     
     // Includes from nestkernel:
    @@ -36,13 +35,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "lockptrdatum.h"
    -
     // Includes from standard library
     #include <algorithm>
     #include <boost/math/special_functions/gamma.hpp>
    @@ -185,44 +177,44 @@ nest::iaf_bw_2001::Buffers_::Buffers_( const Buffers_&, iaf_bw_2001& n )
      * --------------------------------------------------------------------------- */
     
     void
    -nest::iaf_bw_2001::Parameters_::get( DictionaryDatum& d ) const
    +nest::iaf_bw_2001::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::E_L, E_L );
    -  def< double >( d, names::E_ex, E_ex );
    -  def< double >( d, names::E_in, E_in );
    -  def< double >( d, names::V_th, V_th );
    -  def< double >( d, names::V_reset, V_reset );
    -  def< double >( d, names::C_m, C_m );
    -  def< double >( d, names::g_L, g_L );
    -  def< double >( d, names::t_ref, t_ref );
    -  def< double >( d, names::tau_AMPA, tau_AMPA );
    -  def< double >( d, names::tau_GABA, tau_GABA );
    -  def< double >( d, names::tau_decay_NMDA, tau_decay_NMDA );
    -  def< double >( d, names::tau_rise_NMDA, tau_rise_NMDA );
    -  def< double >( d, names::alpha, alpha );
    -  def< double >( d, names::conc_Mg2, conc_Mg2 );
    -  def< double >( d, names::gsl_error_tol, gsl_error_tol );
    +  d[ names::E_L ] = E_L;
    +  d[ names::E_ex ] = E_ex;
    +  d[ names::E_in ] = E_in;
    +  d[ names::V_th ] = V_th;
    +  d[ names::V_reset ] = V_reset;
    +  d[ names::C_m ] = C_m;
    +  d[ names::g_L ] = g_L;
    +  d[ names::t_ref ] = t_ref;
    +  d[ names::tau_AMPA ] = tau_AMPA;
    +  d[ names::tau_GABA ] = tau_GABA;
    +  d[ names::tau_decay_NMDA ] = tau_decay_NMDA;
    +  d[ names::tau_rise_NMDA ] = tau_rise_NMDA;
    +  d[ names::alpha ] = alpha;
    +  d[ names::conc_Mg2 ] = conc_Mg2;
    +  d[ names::gsl_error_tol ] = gsl_error_tol;
     }
     
     void
    -nest::iaf_bw_2001::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::iaf_bw_2001::Parameters_::set( const dictionary& d, Node* node )
     {
       // allow setting the membrane potential
    -  updateValueParam< double >( d, names::E_L, E_L, node );
    -  updateValueParam< double >( d, names::E_ex, E_ex, node );
    -  updateValueParam< double >( d, names::E_in, E_in, node );
    -  updateValueParam< double >( d, names::V_th, V_th, node );
    -  updateValueParam< double >( d, names::V_reset, V_reset, node );
    -  updateValueParam< double >( d, names::C_m, C_m, node );
    -  updateValueParam< double >( d, names::g_L, g_L, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref, node );
    -  updateValueParam< double >( d, names::tau_AMPA, tau_AMPA, node );
    -  updateValueParam< double >( d, names::tau_GABA, tau_GABA, node );
    -  updateValueParam< double >( d, names::tau_decay_NMDA, tau_decay_NMDA, node );
    -  updateValueParam< double >( d, names::tau_rise_NMDA, tau_rise_NMDA, node );
    -  updateValueParam< double >( d, names::alpha, alpha, node );
    -  updateValueParam< double >( d, names::conc_Mg2, conc_Mg2, node );
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::E_L, E_L, node );
    +  update_value_param( d, names::E_ex, E_ex, node );
    +  update_value_param( d, names::E_in, E_in, node );
    +  update_value_param( d, names::V_th, V_th, node );
    +  update_value_param( d, names::V_reset, V_reset, node );
    +  update_value_param( d, names::C_m, C_m, node );
    +  update_value_param( d, names::g_L, g_L, node );
    +  update_value_param( d, names::t_ref, t_ref, node );
    +  update_value_param( d, names::tau_AMPA, tau_AMPA, node );
    +  update_value_param( d, names::tau_GABA, tau_GABA, node );
    +  update_value_param( d, names::tau_decay_NMDA, tau_decay_NMDA, node );
    +  update_value_param( d, names::tau_rise_NMDA, tau_rise_NMDA, node );
    +  update_value_param( d, names::alpha, alpha, node );
    +  update_value_param( d, names::conc_Mg2, conc_Mg2, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_reset >= V_th )
       {
    @@ -255,24 +247,24 @@ nest::iaf_bw_2001::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     void
    -nest::iaf_bw_2001::State_::get( DictionaryDatum& d ) const
    +nest::iaf_bw_2001::State_::get( dictionary& d ) const
     {
    -  def< double >( d, names::V_m, y_[ V_m ] ); // Membrane potential
    -  def< double >( d, names::s_AMPA, y_[ s_AMPA ] );
    -  def< double >( d, names::s_GABA, y_[ s_GABA ] );
    -  def< double >( d, names::s_NMDA, y_[ s_NMDA ] );
    -  def< double >( d, names::I_NMDA, I_NMDA_ );
    -  def< double >( d, names::I_AMPA, I_AMPA_ );
    -  def< double >( d, names::I_GABA, I_GABA_ );
    +  d[ names::V_m ] = y_[ V_m ]; // Membrane potential
    +  d[ names::s_AMPA ] = y_[ s_AMPA ];
    +  d[ names::s_GABA ] = y_[ s_GABA ];
    +  d[ names::s_NMDA ] = y_[ s_NMDA ];
    +  d[ names::I_NMDA ] = I_NMDA_;
    +  d[ names::I_AMPA ] = I_AMPA_;
    +  d[ names::I_GABA ] = I_GABA_;
     }
     
     void
    -nest::iaf_bw_2001::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node )
    +nest::iaf_bw_2001::State_::set( const dictionary& d, const Parameters_&, Node* node )
     {
    -  updateValueParam< double >( d, names::V_m, y_[ V_m ], node );
    -  updateValueParam< double >( d, names::s_AMPA, y_[ s_AMPA ], node );
    -  updateValueParam< double >( d, names::s_GABA, y_[ s_GABA ], node );
    -  updateValueParam< double >( d, names::s_NMDA, y_[ s_NMDA ], node );
    +  update_value_param( d, names::V_m, y_[ V_m ], node );
    +  update_value_param( d, names::s_AMPA, y_[ s_AMPA ], node );
    +  update_value_param( d, names::s_GABA, y_[ s_GABA ], node );
    +  update_value_param( d, names::s_NMDA, y_[ s_NMDA ], node );
     }
     
     /* ---------------------------------------------------------------------------
    diff --git a/models/iaf_bw_2001.h b/models/iaf_bw_2001.h
    index 3efbace816..288cad00cf 100644
    --- a/models/iaf_bw_2001.h
    +++ b/models/iaf_bw_2001.h
    @@ -229,8 +229,8 @@ class iaf_bw_2001 : public ArchivingNode
        * Functions for getting/setting parameters and state values.
        * ------------------------------------------------------------------------- */
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
       bool
       is_off_grid() const override
    @@ -285,8 +285,8 @@ class iaf_bw_2001 : public ArchivingNode
         //! Initialize parameters to their default values.
         Parameters_();
     
    -    void get( DictionaryDatum& ) const;             //!< Store current values in dictionary
    -    void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -326,8 +326,8 @@ class iaf_bw_2001 : public ArchivingNode
         State_( const Parameters_& ); //!< Default initialization
         State_( const State_& );
     
    -    void get( DictionaryDatum& ) const;
    -    void set( const DictionaryDatum&, const Parameters_&, Node* );
    +    void get( dictionary& ) const;
    +    void set( const dictionary&, const Parameters_&, Node* );
       };
     
     
    @@ -488,23 +488,23 @@ iaf_bw_2001::handles_test_event( DataLoggingRequest& dlr, size_t receptor_type )
     }
     
     inline void
    -iaf_bw_2001::get_status( DictionaryDatum& d ) const
    +iaf_bw_2001::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d );
       ArchivingNode::get_status( d );
     
    -  DictionaryDatum receptor_type = new Dictionary();
    -  ( *receptor_type )[ names::AMPA ] = AMPA;
    -  ( *receptor_type )[ names::GABA ] = GABA;
    -  ( *receptor_type )[ names::NMDA ] = NMDA;
    -  ( *d )[ names::receptor_types ] = receptor_type;
    +  dictionary receptor_type;
    +  receptor_type[ names::AMPA ] = AMPA;
    +  receptor_type[ names::GABA ] = GABA;
    +  receptor_type[ names::NMDA ] = NMDA;
    +  d[ names::receptor_types ] = receptor_type;
     
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -iaf_bw_2001::set_status( const DictionaryDatum& d )
    +iaf_bw_2001::set_status( const dictionary& d )
     {
       Parameters_ ptmp = P_;     // temporary copy in case of errors
       ptmp.set( d, this );       // throws if BadProperty
    diff --git a/models/iaf_bw_2001_exact.cpp b/models/iaf_bw_2001_exact.cpp
    index 3855c27a53..bb16cb8180 100644
    --- a/models/iaf_bw_2001_exact.cpp
    +++ b/models/iaf_bw_2001_exact.cpp
    @@ -26,7 +26,6 @@
     
     // Includes from libnestutil:
     #include "dict_util.h"
    -#include "dictdatum.h"
     #include "numerics.h"
     
     // Includes from nestkernel:
    @@ -35,13 +34,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dict.h"
    -#include "dictutils.h"
    -#include "doubledatum.h"
    -#include "integerdatum.h"
    -#include "lockptrdatum.h"
    -
     /* ---------------------------------------------------------------------------
      * Recordables map
      * --------------------------------------------------------------------------- */
    @@ -159,44 +151,44 @@ nest::iaf_bw_2001_exact::Buffers_::Buffers_( const Buffers_&, iaf_bw_2001_exact&
      * --------------------------------------------------------------------------- */
     
     void
    -nest::iaf_bw_2001_exact::Parameters_::get( DictionaryDatum& d ) const
    +nest::iaf_bw_2001_exact::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::E_L, E_L );
    -  def< double >( d, names::E_ex, E_ex );
    -  def< double >( d, names::E_in, E_in );
    -  def< double >( d, names::V_th, V_th );
    -  def< double >( d, names::V_reset, V_reset );
    -  def< double >( d, names::C_m, C_m );
    -  def< double >( d, names::g_L, g_L );
    -  def< double >( d, names::t_ref, t_ref );
    -  def< double >( d, names::tau_AMPA, tau_AMPA );
    -  def< double >( d, names::tau_GABA, tau_GABA );
    -  def< double >( d, names::tau_rise_NMDA, tau_rise_NMDA );
    -  def< double >( d, names::tau_decay_NMDA, tau_decay_NMDA );
    -  def< double >( d, names::alpha, alpha );
    -  def< double >( d, names::conc_Mg2, conc_Mg2 );
    -  def< double >( d, names::gsl_error_tol, gsl_error_tol );
    +  d[ names::E_L ] = E_L;
    +  d[ names::E_ex ] = E_ex;
    +  d[ names::E_in ] = E_in;
    +  d[ names::V_th ] = V_th;
    +  d[ names::V_reset ] = V_reset;
    +  d[ names::C_m ] = C_m;
    +  d[ names::g_L ] = g_L;
    +  d[ names::t_ref ] = t_ref;
    +  d[ names::tau_AMPA ] = tau_AMPA;
    +  d[ names::tau_GABA ] = tau_GABA;
    +  d[ names::tau_rise_NMDA ] = tau_rise_NMDA;
    +  d[ names::tau_decay_NMDA ] = tau_decay_NMDA;
    +  d[ names::alpha ] = alpha;
    +  d[ names::conc_Mg2 ] = conc_Mg2;
    +  d[ names::gsl_error_tol ] = gsl_error_tol;
     }
     
     void
    -nest::iaf_bw_2001_exact::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::iaf_bw_2001_exact::Parameters_::set( const dictionary& d, Node* node )
     {
       // allow setting the membrane potential
    -  updateValueParam< double >( d, names::V_th, V_th, node );
    -  updateValueParam< double >( d, names::V_reset, V_reset, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref, node );
    -  updateValueParam< double >( d, names::E_L, E_L, node );
    -  updateValueParam< double >( d, names::E_ex, E_ex, node );
    -  updateValueParam< double >( d, names::E_in, E_in, node );
    -  updateValueParam< double >( d, names::C_m, C_m, node );
    -  updateValueParam< double >( d, names::g_L, g_L, node );
    -  updateValueParam< double >( d, names::tau_AMPA, tau_AMPA, node );
    -  updateValueParam< double >( d, names::tau_GABA, tau_GABA, node );
    -  updateValueParam< double >( d, names::tau_rise_NMDA, tau_rise_NMDA, node );
    -  updateValueParam< double >( d, names::tau_decay_NMDA, tau_decay_NMDA, node );
    -  updateValueParam< double >( d, names::alpha, alpha, node );
    -  updateValueParam< double >( d, names::conc_Mg2, conc_Mg2, node );
    -  updateValueParam< double >( d, names::gsl_error_tol, gsl_error_tol, node );
    +  update_value_param( d, names::V_th, V_th, node );
    +  update_value_param( d, names::V_reset, V_reset, node );
    +  update_value_param( d, names::t_ref, t_ref, node );
    +  update_value_param( d, names::E_L, E_L, node );
    +  update_value_param( d, names::E_ex, E_ex, node );
    +  update_value_param( d, names::E_in, E_in, node );
    +  update_value_param( d, names::C_m, C_m, node );
    +  update_value_param( d, names::g_L, g_L, node );
    +  update_value_param( d, names::tau_AMPA, tau_AMPA, node );
    +  update_value_param( d, names::tau_GABA, tau_GABA, node );
    +  update_value_param( d, names::tau_rise_NMDA, tau_rise_NMDA, node );
    +  update_value_param( d, names::tau_decay_NMDA, tau_decay_NMDA, node );
    +  update_value_param( d, names::alpha, alpha, node );
    +  update_value_param( d, names::conc_Mg2, conc_Mg2, node );
    +  update_value_param( d, names::gsl_error_tol, gsl_error_tol, node );
     
       if ( V_reset >= V_th )
       {
    @@ -229,19 +221,19 @@ nest::iaf_bw_2001_exact::Parameters_::set( const DictionaryDatum& d, Node* node
     }
     
     void
    -nest::iaf_bw_2001_exact::State_::get( DictionaryDatum& d ) const
    +nest::iaf_bw_2001_exact::State_::get( dictionary& d ) const
     {
    -  def< double >( d, names::V_m, ode_state_[ V_m ] ); // Membrane potential
    -  def< double >( d, names::s_AMPA, ode_state_[ s_AMPA ] );
    -  def< double >( d, names::s_GABA, ode_state_[ s_GABA ] );
    +  d[ names::V_m ] = ode_state_[ V_m ]; // Membrane potential
    +  d[ names::s_AMPA ] = ode_state_[ s_AMPA ];
    +  d[ names::s_GABA ] = ode_state_[ s_GABA ];
     }
     
     void
    -nest::iaf_bw_2001_exact::State_::set( const DictionaryDatum& d, const Parameters_&, Node* node )
    +nest::iaf_bw_2001_exact::State_::set( const dictionary& d, const Parameters_&, Node* node )
     {
    -  updateValueParam< double >( d, names::V_m, ode_state_[ V_m ], node );
    -  updateValueParam< double >( d, names::s_AMPA, ode_state_[ s_AMPA ], node );
    -  updateValueParam< double >( d, names::s_GABA, ode_state_[ s_GABA ], node );
    +  update_value_param( d, names::V_m, ode_state_[ V_m ], node );
    +  update_value_param( d, names::s_AMPA, ode_state_[ s_AMPA ], node );
    +  update_value_param( d, names::s_GABA, ode_state_[ s_GABA ], node );
     }
     
     /* ---------------------------------------------------------------------------
    diff --git a/models/iaf_bw_2001_exact.h b/models/iaf_bw_2001_exact.h
    index c9c1bf50e2..4525f3649d 100644
    --- a/models/iaf_bw_2001_exact.h
    +++ b/models/iaf_bw_2001_exact.h
    @@ -219,8 +219,8 @@ class iaf_bw_2001_exact : public ArchivingNode
        * Functions for getting/setting parameters and state values.
        * ------------------------------------------------------------------------- */
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
     private:
       void init_state_() override;
    @@ -271,8 +271,8 @@ class iaf_bw_2001_exact : public ArchivingNode
          **/
         Parameters_();
     
    -    void get( DictionaryDatum& ) const;             //!< Store current values in dictionary
    -    void set( const DictionaryDatum&, Node* node ); //!< Set values from dictionary
    +    void get( dictionary& ) const;             //!< Store current values in dictionary
    +    void set( const dictionary&, Node* node ); //!< Set values from dictionary
       };
     
     public:
    @@ -315,8 +315,8 @@ class iaf_bw_2001_exact : public ArchivingNode
         State_( const Parameters_& ); //!< Default initialization
         State_( const State_& );
     
    -    void get( DictionaryDatum& ) const;
    -    void set( const DictionaryDatum&, const Parameters_&, Node* );
    +    void get( dictionary& ) const;
    +    void set( const dictionary&, const Parameters_&, Node* );
       };
     
     private:
    @@ -503,25 +503,25 @@ iaf_bw_2001_exact::handles_test_event( DataLoggingRequest& dlr, size_t receptor_
     }
     
     inline void
    -iaf_bw_2001_exact::get_status( DictionaryDatum& d ) const
    +iaf_bw_2001_exact::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d );
       ArchivingNode::get_status( d );
     
    -  DictionaryDatum receptor_type = new Dictionary();
    +  dictionary receptor_type;
     
    -  ( *receptor_type )[ names::AMPA ] = AMPA;
    -  ( *receptor_type )[ names::GABA ] = GABA;
    -  ( *receptor_type )[ names::NMDA ] = NMDA;
    +  receptor_type[ names::AMPA ] = AMPA;
    +  receptor_type[ names::GABA ] = GABA;
    +  receptor_type[ names::NMDA ] = NMDA;
     
    -  ( *d )[ names::receptor_types ] = receptor_type;
    +  d[ names::receptor_types ] = receptor_type;
     
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -iaf_bw_2001_exact::set_status( const DictionaryDatum& d )
    +iaf_bw_2001_exact::set_status( const dictionary& d )
     {
       Parameters_ ptmp = P_;     // temporary copy in case of errors
       ptmp.set( d, this );       // throws if BadProperty
    diff --git a/models/iaf_tum_2000.cpp b/models/iaf_tum_2000.cpp
    index 29ae084558..333fda7ac6 100644
    --- a/models/iaf_tum_2000.cpp
    +++ b/models/iaf_tum_2000.cpp
    @@ -36,9 +36,6 @@
     #include "ring_buffer_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     /* ----------------------------------------------------------------
      * Recordables map
      * ---------------------------------------------------------------- */
    @@ -108,35 +105,35 @@ nest::iaf_tum_2000::State_::State_()
      * ---------------------------------------------------------------- */
     
     void
    -nest::iaf_tum_2000::Parameters_::get( DictionaryDatum& d ) const
    +nest::iaf_tum_2000::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::E_L, E_L_ ); // resting potential
    -  def< double >( d, names::I_e, I_e_ );
    -  def< double >( d, names::V_th, Theta_ + E_L_ ); // threshold value
    -  def< double >( d, names::V_reset, V_reset_ + E_L_ );
    -  def< double >( d, names::C_m, C_ );
    -  def< double >( d, names::tau_m, Tau_ );
    -  def< double >( d, names::tau_syn_ex, tau_ex_ );
    -  def< double >( d, names::tau_syn_in, tau_in_ );
    -  def< double >( d, names::t_ref, t_ref_ );
    -  def< double >( d, names::rho, rho_ );
    -  def< double >( d, names::delta, delta_ );
    -  def< double >( d, names::tau_fac, tau_fac_ );
    -  def< double >( d, names::tau_psc, tau_psc_ );
    -  def< double >( d, names::tau_rec, tau_rec_ );
    -  def< double >( d, names::U, U_ );
    +  d[ names::E_L ] = E_L_; // resting potential
    +  d[ names::I_e ] = I_e_;
    +  d[ names::V_th ] = Theta_ + E_L_; // threshold value
    +  d[ names::V_reset ] = V_reset_ + E_L_;
    +  d[ names::C_m ] = C_;
    +  d[ names::tau_m ] = Tau_;
    +  d[ names::tau_syn_ex ] = tau_ex_;
    +  d[ names::tau_syn_in ] = tau_in_;
    +  d[ names::t_ref ] = t_ref_;
    +  d[ names::rho ] = rho_;
    +  d[ names::delta ] = delta_;
    +  d[ names::tau_fac ] = tau_fac_;
    +  d[ names::tau_psc ] = tau_psc_;
    +  d[ names::tau_rec ] = tau_rec_;
    +  d[ names::U ] = U_;
     }
     
     double
    -nest::iaf_tum_2000::Parameters_::set( const DictionaryDatum& d, Node* node )
    +nest::iaf_tum_2000::Parameters_::set( const dictionary& d, Node* node )
     {
       // if E_L_ is changed, we need to adjust all variables defined relative to
       // E_L_
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  if ( updateValueParam< double >( d, names::V_reset, V_reset_, node ) )
    +  if ( update_value_param( d, names::V_reset, V_reset_, node ) )
       {
         V_reset_ -= E_L_;
       }
    @@ -145,7 +142,7 @@ nest::iaf_tum_2000::Parameters_::set( const DictionaryDatum& d, Node* node )
         V_reset_ -= delta_EL;
       }
     
    -  if ( updateValueParam< double >( d, names::V_th, Theta_, node ) )
    +  if ( update_value_param( d, names::V_th, Theta_, node ) )
       {
         Theta_ -= E_L_;
       }
    @@ -154,16 +151,16 @@ nest::iaf_tum_2000::Parameters_::set( const DictionaryDatum& d, Node* node )
         Theta_ -= delta_EL;
       }
     
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    -  updateValueParam< double >( d, names::C_m, C_, node );
    -  updateValueParam< double >( d, names::tau_m, Tau_, node );
    -  updateValueParam< double >( d, names::tau_syn_ex, tau_ex_, node );
    -  updateValueParam< double >( d, names::tau_syn_in, tau_in_, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    -  updateValueParam< double >( d, names::tau_fac, tau_fac_, node );
    -  updateValueParam< double >( d, names::tau_psc, tau_psc_, node );
    -  updateValueParam< double >( d, names::tau_rec, tau_rec_, node );
    -  updateValueParam< double >( d, names::U, U_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::C_m, C_, node );
    +  update_value_param( d, names::tau_m, Tau_, node );
    +  update_value_param( d, names::tau_syn_ex, tau_ex_, node );
    +  update_value_param( d, names::tau_syn_in, tau_in_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::tau_fac, tau_fac_, node );
    +  update_value_param( d, names::tau_psc, tau_psc_, node );
    +  update_value_param( d, names::tau_rec, tau_rec_, node );
    +  update_value_param( d, names::U, U_, node );
       if ( V_reset_ >= Theta_ )
       {
         throw BadProperty( "Reset potential must be smaller than threshold." );
    @@ -189,13 +186,13 @@ nest::iaf_tum_2000::Parameters_::set( const DictionaryDatum& d, Node* node )
         throw BadProperty( "'U' must be in [0,1]." );
       }
     
    -  updateValue< double >( d, "rho", rho_ );
    +  d.update_value( "rho", rho_ );
       if ( rho_ < 0 )
       {
         throw BadProperty( "Stochastic firing intensity must not be negative." );
       }
     
    -  updateValue< double >( d, "delta", delta_ );
    +  d.update_value( "delta", delta_ );
       if ( delta_ < 0 )
       {
         throw BadProperty( "Width of threshold region must not be negative." );
    @@ -205,22 +202,22 @@ nest::iaf_tum_2000::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     void
    -nest::iaf_tum_2000::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +nest::iaf_tum_2000::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::V_m, V_m_ + p.E_L_ ); // Membrane potential
    -  def< double >( d, names::x, x_ );
    -  def< double >( d, names::y, y_ );
    -  def< double >( d, names::u, u_ );
    +  d[ names::V_m ] = V_m_ + p.E_L_; // Membrane potential
    +  d[ names::x ] = x_;
    +  d[ names::y ] = y_;
    +  d[ names::u ] = u_;
     }
     
     void
    -nest::iaf_tum_2000::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +nest::iaf_tum_2000::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
     
       double x = x_;
       double y = y_;
    -  updateValue< double >( d, names::x, x );
    -  updateValue< double >( d, names::y, y );
    +  d.update_value( names::x, x );
    +  d.update_value( names::y, y );
     
       if ( x + y > 1.0 )
       {
    @@ -230,14 +227,14 @@ nest::iaf_tum_2000::State_::set( const DictionaryDatum& d, const Parameters_& p,
       x_ = x;
       y_ = y;
     
    -  updateValueParam< double >( d, names::u, u_, node );
    +  update_value_param( d, names::u, u_, node );
       if ( u_ > 1.0 or u_ < 0.0 )
       {
         throw BadProperty( "'u' must be in [0,1]." );
       }
     
     
    -  if ( updateValueParam< double >( d, names::V_m, V_m_, node ) )
    +  if ( update_value_param( d, names::V_m, V_m_, node ) )
       {
         V_m_ -= p.E_L_;
       }
    diff --git a/models/iaf_tum_2000.h b/models/iaf_tum_2000.h
    index 972f31e2e4..48f984e9e8 100644
    --- a/models/iaf_tum_2000.h
    +++ b/models/iaf_tum_2000.h
    @@ -180,8 +180,8 @@ class iaf_tum_2000 : public ArchivingNode
       size_t handles_test_event( CurrentEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
       bool
       is_off_grid() const override
    @@ -250,12 +250,12 @@ class iaf_tum_2000 : public ArchivingNode
     
         Parameters_(); //!< Sets default parameter values
     
    -    void get( DictionaryDatum& ) const; //!< Store current values in dictionary
    +    void get( dictionary& ) const; //!< Store current values in dictionary
     
         /** Set values from dictionary.
          * @returns Change in reversal potential E_L, to be passed to State_::set()
          */
    -    double set( const DictionaryDatum&, Node* node );
    +    double set( const dictionary&, Node* node );
       };
     
       // ----------------------------------------------------------------
    @@ -280,14 +280,14 @@ class iaf_tum_2000 : public ArchivingNode
     
         State_(); //!< Default initialization
     
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         /** Set values from dictionary.
          * @param dictionary to take data from
          * @param current parameters
          * @param Change in reversal potential E_L specified by this dict
          */
    -    void set( const DictionaryDatum&, const Parameters_&, const double, Node* );
    +    void set( const dictionary&, const Parameters_&, const double, Node* );
       };
     
       // ----------------------------------------------------------------
    @@ -442,17 +442,17 @@ iaf_tum_2000::handles_test_event( DataLoggingRequest& dlr, size_t receptor_type
     }
     
     inline void
    -iaf_tum_2000::get_status( DictionaryDatum& d ) const
    +iaf_tum_2000::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
       ArchivingNode::get_status( d );
     
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -iaf_tum_2000::set_status( const DictionaryDatum& d )
    +iaf_tum_2000::set_status( const dictionary& d )
     {
       Parameters_ ptmp = P_;                       // temporary copy in case of errors
       const double delta_EL = ptmp.set( d, this ); // throws if BadProperty
    diff --git a/models/ignore_and_fire.cpp b/models/ignore_and_fire.cpp
    index 82b61785da..fd964a26c2 100644
    --- a/models/ignore_and_fire.cpp
    +++ b/models/ignore_and_fire.cpp
    @@ -37,9 +37,6 @@
     #include "numerics.h"
     #include "ring_buffer_impl.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     nest::RecordablesMap< nest::ignore_and_fire > nest::ignore_and_fire::recordablesMap_;
     
     namespace nest
    @@ -79,17 +76,17 @@ ignore_and_fire::State_::State_()
      * ---------------------------------------------------------------- */
     
     void
    -ignore_and_fire::Parameters_::get( DictionaryDatum& d ) const
    +ignore_and_fire::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::phase, phase_ );
    -  def< double >( d, names::rate, rate_ );
    +  d[ names::phase ] = phase_;
    +  d[ names::rate ] = rate_;
     }
     
     void
    -ignore_and_fire::Parameters_::set( const DictionaryDatum& d, Node* node )
    +ignore_and_fire::Parameters_::set( const dictionary& d, Node* node )
     {
    -  updateValueParam< double >( d, names::phase, phase_, node );
    -  updateValueParam< double >( d, names::rate, rate_, node );
    +  update_value_param( d, names::phase, phase_, node );
    +  update_value_param( d, names::rate, rate_, node );
     
       if ( phase_ <= 0.0 or phase_ > 1.0 )
       {
    @@ -103,13 +100,13 @@ ignore_and_fire::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     void
    -ignore_and_fire::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +ignore_and_fire::State_::get( dictionary& d, const Parameters_& p ) const
     {
     }
     
     
     void
    -ignore_and_fire::State_::set( const DictionaryDatum& d, const Parameters_& p, Node* node )
    +ignore_and_fire::State_::set( const dictionary& d, const Parameters_& p, Node* node )
     {
     }
     
    diff --git a/models/ignore_and_fire.h b/models/ignore_and_fire.h
    index 857e596ce9..6043e7e8eb 100644
    --- a/models/ignore_and_fire.h
    +++ b/models/ignore_and_fire.h
    @@ -126,8 +126,8 @@ class ignore_and_fire : public ArchivingNode
       size_t handles_test_event( CurrentEvent&, size_t );
       size_t handles_test_event( DataLoggingRequest&, size_t );
     
    -  void get_status( DictionaryDatum& ) const;
    -  void set_status( const DictionaryDatum& );
    +  void get_status( dictionary& ) const;
    +  void set_status( const dictionary& );
     
     private:
       void init_buffers_();
    @@ -154,12 +154,12 @@ class ignore_and_fire : public ArchivingNode
     
         Parameters_(); //!< Sets default parameter values
     
    -    void get( DictionaryDatum& ) const; //!< Store current values in dictionary
    +    void get( dictionary& ) const; //!< Store current values in dictionary
     
         /** Set values from dictionary.
          * @returns Change in reversal potential E_L, to be passed to State_::set()
          */
    -    void set( const DictionaryDatum&, Node* node );
    +    void set( const dictionary&, Node* node );
       };
     
       // ----------------------------------------------------------------
    @@ -173,14 +173,14 @@ class ignore_and_fire : public ArchivingNode
     
         State_(); //!< Default initialization
     
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         /** Set values from dictionary.
          * @param dictionary to take data from
          * @param current parameters
          * @param Change in reversal potential E_L specified by this dict
          */
    -    void set( const DictionaryDatum&, const Parameters_&, Node* node );
    +    void set( const dictionary&, const Parameters_&, Node* node );
       };
     
       // ----------------------------------------------------------------
    @@ -285,16 +285,16 @@ ignore_and_fire::handles_test_event( DataLoggingRequest& dlr, size_t receptor_ty
     }
     
     inline void
    -ignore_and_fire::get_status( DictionaryDatum& d ) const
    +ignore_and_fire::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
       ArchivingNode::get_status( d );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -ignore_and_fire::set_status( const DictionaryDatum& d )
    +ignore_and_fire::set_status( const dictionary& d )
     {
       Parameters_ ptmp = P_;     // temporary copy in case of errors
       ptmp.set( d, this );       // throws if BadProperty
    diff --git a/models/jonke_synapse.cpp b/models/jonke_synapse.cpp
    index 3aea1fb292..1c2552ec2a 100644
    --- a/models/jonke_synapse.cpp
    +++ b/models/jonke_synapse.cpp
    @@ -47,31 +47,31 @@ JonkeCommonProperties::JonkeCommonProperties()
     }
     
     void
    -JonkeCommonProperties::get_status( DictionaryDatum& d ) const
    +JonkeCommonProperties::get_status( dictionary& d ) const
     {
       CommonSynapseProperties::get_status( d );
     
    -  def< double >( d, names::alpha, alpha_ );
    -  def< double >( d, names::beta, beta_ );
    -  def< double >( d, names::lambda, lambda_ );
    -  def< double >( d, names::mu_plus, mu_plus_ );
    -  def< double >( d, names::mu_minus, mu_minus_ );
    -  def< double >( d, names::tau_plus, tau_plus_ );
    -  def< double >( d, names::Wmax, Wmax_ );
    +  d[ names::alpha ] = alpha_;
    +  d[ names::beta ] = beta_;
    +  d[ names::lambda ] = lambda_;
    +  d[ names::mu_plus ] = mu_plus_;
    +  d[ names::mu_minus ] = mu_minus_;
    +  d[ names::tau_plus ] = tau_plus_;
    +  d[ names::Wmax ] = Wmax_;
     }
     
     void
    -JonkeCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +JonkeCommonProperties::set_status( const dictionary& d, ConnectorModel& cm )
     {
       CommonSynapseProperties::set_status( d, cm );
     
    -  updateValue< double >( d, names::alpha, alpha_ );
    -  updateValue< double >( d, names::beta, beta_ );
    -  updateValue< double >( d, names::lambda, lambda_ );
    -  updateValue< double >( d, names::tau_plus, tau_plus_ );
    -  updateValue< double >( d, names::mu_plus, mu_plus_ );
    -  updateValue< double >( d, names::mu_minus, mu_minus_ );
    -  updateValue< double >( d, names::Wmax, Wmax_ );
    +  d.update_value( names::alpha, alpha_ );
    +  d.update_value( names::beta, beta_ );
    +  d.update_value( names::lambda, lambda_ );
    +  d.update_value( names::tau_plus, tau_plus_ );
    +  d.update_value( names::mu_plus, mu_plus_ );
    +  d.update_value( names::mu_minus, mu_minus_ );
    +  d.update_value( names::Wmax, Wmax_ );
     }
     
     
    diff --git a/models/weight_optimizer.cpp b/models/weight_optimizer.cpp
    index db0a07fedc..b5373b2673 100644
    --- a/models/weight_optimizer.cpp
    +++ b/models/weight_optimizer.cpp
    @@ -26,9 +26,6 @@
     #include "exceptions.h"
     #include "nest_names.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     WeightOptimizerCommonProperties::WeightOptimizerCommonProperties()
    @@ -48,20 +45,20 @@ WeightOptimizerCommonProperties::WeightOptimizerCommonProperties( const WeightOp
     }
     
     void
    -WeightOptimizerCommonProperties::get_status( DictionaryDatum& d ) const
    +WeightOptimizerCommonProperties::get_status( dictionary& d ) const
     {
    -  def< std::string >( d, names::optimizer, get_name() );
    -  def< long >( d, names::batch_size, batch_size_ );
    -  def< double >( d, names::eta, eta_ );
    -  def< double >( d, names::Wmin, Wmin_ );
    -  def< double >( d, names::Wmax, Wmax_ );
    +  d[ names::optimizer ] = get_name();
    +  d[ names::batch_size ] = batch_size_;
    +  d[ names::eta ] = eta_;
    +  d[ names::Wmin ] = Wmin_;
    +  d[ names::Wmax ] = Wmax_;
     }
     
     void
    -WeightOptimizerCommonProperties::set_status( const DictionaryDatum& d )
    +WeightOptimizerCommonProperties::set_status( const dictionary& d )
     {
       long new_batch_size = batch_size_;
    -  updateValue< long >( d, names::batch_size, new_batch_size );
    +  d.update_value( names::batch_size, new_batch_size );
       if ( new_batch_size <= 0 )
       {
         throw BadProperty( "Optimization batch_size > 0 required." );
    @@ -69,7 +66,7 @@ WeightOptimizerCommonProperties::set_status( const DictionaryDatum& d )
       batch_size_ = new_batch_size;
     
       double new_eta = eta_;
    -  updateValue< double >( d, names::eta, new_eta );
    +  d.update_value( names::eta, new_eta );
       if ( new_eta < 0 )
       {
         throw BadProperty( "Learning rate eta ≥ 0 required." );
    @@ -78,8 +75,8 @@ WeightOptimizerCommonProperties::set_status( const DictionaryDatum& d )
     
       double new_Wmin = Wmin_;
       double new_Wmax = Wmax_;
    -  updateValue< double >( d, names::Wmin, new_Wmin );
    -  updateValue< double >( d, names::Wmax, new_Wmax );
    +  d.update_value( names::Wmin, new_Wmin );
    +  d.update_value( names::Wmax, new_Wmax );
       if ( new_Wmin > new_Wmax )
       {
         throw BadProperty( "Minimal weight Wmin ≤ maximal weight Wmax required." );
    @@ -95,12 +92,12 @@ WeightOptimizer::WeightOptimizer()
     }
     
     void
    -WeightOptimizer::get_status( DictionaryDatum& d ) const
    +WeightOptimizer::get_status( dictionary& d ) const
     {
     }
     
     void
    -WeightOptimizer::set_status( const DictionaryDatum& d )
    +WeightOptimizer::set_status( const dictionary& d )
     {
     }
     
    @@ -169,23 +166,23 @@ WeightOptimizerCommonPropertiesAdam::get_optimizer() const
     }
     
     void
    -WeightOptimizerCommonPropertiesAdam::get_status( DictionaryDatum& d ) const
    +WeightOptimizerCommonPropertiesAdam::get_status( dictionary& d ) const
     {
       WeightOptimizerCommonProperties::get_status( d );
     
    -  def< double >( d, names::beta_1, beta_1_ );
    -  def< double >( d, names::beta_2, beta_2_ );
    -  def< double >( d, names::epsilon, epsilon_ );
    +  d[ names::beta_1 ] = beta_1_;
    +  d[ names::beta_2 ] = beta_2_;
    +  d[ names::epsilon ] = epsilon_;
     }
     
     void
    -WeightOptimizerCommonPropertiesAdam::set_status( const DictionaryDatum& d )
    +WeightOptimizerCommonPropertiesAdam::set_status( const dictionary& d )
     {
       WeightOptimizerCommonProperties::set_status( d );
     
    -  updateValue< double >( d, names::beta_1, beta_1_ );
    -  updateValue< double >( d, names::beta_2, beta_2_ );
    -  updateValue< double >( d, names::epsilon, epsilon_ );
    +  d.update_value( names::beta_1, beta_1_ );
    +  d.update_value( names::beta_2, beta_2_ );
    +  d.update_value( names::epsilon, epsilon_ );
     
       if ( beta_1_ < 0.0 or 1.0 <= beta_1_ )
       {
    @@ -211,19 +208,19 @@ WeightOptimizerAdam::WeightOptimizerAdam()
     }
     
     void
    -WeightOptimizerAdam::get_status( DictionaryDatum& d ) const
    +WeightOptimizerAdam::get_status( dictionary& d ) const
     {
       WeightOptimizer::get_status( d );
    -  def< double >( d, names::m, m_ );
    -  def< double >( d, names::v, v_ );
    +  d[ names::m ] = m_;
    +  d[ names::v ] = v_;
     }
     
     void
    -WeightOptimizerAdam::set_status( const DictionaryDatum& d )
    +WeightOptimizerAdam::set_status( const dictionary& d )
     {
       WeightOptimizer::set_status( d );
    -  updateValue< double >( d, names::m, m_ );
    -  updateValue< double >( d, names::v, v_ );
    +  d.update_value( names::m, m_ );
    +  d.update_value( names::v, v_ );
     }
     
     
    diff --git a/models/weight_optimizer.h b/models/weight_optimizer.h
    index 9cacba0745..2d93046033 100644
    --- a/models/weight_optimizer.h
    +++ b/models/weight_optimizer.h
    @@ -23,8 +23,8 @@
     #ifndef WEIGHT_OPTIMIZER_H
     #define WEIGHT_OPTIMIZER_H
     
    -// Includes from sli
    -#include "dictdatum.h"
    +// nestkernel
    +#include "dictionary.h"
     
     namespace nest
     {
    @@ -156,10 +156,10 @@ class WeightOptimizerCommonProperties
       WeightOptimizer& operator=( const WeightOptimizer& ) = delete;
     
       //! Get parameter dictionary.
    -  virtual void get_status( DictionaryDatum& d ) const;
    +  virtual void get_status( dictionary& d ) const;
     
       //! Update parameters in parameter dictionary.
    -  virtual void set_status( const DictionaryDatum& d );
    +  virtual void set_status( const dictionary& d );
     
       //! Clone constructor.
       virtual WeightOptimizerCommonProperties* clone() const = 0;
    @@ -224,10 +224,10 @@ class WeightOptimizer
       WeightOptimizer& operator=( const WeightOptimizer& ) = delete;
     
       //! Get parameter dictionary.
    -  virtual void get_status( DictionaryDatum& d ) const;
    +  virtual void get_status( dictionary& d ) const;
     
       //! Update values in parameter dictionary.
    -  virtual void set_status( const DictionaryDatum& d );
    +  virtual void set_status( const dictionary& d );
     
       //! Return optimized weight based on current weight.
       double optimized_weight( const WeightOptimizerCommonProperties& cp,
    @@ -303,8 +303,8 @@ class WeightOptimizerAdam : public WeightOptimizer
       //! Assignment operator.
       WeightOptimizerAdam& operator=( const WeightOptimizerAdam& ) = delete;
     
    -  void get_status( DictionaryDatum& d ) const override;
    -  void set_status( const DictionaryDatum& d ) override;
    +  void get_status( dictionary& d ) const override;
    +  void set_status( const dictionary& d ) override;
     
     private:
       double optimize_( const WeightOptimizerCommonProperties& cp, double weight, size_t current_opt_step ) override;
    @@ -334,8 +334,8 @@ class WeightOptimizerCommonPropertiesAdam : public WeightOptimizerCommonProperti
       WeightOptimizerCommonProperties* clone() const override;
       WeightOptimizer* get_optimizer() const override;
     
    -  void get_status( DictionaryDatum& d ) const override;
    -  void set_status( const DictionaryDatum& d ) override;
    +  void get_status( dictionary& d ) const override;
    +  void set_status( const dictionary& d ) override;
     
       std::string
       get_name() const override
    diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp
    index e5e449fc71..276ebfd1c6 100644
    --- a/models/weight_recorder.cpp
    +++ b/models/weight_recorder.cpp
    @@ -30,7 +30,6 @@
     #include "event_delivery_manager_impl.h"
     #include "kernel_manager.h"
     #include "model_manager_impl.h"
    -#include "nest_datums.h"
     #include "nest_impl.h"
     #include "node_collection.h"
     
    diff --git a/nestkernel/CMakeLists.txt b/nestkernel/CMakeLists.txt
    index d3785dc86c..ac2ffb5a10 100644
    --- a/nestkernel/CMakeLists.txt
    +++ b/nestkernel/CMakeLists.txt
    @@ -40,7 +40,7 @@ set ( nestkernel_sources
           event.h event.cpp
           exceptions.h exceptions.cpp
           genericmodel.h genericmodel_impl.h
    -      node_collection.h node_collection_impl.h node_collection.cpp
    +      node_collection.h node_collection.cpp
           generic_factory.h
           histentry.h histentry.cpp
           model.h model.cpp
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index e51fdd65f2..188c3e1ca5 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -62,24 +62,24 @@ nest::ConnBuilder::ConnBuilder( const std::string& primary_rule,
       NodeCollectionPTR third,
       const dictionary& conn_spec,
       const dictionary& third_conn_spec,
    -  const std::map< Name, std::vector< dictionary > >& syn_specs )
    +  const std::map< std::string, std::vector< dictionary > >& syn_specs )
       : third_in_builder_( new ThirdInBuilder( sources,
         third,
         third_conn_spec,
    -    const_cast< std::map< Name, std::vector< dictionary > >& >( syn_specs )[ names::third_in ] ) )
    +    const_cast< std::map< std::string, std::vector< dictionary > >& >( syn_specs )[ names::third_in ] ) )
       , third_out_builder_( kernel().connection_manager.get_third_conn_builder( third_rule,
           third,
           targets,
           third_in_builder_,
           third_conn_spec,
           // const_cast here seems required, clang complains otherwise; try to clean up when Datums disappear
    -      const_cast< std::map< Name, std::vector< dictionary > >& >( syn_specs )[ names::third_out ] ) )
    +      const_cast< std::map< std::string, std::vector< dictionary > >& >( syn_specs )[ names::third_out ] ) )
       , primary_builder_( kernel().connection_manager.get_conn_builder( primary_rule,
           sources,
           targets,
           third_out_builder_,
           conn_spec,
    -      const_cast< std::map< Name, std::vector< dictionary > >& >( syn_specs )[ names::primary ] ) )
    +      const_cast< std::map< std::string, std::vector< dictionary > >& >( syn_specs )[ names::primary ] ) )
     {
     }
     
    @@ -794,10 +794,10 @@ nest::ThirdBernoulliWithPoolBuilder::ThirdBernoulliWithPoolBuilder( const NodeCo
       , targets_per_third_( targets->size() / third->size() )
       , pools_( kernel().vp_manager.get_num_threads(), nullptr )
     {
    -  updateValue< double >( conn_spec, names::p, p_ );
    -  updateValue< long >( conn_spec, names::pool_size, pool_size_ );
    +  conn_spec.update_value( names::p, p_ );
    +  conn_spec.update_value( names::pool_size, pool_size_ );
       std::string pool_type;
    -  if ( updateValue< std::string >( conn_spec, names::pool_type, pool_type ) )
    +  if ( conn_spec.update_value( names::pool_type, pool_type ) )
       {
         if ( pool_type == "random" )
         {
    @@ -1968,15 +1968,16 @@ nest::PoissonBuilder::PoissonBuilder( NodeCollectionPTR sources,
       const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
     {
    -  ParameterDatum* pd = dynamic_cast< ParameterDatum* >( ( *conn_spec )[ names::pairwise_avg_num_conns ].datum() );
    +  ParameterPTR pd = conn_spec.get< ParameterPTR >( names::pairwise_avg_num_conns );
       if ( pd )
       {
    -    pairwise_avg_num_conns_ = *pd;
    +    assert( false ); // PYNEST NG requires review
    +    // pairwise_avg_num_conns_ = *pd;
       }
       else
       {
         // Assume pairwise_avg_num_conns is a scalar
    -    const double value = ( *conn_spec )[ names::pairwise_avg_num_conns ];
    +    const double value = conn_spec.get< double >( names::pairwise_avg_num_conns );
         if ( value < 0 )
         {
           throw BadProperty( "Connection parameter 0 ≤ pairwise_avg_num_conns required." );
    @@ -2037,9 +2038,10 @@ nest::PoissonBuilder::connect_()
         }
         catch ( std::exception& err )
         {
    +      assert( false ); // PYNEST NG requires review
           // We must create a new exception here, err's lifetime ends at
           // the end of the catch block.
    -      exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      // exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
         }
       } // of omp parallel
     }
    @@ -2085,7 +2087,7 @@ nest::SymmetricBernoulliBuilder::SymmetricBernoulliBuilder( NodeCollectionPTR so
       const dictionary& conn_spec,
       const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
    -  , p_( ( *conn_spec )[ names::p ] )
    +  , p_( conn_spec.get< double >( names::p ) )
     {
       // This connector takes care of symmetric connections on its own
       creates_symmetric_connections_ = true;
    diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h
    index 12e4c72d7b..577c04ca56 100644
    --- a/nestkernel/conn_builder.h
    +++ b/nestkernel/conn_builder.h
    @@ -484,7 +484,7 @@ class ConnBuilder
         NodeCollectionPTR third,
         const dictionary& conn_spec,
         const dictionary& third_conn_spec,
    -    const std::map< Name, std::vector< dictionary > >& syn_specs );
    +    const std::map< std::string, std::vector< dictionary > >& syn_specs );
     
       ~ConnBuilder();
     
    @@ -742,7 +742,7 @@ class PoissonBuilder : public BipartiteConnBuilder
     
     private:
       void inner_connect_( const int, RngPtr, Node*, size_t );
    -  ParameterDatum pairwise_avg_num_conns_; //!< Mean number of connections
    +  ParameterPTR pairwise_avg_num_conns_; //!< Mean number of connections
     };
     
     class SymmetricBernoulliBuilder : public BipartiteConnBuilder
    diff --git a/nestkernel/conn_builder_factory.h b/nestkernel/conn_builder_factory.h
    index 9628998bc8..0d60cee18f 100644
    --- a/nestkernel/conn_builder_factory.h
    +++ b/nestkernel/conn_builder_factory.h
    @@ -100,8 +100,8 @@ class GenericThirdConnBuilderFactory
       virtual ThirdOutBuilder* create( NodeCollectionPTR,
         NodeCollectionPTR,
         ThirdInBuilder*,
    -    const DictionaryDatum&,
    -    const std::vector< DictionaryDatum >& ) const = 0;
    +    const dictionary&,
    +    const std::vector< dictionary >& ) const = 0;
     };
     
     /**
    @@ -115,8 +115,8 @@ class ThirdConnBuilderFactory : public GenericThirdConnBuilderFactory
       create( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         ThirdInBuilder* third_in,
    -    const DictionaryDatum& conn_spec,
    -    const std::vector< DictionaryDatum >& syn_specs ) const override
    +    const dictionary& conn_spec,
    +    const std::vector< dictionary >& syn_specs ) const override
       {
         return new ThirdConnBuilderType( sources, targets, third_in, conn_spec, syn_specs );
       }
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 66a359b566..9491dc4430 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -63,7 +63,7 @@
     nest::ConnectionManager::ConnectionManager()
       : connruledict_()
       , connbuilder_factories_()
    -  , thirdconnruledict_( new Dictionary() )
    +  , thirdconnruledict_()
       , thirdconnbuilder_factories_()
       , min_delay_( 1 )
       , max_delay_( 1 )
    @@ -167,14 +167,14 @@ nest::ConnectionManager::finalize( const bool adjust_number_of_threads_or_rng_on
           delete cbf;
         }
         connbuilder_factories_.clear();
    -    connruledict_->clear();
    +    connruledict_.clear();
     
         for ( auto tcbf : thirdconnbuilder_factories_ )
         {
           delete tcbf;
         }
         thirdconnbuilder_factories_.clear();
    -    thirdconnruledict_->clear();
    +    thirdconnruledict_.clear();
       }
     }
     
    @@ -461,7 +461,7 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
         throw BadProperty( String::compose( "Unknown connectivity rule: %1", rule_name ) );
       }
     
    -  ConnBuilder cb( rule, sources, targets, conn_spec, syn_specs );
    +  ConnBuilder cb( rule_name, sources, targets, conn_spec, syn_specs );
     
       // at this point, all entries in conn_spec and syn_spec have been checked
       conn_spec.all_entries_accessed( "Connect", "conn_spec" );
    @@ -819,9 +819,9 @@ void
     nest::ConnectionManager::connect_tripartite( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       NodeCollectionPTR third,
    -  const DictionaryDatum& conn_spec,
    -  const DictionaryDatum& third_conn_spec,
    -  const std::map< Name, std::vector< DictionaryDatum > >& syn_specs )
    +  const dictionary& conn_spec,
    +  const dictionary& third_conn_spec,
    +  const std::map< std::string, std::vector< dictionary > >& syn_specs )
     {
       if ( sources->empty() )
       {
    @@ -836,36 +836,36 @@ nest::ConnectionManager::connect_tripartite( NodeCollectionPTR sources,
         throw IllegalConnection( "Third-factor nodes cannot be an empty NodeCollection" );
       }
     
    -  conn_spec->clear_access_flags();
    +  conn_spec.init_access_flags();
       for ( auto& [ key, syn_spec_array ] : syn_specs )
       {
         for ( auto& syn_spec : syn_spec_array )
         {
    -      syn_spec->clear_access_flags();
    +      syn_spec.init_access_flags();
         }
       }
     
    -  if ( not conn_spec->known( names::rule ) )
    +  if ( not conn_spec.known( names::rule ) )
       {
         throw BadProperty( "The connection specification must contain a connection rule." );
       }
    -  if ( not third_conn_spec->known( names::rule ) )
    +  if ( not third_conn_spec.known( names::rule ) )
       {
         throw BadProperty( "The third-factor connection specification must contain a connection rule." );
       }
     
    -  const std::string primary_rule = static_cast< const std::string >( ( *conn_spec )[ names::rule ] );
    -  const std::string third_rule = static_cast< const std::string >( ( *third_conn_spec )[ names::rule ] );
    +  const std::string primary_rule = conn_spec.get< std::string >( names::rule );
    +  const std::string third_rule = third_conn_spec.get< std::string >( names::rule );
     
       ConnBuilder cb( primary_rule, third_rule, sources, targets, third, conn_spec, third_conn_spec, syn_specs );
     
       // at this point, all entries in conn_spec and syn_spec have been checked
    -  ALL_ENTRIES_ACCESSED( *conn_spec, "Connect", "Unread dictionary entries in conn_spec: " );
    +  conn_spec.all_entries_accessed( "Connect", "Unread dictionary entries in conn_spec: " );
       for ( auto& [ key, syn_spec_array ] : syn_specs )
       {
         for ( auto& syn_spec : syn_spec_array )
         {
    -      ALL_ENTRIES_ACCESSED( *syn_spec, "Connect", "Unread dictionary entries in syn_specs: " );
    +      syn_spec.all_entries_accessed( "Connect", "Unread dictionary entries in syn_specs: " );
         }
       }
     
    diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h
    index af9f38dee4..fc8527236c 100644
    --- a/nestkernel/connection_manager.h
    +++ b/nestkernel/connection_manager.h
    @@ -195,9 +195,9 @@ class ConnectionManager : public ManagerInterface
       void connect_tripartite( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         NodeCollectionPTR third,
    -    const DictionaryDatum& connectivity,
    -    const DictionaryDatum& third_connectivity,
    -    const std::map< Name, std::vector< DictionaryDatum > >& synapse_specs );
    +    const dictionary& connectivity,
    +    const dictionary& third_connectivity,
    +    const std::map< std::string, std::vector< dictionary > >& synapse_specs );
     
       size_t find_connection( const size_t tid, const synindex syn_id, const size_t snode_id, const size_t tnode_id );
     
    @@ -645,7 +645,7 @@ class ConnectionManager : public ManagerInterface
       //! ConnBuilder factories, indexed by connruledict_ elements.
       std::vector< GenericBipartiteConnBuilderFactory* > connbuilder_factories_;
     
    -  DictionaryDatum thirdconnruledict_; //!< Dictionary for third-factor connection rules.
    +  dictionary thirdconnruledict_; //!< Dictionary for third-factor connection rules.
     
       //! Third-factor ConnBuilder factories, indexed by thirdconnruledict_ elements.
       std::vector< GenericThirdConnBuilderFactory* > thirdconnbuilder_factories_;
    diff --git a/nestkernel/connection_manager_impl.h b/nestkernel/connection_manager_impl.h
    index 4f70860e31..f40ed77e27 100644
    --- a/nestkernel/connection_manager_impl.h
    +++ b/nestkernel/connection_manager_impl.h
    @@ -55,12 +55,12 @@ template < typename ThirdConnBuilder >
     void
     ConnectionManager::register_third_conn_builder( const std::string& name )
     {
    -  assert( not thirdconnruledict_->known( name ) );
    +  assert( not thirdconnruledict_.known( name ) );
       GenericThirdConnBuilderFactory* cb = new ThirdConnBuilderFactory< ThirdConnBuilder >();
       assert( cb );
       const int id = thirdconnbuilder_factories_.size();
       thirdconnbuilder_factories_.push_back( cb );
    -  thirdconnruledict_->insert( name, id );
    +  thirdconnruledict_[ name ] = id;
     }
     
     inline void
    diff --git a/nestkernel/connector_model.h b/nestkernel/connector_model.h
    index dfa6a0f88e..d8dfd1e8a0 100644
    --- a/nestkernel/connector_model.h
    +++ b/nestkernel/connector_model.h
    @@ -195,7 +195,7 @@ class GenericConnectorModel : public ConnectorModel
       size_t get_syn_id() const override;
       void set_syn_id( synindex syn_id ) override;
     
    -  void check_synapse_params( const DictionaryDatum& syn_spec ) const override;
    +  void check_synapse_params( const dictionary& syn_spec ) const override;
     
       SecondaryEvent*
       get_secondary_event() override
    diff --git a/nestkernel/connector_model_impl.h b/nestkernel/connector_model_impl.h
    index 6face7a250..032293296c 100644
    --- a/nestkernel/connector_model_impl.h
    +++ b/nestkernel/connector_model_impl.h
    @@ -138,16 +138,16 @@ GenericConnectorModel< ConnectionT >::set_status( const dictionary& d )
     
     template < typename ConnectionT >
     void
    -GenericConnectorModel< ConnectionT >::check_synapse_params( const DictionaryDatum& syn_spec ) const
    +GenericConnectorModel< ConnectionT >::check_synapse_params( const dictionary& syn_spec ) const
     {
       // This is called just once per Connect() call, so we need not worry much about performance.
       // We get a dictionary with synapse default values and check if any of its keys are in syn_spec.
    -  DictionaryDatum dummy( new Dictionary );
    +  dictionary dummy;
       cp_.get_status( dummy );
     
    -  for ( [[maybe_unused]] const auto& [ key, val ] : *syn_spec )
    +  for ( [[maybe_unused]] const auto& [ key, val ] : syn_spec )
       {
    -    if ( dummy->known( key ) )
    +    if ( dummy.known( key ) )
         {
           throw NotImplemented(
             String::compose( "Synapse parameter \"%1\" can only be set via SetDefaults() or CopyModel().", key ) );
    diff --git a/nestkernel/eprop_archiving_node.cpp b/nestkernel/eprop_archiving_node.cpp
    index f607ca34ec..9386c2e6b6 100644
    --- a/nestkernel/eprop_archiving_node.cpp
    +++ b/nestkernel/eprop_archiving_node.cpp
    @@ -25,9 +25,6 @@
     #include "eprop_archiving_node_impl.h"
     #include "kernel_manager.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    diff --git a/nestkernel/eprop_archiving_node.h b/nestkernel/eprop_archiving_node.h
    index 187b22341b..c4ce2becb5 100644
    --- a/nestkernel/eprop_archiving_node.h
    +++ b/nestkernel/eprop_archiving_node.h
    @@ -29,9 +29,6 @@
     #include "nest_types.h"
     #include "node.h"
     
    -// sli
    -#include "dictdatum.h"
    -
     namespace nest
     {
     
    diff --git a/nestkernel/eprop_archiving_node_impl.h b/nestkernel/eprop_archiving_node_impl.h
    index e2798337a5..3fe9c30b2d 100644
    --- a/nestkernel/eprop_archiving_node_impl.h
    +++ b/nestkernel/eprop_archiving_node_impl.h
    @@ -28,9 +28,6 @@
     // Includes from nestkernel:
     #include "kernel_manager.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index 22e6a36afd..3813f403bb 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -31,6 +31,24 @@
     // Includes from thirdparty:
     #include "compose.hpp"
     
    +
    +nest::WrappedThreadException::WrappedThreadException( const std::exception& exc )
    +  : KernelException( exc.what() )
    +{
    +  /* PYNEST NG: Review
    +  KernelException const* se = dynamic_cast< KernelException const* >( &exc );
    +  if ( se )
    +  {
    +    message_ = se->message();
    +  }
    +  else
    +  {
    +    message_ = std::string( "C++ exception: " ) + exc.what();
    +  }
    +  */
    +}
    +
    +
     std::string
     nest::UnknownModelName::compose_msg_( const std::string& model_name ) const
     {
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 6a66331890..bd61b14199 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -85,6 +85,25 @@ class KernelException : public std::runtime_error
       }
     };
     
    +/**
    + * Exception to be thrown if loading or unloading a dynamically loaded module fails
    + * @ingroup KernelExceptions
    + */
    +class DynamicModuleManagementError : public KernelException
    +{
    +public:
    +  explicit DynamicModuleManagementError( const std::string& msg )
    +    : KernelException( msg )
    +  {
    +  }
    +
    +  std::string
    +  exception_name() override
    +  {
    +    return "DynamicModuleManagementError";
    +  }
    +};
    +
     /**
      * Exception to be thrown if a feature is unavailable.
      * @ingroup KernelExceptions
    @@ -104,6 +123,23 @@ class NotImplemented : public KernelException
       }
     };
     
    +/**
    + * Class for packaging exceptions thrown in threads.
    + *
    + * This class is used to wrap exceptions thrown in threads.
    + * It essentially packages the message of the wrapped exception,
    + * avoiding the need of a clone() operation for each exception type.
    + */
    +class WrappedThreadException : public KernelException
    +{
    +public:
    +  WrappedThreadException( const std::exception& );
    +  ~WrappedThreadException() throw() override
    +  {
    +  }
    +};
    +
    +
     /**
      * Exception to be thrown if a given type does not match the expected type.
      * @ingroup KernelExceptions
    diff --git a/nestkernel/io_manager.cpp b/nestkernel/io_manager.cpp
    index c8cee48382..89fbf4054f 100644
    --- a/nestkernel/io_manager.cpp
    +++ b/nestkernel/io_manager.cpp
    @@ -83,17 +83,17 @@ IOManager::initialize( const bool adjust_number_of_threads_or_rng_only )
         register_recording_backend< RecordingBackendSIONlib >( "sionlib" );
     #endif
     
    -    DictionaryDatum dict( new Dictionary );
    +    dictionary dict;
         // The properties data_path and data_prefix can be set via environment variables
         char* data_path = std::getenv( "NEST_DATA_PATH" );
         if ( data_path )
         {
    -      ( *dict )[ names::data_path ] = std::string( data_path );
    +      dict[ names::data_path ] = std::string( data_path );
         }
         char* data_prefix = std::getenv( "NEST_DATA_PREFIX" );
         if ( data_prefix )
         {
    -      ( *dict )[ names::data_prefix ] = std::string( data_prefix );
    +      dict[ names::data_prefix ] = std::string( data_prefix );
         }
     
         set_data_path_prefix_( dict );
    diff --git a/nestkernel/io_manager.h b/nestkernel/io_manager.h
    index 1b9c52c3ad..99e71bdddb 100644
    --- a/nestkernel/io_manager.h
    +++ b/nestkernel/io_manager.h
    @@ -56,11 +56,6 @@ class IOManager : public ManagerInterface
       void set_status( const dictionary& ) override;
       void get_status( dictionary& ) override;
     
    -  void change_number_of_threads() override;
    -
    -  void set_status( const dictionary& ) override;
    -  void get_status( dictionary& ) override;
    -
       void set_recording_backend_status( std::string, const dictionary& );
       dictionary get_recording_backend_status( std::string );
     
    diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h
    index dc5b4f7af7..63e2b1147f 100644
    --- a/nestkernel/layer_impl.h
    +++ b/nestkernel/layer_impl.h
    @@ -108,7 +108,7 @@ Layer< D >::get_status( dictionary& d, NodeCollection const* nc ) const
       {
         // This is for backward compatibility with some tests and scripts
         // TODO: Rename parameter
    -    ( *d )[ names::network_size ] = nc->size();
    +    d[ names::network_size ] = nc->size();
       }
     }
     
    diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp
    index afaad6e2c2..6af6fb62e1 100644
    --- a/nestkernel/model_manager.cpp
    +++ b/nestkernel/model_manager.cpp
    @@ -136,7 +136,7 @@ ModelManager::get_status( dictionary& dict )
     }
     
     void
    -ModelManager::copy_model( Name old_name, Name new_name, const dictionary& params )
    +ModelManager::copy_model( const std::string& old_name, const std::string& new_name, const dictionary& params )
     {
       if ( modeldict_.known( new_name ) or synapsedict_.known( new_name ) )
       {
    @@ -174,7 +174,6 @@ ModelManager::register_node_model_( Model* model )
     
       node_models_.push_back( model );
       modeldict_[ name ] = id;
    -  modeldict_->insert( name, id );
     
     #pragma omp parallel
       {
    @@ -186,7 +185,7 @@ ModelManager::register_node_model_( Model* model )
     }
     
     void
    -ModelManager::copy_node_model_( const size_t old_id, Name new_name, const dictionary& params )
    +ModelManager::copy_node_model_( const size_t old_id, const std::string& new_name, const dictionary& params )
     {
       Model* old_model = get_node_model( old_id );
       old_model->deprecation_warning( "CopyModel" );
    @@ -208,7 +207,7 @@ ModelManager::copy_node_model_( const size_t old_id, Name new_name, const dictio
     }
     
     void
    -ModelManager::copy_connection_model_( const size_t old_id, Name new_name, const dictionary& params )
    +ModelManager::copy_connection_model_( const size_t old_id, const std::string& new_name, const dictionary& params )
     {
       kernel().vp_manager.assert_single_threaded();
     
    @@ -227,8 +226,7 @@ ModelManager::copy_connection_model_( const size_t old_id, Name new_name, const
     #pragma omp parallel
       {
         const size_t thread_id = kernel().vp_manager.get_thread_id();
    -    connection_models_.at( thread_id )
    -      .push_back( get_connection_model( old_id, thread_id ).clone( new_name.toString(), new_id ) );
    +    connection_models_.at( thread_id ).push_back( get_connection_model( old_id, thread_id ).clone( new_name, new_id ) );
     
         kernel().connection_manager.resize_connections();
       }
    @@ -238,7 +236,7 @@ ModelManager::copy_connection_model_( const size_t old_id, Name new_name, const
     
     
     bool
    -ModelManager::set_model_defaults( std::string name, dictionary params )
    +ModelManager::set_model_defaults( const std::string& name, const dictionary& params )
     {
       size_t id;
       if ( modeldict_.known( name ) )
    @@ -396,7 +394,7 @@ ModelManager::clear_connection_models_()
         connection_models_[ t ].clear();
       }
       connection_models_.clear();
    -  synapsedict_->clear();
    +  synapsedict_.clear();
     }
     
     void
    diff --git a/nestkernel/model_manager.h b/nestkernel/model_manager.h
    index 4224bfde75..0f35f7ef76 100644
    --- a/nestkernel/model_manager.h
    +++ b/nestkernel/model_manager.h
    @@ -121,7 +121,7 @@ class ModelManager : public ManagerInterface
        * @param params default parameters of new model.
        * @see copy_node_model_, copy_connection_model_
        */
    -  void copy_model( Name old_name, Name new_name, const dictionary& params );
    +  void copy_model( const std::string& old_name, const std::string& new_name, const dictionary& params );
     
       /**
        * Set the default parameters of a model.
    @@ -131,7 +131,7 @@ class ModelManager : public ManagerInterface
        * @return true if the operation succeeded, else false
        * @see set_node_defaults_, set_synapse_defaults_
        */
    -  bool set_model_defaults( Name name, const dictionary& params );
    +  bool set_model_defaults( const std::string& name, const dictionary& params );
     
       /**
        * @return The model ID for a Model with a given name
    @@ -195,7 +195,7 @@ class ModelManager : public ManagerInterface
        * @param new_name name of new model.
        * @see copy_model(), copy_connection_model_()
        */
    -  void copy_node_model_( const size_t old_id, Name new_name, const dictionary& params );
    +  void copy_node_model_( const size_t old_id, const std::string& new_name, const dictionary& params );
     
       /**
        * Copy an existing synapse model and register it as a new model.
    @@ -204,7 +204,7 @@ class ModelManager : public ManagerInterface
        * @param new_name name of new model.
        * @see copy_model(), copy_node_model_()
        */
    -  void copy_connection_model_( const size_t old_id, Name new_name, const dictionary& params );
    +  void copy_connection_model_( const size_t old_id, const std::string& new_name, const dictionary& params );
     
       /**
        * Set the default parameters of a model.
    diff --git a/nestkernel/model_manager_impl.h b/nestkernel/model_manager_impl.h
    index 06e6b84846..1a729e2abd 100644
    --- a/nestkernel/model_manager_impl.h
    +++ b/nestkernel/model_manager_impl.h
    @@ -81,7 +81,7 @@ ModelManager::register_specific_connection_model_( const std::string& name )
     {
       kernel().vp_manager.assert_single_threaded();
     
    -  if ( synapsedict_->known( name ) )
    +  if ( synapsedict_.known( name ) )
       {
         std::string msg =
           String::compose( "A synapse type called '%1' already exists.\nPlease choose a different name!", name );
    @@ -97,7 +97,7 @@ ModelManager::register_specific_connection_model_( const std::string& name )
         throw KernelException( "Synapse model count exceeded" );
       }
     
    -  synapsedict_->insert( name, new_syn_id );
    +  synapsedict_[ name ] = new_syn_id;
     
     #pragma omp parallel
       {
    diff --git a/nestkernel/module_manager.cpp b/nestkernel/module_manager.cpp
    index 57c668da9b..8a9a70b55f 100644
    --- a/nestkernel/module_manager.cpp
    +++ b/nestkernel/module_manager.cpp
    @@ -31,9 +31,6 @@
     #include "kernel_manager.h"
     #include "nest_extension_interface.h"
     
    -// Includes from sli:
    -#include "arraydatum.h"
    -
     // Includes from thirdparty:
     #include "compose.hpp"
     
    @@ -96,18 +93,18 @@ ModuleManager::reinitialize_dynamic_modules()
     }
     
     void
    -ModuleManager::get_status( DictionaryDatum& d )
    +ModuleManager::get_status( dictionary& d )
     {
    -  ArrayDatum loaded;
    +  std::vector< std::string > loaded;
       for ( const auto& [ name, module_info ] : modules_ )
       {
    -    loaded.push_back( new LiteralDatum( name ) );
    +    loaded.emplace_back( name );
       }
    -  ( *d )[ names::modules ] = loaded;
    +  d[ names::modules ] = loaded;
     }
     
     void
    -ModuleManager::set_status( const DictionaryDatum& d )
    +ModuleManager::set_status( const dictionary& d )
     {
     }
     
    diff --git a/nestkernel/module_manager.h b/nestkernel/module_manager.h
    index 107ed9ed65..f987646ed7 100644
    --- a/nestkernel/module_manager.h
    +++ b/nestkernel/module_manager.h
    @@ -33,9 +33,6 @@
     // Includes from nestkernel:
     #include "manager_interface.h"
     
    -// Includes from sli:
    -#include "dictutils.h"
    -
     // DynamicLoaderModule defined only if libltdl is available
     #ifdef HAVE_LIBLTDL
     #include <ltdl.h>
    @@ -58,8 +55,8 @@ class ModuleManager : public ManagerInterface
       //! To be called after change of number of threads to re-register components provided by modules
       void reinitialize_dynamic_modules();
     
    -  void get_status( DictionaryDatum& ) override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) override;
    +  void set_status( const dictionary& ) override;
     
       void install( const std::string& name );
     
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 2c0fcf65bf..309658700b 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -29,7 +29,6 @@
     #include "exceptions.h"
     #include "kernel_manager.h"
     #include "mpi_manager_impl.h"
    -#include "node_collection_impl.h"
     #include "parameter.h"
     
     #include "sp_manager.h"
    @@ -51,8 +50,6 @@
     #include "config.h"
     #include "dictionary.h"
     
    -#include "modelsmodule.h"
    -
     namespace nest
     {
     
    @@ -105,8 +102,6 @@ init_nest( int* argc, char** argv[] )
       kernel().sp_manager.register_growth_curve< GrowthCurveSigmoid >( "sigmoid" );
       kernel().sp_manager.register_growth_curve< GrowthCurveGaussian >( "gaussian" );
       kernel().sp_manager.register_growth_curve< GrowthCurveLinear >( "linear" );
    -
    -  register_stuff();
     }
     
     void
    @@ -137,12 +132,6 @@ set_verbosity( severity_t s )
       kernel().logging_manager.set_logging_level( s );
     }
     
    -void
    -enable_dryrun_mode( const size_t n_procs )
    -{
    -  kernel().mpi_manager.set_num_processes( n_procs );
    -}
    -
     void
     enable_structural_plasticity()
     {
    @@ -256,12 +245,13 @@ set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params )
       }
       else if ( nc->size() == params.size() )
       {
    -    for ( auto it = nc->begin(); it < nc->end(); ++it )
    +    size_t idx = 0;
    +    for ( auto const& node : *nc )
         {
    -      size_t i = ( *it ).lid;
    -      params[ i ].init_access_flags();
    -      kernel().node_manager.set_status( ( *it ).node_id, params[ i ] );
    -      params[ i ].all_entries_accessed( "NodeCollection.set()", "params" );
    +      params[ idx ].init_access_flags();
    +      kernel().node_manager.set_status( node.node_id, params[ idx ] );
    +      params[ idx ].all_entries_accessed( "NodeCollection.set()", "params" );
    +      ++idx;
         }
       }
       else
    @@ -459,7 +449,7 @@ contains( const NodeCollectionPTR nc, const size_t node_id )
     long
     find( const NodeCollectionPTR nc, size_t node_id )
     {
    -  return nc->get_lid( node_id );
    +  return nc->get_nc_index( node_id );
     }
     
     dictionary
    @@ -470,7 +460,9 @@ get_metadata( const NodeCollectionPTR nc )
       // Fill the status dictionary only if the NodeCollection has valid metadata.
       if ( meta.get() )
       {
    -    meta->get_status( status_dict );
    +    /* PYNESTNG NEEDS REVIEW */
    +    // meta->get_status( status_dict, nc );
    +    assert( false );
         slice_positions_if_sliced_nc( status_dict, nc );
         status_dict[ names::network_size ] = nc->size();
       }
    @@ -495,13 +487,13 @@ disconnect( NodeCollectionPTR sources,
       kernel().sp_manager.disconnect( sources, targets, connectivity, synapse_params );
     }
     
    -
    +void
     connect_tripartite( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       NodeCollectionPTR third,
    -  const DictionaryDatum& connectivity,
    -  const DictionaryDatum& third_connectivity,
    -  const std::map< Name, std::vector< DictionaryDatum > >& synapse_specs )
    +  const dictionary& connectivity,
    +  const dictionary& third_connectivity,
    +  const std::map< std::string, std::vector< dictionary > >& synapse_specs )
     {
       kernel().connection_manager.connect_tripartite(
         sources, targets, third, connectivity, third_connectivity, synapse_specs );
    @@ -810,15 +802,21 @@ slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR nc )
         {
           std::vector< std::vector< double > > sliced_points;
           // Iterate only local nodes
    -      NodeCollection::const_iterator nc_begin = nc->has_proxies() ? nc->MPI_local_begin() : nc->begin();
    +      NodeCollection::const_iterator nc_begin = nc->has_proxies() ? nc->rank_local_begin() : nc->begin();
           NodeCollection::const_iterator nc_end = nc->end();
           for ( auto node = nc_begin; node < nc_end; ++node )
           {
             // Because the local ID also includes non-local nodes, it must be adapted to represent
             // the index for the local node position.
    +        /*
    +         PYNEST-NG NEEDS review
    +         */
    +        assert( false );
    +        /*
             const auto index =
               static_cast< size_t >( std::floor( ( *node ).lid / kernel().mpi_manager.get_num_processes() ) );
             sliced_points.push_back( positions[ index ] );
    +         */
           }
           dict[ names::positions ] = sliced_points;
         }
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 5301727495..0ebff763f0 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -59,8 +59,6 @@ void reset_kernel();
     severity_t get_verbosity();
     void set_verbosity( severity_t s );
     
    -void enable_dryrun_mode( const size_t n_procs );
    -
     void enable_structural_plasticity();
     void disable_structural_plasticity();
     
    @@ -148,9 +146,9 @@ void disconnect( NodeCollectionPTR sources,
     void connect_tripartite( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       NodeCollectionPTR third,
    -  const DictionaryDatum& connectivity,
    -  const DictionaryDatum& third_connectivity,
    -  const std::map< Name, std::vector< DictionaryDatum > >& synapse_specs );
    +  const dictionary& connectivity,
    +  const dictionary& third_connectivity,
    +  const std::map< std::string, std::vector< dictionary > >& synapse_specs );
     
     /**
      * @brief Connect arrays of node IDs one-to-one
    diff --git a/nestkernel/nest_extension_interface.h b/nestkernel/nest_extension_interface.h
    index ff4d519a21..f169fcdfae 100644
    --- a/nestkernel/nest_extension_interface.h
    +++ b/nestkernel/nest_extension_interface.h
    @@ -37,7 +37,6 @@
     #include "model_manager_impl.h"
     #include "nest.h"
     #include "nest_impl.h"
    -#include "nestmodule.h"
     #include "sp_manager_impl.h"
     #include "target_identifier.h"
     
    diff --git a/nestkernel/nest_names.h b/nestkernel/nest_names.h
    index d8fdc716e6..8246ca3fc1 100644
    --- a/nestkernel/nest_names.h
    +++ b/nestkernel/nest_names.h
    @@ -249,6 +249,7 @@ const std::string gamma( "gamma" );
     const std::string gamma_shape( "gamma_shape" );
     const std::string gaussian( "gaussian" );
     const std::string global_id( "global_id" );
    +const std::string global_max_spikes_sent( "global_max_spikes_sent" );
     const std::string grid( "grid" );
     const std::string grid3d( "grid3d" );
     const std::string growth_curve( "growth_curve" );
    @@ -343,6 +344,7 @@ const std::string model( "model" );
     const std::string model_id( "model_id" );
     const std::string modules( "modules" );
     const std::string mpi_address( "mpi_address" );
    +const std::string mpi_rank( "mpi_rank " );
     const std::string ms_per_tic( "ms_per_tic" );
     const std::string mu( "mu" );
     const std::string mu_minus( "mu_minus" );
    @@ -363,6 +365,7 @@ const std::string n_receptors( "n_receptors" );
     const std::string n_synapses( "n_synapses" );
     const std::string network_size( "network_size" );
     const std::string neuron( "neuron" );
    +const std::string new_buffer_size( "new_buffer_size " );
     const std::string next_readout_time( "next_readout_time" );
     const std::string no_synapses( "no_synapses" );
     const std::string node_models( "node_models" );
    diff --git a/nestkernel/node_collection.cpp b/nestkernel/node_collection.cpp
    index ba6b90fd1a..8c3a2f5a9d 100644
    --- a/nestkernel/node_collection.cpp
    +++ b/nestkernel/node_collection.cpp
    @@ -29,7 +29,6 @@
     #include "kernel_manager.h"
     #include "mpi_manager_impl.h"
     #include "node.h"
    -#include "node_collection_impl.h"
     #include "vp_manager_impl.h"
     
     // C++ includes:
    @@ -318,50 +317,6 @@ NodeCollection::NodeCollection()
     {
     }
     
    -// NodeCollectionPTR
    -// NodeCollection::create( const IntVectorDatum& node_ids_datum )
    -// {
    -//   if ( node_ids_datum->empty() )
    -//   {
    -//     return NodeCollection::create_();
    -//   }
    -
    -//   std::vector< size_t > node_ids;
    -//   node_ids.reserve( node_ids_datum->size() );
    -//   for ( const auto& datum : *node_ids_datum )
    -//   {
    -//     node_ids.push_back( static_cast< size_t >( getValue< long >( datum ) ) );
    -//   }
    -
    -//   if ( not std::is_sorted( node_ids.begin(), node_ids.end() ) )
    -//   {
    -//     throw BadProperty( "Node IDs must be sorted in ascending order" );
    -//   }
    -//   return NodeCollection::create_( node_ids );
    -// }
    -
    -// NodeCollectionPTR
    -// NodeCollection::create( const TokenArray& node_ids_array )
    -// {
    -//   if ( node_ids_array.empty() )
    -//   {
    -//     return NodeCollection::create_();
    -//   }
    -
    -//   std::vector< size_t > node_ids;
    -//   node_ids.reserve( node_ids_array.size() );
    -//   for ( const auto& node_id_token : node_ids_array )
    -//   {
    -//     node_ids.push_back( static_cast< size_t >( getValue< long >( node_id_token ) ) );
    -//   }
    -
    -//   if ( not std::is_sorted( node_ids.begin(), node_ids.end() ) )
    -//   {
    -//     throw BadProperty( "Node IDs must be sorted in ascending order" );
    -//   }
    -//   return NodeCollection::create_( node_ids );
    -// }
    -
     NodeCollectionPTR
     NodeCollection::create( const size_t node_id )
     {
    @@ -379,6 +334,20 @@ NodeCollection::create( const Node* node )
       return NodeCollection::create_();
     }
     
    +NodeCollectionPTR
    +NodeCollection::create( const std::vector< size_t >& node_ids_vector )
    +{
    +  if ( node_ids_vector.empty() )
    +  {
    +    return NodeCollection::create_();
    +  }
    +  if ( not std::is_sorted( node_ids_vector.begin(), node_ids_vector.end() ) )
    +  {
    +    throw BadProperty( "Indices must be sorted in ascending order" );
    +  }
    +  return NodeCollection::create_( node_ids_vector );
    +}
    +
     NodeCollectionPTR
     NodeCollection::create_()
     {
    @@ -440,7 +409,7 @@ NodeCollection::valid() const
     }
     
     void
    -NodeCollection::get_metadata_status( DictionaryDatum& d ) const
    +NodeCollection::get_metadata_status( dictionary& d ) const
     {
       NodeCollectionMetadataPTR meta = get_metadata();
       if ( not meta )
    @@ -1221,248 +1190,253 @@ NodeCollectionComposite::thread_local_begin( NodeCollectionPTR cp ) const
       {
         return end( cp );
       }
    +}
     
    -  NodeCollectionPTR NodeCollectionComposite::slice( size_t start, size_t end, size_t stride ) const
    +NodeCollectionPTR
    +NodeCollectionComposite::slice( size_t start, size_t end, size_t stride ) const
    +{
    +  if ( not( start < end ) )
       {
    -    if ( not( start < end ) )
    -    {
    -      throw BadParameter( "start < stop required." );
    -    }
    -    if ( not( end <= size() ) )
    -    {
    -      throw BadParameter( "end <= size() required." );
    -    }
    -    if ( not valid() )
    -    {
    -      throw KernelException(
    -        "InvalidNodeCollection: note that ResetKernel invalidates all previously created NodeCollections." );
    -    }
    -
    -    FULL_LOGGING_ONLY( kernel().write_to_dump( "Calling NCC from slice()" ); )
    -    const auto new_composite = NodeCollectionComposite( *this, start, end, stride );
    -    FULL_LOGGING_ONLY( kernel().write_to_dump( "Calling NCC from slice() --- DONE" ); )
    -
    -    if ( stride == 1 and new_composite.first_part_ == new_composite.last_part_ )
    -    {
    -      // Return only the primitive; pass last_elem_+1 because slice() expects end argument
    -      return new_composite.parts_[ new_composite.first_part_ ].slice(
    -        new_composite.first_elem_, new_composite.last_elem_ + 1 );
    -    }
    +    throw BadParameter( "start < stop required." );
    +  }
    +  if ( not( end <= size() ) )
    +  {
    +    throw BadParameter( "end <= size() required." );
    +  }
    +  if ( not valid() )
    +  {
    +    throw KernelException(
    +      "InvalidNodeCollection: note that ResetKernel invalidates all previously created NodeCollections." );
    +  }
     
    -    FULL_LOGGING_ONLY(
    -      kernel().write_to_dump( String::compose( "NewComposite: fp %1, fe %2, lp %3, le %4, sz %5, strd %6",
    -        new_composite.first_part_,
    -        new_composite.first_elem_,
    -        new_composite.last_part_,
    -        new_composite.last_elem_,
    -        new_composite.size_,
    -        new_composite.stride_ ) ); )
    +  FULL_LOGGING_ONLY( kernel().write_to_dump( "Calling NCC from slice()" ); )
    +  const auto new_composite = NodeCollectionComposite( *this, start, end, stride );
    +  FULL_LOGGING_ONLY( kernel().write_to_dump( "Calling NCC from slice() --- DONE" ); )
     
    -    return std::make_shared< NodeCollectionComposite >( new_composite );
    +  if ( stride == 1 and new_composite.first_part_ == new_composite.last_part_ )
    +  {
    +    // Return only the primitive; pass last_elem_+1 because slice() expects end argument
    +    return new_composite.parts_[ new_composite.first_part_ ].slice(
    +      new_composite.first_elem_, new_composite.last_elem_ + 1 );
       }
     
    -  void NodeCollectionComposite::merge_parts_( std::vector< NodeCollectionPrimitive > & parts ) const
    +  FULL_LOGGING_ONLY(
    +    kernel().write_to_dump( String::compose( "NewComposite: fp %1, fe %2, lp %3, le %4, sz %5, strd %6",
    +      new_composite.first_part_,
    +      new_composite.first_elem_,
    +      new_composite.last_part_,
    +      new_composite.last_elem_,
    +      new_composite.size_,
    +      new_composite.stride_ ) ); )
    +
    +  return std::make_shared< NodeCollectionComposite >( new_composite );
    +}
    +
    +void
    +NodeCollectionComposite::merge_parts_( std::vector< NodeCollectionPrimitive >& parts ) const
    +{
    +  bool did_merge = true; // initialize to enter the while loop
    +  size_t last_i = 0;
    +  while ( did_merge ) // if parts is changed, it has to be checked again
       {
    -    bool did_merge = true; // initialize to enter the while loop
    -    size_t last_i = 0;
    -    while ( did_merge ) // if parts is changed, it has to be checked again
    +    did_merge = false;
    +    for ( size_t i = last_i; i < parts.size() - 1; ++i )
         {
    -      did_merge = false;
    -      for ( size_t i = last_i; i < parts.size() - 1; ++i )
    +      if ( parts[ i ].is_contiguous_ascending( parts[ i + 1 ] ) )
           {
    -        if ( parts[ i ].is_contiguous_ascending( parts[ i + 1 ] ) )
    -        {
    -          NodeCollectionPTR merged_primitivesPTR =
    -            parts[ i ] + std::make_shared< NodeCollectionPrimitive >( parts[ i + 1 ] );
    -          auto const* const merged_primitives =
    -            dynamic_cast< NodeCollectionPrimitive const* >( merged_primitivesPTR.get() );
    -
    -          parts[ i ] = *merged_primitives;
    -          parts.erase( parts.begin() + i + 1 );
    -          did_merge = true;
    -          last_i = i;
    -          break;
    -        }
    +        NodeCollectionPTR merged_primitivesPTR =
    +          parts[ i ] + std::make_shared< NodeCollectionPrimitive >( parts[ i + 1 ] );
    +        auto const* const merged_primitives =
    +          dynamic_cast< NodeCollectionPrimitive const* >( merged_primitivesPTR.get() );
    +
    +        parts[ i ] = *merged_primitives;
    +        parts.erase( parts.begin() + i + 1 );
    +        did_merge = true;
    +        last_i = i;
    +        break;
           }
         }
       }
    +}
     
    -  long NodeCollectionComposite::get_nc_index( const size_t node_id ) const
    +long
    +NodeCollectionComposite::get_nc_index( const size_t node_id ) const
    +{
    +  // Check if node is in node collection
    +  if ( node_id < parts_[ first_part_ ][ first_elem_ ] or parts_[ last_part_ ][ last_elem_ ] < node_id )
       {
    -    // Check if node is in node collection
    -    if ( node_id < parts_[ first_part_ ][ first_elem_ ] or parts_[ last_part_ ][ last_elem_ ] < node_id )
    -    {
    -      return -1;
    -    }
    -
    -    // Find part to which node belongs
    -    size_t lower = first_part_;
    -    size_t upper = last_part_;
    -    while ( lower < upper )
    -    {
    -      // Because lower < upper, we are guaranteed that mid < upper
    -      const size_t mid = ( lower + upper ) / 2;
    -
    -      // Because mid < upper <=> mid < last_part_, we do not need to worry about last_elem_
    -      if ( parts_[ mid ][ parts_[ mid ].size() - 1 ] < node_id )
    -      {
    -        lower = mid + 1;
    -      }
    -      // mid == first_part_ is possible, but if node_id is before start_elem_,
    -      // we handled that at the beginning, so here we just check if the node_id
    -      // comes before the mid part
    -      else if ( node_id < parts_[ mid ][ 0 ] )
    -      {
    -        upper = mid - 1;
    -      }
    -      else
    -      {
    -        lower = upper = mid;
    -      }
    -    }
    +    return -1;
    +  }
     
    -    // If node_id is not in the NodeCollection, lower may pass upper in the loop above
    -    // See test_regression_issue-3213.py for an example case.
    -    assert( lower >= upper );
    +  // Find part to which node belongs
    +  size_t lower = first_part_;
    +  size_t upper = last_part_;
    +  while ( lower < upper )
    +  {
    +    // Because lower < upper, we are guaranteed that mid < upper
    +    const size_t mid = ( lower + upper ) / 2;
     
    -    if ( lower > upper or node_id < parts_[ lower ][ 0 ] or parts_[ lower ][ parts_[ lower ].size() - 1 ] < node_id )
    +    // Because mid < upper <=> mid < last_part_, we do not need to worry about last_elem_
    +    if ( parts_[ mid ][ parts_[ mid ].size() - 1 ] < node_id )
         {
    -      // node_id is in a gap of nc
    -      return -1;
    +      lower = mid + 1;
         }
    -
    -    // We now know that lower == upper and that if the node is in this part
    -    // if it is in the node collection. We do not need to check for first/last,
    -    // since we did that above.
    -    const auto part_begin_idx = lower == 0 ? 0 : cumul_abs_size_[ lower - 1 ];
    -    const auto node_idx = part_begin_idx + parts_[ lower ].get_nc_index( node_id );
    -
    -    if ( not is_sliced_ )
    +    // mid == first_part_ is possible, but if node_id is before start_elem_,
    +    // we handled that at the beginning, so here we just check if the node_id
    +    // comes before the mid part
    +    else if ( node_id < parts_[ mid ][ 0 ] )
         {
    -      // Since NC is not sliced, node_idx is the desired index
    -      assert( this->operator[]( node_idx ) == node_id );
    -      return node_idx;
    +      upper = mid - 1;
         }
         else
         {
    -      // We need to take stride into account
    -      const auto distance_from_first = node_idx - first_elem_;
    -
    -      // Exploit that same stride applies to all parts
    -      if ( distance_from_first % stride_ == 0 )
    -      {
    -        const auto sliced_node_idx = distance_from_first / stride_;
    -        assert( this->operator[]( sliced_node_idx ) == node_id );
    -        return sliced_node_idx;
    -      }
    -      else
    -      {
    -        return -1;
    -      }
    +      lower = upper = mid;
         }
       }
     
    -  bool NodeCollectionComposite::has_proxies() const
    +  // If node_id is not in the NodeCollection, lower may pass upper in the loop above
    +  // See test_regression_issue-3213.py for an example case.
    +  assert( lower >= upper );
    +
    +  if ( lower > upper or node_id < parts_[ lower ][ 0 ] or parts_[ lower ][ parts_[ lower ].size() - 1 ] < node_id )
       {
    -    return std::all_of(
    -      parts_.begin(), parts_.end(), []( const NodeCollectionPrimitive& prim ) { return prim.has_proxies(); } );
    +    // node_id is in a gap of nc
    +    return -1;
       }
     
    -  void NodeCollectionComposite::print_me( std::ostream & out ) const
    +  // We now know that lower == upper and that if the node is in this part
    +  // if it is in the node collection. We do not need to check for first/last,
    +  // since we did that above.
    +  const auto part_begin_idx = lower == 0 ? 0 : cumul_abs_size_[ lower - 1 ];
    +  const auto node_idx = part_begin_idx + parts_[ lower ].get_nc_index( node_id );
    +
    +  if ( not is_sliced_ )
    +  {
    +    // Since NC is not sliced, node_idx is the desired index
    +    assert( this->operator[]( node_idx ) == node_id );
    +    return node_idx;
    +  }
    +  else
       {
    -    std::string metadata = parts_[ 0 ].get_metadata().get() ? parts_[ 0 ].get_metadata()->get_type() : "None";
    -    std::string nc = "NodeCollection(";
    -    std::string space( nc.size(), ' ' );
    +    // We need to take stride into account
    +    const auto distance_from_first = node_idx - first_elem_;
     
    -    if ( is_sliced_ )
    +    // Exploit that same stride applies to all parts
    +    if ( distance_from_first % stride_ == 0 )
    +    {
    +      const auto sliced_node_idx = distance_from_first / stride_;
    +      assert( this->operator[]( sliced_node_idx ) == node_id );
    +      return sliced_node_idx;
    +    }
    +    else
         {
    -      size_t current_part = 0;
    -      size_t current_offset = 0;
    -      size_t previous_part = std::numeric_limits< size_t >::infinity();
    -      size_t primitive_last = 0;
    +      return -1;
    +    }
    +  }
    +}
     
    -      size_t primitive_size = 0;
    -      NodeIDTriple first_in_primitive = *begin();
    +bool
    +NodeCollectionComposite::has_proxies() const
    +{
    +  return std::all_of(
    +    parts_.begin(), parts_.end(), []( const NodeCollectionPrimitive& prim ) { return prim.has_proxies(); } );
    +}
     
    -      std::vector< std::string > string_vector;
    +void
    +NodeCollectionComposite::print_me( std::ostream& out ) const
    +{
    +  std::string metadata = parts_[ 0 ].get_metadata().get() ? parts_[ 0 ].get_metadata()->get_type() : "None";
    +  std::string nc = "NodeCollection(";
    +  std::string space( nc.size(), ' ' );
     
    -      out << nc << "metadata=" << metadata << ",";
    +  if ( is_sliced_ )
    +  {
    +    size_t current_part = 0;
    +    size_t current_offset = 0;
    +    size_t previous_part = std::numeric_limits< size_t >::infinity();
    +    size_t primitive_last = 0;
     
    -      const auto end_it = end();
    -      for ( nc_const_iterator it = begin(); it < end_it; ++it )
    +    size_t primitive_size = 0;
    +    NodeIDTriple first_in_primitive = *begin();
    +
    +    std::vector< std::string > string_vector;
    +
    +    out << nc << "metadata=" << metadata << ",";
    +
    +    const auto end_it = end();
    +    for ( nc_const_iterator it = begin(); it < end_it; ++it )
    +    {
    +      std::tie( current_part, current_offset ) = it.get_part_offset();
    +      if ( current_part != previous_part ) // New primitive
           {
    -        std::tie( current_part, current_offset ) = it.get_part_offset();
    -        if ( current_part != previous_part ) // New primitive
    +        if ( it > begin() )
             {
    -          if ( it > begin() )
    +          // Need to count the primitive, so can't start at begin()
    +          out << "\n" + space
    +              << "model=" << kernel().model_manager.get_node_model( first_in_primitive.model_id )->get_name()
    +              << ", size=" << primitive_size << ", ";
    +          if ( primitive_size == 1 )
               {
    -            // Need to count the primitive, so can't start at begin()
    -            out << "\n" + space
    -                << "model=" << kernel().model_manager.get_node_model( first_in_primitive.model_id )->get_name()
    -                << ", size=" << primitive_size << ", ";
    -            if ( primitive_size == 1 )
    -            {
    -              out << "first=" << first_in_primitive.node_id << ", last=" << first_in_primitive.node_id << ";";
    -            }
    -            else
    +            out << "first=" << first_in_primitive.node_id << ", last=" << first_in_primitive.node_id << ";";
    +          }
    +          else
    +          {
    +            out << "first=" << first_in_primitive.node_id << ", last=";
    +            out << primitive_last;
    +            if ( stride_ > 1 )
                 {
    -              out << "first=" << first_in_primitive.node_id << ", last=";
    -              out << primitive_last;
    -              if ( stride_ > 1 )
    -              {
    -                out << ", step=" << stride_ << ";";
    -              }
    +              out << ", step=" << stride_ << ";";
                 }
               }
    -          primitive_size = 1;
    -          first_in_primitive = *it;
    -        }
    -        else
    -        {
    -          ++primitive_size;
             }
    -        primitive_last = ( *it ).node_id;
    -        previous_part = current_part;
    -      }
    -
    -      // Need to also print the last primitive
    -      out << "\n" + space
    -          << "model=" << kernel().model_manager.get_node_model( first_in_primitive.model_id )->get_name()
    -          << ", size=" << primitive_size << ", ";
    -      if ( primitive_size == 1 )
    -      {
    -        out << "first=" << first_in_primitive.node_id << ", last=" << first_in_primitive.node_id;
    +        primitive_size = 1;
    +        first_in_primitive = *it;
           }
           else
           {
    -        out << "first=" << first_in_primitive.node_id << ", last=";
    -        out << primitive_last;
    -        if ( stride_ > 1 )
    -        {
    -          out << ", step=" << stride_;
    -        }
    +        ++primitive_size;
           }
    +      primitive_last = ( *it ).node_id;
    +      previous_part = current_part;
    +    }
    +
    +    // Need to also print the last primitive
    +    out << "\n" + space << "model=" << kernel().model_manager.get_node_model( first_in_primitive.model_id )->get_name()
    +        << ", size=" << primitive_size << ", ";
    +    if ( primitive_size == 1 )
    +    {
    +      out << "first=" << first_in_primitive.node_id << ", last=" << first_in_primitive.node_id;
         }
         else
         {
    -      // Unsliced Composite NodeCollection
    -      out << nc << "metadata=" << metadata << ",";
    -      for ( auto it = parts_.begin(); it < parts_.end(); ++it )
    +      out << "first=" << first_in_primitive.node_id << ", last=";
    +      out << primitive_last;
    +      if ( stride_ > 1 )
           {
    -        if ( it == parts_.end() - 1 )
    -        {
    -          out << "\n" + space;
    -          it->print_primitive( out );
    -        }
    -        else
    -        {
    -          out << "\n" + space;
    -          it->print_primitive( out );
    -          out << ";";
    -        }
    +        out << ", step=" << stride_;
           }
         }
    -    out << ")";
       }
    +  else
    +  {
    +    // Unsliced Composite NodeCollection
    +    out << nc << "metadata=" << metadata << ",";
    +    for ( auto it = parts_.begin(); it < parts_.end(); ++it )
    +    {
    +      if ( it == parts_.end() - 1 )
    +      {
    +        out << "\n" + space;
    +        it->print_primitive( out );
    +      }
    +      else
    +      {
    +        out << "\n" + space;
    +        it->print_primitive( out );
    +        out << ";";
    +      }
    +    }
    +  }
    +  out << ")";
    +}
     
     } // namespace nest
    diff --git a/nestkernel/node_collection.h b/nestkernel/node_collection.h
    index 0a588d6122..8c857bb090 100644
    --- a/nestkernel/node_collection.h
    +++ b/nestkernel/node_collection.h
    @@ -628,8 +628,7 @@ class NodeCollection
        * @param node_ids Array of node IDs from which to create the NodeCollection
        * @return a NodeCollection pointer to the created NodeCollection
        */
    -  template < typename T >
    -  static NodeCollectionPTR create( const std::vector< T >& node_ids );
    +  static NodeCollectionPTR create( const std::vector< size_t >& node_ids );
     
       /**
        * Check to see if the fingerprint of the NodeCollection matches that of the
    @@ -792,7 +791,7 @@ class NodeCollection
       /**
        * Collect metadata into dictionary.
        */
    -  void get_metadata_status( DictionaryDatum& ) const;
    +  void get_metadata_status( dictionary& ) const;
     
       /**
        * return the first stored ID (i.e, ID at index zero) inside the NodeCollection
    @@ -808,9 +807,7 @@ class NodeCollection
     private:
       unsigned long fingerprint_; //!< Unique identity of the kernel that created the NodeCollection
       static NodeCollectionPTR create_();
    -
    -  template < typename T >
    -  static NodeCollectionPTR create_( const std::vector< T >& );
    +  static NodeCollectionPTR create_( const std::vector< size_t >& );
     };
     
     /**
    diff --git a/nestkernel/node_collection_impl.h b/nestkernel/node_collection_impl.h
    deleted file mode 100644
    index e6a232119e..0000000000
    --- a/nestkernel/node_collection_impl.h
    +++ /dev/null
    @@ -1,97 +0,0 @@
    -/*
    - *  node_collection_impl.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef NODE_COLLECTION_IMPL_H
    -#define NODE_COLLECTION_IMPL_H
    -
    -#include "node_collection.h"
    -
    -namespace nest
    -{
    -
    -template < typename T >
    -NodeCollectionPTR
    -NodeCollection::create( const std::vector< T >& node_ids_vector )
    -{
    -  if ( node_ids_vector.empty() )
    -  {
    -    return NodeCollection::create_();
    -  }
    -  if ( not std::is_sorted( node_ids_vector.begin(), node_ids_vector.end() ) )
    -  {
    -    throw BadProperty( "Indices must be sorted in ascending order" );
    -  }
    -  return NodeCollection::create_( node_ids_vector );
    -}
    -
    -template < typename T >
    -NodeCollectionPTR
    -NodeCollection::create_( const std::vector< T >& node_ids )
    -{
    -  size_t current_first = node_ids[ 0 ];
    -  size_t current_last = current_first;
    -  size_t current_model = kernel().modelrange_manager.get_model_id( node_ids[ 0 ] );
    -
    -  std::vector< NodeCollectionPrimitive > parts;
    -
    -  size_t old_node_id = current_first;
    -  for ( auto node_id = ++( node_ids.begin() ); node_id != node_ids.end(); ++node_id )
    -  {
    -    if ( *node_id == old_node_id )
    -    {
    -      throw BadProperty( "All node IDs in a NodeCollection have to be unique" );
    -    }
    -    old_node_id = *node_id;
    -
    -    const size_t next_model = kernel().modelrange_manager.get_model_id( *node_id );
    -
    -    if ( next_model == current_model and *node_id == ( current_last + 1 ) )
    -    {
    -      // node goes in Primitive
    -      ++current_last;
    -    }
    -    else
    -    {
    -      // store Primitive; node goes in new Primitive
    -      parts.emplace_back( current_first, current_last, current_model );
    -      current_first = *node_id;
    -      current_last = current_first;
    -      current_model = next_model;
    -    }
    -  }
    -
    -  // now push last section we opened
    -  parts.emplace_back( current_first, current_last, current_model );
    -
    -  if ( parts.size() == 1 )
    -  {
    -    return std::make_shared< NodeCollectionPrimitive >( parts[ 0 ] );
    -  }
    -  else
    -  {
    -    return std::make_shared< NodeCollectionComposite >( parts );
    -  }
    -}
    -
    -} // namespace nest
    -
    -#endif /* #ifndef NODE_COLLECTION_IMPL_H */
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index 383597ce7b..df86ed2487 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -338,7 +338,7 @@ NodeManager::clear_node_collection_container()
     NodeCollectionPTR
     NodeManager::get_nodes( const dictionary& params, const bool local_only )
     {
    -  std::vector< long > nodes;
    +  std::vector< size_t > nodes;
     
       if ( params.empty() )
       {
    @@ -393,8 +393,10 @@ NodeManager::get_nodes( const dictionary& params, const bool local_only )
     
       if ( not local_only )
       {
    -    std::vector< long > globalnodes;
    -    kernel().mpi_manager.communicate( nodes, globalnodes );
    +    std::vector< size_t > globalnodes;
    +    // TODO: PYNEST-NG create communicate( vector<size_t>, vector<size_t> )
    +    // kernel().mpi_manager.communicate( nodes, globalnodes );
    +    assert( false );
     
         for ( size_t i = 0; i < globalnodes.size(); ++i )
         {
    @@ -406,7 +408,7 @@ NodeManager::get_nodes( const dictionary& params, const bool local_only )
     
         // get rid of any multiple entries
         std::sort( nodes.begin(), nodes.end() );
    -    std::vector< long >::iterator it;
    +    std::vector< size_t >::iterator it;
         it = std::unique( nodes.begin(), nodes.end() );
         nodes.resize( it - nodes.begin() );
       }
    diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp
    index 1b9a5216c9..0987a0c35d 100644
    --- a/nestkernel/simulation_manager.cpp
    +++ b/nestkernel/simulation_manager.cpp
    @@ -417,7 +417,7 @@ nest::SimulationManager::set_status( const dictionary& d )
     
       // eprop update interval
       double eprop_update_interval_new = 0.0;
    -  if ( updateValue< double >( d, names::eprop_update_interval, eprop_update_interval_new ) )
    +  if ( d.update_value( names::eprop_update_interval, eprop_update_interval_new ) )
       {
         if ( eprop_update_interval_new <= 0 )
         {
    @@ -430,7 +430,7 @@ nest::SimulationManager::set_status( const dictionary& d )
     
       // eprop learning window
       double eprop_learning_window_new = 0.0;
    -  if ( updateValue< double >( d, names::eprop_learning_window, eprop_learning_window_new ) )
    +  if ( d.update_value( names::eprop_learning_window, eprop_learning_window_new ) )
       {
         if ( eprop_learning_window_new <= 0 )
         {
    @@ -446,7 +446,7 @@ nest::SimulationManager::set_status( const dictionary& d )
         eprop_learning_window_ = eprop_learning_window_new;
       }
     
    -  updateValue< bool >( d, names::eprop_reset_neurons_on_update, eprop_reset_neurons_on_update_ );
    +  d.update_value( names::eprop_reset_neurons_on_update, eprop_reset_neurons_on_update_ );
     }
     
     void
    @@ -489,9 +489,9 @@ nest::SimulationManager::get_status( dictionary& d )
       d[ names::time_deliver_secondary_data ] = sw_deliver_secondary_data_.elapsed();
     #endif
     
    -  def< double >( d, names::eprop_update_interval, eprop_update_interval_ );
    -  def< double >( d, names::eprop_learning_window, eprop_learning_window_ );
    -  def< bool >( d, names::eprop_reset_neurons_on_update, eprop_reset_neurons_on_update_ );
    +  d[ names::eprop_update_interval ] = eprop_update_interval_;
    +  d[ names::eprop_learning_window ] = eprop_learning_window_;
    +  d[ names::eprop_reset_neurons_on_update ] = eprop_reset_neurons_on_update_;
     }
     
     void
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index 07ac7b689b..6dd7313e23 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -82,7 +82,7 @@ SPManager::finalize( const bool adjust_number_of_threads_or_rng_only )
           delete gcf;
         }
         growthcurve_factories_.clear();
    -    growthcurvedict_->clear();
    +    growthcurvedict_.clear();
       }
     }
     
    @@ -252,7 +252,7 @@ SPManager::disconnect( NodeCollectionPTR sources,
     
       BipartiteConnBuilder* cb = nullptr;
       conn_spec.init_access_flags();
    -  syn_specs.init_access_flags();
    +  syn_spec.init_access_flags();
     
       if ( not conn_spec.known( names::rule ) )
       {
    @@ -270,7 +270,7 @@ SPManager::disconnect( NodeCollectionPTR sources,
     
         for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ )
         {
    -      std::string syn_model = syn_specs[ 0 ].get< std::string >( names::synapse_model );
    +      std::string syn_model = syn_spec.get< std::string >( names::synapse_model );
           if ( ( *i )->get_synapse_model() == kernel().model_manager.get_synapse_model_id( syn_model ) )
           {
             cb = kernel().connection_manager.get_conn_builder( rule_name,
    @@ -297,7 +297,7 @@ SPManager::disconnect( NodeCollectionPTR sources,
     
       // at this point, all entries in conn_spec and syn_spec have been checked
       conn_spec.all_entries_accessed( "Disconnect", "conn_spec" );
    -  syn_specs[ 0 ].all_entries_accessed( "Disconnect", "syn_spec" );
    +  syn_spec.all_entries_accessed( "Disconnect", "syn_spec" );
     
       // Set flag before calling cb->disconnect() in case exception is thrown after some connections have been removed.
       kernel().connection_manager.set_connections_have_changed();
    diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h
    index 3b042b4b65..b86aae1be8 100644
    --- a/nestkernel/spatial.h
    +++ b/nestkernel/spatial.h
    @@ -100,7 +100,7 @@ class LayerMetadata : public NodeCollectionMetadata
         // compare based on all metadata, irrespective of any slicing
         get_status( dict, /* nc */ nullptr );
         rhs_layer_metadata->get_status( rhs_dict, /* nc */ nullptr );
    -    return *dict == *rhs_dict;
    +    return dict == rhs_dict;
       }
     
     private:
    diff --git a/testsuite/cpptests/CMakeLists.txt b/testsuite/cpptests/CMakeLists.txt
    index 814fb3fa62..4176d49d65 100644
    --- a/testsuite/cpptests/CMakeLists.txt
    +++ b/testsuite/cpptests/CMakeLists.txt
    @@ -22,7 +22,7 @@ if ( HAVE_BOOST )
     
       add_executable( run_all_cpptests run_all.cpp )
     
    -  target_link_libraries( run_all_cpptests ${BOOST_LIBRARIES} nestkernel models )
    +  target_link_libraries( run_all_cpptests ${BOOST_LIBRARIES} nestkernel models OpenMP::OpenMP_CXX )
     
       target_include_directories( run_all_cpptests PRIVATE
         ${PROJECT_SOURCE_DIR}/libnestutil
    
    From bd2636f269b5fd89068ade3434d9cf268b24bc4e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 21 Jan 2025 19:36:00 +0100
    Subject: [PATCH 274/375] NEST module now loads (c++ part)
    
    ---
     nestkernel/model_manager.cpp |  1 -
     nestkernel/nest.cpp          | 18 +-----------------
     2 files changed, 1 insertion(+), 18 deletions(-)
    
    diff --git a/nestkernel/model_manager.cpp b/nestkernel/model_manager.cpp
    index 6af6fb62e1..7669639582 100644
    --- a/nestkernel/model_manager.cpp
    +++ b/nestkernel/model_manager.cpp
    @@ -143,7 +143,6 @@ ModelManager::copy_model( const std::string& old_name, const std::string& new_na
         throw NewModelNameExists( new_name );
       }
     
    -  size_t new_id;
       if ( modeldict_.known( old_name ) )
       {
         const size_t old_id = modeldict_.get< size_t >( old_name );
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 309658700b..9fff174517 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -63,19 +63,7 @@ init_nest( int* argc, char** argv[] )
       kernel().mpi_manager.init_mpi( argc, argv );
       kernel().initialize();
     
    -
    -  // Add connection rules
    -  kernel().connection_manager.register_conn_builder< OneToOneBuilder >( "one_to_one" );
    -  kernel().connection_manager.register_conn_builder< AllToAllBuilder >( "all_to_all" );
    -  kernel().connection_manager.register_conn_builder< FixedInDegreeBuilder >( "fixed_indegree" );
    -  kernel().connection_manager.register_conn_builder< FixedOutDegreeBuilder >( "fixed_outdegree" );
    -  kernel().connection_manager.register_conn_builder< BernoulliBuilder >( "pairwise_bernoulli" );
    -  kernel().connection_manager.register_conn_builder< SymmetricBernoulliBuilder >( "symmetric_pairwise_bernoulli" );
    -  kernel().connection_manager.register_conn_builder< FixedTotalNumberBuilder >( "fixed_total_number" );
    -#ifdef HAVE_LIBNEUROSIM
    -  kernel().connection_manager.register_conn_builder< ConnectionGeneratorBuilder >( "conngen" );
    -#endif
    -
    +  // TODO: register_parameter() and register_mask() should be moved, see #3149
       register_parameter< ConstantParameter >( "constant" );
       register_parameter< UniformParameter >( "uniform" );
       register_parameter< UniformIntParameter >( "uniform_int" );
    @@ -98,10 +86,6 @@ init_nest( int* argc, char** argv[] )
       register_mask< BoxMask< 3 > >();
       register_mask( "doughnut", create_doughnut );
       register_mask< GridMask< 2 > >();
    -
    -  kernel().sp_manager.register_growth_curve< GrowthCurveSigmoid >( "sigmoid" );
    -  kernel().sp_manager.register_growth_curve< GrowthCurveGaussian >( "gaussian" );
    -  kernel().sp_manager.register_growth_curve< GrowthCurveLinear >( "linear" );
     }
     
     void
    
    From 89a6d01ae094506024789f65e906e98ea06c81ca Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 21 Jan 2025 19:42:09 +0100
    Subject: [PATCH 275/375] NEST now fully loads in Python
    
    ---
     pynest/nest/lib/hl_api_connections.py | 3 ---
     1 file changed, 3 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index d0091a6ec8..1c326bc6d3 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -34,7 +34,6 @@
         _process_spatial_projections,
         _process_syn_spec,
     )
    -from .hl_api_helper import is_string
     from .hl_api_nodes import Create
     from .hl_api_parallel_computing import NumProcesses
     from .hl_api_types import (
    @@ -282,7 +281,6 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, return_synapsecollection=F
             return GetConnections(pre, post)
     
     
    -@check_stack
     def TripartiteConnect(pre, post, third, conn_spec, third_factor_conn_spec, syn_specs=None):
         """
         Connect `pre` nodes to `post` nodes and a `third`-factor nodes.
    @@ -403,7 +401,6 @@ def TripartiteConnect(pre, post, third, conn_spec, third_factor_conn_spec, syn_s
         sr("ConnectTripartite_g_g_g_D_D_D")
     
     
    -@check_stack
     def Disconnect(*args, conn_spec=None, syn_spec=None):
         """Disconnect connections in a SynapseCollection, or `pre` neurons from `post` neurons.
     
    
    From 2941e665b525f13fd0f9fbc599b23695ed0728b3 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 21 Jan 2025 20:22:37 +0100
    Subject: [PATCH 276/375] Brunel runs
    
    ---
     libnestutil/nest_types.h             | 2 +-
     nestkernel/conn_builder.cpp          | 2 +-
     nestkernel/connection_manager.cpp    | 4 ++--
     nestkernel/connection_manager_impl.h | 8 ++++----
     4 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/libnestutil/nest_types.h b/libnestutil/nest_types.h
    index 2e37234248..b9ca971d81 100644
    --- a/libnestutil/nest_types.h
    +++ b/libnestutil/nest_types.h
    @@ -129,7 +129,7 @@ __attribute__( ( __unused__ ) ) constexpr size_t invalid_index = std::numeric_li
     /**
      *  For enumerations of synapse types.
      */
    -typedef unsigned int synindex;
    +typedef size_t synindex; // PYNEST-NG check if size_t instead of unsigned int causes problems
     const synindex invalid_synindex = MAX_SYN_ID;
     
     /**
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index 188c3e1ca5..9013daaada 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -1391,7 +1391,7 @@ nest::FixedInDegreeBuilder::FixedInDegreeBuilder( NodeCollectionPTR sources,
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
     {
       // check for potential errors
    -  long n_sources = static_cast< long >( sources_->size() );
    +  const size_t n_sources = sources_->size();
       if ( n_sources == 0 )
       {
         throw BadProperty( "Source array must not be empty." );
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 9491dc4430..69141e8483 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -392,7 +392,7 @@ nest::ConnectionManager::get_conn_builder( const std::string& name,
         throw IllegalConnection( String::compose( "Unknown connection rule '%1'.", name ) );
       }
     
    -  const size_t rule_id = connruledict_.get< int >( name );
    +  const size_t rule_id = connruledict_.get< size_t >( name );
       BipartiteConnBuilder* cb =
         connbuilder_factories_.at( rule_id )->create( sources, targets, third_out, conn_spec, syn_specs );
       assert( cb );
    @@ -412,7 +412,7 @@ nest::ConnectionManager::get_third_conn_builder( const std::string& name,
         throw IllegalConnection( String::compose( "Unknown third-factor connection rule '%1'.", name ) );
       }
     
    -  const size_t rule_id = thirdconnruledict_.get< int >( name );
    +  const size_t rule_id = thirdconnruledict_.get< size_t >( name );
       ThirdOutBuilder* cb =
         thirdconnbuilder_factories_.at( rule_id )->create( sources, targets, third_in, conn_spec, syn_specs );
       assert( cb );
    diff --git a/nestkernel/connection_manager_impl.h b/nestkernel/connection_manager_impl.h
    index f40ed77e27..0306d8da0f 100644
    --- a/nestkernel/connection_manager_impl.h
    +++ b/nestkernel/connection_manager_impl.h
    @@ -46,9 +46,9 @@ ConnectionManager::register_conn_builder( const std::string& name )
       GenericBipartiteConnBuilderFactory* cb = new BipartiteConnBuilderFactory< ConnBuilder >();
       assert( cb );
     
    -  const int id = connbuilder_factories_.size();
    +  const size_t idx = connbuilder_factories_.size();
       connbuilder_factories_.push_back( cb );
    -  connruledict_[ name ] = id;
    +  connruledict_[ name ] = idx;
     }
     
     template < typename ThirdConnBuilder >
    @@ -58,9 +58,9 @@ ConnectionManager::register_third_conn_builder( const std::string& name )
       assert( not thirdconnruledict_.known( name ) );
       GenericThirdConnBuilderFactory* cb = new ThirdConnBuilderFactory< ThirdConnBuilder >();
       assert( cb );
    -  const int id = thirdconnbuilder_factories_.size();
    +  const size_t idx = thirdconnbuilder_factories_.size();
       thirdconnbuilder_factories_.push_back( cb );
    -  thirdconnruledict_[ name ] = id;
    +  thirdconnruledict_[ name ] = idx;
     }
     
     inline void
    
    From cf81acb1c8af03f97e96db6ca067f2f7f7308a76 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 17:47:48 +0100
    Subject: [PATCH 277/375] Cast enum values to long before storing in status
     dict for python compatibility
    
    ---
     models/eprop_readout_bsshslm_2020.h | 4 ++--
     models/iaf_bw_2001.h                | 6 +++---
     models/iaf_bw_2001_exact.h          | 6 +++---
     3 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/models/eprop_readout_bsshslm_2020.h b/models/eprop_readout_bsshslm_2020.h
    index bed5a21058..50dcab260a 100644
    --- a/models/eprop_readout_bsshslm_2020.h
    +++ b/models/eprop_readout_bsshslm_2020.h
    @@ -499,8 +499,8 @@ eprop_readout_bsshslm_2020::get_status( dictionary& d ) const
       d[ names::recordables ] = recordablesMap_.get_list();
     
       dictionary receptor_dict_;
    -  receptor_dict_[ names::readout_signal ] = READOUT_SIG;
    -  receptor_dict_[ names::target_signal ] = TARGET_SIG;
    +  receptor_dict_[ names::readout_signal ] = static_cast< long >( READOUT_SIG );
    +  receptor_dict_[ names::target_signal ] = static_cast< long >( TARGET_SIG );
     
       d[ names::receptor_types ] = receptor_dict_;
     }
    diff --git a/models/iaf_bw_2001.h b/models/iaf_bw_2001.h
    index 288cad00cf..a9497e0784 100644
    --- a/models/iaf_bw_2001.h
    +++ b/models/iaf_bw_2001.h
    @@ -495,9 +495,9 @@ iaf_bw_2001::get_status( dictionary& d ) const
       ArchivingNode::get_status( d );
     
       dictionary receptor_type;
    -  receptor_type[ names::AMPA ] = AMPA;
    -  receptor_type[ names::GABA ] = GABA;
    -  receptor_type[ names::NMDA ] = NMDA;
    +  receptor_type[ names::AMPA ] = static_cast< long >( AMPA );
    +  receptor_type[ names::GABA ] = static_cast< long >( GABA );
    +  receptor_type[ names::NMDA ] = static_cast< long >( NMDA );
       d[ names::receptor_types ] = receptor_type;
     
       d[ names::recordables ] = recordablesMap_.get_list();
    diff --git a/models/iaf_bw_2001_exact.h b/models/iaf_bw_2001_exact.h
    index 4525f3649d..e551759618 100644
    --- a/models/iaf_bw_2001_exact.h
    +++ b/models/iaf_bw_2001_exact.h
    @@ -511,9 +511,9 @@ iaf_bw_2001_exact::get_status( dictionary& d ) const
     
       dictionary receptor_type;
     
    -  receptor_type[ names::AMPA ] = AMPA;
    -  receptor_type[ names::GABA ] = GABA;
    -  receptor_type[ names::NMDA ] = NMDA;
    +  receptor_type[ names::AMPA ] = static_cast< long >( AMPA );
    +  receptor_type[ names::GABA ] = static_cast< long >( GABA );
    +  receptor_type[ names::NMDA ] = static_cast< long >( NMDA );
     
       d[ names::receptor_types ] = receptor_type;
     
    
    From 243b4b852967d7b2ed8c76fd9d97a9c34e384eb2 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 17:48:21 +0100
    Subject: [PATCH 278/375] Remove unnecessary code
    
    ---
     models/weight_recorder.cpp | 3 ---
     1 file changed, 3 deletions(-)
    
    diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp
    index 276ebfd1c6..0dcce3a7b8 100644
    --- a/models/weight_recorder.cpp
    +++ b/models/weight_recorder.cpp
    @@ -53,9 +53,6 @@ nest::weight_recorder::weight_recorder( const weight_recorder& n )
     }
     
     nest::weight_recorder::Parameters_::Parameters_()
    -  // PYNEST-NG: check if " new NodeCollectionPrimitive()" is needed here
    -  : senders_( new NodeCollectionPrimitive() )
    -  , targets_( new NodeCollectionPrimitive() )
     {
     }
     
    
    From 35f456e75f9d0af6a8adc9f03624f8d6d0dfdabd Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 17:48:51 +0100
    Subject: [PATCH 279/375] Update comment
    
    ---
     libnestutil/dictionary_access_flag_manager.h | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h
    index 56de810023..edf27fe79e 100644
    --- a/libnestutil/dictionary_access_flag_manager.h
    +++ b/libnestutil/dictionary_access_flag_manager.h
    @@ -83,7 +83,7 @@ class DictionaryAccessFlagManager
     inline void
     DictionaryAccessFlagManager::init_access_flags( const dictionary& dict )
     {
    -  // TODO PYNEST-NG: Possible performance bottleneck
    +  // TODO PYNEST-NG: Performance bottleneck
     #pragma omp critical( init_access_flags )
       {
         access_flags_[ &dict ] = {};
    @@ -93,7 +93,7 @@ DictionaryAccessFlagManager::init_access_flags( const dictionary& dict )
     inline void
     DictionaryAccessFlagManager::register_access( const dictionary& dict, const key_type_& key )
     {
    -  // TODO PYNEST-NG: Possible performance bottleneck
    +  // TODO PYNEST-NG: Performance bottleneck
     #pragma omp critical( register_access )
       {
         access_flags_[ &dict ].insert( key );
    
    From 204afad6aed7049eabb85a4905ce3434d2be9c08 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 17:56:07 +0100
    Subject: [PATCH 280/375] Converted threaded-exception handling where
     necessary, other fixes
    
    ---
     nestkernel/conn_builder.cpp          |  32 +++----
     nestkernel/conn_builder.h            |   2 +
     nestkernel/connection_creator_impl.h |  16 ++--
     nestkernel/exceptions.cpp            |  17 ----
     nestkernel/exceptions.h              | 130 ++++++++++++---------------
     5 files changed, 78 insertions(+), 119 deletions(-)
    
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index 9013daaada..e26582d76b 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -152,14 +152,8 @@ nest::BipartiteConnBuilder::BipartiteConnBuilder( NodeCollectionPTR sources,
       delays_.resize( syn_specs.size() );
       synapse_params_.resize( syn_specs.size() );
       synapse_model_id_.resize( syn_specs.size() );
    -  // PYNEST-NG: There is no safety net here. If the list of syn_specs
    -  // is sent empty from the Python level, this will segfault. Maybe
    -  // defaults should be filled here on the C++ level in case they are
    -  // not given?
    -  synapse_model_id_[ 0 ] = kernel().model_manager.get_synapse_model_id( "static_synapse" );
       param_dicts_.resize( syn_specs.size() );
     
    -
       // loop through vector of synapse dictionaries, and set synapse parameters
       for ( size_t synapse_indx = 0; synapse_indx < syn_specs.size(); ++synapse_indx )
       {
    @@ -1968,11 +1962,11 @@ nest::PoissonBuilder::PoissonBuilder( NodeCollectionPTR sources,
       const std::vector< dictionary >& syn_specs )
       : BipartiteConnBuilder( sources, targets, third_out, conn_spec, syn_specs )
     {
    -  ParameterPTR pd = conn_spec.get< ParameterPTR >( names::pairwise_avg_num_conns );
    -  if ( pd )
    +
    +  auto p = conn_spec.at( names::pairwise_avg_num_conns );
    +  if ( is_type< std::shared_ptr< nest::Parameter > >( p ) )
       {
    -    assert( false ); // PYNEST NG requires review
    -    // pairwise_avg_num_conns_ = *pd;
    +    pairwise_avg_num_conns_ = boost::any_cast< ParameterPTR >( p );
       }
       else
       {
    @@ -1982,11 +1976,12 @@ nest::PoissonBuilder::PoissonBuilder( NodeCollectionPTR sources,
         {
           throw BadProperty( "Connection parameter 0 ≤ pairwise_avg_num_conns required." );
         }
    -    if ( not allow_multapses_ )
    -    {
    -      throw BadProperty( "Multapses must be allowed for this connection rule." );
    -    }
    -    pairwise_avg_num_conns_ = std::shared_ptr< Parameter >( new ConstantParameter( value ) );
    +    pairwise_avg_num_conns_ = ParameterPTR( new ConstantParameter( value ) );
    +  }
    +
    +  if ( not allow_multapses_ )
    +  {
    +    throw BadProperty( "Multapses must be allowed for this connection rule." );
       }
     }
     
    @@ -2036,12 +2031,9 @@ nest::PoissonBuilder::connect_()
             }
           }
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      assert( false ); // PYNEST NG requires review
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      // exceptions_raised_.at( tid ) = std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      exceptions_raised_.at( tid ) = std::current_exception();
         }
       } // of omp parallel
     }
    diff --git a/nestkernel/conn_builder.h b/nestkernel/conn_builder.h
    index 577c04ca56..7ad7f7391a 100644
    --- a/nestkernel/conn_builder.h
    +++ b/nestkernel/conn_builder.h
    @@ -98,6 +98,7 @@ class BipartiteConnBuilder
         {
           throw KernelException( "Can only retrieve synapse model when one synapse per connection is used." );
         }
    +    assert( not synapse_model_id_.empty() );
         return synapse_model_id_[ 0 ];
       }
     
    @@ -108,6 +109,7 @@ class BipartiteConnBuilder
         {
           throw KernelException( "Can only retrieve default delay when one synapse per connection is used." );
         }
    +    assert( not default_delay_.empty() );
         return default_delay_[ 0 ];
       }
     
    diff --git a/nestkernel/connection_creator_impl.h b/nestkernel/connection_creator_impl.h
    index 8cebf5f450..3660f14d42 100644
    --- a/nestkernel/connection_creator_impl.h
    +++ b/nestkernel/connection_creator_impl.h
    @@ -404,7 +404,7 @@ ConnectionCreator::pairwise_poisson_( Layer< D >& source,
         pool.define( source.get_global_positions_vector( source_nc ) );
       }
     
    -  std::vector< std::shared_ptr< WrappedThreadException > > exceptions_raised_( kernel().vp_manager.get_num_threads() );
    +  std::vector< std::exception_ptr > exceptions_raised_( kernel().vp_manager.get_num_threads() );
     
     #pragma omp parallel
       {
    @@ -434,20 +434,18 @@ ConnectionCreator::pairwise_poisson_( Layer< D >& source,
             }
           } // for target_begin
         }
    -    catch ( std::exception& err )
    +    catch ( ... )
         {
    -      // We must create a new exception here, err's lifetime ends at
    -      // the end of the catch block.
    -      exceptions_raised_.at( thread_id ) =
    -        std::shared_ptr< WrappedThreadException >( new WrappedThreadException( err ) );
    +      exceptions_raised_.at( thread_id ) = std::current_exception();
         }
       } // omp parallel
    +
       // check if any exceptions have been raised
    -  for ( size_t thr = 0; thr < kernel().vp_manager.get_num_threads(); ++thr )
    +  for ( auto eptr : exceptions_raised_ )
       {
    -    if ( exceptions_raised_.at( thr ).get() )
    +    if ( eptr )
         {
    -      throw WrappedThreadException( *( exceptions_raised_.at( thr ) ) );
    +      std::rethrow_exception( eptr );
         }
       }
     }
    diff --git a/nestkernel/exceptions.cpp b/nestkernel/exceptions.cpp
    index 3813f403bb..9284c45056 100644
    --- a/nestkernel/exceptions.cpp
    +++ b/nestkernel/exceptions.cpp
    @@ -32,23 +32,6 @@
     #include "compose.hpp"
     
     
    -nest::WrappedThreadException::WrappedThreadException( const std::exception& exc )
    -  : KernelException( exc.what() )
    -{
    -  /* PYNEST NG: Review
    -  KernelException const* se = dynamic_cast< KernelException const* >( &exc );
    -  if ( se )
    -  {
    -    message_ = se->message();
    -  }
    -  else
    -  {
    -    message_ = std::string( "C++ exception: " ) + exc.what();
    -  }
    -  */
    -}
    -
    -
     std::string
     nest::UnknownModelName::compose_msg_( const std::string& model_name ) const
     {
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index bd61b14199..beeec50651 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -79,7 +79,7 @@ class KernelException : public std::runtime_error
       }
     
       virtual std::string
    -  exception_name()
    +  exception_name() const
       {
         return "KernelException";
       }
    @@ -98,7 +98,7 @@ class DynamicModuleManagementError : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "DynamicModuleManagementError";
       }
    @@ -117,28 +117,12 @@ class NotImplemented : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "NotImplemented";
       }
     };
     
    -/**
    - * Class for packaging exceptions thrown in threads.
    - *
    - * This class is used to wrap exceptions thrown in threads.
    - * It essentially packages the message of the wrapped exception,
    - * avoiding the need of a clone() operation for each exception type.
    - */
    -class WrappedThreadException : public KernelException
    -{
    -public:
    -  WrappedThreadException( const std::exception& );
    -  ~WrappedThreadException() throw() override
    -  {
    -  }
    -};
    -
     
     /**
      * Exception to be thrown if a given type does not match the expected type.
    @@ -164,7 +148,7 @@ class TypeMismatch : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "TypeMismatch";
       }
    @@ -188,7 +172,7 @@ class UnaccessedDictionaryEntry : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnaccessedDictionaryEntry";
       }
    @@ -211,7 +195,7 @@ class UnknownModelName : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnknownModelName";
       }
    @@ -234,7 +218,7 @@ class UnknownComponent : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnknownComponent";
       }
    @@ -256,7 +240,7 @@ class NewModelNameExists : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "NewModelNameExists";
       }
    @@ -280,7 +264,7 @@ class ModelInUse : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "ModelInUse";
       }
    @@ -308,7 +292,7 @@ class UnknownSynapseType : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnknownSynapseType";
       }
    @@ -338,7 +322,7 @@ class UnknownNode : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnknownNode";
       }
    @@ -368,7 +352,7 @@ class NoThreadSiblingsAvailable : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "NoThreadSiblingsAvailable";
       }
    @@ -385,7 +369,7 @@ class LocalNodeExpected : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "LocalNodeExpected";
       }
    @@ -402,7 +386,7 @@ class NodeWithProxiesExpected : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "NodeWithProxiesExpected";
       }
    @@ -423,7 +407,7 @@ class UnknownCompartment : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnknownCompartment";
       }
    @@ -444,7 +428,7 @@ class UnknownReceptorType : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnknownReceptorType";
       }
    @@ -465,7 +449,7 @@ class IncompatibleReceptorType : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "IncompatibleReceptorType";
       }
    @@ -494,7 +478,7 @@ class UnknownPort : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnknownPort";
       }
    @@ -520,7 +504,7 @@ class IllegalConnection : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "IllegalConnection";
       }
    @@ -559,7 +543,7 @@ class InexistentConnection : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "InexistentConnection";
       }
    @@ -588,7 +572,7 @@ class UnknownThread : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnknownThread";
       }
    @@ -618,7 +602,7 @@ class BadDelay : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "BadDelay";
       }
    @@ -660,7 +644,7 @@ class UnexpectedEvent : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnexpectedEvent";
       }
    @@ -684,7 +668,7 @@ class UnsupportedEvent : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnsupportedEvent";
       }
    @@ -721,7 +705,7 @@ class BadProperty : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "BadProperty";
       }
    @@ -758,7 +742,7 @@ class BadParameter : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "BadParameter";
       }
    @@ -791,7 +775,7 @@ class BadParameterValue : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "BadParameterValue";
       }
    @@ -834,7 +818,7 @@ class DimensionMismatch : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "DimensionMismatch";
       }
    @@ -854,7 +838,7 @@ class DistributionError : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "DistributionError";
       }
    @@ -898,7 +882,7 @@ class InvalidDefaultResolution : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "InvalidDefaultResolution";
       }
    @@ -942,7 +926,7 @@ class InvalidTimeInModel : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "InvalidTimeInModel";
       }
    @@ -983,7 +967,7 @@ class StepMultipleRequired : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "StepMultipleRequired";
       }
    @@ -1030,7 +1014,7 @@ class TimeMultipleRequired : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "TimeMultipleRequired";
       }
    @@ -1069,7 +1053,7 @@ class GSLSolverFailure : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "GSLSolverFailure";
       }
    @@ -1103,7 +1087,7 @@ class NumericalInstability : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "NumericalInstability";
       }
    @@ -1134,7 +1118,7 @@ class NamingConflict : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "NamingConflict";
       }
    @@ -1172,7 +1156,7 @@ class RangeCheck : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "RangeCheck";
       }
    @@ -1201,7 +1185,7 @@ class IOError : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "IOError";
       }
    @@ -1235,7 +1219,7 @@ class KeyError : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "KeyError";
       }
    @@ -1270,7 +1254,7 @@ class InternalError : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "InternalError";
       }
    @@ -1311,7 +1295,7 @@ class MUSICPortUnconnected : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MUSICPortUnconnected";
       }
    @@ -1351,7 +1335,7 @@ class MUSICPortHasNoWidth : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MUSICPortHasNoWidth";
       }
    @@ -1391,7 +1375,7 @@ class MUSICPortAlreadyPublished : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MUSICPortAlreadyPublished";
       }
    @@ -1429,7 +1413,7 @@ class MUSICSimulationHasRun : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MUSICSimulationHasRun";
       }
    @@ -1471,7 +1455,7 @@ class MUSICChannelUnknown : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MUSICChannelUnknown";
       }
    @@ -1504,7 +1488,7 @@ class MUSICPortUnknown : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MUSICPortUnknown";
       }
    @@ -1546,7 +1530,7 @@ class MUSICChannelAlreadyMapped : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MUSICChannelAlreadyMapped";
       }
    @@ -1575,7 +1559,7 @@ class MPIPortsFileUnknown : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MPIPortsUnknown";
       }
    @@ -1603,7 +1587,7 @@ class MPIPortsFileMissing : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MPIPortsFileMissing";
       }
    @@ -1632,7 +1616,7 @@ class MPIErrorCode : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "MPIErrorCode";
       }
    @@ -1662,7 +1646,7 @@ class UnmatchedSteps : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UnmatchedSteps";
       }
    @@ -1696,7 +1680,7 @@ class BackendPrepared : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "BackendPrepared";
       }
    @@ -1730,7 +1714,7 @@ class BackendAlreadyRegistered : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "BackendAlreadyRegistered";
       }
    @@ -1771,7 +1755,7 @@ class BackendNotPrepared : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "BackendNotPrepared";
       }
    @@ -1786,7 +1770,7 @@ class LayerExpected : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "LayerExpected";
       }
    @@ -1801,7 +1785,7 @@ class LayerNodeExpected : public KernelException
       }
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "LayerNodeExpected";
       }
    @@ -1826,7 +1810,7 @@ class UndefinedName : public KernelException
       };
     
       std::string
    -  exception_name() override
    +  exception_name() const override
       {
         return "UndefinedName";
       }
    
    From 17c9362a9f51bf032431ba09ca31211f407787a2 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 17:56:54 +0100
    Subject: [PATCH 281/375] Remove unused function
    
    ---
     nestkernel/connection_manager.cpp | 29 -----------------------------
     nestkernel/connection_manager.h   |  2 --
     2 files changed, 31 deletions(-)
    
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index 69141e8483..b81ba52b12 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -476,35 +476,6 @@ nest::ConnectionManager::connect( NodeCollectionPTR sources,
       cb.connect();
     }
     
    -// PYNEST-NG: This needs conversion --- NOT SURE WHAT AND WHY, HEP 2025-01-21
    -void
    -nest::ConnectionManager::connect( std::vector< size_t > sources,
    -  std::vector< size_t > targets,
    -  const dictionary& syn_spec )
    -{
    -  size_t syn_id = 0; // Use "static_synapse" (which has id 0) if no model is given
    -
    -  if ( syn_spec.known( names::model ) )
    -  {
    -    std::string synmodel_name = syn_spec.get< std::string >( names::model );
    -    // The following throws UnknownSynapseType for invalid synmodel_name
    -    syn_id = kernel().model_manager.get_synapse_model_id( synmodel_name );
    -  }
    -
    -  // Connect all sources to all targets
    -  for ( auto&& source : sources )
    -  {
    -    auto source_node = kernel().node_manager.get_node_or_proxy( source );
    -    for ( auto&& target : targets )
    -    {
    -      auto target_node = kernel().node_manager.get_node_or_proxy( target );
    -      auto target_thread = target_node->get_thread();
    -      connect_( *source_node, *target_node, source, target_thread, syn_id, syn_spec );
    -    }
    -  }
    -}
    -
    -
     void
     nest::ConnectionManager::update_delay_extrema_()
     {
    diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h
    index fc8527236c..1dc6ded86d 100644
    --- a/nestkernel/connection_manager.h
    +++ b/nestkernel/connection_manager.h
    @@ -121,8 +121,6 @@ class ConnectionManager : public ManagerInterface
         const dictionary& conn_spec,
         const std::vector< dictionary >& syn_specs );
     
    -  void connect( std::vector< size_t > sources, std::vector< size_t > targets, const dictionary& syn_spec );
    -
       /**
        * Connect two nodes.
        *
    
    From 3067c4b144a9441504f06225161cfb6ba920e16d Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 18:00:39 +0100
    Subject: [PATCH 282/375] Fix access to layer metadata
    
    ---
     nestkernel/free_layer.h      |  4 ++--
     nestkernel/grid_layer.h      |  4 ++--
     nestkernel/layer.h           |  6 ++---
     nestkernel/layer_impl.h      |  2 +-
     nestkernel/nest.cpp          | 46 ++++++++----------------------------
     nestkernel/node_collection.h |  6 ++++-
     nestkernel/spatial.h         |  8 ++++++-
     7 files changed, 30 insertions(+), 46 deletions(-)
    
    diff --git a/nestkernel/free_layer.h b/nestkernel/free_layer.h
    index a7e7856a86..9ed5f16004 100644
    --- a/nestkernel/free_layer.h
    +++ b/nestkernel/free_layer.h
    @@ -48,7 +48,7 @@ class FreeLayer : public Layer< D >
     public:
       Position< D > get_position( size_t sind ) const override;
       void set_status( const dictionary& ) override;
    -  void get_status( dictionary&, NodeCollection const* ) const override;
    +  void get_status( dictionary&, NodeCollection const* const ) const override;
     
     protected:
       /**
    @@ -251,7 +251,7 @@ FreeLayer< D >::set_status( const dictionary& d )
     
     template < int D >
     void
    -FreeLayer< D >::get_status( dictionary& d, NodeCollection const* nc ) const
    +FreeLayer< D >::get_status( dictionary& d, NodeCollection const* const nc ) const
     {
       Layer< D >::get_status( d, nc );
     
    diff --git a/nestkernel/grid_layer.h b/nestkernel/grid_layer.h
    index 7789a410cf..42779a9f74 100644
    --- a/nestkernel/grid_layer.h
    +++ b/nestkernel/grid_layer.h
    @@ -152,7 +152,7 @@ class GridLayer : public Layer< D >
       Position< D, size_t > get_dims() const;
     
       void set_status( const dictionary& d ) override;
    -  void get_status( dictionary& d, NodeCollection const* ) const override;
    +  void get_status( dictionary& d, NodeCollection const* const ) const override;
     
     protected:
       Position< D, size_t > dims_; ///< number of nodes in each direction.
    @@ -209,7 +209,7 @@ GridLayer< D >::set_status( const dictionary& d )
     
     template < int D >
     void
    -GridLayer< D >::get_status( dictionary& d, NodeCollection const* nc ) const
    +GridLayer< D >::get_status( dictionary& d, NodeCollection const* const nc ) const
     {
       Layer< D >::get_status( d, nc );
     
    diff --git a/nestkernel/layer.h b/nestkernel/layer.h
    index ed581930f2..8a827bdfdb 100644
    --- a/nestkernel/layer.h
    +++ b/nestkernel/layer.h
    @@ -70,9 +70,9 @@ class AbstractLayer
        * entries in the status dictionary, respects slicing of given NodeCollection
        * @param d Dictionary.
        *
    -   * @note If nullptr is passed for NodeCollection*, full metadata irrespective of any slicing is returned.
    +   * @note If passing nullptr-valued NodeCollectionPTR, full metadata irrespective of any slicing is returned.
        */
    -  virtual void get_status( dictionary&, NodeCollection const* ) const = 0;
    +  virtual void get_status( dictionary&, NodeCollection const* const ) const = 0;
     
       virtual unsigned int get_num_dimensions() const = 0;
     
    @@ -235,7 +235,7 @@ class Layer : public AbstractLayer
       void set_status( const dictionary& ) override;
     
       //! Retrieve status, slice according to node collection if given
    -  void get_status( dictionary&, NodeCollection const* ) const override;
    +  void get_status( dictionary&, NodeCollection const* const ) const override;
     
       unsigned int
       get_num_dimensions() const override
    diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h
    index 63e2b1147f..46ea1da642 100644
    --- a/nestkernel/layer_impl.h
    +++ b/nestkernel/layer_impl.h
    @@ -90,7 +90,7 @@ Layer< D >::set_status( const dictionary& d )
     
     template < int D >
     void
    -Layer< D >::get_status( dictionary& d, NodeCollection const* nc ) const
    +Layer< D >::get_status( dictionary& d, NodeCollection const* const nc ) const
     {
       d[ names::extent ] = std::vector< double >( extent_.get_vector() );
       d[ names::center ] = std::vector< double >( ( lower_left_ + extent_ / 2 ).get_vector() );
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 9fff174517..70e700eb76 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -154,7 +154,7 @@ pprint_to_string( NodeCollectionPTR nc )
       }
       else
       {
    -    // PYNEST-ng: added this, not sure why this can happen now, but could not previously
    +    // PYNEST-NG: added this, not sure why this can happen now, but could not previously
         std::cout << "pprint_to_string: nc is not assigned" << std::endl;
         return "";
       }
    @@ -262,34 +262,10 @@ set_connection_status( const std::deque< ConnectionID >& conns, const dictionary
       dict.all_entries_accessed( "connection.set()", "params" );
     }
     
    -//// void
    -//// set_connection_status( const std::deque< ConnectionID >& conn, const dictionary& dict )
    -//// {
    -////   // TODO_PYNEST-NG: Get ConnectionDatum dict
    -////   // dictionary conn_dict = conn.get_dict();
    -////   dictionary conn_dict;
    -////   const index source_node_id = conn_dict.get< long >( nest::names::source );
    -////   const index target_node_id = conn_dict.get< long >( nest::names::target );
    -////   const thread tid = conn_dict.get< long >( nest::names::target_thread );
    -////   const synindex syn_id = conn_dict.get< long >( nest::names::synapse_modelid );
    -////   const port p = conn_dict.get< long >( nest::names::port );
    -////
    -////   // TODO_PYNEST-NG: Access flags
    -////   // dict->clear_access_flags();
    -////
    -////   kernel().connection_manager.set_synapse_status( source_node_id, target_node_id, tid, syn_id, p, dict );
    -////
    -////   // ALL_ENTRIES_ACCESSED2( *dict,
    -////   //   "SetStatus",
    -////   //   "Unread dictionary entries: ",
    -////   //   "Maybe you tried to set common synapse properties through an individual "
    -////   //   "synapse?" );
    -//// }
    -
    -
     void
     set_connection_status( const std::deque< ConnectionID >& conns, const std::vector< dictionary >& dicts )
     {
    +  // PYNEST-NG: Access checks?
       if ( conns.size() != dicts.size() )
       {
         throw BadParameter( "List of dictionaries must contain one dictionary per connection" );
    @@ -353,7 +329,6 @@ slice_nc( const NodeCollectionPTR nc, long start, long stop, long step )
     {
       const size_t g_size = nc->size();
     
    -  // TODO-PYNEST-NG: Zero-based indexing?
       if ( step < 1 )
       {
         throw BadParameter( "Slicing step must be strictly positive." );
    @@ -399,12 +374,13 @@ create_spatial( const dictionary& layer_dict )
       return create_layer( layer_dict );
     }
     
    -// std::vector< std::vector< double > >
    -// get_position( NodeCollectionPTR layer_nc )
    -//{
    -//   return get_position( layer );  // PYNEST-NG: is this call creating a copy?
    -// }
    -
    +/*
    +std::vector< std::vector< double > >
    +get_position( NodeCollectionPTR layer_nc )
    +{
    +   return get_position( layer_nc );  // PYNEST-NG POSITIONS: is this call creating a copy?
    +}
    + */
     
     NodeCollectionPTR
     make_nodecollection( const std::vector< size_t > node_ids )
    @@ -444,9 +420,7 @@ get_metadata( const NodeCollectionPTR nc )
       // Fill the status dictionary only if the NodeCollection has valid metadata.
       if ( meta.get() )
       {
    -    /* PYNESTNG NEEDS REVIEW */
    -    // meta->get_status( status_dict, nc );
    -    assert( false );
    +    meta->get_status( status_dict, nc );
         slice_positions_if_sliced_nc( status_dict, nc );
         status_dict[ names::network_size ] = nc->size();
       }
    diff --git a/nestkernel/node_collection.h b/nestkernel/node_collection.h
    index 8c857bb090..de0888502a 100644
    --- a/nestkernel/node_collection.h
    +++ b/nestkernel/node_collection.h
    @@ -72,8 +72,12 @@ class NodeCollectionMetadata
        *
        * @note If nullptr is passed for NodeCollection*, full metadata irrespective of any slicing is returned.
        *  This is used by NodeCollectionMetadata::operator==() which does not have access to the NodeCollection.
    +   *
    +   * @note This method is provided both accepting a naked pointer and a NodeCollectionPTR to allow calling
    +   * from node collection itself, passing this, and with pointer provided from outside.
        */
    -  virtual void get_status( dictionary&, NodeCollection const* ) const = 0;
    +  virtual void get_status( dictionary&, NodeCollection const* const ) const = 0;
    +  virtual void get_status( dictionary&, const NodeCollectionPTR ) const = 0;
     
       virtual void set_first_node_id( size_t ) = 0;
       virtual size_t get_first_node_id() const = 0;
    diff --git a/nestkernel/spatial.h b/nestkernel/spatial.h
    index b86aae1be8..d4eb9d0e14 100644
    --- a/nestkernel/spatial.h
    +++ b/nestkernel/spatial.h
    @@ -53,11 +53,17 @@ class LayerMetadata : public NodeCollectionMetadata
       void set_status( const dictionary&, bool ) override {};
     
       void
    -  get_status( dictionary& d, NodeCollection const* nc ) const override
    +  get_status( dictionary& d, NodeCollection const* const nc ) const override
       {
         layer_->get_status( d, nc );
       }
     
    +  void
    +  get_status( dictionary& d, const NodeCollectionPTR nc ) const override
    +  {
    +    get_status( d, nc.get() );
    +  }
    +
       //! Returns pointer to object with layer representation
       const AbstractLayerPTR
       get_layer() const
    
    From e820993c3e60df413b804a9020fb513963206fc4 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 20:51:18 +0100
    Subject: [PATCH 283/375] Remove unused function
    
    ---
     nestkernel/nest.cpp | 7 -------
     nestkernel/nest.h   | 1 -
     2 files changed, 8 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 70e700eb76..738176ed39 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -622,13 +622,6 @@ create_parameter( const boost::any& value )
         std::string( "Parameter must be parametertype, constant or dictionary, got " ) + debug_type( value ) );
     }
     
    -ParameterPTR
    -create_parameter( const ParameterPTR param )
    -{
    -  // TODO-PYNEST-NG: do we need this function?
    -  return param;
    -}
    -
     ParameterPTR
     create_parameter( const double value )
     {
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 0ebff763f0..cfc18130e8 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -241,7 +241,6 @@ dictionary get_model_defaults( const std::string& model_name );
     
     // TODO-PYNEST-NG: static functions?
     ParameterPTR create_parameter( const boost::any& );
    -ParameterPTR create_parameter( const ParameterPTR );
     ParameterPTR create_parameter( const double );
     ParameterPTR create_parameter( const int );
     ParameterPTR create_parameter( const dictionary& param_dict );
    
    From a79e19255a0417f66e3b2ed1ce817a4b3c08a1fb Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 21:05:51 +0100
    Subject: [PATCH 284/375] Remove slicing of positions which is no longer
     necessary as positions constructed slice-aware in get_metadata
    
    ---
     nestkernel/nest.cpp | 34 ----------------------------------
     nestkernel/nest.h   | 10 ----------
     2 files changed, 44 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 738176ed39..b353daf370 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -421,7 +421,6 @@ get_metadata( const NodeCollectionPTR nc )
       if ( meta.get() )
       {
         meta->get_status( status_dict, nc );
    -    slice_positions_if_sliced_nc( status_dict, nc );
         status_dict[ names::network_size ] = nc->size();
       }
       return status_dict;
    @@ -741,39 +740,6 @@ node_collection_array_index( NodeCollectionPTR nc, const bool* array, unsigned l
       return NodeCollection::create( node_ids );
     }
     
    -void
    -slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR nc )
    -{
    -  // If metadata contains node positions and the NodeCollection is sliced, get only positions of the sliced nodes.
    -  if ( dict.known( names::positions ) )
    -  {
    -    // PyNEST-NG: Check if TokenArray is the correct type here
    -    const auto positions = dict.get< std::vector< std::vector< double > > >( names::positions );
    -    if ( nc->size() != positions.size() )
    -    {
    -      std::vector< std::vector< double > > sliced_points;
    -      // Iterate only local nodes
    -      NodeCollection::const_iterator nc_begin = nc->has_proxies() ? nc->rank_local_begin() : nc->begin();
    -      NodeCollection::const_iterator nc_end = nc->end();
    -      for ( auto node = nc_begin; node < nc_end; ++node )
    -      {
    -        // Because the local ID also includes non-local nodes, it must be adapted to represent
    -        // the index for the local node position.
    -        /*
    -         PYNEST-NG NEEDS review
    -         */
    -        assert( false );
    -        /*
    -        const auto index =
    -          static_cast< size_t >( std::floor( ( *node ).lid / kernel().mpi_manager.get_num_processes() ) );
    -        sliced_points.push_back( positions[ index ] );
    -         */
    -      }
    -      dict[ names::positions ] = sliced_points;
    -    }
    -  }
    -}
    -
     AbstractMask*
     create_doughnut( const dictionary& d )
     {
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index cfc18130e8..db6ce48e8e 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -277,16 +277,6 @@ register_mask()
       return mask_factory_().register_subtype< T >( T::get_name() );
     }
     
    -/**
    - * @brief Get only positions of the sliced nodes if metadata contains node positions and the NodeCollection is sliced.
    - *
    - * Puts an array of positions sliced the same way as a sliced NodeCollection into dict.
    - * Positions have to be sliced on introspection because metadata of a sliced NodeCollection
    - * for internal consistency and efficiency points to the metadata of the original
    - * NodeCollection.
    - */
    -void slice_positions_if_sliced_nc( dictionary& dict, const NodeCollectionPTR node_collection );
    -
     inline bool
     register_mask( const std::string& name, MaskCreatorFunction creator )
     {
    
    From 925f5e4a032cc252c269edf9c22e673cf8ba6fb5 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 21:15:21 +0100
    Subject: [PATCH 285/375] More suitable exception thrown
    
    ---
     nestkernel/exceptions.h | 13 ++-----------
     nestkernel/nest.cpp     |  2 +-
     2 files changed, 3 insertions(+), 12 deletions(-)
    
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index beeec50651..89cb0f0b2b 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -1134,19 +1134,10 @@ class RangeCheck : public KernelException
       std::string msg_;
     
     public:
    -  RangeCheck( int size = 0 )
    +  RangeCheck( const size_t expected_size )
         : KernelException( "RangeCheck" )
    +    , msg_( String::compose( "Array with length %1 expected.", expected_size ) )
       {
    -    if ( size > 0 )
    -    {
    -      msg_ = String::compose( "Array with length %1 expected.", size );
    -    }
    -    else
    -    {
    -      // TODO-PYNEST-NG: Fix usage, the comment below has been there already
    -      // Empty message. Added due to incorrect use of RangeCheck in nest.cpp
    -      msg_ = "";
    -    }
       }
     
       const char*
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index b353daf370..390e71b996 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -361,7 +361,7 @@ create( const std::string model_name, const size_t n_nodes )
     {
       if ( n_nodes == 0 )
       {
    -    throw RangeCheck();
    +    throw BadParameterValue( "n_nodes > 0 expected" );
       }
     
       const size_t model_id = kernel().model_manager.get_node_model_id( model_name );
    
    From bf8b5ae7be7f82005b4de717f2ed1cc283ee11ab Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 21:25:15 +0100
    Subject: [PATCH 286/375] Slight tidying in nest api
    
    ---
     nestkernel/nest.cpp | 10 +++++-----
     nestkernel/nest.h   | 23 +++++------------------
     2 files changed, 10 insertions(+), 23 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 390e71b996..7fe67a947e 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -331,7 +331,7 @@ slice_nc( const NodeCollectionPTR nc, long start, long stop, long step )
     
       if ( step < 1 )
       {
    -    throw BadParameter( "Slicing step must be strictly positive." );
    +    throw BadParameterValue( "Slicing step must be strictly positive." );
       }
     
       if ( start >= 0 )
    @@ -357,7 +357,7 @@ slice_nc( const NodeCollectionPTR nc, long start, long stop, long step )
     }
     
     NodeCollectionPTR
    -create( const std::string model_name, const size_t n_nodes )
    +create( const std::string& model_name, const size_t n_nodes )
     {
       if ( n_nodes == 0 )
       {
    @@ -383,7 +383,7 @@ get_position( NodeCollectionPTR layer_nc )
      */
     
     NodeCollectionPTR
    -make_nodecollection( const std::vector< size_t > node_ids )
    +make_nodecollection( const std::vector< size_t >& node_ids )
     {
       return NodeCollection::create( node_ids );
     }
    @@ -499,7 +499,7 @@ disconnect( const std::deque< ConnectionID >& conns )
     }
     
     void
    -simulate( const double& t )
    +simulate( const double t )
     {
       prepare();
       run( t );
    @@ -507,7 +507,7 @@ simulate( const double& t )
     }
     
     void
    -run( const double& time )
    +run( const double time )
     {
       const Time t_sim = Time::ms( time );
     
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index db6ce48e8e..1aa4c8dc9b 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -85,10 +85,10 @@ std::vector< dictionary > get_connection_status( const std::deque< ConnectionID
     
     NodeCollectionPTR slice_nc( const NodeCollectionPTR nc, long start, long stop, long step );
     
    -NodeCollectionPTR create( const std::string model_name, const size_t n );
    +NodeCollectionPTR create( const std::string& model_name, const size_t n );
     NodeCollectionPTR create_spatial( const dictionary& layer_dict );
     
    -NodeCollectionPTR make_nodecollection( const std::vector< size_t > node_ids );
    +NodeCollectionPTR make_nodecollection( const std::vector< size_t >& node_ids );
     
     NodeCollectionPTR get_nodes( const dictionary& dict, const bool local_only );
     long find( const NodeCollectionPTR nc, size_t node_id );
    @@ -112,18 +112,6 @@ RngPtr get_vp_specific_rng( size_t tid );
     void set_kernel_status( const dictionary& dict );
     dictionary get_kernel_status();
     
    -NodeCollectionPTR create( const std::string model_name, const size_t n );
    -NodeCollectionPTR create_spatial( const dictionary& layer_dict );
    -
    -NodeCollectionPTR make_nodecollection( const std::vector< size_t > node_ids );
    -
    -NodeCollectionPTR get_nodes( const dictionary& dict, const bool local_only );
    -long find( const NodeCollectionPTR nc, size_t node_id );
    -dictionary get_metadata( const NodeCollectionPTR nc );
    -
    -bool equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs );
    -bool contains( const NodeCollectionPTR nc, const size_t node_id );
    -
     /**
      * Create bipartite connections.
      */
    @@ -182,7 +170,7 @@ std::deque< ConnectionID > get_connections( const dictionary& dict );
     
     void disconnect( const std::deque< ConnectionID >& conns );
     
    -void simulate( const double& t );
    +void simulate( const double t );
     
     /**
      * @fn run(const double& time)
    @@ -199,7 +187,7 @@ void simulate( const double& t );
      * @see prepare()
      * @see cleanup()
      */
    -void run( const double& t );
    +void run( const double t );
     
     /**
      * @fn prepare()
    @@ -250,13 +238,12 @@ using ParameterFactory = GenericFactory< Parameter >;
     using MaskFactory = GenericFactory< AbstractMask >;
     using MaskCreatorFunction = MaskFactory::CreatorFunction;
     
    -
     ParameterFactory& parameter_factory_();
     MaskFactory& mask_factory_();
     
    -
     double get_value( const ParameterPTR param );
     bool is_spatial( const ParameterPTR param );
    +
     std::vector< double > apply( const ParameterPTR param, const NodeCollectionPTR nc );
     std::vector< double > apply( const ParameterPTR param, const dictionary& positions );
     
    
    From 7bae07614bd726a913ebfa08cac7ee18560d10c2 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 21:45:18 +0100
    Subject: [PATCH 287/375] Constant parameter now accepts double and long
    
    ---
     nestkernel/parameter.h | 11 +++++++++--
     1 file changed, 9 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h
    index 5ec44e033f..b6742ea24f 100644
    --- a/nestkernel/parameter.h
    +++ b/nestkernel/parameter.h
    @@ -150,8 +150,15 @@ class ConstantParameter : public Parameter
        */
       ConstantParameter( const dictionary& d )
       {
    -    value_ = d.get< double >( "value" ); // PYNEST-NG: Must be able to pass value as long and double
    -    returns_int_only_ = value_is_integer_( value_ );
    +    try
    +    {
    +      value_ = d.get< double >( "value" );
    +    }
    +    catch ( const TypeMismatch& )
    +    {
    +      value_ = d.get< long >( "value" );
    +      returns_int_only_ = true;
    +    }
       }
     
       ~ConstantParameter() override = default;
    
    From 99577aca7efd214de4c327750b2888ec742c1911 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 22:09:06 +0100
    Subject: [PATCH 288/375] Removed spurious comment
    
    ---
     nestkernel/simulation_manager.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp
    index 0987a0c35d..ae9b6b11b3 100644
    --- a/nestkernel/simulation_manager.cpp
    +++ b/nestkernel/simulation_manager.cpp
    @@ -178,7 +178,7 @@ nest::SimulationManager::set_status( const dictionary& d )
       // tics_per_ms and resolution must come after local_num_thread /
       // total_num_threads because they might reset the network and the time
       // representation
    -  long tics_per_ms = 0; // TODO: PYNEST-NG: Was double, but why???
    +  long tics_per_ms = 0;
       bool tics_per_ms_updated = d.update_value( names::tics_per_ms, tics_per_ms );
       double resd = 0.0;
       bool res_updated = d.update_value( names::resolution, resd );
    
    From f38fe759f50d7cb1c9e66360c7542f3a114cd041 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 22:09:30 +0100
    Subject: [PATCH 289/375] Added comment
    
    ---
     pynest/CMakeLists.txt | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 761ee22670..1862bc7dfc 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -38,6 +38,7 @@ if ( HAVE_PYTHON )
       endif ()
     
       # TODO PYNEST NG: Add models, once the refactoring of the module system is done.
    +  # PYNEST-NG: somehow it works without models being in here, but why?
       target_link_libraries( nestkernel_api nestutil nestkernel )
     
       if ( APPLE )
    
    From 594c8f5f1e1007e120347958bc65e94fc8f945c6 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 22:13:50 +0100
    Subject: [PATCH 290/375] Removed code that is no longer pertinent
    
    ---
     nestkernel/node_collection.h | 22 ----------------------
     1 file changed, 22 deletions(-)
    
    diff --git a/nestkernel/node_collection.h b/nestkernel/node_collection.h
    index de0888502a..951ddeffe9 100644
    --- a/nestkernel/node_collection.h
    +++ b/nestkernel/node_collection.h
    @@ -581,28 +581,6 @@ class NodeCollection
     
       virtual ~NodeCollection() = default;
     
    -  /**
    -   * Create a NodeCollection from a vector of node IDs.
    -   *
    -   * Results in a primitive if the
    -   * node IDs are homogeneous and contiguous, or a composite otherwise.
    -   *
    -   * @param node_ids Vector of node IDs from which to create the NodeCollection
    -   * @return a NodeCollection pointer to the created NodeCollection
    -   */
    -  // static NodeCollectionPTR create( const IntVectorDatum& node_ids );
    -
    -  /**
    -   * Create a NodeCollection from an array of node IDs.
    -   *
    -   * Results in a primitive if the node IDs are homogeneous and
    -   * contiguous, or a composite otherwise.
    -   *
    -   * @param node_ids Array of node IDs from which to create the NodeCollection
    -   * @return a NodeCollection pointer to the created NodeCollection
    -   */
    -  // static NodeCollectionPTR create( const TokenArray& node_ids );
    -
       /**
        * Create a NodeCollection from a single node ID.
        *
    
    From 37d6a28b0b8bcbe78e80db001d5c6a69a7a3cc8e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 22:26:51 +0100
    Subject: [PATCH 291/375] Support for node exchange between mpi ranks
    
    ---
     nestkernel/mpi_manager.cpp  | 35 +++++++++++++++++++++++++++++++++++
     nestkernel/mpi_manager.h    |  4 ++++
     nestkernel/node_manager.cpp |  7 ++-----
     pynest/nestkernel_api.pxd   |  4 ++--
     4 files changed, 43 insertions(+), 7 deletions(-)
    
    diff --git a/nestkernel/mpi_manager.cpp b/nestkernel/mpi_manager.cpp
    index b487150914..7aee69bdb7 100644
    --- a/nestkernel/mpi_manager.cpp
    +++ b/nestkernel/mpi_manager.cpp
    @@ -344,6 +344,36 @@ nest::MPIManager::communicate( std::vector< long >& local_nodes, std::vector< lo
         comm );
     }
     
    +void
    +nest::MPIManager::communicate( std::vector< size_t >& local_nodes, std::vector< size_t >& global_nodes )
    +{
    +  size_t np = get_num_processes();
    +  // Get size of buffers
    +  std::vector< int > num_nodes_per_rank( np );
    +  num_nodes_per_rank[ get_rank() ] = local_nodes.size();
    +  communicate( num_nodes_per_rank );
    +
    +  size_t num_globals = std::accumulate( num_nodes_per_rank.begin(), num_nodes_per_rank.end(), 0 );
    +  global_nodes.resize( num_globals, 0L );
    +
    +  // Set up displacements vector. Entry i specifies the displacement (relative
    +  // to recv_buffer ) at which to place the incoming data from process i
    +  std::vector< int > displacements( np, 0 );
    +  for ( size_t i = 1; i < np; ++i )
    +  {
    +    displacements.at( i ) = displacements.at( i - 1 ) + num_nodes_per_rank.at( i - 1 );
    +  }
    +
    +  MPI_Allgatherv( &( *local_nodes.begin() ),
    +    local_nodes.size(),
    +    MPI_Type< size_t >::type,
    +    &global_nodes[ 0 ],
    +    &num_nodes_per_rank[ 0 ],
    +    &displacements[ 0 ],
    +    MPI_Type< size_t >::type,
    +    comm );
    +}
    +
     void
     nest::MPIManager::communicate( std::vector< unsigned int >& send_buffer,
       std::vector< unsigned int >& recv_buffer,
    @@ -1061,6 +1091,11 @@ nest::MPIManager::communicate( std::vector< long >&, std::vector< long >& )
     {
     }
     
    +void
    +nest::MPIManager::communicate( std::vector< size_t >&, std::vector< size_t >& )
    +{
    +}
    +
     void
     nest::MPIManager::communicate_Allreduce_sum_in_place( double )
     {
    diff --git a/nestkernel/mpi_manager.h b/nestkernel/mpi_manager.h
    index b6633ddd08..b411623cd5 100644
    --- a/nestkernel/mpi_manager.h
    +++ b/nestkernel/mpi_manager.h
    @@ -122,6 +122,10 @@ class MPIManager : public ManagerInterface
       // vector
       void communicate( std::vector< long >& send_buffer, std::vector< long >& recv_buffer );
     
    +  // gather all send_buffer vectors on other mpi process to recv_buffer
    +  // vector
    +  void communicate( std::vector< size_t >& send_buffer, std::vector< size_t >& recv_buffer );
    +
       /**
        * communicate (on-grid) if compiled without MPI
        */
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index df86ed2487..5d02375275 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -394,9 +394,7 @@ NodeManager::get_nodes( const dictionary& params, const bool local_only )
       if ( not local_only )
       {
         std::vector< size_t > globalnodes;
    -    // TODO: PYNEST-NG create communicate( vector<size_t>, vector<size_t> )
    -    // kernel().mpi_manager.communicate( nodes, globalnodes );
    -    assert( false );
    +    kernel().mpi_manager.communicate( nodes, globalnodes );
     
         for ( size_t i = 0; i < globalnodes.size(); ++i )
         {
    @@ -408,8 +406,7 @@ NodeManager::get_nodes( const dictionary& params, const bool local_only )
     
         // get rid of any multiple entries
         std::sort( nodes.begin(), nodes.end() );
    -    std::vector< size_t >::iterator it;
    -    it = std::unique( nodes.begin(), nodes.end() );
    +    const auto it = std::unique( nodes.begin(), nodes.end() );
         nodes.resize( it - nodes.begin() );
       }
     
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 0ae0c9240b..3039840c20 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -133,10 +133,10 @@ cdef extern from "nest.h" namespace "nest":
         void enable_structural_plasticity() except +custom_exception_handler
         void disable_structural_plasticity() except +custom_exception_handler
     
    -    NodeCollectionPTR create( const string model_name, const long n ) except +custom_exception_handler
    +    NodeCollectionPTR create( const string& model_name, const long n ) except +custom_exception_handler
         NodeCollectionPTR create_spatial( const dictionary& ) except +custom_exception_handler
     
    -    NodeCollectionPTR make_nodecollection( const vector[size_t] node_ids ) except +custom_exception_handler
    +    NodeCollectionPTR make_nodecollection( const vector[size_t]& node_ids ) except +custom_exception_handler
     
         cbool equal( const NodeCollectionPTR lhs, const NodeCollectionPTR rhs ) except +custom_exception_handler
         cbool contains( const NodeCollectionPTR nc, const size_t node_id ) except +custom_exception_handler
    
    From bf717d38093dd27b5c60d0a7582302e9a0b5ea86 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 22:36:32 +0100
    Subject: [PATCH 292/375] Removed spurious function
    
    ---
     nestkernel/nest.cpp | 8 --------
     1 file changed, 8 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 7fe67a947e..f1fae69d76 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -374,14 +374,6 @@ create_spatial( const dictionary& layer_dict )
       return create_layer( layer_dict );
     }
     
    -/*
    -std::vector< std::vector< double > >
    -get_position( NodeCollectionPTR layer_nc )
    -{
    -   return get_position( layer_nc );  // PYNEST-NG POSITIONS: is this call creating a copy?
    -}
    - */
    -
     NodeCollectionPTR
     make_nodecollection( const std::vector< size_t >& node_ids )
     {
    
    From 3de236edb7a3ab3d5ac09e9b61a6ec35b5022ec4 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 23:28:54 +0100
    Subject: [PATCH 293/375] Removed spurious spaces from names
    
    ---
     nestkernel/nest_names.h | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/nest_names.h b/nestkernel/nest_names.h
    index 8246ca3fc1..829b71f2e2 100644
    --- a/nestkernel/nest_names.h
    +++ b/nestkernel/nest_names.h
    @@ -344,7 +344,7 @@ const std::string model( "model" );
     const std::string model_id( "model_id" );
     const std::string modules( "modules" );
     const std::string mpi_address( "mpi_address" );
    -const std::string mpi_rank( "mpi_rank " );
    +const std::string mpi_rank( "mpi_rank" );
     const std::string ms_per_tic( "ms_per_tic" );
     const std::string mu( "mu" );
     const std::string mu_minus( "mu_minus" );
    @@ -365,7 +365,7 @@ const std::string n_receptors( "n_receptors" );
     const std::string n_synapses( "n_synapses" );
     const std::string network_size( "network_size" );
     const std::string neuron( "neuron" );
    -const std::string new_buffer_size( "new_buffer_size " );
    +const std::string new_buffer_size( "new_buffer_size" );
     const std::string next_readout_time( "next_readout_time" );
     const std::string no_synapses( "no_synapses" );
     const std::string node_models( "node_models" );
    
    From 90fec053074a5e23f470da01d78c6c546f2b7e10 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 23:29:35 +0100
    Subject: [PATCH 294/375] Added support for nc_to_array
    
    ---
     nestkernel/nest.cpp                  | 6 ++++++
     nestkernel/nest.h                    | 3 +++
     pynest/nest/lib/hl_api_types.py      | 2 +-
     pynest/nestkernel_api.pxd            | 3 +++
     pynest/nestkernel_api.pyx            | 4 +++-
     testsuite/pytests/test_issue_3108.py | 5 +----
     6 files changed, 17 insertions(+), 6 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index f1fae69d76..34e02a11f4 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -732,6 +732,12 @@ node_collection_array_index( NodeCollectionPTR nc, const bool* array, unsigned l
       return NodeCollection::create( node_ids );
     }
     
    +std::vector< size_t >
    +node_collection_to_array( NodeCollectionPTR node_collection, const std::string& selection )
    +{
    +  return node_collection->to_array( selection );
    +}
    +
     AbstractMask*
     create_doughnut( const dictionary& d )
     {
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 1aa4c8dc9b..e0c7d6bdf5 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -250,6 +250,9 @@ std::vector< double > apply( const ParameterPTR param, const dictionary& positio
     NodeCollectionPTR node_collection_array_index( NodeCollectionPTR node_collection, const long* array, unsigned long n );
     NodeCollectionPTR node_collection_array_index( NodeCollectionPTR node_collection, const bool* array, unsigned long n );
     
    +// for debugging and testing mostly
    +std::vector< size_t > node_collection_to_array( NodeCollectionPTR node_collection, const std::string& selection );
    +
     template < class T >
     inline bool
     register_parameter( const std::string& name )
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 94c2123c66..6378a1a3eb 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -526,7 +526,7 @@ def _to_array(self, selection="all"):
             separate lists are returned for all local threads independently.
             """
     
    -        res = sli_func("cva_g_l", self, selection)
    +        res = nestkernel.llapi_node_collection_to_array(self._datum, selection)
     
             if selection == "all":
                 return {"All": res}
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 3039840c20..77d67495a1 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -178,6 +178,9 @@ cdef extern from "nest.h" namespace "nest":
         cbool is_spatial( const ParameterPTR param ) except +custom_exception_handler
         NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const long* array, unsigned long n) except +custom_exception_handler
         NodeCollectionPTR node_collection_array_index(NodeCollectionPTR node_collection, const cbool* array, unsigned long n) except +custom_exception_handler
    +
    +    vector[size_t] node_collection_to_array( NodeCollectionPTR node_collection, const string& selection ) except +custom_exception_handler
    +
         void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except +custom_exception_handler
         vector[double] apply( const ParameterPTR param, const NodeCollectionPTR nc ) except +custom_exception_handler
         vector[double] apply( const ParameterPTR param, const dictionary& positions ) except +custom_exception_handler
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 5d0ae91a63..537721c492 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -399,6 +399,9 @@ def llapi_get_position(NodeCollectionObject layer):
         else:
             return result
     
    +def llapi_node_collection_to_array( NodeCollectionObject nc, selection):
    +    cdef vector[size_t] result = node_collection_to_array( nc.thisptr, pystr_to_string(selection) )
    +    return result
     
     def llapi_spatial_distance(object from_arg, to_arg):
         cdef vector[vector[double]] from_vec
    @@ -828,7 +831,6 @@ def llapi_get_connections(object params):
     
         return nest.SynapseCollection(connections_list)
     
    -
     def llapi_get_connection_status(object conns):
         cdef vector[dictionary] connection_statuses
         # Convert the list of connections to a deque
    diff --git a/testsuite/pytests/test_issue_3108.py b/testsuite/pytests/test_issue_3108.py
    index de2b178b2b..8daa3181d9 100644
    --- a/testsuite/pytests/test_issue_3108.py
    +++ b/testsuite/pytests/test_issue_3108.py
    @@ -38,10 +38,7 @@
     # Experiences severe slowdown on Github runners under Linux with MPI and OpenMP
     pytestmark = pytest.mark.requires_many_cores
     
    -if nest.ll_api.sli_func("is_threaded"):
    -    num_threads = [1, 2, 3, 4]
    -else:
    -    num_threads = [1]
    +num_threads = [1, 2, 3, 4] if nest.build_info["have_threads"] else [1]
     
     
     @pytest.mark.parametrize("n_threads", num_threads)
    
    From 85ef640d608b535460242a1f22528bf0054b6871 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 22 Jan 2025 23:54:29 +0100
    Subject: [PATCH 295/375] Proper numpy array asserts
    
    ---
     testsuite/pytests/test_issue_3108.py | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/testsuite/pytests/test_issue_3108.py b/testsuite/pytests/test_issue_3108.py
    index 8daa3181d9..fc2c98db41 100644
    --- a/testsuite/pytests/test_issue_3108.py
    +++ b/testsuite/pytests/test_issue_3108.py
    @@ -24,6 +24,7 @@
     
     import nest
     import pytest
    +from numpy.testing import assert_array_equal
     
     """
     Test in this file were developed for regressions under three MPI processes.
    @@ -189,7 +190,7 @@ def test_get_positions_with_mpi(n_threads, start, step):
             npos for npos, nrk in zip(node_pos[start::step], node_ranks[start::step]) if nrk == nest.Rank()
         )
     
    -    assert pos == expected_pos
    +    assert_array_equal(pos, expected_pos)
     
     
     @pytest.mark.parametrize("n_threads", num_threads)
    @@ -219,7 +220,7 @@ def test_get_spatial_for_single_element_and_mpi(n_threads, pick):
     
         pick_rank = layer[pick].vp % nest.NumProcesses()
         if pick_rank == nest.Rank():
    -        assert sp[0] == node_pos[pick]
    +        assert_array_equal(sp[0], node_pos[pick])
         else:
             assert len(sp) == 0
     
    
    From 0b50da5f330a8910328d352ba111ba8115a8a466 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 07:56:08 +0100
    Subject: [PATCH 296/375] Fixed infinite recursion in parameter creation
    
    ---
     nestkernel/nest.cpp | 8 ++++----
     nestkernel/nest.h   | 2 +-
     2 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 34e02a11f4..9a7a7b4264 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -595,11 +595,11 @@ create_parameter( const boost::any& value )
       }
       else if ( is_type< int >( value ) )
       {
    -    return create_parameter( boost::any_cast< int >( value ) );
    +    return create_parameter( static_cast< long >( boost::any_cast< int >( value ) ) );
       }
       else if ( is_type< long >( value ) )
       {
    -    return create_parameter( static_cast< int >( boost::any_cast< long >( value ) ) );
    +    return create_parameter( boost::any_cast< long >( value ) );
       }
       else if ( is_type< dictionary >( value ) )
       {
    @@ -607,7 +607,7 @@ create_parameter( const boost::any& value )
       }
       else if ( is_type< ParameterPTR >( value ) )
       {
    -    return create_parameter( boost::any_cast< ParameterPTR >( value ) );
    +    return boost::any_cast< ParameterPTR >( value );
       }
       throw BadProperty(
         std::string( "Parameter must be parametertype, constant or dictionary, got " ) + debug_type( value ) );
    @@ -621,7 +621,7 @@ create_parameter( const double value )
     }
     
     ParameterPTR
    -create_parameter( const int value )
    +create_parameter( const long value )
     {
       const auto param = new ConstantParameter( value );
       return ParameterPTR( param );
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index e0c7d6bdf5..84d8c5e7ed 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -230,7 +230,7 @@ dictionary get_model_defaults( const std::string& model_name );
     // TODO-PYNEST-NG: static functions?
     ParameterPTR create_parameter( const boost::any& );
     ParameterPTR create_parameter( const double );
    -ParameterPTR create_parameter( const int );
    +ParameterPTR create_parameter( const long );
     ParameterPTR create_parameter( const dictionary& param_dict );
     ParameterPTR create_parameter( const std::string& name, const dictionary& d );
     
    
    From 4539af5f547f40d15b80952ff130678a9c886033 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 08:10:01 +0100
    Subject: [PATCH 297/375] Adapted test to ng
    
    ---
     testsuite/pytests/test_ignore_and_fire_neuron.py | 5 ++---
     1 file changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/testsuite/pytests/test_ignore_and_fire_neuron.py b/testsuite/pytests/test_ignore_and_fire_neuron.py
    index eee1ecba7d..63c6d47498 100644
    --- a/testsuite/pytests/test_ignore_and_fire_neuron.py
    +++ b/testsuite/pytests/test_ignore_and_fire_neuron.py
    @@ -28,12 +28,11 @@
     import numpy
     
     
    -@nest.ll_api.check_stack
     class IgnoreAndFireNeuronTestCase(unittest.TestCase):
         """Check ignore_and_fire neuron spike properties"""
     
         def setUp(self):
    -        nest.set_verbosity("M_WARNING")
    +        nest.set_verbosity(nest.verbosity.M_WARNING)
             nest.ResetKernel()
     
             # set up source spike generator, as well as parrot neurons
    @@ -62,7 +61,7 @@ def test_IgnoreAndFireSpikeTimes(self):
             spike_times_target = numpy.arange(first_spike_time, self.T, period)
     
             # spike times of NEST model
    -        spike_times_nest = nest.GetStatus(self.spike_recorder, "events")[0]["times"]
    +        spike_times_nest = self.spike_recorder.get("events", "times")
     
             # assert spike times match the expected values
             assert (spike_times_nest == spike_times_target).all()
    
    From e0028a055e0cc3d071bb930f0778b3cf27bd1fd3 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 08:20:10 +0100
    Subject: [PATCH 298/375] Fix references to nest errors in tests
    
    ---
     .../sli2py_connect/test_common_properties_setting.py      | 4 ++--
     testsuite/pytests/sli2py_other/test_wfr_settings.py       | 6 +++---
     testsuite/pytests/sli2py_regressions/test_issue_311.py    | 4 ++--
     testsuite/pytests/test_compartmental_model.py             | 8 ++++----
     testsuite/pytests/test_connect_pairwise_poisson.py        | 5 ++---
     testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py   | 2 +-
     testsuite/pytests/test_iaf_bw_2001.py                     | 2 +-
     testsuite/pytests/test_iaf_bw_2001_exact.py               | 2 +-
     testsuite/pytests/test_labeled_synapses.py                | 4 ++--
     testsuite/pytests/test_tripartite_connect.py              | 4 ++--
     10 files changed, 20 insertions(+), 21 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_connect/test_common_properties_setting.py b/testsuite/pytests/sli2py_connect/test_common_properties_setting.py
    index 2d1f2ee687..fa77caa9bc 100644
    --- a/testsuite/pytests/sli2py_connect/test_common_properties_setting.py
    +++ b/testsuite/pytests/sli2py_connect/test_common_properties_setting.py
    @@ -119,7 +119,7 @@ def test_no_setting_on_connection(syn_model, specs):
         n = nest.Create(specs["neuron"])
         nest.Connect(n, n, syn_spec={"synapse_model": syn_model})
         conn = nest.GetConnections()
    -    with pytest.raises(nest.kernel.NESTErrors.DictError):
    +    with pytest.raises(nest.NESTErrors.DictError):
             conn.set({specs["parameter"]: specs["value"]})
     
     
    @@ -131,5 +131,5 @@ def test_no_setting_on_connect(syn_model, specs):
             specs["setup"]()
     
         n = nest.Create(specs["neuron"])
    -    with pytest.raises(nest.kernel.NESTErrors.NotImplemented):
    +    with pytest.raises(nest.NESTErrors.NotImplemented):
             nest.Connect(n, n, syn_spec={"synapse_model": syn_model, specs["parameter"]: specs["value"]})
    diff --git a/testsuite/pytests/sli2py_other/test_wfr_settings.py b/testsuite/pytests/sli2py_other/test_wfr_settings.py
    index 38e3f5d83c..9a1987b5c5 100644
    --- a/testsuite/pytests/sli2py_other/test_wfr_settings.py
    +++ b/testsuite/pytests/sli2py_other/test_wfr_settings.py
    @@ -48,21 +48,21 @@ def test_set_wfr_after_node_creation_raises():
     
         nest.Create("iaf_psc_alpha")
     
    -    with pytest.raises(nest.kernel.NESTErrors.KernelException):
    +    with pytest.raises(nest.NESTErrors.KernelException):
             nest.set(use_wfr=True)
     
     
     def test_wfr_comm_interval_lower_than_resolution_raises():
         """Ensure that ``wfr_comm_interval`` cannot be set lower than the resolution."""
     
    -    with pytest.raises(nest.kernel.NESTErrors.KernelException):
    +    with pytest.raises(nest.NESTErrors.KernelException):
             nest.set(resolution=0.1, wfr_comm_interval=0.05)
     
     
     def test_wfr_comm_interval_cannot_be_set_when_use_wfr_false():
         """Ensure that ``wfr_comm_interval`` cannot be set if ``use_wfr=False``."""
     
    -    with pytest.raises(nest.kernel.NESTErrors.KernelException):
    +    with pytest.raises(nest.NESTErrors.KernelException):
             nest.set(use_wfr=False, wfr_comm_interval=0.5)
     
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_311.py b/testsuite/pytests/sli2py_regressions/test_issue_311.py
    index 3a3b001d10..5f6e44a306 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_311.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_311.py
    @@ -38,7 +38,7 @@ def test_nest_behaves_well_after_exception_during_update():
         did_crash = False
         try:
             nest.Simulate(100.0)
    -    except nest.kernel.NESTErrors.NumericalInstability:
    +    except nest.NESTErrors.NumericalInstability:
             did_crash = True
             pass
     
    @@ -52,7 +52,7 @@ def test_nest_behaves_well_after_exception_during_update():
         # Set neuron parameters to values that should stabilize numerics
         nrn.set({"V_m": -70.0, "w": 0.0, "I_e": 0.0})
     
    -    with pytest.raises(nest.kernel.NESTErrors.KernelException):
    +    with pytest.raises(nest.NESTErrors.KernelException):
             nest.Simulate(0.1)
     
         # Test that we can simulate again after a ResetKernel
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index 35b6e8e0ca..48158312af 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -1066,7 +1066,7 @@ def test_unused_dict_entries(self):
             cm = nest.Create("cm_default")
     
             with self.assertRaisesRegex(
    -            nest.kernel.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  bla"
    +            nest.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  bla"
             ):
                 cm.compartments = [
                     {"parent_idx": -1, "params": sp_fake},
    @@ -1076,7 +1076,7 @@ def test_unused_dict_entries(self):
             cm = nest.Create("cm_default")
     
             with self.assertRaisesRegex(
    -            nest.kernel.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  params_name"
    +            nest.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  params_name"
             ):
                 cm.compartments = [
                     {"parent_idx": -1, "params_name": sp_fake},
    @@ -1089,7 +1089,7 @@ def test_unused_dict_entries(self):
             ]
     
             with self.assertRaisesRegex(
    -            nest.kernel.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  oops"
    +            nest.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  oops"
             ):
                 cm.receptors = [
                     {"comp_idx": 0, "receptor_type": "AMPA", "params": rp_fake},
    @@ -1102,7 +1102,7 @@ def test_unused_dict_entries(self):
             ]
     
             with self.assertRaisesRegex(
    -            nest.kernel.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  params_name"
    +            nest.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  params_name"
             ):
                 cm.receptors = [
                     {"comp_idx": 0, "receptor_type": "AMPA", "params_name": rp_real},
    diff --git a/testsuite/pytests/test_connect_pairwise_poisson.py b/testsuite/pytests/test_connect_pairwise_poisson.py
    index f7a2c693ca..b90d361ea1 100644
    --- a/testsuite/pytests/test_connect_pairwise_poisson.py
    +++ b/testsuite/pytests/test_connect_pairwise_poisson.py
    @@ -28,11 +28,10 @@
     import scipy.stats
     from connect_test_base import get_connectivity_matrix
     
    -HAVE_OPENMP = nest.ll_api.sli_func("is_threaded")
    +HAVE_OPENMP = nest.build_info["have_threads"]
     
     
     @unittest.skipIf(not HAVE_OPENMP, "NEST was compiled without multi-threading")
    -@nest.ll_api.check_stack
     class TestPairwisePoisson(connect_test_base.ConnectTestBase):
         # specify connection pattern and specific params
         rule = "pairwise_poisson"
    @@ -51,7 +50,7 @@ def testErrorMessages(self):
             conn_params["allow_multapses"] = False
             try:
                 self.setUpNetwork(conn_params)
    -        except nest.kernel.NESTError:
    +        except nest.NESTError:
                 got_error = True
             self.assertTrue(got_error)
     
    diff --git a/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py b/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    index 0f65167d62..14faf0ff8c 100644
    --- a/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    +++ b/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    @@ -56,7 +56,7 @@ def test_unsupported_model_raises(target_model):
         src_nrn = nest.Create(supported_source_models[0])
         tgt_nrn = nest.Create(target_model)
     
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             nest.Connect(src_nrn, tgt_nrn, "all_to_all", {"synapse_model": "eprop_synapse_bsshslm_2020"})
     
     
    diff --git a/testsuite/pytests/test_iaf_bw_2001.py b/testsuite/pytests/test_iaf_bw_2001.py
    index ac47ce7d99..294f32d152 100644
    --- a/testsuite/pytests/test_iaf_bw_2001.py
    +++ b/testsuite/pytests/test_iaf_bw_2001.py
    @@ -236,5 +236,5 @@ def test_illegal_connection_error():
         nrn_bw = nest.Create("iaf_bw_2001")
         receptor_types = nrn_bw.receptor_types
         nmda_syn_spec = {"receptor_type": receptor_types["NMDA"]}
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(nrn_ce, nrn_bw, syn_spec=nmda_syn_spec)
    diff --git a/testsuite/pytests/test_iaf_bw_2001_exact.py b/testsuite/pytests/test_iaf_bw_2001_exact.py
    index 2428443637..c1678166e8 100644
    --- a/testsuite/pytests/test_iaf_bw_2001_exact.py
    +++ b/testsuite/pytests/test_iaf_bw_2001_exact.py
    @@ -169,5 +169,5 @@ def test_connect_NMDA_after_simulate():
     
         nest.Connect(presyn, postsyn, syn_spec=nmda_syn_spec)
         nest.Simulate(1.0)
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.Connect(postsyn, presyn, syn_spec=nmda_syn_spec)
    diff --git a/testsuite/pytests/test_labeled_synapses.py b/testsuite/pytests/test_labeled_synapses.py
    index 42448a0041..13649c8cbe 100644
    --- a/testsuite/pytests/test_labeled_synapses.py
    +++ b/testsuite/pytests/test_labeled_synapses.py
    @@ -198,7 +198,7 @@ def test_SetLabelToNotLabeledSynapse(self):
                 # plain connection
                 if syn in self.eprop_connections or syn in self.eprop_synapses:
                     # try set on connect
    -                with self.assertRaises(nest.kernel.NESTError):
    +                with self.assertRaises(nest.NESTError):
                         nest.Connect(
                             a[:2],
                             a[-2:],
    @@ -213,7 +213,7 @@ def test_SetLabelToNotLabeledSynapse(self):
                     )
                 else:
                     # try set on connect
    -                with self.assertRaises(nest.kernel.NESTError):
    +                with self.assertRaises(nest.NESTError):
                         nest.Connect(
                             a,
                             a,
    diff --git a/testsuite/pytests/test_tripartite_connect.py b/testsuite/pytests/test_tripartite_connect.py
    index ea12156614..8049a63e2a 100644
    --- a/testsuite/pytests/test_tripartite_connect.py
    +++ b/testsuite/pytests/test_tripartite_connect.py
    @@ -145,7 +145,7 @@ def test_tripartite_raises():
         post = nest.Create("parrot_neuron", n_post)
         third = nest.Create("parrot_neuron", n_third)
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             nest.TripartiteConnect(pre, post, third, {"rule": "one_to_one"}, {"rule": "one_to_one"})
     
     
    @@ -155,7 +155,7 @@ def test_tripartite_rejects_make_symmetric():
         post = nest.Create("parrot_neuron", n_post)
         third = nest.Create("parrot_neuron", n_third)
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.TripartiteConnect(
                 pre,
                 post,
    
    From 4366e84e4886b2b1496cdd286044667f61cf857c Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 08:43:23 +0100
    Subject: [PATCH 299/375] Adapt test to pytest-ng
    
    ---
     .../test_eprop_bsshslm_2020_plasticity.py     | 22 +++++++++----------
     1 file changed, 11 insertions(+), 11 deletions(-)
    
    diff --git a/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py b/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    index 14faf0ff8c..2da7c44ac7 100644
    --- a/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    +++ b/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    @@ -27,7 +27,7 @@
     import numpy as np
     import pytest
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     supported_source_models = ["eprop_iaf_bsshslm_2020", "eprop_iaf_adapt_bsshslm_2020"]
     supported_target_models = supported_source_models + ["eprop_readout_bsshslm_2020"]
    @@ -188,10 +188,10 @@ def test_eprop_regression():
             "targets": nrns_rec[:n_record_w] + nrns_out,
         }
     
    -    mm_rec = nest.Create("multimeter", params_mm_rec)
    -    mm_out = nest.Create("multimeter", params_mm_out)
    +    mm_rec = nest.Create("multimeter", params=params_mm_rec)
    +    mm_out = nest.Create("multimeter", params=params_mm_out)
         sr = nest.Create("spike_recorder")
    -    wr = nest.Create("weight_recorder", params_wr)
    +    wr = nest.Create("weight_recorder", params=params_wr)
     
         nrns_rec_record = nrns_rec[:n_record]
     
    @@ -287,7 +287,7 @@ def test_eprop_regression():
             input_spike_times_all = [input_spike_times + start for start in sequence_starts]
             params_gen_spk_in.append({"spike_times": np.hstack(input_spike_times_all).astype(dtype_in_spks)})
     
    -    nest.SetStatus(gen_spk_in, params_gen_spk_in)
    +    gen_spk_in.set(params_gen_spk_in)
     
         # Create output
     
    @@ -314,7 +314,7 @@ def generate_superimposed_sines(steps_sequence, periods):
             "amplitude_values": np.tile(target_signal, n_iter * n_batch),
         }
     
    -    nest.SetStatus(gen_rate_target, params_gen_rate_target)
    +    gen_rate_target.set(params_gen_rate_target)
     
         # Simulate
     
    @@ -522,10 +522,10 @@ def test_eprop_classification():
             "targets": nrns_rec[:n_record_w] + nrns_out,
         }
     
    -    mm_rec = nest.Create("multimeter", params_mm_rec)
    -    mm_out = nest.Create("multimeter", params_mm_out)
    +    mm_rec = nest.Create("multimeter", params=params_mm_rec)
    +    mm_out = nest.Create("multimeter", params=params_mm_out)
         sr = nest.Create("spike_recorder")
    -    wr = nest.Create("weight_recorder", params_wr)
    +    wr = nest.Create("weight_recorder", params=params_wr)
     
         nrns_rec_record = nrns_rec[:n_record]
     
    @@ -695,8 +695,8 @@ def generate_evidence_accumulation_input_output(
             for nrn_out_idx in range(n_out)
         ]
     
    -    nest.SetStatus(gen_spk_in, params_gen_spk_in)
    -    nest.SetStatus(gen_rate_target, params_gen_rate_target)
    +    gen_spk_in.set(params_gen_spk_in)
    +    gen_rate_target.set(params_gen_rate_target)
     
         # Simulate
     
    
    From b4ea7a597c4eec2d7fcb1e4684a76e3d17defea7 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 11:00:31 +0100
    Subject: [PATCH 300/375] Fix support for tripartite
    
    ---
     nestkernel/conn_builder.cpp                   | 15 ++++++++------
     pynest/nest/lib/hl_api_connections.py         | 10 +++-------
     pynest/nestkernel_api.pxd                     |  7 +++++++
     pynest/nestkernel_api.pyx                     | 20 +++++++++++++++++++
     .../test_connect_tripartite_bernoulli.py      |  4 ++--
     5 files changed, 41 insertions(+), 15 deletions(-)
    
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index e26582d76b..02b821d246 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -789,7 +789,15 @@ nest::ThirdBernoulliWithPoolBuilder::ThirdBernoulliWithPoolBuilder( const NodeCo
       , pools_( kernel().vp_manager.get_num_threads(), nullptr )
     {
       conn_spec.update_value( names::p, p_ );
    -  conn_spec.update_value( names::pool_size, pool_size_ );
    +
    +  long pool_size_tmp;
    +  conn_spec.update_value( names::pool_size, pool_size_tmp );
    +  if ( pool_size_tmp < 1 or third->size() < pool_size_tmp )
    +  {
    +    throw BadProperty( "Pool size 1 ≤ pool_size ≤ size of third-factor population required" );
    +  }
    +  pool_size_ = static_cast< size_t >( pool_size_tmp );
    +
       std::string pool_type;
       if ( conn_spec.update_value( names::pool_type, pool_type ) )
       {
    @@ -812,11 +820,6 @@ nest::ThirdBernoulliWithPoolBuilder::ThirdBernoulliWithPoolBuilder( const NodeCo
         throw BadProperty( "Conditional probability of third-factor connection 0 ≤ p_third_if_primary ≤ 1 required" );
       }
     
    -  if ( pool_size_ < 1 or third->size() < pool_size_ )
    -  {
    -    throw BadProperty( "Pool size 1 ≤ pool_size ≤ size of third-factor population required" );
    -  }
    -
       if ( not( random_pool_ or ( targets->size() * pool_size_ == third->size() )
              or ( pool_size_ == 1 and targets->size() % third->size() == 0 ) ) )
       {
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index 1c326bc6d3..ffb63b1349 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -392,13 +392,9 @@ def TripartiteConnect(pre, post, third, conn_spec, third_factor_conn_spec, syn_s
                             f"but 'syn_specs[{key}][{entry}]' is a list or similar."
                         )
     
    -    sps(pre)
    -    sps(post)
    -    sps(third)
    -    sps(conn_spec)
    -    sps(third_factor_conn_spec)
    -    sps(syn_specs)
    -    sr("ConnectTripartite_g_g_g_D_D_D")
    +    nestkernel.llapi_connect_tripartite(
    +        pre._datum, post._datum, third._datum, conn_spec, third_factor_conn_spec, syn_specs
    +    )
     
     
     def Disconnect(*args, conn_spec=None, syn_spec=None):
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 77d67495a1..2a2fdda802 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -21,6 +21,7 @@
     
     from libcpp cimport bool as cbool
     from libcpp.deque cimport deque
    +from libcpp.map cimport map as std_map
     from libcpp.memory cimport shared_ptr
     from libcpp.string cimport string
     from libcpp.utility cimport pair
    @@ -148,6 +149,12 @@ cdef extern from "nest.h" namespace "nest":
                      NodeCollectionPTR targets,
                      const dictionary& connectivity,
                      const vector[dictionary]& synapse_params ) except +custom_exception_handler
    +    void connect_tripartite(NodeCollectionPTR sources,
    +                            NodeCollectionPTR targets,
    +			    NodeCollectionPTR third,
    +                            const dictionary& connectivity,
    +                            const dictionary& third_connectivity,
    +                            const std_map[string, vector[dictionary]]& synapse_params ) except +custom_exception_handler
         void connect_sonata( const dictionary& graph_specs, const long hyperslab_size ) except +custom_exception_handler
         void disconnect(NodeCollectionPTR sources,
                      NodeCollectionPTR targets,
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 537721c492..a98e9e9212 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -24,10 +24,12 @@
     
     # import cython
     
    +# PYNEST-NG: for all libc* imports, prefix names in python with std_ to avoid collisions, also in pxd
     from cython.operator cimport dereference as deref
     from cython.operator cimport preincrement as inc
     from libc.stdlib cimport free, malloc
     from libcpp.deque cimport deque
    +from libcpp.map cimport map as std_map
     from libcpp.string cimport string
     from libcpp.vector cimport vector
     
    @@ -218,6 +220,7 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
             if type(value) is tuple:
                 value = list(value)
             if type(value) is int or isinstance(value, numpy.integer):
    +	    # PYTEST-NG: Should we guard against overflow given that python int has infinite range?
                 cdict[pystr_to_string(key)] = <long>value
             elif type(value) is float or isinstance(value, numpy.floating):
                 cdict[pystr_to_string(key)] = <double>value
    @@ -469,6 +472,23 @@ def llapi_connect(NodeCollectionObject pre, NodeCollectionObject post, object co
                 syn_param_vec)
     
     
    +def llapi_connect_tripartite(NodeCollectionObject pre, NodeCollectionObject post, NodeCollectionObject third,
    +                             object conn_params, object third_factor_conn_params, object synapse_params):
    +    # PYNEST-NG: See if we should add some more checks as in llapi_connect above (rule)
    +
    +
    +    # We are guaranteed that syn_param_vec is a dict {'primary': sc_p, 'third_in': sc_i, 'third_out': sc_o}
    +    # where all sc_* are SynapseCollection objects
    +
    +    cdef std_map[string, vector[dictionary]] syn_param_map
    +    for k, colloc_syns in synapse_params.items():
    +        syn_param_map[pystr_to_string(k)] = pylist_to_dictvec(colloc_syns.syn_specs)
    +
    +    connect_tripartite(pre.thisptr, post.thisptr, third.thisptr,
    +    	               pydict_to_dictionary(conn_params), pydict_to_dictionary(third_factor_conn_params),
    +                       syn_param_map)
    +
    +
     def llapi_disconnect(NodeCollectionObject pre, NodeCollectionObject post, object conn_params, object synapse_params):
         conn_params = conn_params if conn_params is not None else {}
         synapse_params = synapse_params if synapse_params is not None else {}
    diff --git a/testsuite/pytests/test_connect_tripartite_bernoulli.py b/testsuite/pytests/test_connect_tripartite_bernoulli.py
    index b781a33dd1..ac0bd48f51 100644
    --- a/testsuite/pytests/test_connect_tripartite_bernoulli.py
    +++ b/testsuite/pytests/test_connect_tripartite_bernoulli.py
    @@ -342,7 +342,7 @@ def test_statistics(p_primary):
         nr_threads = 2
     
         # set NEST verbosity
    -    nest.set_verbosity("M_FATAL")
    +    nest.set_verbosity(nest.verbosity.M_FATAL)
     
         # here we test
         # 1. p_primary yields the correct indegree and outdegree
    @@ -406,7 +406,7 @@ def test_autapses_true(autapses):
         }
     
         # set NEST verbosity
    -    nest.set_verbosity("M_FATAL")
    +    nest.set_verbosity(nest.verbosity.M_FATAL)
     
         # create the network
         pop_primay = nest.Create("aeif_cond_alpha_astro", N)
    
    From 7ab981cfcdb9efa1fe98a17e2ad40d2c8f30b529 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 11:16:07 +0100
    Subject: [PATCH 301/375] Fix test
    
    ---
     nestkernel/kernel_manager.cpp         |  6 ++++
     testsuite/pytests/test_iaf_bw_2001.py | 41 +++++++++++++--------------
     2 files changed, 26 insertions(+), 21 deletions(-)
    
    diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp
    index 39ee6127c0..697be1b3b3 100644
    --- a/nestkernel/kernel_manager.cpp
    +++ b/nestkernel/kernel_manager.cpp
    @@ -81,6 +81,12 @@ nest::KernelManager::get_build_info_()
       build_info[ "have_gsl" ] = false;
     #endif
     
    +#ifdef HAVE_BOOST
    +  build_info[ "have_boost" ] = true;
    +#else
    +  build_info[ "have_boost" ] = false;
    +#endif
    +
     #ifdef HAVE_MUSIC
       build_info[ "have_music" ] = true;
     #else
    diff --git a/testsuite/pytests/test_iaf_bw_2001.py b/testsuite/pytests/test_iaf_bw_2001.py
    index 294f32d152..bc4f733b75 100644
    --- a/testsuite/pytests/test_iaf_bw_2001.py
    +++ b/testsuite/pytests/test_iaf_bw_2001.py
    @@ -37,9 +37,6 @@
     import numpy.testing as nptest
     import pytest
     
    -HAVE_BOOST = nest.ll_api.sli_func("statusdict/have_boost ::")
    -
    -
     w_ex = 40.0
     w_in = 15.0
     
    @@ -67,7 +64,7 @@ def spiketrain_response(t, tau, spiketrain, w):
         return response
     
     
    -@pytest.mark.skipif(not HAVE_BOOST, reason="Boost is not available")
    +@pytest.mark.skipif(not nest.build_info["have_boost"], reason="Boost is not available")
     def test_iaf_bw_2001():
         """
         Creates 4 neurons.
    @@ -106,20 +103,20 @@ def test_iaf_bw_2001():
             conc_Mg2=1.0,  # Magnesium concentration
         )
     
    -    nrn_presyn = nest.Create("iaf_bw_2001", wang_params)
    -    postsyn_bw1 = nest.Create("iaf_bw_2001", wang_params)
    -    postsyn_bw2 = nest.Create("iaf_bw_2001", wang_params)
    -    postsyn_ce = nest.Create("iaf_cond_exp", cond_exp_params)
    +    nrn_presyn = nest.Create("iaf_bw_2001", params=wang_params)
    +    postsyn_bw1 = nest.Create("iaf_bw_2001", params=wang_params)
    +    postsyn_bw2 = nest.Create("iaf_bw_2001", params=wang_params)
    +    postsyn_ce = nest.Create("iaf_cond_exp", params=cond_exp_params)
     
         receptor_types = nrn_presyn.receptor_types
     
    -    pg = nest.Create("poisson_generator", {"rate": 50.0})
    -    sr = nest.Create("spike_recorder", {"time_in_steps": True})
    +    pg = nest.Create("poisson_generator", params={"rate": 50.0})
    +    sr = nest.Create("spike_recorder", params={"time_in_steps": True})
     
         mm_presyn, mm_bw1, mm_bw2 = nest.Create(
             "multimeter", n=3, params={"record_from": ["V_m", "s_AMPA", "s_GABA"], "interval": 0.1, "time_in_steps": True}
         )
    -    mm_ce = nest.Create("multimeter", {"record_from": ["V_m"], "interval": 0.1, "time_in_steps": True})
    +    mm_ce = nest.Create("multimeter", params={"record_from": ["V_m"], "interval": 0.1, "time_in_steps": True})
     
         # for post-synaptic iaf_bw_2001
         ampa_syn_spec = {"weight": w_ex, "receptor_type": receptor_types["AMPA"]}
    @@ -166,7 +163,7 @@ def test_iaf_bw_2001():
         nptest.assert_array_almost_equal(gaba_soln, mm_bw1.events["s_GABA"])
     
     
    -@pytest.mark.skipif(not HAVE_BOOST, reason="Boost is not available")
    +@pytest.mark.skipif(not nest.build_info["have_boost"], reason="Boost is not available")
     def test_approximation_I_NMDA_V_m():
         """
         Creates 3 neurons.
    @@ -192,19 +189,21 @@ def test_approximation_I_NMDA_V_m():
             "t_ref": 0.0,  # refreactory period
         }
     
    -    nrn_presyn = nest.Create("iaf_bw_2001", nrn_params)
    -    nrn_approx = nest.Create("iaf_bw_2001", nrn_params)
    -    nrn_exact = nest.Create("iaf_bw_2001_exact", nrn_params)
    +    nrn_presyn = nest.Create("iaf_bw_2001", params=nrn_params)
    +    nrn_approx = nest.Create("iaf_bw_2001", params=nrn_params)
    +    nrn_exact = nest.Create("iaf_bw_2001_exact", params=nrn_params)
     
         receptor_types = nrn_presyn.receptor_types
     
    -    pg = nest.Create("poisson_generator", {"rate": 150.0})
    -    sr = nest.Create("spike_recorder", {"time_in_steps": True})
    +    pg = nest.Create("poisson_generator", params={"rate": 150.0})
    +    sr = nest.Create("spike_recorder", params={"time_in_steps": True})
     
    -    mm_presyn = nest.Create("multimeter", {"record_from": ["V_m", "I_NMDA"], "interval": 0.1, "time_in_steps": True})
    +    mm_presyn = nest.Create(
    +        "multimeter", params={"record_from": ["V_m", "I_NMDA"], "interval": 0.1, "time_in_steps": True}
    +    )
     
    -    mm_approx = nest.Create("multimeter", {"record_from": ["V_m"], "interval": 0.1, "time_in_steps": True})
    -    mm_exact = nest.Create("multimeter", {"record_from": ["V_m"], "interval": 0.1, "time_in_steps": True})
    +    mm_approx = nest.Create("multimeter", params={"record_from": ["V_m"], "interval": 0.1, "time_in_steps": True})
    +    mm_exact = nest.Create("multimeter", params={"record_from": ["V_m"], "interval": 0.1, "time_in_steps": True})
     
         # for post-synaptic iaf_bw_2001
         ampa_syn_spec = {"weight": w_ex, "receptor_type": receptor_types["AMPA"]}
    @@ -226,7 +225,7 @@ def test_approximation_I_NMDA_V_m():
         assert np.max(np.abs(mm_approx.events["V_m"] - mm_exact.events["V_m"])) < 0.25
     
     
    -@pytest.mark.skipif(not HAVE_BOOST, reason="Boost is not available")
    +@pytest.mark.skipif(not nest.build_info["have_boost"], reason="Boost is not available")
     def test_illegal_connection_error():
         """
         Test that connecting with NMDA synapses from iaf_cond_exp throws error.
    
    From 0200ae07e9240c06a6dcd73ef1e4935723cb809e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 12:03:59 +0100
    Subject: [PATCH 302/375] Can now pass int values for double params
    
    ---
     libnestutil/dictionary.h                      | 32 +++++++++++++++++++
     ...t_iaf_ps_psp_poisson_generator_accuracy.py |  4 +--
     2 files changed, 34 insertions(+), 2 deletions(-)
    
    diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h
    index e93247f02b..05810aa45b 100644
    --- a/libnestutil/dictionary.h
    +++ b/libnestutil/dictionary.h
    @@ -101,6 +101,38 @@ class dictionary : public std::map< std::string, boost::any >
         }
       }
     
    +  template <>
    +  double
    +  cast_value_< double >( const boost::any& value, const std::string& key ) const
    +  {
    +    try
    +    {
    +      if ( is_type< double >( value ) )
    +      {
    +        return boost::any_cast< double >( value );
    +      }
    +      if ( is_type< long >( value ) )
    +      {
    +        return static_cast< double >( boost::any_cast< long >( value ) );
    +      }
    +      if ( is_type< size_t >( value ) )
    +      {
    +        return static_cast< double >( boost::any_cast< size_t >( value ) );
    +      }
    +      if ( is_type< int >( value ) )
    +      {
    +        return static_cast< double >( boost::any_cast< int >( value ) );
    +      }
    +      throw boost::bad_any_cast(); // deflect to error handling below
    +    }
    +    catch ( const boost::bad_any_cast& )
    +    {
    +      const std::string msg =
    +        std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type double.";
    +      throw nest::TypeMismatch( msg );
    +    }
    +  }
    +
       /**
        * @brief Cast the specified value to an integer.
        *
    diff --git a/testsuite/pytests/sli2py_stimulating/test_iaf_ps_psp_poisson_generator_accuracy.py b/testsuite/pytests/sli2py_stimulating/test_iaf_ps_psp_poisson_generator_accuracy.py
    index 8f17c4c2e0..d023efdccd 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_iaf_ps_psp_poisson_generator_accuracy.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_iaf_ps_psp_poisson_generator_accuracy.py
    @@ -115,7 +115,7 @@ def create_spiketrain():
         nest.ResetKernel()
         nest.set(tics_per_ms=2**-min_exponent, resolution=1)
     
    -    pg = nest.Create("poisson_generator_ps", {"rate": poisson_rate})
    +    pg = nest.Create("poisson_generator_ps", params={"rate": poisson_rate})
         sr = nest.Create("spike_recorder")
     
         nest.Connect(pg, sr)
    @@ -133,7 +133,7 @@ def test_poisson_spikes_different_stepsizes(h):
     
         nest.set(tics_per_ms=2**-min_exponent, resolution=2**h)
     
    -    sg = nest.Create("spike_generator", {"start": 0, "spike_times": spiketrain, "precise_times": True})
    +    sg = nest.Create("spike_generator", params={"start": 0, "spike_times": spiketrain, "precise_times": True})
     
         neuron = nest.Create("iaf_psc_alpha_ps", params=neuron_params)
         sr = nest.Create("spike_recorder")
    
    From e64466075a22e1713b424da1f6dafdb7698eb9dc Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 13:21:42 +0100
    Subject: [PATCH 303/375] Fix openmp-check
    
    ---
     testsuite/do_tests.sh | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/testsuite/do_tests.sh b/testsuite/do_tests.sh
    index c9f6efa24b..0918fc7308 100755
    --- a/testsuite/do_tests.sh
    +++ b/testsuite/do_tests.sh
    @@ -132,6 +132,8 @@ get_build_info ()
     
     NEST="nest_serial"
     HAVE_MPI="$(get_build_info have_mpi)"
    +HAVE_OPENMP="$(get_build_info have_threads)"
    +
     if test "${HAVE_MPI}" = "True"; then
         MPI_LAUNCHER="$(get_build_info mpiexec)"
         MPI_LAUNCHER_VERSION="$($MPI_LAUNCHER --version | head -n1)"
    
    From b70dc9dc9c54f04515e2dc8888a8617cd9182f5e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 13:22:28 +0100
    Subject: [PATCH 304/375] Correctly handle missing senders/targets specs in
     weight recorder
    
    ---
     models/weight_recorder.cpp | 6 ++++--
     1 file changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp
    index 0dcce3a7b8..7f7d3ca2cb 100644
    --- a/models/weight_recorder.cpp
    +++ b/models/weight_recorder.cpp
    @@ -53,6 +53,8 @@ nest::weight_recorder::weight_recorder( const weight_recorder& n )
     }
     
     nest::weight_recorder::Parameters_::Parameters_()
    +  : senders_( nullptr )
    +  , targets_( nullptr )
     {
     }
     
    @@ -149,8 +151,8 @@ nest::weight_recorder::handle( WeightRecorderEvent& e )
       {
         // P_senders_ is defined and sender is not in it
         // or P_targets_ is defined and receiver is not in it
    -    if ( ( P_.senders_->size() != 0 and not P_.senders_->contains( e.get_sender_node_id() ) )
    -      or ( P_.targets_->size() != 0 and not P_.targets_->contains( e.get_receiver_node_id() ) ) )
    +    if ( ( P_.senders_ and P_.senders_->size() != 0 and not P_.senders_->contains( e.get_sender_node_id() ) )
    +      or ( P_.targets_ and P_.targets_->size() != 0 and not P_.targets_->contains( e.get_receiver_node_id() ) ) )
         {
           return;
         }
    
    From 3e159e979dc546d00452e7cf3c9f3c9ef217658e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 13:38:12 +0100
    Subject: [PATCH 305/375] weight_recorder::Parameters_ elements must be
     initialized with empty NCs, commented
    
    ---
     models/weight_recorder.cpp | 10 ++++++----
     1 file changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/models/weight_recorder.cpp b/models/weight_recorder.cpp
    index 7f7d3ca2cb..0136e51d1f 100644
    --- a/models/weight_recorder.cpp
    +++ b/models/weight_recorder.cpp
    @@ -52,9 +52,11 @@ nest::weight_recorder::weight_recorder( const weight_recorder& n )
     {
     }
     
    +// We must initialize senders and targets here with empty NCs because
    +// they will be returned by get_status()
     nest::weight_recorder::Parameters_::Parameters_()
    -  : senders_( nullptr )
    -  , targets_( nullptr )
    +  : senders_( new NodeCollectionPrimitive() )
    +  , targets_( new NodeCollectionPrimitive() )
     {
     }
     
    @@ -151,8 +153,8 @@ nest::weight_recorder::handle( WeightRecorderEvent& e )
       {
         // P_senders_ is defined and sender is not in it
         // or P_targets_ is defined and receiver is not in it
    -    if ( ( P_.senders_ and P_.senders_->size() != 0 and not P_.senders_->contains( e.get_sender_node_id() ) )
    -      or ( P_.targets_ and P_.targets_->size() != 0 and not P_.targets_->contains( e.get_receiver_node_id() ) ) )
    +    if ( ( P_.senders_->size() != 0 and not P_.senders_->contains( e.get_sender_node_id() ) )
    +      or ( P_.targets_->size() != 0 and not P_.targets_->contains( e.get_receiver_node_id() ) ) )
         {
           return;
         }
    
    From 65f66f9cfe5973d6bc355636e01d805896cdcea4 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 13:47:22 +0100
    Subject: [PATCH 306/375] Correctly read out pool size from param dict
    
    ---
     nestkernel/conn_builder.cpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index 02b821d246..35feafb6c4 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -790,7 +790,8 @@ nest::ThirdBernoulliWithPoolBuilder::ThirdBernoulliWithPoolBuilder( const NodeCo
     {
       conn_spec.update_value( names::p, p_ );
     
    -  long pool_size_tmp;
    +  // PYTEST-NG: Consider cleaner scheme for handling size_t vs long
    +  long pool_size_tmp = static_cast< long >( pool_size_ );
       conn_spec.update_value( names::pool_size, pool_size_tmp );
       if ( pool_size_tmp < 1 or third->size() < pool_size_tmp )
       {
    
    From 8c96b1969fe48cf34349ea7ff67745f7430b3e41 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 18:01:31 +0100
    Subject: [PATCH 307/375] Properly handle grid anchors
    
    ---
     nestkernel/layer_impl.h | 4 ++--
     nestkernel/spatial.cpp  | 6 +++---
     2 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/nestkernel/layer_impl.h b/nestkernel/layer_impl.h
    index 46ea1da642..83195d6f09 100644
    --- a/nestkernel/layer_impl.h
    +++ b/nestkernel/layer_impl.h
    @@ -191,7 +191,7 @@ Layer< D >::do_get_global_positions_ntree_( NodeCollectionPTR node_collection )
       if ( cached_vector_md_ == node_collection->get_metadata() )
       {
         // Convert from vector to Ntree
    -
    +    // PYNEST-NG: Why different from Master?
         typename std::back_insert_iterator< Ntree< D, size_t > > to = std::back_inserter( *cached_ntree_ );
     
         for ( typename std::vector< std::pair< Position< D >, size_t > >::iterator from = cached_vector_->begin();
    @@ -403,7 +403,7 @@ MaskedLayer< D >::check_mask_( Layer< D >& layer, bool allow_oversized )
         Position< D > lower_left = ext / dims * grid_mask.get_upper_left() - ext / dims * 0.5;
         Position< D > upper_right = ext / dims * grid_mask.get_lower_right() - ext / dims * 0.5;
     
    -    double y = lower_left[ 1 ];
    +    const double y = lower_left[ 1 ];
         lower_left[ 1 ] = -upper_right[ 1 ];
         upper_right[ 1 ] = -y;
     
    diff --git a/nestkernel/spatial.cpp b/nestkernel/spatial.cpp
    index cd51709b8d..ed956a90cc 100644
    --- a/nestkernel/spatial.cpp
    +++ b/nestkernel/spatial.cpp
    @@ -387,14 +387,14 @@ create_mask( const dictionary& mask_dict )
         // For grid layers only, it is also possible to provide an array of longs.
         try
         {
    -      std::vector< long > anchor = mask_dict.get< std::vector< long > >( names::anchor );
    +      const std::vector< long >& anchor = mask_dict.get< std::vector< long > >( names::anchor );
     
           switch ( anchor.size() )
           {
           case 2:
             try
             {
    -          auto grid_mask_2d = dynamic_cast< GridMask< 2 >& >( *mask );
    +          auto& grid_mask_2d = dynamic_cast< GridMask< 2 >& >( *mask );
               grid_mask_2d.set_anchor( Position< 2, int >( anchor[ 0 ], anchor[ 1 ] ) );
             }
             catch ( std::bad_cast& e )
    @@ -405,7 +405,7 @@ create_mask( const dictionary& mask_dict )
           case 3:
             try
             {
    -          auto grid_mask_3d = dynamic_cast< GridMask< 3 >& >( *mask );
    +          auto& grid_mask_3d = dynamic_cast< GridMask< 3 >& >( *mask );
               grid_mask_3d.set_anchor( Position< 3, int >( anchor[ 0 ], anchor[ 1 ], anchor[ 2 ] ) );
             }
             catch ( std::bad_cast& e )
    
    From 998a2091d4f0d38c6cdb6049050f351377a4dd39 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 18:06:56 +0100
    Subject: [PATCH 308/375] Removed test that is no longer sensible
    
    ---
     testsuite/pytests/test_helper_functions.py | 19 -------------------
     1 file changed, 19 deletions(-)
    
    diff --git a/testsuite/pytests/test_helper_functions.py b/testsuite/pytests/test_helper_functions.py
    index 5a27b5ae19..e659b2a337 100644
    --- a/testsuite/pytests/test_helper_functions.py
    +++ b/testsuite/pytests/test_helper_functions.py
    @@ -24,25 +24,6 @@
     import testutil
     
     
    -@pytest.mark.parametrize(
    -    "level, value",
    -    [
    -        ("M_ALL", 0),
    -        ("M_DEBUG", 5),
    -        ("M_STATUS", 7),
    -        ("M_INFO", 10),
    -        ("M_DEPRECATED", 18),
    -        ("M_WARNING", 20),
    -        ("M_ERROR", 30),
    -        ("M_FATAL", 40),
    -        ("M_QUIET", 100),
    -    ],
    -)
    -def test_set_verbosity(level, value):
    -    nest.set_verbosity(level)
    -    assert nest.get_verbosity() == value
    -
    -
     @pytest.mark.parametrize(
         "a, b, expected",
         [
    
    From b235beabd2f4d2a4503df019a0fde7c2e740505e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 18:09:25 +0100
    Subject: [PATCH 309/375] Adapted test to new Create() behavior
    
    ---
     testsuite/pytests/test_iaf_bw_2001_exact.py | 14 +++++++-------
     1 file changed, 7 insertions(+), 7 deletions(-)
    
    diff --git a/testsuite/pytests/test_iaf_bw_2001_exact.py b/testsuite/pytests/test_iaf_bw_2001_exact.py
    index c1678166e8..def80314af 100644
    --- a/testsuite/pytests/test_iaf_bw_2001_exact.py
    +++ b/testsuite/pytests/test_iaf_bw_2001_exact.py
    @@ -96,20 +96,20 @@ def test_iaf_bw_2001_exact():
             conc_Mg2=1.0,  # Magnesium concentration
         )
     
    -    bw_presyn = nest.Create("iaf_bw_2001_exact", wang_params)
    -    bw_postsyn_1 = nest.Create("iaf_bw_2001_exact", wang_params)
    -    bw_postsyn_2 = nest.Create("iaf_bw_2001_exact", wang_params)
    -    cond_exp_postsyn = nest.Create("iaf_cond_exp", cond_exp_params)
    +    bw_presyn = nest.Create("iaf_bw_2001_exact", params=wang_params)
    +    bw_postsyn_1 = nest.Create("iaf_bw_2001_exact", params=wang_params)
    +    bw_postsyn_2 = nest.Create("iaf_bw_2001_exact", params=wang_params)
    +    cond_exp_postsyn = nest.Create("iaf_cond_exp", params=cond_exp_params)
     
         receptor_types = bw_presyn.receptor_types
     
    -    pg = nest.Create("poisson_generator", {"rate": 50.0})
    -    sr = nest.Create("spike_recorder", {"time_in_steps": True})
    +    pg = nest.Create("poisson_generator", params={"rate": 50.0})
    +    sr = nest.Create("spike_recorder", params={"time_in_steps": True})
     
         mm_presyn, mm_bw1, mm_bw2 = nest.Create(
             "multimeter", n=3, params={"record_from": ["V_m", "s_AMPA", "s_GABA"], "interval": 0.1, "time_in_steps": True}
         )
    -    mm_ce = nest.Create("multimeter", {"record_from": ["V_m"], "interval": 0.1, "time_in_steps": True})
    +    mm_ce = nest.Create("multimeter", params={"record_from": ["V_m"], "interval": 0.1, "time_in_steps": True})
     
         # for post-synaptic iaf_bw_2001_exact
         ampa_syn_spec = {"weight": w_ex, "receptor_type": receptor_types["AMPA"]}
    
    From 831522a649985c17e8ec03dfe90afd723f20cde9 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 21:47:13 +0100
    Subject: [PATCH 310/375] Fix connect_arrays
    
    ---
     pynest/nest/lib/hl_api_connections.py | 4 +++-
     pynest/nestkernel_api.pyx             | 8 ++++----
     2 files changed, 7 insertions(+), 5 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_connections.py b/pynest/nest/lib/hl_api_connections.py
    index ffb63b1349..767c2199b2 100644
    --- a/pynest/nest/lib/hl_api_connections.py
    +++ b/pynest/nest/lib/hl_api_connections.py
    @@ -251,10 +251,12 @@ def Connect(pre, post, conn_spec=None, syn_spec=None, return_synapsecollection=F
                 syn_param_values = numpy.zeros([len(reduced_processed_syn_spec), len(pre)])
                 for i, value in enumerate(reduced_processed_syn_spec.values()):
                     syn_param_values[i] = value
    +            syn_param_keys = numpy.asarray(list(reduced_processed_syn_spec.keys()))
             else:
                 syn_param_values = None
    +            syn_param_keys = None
     
    -        connect_arrays(pre, post, weights, delays, synapse_model, reduced_processed_syn_spec.keys(), syn_param_values)
    +        nestkernel.llapi_connect_arrays(pre, post, weights, delays, synapse_model, syn_param_keys, syn_param_values)
     
             return
     
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index a98e9e9212..6e941b5f81 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -882,7 +882,7 @@ def llapi_set_connection_status(object conns, object params):
             raise TypeError('params must be a dict or a list of dicts')
     
     
    -def ll_api_connect_arrays(sources, targets, weights, delays, synapse_model, syn_param_keys, syn_param_values):
    +def llapi_connect_arrays(sources, targets, weights, delays, synapse_model, syn_param_keys, syn_param_values):
         """Calls connect_arrays function, bypassing SLI to expose pointers to the NumPy arrays"""
     
         if not (isinstance(sources, numpy.ndarray) and sources.ndim == 1) or not numpy.issubdtype(sources.dtype, numpy.integer):
    @@ -894,7 +894,7 @@ def ll_api_connect_arrays(sources, targets, weights, delays, synapse_model, syn_
         if delays is not None and  not (isinstance(delays, numpy.ndarray) and delays.ndim == 1):
             raise TypeError('delays must be a 1-dimensional NumPy array')
         if syn_param_keys is not None and not ((isinstance(syn_param_keys, numpy.ndarray) and syn_param_keys.ndim == 1) and
    -                                            numpy.issubdtype(syn_param_keys.dtype, numpy.string_)):
    +                                            numpy.issubdtype(syn_param_keys.dtype, numpy.str_)):
             raise TypeError('syn_param_keys must be a 1-dimensional NumPy array of strings')
         if syn_param_values is not None and not ((isinstance(syn_param_values, numpy.ndarray) and syn_param_values.ndim == 2)):
             raise TypeError('syn_param_values must be a 2-dimensional NumPy array')
    @@ -935,8 +935,8 @@ def ll_api_connect_arrays(sources, targets, weights, delays, synapse_model, syn_
         # Storing parameter keys in a vector of strings
         cdef vector[string] param_keys_ptr
         if syn_param_keys is not None:
    -        for i, key in enumerate(syn_param_keys):
    -            param_keys_ptr.push_back(key)
    +        for key in syn_param_keys:
    +            param_keys_ptr.push_back(pystr_to_string(key))
     
         cdef double[:, ::1] param_values_mv
         cdef double* param_values_ptr = NULL
    
    From be2451b50f8b9f13933120b4501d0c33a79d4689 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 21:51:04 +0100
    Subject: [PATCH 311/375] Fix test
    
    ---
     testsuite/pytests/sli2py_recording/test_multimeter_stepping.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py b/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    index c800c5ae61..dfe63cbaf5 100644
    --- a/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    +++ b/testsuite/pytests/sli2py_recording/test_multimeter_stepping.py
    @@ -93,7 +93,7 @@ def build_net(model):
         nest.ResetKernel()
         nrn = nest.Create(model)
         pg = nest.Create("poisson_generator", params={"rate": 1e4})
    -    mm = nest.Create("multimeter", {"interval": nest.resolution, "record_from": nrn.recordables})
    +    mm = nest.Create("multimeter", params={"interval": nest.resolution, "record_from": nrn.recordables})
     
         receptor_type = 0
         if model in extra_params.keys():
    
    From a08d38f857f84e52b664a4a54649dc773ff46c73 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:02:09 +0100
    Subject: [PATCH 312/375] Fix further test
    
    ---
     .../pytests/sli2py_connect/test_common_properties_setting.py    | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/sli2py_connect/test_common_properties_setting.py b/testsuite/pytests/sli2py_connect/test_common_properties_setting.py
    index fa77caa9bc..0f35877e2c 100644
    --- a/testsuite/pytests/sli2py_connect/test_common_properties_setting.py
    +++ b/testsuite/pytests/sli2py_connect/test_common_properties_setting.py
    @@ -119,7 +119,7 @@ def test_no_setting_on_connection(syn_model, specs):
         n = nest.Create(specs["neuron"])
         nest.Connect(n, n, syn_spec={"synapse_model": syn_model})
         conn = nest.GetConnections()
    -    with pytest.raises(nest.NESTErrors.DictError):
    +    with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
             conn.set({specs["parameter"]: specs["value"]})
     
     
    
    From 74fb20f48c750acfcc8e74182bc97ad2b97e01ed Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:04:06 +0100
    Subject: [PATCH 313/375] Adjust test to new syntax
    
    ---
     testsuite/pytests/sli2py_neurons/test_iaf_psc_exp.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_neurons/test_iaf_psc_exp.py b/testsuite/pytests/sli2py_neurons/test_iaf_psc_exp.py
    index 2a471020fc..ef360626e5 100644
    --- a/testsuite/pytests/sli2py_neurons/test_iaf_psc_exp.py
    +++ b/testsuite/pytests/sli2py_neurons/test_iaf_psc_exp.py
    @@ -59,9 +59,9 @@ def test_iaf_psc_exp_dc_input():
         nest.ResetKernel()
         nest.set(resolution=dt, local_num_threads=1)
     
    -    dc_gen = nest.Create("dc_generator", {"amplitude": dc_amp})
    +    dc_gen = nest.Create("dc_generator", params={"amplitude": dc_amp})
         nrn = nest.Create("iaf_psc_exp", 1)
    -    vm = nest.Create("voltmeter", {"interval": 0.1})
    +    vm = nest.Create("voltmeter", params={"interval": 0.1})
     
         syn_spec = {"synapse_model": "static_synapse", "weight": 1.0, "delay": dt}
         nest.Connect(dc_gen, nrn, syn_spec=syn_spec)
    
    From 6e464f3385b61677f7523175d5ff78d49007048a Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:07:31 +0100
    Subject: [PATCH 314/375] Proper array comparison
    
    ---
     testsuite/pytests/sli2py_other/test_thread_local_ids.py | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_other/test_thread_local_ids.py b/testsuite/pytests/sli2py_other/test_thread_local_ids.py
    index 35da7c9c12..4d19b081eb 100644
    --- a/testsuite/pytests/sli2py_other/test_thread_local_ids.py
    +++ b/testsuite/pytests/sli2py_other/test_thread_local_ids.py
    @@ -25,6 +25,7 @@
     """
     
     import nest
    +import numpy as np
     import pytest
     
     pytestmark = pytest.mark.skipif_missing_threads
    @@ -47,7 +48,7 @@ def test_thread_local_ids_after_connect():
             syn_spec={"synapse_model": "static_synapse_hpc"},
         )
     
    -    assert nc.thread_local_id == (0, 0, 0, 0)
    +    np.testing.assert_array_equal(nc.thread_local_id, (0, 0, 0, 0))
     
     
     def test_thread_local_ids_after_simulate():
    @@ -56,4 +57,4 @@ def test_thread_local_ids_after_simulate():
         nc = nest.Create("iaf_psc_alpha", 4)
         nest.Simulate(10.0)
     
    -    assert nc.thread_local_id == (0, 0, 0, 0)
    +    np.testing.assert_array_equal(nc.thread_local_id, (0, 0, 0, 0))
    
    From f9675f68ae9aa05ea480cd4e3fef2ed5ce8d8d4f Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:10:13 +0100
    Subject: [PATCH 315/375] Test for correct exception in test
    
    ---
     testsuite/pytests/sli2py_regressions/test_issue_545.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_545.py b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    index 173b871b5f..42e4e76181 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_545.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_545.py
    @@ -37,14 +37,14 @@ def set_kernel():
     
     def test_set_bad_property_on_default_raises():
         # test defaults
    -    with pytest.raises(nest.NESTErrors.TypeMismatch):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults("iaf_psc_alpha", {"tau_m": -10})
     
     
     def test_set_bad_property_on_neuron_raises():
         # test neuron
         n = nest.Create("iaf_psc_alpha")
    -    with pytest.raises(nest.NESTErrors.TypeMismatch):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             n.set({"tau_m": -10})
     
     
    
    From bfffd055337d955898746ce165f7171d06ca6675 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:29:08 +0100
    Subject: [PATCH 316/375] Adjusted test
    
    ---
     pynest/nest/lib/hl_api_nodes.py                              | 2 ++
     .../pytests/sli2py_stimulating/test_sinusoidal_generators.py | 5 +++--
     2 files changed, 5 insertions(+), 2 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_nodes.py b/pynest/nest/lib/hl_api_nodes.py
    index dd6a3e8e7f..36530e5ec3 100644
    --- a/pynest/nest/lib/hl_api_nodes.py
    +++ b/pynest/nest/lib/hl_api_nodes.py
    @@ -138,6 +138,8 @@ def Create(model, n=1, params=None, positions=None):
             layer.set(params if params else {})
             return layer
     
    +    # PYNEST-NG: This breaks some use cases, e.g., setting individual_spike_trains on sinusiodal generators
    +    # Could we go back to initializing via Defaults?
         node_ids = nestkernel.llapi_create(model, n)
     
         if (isinstance(params, dict) and params) or isinstance(params, (list, tuple)):
    diff --git a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_generators.py b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_generators.py
    index 775554f4b4..6728348597 100644
    --- a/testsuite/pytests/sli2py_stimulating/test_sinusoidal_generators.py
    +++ b/testsuite/pytests/sli2py_stimulating/test_sinusoidal_generators.py
    @@ -58,6 +58,7 @@ def test_set_individual_spike_trains_on_set_defaults(gen_model):
         assert not gen.individual_spike_trains
     
     
    +@pytest.mark.skip(reason="PyNEST-NG Create() sets params on instances, instead of via Defaults")
     @pytest.mark.parametrize("gen_model", gen_models)
     def test_set_individual_spike_trains_on_creation(gen_model):
         """
    @@ -91,7 +92,7 @@ def test_set_individual_spike_trains_on_instance(gen_model):
     
         gen = nest.Create(gen_model)
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             gen.individual_spike_trains = False
     
     
    @@ -172,7 +173,7 @@ def test_sinusoidal_generator_rate_profile(gen_model):
     
         parrots = nest.Create("parrot_neuron")
         sspg = nest.Create(gen_model)
    -    mm = nest.Create("multimeter", {"record_from": ["rate"]})
    +    mm = nest.Create("multimeter", params={"record_from": ["rate"]})
     
         nest.Connect(sspg, parrots)
         nest.Connect(mm, sspg)
    
    From 1aa28320fa7b378aae3c30fadbd7381009a97b90 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:40:03 +0100
    Subject: [PATCH 317/375] Skip test that does not longer work due to changes to
     Create() behavior
    
    ---
     testsuite/pytests/sli2py_synapses/test_hpc_synapse.py | 7 ++++++-
     1 file changed, 6 insertions(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    index dcb3b9192e..ffc7ae0572 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    @@ -55,7 +55,12 @@ def has_hpc_suffix(syn_model):
     
     
     def get_hpc_models():
    -    ignore_list = ["clopath_synapse_hpc", "stdp_dopamine_synapse_hpc", "urbanczik_synapse_hpc"]
    +    ignore_list = [
    +        "clopath_synapse_hpc",
    +        "eprop_synapse_bsshslm_2020_hpc",
    +        "stdp_dopamine_synapse_hpc",
    +        "urbanczik_synapse_hpc",
    +    ]
     
         hpc_models = [model for model in nest.synapse_models if has_hpc_suffix(model) and model not in ignore_list]
     
    
    From 4193016a6fabbe68c5880e419b9471daad4473a7 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:40:11 +0100
    Subject: [PATCH 318/375] Fix test
    
    ---
     testsuite/pytests/test_aeif_cond_alpha_multisynapse.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py b/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    index 0783ebc3df..34eff61ebf 100644
    --- a/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    +++ b/testsuite/pytests/test_aeif_cond_alpha_multisynapse.py
    @@ -23,7 +23,7 @@
     This test creates a multisynapse neuron and first checks if time constants
     can be set correctly.
     
    -Afterwards, it simulates the mutisynapse neuron with n (n=4) different time
    +Afterwards, it simulates the multisynapse neuron with n (n=4) different time
     constants and records the neuron's synaptic current. At the same time, it simulates
     n (n=4) single synapse neurons with according parameters.
     At the end, it compares the multisynapse neuron currents with each according single
    @@ -117,7 +117,7 @@ def test_single_multi_synapse_equivalence(self, have_plotting):
     
             summed_V_m = np.zeros_like(multisynapse_neuron_vm.events["V_m"], dtype=float)
             for i in range(4):
    -            summed_V_m += singlesynapse_neuron_vm[i].events["V_m"][0] - V_m_steadystate
    +            summed_V_m += singlesynapse_neuron_vm[i].events["V_m"] - V_m_steadystate
     
             summed_V_m += V_m_steadystate
     
    
    From c94f1f34e49e08ca0c2a3cdf81628119619eb4fc Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:48:04 +0100
    Subject: [PATCH 319/375] Fix parameter names
    
    ---
     models/astrocyte_lr_1994.cpp        | 4 ++--
     testsuite/pytests/test_astrocyte.py | 6 +++---
     2 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/models/astrocyte_lr_1994.cpp b/models/astrocyte_lr_1994.cpp
    index aa415e89ed..9087235168 100644
    --- a/models/astrocyte_lr_1994.cpp
    +++ b/models/astrocyte_lr_1994.cpp
    @@ -275,7 +275,7 @@ void
     nest::astrocyte_lr_1994::State_::get( dictionary& d ) const
     {
       d[ names::IP3 ] = y_[ IP3 ];
    -  d[ names::Ca ] = y_[ Ca_astro ];
    +  d[ names::Ca_astro ] = y_[ Ca_astro ];
       d[ names::h_IP3R ] = y_[ h_IP3R ];
     }
     
    @@ -283,7 +283,7 @@ void
     nest::astrocyte_lr_1994::State_::set( const dictionary& d, const Parameters_&, Node* node )
     {
       update_value_param( d, names::IP3, y_[ IP3 ], node );
    -  update_value_param( d, names::Ca, y_[ Ca_astro ], node );
    +  update_value_param( d, names::Ca_astro, y_[ Ca_astro ], node );
       update_value_param( d, names::h_IP3R, y_[ h_IP3R ], node );
     
       if ( y_[ IP3 ] < 0 )
    diff --git a/testsuite/pytests/test_astrocyte.py b/testsuite/pytests/test_astrocyte.py
    index ab4aa887bc..a2ef80a37a 100644
    --- a/testsuite/pytests/test_astrocyte.py
    +++ b/testsuite/pytests/test_astrocyte.py
    @@ -61,13 +61,13 @@ def test_closeness_nest_odeint():
         astrocyte = nest.Create("astrocyte_lr_1994", params={"IP3": 1.0, "Ca_astro": 1.0, "h_IP3R": 1.0})
         mm = nest.Create(
             "multimeter",
    -        {"interval": nest.resolution, "record_from": ["IP3", "Ca_astro", "h_IP3R"]},
    +        params={"interval": nest.resolution, "record_from": ["IP3", "Ca_astro", "h_IP3R"]},
         )
    -    spk_ge = nest.Create("spike_generator", {"spike_times": spike_times, "spike_weights": spike_weights})
    +    spk_ge = nest.Create("spike_generator", params={"spike_times": spike_times, "spike_weights": spike_weights})
     
         # connect astrocyte to devices
         nest.Connect(mm, astrocyte)
    -    nest.Connect(sg, astrocyte, syn_spec={"delay": nest.resolution})
    +    nest.Connect(spk_ge, astrocyte, syn_spec={"delay": nest.resolution})
     
         # simulate
         nest.Simulate(simtime)
    
    From e753fd1a95257ed4a674f0372ff9663dc9fb7aab Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 22:59:09 +0100
    Subject: [PATCH 320/375] Fix test
    
    ---
     testsuite/pytests/test_compartmental_model.py | 21 +++++--------------
     1 file changed, 5 insertions(+), 16 deletions(-)
    
    diff --git a/testsuite/pytests/test_compartmental_model.py b/testsuite/pytests/test_compartmental_model.py
    index 48158312af..0b8948dfc9 100644
    --- a/testsuite/pytests/test_compartmental_model.py
    +++ b/testsuite/pytests/test_compartmental_model.py
    @@ -925,7 +925,7 @@ def test_continuerun(self, dt=0.1):
             nest.Simulate(12.0)
             nest.Simulate(88.0)
     
    -        events_neat_1 = m_neat.events[0]
    +        events_neat_1 = m_neat.events
     
             for key in recordables:
                 assert np.allclose(events_neat_0[key], events_neat_1[key])
    @@ -1065,19 +1065,12 @@ def test_unused_dict_entries(self):
             # test unused compartment param
             cm = nest.Create("cm_default")
     
    -        with self.assertRaisesRegex(
    -            nest.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  bla"
    -        ):
    +        with self.assertRaises(nest.NESTErrors.UnaccessedDictionaryEntry):
                 cm.compartments = [
                     {"parent_idx": -1, "params": sp_fake},
                 ]
     
    -        # test unused compartment param
    -        cm = nest.Create("cm_default")
    -
    -        with self.assertRaisesRegex(
    -            nest.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  params_name"
    -        ):
    +        with self.assertRaises(nest.NESTErrors.UnaccessedDictionaryEntry):
                 cm.compartments = [
                     {"parent_idx": -1, "params_name": sp_fake},
                 ]
    @@ -1088,9 +1081,7 @@ def test_unused_dict_entries(self):
                 {"parent_idx": -1, "params": sp_real},
             ]
     
    -        with self.assertRaisesRegex(
    -            nest.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  oops"
    -        ):
    +        with self.assertRaises(nest.NESTErrors.UnaccessedDictionaryEntry):
                 cm.receptors = [
                     {"comp_idx": 0, "receptor_type": "AMPA", "params": rp_fake},
                 ]
    @@ -1101,9 +1092,7 @@ def test_unused_dict_entries(self):
                 {"parent_idx": -1, "params": sp_real},
             ]
     
    -        with self.assertRaisesRegex(
    -            nest.NESTError, "DictError in SLI function SetStatus_id: Unused dictionary items:  params_name"
    -        ):
    +        with self.assertRaises(nest.NESTErrors.UnaccessedDictionaryEntry):
                 cm.receptors = [
                     {"comp_idx": 0, "receptor_type": "AMPA", "params_name": rp_real},
                 ]
    
    From 57d63a1301b1fea7da44be04ddb38723c5eb165e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 23:14:09 +0100
    Subject: [PATCH 321/375] Reverting parameter.h to 949f4...
    
    ---
     nestkernel/parameter.h | 11 ++---------
     1 file changed, 2 insertions(+), 9 deletions(-)
    
    diff --git a/nestkernel/parameter.h b/nestkernel/parameter.h
    index b6742ea24f..5ec44e033f 100644
    --- a/nestkernel/parameter.h
    +++ b/nestkernel/parameter.h
    @@ -150,15 +150,8 @@ class ConstantParameter : public Parameter
        */
       ConstantParameter( const dictionary& d )
       {
    -    try
    -    {
    -      value_ = d.get< double >( "value" );
    -    }
    -    catch ( const TypeMismatch& )
    -    {
    -      value_ = d.get< long >( "value" );
    -      returns_int_only_ = true;
    -    }
    +    value_ = d.get< double >( "value" ); // PYNEST-NG: Must be able to pass value as long and double
    +    returns_int_only_ = value_is_integer_( value_ );
       }
     
       ~ConstantParameter() override = default;
    
    From eb3fd6423f0fae0fbf037ac54409429948aafaf1 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 23:26:31 +0100
    Subject: [PATCH 322/375] Fix parameter arithmetic on py level
    
    ---
     pynest/nest/lib/hl_api_types.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 6378a1a3eb..70fa13e4ea 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -1103,7 +1103,7 @@ def __mul__(self, other):
         def __rmul__(self, lhs):
             return self * lhs
     
    -    def __div__(self, other):
    +    def __truediv__(self, other):
             return nestkernel.llapi_divide_parameter(self._datum, self._arg_as_parameter(other)._datum)
     
         def __rtruediv__(self, lhs):
    
    From 6ad111ffa9e2cf29efcd8d64d925f697b27bea35 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 23:28:14 +0100
    Subject: [PATCH 323/375] Fix test
    
    ---
     testsuite/pytests/test_refractory.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/test_refractory.py b/testsuite/pytests/test_refractory.py
    index 7ec7fca038..d5efa8dc55 100644
    --- a/testsuite/pytests/test_refractory.py
    +++ b/testsuite/pytests/test_refractory.py
    @@ -137,7 +137,7 @@ def compute_reftime(self, model, sr, vm, neuron):
                 Value of the simulated refractory period.
             """
     
    -        spike_times = sr.events[0]["times"]
    +        spike_times = sr.events["times"]
     
             if model in neurons_interspike:
                 # Spike emitted at next timestep so substract resolution
    
    From cfa559b131b8ccfe7a272d36636b7bb71e0a6393 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 23 Jan 2025 23:38:41 +0100
    Subject: [PATCH 324/375] Fix test
    
    ---
     testsuite/pytests/test_sic_connection.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/test_sic_connection.py b/testsuite/pytests/test_sic_connection.py
    index 7b4c83b3ea..7a0f38a564 100644
    --- a/testsuite/pytests/test_sic_connection.py
    +++ b/testsuite/pytests/test_sic_connection.py
    @@ -63,7 +63,7 @@ def test_SynapseFunctionWithAeifModel():
         resol = nest.resolution
     
         # Create neurons and devices
    -    astrocyte = nest.Create("astrocyte_lr_1994", {"Ca_astro": 0.2})  # a calcium value which produces SIC
    +    astrocyte = nest.Create("astrocyte_lr_1994", params={"Ca_astro": 0.2})  # a calcium value which produces SIC
         neuron = nest.Create("aeif_cond_alpha_astro")
     
         mm_neuron = nest.Create("multimeter", params={"record_from": ["I_SIC"], "interval": resol})
    
    From f197f9a8861ef7117c9f91368ad1a3422f0a5969 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Fri, 24 Jan 2025 22:43:14 +0100
    Subject: [PATCH 325/375] Fix bug in sp_manager param setting
    
    ---
     nestkernel/sp_manager.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index 6dd7313e23..27391c5499 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -144,11 +144,11 @@ SPManager::set_status( const dictionary& d )
         syn_spec = boost::any_cast< dictionary >( kv_pair.second );
         if ( syn_spec.known( names::allow_autapses ) )
         {
    -      conn_spec[ names::allow_autapses ] = d.get< bool >( names::allow_autapses );
    +      conn_spec[ names::allow_autapses ] = syn_spec.get< bool >( names::allow_autapses );
         }
         if ( syn_spec.known( names::allow_multapses ) )
         {
    -      conn_spec[ names::allow_multapses ] = d.get< bool >( names::allow_multapses );
    +      conn_spec[ names::allow_multapses ] = syn_spec.get< bool >( names::allow_multapses );
         }
     
         // We use a ConnBuilder with dummy values to check the synapse parameters
    
    From 349a288360d6848b0aeb64814e314ae0d6ea77ac Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Fri, 24 Jan 2025 23:19:37 +0100
    Subject: [PATCH 326/375] Corrected handling of sp syn_specs
    
    ---
     nestkernel/conn_builder.cpp                   | 22 ++++++++-----------
     .../pytests/test_sp/test_conn_builder.py      |  5 +----
     2 files changed, 10 insertions(+), 17 deletions(-)
    
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index 35feafb6c4..92dfab92f3 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -583,26 +583,21 @@ nest::BipartiteConnBuilder::set_synapse_params( const dictionary& syn_defaults,
     void
     nest::BipartiteConnBuilder::set_structural_plasticity_parameters( const std::vector< dictionary >& syn_specs )
     {
    -  bool have_structural_plasticity_parameters = false;
    -  for ( auto& syn_spec : syn_specs )
    +  if ( syn_specs.size() > 1 )
       {
    -    if ( syn_spec.known( names::pre_synaptic_element ) or syn_spec.known( names::post_synaptic_element ) )
    -    {
    -      have_structural_plasticity_parameters = true;
    -    }
    +    throw KernelException( "Structural plasticity can only be used with a single syn_spec." );
       }
     
    -  if ( not have_structural_plasticity_parameters )
    -  {
    -    return;
    -  }
    +  // We know now that we only have a single syn spec, so we extract that.
    +  // We must take a reference here, otherwise access registration will not work, because the
    +  // DictionaryAccessFlag scheme relies on the address of the dictionary.
    +  const dictionary& syn_spec = syn_specs[ 0 ];
     
    -  if ( syn_specs.size() > 1 )
    +  if ( not( syn_spec.known( names::pre_synaptic_element ) or syn_spec.known( names::post_synaptic_element ) ) )
       {
    -    throw KernelException( "Structural plasticity can only be used with a single syn_spec." );
    +    return;
       }
     
    -  const dictionary syn_spec = syn_specs[ 0 ];
       if ( syn_spec.known( names::pre_synaptic_element ) xor syn_spec.known( names::post_synaptic_element ) )
       {
         throw BadProperty( "Structural plasticity requires both a pre- and postsynaptic element." );
    @@ -610,6 +605,7 @@ nest::BipartiteConnBuilder::set_structural_plasticity_parameters( const std::vec
     
       pre_synaptic_element_name_ = syn_spec.get< std::string >( names::pre_synaptic_element );
       post_synaptic_element_name_ = syn_spec.get< std::string >( names::post_synaptic_element );
    +
       use_structural_plasticity_ = true;
     }
     
    diff --git a/testsuite/pytests/test_sp/test_conn_builder.py b/testsuite/pytests/test_sp/test_conn_builder.py
    index 1900bab9fb..266dbcafee 100644
    --- a/testsuite/pytests/test_sp/test_conn_builder.py
    +++ b/testsuite/pytests/test_sp/test_conn_builder.py
    @@ -72,11 +72,8 @@ def test_not_implemented_rules(self):
                 {"rule": "fixed_total_number", "N": 1},
                 {"rule": "pairwise_bernoulli", "p": 0.5},
             ]:
    -            try:
    +            with self.assertRaises(nest.NESTErrors.NotImplemented):
                     nest.Connect(neurons, neurons, conn_dict, syn_dict)
    -            except nest.NESTError as e:
    -                msg = "This connection rule is not implemented for structural plasticity"
    -                self.assertRegex(str(e), msg)
     
     
     def suite():
    
    From 9f75d45b9ce0b456b8bc9cf31b3443c4a6ecabcf Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sat, 25 Jan 2025 00:08:41 +0100
    Subject: [PATCH 327/375] Work-around for syn_spec access checks in disconnect
    
    ---
     libnestutil/dictionary_access_flag_manager.h |  6 ++++++
     nestkernel/conn_builder.cpp                  | 20 +++++++++++++++-----
     nestkernel/sp_manager.cpp                    | 13 ++++++++++---
     3 files changed, 31 insertions(+), 8 deletions(-)
    
    diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h
    index edf27fe79e..414a6878b3 100644
    --- a/libnestutil/dictionary_access_flag_manager.h
    +++ b/libnestutil/dictionary_access_flag_manager.h
    @@ -45,6 +45,12 @@
      * Manages access flags for dictionary keys and can check if all keys
      * in a dictionary has been accessed. Key access is not integrated into
      * the dictionary class to be able to keep the dictionary const.
    + *
    + * @note The access flag manager depends on the **address** of the dictionary to
    + * keep track of each single dictionary. It is therefore essential that a dictionary is
    + * **never copied**, since the new dict will have its accesses register separately.
    + * There is also a **memory bloat** here because entries are not removed when
    + * a dictionary is deleted.
      */
     class DictionaryAccessFlagManager
     {
    diff --git a/nestkernel/conn_builder.cpp b/nestkernel/conn_builder.cpp
    index 92dfab92f3..36ec12551e 100644
    --- a/nestkernel/conn_builder.cpp
    +++ b/nestkernel/conn_builder.cpp
    @@ -583,6 +583,21 @@ nest::BipartiteConnBuilder::set_synapse_params( const dictionary& syn_defaults,
     void
     nest::BipartiteConnBuilder::set_structural_plasticity_parameters( const std::vector< dictionary >& syn_specs )
     {
    +  // We must check here if any syn_spec provided contains sp-related parameters
    +  bool have_structural_plasticity_parameters = false;
    +  for ( auto& syn_spec : syn_specs )
    +  {
    +    if ( syn_spec.known( names::pre_synaptic_element ) or syn_spec.known( names::post_synaptic_element ) )
    +    {
    +      have_structural_plasticity_parameters = true;
    +    }
    +  }
    +  if ( not have_structural_plasticity_parameters )
    +  {
    +    return;
    +  }
    +
    +  // We now know that we have SP-parameters and can perform SP-specific checks and operations
       if ( syn_specs.size() > 1 )
       {
         throw KernelException( "Structural plasticity can only be used with a single syn_spec." );
    @@ -593,11 +608,6 @@ nest::BipartiteConnBuilder::set_structural_plasticity_parameters( const std::vec
       // DictionaryAccessFlag scheme relies on the address of the dictionary.
       const dictionary& syn_spec = syn_specs[ 0 ];
     
    -  if ( not( syn_spec.known( names::pre_synaptic_element ) or syn_spec.known( names::post_synaptic_element ) ) )
    -  {
    -    return;
    -  }
    -
       if ( syn_spec.known( names::pre_synaptic_element ) xor syn_spec.known( names::post_synaptic_element ) )
       {
         throw BadProperty( "Structural plasticity requires both a pre- and postsynaptic element." );
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index 27391c5499..7db149da7d 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -270,7 +270,7 @@ SPManager::disconnect( NodeCollectionPTR sources,
     
         for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ )
         {
    -      std::string syn_model = syn_spec.get< std::string >( names::synapse_model );
    +      const std::string syn_model = syn_spec.get< std::string >( names::synapse_model );
           if ( ( *i )->get_synapse_model() == kernel().model_manager.get_synapse_model_id( syn_model ) )
           {
             cb = kernel().connection_manager.get_conn_builder( rule_name,
    @@ -295,9 +295,16 @@ SPManager::disconnect( NodeCollectionPTR sources,
       }
       assert( cb );
     
    -  // at this point, all entries in conn_spec and syn_spec have been checked
    +  // At this point, all entries in conn_spec and syn_spec have been checked
       conn_spec.all_entries_accessed( "Disconnect", "conn_spec" );
    -  syn_spec.all_entries_accessed( "Disconnect", "syn_spec" );
    +
    +  // PYNEST-NG:
    +  // Do not perform access check here for two reasons:
    +  // - the need to pass { syn_spec } above to get_conn_builder() means access flags will
    +  //   be set for a copy of the dictionary we have available here for checking
    +  // - the current semantics of Disconnect() is a mess, allowing parameters that are not
    +  //   used at all, e.g., weight, which needs cleaning up
    +  // syn_spec.all_entries_accessed( "Disconnect", "syn_spec" );
     
       // Set flag before calling cb->disconnect() in case exception is thrown after some connections have been removed.
       kernel().connection_manager.set_connections_have_changed();
    
    From bd4a6fa43d4913ebfc5a92a4436091abbb07158f Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sat, 25 Jan 2025 00:20:59 +0100
    Subject: [PATCH 328/375] Fixed test
    
    ---
     testsuite/pytests/mpi/2/test_issue_3099.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/mpi/2/test_issue_3099.py b/testsuite/pytests/mpi/2/test_issue_3099.py
    index 880ffc7aca..8d4086308b 100644
    --- a/testsuite/pytests/mpi/2/test_issue_3099.py
    +++ b/testsuite/pytests/mpi/2/test_issue_3099.py
    @@ -50,4 +50,4 @@ def test_set_status_weight(conns):
         """Test that operation does not cause MPI deadlock."""
     
         if conns:
    -        nest.SetStatus(conns, "weight", 2.5)
    +        conns.weight = 2.5
    
    From f983c0b69e43f9b9de6f5ad641a0003a93262f2b Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sat, 25 Jan 2025 00:59:26 +0100
    Subject: [PATCH 329/375] Support conversion of vec<long> to vec<double>
    
    ---
     libnestutil/dictionary.h | 28 ++++++++++++++++++++++++++++
     1 file changed, 28 insertions(+)
    
    diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h
    index 05810aa45b..66d3626a6b 100644
    --- a/libnestutil/dictionary.h
    +++ b/libnestutil/dictionary.h
    @@ -133,6 +133,34 @@ class dictionary : public std::map< std::string, boost::any >
         }
       }
     
    +  template <>
    +  std::vector< double >
    +  cast_value_< std::vector< double > >( const boost::any& value, const std::string& key ) const
    +  {
    +    try
    +    {
    +      if ( is_type< std::vector< double > >( value ) )
    +      {
    +        return boost::any_cast< std::vector< double > >( value );
    +      }
    +      if ( is_type< std::vector< long > >( value ) )
    +      {
    +        const std::vector< long > vlong = boost::any_cast< std::vector< long > >( value );
    +        std::vector< double > res;
    +        std::copy( vlong.begin(), vlong.end(), std::back_inserter( res ) );
    +        return res;
    +      }
    +      throw boost::bad_any_cast(); // deflect to error handling below
    +    }
    +    catch ( const boost::bad_any_cast& )
    +    {
    +      const std::string msg =
    +        std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type std::vector<double>.";
    +      throw nest::TypeMismatch( msg );
    +    }
    +  }
    +
    +
       /**
        * @brief Cast the specified value to an integer.
        *
    
    From 1eae9aa40f88766d30564e3e322d7d9073263da9 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sat, 25 Jan 2025 01:00:04 +0100
    Subject: [PATCH 330/375] Add some consts
    
    ---
     models/spike_train_injector.cpp | 9 +++++----
     1 file changed, 5 insertions(+), 4 deletions(-)
    
    diff --git a/models/spike_train_injector.cpp b/models/spike_train_injector.cpp
    index f43f2166dd..76d876f2d1 100644
    --- a/models/spike_train_injector.cpp
    +++ b/models/spike_train_injector.cpp
    @@ -154,10 +154,11 @@ spike_train_injector::Parameters_::set( const dictionary& d,
       const Time& now,
       Node* node )
     {
    -  bool precise_times_changed = update_value_param( d, names::precise_times, precise_times_, node );
    -  bool shift_now_spikes_changed = update_value_param( d, names::shift_now_spikes, shift_now_spikes_, node );
    -  bool allow_offgrid_times_changed = update_value_param( d, names::allow_offgrid_times, allow_offgrid_times_, node );
    -  bool flags_changed = precise_times_changed or shift_now_spikes_changed or allow_offgrid_times_changed;
    +  const bool precise_times_changed = update_value_param( d, names::precise_times, precise_times_, node );
    +  const bool shift_now_spikes_changed = update_value_param( d, names::shift_now_spikes, shift_now_spikes_, node );
    +  const bool allow_offgrid_times_changed =
    +    update_value_param( d, names::allow_offgrid_times, allow_offgrid_times_, node );
    +  const bool flags_changed = precise_times_changed or shift_now_spikes_changed or allow_offgrid_times_changed;
       if ( precise_times_ and ( allow_offgrid_times_ or shift_now_spikes_ ) )
       {
         throw BadProperty(
    
    From 5b9133dba34b496e4526f58eddaf548be6c3fe43 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sat, 25 Jan 2025 01:00:39 +0100
    Subject: [PATCH 331/375] Perform params access checks only if there were local
     neurons
    
    ---
     nestkernel/nest.cpp | 8 +++++++-
     1 file changed, 7 insertions(+), 1 deletion(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 9a7a7b4264..3aa88b6aba 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -218,10 +218,16 @@ get_nc_status( NodeCollectionPTR nc )
     void
     set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params )
     {
    +  const auto rank_local_begin = nc->rank_local_begin();
    +  if ( rank_local_begin == nc->end() )
    +  {
    +    return; // no local nodes, nothing to do --- more efficient and avoids params access check problems
    +  }
    +
       if ( params.size() == 1 )
       {
         params[ 0 ].init_access_flags();
    -    for ( auto it = nc->begin(); it < nc->end(); ++it )
    +    for ( auto it = rank_local_begin; it < nc->end(); ++it )
         {
           kernel().node_manager.set_status( ( *it ).node_id, params[ 0 ] );
         }
    
    From f1f02a5f5157a3d4a56d8b2f61ad4e65694fa587 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sat, 25 Jan 2025 13:54:32 +0100
    Subject: [PATCH 332/375] Make Disconnect() Py/C++ interface consistent with
     Connect()
    
    ---
     nestkernel/nest.cpp       |  2 +-
     nestkernel/nest.h         |  9 ++++++++-
     nestkernel/sp_manager.cpp | 24 ++++++++++++------------
     nestkernel/sp_manager.h   |  2 +-
     pynest/nestkernel_api.pxd |  2 +-
     pynest/nestkernel_api.pyx | 10 +++++++++-
     6 files changed, 32 insertions(+), 17 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 3aa88b6aba..aeaf8c1455 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -437,7 +437,7 @@ void
     disconnect( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       const dictionary& connectivity,
    -  const dictionary& synapse_params )
    +  const std::vector< dictionary >& synapse_params )
     {
       kernel().sp_manager.disconnect( sources, targets, connectivity, synapse_params );
     }
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index 84d8c5e7ed..c226150ccf 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -120,10 +120,17 @@ void connect( NodeCollectionPTR sources,
       const dictionary& connectivity,
       const std::vector< dictionary >& synapse_params );
     
    +/**
    + * Disconnect nodes.
    + *
    + * @param connectivity Must be one-to-one or all-to-all.
    + * @param synapse_params Can contain only a synapse model to limit disconnection to that model. Must be vector of length
    + * 1, but is still passed as vector for compatibility with ConnBuilder constructor.
    + */
     void disconnect( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       const dictionary& connectivity,
    -  const dictionary& synapse_params );
    +  const std::vector< dictionary >& synapse_params );
     
     /**
      * Create tripartite connections
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index 7db149da7d..54015ac275 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -239,7 +239,7 @@ void
     SPManager::disconnect( NodeCollectionPTR sources,
       NodeCollectionPTR targets,
       const dictionary& conn_spec,
    -  const dictionary& syn_spec )
    +  const std::vector< dictionary >& syn_specs )
     {
       if ( kernel().connection_manager.connections_have_changed() )
       {
    @@ -252,7 +252,6 @@ SPManager::disconnect( NodeCollectionPTR sources,
     
       BipartiteConnBuilder* cb = nullptr;
       conn_spec.init_access_flags();
    -  syn_spec.init_access_flags();
     
       if ( not conn_spec.known( names::rule ) )
       {
    @@ -265,12 +264,19 @@ SPManager::disconnect( NodeCollectionPTR sources,
         throw BadProperty( "Unknown connectivity rule: " + rule_name );
       }
     
    +  if ( syn_specs.size() != 1 )
    +  {
    +    throw BadProperty( "Disconnect() only accepts a single synapse specification, no collocated synapses." );
    +  }
    +
    +  syn_specs[ 0 ].init_access_flags();
    +
       if ( not sp_conn_builders_.empty() )
       { // Implement a getter for sp_conn_builders_
     
         for ( std::vector< SPBuilder* >::const_iterator i = sp_conn_builders_.begin(); i != sp_conn_builders_.end(); i++ )
         {
    -      const std::string syn_model = syn_spec.get< std::string >( names::synapse_model );
    +      const std::string syn_model = syn_specs[ 0 ].get< std::string >( names::synapse_model );
           if ( ( *i )->get_synapse_model() == kernel().model_manager.get_synapse_model_id( syn_model ) )
           {
             cb = kernel().connection_manager.get_conn_builder( rule_name,
    @@ -278,7 +284,7 @@ SPManager::disconnect( NodeCollectionPTR sources,
               targets,
               /* third_out */ nullptr,
               conn_spec,
    -          { syn_spec } );
    +          syn_specs );
             cb->set_synaptic_element_names(
               ( *i )->get_pre_synaptic_element_name(), ( *i )->get_post_synaptic_element_name() );
           }
    @@ -291,20 +297,14 @@ SPManager::disconnect( NodeCollectionPTR sources,
           targets,
           /* third_out */ nullptr,
           conn_spec,
    -      { syn_spec } );
    +      syn_specs );
       }
       assert( cb );
     
       // At this point, all entries in conn_spec and syn_spec have been checked
       conn_spec.all_entries_accessed( "Disconnect", "conn_spec" );
     
    -  // PYNEST-NG:
    -  // Do not perform access check here for two reasons:
    -  // - the need to pass { syn_spec } above to get_conn_builder() means access flags will
    -  //   be set for a copy of the dictionary we have available here for checking
    -  // - the current semantics of Disconnect() is a mess, allowing parameters that are not
    -  //   used at all, e.g., weight, which needs cleaning up
    -  // syn_spec.all_entries_accessed( "Disconnect", "syn_spec" );
    +  syn_specs[ 0 ].all_entries_accessed( "Disconnect", "syn_spec" );
     
       // Set flag before calling cb->disconnect() in case exception is thrown after some connections have been removed.
       kernel().connection_manager.set_connections_have_changed();
    diff --git a/nestkernel/sp_manager.h b/nestkernel/sp_manager.h
    index acff876ca6..974b00ae01 100644
    --- a/nestkernel/sp_manager.h
    +++ b/nestkernel/sp_manager.h
    @@ -101,7 +101,7 @@ class SPManager : public ManagerInterface
       void disconnect( NodeCollectionPTR sources,
         NodeCollectionPTR targets,
         const dictionary& conn_spec,
    -    const dictionary& syn_spec );
    +    const std::vector< dictionary >& syn_spec );
     
       /**
        * Disconnect two nodes.
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 2a2fdda802..5af926fd5d 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -159,7 +159,7 @@ cdef extern from "nest.h" namespace "nest":
         void disconnect(NodeCollectionPTR sources,
                      NodeCollectionPTR targets,
                      const dictionary& connectivity,
    -                 const dictionary& synapse_params) except +custom_exception_handler
    +                 const vector[dictionary]& synapse_params) except +custom_exception_handler
         void disconnect( const deque[ConnectionID]& conns ) except +custom_exception_handler
         string print_nodes_to_string()
         string pprint_to_string( NodeCollectionPTR nc ) except +custom_exception_handler
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 6e941b5f81..2eafceb9d6 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -499,9 +499,17 @@ def llapi_disconnect(NodeCollectionObject pre, NodeCollectionObject post, object
         if synapse_params is dict and "synapse_model" not in synapse_params:
             synapse_params["synapse_model"] = "static_synapse"
     
    +    # Pass synapse specs as vector/collocated synapse for consistency with Connect().
    +    # This simplifies the C++ level because ConnBuilder() constructors expect vectors of synapse specs.
    +    cdef vector[dictionary] syn_param_vec
    +    if isinstance(synapse_params, nest.CollocatedSynapses):
    +        syn_param_vec = pylist_to_dictvec(synapse_params.syn_specs)
    +    elif synapse_params is not None:
    +        syn_param_vec.push_back(pydict_to_dictionary(synapse_params))
    +
         disconnect(pre.thisptr, post.thisptr,
                 pydict_to_dictionary(conn_params),
    -            pydict_to_dictionary(synapse_params))
    +            syn_param_vec)
     
     
     def llapi_disconnect_syncoll(object conns):
    
    From 2c1221fc3ba2509cf7ff71208fdc3d5957163fe9 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sun, 26 Jan 2025 17:33:53 +0100
    Subject: [PATCH 333/375] Implemented alternative dict access checking
    
    ---
     libnestutil/dict_util.h                  |   4 +-
     libnestutil/dictionary.cpp               | 160 ++++++++++++++++-------
     libnestutil/dictionary.h                 |  65 ++++++++-
     models/multimeter.cpp                    |   3 +-
     nestkernel/conn_builder_conngen.cpp      |   4 +-
     nestkernel/connection_label.h            |   2 +-
     nestkernel/connection_manager.cpp        |  20 +--
     nestkernel/connection_manager.h          |   4 +-
     nestkernel/kernel_manager.h              |   8 --
     nestkernel/model_manager_impl.h          |   3 +-
     nestkernel/nest.cpp                      |  10 +-
     nestkernel/nest.h                        |   4 +-
     nestkernel/node_manager.cpp              |  10 +-
     nestkernel/recording_backend_ascii.cpp   |   3 +-
     nestkernel/recording_device.cpp          |  18 +--
     nestkernel/sp_manager.cpp                |   8 +-
     nestkernel/stimulation_device.cpp        |  14 +-
     pynest/nestkernel_api.pxd                |  10 +-
     pynest/nestkernel_api.pyx                |   4 +-
     testsuite/pytests/test_connect_arrays.py |   2 +-
     20 files changed, 237 insertions(+), 119 deletions(-)
    
    diff --git a/libnestutil/dict_util.h b/libnestutil/dict_util.h
    index ee76c900d6..0714f5ff40 100644
    --- a/libnestutil/dict_util.h
    +++ b/libnestutil/dict_util.h
    @@ -36,13 +36,13 @@ bool
     update_value_param( dictionary const& d, const std::string& key, T& value, nest::Node* node )
     {
       const auto it = d.find( key );
    -  if ( it != d.end() and is_type< std::shared_ptr< nest::Parameter > >( it->second ) )
    +  if ( it != d.end() and is_type< std::shared_ptr< nest::Parameter > >( it->second.item ) )
       {
         if ( not node )
         {
           throw BadParameter( "Cannot use Parameter with this model." );
         }
    -    auto param = d.get< ParameterPTR >( key );
    +    const auto param = d.get< ParameterPTR >( key );
         const auto vp = kernel().vp_manager.node_id_to_vp( node->get_node_id() );
         const auto tid = kernel().vp_manager.vp_to_thread( vp );
         const auto rng = get_vp_specific_rng( tid );
    diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp
    index 9c81b82178..903d449ed1 100644
    --- a/libnestutil/dictionary.cpp
    +++ b/libnestutil/dictionary.cpp
    @@ -71,7 +71,7 @@ debug_dict_types( const dictionary& dict )
       for ( auto& kv : dict )
       {
         s += kv.first + ": ";
    -    s += debug_type( kv.second ) + "\n";
    +    s += debug_type( kv.second.item ) + "\n";
       }
       return s;
     }
    @@ -90,81 +90,84 @@ operator<<( std::ostream& os, const dictionary& dict )
       {
         std::string type;
         std::stringstream value_stream;
    -    if ( is_type< int >( kv.second ) )
    +
    +    const auto& item = kv.second.item;
    +
    +    if ( is_type< int >( item ) )
         {
           type = "int";
    -      value_stream << boost::any_cast< int >( kv.second ) << '\n';
    +      value_stream << boost::any_cast< int >( item ) << '\n';
         }
    -    else if ( is_type< unsigned int >( kv.second ) )
    +    else if ( is_type< unsigned int >( item ) )
         {
           type = "unsigned int";
    -      value_stream << boost::any_cast< unsigned int >( kv.second ) << '\n';
    +      value_stream << boost::any_cast< unsigned int >( item ) << '\n';
         }
    -    else if ( is_type< long >( kv.second ) )
    +    else if ( is_type< long >( item ) )
         {
           type = "long";
    -      value_stream << boost::any_cast< long >( kv.second ) << '\n';
    +      value_stream << boost::any_cast< long >( item ) << '\n';
         }
    -    else if ( is_type< size_t >( kv.second ) )
    +    else if ( is_type< size_t >( item ) )
         {
           type = "size_t";
    -      value_stream << boost::any_cast< size_t >( kv.second ) << '\n';
    +      value_stream << boost::any_cast< size_t >( item ) << '\n';
         }
    -    else if ( is_type< double >( kv.second ) )
    +    else if ( is_type< double >( item ) )
         {
           type = "double";
    -      value_stream << boost::any_cast< double >( kv.second ) << '\n';
    +      value_stream << boost::any_cast< double >( item ) << '\n';
         }
    -    else if ( is_type< bool >( kv.second ) )
    +    else if ( is_type< bool >( item ) )
         {
           type = "bool";
    -      const auto value = boost::any_cast< bool >( kv.second );
    +      const auto value = boost::any_cast< bool >( item );
           value_stream << ( value ? "true" : "false" ) << '\n';
         }
    -    else if ( is_type< std::string >( kv.second ) )
    +    else if ( is_type< std::string >( item ) )
         {
           type = "std::string";
    -      value_stream << "\"" << boost::any_cast< std::string >( kv.second ) << "\"\n";
    +      value_stream << "\"" << boost::any_cast< std::string >( item ) << "\"\n";
         }
    -    else if ( is_type< std::vector< int > >( kv.second ) )
    +    else if ( is_type< std::vector< int > >( item ) )
         {
           type = "std::vector<int>";
    -      value_stream << boost::any_cast< std::vector< int > >( kv.second ) << '\n';
    +      value_stream << boost::any_cast< std::vector< int > >( item ) << '\n';
         }
    -    else if ( is_type< std::vector< double > >( kv.second ) )
    +    else if ( is_type< std::vector< double > >( item ) )
         {
           type = "std::vector<double>";
    -      value_stream << boost::any_cast< std::vector< double > >( kv.second ) << '\n';
    +      value_stream << boost::any_cast< std::vector< double > >( item ) << '\n';
         }
    -    else if ( is_type< std::vector< std::vector< double > > >( kv.second ) )
    +    else if ( is_type< std::vector< std::vector< double > > >( item ) )
         {
           type = "vector<vector<double>>";
           value_stream << "vector<vector<double>>" << '\n';
         }
    -    else if ( is_type< std::vector< std::string > >( kv.second ) )
    +    else if ( is_type< std::vector< std::string > >( item ) )
         {
           type = "std::vector<std::string>";
    -      value_stream << boost::any_cast< std::vector< std::string > >( kv.second ) << '\n';
    +      value_stream << boost::any_cast< std::vector< std::string > >( item ) << '\n';
         }
    -    else if ( is_type< std::vector< boost::any > >( kv.second ) )
    +    else if ( is_type< std::vector< boost::any > >( item ) )
         {
           type = "vector<boost::any>";
           value_stream << "vector<any>" << '\n';
         }
    -    else if ( is_type< dictionary >( kv.second ) )
    +    else if ( is_type< dictionary >( item ) )
         {
           type = "dictionary";
           value_stream << "dictionary" << '\n';
         }
    -    else if ( is_type< std::shared_ptr< nest::Parameter > >( kv.second ) )
    +    else if ( is_type< std::shared_ptr< nest::Parameter > >( item ) )
         {
           type = "parameter";
           value_stream << "parameter" << '\n';
         }
    -    else if ( is_type< std::shared_ptr< nest::NodeCollection > >( kv.second ) )
    +    else if ( is_type< std::shared_ptr< nest::NodeCollection > >( item ) )
         {
           type = "NodeCollection";
    -      const auto nc = boost::any_cast< std::shared_ptr< nest::NodeCollection > >( kv.second );
    +      const auto nc = boost::any_cast< std::shared_ptr< nest::NodeCollection > >( item );
           nc->print_me( value_stream );
           value_stream << "\n";
         }
    @@ -181,7 +184,7 @@ operator<<( std::ostream& os, const dictionary& dict )
     }
     
     bool
    -value_equal( const boost::any first, const boost::any second )
    +value_equal( const boost::any& first, const boost::any& second )
     {
       if ( is_type< int >( first ) )
       {
    @@ -369,16 +372,17 @@ dictionary::operator==( const dictionary& other ) const
         return false;
       }
       // Iterate elements in the other dictionary
    -  for ( auto& kv_pair : other )
    +  for ( const auto& [ other_key, other_entry ] : other )
       {
         // Check if it exists in this dictionary
    -    if ( not known( kv_pair.first ) )
    +    if ( not known( other_key ) )
         {
           return false;
         }
    +
         // Check for equality
    -    const auto value = maptype_::at( kv_pair.first );
    -    if ( not value_equal( value, kv_pair.second ) )
    +    const auto& this_entry = maptype_::at( other_key );
    +    if ( not value_equal( this_entry.item, other_entry.item ) )
         {
           return false;
         }
    @@ -387,59 +391,119 @@ dictionary::operator==( const dictionary& other ) const
       return true;
     }
     
    +void
    +dictionary::register_access_( const DictEntry_& entry ) const
    +{
    +  if ( not entry.accessed )
    +  {
    +    // if() above avoids any unnecessary updates, atomic prevents any potential
    +    // data races in case the compiler does behind-the-scences magic.
    +#pragma omp atomic write
    +    entry.accessed = true; // accessed is mutable
    +  }
    +}
     
     boost::any&
     dictionary::operator[]( const std::string& key )
     {
    -  nest::kernel().get_dict_access_flag_manager().register_access( *this, key );
    -  return maptype_::operator[]( key );
    +  auto& entry = maptype_::operator[]( key );
    +  // op[] inserts entry if key was not known before, so we are sure entry exists
    +  register_access_( entry );
    +  return entry.item;
     }
     
     boost::any&
     dictionary::operator[]( std::string&& key )
     {
    -  nest::kernel().get_dict_access_flag_manager().register_access( *this, key );
    -  return maptype_::operator[]( key );
    +  auto& entry = maptype_::operator[]( key );
    +  // op[] inserts entry if key was not known before, so we are sure entry exists
    +  register_access_( entry );
    +  return entry.item;
     }
     
     boost::any&
     dictionary::at( const std::string& key )
     {
    -  nest::kernel().get_dict_access_flag_manager().register_access( *this, key );
    -  return maptype_::at( key );
    +  auto& entry = maptype_::at( key );
    +  // at() throws if key is not know, so we are sure entry exists
    +  register_access_( entry );
    +  return entry.item;
     }
     
     const boost::any&
     dictionary::at( const std::string& key ) const
     {
    -  nest::kernel().get_dict_access_flag_manager().register_access( *this, key );
    -  return maptype_::at( key );
    +  const auto& entry = maptype_::at( key );
    +  // at() throws if key is not know, so we are sure entry exists
    +  register_access_( entry );
    +  return entry.item;
     }
     
     dictionary::iterator
     dictionary::find( const std::string& key )
     {
    -  nest::kernel().get_dict_access_flag_manager().register_access( *this, key );
    -  return maptype_::find( key );
    +  const auto it = maptype_::find( key );
    +  if ( it != end() )
    +  {
    +    register_access_( it->second );
    +  }
    +  return it;
     }
     
     dictionary::const_iterator
     dictionary::find( const std::string& key ) const
     {
    -  nest::kernel().get_dict_access_flag_manager().register_access( *this, key );
    -  return maptype_::find( key );
    +  const auto it = maptype_::find( key );
    +  if ( it != end() )
    +  {
    +    register_access_( it->second );
    +  }
    +  return it;
     }
     
     void
    -dictionary::init_access_flags() const
    +dictionary::init_access_flags( const bool thread_local_dict ) const
     {
    -  nest::kernel().get_dict_access_flag_manager().init_access_flags( *this );
    +  if ( not thread_local_dict )
    +  {
    +    nest::kernel().vp_manager.assert_single_threaded();
    +  }
    +  for ( const auto& [ key, entry ] : *this )
    +  {
    +    entry.accessed = false;
    +  }
     }
     
     void
    -dictionary::all_entries_accessed( const std::string& where, const std::string& what ) const
    +dictionary::all_entries_accessed( const std::string& where,
    +  const std::string& what,
    +  const bool thread_local_dict ) const
     {
    -  nest::kernel().get_dict_access_flag_manager().all_accessed( *this, where, what );
    +  if ( not thread_local_dict )
    +  {
    +    nest::kernel().vp_manager.assert_single_threaded();
    +  }
    +
    +  // Vector of elements in the dictionary that are not accessed
    +  std::vector< dictionary::key_type > not_accessed_keys;
    +
    +  for ( const auto& [ key, entry ] : *this )
    +  {
    +    if ( not entry.accessed )
    +    {
    +      not_accessed_keys.emplace_back( key );
    +    }
    +  }
    +
    +  if ( not_accessed_keys.size() > 0 )
    +  {
    +    const auto missed = std::accumulate( not_accessed_keys.begin(),
    +      not_accessed_keys.end(),
    +      dictionary::key_type(), // creates empty instance of key type (string)
    +      []( const dictionary::key_type& a, const dictionary::key_type& b ) { return a + " " + b; } );
    +
    +    throw nest::UnaccessedDictionaryEntry( what, where, missed );
    +  }
     }
     
     // TODO-PYNEST-NG: Convenience function for accessed()?
    diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h
    index 66d3626a6b..d4818cca03 100644
    --- a/libnestutil/dictionary.h
    +++ b/libnestutil/dictionary.h
    @@ -56,14 +56,32 @@ is_type( const boost::any& operand )
      * @param second The other value.
      * @return Whether the values are equal, both in type and value.
      */
    -bool value_equal( const boost::any first, const boost::any second );
    +bool value_equal( const boost::any& first, const boost::any& second );
     
     /**
      * @brief A Python-like dictionary, based on std::map.
      *
      * Values are stored as boost::any objects, with std::string keys.
      */
    -class dictionary : public std::map< std::string, boost::any >
    +struct DictEntry_
    +{
    +  //! Constructor without arguments needed by std::map::operator[]
    +  DictEntry_()
    +    : item( boost::any() )
    +    , accessed( false )
    +  {
    +  }
    +  DictEntry_( const boost::any& item )
    +    : item( item )
    +    , accessed( false )
    +  {
    +  }
    +
    +  boost::any item;       //!< actual item stored
    +  mutable bool accessed; //!< initally false, set to true once entry is accessed
    +};
    +
    +class dictionary : public std::map< std::string, DictEntry_ >
     {
       // TODO-PYNEST-NG: Meta-information about entries:
       //                   * Value type (enum?)
    @@ -73,7 +91,7 @@ class dictionary : public std::map< std::string, boost::any >
       // TODO: PYNEST-NG: maybe change to unordered map, as that provides
       // automatic hashing of keys (currently strings) which might make
       // lookups more efficient
    -  using maptype_ = std::map< std::string, boost::any >;
    +  using maptype_ = std::map< std::string, DictEntry_ >;
       using maptype_::maptype_; // Inherit constructors
     
       /**
    @@ -190,6 +208,8 @@ class dictionary : public std::map< std::string, boost::any >
         throw nest::TypeMismatch( msg );
       }
     
    +  void register_access_( const DictEntry_& entry ) const;
    +
     public:
       /**
        * @brief Get the value at key in the specified type.
    @@ -234,7 +254,7 @@ class dictionary : public std::map< std::string, boost::any >
         auto it = find( key );
         if ( it != end() )
         {
    -      value = cast_value_< T >( it->second, key );
    +      value = cast_value_< T >( it->second.item, key );
           return true;
         }
         return false;
    @@ -255,7 +275,7 @@ class dictionary : public std::map< std::string, boost::any >
         auto it = find( key );
         if ( it != end() )
         {
    -      value = cast_to_integer_( it->second, key );
    +      value = cast_to_integer_( it->second.item, key );
           return true;
         }
         return false;
    @@ -266,6 +286,9 @@ class dictionary : public std::map< std::string, boost::any >
        *
        * @param key key where the value may be located in the dictionary.
        * @return true if there is a value with the specified key, false if not.
    +   *
    +   * @note This does **not** mark the entry, because we sometimes need to confirm
    +   * that a certain key is not in a dictionary.
        */
       bool
       known( const std::string& key ) const
    @@ -274,6 +297,24 @@ class dictionary : public std::map< std::string, boost::any >
         return maptype_::find( key ) != end();
       }
     
    +  /**
    +   * @brief Mark entry with given key as accessed.
    +   */
    +  void
    +  mark_as_accessed( const std::string& key ) const
    +  {
    +    register_access_( maptype_::at( key ) );
    +  }
    +
    +  /**
    +   * @brief Return true if entry has been marked as accessed.
    +   */
    +  bool
    +  has_been_accessed( const std::string& key ) const
    +  {
    +    return maptype_::at( key ).accessed;
    +  }
    +
       /**
        * @brief Check whether the dictionary is equal to another dictionary.
        *
    @@ -300,17 +341,27 @@ class dictionary : public std::map< std::string, boost::any >
     
       /**
        * @brief Initializes or resets access flags for the current dictionary.
    +   *
    +   * @note The method assumes that the dictionary was defined in global scope, whence it should
    +   * only be called from a serial context. If the dict is in thread-specific, pass `true` to
    +   * allow call in parallel context.
        */
    -  void init_access_flags() const;
    +  void init_access_flags( const bool thread_local_dict = false ) const;
     
       /**
        * @brief Check that all elements in the dictionary have been accessed.
        *
        * @param where Which function the error occurs in.
        * @param what Which parameter triggers the error.
    +   * @param thread_local_dict See note below.
        * @throws UnaccessedDictionaryEntry if there are unaccessed dictionary entries.
    +   *
    +   * @note The method assumes that the dictionary was defined in global scope, whence it should
    +   * only be called from a serial context. If the dict is in thread-specific, pass `true` to
    +   * allow call in parallel context.
        */
    -  void all_entries_accessed( const std::string& where, const std::string& what ) const;
    +  void
    +  all_entries_accessed( const std::string& where, const std::string& what, const bool thread_local_dict = false ) const;
     
       // Wrappers for access flags
       boost::any& operator[]( const std::string& key );
    diff --git a/models/multimeter.cpp b/models/multimeter.cpp
    index 57cfe78901..9b38070a82 100644
    --- a/models/multimeter.cpp
    +++ b/models/multimeter.cpp
    @@ -239,8 +239,7 @@ voltmeter::voltmeter()
       : multimeter()
     {
       dictionary vmdict;
    -  std::vector< std::string > ad;
    -  ad.push_back( names::V_m );
    +  const std::vector< std::string > ad = { names::V_m };
       vmdict[ names::record_from ] = ad;
       set_status( vmdict );
     }
    diff --git a/nestkernel/conn_builder_conngen.cpp b/nestkernel/conn_builder_conngen.cpp
    index 2bcf008eb9..656f2cacb4 100644
    --- a/nestkernel/conn_builder_conngen.cpp
    +++ b/nestkernel/conn_builder_conngen.cpp
    @@ -53,9 +53,9 @@ ConnectionGeneratorBuilder::ConnectionGeneratorBuilder( NodeCollectionPTR source
     
         conn_spec.update_value( "params_map", params_map_ );
     
    -    for ( auto& kv : params_map_ )
    +    for ( auto& [ key, value ] : params_map_ )
         {
    -      nest::kernel().get_dict_access_flag_manager().register_access( params_map_, kv.first );
    +      params_map_.mark_as_accessed( key );
         }
     
         if ( syn_specs[ 0 ].known( names::weight ) or syn_specs[ 0 ].known( names::delay ) )
    diff --git a/nestkernel/connection_label.h b/nestkernel/connection_label.h
    index cb55ccb0ae..17c99aaa36 100644
    --- a/nestkernel/connection_label.h
    +++ b/nestkernel/connection_label.h
    @@ -98,7 +98,7 @@ void
     ConnectionLabel< ConnectionT >::set_status( const dictionary& d, ConnectorModel& cm )
     {
       long lbl;
    -  if ( d.update_value( names::synapse_label, lbl ) )
    +  if ( d.update_integer_value( names::synapse_label, lbl ) )
       {
         if ( lbl >= 0 )
         {
    diff --git a/nestkernel/connection_manager.cpp b/nestkernel/connection_manager.cpp
    index b81ba52b12..efb6932261 100644
    --- a/nestkernel/connection_manager.cpp
    +++ b/nestkernel/connection_manager.cpp
    @@ -601,10 +601,10 @@ nest::ConnectionManager::connect_arrays( long* sources,
       long* targets,
       double* weights,
       double* delays,
    -  std::vector< std::string >& p_keys,
    +  const std::vector< std::string >& p_keys,
       double* p_values,
       size_t n,
    -  std::string syn_model )
    +  const std::string& syn_model )
     {
       // only place, where stopwatch sw_construction_connect is needed in addition to nestmodule.cpp
       sw_construction_connect.start();
    @@ -615,9 +615,10 @@ nest::ConnectionManager::connect_arrays( long* sources,
       if ( p_keys.size() != 0 )
       {
         size_t i = 0;
    -    for ( auto& key : p_keys )
    +    for ( const auto& key : p_keys )
         {
    -      const bool is_int = key == names::receptor_type or key == names::music_channel;
    +      const bool is_int = ( key == names::receptor_type or key == names::music_channel or key == names::synapse_label );
    +
           // Shifting the pointer to the first value of the parameter.
           param_pointers[ key ] = std::make_pair( p_values + i * n, is_int );
           ++i;
    @@ -632,7 +633,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
       param_dicts.reserve( kernel().vp_manager.get_num_threads() );
       for ( size_t i = 0; i < kernel().vp_manager.get_num_threads(); ++i )
       {
    -    param_dicts.emplace_back();
    +    param_dicts.emplace_back(); // Adds empty dict for thread i, filled below
         for ( auto& param_key : p_keys )
         {
           // Check that the parameter exists for the synapse model.
    @@ -643,7 +644,7 @@ nest::ConnectionManager::connect_arrays( long* sources,
           }
     
           // If the default value is an integer, the synapse parameter must also be an integer.
    -      if ( is_type< long >( syn_model_default_it->second ) )
    +      if ( is_type< long >( syn_model_default_it->second.item ) )
           {
             param_pointers[ param_key ].second = true;
             param_dicts[ i ][ param_key ] = 0;
    @@ -742,12 +743,13 @@ nest::ConnectionManager::connect_arrays( long* sources,
               }
             }
     
    -        param_dicts[ tid ].init_access_flags(); // PYNEST-NG: Possible performance bottleneck
    +        // PYNEST-NG: Possible performance bottleneck
    +        param_dicts[ tid ].init_access_flags( /* thread_local_dict */ true );
     
             connect( *s, target_node, tid, synapse_model_id, param_dicts[ tid ], delay_buffer, weight_buffer );
     
    -        param_dicts[ tid ].all_entries_accessed(
    -          "connect_arrays", "params" ); // PYNEST-NG: Possible performance bottleneck
    +        // PYNEST-NG: Possible performance bottleneck
    +        param_dicts[ tid ].all_entries_accessed( "connect_arrays", "params", /* thread_local_dict */ true );
     
             increment_wd( w, d );
           }
    diff --git a/nestkernel/connection_manager.h b/nestkernel/connection_manager.h
    index 1dc6ded86d..7897cd422a 100644
    --- a/nestkernel/connection_manager.h
    +++ b/nestkernel/connection_manager.h
    @@ -168,10 +168,10 @@ class ConnectionManager : public ManagerInterface
         long* targets,
         double* weights,
         double* delays,
    -    std::vector< std::string >& p_keys,
    +    const std::vector< std::string >& p_keys,
         double* p_values,
         size_t n,
    -    std::string syn_model );
    +    const std::string& syn_model );
     
       /**
        * @brief Connect nodes from SONATA specification.
    diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h
    index f4171eb9f7..60de3d99d1 100644
    --- a/nestkernel/kernel_manager.h
    +++ b/nestkernel/kernel_manager.h
    @@ -196,7 +196,6 @@ class KernelManager
       ~KernelManager();
     
       unsigned long fingerprint_;
    -  DictionaryAccessFlagManager dict_access_flag_manager_;
     
       static KernelManager* kernel_manager_instance_;
     
    @@ -261,8 +260,6 @@ class KernelManager
     
       unsigned long get_fingerprint() const;
     
    -  DictionaryAccessFlagManager& get_dict_access_flag_manager();
    -
       /**
        * Write data to file per rank and thread. For use with FULL_LOGGING.
        *
    @@ -348,10 +345,5 @@ nest::KernelManager::get_fingerprint() const
       return fingerprint_;
     }
     
    -inline DictionaryAccessFlagManager&
    -nest::KernelManager::get_dict_access_flag_manager()
    -{
    -  return dict_access_flag_manager_;
    -}
     
     #endif /* KERNEL_MANAGER_H */
    diff --git a/nestkernel/model_manager_impl.h b/nestkernel/model_manager_impl.h
    index 1a729e2abd..9d801c8958 100644
    --- a/nestkernel/model_manager_impl.h
    +++ b/nestkernel/model_manager_impl.h
    @@ -46,7 +46,8 @@ ModelManager::register_node_model( const std::string& name, std::string deprecat
     {
       if ( modeldict_.known( name ) )
       {
    -    std::string msg = String::compose( "A model called '%1' already exists. Please choose a different name!", name );
    +    const std::string msg =
    +      String::compose( "A model called '%1' already exists. Please choose a different name!", name );
         throw NamingConflict( msg );
       }
     
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index aeaf8c1455..21b7999bbd 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -200,14 +200,14 @@ get_nc_status( NodeCollectionPTR nc )
           if ( p != result.end() )
           {
             // key exists
    -        auto& v = boost::any_cast< std::vector< boost::any >& >( p->second );
    -        v[ node_index ] = kv_pair.second;
    +        auto& v = boost::any_cast< std::vector< boost::any >& >( p->second.item );
    +        v[ node_index ] = kv_pair.second.item;
           }
           else
           {
             // key does not exist yet
             auto new_entry = std::vector< boost::any >( nc->size(), nullptr );
    -        new_entry[ node_index ] = kv_pair.second;
    +        new_entry[ node_index ] = kv_pair.second.item;
             result[ kv_pair.first ] = new_entry;
           }
         }
    @@ -459,10 +459,10 @@ connect_arrays( long* sources,
       long* targets,
       double* weights,
       double* delays,
    -  std::vector< std::string >& p_keys,
    +  const std::vector< std::string >& p_keys,
       double* p_values,
       size_t n,
    -  std::string syn_model )
    +  const std::string& syn_model )
     {
       kernel().connection_manager.connect_arrays( sources, targets, weights, delays, p_keys, p_values, n, syn_model );
     }
    diff --git a/nestkernel/nest.h b/nestkernel/nest.h
    index c226150ccf..ba3a52a200 100644
    --- a/nestkernel/nest.h
    +++ b/nestkernel/nest.h
    @@ -165,10 +165,10 @@ void connect_arrays( long* sources,
       long* targets,
       double* weights,
       double* delays,
    -  std::vector< std::string >& p_keys,
    +  const std::vector< std::string >& p_keys,
       double* p_values,
       size_t n,
    -  std::string syn_model );
    +  const std::string& syn_model );
     
     
     void connect_sonata( const dictionary& graph_specs, const long hyperslab_size );
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index 5d02375275..b225580c10 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -366,17 +366,17 @@ NodeManager::get_nodes( const dictionary& params, const bool local_only )
         for ( size_t tid = 0; tid < kernel().vp_manager.get_num_threads(); ++tid )
         {
           // Select those nodes fulfilling the key/value pairs of the dictionary
    -      for ( auto node : get_local_nodes( tid ) )
    +      for ( const auto& node : get_local_nodes( tid ) )
           {
             bool match = true;
    -        size_t node_id = node.get_node_id();
    +        const size_t node_id = node.get_node_id();
     
             dictionary node_status = get_status( node_id );
    -        for ( auto& entry : params )
    +        for ( const auto& [ key, entry ] : params )
             {
    -          if ( node_status.known( entry.first ) )
    +          if ( node_status.known( key ) )
               {
    -            if ( not value_equal( node_status.at( entry.first ), entry.second ) )
    +            if ( not value_equal( node_status.at( key ), entry.item ) )
                 {
                   match = false;
                   break;
    diff --git a/nestkernel/recording_backend_ascii.cpp b/nestkernel/recording_backend_ascii.cpp
    index c40415cd11..e813ed1b5f 100644
    --- a/nestkernel/recording_backend_ascii.cpp
    +++ b/nestkernel/recording_backend_ascii.cpp
    @@ -343,7 +343,8 @@ nest::RecordingBackendASCII::DeviceData::set_status( const dictionary& d )
       d.update_value( names::label, label_ );
     
       bool time_in_steps = false;
    -  if ( d.update_value( names::time_in_steps, time_in_steps ) )
    +  if ( d.update_value( names::time_in_steps, time_in_steps )
    +    and time_in_steps != time_in_steps_ ) // setting to the existing value is not an error
       {
         if ( kernel().simulation_manager.has_been_simulated() )
         {
    diff --git a/nestkernel/recording_device.cpp b/nestkernel/recording_device.cpp
    index 824527abeb..f2ad5e99dd 100644
    --- a/nestkernel/recording_device.cpp
    +++ b/nestkernel/recording_device.cpp
    @@ -143,11 +143,11 @@ nest::RecordingDevice::set_status( const dictionary& d )
         dictionary backend_params;
     
         // copy all properties not previously accessed from d to backend_params
    -    for ( auto& kv_pair : d )
    +    for ( auto& [ key, entry ] : d )
         {
    -      if ( not kernel().get_dict_access_flag_manager().accessed( d, kv_pair.first ) )
    +      if ( not d.has_been_accessed( key ) )
           {
    -        backend_params[ kv_pair.first ] = kv_pair.second;
    +        backend_params[ key ] = entry.item;
           }
         }
     
    @@ -155,12 +155,12 @@ nest::RecordingDevice::set_status( const dictionary& d )
     
         // cache all properties accessed by the backend in private member
         backend_params_.clear();
    -    for ( auto& kv_pair : backend_params )
    +    for ( auto& [ key, entry ] : backend_params )
         {
    -      if ( kernel().get_dict_access_flag_manager().accessed( backend_params, kv_pair.first ) )
    +      if ( backend_params.has_been_accessed( key ) )
           {
    -        backend_params_[ kv_pair.first ] = kv_pair.second;
    -        kernel().get_dict_access_flag_manager().register_access( d, kv_pair.first );
    +        backend_params_[ key ] = entry.item;
    +        d.mark_as_accessed( key );
           }
         }
       }
    @@ -190,9 +190,9 @@ nest::RecordingDevice::get_status( dictionary& d ) const
         kernel().io_manager.get_recording_backend_device_defaults( P_.record_to_, d );
     
         // then overwrite with cached parameters
    -    for ( auto& kv_pair : backend_params_ )
    +    for ( const auto& [ key, entry ] : backend_params_ )
         {
    -      d[ kv_pair.first ] = kv_pair.second;
    +      d[ key ] = entry.item;
         }
       }
       else
    diff --git a/nestkernel/sp_manager.cpp b/nestkernel/sp_manager.cpp
    index 54015ac275..7d642c7ee2 100644
    --- a/nestkernel/sp_manager.cpp
    +++ b/nestkernel/sp_manager.cpp
    @@ -139,9 +139,11 @@ SPManager::set_status( const dictionary& d )
       sp_conn_builders_.clear();
     
       d.update_value< dictionary >( names::structural_plasticity_synapses, syn_specs );
    -  for ( auto& kv_pair : syn_specs )
    +  for ( auto& [ key, entry ] : syn_specs )
       {
    -    syn_spec = boost::any_cast< dictionary >( kv_pair.second );
    +    // PYNEST-NG: We could get the dictionary here directly by boost::any_cast< dictionary >(entry.item),
    +    // but using the proper get() methods seems cleaner.
    +    const auto syn_spec = syn_specs.get< dictionary >( key );
         if ( syn_spec.known( names::allow_autapses ) )
         {
           conn_spec[ names::allow_autapses ] = syn_spec.get< bool >( names::allow_autapses );
    @@ -153,7 +155,7 @@ SPManager::set_status( const dictionary& d )
     
         // We use a ConnBuilder with dummy values to check the synapse parameters
         SPBuilder* conn_builder = new SPBuilder( sources, targets, /* third_out */ nullptr, conn_spec, { syn_spec } );
    -    conn_builder->set_name( kv_pair.first );
    +    conn_builder->set_name( key );
     
         // check that the user defined the min and max delay properly, if the
         // default delay is not used.
    diff --git a/nestkernel/stimulation_device.cpp b/nestkernel/stimulation_device.cpp
    index a9306f4173..7c6ed961ab 100644
    --- a/nestkernel/stimulation_device.cpp
    +++ b/nestkernel/stimulation_device.cpp
    @@ -133,22 +133,22 @@ nest::StimulationDevice::set_status( const dictionary& d )
         dictionary backend_params;
     
         // copy all properties not previously accessed from d to backend_params
    -    for ( auto& kv_pair : d )
    +    for ( auto& [ key, entry ] : d )
         {
    -      if ( not kernel().get_dict_access_flag_manager().accessed( d, kv_pair.first ) )
    +      if ( not d.has_been_accessed( key ) )
           {
    -        backend_params[ kv_pair.first ] = kv_pair.second;
    +        backend_params[ key ] = entry.item;
           }
         }
     
         // cache all properties accessed by the backend in private member
         backend_params_.clear();
    -    for ( auto& kv_pair : backend_params )
    +    for ( auto& [ key, entry ] : backend_params )
         {
    -      if ( kernel().get_dict_access_flag_manager().accessed( backend_params, kv_pair.first ) )
    +      if ( backend_params.has_been_accessed( key ) )
           {
    -        backend_params_[ kv_pair.first ] = kv_pair.second;
    -        kernel().get_dict_access_flag_manager().register_access( d, kv_pair.first );
    +        backend_params_[ key ] = entry.item;
    +        d.mark_as_accessed( key );
           }
         }
       }
    diff --git a/pynest/nestkernel_api.pxd b/pynest/nestkernel_api.pxd
    index 5af926fd5d..0248737e66 100644
    --- a/pynest/nestkernel_api.pxd
    +++ b/pynest/nestkernel_api.pxd
    @@ -44,13 +44,19 @@ cdef extern from "dictionary.h" namespace "boost":
             any& operator=[T](T&)
         T any_cast[T](any& operand)
     
    +cdef extern from "dictionary.h":
    +    cppclass DictEntry_:
    +        DictEntry_()
    +        DictEntry_(const any&)
    +        any item
    +        cbool accessed
     
     cdef extern from "dictionary.h":
         cppclass dictionary:
             dictionary()
             any& operator[](const string&)
             cppclass const_iterator:
    -            pair[string, any]& operator*()
    +            pair[string, DictEntry_]& operator*()
                 const_iterator operator++()
                 bint operator==(const const_iterator&)
                 bint operator!=(const const_iterator&)
    @@ -188,7 +194,7 @@ cdef extern from "nest.h" namespace "nest":
     
         vector[size_t] node_collection_to_array( NodeCollectionPTR node_collection, const string& selection ) except +custom_exception_handler
     
    -    void connect_arrays( long* sources, long* targets, double* weights, double* delays, vector[string]& p_keys, double* p_values, size_t n, string syn_model ) except +custom_exception_handler
    +    void connect_arrays( long* sources, long* targets, double* weights, double* delays, const vector[string]& p_keys, double* p_values, size_t n, const string& syn_model ) except +custom_exception_handler
         vector[double] apply( const ParameterPTR param, const NodeCollectionPTR nc ) except +custom_exception_handler
         vector[double] apply( const ParameterPTR param, const dictionary& positions ) except +custom_exception_handler
     
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 2eafceb9d6..e212061de7 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -192,10 +192,10 @@ cdef object dictionary_to_pydict(dictionary cdict):
         cdef dictionary.const_iterator it = cdict.begin()
         while it != cdict.end():
             key = string_to_pystr(deref(it).first)
    -        tmp[key] = any_to_pyobj(deref(it).second)
    +        tmp[key] = any_to_pyobj(deref(it).second.item)
             if tmp[key] is None:
                 # If we end up here, the value in the dictionary is of a type that any_to_pyobj() cannot handle.
    -            raise RuntimeError('Could not convert: ' + key + ' of type ' + string_to_pystr(debug_type(deref(it).second)))
    +            raise RuntimeError('Could not convert: ' + key + ' of type ' + string_to_pystr(debug_type(deref(it).second.item)))
             inc(it)
         return tmp
     
    diff --git a/testsuite/pytests/test_connect_arrays.py b/testsuite/pytests/test_connect_arrays.py
    index 26266cb4a8..0a8c30cd4b 100644
    --- a/testsuite/pytests/test_connect_arrays.py
    +++ b/testsuite/pytests/test_connect_arrays.py
    @@ -364,7 +364,7 @@ def test_connect_arrays_receptor_type(self):
             self.assertEqual(len(sources) * [0], nest.GetConnections().receptor)
     
         @unittest.skipIf(not HAVE_THREADS, "NEST was compiled without multi-threading")
    -    def test_connect_arrays_differnt_alpha(self):
    +    def test_connect_arrays_different_alpha(self):
             """Connecting NumPy arrays with different alpha values in a threaded environment"""
     
             nest.local_num_threads = 4
    
    From e09889b231ef258718dd2a7516dec05fe83844de Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Fri, 31 Jan 2025 22:45:01 +0100
    Subject: [PATCH 334/375] Correctly place code for template method
     specialization
    
    ---
     libnestutil/dictionary.cpp | 60 ++++++++++++++++++++++++++++++++++
     libnestutil/dictionary.h   | 67 ++++----------------------------------
     2 files changed, 67 insertions(+), 60 deletions(-)
    
    diff --git a/libnestutil/dictionary.cpp b/libnestutil/dictionary.cpp
    index 903d449ed1..a3ead7e801 100644
    --- a/libnestutil/dictionary.cpp
    +++ b/libnestutil/dictionary.cpp
    @@ -56,6 +56,66 @@ operator<<( std::ostream& os, const std::vector< T >& vec )
       return os << "]";
     }
     
    +template <>
    +double
    +dictionary::cast_value_< double >( const boost::any& value, const std::string& key ) const
    +{
    +  try
    +  {
    +    if ( is_type< double >( value ) )
    +    {
    +      return boost::any_cast< double >( value );
    +    }
    +    if ( is_type< long >( value ) )
    +    {
    +      return static_cast< double >( boost::any_cast< long >( value ) );
    +    }
    +    if ( is_type< size_t >( value ) )
    +    {
    +      return static_cast< double >( boost::any_cast< size_t >( value ) );
    +    }
    +    if ( is_type< int >( value ) )
    +    {
    +      return static_cast< double >( boost::any_cast< int >( value ) );
    +    }
    +    throw boost::bad_any_cast(); // deflect to error handling below
    +  }
    +  catch ( const boost::bad_any_cast& )
    +  {
    +    const std::string msg =
    +      std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type double.";
    +    throw nest::TypeMismatch( msg );
    +  }
    +}
    +
    +template <>
    +std::vector< double >
    +dictionary::cast_value_< std::vector< double > >( const boost::any& value, const std::string& key ) const
    +{
    +  try
    +  {
    +    if ( is_type< std::vector< double > >( value ) )
    +    {
    +      return boost::any_cast< std::vector< double > >( value );
    +    }
    +    if ( is_type< std::vector< long > >( value ) )
    +    {
    +      const std::vector< long > vlong = boost::any_cast< std::vector< long > >( value );
    +      std::vector< double > res;
    +      std::copy( vlong.begin(), vlong.end(), std::back_inserter( res ) );
    +      return res;
    +    }
    +    throw boost::bad_any_cast(); // deflect to error handling below
    +  }
    +  catch ( const boost::bad_any_cast& )
    +  {
    +    const std::string msg =
    +      std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type std::vector<double>.";
    +    throw nest::TypeMismatch( msg );
    +  }
    +}
    +
    +
     // debug
     std::string
     debug_type( const boost::any& operand )
    diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h
    index d4818cca03..a074c5fb3f 100644
    --- a/libnestutil/dictionary.h
    +++ b/libnestutil/dictionary.h
    @@ -119,66 +119,6 @@ class dictionary : public std::map< std::string, DictEntry_ >
         }
       }
     
    -  template <>
    -  double
    -  cast_value_< double >( const boost::any& value, const std::string& key ) const
    -  {
    -    try
    -    {
    -      if ( is_type< double >( value ) )
    -      {
    -        return boost::any_cast< double >( value );
    -      }
    -      if ( is_type< long >( value ) )
    -      {
    -        return static_cast< double >( boost::any_cast< long >( value ) );
    -      }
    -      if ( is_type< size_t >( value ) )
    -      {
    -        return static_cast< double >( boost::any_cast< size_t >( value ) );
    -      }
    -      if ( is_type< int >( value ) )
    -      {
    -        return static_cast< double >( boost::any_cast< int >( value ) );
    -      }
    -      throw boost::bad_any_cast(); // deflect to error handling below
    -    }
    -    catch ( const boost::bad_any_cast& )
    -    {
    -      const std::string msg =
    -        std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type double.";
    -      throw nest::TypeMismatch( msg );
    -    }
    -  }
    -
    -  template <>
    -  std::vector< double >
    -  cast_value_< std::vector< double > >( const boost::any& value, const std::string& key ) const
    -  {
    -    try
    -    {
    -      if ( is_type< std::vector< double > >( value ) )
    -      {
    -        return boost::any_cast< std::vector< double > >( value );
    -      }
    -      if ( is_type< std::vector< long > >( value ) )
    -      {
    -        const std::vector< long > vlong = boost::any_cast< std::vector< long > >( value );
    -        std::vector< double > res;
    -        std::copy( vlong.begin(), vlong.end(), std::back_inserter( res ) );
    -        return res;
    -      }
    -      throw boost::bad_any_cast(); // deflect to error handling below
    -    }
    -    catch ( const boost::bad_any_cast& )
    -    {
    -      const std::string msg =
    -        std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type std::vector<double>.";
    -      throw nest::TypeMismatch( msg );
    -    }
    -  }
    -
    -
       /**
        * @brief Cast the specified value to an integer.
        *
    @@ -374,4 +314,11 @@ class dictionary : public std::map< std::string, DictEntry_ >
     
     std::ostream& operator<<( std::ostream& os, const dictionary& dict );
     
    +template <>
    +double dictionary::cast_value_< double >( const boost::any& value, const std::string& key ) const;
    +
    +template <>
    +std::vector< double > dictionary::cast_value_< std::vector< double > >( const boost::any& value,
    +  const std::string& key ) const;
    +
     #endif /* DICTIONARY_H_ */
    
    From 2a06c1db16b11327695f66a80b50d33609987e74 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 08:16:21 +0100
    Subject: [PATCH 335/375] Adapt NESTError
    
    ---
     pynest/nest/server/hl_api_server.py | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/pynest/nest/server/hl_api_server.py b/pynest/nest/server/hl_api_server.py
    index eb75763757..3a25aded48 100644
    --- a/pynest/nest/server/hl_api_server.py
    +++ b/pynest/nest/server/hl_api_server.py
    @@ -36,7 +36,6 @@
     from flask import Flask, jsonify, request
     from flask.logging import default_handler
     from flask_cors import CORS
    -from nest.lib.hl_api_exceptions import NESTError
     
     # This ensures that the logging information shows up in the console running the server,
     # even when Flask's event loop is running.
    @@ -438,7 +437,7 @@ def func_wrapper(call, *args, **kwargs):
             try:
                 return func(call, *args, **kwargs)
     
    -        except NESTError as err:
    +        except nest.NESTError as err:
                 error_class = err.errorname + " (NESTError)"
                 detail = err.errormessage
                 lineno = get_lineno(err, 1)
    
    From efac3d026aa29c66b1d31dba17ec67118cc41873 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 15:31:23 +0100
    Subject: [PATCH 336/375] Fix Music-related exceptions and remove possible
     buffer-size problem
    
    ---
     nestkernel/exceptions.h | 11 ++++++-----
     1 file changed, 6 insertions(+), 5 deletions(-)
    
    diff --git a/nestkernel/exceptions.h b/nestkernel/exceptions.h
    index 89cb0f0b2b..fe3d3cce47 100644
    --- a/nestkernel/exceptions.h
    +++ b/nestkernel/exceptions.h
    @@ -1260,7 +1260,7 @@ class InternalError : public KernelException
     class MUSICPortUnconnected : public KernelException
     {
     private:
    -  std::string msg;
    +  std::string msg_;
     
     public:
       /**
    @@ -1292,6 +1292,7 @@ class MUSICPortUnconnected : public KernelException
       }
     };
     
    +
     /**
      * Exception to be thrown if a music_event_out_proxy is generated, but the
      * music port has no width.
    @@ -1492,6 +1493,9 @@ class MUSICPortUnknown : public KernelException
      */
     class MUSICChannelAlreadyMapped : public KernelException
     {
    +private:
    +  std::string msg_;
    +
     public:
       /**
        * @note model should be passed from get_name() to ensure that
    @@ -1502,9 +1506,6 @@ class MUSICChannelAlreadyMapped : public KernelException
        */
       MUSICChannelAlreadyMapped( const std::string& model, const std::string& portname, int channel )
         : KernelException( "MUSICChannelAlreadyMapped" )
    -    , portname_( portname )
    -    , channel_( channel )
    -    , model_( model )
       {
         msg_ = String::compose(
           "The channel %1 of port %2 has already be mapped "
    @@ -1589,7 +1590,7 @@ class MPIErrorCode : public KernelException
     private:
       std::string msg_;
       std::string error_;
    -  char errmsg_[ 256 ];
    +  char errmsg_[ 2 * MPI_MAX_ERROR_STRING ]; // Multiply by two for extra safety
       int len_;
     
     public:
    
    From 589fd28178b1cdc9fbff5cba4b513332ffce7f4e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 15:32:10 +0100
    Subject: [PATCH 337/375] Add todo-question
    
    ---
     pynest/nest/lib/hl_api_types.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 70fa13e4ea..af92d7af9a 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -201,7 +201,7 @@ class NodeCollection:
                 6 in new_nc
         """
     
    -    _datum = None
    +    _datum = None  # PYNEST-NG: Why defined at class level?
     
         def __init__(self, data=None):
             if data is None:
    
    From 559c8d58e4ca9f1469ea680d8f87a57a02e1d75c Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 15:32:40 +0100
    Subject: [PATCH 338/375] Switch back to requiring only C++17
    
    ---
     CMakeLists.txt | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index be07be281b..9f98bf4483 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -24,7 +24,7 @@ list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
     
     project( nest CXX C )
     
    -set( CMAKE_CXX_STANDARD 20 )
    +set( CMAKE_CXX_STANDARD 17 )
     set( CMAKE_CXX_STANDARD_REQUIRED True )
     
     set( NEST_USER_EMAIL "users@nest-simulator.org" )
    
    From e61dccff759cd40e7a34096a9ca36f500995c6dd Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 15:33:14 +0100
    Subject: [PATCH 339/375] Remove all remaining references to readline
    
    ---
     .github/workflows/nestbuildmatrix.yml      |  4 +--
     cmake/ProcessOptions.cmake                 | 31 +++++-----------------
     doc/htmldoc/installation/cmake_options.rst |  1 -
     3 files changed, 8 insertions(+), 28 deletions(-)
    
    diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml
    index 25938641c8..7be4fb23e4 100644
    --- a/.github/workflows/nestbuildmatrix.yml
    +++ b/.github/workflows/nestbuildmatrix.yml
    @@ -565,7 +565,7 @@ jobs:
               sudo apt-get update
               # https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
               sudo apt-get install ccache
    -          sudo apt-get install libltdl-dev libreadline6-dev libncurses5-dev libgsl0-dev python3-all-dev jq libpcre3 libpcre3-dev
    +          sudo apt-get install libltdl-dev libgsl0-dev python3-all-dev jq libpcre3 libpcre3-dev
               sudo apt-get install tcl8.6 tcl8.6-dev tk8.6-dev
               # Install MPI dependencies regardless of whether we compile NEST with or without MPI, so the installation of MPI4Py works
               sudo apt-get install openmpi-bin libopenmpi-dev
    @@ -674,7 +674,6 @@ jobs:
                   -Dwith-python=${{ contains(matrix.use, 'python') && 'ON' || 'OFF' }} \
                   -Dwith-gsl=${{ contains(matrix.use, 'gsl') && 'ON' || 'OFF' }} \
                   -Dwith-ltdl=${{ contains(matrix.use, 'ltdl') && 'ON' || 'OFF' }} \
    -              -Dwith-readline=${{ contains(matrix.use, 'readline') && 'ON' || 'OFF' }} \
                   -Dwith-hdf5=${{ contains(matrix.use, 'hdf5') && 'ON' || 'OFF' }} \
                   -Dwith-sionlib=${{ contains(matrix.use, 'sionlib') && '$HOME/.cache/sionlib.install' || 'OFF' }} \
                   -Dwith-libneurosim=${{ contains(matrix.use, 'libneurosim') && '$HOME/.cache/libneurosim.install' || 'OFF' }} \
    @@ -804,7 +803,6 @@ jobs:
                   -Dwith-python=${{ contains(matrix.use, 'python') && 'ON' || 'OFF' }} \
                   -Dwith-gsl=${{ contains(matrix.use, 'gsl') && 'ON' || 'OFF' }} \
                   -Dwith-ltdl=${{ contains(matrix.use, 'ltdl') && 'ON' || 'OFF' }} \
    -              -Dwith-readline=${{ contains(matrix.use, 'readline') && 'ON' || 'OFF' }} \
                   -Dwith-hdf5=${{ contains(matrix.use, 'hdf5') && 'ON' || 'OFF' }} \
                   -Dwith-sionlib=${{ contains(matrix.use, 'sionlib') && '$HOME/.cache/sionlib.install' || 'OFF' }} \
                   -Dwith-libneurosim=${{ contains(matrix.use, 'libneurosim') && '$HOME/.cache/libneurosim.install' || 'OFF' }} \
    diff --git a/cmake/ProcessOptions.cmake b/cmake/ProcessOptions.cmake
    index b9347b501e..46fb532ab6 100644
    --- a/cmake/ProcessOptions.cmake
    +++ b/cmake/ProcessOptions.cmake
    @@ -253,30 +253,6 @@ function( NEST_PROCESS_WITH_LIBLTDL )
       endif ()
     endfunction()
     
    -function( NEST_PROCESS_WITH_READLINE )
    -  # Find readline
    -  set( HAVE_READLINE OFF PARENT_SCOPE )
    -  if ( with-readline )
    -    if ( NOT ${with-readline} STREQUAL "ON" )
    -      # a path is set
    -      set( Readline_ROOT "${with-readline}" )
    -    endif ()
    -
    -    find_package( Readline )
    -    if ( READLINE_FOUND )
    -      set( HAVE_READLINE ON PARENT_SCOPE )
    -      # export found variables to parent scope
    -      set( READLINE_FOUND "${READLINE_FOUND}" PARENT_SCOPE )
    -      set( READLINE_LIBRARIES "${READLINE_LIBRARIES}" PARENT_SCOPE )
    -      set( READLINE_INCLUDE_DIRS "${READLINE_INCLUDE_DIRS}" PARENT_SCOPE )
    -      set( READLINE_VERSION "${READLINE_VERSION}" PARENT_SCOPE )
    -
    -      include_directories( ${READLINE_INCLUDE_DIRS} )
    -      # is linked in sli/CMakeLists.txt
    -    endif ()
    -  endif ()
    -endfunction()
    -
     function( NEST_PROCESS_WITH_GSL )
       # Find GSL
       set( HAVE_GSL OFF PARENT_SCOPE )
    @@ -398,6 +374,13 @@ function( NEST_PROCESS_WITH_OPENMP )
           printError( "CMake can not find OpenMP." )
         endif ()
       endif ()
    +
    +  # Provide a dummy OpenMP::OpenMP_CXX if no OpenMP or if flags explicitly
    +  # given. Needed to avoid problems where OpenMP::OpenMP_CXX is used.
    +  if ( NOT TARGET OpenMP::OpenMP_CXX )
    +    add_library(OpenMP::OpenMP_CXX INTERFACE IMPORTED)
    +  endif()
    +
     endfunction()
     
     function( NEST_PROCESS_WITH_MPI )
    diff --git a/doc/htmldoc/installation/cmake_options.rst b/doc/htmldoc/installation/cmake_options.rst
    index 316bce8b56..7f27bd3bbb 100644
    --- a/doc/htmldoc/installation/cmake_options.rst
    +++ b/doc/htmldoc/installation/cmake_options.rst
    @@ -56,7 +56,6 @@ To configure NEST for compilation without external packages, use the following
         cmake -DCMAKE_INSTALL_PREFIX:PATH=<nest_install_dir> \
               -Dwith-python=OFF \
               -Dwith-gsl=OFF \
    -          -Dwith-readline=OFF \
               -Dwith-ltdl=OFF \
               -Dwith-openmp=OFF \
               </path/to/nest/source>
    
    From 135230c220079cfaaaa4651c2be0981f10e33c17 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 15:38:00 +0100
    Subject: [PATCH 340/375] Remove last traces of ditionary_access_flag_manager
    
    ---
     libnestutil/CMakeLists.txt                    |   1 -
     .../dictionary_access_flag_manager.cpp        |  62 ----------
     libnestutil/dictionary_access_flag_manager.h  | 109 ------------------
     nestkernel/kernel_manager.h                   |   4 -
     4 files changed, 176 deletions(-)
     delete mode 100644 libnestutil/dictionary_access_flag_manager.cpp
     delete mode 100644 libnestutil/dictionary_access_flag_manager.h
    
    diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt
    index 13189eb889..0a620bafa9 100644
    --- a/libnestutil/CMakeLists.txt
    +++ b/libnestutil/CMakeLists.txt
    @@ -22,7 +22,6 @@ set(nestutil_sources
         beta_normalization_factor.h
         block_vector.h
         dictionary.h dictionary.cpp
    -    dictionary_access_flag_manager.h dictionary_access_flag_manager.cpp
         dict_util.h
         enum_bitfield.h
         iaf_propagator.h iaf_propagator.cpp
    diff --git a/libnestutil/dictionary_access_flag_manager.cpp b/libnestutil/dictionary_access_flag_manager.cpp
    deleted file mode 100644
    index 5a6a0211a9..0000000000
    --- a/libnestutil/dictionary_access_flag_manager.cpp
    +++ /dev/null
    @@ -1,62 +0,0 @@
    -/*
    - *  dictionary_access_flag_manager.cpp
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -
    -#include <algorithm> // std::copy_if
    -#include <numeric>   // std::accumulate
    -#include <string>
    -#include <vector>
    -
    -#include "dictionary_access_flag_manager.h"
    -
    -#include "exceptions.h"
    -
    -void
    -DictionaryAccessFlagManager::all_accessed( const dictionary& dict,
    -  const std::string where,
    -  const std::string what ) const
    -{
    -  // Vector of elements in the dictionary that are not accessed
    -  std::vector< dictionary::value_type > not_accessed_kv_pairs;
    -
    -  const auto& access_set = access_flags_.at( &dict );
    -  const auto comparator = [ &access_set ]( dictionary::value_type kv )
    -  { return access_set.find( kv.first ) == access_set.end(); };
    -
    -  std::copy_if( dict.begin(), dict.end(), std::back_inserter( not_accessed_kv_pairs ), comparator );
    -
    -  if ( not_accessed_kv_pairs.size() > 0 )
    -  {
    -    const auto missed = std::accumulate( not_accessed_kv_pairs.begin(),
    -      not_accessed_kv_pairs.end(),
    -      key_type_(),
    -      []( const key_type_& a, const dictionary::value_type& b ) { return a + " " + b.first; } );
    -
    -    throw nest::UnaccessedDictionaryEntry( what, where, missed );
    -  }
    -}
    -
    -bool
    -DictionaryAccessFlagManager::accessed( const dictionary& dict, const key_type_& key ) const
    -{
    -  return access_flags_.at( &dict ).count( key ) > 0;
    -}
    diff --git a/libnestutil/dictionary_access_flag_manager.h b/libnestutil/dictionary_access_flag_manager.h
    deleted file mode 100644
    index 414a6878b3..0000000000
    --- a/libnestutil/dictionary_access_flag_manager.h
    +++ /dev/null
    @@ -1,109 +0,0 @@
    -/*
    - *  dictionary_access_flag_manager.h
    - *
    - *  This file is part of NEST.
    - *
    - *  Copyright (C) 2004 The NEST Initiative
    - *
    - *  NEST is free software: you can redistribute it and/or modify
    - *  it under the terms of the GNU General Public License as published by
    - *  the Free Software Foundation, either version 2 of the License, or
    - *  (at your option) any later version.
    - *
    - *  NEST is distributed in the hope that it will be useful,
    - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    - *  GNU General Public License for more details.
    - *
    - *  You should have received a copy of the GNU General Public License
    - *  along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    - *
    - */
    -
    -#ifndef DICTIONARY_ACCESS_FLAG_MANAGER_H
    -#define DICTIONARY_ACCESS_FLAG_MANAGER_H
    -
    -#include <map>
    -#include <string>
    -#include <unordered_set>
    -
    -#include "dictionary.h"
    -
    -// TODO: PYNEST-NG: Here's an idea to improve the performance and
    -// address the possible bottlenecks mentioned below: Instead of
    -// performing access checks on node instances, they could be performed
    -// on the model prototypes (or clones thereof) just once prior to
    -// actually calling instance.set_status() or
    -// kernel_manager::set_status(). This would, however, require that all
    -// inter-dependent properties in such a call would be forced to be set
    -// together. In other words all calls to set_status() must be
    -// independent of the current state of the node instance.
    -
    -/**
    - * @brief Access flag manager for the dictionary class
    - *
    - * Manages access flags for dictionary keys and can check if all keys
    - * in a dictionary has been accessed. Key access is not integrated into
    - * the dictionary class to be able to keep the dictionary const.
    - *
    - * @note The access flag manager depends on the **address** of the dictionary to
    - * keep track of each single dictionary. It is therefore essential that a dictionary is
    - * **never copied**, since the new dict will have its accesses register separately.
    - * There is also a **memory bloat** here because entries are not removed when
    - * a dictionary is deleted.
    - */
    -class DictionaryAccessFlagManager
    -{
    -private:
    -  using key_type_ = dictionary::key_type;
    -  std::map< const dictionary*, std::unordered_set< key_type_ > > access_flags_;
    -
    -public:
    -  DictionaryAccessFlagManager() = default;
    -  ~DictionaryAccessFlagManager() = default;
    -
    -  void init_access_flags( const dictionary& );
    -  void register_access( const dictionary&, const key_type_& );
    -
    -  /**
    -   * @brief Check that all elements in a dictionary have been accessed.
    -   *
    -   * @param dict Dictionary to check
    -   * @param where Which function the error occurs in
    -   * @param what Which parameter triggers the error
    -   *
    -   */
    -  void all_accessed( const dictionary& dict, const std::string where, const std::string what ) const;
    -
    -  /**
    -   * @brief Return whether the specified key has been accessed by the dictionary.
    -   *
    -   * @param dict Dictionary to check
    -   * @param key Key to check
    -   * @return true if key has been accessed
    -   * @return false if key has not been accessed
    -   */
    -  bool accessed( const dictionary& dict, const key_type_& key ) const;
    -};
    -
    -inline void
    -DictionaryAccessFlagManager::init_access_flags( const dictionary& dict )
    -{
    -  // TODO PYNEST-NG: Performance bottleneck
    -#pragma omp critical( init_access_flags )
    -  {
    -    access_flags_[ &dict ] = {};
    -  }
    -}
    -
    -inline void
    -DictionaryAccessFlagManager::register_access( const dictionary& dict, const key_type_& key )
    -{
    -  // TODO PYNEST-NG: Performance bottleneck
    -#pragma omp critical( register_access )
    -  {
    -    access_flags_[ &dict ].insert( key );
    -  }
    -}
    -
    -#endif // DICTIONARY_ACCESS_FLAG_MANAGER_H
    diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h
    index 60de3d99d1..ac21c84df1 100644
    --- a/nestkernel/kernel_manager.h
    +++ b/nestkernel/kernel_manager.h
    @@ -42,10 +42,6 @@
     #include "sp_manager.h"
     #include "vp_manager.h"
     
    -// Includes from libnestutil
    -#include "dictionary_access_flag_manager.h"
    -
    -
     #include "compose.hpp"
     #include <fstream>
     
    
    From 674d2ce5cfe86514cf6b2128291275a5fda0488b Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 20:03:25 +0100
    Subject: [PATCH 341/375] Remove last occurences of DictionaryDatum
    
    ---
     nestkernel/module_manager.h | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/module_manager.h b/nestkernel/module_manager.h
    index f987646ed7..addf6f6403 100644
    --- a/nestkernel/module_manager.h
    +++ b/nestkernel/module_manager.h
    @@ -109,11 +109,11 @@ class ModuleManager : public ManagerInterface
       }
     
       void
    -  get_status( DictionaryDatum& ) override
    +  get_status( dictionary& ) override
       {
       }
       void
    -  set_status( const DictionaryDatum& ) override
    +  set_status( const dictionary& ) override
       {
       }
     
    
    From 1eacaadf0138f80c2eaded2c1725dd59252129a6 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 20:36:07 +0100
    Subject: [PATCH 342/375] Remove include for no longer existing file.
    
    ---
     models/music_cont_out_proxy.cpp | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/models/music_cont_out_proxy.cpp b/models/music_cont_out_proxy.cpp
    index ecd834882f..ea524f118f 100644
    --- a/models/music_cont_out_proxy.cpp
    +++ b/models/music_cont_out_proxy.cpp
    @@ -31,7 +31,6 @@
     // Includes from nestkernel:
     #include "event_delivery_manager_impl.h"
     #include "kernel_manager.h"
    -#include "nest_datums.h"
     #include "nest_impl.h"
     
     // Includes from libnestutil:
    
    From 842d18e86c6c6348006be2b97dd0a6b2ca3db5ed Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 20:58:57 +0100
    Subject: [PATCH 343/375] Add missing flag for robust openmp support
    
    ---
     libnestutil/CMakeLists.txt | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/libnestutil/CMakeLists.txt b/libnestutil/CMakeLists.txt
    index 0a620bafa9..0a7d1ce87b 100644
    --- a/libnestutil/CMakeLists.txt
    +++ b/libnestutil/CMakeLists.txt
    @@ -46,7 +46,7 @@ endif()
     
     set_target_properties(nestutil PROPERTIES POSITION_INDEPENDENT_CODE ON)
     
    -target_link_libraries(nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS})
    +target_link_libraries(nestutil ${GSL_LIBRARIES} ${SIONLIB_LIBS} OpenMP::OpenMP_CXX)
     
     target_include_directories(nestutil PRIVATE
         ${PROJECT_SOURCE_DIR}/libnestutil
    
    From 857d643b36b92b59d984bb700cb121c1597639cd Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Mon, 3 Feb 2025 22:41:21 +0100
    Subject: [PATCH 344/375] Correct dictionary entry handling for Sonata
    
    ---
     nestkernel/sonata_connector.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/sonata_connector.cpp b/nestkernel/sonata_connector.cpp
    index 417467f059..4d0dee578f 100644
    --- a/nestkernel/sonata_connector.cpp
    +++ b/nestkernel/sonata_connector.cpp
    @@ -107,7 +107,6 @@ SonataConnector::connect()
       {
         cur_fname_ = boost::any_cast< std::string >( edge_dict.at( "edges_file" ) );
     
    -
         const auto file = open_file_( cur_fname_ );
         const auto edges_top_level_grp = open_group_( file, "edges" );
     
    @@ -551,7 +550,8 @@ SonataConnector::create_edge_type_id_2_syn_spec_( dictionary edge_params )
       for ( auto& syn_kv_pair : edge_params )
       {
         const auto type_id = std::stoi( boost::any_cast< std::string >( syn_kv_pair.first ) );
    -    auto d = boost::any_cast< dictionary >( syn_kv_pair.second );
    +    auto d = boost::any_cast< dictionary >( syn_kv_pair.second.item );
    +
         const auto syn_name = boost::any_cast< std::string >( d.at( "synapse_model" ) );
     
         // The following call will throw "UnknownSynapseType" if syn_name is not naming a known model
    
    From 228c10070668ea7e0f7aea404a1efa0e7a5e4594 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 4 Feb 2025 07:50:50 +0100
    Subject: [PATCH 345/375] Remove CI case without Python as it makes no sense
     for pynest-ng
    
    ---
     .github/workflows/nestbuildmatrix.yml | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml
    index 7be4fb23e4..604a71870b 100644
    --- a/.github/workflows/nestbuildmatrix.yml
    +++ b/.github/workflows/nestbuildmatrix.yml
    @@ -524,7 +524,6 @@ jobs:
             # available use flags (all default to "OFF"):
             # openmp, mpi, python, gsl, ltdl, boost, sionlib, libneurosim, optimize, warning, userdoc, music
             use:
    -          - "boost, optimize, warning"
               - "openmp, python, gsl, ltdl, boost, optimize, warning"
               - "mpi, python, gsl, ltdl, boost, optimize, warning"
               - "openmp, mpi, python, gsl, ltdl, boost, hdf5, sionlib, libneurosim, optimize, warning, music"
    
    From 32626ec5ced1abe9d8edb8e827d28cc6980f50d7 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 4 Feb 2025 07:59:41 +0100
    Subject: [PATCH 346/375] Use all-caps OPENMP_FOUND for consistency with
     ProcessOptions
    
    ---
     cmake/FindSIONlib.cmake | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/cmake/FindSIONlib.cmake b/cmake/FindSIONlib.cmake
    index 23dbdf35a0..6bc0fa3415 100644
    --- a/cmake/FindSIONlib.cmake
    +++ b/cmake/FindSIONlib.cmake
    @@ -57,9 +57,9 @@ if ( NOT SIONLIB_CONFIG STREQUAL "SIONLIB_CONFIG-NOTFOUND" )
       # get arguments for sionconfig --cflags and --libs
       set( CONF_FLAGS "--cxx" ) # we use cxx
       # find parallelization
    -  if ( OpenMP_FOUND AND MPI_CXX_FOUND )
    +  if ( OPENMP_FOUND AND MPI_CXX_FOUND )
         set( CONF_FLAGS ${CONF_FLAGS} "--ompi" )
    -  elseif ( OpenMP_FOUND )
    +  elseif ( OPENMP_FOUND )
         set( CONF_FLAGS ${CONF_FLAGS} "--omp" )
       elseif ( MPI_CXX_FOUND )
         set( CONF_FLAGS ${CONF_FLAGS} "--mpi" )
    
    From 12f352e5b70157992a813859b00520db8d3e0da0 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 4 Feb 2025 22:13:47 +0100
    Subject: [PATCH 347/375] Attempting to fix pytest invocation problems
    
    ---
     testsuite/do_tests.sh | 8 +++++---
     1 file changed, 5 insertions(+), 3 deletions(-)
    
    diff --git a/testsuite/do_tests.sh b/testsuite/do_tests.sh
    index 0918fc7308..b7546b502f 100755
    --- a/testsuite/do_tests.sh
    +++ b/testsuite/do_tests.sh
    @@ -92,6 +92,8 @@ if test ! "${PREFIX:-}"; then
         usage 2 "--prefix";
     fi
     
    +PYTEST="$( dirname $PYTHON )/pytest"
    +
     if test "${PYTHON}"; then
           TIME_LIMIT=120  # seconds, for each of the Python tests
           PYTEST_VERSION="$(${PYTHON} -m pytest --version --timeout ${TIME_LIMIT} --numprocesses=1 2>&1)" || {
    @@ -130,7 +132,6 @@ get_build_info ()
       ${PYTHON} -c "import nest; print(nest.build_info['$1'])" --quiet
     }
     
    -NEST="nest_serial"
     HAVE_MPI="$(get_build_info have_mpi)"
     HAVE_OPENMP="$(get_build_info have_threads)"
     
    @@ -209,7 +210,8 @@ if test "${PYTHON}"; then
         XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
         env
         set +e
    -    "${PYTHON}" -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
    +    ${MPI_LAUNCHER_CMDLINE} 1 "${PYTHON}" -m pytest ${PYTEST_ARGS}) 2>&1 | tee -a "${TEST_LOGFILE}"
    + "${PYTHON}" -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
               --ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
         set -e
     
    @@ -237,7 +239,7 @@ if test "${PYTHON}"; then
     
     		set +e
     		echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTHON}" -m pytest ${PYTEST_ARGS}"
    -                $(${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTHON}" -m pytest ${PYTEST_ARGS}) 2>&1 | tee -a "${TEST_LOGFILE}"
    +                $(${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTEST}" ${PYTEST_ARGS}) 2>&1 | tee -a "${TEST_LOGFILE}"
     
     		set -e
                 done
    
    From f1a4e4309a3381a46b23a5e75b356f21531db785 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 6 Feb 2025 22:53:20 +0100
    Subject: [PATCH 348/375] Make sure we use c++17 without GNU extensions
    
    ---
     CMakeLists.txt | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index 9f98bf4483..f279d8e1d7 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -26,6 +26,7 @@ project( nest CXX C )
     
     set( CMAKE_CXX_STANDARD 17 )
     set( CMAKE_CXX_STANDARD_REQUIRED True )
    +set( CMAKE_CXX_EXTENSIONS OFF )          # -std=c++17 instead of gnu++17
     
     set( NEST_USER_EMAIL "users@nest-simulator.org" )
     
    
    From 303a74cfd235e1baf6c12b96b1b26aa89573c05a Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 6 Feb 2025 23:04:39 +0100
    Subject: [PATCH 349/375] Fix handling of not requires_many_cores flag for mpi
     tests
    
    ---
     testsuite/do_tests.sh | 18 ++++++++++--------
     1 file changed, 10 insertions(+), 8 deletions(-)
    
    diff --git a/testsuite/do_tests.sh b/testsuite/do_tests.sh
    index b7546b502f..417288b58d 100755
    --- a/testsuite/do_tests.sh
    +++ b/testsuite/do_tests.sh
    @@ -210,8 +210,7 @@ if test "${PYTHON}"; then
         XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
         env
         set +e
    -    ${MPI_LAUNCHER_CMDLINE} 1 "${PYTHON}" -m pytest ${PYTEST_ARGS}) 2>&1 | tee -a "${TEST_LOGFILE}"
    - "${PYTHON}" -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
    +    "${PYTHON}" -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
               --ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
         set -e
     
    @@ -233,14 +232,17 @@ if test "${PYTHON}"; then
                     XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_mpi_${numproc}.xml"
                     PYTEST_ARGS="--verbose --timeout $TIME_LIMIT --junit-xml=${XUNIT_FILE} ${PYNEST_TEST_DIR}/mpi/${numproc}"
     
    -		if "${DO_TESTS_SKIP_TEST_REQUIRING_MANY_CORES:-false}"; then
    -		    PYTEST_ARGS="${PYTEST_ARGS} -m 'not requires_many_cores'"
    -		fi
     
     		set +e
    -		echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTHON}" -m pytest ${PYTEST_ARGS}"
    -                $(${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTEST}" ${PYTEST_ARGS}) 2>&1 | tee -a "${TEST_LOGFILE}"
    -
    +		# Some doubling up of code here because trying to add the -m 'not requires...' to PYTEST_ARGS
    +		# loses the essential quotes.
    +		if "${DO_TESTS_SKIP_TEST_REQUIRING_MANY_CORES:-false}"; then
    +		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTHON}" -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores'"
    +                    ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTEST}" ${PYTEST_ARGS} -m 'not requires_many_cores' 2>&1 | tee -a "${TEST_LOGFILE}"
    +		else
    +		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTHON}" -m pytest ${PYTEST_ARGS}"
    +                    ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTEST}" ${PYTEST_ARGS} 2>&1 | tee -a "${TEST_LOGFILE}"
    +		fi
     		set -e
                 done
             fi
    
    From 2043300bc4187023e965a6eb3d5ae2c1858a1540 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 6 Feb 2025 23:36:12 +0100
    Subject: [PATCH 350/375] Run pytests as python -m pytest again, run also
     serial tests via mpiexec if available
    
    ---
     testsuite/do_tests.sh | 21 ++++++++++++---------
     1 file changed, 12 insertions(+), 9 deletions(-)
    
    diff --git a/testsuite/do_tests.sh b/testsuite/do_tests.sh
    index 417288b58d..4c82ad076f 100755
    --- a/testsuite/do_tests.sh
    +++ b/testsuite/do_tests.sh
    @@ -92,8 +92,6 @@ if test ! "${PREFIX:-}"; then
         usage 2 "--prefix";
     fi
     
    -PYTEST="$( dirname $PYTHON )/pytest"
    -
     if test "${PYTHON}"; then
           TIME_LIMIT=120  # seconds, for each of the Python tests
           PYTEST_VERSION="$(${PYTHON} -m pytest --version --timeout ${TIME_LIMIT} --numprocesses=1 2>&1)" || {
    @@ -210,8 +208,14 @@ if test "${PYTHON}"; then
         XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
         env
         set +e
    -    "${PYTHON}" -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
    -          --ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    +    if test "${HAVE_MPI}" = "True"; then
    +	${MPI_LAUNCHER_CMDLINE} 1 ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    +				--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    +    else
    +	${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    +				--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    +    fi
    +
         set -e
     
         # Run tests in the sli2py_mpi subdirectory. The must be run without loading conftest.py.
    @@ -232,16 +236,15 @@ if test "${PYTHON}"; then
                     XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_mpi_${numproc}.xml"
                     PYTEST_ARGS="--verbose --timeout $TIME_LIMIT --junit-xml=${XUNIT_FILE} ${PYNEST_TEST_DIR}/mpi/${numproc}"
     
    -
     		set +e
     		# Some doubling up of code here because trying to add the -m 'not requires...' to PYTEST_ARGS
     		# loses the essential quotes.
     		if "${DO_TESTS_SKIP_TEST_REQUIRING_MANY_CORES:-false}"; then
    -		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTHON}" -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores'"
    -                    ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTEST}" ${PYTEST_ARGS} -m 'not requires_many_cores' 2>&1 | tee -a "${TEST_LOGFILE}"
    +		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores'"
    +                    ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores' 2>&1 | tee -a "${TEST_LOGFILE}"
     		else
    -		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTHON}" -m pytest ${PYTEST_ARGS}"
    -                    ${MPI_LAUNCHER_CMDLINE} ${numproc} "${PYTEST}" ${PYTEST_ARGS} 2>&1 | tee -a "${TEST_LOGFILE}"
    +		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS}"
    +                    ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} 2>&1 | tee -a "${TEST_LOGFILE}"
     		fi
     		set -e
                 done
    
    From ba75730a19b19cff5fb84c9c3b3eb72ed6c07c72 Mon Sep 17 00:00:00 2001
    From: "ubuntu:Ayssar:Home" <med.ayssar@gmail.com>
    Date: Mon, 10 Feb 2025 17:11:46 +0100
    Subject: [PATCH 351/375] Fix seg-fault issues when  initializing NEST
    
    ---
     pynest/nestkernel_api.pyx | 10 ++++++++--
     1 file changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index e212061de7..7d8ac21880 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -53,7 +53,12 @@ def init(args):
         global NESTErrors
         cdef int argc = len(args)
     
    -    cdef char** c_argv = <char**>malloc(sizeof(char*) * argc)
    +    cdef char** c_argv = <char**>malloc(sizeof(char*) * (argc+ 1 ))
    +    if c_argv is NULL:
    +        raise NESTErrors.PyNESTError("NESTKernel::init : couldn't allocate c_argv")
    +
    +    c_argv[argc] = NULL
    +
         try:
             for idx, s in enumerate([pystr_to_string(x) for x in args]):
                 c_argv[idx] = s
    @@ -326,7 +331,8 @@ def llapi_init_nest(argv):
     
     
         # Create c-style argv arguments from sys.argv
    -    cdef char** argv_chars = <char**> malloc((argc+1) * sizeof(char*))
    +    cdef int size = argc + 1
    +    cdef char** argv_chars = <char**> malloc((size) * sizeof(char*))
         if argv_chars is NULL:
             raise NotImplementedError
         try:
    
    From 96291c10f56226c22814076a8e7c92c4f749bebf Mon Sep 17 00:00:00 2001
    From: "ubuntu:Ayssar:Home" <med.ayssar@gmail.com>
    Date: Mon, 10 Feb 2025 17:19:01 +0100
    Subject: [PATCH 352/375] Run tests without MPI context
    
    ---
     testsuite/do_tests.sh | 243 +++++++++++++++++++++---------------------
     1 file changed, 122 insertions(+), 121 deletions(-)
    
    diff --git a/testsuite/do_tests.sh b/testsuite/do_tests.sh
    index 4c82ad076f..7bba5b4642 100755
    --- a/testsuite/do_tests.sh
    +++ b/testsuite/do_tests.sh
    @@ -39,17 +39,16 @@ set -euo pipefail
     # usage 2 <option>
     #   Use this variant in case of a missing required option <option>
     #
    -usage ()
    -{
    -    if test $1 = 1; then
    -        echo "Error: Unknown option '$2'"
    -    fi
    +usage() {
    +  if test $1 = 1; then
    +    echo "Error: Unknown option '$2'"
    +  fi
     
    -    if test $1 = 2; then
    -        echo "Error: Missing required option '$2'"
    -    fi
    +  if test $1 = 2; then
    +    echo "Error: Missing required option '$2'"
    +  fi
     
    -    cat <<EOF
    +  cat <<EOF
     Usage: $0 --prefix=<path> [options]
     
     Required arguments:
    @@ -61,50 +60,50 @@ Options:
         --help                 Print program options and exit
     EOF
     
    -    exit $1
    +  exit $1
     }
     
     PREFIX=""
     PYTHON=""
     MUSIC=""
    -while test $# -gt 0 ; do
    -    case "$1" in
    -        --help)
    -            usage 0
    -            ;;
    -        --prefix=*)
    -            PREFIX="$( echo "$1" | sed 's/^--prefix=//' )"
    -            ;;
    -        --with-python=*)
    -            PYTHON="$( echo "$1" | sed 's/^--with-python=//' )"
    -            ;;
    -        --with-music=*)
    -            MUSIC="$( echo "$1" | sed 's/^--with-music=//' )"
    -            ;;
    -        *)
    -            usage 1 "$1"
    -            ;;
    -    esac
    -    shift
    +while test $# -gt 0; do
    +  case "$1" in
    +  --help)
    +    usage 0
    +    ;;
    +  --prefix=*)
    +    PREFIX="$(echo "$1" | sed 's/^--prefix=//')"
    +    ;;
    +  --with-python=*)
    +    PYTHON="$(echo "$1" | sed 's/^--with-python=//')"
    +    ;;
    +  --with-music=*)
    +    MUSIC="$(echo "$1" | sed 's/^--with-music=//')"
    +    ;;
    +  *)
    +    usage 1 "$1"
    +    ;;
    +  esac
    +  shift
     done
     
     if test ! "${PREFIX:-}"; then
    -    usage 2 "--prefix";
    +  usage 2 "--prefix"
     fi
     
     if test "${PYTHON}"; then
    -      TIME_LIMIT=120  # seconds, for each of the Python tests
    -      PYTEST_VERSION="$(${PYTHON} -m pytest --version --timeout ${TIME_LIMIT} --numprocesses=1 2>&1)" || {
    -        echo "Error: PyNEST testing requested, but 'pytest' cannot be run."
    -        echo "       Testing also requires the 'pytest-xdist' and 'pytest-timeout' extensions."
    -        exit 1
    -    }
    -      PYTEST_VERSION="$(echo "${PYTEST_VERSION}" | cut -d' ' -f2)"
    +  TIME_LIMIT=120 # seconds, for each of the Python tests
    +  PYTEST_VERSION="$(${PYTHON} -m pytest --version --timeout ${TIME_LIMIT} --numprocesses=1 2>&1)" || {
    +    echo "Error: PyNEST testing requested, but 'pytest' cannot be run."
    +    echo "       Testing also requires the 'pytest-xdist' and 'pytest-timeout' extensions."
    +    exit 1
    +  }
    +  PYTEST_VERSION="$(echo "${PYTEST_VERSION}" | cut -d' ' -f2)"
     fi
     
     if ! ${PYTHON} -c "import junitparser" >/dev/null 2>&1; then
    -    echo "Error: Required Python package 'junitparser' not found."
    -    exit 1
    +  echo "Error: Required Python package 'junitparser' not found."
    +  exit 1
     fi
     
     # source helpers to set environment variables and make functions available
    @@ -125,8 +124,7 @@ TEST_OUTFILE="${REPORTDIR}/output.log"
     TEST_RETFILE="${REPORTDIR}/output.ret"
     TEST_RUNFILE="${REPORTDIR}/runtest.sh"
     
    -get_build_info ()
    -{
    +get_build_info() {
       ${PYTHON} -c "import nest; print(nest.build_info['$1'])" --quiet
     }
     
    @@ -134,29 +132,29 @@ HAVE_MPI="$(get_build_info have_mpi)"
     HAVE_OPENMP="$(get_build_info have_threads)"
     
     if test "${HAVE_MPI}" = "True"; then
    -    MPI_LAUNCHER="$(get_build_info mpiexec)"
    -    MPI_LAUNCHER_VERSION="$($MPI_LAUNCHER --version | head -n1)"
    -    MPI_LAUNCHER_PREFLAGS="$(get_build_info mpiexec_preflags)"
    -    # OpenMPI requires --oversubscribe to allow more processes than available cores
    -    if [[ "${MPI_LAUNCHER_VERSION}" =~ "(OpenRTE)" ]] ||  [[ "${MPI_LAUNCHER_VERSION}" =~ "(Open MPI)" ]]; then
    -	if [[ ! "$(get_build_info mpiexec_preflags)" =~ "--oversubscribe" ]]; then
    -	    MPI_LAUNCHER_PREFLAGS="${MPI_LAUNCHER_PREFLAGS} --oversubscribe"
    -	fi
    +  MPI_LAUNCHER="$(get_build_info mpiexec)"
    +  MPI_LAUNCHER_VERSION="$($MPI_LAUNCHER --version | head -n1)"
    +  MPI_LAUNCHER_PREFLAGS="$(get_build_info mpiexec_preflags)"
    +  # OpenMPI requires --oversubscribe to allow more processes than available cores
    +  if [[ "${MPI_LAUNCHER_VERSION}" =~ "(OpenRTE)" ]] || [[ "${MPI_LAUNCHER_VERSION}" =~ "(Open MPI)" ]]; then
    +    if [[ ! "$(get_build_info mpiexec_preflags)" =~ "--oversubscribe" ]]; then
    +      MPI_LAUNCHER_PREFLAGS="${MPI_LAUNCHER_PREFLAGS} --oversubscribe"
         fi
    -    MPI_LAUNCHER_NUMPROC_FLAG="$(get_build_info mpiexec_numproc_flag)"
    -    MPI_LAUNCHER_CMDLINE="${MPI_LAUNCHER} ${MPI_LAUNCHER_PREFLAGS} ${MPI_LAUNCHER_NUMPROC_FLAG}"
    +  fi
    +  MPI_LAUNCHER_NUMPROC_FLAG="$(get_build_info mpiexec_numproc_flag)"
    +  MPI_LAUNCHER_CMDLINE="${MPI_LAUNCHER} ${MPI_LAUNCHER_PREFLAGS} ${MPI_LAUNCHER_NUMPROC_FLAG}"
     fi
     
     # Under Mac OS X, suppress crash reporter dialogs. Restore old state at end.
     if test "x${INFO_OS}" = "xDarwin"; then
    -    TEST_CRSTATE="$( defaults read com.apple.CrashReporter DialogType )" || true
    -    echo "TEST_CRSTATE=$TEST_CRSTATE"
    -    defaults write com.apple.CrashReporter DialogType server || echo "WARNING: Could not set CrashReporter DialogType!"
    +  TEST_CRSTATE="$(defaults read com.apple.CrashReporter DialogType)" || true
    +  echo "TEST_CRSTATE=$TEST_CRSTATE"
    +  defaults write com.apple.CrashReporter DialogType server || echo "WARNING: Could not set CrashReporter DialogType!"
     fi
     
    -print_paths () {
    -    indent="`printf '%23s'`"
    -    echo "$1" | sed "s/:/\n$indent/g" | sed '/^\s*$/d'
    +print_paths() {
    +  indent="$(printf '%23s')"
    +  echo "$1" | sed "s/:/\n$indent/g" | sed '/^\s*$/d'
     }
     
     echo "================================================================================"
    @@ -168,92 +166,95 @@ echo
     echo "  NEST version ....... $(get_build_info version)"
     echo "  PREFIX ............. $PREFIX"
     if test -n "${MUSIC}"; then
    -    MUSIC_VERSION="$("${MUSIC}" --version | head -n1 | cut -d' ' -f2)"
    -    echo "  MUSIC executable ... $MUSIC (version $MUSIC_VERSION)"
    +  MUSIC_VERSION="$("${MUSIC}" --version | head -n1 | cut -d' ' -f2)"
    +  echo "  MUSIC executable ... $MUSIC (version $MUSIC_VERSION)"
     fi
     if test -n "${PYTHON}"; then
    -    PYTHON_VERSION="$("${PYTHON}" --version | cut -d' ' -f2)"
    -    echo "  Python executable .. $PYTHON (version $PYTHON_VERSION)"
    -    echo "  PYTHONPATH ......... `print_paths ${PYTHONPATH:-}`"
    -    echo "  Pytest version ..... $PYTEST_VERSION"
    -    echo "         timeout ..... $TIME_LIMIT s"
    +  PYTHON_VERSION="$("${PYTHON}" --version | cut -d' ' -f2)"
    +  echo "  Python executable .. $PYTHON (version $PYTHON_VERSION)"
    +  echo "  PYTHONPATH ......... $(print_paths ${PYTHONPATH:-})"
    +  echo "  Pytest version ..... $PYTEST_VERSION"
    +  echo "         timeout ..... $TIME_LIMIT s"
     fi
     if test "${HAVE_MPI}" = "True"; then
    -    echo "  Running MPI tests .. yes"
    -    echo "         launcher .... $MPI_LAUNCHER"
    -    echo "         version ..... $MPI_LAUNCHER_VERSION"
    +  echo "  Running MPI tests .. yes"
    +  echo "         launcher .... $MPI_LAUNCHER"
    +  echo "         version ..... $MPI_LAUNCHER_VERSION"
     else
    -    echo "  Running MPI tests .. no (compiled without MPI support)"
    +  echo "  Running MPI tests .. no (compiled without MPI support)"
     fi
     echo "  TEST_BASEDIR ....... $TEST_BASEDIR"
     echo "  REPORTDIR .......... $REPORTDIR"
    -echo "  PATH ............... `print_paths ${PATH}`"
    +echo "  PATH ............... $(print_paths ${PATH})"
     echo
     echo "================================================================================"
     
     HEADLINE="NEST $(get_build_info version) testsuite log"
    -echo >  "${TEST_LOGFILE}" "$HEADLINE"
    -echo >> "${TEST_LOGFILE}" "$(printf '%0.s=' $(seq 1 ${#HEADLINE}))"
    -echo >> "${TEST_LOGFILE}" "Running tests from ${TEST_BASEDIR}"
    +echo >"${TEST_LOGFILE}" "$HEADLINE"
    +echo >>"${TEST_LOGFILE}" "$(printf '%0.s=' $(seq 1 ${#HEADLINE}))"
    +echo >>"${TEST_LOGFILE}" "Running tests from ${TEST_BASEDIR}"
     
     echo
     echo "Phase 7: Running PyNEST tests"
     echo "-----------------------------"
     
     if test "${PYTHON}"; then
    -    PYNEST_TEST_DIR="${TEST_BASEDIR}/pytests"
    -    XUNIT_NAME="07_pynesttests"
    +  PYNEST_TEST_DIR="${TEST_BASEDIR}/pytests"
    +  XUNIT_NAME="07_pynesttests"
     
    -    # Run all tests except those in the mpi* and sli2py_mpi subdirectories because they cannot be run concurrently
    -    XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
    +  # Run all tests except those in the mpi* and sli2py_mpi subdirectories because they cannot be run concurrently
    +  XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
    +  env
    +  set +e
    +  # if test "${HAVE_MPI}" = "True"; then
    +  #   ${MPI_LAUNCHER_CMDLINE} 1 ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    +  #     --ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    +  # else
    +  ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    +    --ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    +  # fi
    +
    +  set -e
    +
    +  # Run tests in the sli2py_mpi subdirectory. The must be run without loading conftest.py.
    +  if test "${HAVE_MPI}" = "True" && test "${HAVE_OPENMP}" = "true"; then
    +    XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_sli2py_mpi.xml"
         env
         set +e
    -    if test "${HAVE_MPI}" = "True"; then
    -	${MPI_LAUNCHER_CMDLINE} 1 ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    -				--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    -    else
    -	${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    -				--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    -    fi
    -
    +    "${PYTHON}" -m pytest --noconftest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
    +      "${PYNEST_TEST_DIR}/sli2py_mpi" 2>&1 | tee -a "${TEST_LOGFILE}"
         set -e
    -
    -    # Run tests in the sli2py_mpi subdirectory. The must be run without loading conftest.py.
    -    if test "${HAVE_MPI}" = "True" && test "${HAVE_OPENMP}" = "true" ; then
    -	XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_sli2py_mpi.xml"
    -	env
    -	set +e
    -	"${PYTHON}" -m pytest --noconftest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
    -		    "${PYNEST_TEST_DIR}/sli2py_mpi" 2>&1 | tee -a "${TEST_LOGFILE}"
    -	set -e
    -    fi
    -
    -    # Run tests in the mpi/* subdirectories, with one subdirectory per number of processes to use
    -    if test "${HAVE_MPI}" = "True"; then
    -        if test "${MPI_LAUNCHER}"; then
    -	    # Loop over subdirectories whose names are the number of mpi procs to use
    -            for numproc in $(cd ${PYNEST_TEST_DIR}/mpi/; ls -d */ | tr -d '/'); do
    -                XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_mpi_${numproc}.xml"
    -                PYTEST_ARGS="--verbose --timeout $TIME_LIMIT --junit-xml=${XUNIT_FILE} ${PYNEST_TEST_DIR}/mpi/${numproc}"
    -
    -		set +e
    -		# Some doubling up of code here because trying to add the -m 'not requires...' to PYTEST_ARGS
    -		# loses the essential quotes.
    -		if "${DO_TESTS_SKIP_TEST_REQUIRING_MANY_CORES:-false}"; then
    -		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores'"
    -                    ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores' 2>&1 | tee -a "${TEST_LOGFILE}"
    -		else
    -		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS}"
    -                    ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} 2>&1 | tee -a "${TEST_LOGFILE}"
    -		fi
    -		set -e
    -            done
    +  fi
    +
    +  # Run tests in the mpi/* subdirectories, with one subdirectory per number of processes to use
    +  if test "${HAVE_MPI}" = "True"; then
    +    if test "${MPI_LAUNCHER}"; then
    +      # Loop over subdirectories whose names are the number of mpi procs to use
    +      for numproc in $(
    +        cd ${PYNEST_TEST_DIR}/mpi/
    +        ls -d */ | tr -d '/'
    +      ); do
    +        XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_mpi_${numproc}.xml"
    +        PYTEST_ARGS="--verbose --timeout $TIME_LIMIT --junit-xml=${XUNIT_FILE} ${PYNEST_TEST_DIR}/mpi/${numproc}"
    +
    +        set +e
    +        # Some doubling up of code here because trying to add the -m 'not requires...' to PYTEST_ARGS
    +        # loses the essential quotes.
    +        if "${DO_TESTS_SKIP_TEST_REQUIRING_MANY_CORES:-false}"; then
    +          echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores'"
    +          ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores' 2>&1 | tee -a "${TEST_LOGFILE}"
    +        else
    +          echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS}"
    +          ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} 2>&1 | tee -a "${TEST_LOGFILE}"
             fi
    +        set -e
    +      done
         fi
    +  fi
     else
    -    echo
    -    echo "  Not running PyNEST tests because NEST was compiled without Python support."
    -    echo
    +  echo
    +  echo "  Not running PyNEST tests because NEST was compiled without Python support."
    +  echo
     fi
     
     echo
    @@ -262,7 +263,7 @@ echo "-----------------------------------------"
     
     if command -v run_all_cpptests >/dev/null 2>&1; then
       set +e
    -  CPP_TEST_OUTPUT=$( run_all_cpptests --logger=JUNIT,error,"${REPORTDIR}/08_cpptests.xml":HRF,error,stdout 2>&1 )
    +  CPP_TEST_OUTPUT=$(run_all_cpptests --logger=JUNIT,error,"${REPORTDIR}/08_cpptests.xml":HRF,error,stdout 2>&1)
       set -e
       echo "${CPP_TEST_OUTPUT}" | tail -2
     else
    @@ -278,8 +279,8 @@ python3 "$(dirname $0)/summarize_tests.py" "${REPORTDIR}"
     TESTSUITE_RESULT=$?
     
     # Mac OS X: Restore old crash reporter state
    -if test "x${INFO_OS}" = xDarwin ; then
    -    defaults write com.apple.CrashReporter DialogType "${TEST_CRSTATE}" || echo "WARNING: Could not reset CrashReporter DialogType to '${TEST_CRSTATE}'!"
    +if test "x${INFO_OS}" = xDarwin; then
    +  defaults write com.apple.CrashReporter DialogType "${TEST_CRSTATE}" || echo "WARNING: Could not reset CrashReporter DialogType to '${TEST_CRSTATE}'!"
     fi
     
     exit $TESTSUITE_RESULT
    
    From 73a762b9ee70458af437b6235a9a64ba2878a179 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 11 Feb 2025 11:16:22 +0100
    Subject: [PATCH 353/375] Provide memory_size as kernel attribute
    
    ---
     nestkernel/kernel_manager.cpp     | 89 +++++++++++++++++++++++++++++++
     nestkernel/kernel_manager.h       |  7 ++-
     pynest/nest/__init__.py           |  3 +-
     testsuite/pytests/test_memsize.py | 51 ++++++++++++++++++
     4 files changed, 148 insertions(+), 2 deletions(-)
     create mode 100644 testsuite/pytests/test_memsize.py
    
    diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp
    index 697be1b3b3..ea9d7f584a 100644
    --- a/nestkernel/kernel_manager.cpp
    +++ b/nestkernel/kernel_manager.cpp
    @@ -301,6 +301,19 @@ nest::KernelManager::get_status( dictionary& dict )
       }
     
       dict[ "build_info" ] = get_build_info_();
    +  if ( NEST_HOSTOS == std::string( "linux" ) )
    +  {
    +    dict[ "memory_size" ] = get_memsize_linux_();
    +  }
    +  else if ( NEST_HOSTOS == std::string( "darwin" ) )
    +  {
    +    dict[ "memory_size" ] = get_memsize_darwin_();
    +  }
    +  else
    +  {
    +    // Not available for this OS.
    +    dict[ "memory_size" ] = -1;
    +  }
     }
     
     void
    @@ -312,3 +325,79 @@ nest::KernelManager::write_to_dump( const std::string& msg )
         dump_ << msg << std::endl << std::flush;
       }
     }
    +
    +#ifdef __linux__
    +
    +#include <ifstream>
    +size_t
    +nest::KernelManager::get_memsize_linux_() const
    +{
    +  // code based on mistral.ai
    +  std::ifstream file( "/proc/self/status" );
    +  if ( not file.is_open() )
    +  {
    +    throw std::runtime_error( "Could not open /proc/self/status" );
    +  }
    +
    +  std::string line;
    +  while ( std::getline( file, line ) )
    +  {
    +    if ( line.rfind( "VmSize:", 0 ) == 0 )
    +    {
    +      std::istringstream stream( line );
    +      std::string key;
    +      size_t value;
    +      std::string unit;
    +      stream >> key >> value >> unit;
    +      file.close();
    +      if ( unit != "kB" )
    +      {
    +        throw std::runtime_error( "VmSize not reported in kB" );
    +      }
    +      return value;
    +    }
    +  }
    +
    +  file.close();
    +  throw std::runtime_error( "VmSize not found in /proc/self/status" );
    +}
    +
    +#else
    +
    +size_t
    +nest::KernelManager::get_memsize_linux_() const
    +{
    +  assert( false || "Only implemented on Linux systems." );
    +  return 0;
    +}
    +
    +#endif
    +
    +
    +#if defined __APPLE__
    +
    +#include <mach/mach.h>
    +size_t
    +nest::KernelManager::get_memsize_darwin_() const
    +{
    +  struct task_basic_info t_info;
    +  mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT;
    +
    +  kern_return_t result = task_info( mach_task_self(), TASK_BASIC_INFO, ( task_info_t ) &t_info, &t_info_count );
    +  assert( result == KERN_SUCCESS || "Problem occurred during getting of task_info." );
    +
    +  // For macOS, vmsize is not informative, it is an extremly large address range, usually O(2^40).
    +  // resident_size gives the most reasonable information. Information is in bytes, thus divide.
    +  return t_info.resident_size / 1024;
    +}
    +
    +#else
    +
    +size_t
    +nest::KernelManager::get_memsize_darwin_() const
    +{
    +  assert( false || "Only implemented on macOS." );
    +  return 0;
    +}
    +
    +#endif
    diff --git a/nestkernel/kernel_manager.h b/nestkernel/kernel_manager.h
    index ac21c84df1..206c7bf43c 100644
    --- a/nestkernel/kernel_manager.h
    +++ b/nestkernel/kernel_manager.h
    @@ -169,7 +169,8 @@
     
      Miscellaneous
      dict_miss_is_error                    booltype    - Whether missed dictionary entries are treated as errors.
    -
    + build_info                   dicttype - Various information about the NEST build
    + memory_size         integertype - Memory occupied by NEST process in kB (-1 if not available for OS)
      SeeAlso: Simulate, Node
     */
     
    @@ -286,7 +287,11 @@ class KernelManager
       MUSICManager music_manager;
       NodeManager node_manager;
       /**@}*/
    +
     private:
    +  size_t get_memsize_linux_() const;  //!< return VmSize in kB
    +  size_t get_memsize_darwin_() const; //!< return resident_size in kB
    +
       //! All managers, order determines initialization and finalization order (latter backwards)
       std::vector< ManagerInterface* > managers;
     
    diff --git a/pynest/nest/__init__.py b/pynest/nest/__init__.py
    index ad59946014..9bff704088 100644
    --- a/pynest/nest/__init__.py
    +++ b/pynest/nest/__init__.py
    @@ -146,7 +146,8 @@ def __dir__(self):
         kernel_status = KernelAttribute("dict", "Get the complete kernel status", readonly=True)
         resolution = KernelAttribute("float", "The resolution of the simulation (in ms)", default=0.1)
         biological_time = KernelAttribute("float", "The current simulation time (in ms)")
    -    build_info = KernelAttribute("dict", "Information about the build and compile configuration of NEST")
    +    build_info = KernelAttribute("dict", "Information about the build and compile configuration of NEST", readonly=True)
    +    memory_size = KernelAttribute("int", "Memory size of NEST process in kB (-1 if unavailable)", readonly=True)
         to_do = KernelAttribute("int", "The number of steps yet to be simulated", readonly=True)
         max_delay = KernelAttribute("float", "The maximum delay in the network", default=0.1)
         min_delay = KernelAttribute("float", "The minimum delay in the network", default=0.1)
    diff --git a/testsuite/pytests/test_memsize.py b/testsuite/pytests/test_memsize.py
    new file mode 100644
    index 0000000000..45f87b5563
    --- /dev/null
    +++ b/testsuite/pytests/test_memsize.py
    @@ -0,0 +1,51 @@
    +# -*- coding: utf-8 -*-
    +#
    +# test_memsize.py
    +#
    +# This file is part of NEST.
    +#
    +# Copyright (C) 2004 The NEST Initiative
    +#
    +# NEST is free software: you can redistribute it and/or modify
    +# it under the terms of the GNU General Public License as published by
    +# the Free Software Foundation, either version 2 of the License, or
    +# (at your option) any later version.
    +#
    +# NEST is distributed in the hope that it will be useful,
    +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    +# GNU General Public License for more details.
    +#
    +# You should have received a copy of the GNU General Public License
    +# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    +
    +"""
    +Test models with calcium concentration.
    +
    +This set of tests verify the behavior of the calcium concentration in models
    +that inherit from the strutural plasticity node class in the kernel.
    +"""
    +
    +import nest
    +import pytest
    +
    +
    +@pytest.fixture(autouse=True)
    +def reset_kernel():
    +    nest.ResetKernel()
    +
    +
    +def test_memsize():
    +    """
    +    Verify that memsize is available and works somewhat reasonable.
    +    """
    +
    +    m_pre = nest.memory_size
    +
    +    n = nest.Create("parrot_neuron", 1000)
    +    nest.Connect(n, n)
    +
    +    m_post = nest.memory_size
    +
    +    assert m_pre > 0
    +    assert m_post > m_pre
    
    From da009688eecf2aa4524e730a08f1bc84335a510d Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 11 Feb 2025 11:38:21 +0100
    Subject: [PATCH 354/375] Fix C++ includes
    
    ---
     nestkernel/kernel_manager.cpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/nestkernel/kernel_manager.cpp b/nestkernel/kernel_manager.cpp
    index ea9d7f584a..1653670116 100644
    --- a/nestkernel/kernel_manager.cpp
    +++ b/nestkernel/kernel_manager.cpp
    @@ -328,7 +328,8 @@ nest::KernelManager::write_to_dump( const std::string& msg )
     
     #ifdef __linux__
     
    -#include <ifstream>
    +#include <fstream>
    +#include <sstream>
     size_t
     nest::KernelManager::get_memsize_linux_() const
     {
    
    From 902c18b24bbdf722511bf50b8aef0a62e85121ce Mon Sep 17 00:00:00 2001
    From: med-ayssar <med.ayssar@gmail.com>
    Date: Tue, 11 Feb 2025 11:48:46 +0100
    Subject: [PATCH 355/375] Revert changes from do_tests
    
    ---
     testsuite/do_tests.sh | 243 +++++++++++++++++++++---------------------
     1 file changed, 121 insertions(+), 122 deletions(-)
    
    diff --git a/testsuite/do_tests.sh b/testsuite/do_tests.sh
    index 7bba5b4642..4c82ad076f 100755
    --- a/testsuite/do_tests.sh
    +++ b/testsuite/do_tests.sh
    @@ -39,16 +39,17 @@ set -euo pipefail
     # usage 2 <option>
     #   Use this variant in case of a missing required option <option>
     #
    -usage() {
    -  if test $1 = 1; then
    -    echo "Error: Unknown option '$2'"
    -  fi
    +usage ()
    +{
    +    if test $1 = 1; then
    +        echo "Error: Unknown option '$2'"
    +    fi
     
    -  if test $1 = 2; then
    -    echo "Error: Missing required option '$2'"
    -  fi
    +    if test $1 = 2; then
    +        echo "Error: Missing required option '$2'"
    +    fi
     
    -  cat <<EOF
    +    cat <<EOF
     Usage: $0 --prefix=<path> [options]
     
     Required arguments:
    @@ -60,50 +61,50 @@ Options:
         --help                 Print program options and exit
     EOF
     
    -  exit $1
    +    exit $1
     }
     
     PREFIX=""
     PYTHON=""
     MUSIC=""
    -while test $# -gt 0; do
    -  case "$1" in
    -  --help)
    -    usage 0
    -    ;;
    -  --prefix=*)
    -    PREFIX="$(echo "$1" | sed 's/^--prefix=//')"
    -    ;;
    -  --with-python=*)
    -    PYTHON="$(echo "$1" | sed 's/^--with-python=//')"
    -    ;;
    -  --with-music=*)
    -    MUSIC="$(echo "$1" | sed 's/^--with-music=//')"
    -    ;;
    -  *)
    -    usage 1 "$1"
    -    ;;
    -  esac
    -  shift
    +while test $# -gt 0 ; do
    +    case "$1" in
    +        --help)
    +            usage 0
    +            ;;
    +        --prefix=*)
    +            PREFIX="$( echo "$1" | sed 's/^--prefix=//' )"
    +            ;;
    +        --with-python=*)
    +            PYTHON="$( echo "$1" | sed 's/^--with-python=//' )"
    +            ;;
    +        --with-music=*)
    +            MUSIC="$( echo "$1" | sed 's/^--with-music=//' )"
    +            ;;
    +        *)
    +            usage 1 "$1"
    +            ;;
    +    esac
    +    shift
     done
     
     if test ! "${PREFIX:-}"; then
    -  usage 2 "--prefix"
    +    usage 2 "--prefix";
     fi
     
     if test "${PYTHON}"; then
    -  TIME_LIMIT=120 # seconds, for each of the Python tests
    -  PYTEST_VERSION="$(${PYTHON} -m pytest --version --timeout ${TIME_LIMIT} --numprocesses=1 2>&1)" || {
    -    echo "Error: PyNEST testing requested, but 'pytest' cannot be run."
    -    echo "       Testing also requires the 'pytest-xdist' and 'pytest-timeout' extensions."
    -    exit 1
    -  }
    -  PYTEST_VERSION="$(echo "${PYTEST_VERSION}" | cut -d' ' -f2)"
    +      TIME_LIMIT=120  # seconds, for each of the Python tests
    +      PYTEST_VERSION="$(${PYTHON} -m pytest --version --timeout ${TIME_LIMIT} --numprocesses=1 2>&1)" || {
    +        echo "Error: PyNEST testing requested, but 'pytest' cannot be run."
    +        echo "       Testing also requires the 'pytest-xdist' and 'pytest-timeout' extensions."
    +        exit 1
    +    }
    +      PYTEST_VERSION="$(echo "${PYTEST_VERSION}" | cut -d' ' -f2)"
     fi
     
     if ! ${PYTHON} -c "import junitparser" >/dev/null 2>&1; then
    -  echo "Error: Required Python package 'junitparser' not found."
    -  exit 1
    +    echo "Error: Required Python package 'junitparser' not found."
    +    exit 1
     fi
     
     # source helpers to set environment variables and make functions available
    @@ -124,7 +125,8 @@ TEST_OUTFILE="${REPORTDIR}/output.log"
     TEST_RETFILE="${REPORTDIR}/output.ret"
     TEST_RUNFILE="${REPORTDIR}/runtest.sh"
     
    -get_build_info() {
    +get_build_info ()
    +{
       ${PYTHON} -c "import nest; print(nest.build_info['$1'])" --quiet
     }
     
    @@ -132,29 +134,29 @@ HAVE_MPI="$(get_build_info have_mpi)"
     HAVE_OPENMP="$(get_build_info have_threads)"
     
     if test "${HAVE_MPI}" = "True"; then
    -  MPI_LAUNCHER="$(get_build_info mpiexec)"
    -  MPI_LAUNCHER_VERSION="$($MPI_LAUNCHER --version | head -n1)"
    -  MPI_LAUNCHER_PREFLAGS="$(get_build_info mpiexec_preflags)"
    -  # OpenMPI requires --oversubscribe to allow more processes than available cores
    -  if [[ "${MPI_LAUNCHER_VERSION}" =~ "(OpenRTE)" ]] || [[ "${MPI_LAUNCHER_VERSION}" =~ "(Open MPI)" ]]; then
    -    if [[ ! "$(get_build_info mpiexec_preflags)" =~ "--oversubscribe" ]]; then
    -      MPI_LAUNCHER_PREFLAGS="${MPI_LAUNCHER_PREFLAGS} --oversubscribe"
    +    MPI_LAUNCHER="$(get_build_info mpiexec)"
    +    MPI_LAUNCHER_VERSION="$($MPI_LAUNCHER --version | head -n1)"
    +    MPI_LAUNCHER_PREFLAGS="$(get_build_info mpiexec_preflags)"
    +    # OpenMPI requires --oversubscribe to allow more processes than available cores
    +    if [[ "${MPI_LAUNCHER_VERSION}" =~ "(OpenRTE)" ]] ||  [[ "${MPI_LAUNCHER_VERSION}" =~ "(Open MPI)" ]]; then
    +	if [[ ! "$(get_build_info mpiexec_preflags)" =~ "--oversubscribe" ]]; then
    +	    MPI_LAUNCHER_PREFLAGS="${MPI_LAUNCHER_PREFLAGS} --oversubscribe"
    +	fi
         fi
    -  fi
    -  MPI_LAUNCHER_NUMPROC_FLAG="$(get_build_info mpiexec_numproc_flag)"
    -  MPI_LAUNCHER_CMDLINE="${MPI_LAUNCHER} ${MPI_LAUNCHER_PREFLAGS} ${MPI_LAUNCHER_NUMPROC_FLAG}"
    +    MPI_LAUNCHER_NUMPROC_FLAG="$(get_build_info mpiexec_numproc_flag)"
    +    MPI_LAUNCHER_CMDLINE="${MPI_LAUNCHER} ${MPI_LAUNCHER_PREFLAGS} ${MPI_LAUNCHER_NUMPROC_FLAG}"
     fi
     
     # Under Mac OS X, suppress crash reporter dialogs. Restore old state at end.
     if test "x${INFO_OS}" = "xDarwin"; then
    -  TEST_CRSTATE="$(defaults read com.apple.CrashReporter DialogType)" || true
    -  echo "TEST_CRSTATE=$TEST_CRSTATE"
    -  defaults write com.apple.CrashReporter DialogType server || echo "WARNING: Could not set CrashReporter DialogType!"
    +    TEST_CRSTATE="$( defaults read com.apple.CrashReporter DialogType )" || true
    +    echo "TEST_CRSTATE=$TEST_CRSTATE"
    +    defaults write com.apple.CrashReporter DialogType server || echo "WARNING: Could not set CrashReporter DialogType!"
     fi
     
    -print_paths() {
    -  indent="$(printf '%23s')"
    -  echo "$1" | sed "s/:/\n$indent/g" | sed '/^\s*$/d'
    +print_paths () {
    +    indent="`printf '%23s'`"
    +    echo "$1" | sed "s/:/\n$indent/g" | sed '/^\s*$/d'
     }
     
     echo "================================================================================"
    @@ -166,95 +168,92 @@ echo
     echo "  NEST version ....... $(get_build_info version)"
     echo "  PREFIX ............. $PREFIX"
     if test -n "${MUSIC}"; then
    -  MUSIC_VERSION="$("${MUSIC}" --version | head -n1 | cut -d' ' -f2)"
    -  echo "  MUSIC executable ... $MUSIC (version $MUSIC_VERSION)"
    +    MUSIC_VERSION="$("${MUSIC}" --version | head -n1 | cut -d' ' -f2)"
    +    echo "  MUSIC executable ... $MUSIC (version $MUSIC_VERSION)"
     fi
     if test -n "${PYTHON}"; then
    -  PYTHON_VERSION="$("${PYTHON}" --version | cut -d' ' -f2)"
    -  echo "  Python executable .. $PYTHON (version $PYTHON_VERSION)"
    -  echo "  PYTHONPATH ......... $(print_paths ${PYTHONPATH:-})"
    -  echo "  Pytest version ..... $PYTEST_VERSION"
    -  echo "         timeout ..... $TIME_LIMIT s"
    +    PYTHON_VERSION="$("${PYTHON}" --version | cut -d' ' -f2)"
    +    echo "  Python executable .. $PYTHON (version $PYTHON_VERSION)"
    +    echo "  PYTHONPATH ......... `print_paths ${PYTHONPATH:-}`"
    +    echo "  Pytest version ..... $PYTEST_VERSION"
    +    echo "         timeout ..... $TIME_LIMIT s"
     fi
     if test "${HAVE_MPI}" = "True"; then
    -  echo "  Running MPI tests .. yes"
    -  echo "         launcher .... $MPI_LAUNCHER"
    -  echo "         version ..... $MPI_LAUNCHER_VERSION"
    +    echo "  Running MPI tests .. yes"
    +    echo "         launcher .... $MPI_LAUNCHER"
    +    echo "         version ..... $MPI_LAUNCHER_VERSION"
     else
    -  echo "  Running MPI tests .. no (compiled without MPI support)"
    +    echo "  Running MPI tests .. no (compiled without MPI support)"
     fi
     echo "  TEST_BASEDIR ....... $TEST_BASEDIR"
     echo "  REPORTDIR .......... $REPORTDIR"
    -echo "  PATH ............... $(print_paths ${PATH})"
    +echo "  PATH ............... `print_paths ${PATH}`"
     echo
     echo "================================================================================"
     
     HEADLINE="NEST $(get_build_info version) testsuite log"
    -echo >"${TEST_LOGFILE}" "$HEADLINE"
    -echo >>"${TEST_LOGFILE}" "$(printf '%0.s=' $(seq 1 ${#HEADLINE}))"
    -echo >>"${TEST_LOGFILE}" "Running tests from ${TEST_BASEDIR}"
    +echo >  "${TEST_LOGFILE}" "$HEADLINE"
    +echo >> "${TEST_LOGFILE}" "$(printf '%0.s=' $(seq 1 ${#HEADLINE}))"
    +echo >> "${TEST_LOGFILE}" "Running tests from ${TEST_BASEDIR}"
     
     echo
     echo "Phase 7: Running PyNEST tests"
     echo "-----------------------------"
     
     if test "${PYTHON}"; then
    -  PYNEST_TEST_DIR="${TEST_BASEDIR}/pytests"
    -  XUNIT_NAME="07_pynesttests"
    +    PYNEST_TEST_DIR="${TEST_BASEDIR}/pytests"
    +    XUNIT_NAME="07_pynesttests"
     
    -  # Run all tests except those in the mpi* and sli2py_mpi subdirectories because they cannot be run concurrently
    -  XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
    -  env
    -  set +e
    -  # if test "${HAVE_MPI}" = "True"; then
    -  #   ${MPI_LAUNCHER_CMDLINE} 1 ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    -  #     --ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    -  # else
    -  ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    -    --ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    -  # fi
    -
    -  set -e
    -
    -  # Run tests in the sli2py_mpi subdirectory. The must be run without loading conftest.py.
    -  if test "${HAVE_MPI}" = "True" && test "${HAVE_OPENMP}" = "true"; then
    -    XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_sli2py_mpi.xml"
    +    # Run all tests except those in the mpi* and sli2py_mpi subdirectories because they cannot be run concurrently
    +    XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
         env
         set +e
    -    "${PYTHON}" -m pytest --noconftest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
    -      "${PYNEST_TEST_DIR}/sli2py_mpi" 2>&1 | tee -a "${TEST_LOGFILE}"
    +    if test "${HAVE_MPI}" = "True"; then
    +	${MPI_LAUNCHER_CMDLINE} 1 ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    +				--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    +    else
    +	${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    +				--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    +    fi
    +
         set -e
    -  fi
    -
    -  # Run tests in the mpi/* subdirectories, with one subdirectory per number of processes to use
    -  if test "${HAVE_MPI}" = "True"; then
    -    if test "${MPI_LAUNCHER}"; then
    -      # Loop over subdirectories whose names are the number of mpi procs to use
    -      for numproc in $(
    -        cd ${PYNEST_TEST_DIR}/mpi/
    -        ls -d */ | tr -d '/'
    -      ); do
    -        XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_mpi_${numproc}.xml"
    -        PYTEST_ARGS="--verbose --timeout $TIME_LIMIT --junit-xml=${XUNIT_FILE} ${PYNEST_TEST_DIR}/mpi/${numproc}"
    -
    -        set +e
    -        # Some doubling up of code here because trying to add the -m 'not requires...' to PYTEST_ARGS
    -        # loses the essential quotes.
    -        if "${DO_TESTS_SKIP_TEST_REQUIRING_MANY_CORES:-false}"; then
    -          echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores'"
    -          ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores' 2>&1 | tee -a "${TEST_LOGFILE}"
    -        else
    -          echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS}"
    -          ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} 2>&1 | tee -a "${TEST_LOGFILE}"
    +
    +    # Run tests in the sli2py_mpi subdirectory. The must be run without loading conftest.py.
    +    if test "${HAVE_MPI}" = "True" && test "${HAVE_OPENMP}" = "true" ; then
    +	XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_sli2py_mpi.xml"
    +	env
    +	set +e
    +	"${PYTHON}" -m pytest --noconftest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
    +		    "${PYNEST_TEST_DIR}/sli2py_mpi" 2>&1 | tee -a "${TEST_LOGFILE}"
    +	set -e
    +    fi
    +
    +    # Run tests in the mpi/* subdirectories, with one subdirectory per number of processes to use
    +    if test "${HAVE_MPI}" = "True"; then
    +        if test "${MPI_LAUNCHER}"; then
    +	    # Loop over subdirectories whose names are the number of mpi procs to use
    +            for numproc in $(cd ${PYNEST_TEST_DIR}/mpi/; ls -d */ | tr -d '/'); do
    +                XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_mpi_${numproc}.xml"
    +                PYTEST_ARGS="--verbose --timeout $TIME_LIMIT --junit-xml=${XUNIT_FILE} ${PYNEST_TEST_DIR}/mpi/${numproc}"
    +
    +		set +e
    +		# Some doubling up of code here because trying to add the -m 'not requires...' to PYTEST_ARGS
    +		# loses the essential quotes.
    +		if "${DO_TESTS_SKIP_TEST_REQUIRING_MANY_CORES:-false}"; then
    +		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores'"
    +                    ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} -m 'not requires_many_cores' 2>&1 | tee -a "${TEST_LOGFILE}"
    +		else
    +		    echo "Running ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS}"
    +                    ${MPI_LAUNCHER_CMDLINE} ${numproc} ${PYTHON} -m pytest ${PYTEST_ARGS} 2>&1 | tee -a "${TEST_LOGFILE}"
    +		fi
    +		set -e
    +            done
             fi
    -        set -e
    -      done
         fi
    -  fi
     else
    -  echo
    -  echo "  Not running PyNEST tests because NEST was compiled without Python support."
    -  echo
    +    echo
    +    echo "  Not running PyNEST tests because NEST was compiled without Python support."
    +    echo
     fi
     
     echo
    @@ -263,7 +262,7 @@ echo "-----------------------------------------"
     
     if command -v run_all_cpptests >/dev/null 2>&1; then
       set +e
    -  CPP_TEST_OUTPUT=$(run_all_cpptests --logger=JUNIT,error,"${REPORTDIR}/08_cpptests.xml":HRF,error,stdout 2>&1)
    +  CPP_TEST_OUTPUT=$( run_all_cpptests --logger=JUNIT,error,"${REPORTDIR}/08_cpptests.xml":HRF,error,stdout 2>&1 )
       set -e
       echo "${CPP_TEST_OUTPUT}" | tail -2
     else
    @@ -279,8 +278,8 @@ python3 "$(dirname $0)/summarize_tests.py" "${REPORTDIR}"
     TESTSUITE_RESULT=$?
     
     # Mac OS X: Restore old crash reporter state
    -if test "x${INFO_OS}" = xDarwin; then
    -  defaults write com.apple.CrashReporter DialogType "${TEST_CRSTATE}" || echo "WARNING: Could not reset CrashReporter DialogType to '${TEST_CRSTATE}'!"
    +if test "x${INFO_OS}" = xDarwin ; then
    +    defaults write com.apple.CrashReporter DialogType "${TEST_CRSTATE}" || echo "WARNING: Could not reset CrashReporter DialogType to '${TEST_CRSTATE}'!"
     fi
     
     exit $TESTSUITE_RESULT
    
    From 492e51a6ef408eb8a0d1c5c0e7e1ae5c8d34ca4a Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 11 Feb 2025 12:03:03 +0100
    Subject: [PATCH 356/375] Slight prettyfication
    
    ---
     pynest/nestkernel_api.pyx | 7 ++-----
     1 file changed, 2 insertions(+), 5 deletions(-)
    
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 7d8ac21880..9f66579168 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -53,7 +53,8 @@ def init(args):
         global NESTErrors
         cdef int argc = len(args)
     
    -    cdef char** c_argv = <char**>malloc(sizeof(char*) * (argc+ 1 ))
    +    # OpenMPI depends on last entry of argv being null
    +    cdef char** c_argv = <char**>malloc(sizeof(char*) * (argc + 1))
         if c_argv is NULL:
             raise NESTErrors.PyNESTError("NESTKernel::init : couldn't allocate c_argv")
     
    @@ -68,10 +69,6 @@ def init(args):
         finally:
             free(c_argv)
     
    -#
    -#    cdef vector[char*] argv = pylist_to_stringvec(pyargs)
    -##    cdef const char* argv = argv_sv[0].c_str()
    -#    init_nest(&argc, &argv)
     
     cdef class NodeCollectionObject:
     
    
    From b05e246d040fa46d3f47a76b6e0493a319f52863 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 11 Feb 2025 22:28:44 +0100
    Subject: [PATCH 357/375] Replace C-style by static_cast
    
    ---
     libnestutil/block_vector.h | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/libnestutil/block_vector.h b/libnestutil/block_vector.h
    index d4f6c56f0c..9d0825329d 100644
    --- a/libnestutil/block_vector.h
    +++ b/libnestutil/block_vector.h
    @@ -334,7 +334,7 @@ BlockVector< value_type_ >::BlockVector( size_t n )
         std::vector< std::vector< value_type_ > >( 1, std::move( std::vector< value_type_ >( max_block_size ) ) ) )
       , finish_( begin() )
     {
    -  size_t num_blocks_needed = std::ceil( ( float ) n / max_block_size );
    +  size_t num_blocks_needed = std::ceil( static_cast< double >( n / max_block_size ) );
       for ( size_t i = 0; i < num_blocks_needed - 1; ++i )
       {
         blockmap_.emplace_back( max_block_size );
    
    From 5511c69dccc37d23005be9d79177d9cd4a5124af Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 11 Feb 2025 22:29:17 +0100
    Subject: [PATCH 358/375] Remove obsolete option
    
    ---
     pynest/nest/ll_api.py | 3 ---
     1 file changed, 3 deletions(-)
    
    diff --git a/pynest/nest/ll_api.py b/pynest/nest/ll_api.py
    index d6ed4923c8..514377dc2a 100644
    --- a/pynest/nest/ll_api.py
    +++ b/pynest/nest/ll_api.py
    @@ -151,9 +151,6 @@ def init(argv):
             nest_argv.remove("--quiet")
         if "--debug" in nest_argv:
             nest_argv.remove("--debug")
    -    if "--sli-debug" in nest_argv:
    -        nest_argv.remove("--sli-debug")
    -        nest_argv.append("--debug")
     
         if "PYNEST_DEBUG" in os.environ and "--debug" not in nest_argv:
             nest_argv.append("--debug")
    
    From e5d932cc2ed3aedf89c3b787416b81d7efc613ef Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 11 Feb 2025 22:30:14 +0100
    Subject: [PATCH 359/375] Move examples back to pynest/examples
    
    ---
     CMakeLists.txt                                |   1 -
     examples/astrocyte_single.py                  | 102 ------------------
     .../examples}/BrodyHopfield.py                |   0
     {examples => pynest/examples}/CMakeLists.txt  |   0
     .../examples}/CampbellSiegert.py              |   0
     {examples => pynest/examples}/README.rst      |   1 -
     .../examples}/aeif_cond_beta_multisynapse.py  |   0
     .../examples}/balancedneuron.py               |   0
     .../examples}/brette_gerstner_fig_2c.py       |   0
     .../examples}/brette_gerstner_fig_3d.py       |   0
     .../brunel_alpha_evolution_strategies.py      |   0
     .../examples}/brunel_alpha_nest.py            |   0
     .../examples}/brunel_delta_nest.py            |   0
     .../examples}/brunel_exp_multisynapse_nest.py |   0
     .../examples}/brunel_siegert_nest.py          |   0
     .../clopath_synapse_small_network.py          |   0
     .../clopath_synapse_spike_pairing.py          |   0
     .../correlospinmatrix_detector_two_neuron.py  |   0
     .../examples}/cross_check_mip_corrdet.py      |   0
     {examples => pynest/examples}/csa_example.py  |   0
     .../examples}/csa_spatial_example.py          |   0
     .../examples}/evaluate_quantal_stp_synapse.py |   0
     .../examples}/evaluate_tsodyks2_synapse.py    |   0
     .../gap_junctions_inhibitory_network.py       |   0
     .../examples}/gap_junctions_two_neurons.py    |   0
     .../examples}/gif_cond_exp_multisynapse.py    |   0
     .../examples}/gif_pop_psc_exp.py              |   0
     .../examples}/gif_population.py               |   0
     .../examples}/glif_cond_neuron.py             |   0
     .../examples}/glif_psc_double_alpha_neuron.py |   0
     .../examples}/glif_psc_neuron.py              |   0
     .../examples}/hh_phaseplane.py                |   0
     {examples => pynest/examples}/hh_psc_alpha.py |   0
     .../examples}/hpc_benchmark.py                |   0
     .../examples}/hpc_benchmark_connectivity.svg  |   0
     .../iaf_tum_2000_short_term_depression.py     |   0
     .../iaf_tum_2000_short_term_facilitation.py   |   0
     {examples => pynest/examples}/if_curve.py     |   0
     .../examples}/intrinsic_currents_spiking.py   |   0
     .../intrinsic_currents_subthreshold.py        |   0
     .../examples}/lin_rate_ipn_network.py         |   0
     .../examples}/list_examples.sh                |   0
     {examples => pynest/examples}/mc_neuron.py    |   0
     .../examples}/multimeter_file.py              |   0
     .../music_cont_out_proxy_example/README.md    |   1 -
     .../music_cont_out_proxy_example/README.rst   |   0
     .../nest_script.py                            |   0
     .../receiver_script.py                        |   0
     .../music_cont_out_proxy_example/test.music   |   0
     {examples => pynest/examples}/one_neuron.py   |   0
     .../examples}/one_neuron_with_noise.py        |   0
     .../examples}/plot_weight_matrices.py         |   0
     {examples => pynest/examples}/pong/README.rst |   0
     .../examples}/pong/generate_gif.py            |   0
     .../examples}/pong/networks.py                |   0
     {examples => pynest/examples}/pong/pong.py    |   0
     .../examples}/pong/run_simulations.py         |   0
     .../examples}/precise_spiking.py              |   0
     {examples => pynest/examples}/pulsepacket.py  |   0
     .../examples}/rate_neuron_dm.py               |   0
     .../examples}/recording_demo.py               |   0
     .../examples}/repeated_stimulation.py         |   0
     {examples => pynest/examples}/run_examples.sh |   0
     .../examples}/sensitivity_to_perturbation.py  |   0
     .../examples}/sinusoidal_gamma_generator.py   |   0
     .../examples}/sinusoidal_poisson_generator.py |   0
     .../300_pointneurons/circuit_config.json      |   0
     .../cell_models/472363762_point.json          |   0
     .../cell_models/472912177_point.json          |   0
     .../cell_models/473862421_point.json          |   0
     .../cell_models/473863035_point.json          |   0
     .../cell_models/473863510_point.json          |   0
     .../components/synaptic_models/ExcToExc.json  |   0
     .../components/synaptic_models/ExcToInh.json  |   0
     .../components/synaptic_models/InhToExc.json  |   1 -
     .../components/synaptic_models/InhToInh.json  |   1 -
     .../inputs/external_spike_trains.h5           | Bin
     .../network/external_internal_edge_types.csv  |   0
     .../network/external_internal_edges.h5        | Bin
     .../network/external_node_types.csv           |   0
     .../network/external_nodes.h5                 | Bin
     .../network/internal_internal_edge_types.csv  |   0
     .../network/internal_internal_edges.h5        | Bin
     .../network/internal_node_types.csv           |   0
     .../network/internal_nodes.h5                 | Bin
     .../300_pointneurons/simulation_config.json   |   0
     .../examples}/sonata_example/README.rst       |   2 +-
     .../sonata_example/sonata_network.py          |   0
     .../examples}/spatial/README.rst              |   1 -
     .../examples}/spatial/conncomp.py             |   0
     .../examples}/spatial/conncon_sources.py      |   0
     .../examples}/spatial/conncon_targets.py      |   0
     .../examples}/spatial/connex.py               |   0
     .../examples}/spatial/connex_ew.py            |   0
     .../examples}/spatial/ctx_2n.py               |   0
     .../examples}/spatial/gaussex.py              |   0
     .../examples}/spatial/grid_iaf.py             |   0
     .../examples}/spatial/grid_iaf_irr.py         |   0
     .../examples}/spatial/grid_iaf_oc.py          |   0
     .../examples}/spatial/nodes_source_target.py  |   0
     .../examples}/spatial/test_3d.py              |   0
     .../examples}/spatial/test_3d_exp.py          |   0
     .../examples}/spatial/test_3d_gauss.py        |   0
     .../examples}/store_restore_network.py        |   0
     .../examples}/structural_plasticity.py        |   0
     .../examples}/sudoku/README.rst               |   0
     .../examples}/sudoku/helpers_sudoku.py        |   0
     .../sudoku/output/sudoku_noise_comparison.gif | Bin
     .../sudoku/output/sudoku_solution.gif         | Bin
     .../sudoku/output/sudoku_solution.png         | Bin
     .../examples}/sudoku/plot_progress.py         |   0
     .../examples}/sudoku/sudoku_net.py            |   0
     .../examples}/sudoku/sudoku_solver.py         |   0
     .../examples}/synapsecollection.py            |   0
     {examples => pynest/examples}/testiaf.py      |   0
     {examples => pynest/examples}/twoneurons.py   |   0
     .../examples}/urbanczik_synapse_example.py    |   0
     .../examples}/vinit_example.py                |   0
     .../examples}/wang_decision_making.py         |   0
     119 files changed, 1 insertion(+), 109 deletions(-)
     delete mode 100644 examples/astrocyte_single.py
     rename {examples => pynest/examples}/BrodyHopfield.py (100%)
     rename {examples => pynest/examples}/CMakeLists.txt (100%)
     rename {examples => pynest/examples}/CampbellSiegert.py (100%)
     rename {examples => pynest/examples}/README.rst (97%)
     rename {examples => pynest/examples}/aeif_cond_beta_multisynapse.py (100%)
     rename {examples => pynest/examples}/balancedneuron.py (100%)
     rename {examples => pynest/examples}/brette_gerstner_fig_2c.py (100%)
     rename {examples => pynest/examples}/brette_gerstner_fig_3d.py (100%)
     rename {examples => pynest/examples}/brunel_alpha_evolution_strategies.py (100%)
     rename {examples => pynest/examples}/brunel_alpha_nest.py (100%)
     rename {examples => pynest/examples}/brunel_delta_nest.py (100%)
     rename {examples => pynest/examples}/brunel_exp_multisynapse_nest.py (100%)
     rename {examples => pynest/examples}/brunel_siegert_nest.py (100%)
     rename {examples => pynest/examples}/clopath_synapse_small_network.py (100%)
     rename {examples => pynest/examples}/clopath_synapse_spike_pairing.py (100%)
     rename {examples => pynest/examples}/correlospinmatrix_detector_two_neuron.py (100%)
     rename {examples => pynest/examples}/cross_check_mip_corrdet.py (100%)
     rename {examples => pynest/examples}/csa_example.py (100%)
     rename {examples => pynest/examples}/csa_spatial_example.py (100%)
     rename {examples => pynest/examples}/evaluate_quantal_stp_synapse.py (100%)
     rename {examples => pynest/examples}/evaluate_tsodyks2_synapse.py (100%)
     rename {examples => pynest/examples}/gap_junctions_inhibitory_network.py (100%)
     rename {examples => pynest/examples}/gap_junctions_two_neurons.py (100%)
     rename {examples => pynest/examples}/gif_cond_exp_multisynapse.py (100%)
     rename {examples => pynest/examples}/gif_pop_psc_exp.py (100%)
     rename {examples => pynest/examples}/gif_population.py (100%)
     rename {examples => pynest/examples}/glif_cond_neuron.py (100%)
     rename {examples => pynest/examples}/glif_psc_double_alpha_neuron.py (100%)
     rename {examples => pynest/examples}/glif_psc_neuron.py (100%)
     rename {examples => pynest/examples}/hh_phaseplane.py (100%)
     rename {examples => pynest/examples}/hh_psc_alpha.py (100%)
     rename {examples => pynest/examples}/hpc_benchmark.py (100%)
     rename {examples => pynest/examples}/hpc_benchmark_connectivity.svg (100%)
     rename {examples => pynest/examples}/iaf_tum_2000_short_term_depression.py (100%)
     rename {examples => pynest/examples}/iaf_tum_2000_short_term_facilitation.py (100%)
     rename {examples => pynest/examples}/if_curve.py (100%)
     rename {examples => pynest/examples}/intrinsic_currents_spiking.py (100%)
     rename {examples => pynest/examples}/intrinsic_currents_subthreshold.py (100%)
     rename {examples => pynest/examples}/lin_rate_ipn_network.py (100%)
     rename {examples => pynest/examples}/list_examples.sh (100%)
     rename {examples => pynest/examples}/mc_neuron.py (100%)
     rename {examples => pynest/examples}/multimeter_file.py (100%)
     rename {examples => pynest/examples}/music_cont_out_proxy_example/README.md (99%)
     rename {examples => pynest/examples}/music_cont_out_proxy_example/README.rst (100%)
     rename {examples => pynest/examples}/music_cont_out_proxy_example/nest_script.py (100%)
     rename {examples => pynest/examples}/music_cont_out_proxy_example/receiver_script.py (100%)
     rename {examples => pynest/examples}/music_cont_out_proxy_example/test.music (100%)
     rename {examples => pynest/examples}/one_neuron.py (100%)
     rename {examples => pynest/examples}/one_neuron_with_noise.py (100%)
     rename {examples => pynest/examples}/plot_weight_matrices.py (100%)
     rename {examples => pynest/examples}/pong/README.rst (100%)
     rename {examples => pynest/examples}/pong/generate_gif.py (100%)
     rename {examples => pynest/examples}/pong/networks.py (100%)
     rename {examples => pynest/examples}/pong/pong.py (100%)
     rename {examples => pynest/examples}/pong/run_simulations.py (100%)
     rename {examples => pynest/examples}/precise_spiking.py (100%)
     rename {examples => pynest/examples}/pulsepacket.py (100%)
     rename {examples => pynest/examples}/rate_neuron_dm.py (100%)
     rename {examples => pynest/examples}/recording_demo.py (100%)
     rename {examples => pynest/examples}/repeated_stimulation.py (100%)
     rename {examples => pynest/examples}/run_examples.sh (100%)
     rename {examples => pynest/examples}/sensitivity_to_perturbation.py (100%)
     rename {examples => pynest/examples}/sinusoidal_gamma_generator.py (100%)
     rename {examples => pynest/examples}/sinusoidal_poisson_generator.py (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/circuit_config.json (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/cell_models/472363762_point.json (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/cell_models/472912177_point.json (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/cell_models/473862421_point.json (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/cell_models/473863035_point.json (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/cell_models/473863510_point.json (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/synaptic_models/ExcToExc.json (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/synaptic_models/ExcToInh.json (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json (80%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json (80%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/inputs/external_spike_trains.h5 (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/network/external_internal_edge_types.csv (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/network/external_internal_edges.h5 (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/network/external_node_types.csv (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/network/external_nodes.h5 (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/network/internal_internal_edge_types.csv (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/network/internal_internal_edges.h5 (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/network/internal_node_types.csv (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/network/internal_nodes.h5 (100%)
     rename {examples => pynest/examples}/sonata_example/300_pointneurons/simulation_config.json (100%)
     rename {examples => pynest/examples}/sonata_example/README.rst (50%)
     rename {examples => pynest/examples}/sonata_example/sonata_network.py (100%)
     rename {examples => pynest/examples}/spatial/README.rst (98%)
     rename {examples => pynest/examples}/spatial/conncomp.py (100%)
     rename {examples => pynest/examples}/spatial/conncon_sources.py (100%)
     rename {examples => pynest/examples}/spatial/conncon_targets.py (100%)
     rename {examples => pynest/examples}/spatial/connex.py (100%)
     rename {examples => pynest/examples}/spatial/connex_ew.py (100%)
     rename {examples => pynest/examples}/spatial/ctx_2n.py (100%)
     rename {examples => pynest/examples}/spatial/gaussex.py (100%)
     rename {examples => pynest/examples}/spatial/grid_iaf.py (100%)
     rename {examples => pynest/examples}/spatial/grid_iaf_irr.py (100%)
     rename {examples => pynest/examples}/spatial/grid_iaf_oc.py (100%)
     rename {examples => pynest/examples}/spatial/nodes_source_target.py (100%)
     rename {examples => pynest/examples}/spatial/test_3d.py (100%)
     rename {examples => pynest/examples}/spatial/test_3d_exp.py (100%)
     rename {examples => pynest/examples}/spatial/test_3d_gauss.py (100%)
     rename {examples => pynest/examples}/store_restore_network.py (100%)
     rename {examples => pynest/examples}/structural_plasticity.py (100%)
     rename {examples => pynest/examples}/sudoku/README.rst (100%)
     rename {examples => pynest/examples}/sudoku/helpers_sudoku.py (100%)
     rename {examples => pynest/examples}/sudoku/output/sudoku_noise_comparison.gif (100%)
     rename {examples => pynest/examples}/sudoku/output/sudoku_solution.gif (100%)
     rename {examples => pynest/examples}/sudoku/output/sudoku_solution.png (100%)
     rename {examples => pynest/examples}/sudoku/plot_progress.py (100%)
     rename {examples => pynest/examples}/sudoku/sudoku_net.py (100%)
     rename {examples => pynest/examples}/sudoku/sudoku_solver.py (100%)
     rename {examples => pynest/examples}/synapsecollection.py (100%)
     rename {examples => pynest/examples}/testiaf.py (100%)
     rename {examples => pynest/examples}/twoneurons.py (100%)
     rename {examples => pynest/examples}/urbanczik_synapse_example.py (100%)
     rename {examples => pynest/examples}/vinit_example.py (100%)
     rename {examples => pynest/examples}/wang_decision_making.py (100%)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index f279d8e1d7..7d886a6f20 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -220,7 +220,6 @@ add_custom_target( installcheck
     
     add_subdirectory( doc )
     add_subdirectory( bin )
    -add_subdirectory( examples )
     add_subdirectory( build_support )
     add_subdirectory( libnestutil )
     add_subdirectory( models )
    diff --git a/examples/astrocyte_single.py b/examples/astrocyte_single.py
    deleted file mode 100644
    index a28e31602e..0000000000
    --- a/examples/astrocyte_single.py
    +++ /dev/null
    @@ -1,102 +0,0 @@
    -# -*- coding: utf-8 -*-
    -#
    -# astrocyte_single.py
    -#
    -# This file is part of NEST.
    -#
    -# Copyright (C) 2004 The NEST Initiative
    -#
    -# NEST is free software: you can redistribute it and/or modify
    -# it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation, either version 2 of the License, or
    -# (at your option) any later version.
    -#
    -# NEST is distributed in the hope that it will be useful,
    -# but WITHOUT ANY WARRANTY; without even the implied warranty of
    -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    -# GNU General Public License for more details.
    -#
    -# You should have received a copy of the GNU General Public License
    -# along with NEST.  If not, see <http://www.gnu.org/licenses/>.
    -
    -"""
    -A model using a single astrocyte with calcium dynamics
    --------------------------------------------------------
    -
    -This script simulates an astrocyte with the model ``astrocyte_lr_1994``, which
    -implements the dynamics in the astrocyte based on [1]_, [2]_, and
    -[3]_. Recordings are made for two variables in the astrocyte,
    -inositol 1,4,5-trisphosphate (IP3) and cytosolic calcium. The astrocyte is driven
    -by a Poissonian spike train which induces the
    -generation of IP3 in the astrocyte, which in turn influences the calcium dynamics in
    -the astrocyte.
    -
    -See Also
    -~~~~~~~~
    -
    -:doc:`astrocyte_interaction`
    -
    -References
    -~~~~~~~~~~
    -
    -.. [1] Li, Y. X., & Rinzel, J. (1994). Equations for InsP3 receptor-mediated
    -       [Ca2+]i oscillations derived from a detailed kinetic model: a
    -       Hodgkin-Huxley like formalism. Journal of theoretical Biology, 166(4),
    -       461-473. DOI: https://doi.org/10.1006/jtbi.1994.1041
    -
    -.. [2] De Young, G. W., & Keizer, J. (1992). A single-pool inositol
    -       1,4,5-trisphosphate-receptor-based model for agonist-stimulated
    -       oscillations in Ca2+ concentration. Proceedings of the National Academy
    -       of Sciences, 89(20), 9895-9899. DOI:
    -       https://doi.org/10.1073/pnas.89.20.9895
    -
    -.. [3] Nadkarni, S., & Jung, P. (2003). Spontaneous oscillations of dressed
    -       neurons: a new mechanism for epilepsy?. Physical review letters, 91(26),
    -       268101. DOI: https://doi.org/10.1103/PhysRevLett.91.268101
    -
    -"""
    -
    -###############################################################################
    -# Import all necessary modules for simulation and plotting.
    -
    -import matplotlib.pyplot as plt
    -import nest
    -
    -###############################################################################
    -# Set parameters for the simulation.
    -
    -# simulation time
    -sim_time = 60000
    -# astrocyte parameters
    -params_astro = {"delta_IP3": 0.2}
    -# Poisson input for the astrocyte
    -poisson_rate = 1.0
    -poisson_weight = 1.0
    -
    -###############################################################################
    -# Create astrocyte and devices and connect them.
    -
    -astrocyte = nest.Create("astrocyte_lr_1994", params=params_astro)
    -ps_astro = nest.Create("poisson_generator", params={"rate": poisson_rate})
    -mm_astro = nest.Create("multimeter", params={"record_from": ["IP3", "Ca_astro"]})
    -nest.Connect(ps_astro, astrocyte, syn_spec={"weight": poisson_weight})
    -nest.Connect(mm_astro, astrocyte)
    -
    -###############################################################################
    -# Run simulation and get results.
    -
    -nest.Simulate(sim_time)
    -data = mm_astro.events
    -
    -###############################################################################
    -# Create and show plots.
    -
    -fig, axes = plt.subplots(2, 1, sharex=True, figsize=(6.4, 4.8), dpi=100)
    -axes[0].plot(data["times"], data["IP3"])
    -axes[1].plot(data["times"], data["Ca_astro"])
    -axes[0].set_ylabel(r"[IP$_{3}$] ($\mu$M)")
    -axes[1].set_ylabel(r"[Ca$^{2+}$] ($\mu$M)")
    -axes[1].set_xlabel("Time (ms)")
    -plt.tight_layout()
    -plt.show()
    -plt.close()
    diff --git a/examples/BrodyHopfield.py b/pynest/examples/BrodyHopfield.py
    similarity index 100%
    rename from examples/BrodyHopfield.py
    rename to pynest/examples/BrodyHopfield.py
    diff --git a/examples/CMakeLists.txt b/pynest/examples/CMakeLists.txt
    similarity index 100%
    rename from examples/CMakeLists.txt
    rename to pynest/examples/CMakeLists.txt
    diff --git a/examples/CampbellSiegert.py b/pynest/examples/CampbellSiegert.py
    similarity index 100%
    rename from examples/CampbellSiegert.py
    rename to pynest/examples/CampbellSiegert.py
    diff --git a/examples/README.rst b/pynest/examples/README.rst
    similarity index 97%
    rename from examples/README.rst
    rename to pynest/examples/README.rst
    index daedc2dc4b..ad52192046 100644
    --- a/examples/README.rst
    +++ b/pynest/examples/README.rst
    @@ -1,3 +1,2 @@
     NEST example networks
     =====================
    -
    diff --git a/examples/aeif_cond_beta_multisynapse.py b/pynest/examples/aeif_cond_beta_multisynapse.py
    similarity index 100%
    rename from examples/aeif_cond_beta_multisynapse.py
    rename to pynest/examples/aeif_cond_beta_multisynapse.py
    diff --git a/examples/balancedneuron.py b/pynest/examples/balancedneuron.py
    similarity index 100%
    rename from examples/balancedneuron.py
    rename to pynest/examples/balancedneuron.py
    diff --git a/examples/brette_gerstner_fig_2c.py b/pynest/examples/brette_gerstner_fig_2c.py
    similarity index 100%
    rename from examples/brette_gerstner_fig_2c.py
    rename to pynest/examples/brette_gerstner_fig_2c.py
    diff --git a/examples/brette_gerstner_fig_3d.py b/pynest/examples/brette_gerstner_fig_3d.py
    similarity index 100%
    rename from examples/brette_gerstner_fig_3d.py
    rename to pynest/examples/brette_gerstner_fig_3d.py
    diff --git a/examples/brunel_alpha_evolution_strategies.py b/pynest/examples/brunel_alpha_evolution_strategies.py
    similarity index 100%
    rename from examples/brunel_alpha_evolution_strategies.py
    rename to pynest/examples/brunel_alpha_evolution_strategies.py
    diff --git a/examples/brunel_alpha_nest.py b/pynest/examples/brunel_alpha_nest.py
    similarity index 100%
    rename from examples/brunel_alpha_nest.py
    rename to pynest/examples/brunel_alpha_nest.py
    diff --git a/examples/brunel_delta_nest.py b/pynest/examples/brunel_delta_nest.py
    similarity index 100%
    rename from examples/brunel_delta_nest.py
    rename to pynest/examples/brunel_delta_nest.py
    diff --git a/examples/brunel_exp_multisynapse_nest.py b/pynest/examples/brunel_exp_multisynapse_nest.py
    similarity index 100%
    rename from examples/brunel_exp_multisynapse_nest.py
    rename to pynest/examples/brunel_exp_multisynapse_nest.py
    diff --git a/examples/brunel_siegert_nest.py b/pynest/examples/brunel_siegert_nest.py
    similarity index 100%
    rename from examples/brunel_siegert_nest.py
    rename to pynest/examples/brunel_siegert_nest.py
    diff --git a/examples/clopath_synapse_small_network.py b/pynest/examples/clopath_synapse_small_network.py
    similarity index 100%
    rename from examples/clopath_synapse_small_network.py
    rename to pynest/examples/clopath_synapse_small_network.py
    diff --git a/examples/clopath_synapse_spike_pairing.py b/pynest/examples/clopath_synapse_spike_pairing.py
    similarity index 100%
    rename from examples/clopath_synapse_spike_pairing.py
    rename to pynest/examples/clopath_synapse_spike_pairing.py
    diff --git a/examples/correlospinmatrix_detector_two_neuron.py b/pynest/examples/correlospinmatrix_detector_two_neuron.py
    similarity index 100%
    rename from examples/correlospinmatrix_detector_two_neuron.py
    rename to pynest/examples/correlospinmatrix_detector_two_neuron.py
    diff --git a/examples/cross_check_mip_corrdet.py b/pynest/examples/cross_check_mip_corrdet.py
    similarity index 100%
    rename from examples/cross_check_mip_corrdet.py
    rename to pynest/examples/cross_check_mip_corrdet.py
    diff --git a/examples/csa_example.py b/pynest/examples/csa_example.py
    similarity index 100%
    rename from examples/csa_example.py
    rename to pynest/examples/csa_example.py
    diff --git a/examples/csa_spatial_example.py b/pynest/examples/csa_spatial_example.py
    similarity index 100%
    rename from examples/csa_spatial_example.py
    rename to pynest/examples/csa_spatial_example.py
    diff --git a/examples/evaluate_quantal_stp_synapse.py b/pynest/examples/evaluate_quantal_stp_synapse.py
    similarity index 100%
    rename from examples/evaluate_quantal_stp_synapse.py
    rename to pynest/examples/evaluate_quantal_stp_synapse.py
    diff --git a/examples/evaluate_tsodyks2_synapse.py b/pynest/examples/evaluate_tsodyks2_synapse.py
    similarity index 100%
    rename from examples/evaluate_tsodyks2_synapse.py
    rename to pynest/examples/evaluate_tsodyks2_synapse.py
    diff --git a/examples/gap_junctions_inhibitory_network.py b/pynest/examples/gap_junctions_inhibitory_network.py
    similarity index 100%
    rename from examples/gap_junctions_inhibitory_network.py
    rename to pynest/examples/gap_junctions_inhibitory_network.py
    diff --git a/examples/gap_junctions_two_neurons.py b/pynest/examples/gap_junctions_two_neurons.py
    similarity index 100%
    rename from examples/gap_junctions_two_neurons.py
    rename to pynest/examples/gap_junctions_two_neurons.py
    diff --git a/examples/gif_cond_exp_multisynapse.py b/pynest/examples/gif_cond_exp_multisynapse.py
    similarity index 100%
    rename from examples/gif_cond_exp_multisynapse.py
    rename to pynest/examples/gif_cond_exp_multisynapse.py
    diff --git a/examples/gif_pop_psc_exp.py b/pynest/examples/gif_pop_psc_exp.py
    similarity index 100%
    rename from examples/gif_pop_psc_exp.py
    rename to pynest/examples/gif_pop_psc_exp.py
    diff --git a/examples/gif_population.py b/pynest/examples/gif_population.py
    similarity index 100%
    rename from examples/gif_population.py
    rename to pynest/examples/gif_population.py
    diff --git a/examples/glif_cond_neuron.py b/pynest/examples/glif_cond_neuron.py
    similarity index 100%
    rename from examples/glif_cond_neuron.py
    rename to pynest/examples/glif_cond_neuron.py
    diff --git a/examples/glif_psc_double_alpha_neuron.py b/pynest/examples/glif_psc_double_alpha_neuron.py
    similarity index 100%
    rename from examples/glif_psc_double_alpha_neuron.py
    rename to pynest/examples/glif_psc_double_alpha_neuron.py
    diff --git a/examples/glif_psc_neuron.py b/pynest/examples/glif_psc_neuron.py
    similarity index 100%
    rename from examples/glif_psc_neuron.py
    rename to pynest/examples/glif_psc_neuron.py
    diff --git a/examples/hh_phaseplane.py b/pynest/examples/hh_phaseplane.py
    similarity index 100%
    rename from examples/hh_phaseplane.py
    rename to pynest/examples/hh_phaseplane.py
    diff --git a/examples/hh_psc_alpha.py b/pynest/examples/hh_psc_alpha.py
    similarity index 100%
    rename from examples/hh_psc_alpha.py
    rename to pynest/examples/hh_psc_alpha.py
    diff --git a/examples/hpc_benchmark.py b/pynest/examples/hpc_benchmark.py
    similarity index 100%
    rename from examples/hpc_benchmark.py
    rename to pynest/examples/hpc_benchmark.py
    diff --git a/examples/hpc_benchmark_connectivity.svg b/pynest/examples/hpc_benchmark_connectivity.svg
    similarity index 100%
    rename from examples/hpc_benchmark_connectivity.svg
    rename to pynest/examples/hpc_benchmark_connectivity.svg
    diff --git a/examples/iaf_tum_2000_short_term_depression.py b/pynest/examples/iaf_tum_2000_short_term_depression.py
    similarity index 100%
    rename from examples/iaf_tum_2000_short_term_depression.py
    rename to pynest/examples/iaf_tum_2000_short_term_depression.py
    diff --git a/examples/iaf_tum_2000_short_term_facilitation.py b/pynest/examples/iaf_tum_2000_short_term_facilitation.py
    similarity index 100%
    rename from examples/iaf_tum_2000_short_term_facilitation.py
    rename to pynest/examples/iaf_tum_2000_short_term_facilitation.py
    diff --git a/examples/if_curve.py b/pynest/examples/if_curve.py
    similarity index 100%
    rename from examples/if_curve.py
    rename to pynest/examples/if_curve.py
    diff --git a/examples/intrinsic_currents_spiking.py b/pynest/examples/intrinsic_currents_spiking.py
    similarity index 100%
    rename from examples/intrinsic_currents_spiking.py
    rename to pynest/examples/intrinsic_currents_spiking.py
    diff --git a/examples/intrinsic_currents_subthreshold.py b/pynest/examples/intrinsic_currents_subthreshold.py
    similarity index 100%
    rename from examples/intrinsic_currents_subthreshold.py
    rename to pynest/examples/intrinsic_currents_subthreshold.py
    diff --git a/examples/lin_rate_ipn_network.py b/pynest/examples/lin_rate_ipn_network.py
    similarity index 100%
    rename from examples/lin_rate_ipn_network.py
    rename to pynest/examples/lin_rate_ipn_network.py
    diff --git a/examples/list_examples.sh b/pynest/examples/list_examples.sh
    similarity index 100%
    rename from examples/list_examples.sh
    rename to pynest/examples/list_examples.sh
    diff --git a/examples/mc_neuron.py b/pynest/examples/mc_neuron.py
    similarity index 100%
    rename from examples/mc_neuron.py
    rename to pynest/examples/mc_neuron.py
    diff --git a/examples/multimeter_file.py b/pynest/examples/multimeter_file.py
    similarity index 100%
    rename from examples/multimeter_file.py
    rename to pynest/examples/multimeter_file.py
    diff --git a/examples/music_cont_out_proxy_example/README.md b/pynest/examples/music_cont_out_proxy_example/README.md
    similarity index 99%
    rename from examples/music_cont_out_proxy_example/README.md
    rename to pynest/examples/music_cont_out_proxy_example/README.md
    index b3b670c81a..6f3985b59e 100644
    --- a/examples/music_cont_out_proxy_example/README.md
    +++ b/pynest/examples/music_cont_out_proxy_example/README.md
    @@ -13,4 +13,3 @@ and their values are forwarded through MUSIC to the receiver.
     .. code-block:: bash
     
       mpiexec -np 3 music test.music
    -
    diff --git a/examples/music_cont_out_proxy_example/README.rst b/pynest/examples/music_cont_out_proxy_example/README.rst
    similarity index 100%
    rename from examples/music_cont_out_proxy_example/README.rst
    rename to pynest/examples/music_cont_out_proxy_example/README.rst
    diff --git a/examples/music_cont_out_proxy_example/nest_script.py b/pynest/examples/music_cont_out_proxy_example/nest_script.py
    similarity index 100%
    rename from examples/music_cont_out_proxy_example/nest_script.py
    rename to pynest/examples/music_cont_out_proxy_example/nest_script.py
    diff --git a/examples/music_cont_out_proxy_example/receiver_script.py b/pynest/examples/music_cont_out_proxy_example/receiver_script.py
    similarity index 100%
    rename from examples/music_cont_out_proxy_example/receiver_script.py
    rename to pynest/examples/music_cont_out_proxy_example/receiver_script.py
    diff --git a/examples/music_cont_out_proxy_example/test.music b/pynest/examples/music_cont_out_proxy_example/test.music
    similarity index 100%
    rename from examples/music_cont_out_proxy_example/test.music
    rename to pynest/examples/music_cont_out_proxy_example/test.music
    diff --git a/examples/one_neuron.py b/pynest/examples/one_neuron.py
    similarity index 100%
    rename from examples/one_neuron.py
    rename to pynest/examples/one_neuron.py
    diff --git a/examples/one_neuron_with_noise.py b/pynest/examples/one_neuron_with_noise.py
    similarity index 100%
    rename from examples/one_neuron_with_noise.py
    rename to pynest/examples/one_neuron_with_noise.py
    diff --git a/examples/plot_weight_matrices.py b/pynest/examples/plot_weight_matrices.py
    similarity index 100%
    rename from examples/plot_weight_matrices.py
    rename to pynest/examples/plot_weight_matrices.py
    diff --git a/examples/pong/README.rst b/pynest/examples/pong/README.rst
    similarity index 100%
    rename from examples/pong/README.rst
    rename to pynest/examples/pong/README.rst
    diff --git a/examples/pong/generate_gif.py b/pynest/examples/pong/generate_gif.py
    similarity index 100%
    rename from examples/pong/generate_gif.py
    rename to pynest/examples/pong/generate_gif.py
    diff --git a/examples/pong/networks.py b/pynest/examples/pong/networks.py
    similarity index 100%
    rename from examples/pong/networks.py
    rename to pynest/examples/pong/networks.py
    diff --git a/examples/pong/pong.py b/pynest/examples/pong/pong.py
    similarity index 100%
    rename from examples/pong/pong.py
    rename to pynest/examples/pong/pong.py
    diff --git a/examples/pong/run_simulations.py b/pynest/examples/pong/run_simulations.py
    similarity index 100%
    rename from examples/pong/run_simulations.py
    rename to pynest/examples/pong/run_simulations.py
    diff --git a/examples/precise_spiking.py b/pynest/examples/precise_spiking.py
    similarity index 100%
    rename from examples/precise_spiking.py
    rename to pynest/examples/precise_spiking.py
    diff --git a/examples/pulsepacket.py b/pynest/examples/pulsepacket.py
    similarity index 100%
    rename from examples/pulsepacket.py
    rename to pynest/examples/pulsepacket.py
    diff --git a/examples/rate_neuron_dm.py b/pynest/examples/rate_neuron_dm.py
    similarity index 100%
    rename from examples/rate_neuron_dm.py
    rename to pynest/examples/rate_neuron_dm.py
    diff --git a/examples/recording_demo.py b/pynest/examples/recording_demo.py
    similarity index 100%
    rename from examples/recording_demo.py
    rename to pynest/examples/recording_demo.py
    diff --git a/examples/repeated_stimulation.py b/pynest/examples/repeated_stimulation.py
    similarity index 100%
    rename from examples/repeated_stimulation.py
    rename to pynest/examples/repeated_stimulation.py
    diff --git a/examples/run_examples.sh b/pynest/examples/run_examples.sh
    similarity index 100%
    rename from examples/run_examples.sh
    rename to pynest/examples/run_examples.sh
    diff --git a/examples/sensitivity_to_perturbation.py b/pynest/examples/sensitivity_to_perturbation.py
    similarity index 100%
    rename from examples/sensitivity_to_perturbation.py
    rename to pynest/examples/sensitivity_to_perturbation.py
    diff --git a/examples/sinusoidal_gamma_generator.py b/pynest/examples/sinusoidal_gamma_generator.py
    similarity index 100%
    rename from examples/sinusoidal_gamma_generator.py
    rename to pynest/examples/sinusoidal_gamma_generator.py
    diff --git a/examples/sinusoidal_poisson_generator.py b/pynest/examples/sinusoidal_poisson_generator.py
    similarity index 100%
    rename from examples/sinusoidal_poisson_generator.py
    rename to pynest/examples/sinusoidal_poisson_generator.py
    diff --git a/examples/sonata_example/300_pointneurons/circuit_config.json b/pynest/examples/sonata_example/300_pointneurons/circuit_config.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/circuit_config.json
    rename to pynest/examples/sonata_example/300_pointneurons/circuit_config.json
    diff --git a/examples/sonata_example/300_pointneurons/components/cell_models/472363762_point.json b/pynest/examples/sonata_example/300_pointneurons/components/cell_models/472363762_point.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/components/cell_models/472363762_point.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/cell_models/472363762_point.json
    diff --git a/examples/sonata_example/300_pointneurons/components/cell_models/472912177_point.json b/pynest/examples/sonata_example/300_pointneurons/components/cell_models/472912177_point.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/components/cell_models/472912177_point.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/cell_models/472912177_point.json
    diff --git a/examples/sonata_example/300_pointneurons/components/cell_models/473862421_point.json b/pynest/examples/sonata_example/300_pointneurons/components/cell_models/473862421_point.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/components/cell_models/473862421_point.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/cell_models/473862421_point.json
    diff --git a/examples/sonata_example/300_pointneurons/components/cell_models/473863035_point.json b/pynest/examples/sonata_example/300_pointneurons/components/cell_models/473863035_point.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/components/cell_models/473863035_point.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/cell_models/473863035_point.json
    diff --git a/examples/sonata_example/300_pointneurons/components/cell_models/473863510_point.json b/pynest/examples/sonata_example/300_pointneurons/components/cell_models/473863510_point.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/components/cell_models/473863510_point.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/cell_models/473863510_point.json
    diff --git a/examples/sonata_example/300_pointneurons/components/synaptic_models/ExcToExc.json b/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/ExcToExc.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/components/synaptic_models/ExcToExc.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/ExcToExc.json
    diff --git a/examples/sonata_example/300_pointneurons/components/synaptic_models/ExcToInh.json b/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/ExcToInh.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/components/synaptic_models/ExcToInh.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/ExcToInh.json
    diff --git a/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json b/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json
    similarity index 80%
    rename from examples/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json
    index bfd870e452..2c63c08510 100644
    --- a/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json
    +++ b/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToExc.json
    @@ -1,3 +1,2 @@
     {
     }
    -
    diff --git a/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json b/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json
    similarity index 80%
    rename from examples/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json
    rename to pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json
    index bfd870e452..2c63c08510 100644
    --- a/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json
    +++ b/pynest/examples/sonata_example/300_pointneurons/components/synaptic_models/InhToInh.json
    @@ -1,3 +1,2 @@
     {
     }
    -
    diff --git a/examples/sonata_example/300_pointneurons/inputs/external_spike_trains.h5 b/pynest/examples/sonata_example/300_pointneurons/inputs/external_spike_trains.h5
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/inputs/external_spike_trains.h5
    rename to pynest/examples/sonata_example/300_pointneurons/inputs/external_spike_trains.h5
    diff --git a/examples/sonata_example/300_pointneurons/network/external_internal_edge_types.csv b/pynest/examples/sonata_example/300_pointneurons/network/external_internal_edge_types.csv
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/network/external_internal_edge_types.csv
    rename to pynest/examples/sonata_example/300_pointneurons/network/external_internal_edge_types.csv
    diff --git a/examples/sonata_example/300_pointneurons/network/external_internal_edges.h5 b/pynest/examples/sonata_example/300_pointneurons/network/external_internal_edges.h5
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/network/external_internal_edges.h5
    rename to pynest/examples/sonata_example/300_pointneurons/network/external_internal_edges.h5
    diff --git a/examples/sonata_example/300_pointneurons/network/external_node_types.csv b/pynest/examples/sonata_example/300_pointneurons/network/external_node_types.csv
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/network/external_node_types.csv
    rename to pynest/examples/sonata_example/300_pointneurons/network/external_node_types.csv
    diff --git a/examples/sonata_example/300_pointneurons/network/external_nodes.h5 b/pynest/examples/sonata_example/300_pointneurons/network/external_nodes.h5
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/network/external_nodes.h5
    rename to pynest/examples/sonata_example/300_pointneurons/network/external_nodes.h5
    diff --git a/examples/sonata_example/300_pointneurons/network/internal_internal_edge_types.csv b/pynest/examples/sonata_example/300_pointneurons/network/internal_internal_edge_types.csv
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/network/internal_internal_edge_types.csv
    rename to pynest/examples/sonata_example/300_pointneurons/network/internal_internal_edge_types.csv
    diff --git a/examples/sonata_example/300_pointneurons/network/internal_internal_edges.h5 b/pynest/examples/sonata_example/300_pointneurons/network/internal_internal_edges.h5
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/network/internal_internal_edges.h5
    rename to pynest/examples/sonata_example/300_pointneurons/network/internal_internal_edges.h5
    diff --git a/examples/sonata_example/300_pointneurons/network/internal_node_types.csv b/pynest/examples/sonata_example/300_pointneurons/network/internal_node_types.csv
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/network/internal_node_types.csv
    rename to pynest/examples/sonata_example/300_pointneurons/network/internal_node_types.csv
    diff --git a/examples/sonata_example/300_pointneurons/network/internal_nodes.h5 b/pynest/examples/sonata_example/300_pointneurons/network/internal_nodes.h5
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/network/internal_nodes.h5
    rename to pynest/examples/sonata_example/300_pointneurons/network/internal_nodes.h5
    diff --git a/examples/sonata_example/300_pointneurons/simulation_config.json b/pynest/examples/sonata_example/300_pointneurons/simulation_config.json
    similarity index 100%
    rename from examples/sonata_example/300_pointneurons/simulation_config.json
    rename to pynest/examples/sonata_example/300_pointneurons/simulation_config.json
    diff --git a/examples/sonata_example/README.rst b/pynest/examples/sonata_example/README.rst
    similarity index 50%
    rename from examples/sonata_example/README.rst
    rename to pynest/examples/sonata_example/README.rst
    index aae5f4f87a..19aa53c7de 100644
    --- a/examples/sonata_example/README.rst
    +++ b/pynest/examples/sonata_example/README.rst
    @@ -1,2 +1,2 @@
     SONATA networks in NEST
    -=======================
    \ No newline at end of file
    +=======================
    diff --git a/examples/sonata_example/sonata_network.py b/pynest/examples/sonata_example/sonata_network.py
    similarity index 100%
    rename from examples/sonata_example/sonata_network.py
    rename to pynest/examples/sonata_example/sonata_network.py
    diff --git a/examples/spatial/README.rst b/pynest/examples/spatial/README.rst
    similarity index 98%
    rename from examples/spatial/README.rst
    rename to pynest/examples/spatial/README.rst
    index b322158287..689afca2cb 100644
    --- a/examples/spatial/README.rst
    +++ b/pynest/examples/spatial/README.rst
    @@ -1,3 +1,2 @@
     Spatially-structured networks in NEST
     =========================================
    -
    diff --git a/examples/spatial/conncomp.py b/pynest/examples/spatial/conncomp.py
    similarity index 100%
    rename from examples/spatial/conncomp.py
    rename to pynest/examples/spatial/conncomp.py
    diff --git a/examples/spatial/conncon_sources.py b/pynest/examples/spatial/conncon_sources.py
    similarity index 100%
    rename from examples/spatial/conncon_sources.py
    rename to pynest/examples/spatial/conncon_sources.py
    diff --git a/examples/spatial/conncon_targets.py b/pynest/examples/spatial/conncon_targets.py
    similarity index 100%
    rename from examples/spatial/conncon_targets.py
    rename to pynest/examples/spatial/conncon_targets.py
    diff --git a/examples/spatial/connex.py b/pynest/examples/spatial/connex.py
    similarity index 100%
    rename from examples/spatial/connex.py
    rename to pynest/examples/spatial/connex.py
    diff --git a/examples/spatial/connex_ew.py b/pynest/examples/spatial/connex_ew.py
    similarity index 100%
    rename from examples/spatial/connex_ew.py
    rename to pynest/examples/spatial/connex_ew.py
    diff --git a/examples/spatial/ctx_2n.py b/pynest/examples/spatial/ctx_2n.py
    similarity index 100%
    rename from examples/spatial/ctx_2n.py
    rename to pynest/examples/spatial/ctx_2n.py
    diff --git a/examples/spatial/gaussex.py b/pynest/examples/spatial/gaussex.py
    similarity index 100%
    rename from examples/spatial/gaussex.py
    rename to pynest/examples/spatial/gaussex.py
    diff --git a/examples/spatial/grid_iaf.py b/pynest/examples/spatial/grid_iaf.py
    similarity index 100%
    rename from examples/spatial/grid_iaf.py
    rename to pynest/examples/spatial/grid_iaf.py
    diff --git a/examples/spatial/grid_iaf_irr.py b/pynest/examples/spatial/grid_iaf_irr.py
    similarity index 100%
    rename from examples/spatial/grid_iaf_irr.py
    rename to pynest/examples/spatial/grid_iaf_irr.py
    diff --git a/examples/spatial/grid_iaf_oc.py b/pynest/examples/spatial/grid_iaf_oc.py
    similarity index 100%
    rename from examples/spatial/grid_iaf_oc.py
    rename to pynest/examples/spatial/grid_iaf_oc.py
    diff --git a/examples/spatial/nodes_source_target.py b/pynest/examples/spatial/nodes_source_target.py
    similarity index 100%
    rename from examples/spatial/nodes_source_target.py
    rename to pynest/examples/spatial/nodes_source_target.py
    diff --git a/examples/spatial/test_3d.py b/pynest/examples/spatial/test_3d.py
    similarity index 100%
    rename from examples/spatial/test_3d.py
    rename to pynest/examples/spatial/test_3d.py
    diff --git a/examples/spatial/test_3d_exp.py b/pynest/examples/spatial/test_3d_exp.py
    similarity index 100%
    rename from examples/spatial/test_3d_exp.py
    rename to pynest/examples/spatial/test_3d_exp.py
    diff --git a/examples/spatial/test_3d_gauss.py b/pynest/examples/spatial/test_3d_gauss.py
    similarity index 100%
    rename from examples/spatial/test_3d_gauss.py
    rename to pynest/examples/spatial/test_3d_gauss.py
    diff --git a/examples/store_restore_network.py b/pynest/examples/store_restore_network.py
    similarity index 100%
    rename from examples/store_restore_network.py
    rename to pynest/examples/store_restore_network.py
    diff --git a/examples/structural_plasticity.py b/pynest/examples/structural_plasticity.py
    similarity index 100%
    rename from examples/structural_plasticity.py
    rename to pynest/examples/structural_plasticity.py
    diff --git a/examples/sudoku/README.rst b/pynest/examples/sudoku/README.rst
    similarity index 100%
    rename from examples/sudoku/README.rst
    rename to pynest/examples/sudoku/README.rst
    diff --git a/examples/sudoku/helpers_sudoku.py b/pynest/examples/sudoku/helpers_sudoku.py
    similarity index 100%
    rename from examples/sudoku/helpers_sudoku.py
    rename to pynest/examples/sudoku/helpers_sudoku.py
    diff --git a/examples/sudoku/output/sudoku_noise_comparison.gif b/pynest/examples/sudoku/output/sudoku_noise_comparison.gif
    similarity index 100%
    rename from examples/sudoku/output/sudoku_noise_comparison.gif
    rename to pynest/examples/sudoku/output/sudoku_noise_comparison.gif
    diff --git a/examples/sudoku/output/sudoku_solution.gif b/pynest/examples/sudoku/output/sudoku_solution.gif
    similarity index 100%
    rename from examples/sudoku/output/sudoku_solution.gif
    rename to pynest/examples/sudoku/output/sudoku_solution.gif
    diff --git a/examples/sudoku/output/sudoku_solution.png b/pynest/examples/sudoku/output/sudoku_solution.png
    similarity index 100%
    rename from examples/sudoku/output/sudoku_solution.png
    rename to pynest/examples/sudoku/output/sudoku_solution.png
    diff --git a/examples/sudoku/plot_progress.py b/pynest/examples/sudoku/plot_progress.py
    similarity index 100%
    rename from examples/sudoku/plot_progress.py
    rename to pynest/examples/sudoku/plot_progress.py
    diff --git a/examples/sudoku/sudoku_net.py b/pynest/examples/sudoku/sudoku_net.py
    similarity index 100%
    rename from examples/sudoku/sudoku_net.py
    rename to pynest/examples/sudoku/sudoku_net.py
    diff --git a/examples/sudoku/sudoku_solver.py b/pynest/examples/sudoku/sudoku_solver.py
    similarity index 100%
    rename from examples/sudoku/sudoku_solver.py
    rename to pynest/examples/sudoku/sudoku_solver.py
    diff --git a/examples/synapsecollection.py b/pynest/examples/synapsecollection.py
    similarity index 100%
    rename from examples/synapsecollection.py
    rename to pynest/examples/synapsecollection.py
    diff --git a/examples/testiaf.py b/pynest/examples/testiaf.py
    similarity index 100%
    rename from examples/testiaf.py
    rename to pynest/examples/testiaf.py
    diff --git a/examples/twoneurons.py b/pynest/examples/twoneurons.py
    similarity index 100%
    rename from examples/twoneurons.py
    rename to pynest/examples/twoneurons.py
    diff --git a/examples/urbanczik_synapse_example.py b/pynest/examples/urbanczik_synapse_example.py
    similarity index 100%
    rename from examples/urbanczik_synapse_example.py
    rename to pynest/examples/urbanczik_synapse_example.py
    diff --git a/examples/vinit_example.py b/pynest/examples/vinit_example.py
    similarity index 100%
    rename from examples/vinit_example.py
    rename to pynest/examples/vinit_example.py
    diff --git a/examples/wang_decision_making.py b/pynest/examples/wang_decision_making.py
    similarity index 100%
    rename from examples/wang_decision_making.py
    rename to pynest/examples/wang_decision_making.py
    
    From a844eb9c52899849ca268101788e927f43bd155e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 11 Feb 2025 23:05:20 +0100
    Subject: [PATCH 360/375] No longer need mpiexec to pytest in serial case
    
    ---
     testsuite/do_tests.sh | 9 ++-------
     1 file changed, 2 insertions(+), 7 deletions(-)
    
    diff --git a/testsuite/do_tests.sh b/testsuite/do_tests.sh
    index 4c82ad076f..150d304259 100755
    --- a/testsuite/do_tests.sh
    +++ b/testsuite/do_tests.sh
    @@ -208,13 +208,8 @@ if test "${PYTHON}"; then
         XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
         env
         set +e
    -    if test "${HAVE_MPI}" = "True"; then
    -	${MPI_LAUNCHER_CMDLINE} 1 ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    -				--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    -    else
    -	${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    -				--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
    -    fi
    +    ${PYTHON} -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" \
    +	                --ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
     
         set -e
     
    
    From 259da2eb424f5b8e7edcaaca27c049cebd3ca408 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 13 Feb 2025 08:33:23 +0100
    Subject: [PATCH 361/375] Ensure set_status works correctly for rank siblings
     of devices
    
    ---
     nestkernel/nest.cpp | 12 ++++++++++--
     1 file changed, 10 insertions(+), 2 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index 21b7999bbd..a57117fc70 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -218,18 +218,26 @@ get_nc_status( NodeCollectionPTR nc )
     void
     set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params )
     {
    +  /*
    +   PYNEST-NG TODO:
    +
    +   The following does NOT work because the rank_local does not "see" the siblings of devices
    +
       const auto rank_local_begin = nc->rank_local_begin();
       if ( rank_local_begin == nc->end() )
       {
         return; // no local nodes, nothing to do --- more efficient and avoids params access check problems
       }
    +  */
     
       if ( params.size() == 1 )
       {
         params[ 0 ].init_access_flags();
    -    for ( auto it = rank_local_begin; it < nc->end(); ++it )
    +    // We must iterate over all nodes here because we otherwise miss "siblings" of devices
    +    // May consider ways to fix this.
    +    for ( auto const& node : *nc )
         {
    -      kernel().node_manager.set_status( ( *it ).node_id, params[ 0 ] );
    +      kernel().node_manager.set_status( node.node_id, params[ 0 ] );
         }
         params[ 0 ].all_entries_accessed( "NodeCollection.set()", "params" );
       }
    
    From 5e4efb2be31de6d2d022813f577c88c6e5104f82 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 13 Feb 2025 09:18:36 +0100
    Subject: [PATCH 362/375] Fix bug in blockvector
    
    ---
     libnestutil/block_vector.h | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/libnestutil/block_vector.h b/libnestutil/block_vector.h
    index 9d0825329d..fa8a1dc752 100644
    --- a/libnestutil/block_vector.h
    +++ b/libnestutil/block_vector.h
    @@ -334,7 +334,7 @@ BlockVector< value_type_ >::BlockVector( size_t n )
         std::vector< std::vector< value_type_ > >( 1, std::move( std::vector< value_type_ >( max_block_size ) ) ) )
       , finish_( begin() )
     {
    -  size_t num_blocks_needed = std::ceil( static_cast< double >( n / max_block_size ) );
    +  size_t num_blocks_needed = std::ceil( static_cast< double >( n ) / max_block_size );
       for ( size_t i = 0; i < num_blocks_needed - 1; ++i )
       {
         blockmap_.emplace_back( max_block_size );
    
    From e91c63ac37c475ada6b1a85e7891f875860e04e0 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 13 Feb 2025 11:26:03 +0100
    Subject: [PATCH 363/375] Install examples
    
    ---
     pynest/CMakeLists.txt | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/pynest/CMakeLists.txt b/pynest/CMakeLists.txt
    index 1862bc7dfc..f2828944f0 100644
    --- a/pynest/CMakeLists.txt
    +++ b/pynest/CMakeLists.txt
    @@ -69,5 +69,9 @@ if ( HAVE_PYTHON )
         PATTERN "versionchecker.py.in" EXCLUDE
       )
     
    +  install( DIRECTORY examples/
    +      DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples/pynest
    +  )
    +
       install( TARGETS nestkernel_api DESTINATION ${PYEXECDIR}/nest/ )
     endif ()
    
    From bcd93ec5a388fc7f8df2b8833f687e90cd3115fb Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 13 Feb 2025 11:26:38 +0100
    Subject: [PATCH 364/375] Update Sonata example detection in test
    
    ---
     testsuite/pytests/test_sonata.py | 20 +++++---------------
     1 file changed, 5 insertions(+), 15 deletions(-)
    
    diff --git a/testsuite/pytests/test_sonata.py b/testsuite/pytests/test_sonata.py
    index 653384a119..953bcbfeb8 100644
    --- a/testsuite/pytests/test_sonata.py
    +++ b/testsuite/pytests/test_sonata.py
    @@ -28,21 +28,11 @@
     # Skip all tests in this module if no HDF5 or OpenMP threads
     pytestmark = [pytest.mark.skipif_missing_hdf5, pytest.mark.skipif_missing_threads]
     
    -# We consider two possible cases:
    -# - When running via `make installcheck`, this file is in $INSTALLDIR/share/nest/testsuite/pytests,
    -#   while the data is in $INSTALLDIR/share/doc/nest/examples/pynest/sonata_example.
    -# - When running from the source dir, this file is in $SOURCEDIR/testsuite/pytests,
    -#   while the data is in $SOURCEDIR/pynest/examples/sonata_example.
    -for relpath in ["../../../doc/nest/examples", "../../examples"]:
    -    sonata_path = Path(__file__).parent / relpath / "sonata_example" / "300_pointneurons"
    -    config = sonata_path / "circuit_config.json"
    -    sim_config = sonata_path / "simulation_config.json"
    -    have_sonata_files = config.is_file() and sim_config.is_file()
    -    if have_sonata_files:
    -        break
    -else:
    -    have_sonata_files = False
    -
    +# We assume here that NEST is installed
    +sonata_path = Path(nest.build_info["docdir"]) / "examples" / "pynest" / "sonata_example" / "300_pointneurons"
    +config = sonata_path / "circuit_config.json"
    +sim_config = sonata_path / "simulation_config.json"
    +have_sonata_files = config.is_file() and sim_config.is_file()
     
     EXPECTED_NUM_NODES = 400  # 300 'internal' + 100 'external'
     EXPECTED_NUM_CONNECTIONS = 48432
    
    From 87d07dff396e2a8a3fe967981f5ae837d248a3a1 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Thu, 13 Feb 2025 11:44:35 +0100
    Subject: [PATCH 365/375] Fix set_status() unread element detection with MPI
    
    ---
     nestkernel/nest.cpp         | 13 +++++++++----
     nestkernel/node_manager.cpp |  5 +++--
     2 files changed, 12 insertions(+), 6 deletions(-)
    
    diff --git a/nestkernel/nest.cpp b/nestkernel/nest.cpp
    index a57117fc70..c1fc8d9187 100644
    --- a/nestkernel/nest.cpp
    +++ b/nestkernel/nest.cpp
    @@ -232,23 +232,28 @@ set_nc_status( NodeCollectionPTR nc, std::vector< dictionary >& params )
     
       if ( params.size() == 1 )
       {
    -    params[ 0 ].init_access_flags();
    +    // PyNEST-NG TODO: Until we have solved the rank_local iteration problem, we need
    +    // to do the access checking on the individual local node because we otherwise
    +    // will falsely claim "non read" if a NC has no member on a given rank.
    +
    +    // params[ 0 ].init_access_flags();
    +
         // We must iterate over all nodes here because we otherwise miss "siblings" of devices
         // May consider ways to fix this.
         for ( auto const& node : *nc )
         {
           kernel().node_manager.set_status( node.node_id, params[ 0 ] );
         }
    -    params[ 0 ].all_entries_accessed( "NodeCollection.set()", "params" );
    +    // params[ 0 ].all_entries_accessed( "NodeCollection.set()", "params" );
       }
       else if ( nc->size() == params.size() )
       {
         size_t idx = 0;
         for ( auto const& node : *nc )
         {
    -      params[ idx ].init_access_flags();
    +      // params[ idx ].init_access_flags();
           kernel().node_manager.set_status( node.node_id, params[ idx ] );
    -      params[ idx ].all_entries_accessed( "NodeCollection.set()", "params" );
    +      // params[ idx ].all_entries_accessed( "NodeCollection.set()", "params" );
           ++idx;
         }
       }
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index b225580c10..616873d288 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -613,8 +613,9 @@ NodeManager::set_status_single_node_( Node& target, const dictionary& d, bool cl
         }
         target.set_status_base( d );
     
    -    // TODO: Not sure this check should be at single neuron level; advantage is
    -    // it stops after first failure.
    +    // PYNEST-NG TODO: We need to check at the single-neuron level because otherwise we
    +    // trigger a false error if an NC has no member on a given rank.
    +    // Also has the advantage of triggering an error on the first node.
         d.all_entries_accessed( "NodeManager::set_status", "params" );
       }
     }
    
    From 828a1974769e0ac608a499c4a1cd10714002e586 Mon Sep 17 00:00:00 2001
    From: Sebastian Spreizer <spreizer@web.de>
    Date: Fri, 21 Feb 2025 10:40:15 +0100
    Subject: [PATCH 366/375] Fix serialize data for nest server
    
    ---
     pynest/nest/lib/hl_api_types.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/pynest/nest/lib/hl_api_types.py b/pynest/nest/lib/hl_api_types.py
    index 70fa13e4ea..890eb12e17 100644
    --- a/pynest/nest/lib/hl_api_types.py
    +++ b/pynest/nest/lib/hl_api_types.py
    @@ -1261,7 +1261,7 @@ def serialize_data(data):
         """
     
         if isinstance(data, (numpy.ndarray, NodeCollection)):
    -        return data.tolist()
    +        return serialize_data(data.tolist())
         elif isinstance(data, SynapseCollection):
             # Get full information from SynapseCollection
             return serialize_data(data.get())
    @@ -1274,7 +1274,7 @@ def serialize_data(data):
         if isinstance(data, (list, tuple)):
             return [serialize_data(d) for d in data]
         if isinstance(data, dict):
    -        return dict([(key, serialize_data(value)) for key, value in data.items()])
    +        return dict([(serialize_data(key), serialize_data(value)) for key, value in data.items()])
         return data
     
     
    
    From 539d9e6f8798928fc303d23cb5d0b663a9824f78 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 15 Apr 2025 11:37:54 +0200
    Subject: [PATCH 367/375] Adjusted merge result to pynest-ng, mainly stopwatch
     and eprop; compiles again
    
    ---
     models/eprop_iaf.cpp                          |  79 +++++++-------
     models/eprop_iaf.h                            |  22 ++--
     models/eprop_iaf_adapt.cpp                    |  93 ++++++++--------
     models/eprop_iaf_adapt.h                      |  22 ++--
     models/eprop_iaf_psc_delta.cpp                |  87 ++++++++-------
     models/eprop_iaf_psc_delta.h                  |  22 ++--
     models/eprop_iaf_psc_delta_adapt.cpp          | 101 +++++++++---------
     models/eprop_iaf_psc_delta_adapt.h            |  22 ++--
     models/eprop_learning_signal_connection.h     |  14 +--
     models/eprop_readout.cpp                      |  45 ++++----
     models/eprop_readout.h                        |  26 ++---
     models/eprop_synapse.cpp                      |  16 +--
     models/eprop_synapse.h                        |  26 ++---
     models/eprop_synapse_bsshslm_2020.h           |  44 ++++----
     models/weight_optimizer.cpp                   |   8 +-
     nestkernel/eprop_archiving_node_readout.h     |   3 -
     nestkernel/eprop_archiving_node_recurrent.h   |   3 -
     .../eprop_archiving_node_recurrent_impl.h     |   3 -
     nestkernel/nest_names.h                       |  24 +++++
     nestkernel/node.h                             |   3 +-
     nestkernel/node_manager.cpp                   |   2 +-
     nestkernel/simulation_manager.cpp             |   7 +-
     nestkernel/stopwatch.h                        |  33 +++---
     23 files changed, 355 insertions(+), 350 deletions(-)
    
    diff --git a/models/eprop_iaf.cpp b/models/eprop_iaf.cpp
    index fb336a40f4..53c32e0182 100644
    --- a/models/eprop_iaf.cpp
    +++ b/models/eprop_iaf.cpp
    @@ -37,9 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -114,60 +111,60 @@ eprop_iaf::Buffers_::Buffers_( const Buffers_&, eprop_iaf& n )
      * ---------------------------------------------------------------- */
     
     void
    -eprop_iaf::Parameters_::get( DictionaryDatum& d ) const
    +eprop_iaf::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::C_m, C_m_ );
    -  def< double >( d, names::c_reg, c_reg_ );
    -  def< double >( d, names::E_L, E_L_ );
    -  def< double >( d, names::f_target, f_target_ );
    -  def< double >( d, names::beta, beta_ );
    -  def< double >( d, names::gamma, gamma_ );
    -  def< double >( d, names::I_e, I_e_ );
    -  def< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_ );
    -  def< double >( d, names::t_ref, t_ref_ );
    -  def< double >( d, names::tau_m, tau_m_ );
    -  def< double >( d, names::V_min, V_min_ + E_L_ );
    -  def< double >( d, names::V_th, V_th_ + E_L_ );
    -  def< double >( d, names::kappa, kappa_ );
    -  def< double >( d, names::kappa_reg, kappa_reg_ );
    -  def< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_ );
    +  d[ names::C_m ] = C_m_;
    +  d[ names::c_reg ] = c_reg_;
    +  d[ names::E_L ] = E_L_;
    +  d[ names::f_target ] = f_target_;
    +  d[ names::beta ] = beta_;
    +  d[ names::gamma ] = gamma_;
    +  d[ names::I_e ] = I_e_;
    +  d[ names::surrogate_gradient_function ] = surrogate_gradient_function_;
    +  d[ names::t_ref ] = t_ref_;
    +  d[ names::tau_m ] = tau_m_;
    +  d[ names::V_min ] = V_min_ + E_L_;
    +  d[ names::V_th ] = V_th_ + E_L_;
    +  d[ names::kappa ] = kappa_;
    +  d[ names::kappa_reg ] = kappa_reg_;
    +  d[ names::eprop_isi_trace_cutoff ] = eprop_isi_trace_cutoff_;
     }
     
     double
    -eprop_iaf::Parameters_::set( const DictionaryDatum& d, Node* node )
    +eprop_iaf::Parameters_::set( const dictionary& d, Node* node )
     {
       // if leak potential is changed, adjust all variables defined relative to it
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  V_th_ -= updateValueParam< double >( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    -  V_min_ -= updateValueParam< double >( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
    +  V_th_ -= update_value_param( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    +  V_min_ -= update_value_param( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
     
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::c_reg, c_reg_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::c_reg, c_reg_, node );
     
    -  if ( updateValueParam< double >( d, names::f_target, f_target_, node ) )
    +  if ( update_value_param( d, names::f_target, f_target_, node ) )
       {
         f_target_ /= 1000.0; // convert from spikes/s to spikes/ms
       }
     
    -  updateValueParam< double >( d, names::beta, beta_, node );
    -  updateValueParam< double >( d, names::gamma, gamma_, node );
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::beta, beta_, node );
    +  update_value_param( d, names::gamma, gamma_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
     
    -  if ( updateValueParam< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
    +  if ( update_value_param( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
       {
         eprop_iaf* nrn = dynamic_cast< eprop_iaf* >( node );
         assert( nrn );
         nrn->compute_surrogate_gradient_ = nrn->find_surrogate_gradient( surrogate_gradient_function_ );
       }
     
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    -  updateValueParam< double >( d, names::tau_m, tau_m_, node );
    -  updateValueParam< double >( d, names::kappa, kappa_, node );
    -  updateValueParam< double >( d, names::kappa_reg, kappa_reg_, node );
    -  updateValueParam< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
    +  update_value_param( d, names::kappa, kappa_, node );
    +  update_value_param( d, names::kappa_reg, kappa_reg_, node );
    +  update_value_param( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
     
       if ( C_m_ <= 0 )
       {
    @@ -218,17 +215,17 @@ eprop_iaf::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     void
    -eprop_iaf::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +eprop_iaf::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::V_m, v_m_ + p.E_L_ );
    -  def< double >( d, names::surrogate_gradient, surrogate_gradient_ );
    -  def< double >( d, names::learning_signal, learning_signal_ );
    +  d[ names::V_m ] = v_m_ + p.E_L_;
    +  d[ names::surrogate_gradient ] = surrogate_gradient_;
    +  d[ names::learning_signal ] = learning_signal_;
     }
     
     void
    -eprop_iaf::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +eprop_iaf::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  v_m_ -= updateValueParam< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
    +  v_m_ -= update_value_param( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
     }
     
     /* ----------------------------------------------------------------
    diff --git a/models/eprop_iaf.h b/models/eprop_iaf.h
    index 225de65333..6ebb620cf2 100644
    --- a/models/eprop_iaf.h
    +++ b/models/eprop_iaf.h
    @@ -379,8 +379,8 @@ class eprop_iaf : public EpropArchivingNodeRecurrent< false >
       size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
     private:
       void init_buffers_() override;
    @@ -462,10 +462,10 @@ class eprop_iaf : public EpropArchivingNodeRecurrent< false >
         Parameters_();
     
         //! Get the parameters and their values.
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         //! Set the parameters and throw errors in case of invalid values.
    -    double set( const DictionaryDatum&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       //! Structure of state variables.
    @@ -475,7 +475,7 @@ class eprop_iaf : public EpropArchivingNodeRecurrent< false >
         double learning_signal_;
     
         //! Number of remaining refractory steps.
    -    int r_;
    +    long r_;
     
         //! Surrogate gradient / pseudo-derivative of the membrane voltage.
         double surrogate_gradient_;
    @@ -496,10 +496,10 @@ class eprop_iaf : public EpropArchivingNodeRecurrent< false >
         State_();
     
         //! Get the state variables and their values.
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         //! Set the state variables.
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       //! Structure of buffers.
    @@ -531,7 +531,7 @@ class eprop_iaf : public EpropArchivingNodeRecurrent< false >
         double P_i_in_;
     
         //! Total refractory steps.
    -    int RefractoryCounts_;
    +    long RefractoryCounts_;
     
         //! Time steps from the previous spike until the cutoff of e-prop update integration between two spikes.
         long eprop_isi_trace_cutoff_steps_;
    @@ -647,15 +647,15 @@ eprop_iaf::handles_test_event( DataLoggingRequest& dlr, size_t receptor_type )
     }
     
     inline void
    -eprop_iaf::get_status( DictionaryDatum& d ) const
    +eprop_iaf::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -eprop_iaf::set_status( const DictionaryDatum& d )
    +eprop_iaf::set_status( const dictionary& d )
     {
       // temporary copies in case of errors
       Parameters_ ptmp = P_;
    diff --git a/models/eprop_iaf_adapt.cpp b/models/eprop_iaf_adapt.cpp
    index 10cb9ff224..f234aa09da 100644
    --- a/models/eprop_iaf_adapt.cpp
    +++ b/models/eprop_iaf_adapt.cpp
    @@ -37,9 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -120,64 +117,64 @@ eprop_iaf_adapt::Buffers_::Buffers_( const Buffers_&, eprop_iaf_adapt& n )
      * ---------------------------------------------------------------- */
     
     void
    -eprop_iaf_adapt::Parameters_::get( DictionaryDatum& d ) const
    +eprop_iaf_adapt::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::adapt_beta, adapt_beta_ );
    -  def< double >( d, names::adapt_tau, adapt_tau_ );
    -  def< double >( d, names::C_m, C_m_ );
    -  def< double >( d, names::c_reg, c_reg_ );
    -  def< double >( d, names::E_L, E_L_ );
    -  def< double >( d, names::f_target, f_target_ );
    -  def< double >( d, names::beta, beta_ );
    -  def< double >( d, names::gamma, gamma_ );
    -  def< double >( d, names::I_e, I_e_ );
    -  def< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_ );
    -  def< double >( d, names::t_ref, t_ref_ );
    -  def< double >( d, names::tau_m, tau_m_ );
    -  def< double >( d, names::V_min, V_min_ + E_L_ );
    -  def< double >( d, names::V_th, V_th_ + E_L_ );
    -  def< double >( d, names::kappa, kappa_ );
    -  def< double >( d, names::kappa_reg, kappa_reg_ );
    -  def< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_ );
    +  d[ names::adapt_beta ] = adapt_beta_;
    +  d[ names::adapt_tau ] = adapt_tau_;
    +  d[ names::C_m ] = C_m_;
    +  d[ names::c_reg ] = c_reg_;
    +  d[ names::E_L ] = E_L_;
    +  d[ names::f_target ] = f_target_;
    +  d[ names::beta ] = beta_;
    +  d[ names::gamma ] = gamma_;
    +  d[ names::I_e ] = I_e_;
    +  d[ names::surrogate_gradient_function ] = surrogate_gradient_function_;
    +  d[ names::t_ref ] = t_ref_;
    +  d[ names::tau_m ] = tau_m_;
    +  d[ names::V_min ] = V_min_ + E_L_;
    +  d[ names::V_th ] = V_th_ + E_L_;
    +  d[ names::kappa ] = kappa_;
    +  d[ names::kappa_reg ] = kappa_reg_;
    +  d[ names::eprop_isi_trace_cutoff ] = eprop_isi_trace_cutoff_;
     }
     
     double
    -eprop_iaf_adapt::Parameters_::set( const DictionaryDatum& d, Node* node )
    +eprop_iaf_adapt::Parameters_::set( const dictionary& d, Node* node )
     {
       // if leak potential is changed, adjust all variables defined relative to it
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  V_th_ -= updateValueParam< double >( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    -  V_min_ -= updateValueParam< double >( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
    +  V_th_ -= update_value_param( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    +  V_min_ -= update_value_param( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
     
    -  updateValueParam< double >( d, names::adapt_beta, adapt_beta_, node );
    -  updateValueParam< double >( d, names::adapt_tau, adapt_tau_, node );
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::c_reg, c_reg_, node );
    +  update_value_param( d, names::adapt_beta, adapt_beta_, node );
    +  update_value_param( d, names::adapt_tau, adapt_tau_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::c_reg, c_reg_, node );
     
    -  if ( updateValueParam< double >( d, names::f_target, f_target_, node ) )
    +  if ( update_value_param( d, names::f_target, f_target_, node ) )
       {
         f_target_ /= 1000.0; // convert from spikes/s to spikes/ms
       }
     
    -  updateValueParam< double >( d, names::beta, beta_, node );
    -  updateValueParam< double >( d, names::gamma, gamma_, node );
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::beta, beta_, node );
    +  update_value_param( d, names::gamma, gamma_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
     
    -  if ( updateValueParam< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
    +  if ( update_value_param( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
       {
         eprop_iaf_adapt* nrn = dynamic_cast< eprop_iaf_adapt* >( node );
         assert( nrn );
         nrn->compute_surrogate_gradient_ = nrn->find_surrogate_gradient( surrogate_gradient_function_ );
       }
     
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    -  updateValueParam< double >( d, names::tau_m, tau_m_, node );
    -  updateValueParam< double >( d, names::kappa, kappa_, node );
    -  updateValueParam< double >( d, names::kappa_reg, kappa_reg_, node );
    -  updateValueParam< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
    +  update_value_param( d, names::kappa, kappa_, node );
    +  update_value_param( d, names::kappa_reg, kappa_reg_, node );
    +  update_value_param( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
     
       if ( adapt_beta_ < 0 )
       {
    @@ -238,22 +235,22 @@ eprop_iaf_adapt::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     void
    -eprop_iaf_adapt::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +eprop_iaf_adapt::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::adaptation, adapt_ );
    -  def< double >( d, names::V_m, v_m_ + p.E_L_ );
    -  def< double >( d, names::V_th_adapt, v_th_adapt_ + p.E_L_ );
    -  def< double >( d, names::surrogate_gradient, surrogate_gradient_ );
    -  def< double >( d, names::learning_signal, learning_signal_ );
    +  d[ names::adaptation ] = adapt_;
    +  d[ names::V_m ] = v_m_ + p.E_L_;
    +  d[ names::V_th_adapt ] = v_th_adapt_ + p.E_L_;
    +  d[ names::surrogate_gradient ] = surrogate_gradient_;
    +  d[ names::learning_signal ] = learning_signal_;
     }
     
     void
    -eprop_iaf_adapt::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +eprop_iaf_adapt::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  v_m_ -= updateValueParam< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
    +  v_m_ -= update_value_param( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
     
       // adaptive threshold can only be set indirectly via the adaptation variable
    -  if ( updateValueParam< double >( d, names::adaptation, adapt_, node ) )
    +  if ( update_value_param( d, names::adaptation, adapt_, node ) )
       {
         // if E_L changed in this SetStatus call, p.V_th_ has been adjusted and no further action is needed
         v_th_adapt_ = p.V_th_ + p.adapt_beta_ * adapt_;
    diff --git a/models/eprop_iaf_adapt.h b/models/eprop_iaf_adapt.h
    index d404dcbd69..96e45a000b 100644
    --- a/models/eprop_iaf_adapt.h
    +++ b/models/eprop_iaf_adapt.h
    @@ -347,8 +347,8 @@ class eprop_iaf_adapt : public EpropArchivingNodeRecurrent< false >
       size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
     private:
       void init_buffers_() override;
    @@ -436,10 +436,10 @@ class eprop_iaf_adapt : public EpropArchivingNodeRecurrent< false >
         Parameters_();
     
         //! Get the parameters and their values.
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         //! Set the parameters and throw errors in case of invalid values.
    -    double set( const DictionaryDatum&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       //! Structure of state variables.
    @@ -455,7 +455,7 @@ class eprop_iaf_adapt : public EpropArchivingNodeRecurrent< false >
         double learning_signal_;
     
         //! Number of remaining refractory steps.
    -    int r_;
    +    long r_;
     
         //! Surrogate gradient / pseudo-derivative of the membrane voltage.
         double surrogate_gradient_;
    @@ -476,10 +476,10 @@ class eprop_iaf_adapt : public EpropArchivingNodeRecurrent< false >
         State_();
     
         //! Get the state variables and their values.
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         //! Set the state variables.
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       //! Structure of buffers.
    @@ -514,7 +514,7 @@ class eprop_iaf_adapt : public EpropArchivingNodeRecurrent< false >
         double P_adapt_;
     
         //! Total refractory steps.
    -    int RefractoryCounts_;
    +    long RefractoryCounts_;
     
         //! Time steps from the previous spike until the cutoff of e-prop update integration between two spikes.
         long eprop_isi_trace_cutoff_steps_;
    @@ -644,15 +644,15 @@ eprop_iaf_adapt::handles_test_event( DataLoggingRequest& dlr, size_t receptor_ty
     }
     
     inline void
    -eprop_iaf_adapt::get_status( DictionaryDatum& d ) const
    +eprop_iaf_adapt::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -eprop_iaf_adapt::set_status( const DictionaryDatum& d )
    +eprop_iaf_adapt::set_status( const dictionary& d )
     {
       // temporary copies in case of errors
       Parameters_ ptmp = P_;
    diff --git a/models/eprop_iaf_psc_delta.cpp b/models/eprop_iaf_psc_delta.cpp
    index a8b13ac4e4..457cc2d765 100644
    --- a/models/eprop_iaf_psc_delta.cpp
    +++ b/models/eprop_iaf_psc_delta.cpp
    @@ -37,9 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -115,55 +112,55 @@ eprop_iaf_psc_delta::Buffers_::Buffers_( const Buffers_&, eprop_iaf_psc_delta& n
      * ---------------------------------------------------------------- */
     
     void
    -eprop_iaf_psc_delta::Parameters_::get( DictionaryDatum& d ) const
    +eprop_iaf_psc_delta::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::E_L, E_L_ );
    -  def< double >( d, names::I_e, I_e_ );
    -  def< double >( d, names::V_th, V_th_ + E_L_ );
    -  def< double >( d, names::V_reset, V_reset_ + E_L_ );
    -  def< double >( d, names::V_min, V_min_ + E_L_ );
    -  def< double >( d, names::C_m, C_m_ );
    -  def< double >( d, names::tau_m, tau_m_ );
    -  def< double >( d, names::t_ref, t_ref_ );
    -  def< bool >( d, names::refractory_input, with_refr_input_ );
    -  def< double >( d, names::c_reg, c_reg_ );
    -  def< double >( d, names::f_target, f_target_ );
    -  def< double >( d, names::beta, beta_ );
    -  def< double >( d, names::gamma, gamma_ );
    -  def< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_ );
    -  def< double >( d, names::kappa, kappa_ );
    -  def< double >( d, names::kappa_reg, kappa_reg_ );
    -  def< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_ );
    +  d[ names::E_L ] = E_L_;
    +  d[ names::I_e ] = I_e_;
    +  d[ names::V_th ] = V_th_ + E_L_;
    +  d[ names::V_reset ] = V_reset_ + E_L_;
    +  d[ names::V_min ] = V_min_ + E_L_;
    +  d[ names::C_m ] = C_m_;
    +  d[ names::tau_m ] = tau_m_;
    +  d[ names::t_ref ] = t_ref_;
    +  d[ names::refractory_input ] = with_refr_input_;
    +  d[ names::c_reg ] = c_reg_;
    +  d[ names::f_target ] = f_target_;
    +  d[ names::beta ] = beta_;
    +  d[ names::gamma ] = gamma_;
    +  d[ names::surrogate_gradient_function ] = surrogate_gradient_function_;
    +  d[ names::kappa ] = kappa_;
    +  d[ names::kappa_reg ] = kappa_reg_;
    +  d[ names::eprop_isi_trace_cutoff ] = eprop_isi_trace_cutoff_;
     }
     
     double
    -eprop_iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node )
    +eprop_iaf_psc_delta::Parameters_::set( const dictionary& d, Node* node )
     {
       // if leak potential is changed, adjust all variables defined relative to it
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  V_reset_ -= updateValueParam< double >( d, names::V_reset, V_reset_, node ) ? E_L_ : delta_EL;
    -  V_th_ -= updateValueParam< double >( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    -  V_min_ -= updateValueParam< double >( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
    +  V_reset_ -= update_value_param( d, names::V_reset, V_reset_, node ) ? E_L_ : delta_EL;
    +  V_th_ -= update_value_param( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    +  V_min_ -= update_value_param( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
     
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::tau_m, tau_m_, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    -  updateValueParam< bool >( d, names::refractory_input, with_refr_input_, node );
    -  updateValueParam< double >( d, names::c_reg, c_reg_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::refractory_input, with_refr_input_, node );
    +  update_value_param( d, names::c_reg, c_reg_, node );
     
    -  if ( updateValueParam< double >( d, names::f_target, f_target_, node ) )
    +  if ( update_value_param( d, names::f_target, f_target_, node ) )
       {
         f_target_ /= 1000.0; // convert from spikes/s to spikes/ms
       }
     
    -  updateValueParam< double >( d, names::beta, beta_, node );
    -  updateValueParam< double >( d, names::gamma, gamma_, node );
    +  update_value_param( d, names::beta, beta_, node );
    +  update_value_param( d, names::gamma, gamma_, node );
     
    -  if ( updateValueParam< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
    +  if ( update_value_param( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
       {
         eprop_iaf_psc_delta* nrn = dynamic_cast< eprop_iaf_psc_delta* >( node );
         assert( nrn );
    @@ -171,9 +168,9 @@ eprop_iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node )
         nrn->compute_surrogate_gradient_ = compute_surrogate_gradient;
       }
     
    -  updateValueParam< double >( d, names::kappa, kappa_, node );
    -  updateValueParam< double >( d, names::kappa_reg, kappa_reg_, node );
    -  updateValueParam< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
    +  update_value_param( d, names::kappa, kappa_, node );
    +  update_value_param( d, names::kappa_reg, kappa_reg_, node );
    +  update_value_param( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
     
       if ( V_th_ < V_min_ )
       {
    @@ -234,17 +231,17 @@ eprop_iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     void
    -eprop_iaf_psc_delta::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +eprop_iaf_psc_delta::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::V_m, v_m_ + p.E_L_ );
    -  def< double >( d, names::surrogate_gradient, surrogate_gradient_ );
    -  def< double >( d, names::learning_signal, learning_signal_ );
    +  d[ names::V_m ] = v_m_ + p.E_L_;
    +  d[ names::surrogate_gradient ] = surrogate_gradient_;
    +  d[ names::learning_signal ] = learning_signal_;
     }
     
     void
    -eprop_iaf_psc_delta::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +eprop_iaf_psc_delta::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  v_m_ -= updateValueParam< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
    +  v_m_ -= update_value_param< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
     }
     
     /* ----------------------------------------------------------------
    diff --git a/models/eprop_iaf_psc_delta.h b/models/eprop_iaf_psc_delta.h
    index c36066a984..873e18699d 100644
    --- a/models/eprop_iaf_psc_delta.h
    +++ b/models/eprop_iaf_psc_delta.h
    @@ -391,8 +391,8 @@ class eprop_iaf_psc_delta : public EpropArchivingNodeRecurrent< false >
       size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
     private:
       void init_buffers_() override;
    @@ -480,10 +480,10 @@ class eprop_iaf_psc_delta : public EpropArchivingNodeRecurrent< false >
         Parameters_();
     
         //! Get the parameters and their values.
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         //! Set the parameters and throw errors in case of invalid values.
    -    double set( const DictionaryDatum&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       //! Structure of state variables.
    @@ -496,7 +496,7 @@ class eprop_iaf_psc_delta : public EpropArchivingNodeRecurrent< false >
         double v_m_;
     
         //! Number of remaining refractory steps.
    -    int r_;
    +    long r_;
     
         //! Count of spikes arriving during refractory period discounted for decay until end of refractory period.
         double refr_spikes_buffer_;
    @@ -511,10 +511,10 @@ class eprop_iaf_psc_delta : public EpropArchivingNodeRecurrent< false >
         State_();
     
         //! Get the state variables and their values.
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         //! Set the state variables.
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       //! Structure of buffers.
    @@ -546,7 +546,7 @@ class eprop_iaf_psc_delta : public EpropArchivingNodeRecurrent< false >
         double P_i_in_;
     
         //! Total refractory steps.
    -    int RefractoryCounts_;
    +    long RefractoryCounts_;
     
         //! Time steps from the previous spike until the cutoff of e-prop update integration between two spikes.
         long eprop_isi_trace_cutoff_steps_;
    @@ -662,15 +662,15 @@ eprop_iaf_psc_delta::handles_test_event( DataLoggingRequest& dlr, size_t recepto
     }
     
     inline void
    -eprop_iaf_psc_delta::get_status( DictionaryDatum& d ) const
    +eprop_iaf_psc_delta::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -eprop_iaf_psc_delta::set_status( const DictionaryDatum& d )
    +eprop_iaf_psc_delta::set_status( const dictionary& d )
     {
       // temporary copies in case of errors
       Parameters_ ptmp = P_;
    diff --git a/models/eprop_iaf_psc_delta_adapt.cpp b/models/eprop_iaf_psc_delta_adapt.cpp
    index 9ffe2a8b69..431bb28824 100644
    --- a/models/eprop_iaf_psc_delta_adapt.cpp
    +++ b/models/eprop_iaf_psc_delta_adapt.cpp
    @@ -37,9 +37,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -122,68 +119,68 @@ eprop_iaf_psc_delta_adapt::Buffers_::Buffers_( const Buffers_&, eprop_iaf_psc_de
      * ---------------------------------------------------------------- */
     
     void
    -eprop_iaf_psc_delta_adapt::Parameters_::get( DictionaryDatum& d ) const
    +eprop_iaf_psc_delta_adapt::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::E_L, E_L_ );
    -  def< double >( d, names::I_e, I_e_ );
    -  def< double >( d, names::V_th, V_th_ + E_L_ );
    -  def< double >( d, names::V_reset, V_reset_ + E_L_ );
    -  def< double >( d, names::V_min, V_min_ + E_L_ );
    -  def< double >( d, names::C_m, C_m_ );
    -  def< double >( d, names::tau_m, tau_m_ );
    -  def< double >( d, names::t_ref, t_ref_ );
    -  def< bool >( d, names::refractory_input, with_refr_input_ );
    -  def< double >( d, names::adapt_beta, adapt_beta_ );
    -  def< double >( d, names::adapt_tau, adapt_tau_ );
    -  def< double >( d, names::c_reg, c_reg_ );
    -  def< double >( d, names::f_target, f_target_ );
    -  def< double >( d, names::beta, beta_ );
    -  def< double >( d, names::gamma, gamma_ );
    -  def< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_ );
    -  def< double >( d, names::kappa, kappa_ );
    -  def< double >( d, names::kappa_reg, kappa_reg_ );
    -  def< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_ );
    +  d[ names::E_L ] = E_L_;
    +  d[ names::I_e ] = I_e_;
    +  d[ names::V_th ] = V_th_ + E_L_;
    +  d[ names::V_reset ] = V_reset_ + E_L_;
    +  d[ names::V_min ] = V_min_ + E_L_;
    +  d[ names::C_m ] = C_m_;
    +  d[ names::tau_m ] = tau_m_;
    +  d[ names::t_ref ] = t_ref_;
    +  d[ names::refractory_input ] = with_refr_input_;
    +  d[ names::adapt_beta ] = adapt_beta_;
    +  d[ names::adapt_tau ] = adapt_tau_;
    +  d[ names::c_reg ] = c_reg_;
    +  d[ names::f_target ] = f_target_;
    +  d[ names::beta ] = beta_;
    +  d[ names::gamma ] = gamma_;
    +  d[ names::surrogate_gradient_function ] = surrogate_gradient_function_;
    +  d[ names::kappa ] = kappa_;
    +  d[ names::kappa_reg ] = kappa_reg_;
    +  d[ names::eprop_isi_trace_cutoff ] = eprop_isi_trace_cutoff_;
     }
     
     double
    -eprop_iaf_psc_delta_adapt::Parameters_::set( const DictionaryDatum& d, Node* node )
    +eprop_iaf_psc_delta_adapt::Parameters_::set( const dictionary& d, Node* node )
     {
       // if leak potential is changed, adjust all variables defined relative to it
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  V_reset_ -= updateValueParam< double >( d, names::V_reset, V_reset_, node ) ? E_L_ : delta_EL;
    -  V_th_ -= updateValueParam< double >( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    -  V_min_ -= updateValueParam< double >( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
    +  V_reset_ -= update_value_param( d, names::V_reset, V_reset_, node ) ? E_L_ : delta_EL;
    +  V_th_ -= update_value_param( d, names::V_th, V_th_, node ) ? E_L_ : delta_EL;
    +  V_min_ -= update_value_param( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
     
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::tau_m, tau_m_, node );
    -  updateValueParam< double >( d, names::t_ref, t_ref_, node );
    -  updateValueParam< bool >( d, names::refractory_input, with_refr_input_, node );
    -  updateValueParam< double >( d, names::adapt_beta, adapt_beta_, node );
    -  updateValueParam< double >( d, names::adapt_tau, adapt_tau_, node );
    -  updateValueParam< double >( d, names::c_reg, c_reg_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
    +  update_value_param( d, names::t_ref, t_ref_, node );
    +  update_value_param( d, names::refractory_input, with_refr_input_, node );
    +  update_value_param( d, names::adapt_beta, adapt_beta_, node );
    +  update_value_param( d, names::adapt_tau, adapt_tau_, node );
    +  update_value_param( d, names::c_reg, c_reg_, node );
     
    -  if ( updateValueParam< double >( d, names::f_target, f_target_, node ) )
    +  if ( update_value_param( d, names::f_target, f_target_, node ) )
       {
         f_target_ /= 1000.0; // convert from spikes/s to spikes/ms
       }
     
    -  updateValueParam< double >( d, names::beta, beta_, node );
    -  updateValueParam< double >( d, names::gamma, gamma_, node );
    +  update_value_param( d, names::beta, beta_, node );
    +  update_value_param( d, names::gamma, gamma_, node );
     
    -  if ( updateValueParam< std::string >( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
    +  if ( update_value_param( d, names::surrogate_gradient_function, surrogate_gradient_function_, node ) )
       {
         eprop_iaf_psc_delta_adapt* nrn = dynamic_cast< eprop_iaf_psc_delta_adapt* >( node );
         assert( nrn );
         nrn->compute_surrogate_gradient_ = nrn->find_surrogate_gradient( surrogate_gradient_function_ );
       }
     
    -  updateValueParam< double >( d, names::kappa, kappa_, node );
    -  updateValueParam< double >( d, names::kappa_reg, kappa_reg_, node );
    -  updateValueParam< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
    +  update_value_param( d, names::kappa, kappa_, node );
    +  update_value_param( d, names::kappa_reg, kappa_reg_, node );
    +  update_value_param( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
     
       if ( V_th_ < V_min_ )
       {
    @@ -254,22 +251,22 @@ eprop_iaf_psc_delta_adapt::Parameters_::set( const DictionaryDatum& d, Node* nod
     }
     
     void
    -eprop_iaf_psc_delta_adapt::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +eprop_iaf_psc_delta_adapt::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::V_m, v_m_ + p.E_L_ );
    -  def< double >( d, names::adaptation, adapt_ );
    -  def< double >( d, names::V_th_adapt, v_th_adapt_ + p.E_L_ );
    -  def< double >( d, names::surrogate_gradient, surrogate_gradient_ );
    -  def< double >( d, names::learning_signal, learning_signal_ );
    +  d[ names::V_m ] = v_m_ + p.E_L_;
    +  d[ names::adaptation ] = adapt_;
    +  d[ names::V_th_adapt ] = v_th_adapt_ + p.E_L_;
    +  d[ names::surrogate_gradient ] = surrogate_gradient_;
    +  d[ names::learning_signal ] = learning_signal_;
     }
     
     void
    -eprop_iaf_psc_delta_adapt::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +eprop_iaf_psc_delta_adapt::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  v_m_ -= updateValueParam< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
    +  v_m_ -= update_value_param( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
     
       // adaptive threshold can only be set indirectly via the adaptation variable
    -  if ( updateValueParam< double >( d, names::adaptation, adapt_, node ) )
    +  if ( update_value_param( d, names::adaptation, adapt_, node ) )
       {
         // if E_L changed in this SetStatus call, p.V_th_ has been adjusted and no further action is needed
         v_th_adapt_ = p.V_th_ + p.adapt_beta_ * adapt_;
    diff --git a/models/eprop_iaf_psc_delta_adapt.h b/models/eprop_iaf_psc_delta_adapt.h
    index 3c0949de3a..fe93811cfa 100644
    --- a/models/eprop_iaf_psc_delta_adapt.h
    +++ b/models/eprop_iaf_psc_delta_adapt.h
    @@ -407,8 +407,8 @@ class eprop_iaf_psc_delta_adapt : public EpropArchivingNodeRecurrent< false >
       size_t handles_test_event( LearningSignalConnectionEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
     private:
       void init_buffers_() override;
    @@ -502,10 +502,10 @@ class eprop_iaf_psc_delta_adapt : public EpropArchivingNodeRecurrent< false >
         Parameters_();
     
         //! Get the parameters and their values.
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         //! Set the parameters and throw errors in case of invalid values.
    -    double set( const DictionaryDatum&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       //! Structure of state variables.
    @@ -518,7 +518,7 @@ class eprop_iaf_psc_delta_adapt : public EpropArchivingNodeRecurrent< false >
         double v_m_;
     
         //! Number of remaining refractory steps.
    -    int r_;
    +    long r_;
     
         //! Count of spikes arriving during refractory period discounted for decay until end of refractory period.
         double refr_spikes_buffer_;
    @@ -542,10 +542,10 @@ class eprop_iaf_psc_delta_adapt : public EpropArchivingNodeRecurrent< false >
         State_();
     
         //! Get the state variables and their values.
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         //! Set the state variables.
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       //! Structure of buffers.
    @@ -580,7 +580,7 @@ class eprop_iaf_psc_delta_adapt : public EpropArchivingNodeRecurrent< false >
         double P_adapt_;
     
         //! Total refractory steps.
    -    int RefractoryCounts_;
    +    long RefractoryCounts_;
     
         //! Time steps from the previous spike until the cutoff of e-prop update integration between two spikes.
         long eprop_isi_trace_cutoff_steps_;
    @@ -710,15 +710,15 @@ eprop_iaf_psc_delta_adapt::handles_test_event( DataLoggingRequest& dlr, size_t r
     }
     
     inline void
    -eprop_iaf_psc_delta_adapt::get_status( DictionaryDatum& d ) const
    +eprop_iaf_psc_delta_adapt::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     }
     
     inline void
    -eprop_iaf_psc_delta_adapt::set_status( const DictionaryDatum& d )
    +eprop_iaf_psc_delta_adapt::set_status( const dictionary& d )
     {
       // temporary copies in case of errors
       Parameters_ ptmp = P_;
    diff --git a/models/eprop_learning_signal_connection.h b/models/eprop_learning_signal_connection.h
    index cc013a028b..ea420fba34 100644
    --- a/models/eprop_learning_signal_connection.h
    +++ b/models/eprop_learning_signal_connection.h
    @@ -182,10 +182,10 @@ class eprop_learning_signal_connection : public Connection< targetidentifierT >
       }
     
       //! Get the model attributes and their values.
    -  void get_status( DictionaryDatum& d ) const;
    +  void get_status( dictionary& d ) const;
     
       //! Set the values of the model attributes.
    -  void set_status( const DictionaryDatum& d, ConnectorModel& cm );
    +  void set_status( const dictionary& d, ConnectorModel& cm );
     
       //! Set the synaptic weight to the provided value.
       void
    @@ -204,19 +204,19 @@ constexpr ConnectionModelProperties eprop_learning_signal_connection< targetiden
     
     template < typename targetidentifierT >
     void
    -eprop_learning_signal_connection< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +eprop_learning_signal_connection< targetidentifierT >::get_status( dictionary& d ) const
     {
       ConnectionBase::get_status( d );
    -  def< double >( d, names::weight, weight_ );
    -  def< long >( d, names::size_of, sizeof( *this ) );
    +  d[ names::weight ] = weight_;
    +  d[ names::size_of ] = sizeof( *this );
     }
     
     template < typename targetidentifierT >
     void
    -eprop_learning_signal_connection< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +eprop_learning_signal_connection< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm )
     {
       ConnectionBase::set_status( d, cm );
    -  updateValue< double >( d, names::weight, weight_ );
    +  d.update_value( names::weight, weight_ );
     }
     
     template < typename targetidentifierT >
    diff --git a/models/eprop_readout.cpp b/models/eprop_readout.cpp
    index b2f740d70e..dafb28016e 100644
    --- a/models/eprop_readout.cpp
    +++ b/models/eprop_readout.cpp
    @@ -36,9 +36,6 @@
     #include "nest_impl.h"
     #include "universal_data_logger_impl.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    @@ -105,30 +102,30 @@ eprop_readout::Buffers_::Buffers_( const Buffers_&, eprop_readout& n )
      * ---------------------------------------------------------------- */
     
     void
    -eprop_readout::Parameters_::get( DictionaryDatum& d ) const
    +eprop_readout::Parameters_::get( dictionary& d ) const
     {
    -  def< double >( d, names::C_m, C_m_ );
    -  def< double >( d, names::E_L, E_L_ );
    -  def< double >( d, names::I_e, I_e_ );
    -  def< double >( d, names::tau_m, tau_m_ );
    -  def< double >( d, names::V_min, V_min_ + E_L_ );
    -  def< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_ );
    +  d[ names::C_m ] = C_m_;
    +  d[ names::E_L ] = E_L_;
    +  d[ names::I_e ] = I_e_;
    +  d[ names::tau_m ] = tau_m_;
    +  d[ names::V_min ] = V_min_ + E_L_;
    +  d[ names::eprop_isi_trace_cutoff ] = eprop_isi_trace_cutoff_;
     }
     
     double
    -eprop_readout::Parameters_::set( const DictionaryDatum& d, Node* node )
    +eprop_readout::Parameters_::set( const dictionary& d, Node* node )
     {
       // if leak potential is changed, adjust all variables defined relative to it
       const double ELold = E_L_;
    -  updateValueParam< double >( d, names::E_L, E_L_, node );
    +  update_value_param( d, names::E_L, E_L_, node );
       const double delta_EL = E_L_ - ELold;
     
    -  V_min_ -= updateValueParam< double >( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
    +  V_min_ -= update_value_param( d, names::V_min, V_min_, node ) ? E_L_ : delta_EL;
     
    -  updateValueParam< double >( d, names::C_m, C_m_, node );
    -  updateValueParam< double >( d, names::I_e, I_e_, node );
    -  updateValueParam< double >( d, names::tau_m, tau_m_, node );
    -  updateValueParam< double >( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
    +  update_value_param( d, names::C_m, C_m_, node );
    +  update_value_param( d, names::I_e, I_e_, node );
    +  update_value_param( d, names::tau_m, tau_m_, node );
    +  update_value_param( d, names::eprop_isi_trace_cutoff, eprop_isi_trace_cutoff_, node );
     
       if ( C_m_ <= 0 )
       {
    @@ -149,18 +146,18 @@ eprop_readout::Parameters_::set( const DictionaryDatum& d, Node* node )
     }
     
     void
    -eprop_readout::State_::get( DictionaryDatum& d, const Parameters_& p ) const
    +eprop_readout::State_::get( dictionary& d, const Parameters_& p ) const
     {
    -  def< double >( d, names::V_m, v_m_ + p.E_L_ );
    -  def< double >( d, names::error_signal, error_signal_ );
    -  def< double >( d, names::readout_signal, readout_signal_ );
    -  def< double >( d, names::target_signal, target_signal_ );
    +  d[ names::V_m ] = v_m_ + p.E_L_;
    +  d[ names::error_signal ] = error_signal_;
    +  d[ names::readout_signal ] = readout_signal_;
    +  d[ names::target_signal ] = target_signal_;
     }
     
     void
    -eprop_readout::State_::set( const DictionaryDatum& d, const Parameters_& p, double delta_EL, Node* node )
    +eprop_readout::State_::set( const dictionary& d, const Parameters_& p, double delta_EL, Node* node )
     {
    -  v_m_ -= updateValueParam< double >( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
    +  v_m_ -= update_value_param( d, names::V_m, v_m_, node ) ? p.E_L_ : delta_EL;
     }
     
     /* ----------------------------------------------------------------
    diff --git a/models/eprop_readout.h b/models/eprop_readout.h
    index b96c007542..eda2eca5a5 100644
    --- a/models/eprop_readout.h
    +++ b/models/eprop_readout.h
    @@ -290,8 +290,8 @@ class eprop_readout : public EpropArchivingNodeReadout< false >
       size_t handles_test_event( DelayedRateConnectionEvent&, size_t ) override;
       size_t handles_test_event( DataLoggingRequest&, size_t ) override;
     
    -  void get_status( DictionaryDatum& ) const override;
    -  void set_status( const DictionaryDatum& ) override;
    +  void get_status( dictionary& ) const override;
    +  void set_status( const dictionary& ) override;
     
     private:
       void init_buffers_() override;
    @@ -345,10 +345,10 @@ class eprop_readout : public EpropArchivingNodeReadout< false >
         Parameters_();
     
         //! Get the parameters and their values.
    -    void get( DictionaryDatum& ) const;
    +    void get( dictionary& ) const;
     
         //! Set the parameters and throw errors in case of invalid values.
    -    double set( const DictionaryDatum&, Node* );
    +    double set( const dictionary&, Node* );
       };
     
       //! Structure of state variables.
    @@ -379,10 +379,10 @@ class eprop_readout : public EpropArchivingNodeReadout< false >
         State_();
     
         //! Get the state variables and their values.
    -    void get( DictionaryDatum&, const Parameters_& ) const;
    +    void get( dictionary&, const Parameters_& ) const;
     
         //! Set the state variables.
    -    void set( const DictionaryDatum&, const Parameters_&, double, Node* );
    +    void set( const dictionary&, const Parameters_&, double, Node* );
       };
     
       //! Structure of buffers.
    @@ -548,21 +548,21 @@ eprop_readout::handles_test_event( DataLoggingRequest& dlr, size_t receptor_type
     }
     
     inline void
    -eprop_readout::get_status( DictionaryDatum& d ) const
    +eprop_readout::get_status( dictionary& d ) const
     {
       P_.get( d );
       S_.get( d, P_ );
    -  ( *d )[ names::recordables ] = recordablesMap_.get_list();
    +  d[ names::recordables ] = recordablesMap_.get_list();
     
    -  DictionaryDatum receptor_dict_ = new Dictionary();
    -  ( *receptor_dict_ )[ names::eprop_learning_window ] = LEARNING_WINDOW_SIG;
    -  ( *receptor_dict_ )[ names::target_signal ] = TARGET_SIG;
    +  dictionary receptor_dict;
    +  receptor_dict[ names::eprop_learning_window ] = LEARNING_WINDOW_SIG;
    +  receptor_dict[ names::target_signal ] = TARGET_SIG;
     
    -  ( *d )[ names::receptor_types ] = receptor_dict_;
    +  d[ names::receptor_types ] = receptor_dict;
     }
     
     inline void
    -eprop_readout::set_status( const DictionaryDatum& d )
    +eprop_readout::set_status( const dictionary& d )
     {
       // temporary copies in case of errors
       Parameters_ ptmp = P_;
    diff --git a/models/eprop_synapse.cpp b/models/eprop_synapse.cpp
    index f167592024..3c8ed9af42 100644
    --- a/models/eprop_synapse.cpp
    +++ b/models/eprop_synapse.cpp
    @@ -52,26 +52,26 @@ EpropSynapseCommonProperties::~EpropSynapseCommonProperties()
     }
     
     void
    -EpropSynapseCommonProperties::get_status( DictionaryDatum& d ) const
    +EpropSynapseCommonProperties::get_status( dictionary& d ) const
     {
       CommonSynapseProperties::get_status( d );
    -  def< std::string >( d, names::optimizer, optimizer_cp_->get_name() );
    -  DictionaryDatum optimizer_dict = new Dictionary;
    +  d[ names::optimizer ] = optimizer_cp_->get_name();
    +  dictionary optimizer_dict;
       optimizer_cp_->get_status( optimizer_dict );
    -  ( *d )[ names::optimizer ] = optimizer_dict;
    +  d[ names::optimizer ] = optimizer_dict;
     }
     
     void
    -EpropSynapseCommonProperties::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +EpropSynapseCommonProperties::set_status( const dictionary& d, ConnectorModel& cm )
     {
       CommonSynapseProperties::set_status( d, cm );
     
    -  if ( d->known( names::optimizer ) )
    +  if ( d.known( names::optimizer ) )
       {
    -    DictionaryDatum optimizer_dict = getValue< DictionaryDatum >( d->lookup( names::optimizer ) );
    +    dictionary optimizer_dict = d.get< dictionary >( names::optimizer );
     
         std::string new_optimizer;
    -    const bool set_optimizer = updateValue< std::string >( optimizer_dict, names::type, new_optimizer );
    +    const bool set_optimizer = optimizer_dict.update_value( names::type, new_optimizer );
         if ( set_optimizer and new_optimizer != optimizer_cp_->get_name() )
         {
           if ( kernel().connection_manager.get_num_connections( cm.get_syn_id() ) > 0 )
    diff --git a/models/eprop_synapse.h b/models/eprop_synapse.h
    index 5509019296..f7928ed368 100644
    --- a/models/eprop_synapse.h
    +++ b/models/eprop_synapse.h
    @@ -182,10 +182,10 @@ class EpropSynapseCommonProperties : public CommonSynapseProperties
       ~EpropSynapseCommonProperties();
     
       //! Get parameter dictionary.
    -  void get_status( DictionaryDatum& d ) const;
    +  void get_status( dictionary& d ) const;
     
       //! Update values in parameter dictionary.
    -  void set_status( const DictionaryDatum& d, ConnectorModel& cm );
    +  void set_status( const dictionary& d, ConnectorModel& cm );
     
       /**
        * Pointer to common properties object for weight optimizer.
    @@ -266,10 +266,10 @@ class eprop_synapse : public Connection< targetidentifierT >
       using ConnectionBase::get_target;
     
       //! Get parameter dictionary.
    -  void get_status( DictionaryDatum& d ) const;
    +  void get_status( dictionary& d ) const;
     
       //! Update values in parameter dictionary.
    -  void set_status( const DictionaryDatum& d, ConnectorModel& cm );
    +  void set_status( const dictionary& d, ConnectorModel& cm );
     
       //! Send the spike event.
       bool send( Event& e, size_t thread, const EpropSynapseCommonProperties& cp );
    @@ -515,38 +515,38 @@ eprop_synapse< targetidentifierT >::send( Event& e, size_t thread, const EpropSy
     
     template < typename targetidentifierT >
     void
    -eprop_synapse< targetidentifierT >::get_status( DictionaryDatum& d ) const
    +eprop_synapse< targetidentifierT >::get_status( dictionary& d ) const
     {
       ConnectionBase::get_status( d );
    -  def< double >( d, names::weight, weight_ );
    -  def< long >( d, names::size_of, sizeof( *this ) );
    +  d[ names::weight ] = weight_;
    +  d[ names::size_of ] = sizeof( *this );
     
    -  DictionaryDatum optimizer_dict = new Dictionary();
    +  dictionary optimizer_dict;
     
       // The default_connection_ has no optimizer, therefore we need to protect it
       if ( optimizer_ )
       {
         optimizer_->get_status( optimizer_dict );
    -    ( *d )[ names::optimizer ] = optimizer_dict;
    +    d[ names::optimizer ] = optimizer_dict;
       }
     }
     
     template < typename targetidentifierT >
     void
    -eprop_synapse< targetidentifierT >::set_status( const DictionaryDatum& d, ConnectorModel& cm )
    +eprop_synapse< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm )
     {
       ConnectionBase::set_status( d, cm );
    -  if ( d->known( names::optimizer ) )
    +  if ( d.known( names::optimizer ) )
       {
         // We must pass here if called by SetDefaults. In that case, the user will get and error
         // message because the parameters for the synapse-specific optimizer have not been accessed.
         if ( optimizer_ )
         {
    -      optimizer_->set_status( getValue< DictionaryDatum >( d->lookup( names::optimizer ) ) );
    +      optimizer_->set_status( d.get< dictionary >( names::optimizer ) );
         }
       }
     
    -  updateValue< double >( d, names::weight, weight_ );
    +  d.update_value( names::weight, weight_ );
     
       const auto& gcm = dynamic_cast< const GenericConnectorModel< eprop_synapse< targetidentifierT > >& >( cm );
       const CommonPropertiesType& epcp = gcm.get_common_properties();
    diff --git a/models/eprop_synapse_bsshslm_2020.h b/models/eprop_synapse_bsshslm_2020.h
    index a23b2da904..3045cdae52 100644
    --- a/models/eprop_synapse_bsshslm_2020.h
    +++ b/models/eprop_synapse_bsshslm_2020.h
    @@ -598,39 +598,37 @@ void
     eprop_synapse_bsshslm_2020< targetidentifierT >::set_status( const dictionary& d, ConnectorModel& cm )
     {
       ConnectionBase::set_status( d, cm );
    -  if ( d.known( names::optimizer ) )
    +  if ( d.known( names::optimizer ) and optimizer_ )
       {
         // We must pass here if called by SetDefaults. In that case, the user will get and error
         // message because the parameters for the synapse-specific optimizer have not been accessed.
    -    if ( optimizer_ )
    -    {
    -      optimizer_->set_status( d.get< dictionary >( names::optimizer ) );
    -    }
    +    optimizer_->set_status( d.get< dictionary >( names::optimizer ) );
    +  }
     
    -    d.update_value( names::weight, weight_ );
    +  d.update_value( names::weight, weight_ );
     
    -    if ( d.update_value( names::tau_m_readout, tau_m_readout_ ) )
    +  if ( d.update_value( names::tau_m_readout, tau_m_readout_ ) )
    +  {
    +    if ( tau_m_readout_ <= 0 )
         {
    -      if ( tau_m_readout_ <= 0 )
    -      {
    -        throw BadProperty( "Membrane time constant of readout neuron tau_m_readout > 0 required." );
    -      }
    -      kappa_ = std::exp( -Time::get_resolution().get_ms() / tau_m_readout_ );
    +      throw BadProperty( "Membrane time constant of readout neuron tau_m_readout > 0 required." );
         }
    +    kappa_ = std::exp( -Time::get_resolution().get_ms() / tau_m_readout_ );
    +  }
     
    -    const auto& gcm =
    -      dynamic_cast< const GenericConnectorModel< eprop_synapse_bsshslm_2020< targetidentifierT > >& >( cm );
    -    const CommonPropertiesType& epcp = gcm.get_common_properties();
    -    if ( weight_ < epcp.optimizer_cp_->get_Wmin() )
    -    {
    -      throw BadProperty( "Minimal weight Wmin ≤ weight required." );
    -    }
    +  const auto& gcm =
    +    dynamic_cast< const GenericConnectorModel< eprop_synapse_bsshslm_2020< targetidentifierT > >& >( cm );
    +  const CommonPropertiesType& epcp = gcm.get_common_properties();
    +  if ( weight_ < epcp.optimizer_cp_->get_Wmin() )
    +  {
    +    throw BadProperty( "Minimal weight Wmin ≤ weight required." );
    +  }
     
    -    if ( weight_ > epcp.optimizer_cp_->get_Wmax() )
    -    {
    -      throw BadProperty( "weight ≤ maximal weight Wmax required." );
    -    }
    +  if ( weight_ > epcp.optimizer_cp_->get_Wmax() )
    +  {
    +    throw BadProperty( "weight ≤ maximal weight Wmax required." );
       }
    +}
     
     } // namespace nest
     
    diff --git a/models/weight_optimizer.cpp b/models/weight_optimizer.cpp
    index 026313660b..5c21368215 100644
    --- a/models/weight_optimizer.cpp
    +++ b/models/weight_optimizer.cpp
    @@ -72,9 +72,9 @@ WeightOptimizerCommonProperties::set_status( const dictionary& d )
       }
       batch_size_ = new_batch_size;
     
    -  double new_eta = eta_;
    -  d.update_value( names::eta, new_eta );
    -  if ( new_eta < 0 )
    +  double eta_new = eta_;
    +  d.update_value( names::eta, eta_new );
    +  if ( eta_new < 0 )
       {
         throw BadProperty( "Learning rate eta ≥ 0 required." );
       }
    @@ -100,7 +100,7 @@ WeightOptimizerCommonProperties::set_status( const dictionary& d )
       Wmin_ = new_Wmin;
       Wmax_ = new_Wmax;
     
    -  updateValue< bool >( d, names::optimize_each_step, optimize_each_step_ );
    +  d.update_value( names::optimize_each_step, optimize_each_step_ );
     }
     
     WeightOptimizer::WeightOptimizer()
    diff --git a/nestkernel/eprop_archiving_node_readout.h b/nestkernel/eprop_archiving_node_readout.h
    index 97fd67ca27..37b08bce3d 100644
    --- a/nestkernel/eprop_archiving_node_readout.h
    +++ b/nestkernel/eprop_archiving_node_readout.h
    @@ -32,9 +32,6 @@
     #include "nest_types.h"
     #include "node.h"
     
    -// sli
    -#include "dictdatum.h"
    -
     namespace nest
     {
     
    diff --git a/nestkernel/eprop_archiving_node_recurrent.h b/nestkernel/eprop_archiving_node_recurrent.h
    index a8872e3297..2cb36b0bf0 100644
    --- a/nestkernel/eprop_archiving_node_recurrent.h
    +++ b/nestkernel/eprop_archiving_node_recurrent.h
    @@ -32,9 +32,6 @@
     #include "nest_types.h"
     #include "node.h"
     
    -// sli
    -#include "dictdatum.h"
    -
     namespace nest
     {
     
    diff --git a/nestkernel/eprop_archiving_node_recurrent_impl.h b/nestkernel/eprop_archiving_node_recurrent_impl.h
    index 58dde7a87e..3f84b10215 100644
    --- a/nestkernel/eprop_archiving_node_recurrent_impl.h
    +++ b/nestkernel/eprop_archiving_node_recurrent_impl.h
    @@ -26,9 +26,6 @@
     #include "eprop_archiving_node_recurrent.h"
     #include "kernel_manager.h"
     
    -// sli
    -#include "dictutils.h"
    -
     namespace nest
     {
     
    diff --git a/nestkernel/nest_names.h b/nestkernel/nest_names.h
    index 829b71f2e2..dfa30908e9 100644
    --- a/nestkernel/nest_names.h
    +++ b/nestkernel/nest_names.h
    @@ -194,6 +194,8 @@ const std::string elements( "elements" );
     const std::string elementsize( "elementsize" );
     const std::string ellipsoidal( "ellipsoidal" );
     const std::string elliptical( "elliptical" );
    +const std::string eprop_history_duration( "eprop_history_duration" );
    +const std::string eprop_isi_trace_cutoff( "eprop_isi_trace_cutoff" );
     const std::string eprop_learning_window( "eprop_learning_window" );
     const std::string eprop_reset_neurons_on_update( "eprop_reset_neurons_on_update" );
     const std::string eprop_update_interval( "eprop_update_interval" );
    @@ -304,6 +306,8 @@ const std::string Km_SERCA( "Km_SERCA" );
     const std::string Kplus( "Kplus" );
     const std::string Kplus_triplet( "Kplus_triplet" );
     const std::string k_IP3R( "k_IP3R" );
    +const std::string kappa( "kappa" );
    +const std::string kappa_reg( "kappa_reg" );
     const std::string keep_source_table( "keep_source_table" );
     const std::string kernel( "kernel" );
     
    @@ -380,6 +384,7 @@ const std::string off_grid_spiking( "off_grid_spiking" );
     const std::string offset( "offset" );
     const std::string offsets( "offsets" );
     const std::string omega( "omega" );
    +const std::string optimize_each_step( "optimize_each_step" );
     const std::string optimizer( "optimizer" );
     const std::string order( "order" );
     const std::string origin( "origin" );
    @@ -617,19 +622,38 @@ const std::string threshold_voltage( "threshold_voltage" );
     const std::string tics_per_ms( "tics_per_ms" );
     const std::string tics_per_step( "tics_per_step" );
     const std::string time_collocate_spike_data( "time_collocate_spike_data" );
    +const std::string time_collocate_spike_data_cpu( "time_collocate_spike_data_cpu" );
     const std::string time_communicate_prepare( "time_communicate_prepare" );
    +const std::string time_communicate_prepare_cpu( "time_communicate_prepare_cpu" );
     const std::string time_communicate_spike_data( "time_communicate_spike_data" );
    +const std::string time_communicate_spike_data_cpu( "time_communicate_spike_data_cpu" );
     const std::string time_communicate_target_data( "time_communicate_target_data" );
    +const std::string time_communicate_target_data_cpu( "time_communicate_target_data_cpu" );
     const std::string time_construction_connect( "time_construction_connect" );
    +const std::string time_construction_connect_cpu( "time_construction_connect_cpu" );
     const std::string time_construction_create( "time_construction_create" );
    +const std::string time_construction_create_cpu( "time_construction_create_cpu" );
     const std::string time_deliver_secondary_data( "time_deliver_secondary_data" );
    +const std::string time_deliver_secondary_data_cpu( "time_deliver_secondary_data_cpu" );
     const std::string time_deliver_spike_data( "time_deliver_spike_data" );
    +const std::string time_deliver_spike_data_cpu( "time_deliver_spike_data_cpu" );
     const std::string time_gather_secondary_data( "time_gather_secondary_data" );
    +const std::string time_gather_secondary_data_cpu( "time_gather_secondary_data_cpu" );
     const std::string time_gather_spike_data( "time_gather_spike_data" );
    +const std::string time_gather_spike_data_cpu( "time_gather_spike_data_cpu" );
     const std::string time_gather_target_data( "time_gather_target_data" );
    +const std::string time_gather_target_data_cpu( "time_gather_target_data_cpu" );
     const std::string time_in_steps( "time_in_steps" );
    +const std::string time_mpi_synchronization( "time_mpi_synchronization" );
    +const std::string time_mpi_synchronization_cpu( "time_mpi_synchronization_cpu" );
    +const std::string time_omp_synchronization_construction( "time_omp_synchronization_construction" );
    +const std::string time_omp_synchronization_construction_cpu( "time_omp_synchronization_construction_cpu" );
    +const std::string time_omp_synchronization_simulation( "time_omp_synchronization_simulation" );
    +const std::string time_omp_synchronization_simulation_cpu( "time_omp_synchronization_simulation_cpu" );
     const std::string time_simulate( "time_simulate" );
    +const std::string time_simulate_cpu( "time_simulate_cpu" );
     const std::string time_update( "time_update" );
    +const std::string time_update_cpu( "time_update_cpu" );
     const std::string times( "times" );
     const std::string to_do( "to_do" );
     const std::string total_num_virtual_procs( "total_num_virtual_procs" );
    diff --git a/nestkernel/node.h b/nestkernel/node.h
    index 72b3b5833b..f8677c3f40 100644
    --- a/nestkernel/node.h
    +++ b/nestkernel/node.h
    @@ -40,7 +40,6 @@
     #include "nest_time.h"
     #include "nest_types.h"
     #include "secondary_event.h"
    -#include "weight_optimizer.h"
     
     
     /** @file node.h
    @@ -52,7 +51,7 @@ namespace nest
     class Model;
     class ArchivingNode;
     class TimeConverter;
    -
    +class WeightOptimizer;
     
     /**
      * @defgroup user_interface Model developer interface.
    diff --git a/nestkernel/node_manager.cpp b/nestkernel/node_manager.cpp
    index 366b6445e5..0f871b77e2 100644
    --- a/nestkernel/node_manager.cpp
    +++ b/nestkernel/node_manager.cpp
    @@ -778,7 +778,7 @@ NodeManager::set_status( size_t node_id, const dictionary& d )
     void
     NodeManager::get_status( dictionary& d )
     {
    -  def< long >( d, names::network_size, size() );
    +  d[ names::network_size ] = size();
       sw_construction_create_.get_status( d, names::time_construction_create, names::time_construction_create_cpu );
     }
     
    diff --git a/nestkernel/simulation_manager.cpp b/nestkernel/simulation_manager.cpp
    index e03258912e..ccb12c2914 100644
    --- a/nestkernel/simulation_manager.cpp
    +++ b/nestkernel/simulation_manager.cpp
    @@ -483,9 +483,10 @@ nest::SimulationManager::get_status( dictionary& d )
       sw_deliver_spike_data_.get_status( d, names::time_deliver_spike_data, names::time_deliver_spike_data_cpu );
       sw_deliver_secondary_data_.get_status(
         d, names::time_deliver_secondary_data, names::time_deliver_secondary_data_cpu );
    -  def< double >( d, names::eprop_update_interval, eprop_update_interval_ );
    -  def< double >( d, names::eprop_learning_window, eprop_learning_window_ );
    -  def< bool >( d, names::eprop_reset_neurons_on_update, eprop_reset_neurons_on_update_ );
    +
    +  d[ names::eprop_update_interval ] = eprop_update_interval_;
    +  d[ names::eprop_learning_window ] = eprop_learning_window_;
    +  d[ names::eprop_reset_neurons_on_update ] = eprop_reset_neurons_on_update_;
     }
     
     void
    diff --git a/nestkernel/stopwatch.h b/nestkernel/stopwatch.h
    index 57b2c3ee10..713792c767 100644
    --- a/nestkernel/stopwatch.h
    +++ b/nestkernel/stopwatch.h
    @@ -27,15 +27,15 @@
     #include <sys/time.h>
     
     // C++ includes:
    -#include "arraydatum.h"
    -#include "dictdatum.h"
    -#include "dictutils.h"
     #include <algorithm>
     #include <cassert>
     #include <chrono>
     #include <iostream>
     #include <vector>
     
    +// Includes from libnestutil:
    +#include "dictionary.h"
    +
     // Includes from nestkernel:
     #include "exceptions.h"
     
    @@ -370,10 +370,10 @@ class Stopwatch
       }
     
       void
    -  get_status( DictionaryDatum& d, const Name& walltime_name, const Name& cputime_name ) const
    +  get_status( dictionary& d, const std::string& walltime_name, const std::string& cputime_name ) const
       {
    -    def< double >( d, walltime_name, walltime_timer_.elapsed() );
    -    def< double >( d, cputime_name, cputime_timer_.elapsed() );
    +    d[ walltime_name ] = walltime_timer_.elapsed();
    +    d[ cputime_name ] = cputime_timer_.elapsed();
       }
     
     private:
    @@ -422,7 +422,7 @@ class Stopwatch< StopwatchGranularity::Detailed,
       {
       }
       void
    -  get_status( DictionaryDatum&, const Name&, const Name& ) const
    +  get_status( dictionary&, const std::string&, const std::string& ) const
       {
       }
     
    @@ -464,7 +464,7 @@ class Stopwatch< detailed_timer,
       {
       }
       void
    -  get_status( DictionaryDatum&, const Name&, const Name& ) const
    +  get_status( dictionary&, const std::string&, const std::string& ) const
       {
       }
     
    @@ -499,21 +499,28 @@ class Stopwatch< detailed_timer,
         std::ostream& os = std::cout ) const;
     
       void
    -  get_status( DictionaryDatum& d, const Name& walltime_name, const Name& cputime_name ) const
    +  get_status( dictionary& d, const std::string& walltime_name, const std::string& cputime_name ) const
       {
    -    std::vector< double > wall_times( walltime_timers_.size() );
    +    /*
    +    auto init_doublevector = [ &d ]( const std::string& key, const size_t num_timers ) -> std::vector< double >&
    +    {
    +      assert( not d.known( key ) );
    +      d[ key ] = std::vector< double >( num_timers );
    +      return boost::any_cast< std::vector< double >& >( d[ key ] );
    +    };
    +
    +    auto& wall_times = init_doublevector( walltime_name, walltime_timers_.size() );
         std::transform( walltime_timers_.begin(),
           walltime_timers_.end(),
           wall_times.begin(),
           []( const timers::StopwatchTimer< CLOCK_MONOTONIC >& timer ) { return timer.elapsed(); } );
    -    def< ArrayDatum >( d, walltime_name, ArrayDatum( wall_times ) );
     
    -    std::vector< double > cpu_times( cputime_timers_.size() );
    +    auto& cpu_times = init_doublevector( cputime_name, cputime_timers_.size() );
         std::transform( cputime_timers_.begin(),
           cputime_timers_.end(),
           cpu_times.begin(),
           []( const timers::StopwatchTimer< CLOCK_THREAD_CPUTIME_ID >& timer ) { return timer.elapsed(); } );
    -    def< ArrayDatum >( d, cputime_name, ArrayDatum( cpu_times ) );
    +     */
       }
     
     private:
    
    From 922485b383dc09bc2c2a9f6f25578c97857332be Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 15 Apr 2025 22:44:41 +0200
    Subject: [PATCH 368/375] Return long instead of enum value to pynest
    
    ---
     models/eprop_readout.h | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/models/eprop_readout.h b/models/eprop_readout.h
    index eda2eca5a5..8f0633e691 100644
    --- a/models/eprop_readout.h
    +++ b/models/eprop_readout.h
    @@ -555,8 +555,8 @@ eprop_readout::get_status( dictionary& d ) const
       d[ names::recordables ] = recordablesMap_.get_list();
     
       dictionary receptor_dict;
    -  receptor_dict[ names::eprop_learning_window ] = LEARNING_WINDOW_SIG;
    -  receptor_dict[ names::target_signal ] = TARGET_SIG;
    +  receptor_dict[ names::eprop_learning_window ] = static_cast< long >( LEARNING_WINDOW_SIG );
    +  receptor_dict[ names::target_signal ] = static_cast< long >( TARGET_SIG );
     
       d[ names::receptor_types ] = receptor_dict;
     }
    
    From 2ff5fc3fde58c0ffcfd685a9799f2dfdd2636ab9 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 15 Apr 2025 22:44:57 +0200
    Subject: [PATCH 369/375] Adjust tests to pynest-ng
    
    ---
     .../sli2py_regressions/test_issue_327.py      |  8 +++---
     .../sli2py_synapses/test_hpc_synapse.py       |  1 +
     .../test_aeif_cond_beta_multisynapse.py       |  4 +--
     .../test_eprop_bsshslm_2020_plasticity.py     |  6 ++--
     testsuite/pytests/test_eprop_plasticity.py    | 28 +++++++++----------
     5 files changed, 24 insertions(+), 23 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_327.py b/testsuite/pytests/sli2py_regressions/test_issue_327.py
    index 018669c244..aacebe07a5 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_327.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_327.py
    @@ -33,7 +33,7 @@ def test_spike_generator_large_precise_times():
         Test that spike_generator handles large precise times correctly.
         """
         nest.ResetKernel()
    -    nest.SetKernelStatus({"resolution": 0.1})
    +    nest.resolution = 0.1
     
         sg = nest.Create(
             "spike_generator",
    @@ -51,12 +51,12 @@ def test_spike_generator_large_precise_times():
     
         nest.Simulate(360000)
     
    -    events = nest.GetStatus(sr, "events")[0]
    +    events = sr.events
         times = events["times"]
         offsets = events["offsets"]
     
         # Check correct step, account for delay 1 ms
    -    assert times[0] == 3535393
    +    assert times == 3535393
     
         # Check for correct offset, precision limited by spike time * eps
    -    assert abs(offsets[0]) < 1e-9
    +    assert abs(offsets) < 1e-9
    diff --git a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    index ffc7ae0572..372ce636ba 100644
    --- a/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    +++ b/testsuite/pytests/sli2py_synapses/test_hpc_synapse.py
    @@ -57,6 +57,7 @@ def has_hpc_suffix(syn_model):
     def get_hpc_models():
         ignore_list = [
             "clopath_synapse_hpc",
    +        "eprop_synapse_hpc",
             "eprop_synapse_bsshslm_2020_hpc",
             "stdp_dopamine_synapse_hpc",
             "urbanczik_synapse_hpc",
    diff --git a/testsuite/pytests/test_aeif_cond_beta_multisynapse.py b/testsuite/pytests/test_aeif_cond_beta_multisynapse.py
    index dab479c5dc..5e255b7177 100644
    --- a/testsuite/pytests/test_aeif_cond_beta_multisynapse.py
    +++ b/testsuite/pytests/test_aeif_cond_beta_multisynapse.py
    @@ -208,7 +208,7 @@ def test_refractoriness_clamping(self, t_ref):
     
             nest.Simulate(10.0)
     
    -        stime = sr.events["times"][0] - 1  # minus one because of 1-based indexing
    +        stime = sr.events["times"] - 1  # minus one because of 1-based indexing
     
             # test that V_m == V_reset at spike time
             np.testing.assert_almost_equal(vm.events["V_m"][stime], V_reset)
    @@ -259,7 +259,7 @@ def test_w_dynamics_during_refractoriness(self):
     
             nest.Simulate(50.0)
     
    -        stime = sr.events["times"][0] - 1  # minus one because of 1-based indexing
    +        stime = sr.events["times"] - 1  # minus one because of 1-based indexing
     
             # time, voltage, w at spike
             w0 = vm.events["w"][stime]
    diff --git a/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py b/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    index 673288e6a9..13a48a8125 100644
    --- a/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    +++ b/testsuite/pytests/test_eprop_bsshslm_2020_plasticity.py
    @@ -820,7 +820,7 @@ def test_unsupported_surrogate_gradient(source_model):
             "surrogate_gradient_function": "unsupported_surrogate_gradient",
         }
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults(source_model, params_nrn_rec)
     
     
    @@ -871,7 +871,7 @@ def test_eprop_history_cleaning(neuron_model, eprop_history_duration_reference):
             "record_from": ["eprop_history_duration"],
         }
     
    -    mm_rec = nest.Create("multimeter", params_mm_rec)
    +    mm_rec = nest.Create("multimeter", params=params_mm_rec)
     
         # Create connections
     
    @@ -905,7 +905,7 @@ def test_eprop_history_cleaning(neuron_model, eprop_history_duration_reference):
     
         params_gen_spk_in = [{"spike_times": spike_times} for spike_times in input_spike_times]
     
    -    nest.SetStatus(gen_spk_in, params_gen_spk_in)
    +    gen_spk_in.set(params_gen_spk_in)
     
         # Simulate
     
    diff --git a/testsuite/pytests/test_eprop_plasticity.py b/testsuite/pytests/test_eprop_plasticity.py
    index 6bb51436ef..0c7e264892 100644
    --- a/testsuite/pytests/test_eprop_plasticity.py
    +++ b/testsuite/pytests/test_eprop_plasticity.py
    @@ -27,7 +27,7 @@
     import numpy as np
     import pytest
     
    -nest.set_verbosity("M_WARNING")
    +nest.set_verbosity(nest.verbosity.M_WARNING)
     
     supported_source_models = ["eprop_iaf", "eprop_iaf_adapt", "eprop_iaf_psc_delta", "eprop_iaf_psc_delta_adapt"]
     supported_target_models = supported_source_models + ["eprop_readout"]
    @@ -60,7 +60,7 @@ def test_unsupported_model_raises(target_model):
         src_nrn = nest.Create(supported_source_models[0])
         tgt_nrn = nest.Create(target_model)
     
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             nest.Connect(src_nrn, tgt_nrn, "all_to_all", {"synapse_model": "eprop_synapse"})
     
     
    @@ -251,10 +251,10 @@ def test_eprop_regression(neuron_model, optimizer, loss_nest_reference):
             "stop": duration["total_offset"] + duration["task"],
         }
     
    -    mm_rec = nest.Create("multimeter", params_mm_rec)
    -    mm_out = nest.Create("multimeter", params_mm_out)
    -    sr = nest.Create("spike_recorder", params_sr)
    -    wr = nest.Create("weight_recorder", params_wr)
    +    mm_rec = nest.Create("multimeter", params=params_mm_rec)
    +    mm_out = nest.Create("multimeter", params=params_mm_out)
    +    sr = nest.Create("spike_recorder", params=params_sr)
    +    wr = nest.Create("weight_recorder", params=params_wr)
     
         nrns_rec_record = nrns_rec[:n_record]
     
    @@ -360,7 +360,7 @@ def test_eprop_regression(neuron_model, optimizer, loss_nest_reference):
             input_spike_times_all = [input_spike_times + start for start in sequence_starts]
             params_gen_spk_in.append({"spike_times": np.hstack(input_spike_times_all).astype(dtype_in_spks)})
     
    -    nest.SetStatus(gen_spk_in, params_gen_spk_in)
    +    gen_spk_in.set(params_gen_spk_in)
     
         # Create output
     
    @@ -387,7 +387,7 @@ def generate_superimposed_sines(steps_sequence, periods):
             "amplitude_values": np.tile(target_signal, n_iter * group_size),
         }
     
    -    nest.SetStatus(gen_rate_target, params_gen_rate_target)
    +    gen_rate_target.set(params_gen_rate_target)
     
         # Create learning window
     
    @@ -396,7 +396,7 @@ def generate_superimposed_sines(steps_sequence, periods):
             "amplitude_values": [1.0],
         }
     
    -    nest.SetStatus(gen_learning_window, params_gen_learning_window)
    +    gen_learning_window.set(params_gen_learning_window)
     
         # Simulate
     
    @@ -435,7 +435,7 @@ def test_unsupported_surrogate_gradient(source_model):
             "surrogate_gradient_function": "unsupported_surrogate_gradient",
         }
     
    -    with pytest.raises(nest.kernel.NESTErrors.BadProperty):
    +    with pytest.raises(nest.NESTErrors.BadProperty):
             nest.SetDefaults(source_model, params_nrn_rec)
     
     
    @@ -531,7 +531,7 @@ def test_eprop_surrogate_gradients(surrogate_gradient_type, surrogate_gradient_r
             "record_from": ["surrogate_gradient", "V_m"],
         }
     
    -    mm_rec = nest.Create("multimeter", params_mm_rec)
    +    mm_rec = nest.Create("multimeter", params=params_mm_rec)
     
         params_conn_one_to_one = {"rule": "one_to_one"}
         params_syn = {
    @@ -544,7 +544,7 @@ def test_eprop_surrogate_gradients(surrogate_gradient_type, surrogate_gradient_r
             "delay": duration["step"],
         }
     
    -    nest.SetStatus(gen_spk_in, {"spike_times": [1.0, 2.0, 3.0, 5.0, 9.0, 11.0]})
    +    gen_spk_in.set({"spike_times": [1.0, 2.0, 3.0, 5.0, 9.0, 11.0]})
     
         nest.Connect(gen_spk_in, nrns_in, params_conn_one_to_one, params_syn_static)
         nest.Connect(nrns_in, nrns_rec, params_conn_one_to_one, params_syn)
    @@ -614,7 +614,7 @@ def test_eprop_history_cleaning(neuron_model, eprop_isi_trace_cutoff, eprop_hist
             "record_from": ["eprop_history_duration"],
         }
     
    -    mm_rec = nest.Create("multimeter", params_mm_rec)
    +    mm_rec = nest.Create("multimeter", params=params_mm_rec)
     
         # Create connections
     
    @@ -648,7 +648,7 @@ def test_eprop_history_cleaning(neuron_model, eprop_isi_trace_cutoff, eprop_hist
     
         params_gen_spk_in = [{"spike_times": spike_times} for spike_times in input_spike_times]
     
    -    nest.SetStatus(gen_spk_in, params_gen_spk_in)
    +    gen_spk_in.set(params_gen_spk_in)
     
         # Simulate
     
    
    From 125671c3999fef44fc42381a7b493a2db939aec4 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 16 Apr 2025 00:51:21 +0200
    Subject: [PATCH 370/375] Hike isort runner to ubuntu-22.04
    
    ---
     .github/workflows/nestbuildmatrix.yml | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/.github/workflows/nestbuildmatrix.yml b/.github/workflows/nestbuildmatrix.yml
    index 9f656506f1..63cae1000e 100644
    --- a/.github/workflows/nestbuildmatrix.yml
    +++ b/.github/workflows/nestbuildmatrix.yml
    @@ -358,7 +358,7 @@ jobs:
               pylint --jobs=$(nproc) pynest/ testsuite/pytests/*.py testsuite/regressiontests/*.py
     
       isort:
    -    runs-on: "ubuntu-20.04"
    +    runs-on: "ubuntu-22.04"
         steps:
           - name: "Checkout repository content"
             uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
    
    From 49341f648ef084c3626990373c8020d6906fd98e Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Wed, 18 Jun 2025 08:34:46 +0200
    Subject: [PATCH 371/375] Make GetStatus/SetStatus available again, marked as
     deprecated
    
    ---
     pynest/nest/lib/hl_api_info.py | 23 ++++++++++++++++++++++-
     1 file changed, 22 insertions(+), 1 deletion(-)
    
    diff --git a/pynest/nest/lib/hl_api_info.py b/pynest/nest/lib/hl_api_info.py
    index 179f85768d..dc732730d0 100644
    --- a/pynest/nest/lib/hl_api_info.py
    +++ b/pynest/nest/lib/hl_api_info.py
    @@ -30,13 +30,21 @@
     import nest
     
     from .. import nestkernel_api as nestkernel
    -from .hl_api_helper import broadcast, is_iterable, load_help, show_help_with_pager
    +from .hl_api_helper import (
    +    broadcast,
    +    deprecated,
    +    is_iterable,
    +    load_help,
    +    show_help_with_pager,
    +)
     from .hl_api_types import to_json
     
     __all__ = [
    +    "GetStatus",
         "get_verbosity",
         "help",
         "helpdesk",
    +    "SetStatus",
         "set_verbosity",
         "verbosity",
     ]
    @@ -154,3 +162,16 @@ def set_verbosity(level):
             raise TypeError('"level" must be a value of the nest.verbosity enum.')
     
         nestkernel.llapi_set_verbosity(level)
    +
    +
    +@deprecated("get", "Instead of GetStatus(nrns|conns, args), use nrns|conns.get(args).")
    +def GetStatus(nodes_or_conns, keys=None, output=""):
    +    if keys:
    +        return nodes_or_conns.get(keys, output=output)
    +    else:
    +        return nodes_or_conns.get(output=output)
    +
    +
    +@deprecated("set", "Instead of SetStatus(nrns|conns, args), use nrns|conns.set(args).")
    +def SetStatus(nodes_or_conns, params, val=None):
    +    nodes_or_conns.set(params if val is None else {params: val})
    
    From 664f582c96548160007022ae98fcd176262ec31d Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Tue, 24 Jun 2025 22:27:59 +0200
    Subject: [PATCH 372/375] Adapted tests to pynest-ng and modernized
    
    ---
     .../sli2py_regressions/test_issue_659.py      |  2 +-
     .../sli2py_regressions/test_issue_707.py      |  5 +--
     .../sli2py_regressions/test_issue_708.py      | 39 +++++++------------
     .../sli2py_regressions/test_issue_735.py      |  4 +-
     4 files changed, 17 insertions(+), 33 deletions(-)
    
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_659.py b/testsuite/pytests/sli2py_regressions/test_issue_659.py
    index 27061e5770..2481c24ac9 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_659.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_659.py
    @@ -33,7 +33,7 @@ def test_run_without_prepare():
         Test that calling Run without Prepare results in an error.
         """
         nest.ResetKernel()
    -    with pytest.raises(nest.kernel.NESTError):
    +    with pytest.raises(nest.NESTError):
             nest.Run(10.0)
     
     
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_707.py b/testsuite/pytests/sli2py_regressions/test_issue_707.py
    index b910efd582..60a08298ec 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_707.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_707.py
    @@ -50,7 +50,4 @@ def test_gap_junction_weight_recording():
     
         nest.Simulate(10.0)
     
    -    events = nest.GetStatus(wr, "events")[0]
    -    weights = events["weights"]
    -
    -    assert weights[0] == 2.0
    +    assert wr.get("events", "weights")[0] == 2.0
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_708.py b/testsuite/pytests/sli2py_regressions/test_issue_708.py
    index 5495b22e31..271ebb2b82 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_708.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_708.py
    @@ -33,46 +33,33 @@ def test_copymodel_with_secondary_events():
         """
         Test that CopyModel works with connection types that use secondary events.
         """
    -    nest.ResetKernel()
     
    -    neuron_in = nest.Create("hh_psc_alpha_gap")
    -    neuron_out1 = nest.Create("hh_psc_alpha_gap")
    -    neuron_out2 = nest.Create("hh_psc_alpha_gap")
    -    vm1 = nest.Create("voltmeter")
    -    vm2 = nest.Create("voltmeter")
    +    neuron_in = nest.Create("hh_psc_alpha_gap", params={"I_e": 200.0})
    +    neurons_out = nest.Create("hh_psc_alpha_gap", n=2)
     
    -    nest.CopyModel("gap_junction", "syn0")
    -    nest.CopyModel("gap_junction", "syn1")
    -
    -    nest.SetStatus(neuron_in, {"I_e": 200.0})
    -    nest.SetStatus(vm1, {"interval": 1.0})
    -    nest.SetStatus(vm2, {"interval": 1.0})
    +    nest.CopyModel("gap_junction", "syn0", {"weight": 5.0})
    +    nest.CopyModel("gap_junction", "syn1", {"weight": 10.0})
     
         nest.Connect(
             neuron_in,
    -        neuron_out1,
    +        neurons_out[0],
             conn_spec={"rule": "one_to_one", "make_symmetric": True},
    -        syn_spec={"synapse_model": "syn0", "weight": 10.0},
    +        syn_spec={"synapse_model": "syn0"},
         )
     
         nest.Connect(
             neuron_in,
    -        neuron_out2,
    +        neurons_out[1],
             conn_spec={"rule": "one_to_one", "make_symmetric": True},
    -        syn_spec={"synapse_model": "syn1", "weight": 10.0},
    +        syn_spec={"synapse_model": "syn1"},
         )
     
    -    nest.Connect(vm1, neuron_out1)
    -    nest.Connect(vm2, neuron_out2)
    +    V_m_ini = neurons_out.V_m
     
         nest.Simulate(10.0)
     
    -    # Check that neuron_out1 received the input
    -    events_vm1 = nest.GetStatus(vm1, "events")[0]
    -    V_m_vm1 = events_vm1["V_m"]
    -    assert V_m_vm1[8] > -6.960401e01
    +    # Check that both neurons have become depolarized due to input from neuron_in
    +    assert all(neurons_out.V_m > V_m_ini)
     
    -    # Check that neuron_out2 received the input
    -    events_vm2 = nest.GetStatus(vm2, "events")[0]
    -    V_m_vm2 = events_vm2["V_m"]
    -    assert V_m_vm2[8] > -6.960401e01
    +    # Check stronger effect on second neuron due to larger weight
    +    assert neurons_out[1].V_m > neurons_out[0].V_m
    diff --git a/testsuite/pytests/sli2py_regressions/test_issue_735.py b/testsuite/pytests/sli2py_regressions/test_issue_735.py
    index 943280404d..dde6d6d43d 100644
    --- a/testsuite/pytests/sli2py_regressions/test_issue_735.py
    +++ b/testsuite/pytests/sli2py_regressions/test_issue_735.py
    @@ -47,7 +47,7 @@ def test_issue_735(use_param_on_connect, copy_model, param_name):
             syn_model = "stdp_dopamine_synapse"
     
         if use_param_on_connect:
    -        with pytest.raises(nest.kernel.NESTErrors.NotImplemented):
    +        with pytest.raises(nest.NESTErrors.NotImplemented):
                 nest.Connect(
                     n,
                     n,
    @@ -57,5 +57,5 @@ def test_issue_735(use_param_on_connect, copy_model, param_name):
         else:
             nest.Connect(n, n, syn_spec={"synapse_model": syn_model, "weight": 2.0})
             conns = nest.GetConnections()
    -        with pytest.raises(nest.kernel.NESTErrors.DictError):
    +        with pytest.raises(nest.NESTErrors.UnaccessedDictionaryEntry):
                 conns.set({param_name: 1.0, "weight": 2.0})
    
    From 16a66fceeca34fa4ed51e4a8e25945b185187cb8 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Fri, 27 Jun 2025 22:56:37 +0200
    Subject: [PATCH 373/375] Adjust test to pynest-ng
    
    ---
     testsuite/pytests/sli2py_regressions/test_ticket_349.py | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/testsuite/pytests/sli2py_regressions/test_ticket_349.py b/testsuite/pytests/sli2py_regressions/test_ticket_349.py
    index f773cb2d0a..6878fdf967 100644
    --- a/testsuite/pytests/sli2py_regressions/test_ticket_349.py
    +++ b/testsuite/pytests/sli2py_regressions/test_ticket_349.py
    @@ -41,7 +41,7 @@ def test_exception_on_bad_recordables():
         mm = nest.Create("multimeter")
         nrn = nest.Create("iaf_psc_alpha")
     
    -    with pytest.raises(nest.kernel.NESTErrors.IllegalConnection):
    +    with pytest.raises(nest.NESTErrors.IllegalConnection):
             mm.record_from = not_recordables
             nest.Connect(mm, nrn)
     
    
    From 8c8f7df458eefd728474cfb093946251c4294d73 Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sat, 28 Jun 2025 22:48:21 +0200
    Subject: [PATCH 374/375] Support sending empty lists from Python to NEST
    
    ---
     libnestutil/dictionary.h  | 65 +++++++++++++++++++++++++++++++++++++--
     pynest/nestkernel_api.pyx | 18 ++++++++---
     2 files changed, 77 insertions(+), 6 deletions(-)
    
    diff --git a/libnestutil/dictionary.h b/libnestutil/dictionary.h
    index a074c5fb3f..d46ff4a750 100644
    --- a/libnestutil/dictionary.h
    +++ b/libnestutil/dictionary.h
    @@ -95,7 +95,7 @@ class dictionary : public std::map< std::string, DictEntry_ >
       using maptype_::maptype_; // Inherit constructors
     
       /**
    -   * @brief Cast the specified value to the specified type.
    +   * @brief Cast the specified non-vector value to the specified type.
        *
        * @tparam T Type of element. If the value is not of the specified type, a TypeMismatch error is thrown.
        * @param value the any object to cast.
    @@ -119,6 +119,44 @@ class dictionary : public std::map< std::string, DictEntry_ >
         }
       }
     
    +  /**
    +   * @brief Cast the specified vector value to the specified type.
    +   *
    +   * @tparam T Type of vector element. If the value is not of the specified type, a TypeMismatch error is thrown.
    +   * @param value the any object to cast.
    +   * @param key key where the value is located in the dictionary, for information upon cast errors.
    +   * @throws TypeMismatch if the value is not of specified type T.
    +   * @return value cast to the specified type.
    +   *
    +   * @note A dedicated cast_vector_value_() allows handling of empty vectors passed from the Python level.
    +   */
    +  template < typename T >
    +  std::vector< T >
    +  cast_vector_value_( const boost::any& value, const std::string& key ) const
    +  {
    +    // PyNEST passes vector with element type any if and only if it needs to pass
    +    // and empty vector, because the element type of empty lists cannot be inferred
    +    // at the Python level. The assertion just double-checks that we never get a
    +    // non-empty vector-of-any.
    +    if ( value.type() == typeid( std::vector< boost::any > ) )
    +    {
    +      assert( boost::any_cast< std::vector< boost::any > >( value ).empty() );
    +      return std::vector< T >();
    +    }
    +
    +    // Now handle vectors with elements
    +    try
    +    {
    +      return boost::any_cast< std::vector< T > >( value );
    +    }
    +    catch ( const boost::bad_any_cast& )
    +    {
    +      std::string msg = std::string( "Failed to cast '" ) + key + "' from " + debug_type( value ) + " to type "
    +        + std::string( boost::core::demangle( typeid( std::vector< T > ).name() ) );
    +      throw nest::TypeMismatch( msg );
    +    }
    +  }
    +
       /**
        * @brief Cast the specified value to an integer.
        *
    @@ -180,7 +218,7 @@ class dictionary : public std::map< std::string, DictEntry_ >
       }
     
       /**
    -   * @brief Update the specified value if there exists a value at key.
    +   * @brief Update the specified non-vector value if there exists a value at key.
        *
        * @param key key where the value may be located in the dictionary.
        * @param value object to update if there exists a value at key.
    @@ -200,6 +238,29 @@ class dictionary : public std::map< std::string, DictEntry_ >
         return false;
       }
     
    +  /**
    +   * @brief Update the specified vector value if there exists a value at key.
    +   *
    +   * @param key key where the value may be located in the dictionary.
    +   * @param value object to update if there exists a value at key.
    +   * @throws TypeMismatch if the value at key is not the same type as the value argument.
    +   * @return Whether value was updated.
    +   *
    +   * @note The specialisation for values that are vectors allows handling of empty vectors passed from the Python level.
    +   */
    +  template < typename T >
    +  bool
    +  update_value( const std::string& key, std::vector< T >& value ) const
    +  {
    +    auto it = find( key );
    +    if ( it != end() )
    +    {
    +      value = cast_vector_value_< T >( it->second.item, key );
    +      return true;
    +    }
    +    return false;
    +  }
    +
       /**
        * @brief Update the specified value if there exists an integer value at key.
        *
    diff --git a/pynest/nestkernel_api.pyx b/pynest/nestkernel_api.pyx
    index 9f66579168..63be9449f2 100644
    --- a/pynest/nestkernel_api.pyx
    +++ b/pynest/nestkernel_api.pyx
    @@ -221,6 +221,7 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
         for key, value in py_dict.items():
             if type(value) is tuple:
                 value = list(value)
    +
             if type(value) is int or isinstance(value, numpy.integer):
     	    # PYTEST-NG: Should we guard against overflow given that python int has infinite range?
                 cdict[pystr_to_string(key)] = <long>value
    @@ -230,6 +231,11 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
                 cdict[pystr_to_string(key)] = <cbool>value
             elif type(value) is str:
                 cdict[pystr_to_string(key)] = <string>pystr_to_string(value)
    +        elif type(value) is list and len(value) == 0:
    +            # We cannot infer the intended element type from an empty list.
    +            # We therefore pass an empty vector[any]. vector[any] will always be empty
    +            # and an empty vector will always be vector[any] in the PyNEST interface.
    +            cdict[pystr_to_string(key)] = empty_any_vec()
             elif is_list_tuple_ndarray_of_float(value):
                 cdict[pystr_to_string(key)] = pylist_or_ndarray_to_doublevec(value)
             elif is_list_tuple_ndarray_of_int(value):
    @@ -253,11 +259,10 @@ cdef dictionary pydict_to_dictionary(object py_dict) except *:  # Adding "except
             else:
                 typename = type(value)
                 if type(value) is list:
    -                if len(value) > 0:
    -                    typename = f"list of {type(value[0])}"
    -                else:
    -                    typename = f"empty list (for which the element type cannot be determined)"
    +                assert len(value) > 0   # empty list should have been caught above
    +                typename = f"list of {type(value[0])}"
                 raise AttributeError(f'when converting Python dictionary: value of key ({key}) is not a known type, got {typename}')
    +
         return cdict
     
     
    @@ -270,6 +275,11 @@ cdef object vec_of_dict_to_list(vector[dictionary] cvec):
         return tmp
     
     
    +cdef vector[any] empty_any_vec():
    +    cdef vector[any] empty_vec
    +    return empty_vec
    +
    +
     cdef vector[dictionary] list_of_dict_to_vec(object pylist):
         cdef vector[dictionary] vec
         # PYNEST-NG: reserve the correct size and use index-based
    
    From efbfe930a02a8861b78edcf21d27c89e4c99f8bc Mon Sep 17 00:00:00 2001
    From: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
    Date: Sun, 29 Jun 2025 07:15:31 +0200
    Subject: [PATCH 375/375] Increase memory footprint for memsize test
    
    ---
     testsuite/pytests/test_memsize.py | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/testsuite/pytests/test_memsize.py b/testsuite/pytests/test_memsize.py
    index 45f87b5563..b27dcd613f 100644
    --- a/testsuite/pytests/test_memsize.py
    +++ b/testsuite/pytests/test_memsize.py
    @@ -42,8 +42,8 @@ def test_memsize():
     
         m_pre = nest.memory_size
     
    -    n = nest.Create("parrot_neuron", 1000)
    -    nest.Connect(n, n)
    +    n = nest.Create("aeif_cond_alpha", 2000)
    +    nest.Connect(n, n, syn_spec={"synapse_model": "stdp_synapse"})
     
         m_post = nest.memory_size